@finos/legend-application-repl-deployment 12.65.0 → 12.66.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/repl/index.html +1 -1
- package/dist/repl/static/{index.480db98a.css → index.24e81e5b.css} +3 -3
- package/dist/repl/static/{index.480db98a.css.map → index.24e81e5b.css.map} +1 -1
- package/dist/repl/static/{index.876ae859.js → index.bb036870.js} +2 -2
- package/dist/repl/static/index.bb036870.js.map +1 -0
- package/dist/repl/version.json +1 -1
- package/package.json +2 -2
- package/dist/repl/static/index.876ae859.js.map +0 -1
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"static/index.876ae859.js","mappings":"UAAIA,ECCAC,EADAC,ECAAC,EACAC,E,gICkBOC,E,WCHJ,MAAMC,EACTC,KACAC,QACAC,UACAC,KAEG,MAAM,EACTH,KACAC,QACAE,MAAO,SACP,WAAAC,CAAYJ,EAAMC,GACdI,KAAKL,KAAOA,EACZK,KAAKJ,QAAUA,CACnB,CACA,OAAAK,GACI,OAAOD,KAAKL,IAChB,CACA,UAAAO,GACI,OAAOF,KAAKJ,OAChB,CACA,YAAAO,GACI,MAAO,GAAGH,KAAKC,aAAaD,KAAKE,cACrC,CACA,OAAAE,GACI,OAAOJ,KAAKF,IAChB,CACA,OAAAO,GACI,MAAMC,EAAO,IAAIZ,EAKjB,OAJAY,EAAKX,KAAOK,KAAKC,UACjBK,EAAKV,QAAUI,KAAKE,aACpBI,EAAKT,UAAYG,KAAKG,eACtBG,EAAKR,KAAOE,KAAKI,UACVE,CACX,CACA,SAAAC,CAAUC,GACN,OAAOR,IACX,EAoDG,MAAMS,EACTC,QAAU,GACVC,QAAU,GACV,UAAAC,CAAWF,GAEP,OADAV,KAAKU,QAAUA,EACRV,IACX,CACA,UAAAa,CAAWF,GAEP,OADAX,KAAKW,QAAUA,EACRX,IACX,CACA,SAAAO,CAAUC,GACNM,OAAOC,KAAKP,GAAYQ,SAASC,IAC7B,MAAMC,EAAYV,EAAWS,GAC7BjB,KAAKW,QAAQK,SAASG,IACd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xD,mBAAqBxvC,GAAsB5hB,EAAc2e,kBAAmBmD,IAC1F,SAAe9hB,EAAe,CAC1B6c,KAAM,MACNy0C,QAAS,MACTvoE,YAAa,MACbwoE,eAAgB,MAChBx0C,SAAU,MACVy0C,YAAa,MACbx0C,cAAe,MACfy0C,iBAAkB,MAClBx0C,uBAAwB,MACxBy0C,0BAA2B,MAC3Bx0C,YAAa,MACby0C,eAAgB,MAChBx0C,wBAAyB,MACzBy0C,2BAA4B,MAC5BlyD,WAAY,MACZmyD,cAAe,MACfvyD,SAAU,MACVwyD,YAAa,MACb10C,SAAU,MACV20C,YAAa,MACb10C,WAAY,MACZ20C,cAAe,MACf10C,cAAe,MACf20C,iBAAkB,MAClB10C,kBAAmB,MACnB20C,qBAAsB,MACtB10C,SAAU,MACV20C,YAAa,MACb10C,UAAW,MACX20C,aAAc,MACd10C,sBAAuB,MACvB20C,yBAA0B,MAC1B10C,wBAAyB,MACzB20C,2BAA4B,MAC5B10C,oBAAqB,MACrB20C,uBAAwB,MACxB10C,qBAAsB,MACtB20C,wBAAyB,MACzB10C,sBAAuB,MACvB20C,yBAA0B,MAC1B10C,wBAAyB,MACzB20C,2BAA4B,MAC5B10C,oBAAqB,MACrB20C,uBAAwB,MACxB10C,qBAAsB,MACtB20C,wBAAyB,MACzB10C,WAAY,MACZ20C,cAAe,MACf10C,aAAc,MACd20C,gBAAiB,MACjB10C,KAAM,MACN20C,QAAS,MACT10C,WAAY,MACZ20C,cAAe,MACf10C,SAAU,MACV20C,YAAa,MACb10C,SAAU,MACV20C,YAAa,MACb10C,OAAQ,MACR20C,UAAW,MACX10C,cAAe,MACf20C,iBAAkB,MAClB10C,mBAAoB,MACpB20C,sBAAuB,MACvBC,sBAAuB,MACvBC,kBAAmB,MACnB50C,kBAAmB,MACnByyC,mBAAoB,MACpBoC,sBAAuB,MACvB50C,sBAAuB,MACvB60C,yBAA0B,MAC1B50C,kBAAmB,MACnB60C,qBAAsB,MACtB50C,mBAAoB,MACpB60C,s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AI2C,GAAsC70C,GAAsBvoC,cAAcpB,SAASlF,IAwE3H,OAvEA0vB,EAAcof,QAAU,IACxB,SAAepf,EAAe,CAC1Bp6B,KAAM,MACNquF,QAAS,MACTruD,YAAa,MACbsuD,eAAgB,MAChB70C,wBAAyB,MACzB80C,2BAA4B,MAC5B70C,sBAAuB,MACvB80C,yBAA0B,MAC1B70C,cAAe,MACf80C,iBAAkB,MAClB30D,WAAY,MACZmyD,cAAe,MACfvyD,SAAU,MACVwyD,YAAa,MACb10C,SAAU,MACV20C,YAAa,MACb10C,WAAY,MACZ20C,cAAe,MACf10C,cAAe,MACf20C,iBAAkB,MAClB10C,kBAAmB,MACnB20C,qBAAsB,MACtB10C,SAAU,MACV20C,YAAa,MACb10C,UAAW,MACX20C,aAAc,MACd10C,sBAAuB,MACvB20C,yBAA0B,MAC1B10C,wBAAyB,MACzB20C,2BAA4B,MAC5B10C,oBAAqB,MACrB20C,uBAAwB,MACxB10C,qBAAsB,MACtB20C,wBAAyB,MACzB10C,sBAAuB,MACvB20C,yBAA0B,MAC1B10C,wBAAyB,MACzB20C,2BAA4B,MAC5B10C,oBAAqB,MACrB20C,uBAAwB,MACxB10C,qBAAsB,MACtB20C,wBAAyB,MACzBpzC,cAAe,MACf80C,iBAAkB,MAClB50C,mBAAoB,MACpB60C,sBAAuB,MACvB50C,mBAAoB,MACpB60C,sBAAuB,MACvB/0C,0BAA2B,MAC3Bg1C,6BAA8B,MAC9B70C,mBAAoB,MACpB80C,sBAAuB,MACvB70C,8BAA+B,MAC/B80C,iCAAkC,MAClC70C,mBAAoB,MACpB80C,sBAAuB,MACvB70C,oBAAqB,MACrB80C,uBAAwB,MACxB70C,cAAe,MACf80C,iBAAkB,MAClB70C,wBAAyB,MACzB80C,2BAA4B,MAC5B70C,yBAA0B,MAC1B80C,4BAA6B,MAC7B70C,8BAA+B,MAC/B80C,iCAAkC,MAClC3B,sBAAuB,MACvBC,kBAAmB,QAEhBvzD,CACX,CACA,yBAAIszD,GACA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BC,EAAE8D,EAAiB7B,IAAY6B,EAAgB7B,IACrE6B,EAAgB7B,GAAS,KAE1B6B,EAAgB7B,GAAW,EAE5B,OAAOlC,EAAoBc,EAAEz9F,EAAO,EAGjCkhG,EAAqBhC,WAAkE,sDAAIA,WAAkE,uDAAK,GACtKgC,EAAmBlzG,QAAQ+yG,EAAqBvyF,KAAK,KAAM,IAC3D0yF,EAAmB7hG,KAAO0hG,EAAqBvyF,KAAK,KAAM0yF,EAAmB7hG,KAAKmP,KAAK0yF,G,KCrFvFvE,EAAoBqD,QAAK3uG,ECGzB,IAAI8vG,EAAsBxE,EAAoBc,OAAEpsG,EAAW,CAAC,MAAM,IAAOsrG,EAAoB,SAC7FwE,EAAsBxE,EAAoBc,EAAE0D,E","sources":["webpack://@finos/legend-application-repl-deployment/webpack/runtime/chunk loaded","webpack://@finos/legend-application-repl-deployment/webpack/runtime/create fake namespace object","webpack://@finos/legend-application-repl-deployment/webpack/runtime/load script","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/log/LogService.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/application/AbstractPluginManager.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/log/WebConsole.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/CommonUtils.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/error/ErrorUtils.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/error/AssertionUtils.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/network/NetworkUtils.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/__lib__/LegendApplicationEvent.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/application/SerializationUtils.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/application/DocumentationUtils.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/DocumentationService.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/application/ActionState.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/network/TracerService.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/search/FuzzySearch.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/search/FuzzySearchAdvancedConfigState.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/AssistantService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/event/EventService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/__lib__/LegendApplicationTelemetry.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/ApplicationNavigationContextService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/CommandService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/KeyboardShortcutsService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/ApplicationConfig.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/terminal/Terminal.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/format/FormatterUtils.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/keyboard/KeyBinding.js","webpack://@finos/legend-application-repl-deployment/../legend-art/lib/utils/LegendStyleProvider.js","webpack://@finos/legend-application-repl-deployment/../legend-art/lib/utils/ComponentCreatorUtils.js","webpack://@finos/legend-application-repl-deployment/../legend-art/lib/dialog/Modal.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/AlertService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/components/ApplicationStoreProvider.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/components/ActionAlert.js","webpack://@finos/legend-application-repl-deployment/../legend-art/lib/layout/PanelLoadingIndicator.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/components/BlockingAlert.js","webpack://@finos/legend-application-repl-deployment/../legend-art/lib/icon/Icon.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/NotificationService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/components/NotificationManager.js","webpack://@finos/legend-application-repl-deployment/../legend-art/lib/menu/BaseMenu.js","webpack://@finos/legend-application-repl-deployment/../legend-art/lib/menu/ContextMenu.js","webpack://@finos/legend-application-repl-deployment/../legend-art/lib/menu/MenuContent.js","webpack://@finos/legend-application-repl-deployment/../legend-art/lib/markdown/MarkdownTextViewer.js","webpack://@finos/legend-application-repl-deployment/../legend-art/lib/layout/BlankPanelContent.js","webpack://@finos/legend-application-repl-deployment/../legend-art/lib/radio-group/BaseRadioGroup.js","webpack://@finos/legend-application-repl-deployment/../legend-art/lib/popover/BasePopover.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/__lib__/LegendApplicationDocumentation.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/components/VirtualAssistant.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/components/ApplicationComponentFrameworkProvider.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/terminal/XTerm.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/TerminalService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/IdentityService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/__lib__/LegendApplicationColorTheme.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/storage/ApplicationStorage.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/storage/StorageService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/TelemetryService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/TimeService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/__lib__/LegendApplicationSetting.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/LayoutService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/ClipboardService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/navigation/NavigationService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/SettingService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/navigation/DefaultNavigator.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/UserDataService.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/compare/StringCompareUtil.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/ReleaseNotesService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/ApplicationStore.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/util/DownloadHelperServiceWorker.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/application/LegendApplication.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/format/MatcherUtils.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/application/LegendApplicationPluginManager.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/LegendApplicationPlugin.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/Core_LegendApplicationPlugin.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/application/LegendApplicationConfig.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/application/LegendREPLApplicationConfig.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/__lib__/LegendApplicationNavigation.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/navigation/BrowserNavigator.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/platform/ApplicationPlatform.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/platform/BrowserPlatform.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/components/ApplicationPlatformProvider.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/components/BrowserEnvironmentProvider.js","webpack://@finos/legend-application-repl-deployment/../legend-art/lib/color/TailwindCSSPalette.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph/MetaModelConst.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/DataCubeQueryEngine.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/models/DataCubeConfiguration.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/models/DataCubeQuery.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/stores/LegendREPLServerClient.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/filter/DataCubeQueryFilterOperation.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/aggregation/DataCubeQueryAggregateOperation.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/V1_ValueSpecification.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/V1_Variable.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/graph/V1_GraphFetchTree.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph/Core_HashUtils.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/application/HashUtils.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/graph/V1_RootGraphFetchTree.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/packageableElements/domain/V1_Multiplicity.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_CoreClassInstance.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_Lambda.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_DataTypeValueSpecification.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/path/V1_Path.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_AbstractAppliedFunction.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/application/V1_AppliedFunction.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_Collection.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_PrimitiveValueSpecification.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_CDecimal.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_CInteger.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_CString.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_CFloat.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_CDate.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_CDateTime.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_CStrictDate.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_CStrictTime.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_CBoolean.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/V1_AggregateValue.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/V1_Pair.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/V1_RuntimeInstance.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/V1_ExecutionContextInstance.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/graph/V1_PropertyGraphFetchTree.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/graph/V1_SubTypeGraphFetchTree.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/V1_SerializationConfig.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_KeyExpression.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/V1_PureList.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/V1_TDSAggregateValue.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/V1_TDSColumnInformation.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/V1_TDSSortInformation.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/V1_TDSOlapRank.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/V1_TDSOlapAggregation.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/relation/V1_ColSpecArray.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/relation/V1_ColSpec.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/relation/V1_RelationStoreAccessor.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/packageableElements/V1_PackageableElement.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_CoreSerializationHelper.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/V1_SourceInformation.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/path/V1_PathElement.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/path/V1_PropertyPathElement.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/application/V1_AppliedProperty.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/packageableElements/runtime/V1_Runtime.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_RuntimeSerializationHelper.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/packageableElements/runtime/V1_PackageableRuntime.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/executionContext/V1_ExecutionContext.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/executionContext/V1_AnalyticsExecutionContext.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/executionContext/V1_BaseExecutionContext.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_PackageableElementPtr.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_GenericTypeInstance.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_ClassInstance.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/packageableElements/type/V1_GenericType.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph/MetaModelUtils.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/rawValueSpecification/V1_RawVariable.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_TypeSerializationHelper.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_ValueSpecificationSerializer.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/helpers/V1_DomainHelper.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_EnumValue.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_CLatestDate.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_CByteArray.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/DataCubeQueryBuilderUtils.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Sum.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Average.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Count.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Min.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Max.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__UniqueValue.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__First.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Last.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__VariancePopulation.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__VarianceSample.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__StdDevPopulation.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__StdDevSample.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__JoinStrings.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/filter/DataCubeQueryFilterOperation__Equal.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanOrEqual.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThan.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqual.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThan.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqual.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualColumn.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitive.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitive.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitiveColumn.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitiveColumn.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualColumn.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanColumn.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanOrEqualColumn.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanColumn.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqualColumn.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/filter/DataCubeQueryFilterOperation__Contain.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/filter/DataCubeQueryFilterOperation__ContainCaseInsensitive.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/filter/DataCubeQueryFilterOperation__NotContain.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/filter/DataCubeQueryFilterOperation__StartWith.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/filter/DataCubeQueryFilterOperation__StartWithCaseInsensitive.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/filter/DataCubeQueryFilterOperation__NotStartWith.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/filter/DataCubeQueryFilterOperation__EndWith.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/filter/DataCubeQueryFilterOperation__EndWithCaseInsensitive.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEndWith.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/filter/DataCubeQueryFilterOperation__IsNull.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/filter/DataCubeQueryFilterOperation__IsNotNull.js","webpack://@finos/legend-application-repl-deployment/../legend-code-editor/lib/PureLanguage.js","webpack://@finos/legend-application-repl-deployment/../legend-code-editor/lib/themes/MonacoEditorThemeUtils.js","webpack://@finos/legend-application-repl-deployment/../legend-code-editor/lib/CodeEditorTheme.js","webpack://@finos/legend-application-repl-deployment/../legend-code-editor/lib/CodeEditorUtils.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph/helpers/PureLanguageHelper.js","webpack://@finos/legend-application-repl-deployment/../legend-code-editor/lib/PureLanguageService.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/DataCubeQueryBuilder.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/models/DataCubeSource.js","webpack://@finos/legend-application-repl-deployment/../legend-art/lib/utils/ComponentUtils.js","webpack://@finos/legend-application-repl-deployment/../legend-art/lib/icon/DataCubeIcon.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/components/DataCubeProvider.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/components/core/DataCubeAlert.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/DataCubeLayoutManagerState.js","webpack://@finos/legend-application-repl-deployment/../legend-code-editor/lib/PureLanguageCodeEditorSupport.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/components/core/DataCubePureCodeEditorUtils.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/components/core/DataCubeCodeCheckErrorAlert.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/DataCubeEngine.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/action/execution/ExecutionResult.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/engine/execution/V1_ExecutionResult.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/engine/execution/V1_INTERNAL__UnknownExecutionResult.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/action/execution/INTERNAL__UnknownExecutionResult.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/engine/execution/V1_ExecutionHelper.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/stores/LegendREPLDataCubeSource.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/stores/LegendREPLDataCubeEngine.js","webpack://@finos/legend-application-repl-deployment/../legend-art/lib/menu/DropdownMenu.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/components/core/DataCubeLayoutManager.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/DataCubeQuerySnapshotBuilderUtils.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/view/grid/DataCubeGridQueryBuilder.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/models/DataCubeColumn.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/view/grid/DataCubeGridQuerySnapshotBuilder.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/view/grid/DataCubeGridClientEngine.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/view/grid/DataCubeGridConfigurationBuilder.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/format/ValidatorUtils.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/components/view/grid/DataCubeGrid.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/components/DataCubeView.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/view/DataCubeQuerySnapshotManager.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/components/core/DataCubeFormUtils.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/components/view/grid/DataCubeGridShared.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/filter/DataCubeQueryFilterEditorState.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/view/editor/DataCubeEditorColumnSelectorState.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/view/editor/DataCubeEditorSortsPanelState.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/DataCubeConfigurationBuilder.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/view/editor/DataCubeEditorMutableConfiguration.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/view/editor/DataCubeEditorGeneralPropertiesPanelState.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/view/editor/DataCubeEditorColumnPropertiesPanelState.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/view/editor/DataCubeEditorColumnsPanelState.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/view/editor/DataCubeEditorVerticalPivotsPanelState.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/components/view/editor/DataCubeEditorColumnSelector.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/components/view/editor/DataCubeEditorSortsPanel.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/components/view/editor/DataCubeEditorGeneralPropertiesPanel.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/components/view/editor/DataCubeEditorColumnsPanel.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/components/view/editor/DataCubeEditorVerticalPivotsPanel.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/components/view/editor/DataCubeEditorHorizontalPivotsPanel.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/__lib__/DataCubeDocumentation.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/components/view/editor/DataCubeEditorColumnPropertiesPanel.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/components/view/editor/DataCubeEditor.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/view/editor/DataCubeEditorHorizontalPivotsPanelState.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/view/editor/DataCubeEditorPivotLayoutPanelState.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/view/editor/DataCubeEditorState.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/view/grid/DataCubeGridMenuBuilder.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/view/grid/DataCubeGridControllerState.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/view/grid/DataCubeGridClientExportEngine.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/view/grid/DataCubeGridState.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/view/DataCubeInfoState.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/DataCubeQuerySnapshot.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/core/DataCubeQuerySnapshotBuilder.js","webpack://@finos/legend-application-repl-deployment/../legend-art/lib/input/DatePicker.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/components/view/filter/DataCubeFilterEditor.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/view/filter/DataCubeFilterEditorState.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/components/view/extend/DataCubeColumnEditor.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/view/extend/DataCubeColumnEditorState.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/view/extend/DataCubeExtendManagerState.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/view/DataCubeViewState.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/components/core/DataCubeDocumentationPanel.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/DataCubeSettings.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/components/core/DataCubeSettingsPanel.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/stores/DataCubeState.js","webpack://@finos/legend-application-repl-deployment/../legend-data-cube/lib/components/DataCube.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/components/ApplicationFrameworkProvider.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/components/LegendREPLApplication.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/application/LegendREPL.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/index.js","webpack://@finos/legend-application-repl-deployment/./src/index.tsx","webpack://@finos/legend-application-repl-deployment/../../node_modules/monaco-editor/esm/vs/base/common/worker/ lazy ^.*$ namespace object","webpack://@finos/legend-application-repl-deployment/../../node_modules/monaco-editor/esm/vs/editor/common/services/ lazy ^.*$ namespace object","webpack://@finos/legend-application-repl-deployment/webpack/bootstrap","webpack://@finos/legend-application-repl-deployment/webpack/runtime/amd define","webpack://@finos/legend-application-repl-deployment/webpack/runtime/amd options","webpack://@finos/legend-application-repl-deployment/webpack/runtime/compat get default export","webpack://@finos/legend-application-repl-deployment/webpack/runtime/define property getters","webpack://@finos/legend-application-repl-deployment/webpack/runtime/ensure chunk","webpack://@finos/legend-application-repl-deployment/webpack/runtime/get javascript chunk filename","webpack://@finos/legend-application-repl-deployment/webpack/runtime/get mini-css chunk filename","webpack://@finos/legend-application-repl-deployment/webpack/runtime/global","webpack://@finos/legend-application-repl-deployment/webpack/runtime/hasOwnProperty shorthand","webpack://@finos/legend-application-repl-deployment/webpack/runtime/make namespace object","webpack://@finos/legend-application-repl-deployment/webpack/runtime/node module decorator","webpack://@finos/legend-application-repl-deployment/webpack/runtime/publicPath","webpack://@finos/legend-application-repl-deployment/webpack/runtime/jsonp chunk loading","webpack://@finos/legend-application-repl-deployment/webpack/runtime/nonce","webpack://@finos/legend-application-repl-deployment/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (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, fn, priority] = deferred[i];\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((key) => (__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 ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (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((key) => (def[key] = () => (value[key])));\n\t}\n\tdef['default'] = () => (value);\n\t__webpack_require__.d(ns, def);\n\treturn ns;\n};","var inProgress = {};\nvar dataWebpackPrefix = \"@finos/legend-application-repl-deployment:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { AbstractPlugin, } from '../application/AbstractPluginManager.js';\n// We use numeric enum here for because we want to do comparison\n// In order to retrieve the name of the enum we can do reverse mapping, for example: LogLevel[LogLevel.INFO] -> INFO\n// https://www.typescriptlang.org/docs/handbook/enums.html#reverse-mappings\nexport var LOG_LEVEL;\n(function (LOG_LEVEL) {\n LOG_LEVEL[LOG_LEVEL[\"DEBUG\"] = 1] = \"DEBUG\";\n LOG_LEVEL[LOG_LEVEL[\"INFO\"] = 2] = \"INFO\";\n LOG_LEVEL[LOG_LEVEL[\"WARN\"] = 3] = \"WARN\";\n LOG_LEVEL[LOG_LEVEL[\"ERROR\"] = 4] = \"ERROR\";\n LOG_LEVEL[LOG_LEVEL[\"SILENT\"] = 5] = \"SILENT\";\n})(LOG_LEVEL || (LOG_LEVEL = {}));\nexport class LogEvent {\n channel;\n name;\n timestamp = Date.now();\n /**\n * TODO: we should make channel required and potentially name required as well, and for each\n * channel, there should be a list of known event names. Unknown event name, or wrong channel\n * will result in error.\n */\n static create(name) {\n const event = new LogEvent();\n event.name = name;\n return event;\n }\n}\nexport class LoggerPlugin extends AbstractPlugin {\n level = LOG_LEVEL.DEBUG;\n setLevel(level) {\n this.level = level;\n }\n install(pluginManager) {\n pluginManager.registerLoggerPlugin(this);\n }\n debug(event, ...data) {\n if (this.level <= LOG_LEVEL.DEBUG) {\n this._debug(event, ...data);\n }\n }\n info(event, ...data) {\n if (this.level <= LOG_LEVEL.INFO) {\n this._info(event, ...data);\n }\n }\n warn(event, ...data) {\n if (this.level <= LOG_LEVEL.WARN) {\n this._warn(event, ...data);\n }\n }\n error(event, ...data) {\n if (this.level <= LOG_LEVEL.ERROR) {\n this._error(event, ...data);\n }\n }\n}\nexport class LogService {\n loggers = [];\n registerPlugins(loggerPlugins) {\n this.loggers = loggerPlugins;\n }\n debug(event, ...data) {\n this.loggers.forEach((logger) => logger.debug(event, ...data));\n }\n info(event, ...data) {\n this.loggers.forEach((logger) => logger.info(event, ...data));\n }\n warn(event, ...data) {\n this.loggers.forEach((logger) => logger.warn(event, ...data));\n }\n error(event, ...data) {\n this.loggers.forEach((logger) => logger.error(event, ...data));\n }\n}\n//# sourceMappingURL=LogService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { uuid } from '../CommonUtils.js';\nexport class PluginInfo {\n name;\n version;\n signature;\n uuid;\n}\nexport class AbstractPlugin {\n name;\n version;\n uuid = uuid();\n constructor(name, version) {\n this.name = name;\n this.version = version;\n }\n getName() {\n return this.name;\n }\n getVersion() {\n return this.version;\n }\n getSignature() {\n return `${this.getName()}@${this.getVersion()}`;\n }\n getUUID() {\n return this.uuid;\n }\n getInfo() {\n const info = new PluginInfo();\n info.name = this.getName();\n info.version = this.getVersion();\n info.signature = this.getSignature();\n info.uuid = this.getUUID();\n return info;\n }\n configure(configData) {\n return this;\n }\n}\nexport class PresetInfo {\n name;\n version;\n signature;\n uuid;\n plugins = [];\n}\nexport class AbstractPreset {\n name;\n version;\n uuid = uuid();\n plugins = [];\n constructor(name, version, plugins) {\n this.name = name;\n this.version = version;\n this.plugins = plugins;\n }\n getName() {\n return this.name;\n }\n getVersion() {\n return this.version;\n }\n getSignature() {\n return `${this.getName()}@${this.getVersion()}`;\n }\n getUUID() {\n return this.uuid;\n }\n getPlugins() {\n return [...this.plugins];\n }\n getInfo() {\n const info = new PresetInfo();\n info.name = this.getName();\n info.version = this.getVersion();\n info.signature = this.getSignature();\n info.uuid = this.getUUID();\n info.plugins = this.plugins\n .map((plugin) => plugin.getInfo())\n .sort((a, b) => a.name.localeCompare(b.name));\n return info;\n }\n configure(configData) {\n return this;\n }\n install(pluginManager) {\n this.plugins.forEach((plugin) => plugin.install(pluginManager));\n }\n}\nexport class AbstractPluginManager {\n plugins = [];\n presets = [];\n usePlugins(plugins) {\n this.plugins = plugins;\n return this;\n }\n usePresets(presets) {\n this.presets = presets;\n return this;\n }\n configure(configData) {\n Object.keys(configData).forEach((key) => {\n const configObj = configData[key];\n this.presets.forEach((preset) => {\n if (preset.getName() === key) {\n preset.configure(configObj);\n }\n });\n this.plugins.forEach((plugin) => {\n if (plugin.getName() === key) {\n plugin.configure(configObj);\n }\n });\n });\n }\n install() {\n // Plugins run before presets\n // Plugins ordering is first to last\n this.plugins.forEach((plugin) => plugin.install(this));\n // Presets ordering is first to last\n this.presets.forEach((plugin) => plugin.install(this));\n }\n getInfo() {\n return {\n plugins: this.plugins\n .filter((plugin) => !this.getHiddenPluginNames().includes(plugin.getName()))\n .map((plugin) => plugin.getInfo())\n .sort((a, b) => a.name.localeCompare(b.name)),\n presets: this.presets\n .filter((preset) => !this.getHiddenPresetNames().includes(preset.getName()))\n .map((preset) => preset.getInfo())\n .sort((a, b) => a.name.localeCompare(b.name)),\n };\n }\n /**\n * Return the list of core plugin names to be hidden\n * when getting plugin manager info, such as core plugins.\n */\n getHiddenPluginNames() {\n return [];\n }\n /**\n * Return the list of core presets names to be hidden\n * when getting plugin manager info, such as core presets.\n */\n getHiddenPresetNames() {\n return [];\n }\n}\n//# sourceMappingURL=AbstractPluginManager.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport packageJson from '../../package.json' with { type: 'json' };\nimport { LoggerPlugin } from './LogService.js';\nconst { debug, info, warn, error } = console;\nexport class WebConsole extends LoggerPlugin {\n constructor() {\n super(packageJson.extensions.webConsoleLoggerPlugin, packageJson.version);\n }\n _debug(event, ...data) {\n debug(`[${event.timestamp}] ${event.name} ${data.length ? ':' : ''}`, ...data);\n }\n _info(event, ...data) {\n info(`[${event.timestamp}] ${event.name} ${data.length ? ':' : ''}`, ...data);\n }\n _warn(event, ...data) {\n warn(`[${event.timestamp}] ${event.name} ${data.length ? ':' : ''}`, ...data);\n }\n _error(event, ...data) {\n error(`[${event.timestamp}] ${event.name} ${data.length ? ':' : ''}`, ...data);\n }\n}\n//# sourceMappingURL=WebConsole.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { clone, cloneDeep as deepClone, isEqual as deepEqual, findLast, isEmpty, pickBy, uniqBy, uniq, debounce, throttle, mergeWith, isObject, } from 'lodash-es';\nimport { diff as deepDiff } from 'deep-object-diff';\nimport { UnsupportedOperationError } from './error/ErrorUtils.js';\nimport { format as prettyPrintObject } from 'pretty-format';\nimport { assertTrue, guaranteeNonNullable } from './error/AssertionUtils.js';\n// NOTE: We re-export lodash utilities like this so we centralize utility usage in our app\n// in case we want to swap out the implementation\nexport { clone, deepClone, deepEqual, deepDiff, findLast, isEmpty, pickBy, uniqBy, uniq, debounce, throttle, };\n// NOTE: we can use the `rng` option in UUID V4 to control the random seed during testing\n// See https://github.com/uuidjs/uuid#version-4-random\nexport { v4 as uuid } from 'uuid';\nexport const getClass = (obj) => obj.constructor;\nexport const getSuperclass = (_class) => {\n if (!_class.name) {\n throw new UnsupportedOperationError(`Cannot get superclass for non user-defined classes`);\n }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\n const superclass = Object.getPrototypeOf(_class);\n /**\n * When it comes to inheritance, JavaScript only has one construct: objects.\n * Each object has a private property which holds a link to another object called its prototype.\n * That prototype object has a prototype of its own, and so on until an object is reached\n * with null as its prototype. By definition, null has no prototype,\n * and acts as the final link in this prototype chain.\n *\n * NOTE: when the prototype name is `empty` we know it's not user-defined classes, so we can return undefined\n */\n return superclass?.name ? superclass : undefined;\n};\n/**\n * Check if the specified class is either the same as, or is a superclass of the provided class.\n */\nexport const isClassAssignableFrom = (cls1, cls2) => {\n let currentPrototype = cls2;\n while (currentPrototype) {\n if (currentPrototype === cls1) {\n return true;\n }\n currentPrototype = getSuperclass(currentPrototype);\n }\n return false;\n};\nexport const noop = () => () => {\n /* do nothing */\n};\n/**\n * Recursively omit keys from an object\n */\nexport const recursiveOmit = (obj, \n/**\n * Checker function which returns `true` if the object field should be omit\n */\nchecker) => {\n const newObj = deepClone(obj);\n const omit = (_obj, _checker) => {\n if (Array.isArray(_obj)) {\n _obj.forEach((o) => omit(o, _checker));\n }\n else {\n const o = _obj;\n for (const propKey in o) {\n if (Object.prototype.hasOwnProperty.call(_obj, propKey)) {\n const value = o[propKey];\n if (_checker(_obj, propKey)) {\n delete o[propKey];\n }\n else if (isObject(value)) {\n omit(value, _checker);\n }\n }\n }\n }\n };\n omit(newObj, checker);\n return newObj;\n};\n/**\n * Recursively remove fields with undefined values in object\n */\nexport const pruneObject = (obj) => pickBy(obj, (val) => val !== undefined);\n/**\n * Recursively remove fields with null values in object\n *\n * This is particularly useful in serialization, especially when handling response\n * coming from servers where `null` are returned for missing fields. We would like to\n * treat them as `undefined` instead, so we want to strip all the `null` values from the\n * plain JSON object.\n */\nexport const pruneNullValues = (obj) => pickBy(obj, (val) => val !== null);\n/**\n * Recursively sort object keys alphabetically\n */\nexport const sortObjectKeys = (value) => {\n const _sort = (obj) => {\n if (Array.isArray(obj)) {\n return obj.map(sortObjectKeys);\n }\n else if (typeof obj === 'object' && obj !== null) {\n const oldObj = obj;\n const newObj = {};\n Object.keys(oldObj)\n .sort((a, b) => a.localeCompare(b))\n .forEach((key) => {\n newObj[key] = _sort(oldObj[key]);\n });\n return newObj;\n }\n return obj;\n };\n return _sort(value);\n};\nexport const parseNumber = (val) => {\n const num = Number(val);\n if (isNaN(num)) {\n throw new Error(`Can't parse number '${val}'`);\n }\n return num;\n};\n/**\n * Stringify object shallowly\n * See https://stackoverflow.com/questions/16466220/limit-json-stringification-depth\n */\nexport const shallowStringify = (object) => JSON.stringify(object, (key, val) => key && val && typeof val !== 'number'\n ? Array.isArray(val)\n ? '[object Array]'\n : `${val}`\n : val);\nexport const generateEnumerableNameFromToken = (existingNames, token) => {\n if (!token.match(/^[\\w_-]+$/)) {\n throw new Error(`Token must only contain digits, letters, or special characters _ and -`);\n }\n const maxCounter = existingNames\n .map((name) => {\n const matchingCount = name.match(new RegExp(`^${token}_(?<count>\\\\d+)$`));\n return matchingCount?.groups?.count\n ? parseInt(matchingCount.groups.count, 10)\n : 0;\n })\n .reduce((max, num) => Math.max(max, num), 0);\n return `${token}_${maxCounter + 1}`;\n};\n/**\n * NOTE: These are small helpers to workaround Typescript strictness check with the flag --noUncheckedIndexedAccess enabled\n */\nexport const getNullableFirstEntry = (array) => array.length ? array[0] : undefined;\nexport const getNullableLastEntry = (array) => array.length ? array[array.length - 1] : undefined;\nexport const getNullableEntry = (array, idx) => {\n if (idx < 0 || idx >= array.length) {\n return undefined;\n }\n return array.length > idx ? array[idx] : undefined;\n};\nexport const getNonNullableEntry = (array, idx, message) => {\n assertTrue(0 <= idx && idx < array.length, `Index out of bound: ${idx}`);\n return guaranteeNonNullable(array[idx], message);\n};\n/**\n * NOTE: This object mutates the input object (obj1)\n * To disable this behavior, set `createClone=true`\n */\nexport const mergeObjects = (obj1, obj2, createClone) => mergeWith(createClone ? deepClone(obj1) : obj1, obj2, (o1, o2) => {\n if (Array.isArray(o1)) {\n return o1.concat(o2);\n }\n return undefined;\n});\nexport const promisify = (func) => new Promise((resolve, reject) => setTimeout(() => {\n try {\n resolve(func());\n }\n catch (error) {\n reject(error);\n }\n}, 0));\nexport const addUniqueEntry = (array, newEntry, comparator = (val1, val2) => val1 === val2) => {\n if (!array.find((entry) => comparator(entry, newEntry))) {\n array.push(newEntry);\n return true;\n }\n return false;\n};\nexport const changeEntry = (array, oldEntry, newEntry, comparator = (val1, val2) => val1 === val2) => {\n const idx = array.findIndex((entry) => comparator(entry, oldEntry));\n if (idx !== -1) {\n array[idx] = newEntry;\n return true;\n }\n return false;\n};\nexport const swapEntry = (array, entryOne, entryTwo, comparator = (val1, val2) => val1 === val2) => {\n const idxX = array.findIndex((entry) => comparator(entry, entryOne));\n const idxY = array.findIndex((entry) => comparator(entry, entryTwo));\n if (idxX !== -1 && idxY !== -1) {\n array[idxX] = entryTwo;\n array[idxY] = entryOne;\n return true;\n }\n return false;\n};\nexport const deleteEntry = (array, entryToDelete, comparator = (val1, val2) => val1 === val2) => {\n const idx = array.findIndex((entry) => comparator(entry, entryToDelete));\n if (idx !== -1) {\n array.splice(idx, 1);\n return true;\n }\n return false;\n};\nexport const printObject = (value, options) => {\n const opts = pruneObject({\n printFunctionName: false,\n maxDepth: options?.deep ? undefined : 1,\n });\n const text = prettyPrintObject(value, opts);\n return (text\n // We do these replacements because when we do this for production and the class name is minified,\n // we'd better show `[Object]` instead.\n .replace(/.*\\s\\{/g, '{')\n .replace(/\\[.*\\]/g, (val) => ['[Array]', '[Function]'].includes(val) ? val : '[Object]'));\n};\nexport const hasWhiteSpace = (val) => Boolean(val.match(/\\s/));\n//# sourceMappingURL=CommonUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { printObject, uuid, } from '../CommonUtils.js';\n/**\n * A generic error that can be used for building other errors in the application\n * which does not require Javascript stack trace.\n *\n * If the Javascript stack trace is needed to trace back where the problem occurs,\n * `EnrichedError` is the more suitable candidate.\n *\n * This type of error is useful for wrapping the innermost error or errors coming\n * from the servers. Since we enforce in the app that errors thrown must be of type\n * `Error`, this acts as a good wrapper to manage errors better.\n * See https://github.com/microsoft/TypeScript/issues/13219\n */\nexport class ApplicationError extends Error {\n uuid = uuid();\n constructor(message) {\n super();\n this.message =\n message === undefined || message === '' ? '(no error message)' : message;\n }\n /**\n * This provides more detail (better context) about the error, including the error message\n * stack trace, etc.\n */\n get detail() {\n return this.message;\n }\n}\n// Since Javascript does not fully support rethrowing error, we need to customize and manipulate the stack trace\n// See https://stackoverflow.com/questions/42754270/re-throwing-exception-in-nodejs-and-not-losing-stack-trace\nexport class EnrichedError extends Error {\n constructor(name, error, overideMessage) {\n super(overideMessage\n ? overideMessage\n : error instanceof Error\n ? error.message\n : error);\n this.name = name;\n // if the material used to make this error is also an error, we maintain the stack trace and\n // follow the `rethrown` error stack trace convention\n // See https://www.twilio.com/blog/how-to-read-and-understand-a-java-stacktrace\n if (error instanceof Error) {\n const messageLines = (this.message.match(/\\n/g) ?? []).length + 1;\n this.stack = `${(this.stack ?? '')\n .split('\\n')\n .slice(0, messageLines + 1)\n .join('\\n')}\\nCaused by: ${error.stack}`;\n }\n else {\n if (typeof Error.captureStackTrace === 'function') {\n // Maintains proper stack trace for where our error was thrown (only available on V8)\n // This only works in Chrome for now. Firefox (as of Feb 2020) will throw error\n // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error\n Error.captureStackTrace(this, this.constructor);\n }\n else {\n // otherwise, use the non-standard but defacto stack trace (available in most browser)\n this.stack = new Error(error).stack;\n }\n }\n }\n}\n/**\n * Signals that a method has been invoked at an illegal or\n * inappropriate point at runtime. In other words, the environment\n * or application is not in an appropriate state for the requested\n * operation.\n */\nexport class IllegalStateError extends EnrichedError {\n constructor(error) {\n super('Illegal State Error [PLEASE NOTIFY DEVELOPER]', error);\n }\n}\nexport class UnsupportedOperationError extends EnrichedError {\n constructor(message, unsupportedObject) {\n super('Unsupported Operation Error', message || unsupportedObject\n ? `${message}${unsupportedObject ? `\\n${printObject(unsupportedObject)}` : ''}`\n : undefined);\n }\n}\n/**\n * This is a relatively crude way to handle error of type unknown thrown for now.\n * We should revisit this when Typescript supports `throws` clause\n * See https://github.com/microsoft/TypeScript/issues/13219\n *\n * NOTE: There's a problem with this check in JSDOM leading so we have to disable this in test environment\n * JSDOM uses their own isolated object rather than native object for performance purpose\n * See https://github.com/jsdom/jsdom/issues/3082\n * For example, TypeErrors generated by `webidl2js` or `whatwg-url` used by `jsdom`, or manually-thrown ones inside impl classes,\n * are thrown using global.TypeError, not dom.window.TypeError. This change is hard to implement as of now\n * See https://github.com/jsdom/jsdom/issues/2727\n * See https://github.com/facebook/jest/issues/2549\n *\n * Read more related discussions at:\n * https://github.com/jsdom/jsdom/issues/1737\n * https://github.com/webcomponents/polyfills/issues/105\n * https://github.com/jsdom/jsdom/issues/1769\n * https://github.com/jsdom/jsdom/issues/2555\n */\nexport function assertErrorThrown(error) {\n // eslint-disable-next-line no-process-env\n if (process.env.NODE_ENV === 'test') {\n return;\n }\n if (!(error instanceof Error)) {\n throw new IllegalStateError('Expected error to be thrown');\n }\n}\nexport const returnUndefOnError = (fn) => {\n try {\n return fn();\n }\n catch {\n return undefined;\n }\n};\nexport const decorateErrorMessageIfExists = (fn, errorMessageDecorator) => {\n try {\n return fn();\n }\n catch (error) {\n assertErrorThrown(error);\n error.message = errorMessageDecorator(error.message);\n throw error;\n }\n};\n//# sourceMappingURL=ErrorUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { EnrichedError } from './ErrorUtils.js';\nexport class AssertionError extends EnrichedError {\n constructor(error, message) {\n super('Assertion Error', error, message);\n }\n}\nexport const isNullable = (value) => value === null || value === undefined;\nexport const isNonNullable = (value) => value !== null && value !== undefined;\nexport function assertNonNullable(value, message = '') {\n if (value === null || value === undefined) {\n throw new AssertionError(message || 'Value is nullable');\n }\n}\nexport const guaranteeNonNullable = (value, message = '') => {\n assertNonNullable(value, message);\n return value;\n};\nexport const isType = (value, clazz) => value instanceof clazz;\nexport const filterByType = (clazz) => (value) => isType(value, clazz);\n// Aserts typing doesn't work with all arrow function type declaration form\n// So we can use this: export const assertType: <T>(value: unknown, clazz: Clazz<T>, message: string) => asserts value is T = (value, clazz, message = '') => {\n// or the normal function form\n// See https://github.com/microsoft/TypeScript/issues/34523\n// See https://github.com/microsoft/TypeScript/pull/33622\nexport function assertType(value, clazz, message = '') {\n if (!(value instanceof clazz)) {\n throw new AssertionError(message || `Value is expected to be of type '${clazz.name}'`);\n }\n}\nexport const guaranteeType = (value, clazz, message = '') => {\n assertType(value, clazz, message);\n return value;\n};\nexport function isNonEmptyString(str) {\n return isNonNullable(str) && str !== '';\n}\nexport function assertNonEmptyString(str, message = '') {\n if (guaranteeNonNullable(str, message) === '') {\n throw new AssertionError(message || `Expected string value to be non-empty`);\n }\n}\nexport function guaranteeNonEmptyString(str, message = '') {\n assertNonEmptyString(str, message);\n return str;\n}\nexport function assertTrue(assertionValue, message = '') {\n if (!assertionValue) {\n throw new AssertionError(message || `Expected predicate to be truthy`);\n }\n}\nexport const isString = (val) => typeof val === 'string';\nexport const isNumber = (val) => typeof val === 'number' && !isNaN(val);\nexport const isBoolean = (val) => typeof val === 'boolean';\nexport const isObject = (val) => typeof val === 'object' && val !== null;\nexport const isPlainObject = (val) => isObject(val) && val.constructor.name === 'Object';\nexport function assertIsString(val, message = '') {\n if (!isString(val)) {\n throw new AssertionError(message || `Value is expected to be a string`);\n }\n}\nexport function assertIsNumber(val, message = '') {\n if (!isNumber(val)) {\n throw new AssertionError(message || `Value is expected to be a number`);\n }\n}\nexport function assertIsBoolean(val, message = '') {\n if (!isBoolean(val)) {\n throw new AssertionError(message || `Value is expected to be a boolean`);\n }\n}\nexport function assertIsObject(val, message = '') {\n if (!isObject(val)) {\n throw new AssertionError(message || `Value is expected to be a object`);\n }\n}\nexport const guaranteeIsString = (val, message = '') => {\n assertIsString(val, message);\n return val;\n};\nexport const guaranteeIsNumber = (val, message = '') => {\n assertIsNumber(val, message);\n return val;\n};\nexport const guaranteeIsBoolean = (val, message = '') => {\n assertIsBoolean(val, message);\n return val;\n};\nexport const guaranteeIsObject = (val, message = '') => {\n assertIsObject(val, message);\n return val;\n};\n//# sourceMappingURL=AssertionUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { StatusCodes } from 'http-status-codes';\nimport { isNonNullable, isString, isObject, AssertionError, assertTrue, } from '../error/AssertionUtils.js';\nimport { deflate } from 'pako';\nimport queryString from 'query-string';\nimport { returnUndefOnError } from '../error/ErrorUtils.js';\nimport { sanitizeUrl } from '@braintree/sanitize-url';\n/**\n * Unlike the download call (GET requests) which is gziped, the upload call send uncompressed data which is in megabytes realms\n * for bigger project. This really slows down operations. As such, we compress data using `zlib` for all network calls to execution\n * server. This requires the backend to uncompress, which for small models might end up adding a little overhead, so in the future, we might\n * want to make this decision `to compress or to not compress` more smartly and dynamicly (e.g. potentially to scan the size of the data/model\n * and decide the compression strategy).\n */\nconst compressData = (data) => new Blob([deflate(isObject(data) ? JSON.stringify(data) : data)]);\nexport const URL_SEPARATOR = '/';\n/**\n * Reference: https://uibakery.io/regex-library/url\n */\nconst URL_REGEX = new RegExp('^(?:https?|ssh|ftp|file)://(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\\\\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$');\nexport const HttpStatus = StatusCodes;\nexport const CHARSET = 'charset=utf-8';\nexport var HttpHeader;\n(function (HttpHeader) {\n HttpHeader[\"CONTENT_TYPE\"] = \"Content-Type\";\n HttpHeader[\"ACCEPT\"] = \"Accept\";\n})(HttpHeader || (HttpHeader = {}));\nexport var ContentType;\n(function (ContentType) {\n ContentType[\"APPLICATION_JSON\"] = \"application/json\";\n ContentType[\"APPLICATION_XML\"] = \"application/xml\";\n ContentType[\"APPLICATION_ZLIB\"] = \"application/zlib\";\n ContentType[\"APPLICATION_XLSX\"] = \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\";\n ContentType[\"TEXT_PLAIN\"] = \"text/plain\";\n ContentType[\"TEXT_HTML\"] = \"text/html\";\n ContentType[\"TEXT_CSV\"] = \"text/csv\";\n ContentType[\"ALL\"] = \"*/*\";\n ContentType[\"MESSAGE_RFC822\"] = \"message/rfc822\";\n})(ContentType || (ContentType = {}));\nexport var HttpMethod;\n(function (HttpMethod) {\n HttpMethod[\"GET\"] = \"GET\";\n HttpMethod[\"PUT\"] = \"PUT\";\n HttpMethod[\"POST\"] = \"POST\";\n HttpMethod[\"DELETE\"] = \"DELETE\";\n})(HttpMethod || (HttpMethod = {}));\nconst DEFAULT_CLIENT_REQUEST_OPTIONS = {\n mode: 'cors', // allow CORS - See https://developer.mozilla.org/en-US/docs/Web/API/Request/mode\n credentials: 'include', // allow sending credentials to other domain\n /**\n * NOTE: We must set this to `follow` for the fetch to handle 3xx redirects automatically.\n * The other modes available are `error` which will throw error and does not really give a\n * response object, and `manual` which returns an opaque response object with status code 0;\n * either way, we cannot really handle the redirect manually ourselves.\n * See https://fetch.spec.whatwg.org/#concept-request-redirect-mode\n * See https://fetch.spec.whatwg.org/#concept-filtered-response-opaque-redirect\n */\n redirect: 'follow',\n};\n// NOTE: We could further improve this by using the MIME library https://flaviocopes.com/node-get-file-extension-mime-type/\nexport const getContentTypeFileExtension = (type) => {\n switch (type) {\n case ContentType.APPLICATION_JSON:\n return 'json';\n case ContentType.APPLICATION_XML:\n return 'xml';\n case ContentType.TEXT_CSV:\n return 'csv';\n default:\n return 'txt';\n }\n};\n/**\n * NOTE: the latter headers value will override the those of the first\n */\nexport const mergeRequestHeaders = (headersOne, headersTwo) => {\n const requestHeaders = {};\n if (headersOne) {\n Object.entries(headersOne).forEach(([key, value]) => {\n requestHeaders[key] = value;\n });\n }\n if (headersTwo) {\n Object.entries(headersTwo).forEach(([key, value]) => {\n requestHeaders[key] = value;\n });\n }\n return requestHeaders;\n};\nconst MAX_ERROR_MESSAGE_LENGTH = 5000;\n/**\n * Custom error for service client with response details.\n * NOTE: Since is particular to execution error we might want to separate this out to another place and leave network client\n * as pure/generic as possible\n */\nconst extractMessage = (payload) => {\n if (isObject(payload)) {\n return isString(payload.message)\n ? payload.message\n : JSON.stringify(payload);\n }\n let payloadAsObject;\n try {\n payloadAsObject = JSON.parse(payload);\n }\n catch {\n // NOTE: ignored, above is best effort\n }\n return payloadAsObject && isString(payloadAsObject.message)\n ? payloadAsObject.message\n : payload;\n};\n/**\n * This is a fairly basic way to attempt re-authentication.\n * We create an <iframe> to load a re-authentication url\n * which suppose to silently refresh the authentication cookie\n * and requires no action from users.\n *\n * NOTE: authentication is very specific to the deployment context\n * i.e. how the servers are being setup, so this way of re-authenticate\n * should be optional and configurable.\n */\nexport const autoReAuthenticate = (url) => \n// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\nnew Promise((resolve) => {\n const id = 'AUTO_AUTHENTICATION_IFRAME';\n const previous = document.getElementById(id);\n previous?.remove();\n const element = document.createElement('iframe');\n element.id = id;\n element.src = url;\n element.style.display = 'none';\n element.addEventListener('load', () => {\n element.remove();\n resolve();\n });\n document.body.appendChild(element);\n});\nexport class NetworkClientError extends Error {\n response;\n payload;\n constructor(response, payload) {\n super();\n if (typeof Error.captureStackTrace === 'function') {\n // Maintains proper stack trace for where our error was thrown (only available on V8)\n // This only works in Chrome for now. Firefox (as of Feb 2020) will throw error\n // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error\n Error.captureStackTrace(this, this.constructor);\n }\n else {\n // otherwise, use the non-standard but defacto stack trace (available in most browser)\n this.stack = new Error().stack;\n }\n this.name = 'Network Client Error';\n this.response = response;\n const { status, statusText, url } = response;\n const summary = `Received response with status ${status} (${statusText}) for ${url}`;\n this.message =\n (payload\n ? extractMessage(payload).substring(0, MAX_ERROR_MESSAGE_LENGTH)\n : '') || summary;\n this.payload = payload;\n }\n}\nexport const makeUrl = (baseUrl, url, parameters) => {\n if (!baseUrl && !returnUndefOnError(() => new URL(url))) {\n throw new Error(`Can't build URL string: base URL is not specified and the provided URL '${url}' is not absolute`);\n }\n const fullUrl = new URL(url, baseUrl);\n if (parameters instanceof Object) {\n Object.entries(parameters).forEach(([name, value]) => {\n if (value !== undefined) {\n if (Array.isArray(value)) {\n // if value is an array, keep adding it to the URL with the same parameter name, for example: /reviews?revisionIds=rev2&revisionIds=rev1\n value\n .filter(isNonNullable)\n .forEach((subVal) => fullUrl.searchParams.append(name, subVal.toString()));\n }\n else {\n fullUrl.searchParams.append(name, value.toString());\n }\n }\n });\n }\n return fullUrl.toString();\n};\n// NOTE: in case of missing CORS headers, failed authentication manifests itself as CORS error\nconst couldBeCORS = (error) => error instanceof TypeError && error.message === 'Failed to fetch';\nconst processResponse = async (response, init, responseProcessConfig) => {\n responseProcessConfig?.preprocess?.(response);\n if (!response.ok) {\n let payload;\n try {\n payload = await response.text();\n payload = JSON.parse(payload);\n }\n catch {\n // NOTE: ignored, above is best effort\n }\n return Promise.reject(new NetworkClientError(response, payload));\n }\n if (responseProcessConfig?.skipProcessing) {\n return Promise.resolve(response);\n }\n if (response.status === HttpStatus.NO_CONTENT) {\n return Promise.resolve(undefined);\n }\n // TODO: might need to handle */* ContentType and other types\n // Note that right now what we support is rather simplistic, as we always expect `application/json` or `text/plain`\n // and use these to determine how we should decode the response. However, we should properly allow passing in\n // a field in response process config to specify the format of the expected response body\n //\n // See https://www.npmjs.com/package/mime-types\n // See https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types\n // See https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types\n // See https://github.github.io/fetch/\n const accept = init.headers.Accept;\n switch (accept) {\n case ContentType.APPLICATION_JSON:\n return response.json();\n case ContentType.TEXT_PLAIN:\n return response.text();\n default:\n return Promise.reject(new NetworkClientError(response, `Can't process response for request with Content-Type '${accept}'`));\n }\n};\nexport const createRequestHeaders = (method, headers) => {\n const baseRequestHeaders = {};\n /**\n * NOTE: here we set the accept header to application/json instead of the default value\n * as that will imply the server can send us text/html sometimes when there is an\n * authentication problem, which is not desirable.\n */\n baseRequestHeaders.Accept = ContentType.APPLICATION_JSON;\n if (method !== HttpMethod.GET) {\n baseRequestHeaders[HttpHeader.CONTENT_TYPE] =\n `${ContentType.APPLICATION_JSON};${CHARSET}`;\n }\n return mergeRequestHeaders(baseRequestHeaders, headers);\n};\n/**\n * Simple wrapper around native `fetch` API. For `options`, see documentation for \"init\"\n * See https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API\n */\nexport class NetworkClient {\n options = {};\n baseUrl;\n constructor(config) {\n this.baseUrl = config?.baseUrl;\n this.options = {\n ...DEFAULT_CLIENT_REQUEST_OPTIONS,\n ...(config?.options ?? {}),\n };\n }\n async get(url, options = {}, headers, parameters, requestProcessConfig, responseProcessConfig) {\n // NOTE: do not use Content-Type for GET to avoid unnecessary pre-flight when cross-origin\n return this.request(HttpMethod.GET, url, undefined, options, headers, parameters, requestProcessConfig, responseProcessConfig);\n }\n async put(url, data = {}, options = {}, headers, parameters, requestProcessConfig, responseProcessConfig) {\n return this.request(HttpMethod.PUT, url, data, options, headers, parameters, requestProcessConfig, responseProcessConfig);\n }\n async post(url, data = {}, options = {}, headers, parameters, requestProcessConfig, responseProcessConfig) {\n return this.request(HttpMethod.POST, url, data, options, headers, parameters, requestProcessConfig, responseProcessConfig);\n }\n async delete(url, data = {}, options = {}, headers, parameters, requestProcessConfig, responseProcessConfig) {\n return this.request(HttpMethod.DELETE, url, data, options, headers, parameters, requestProcessConfig, responseProcessConfig);\n }\n async request(method, url, data, options, headers, parameters, requestProcessConfig, responseProcessConfig) {\n const requestUrl = makeUrl(this.baseUrl, url, parameters ?? {});\n if ((isString(data) || isObject(data)) &&\n requestProcessConfig?.enableCompression) {\n assertTrue(method !== HttpMethod.GET, ' GET request should not have any request payload');\n data = compressData(data);\n // NOTE: do not use Content-Type for GET to avoid unnecessary pre-flight when cross-origin\n headers = mergeRequestHeaders(headers, {\n // Override Content-Type header when compression is enabled\n [HttpHeader.CONTENT_TYPE]: `${ContentType.APPLICATION_ZLIB};${CHARSET}`,\n });\n }\n let body;\n if (data !== undefined) {\n if (isString(data) || data instanceof Blob) {\n body = data;\n }\n else if (isObject(data)) {\n body = JSON.stringify(data);\n }\n else {\n throw new AssertionError(`Request body can only be either a 'string' or an 'object'`);\n }\n }\n const requestInit = {\n ...this.options,\n ...options,\n method,\n body: body,\n headers: createRequestHeaders(method, headers),\n };\n /**\n * For network client to work, we need an implementation of `window.fetch` to be present.\n * Modern browsers should already have native support for `fetch`.\n * In case they don't (such as in test where we use `jsdom` for example),\n * there are several ways to go about this,but we recommend using `whatwg-fetch` polyfill.\n *\n * Why favor `whatwg-fetch`?\n * It's Github's polyfill for a subset of features of Fetch API.\n * See https://github.com/github/fetch#read-this-first\n * What about `axios`? `axios` has pretty nice API, but larger bundle-size for no particular reason\n * See https://github.com/axios/axios/issues/1333#issuecomment-511375282\n * What about `node-fetch`? `node-fetch` is for server-side only, while `whatwg-fetch` is for client-side\n * See https://www.npmjs.com/package/node-fetch#motivation\n */\n return fetch(requestUrl, requestInit)\n .then((response) => {\n if (\n // NOTE: status 0 is either timeout or client error possibly caused by authentication\n response.status === 0 ||\n response.status === HttpStatus.UNAUTHORIZED) {\n // NOTE: we might want to consider different handling here rather than just proceeding with a retry\n // this is a good place to add an auto retry/authenticate mechanism\n if (responseProcessConfig?.autoReAuthenticateUrl) {\n return autoReAuthenticate(responseProcessConfig.autoReAuthenticateUrl)\n .then(() => fetch(requestUrl, requestInit))\n .then((resp) => processResponse(resp, requestInit, responseProcessConfig));\n }\n return fetch(requestUrl, requestInit).then((resp) => processResponse(resp, requestInit, responseProcessConfig));\n }\n return processResponse(response, requestInit, responseProcessConfig);\n })\n .catch((error) => couldBeCORS(error)\n ? // NOTE: we might want to consider different handling here rather than just proceeding with a retry\n fetch(requestUrl, requestInit).then((resp) => processResponse(resp, requestInit, responseProcessConfig))\n : Promise.reject(error));\n }\n}\n/**\n * Create and download a file using data URI\n * See http://stackoverflow.com/questions/283956\n */\nexport const downloadFileUsingDataURI = (fileName, content, contentType) => {\n const blob = new Blob([content], { type: contentType });\n const url = URL.createObjectURL(blob);\n const link = document.createElement('a');\n if (typeof link.download === 'string') {\n document.body.appendChild(link); // Firefox requires the link to be in the body\n link.download = fileName;\n link.href = url;\n link.click();\n document.body.removeChild(link); // remove the link when done\n }\n else {\n location.replace(url);\n }\n};\nexport const createUrlStringFromData = (data, contentType, base64) => base64\n ? `data:${contentType};base64,${window.btoa(data)}`\n : `data:${contentType},${encodeURIComponent(data)}`;\n// Buffer.from(str, 'base64')` and`buf.toString('base64')\n// NOTE: we can potentially use the native `URLSearchParams` as it provides\n// fairly good API and structured output, but it does not support duplicated query\n// such as `?foo=1&foo=2`, only the first value of `foo` will be recorded\n// See https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams\nexport const getQueryParameters = (url, isFullUrl = false) => {\n const params = isFullUrl\n ? queryString.parseUrl(url).query\n : queryString.parse(url);\n return params;\n};\nexport const getQueryParameterValue = (key, data) => {\n const paramValue = data[key];\n return paramValue ? decodeURIComponent(paramValue) : undefined;\n};\nexport const stringifyQueryParams = (params) => {\n const data = {};\n Object.entries(params).forEach(([key, value]) => {\n if (!value) {\n return;\n }\n data[key] = value.toString();\n });\n return queryString.stringify(data);\n};\nexport const addQueryParametersToUrl = (url, val) => (val ? `${url}?${val}` : url);\nexport const buildUrl = (parts) => parts\n .map((part) => part.replaceAll(/^\\/+/g, '').replaceAll(/\\/+$/g, ''))\n .join(URL_SEPARATOR);\nexport const sanitizeURL = (val) => {\n // eslint-disable-next-line no-process-env\n if (process.env.NODE_ENV === 'test') {\n // NOTE: the library we use for sanizing URL use URL.canParse() which is not available in JSDOM\n // so we skip sanitizing URL in test environment for now\n return val;\n }\n return sanitizeUrl(val);\n};\nexport const isValidURL = (val) => URL_REGEX.test(val);\n//# sourceMappingURL=NetworkUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport var APPLICATION_EVENT;\n(function (APPLICATION_EVENT) {\n APPLICATION_EVENT[\"APPLICATION_SETUP__FAILURE\"] = \"application.setup.failure\";\n APPLICATION_EVENT[\"APPLICATION_LOAD__SUCCESS\"] = \"application.load.success\";\n APPLICATION_EVENT[\"APPLICATION_LOAD__FAILURE\"] = \"application.load.failure\";\n APPLICATION_EVENT[\"ILLEGAL_APPLICATION_STATE_OCCURRED\"] = \"application.error.illegal-state\";\n APPLICATION_EVENT[\"APPLICATION_CONFIGURATION__FAILURE\"] = \"application.configuration.failure\";\n APPLICATION_EVENT[\"IDENTITY_AUTO_FETCH__FAILURE\"] = \"application.identity.auto-fetch.failure\";\n APPLICATION_EVENT[\"DOCUMENTATION_FETCH__FAILURE\"] = \"application.documentation.fetch.failure\";\n APPLICATION_EVENT[\"DOCUMENTATION_LOAD__SKIP\"] = \"application.documentation.load.skip\";\n APPLICATION_EVENT[\"DOCUMENTATION_REQUIREMENT_CHECK__FAILURE\"] = \"application.documentation.requirement-check.failure\";\n APPLICATION_EVENT[\"CONTEXTUAL_DOCUMENTATION_LOAD__SKIP\"] = \"application.virtual-assistant.contextual-documentation-load.skip\";\n APPLICATION_EVENT[\"VIRTUAL_ASSISTANT_DOCUMENTATION_ENTRY__ACCESS\"] = \"application.virtual-assistant.documentation-entry.access\";\n APPLICATION_EVENT[\"TERMINAL_COMMAND_CONFIGURATION_CHECK__FAILURE\"] = \"application.load.terminal-command.configuration-check.failure\";\n APPLICATION_EVENT[\"COLOR_THEME_CONFIGURATION_CHECK__FAILURE\"] = \"application.layout.color-theme.configuration-check.failure\";\n APPLICATION_EVENT[\"SETTING_CONFIGURATION_CHECK__FAILURE\"] = \"application.setting.configuration-check.failure\";\n APPLICATION_EVENT[\"SETTING_RETRIVE_FAILURE\"] = \"application.setting.retrieve.failure\";\n APPLICATION_EVENT[\"USER_DATA_RETRIEVE_FAILURE\"] = \"application.user-data.retrieve.failure\";\n APPLICATION_EVENT[\"COMMAND_CENTER_REGISTRATION__FAILURE\"] = \"application.command.registration.failure\";\n APPLICATION_EVENT[\"APPLICATION_CONTEXT__ACCESS\"] = \"application.context.access\";\n APPLICATION_EVENT[\"APPLICATION_USAGE__INTERRUPT\"] = \"application.usage.interrupt\";\n APPLICATION_EVENT[\"NAVIGATION_BLOCKED\"] = \"application.usage.navigation-blocked\";\n APPLICATION_EVENT[\"APPLICATION_TELEMETRY_EVENT__FAILURE\"] = \"application.telemetry-event.failure\";\n APPLICATION_EVENT[\"DEBUG\"] = \"development.debug\";\n})(APPLICATION_EVENT || (APPLICATION_EVENT = {}));\n//# sourceMappingURL=LegendApplicationEvent.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { pruneNullValues } from '../CommonUtils.js';\nimport { custom, SKIP, deserialize, serialize, } from 'serializr';\nexport class SerializationFactory {\n schema;\n deserializeNullAsUndefined;\n constructor(schema, options) {\n this.schema = schema;\n this.deserializeNullAsUndefined = Boolean(options?.deserializeNullAsUndefined);\n }\n toJson(val) {\n return serialize(this.schema, val);\n }\n fromJson(val) {\n return deserialize(this.schema, this.deserializeNullAsUndefined ? pruneNullValues(val) : val);\n }\n}\nexport const usingModelSchema = (schema) => custom((value) => (value === undefined ? SKIP : serialize(schema, value)), (value) => deserialize(schema, value));\n// NOTE: we need these methods because `map()` of `serializr` tries to smartly\n// determines if it should produce object or ES6 Map but we always want ES6 Map,\n// so we would use this function\nexport const deserializeMap = (val, itemDeserializer) => {\n const result = new Map();\n Object.keys(val).forEach((key) => result.set(key, itemDeserializer(val[key])));\n return result;\n};\nexport const serializeMap = (val, itemSerializer) => {\n const result = {};\n val.forEach((v, key) => {\n result[key] = itemSerializer(v);\n });\n return result;\n};\nexport const usingConstantValueSchema = (value) => custom(() => value, () => value);\n/**\n * This is the idiomatic usage pattern for `optional(custom(...))`.\n *\n * `optional` only affects serialization so we must make sure to check\n * if the value is `undefined` or not, if yes, serialize, else, return `undefined`\n * which will be processed by `optional(...)` as `SKIP`.\n *\n * `optional` does not affect deserialization, however, as `undefined` values\n * are automatically skipped\n * See https://github.com/mobxjs/serializr/issues/73#issuecomment-535641545\n */\nexport const optionalCustom = (\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nserializer, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ndeserializer, additionalArgs) => custom((val) => (val ? serializer(val) : SKIP), (val) => (val ? deserializer(val) : SKIP), additionalArgs);\nexport const optionalCustomUsingModelSchema = (schema) => custom((val) => (val ? serialize(schema, val) : SKIP), (val) => (val ? deserialize(schema, val) : SKIP));\nexport const deserializeArray = (values, itemDeserializer, options) => {\n if (Array.isArray(values)) {\n return values.map(itemDeserializer);\n }\n return options?.skipIfEmpty ? SKIP : [];\n};\nexport const serializeArray = (values, itemSerializer, options) => {\n let forceReturnEmptyInTest = false;\n // NOTE: this block is meant for test, `webpack` will tree-shake it\n // so we never reach inside, else we would get error about `process is not defined` as we're\n // in browser environment\n // eslint-disable-next-line no-process-env\n if (process.env.NODE_ENV === 'test') {\n forceReturnEmptyInTest =\n Boolean(options?.INTERNAL__forceReturnEmptyInTest) &&\n // eslint-disable-next-line no-process-env\n process.env.TEST_GROUP === 'engine-roundtrip';\n }\n if (Array.isArray(values)) {\n return values.length\n ? values.map((value) => itemSerializer(value))\n : forceReturnEmptyInTest\n ? []\n : options?.skipIfEmpty\n ? SKIP\n : [];\n }\n return forceReturnEmptyInTest ? [] : SKIP;\n};\n/**\n * This is the idiomatic usage pattern for serialization of optional list of objects.\n *\n * Notice our particular usage of `serializeArray` and `deserializeArray` that is deisnged\n * for testing and accounting for logic mismatches between servers and studio\n */\nexport const customListWithSchema = (schema, options) => custom((values) => serializeArray(values, (value) => serialize(schema, value), {\n skipIfEmpty: true,\n INTERNAL__forceReturnEmptyInTest: options?.INTERNAL__forceReturnEmptyInTest,\n}), (values) => deserializeArray(values, (value) => deserialize(schema, value), {\n skipIfEmpty: false,\n}));\nexport const customList = (serializer, deserializer, options) => custom((values) => serializeArray(values, (value) => serializer(value), {\n skipIfEmpty: true,\n INTERNAL__forceReturnEmptyInTest: options?.INTERNAL__forceReturnEmptyInTest,\n}), (values) => deserializeArray(values, (value) => deserializer(value), {\n skipIfEmpty: false,\n}));\nexport const customEquivalentList = (options) => customList((value) => value, (value) => value, options);\nexport const optionalCustomListWithSchema = (schema, options) => optionalCustom((values) => serializeArray(values, (value) => serialize(schema, value), {\n skipIfEmpty: true,\n INTERNAL__forceReturnEmptyInTest: options?.INTERNAL__forceReturnEmptyInTest,\n}), (values) => deserializeArray(values, (value) => deserialize(schema, value), {\n skipIfEmpty: false,\n}));\nexport const optionalCustomList = (serializer, deserializer, options) => optionalCustom((values) => serializeArray(values, (value) => serializer(value), {\n skipIfEmpty: true,\n INTERNAL__forceReturnEmptyInTest: options?.INTERNAL__forceReturnEmptyInTest,\n}), (values) => deserializeArray(values, (value) => deserializer(value), {\n skipIfEmpty: false,\n}));\n/**\n * NOTE: this is a workaround for `serializr` to avoid the magic extension mechanism provided\n * by `createModelSchema`, where depending on the order schemas are defined, if the schema of the\n * super class is specified first, when we serialize subclasses, we would get fields of the order\n * of fields from the super classes first, followed by fields from the subclasses, not the order\n * specified in the subclass's schema.\n *\n * See https://github.com/mobxjs/serializr/issues/179\n */\nexport const TEMPORARY__disableModelSchemaExtensionMechanism = (schema) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment\n schema.extends = undefined;\n return schema;\n};\n//# sourceMappingURL=SerializationUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createModelSchema, custom, list, optional, primitive, } from 'serializr';\nimport { SerializationFactory } from './SerializationUtils.js';\nexport class DocumentationEntry {\n key;\n markdownText;\n title;\n text;\n url;\n related;\n static serialization = new SerializationFactory(createModelSchema(DocumentationEntry, {\n markdownText: custom((val) => val, (val) => (val.value ? val : undefined)),\n related: optional(list(primitive())),\n title: optional(primitive()),\n text: optional(primitive()),\n url: optional(primitive()),\n }));\n static create(json, documentationKey) {\n const entry = DocumentationEntry.serialization.fromJson(json);\n entry.key = documentationKey;\n return entry;\n }\n}\n//# sourceMappingURL=DocumentationUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { LogEvent, uniq, guaranteeNonEmptyString, DocumentationEntry, } from '@finos/legend-shared';\nimport { APPLICATION_EVENT } from '../__lib__/LegendApplicationEvent.js';\nexport const collectKeyedDocumentationEntriesFromConfig = (rawEntries) => Object.entries(rawEntries).map((entry) => ({\n key: entry[0],\n content: DocumentationEntry.create(entry[1], entry[0]),\n}));\nexport const collectDocumentationLinkEntryFromConfig = (rawEntries) => Object.entries(rawEntries).map((entry) => ({\n key: guaranteeNonEmptyString(entry[0], \"Documentation link 'key' is missing\"),\n label: guaranteeNonEmptyString(entry[1].label, \"Documentation link 'label' is missing\"),\n url: guaranteeNonEmptyString(entry[1].url, \"Documentation link 'url' is missing\"),\n}));\nexport const collectContextualDocumentationEntries = (config) => Object.entries(config).map((entry) => ({\n context: entry[0],\n documentationKey: entry[1],\n}));\nexport class DocumentationService {\n url;\n links;\n docRegistry = new Map();\n contextualDocIndex = new Map();\n constructor(applicationStore) {\n // set the main documenation site url\n this.url = applicationStore.config.documentationUrl;\n this.links = applicationStore.config.documentationLinkEntries;\n /**\n * NOTE: the order of documentation entry overidding is (the later override the former):\n * 1. Natively specified: specified in the codebase (no overriding allowed within this group of documentation entries):\n * since we have extension mechanism, the order of plugins matter,\n * we do not allow overriding, i.e. so the first specification for a documentation key wins\n * 2. Fetched from documentation registries (no overriding allowed within this group of documentation entries):\n * since we have extension mechanism and allow specifying multiple registry URLS,\n * we do not allow overriding, i.e. so the first specification for a documentation key wins\n * 3. Configured in application config (overiding allowed within this group)\n */\n // build doc registry\n applicationStore.pluginManager\n .getApplicationPlugins()\n .flatMap((plugin) => plugin.getExtraKeyedDocumentationEntries?.() ?? [])\n .forEach((entry) => {\n // NOTE: Entries specified natively will not override each other. This is to prevent entries from extensions\n // accidentally overide entries from core.\n if (this.hasDocEntry(entry.key)) {\n applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.DOCUMENTATION_LOAD__SKIP), entry.key);\n }\n else {\n this.docRegistry.set(entry.key, entry.content);\n }\n });\n // entries from config will override entries specified natively\n applicationStore.config.keyedDocumentationEntries.forEach((entry) => this.docRegistry.set(entry.key, entry.content));\n const contextualDocEntries = applicationStore.pluginManager\n .getApplicationPlugins()\n .flatMap((plugin) => plugin.getExtraContextualDocumentationEntries?.() ?? []);\n // verify that required documentations are available\n const missingDocumentationEntries = [];\n uniq(applicationStore.pluginManager\n .getApplicationPlugins()\n .flatMap((plugin) => plugin.getExtraRequiredDocumentationKeys?.() ?? [])\n .concat(contextualDocEntries.map((entry) => entry.documentationKey))).forEach((key) => {\n if (!this.docRegistry.has(key)) {\n missingDocumentationEntries.push(key);\n }\n });\n if (missingDocumentationEntries.length) {\n applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.DOCUMENTATION_REQUIREMENT_CHECK__FAILURE), `Can't find corresponding documentation entry for keys:\\n${missingDocumentationEntries\n .map((key) => `- ${key}`)\n .join('\\n')}`);\n }\n // Contextual Documentation\n contextualDocEntries.forEach((entry) => {\n // NOTE: Entries specified natively will not override each other. This is to prevent entries from extensions\n // overriding entries from core.\n //\n // However, it might be useful to allow extending the list of related doc entries.\n // This allows extensions to broaden related doc entries for contextual docs\n // If we need to support this behavior, we could create a dedicated extension method\n if (this.hasContextualDocEntry(entry.context)) {\n applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.CONTEXTUAL_DOCUMENTATION_LOAD__SKIP), entry.context);\n }\n else {\n const existingDocEntry = this.getDocEntry(entry.documentationKey);\n if (existingDocEntry) {\n this.contextualDocIndex.set(entry.context, existingDocEntry);\n }\n }\n });\n // entries from config will override entries specified natively\n applicationStore.config.contextualDocEntries.forEach((entry) => {\n const existingDocEntry = this.getDocEntry(entry.documentationKey);\n if (existingDocEntry) {\n this.contextualDocIndex.set(entry.context, existingDocEntry);\n }\n });\n }\n getDocEntry(key) {\n return this.docRegistry.get(key);\n }\n hasDocEntry(key) {\n return this.docRegistry.has(key);\n }\n getContextualDocEntry(key) {\n return this.contextualDocIndex.get(key);\n }\n hasContextualDocEntry(key) {\n return this.contextualDocIndex.has(key);\n }\n getAllDocEntries() {\n return Array.from(this.docRegistry.values());\n }\n publishDocRegistry() {\n const result = {};\n this.docRegistry.forEach((value, key) => {\n result[key] = DocumentationEntry.serialization.toJson(value);\n });\n return result;\n }\n publishContextualDocIndex() {\n const result = {};\n this.contextualDocIndex.forEach((value, key) => {\n result[key] = value.key;\n });\n return result;\n }\n}\n//# sourceMappingURL=DocumentationService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { action, computed, makeObservable, observable } from 'mobx';\nvar ACTION_STATE;\n(function (ACTION_STATE) {\n ACTION_STATE[\"INITIAL\"] = \"INITIAL\";\n ACTION_STATE[\"IN_PROGRESS\"] = \"IN_PROGRESS\";\n ACTION_STATE[\"SUCCEEDED\"] = \"SUCEEDED\";\n ACTION_STATE[\"FAILED\"] = \"FAILED\";\n})(ACTION_STATE || (ACTION_STATE = {}));\nexport class ActionState {\n state;\n _message;\n _messageFormatter;\n constructor() {\n this.state = ACTION_STATE.INITIAL;\n }\n setMessage(val) {\n this._message = val;\n }\n setMessageFormatter(val) {\n this._messageFormatter = val;\n }\n reset() {\n this.state = ACTION_STATE.INITIAL;\n return this;\n }\n inProgress() {\n this.state = ACTION_STATE.IN_PROGRESS;\n return this;\n }\n fail() {\n this.state = ACTION_STATE.FAILED;\n return this;\n }\n pass() {\n this.state = ACTION_STATE.SUCCEEDED;\n return this;\n }\n complete(hasSucceeded = true) {\n if (hasSucceeded) {\n this.pass();\n }\n else {\n this.fail();\n }\n return this;\n }\n sync(val) {\n const data = val.exportData();\n this.state = data.state;\n this._message = data.message;\n }\n exportData() {\n return {\n state: this.state,\n message: this._message,\n };\n }\n get isInInitialState() {\n return this.state === ACTION_STATE.INITIAL;\n }\n get isInProgress() {\n return this.state === ACTION_STATE.IN_PROGRESS;\n }\n get hasFailed() {\n return this.state === ACTION_STATE.FAILED;\n }\n get hasSucceeded() {\n return this.state === ACTION_STATE.SUCCEEDED;\n }\n get message() {\n return this._message\n ? this._messageFormatter\n ? this._messageFormatter(this._message)\n : this._message\n : undefined;\n }\n /**\n * Use this if only the completion state of the action is of concern,\n * i.e. we don't care if it fails or succeeds.\n */\n get hasCompleted() {\n return this.hasFailed || this.hasSucceeded;\n }\n static create() {\n return makeObservable(new ActionState(), {\n state: observable,\n _message: observable,\n reset: action,\n inProgress: action,\n pass: action,\n fail: action,\n complete: action,\n setMessage: action,\n sync: action,\n isInInitialState: computed,\n isInProgress: computed,\n hasFailed: computed,\n hasSucceeded: computed,\n hasCompleted: computed,\n message: computed,\n });\n }\n}\n//# sourceMappingURL=ActionState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { AbstractPlugin, } from '../application/AbstractPluginManager.js';\nexport var CORE_TRACER_TAG;\n(function (CORE_TRACER_TAG) {\n CORE_TRACER_TAG[\"USER\"] = \"user\";\n CORE_TRACER_TAG[\"ENV\"] = \"env\";\n CORE_TRACER_TAG[\"RESULT\"] = \"result\";\n CORE_TRACER_TAG[\"ERROR\"] = \"error\";\n CORE_TRACER_TAG[\"HTTP_STATUS\"] = \"status\";\n CORE_TRACER_TAG[\"HTTP_REQUEST_METHOD\"] = \"method\";\n CORE_TRACER_TAG[\"HTTP_REQUEST_URL\"] = \"url\";\n})(CORE_TRACER_TAG || (CORE_TRACER_TAG = {}));\nexport class TracerServicePlugin extends AbstractPlugin {\n install(pluginManager) {\n pluginManager.registerTracerServicePlugin(this);\n }\n}\nexport class Trace {\n traceEntries = [];\n setup(traceEntries) {\n this.traceEntries = traceEntries;\n }\n bootstrap(response) {\n this.traceEntries.forEach((entry) => {\n entry.plugin.bootstrap(entry.clientSpan, response);\n });\n }\n reportSuccess() {\n this.traceEntries.forEach((entry) => {\n entry.plugin.concludeClientSpan(entry.clientSpan, undefined);\n });\n }\n reportError(error) {\n this.traceEntries.forEach((entry) => {\n entry.plugin.concludeClientSpan(entry.clientSpan, error);\n });\n }\n close() {\n this.traceEntries.forEach((entry) => {\n entry.plugin.concludeServerSpan(entry.serverSpan);\n });\n }\n}\nexport class TracerService {\n plugins = [];\n registerPlugins(plugins) {\n this.plugins = plugins;\n }\n createTrace(traceData, method, url, headers) {\n const trace = new Trace();\n if (traceData) {\n trace.setup(this.plugins.map((plugin) => {\n const clientSpan = plugin.createClientSpan(traceData);\n const serverSpan = plugin.createServerSpan(clientSpan, method, url, headers);\n return {\n clientSpan,\n serverSpan,\n plugin,\n };\n }));\n }\n return trace;\n }\n}\n//# sourceMappingURL=TracerService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport Fuse, {} from 'fuse.js';\nexport const FuzzySearchEngine = Fuse;\n//# sourceMappingURL=FuzzySearch.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { action, computed, makeObservable, observable } from 'mobx';\nexport var ADVANCED_FUZZY_SEARCH_MODE;\n(function (ADVANCED_FUZZY_SEARCH_MODE) {\n ADVANCED_FUZZY_SEARCH_MODE[\"STANDARD\"] = \"standard\";\n ADVANCED_FUZZY_SEARCH_MODE[\"INCLUDE\"] = \"include match\";\n ADVANCED_FUZZY_SEARCH_MODE[\"EXACT\"] = \"exact match\";\n ADVANCED_FUZZY_SEARCH_MODE[\"INVERSE\"] = \"excludes exact match\";\n})(ADVANCED_FUZZY_SEARCH_MODE || (ADVANCED_FUZZY_SEARCH_MODE = {}));\nexport class FuzzySearchAdvancedConfigState {\n currentMode = ADVANCED_FUZZY_SEARCH_MODE.STANDARD;\n onSearchModeChange;\n constructor(onSearchModeChange) {\n makeObservable(this, {\n currentMode: observable,\n isAdvancedSearchActive: computed,\n setCurrentMode: action,\n });\n this.onSearchModeChange = onSearchModeChange;\n }\n get isAdvancedSearchActive() {\n return this.currentMode !== ADVANCED_FUZZY_SEARCH_MODE.STANDARD;\n }\n generateSearchText(val) {\n switch (this.currentMode) {\n case ADVANCED_FUZZY_SEARCH_MODE.INCLUDE: {\n return `'\"${val}\"`;\n }\n case ADVANCED_FUZZY_SEARCH_MODE.EXACT: {\n return `=\"${val}\"`;\n }\n case ADVANCED_FUZZY_SEARCH_MODE.INVERSE: {\n return `!\"${val}\"`;\n }\n default: {\n return val;\n }\n }\n }\n setCurrentMode(val) {\n this.currentMode = val;\n this.onSearchModeChange();\n }\n}\n//# sourceMappingURL=FuzzySearchAdvancedConfigState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { action, makeObservable, observable, computed } from 'mobx';\nimport { guaranteeNonEmptyString, uuid, isNonNullable, ActionState, FuzzySearchEngine, FuzzySearchAdvancedConfigState, } from '@finos/legend-shared';\nexport var VIRTUAL_ASSISTANT_TAB;\n(function (VIRTUAL_ASSISTANT_TAB) {\n VIRTUAL_ASSISTANT_TAB[\"SEARCH\"] = \"SEARCH\";\n VIRTUAL_ASSISTANT_TAB[\"CONTEXTUAL_SUPPORT\"] = \"CONTEXTUAL_SUPPORT\";\n})(VIRTUAL_ASSISTANT_TAB || (VIRTUAL_ASSISTANT_TAB = {}));\nexport const DOCUMENTATION_SEARCH_RESULTS_LIMIT = 100;\nexport class VirtualAssistantDocumentationEntry {\n uuid = uuid();\n documentationKey;\n title;\n content;\n url;\n isOpen = false;\n constructor(docEntry) {\n makeObservable(this, {\n isOpen: observable,\n setIsOpen: action,\n });\n this.documentationKey = docEntry.key;\n this.title = guaranteeNonEmptyString(docEntry.title);\n this.content = docEntry.markdownText ?? docEntry.text;\n this.url = docEntry.url;\n }\n setIsOpen(val) {\n this.isOpen = val;\n }\n}\nexport class VirtualAssistantContextualDocumentationEntry {\n uuid = uuid();\n context;\n title;\n content;\n url;\n related;\n constructor(context, docEntry, related) {\n this.context = context;\n this.title = docEntry.title;\n this.content = docEntry.markdownText ?? docEntry.text;\n this.url = docEntry.url;\n this.related = related;\n }\n}\n/**\n * NOTE: since we're displaying the documentation entry in virtual assistant\n * we want only user-friendly docs, we will discard anything that doesn't\n * come with a title, or does not have any content/url\n */\nexport const isValidVirtualAssistantDocumentationEntry = (entry) => Boolean(entry.title && (entry.url ?? entry.text ?? entry.markdownText));\n/**\n * Check if the documentation entry should be displayed in virtual assistant,\n * i.e. it has some text content, rather just a link\n */\nexport const shouldDisplayVirtualAssistantDocumentationEntry = (entry) => isValidVirtualAssistantDocumentationEntry(entry) &&\n Boolean(entry.text ?? entry.markdownText);\nexport class AssistantService {\n applicationStore;\n /**\n * This key is used to allow programmatic re-rendering of the assistant panel\n */\n panelRenderingKey = uuid();\n isDisabled = false;\n isHidden = true; // hide by default unless specified by the application to show\n isOpen = false;\n isPanelMaximized = false;\n selectedTab = VIRTUAL_ASSISTANT_TAB.SEARCH;\n currentDocumentationEntry;\n // search text\n searchEngine;\n searchConfigurationState;\n searchState = ActionState.create();\n searchText = '';\n searchResults = [];\n showSearchConfigurationMenu = false;\n isOverSearchLimit = false;\n constructor(applicationStore) {\n makeObservable(this, {\n isDisabled: observable,\n isHidden: observable,\n isOpen: observable,\n isPanelMaximized: observable,\n panelRenderingKey: observable,\n isOverSearchLimit: observable,\n selectedTab: observable,\n searchText: observable,\n searchResults: observable,\n currentDocumentationEntry: observable,\n showSearchConfigurationMenu: observable,\n currentContextualDocumentationEntry: computed,\n setIsDisabled: action,\n setIsHidden: action,\n setIsOpen: action,\n setIsPanelMaximized: action,\n setSelectedTab: action,\n setSearchText: action,\n resetSearch: action,\n search: action,\n openDocumentationEntry: action,\n refreshPanelRendering: action,\n setShowSearchConfigurationMenu: action,\n });\n this.applicationStore = applicationStore;\n this.searchEngine = new FuzzySearchEngine(this.applicationStore.documentationService\n .getAllDocEntries()\n .filter(isValidVirtualAssistantDocumentationEntry), {\n includeScore: true,\n shouldSort: true,\n // Ignore location when computing the search score\n // See https://fusejs.io/concepts/scoring-theory.html\n ignoreLocation: true,\n // This specifies the point the search gives up\n // `0.0` means exact match where `1.0` would match anything\n // We set a relatively low threshold to filter out irrelevant results\n threshold: 0.2,\n keys: [\n {\n // NOTE: for now, we would weight title the most\n name: 'title',\n weight: 4,\n },\n {\n name: 'text',\n weight: 1,\n },\n {\n name: 'markdownText.value',\n weight: 1,\n },\n ],\n // extended search allows for exact word match through single quote\n // See https://fusejs.io/examples.html#extended-search\n useExtendedSearch: true,\n });\n this.searchConfigurationState = new FuzzySearchAdvancedConfigState(() => {\n this.search();\n });\n }\n get currentContextualDocumentationEntry() {\n if (!this.applicationStore.navigationContextService.currentContext) {\n return undefined;\n }\n const currentContext = this.applicationStore.navigationContextService.currentContext.key;\n const currentContextualDocumentationEntry = this.applicationStore.documentationService.getContextualDocEntry(currentContext);\n return currentContextualDocumentationEntry\n ? new VirtualAssistantContextualDocumentationEntry(currentContext, currentContextualDocumentationEntry, (currentContextualDocumentationEntry.related ?? [])\n .map((entry) => this.applicationStore.documentationService.getDocEntry(entry))\n .filter(isNonNullable)\n .filter(isValidVirtualAssistantDocumentationEntry)\n .map((entry) => new VirtualAssistantDocumentationEntry(entry)))\n : undefined;\n }\n openDocumentationEntry(key) {\n const entry = this.applicationStore.documentationService.getDocEntry(key);\n if (entry) {\n this.setIsOpen(true);\n this.setIsHidden(false);\n this.currentDocumentationEntry = new VirtualAssistantDocumentationEntry(entry);\n this.currentDocumentationEntry.setIsOpen(true);\n this.resetSearch();\n }\n }\n openDocumentationEntryLink(key) {\n const entry = this.applicationStore.documentationService.getDocEntry(key);\n if (entry) {\n if (shouldDisplayVirtualAssistantDocumentationEntry(entry)) {\n this.openDocumentationEntry(entry.key);\n }\n else if (entry.url) {\n this.applicationStore.navigationService.navigator.visitAddress(entry.url);\n }\n }\n }\n setIsDisabled(val) {\n this.isDisabled = val;\n }\n setIsHidden(val) {\n this.isHidden = val;\n }\n setIsPanelMaximized(val) {\n this.isPanelMaximized = val;\n }\n hideAssistant() {\n this.setIsHidden(true);\n this.setIsOpen(false);\n }\n toggleAssistant() {\n const newVal = !this.isHidden;\n if (newVal) {\n this.hideAssistant();\n }\n else {\n this.setIsHidden(false);\n }\n }\n setIsOpen(val) {\n this.isOpen = val;\n }\n setSelectedTab(val) {\n this.selectedTab = val;\n }\n refreshPanelRendering() {\n this.panelRenderingKey = uuid();\n }\n setSearchText(val) {\n this.searchText = val;\n }\n resetSearch() {\n this.searchText = '';\n this.searchResults = [];\n this.searchState.complete();\n }\n search() {\n if (!this.searchText) {\n this.searchResults = [];\n return;\n }\n this.currentDocumentationEntry = undefined;\n this.searchState.inProgress();\n this.searchResults = Array.from(this.searchEngine\n .search(this.searchConfigurationState.generateSearchText(this.searchText), {\n // NOTE: search for limit + 1 item so we can know if there are more search results\n limit: DOCUMENTATION_SEARCH_RESULTS_LIMIT + 1,\n })\n .values()).map((result) => new VirtualAssistantDocumentationEntry(result.item));\n // check if the search results exceed the limit\n if (this.searchResults.length > DOCUMENTATION_SEARCH_RESULTS_LIMIT) {\n this.isOverSearchLimit = true;\n this.searchResults = this.searchResults.slice(0, DOCUMENTATION_SEARCH_RESULTS_LIMIT);\n }\n else {\n this.isOverSearchLimit = false;\n }\n this.searchState.complete();\n }\n setShowSearchConfigurationMenu(val) {\n this.showSearchConfigurationMenu = val;\n }\n}\n//# sourceMappingURL=AssistantService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { AbstractPlugin, } from '@finos/legend-shared';\nexport class EventNotifierPlugin extends AbstractPlugin {\n install(pluginManager) {\n pluginManager.registerEventNotifierPlugin(this);\n }\n}\nexport class EventService {\n notifierPlugins = [];\n registerEventNotifierPlugins(plugins) {\n this.notifierPlugins = plugins;\n }\n notify(event, data) {\n this.notifierPlugins.forEach((plugin) => plugin.notify(event, data));\n }\n}\n//# sourceMappingURL=EventService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { APPLICATION_EVENT } from './LegendApplicationEvent.js';\nexport class LegendApplicationTelemetryHelper {\n static logEvent_ApplicationInitializationSucceeded(service, applicationStore) {\n service.logEvent(APPLICATION_EVENT.APPLICATION_LOAD__SUCCESS, {\n application: {\n name: applicationStore.config.appName,\n version: applicationStore.config.appVersion,\n env: applicationStore.config.env,\n },\n browser: {\n userAgent: navigator.userAgent,\n },\n screen: {\n height: window.screen.height,\n width: window.screen.width,\n },\n });\n }\n static logEvent_ApplicationContextAccessed(service, data) {\n service.logEvent(APPLICATION_EVENT.APPLICATION_CONTEXT__ACCESS, data);\n }\n static logEvent_VirtualAssistantDocumentationEntryAccessed(service, data) {\n service.logEvent(APPLICATION_EVENT.VIRTUAL_ASSISTANT_DOCUMENTATION_ENTRY__ACCESS, data);\n }\n static logEvent_ApplicationUsageInterrupted(service) {\n service.logEvent(APPLICATION_EVENT.APPLICATION_USAGE__INTERRUPT, {});\n }\n}\n//# sourceMappingURL=LegendApplicationTelemetry.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { IllegalStateError } from '@finos/legend-shared';\nimport { action, computed, makeObservable, observable } from 'mobx';\nimport { LegendApplicationTelemetryHelper } from '../__lib__/LegendApplicationTelemetry.js';\n/**\n * Context data refers to the area of the application that the user is\n * currently navigating.\n *\n * NOTE: note that this is navigation-driven, do not associate places\n * which present in the app screen that is not a direct consequence\n * of user's navigation. e.g. the status bar is not a good area to\n * be considered a context, the editor screen is because it means\n * the user must have navigated to the editor screen from somewhere,\n * for instance, the setup page.\n */\nexport class ApplicationNavigationContextData {\n key;\n /**\n * There are 2 types of context data: `standard` and `transient`\n * 1. standard context data represents an application context layer that\n * would be pushed to the stack and the context will be popped as we leave\n * the application, in other words, the context will be properly cleaned up\n * e.g. when we go in an editor, we will push context data to the stack and\n * pop it when we leave that editor\n * 2. transient context does not guarantee to be cleaned up properly, this\n * corresponds to application areas whose presense is transient and not stable:\n * such as those triggered by on-flight events, whose exit-state is hard to capture\n * e.g. user focuses on an input\n *\n * NOTE: transient context must not be mistakened as event, even in the example of\n * user focusing on an input, that's an area of the application that we might want\n * to get record of in terms of context. Events like a notification pop up, failure\n * of some long-running processes are not considered application contexts\n */\n isTransient = false;\n constructor(key, isTransient) {\n this.key = key;\n this.isTransient = isTransient;\n }\n static create(key) {\n return new ApplicationNavigationContextData(key, false);\n }\n static createTransient(key) {\n return new ApplicationNavigationContextData(key, true);\n }\n}\nexport class ApplicationNavigationContextService {\n applicationStore;\n contextStack = [];\n constructor(applicationStore) {\n makeObservable(this, {\n contextStack: observable,\n currentContext: computed,\n push: action,\n pop: action,\n });\n this.applicationStore = applicationStore;\n }\n get currentContext() {\n return this.contextStack.length\n ? this.contextStack[this.contextStack.length - 1]\n : undefined;\n }\n /**\n * Add the context to the stack.\n *\n * If the context is already if the context is already part of the stack\n * we will throw an error. This is to make sure we context is unique in the stack\n * and we do proper context stack cleanups on navigation.\n */\n push(context) {\n // first, filter out all transient contexts, so we can be sure that\n // all of the remaining contexts are standard and they should be cleaned up properly\n // this makes our duplication meaningful\n const newContextStack = this.contextStack.filter((ctx) => !ctx.isTransient);\n if (newContextStack.find((ctx) => ctx.key === context.key)) {\n throw new IllegalStateError(`Found multiple context '${context.key}' in application navigation context stack`);\n }\n newContextStack.push(context);\n // log the context being accessed if it's in the list of interested context keys\n if (this.applicationStore.pluginManager\n .getApplicationPlugins()\n .flatMap((plugin) => plugin.getExtraAccessEventLoggingApplicationContextKeys?.() ?? [])\n .includes(context.key)) {\n LegendApplicationTelemetryHelper.logEvent_ApplicationContextAccessed(this.applicationStore.telemetryService, {\n key: context.key,\n });\n }\n this.contextStack = newContextStack;\n }\n /**\n * Remove the context from the stack.\n *\n * NOTE: we will check from bottom of the stack up, for the specified context,\n * if it's found in the context stack, we will pop until the specified context.\n * This is to allow popping deeper context layers from very high up in the application\n * context stack, e.g. removing a context of an element editor when leaving the editor\n * to go to setup page.\n */\n pop(context) {\n const existingCtx = this.contextStack.find((ctx) => ctx.key === context.key);\n if (!existingCtx) {\n return;\n }\n // NOTE: since we should not have any duplicated contexts\n // it's safe to search from bottom to top of the stack\n const idx = this.contextStack.indexOf(existingCtx);\n if (idx !== -1) {\n this.contextStack = this.contextStack\n .slice(0, idx)\n // remove all transient contexts\n .filter((ctx) => !ctx.isTransient);\n }\n }\n}\n//# sourceMappingURL=ApplicationNavigationContextService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { LogEvent } from '@finos/legend-shared';\nimport { action, makeObservable, observable } from 'mobx';\nimport { APPLICATION_EVENT } from '../__lib__/LegendApplicationEvent.js';\nexport const collectKeyedCommandConfigEntriesFromConfig = (rawEntries) => Object.entries(rawEntries).map((entry) => ({\n key: entry[0],\n content: entry[1],\n}));\nexport class CommandService {\n applicationStore;\n commandRegistry = new Map();\n constructor(applicationStore) {\n makeObservable(this, {\n commandRegistry: observable,\n registerCommand: action,\n deregisterCommand: action,\n });\n this.applicationStore = applicationStore;\n }\n registerCommand(command) {\n const commandKey = command.key;\n if (this.commandRegistry.has(commandKey)) {\n this.applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.COMMAND_CENTER_REGISTRATION__FAILURE), `Can't register command: command '${commandKey}' is already registered`);\n return;\n }\n this.commandRegistry.set(commandKey, command);\n }\n deregisterCommand(commandKey) {\n this.commandRegistry.delete(commandKey);\n }\n runCommand(commandKey, args) {\n const command = this.commandRegistry.get(commandKey);\n if (command && (!command.trigger || command.trigger())) {\n command.action?.(args);\n return true;\n }\n return false;\n }\n}\n//# sourceMappingURL=CommandService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { isNonNullable } from '@finos/legend-shared';\nimport { action, makeObservable, observable } from 'mobx';\nexport class KeyboardShortcutsService {\n applicationStore;\n /**\n * NOTE: with this design, the relationship between command and key is many-to-many\n * We can have multiple commands being mapped to the same key combination, and vice versa\n */\n keyMap = new Map();\n commandKeyMap = new Map();\n isHotkeysBlocked = false;\n constructor(applicationStore) {\n makeObservable(this, {\n keyMap: observable,\n commandKeyMap: observable,\n isHotkeysBlocked: observable,\n addHotkey: action,\n blockGlobalHotkeys: action,\n unblockGlobalHotkeys: action,\n });\n this.applicationStore = applicationStore;\n this.applicationStore.pluginManager\n .getApplicationPlugins()\n .flatMap((plugin) => plugin.getExtraKeyedCommandConfigEntries?.() ?? [])\n .forEach((entry) => {\n // NOTE: since we allow mapping multiple commands to the same key combination\n // and when dispatching the command with a particular key combination, we only\n // execute the first matching command, if we override the config, we would need\n // to add them to the beginning of this list.\n // TODO: do validation on hot keys, hot keys which consist only of modifier keys, e.g. `Shift Shift` should not be supported\n const shortcuts = [\n entry.content.defaultKeyboardShortcut,\n ...(entry.content.additionalKeyboardShortcuts ?? []),\n ].filter(isNonNullable);\n if (shortcuts.length) {\n shortcuts.forEach((shortcut) => this.addHotkey(entry.key, shortcut));\n }\n else {\n if (!this.commandKeyMap.has(entry.key)) {\n this.commandKeyMap.set(entry.key, []);\n }\n }\n });\n }\n blockGlobalHotkeys() {\n this.isHotkeysBlocked = true;\n }\n unblockGlobalHotkeys() {\n this.isHotkeysBlocked = false;\n }\n addHotkey(commandKey, keyCombination) {\n // add shortcut to command key map\n this.commandKeyMap.set(commandKey, [\n ...(this.commandKeyMap.get(commandKey) ?? []),\n keyCombination,\n ]);\n // add new key map\n this.keyMap.set(keyCombination, [\n ...(this.keyMap.get(keyCombination) ?? []).filter((key) => key !== commandKey),\n commandKey,\n ]);\n }\n dispatch(keyCombination) {\n if (this.isHotkeysBlocked) {\n return;\n }\n const mappedCommandKeys = this.keyMap.get(keyCombination) ?? [];\n for (const commandKey of mappedCommandKeys) {\n // find the first command that works then escape\n if (this.applicationStore.commandService.runCommand(commandKey)) {\n return;\n }\n }\n }\n}\n//# sourceMappingURL=KeyboardShortcutsService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport const DEFAULT_TAB_SIZE = 2;\nexport const DEFAULT_MONOSPACED_FONT_FAMILY = 'Roboto Mono';\nexport const DEFAULT_DATE_TIME_FORMAT = \"yyyy-MM-dd'T'HH:mm:ss\";\nexport const DEFAULT_TYPEAHEAD_SEARCH_MINIMUM_SEARCH_LENGTH = 2;\nexport const DEFAULT_TYPEAHEAD_SEARCH_LIMIT = 10;\n//# sourceMappingURL=ApplicationConfig.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { action, makeObservable, observable } from 'mobx';\n// NOTE: using Unicode for ANSI escape\n// See https://stackoverflow.com/questions/26153308/best-ansi-escape-beginning\n// See https://gist.github.com/fnky/458719343aabd01cfb17a3a4f7296797\nexport var DISPLAY_ANSI_ESCAPE;\n(function (DISPLAY_ANSI_ESCAPE) {\n DISPLAY_ANSI_ESCAPE[\"RESET\"] = \"\\u001B[0m\";\n // text decoration\n DISPLAY_ANSI_ESCAPE[\"BOLD\"] = \"\\u001B[1m\";\n DISPLAY_ANSI_ESCAPE[\"DIM\"] = \"\\u001B[2m\";\n DISPLAY_ANSI_ESCAPE[\"ITALIC\"] = \"\\u001B[3m\";\n DISPLAY_ANSI_ESCAPE[\"UNDERLINE\"] = \"\\u001B[4m\";\n DISPLAY_ANSI_ESCAPE[\"BLINKING\"] = \"\\u001B[5m\";\n DISPLAY_ANSI_ESCAPE[\"STRIKETHROUGH\"] = \"\\u001B[9m\";\n // foreground\n DISPLAY_ANSI_ESCAPE[\"BLACK\"] = \"\\u001B[30m\";\n DISPLAY_ANSI_ESCAPE[\"RED\"] = \"\\u001B[31m\";\n DISPLAY_ANSI_ESCAPE[\"GREEN\"] = \"\\u001B[32m\";\n DISPLAY_ANSI_ESCAPE[\"YELLOW\"] = \"\\u001B[33m\";\n DISPLAY_ANSI_ESCAPE[\"BLUE\"] = \"\\u001B[34m\";\n DISPLAY_ANSI_ESCAPE[\"MAGENTA\"] = \"\\u001B[35m\";\n DISPLAY_ANSI_ESCAPE[\"CYAN\"] = \"\\u001B[36m\";\n DISPLAY_ANSI_ESCAPE[\"WHITE\"] = \"\\u001B[37m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_BLACK\"] = \"\\u001B[1;30m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_RED\"] = \"\\u001B[1;31m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_GREEN\"] = \"\\u001B[1;32m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_YELLOW\"] = \"\\u001B[1;33m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_BLUE\"] = \"\\u001B[1;34m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_MAGENTA\"] = \"\\u001B[1;35m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_CYAN\"] = \"\\u001B[1;36m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_WHITE\"] = \"\\u001B[1;37m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_BLACK\"] = \"\\u001B[2;30m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_RED\"] = \"\\u001B[2;31m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_GREEN\"] = \"\\u001B[2;32m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_YELLOW\"] = \"\\u001B[2;33m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_BLUE\"] = \"\\u001B[2;34m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_MAGENTA\"] = \"\\u001B[2;35m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_CYAN\"] = \"\\u001B[2;36m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_WHITE\"] = \"\\u001B[2;37m\";\n // background\n DISPLAY_ANSI_ESCAPE[\"BLACK_BG\"] = \"\\u001B[40m\";\n DISPLAY_ANSI_ESCAPE[\"RED_BG\"] = \"\\u001B[41m\";\n DISPLAY_ANSI_ESCAPE[\"GREEN_BG\"] = \"\\u001B[42m\";\n DISPLAY_ANSI_ESCAPE[\"YELLOW_BG\"] = \"\\u001B[43m\";\n DISPLAY_ANSI_ESCAPE[\"BLUE_BG\"] = \"\\u001B[44m\";\n DISPLAY_ANSI_ESCAPE[\"MAGENTA_BG\"] = \"\\u001B[45m\";\n DISPLAY_ANSI_ESCAPE[\"CYAN_BG\"] = \"\\u001B[46m\";\n DISPLAY_ANSI_ESCAPE[\"WHITE_BG\"] = \"\\u001B[47m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_BLACK_BG\"] = \"\\u001B[1;40m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_RED_BG\"] = \"\\u001B[1;41m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_GREEN_BG\"] = \"\\u001B[1;42m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_YELLOW_BG\"] = \"\\u001B[1;43m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_BLUE_BG\"] = \"\\u001B[1;44m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_MAGENTA_BG\"] = \"\\u001B[1;45m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_CYAN_BG\"] = \"\\u001B[1;46m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_WHITE_BG\"] = \"\\u001B[1;47m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_BLACK_BG\"] = \"\\u001B[2;40m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_RED_BG\"] = \"\\u001B[2;41m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_GREEN_BG\"] = \"\\u001B[2;42m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_YELLOW_BG\"] = \"\\u001B[2;43m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_BLUE_BG\"] = \"\\u001B[2;44m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_MAGENTA_BG\"] = \"\\u001B[2;45m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_CYAN_BG\"] = \"\\u001B[2;46m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_WHITE_BG\"] = \"\\u001B[2;47m\";\n})(DISPLAY_ANSI_ESCAPE || (DISPLAY_ANSI_ESCAPE = {}));\n/**\n * NOTE: this is the line and the column of the viewport of the terminal;\n * Also, line and column start from 1\n */\nexport const ANSI_moveCursor = (line, column) => `\\x1b[${line};${column}H`;\nexport const ANSI_moveCursorUp = (val, start) => start ? `\\x1b[${val}F` : `\\x1b[${val}A`;\nexport const ANSI_moveCursorDown = (val, start) => start ? `\\x1b[${val}E` : `\\x1b[${val}B`;\nexport const ANSI_moveCursorRight = (val) => `\\x1b[${val}C`;\nexport const ANSI_moveCursorLeft = (val) => `\\x1b[${val}D`;\nexport const ANSI_moveCursorToColumn = (val) => `\\x1b[${val}G`;\nclass ConsoleSearchConfiguration {\n searchInput;\n searchText = '';\n useRegex = false;\n matchWholeWord = false;\n matchCaseSensitive = false;\n resultCount;\n currentResultIndex;\n constructor() {\n makeObservable(this, {\n searchText: observable,\n useRegex: observable,\n matchWholeWord: observable,\n matchCaseSensitive: observable,\n resultCount: observable,\n currentResultIndex: observable,\n });\n }\n setSearchInput(el) {\n this.searchInput = el;\n }\n focus() {\n this.searchInput?.focus();\n }\n}\nexport class Console {\n applicationStore;\n searchConfig = new ConsoleSearchConfiguration();\n constructor(applicationStore) {\n makeObservable(this, {\n setSearchText: action,\n setSearchRegex: action,\n setSearchWholeWord: action,\n setSearchCaseSensitive: action,\n setSearchResultCount: action,\n setSearchCurrentResultIndex: action,\n });\n this.applicationStore = applicationStore;\n }\n setSearchText(val) {\n this.searchConfig.searchText = val;\n }\n setSearchRegex(val) {\n this.searchConfig.useRegex = val;\n }\n setSearchWholeWord(val) {\n this.searchConfig.matchWholeWord = val;\n }\n setSearchCaseSensitive(val) {\n this.searchConfig.matchCaseSensitive = val;\n }\n setSearchResultCount(val) {\n this.searchConfig.resultCount = val;\n }\n setSearchCurrentResultIndex(val) {\n this.searchConfig.currentResultIndex = val;\n }\n}\nexport class OutputConsole extends Console {\n}\nexport class Terminal extends Console {\n preserveLog = false;\n commandRegistry = new Map();\n constructor(applicationStore) {\n super(applicationStore);\n makeObservable(this, {\n preserveLog: observable,\n setPreserveLog: action,\n });\n }\n setPreserveLog(val) {\n this.preserveLog = val;\n }\n showHelp() {\n // do nothing\n }\n showCommonANSIEscapeSequences() {\n // do nothing\n }\n}\n//# sourceMappingURL=Terminal.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { stringify as losslessStringify, parse as losslessParse, isSafeNumber as lossIsSafeNumber, } from 'lossless-json';\nimport CSVParser from 'papaparse';\nimport { assertNonNullable } from '../error/AssertionUtils.js';\nexport const capitalize = (value) => value.length >= 1\n ? `${value[0].toUpperCase()}${value.substring(1, value.length)}`\n : value;\nexport const toSentenceCase = (value) => (value ?? '').trim().replace(/^(?:\\w+)\\b/u, (val) => capitalize(val));\nexport const TITLE_CASE_EXCEPTION_WORDS = [\n // We roughly follow AP style for simplicity\n // See https://en.wikipedia.org/wiki/Title_case\n 'a',\n 'an',\n 'the',\n 'but',\n 'by',\n 'nor',\n 'and',\n 'or',\n 'so',\n 'as',\n 'yet',\n 'for',\n 'in',\n 'nor',\n 'of',\n 'on',\n 'at',\n 'out',\n 'to',\n 'up',\n];\nexport const toTitleCase = (value) => (value ?? '')\n .trim()\n .replace(/\\b(?:\\w+)\\b/gu, (val) => {\n // lowercase minor words (typically articles, short prepositions, and some conjunctions)\n if (TITLE_CASE_EXCEPTION_WORDS.includes(val.toLowerCase())) {\n return val.toLowerCase();\n }\n return capitalize(val);\n})\n // always capitalize first and last word\n .replace(/^(?:\\w+)\\b/u, (val) => capitalize(val))\n .replace(/\\b(?:\\w+)$/u, (val) => capitalize(val));\nexport const prettyCONSTName = (value) => {\n if (!value) {\n return '';\n }\n // This handles our constant naming convention, e.g. SOME_VALUE, __PRIVATE_VALUE__, etc.\n if (value.trim().match(/^[A-Z_]+$/)) {\n return toTitleCase(value.trim().replace(/_+/gu, ' ').toLowerCase());\n }\n return (capitalize(value.trim())\n // NOTE: here we must use capturing group as we also need to capture the breakpoint/separator as chunks\n .split(/(?<chunk>[A-Z][a-z]+|[0-9]+)/)\n .map((chunk) => chunk.toUpperCase() === chunk\n ? chunk\n : chunk.charAt(0).toUpperCase() + chunk.slice(1).toLowerCase())\n .filter(Boolean)\n .join(' ')\n .replace(/_+/gu, ' ')\n .replace(/\\s+/gu, ' '));\n};\nexport const tryToFormatJSONString = (value, tabSize = 2) => {\n try {\n return JSON.stringify(JSON.parse(value), undefined, tabSize);\n }\n catch {\n return value;\n }\n};\nexport const tryToMinifyJSONString = (value) => {\n try {\n return JSON.stringify(JSON.parse(value));\n }\n catch {\n return value.replace(/\\n\\s*/g, '');\n }\n};\n/**\n * NOTE: this splits a string value into an array of strings by using a\n * delimiter of a comma if the string is only one line. However, if the\n * string has multiple lines, the delimiter will not be applied. This is so\n * that for an example input of multiple lines like\n * One, Comma in One\n * Two\n * Three\n * will still equal 3 elements (['One, Comma in One', 'Two', 'Three']) rather than 4\n */\nexport const parseCSVString = (value) => {\n let parseData;\n if (value.includes('\\n')) {\n parseData = value.trim().split(/\\r?\\n|\\r|\\n/g);\n return parseData;\n }\n else {\n const parseResult = CSVParser.parse(value.trim(), {\n delimiter: ',',\n });\n parseData = parseResult.data.flat();\n if (parseResult.errors.length) {\n // if (\n // parseResult.errors[0] &&\n // parseResult.errors[0].code === 'UndetectableDelimiter' &&\n // parseResult.errors[0].type === 'Delimiter' &&\n // parseResult.data.length === 1\n // ) {\n // // NOTE: this happens when the user only put one item in the value input\n // // we can go the other way by ensure the input has a comma but this is arguably neater\n // // as it tinkers with the parser\n // } else {\n // // there were some parsing error, escape\n // // NOTE: ideally, we could show a warning here\n // }\n return undefined;\n }\n else {\n return parseData;\n }\n }\n};\nexport const csvStringify = (value) => CSVParser.unparse(value);\n/**\n * One very common use case is that we get the JSON as response from the server than we will convert this to a string and persist\n * in the protocol. As such, we have to make sure this string is safe in PURE grammar format, i.e. it will escape single quotes\n * properly since PURE strings are wrapped in a pair of single quotes. The following pair of escape/unescape method does the simple job of\n * converting a JSON string to/from PURE grammar string\n *\n * NOTE: this is slightly different than escaping/unescaping JS string or normal JSON string, this is conversion is actually simplier since\n * the escaping is naturally handling by string conversion in Javascript, we just need to have special handling for the escaping of single-quotes\n * See https://stackoverflow.com/questions/3020094/how-should-i-escape-strings-in-json\n * See https://github.com/joliss/js-string-escape/blob/master/index.js\n */\nexport const fromGrammarString = (value) => value.replace(/\\\\'/gu, \"'\");\nexport const toGrammarString = (value) => value.replace(/'/gu, \"\\\\'\");\n/**\n * These are the sets of methods that helps with lossless conversion of JSON to/from text.\n *\n * The implementation of `JSON.parse` and `JSON.stringify` in Javascript is not lossless, e.g. values like 1.0 (a double) is automatically converted to 1 (an integer).\n * This pairs of method will convert the JSON losslessly. One caveat is that numeric values are stored as LosslessNumber, a data type which stores the numeric value as a string.\n *\n * NOTE: One can perform regular operations with a LosslessNumber, and it will throw an error when this would result in losing information.\n * But use this with discretion since it it does not result in the same object as `JSON.parse`\n */\nexport { losslessParse as parseLosslessJSON };\nexport { lossIsSafeNumber as isLossSafeNumber };\nexport const stringifyLosslessJSON = (val, replacer, space) => {\n const result = losslessStringify(val, replacer, space);\n assertNonNullable(result, `Can't stringify lossless JSON value`);\n return result;\n};\nexport const tryToFormatLosslessJSONString = (value, tabSize = 2) => {\n try {\n return stringifyLosslessJSON(losslessParse(value), undefined, tabSize);\n }\n catch {\n return value;\n }\n};\nexport const tryToMinifyLosslessJSONString = (value) => {\n try {\n return tryToFormatLosslessJSONString(value, 0);\n }\n catch {\n return value.replace(/\\n\\s*/g, '');\n }\n};\nexport const indent = (value, indentText) => value\n .split('\\n')\n .map((line) => `${indentText}${line}`)\n .join('\\n');\nexport const quantify = (value, label, pluralForm) => value <= 0\n ? `no ${pluralForm ?? `${label}s`}`\n : value > 1\n ? `${value} ${pluralForm ?? `${label}s`}`\n : `1 ${label}`;\nexport const quantifyList = (val, label, pluralForm) => quantify(val.length, label, pluralForm);\n//# sourceMappingURL=FormatterUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { uniqBy } from '../CommonUtils.js';\nimport { guaranteeNonNullable } from '../error/AssertionUtils.js';\n/**\n * List of keyboard named key\n * See https://www.w3.org/TR/uievents-key/#named-key-attribute-values\n * See https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_key_values\n */\nexport var KEYBOARD_NAMED_KEY;\n(function (KEYBOARD_NAMED_KEY) {\n KEYBOARD_NAMED_KEY[\"TAB\"] = \"Tab\";\n KEYBOARD_NAMED_KEY[\"CAPSLOCK\"] = \"CapsLock\";\n KEYBOARD_NAMED_KEY[\"SHIFT\"] = \"Shift\";\n KEYBOARD_NAMED_KEY[\"META\"] = \"Meta\";\n KEYBOARD_NAMED_KEY[\"ALT\"] = \"Alt\";\n KEYBOARD_NAMED_KEY[\"CONTROL\"] = \"Control\";\n KEYBOARD_NAMED_KEY[\"SPACE\"] = \"Space\";\n KEYBOARD_NAMED_KEY[\"ESC\"] = \"Escape\";\n KEYBOARD_NAMED_KEY[\"LEFT\"] = \"ArrowLeft\";\n KEYBOARD_NAMED_KEY[\"RIGHT\"] = \"ArrowRight\";\n KEYBOARD_NAMED_KEY[\"UP\"] = \"ArrowUp\";\n KEYBOARD_NAMED_KEY[\"DOWN\"] = \"ArrowDown\";\n KEYBOARD_NAMED_KEY[\"ENTER\"] = \"Enter\";\n KEYBOARD_NAMED_KEY[\"DELETE\"] = \"Delete\";\n KEYBOARD_NAMED_KEY[\"BACKSPACE\"] = \"Backspace\";\n KEYBOARD_NAMED_KEY[\"BACKQUOTE\"] = \"Backquote\";\n})(KEYBOARD_NAMED_KEY || (KEYBOARD_NAMED_KEY = {}));\n/**\n * Parses key bindings and pack them into parts\n *\n * grammar = `<sequence>`\n * <sequence> = `<press> <press> <press> ...`\n * <press> = `<key>` or `<mods>+<key>`\n * <mods> = `<mod>+<mod>+...`\n */\nexport function parseKeybinding(value) {\n return value\n .trim()\n .split(' ')\n .map((press) => {\n const modifiers = press.split(/\\b\\+/);\n const key = guaranteeNonNullable(modifiers.pop(), `Can't parse key binding: last part must be a non-modifier key`);\n return { modifiers, key };\n });\n}\n/**\n * Checks if a series of keypress events matches a key binding sequence either partially or exactly.\n */\nexport const isMatchingKeyPressData = (event, keyPressData) => \n// NOTE: we allow specifying with `event.code` only\n// - key: value of the key pressed by the user, taking into consideration the state of modifier keys\n// such as `Shift` as well as the keyboard locale and layout. This is not desirable, because\n// for matching, we have to do uppercase comparison, in Mac, if we presss Alt+B for example, we will\n// get symbols\n// - code: represents a physical key on the keyboard (as opposed to the character generated by pressing the key);\n// i.e. this property returns a value that isn't altered by keyboard layout or the state of the modifier keys\n// See https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key\n// See https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code\nkeyPressData.key === event.code &&\n // ensure all the modifiers in the keybinding are pressed\n keyPressData.modifiers.every((modifier) => event.getModifierState(modifier)) &&\n // modifier keys (Shift, Control, etc.) change the meaning of a keybinding,\n // so if they are pressed but aren't part of the current keypress sequence, it's not a match.\n ![\n KEYBOARD_NAMED_KEY.SHIFT,\n KEYBOARD_NAMED_KEY.META,\n KEYBOARD_NAMED_KEY.ALT,\n KEYBOARD_NAMED_KEY.CONTROL,\n ].find((modifier) => \n // check if the current key pressed is one of the modifier keys\n keyPressData.key !== modifier &&\n event.getModifierState(modifier) &&\n // check if the modifier key pressed is part of the key combination\n !keyPressData.modifiers.includes(modifier));\nexport const isMatchingKeyCombination = (event, keyCombination) => isMatchingKeyPressData(event, guaranteeNonNullable(parseKeybinding(keyCombination)[0]));\n/**\n * Create event listener for keyboard event (recommended to be used with `keydown/keyup` event)\n *\n * This succinct logic is adapted from `tinykeys`\n * See https://github.com/jamiebuilds/tinykeys\n */\nexport function createKeybindingsHandler(config) {\n // this holds the possible hotkey matches for the current sequence of keyboard events\n const possibleMatches = new Map();\n // NOTE: this timer is used to time the duration between key presses to determine when to\n // cancel the sequence, we set the default timeout to be 1000, as short timeout\n // can be slightly too fast for users\n let timer = null;\n const DEFAULT_TIMEOUT_DURATION = 1000;\n return (event) => {\n // Ensure and stop any event that isn't an keyboard event.\n // e.g. auto-complete option navigation and selection could fire an event\n if (!(event instanceof KeyboardEvent)) {\n return;\n }\n // NOTE: create a flat collection of key combination to handler, make sure\n // for each combination, only the first matching entry is considered,\n // i.e. explicitly here, we don't handle multiple handling\n // See https://github.com/finos/legend-studio/issues/1969\n uniqBy(Object.values(config)\n .flatMap((entry) => entry.combinations.map((combination) => ({\n combination,\n handler: entry.handler,\n })))\n .filter((entry) => entry.combination.length), (val) => val.combination)\n // here, we go through each hotkey combination, and:\n // 1. parse the key combination\n // 2. if the key combination is already part of the possible matches,\n // retrieve the current match result: this result is the list of the\n // keypresses left to complete the combination, else, we just add the\n // new combination and proceed the same way\n .forEach((entry) => {\n const keyCombination = entry.combination;\n const parsedKeyCombination = parseKeybinding(entry.combination);\n // abort when we encounter an empty key combination\n if (!parsedKeyCombination.length) {\n return;\n }\n const remainingExpectedKeyPresses = possibleMatches.get(keyCombination) ?? parsedKeyCombination;\n // this should never be empty, as it becomes empty, it must mean:\n // 1. either the key combination has been matched before and not cleared\n // 2. the key combination is empty, which should not be possible due to the guard above\n const currentExpectedKeyPress = guaranteeNonNullable(remainingExpectedKeyPresses[0]);\n const matches = isMatchingKeyPressData(event, currentExpectedKeyPress);\n if (!matches) {\n // if the current key pressed is a modifier key\n // we don't consider this as a non-match yet\n // NOTE: here we use `event.key` instead of `event.code` since for `Shift` key,\n // the key is always `Shift` where the key code can be `ShiftLeft`\n if (!event.getModifierState(event.key)) {\n possibleMatches.delete(keyCombination);\n }\n }\n else if (remainingExpectedKeyPresses.length > 1) {\n // matches found, not all keypresses of the key combination have been fulfilled, remove\n // the matched keypress part of the combination (if it's in the list of possible matches)\n possibleMatches.set(keyCombination, remainingExpectedKeyPresses.slice(1));\n }\n else {\n // matches found, all keypresses of the combination have been fulfilled, call the handler\n possibleMatches.delete(keyCombination);\n entry.handler(keyCombination, event);\n }\n });\n if (timer) {\n clearTimeout(timer);\n }\n timer = setTimeout(possibleMatches.clear.bind(possibleMatches), DEFAULT_TIMEOUT_DURATION);\n };\n}\n//# sourceMappingURL=KeyBinding.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createTheme, StyledEngineProvider, ThemeProvider, } from '@mui/material';\nimport { LocalizationProvider } from '@mui/x-date-pickers';\nimport { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFnsV3/index.js';\nconst LegendCustomMUITheme = createTheme({\n transitions: {\n // disable all transition\n // NOTE: this is a catch-all way to remove all transitions\n // We technically don't need this because we can configure transition props for each component\n create: () => 'none',\n },\n components: {\n MuiButtonBase: {\n defaultProps: {\n disableRipple: true,\n },\n },\n },\n});\nexport const LegendStyleProvider = (props) => {\n const { children } = props;\n return (\n // Make sure CSS for MUI generated by `emotion` are injected before our styling code\n // this ensures our styling code can override MUI styles\n // See https://mui.com/guides/interoperability/#css-injection-order-3\n _jsx(StyledEngineProvider, { injectFirst: true, children: _jsx(ThemeProvider, { theme: LegendCustomMUITheme, children: _jsx(LocalizationProvider, { dateAdapter: AdapterDateFns, children: children }) }) }));\n};\n//# sourceMappingURL=LegendStyleProvider.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { clsx } from 'clsx';\nexport const generateSimpleDIVComponent = (componentName, divClassName) => {\n const component = (props) => {\n const { children, className } = props;\n return (_jsx(\"div\", { className: clsx(divClassName, className), \"data-testid\": props['data-testid'], children: children }));\n };\n component.displayName = componentName;\n return component;\n};\n//# sourceMappingURL=ComponentCreatorUtils.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { prettyCONSTName, toTitleCase } from '@finos/legend-shared';\nimport { clsx } from 'clsx';\nimport { generateSimpleDIVComponent } from '../utils/ComponentCreatorUtils.js';\nexport const Modal = (props) => {\n const { children, darkMode, className } = props;\n return (_jsx(\"div\", { className: clsx('modal', { 'modal--dark': darkMode }, className), children: children }));\n};\nexport const ModalTitle = (props) => {\n const { title, icon, className } = props;\n return (_jsxs(\"div\", { className: clsx('modal__title', className), children: [icon && _jsx(\"div\", { className: \"modal__title__icon\", children: icon }), _jsx(\"div\", { className: \"modal__title__label\", children: toTitleCase(title) })] }));\n};\nexport const ModalHeader = (props) => {\n const { title, children, className } = props;\n if (!children && title) {\n return (_jsx(\"div\", { className: clsx('modal__header', className), children: _jsx(ModalTitle, { title: title }) }));\n }\n return _jsx(\"div\", { className: clsx('modal__header', className), children: children });\n};\nexport const ModalHeaderActions = generateSimpleDIVComponent('ModalHeaderActions', 'modal__header__actions');\nexport const ModalBody = generateSimpleDIVComponent('ModalBody', 'modal__body');\nexport const ModalFooter = generateSimpleDIVComponent('ModalFooter', 'modal__footer');\nexport const ModalFooterStatus = generateSimpleDIVComponent('ModalFooterStatus', 'modal__footer__status');\nexport const ModalFooterButton = (props) => {\n const { onClick, inProgressText, text, title, children, disabled, className, darkMode, formatText, type, preventFormSubmit, } = props;\n const isDarkMode = darkMode ?? true;\n const isFormatText = formatText ?? true;\n const isSecondary = type === 'secondary';\n const isPreventFormSubmit = preventFormSubmit ?? false;\n return (_jsxs(\"button\", { className: clsx('btn', 'modal__footer__btn', {\n 'btn--dark': isDarkMode,\n 'btn--light': !isDarkMode,\n 'modal__footer__btn--primary': !isSecondary,\n 'modal__footer__btn--secondary': isSecondary,\n }, className), title: title, onClick: onClick, disabled: Boolean(inProgressText) || disabled, type: isPreventFormSubmit ? 'button' : undefined, children: [inProgressText\n ? prettyCONSTName(inProgressText)\n : isFormatText\n ? prettyCONSTName(text)\n : text, children] }));\n};\n//# sourceMappingURL=Modal.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { action, makeObservable, observable } from 'mobx';\nexport var ActionAlertType;\n(function (ActionAlertType) {\n ActionAlertType[\"STANDARD\"] = \"STANDARD\";\n ActionAlertType[\"CAUTION\"] = \"CAUTION\";\n ActionAlertType[\"ERROR\"] = \"ERROR\";\n})(ActionAlertType || (ActionAlertType = {}));\nexport var ActionAlertActionType;\n(function (ActionAlertActionType) {\n ActionAlertActionType[\"STANDARD\"] = \"STANDARD\";\n ActionAlertActionType[\"PROCEED_WITH_CAUTION\"] = \"PROCEED_WITH_CAUTION\";\n ActionAlertActionType[\"PROCEED\"] = \"PROCEED\";\n})(ActionAlertActionType || (ActionAlertActionType = {}));\nexport class AlertService {\n applicationStore;\n blockingAlertInfo;\n actionAlertInfo;\n constructor(applicationStore) {\n makeObservable(this, {\n blockingAlertInfo: observable,\n actionAlertInfo: observable,\n setBlockingAlert: action,\n setActionAlertInfo: action,\n });\n this.applicationStore = applicationStore;\n }\n setBlockingAlert(alertInfo) {\n if (alertInfo) {\n this.applicationStore.keyboardShortcutsService.blockGlobalHotkeys();\n }\n else {\n this.applicationStore.keyboardShortcutsService.unblockGlobalHotkeys();\n }\n this.blockingAlertInfo = alertInfo;\n }\n setActionAlertInfo(alertInfo) {\n if (this.actionAlertInfo && alertInfo) {\n this.applicationStore.notificationService.notifyIllegalState('Action alert is stacked: new alert is invoked while another one is being displayed');\n }\n if (alertInfo) {\n this.applicationStore.keyboardShortcutsService.blockGlobalHotkeys();\n }\n else {\n this.applicationStore.keyboardShortcutsService.unblockGlobalHotkeys();\n }\n this.actionAlertInfo = alertInfo;\n }\n}\n//# sourceMappingURL=AlertService.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createContext, useContext } from 'react';\nimport { useLocalObservable } from 'mobx-react-lite';\nimport { guaranteeNonNullable } from '@finos/legend-shared';\nconst ApplicationStoreContext = createContext(undefined);\nexport const useApplicationStore = () => guaranteeNonNullable(useContext(ApplicationStoreContext), `Can't find application store in context`);\nexport const ApplicationStoreProvider = ({ children, store, }) => {\n const applicationStore = useLocalObservable(() => store);\n return (_jsx(ApplicationStoreContext.Provider, { value: applicationStore, children: children }));\n};\n//# sourceMappingURL=ApplicationStoreProvider.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Dialog, ModalBody, ModalFooter, ModalHeader } from '@finos/legend-art';\nimport { ActionAlertActionType, ActionAlertType, } from '../stores/AlertService.js';\nimport { observer } from 'mobx-react-lite';\nimport { noop } from '@finos/legend-shared';\nimport { useApplicationStore } from './ApplicationStoreProvider.js';\nconst getActionButtonClassName = (type) => {\n switch (type) {\n case ActionAlertActionType.PROCEED_WITH_CAUTION:\n return 'btn--caution';\n case ActionAlertActionType.PROCEED:\n case ActionAlertActionType.STANDARD:\n default:\n return 'btn--dark';\n }\n};\nconst ActionAlertContent = observer((props) => {\n const { info } = props;\n const applicationStore = useApplicationStore();\n const { title, message, prompt, type, onClose, onEnter, actions } = info;\n const handleClose = () => {\n onClose?.();\n applicationStore.alertService.setActionAlertInfo(undefined);\n };\n const handleEnter = () => onEnter?.();\n const handleSubmit = () => {\n actions.find((action) => action.default)?.handler?.();\n handleClose();\n };\n return (_jsx(Dialog, { open: Boolean(applicationStore.alertService.actionAlertInfo), onClose: noop, TransitionProps: {\n onEnter: handleEnter,\n }, children: _jsxs(\"form\", { onSubmit: (event) => {\n event.preventDefault();\n handleSubmit();\n }, className: `modal search-modal modal--dark blocking-alert blocking-alert--${(type ?? ActionAlertType.STANDARD).toLowerCase()}`, children: [title && _jsx(ModalHeader, { title: title }), _jsxs(ModalBody, { children: [_jsx(\"div\", { className: \"blocking-alert__summary-text\", children: message }), _jsx(\"div\", { className: \"blocking-alert__prompt-text\", children: prompt })] }), _jsxs(ModalFooter, { children: [actions.map((action, idx) => {\n // NOTE: need to prevent default for the submit button, otherwise, we would get the warning \"Form submission canceled because the form is not connected\"\n // See https://stackoverflow.com/a/58234405\n const handler = (e) => {\n e.preventDefault();\n action.handler?.();\n handleClose();\n };\n return (_jsx(\"button\", { type: action.default ? 'submit' : 'button', className: `btn btn--dark ${getActionButtonClassName(action.type ?? ActionAlertActionType.STANDARD)}`, onClick: handler, autoFocus: Boolean(action.default), children: action.label }, idx));\n }), !actions.length && (_jsx(\"button\", { type: \"button\" // prevent this toggler being activated on form submission\n , className: \"btn btn--dark blocking-alert__action--standard\", onClick: handleClose, children: \"Cancel\" }))] })] }) }));\n});\nexport const ActionAlert = observer(() => {\n const applicationStore = useApplicationStore();\n const actionAlertInfo = applicationStore.alertService.actionAlertInfo;\n if (!actionAlertInfo) {\n return null;\n }\n return _jsx(ActionAlertContent, { info: actionAlertInfo });\n});\n//# sourceMappingURL=ActionAlert.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useEffect, useRef } from 'react';\nimport { clsx } from '../utils/ComponentUtils.js';\nexport const PanelLoadingIndicator = (props) => {\n const { isLoading, className } = props;\n const ref = useRef(null);\n useEffect(() => {\n if (ref.current) {\n if (isLoading) {\n ref.current.parentElement?.classList.add('panel-loading-indicator__container');\n }\n else {\n ref.current.parentElement?.classList.remove('panel-loading-indicator__container');\n }\n }\n }, [isLoading]);\n return (_jsx(\"div\", { ref: ref, className: clsx(className, `panel-loading-indicator${isLoading ? '' : '--disabled'}`) }));\n};\n//# sourceMappingURL=PanelLoadingIndicator.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { observer } from 'mobx-react-lite';\nimport { PanelLoadingIndicator, Dialog, Modal, ModalBody, } from '@finos/legend-art';\nimport { noop } from '@finos/legend-shared';\nimport { useApplicationStore } from './ApplicationStoreProvider.js';\n/**\n * The users of this need to justify their use case because blocking app disrupts the UX flow.\n * Of course there are legitimate use cases but please consult the team when you do so.\n * See https://material.io/components/dialogs#usage\n */\nexport const BlockingAlert = observer(() => {\n const applicationStore = useApplicationStore();\n const info = applicationStore.alertService.blockingAlertInfo;\n if (!info) {\n return null;\n }\n return (_jsx(Dialog, { open: Boolean(info), onClose: noop, classes: {\n root: 'blocking-alert__root-container',\n container: 'blocking-alert__container',\n }, children: _jsxs(Modal, { darkMode: !applicationStore.layoutService.TEMPORARY__isLightColorThemeEnabled, className: \"blocking-alert\", children: [_jsx(PanelLoadingIndicator, { isLoading: Boolean(info.showLoading) }), _jsxs(ModalBody, { children: [_jsx(\"div\", { className: \"blocking-alert__message\", children: info.message }), info.prompt && (_jsx(\"div\", { className: \"blocking-alert__message__prompt\", children: info.prompt }))] })] }) }));\n});\n//# sourceMappingURL=BlockingAlert.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//======================================================= TB =======================================================\nimport { TbArrowsJoin2, TbArrowsSplit2, TbMathFunction, TbBook, TbCircleOff, TbCalendarTime, TbClockEdit, TbSql, TbBrandSnowflake, } from 'react-icons/tb';\nexport const ArrowsJoinIcon = TbArrowsJoin2;\nexport const ArrowsSplitIcon = TbArrowsSplit2;\nexport const FunctionIcon = TbMathFunction;\nexport const RepoIcon = TbBook;\nexport const OffIcon = TbCircleOff;\nexport const CalendarClockIcon = TbCalendarTime;\nexport const LastModifiedIcon = TbClockEdit;\nexport const SQLIcon = TbSql;\nexport const Snowflake_BrandIcon = TbBrandSnowflake;\n//======================================================= MD =======================================================\nimport { MdManageSearch, MdModeEdit, MdTextFields, MdMoreVert, MdMoreHoriz, MdWrapText, MdSaveAs, MdSave, MdVerticalAlignBottom, MdRefresh, MdFunctions, MdCompareArrows, MdPlaylistAddCheck, MdAdd, // to be reviewed\nMdEdit, // to be reviewed\nMdSubject, MdViewHeadline, MdAssistant, MdSettingsEthernet, MdLink, MdWindow, MdReviews, MdCalculate, MdRocketLaunch, MdOutlineDataset, MdVerified, MdQueryStats, MdFilterCenterFocus, MdOutlineDescription, MdQuestionAnswer, MdUnfoldLess, MdUnfoldMore, MdKeyboardDoubleArrowLeft, //to be reviewed\nMdKeyboardDoubleArrowRight, //to be reviewed\nMdOutlinePushPin, } from 'react-icons/md';\nexport const ManageSearchIcon = MdManageSearch; // to be reviewed\nexport const PencilIcon = MdModeEdit;\nexport const StringTypeIcon = MdTextFields;\nexport const MoreVerticalIcon = MdMoreVert;\nexport const MoreHorizontalIcon = MdMoreHoriz;\nexport const WrapTextIcon = MdWrapText;\nexport const SaveAsIcon = MdSaveAs;\nexport const SaveCurrIcon = MdSave;\nexport const VerticalAlignBottomIcon = MdVerticalAlignBottom;\nexport const RefreshIcon = MdRefresh;\nexport const SigmaIcon = MdFunctions;\nexport const CompareIcon = MdCompareArrows;\nexport const CheckListIcon = MdPlaylistAddCheck;\nexport const AddIcon = MdAdd; // to be reviewed\nexport const EditIcon = MdEdit; // to be reviewed\nexport const SubjectIcon = MdSubject;\nexport const ViewHeadlineIcon = MdViewHeadline;\nexport const AssistantIcon = MdAssistant;\nexport const SettingsEthernetIcon = MdSettingsEthernet;\nexport const LinkIcon = MdLink;\nexport const WindowIcon = MdWindow;\nexport const ReviewIcon = MdReviews;\nexport const CalculateIcon = MdCalculate;\nexport const LaunchIcon = MdRocketLaunch;\nexport const DatasetIcon = MdOutlineDataset;\nexport const VerifiedIcon = MdVerified;\nexport const QueryIcon = MdQueryStats;\nexport const CenterFocusIcon = MdFilterCenterFocus;\nexport const DescriptionIcon = MdOutlineDescription;\nexport const QuestionAnswerIcon = MdQuestionAnswer;\nexport const FoldIcon = MdUnfoldLess;\nexport const UnfoldIcon = MdUnfoldMore;\nexport const DoubleArrowLeft = MdKeyboardDoubleArrowLeft; //to be reviewed\nexport const DoubleArrowRight = MdKeyboardDoubleArrowRight; //to be reviewed\nexport const PushPinIcon = MdOutlinePushPin;\n//======================================================= VSC =======================================================\nimport { VscDebug, VscError, VscWarning, VscWordWrap, VscGoToFile, VscClose, VscRunAll, VscRunErrors, VscOpenPreview, VscDiff, VscRegex, VscVersions, VscCaseSensitive, VscWholeWord, VscReferences, VscWand, VscCollapseAll, VscExpandAll, VscJson, VscTable, } from 'react-icons/vsc';\nexport const DebugIcon = VscDebug;\nexport const ErrorIcon = VscError;\nexport const WarningIcon = VscWarning;\nexport const WordWrapIcon = VscWordWrap;\nexport const GoToFileIcon = VscGoToFile;\nexport const CloseIcon = VscClose;\nexport const RunAllIcon = VscRunAll;\nexport const RunErrorsIcon = VscRunErrors;\nexport const OpenPreviewIcon = VscOpenPreview;\nexport const DiffIcon = VscDiff;\nexport const RegexIcon = VscRegex;\nexport const VersionsIcon = VscVersions;\nexport const CaseSensitiveIcon = VscCaseSensitive;\nexport const WholeWordMatchIcon = VscWholeWord;\nexport const ReferencesIcon = VscReferences;\nexport const WandIcon = VscWand;\nexport const CollapseTreeIcon = VscCollapseAll;\nexport const ExpandTreeIcon = VscExpandAll;\nexport const SerializeIcon = VscJson;\nexport const TableIcon = VscTable;\n//======================================================= BS =======================================================\nimport { BsFillTriangleFill, BsFillFileEarmarkSpreadsheetFill, BsBoxSeam, BsGripVertical, BsAlignTop, BsAlignMiddle, BsAlignBottom, BsAlignStart, BsAlignCenter, BsAlignEnd, BsDistributeHorizontal, BsDistributeVertical, BsDatabaseFillLock, BsDatabaseFillCheck, BsChevronUp, BsChevronDown, BsChevronRight, BsChevronLeft, BsQuestionSquare, BsQuestionSquareFill, BsTextLeft, } from 'react-icons/bs';\nexport const FilledTriangleIcon = BsFillTriangleFill;\nexport const TabulatedDataFileIcon = BsFillFileEarmarkSpreadsheetFill;\nexport const BundleIcon = BsBoxSeam;\nexport const ThinVerticalDragHandleIcon = BsGripVertical;\nexport const AlignTopIcon = BsAlignTop;\nexport const AlignMiddleIcon = BsAlignMiddle;\nexport const AlignBottomIcon = BsAlignBottom;\nexport const AlignStartIcon = BsAlignStart;\nexport const AlignCenterIcon = BsAlignCenter;\nexport const AlignEndIcon = BsAlignEnd;\nexport const DistributeHorizontalIcon = BsDistributeHorizontal;\nexport const DistributeVerticalIcon = BsDistributeVertical;\nexport const DataAccessIcon = BsDatabaseFillLock;\nexport const DataReadyIcon = BsDatabaseFillCheck;\nexport const ThinChevronUpIcon = BsChevronUp;\nexport const ThinChevronDownIcon = BsChevronDown;\nexport const ThinChevronRightIcon = BsChevronRight;\nexport const ThinChevronLeftIcon = BsChevronLeft;\nexport const QuestionSquareIcon = BsQuestionSquare;\nexport const QuestionSquareFillIcon = BsQuestionSquareFill;\nexport const GenericTextFileIcon = BsTextLeft;\n//======================================================= HI =======================================================\nimport { HiCode, HiHome, HiOutlineDocumentReport } from 'react-icons/hi';\nexport const ReportIcon = HiOutlineDocumentReport;\nexport const CodeIcon = HiCode;\nexport const HomeIcon = HiHome;\n//======================================================= io5 =======================================================\nimport { IoOpenOutline, IoResize, IoFileTrayFullOutline, IoMenuOutline, IoBeaker, IoFlaskSharp, IoSyncCircleSharp, IoStatsChart, IoHelpBuoy, IoCloudDownloadOutline, IoCloudUploadOutline, IoHelp, IoSunnyOutline, IoMoon, } from 'react-icons/io5';\nexport const OpenIcon = IoOpenOutline;\nexport const ResizeIcon = IoResize;\nexport const FileTrayIcon = IoFileTrayFullOutline;\nexport const MenuIcon = IoMenuOutline;\nexport const BeakerIcon = IoBeaker;\nexport const FlaskIcon = IoFlaskSharp;\nexport const AvailabilityIcon = IoSyncCircleSharp;\nexport const StatisticsIcon = IoStatsChart;\nexport const SupportIcon = IoHelpBuoy;\nexport const CloudDownloadIcon = IoCloudDownloadOutline;\nexport const CloudUploadIcon = IoCloudUploadOutline;\nexport const QuestionThinIcon = IoHelp;\nexport const SunIcon = IoSunnyOutline;\nexport const MoonIcon = IoMoon;\n//======================================================= FA =======================================================\nimport { FaHistory, FaCrosshairs, FaLayerGroup, FaGhost, FaLock, FaMask, FaFile, FaLongArrowAltRight, FaTimes, FaTimesCircle, FaPlus, FaCog, FaEye, FaEyeSlash, FaCaretUp, FaCaretDown, FaFire, FaSave, FaSquare, FaRegSquare, FaCheckSquare, FaMinusSquare, FaHashtag, FaHammer, FaCommentDots, FaClock, FaRegClock, FaToggleOn, FaQuestion, FaQuestionCircle, FaInfoCircle, FaCompress, FaMap, FaPlay, FaGripVertical, FaRobot, FaArrowLeft, FaArrowRight, FaArrowAltCircleDown, FaArrowAltCircleRight, FaArrowCircleRight, FaUser, FaShapes, FaEnvelope, FaSkull, FaDollarSign, FaSearch, FaStar, FaKey, FaExternalLinkAlt, FaExternalLinkSquareAlt, FaLightbulb, FaRegLightbulb, FaList, FaCircle, FaMinusCircle, FaTrash, FaRegCircle, FaShieldAlt, FaTag, FaTags, FaBolt, FaCheckCircle, FaExclamationTriangle, FaBug, FaCircleNotch, FaRegKeyboard, FaUserSecret, FaBuffer, FaSitemap, FaExpand, FaExpandArrowsAlt, FaSortAlphaDown, FaSort, FaSortAlphaDownAlt, FaFolderPlus, FaCaretRight, FaCaretLeft, FaWrench, FaArrowDown, FaArrowUp, FaTerminal, FaTruckLoading, FaFileCsv, FaFolderOpen, FaFolder, FaFileCode, FaCodeBranch, FaArrowAltCircleUp, FaArrowAltCircleLeft, FaRegStopCircle, FaAsterisk, FaFilter, FaExclamationCircle, FaRocket, FaCheck, FaBan, FaFileImport, FaUserFriends, FaDownload, FaUpload, FaRegWindowRestore, FaPauseCircle, FaShare, FaRegCopy, FaFileAlt, FaEdit, FaArrowsAltH, FaRegWindowMaximize, FaWindowMaximize, FaLongArrowAltDown, FaLongArrowAltUp, FaMeteor, FaPiedPiperSquare, FaPuzzlePiece, FaToggleOff, FaMapMarkerAlt, FaHatWizard, FaRegLaughWink, FaRegChartBar, FaRegSadTear, FaBusinessTime, FaDatabase, FaServer, FaArchive, FaBrain, FaBookOpen, FaLevelDownAlt, FaRegCalendarAlt, FaCalculator, FaReadme, FaRedo, FaUndo, FaCube, } from 'react-icons/fa';\nexport const HistoryIcon = FaHistory;\nexport const CrosshairsIcon = FaCrosshairs;\nexport const LayerGroupIcon = FaLayerGroup;\nexport const GhostIcon = FaGhost;\nexport const LockIcon = FaLock;\nexport const MaskIcon = FaMask;\nexport const FileIcon = FaFile;\nexport const LongArrowRightIcon = FaLongArrowAltRight;\nexport const TimesIcon = FaTimes;\nexport const TimesCircleIcon = FaTimesCircle;\nexport const PlusIcon = FaPlus;\nexport const CogIcon = FaCog;\nexport const EyeIcon = FaEye;\nexport const CloseEyeIcon = FaEyeSlash;\nexport const CaretUpIcon = FaCaretUp;\nexport const CaretDownIcon = FaCaretDown;\nexport const FireIcon = FaFire;\nexport const SaveIcon = FaSave;\nexport const SquareIcon = FaSquare;\nexport const EmptySquareIcon = FaRegSquare;\nexport const CheckSquareIcon = FaCheckSquare;\nexport const MinusSquareIcon = FaMinusSquare;\nexport const HashtagIcon = FaHashtag;\nexport const HammerIcon = FaHammer;\nexport const ChatIcon = FaCommentDots;\nexport const ClockIcon = FaClock;\nexport const EmptyClockIcon = FaRegClock;\nexport const ToggleIcon = FaToggleOn;\nexport const QuestionIcon = FaQuestion;\nexport const QuestionCircleIcon = FaQuestionCircle;\nexport const InfoCircleIcon = FaInfoCircle;\nexport const CompressIcon = FaCompress;\nexport const MapIcon = FaMap;\nexport const PlayIcon = FaPlay;\nexport const VerticalDragHandleIcon = FaGripVertical;\nexport const RobotIcon = FaRobot;\nexport const ArrowLeftIcon = FaArrowLeft;\nexport const ArrowRightIcon = FaArrowRight;\nexport const ArrowCircleDownIcon = FaArrowAltCircleDown;\nexport const ArrowCircleRightIcon = FaArrowAltCircleRight;\nexport const StickArrowCircleRightIcon = FaArrowCircleRight;\nexport const UserIcon = FaUser;\nexport const ShapesIcon = FaShapes;\nexport const EnvelopIcon = FaEnvelope;\nexport const SkullIcon = FaSkull;\nexport const DollarIcon = FaDollarSign;\nexport const SearchIcon = FaSearch;\nexport const StarIcon = FaStar;\nexport const KeyIcon = FaKey;\nexport const ExternalLinkIcon = FaExternalLinkAlt;\nexport const ExternalLinkSquareIcon = FaExternalLinkSquareAlt;\nexport const LightBulbIcon = FaLightbulb;\nexport const EmptyLightBulbIcon = FaRegLightbulb;\nexport const ListIcon = FaList;\nexport const CircleIcon = FaCircle;\nexport const MinusCircleIcon = FaMinusCircle;\nexport const TrashIcon = FaTrash;\nexport const EmptyCircleIcon = FaRegCircle;\nexport const ShieldIcon = FaShieldAlt;\nexport const TagIcon = FaTag;\nexport const TagsIcon = FaTags;\nexport const BoltIcon = FaBolt;\nexport const CheckCircleIcon = FaCheckCircle;\nexport const ExclamationTriangleIcon = FaExclamationTriangle;\nexport const BugIcon = FaBug;\nexport const CircleNotchIcon = FaCircleNotch;\nexport const KeyboardIcon = FaRegKeyboard;\nexport const HackerIcon = FaUserSecret;\nexport const BufferIcon = FaBuffer; // to be reviewed, moved to LegendIcon\nexport const SitemapIcon = FaSitemap; // to be reviewed, moved to LegendIcon\nexport const ExpandIcon = FaExpand;\nexport const ExpandAllIcon = FaExpandArrowsAlt;\nexport const SortDownIcon = FaSortAlphaDown;\nexport const SortIcon = FaSort;\nexport const SortDownAltIcon = FaSortAlphaDownAlt;\nexport const NewFolderIcon = FaFolderPlus;\nexport const CaretRightIcon = FaCaretRight;\nexport const CaretLeftIcon = FaCaretLeft;\nexport const WrenchIcon = FaWrench;\nexport const ArrowDownIcon = FaArrowDown;\nexport const ArrowUpIcon = FaArrowUp;\nexport const TerminalIcon = FaTerminal;\nexport const TruckLoadingIcon = FaTruckLoading;\nexport const FolderOpenIcon = FaFolderOpen;\nexport const FolderIcon = FaFolder;\nexport const FileCodeIcon = FaFileCode;\nexport const CodeBranchIcon = FaCodeBranch;\nexport const ArrowCircleUpIcon = FaArrowAltCircleUp;\nexport const ArrowCircleLeftIcon = FaArrowAltCircleLeft;\nexport const EmptyStopCircleIcon = FaRegStopCircle;\nexport const AsteriskIcon = FaAsterisk;\nexport const FilterIcon = FaFilter;\nexport const ExclamationCircleIcon = FaExclamationCircle;\nexport const RocketIcon = FaRocket;\nexport const CheckIcon = FaCheck;\nexport const BanIcon = FaBan;\nexport const FileImportIcon = FaFileImport;\nexport const UsersIcon = FaUserFriends;\nexport const DownloadIcon = FaDownload;\nexport const UploadIcon = FaUpload;\nexport const EmptyWindowRestoreIcon = FaRegWindowRestore;\nexport const PauseCircleIcon = FaPauseCircle;\nexport const ShareIcon = FaShare;\nexport const CopyIcon = FaRegCopy;\nexport const FileAltIcon = FaFileAlt; // to be reviewed/combined\nexport const PencilEditIcon = FaEdit; // to be reviewed/combined\nexport const ArrowsAltHIcon = FaArrowsAltH; // to be reviewed/combined\nexport const WindowMaximizeIcon = FaRegWindowMaximize; // to be reviewed/combined\nexport const FilledWindowMaximizeIcon = FaWindowMaximize; // to be reviewed/combined\nexport const LongArrowAltDownIcon = FaLongArrowAltDown; // to be reviewed/combined\nexport const LongArrowAltUpIcon = FaLongArrowAltUp; // to be reviewed/combined\nexport const MeteorIcon = FaMeteor; // to be reviewed/combined\nexport const PiedPiperSquareIcon = FaPiedPiperSquare; // to be reviewed/combined\nexport const PuzzlePieceIcon = FaPuzzlePiece; // to be reviewed/combined\nexport const ToggleOffIcon = FaToggleOff;\nexport const MapMarkerIcon = FaMapMarkerAlt;\nexport const WizardHatIcon = FaHatWizard;\nexport const FaceLaughWinkIcon = FaRegLaughWink;\nexport const ChartIcon = FaRegChartBar;\nexport const CsvIcon = FaFileCsv;\nexport const FaceSadTearIcon = FaRegSadTear;\nexport const BusinessTimeIcon = FaBusinessTime; // to be reviewed/combined\nexport const DatabaseIcon = FaDatabase;\nexport const ServerIcon = FaServer;\nexport const ArchiveIcon = FaArchive;\nexport const BrainIcon = FaBrain;\nexport const DocumentationIcon = FaBookOpen;\nexport const LevelDownIcon = FaLevelDownAlt; // to be reviewed/combined\nexport const CalendarIcon = FaRegCalendarAlt;\nexport const CalculatorIcon = FaCalculator;\nexport const ReadMeIcon = FaReadme;\nexport const UndoIcon = FaUndo;\nexport const RedoIcon = FaRedo;\nexport const CubeIcon = FaCube;\n//======================================================= GI =======================================================\nimport { GiWaterDrop, GiBeard, GiSunglasses, GiHouseKeys, } from 'react-icons/gi';\nexport const WaterDropIcon = GiWaterDrop;\nexport const BeardIcon = GiBeard;\nexport const SunglassesIcon = GiSunglasses;\nexport const HouseKeys = GiHouseKeys;\n//======================================================= GO =======================================================\nimport { GoChevronDown, GoChevronUp, GoChevronLeft, GoChevronRight, GoFileBinary, GoGitPullRequest, GoGitMerge, GoSync, GoGitBranch, GoX, GoPlug, } from 'react-icons/go';\nexport const ChevronDownIcon = GoChevronDown;\nexport const ChevronUpIcon = GoChevronUp;\nexport const ChevronLeftIcon = GoChevronLeft;\nexport const ChevronRightIcon = GoChevronRight;\nexport const BinaryTypeIcon = GoFileBinary;\nexport const GitPullRequestIcon = GoGitPullRequest;\nexport const GitMergeIcon = GoGitMerge;\nexport const SyncIcon = GoSync;\nexport const GitBranchIcon = GoGitBranch;\nexport const XIcon = GoX;\nexport const PluginIcon = GoPlug;\n//======================================================= SI =======================================================\nimport { SiSwagger } from 'react-icons/si';\nexport const SwaggerIcon = SiSwagger; // to be reviewed\n//======================================================= BI =======================================================\nimport { BiShapeTriangle, BiAtom, BiCabinet, BiLike, BiDislike, } from 'react-icons/bi';\nexport const ShapeTriangleIcon = BiShapeTriangle;\nexport const AtomIcon = BiAtom;\nexport const CabinetIcon = BiCabinet;\nexport const LikeIcon = BiLike;\nexport const DislikeIcon = BiDislike;\n//======================================================= CG =======================================================\nimport { CgOptions } from 'react-icons/cg';\nexport const OptionsIcon = CgOptions;\n//======================================================= FI =======================================================\nimport { FiPackage, FiMinus, FiMousePointer, FiMove, FiPlusCircle, FiSidebar, FiTriangle, FiZoomIn, FiZoomOut, FiGitMerge, FiLink, } from 'react-icons/fi';\nexport const PackageIcon = FiPackage;\nexport const MinusIcon = FiMinus;\nexport const MousePointerIcon = FiMousePointer;\nexport const MoveIcon = FiMove;\nexport const PlusCircleIcon = FiPlusCircle;\nexport const SidebarIcon = FiSidebar;\nexport const TriangleIcon = FiTriangle;\nexport const ZoomInIcon = FiZoomIn;\nexport const ZoomOutIcon = FiZoomOut;\nexport const TruncatedGitMergeIcon = FiGitMerge; // to be reviewed/combined\nexport const AnchorLinkIcon = FiLink;\n//======================================================= RI =======================================================\nimport { RiShapeLine, RiShareBoxFill, RiTestTubeFill, RiRobotFill, RiGovernmentFill, RiMoneyDollarCircleFill, } from 'react-icons/ri';\nexport const ShareBoxIcon = RiShareBoxFill;\nexport const ShapeLineIcon = RiShapeLine;\nexport const TestTubeIcon = RiTestTubeFill;\nexport const DroidIcon = RiRobotFill;\nexport const GovernanceIcon = RiGovernmentFill;\nexport const CostCircleIcon = RiMoneyDollarCircleFill;\n//======================================================= FC =======================================================\nimport { FcWorkflow } from 'react-icons/fc';\nexport const WorkflowIcon = FcWorkflow;\n//# sourceMappingURL=Icon.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ApplicationError, assertErrorThrown, assertTrue, isString, } from '@finos/legend-shared';\nimport { action, makeObservable, observable } from 'mobx';\nexport const DEFAULT_NOTIFICATION_HIDE_TIME = 6000; // ms\nexport const DEFAULT_ERROR_NOTIFICATION_HIDE_TIME = 10000; // ms\nexport var NOTIFCATION_SEVERITY;\n(function (NOTIFCATION_SEVERITY) {\n NOTIFCATION_SEVERITY[\"ILEGAL_STATE\"] = \"ILEGAL_STATE\";\n NOTIFCATION_SEVERITY[\"ERROR\"] = \"ERROR\";\n NOTIFCATION_SEVERITY[\"WARNING\"] = \"WARNING\";\n NOTIFCATION_SEVERITY[\"SUCCESS\"] = \"SUCCESS\";\n NOTIFCATION_SEVERITY[\"INFO\"] = \"INFO\";\n})(NOTIFCATION_SEVERITY || (NOTIFCATION_SEVERITY = {}));\nexport class Notification {\n severity;\n message;\n actions;\n autoHideDuration;\n constructor(severity, message, actions, autoHideDuration) {\n this.severity = severity;\n this.message = message;\n this.actions = actions;\n this.autoHideDuration = autoHideDuration;\n }\n}\nexport class NotificationService {\n notification;\n constructor() {\n makeObservable(this, {\n notification: observable,\n setNotification: action,\n notify: action,\n notifySuccess: action,\n notifyWarning: action,\n notifyIllegalState: action,\n notifyError: action,\n });\n }\n setNotification(notification) {\n this.notification = notification;\n }\n notify(message, actions, autoHideDuration) {\n this.setNotification(new Notification(NOTIFCATION_SEVERITY.INFO, message, actions ?? [], autoHideDuration === null\n ? undefined\n : (autoHideDuration ?? DEFAULT_NOTIFICATION_HIDE_TIME)));\n }\n notifySuccess(message, actions, autoHideDuration) {\n this.setNotification(new Notification(NOTIFCATION_SEVERITY.SUCCESS, message, actions ?? [], autoHideDuration === null\n ? undefined\n : (autoHideDuration ?? DEFAULT_NOTIFICATION_HIDE_TIME)));\n }\n notifyWarning(content, actions, autoHideDuration) {\n this.setNotification(new Notification(NOTIFCATION_SEVERITY.WARNING, content instanceof Error ? content.message : content, actions ?? [], autoHideDuration === null\n ? undefined\n : (autoHideDuration ?? DEFAULT_NOTIFICATION_HIDE_TIME)));\n }\n notifyError(content, actions) {\n const message = this.getErrorMessage(content);\n if (message) {\n this.setNotification(new Notification(NOTIFCATION_SEVERITY.ERROR, message, actions ?? [], undefined));\n }\n }\n getErrorMessage(content) {\n let message;\n if (content instanceof ApplicationError) {\n message = content.detail;\n }\n else if (content instanceof Error) {\n message = content.message;\n }\n else {\n assertTrue(isString(content), `Can't display error`);\n message = content;\n }\n return message;\n }\n notifyIllegalState(message, actions, autoHideDuration) {\n this.setNotification(new Notification(NOTIFCATION_SEVERITY.ILEGAL_STATE, isString(message) ? `[PLEASE NOTIFY DEVELOPER] ${message}` : message, actions ?? [], autoHideDuration === null\n ? undefined\n : (autoHideDuration ?? DEFAULT_NOTIFICATION_HIDE_TIME)));\n }\n notifyUnsupportedFeature(featureName) {\n this.notifyWarning(`Unsupported feature: ${featureName}`);\n }\n /**\n * This function creates a more user-friendly way to throw error in the UI. Rather than crashing the whole app, we will\n * just notify and replacing the value should get with an alternative (e.g. `undefined`). A good use-case for this\n * is where we would not expect an error to throw (i.e. `IllegalStateError`), but we want to be sure that if the error\n * ever occurs, it still shows very apparently in the UI, as such, printing out in the console is not good enough,\n * but crashing the app is bad too, so this is a good balance.\n */\n notifyAndReturnAlternativeOnError = (fn, alternative) => {\n try {\n return fn();\n }\n catch (error) {\n assertErrorThrown(error);\n this.notifyIllegalState(error.message);\n return alternative;\n }\n };\n}\n//# sourceMappingURL=NotificationService.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { observer } from 'mobx-react-lite';\nimport { useApplicationStore } from './ApplicationStoreProvider.js';\nimport { Notification, NotificationContent, ChevronDownIcon, ChevronUpIcon, TimesIcon, ExclamationTriangleIcon, TimesCircleIcon, CheckCircleIcon, InfoCircleIcon, BugIcon, clsx, } from '@finos/legend-art';\nimport { useState } from 'react';\nimport { DEFAULT_NOTIFICATION_HIDE_TIME, NOTIFCATION_SEVERITY, } from '../stores/NotificationService.js';\nexport const NotificationManager = observer(() => {\n const applicationStore = useApplicationStore();\n const notification = applicationStore.notificationService.notification;\n const isOpen = Boolean(notification);\n const message = notification?.message ?? '';\n const severity = notification?.severity ?? NOTIFCATION_SEVERITY.INFO;\n const [isExpanded, setIsExpanded] = useState(false);\n let notificationIcon = (_jsx(\"div\", { className: \"notification__message__content__icon notification__message__content__icon--info\", children: _jsx(InfoCircleIcon, {}) }));\n switch (severity) {\n case NOTIFCATION_SEVERITY.ILEGAL_STATE:\n notificationIcon = (_jsx(\"div\", { className: \"notification__message__content__icon notification__message__content__icon--error\", children: _jsx(BugIcon, {}) }));\n break;\n case NOTIFCATION_SEVERITY.ERROR:\n notificationIcon = (_jsx(\"div\", { className: \"notification__message__content__icon notification__message__content__icon--error\", children: _jsx(TimesCircleIcon, {}) }));\n break;\n case NOTIFCATION_SEVERITY.WARNING:\n notificationIcon = (_jsx(\"div\", { className: \"notification__message__content__icon notification__message__content__icon--warning\", children: _jsx(ExclamationTriangleIcon, {}) }));\n break;\n case NOTIFCATION_SEVERITY.SUCCESS:\n notificationIcon = (_jsx(\"div\", { className: \"notification__message__content__icon notification__message__content__icon--success\", children: _jsx(CheckCircleIcon, {}) }));\n break;\n default:\n break;\n }\n const handleClose = () => {\n applicationStore.notificationService.setNotification(undefined);\n setIsExpanded(false);\n };\n const handleCopy = applicationStore.guardUnhandledError(() => applicationStore.clipboardService.copyTextToClipboard(message));\n const toggleExpansion = () => setIsExpanded(!isExpanded);\n const onSnackbarAutoHideOrClickAway = (event, reason) => {\n // NOTE: we only should not allow dismissing the notification on click-away. First of call, this might not be desirable\n // second, this clashes with modal that traps focus, e.g. when we have another modal open and want to show a notification\n // the notification focus is stolen by the modal leading to the notification immediately gets clicked-away and closed\n if (reason === 'timeout') {\n handleClose();\n }\n };\n return (_jsx(Notification, { classes: {\n root: 'notification',\n anchorOriginBottomRight: 'notification__position',\n }, anchorOrigin: {\n vertical: 'bottom',\n horizontal: 'right',\n }, open: isOpen, \n // setting the auto-hide duration to null will stop it from hiding automatically\n autoHideDuration: notification\n ? (notification.autoHideDuration ?? null)\n : DEFAULT_NOTIFICATION_HIDE_TIME, onClose: onSnackbarAutoHideOrClickAway, children: _jsx(NotificationContent, { classes: {\n root: 'notification__content',\n message: 'notification__message',\n action: 'notification__actions',\n }, message: _jsxs(\"div\", { className: \"notification__message__content\", children: [notificationIcon, _jsx(\"div\", { className: clsx('notification__message__content__text', {\n 'notification__message__content__text--expanded': isExpanded,\n }), onClick: handleCopy, title: \"Click to Copy\", children: message })] }), action: [\n _jsx(\"button\", { className: \"notification__action\", onClick: toggleExpansion, tabIndex: -1, title: isExpanded ? 'Collapse' : 'Expand', children: isExpanded ? _jsx(ChevronDownIcon, {}) : _jsx(ChevronUpIcon, {}) }, \"expand\"),\n _jsx(\"button\", { className: \"notification__action\", onClick: handleClose, tabIndex: -1, title: \"Dismiss\", children: _jsx(TimesIcon, {}) }, \"close\"),\n ] }) }, typeof message === 'string' || typeof message === 'number'\n ? message\n : ''));\n});\n//# sourceMappingURL=NotificationManager.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Menu as MuiMenu, MenuItem as MuiMenuItem, } from '@mui/material';\nexport const Menu = (props) => {\n const { children, classes, ...otherProps } = props;\n return (_jsx(MuiMenu, { classes: {\n ...(classes ?? {}),\n paper: 'mui-menu__paper',\n list: 'mui-menu__list',\n }, transitionDuration: 0, ...otherProps, children: props.children }));\n};\nexport { MuiMenuItem as BaseMenuItem, MuiMenu as BaseMenu };\n//# sourceMappingURL=BaseMenu.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useState, useRef } from 'react';\nimport { Menu } from './BaseMenu.js';\nexport const ContextMenu = (props) => {\n const { className, children, menuProps, content, disabled, onClose, onOpen } = props;\n const contextMenuRoot = useRef(null);\n const [isOpen, setIsOpen] = useState(false);\n const [anchorEl, setAnchorEl] = useState();\n const [left, setLeft] = useState(0);\n const [top, setTop] = useState(0);\n const reset = () => {\n setAnchorEl(undefined);\n setIsOpen(false);\n setTop(0);\n setLeft(0);\n };\n const close = (event) => {\n event.stopPropagation();\n event.preventDefault();\n reset();\n onClose?.();\n };\n const onContextMenu = (event) => {\n event.stopPropagation();\n event.preventDefault();\n if (disabled) {\n return;\n }\n onOpen?.();\n if (contextMenuRoot.current) {\n // Get position of the container element relative to the page document\n // See https://plainjs.com/javascript/styles/get-the-position-of-an-element-relative-to-the-document-24/\n const containerRect = contextMenuRoot.current.getBoundingClientRect();\n const containerLeft = containerRect.left +\n (window.scrollX || document.documentElement.scrollLeft);\n const containerTop = containerRect.top +\n (window.scrollY || document.documentElement.scrollTop);\n const { clientX, clientY, target } = event;\n const eventTarget = target;\n if (anchorEl !== eventTarget) {\n // NOTE: since this method is not supported in JSDom, we will disable this optimization in test\n // eslint-disable-next-line no-process-env\n if (process.env.NODE_ENV !== 'test') {\n const elements = document.elementsFromPoint(clientX, clientY);\n // Besides checking for the element containment, we also want to check for position as MUI\n // Menu have a background that spans the whole screen to check for clickout and trap focus\n // which means right click on other part of the screen will also result in context menu being shown\n const hasAnchor = elements.some((element) => element === eventTarget) &&\n containerLeft <= clientX &&\n clientX <= containerLeft + containerRect.width &&\n containerTop <= clientY &&\n clientY <= containerTop + containerRect.height;\n if (!hasAnchor) {\n reset();\n onClose?.();\n return;\n }\n }\n }\n setAnchorEl(eventTarget);\n setIsOpen(true);\n setTop(clientY);\n setLeft(clientX);\n }\n };\n return (_jsxs(\"div\", { ref: contextMenuRoot, className: className, onContextMenu: onContextMenu, children: [children, _jsx(Menu, { open: isOpen, anchorPosition: { left, top }, onClose: close, anchorReference: \"anchorPosition\", BackdropProps: {\n invisible: true,\n onContextMenu,\n }, disableRestoreFocus: true, transitionDuration: 0, onClick: close, ...menuProps, children: isOpen && content }, `${left}, ${top}`)] }));\n};\n//# sourceMappingURL=ContextMenu.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { forwardRef } from 'react';\nimport { clsx } from 'clsx';\nimport { generateSimpleDIVComponent } from '../utils/ComponentCreatorUtils.js';\nexport const MenuContent = forwardRef(function MenuContent(props, ref) {\n const { className, children, ...otherProps } = props;\n return (_jsx(\"div\", { ref: ref, className: clsx('menu', className), ...otherProps, children: children }));\n});\nexport const MenuContentItem = (props) => {\n const { className, onClick, title, disabled, children, ...otherProps } = props;\n return (_jsx(\"button\", { className: clsx('menu__item', className), disabled: Boolean(disabled), title: title, onClick: onClick, ...otherProps, children: children }));\n};\nexport const MenuContentDivider = generateSimpleDIVComponent('MenuContentDivider', 'menu__divider');\nexport const MenuContentItemIcon = generateSimpleDIVComponent('MenuContentItemIcon', 'menu__item__icon');\nexport const MenuContentItemBlankIcon = (props) => {\n const { className, ...otherProps } = props;\n return (_jsx(\"div\", { className: clsx('menu__item__icon', className), ...otherProps }));\n};\nexport const MenuContentItemLabel = generateSimpleDIVComponent('MenuContentItemLabel', 'menu__item__label');\n//# sourceMappingURL=MenuContent.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport ReactMarkdown from 'react-markdown';\nimport remarkGFM from 'remark-gfm';\nimport { clsx } from 'clsx';\nimport { useEffect } from 'react';\nimport mermaid from 'mermaid';\nexport const MarkdownTextViewer = (props) => {\n useEffect(() => {\n // this will render the mermaid diagram\n mermaid.initialize({ startOnLoad: true, theme: 'dark' });\n mermaid.contentLoaded();\n }, [props.value]);\n return (_jsx(ReactMarkdown, { className: clsx('markdown-content', props.className), remarkPlugins: [remarkGFM], components: props.components ?? {\n // customize the rendering of the <code> block, if the language is mermaid\n // the class name must include `mermaid` and it will get picked up by the mermaid renderer\n code: (_props) => {\n const { children, className, node, ...rest } = _props;\n const match = /language-(?<language>\\w+)/.exec(className ?? '');\n return match?.groups?.language ? (_jsx(\"code\", { ...rest, className: clsx(match.groups.language), children: children })) : (_jsx(\"code\", { ...rest, className: className, children: children }));\n },\n }, children: props.value.value }));\n};\n//# sourceMappingURL=MarkdownTextViewer.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useEffect, useState } from 'react';\nimport { useResizeDetector } from 'react-resize-detector';\nimport { clsx } from 'clsx';\nconst DEFAULT_CONTENT_PADDING = 20;\n/**\n * Use this component for panel with empty content, it has a resize detector that will\n * help to show/hide the content as the panel is resized\n */\nexport const BlankPanelContent = (props) => {\n const { children } = props;\n const { ref: contentRef, width: contentWidth, height: contentHeight, } = useResizeDetector({\n refreshMode: 'throttle',\n refreshRate: 50,\n refreshOptions: { trailing: true },\n });\n const [showContent, setShowContent] = useState(false);\n const { ref: containerRef, width: containerWidth, height: containerHeight, } = useResizeDetector({\n refreshMode: 'throttle',\n refreshRate: 50,\n refreshOptions: { trailing: true },\n });\n useEffect(() => {\n setShowContent((containerWidth ?? 0) >\n (contentWidth ?? 0) + DEFAULT_CONTENT_PADDING * 2 &&\n (containerHeight ?? 0) >\n (contentHeight ?? 0) + DEFAULT_CONTENT_PADDING * 2);\n }, [containerWidth, containerHeight, contentWidth, contentHeight]);\n return (_jsx(\"div\", { ref: containerRef, className: \"panel__content__blank\", children: _jsx(\"div\", { ref: contentRef, className: clsx('panel__content__blank__content', {\n 'panel__content__blank__content--hide': !showContent,\n }), children: children }) }));\n};\n//# sourceMappingURL=BlankPanelContent.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { RadioGroup as MuiRadioGroup, FormControlLabel, Radio, } from '@mui/material';\nimport { clsx } from 'clsx';\nconst transformToMatrix = (arr, stepSize) => {\n const matrix = [];\n for (let i = 0; i < arr.length; i += stepSize) {\n matrix.push(arr.slice(i, i + stepSize));\n }\n return matrix;\n};\nexport const BaseRadioGroup = (props) => {\n const { children, options, size, className, ...otherProps } = props;\n // For displaying avaible options in a [n,size] matrix\n const targetOptionsValuesInMatrix = transformToMatrix(options, size);\n return (_jsxs(\"div\", { className: clsx('mui-radio-group', className), children: [targetOptionsValuesInMatrix.map((row, idx) => (\n // eslint-disable-next-line react/no-array-index-key\n _jsx(\"div\", { children: _jsx(MuiRadioGroup, { className: \"mui-radio-group__group\", ...otherProps, children: row.map((op) => (_jsx(FormControlLabel, { className: \"mui-radio-group__group__column\", style: { width: `${100 / size}%` }, value: op, control: _jsx(Radio, { className: \"mui-radio-group__group__item__radio-btn\", classes: {\n checked: 'mui-radio-group__group__item__radio-btn--checked',\n } }), label: _jsx(\"div\", { className: \"mui-radio-group__group__item__label\", children: op }) }, op))) }) }, idx))), children] }));\n};\n//# sourceMappingURL=BaseRadioGroup.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Popover as MuiPopover, } from '@mui/material';\nexport const BasePopover = (props) => {\n const { children, ...otherProps } = props;\n return (_jsx(MuiPopover, { classes: {\n paper: 'mui-popover__paper',\n }, transitionDuration: 0, ...otherProps, children: props.children }));\n};\n//# sourceMappingURL=BasePopover.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport var LEGEND_APPLICATION_DOCUMENTATION_KEY;\n(function (LEGEND_APPLICATION_DOCUMENTATION_KEY) {\n LEGEND_APPLICATION_DOCUMENTATION_KEY[\"QUESTION_HOW_TO_USE_ADVANCED_SEARCH_SYNTAX\"] = \"question.how-to-use-advanced-search-syntax\";\n})(LEGEND_APPLICATION_DOCUMENTATION_KEY || (LEGEND_APPLICATION_DOCUMENTATION_KEY = {}));\n//# sourceMappingURL=LegendApplicationDocumentation.js.map","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { clsx, TimesIcon, SearchIcon, MapMarkerIcon, CloseIcon, ContextMenu, MenuContent, MenuContentItem, MarkdownTextViewer, ChevronDownIcon, ChevronRightIcon, BlankPanelContent, BeardIcon, SunglassesIcon, WizardHatIcon, FaceLaughWinkIcon, ThinVerticalDragHandleIcon, PanelLoadingIndicator, BasePopover, FaceSadTearIcon, CogIcon, Draggable, BaseRadioGroup, QuestionCircleIcon, EmptyWindowRestoreIcon, WindowMaximizeIcon, MinusCircleIcon, } from '@finos/legend-art';\nimport { ADVANCED_FUZZY_SEARCH_MODE, ContentType, debounce, downloadFileUsingDataURI, formatDate, isString, uuid, } from '@finos/legend-shared';\nimport { observer } from 'mobx-react-lite';\nimport { useEffect, useMemo, useRef, useState } from 'react';\nimport { DEFAULT_DATE_TIME_FORMAT, DEFAULT_TAB_SIZE, } from '../stores/ApplicationConfig.js';\nimport { VIRTUAL_ASSISTANT_TAB, } from '../stores/AssistantService.js';\nimport { useApplicationStore } from './ApplicationStoreProvider.js';\nimport { LegendApplicationTelemetryHelper } from '../__lib__/LegendApplicationTelemetry.js';\nimport { LEGEND_APPLICATION_DOCUMENTATION_KEY } from '../__lib__/LegendApplicationDocumentation.js';\nconst WIZARD_GREETING = `Bonjour, It's Pierre!`;\nconst VirtualAssistantDocumentationEntryViewer = observer((props) => {\n const { entry } = props;\n const applicationStore = useApplicationStore();\n const toggleExpand = () => {\n if (!entry.isOpen) {\n LegendApplicationTelemetryHelper.logEvent_VirtualAssistantDocumentationEntryAccessed(applicationStore.telemetryService, {\n key: entry.documentationKey,\n });\n }\n entry.setIsOpen(!entry.isOpen);\n };\n const onDocumentationLinkClick = () => {\n LegendApplicationTelemetryHelper.logEvent_VirtualAssistantDocumentationEntryAccessed(applicationStore.telemetryService, {\n key: entry.documentationKey,\n });\n };\n const copyDocumentationKey = applicationStore.guardUnhandledError(() => applicationStore.clipboardService.copyTextToClipboard(entry.documentationKey));\n return (_jsx(ContextMenu, { className: \"virtual-assistant__doc-entry\", menuProps: {\n elevation: 7,\n classes: {\n root: 'virtual-assistant__context-menu',\n },\n }, content: _jsx(MenuContent, { children: _jsx(MenuContentItem, { onClick: copyDocumentationKey, children: \"Copy Documentation Key\" }) }), children: _jsxs(\"div\", { className: \"virtual-assistant__doc-entry\", children: [_jsxs(\"div\", { className: \"virtual-assistant__doc-entry__header\", children: [_jsx(\"button\", { className: clsx('virtual-assistant__doc-entry__expand-icon', {\n 'virtual-assistant__doc-entry__expand-icon--disabled': !entry.content,\n }), disabled: !entry.content, tabIndex: -1, onClick: toggleExpand, children: entry.isOpen ? _jsx(ChevronDownIcon, {}) : _jsx(ChevronRightIcon, {}) }), entry.url ? (_jsx(\"a\", { className: \"virtual-assistant__doc-entry__title virtual-assistant__doc-entry__title--link\", rel: \"noopener noreferrer\", target: \"_blank\", href: entry.url, onClick: onDocumentationLinkClick, title: \"Click to see external documentation\", children: entry.title })) : (_jsx(\"div\", { className: \"virtual-assistant__doc-entry__title\", onClick: toggleExpand, children: entry.title }))] }), entry.isOpen && entry.content && (_jsx(\"div\", { className: \"virtual-assistant__doc-entry__content\", children: isString(entry.content) ? (_jsx(\"div\", { className: \"virtual-assistant__doc-entry__content__text\", children: entry.content })) : (_jsx(MarkdownTextViewer, { className: \"virtual-assistant__doc-entry__content__markdown-text\", value: entry.content })) }))] }) }));\n});\nconst VirtualAssistantContextualSupportPanel = observer(() => {\n const applicationStore = useApplicationStore();\n const assistantService = applicationStore.assistantService;\n const contextualEntry = assistantService.currentContextualDocumentationEntry;\n const copyContextIDToClipboard = applicationStore.guardUnhandledError(() => applicationStore.clipboardService.copyTextToClipboard(contextualEntry?.context ?? ''));\n const copyCurrentContextIDToClipboard = applicationStore.guardUnhandledError(() => applicationStore.clipboardService.copyTextToClipboard(applicationStore.navigationContextService.currentContext?.key ?? ''));\n const copyContextStackToClipboard = applicationStore.guardUnhandledError(() => applicationStore.clipboardService.copyTextToClipboard(applicationStore.navigationContextService.contextStack\n .map((context) => context.key)\n .join(' > ')));\n return (_jsxs(ContextMenu, { className: \"virtual-assistant__contextual-support\", disabled: !contextualEntry, menuProps: {\n elevation: 7,\n classes: {\n root: 'virtual-assistant__context-menu',\n },\n }, content: _jsxs(MenuContent, { children: [_jsx(MenuContentItem, { onClick: copyContextIDToClipboard, children: \"Copy Context ID\" }), _jsx(MenuContentItem, { onClick: copyCurrentContextIDToClipboard, children: \"Copy Current Context ID\" }), _jsx(MenuContentItem, { onClick: copyContextStackToClipboard, children: \"Copy Context Stack\" })] }), children: [contextualEntry && (_jsxs(\"div\", { className: \"virtual-assistant__contextual-support__content\", children: [contextualEntry.title && (_jsx(\"div\", { className: \"virtual-assistant__contextual-support__title\", children: contextualEntry.title })), contextualEntry.content && (_jsx(_Fragment, { children: isString(contextualEntry.content) ? (_jsx(\"div\", { className: \"virtual-assistant__contextual-support__text\", children: contextualEntry.content })) : (_jsx(MarkdownTextViewer, { className: \"virtual-assistant__contextual-support__markdown-text\", value: contextualEntry.content })) })), contextualEntry.related.length && (_jsxs(\"div\", { className: \"virtual-assistant__contextual-support__relevant-entries\", children: [_jsxs(\"div\", { className: \"virtual-assistant__contextual-support__relevant-entries__title\", children: [\"Related entries (\", contextualEntry.related.length, \")\"] }), contextualEntry.related.map((entry) => (_jsx(VirtualAssistantDocumentationEntryViewer, { entry: entry }, entry.uuid)))] }))] })), !contextualEntry && (_jsx(BlankPanelContent, { children: _jsxs(\"div\", { className: \"virtual-assistant__panel__placeholder\", children: [_jsx(FaceLaughWinkIcon, { className: \"virtual-assistant__panel__placeholder__icon\" }), _jsx(\"div\", { className: \"virtual-assistant__panel__placeholder__message\", children: \"No contextual documentation found!\" }), _jsx(\"div\", { className: \"virtual-assistant__panel__placeholder__instruction\", children: \"Keep using the app. When contextual help is available, we will let you know!\" })] }) }))] }));\n});\nconst VirtualAssistantSearchPanel = observer(() => {\n const applicationStore = useApplicationStore();\n const searchInputRef = useRef(null);\n const assistantService = applicationStore.assistantService;\n // search text\n const searchText = assistantService.searchText;\n const debouncedSearch = useMemo(() => debounce(() => assistantService.search(), 100), [assistantService]);\n const onSearchTextChange = (event) => {\n assistantService.setSearchText(event.target.value);\n debouncedSearch();\n };\n const clearSearchText = () => {\n assistantService.resetSearch();\n assistantService.currentDocumentationEntry = undefined;\n searchInputRef.current?.focus();\n };\n const toggleSearchConfigMenu = () => assistantService.setShowSearchConfigurationMenu(!assistantService.showSearchConfigurationMenu);\n const downloadDocRegistry = () => {\n downloadFileUsingDataURI(`documentation-registry_${formatDate(new Date(Date.now()), DEFAULT_DATE_TIME_FORMAT)}.json`, JSON.stringify(applicationStore.documentationService.publishDocRegistry(), undefined, DEFAULT_TAB_SIZE), ContentType.APPLICATION_JSON);\n };\n const downloadContextualDocIndex = () => {\n downloadFileUsingDataURI(`documentation-registry_${formatDate(new Date(Date.now()), DEFAULT_DATE_TIME_FORMAT)}.json`, JSON.stringify(applicationStore.documentationService.publishContextualDocIndex(), undefined, DEFAULT_TAB_SIZE), ContentType.APPLICATION_JSON);\n };\n useEffect(() => {\n searchInputRef.current?.focus();\n }, []);\n return (_jsxs(\"div\", { className: \"virtual-assistant__search\", children: [_jsxs(\"div\", { className: \"virtual-assistant__search__header\", children: [_jsx(\"input\", { ref: searchInputRef, \n /**\n * NOTE: In the scenario where another modal is opened at the same time the assistant panel\n * is open, the focus will be stolen by the newly opened modal. In that case, we need\n * to take back the focus. The trick here is to remount the whole panel (modal/popover)\n * by refreshing the `key` prop of the panel. This will cause `mui` to recompute the\n * focus-trap and allow the input field to be selectable again. Basically, we are stealing\n * back the focus for the assistant.\n *\n * However, the caveat is that this will cause the component states, such as scroll positions,\n * to be reset as such, we need to do this really sparingly. In fact, the only\n * scenario where we need to do this is when a new modal is opened when the assistant panel\n * is already opened. Basically, Other scenarios, such as when the assistant is opened after the modal\n * is opened seem to pose no issue.\n */\n onClick: () => {\n if (\n // only when there are dialogs being opened\n // NOTE: this seems rather hacky, but querying by role is the least\n // vendor-dependent approach we can think of at the moment\n document.querySelectorAll('[role=\"dialog\"]').length &&\n // only when the focus is not already with the input field\n // this means the focus is being stolen from the assistant because\n // the newly opened modal is opened more recently than the assistant\n //\n // once the focus has been gained by the assistant\n // we will not need to do this anymore\n searchInputRef.current !== document.activeElement) {\n assistantService.refreshPanelRendering();\n }\n }, className: clsx('virtual-assistant__search__input input--dark', {\n 'virtual-assistant__search__input--searching': searchText,\n }), spellCheck: false, onChange: onSearchTextChange, value: searchText, placeholder: \"Ask me a question\" }), searchText && (_jsx(\"div\", { className: \"virtual-assistant__search__input__search__count\", children: assistantService.searchResults.length +\n (assistantService.isOverSearchLimit ? '+' : '') })), _jsx(\"button\", { className: clsx('virtual-assistant__search__input__config__trigger', {\n 'virtual-assistant__search__input__config__trigger--toggled': assistantService.showSearchConfigurationMenu,\n 'virtual-assistant__search__input__config__trigger--active': assistantService.searchConfigurationState.isAdvancedSearchActive,\n }), tabIndex: -1, onClick: toggleSearchConfigMenu, title: `${assistantService.searchConfigurationState.isAdvancedSearchActive\n ? 'Advanced search is currently active\\n'\n : ''}Click to toggle search config menu`, children: _jsx(CogIcon, {}) }), !searchText ? (_jsx(\"div\", { className: \"virtual-assistant__search__input__search__icon\", children: _jsx(SearchIcon, {}) })) : (_jsx(\"button\", { className: \"virtual-assistant__search__input__clear-btn\", tabIndex: -1, onClick: clearSearchText, title: \"Clear\", children: _jsx(TimesIcon, {}) }))] }), _jsxs(\"div\", { className: \"virtual-assistant__search__content\", children: [_jsx(PanelLoadingIndicator, { isLoading: assistantService.searchState.isInProgress }), _jsx(\"div\", { className: clsx('virtual-assistant__search__input__config__panel', {\n 'virtual-assistant__search__input__config__panel--toggled': assistantService.showSearchConfigurationMenu,\n }), children: _jsxs(\"div\", { className: \"virtual-assistant__search__input__advanced-config__panel\", children: [_jsxs(\"div\", { className: \"virtual-assistant__search__input__advanced-config__panel__header__label\", children: [\"search config\", applicationStore.documentationService.hasDocEntry(LEGEND_APPLICATION_DOCUMENTATION_KEY.QUESTION_HOW_TO_USE_ADVANCED_SEARCH_SYNTAX) && (_jsx(\"div\", { onClick: () => assistantService.openDocumentationEntryLink(LEGEND_APPLICATION_DOCUMENTATION_KEY.QUESTION_HOW_TO_USE_ADVANCED_SEARCH_SYNTAX), title: \"Click to see documentation\", className: \"virtual-assistant__search__input__advanced-config__panel__header__label__hint\", children: _jsx(QuestionCircleIcon, {}) }))] }), _jsx(\"div\", { children: _jsx(BaseRadioGroup, { value: assistantService.searchConfigurationState.currentMode, onChange: (event) => {\n const searchMode = event.target\n .value;\n assistantService.searchConfigurationState.setCurrentMode(searchMode);\n }, row: false, options: [\n ADVANCED_FUZZY_SEARCH_MODE.STANDARD,\n ADVANCED_FUZZY_SEARCH_MODE.INCLUDE,\n ADVANCED_FUZZY_SEARCH_MODE.EXACT,\n ADVANCED_FUZZY_SEARCH_MODE.INVERSE,\n ], size: 1 }) })] }) }), assistantService.currentDocumentationEntry && (_jsx(\"div\", { className: \"virtual-assistant__search__results\", children: _jsx(VirtualAssistantDocumentationEntryViewer, { entry: assistantService.currentDocumentationEntry }, assistantService.currentDocumentationEntry.uuid) })), !assistantService.currentDocumentationEntry && (_jsxs(_Fragment, { children: [Boolean(assistantService.searchResults.length) && (_jsx(\"div\", { className: \"virtual-assistant__search__results\", children: assistantService.searchResults.map((result) => (_jsx(VirtualAssistantDocumentationEntryViewer, { entry: result }, result.uuid))) })), searchText && !assistantService.searchResults.length && (_jsx(BlankPanelContent, { children: _jsxs(\"div\", { className: \"virtual-assistant__panel__placeholder\", children: [_jsx(FaceSadTearIcon, { className: \"virtual-assistant__panel__placeholder__icon\" }), _jsx(\"div\", { className: \"virtual-assistant__panel__placeholder__message\", children: \"No result...\" })] }) })), !searchText && !assistantService.searchResults.length && (_jsx(ContextMenu, { className: \"virtual-assistant__character__container\", menuProps: {\n elevation: 7,\n classes: {\n root: 'virtual-assistant__context-menu',\n },\n }, content: _jsxs(MenuContent, { children: [_jsx(MenuContentItem, { onClick: downloadDocRegistry, children: \"Download documentation registry\" }), _jsx(MenuContentItem, { onClick: downloadContextualDocIndex, children: \"Download contextual documentation mapping\" })] }), children: _jsxs(\"div\", { className: \"virtual-assistant__character\", children: [_jsxs(\"div\", { className: \"virtual-assistant__character__figure\", children: [_jsx(WizardHatIcon, { className: \"virtual-assistant__character__hat\" }), _jsx(SunglassesIcon, { className: \"virtual-assistant__character__glasses\" }), _jsx(BeardIcon, { className: \"virtual-assistant__character__beard\" })] }), _jsx(\"div\", { className: \"virtual-assistant__character__greeting\", children: WIZARD_GREETING }), _jsx(\"div\", { className: \"virtual-assistant__character__question\", children: \"How can I help today?\" })] }) }))] }))] })] }));\n});\nconst VirtualAssistantPanel = observer((props) => {\n const { triggerElement } = props;\n const applicationStore = useApplicationStore();\n const assistantService = applicationStore.assistantService;\n const currentContextualDocumentationEntry = assistantService.currentContextualDocumentationEntry;\n const selectedTab = assistantService.selectedTab;\n const extraViewConfigurations = applicationStore.pluginManager\n .getApplicationPlugins()\n .flatMap((plugin) => plugin.getExtraVirtualAssistantViewConfigurations?.() ?? []);\n const currentExtensionView = extraViewConfigurations.find((config) => config.key === selectedTab);\n const toggleMaximize = () => assistantService.setIsPanelMaximized(!assistantService.isPanelMaximized);\n const selectSearch = () => assistantService.setSelectedTab(VIRTUAL_ASSISTANT_TAB.SEARCH);\n const selectContextualDoc = () => assistantService.setSelectedTab(VIRTUAL_ASSISTANT_TAB.CONTEXTUAL_SUPPORT);\n const closeAssistantPanel = () => assistantService.setIsOpen(false);\n return (\n /**\n * The most appropriate component to use is `Popper`\n * as it does not block click-away\n * See https://mui.com/material-ui/react-popper/\n *\n * However, the caveat is that in the implementation of mui Popper\n * focus trap is not supported. As such, we could end up in a situation\n * where the assistant input fields will not be focusable\n * when another modal is being opened, as that newly opened modal will\n * **steal** the focus\n *\n * See https://github.com/finos/legend-studio/issues/1255\n * See https://mui.com/material-ui/react-modal/#focus-trap\n * See https://github.com/mui/material-ui/issues/17497\n */\n _jsx(BasePopover, { open: assistantService.isOpen, className: \"virtual-assistant__panel__container\", anchorEl: triggerElement, \n // we need to get rid of the backdrop and the click-away trap\n // to make this popover behave like a popper\n // NOTE: we will cancel the effect of click-away trap using CSS\n hideBackdrop: true, PaperProps: {\n classes: { root: 'virtual-assistant__panel__container__root' },\n }, \n // allow other modals to take the focus from the virtual assistant\n disableEnforceFocus: true, \n // NOTE: make sure the assistant is always fully displayed (not cropped)\n anchorOrigin: {\n vertical: 'bottom',\n horizontal: 'left',\n }, transformOrigin: {\n vertical: 'bottom',\n horizontal: 'right',\n }, children: _jsxs(\"div\", { className: clsx('virtual-assistant__panel', {\n 'virtual-assistant__panel--maximized': assistantService.isPanelMaximized,\n }), \n // NOTE: here we block `tabbing` (to move focus). This is to counter the effect of\n // `disableEnforceFocus={true}` set in the assistant panel popover\n // this is the poor-man focus trap for the assistant to ensure\n // that we don't leak focus tab down to other parts of the app\n //\n // Especially, due to the hack we do to compete for focus when another modal\n // is opened, we need to do this to avoid leaking of focus to components\n // beneath the modal via assistant\n //\n // setting `tabIndex={0}` is a hack to make this DOM node focusable\n // and hence, we could trap the focus here using `onKeyDown`\n // See https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex\n tabIndex: 0, onKeyDown: (event) => {\n if (event.key === 'Tab') {\n event.preventDefault();\n event.stopPropagation();\n }\n }, children: [_jsxs(\"div\", { className: \"virtual-assistant__panel__header\", children: [_jsxs(\"div\", { className: \"virtual-assistant__panel__header__tabs\", children: [_jsx(\"div\", { className: clsx('virtual-assistant__panel__header__tab', {\n 'virtual-assistant__panel__header__tab--active': selectedTab === VIRTUAL_ASSISTANT_TAB.SEARCH,\n }), onClick: selectSearch, title: \"Search\", children: _jsx(\"div\", { className: \"virtual-assistant__panel__header__tab__content\", children: _jsx(SearchIcon, {}) }) }), _jsx(\"div\", { className: clsx('virtual-assistant__panel__header__tab', {\n 'virtual-assistant__panel__header__tab--active': selectedTab === VIRTUAL_ASSISTANT_TAB.CONTEXTUAL_SUPPORT,\n }), onClick: selectContextualDoc, title: \"Contextual Support\", children: _jsxs(\"div\", { className: \"virtual-assistant__panel__header__tab__content\", children: [_jsx(MapMarkerIcon, {}), currentContextualDocumentationEntry && (_jsx(\"div\", { className: \"virtual-assistant__panel__header__tab__indicator\", title: \"Contextual support available\" }))] }) }), extraViewConfigurations.map((config) => (_jsx(\"div\", { className: clsx('virtual-assistant__panel__header__tab', {\n 'virtual-assistant__panel__header__tab--active': selectedTab === config.key,\n }), onClick: () => {\n assistantService.setSelectedTab(config.key);\n if (config.autoExpandOnOpen) {\n assistantService.setIsPanelMaximized(true);\n }\n }, title: config.title, children: _jsx(\"div\", { className: \"virtual-assistant__panel__header__tab__content\", children: config.icon ?? _jsx(QuestionCircleIcon, {}) }) }, config.key)))] }), _jsxs(\"div\", { className: \"virtual-assistant__panel__header__actions\", children: [_jsx(\"button\", { className: \"virtual-assistant__panel__header__action\", tabIndex: -1, onClick: toggleMaximize, title: assistantService.isPanelMaximized ? 'Minimize' : 'Maximize', children: assistantService.isPanelMaximized ? (_jsx(EmptyWindowRestoreIcon, {})) : (_jsx(WindowMaximizeIcon, {})) }), _jsx(\"button\", { className: \"virtual-assistant__panel__header__action\", tabIndex: -1, onClick: closeAssistantPanel, title: \"Close\", children: _jsx(CloseIcon, { className: \"virtual-assistant__panel__icon__close\" }) })] })] }), _jsxs(\"div\", { className: \"virtual-assistant__panel__content\", children: [selectedTab === VIRTUAL_ASSISTANT_TAB.SEARCH && (_jsx(VirtualAssistantSearchPanel, {})), selectedTab === VIRTUAL_ASSISTANT_TAB.CONTEXTUAL_SUPPORT && (_jsx(VirtualAssistantContextualSupportPanel, {})), currentExtensionView?.renderer()] })] }) }, assistantService.panelRenderingKey));\n});\nexport const VirtualAssistant = observer(() => {\n const [isDragging, setIsDragging] = useState(false);\n const [_key, _setKey] = useState(uuid());\n const applicationStore = useApplicationStore();\n const assistantRef = useRef(null);\n const assistantService = applicationStore.assistantService;\n const currentContextualDocumentationEntry = assistantService.currentContextualDocumentationEntry;\n const toggleAssistantPanel = () => {\n const newVal = !assistantService.isOpen;\n // open the contextual help tab when contextual help is available\n if (newVal && currentContextualDocumentationEntry) {\n assistantService.setSelectedTab(VIRTUAL_ASSISTANT_TAB.CONTEXTUAL_SUPPORT);\n }\n assistantService.setIsOpen(!assistantService.isOpen);\n };\n const hideAssistant = () => applicationStore.assistantService.hideAssistant();\n const resetPosition = () => {\n // close the panel since\n assistantService.setIsOpen(false);\n _setKey(uuid());\n };\n // drag and drop\n const onDragEnd = () => setIsDragging(false);\n const onDragStart = () => setIsDragging(true);\n useEffect(() => {\n if (assistantService.isHidden) {\n // reset to default position when we hide the assistant\n // so that when we open it the position is reset\n _setKey(uuid());\n }\n }, [assistantService.isHidden]);\n return (_jsx(Draggable\n // this is a trick so we could reset the default position of the assistant\n // See https://github.com/react-grid-layout/react-draggable/issues/214#issuecomment-270021423\n , { \n // make sure we cannot drag and drop outside of the screen\n bounds: \"parent\", onStart: onDragStart, onStop: onDragEnd, \n // Avoid using deprecated findDOMNode method to rid of React warning\n // See https://github.com/react-grid-layout/react-draggable/issues/749\n nodeRef: assistantRef, \n // limit the dnd trigger to only the drag handle\n handle: \".virtual-assistant__station__drag-handle\", children: _jsxs(\"div\", { className: \"virtual-assistant\", \n // NOTE: we have to set the `ref` at this level so even when the assistant is hidden\n // the element is still in the DOM so when we programmatically show the assistant panel\n // the anchor is available in time\n ref: assistantRef, children: [_jsxs(\"div\", { className: clsx('virtual-assistant__station', {\n 'virtual-assistant__station--hidden': assistantService.isHidden,\n 'virtual-assistant__station--active': Boolean(currentContextualDocumentationEntry),\n }), children: [_jsx(\"button\", { className: \"virtual-assistant__station__hide-button\", title: \"Hide assistant\", onClick: () => {\n applicationStore.assistantService.toggleAssistant();\n }, children: _jsx(MinusCircleIcon, {}) }), _jsx(\"button\", { className: \"virtual-assistant__station__trigger\", tabIndex: -1, onClick: toggleAssistantPanel, title: assistantService.isOpen\n ? `Click to close assistant panel`\n : `${currentContextualDocumentationEntry\n ? 'Contextual support available.\\n'\n : ''}Click to open Assistant...`, children: _jsxs(\"div\", { className: \"virtual-assistant__station__character\", children: [_jsx(WizardHatIcon, { className: \"virtual-assistant__station__character__hat\" }), _jsx(SunglassesIcon, { className: \"virtual-assistant__station__character__glasses\" }), _jsx(BeardIcon, { className: \"virtual-assistant__station__character__beard\" })] }) }), _jsx(\"div\", { className: \"virtual-assistant__station__label\", onClick: toggleAssistantPanel, children: \"Assistant\" }), _jsx(ContextMenu, { className: clsx('virtual-assistant__station__drag-handle', {\n 'virtual-assistant__station__drag-handle--dragging': isDragging,\n }), menuProps: {\n elevation: 7,\n classes: {\n root: 'virtual-assistant__context-menu',\n },\n }, content: _jsxs(MenuContent, { children: [_jsx(MenuContentItem, { onClick: resetPosition, children: \"Reset Position\" }), _jsx(MenuContentItem, { onClick: hideAssistant, children: \"Hide Assistant\" })] }), children: _jsx(\"div\", { className: \"virtual-assistant__station__drag-handle__content\", title: isDragging ? undefined : 'Grab to drag assistant', children: _jsx(ThinVerticalDragHandleIcon, {}) }) })] }, currentContextualDocumentationEntry?.uuid ?? ''), !isDragging &&\n assistantService.isOpen &&\n !assistantService.isHidden &&\n assistantRef.current && (_jsx(VirtualAssistantPanel, { triggerElement: assistantRef.current }))] }) }, _key));\n});\n//# sourceMappingURL=VirtualAssistant.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Backdrop, LegendStyleProvider, Portal } from '@finos/legend-art';\nimport { observer } from 'mobx-react-lite';\nimport { DndProvider } from 'react-dnd';\nimport { HTML5Backend } from 'react-dnd-html5-backend';\nimport { ActionAlert } from './ActionAlert.js';\nimport { useApplicationStore } from './ApplicationStoreProvider.js';\nimport { BlockingAlert } from './BlockingAlert.js';\nimport { NotificationManager } from './NotificationManager.js';\nimport { useEffect } from 'react';\nimport { createKeybindingsHandler, } from '@finos/legend-shared';\nimport { VirtualAssistant } from './VirtualAssistant.js';\nimport { LegendApplicationTelemetryHelper } from '../__lib__/LegendApplicationTelemetry.js';\nvar APPLICATION_COMPONENT_ELEMENT_ID;\n(function (APPLICATION_COMPONENT_ELEMENT_ID) {\n APPLICATION_COMPONENT_ELEMENT_ID[\"TOP_LEVEL_CONTAINER\"] = \"application.top-level-container\";\n APPLICATION_COMPONENT_ELEMENT_ID[\"BACKDROP_CONTAINER\"] = \"application.backdrop-container\";\n})(APPLICATION_COMPONENT_ELEMENT_ID || (APPLICATION_COMPONENT_ELEMENT_ID = {}));\nconst PLATFORM_NATIVE_KEYBOARD_SHORTCUTS = [\n 'Meta+KeyP', // Print\n 'Control+KeyP',\n 'Meta+KeyS', // Save\n 'Control+KeyS',\n 'F8', // Chrome: Developer Tools > Sources: Run or pause script\n 'F10', // Chrome: Developer Tools > Sources: Step over next function call\n 'F11', // Chrome: Developer Tools > Sources: Step into next function call\n 'Meta+Shift+KeyP', // Chrome: Developer Tools: Open Command Prompt inside developer tools\n 'Control+Backquote', // Chrome: Developer Tools: Open console\n 'Control+Shift+KeyN', // Chrome: Open Private Browsing (incognito)\n 'Control+Shift+KeyP', // Firefox: Open Private Browsing\n 'Meta+KeyB', // Firefox: Open bookmark sidebar\n 'Control+KeyB',\n 'F7', // Firefox: Caret browsing\n 'Alt+F7', // Firefox: Caret browsing (Mac)\n 'Control+Shift+KeyB',\n 'Alt+KeyZ', // Mac: special symbol\n];\nconst buildHotkeysConfiguration = (commandKeyMap, handler) => {\n const keyMap = {};\n commandKeyMap.forEach((keyCombinations, commandKey) => {\n if (keyCombinations.length) {\n keyMap[commandKey] = {\n combinations: keyCombinations,\n handler,\n };\n }\n });\n // Disable platform native keyboard shortcuts\n // NOTE: due to the order in which hotkey configuration is searched and applied,\n // we must place these after application hotkey configuration\n const PLATFORM_NATIVE_KEYBOARD_COMMAND = 'INTERNAL__PLATFORM_NATIVE_KEYBOARD_COMMAND';\n keyMap[PLATFORM_NATIVE_KEYBOARD_COMMAND] = {\n combinations: PLATFORM_NATIVE_KEYBOARD_SHORTCUTS,\n handler: (keyCombination, event) => {\n // prevent default from potentially clashing key combinations\n event.preventDefault();\n },\n };\n return keyMap;\n};\n/**\n * Some elements (e.g. <canvas>) and components that we do not control the implementation\n * might have special logic to prevent `keydown` event bubbling naturally, this\n * method forces those event to surface to the top of the app and being handled\n * by keybinding service\n */\nexport const forceDispatchKeyboardEvent = (event, applicationStore) => {\n applicationStore.layoutService\n .getElementByID(APPLICATION_COMPONENT_ELEMENT_ID.TOP_LEVEL_CONTAINER)\n ?.dispatchEvent(new KeyboardEvent(event.type, event));\n};\n/**\n * Potential location to mount backdrop on\n *\n * NOTE: we usually want the backdrop container to be the first child of its immediate parent\n * so that it properly lies under the content that we pick to show on top of the backdrop\n */\nexport const BackdropContainer = (props) => (_jsx(\"div\", { className: \"backdrop__container\", \"data-elementid\": props.elementId }));\nexport const ApplicationComponentFrameworkProvider = observer((props) => {\n const { children } = props;\n const applicationStore = useApplicationStore();\n const disableContextMenu = (event) => {\n event.stopPropagation();\n event.preventDefault();\n };\n const keyBindingMap = buildHotkeysConfiguration(applicationStore.keyboardShortcutsService.commandKeyMap, (keyCombination, event) => {\n // prevent default from potentially clashing key combinations with platform native keyboard shortcuts\n // NOTE: Though tempting since it's a good way to simplify and potentially avoid conflicts,\n // we should not call `preventDefault()` because if we have any hotkey sequence which is too short,\n // such as `r`, `a` - we risk blocking some very common interaction, i.e. user typing, or even\n // constructing longer key combinations\n if (PLATFORM_NATIVE_KEYBOARD_SHORTCUTS.includes(keyCombination)) {\n event.preventDefault();\n }\n applicationStore.keyboardShortcutsService.dispatch(keyCombination);\n });\n useEffect(() => {\n const onKeyEvent = createKeybindingsHandler(keyBindingMap);\n document.addEventListener('keydown', onKeyEvent);\n return () => {\n document.removeEventListener('keydown', onKeyEvent);\n };\n }, [keyBindingMap]);\n /**\n * Keep track of when the application usage is interrupted (e.g. when the app window/tab is not in focus),\n * since for certain platform, background contexts are de-prioritized, given less resources, and hence, would\n * run less performantly; and might require particular handlings.\n *\n * See https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API#policies_in_place_to_aid_background_page_performance\n * See https://plumbr.io/blog/performance-blog/background-tabs-in-browser-load-20-times-slower\n */\n useEffect(() => {\n const onVisibilityChange = () => {\n if (document.hidden) {\n LegendApplicationTelemetryHelper.logEvent_ApplicationUsageInterrupted(applicationStore.telemetryService);\n applicationStore.timeService.recordUsageInterruption();\n }\n };\n document.addEventListener('visibilitychange', onVisibilityChange);\n return () => {\n document.removeEventListener('visibilitychange', onVisibilityChange);\n };\n }, [applicationStore]);\n return (_jsxs(LegendStyleProvider, { children: [_jsx(BlockingAlert, {}), _jsx(ActionAlert, {}), _jsx(NotificationManager, {}), _jsx(VirtualAssistant, {}), applicationStore.layoutService.showBackdrop && (\n // We use <Portal> here to insert backdrop into different parts of the app\n // as backdrop relies heavily on z-index mechanism so its location in the DOM\n // really matters.\n // For example, the default location of the backdrop works fine for most cases\n // but if we want to use the backdrop for elements within modal dialogs, we would\n // need to mount the backdrop at a different location\n _jsx(Portal, { container: applicationStore.layoutService.getElementByID(applicationStore.layoutService.backdropContainerElementID ??\n APPLICATION_COMPONENT_ELEMENT_ID.BACKDROP_CONTAINER) ?? null, children: _jsx(Backdrop, { className: \"backdrop\", open: applicationStore.layoutService.showBackdrop }) })), _jsx(DndProvider, { backend: HTML5Backend, children: _jsxs(\"div\", { style: { height: '100%', width: '100%' }, \"data-elementid\": APPLICATION_COMPONENT_ELEMENT_ID.TOP_LEVEL_CONTAINER, \n // Disable global context menu so that only places in the app that supports context-menu will be effective\n onContextMenu: disableContextMenu, children: [_jsx(BackdropContainer, { elementId: APPLICATION_COMPONENT_ELEMENT_ID.BACKDROP_CONTAINER }), children] }) })] }));\n});\nexport const SimpleApplicationComponentFrameworkProvider = observer((props) => {\n const { children } = props;\n const applicationStore = useApplicationStore();\n const disableContextMenu = (event) => {\n event.stopPropagation();\n event.preventDefault();\n };\n const keyBindingMap = buildHotkeysConfiguration(applicationStore.keyboardShortcutsService.commandKeyMap, (keyCombination, event) => {\n // prevent default from potentially clashing key combinations with platform native keyboard shortcuts\n // NOTE: Though tempting since it's a good way to simplify and potentially avoid conflicts,\n // we should not call `preventDefault()` because if we have any hotkey sequence which is too short,\n // such as `r`, `a` - we risk blocking some very common interaction, i.e. user typing, or even\n // constructing longer key combinations\n if (PLATFORM_NATIVE_KEYBOARD_SHORTCUTS.includes(keyCombination)) {\n event.preventDefault();\n }\n applicationStore.keyboardShortcutsService.dispatch(keyCombination);\n });\n useEffect(() => {\n const onKeyEvent = createKeybindingsHandler(keyBindingMap);\n document.addEventListener('keydown', onKeyEvent);\n return () => {\n document.removeEventListener('keydown', onKeyEvent);\n };\n }, [keyBindingMap]);\n return (_jsx(LegendStyleProvider, { children: _jsx(DndProvider, { backend: HTML5Backend, children: _jsxs(\"div\", { style: { height: '100%', width: '100%' }, \"data-elementid\": APPLICATION_COMPONENT_ELEMENT_ID.TOP_LEVEL_CONTAINER, \n // Disable global context menu so that only places in the app that supports context-menu will be effective\n onContextMenu: disableContextMenu, children: [_jsx(BackdropContainer, { elementId: APPLICATION_COMPONENT_ELEMENT_ID.BACKDROP_CONTAINER }), children] }) }) }));\n});\n//# sourceMappingURL=ApplicationComponentFrameworkProvider.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Terminal as XTermTerminal, } from 'xterm';\nimport { FitAddon as XTermFitAddon } from 'xterm-addon-fit';\nimport { SearchAddon as XTermSearchAddon, } from 'xterm-addon-search';\nimport { Unicode11Addon as XTermUnicode11Addon } from 'xterm-addon-unicode11';\nimport { WebglAddon as XTermWebglAddon } from 'xterm-addon-webgl';\nimport { DEFAULT_MONOSPACED_FONT_FAMILY, DEFAULT_TAB_SIZE, } from '../ApplicationConfig.js';\nimport { Terminal, DISPLAY_ANSI_ESCAPE, ANSI_moveCursor, } from './Terminal.js';\nimport { ActionState, guaranteeNonNullable, IllegalStateError, isMatchingKeyCombination, LogEvent, noop, prettyCONSTName, uniqBy, } from '@finos/legend-shared';\nimport { APPLICATION_EVENT } from '../../__lib__/LegendApplicationEvent.js';\nimport { forceDispatchKeyboardEvent } from '../../components/ApplicationComponentFrameworkProvider.js';\nconst LEGEND_XTERM_THEME = {\n foreground: '#cccccc',\n background: '#1e1e1e',\n cursor: '#cccccc',\n /** The accent color of the cursor (fg color for a block cursor) */\n // cursorAccent?: string;\n /** The selection background color when the terminal does not have focus (can be transparent) */\n // selectionInactiveBackground?: string;\n selectionBackground: '#264f78', // blue\n black: '#000000',\n red: '#cd3131',\n green: '#0dbc79',\n yellow: '#e5e510',\n blue: '#2472c8',\n magenta: '#bc3fbc',\n cyan: '#11a8cd',\n white: '#e5e5e5',\n brightBlack: '#666666',\n brightRed: '#f14c4c',\n brightGreen: '#23d18b',\n brightYellow: '#f5f543',\n brightBlue: '#3b8eea',\n brightMagenta: '#d670d6',\n brightCyan: '#29b8db',\n brightWhite: '#e5e5e5',\n};\nconst LEGEND_XTERM_SEARCH_THEME = {\n matchOverviewRuler: '#d186167e',\n activeMatchColorOverviewRuler: '#A0A0A0CC',\n matchBackground: '#62331c',\n activeMatchBackground: '#515C6A',\n};\n// robot acsii art\n// See https://asciiartist.com/ascii-art-micro-robot/\nconst getHelpCommandContent = (commandRegistry) => `\n${DISPLAY_ANSI_ESCAPE.BRIGHT_BLACK}+-------------------------------------------------------+${DISPLAY_ANSI_ESCAPE.RESET}\n${DISPLAY_ANSI_ESCAPE.BRIGHT_BLACK}|${DISPLAY_ANSI_ESCAPE.RESET} ${DISPLAY_ANSI_ESCAPE.BRIGHT_GREEN}[@@]${DISPLAY_ANSI_ESCAPE.RESET} \"Hi! Welcome to the HELP menu of Pure IDE\" ${DISPLAY_ANSI_ESCAPE.BRIGHT_BLACK}|${DISPLAY_ANSI_ESCAPE.RESET}\n${DISPLAY_ANSI_ESCAPE.BRIGHT_BLACK}|${DISPLAY_ANSI_ESCAPE.RESET} ${DISPLAY_ANSI_ESCAPE.BRIGHT_GREEN}/|__|\\\\${DISPLAY_ANSI_ESCAPE.RESET} ${DISPLAY_ANSI_ESCAPE.BRIGHT_BLACK}|${DISPLAY_ANSI_ESCAPE.RESET}\n${DISPLAY_ANSI_ESCAPE.BRIGHT_BLACK}+--${DISPLAY_ANSI_ESCAPE.RESET} ${DISPLAY_ANSI_ESCAPE.BRIGHT_GREEN}d b${DISPLAY_ANSI_ESCAPE.RESET} ${DISPLAY_ANSI_ESCAPE.BRIGHT_BLACK}-----------------------------------------------+${DISPLAY_ANSI_ESCAPE.RESET}\n\nFollowing is the list of supported commands:\n\n${uniqBy(Array.from(commandRegistry.values()), (config) => config.command)\n .map((config) => `${DISPLAY_ANSI_ESCAPE.BRIGHT_GREEN}${config.command.padEnd(30)}${DISPLAY_ANSI_ESCAPE.RESET}${config.description}${config.aliases?.length\n ? `\\n${''.padEnd(30)}Aliases: ${config.aliases.join(', ')}`\n : ''}\\n${''.padEnd(30)}Usage: ${DISPLAY_ANSI_ESCAPE.DIM}${config.usage}${DISPLAY_ANSI_ESCAPE.RESET}`)\n .join('\\n')}`;\nconst getCommonANSIEscapeSequencesForStyling = () => `\nCommon ANSI Escape Sequences for Styling:\n\n${Object.entries(DISPLAY_ANSI_ESCAPE)\n .map(([key, value]) => `${value}${prettyCONSTName(key).padEnd(20)}${DISPLAY_ANSI_ESCAPE.RESET\n// NOTE: since these are recommended ANSI escape sequences which can be used\n// by users in strings input in Pure IDE, they have to be Unicode escape, if we send\n// the original hexadecimal escape as part of the string, some string escape handling\n// in Pure seems to escape the leading slash of the ANSI escape sequence \\x1B; however\n// this is not the case of the escape sequence for Unicode, \\u001b hence our logic here\n} ${value.replace('\\x1b', '\\\\u001b')}`)\n .join('\\n')}`;\nconst DEFAULT_USER = 'purist';\nconst DEFAULT_COMMAND_HEADER = `\n${DISPLAY_ANSI_ESCAPE.BOLD}${DISPLAY_ANSI_ESCAPE.BRIGHT_BLUE}$${DEFAULT_USER}${DISPLAY_ANSI_ESCAPE.RESET}\n${DISPLAY_ANSI_ESCAPE.BOLD}${DISPLAY_ANSI_ESCAPE.MAGENTA}\\u276f${DISPLAY_ANSI_ESCAPE.RESET} `;\nconst COMMAND_START = '\\u276f ';\n/**\n * Custom link provider for xterm. As the weblink addon provided by xterm\n * only supports URLs, not any arbitrary patterns.\n * See https://github.com/xtermjs/xterm.js/tree/master/addons/addon-web-links\n *\n * Extracted code from https://github.com/LabhanshAgrawal/xterm-link-provider\n */\nclass RegexLinkProvider {\n terminal;\n regex;\n handler;\n constructor(terminal, regex, handler) {\n this.terminal = terminal;\n this.regex = regex;\n this.handler = handler;\n }\n provideLinks(lineNumber, callback) {\n const links = this.computeLink(lineNumber).map((link) => ({\n range: link.range,\n text: link.text,\n activate: this.handler,\n }));\n callback(links);\n }\n computeLink(lineNumber) {\n const [line, startLineIndex] = this.translateBufferLineToStringWithWrap(lineNumber - 1);\n const rex = new RegExp(this.regex.source, `${this.regex.flags || ''}g`);\n let match;\n let stringIndex = -1;\n const result = [];\n while ((match = rex.exec(line)) !== null) {\n const text = match[0]; // match_index=0, i.e. get the full match, not a particular group in the regex pattern\n if (!text) {\n // something matched but does not comply with the given match_index=0\n // since this is most likely a bug the regex itself we simply do nothing here\n break;\n }\n // Get index, match.index is for the outer match which includes negated chars\n // therefore we cannot use match.index directly, instead we search the position\n // of the match group in text again\n // also correct regex and string search offsets for the next loop run\n stringIndex = line.indexOf(text, stringIndex + 1);\n rex.lastIndex = stringIndex + text.length;\n if (stringIndex < 0) {\n // invalid stringIndex (should not have happened)\n break;\n }\n result.push({\n text,\n range: {\n start: this.stringIndexToBufferPosition(stringIndex, startLineIndex, false),\n end: this.stringIndexToBufferPosition(stringIndex + text.length - 1, startLineIndex, true),\n },\n });\n }\n return result;\n }\n /**\n * Given a line, walk upward or downward to get all wrapped line that includes the current line\n * Make sure matching accounts for text content split by wrapping.\n */\n translateBufferLineToStringWithWrap(lineIndex) {\n let lineString = '';\n let lineWrapsToNext;\n let prevLinesToWrap;\n do {\n const line = this.terminal.buffer.active.getLine(lineIndex);\n if (!line) {\n break;\n }\n if (line.isWrapped) {\n lineIndex--;\n }\n prevLinesToWrap = line.isWrapped;\n } while (prevLinesToWrap);\n const startLineIndex = lineIndex;\n do {\n const nextLine = this.terminal.buffer.active.getLine(lineIndex + 1);\n lineWrapsToNext = nextLine ? nextLine.isWrapped : false;\n const line = this.terminal.buffer.active.getLine(lineIndex);\n if (!line) {\n break;\n }\n lineString += line\n .translateToString(true)\n .substring(0, this.terminal.cols);\n lineIndex++;\n } while (lineWrapsToNext);\n return [lineString, startLineIndex];\n }\n stringIndexToBufferPosition(stringIndex, lineIndex, reportLastCell) {\n const cell = this.terminal.buffer.active.getNullCell();\n while (stringIndex) {\n const line = this.terminal.buffer.active.getLine(lineIndex);\n if (!line) {\n return { x: 0, y: 0 };\n }\n const length = line.length;\n let i = 0;\n while (i < length) {\n line.getCell(i, cell);\n stringIndex -= cell.getChars().length;\n if (stringIndex < 0) {\n return {\n x: i + (reportLastCell ? cell.getWidth() : 1),\n y: lineIndex + 1,\n };\n }\n i += cell.getWidth();\n }\n lineIndex++;\n }\n return { x: 1, y: lineIndex + 1 };\n }\n}\nexport class XTerm extends Terminal {\n instance;\n resizer;\n renderer;\n searcher;\n linkProvider;\n _TEMPORARY__onKeyListener;\n _TEMPORARY__onDataListener;\n command = '';\n commandHistory = [];\n currentCommandSearchString = '';\n commandHistoryNavigationIdx = undefined;\n isRunningCommand = false;\n setupState = ActionState.create();\n constructor(applicationStore) {\n super(applicationStore);\n this.instance = new XTermTerminal({\n allowProposedApi: true,\n fontSize: 12,\n letterSpacing: 2,\n fontWeight: 400,\n fontWeightBold: 700,\n fontFamily: `\"${DEFAULT_MONOSPACED_FONT_FAMILY}\", Menlo, Consolas, monospace`,\n tabStopWidth: DEFAULT_TAB_SIZE,\n theme: LEGEND_XTERM_THEME,\n overviewRulerWidth: 14, // 14px\n scrollback: 100000, // buffer a substantial content length\n convertEol: true, // treat \\n as new line\n // this is needed so we can control the cursor programmatically using escape sequences\n scrollOnUserInput: false,\n });\n this.resizer = new XTermFitAddon();\n this.searcher = new XTermSearchAddon();\n this.renderer = new XTermWebglAddon();\n }\n setup(configuration) {\n if (this.setupState.hasCompleted) {\n throw new IllegalStateError(`Terminal is already set up`);\n }\n this.setupState.complete();\n // Handling context loss: The browser may drop WebGL contexts for various reasons like OOM or after the system has been suspended.\n // An easy, but suboptimal way, to handle this is by disposing of WebglAddon when the `webglcontextlost` event fires\n // NOTE: we don't really have a resilient way to fallback right now, hopefully, the fallback is to render in DOM\n this.renderer.onContextLoss(() => {\n this.renderer.dispose();\n });\n this.instance.loadAddon(this.resizer);\n this.instance.loadAddon(this.searcher);\n this.instance.loadAddon(this.renderer);\n this.instance.loadAddon(new XTermUnicode11Addon());\n this.instance.unicode.activeVersion = '11';\n // NOTE: since we render the terminal using webgl/canvas, event is not bubbled\n // naturally through the DOM tree, we have to manually force this\n this.instance.attachCustomKeyEventHandler((event) => {\n // NOTE: this is a cheap way to handle hotkey, but this is really the only\n // hotkey we want to support at local scope of the terminal\n // also, since here we have prevent default and stop propagation, we have to do\n // this here instead at in `onKey` handler\n if (isMatchingKeyCombination(event, 'Control+KeyF') ||\n isMatchingKeyCombination(event, 'Meta+KeyF')) {\n // prevent default so as to not trigger browser platform search command\n event.preventDefault();\n event.stopPropagation();\n this.searchConfig.focus();\n return false;\n }\n else if (\n // NOTE: by default Ctrl+C gets sent to the shell as you wouldn't be able to use bash otherwise.\n // We need this special handling here for normal copy behavior on Windows.\n // Paste (Ctrl+V) not working on Windows could also be due to the same reason, so we would not\n // manually handle that using `xterm.onKey` neither\n // See https://github.com/xtermjs/xterm.js/issues/1868\n // See https://github.com/microsoft/vscode/issues/6451\n (isMatchingKeyCombination(event, 'Control+KeyC') &&\n this.instance.hasSelection()) ||\n isMatchingKeyCombination(event, 'Control+KeyV')) {\n return false;\n }\n return true; // return true to indicate the event should still be handled by xterm\n });\n if (configuration?.webLinkProvider) {\n this.linkProvider = this.instance.registerLinkProvider(new RegexLinkProvider(this.instance, configuration.webLinkProvider.regex, configuration.webLinkProvider.handler));\n }\n (configuration?.commands ?? []).forEach((commandConfig) => {\n [commandConfig.command, ...(commandConfig.aliases ?? [])].forEach((command) => {\n if (!this.commandRegistry.has(command)) {\n this.commandRegistry.set(command, commandConfig);\n }\n else {\n this.applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.TERMINAL_COMMAND_CONFIGURATION_CHECK__FAILURE), `Found multiple duplicated terminal commands '${command}'`);\n }\n });\n });\n this.searcher.onDidChangeResults((result) => {\n this.setSearchResultCount(result.resultCount);\n this.setSearchCurrentResultIndex(result.resultIndex);\n });\n // NOTE: `xterm` expects to be attached to a proper terminal program which handles\n // input, since we can't do that yet, we implement a fairly basic input handling flow\n // See https://github.com/xtermjs/xterm.js/issues/617#issuecomment-288849502\n this._TEMPORARY__onKeyListener = this.instance.onKey(({ key, domEvent }) => {\n // take care of command history navigation\n if (domEvent.code === 'ArrowUp') {\n this.setCommandFromHistory(this.commandHistoryNavigationIdx !== undefined\n ? this.commandHistoryNavigationIdx + 1\n : 0);\n return;\n // reset current command in place\n }\n else if (domEvent.code === 'ArrowDown') {\n if (this.commandHistoryNavigationIdx !== undefined) {\n this.setCommandFromHistory(this.commandHistoryNavigationIdx === 0\n ? undefined\n : this.commandHistoryNavigationIdx - 1);\n }\n return;\n }\n else {\n // reset navigation history the moment any other key is pressed\n this.commandHistoryNavigationIdx = undefined;\n }\n if (domEvent.code === 'Enter') {\n // run command\n if (this.command.trim()) {\n const text = this.command;\n const [command, ...args] = text.replaceAll(/\\s+/g, ' ').split(' ');\n this.addCommandToHistory(this.command);\n if (!command) {\n return;\n }\n const matchingCommand = this.commandRegistry.get(command);\n if (!matchingCommand) {\n this.fail(`command not found: ${command}`);\n return;\n }\n if (this.isRunningCommand) {\n return;\n }\n this.isRunningCommand = true;\n matchingCommand\n .handler(args.map((arg) => arg.trim()), command, text)\n .catch(noop())\n .finally(() => {\n this.isRunningCommand = false;\n if (!this.isFlushed) {\n this.abort();\n }\n });\n }\n }\n else if (isMatchingKeyCombination(domEvent, 'Control+KeyD') ||\n // NOTE: this handling here makes the assumption that the hotkey used for copying is\n // fixed to `Control+KeyC` (for Windows), it doesn't handling a different assignment\n (isMatchingKeyCombination(domEvent, 'Control+KeyC') &&\n !this.instance.hasSelection())) {\n // abort command\n this.abort();\n }\n else if (domEvent.code === 'Backspace') {\n // Alt: jump word only, Ctrl: jump to end\n // this would apply for Delete, ArrowLeft, ArrowRight\n this.deleteFromCommand(domEvent.altKey || domEvent.ctrlKey\n ? this.computeCursorJumpMovement(true)\n : -1);\n }\n else if (domEvent.code === 'Delete') {\n this.deleteFromCommand(domEvent.altKey || domEvent.ctrlKey\n ? this.computeCursorJumpMovement(false)\n : 1);\n }\n else if (domEvent.code === 'ArrowLeft') {\n const movement = this.computeCursorMovement(domEvent.altKey || domEvent.ctrlKey\n ? this.computeCursorJumpMovement(true)\n : -1);\n this.instance.scrollLines(movement.scroll);\n this.instance.write(movement.seq);\n }\n else if (domEvent.code === 'ArrowRight') {\n const movement = this.computeCursorMovement(domEvent.altKey || domEvent.ctrlKey\n ? this.computeCursorJumpMovement(false)\n : 1);\n this.instance.scrollLines(movement.scroll);\n this.instance.write(movement.seq);\n }\n else if (\n // use key here so we absolute do not allow any characters other than these\n // being added to the input command\n key.match(/^[A-Za-z0-9!@#$%^&*()\\-_=+\"':;,.<>/?[\\]{}|\\\\~` ]$/)) {\n // commonly supported keys\n this.writeToCommand(key);\n }\n else {\n // for the rest, allow the keyboard event to be bubbled to\n // application keyboard shortcuts handler\n forceDispatchKeyboardEvent(domEvent, this.applicationStore);\n }\n });\n // this is needed to support copy-pasting\n this._TEMPORARY__onDataListener = this.instance.onData((val) => {\n // only support pasting (not meant for 1 character though) and special functions starting with special\n // ANSI escape sequence\n if (val.length > 1 && !val.startsWith('\\x1b')) {\n this.writeToCommand(val\n // remove all unsupported characters, including newline\n .replaceAll(/[^A-Za-z0-9!@#$%^&*()\\-_=+\"':;,.<>/?[\\]{}|\\\\~` ]/g, '')\n .trimEnd());\n }\n });\n }\n // NOTE: this is fairly HACKY way to detect command\n // we don't really have a better solution at the moment,\n // but we should come with more systematic way of persisting the start line of command\n // the challenge with this is due to text-reflow\n //\n // there is also a quriky known issue with text-reflow and the line with cursor\n // See https://github.com/xtermjs/xterm.js/issues/1941#issuecomment-463660633\n getCommandRange() {\n const buffer = this.instance.buffer.active;\n const cols = this.instance.cols;\n const commandText = `${COMMAND_START}${this.command}`;\n const commandFirstLine = `${COMMAND_START}${this.command.substring(0, cols - COMMAND_START.length)}${this.command.length < cols - COMMAND_START.length\n ? ' '.repeat(cols - this.command.length - COMMAND_START.length)\n : ''}`;\n let startY = 0;\n let cursorIdx = 0;\n for (let i = buffer.baseY + buffer.cursorY; i > -1; --i) {\n const line = guaranteeNonNullable(buffer.getLine(i));\n const lineText = line.translateToString();\n if (lineText === commandFirstLine) {\n startY = i;\n cursorIdx +=\n (i === buffer.baseY + buffer.cursorY ? buffer.cursorX : cols) -\n COMMAND_START.length;\n break;\n }\n else {\n cursorIdx +=\n i === buffer.baseY + buffer.cursorY ? buffer.cursorX : cols;\n }\n }\n // start line == -1 is the rare case where the command is too long and exceeds the buffer length\n // leading to incomplete command being captured\n return {\n startY,\n startX: COMMAND_START.length,\n endY: startY + (commandText.length - (commandText.length % cols)) / cols,\n endX: commandText.length % cols,\n cursorIdx,\n };\n }\n computeCursorJumpMovement(back) {\n const range = this.getCommandRange();\n let distance = undefined;\n let foundWord = false;\n // scan for the boundary of the closest word to the cursor position\n if (back) {\n for (let i = range.cursorIdx - 1; i > -1; --i) {\n const char = this.command.charAt(i);\n if (char.match(/\\w/)) {\n if (!foundWord) {\n foundWord = true;\n }\n }\n else {\n if (foundWord) {\n distance = range.cursorIdx - i - 1;\n break;\n }\n }\n }\n }\n else {\n for (let i = range.cursorIdx + 1; i < this.command.length; ++i) {\n const char = this.command.charAt(i);\n if (char.match(/\\w/)) {\n if (!foundWord) {\n foundWord = true;\n }\n }\n else {\n if (foundWord) {\n distance = i - range.cursorIdx - 1;\n break;\n }\n }\n }\n }\n if (distance === undefined) {\n distance = back ? range.cursorIdx : this.command.length - range.cursorIdx;\n }\n return back ? -distance : distance;\n }\n /**\n * Generate the ANSI escape sequence for new cursor position\n * after being moved by the the number of cells.\n *\n * @param val a number (negative means cursor move leftwards)\n * @param limit whether to limit the movement of the cursor by the command range\n * @returns cursor movement information including the ANSI escape sequence for new cursor position and scroll distance\n */\n computeCursorMovement(val, limit = true) {\n const buffer = this.instance.buffer.active;\n const cols = this.instance.cols;\n const rows = this.instance.rows;\n const range = this.getCommandRange();\n const maxDistance = limit\n ? val < 0\n ? range.cursorIdx\n : this.command.length - range.cursorIdx\n : val;\n const distance = Math.min(Math.abs(val), maxDistance);\n let newCursorX = buffer.cursorX;\n let newCursorY = buffer.cursorY;\n let abs_cursorY = buffer.baseY + buffer.cursorY;\n if (val < 0) {\n // move leftwards\n newCursorX = (cols + ((buffer.cursorX - distance) % cols)) % cols;\n newCursorY =\n buffer.cursorY -\n (distance > buffer.cursorX ? Math.ceil(distance / cols) : 0);\n abs_cursorY = newCursorY + buffer.baseY;\n newCursorY = Math.max(newCursorY, -1);\n }\n else if (val > 0) {\n // move rightwards\n newCursorX = (buffer.cursorX + distance) % cols;\n newCursorY =\n buffer.cursorY +\n (buffer.cursorX + distance >= cols\n ? Math.floor((buffer.cursorX + distance) / cols)\n : 0);\n abs_cursorY = newCursorY + buffer.baseY;\n newCursorY = Math.min(newCursorY, rows - 1);\n }\n const scroll = abs_cursorY > buffer.viewportY + rows\n ? abs_cursorY - (buffer.viewportY + rows)\n : abs_cursorY < buffer.viewportY\n ? abs_cursorY - buffer.viewportY\n : 0;\n return {\n // NOTE: currently, there is a design limitation with programmatically set the cursor using escape sequence\n // by design, the scrollback (everything above the viewport/ybase) is readonly, and most terminals work like this.\n // So for very long command that causes an overflow, one cannot set the cursor position pass the `baseY`\n // this will affect both navigation and delete/backspace behavior\n // See https://github.com/xtermjs/xterm.js/issues/4405\n seq: ANSI_moveCursor(newCursorY + 1, newCursorX + 1),\n scroll,\n };\n }\n /**\n * Write value to command with awareness of the current cursor position\n */\n writeToCommand(val) {\n const range = this.getCommandRange();\n const left = this.command.slice(0, range.cursorIdx);\n const right = this.command.slice(range.cursorIdx);\n const movement = this.computeCursorMovement(val.length, false);\n this.instance.scrollLines(movement.scroll);\n this.instance.write(val +\n right +\n // update the cursor\n movement.seq);\n this.setCommand(left + val + right);\n }\n /**\n * Remove number of characters from command with awareness of the current cursor position\n * NOTE: negative number means backward deleting (i.e. backspace)\n */\n deleteFromCommand(val) {\n const range = this.getCommandRange();\n const maxDistance = val < 0 ? range.cursorIdx : this.command.length - range.cursorIdx;\n const distance = Math.min(Math.abs(val), maxDistance);\n let left;\n let right;\n let cursorMovement;\n if (val === 0) {\n return;\n }\n else if (val < 0) {\n // remove leftwards\n left = this.command.slice(0, range.cursorIdx - distance);\n right = this.command.slice(range.cursorIdx, this.command.length);\n cursorMovement = -distance;\n }\n else {\n // remove rightwards\n left = this.command.slice(0, range.cursorIdx);\n right = this.command.slice(range.cursorIdx + distance, this.command.length);\n cursorMovement = 0;\n }\n const movement = this.computeCursorMovement(cursorMovement);\n this.instance.scrollLines(movement.scroll);\n this.instance.write(\n // reset cursor to start of command, basically here, we're rewriting the entire command\n ANSI_moveCursor(range.startY + 1, range.startX + 1) +\n left +\n right +\n // fill space to erase cells rendered from previous command\n ' '.repeat(distance) +\n // move the cursor as well\n movement.seq);\n this.setCommand(left + right);\n }\n get isSetup() {\n return this.setupState.hasCompleted;\n }\n isFocused() {\n return document.activeElement === this.instance.textarea;\n }\n mount(container) {\n if (!this.setupState.hasCompleted) {\n throw new IllegalStateError(`XTerm terminal has not been set up yet`);\n }\n this.instance.open(container);\n }\n dispose() {\n this.searcher.dispose();\n this.resizer.dispose();\n this.renderer.dispose();\n this.linkProvider?.dispose();\n this._TEMPORARY__onKeyListener?.dispose();\n this._TEMPORARY__onDataListener?.dispose();\n this.instance.dispose();\n }\n autoResize() {\n this.resizer.fit();\n }\n focus() {\n this.instance.focus();\n }\n addCommandToHistory(val) {\n // if this is the same as previous command, do not push it to the history stack\n if (val === this.commandHistory.at(0)) {\n return;\n }\n // history command is essentially a stack, so we only insert at the beginning\n this.commandHistory.unshift(val);\n }\n /**\n * This methods help update the current command to a command in history\n * stack, it does the necessary resetting and helps properly update\n * the history navigation index\n */\n setCommandFromHistory(idx) {\n const val = idx === undefined\n ? this.currentCommandSearchString\n : // NOTE: only consider commands starting with the original command\n // also note that empty string naturaly match all history command\n this.commandHistory\n .filter((command) => command.startsWith(this.currentCommandSearchString))\n .at(idx);\n if (val !== undefined) {\n let range = this.getCommandRange();\n this.instance.write(\n // reset cursor to start of command and rewrite the entire command\n ANSI_moveCursor(range.startY + 1, range.startX + 1) +\n val.padEnd(this.command.length));\n this.command = val;\n range = this.getCommandRange();\n this.instance.write(\n // reset cursor to command end\n ANSI_moveCursor(range.endY + 1, range.endX + 1));\n this.commandHistoryNavigationIdx = idx;\n }\n }\n setCommand(val) {\n this.command = val;\n this.currentCommandSearchString = val;\n this.commandHistoryNavigationIdx = undefined;\n }\n newCommand() {\n this.instance.write(DEFAULT_COMMAND_HEADER);\n this.setCommand('');\n }\n newSystemCommand(command) {\n // if another command is already running, we don't need to print the command header anymore\n // the potential pitfall here is that we could have another process prints to the\n // terminal while the command is being run. Nothing much we can do here for now.\n if (!this.isRunningCommand) {\n if (this.command) {\n this.abort();\n this.newCommand();\n }\n this.instance.write(`${DISPLAY_ANSI_ESCAPE.DIM}(system: ${command})\\n${DISPLAY_ANSI_ESCAPE.RESET}`);\n }\n }\n /**\n * Flush the terminal screen completely\n *\n * Probably due to write buffer batching, calling `reset` or `clear` on xterm terminal immediately after\n * write commands will not work. To solve this, we can either promisify the `reset` call or write the ANSI\n * reset sequence \\x1bc\n */\n flushScreen() {\n this.instance.write('\\x1bc');\n this.instance.reset();\n }\n get isFlushed() {\n const buffer = this.instance.buffer.active;\n let isLastLineEmpty = true;\n for (let i = buffer.baseY + buffer.cursorY; i > -1; --i) {\n const line = guaranteeNonNullable(buffer.getLine(i));\n const lineText = line.translateToString();\n // skip empty lines\n if (!lineText.trim()) {\n continue;\n }\n else {\n isLastLineEmpty = lineText !== COMMAND_START;\n break;\n }\n }\n return this.command === '' && isLastLineEmpty;\n }\n clear() {\n this.flushScreen();\n this.instance.scrollToTop();\n this.newCommand();\n }\n resetANSIStyling() {\n this.instance.write(DISPLAY_ANSI_ESCAPE.RESET);\n }\n showHelp() {\n this.resetANSIStyling();\n this.instance.scrollToBottom();\n if (!this.isFlushed && !this.isRunningCommand) {\n this.abort();\n }\n this.instance.write(getHelpCommandContent(this.commandRegistry));\n this.abort();\n }\n showCommonANSIEscapeSequences() {\n this.resetANSIStyling();\n this.instance.scrollToBottom();\n if (!this.isFlushed && !this.isRunningCommand) {\n this.abort();\n }\n this.instance.write(getCommonANSIEscapeSequencesForStyling());\n this.abort();\n }\n abort() {\n this.resetANSIStyling();\n this.instance.write('\\n');\n this.newCommand();\n this.instance.scrollToBottom();\n this.isRunningCommand = false;\n }\n fail(error, opts) {\n if (opts?.systemCommand) {\n this.newSystemCommand(opts.systemCommand);\n }\n this.instance.write(`\\n${error}`);\n this.abort();\n }\n output(val, opts) {\n this.resetANSIStyling();\n if ((!opts?.clear || this.preserveLog) && opts?.systemCommand) {\n this.newSystemCommand(opts.systemCommand);\n }\n if (!this.preserveLog && opts?.clear) {\n this.flushScreen();\n }\n else if (this.preserveLog || this.isRunningCommand) {\n this.instance.write('\\n');\n }\n this.instance.write(val);\n this.resetANSIStyling();\n this.instance.write('\\n');\n this.instance.scrollToBottom();\n this.newCommand();\n }\n search(val) {\n this.searcher.findNext(val, {\n decorations: LEGEND_XTERM_SEARCH_THEME,\n regex: this.searchConfig.useRegex,\n wholeWord: this.searchConfig.matchWholeWord,\n caseSensitive: this.searchConfig.matchCaseSensitive,\n // do incremental search so that the expansion will be expanded the selection if it\n // still matches the term the user typed.\n incremental: true,\n });\n }\n clearSearch() {\n this.searcher.clearDecorations();\n this.instance.clearSelection();\n this.setSearchText('');\n this.setSearchResultCount(undefined);\n this.setSearchCurrentResultIndex(undefined);\n }\n findPrevious() {\n this.searcher.findPrevious(this.searchConfig.searchText, {\n decorations: LEGEND_XTERM_SEARCH_THEME,\n regex: this.searchConfig.useRegex,\n wholeWord: this.searchConfig.matchWholeWord,\n caseSensitive: this.searchConfig.matchCaseSensitive,\n });\n }\n findNext() {\n this.searcher.findNext(this.searchConfig.searchText, {\n decorations: LEGEND_XTERM_SEARCH_THEME,\n regex: this.searchConfig.useRegex,\n wholeWord: this.searchConfig.matchWholeWord,\n caseSensitive: this.searchConfig.matchCaseSensitive,\n });\n }\n getContent() {\n const buffer = this.instance.buffer.active;\n const lines = [];\n for (let i = 0; i < buffer.length; ++i) {\n const line = guaranteeNonNullable(buffer.getLine(i));\n lines.push(line.translateToString());\n }\n return lines.join('\\n').trimEnd();\n }\n copy() {\n if (!this.instance.hasSelection()) {\n this.applicationStore.notificationService.notifyWarning(`Ther terminal has no selection to copy`);\n return;\n }\n this.applicationStore.clipboardService\n .copyTextToClipboard(this.instance.getSelection())\n .catch(this.applicationStore.alertUnhandledError);\n }\n copyAll() {\n this.applicationStore.clipboardService\n .copyTextToClipboard(this.getContent())\n .catch(this.applicationStore.alertUnhandledError);\n }\n}\n//# sourceMappingURL=XTerm.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { XTerm } from './terminal/XTerm.js';\nexport class TerminalService {\n applicationStore;\n terminal;\n constructor(applicationStore) {\n this.applicationStore = applicationStore;\n this.terminal = new XTerm(applicationStore);\n }\n}\n//# sourceMappingURL=TerminalService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { action, makeObservable, observable } from 'mobx';\nconst UNKNOWN_USER_ID = '(unknown)';\nexport class IdentityService {\n applicationStore;\n currentUser = UNKNOWN_USER_ID;\n constructor(applicationStore) {\n makeObservable(this, {\n currentUser: observable,\n setCurrentUser: action,\n });\n this.applicationStore = applicationStore;\n }\n get isAnonymous() {\n return this.currentUser === UNKNOWN_USER_ID;\n }\n setCurrentUser(val) {\n this.currentUser = val;\n }\n}\n//# sourceMappingURL=IdentityService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport var LEGEND_APPLICATION_COLOR_THEME;\n(function (LEGEND_APPLICATION_COLOR_THEME) {\n LEGEND_APPLICATION_COLOR_THEME[\"DEFAULT_DARK\"] = \"default-dark\";\n LEGEND_APPLICATION_COLOR_THEME[\"LEGACY_LIGHT\"] = \"legacy-light\";\n LEGEND_APPLICATION_COLOR_THEME[\"HIGH_CONTRAST_LIGHT\"] = \"hc-light\";\n})(LEGEND_APPLICATION_COLOR_THEME || (LEGEND_APPLICATION_COLOR_THEME = {}));\nexport const DEFAULT_DARK_COLOR_THEME = {\n name: 'Default Dark (default)',\n key: LEGEND_APPLICATION_COLOR_THEME.DEFAULT_DARK,\n TEMPORARY__globalCSSClassName: 'theme__default-dark',\n colors: {\n 'data-access-overview.chart.access-granted': '#6a9955',\n 'data-access-overview.chart.access-approved': '#007acc',\n 'data-access-overview.chart.access-requested': '#fbbc05',\n 'data-access-overview.chart.access-not-granted': '#ea4646',\n 'data-access-overview.chart.unsupported-access': '#2d2d2d',\n },\n};\nexport const LEGACY_LIGHT_COLOR_THEME = {\n name: 'Legacy Light',\n key: LEGEND_APPLICATION_COLOR_THEME.LEGACY_LIGHT,\n TEMPORARY__globalCSSClassName: 'theme__legacy-light',\n};\nexport const HIGH_CONTRAST_LIGHT_COLOR_THEME = {\n name: 'High-Contrast Light',\n key: LEGEND_APPLICATION_COLOR_THEME.HIGH_CONTRAST_LIGHT,\n TEMPORARY__globalCSSClassName: 'theme__hc-light',\n colors: {\n 'data-access-overview.chart.access-granted': '#52a31d',\n 'data-access-overview.chart.access-approved': '#3d8df5',\n 'data-access-overview.chart.access-requested': '#f5c518',\n 'data-access-overview.chart.access-not-granted': '#fa5343',\n 'data-access-overview.chart.unsupported-access': '#e1e7ea',\n },\n};\n//# sourceMappingURL=LegendApplicationColorTheme.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { guaranteeNonNullable } from '@finos/legend-shared';\nexport class LocalStorage {\n get localStorage() {\n return guaranteeNonNullable(window.localStorage, `'window.localStorage' object is not available in non-web environment`);\n }\n setItem(key, value) {\n this.localStorage.setItem(key, value);\n }\n getItem(key) {\n return this.localStorage.getItem(key);\n }\n removeItem(key) {\n this.localStorage.removeItem(key);\n }\n clear() {\n this.localStorage.clear();\n }\n hasItem(key) {\n return this.localStorage.hasItem(key);\n }\n}\n//# sourceMappingURL=ApplicationStorage.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { guaranteeIsNumber, guaranteeIsString, guaranteeIsBoolean, guaranteeIsObject, isNonNullable, returnUndefOnError, isEmpty, } from '@finos/legend-shared';\nimport { LocalStorage } from './ApplicationStorage.js';\nexport class StorageStore {\n storeIndex;\n storageService;\n data;\n constructor(storageService, storeIndex) {\n this.storageService = storageService;\n this.storeIndex = storeIndex;\n this.data = this.storageService.getIndex(this.storeIndex) ?? {};\n }\n getValue(key) {\n return this.data[key];\n }\n getNumericValue(key) {\n const value = this.getValue(key);\n return value !== undefined ? guaranteeIsNumber(value) : undefined;\n }\n getStringValue(key) {\n const value = this.getValue(key);\n return value !== undefined ? guaranteeIsString(value) : undefined;\n }\n getBooleanValue(key) {\n const value = this.getValue(key);\n return value !== undefined ? guaranteeIsBoolean(value) : undefined;\n }\n getObjectValue(key) {\n const value = this.getValue(key);\n return value !== undefined ? guaranteeIsObject(value) : undefined;\n }\n hasValue(key) {\n return isNonNullable(this.data[key]);\n }\n persistValue(key, value) {\n if (value !== undefined) {\n this.data[key] = value;\n }\n else {\n delete this.data[key];\n }\n this.storageService.updateIndex(this.storeIndex, this.data);\n }\n}\nexport class StorageService {\n applicationStore;\n storage;\n data;\n constructor(applicationStore) {\n this.applicationStore = applicationStore;\n this.storage = new LocalStorage();\n const data = this.storage.getItem(applicationStore.config.applicationStorageKey);\n this.data = data\n ? (returnUndefOnError(() => JSON.parse(data)) ?? {})\n : {};\n }\n getIndex(index) {\n return this.data[index];\n }\n updateIndex(index, value) {\n if (isEmpty(value)) {\n delete this.data[index];\n }\n else {\n this.data[index] = value;\n }\n this.storage.setItem(this.applicationStore.config.applicationStorageKey, JSON.stringify(this.data));\n }\n}\n//# sourceMappingURL=StorageService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { AbstractPlugin, } from '@finos/legend-shared';\nexport class TelemetryServicePlugin extends AbstractPlugin {\n userId;\n appName;\n appVersion;\n appEnv;\n appSessionId;\n appStartTime;\n install(pluginManager) {\n pluginManager.registerTelemetryServicePlugin(this);\n }\n setup(config) {\n this.userId = config.userId;\n this.appName = config.appName;\n this.appVersion = config.appVersion;\n this.appEnv = config.appEnv;\n this.appSessionId = config.appSessionId;\n this.appStartTime = config.appStartTime;\n }\n}\nexport class TelemetryService {\n applicationStore;\n plugins = [];\n constructor(applicationStore) {\n this.applicationStore = applicationStore;\n }\n registerPlugins(plugins) {\n this.plugins = plugins;\n }\n setup() {\n const config = {\n userId: this.applicationStore.identityService.currentUser,\n appName: this.applicationStore.config.appName,\n appEnv: this.applicationStore.config.env,\n appVersion: this.applicationStore.config.appVersion,\n appSessionId: this.applicationStore.uuid,\n appStartTime: this.applicationStore.timeService.timestamp,\n };\n this.plugins.forEach((plugin) => plugin.setup(config));\n }\n logEvent(eventType, data) {\n this.plugins.forEach((plugin) => plugin.logEvent(eventType, data));\n }\n}\n//# sourceMappingURL=TelemetryService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class TimeService {\n timestamp = Date.now();\n /**\n * Record the instances where the application usage is interrupted (e.g. when the app window/tab is not in focus),\n * this is useful to know since for certain platform, background contexts are de-prioritized, given less resources,\n * and hence, would run less performantly.\n *\n * See https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API#policies_in_place_to_aid_background_page_performance\n * See https://plumbr.io/blog/performance-blog/background-tabs-in-browser-load-20-times-slower\n *\n * This impacts certain operations such as scheduler and timer in the app, so it's useful to keep track of these here.\n */\n interruptions = [];\n recordUsageInterruption() {\n this.interruptions.push(Date.now());\n }\n finalizeTimingsRecord(stopWatch, timings) {\n const totalTime = stopWatch.elapsed;\n const startTime = stopWatch.startTime;\n const endTime = startTime + totalTime;\n const record = {\n ...(timings ?? {}),\n ...Object.fromEntries(stopWatch.records),\n total: totalTime,\n };\n // count the number of interruptions\n let numberOfInteruptions = 0;\n for (const interruption of this.interruptions) {\n if (interruption >= startTime && interruption <= endTime) {\n numberOfInteruptions++;\n }\n else if (interruption > endTime) {\n break;\n }\n }\n return numberOfInteruptions > 0\n ? { ...record, __numberOfInteruptions: numberOfInteruptions }\n : record;\n }\n}\n//# sourceMappingURL=TimeService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { LEGEND_APPLICATION_COLOR_THEME } from './LegendApplicationColorTheme.js';\nexport var LEGEND_APPLICATION_SETTING_KEY;\n(function (LEGEND_APPLICATION_SETTING_KEY) {\n LEGEND_APPLICATION_SETTING_KEY[\"COLOR_THEME\"] = \"application.layout.colorTheme\";\n})(LEGEND_APPLICATION_SETTING_KEY || (LEGEND_APPLICATION_SETTING_KEY = {}));\nexport const LEGEND_APPLICATION_SETTING_CONFIG = {\n [LEGEND_APPLICATION_SETTING_KEY.COLOR_THEME]: {\n defaultValue: LEGEND_APPLICATION_COLOR_THEME.DEFAULT_DARK,\n },\n};\n//# sourceMappingURL=LegendApplicationSetting.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { action, computed, makeObservable, observable } from 'mobx';\nimport { LEGEND_APPLICATION_SETTING_KEY } from '../__lib__/LegendApplicationSetting.js';\nimport { LogEvent, guaranteeNonNullable } from '@finos/legend-shared';\nimport { APPLICATION_EVENT } from '../__lib__/LegendApplicationEvent.js';\nimport { DEFAULT_DARK_COLOR_THEME, LEGEND_APPLICATION_COLOR_THEME, } from '../__lib__/LegendApplicationColorTheme.js';\nexport class LayoutService {\n applicationStore;\n // backdrop\n backdropContainerElementID;\n showBackdrop = false;\n // color theme\n colorThemeRegistry = new Map();\n currentColorTheme;\n constructor(applicationStore) {\n makeObservable(this, {\n currentColorTheme: observable.ref,\n TEMPORARY__isLightColorThemeEnabled: computed,\n backdropContainerElementID: observable,\n showBackdrop: observable,\n setBackdropContainerElementID: action,\n setShowBackdrop: action,\n setColorTheme: action,\n });\n this.applicationStore = applicationStore;\n // register core color themes\n // TODO: we might want to cover at least: a dark theme, a light theme, and a high contrast theme (etc.)\n // as part of core\n this.colorThemeRegistry.set(LEGEND_APPLICATION_COLOR_THEME.DEFAULT_DARK, DEFAULT_DARK_COLOR_THEME);\n // register color themes from extensions\n this.applicationStore.pluginManager\n .getApplicationPlugins()\n .flatMap((plugin) => plugin.getExtraColorThemes?.() ?? [])\n .forEach((colorTheme) => {\n // NOTE: in the future, when we need to make theme extensible, we might want to reconsider this decision here\n // perhaps, each extension can define a new set of color keys that each theme supports and the core theme is extensible\n // while non-core themes are left in a separate package/module and might/might not have support for those color keys\n if (this.colorThemeRegistry.has(colorTheme.key)) {\n this.applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.COLOR_THEME_CONFIGURATION_CHECK__FAILURE), `Found duplicated color themes with key '${colorTheme.key}'`);\n return;\n }\n this.colorThemeRegistry.set(colorTheme.key, colorTheme);\n });\n const themeKey = this.applicationStore.settingService.getStringValue(LEGEND_APPLICATION_SETTING_KEY.COLOR_THEME) ?? LEGEND_APPLICATION_COLOR_THEME.DEFAULT_DARK;\n this.currentColorTheme = guaranteeNonNullable(this.colorThemeRegistry.get(themeKey));\n this.TEMPORARY__syncGlobalCSSClassName(this.currentColorTheme, undefined);\n }\n getElementByID(val) {\n return document.querySelector(`[data-elementid='${val}']`) ?? undefined;\n }\n setWindowTitle(value) {\n document.title = value;\n }\n /**\n * Change the ID used to find the base element to mount the backdrop on.\n * This is useful when we want to use backdrop with embedded application which\n * requires its own backdrop usage.\n *\n * TODO?: we can consider making backdrop container component auto-register its ID\n * as it gets rendered in the application\n */\n setBackdropContainerElementID(val) {\n this.backdropContainerElementID = val;\n }\n setShowBackdrop(val) {\n this.showBackdrop = val;\n }\n /**\n * NOTE: this is the poor man way of doing theming as we only properly support dark color theme\n * This flag is binary because we did light color theme in rush\n *\n * See https://github.com/finos/legend-studio/issues/264\n */\n get TEMPORARY__isLightColorThemeEnabled() {\n return (this.currentColorTheme.key !== LEGEND_APPLICATION_COLOR_THEME.DEFAULT_DARK);\n }\n TEMPORARY__syncGlobalCSSClassName(theme, previousTheme) {\n if (previousTheme) {\n document.body.classList.remove(previousTheme.TEMPORARY__globalCSSClassName);\n }\n document.body.classList.add(theme.TEMPORARY__globalCSSClassName);\n }\n setColorTheme(key, options) {\n const newColorTheme = this.colorThemeRegistry.get(key);\n if (key === this.currentColorTheme.key || !newColorTheme) {\n return;\n }\n const previousColorTheme = this.currentColorTheme;\n this.currentColorTheme = newColorTheme;\n this.TEMPORARY__syncGlobalCSSClassName(newColorTheme, previousColorTheme);\n if (options?.persist) {\n this.applicationStore.settingService.persistValue(LEGEND_APPLICATION_SETTING_KEY.COLOR_THEME, key);\n }\n }\n getColor(key) {\n return (this.currentColorTheme.colors?.[key] ??\n guaranteeNonNullable(this.colorThemeRegistry.get(LEGEND_APPLICATION_COLOR_THEME.DEFAULT_DARK)).colors?.[key] ??\n 'transparent');\n }\n}\n//# sourceMappingURL=LayoutService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class ClipboardService {\n applicationStore;\n constructor(applicationStore) {\n this.applicationStore = applicationStore;\n }\n async copyTextToClipboard(text, options) {\n // This is a much cleaner way which requires HTTPS\n // See https://developers.google.com/web/updates/2018/03/clipboardapi\n await navigator.clipboard\n .writeText(text)\n .catch((error) => {\n this.applicationStore.notificationService.notifyError(error);\n })\n .finally(() => {\n if (options?.notifySuccessMessage) {\n this.applicationStore.notificationService.notifySuccess(options.notifySuccessMessage);\n }\n });\n }\n}\n//# sourceMappingURL=ClipboardService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport const NAVIGATION_ZONE_SEPARATOR = '.';\nexport const NAVIGATION_ZONE_PREFIX = '#';\nexport class NavigationService {\n navigator;\n constructor(navigator) {\n this.navigator = navigator;\n }\n}\n//# sourceMappingURL=NavigationService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { deepEqual, isBoolean, isNumber, isObject, isString, LogEvent, } from '@finos/legend-shared';\nimport { APPLICATION_EVENT } from '../__lib__/LegendApplicationEvent.js';\nimport { StorageStore } from './storage/StorageService.js';\nexport const collectSettingConfigurationEntriesFromConfig = (data) => Object.entries(data).map((entry) => ({\n key: entry[0],\n ...entry[1],\n}));\nconst APPLICATION_SETTING_STORAGE_KEY = 'application-settings-storage';\nexport class SettingService {\n applicationStore;\n storage;\n registry = new Map();\n constructor(applicationStore) {\n this.applicationStore = applicationStore;\n this.storage = new StorageStore(this.applicationStore.storageService, APPLICATION_SETTING_STORAGE_KEY);\n this.applicationStore.pluginManager\n .getApplicationPlugins()\n .flatMap((plugin) => plugin.getExtraSettingConfigurationEntries?.() ?? [])\n .forEach((entry) => {\n if (this.registry.has(entry.key)) {\n this.applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.SETTING_CONFIGURATION_CHECK__FAILURE), `Found duplicated setting with key '${entry.key}'`);\n return;\n }\n // TODO: do validation check here\n // See https://github.com/finos/legend-studio/issues/407\n this.registry.set(entry.key, entry);\n });\n }\n getNumericValue(key) {\n const value = this.storage.getValue(key) ?? this.registry.get(key)?.defaultValue;\n if (!isNumber(value)) {\n this.applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.SETTING_RETRIVE_FAILURE), `Can't retrieve numeric value for setting '${key}'`);\n return undefined;\n }\n return value;\n }\n getStringValue(key) {\n const value = this.storage.getValue(key) ?? this.registry.get(key)?.defaultValue;\n if (!isString(value)) {\n this.applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.SETTING_RETRIVE_FAILURE), `Can't retrieve string value for setting '${key}'`);\n return undefined;\n }\n return value;\n }\n getBooleanValue(key) {\n const value = this.storage.getValue(key) ?? this.registry.get(key)?.defaultValue;\n if (!isBoolean(value)) {\n this.applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.SETTING_RETRIVE_FAILURE), `Can't retrieve boolean value for setting '${key}'`);\n return undefined;\n }\n return value;\n }\n getObjectValue(key) {\n const value = this.storage.getValue(key) ?? this.registry.get(key)?.defaultValue;\n if (!isObject(value)) {\n this.applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.SETTING_RETRIVE_FAILURE), `Can't retrieve object value for setting '${key}'`);\n return undefined;\n }\n return value;\n }\n persistValue(key, value) {\n const defaultValue = this.registry.get(key)?.defaultValue;\n this.storage.persistValue(key, \n // NOTE: if the value equals to default value, the value will be unset instead\n defaultValue !== undefined && deepEqual(defaultValue, value)\n ? undefined\n : value);\n }\n}\n//# sourceMappingURL=SettingService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { UnsupportedOperationError } from '@finos/legend-shared';\nimport {} from './NavigationService.js';\nexport class DefaultNavigator {\n goToLocation(location, options) {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n reload(options) {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n goToAddress(address, options) {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n visitAddress(address) {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n generateAddress(location) {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n updateCurrentLocation(location) {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n updateCurrentZone(zone) {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n resetZone() {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n getCurrentBaseAddress(options) {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n getCurrentAddress() {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n getCurrentLocation() {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n getCurrentLocationParameters() {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n getCurrentLocationParameterValue(key) {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n getCurrentZone() {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n blockNavigation(blockCheckers, onBlock, onNativePlatformNavigationBlock) {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n unblockNavigation() {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n get isNavigationBlocked() {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n INTERNAL__internalizeTransientParameter(key) {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n}\n//# sourceMappingURL=DefaultNavigator.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { LogEvent, isBoolean, isNumber, isObject, isString, } from '@finos/legend-shared';\nimport { StorageStore } from './storage/StorageService.js';\nimport { APPLICATION_EVENT } from '../__lib__/LegendApplicationEvent.js';\nconst APPLICATION_USER_DATA_STORAGE_KEY = 'application-user-data-storage';\nexport class UserDataService {\n applicationStore;\n storage;\n constructor(applicationStore) {\n this.applicationStore = applicationStore;\n this.storage = new StorageStore(this.applicationStore.storageService, APPLICATION_USER_DATA_STORAGE_KEY);\n }\n getNumericValue(key) {\n const value = this.storage.getValue(key);\n if (!isNumber(value)) {\n this.applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.USER_DATA_RETRIEVE_FAILURE), `Can't retrieve numeric value for user data '${key}'`);\n return undefined;\n }\n return value;\n }\n getStringValue(key) {\n const value = this.storage.getValue(key);\n if (!isString(value)) {\n this.applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.USER_DATA_RETRIEVE_FAILURE), `Can't retrieve string value for user data '${key}'`);\n return undefined;\n }\n return value;\n }\n getBooleanValue(key) {\n const value = this.storage.getValue(key);\n if (!isBoolean(value)) {\n this.applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.USER_DATA_RETRIEVE_FAILURE), `Can't retrieve boolean value for user data '${key}'`);\n return undefined;\n }\n return value;\n }\n getObjectValue(key) {\n const value = this.storage.getValue(key);\n if (!isObject(value)) {\n this.applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.USER_DATA_RETRIEVE_FAILURE), `Can't retrieve object value for user data '${key}'`);\n return undefined;\n }\n return value;\n }\n persistValue(key, value) {\n this.storage.persistValue(key, value);\n }\n}\n//# sourceMappingURL=UserDataService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Compare SemVer versions.\n *\n * NOTE: SemVer could have been the perfect library to use here but we can't use it since it's meant for `Node` only\n * `compare-versions` works for browser but seems way overkill, especially when the version format is very\n * standard, i.e. `x.y.z`, no prerelease, etc.\n * As such, we can use the lean comparison algo using `localeCompare` with numeric settings\n *\n * See https://stackoverflow.com/questions/55466274/simplify-semver-version-compare-logic/55466325#55466325\n * See omichelsen/compare-versions#45\n */\nexport const compareSemVerVersions = (val1, val2) => \n// TODO: verify if the version match certain patterns\nval1.localeCompare(val2, undefined, { numeric: true });\n// regex to validate semver: https://github.com/semver/semver/issues/232\nexport const isSemVer = (val) => /^(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)(?:-(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(?:\\+[0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*)?$/.test(val);\n//# sourceMappingURL=StringCompareUtil.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { compareSemVerVersions, guaranteeNonEmptyString, isSemVer, } from '@finos/legend-shared';\nimport { action, makeObservable, observable } from 'mobx';\nexport var RELEASE_UPDATE_TYPE;\n(function (RELEASE_UPDATE_TYPE) {\n RELEASE_UPDATE_TYPE[\"BUG_FIX\"] = \"BUG_FIX\";\n RELEASE_UPDATE_TYPE[\"ENHANCEMENT\"] = \"ENHANCEMENT\";\n})(RELEASE_UPDATE_TYPE || (RELEASE_UPDATE_TYPE = {}));\nexport const collectReleaseNotes = (releaseNotes) => releaseNotes.map((release) => {\n guaranteeNonEmptyString(release.version, \"Release notes 'version' is missing\");\n release.notes?.map((note) => {\n guaranteeNonEmptyString(note.type, \"Release note 'type' is missing\");\n guaranteeNonEmptyString(note.description, \"Release note 'description' is missing\");\n return note;\n });\n return release;\n});\nexport const APPLICATION_LAST_OPENED_VERSION = 'application.lastOpenedVersion';\nexport class ReleaseNotesService {\n applicationStore;\n releaseNotes;\n showCurrentReleaseModal = true;\n showReleaseLog = false;\n isConfigured = false;\n constructor(applicationStore) {\n makeObservable(this, {\n showCurrentReleaseModal: observable,\n showReleaseLog: observable,\n isConfigured: observable,\n setShowCurrentRelease: action,\n configure: action,\n setReleaseLog: action,\n });\n this.applicationStore = applicationStore;\n }\n configure(releaseNotes) {\n this.isConfigured = true;\n this.releaseNotes = collectReleaseNotes(releaseNotes);\n }\n setShowCurrentRelease(val) {\n this.showCurrentReleaseModal = val;\n }\n setReleaseLog(val) {\n this.showReleaseLog = val;\n }\n getViewedVersion() {\n return this.applicationStore.userDataService.getStringValue(APPLICATION_LAST_OPENED_VERSION);\n }\n updateViewedVersion() {\n this.applicationStore.userDataService.persistValue(APPLICATION_LAST_OPENED_VERSION, this.applicationStore.config.appVersion);\n }\n showVersion(versionNotes, lastOpenedVersion) {\n const version = versionNotes.version;\n if (isSemVer(version) && isSemVer(lastOpenedVersion)) {\n if (compareSemVerVersions(version, lastOpenedVersion) === 1) {\n return true;\n }\n }\n return false;\n }\n showableVersions() {\n const lastOpenedVersion = this.getViewedVersion();\n if (!lastOpenedVersion) {\n return undefined;\n }\n return this.releaseNotes?.filter((val) => this.showVersion(val, lastOpenedVersion));\n }\n}\n//# sourceMappingURL=ReleaseNotesService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { TracerService, LogService, LogEvent, uuid, ActionState, assertErrorThrown, IllegalStateError, isNonNullable, } from '@finos/legend-shared';\nimport { APPLICATION_EVENT } from '../__lib__/LegendApplicationEvent.js';\nimport { DocumentationService } from './DocumentationService.js';\nimport { AssistantService } from './AssistantService.js';\nimport { EventService } from './event/EventService.js';\nimport { ApplicationNavigationContextService } from './ApplicationNavigationContextService.js';\nimport { CommandService } from './CommandService.js';\nimport { KeyboardShortcutsService } from './KeyboardShortcutsService.js';\nimport { TerminalService } from './TerminalService.js';\nimport { AlertService } from './AlertService.js';\nimport { NotificationService } from './NotificationService.js';\nimport { IdentityService } from './IdentityService.js';\nimport { StorageService } from './storage/StorageService.js';\nimport { TelemetryService } from './TelemetryService.js';\nimport { TimeService } from './TimeService.js';\nimport { LayoutService } from './LayoutService.js';\nimport { ClipboardService } from './ClipboardService.js';\nimport { NavigationService } from './navigation/NavigationService.js';\nimport { SettingService } from './SettingService.js';\nimport { DefaultNavigator } from './navigation/DefaultNavigator.js';\nimport { UserDataService } from './UserDataService.js';\nimport { ReleaseNotesService } from './ReleaseNotesService.js';\nexport class ApplicationExtensionState {\n /**\n * This helps to better type-check for this empty abtract type\n * See https://github.com/finos/legend-studio/blob/master/docs/technical/typescript-usage.md#understand-typescript-structual-type-system\n */\n _$nominalTypeBrand;\n}\nexport class ApplicationStore {\n uuid = uuid();\n /**\n * This is a mechanism to have the store holds references to extension states\n * so that we can refer back to these states when needed or do cross-extensions\n * operations\n */\n extensionStates = [];\n config;\n pluginManager;\n initState = ActionState.create();\n platform;\n // core\n timeService;\n logService;\n storageService;\n userDataService;\n settingService;\n alertService;\n notificationService;\n identityService;\n commandService;\n keyboardShortcutsService;\n layoutService;\n clipboardService;\n terminalService;\n navigationService;\n navigationContextService;\n // support\n documentationService;\n assistantService;\n // release\n releaseNotesService;\n // event\n eventService;\n telemetryService;\n tracerService;\n constructor(config, pluginManager) {\n this.config = config;\n this.pluginManager = pluginManager;\n this.timeService = new TimeService();\n // NOTE: set the logger first so other loading could use the configured logger\n this.logService = new LogService();\n this.logService.registerPlugins(pluginManager.getLoggerPlugins());\n this.storageService = new StorageService(this);\n this.settingService = new SettingService(this);\n this.userDataService = new UserDataService(this);\n this.alertService = new AlertService(this);\n this.notificationService = new NotificationService();\n this.identityService = new IdentityService(this);\n this.layoutService = new LayoutService(this);\n this.clipboardService = new ClipboardService(this);\n this.terminalService = new TerminalService(this);\n this.commandService = new CommandService(this);\n this.keyboardShortcutsService = new KeyboardShortcutsService(this);\n this.navigationService = new NavigationService(new DefaultNavigator());\n this.navigationContextService = new ApplicationNavigationContextService(this);\n this.documentationService = new DocumentationService(this);\n this.assistantService = new AssistantService(this);\n this.releaseNotesService = new ReleaseNotesService(this);\n this.eventService = new EventService();\n this.eventService.registerEventNotifierPlugins(pluginManager.getEventNotifierPlugins());\n this.telemetryService = new TelemetryService(this);\n this.telemetryService.registerPlugins(pluginManager.getTelemetryServicePlugins());\n this.telemetryService.setup();\n this.tracerService = new TracerService();\n this.tracerService.registerPlugins(pluginManager.getTracerServicePlugins());\n // extensions\n this.extensionStates = this.pluginManager\n .getApplicationPlugins()\n .flatMap((plugin) => plugin.getExtraApplicationExtensionStateBuilders?.() ?? [])\n .map((creator) => creator(this))\n .filter(isNonNullable);\n }\n async initialize(platform) {\n if (!this.initState.isInInitialState) {\n // eslint-disable-next-line no-process-env\n if (process.env.NODE_ENV === 'production') {\n this.notificationService.notifyIllegalState('Application store is re-initialized');\n }\n else {\n this.logService.debug(LogEvent.create(APPLICATION_EVENT.DEBUG), 'Application store is re-initialized');\n }\n return;\n }\n this.initState.inProgress();\n try {\n if (this.platform) {\n throw new IllegalStateError(`Platform is already configured`);\n }\n this.platform = platform;\n this.navigationService =\n new NavigationService(platform.getNavigator());\n await platform.initialize();\n this.initState.pass();\n }\n catch (error) {\n assertErrorThrown(error);\n this.notificationService.notifyError(error);\n this.logService.error(LogEvent.create(APPLICATION_EVENT.APPLICATION_LOAD__FAILURE), 'Failed to load Legend application');\n this.initState.fail();\n }\n }\n /**\n * When we call store/state functions from the component, we should handle error thrown at these functions instead\n * of throwing them to the UI. This enforces that by throwing `IllegalStateError`\n */\n alertUnhandledError = (error) => {\n this.logUnhandledError(error);\n this.notificationService.notifyIllegalState(error.message);\n };\n logUnhandledError = (error) => {\n this.logService.error(LogEvent.create(APPLICATION_EVENT.ILLEGAL_APPLICATION_STATE_OCCURRED), 'Encountered unhandled error in component tree', error);\n };\n /**\n * Guarantee that the action being used by the component does not throw unhandled errors\n */\n guardUnhandledError = (actionFn) => () => {\n actionFn().catch(this.alertUnhandledError);\n };\n}\n//# sourceMappingURL=ApplicationStore.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { downloadFileUsingDataURI, guaranteeNonNullable, } from '@finos/legend-shared';\nvar DOWNLOAD_EVENTS;\n(function (DOWNLOAD_EVENTS) {\n DOWNLOAD_EVENTS[\"TAG_REQUEST\"] = \"download-request\";\n DOWNLOAD_EVENTS[\"TAG_RESPONSE\"] = \"download-response\";\n DOWNLOAD_EVENTS[\"STREAM_CLOSED\"] = \"#stream-closed\";\n DOWNLOAD_EVENTS[\"STREAM_ABORTED\"] = \"#stream-aborted\";\n})(DOWNLOAD_EVENTS || (DOWNLOAD_EVENTS = {}));\nfunction createWritableStreamFromMessageChannel(channel) {\n return new WritableStream({\n write(chunk) {\n channel.port1.postMessage(chunk);\n },\n close() {\n channel.port1.postMessage(DOWNLOAD_EVENTS.STREAM_CLOSED);\n },\n abort() {\n channel.port1.postMessage(DOWNLOAD_EVENTS.STREAM_ABORTED);\n closeMessagePort(channel.port1);\n closeMessagePort(channel.port2);\n },\n });\n}\nfunction closeMessagePort(port) {\n port.onmessage = null;\n port.close();\n}\nasync function getServiceWorker() {\n if (!('serviceWorker' in navigator)) {\n return Promise.reject(new Error('Service worker is not available. Service Worker requires HTTPS protocol'));\n }\n return navigator.serviceWorker\n .getRegistration()\n .then((workerRegistration) => {\n if (workerRegistration === undefined) {\n return undefined;\n }\n const pending = workerRegistration.installing ?? workerRegistration.waiting;\n return (workerRegistration.active ??\n new Promise((resolve) => {\n // if not activated, add listener to waiting or installing registration\n const listener = () => {\n if (pending?.state === 'activated') {\n pending.removeEventListener('statechange', listener);\n resolve(workerRegistration.active ?? undefined);\n }\n };\n pending?.addEventListener('statechange', listener);\n }));\n });\n}\nfunction createDownloadRequest(filename) {\n const PREFIX = 6;\n const prefix = String(Math.random()).slice(-PREFIX);\n const url = new URL(`${prefix}/${filename}`, window.location.href).toString();\n return { tag: DOWNLOAD_EVENTS.TAG_REQUEST, filename, url };\n}\nfunction handleServiceWorkerDownloadResponse(event) {\n const data = event.data;\n if (data?.tag === DOWNLOAD_EVENTS.TAG_RESPONSE && data.downloadUrl.length) {\n openInIframe(data.downloadUrl);\n }\n}\nfunction openInIframe(src) {\n const iframe = document.createElement('iframe');\n iframe.hidden = true;\n iframe.src = src;\n document.body.appendChild(iframe);\n return iframe;\n}\nexport async function downloadStream(response, filename, contentType) {\n const responseBody = guaranteeNonNullable(response.body);\n // creates communication channel with service worker with response handler\n const channel = new MessageChannel();\n channel.port1.onmessage = handleServiceWorkerDownloadResponse;\n // grabs service worker and handles it download along with response channel port\n const serviceWorker = await getServiceWorker();\n if (!serviceWorker) {\n // TODO: remove once service worker workflow is tested\n const text = await response.text();\n // eslint-disable-next-line no-console\n console.debug('service worker not found. Using in memory file download');\n downloadFileUsingDataURI(filename, text, contentType);\n return;\n }\n // eslint-disable-next-line no-console\n console.debug('Service worker found. Continuing download');\n const downloadRequest = createDownloadRequest(filename);\n serviceWorker.postMessage(downloadRequest, [channel.port2]);\n // creates new data stream over communication channel and pipes given stream in it\n responseBody\n .pipeTo(createWritableStreamFromMessageChannel(channel))\n .then(() => {\n // TODO: trace success\n })\n .catch(() => {\n // TODO: fail\n });\n}\nexport function registerDownloadHelperServiceWorker(workerPath) {\n if ('serviceWorker' in navigator) {\n const path = workerPath ?? '/ServiceWorker.js';\n navigator.serviceWorker\n .register(path)\n .then((reg) => {\n // TODO: add trace\n // eslint-disable-next-line no-console\n console.debug(`register service worker success with path: ${path}`, reg);\n })\n .catch((error) => {\n // TODO: add trace\n // eslint-disable-next-line no-console\n console.debug(`register service worker error with path: ${path}`, error);\n });\n }\n}\n//# sourceMappingURL=DownloadHelperServiceWorker.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { assertErrorThrown, LogEvent, guaranteeNonEmptyString, assertNonNullable, NetworkClient, createRegExpPatternFromWildcardPattern, } from '@finos/legend-shared';\nimport { APPLICATION_EVENT } from '../__lib__/LegendApplicationEvent.js';\nimport { collectKeyedDocumentationEntriesFromConfig, } from '../stores/DocumentationService.js';\nimport { ApplicationStore, } from '../stores/ApplicationStore.js';\nimport { registerDownloadHelperServiceWorker } from '../util/DownloadHelperServiceWorker.js';\nexport class LegendApplicationLogger {\n}\nexport class LegendApplicationWebConsole extends LegendApplicationLogger {\n debug(event, ...data) {\n // eslint-disable-next-line no-console\n console.debug(`[${event.timestamp}] ${event.name} ${data.length ? ':' : ''}`, ...data);\n }\n info(event, ...data) {\n // eslint-disable-next-line no-console\n console.info(`[${event.timestamp}] ${event.name} ${data.length ? ':' : ''}`, ...data);\n }\n warn(event, ...data) {\n // eslint-disable-next-line no-console\n console.warn(`[${event.timestamp}] ${event.name} ${data.length ? ':' : ''}`, ...data);\n }\n error(event, ...data) {\n // eslint-disable-next-line no-console\n console.error(`[${event.timestamp}] ${event.name} ${data.length ? ':' : ''}`, ...data);\n }\n}\nexport class LegendApplication {\n config;\n logger;\n pluginManager;\n basePresets = [];\n basePlugins = [];\n baseAddress;\n pluginRegister;\n _isConfigured = false;\n downloadHelperServiceWorkerPath;\n downloadHelper = false;\n releaseNotes;\n constructor(pluginManager) {\n this.pluginManager = pluginManager;\n this.logger = new LegendApplicationWebConsole();\n }\n setup(options) {\n this.baseAddress = guaranteeNonEmptyString(options.baseAddress, `Can't setup application: 'baseAddress' is missing or empty`);\n this.pluginRegister = options.pluginRegister;\n this._isConfigured = true;\n return this;\n }\n withBasePresets(presets) {\n this.basePresets = presets;\n return this.withPresets([]); // this will reset the preset list and prepend with base presets\n }\n withBasePlugins(plugins) {\n this.basePlugins = plugins;\n return this.withPlugins([]); // this will reset the plugin list and prepend with base plugins\n }\n withPresets(presets) {\n this.pluginManager.usePresets([...this.basePresets, ...presets]);\n return this;\n }\n withPlugins(plugins) {\n this.pluginManager.usePlugins([...this.basePlugins, ...plugins]);\n return this;\n }\n withDownloadHelper(path) {\n this.downloadHelper = true;\n this.downloadHelperServiceWorkerPath = path;\n return this;\n }\n withReleaseNotes(releaseNotes) {\n this.releaseNotes = releaseNotes;\n return this;\n }\n setupApplicationStore(store) {\n if (this.releaseNotes) {\n store.releaseNotesService.configure(this.releaseNotes);\n }\n }\n async fetchApplicationConfiguration() {\n const client = new NetworkClient();\n // app config\n let configData;\n try {\n configData = await client.get(`${window.location.origin}${this.baseAddress}config.json`);\n }\n catch (error) {\n assertErrorThrown(error);\n this.logger.error(LogEvent.create(APPLICATION_EVENT.APPLICATION_CONFIGURATION__FAILURE), error);\n }\n assertNonNullable(configData, `Can't fetch Legend application configuration`);\n // app version\n let versionData;\n try {\n versionData = await client.get(`${window.location.origin}${this.baseAddress}version.json`);\n }\n catch (error) {\n assertErrorThrown(error);\n this.logger.error(LogEvent.create(APPLICATION_EVENT.APPLICATION_CONFIGURATION__FAILURE), error);\n }\n assertNonNullable(versionData, `Can't fetch Legend application version`);\n return [\n await this.configureApplication({\n configData,\n versionData,\n baseAddress: this.baseAddress,\n }),\n configData.extensions ?? {},\n ];\n }\n async loadDocumentationRegistryData(config) {\n const entries = {};\n await Promise.all([\n ...config.documentationRegistryEntries,\n ...this.pluginManager\n .getApplicationPlugins()\n .flatMap((plugin) => plugin.getExtraDocumentationRegistryEntries?.() ?? []),\n ].map(async (entry) => {\n try {\n const client = new NetworkClient(entry.simple\n ? {\n /**\n * NOTE: see the documentation for `simple` flag {@link DocumentationRegistryEntry}\n * here, basically, we expect to fetch just the JSON from an endpoint where `Access-Control-Allow-Origin\", \"*\"` is set\n * as such, we must not include the credential in our request\n * See https://stackoverflow.com/questions/19743396/cors-cannot-use-wildcard-in-access-control-allow-origin-when-credentials-flag-i\n */\n options: {\n credentials: 'omit',\n },\n }\n : {});\n const docData = await client.get(guaranteeNonEmptyString(entry.url, `Can't load documentation registry: 'url' field is missing or empty`));\n assertNonNullable(docData.entries, `Can't load documentation registry data: 'entries' field is missing`);\n const patterns = entry.includes?.map((filter) => createRegExpPatternFromWildcardPattern(filter));\n Object.entries(docData.entries).forEach(([key, docEntry]) => {\n if (!patterns || patterns.some((pattern) => pattern.test(key))) {\n // NOTE: entries will NOT override\n if (!entries[key]) {\n entries[key] = docEntry;\n }\n }\n });\n }\n catch (error) {\n assertErrorThrown(error);\n this.logger.warn(LogEvent.create(APPLICATION_EVENT.DOCUMENTATION_FETCH__FAILURE), error);\n }\n }));\n // NOTE: config entries will override\n config.keyedDocumentationEntries = [\n ...collectKeyedDocumentationEntriesFromConfig(entries),\n ...config.keyedDocumentationEntries,\n ];\n }\n async start() {\n assertNonNullable(this._isConfigured, 'Legend application has not been configured properly. Make sure to run setup() before start()');\n try {\n // fetch application config\n const [config, extensionConfigData] = await this.fetchApplicationConfiguration();\n this.config = config;\n // setup plugins\n this.pluginRegister?.(this.pluginManager, this.config);\n this.pluginManager.configure(extensionConfigData);\n this.pluginManager.install();\n // other setups\n await Promise.all(\n // NOTE: to be done in parallel to save time\n [this.loadDocumentationRegistryData(config)]);\n // setup application store\n const applicationStore = new ApplicationStore(this.config, this.pluginManager);\n await Promise.all(this.pluginManager\n .getApplicationPlugins()\n .flatMap((plugin) => plugin.getExtraApplicationSetups?.() ?? [])\n .map((setup) => setup(applicationStore)));\n // set up application\n this.setupApplicationStore(applicationStore);\n // load application\n await this.loadApplication(applicationStore);\n this.logger.info(LogEvent.create(APPLICATION_EVENT.APPLICATION_LOAD__SUCCESS), 'Legend application loaded');\n if (this.downloadHelper) {\n registerDownloadHelperServiceWorker(this.downloadHelperServiceWorkerPath);\n }\n }\n catch (error) {\n assertErrorThrown(error);\n this.logger.error(LogEvent.create(APPLICATION_EVENT.APPLICATION_LOAD__FAILURE), 'Failed to load Legend application');\n throw error;\n }\n }\n}\nexport const LEGEND_APPLICATION_ROOT_ELEMENT_TAG = 'legend-application-root';\n// NOTE: we use a special tag to mount the application to avoid styling conflicts\nexport const getApplicationRootElement = () => {\n let rootEl = document.getElementsByTagName(LEGEND_APPLICATION_ROOT_ELEMENT_TAG).length\n ? document.getElementsByTagName(LEGEND_APPLICATION_ROOT_ELEMENT_TAG)[0]\n : undefined;\n if (!rootEl) {\n rootEl = document.createElement(LEGEND_APPLICATION_ROOT_ELEMENT_TAG);\n document.body.appendChild(rootEl);\n }\n rootEl.setAttribute('style', 'height: 100%; width: 100%; display: block');\n return rootEl;\n};\n//# sourceMappingURL=LegendApplication.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport const createRegExpPatternFromWildcardPattern = (value) => new RegExp(\n// trim and add start/end regexp to make sure the wildcard pattern must be a full match\n`^${value\n .trim()\n // escape special characters except for wilcard *\n .replace(/[\\^$\\\\.+?()[\\]{}|]/g, '\\\\$&')\n // translate wildcard * to .*\n .replace(/\\*/g, '.*')}$`);\n//# sourceMappingURL=MatcherUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { AbstractPluginManager, } from '@finos/legend-shared';\nexport class LegendApplicationPluginManager extends AbstractPluginManager {\n loggerPlugins = [];\n telemetryServicePlugins = [];\n tracerServicePlugins = [];\n eventNotifierPlugins = [];\n applicationPlugins = [];\n registerLoggerPlugin(plugin) {\n this.loggerPlugins.push(plugin);\n }\n registerTelemetryServicePlugin(plugin) {\n this.telemetryServicePlugins.push(plugin);\n }\n registerTracerServicePlugin(plugin) {\n this.tracerServicePlugins.push(plugin);\n }\n registerEventNotifierPlugin(plugin) {\n this.eventNotifierPlugins.push(plugin);\n }\n registerApplicationPlugin(plugin) {\n this.applicationPlugins.push(plugin);\n }\n getLoggerPlugins() {\n return [...this.loggerPlugins];\n }\n getTelemetryServicePlugins() {\n return [...this.telemetryServicePlugins];\n }\n getTracerServicePlugins() {\n return [...this.tracerServicePlugins];\n }\n getEventNotifierPlugins() {\n return [...this.eventNotifierPlugins];\n }\n getApplicationPlugins() {\n return [...this.applicationPlugins];\n }\n}\n//# sourceMappingURL=LegendApplicationPluginManager.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { AbstractPlugin } from '@finos/legend-shared';\nexport class LegendApplicationPlugin extends AbstractPlugin {\n}\n//# sourceMappingURL=LegendApplicationPlugin.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport packageJson from '../../package.json' with { type: 'json' };\nimport { LEGEND_APPLICATION_SETTING_CONFIG } from '../__lib__/LegendApplicationSetting.js';\nimport { HIGH_CONTRAST_LIGHT_COLOR_THEME, LEGACY_LIGHT_COLOR_THEME, } from '../__lib__/LegendApplicationColorTheme.js';\nimport { LegendApplicationPlugin, } from './LegendApplicationPlugin.js';\nimport { collectSettingConfigurationEntriesFromConfig, } from './SettingService.js';\nimport { configureComponents } from '@finos/legend-art';\nexport class Core_LegendApplicationPlugin extends LegendApplicationPlugin {\n static NAME = packageJson.extensions.applicationPlugin;\n constructor() {\n super(Core_LegendApplicationPlugin.NAME, packageJson.version);\n }\n install(pluginManager) {\n pluginManager.registerApplicationPlugin(this);\n }\n getExtraApplicationSetups() {\n return [\n async (applicationStore) => {\n // configure UI components\n configureComponents();\n },\n ];\n }\n getExtraColorThemes() {\n return [LEGACY_LIGHT_COLOR_THEME, HIGH_CONTRAST_LIGHT_COLOR_THEME];\n }\n getExtraSettingConfigurationEntries() {\n return collectSettingConfigurationEntriesFromConfig(LEGEND_APPLICATION_SETTING_CONFIG);\n }\n}\n//# sourceMappingURL=Core_LegendApplicationPlugin.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { guaranteeNonEmptyString, guaranteeNonNullable, URL_SEPARATOR, } from '@finos/legend-shared';\nimport { collectKeyedDocumentationEntriesFromConfig, collectContextualDocumentationEntries, collectDocumentationLinkEntryFromConfig, } from '../stores/DocumentationService.js';\nexport class LegendApplicationConfig {\n appName;\n baseAddress;\n env;\n applicationStorageKey;\n // documentation\n documentationUrl;\n documentationLinkEntries = [];\n documentationRegistryEntries = [];\n keyedDocumentationEntries = [];\n contextualDocEntries = [];\n // version\n appVersion;\n appVersionBuildTime;\n appVersionCommitId;\n constructor(input) {\n this.baseAddress = input.baseAddress;\n this.appName = guaranteeNonEmptyString(input.configData.appName, `Can't configure application: 'appName' field is missing or empty`);\n this.env = guaranteeNonEmptyString(input.configData.env, `Can't configure application: 'env' field is missing or empty`);\n this.applicationStorageKey =\n input.configData.application?.storageKey ??\n this.getDefaultApplicationStorageKey();\n // Documentation\n this.documentationUrl = input.configData.documentation?.url;\n this.documentationLinkEntries = collectDocumentationLinkEntryFromConfig(input.configData.documentation?.links ?? {});\n this.documentationRegistryEntries =\n input.configData.documentation?.registry ?? [];\n this.keyedDocumentationEntries = collectKeyedDocumentationEntriesFromConfig(input.configData.documentation?.entries ?? {});\n this.contextualDocEntries = collectContextualDocumentationEntries(input.configData.documentation?.contextualEntries ?? {});\n // Version\n this.appVersion = guaranteeNonNullable(input.versionData.version, `Can't collect application version: 'version' field is missing`);\n this.appVersionBuildTime = input.versionData.buildTime;\n this.appVersionCommitId = input.versionData.commitSHA;\n }\n static resolveAbsoluteUrl(url) {\n if (url.trim().startsWith(URL_SEPARATOR)) {\n return window.location.origin + url;\n }\n return url;\n }\n}\n//# sourceMappingURL=LegendApplicationConfig.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { assertNonNullable, guaranteeNonEmptyString, } from '@finos/legend-shared';\nimport { LegendApplicationConfig, } from '@finos/legend-application';\nexport class LegendREPLApplicationConfig extends LegendApplicationConfig {\n replUrl;\n useDynamicREPLServer = false;\n constructor(input) {\n super(input);\n assertNonNullable(input.configData.repl, `Can't configure application: 'repl' field is missing`);\n this.replUrl = LegendApplicationConfig.resolveAbsoluteUrl(guaranteeNonEmptyString(input.configData.repl.url, `Can't configure application: 'repl.url' field is missing or empty`));\n if (input.configData.repl.dynamic !== undefined) {\n this.useDynamicREPLServer = Boolean(input.configData.repl.dynamic);\n }\n }\n getDefaultApplicationStorageKey() {\n return 'legend-repl';\n }\n}\n//# sourceMappingURL=LegendREPLApplicationConfig.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport var LEGEND_APPLICATION_PARAM_TOKEN;\n(function (LEGEND_APPLICATION_PARAM_TOKEN) {\n LEGEND_APPLICATION_PARAM_TOKEN[\"INITIAL_COLOR_THEME\"] = \"initialColorTheme\";\n})(LEGEND_APPLICATION_PARAM_TOKEN || (LEGEND_APPLICATION_PARAM_TOKEN = {}));\n//# sourceMappingURL=LegendApplicationNavigation.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { addQueryParametersToUrl, getQueryParameterValue, getQueryParameters, guaranteeNonNullable, sanitizeURL, stringifyQueryParams, } from '@finos/legend-shared';\nimport { action, computed, makeObservable, observable } from 'mobx';\nimport { NAVIGATION_ZONE_PREFIX, } from './NavigationService.js';\nimport { Route, Routes, matchRoutes, generatePath, useParams, useLocation, } from 'react-router';\nexport { BrowserRouter } from 'react-router-dom';\nexport { Route, Routes, useParams, matchRoutes, generatePath };\nexport const useNavigationZone = () => {\n const location = useLocation();\n return location.hash.substring(NAVIGATION_ZONE_PREFIX.length);\n};\n/**\n * Prefix URL patterns coming from extensions with `/extensions/`\n * to avoid potential conflicts with main routes.\n */\nexport const generateExtensionUrlPattern = (pattern) => `/extensions/${pattern}`.replace(/^\\/extensions\\/\\//, '/extensions/');\nexport function stripTrailingSlash(url) {\n let _url = url;\n while (_url.endsWith('/')) {\n _url = _url.slice(0, -1);\n }\n return _url;\n}\nexport class BrowserNavigator {\n navigate;\n baseUrl;\n _isNavigationBlocked = false;\n _forceBypassNavigationBlocking = false;\n _blockCheckers = [];\n _beforeUnloadListener = (event) => {\n if (this._forceBypassNavigationBlocking) {\n return;\n }\n if (this._blockCheckers.some((checker) => checker())) {\n // NOTE: there is no way to customize the alert message for now since Chrome removed support for it due to security concerns\n // See https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onbeforeunload#Browser_compatibility\n event.returnValue = '';\n event.preventDefault();\n }\n };\n onBlock;\n onNativePlatformNavigationBlock;\n constructor(navigate, baseUrl) {\n makeObservable(this, {\n _isNavigationBlocked: observable,\n isNavigationBlocked: computed,\n blockNavigation: action,\n unblockNavigation: action,\n });\n this.navigate = navigate;\n this.baseUrl = baseUrl;\n }\n get window() {\n return guaranteeNonNullable(window, `Window object is not available in non-web environment`);\n }\n goToLocation(location, options) {\n if (options?.ignoreBlocking) {\n this._forceBypassNavigationBlocking = true;\n }\n const onProceed = () => {\n this._forceBypassNavigationBlocking = true; // make sure to not trigger `BeforeUnloadEvent`\n this.window.location.href = this.generateAddress(location);\n };\n if (!this._forceBypassNavigationBlocking &&\n this._blockCheckers.some((checker) => checker())) {\n this.onBlock?.(onProceed);\n }\n else {\n onProceed();\n }\n }\n reload(options) {\n if (options?.ignoreBlocking) {\n this._forceBypassNavigationBlocking = true;\n }\n const onProceed = () => {\n this._forceBypassNavigationBlocking = true; // make sure to not trigger `BeforeUnloadEvent`\n this.window.location.reload();\n };\n if (!this._forceBypassNavigationBlocking &&\n this._blockCheckers.some((checker) => checker())) {\n this.onBlock?.(onProceed);\n }\n else {\n onProceed();\n }\n }\n goToAddress(address, options) {\n if (options?.ignoreBlocking) {\n this._forceBypassNavigationBlocking = true;\n }\n const onProceed = () => {\n this._forceBypassNavigationBlocking = true; // make sure to not trigger `BeforeUnloadEvent`\n this.window.location.href = address;\n };\n if (!this._forceBypassNavigationBlocking &&\n this._blockCheckers.some((checker) => checker())) {\n this.onBlock?.(onProceed);\n }\n else {\n onProceed();\n }\n }\n visitAddress(address) {\n this.window.open(address, '_blank');\n }\n generateAddress(location) {\n return this.window.location.origin + this.baseUrl + location;\n }\n updateCurrentLocation(location) {\n this.navigate(location);\n }\n updateCurrentZone(zone) {\n this.window.location.hash = NAVIGATION_ZONE_PREFIX + zone;\n }\n resetZone() {\n this.updateCurrentLocation(this.getCurrentLocation());\n }\n getCurrentBaseAddress(options) {\n if (options?.withAppRoot) {\n return this.generateAddress('');\n }\n return this.window.location.origin;\n }\n getCurrentAddress() {\n return this.window.location.href;\n }\n getCurrentLocation() {\n return this.window.location.pathname.substring(this.baseUrl.length);\n }\n getCurrentLocationParameters() {\n const result = {};\n const parameters = getQueryParameters(sanitizeURL(this.getCurrentAddress()), true);\n Object.keys(parameters).forEach((key) => {\n result[key] = getQueryParameterValue(key, parameters);\n });\n return result;\n }\n getCurrentLocationParameterValue(key) {\n return this.getCurrentLocationParameters()[key];\n }\n getCurrentZone() {\n return this.window.location.hash.substring(NAVIGATION_ZONE_PREFIX.length);\n }\n blockNavigation(blockCheckers, onBlock, onNativePlatformNavigationBlock) {\n this._isNavigationBlocked = true;\n this.onBlock = onBlock;\n this.onNativePlatformNavigationBlock = onNativePlatformNavigationBlock;\n // Here we attempt to cancel the effect of the back button\n // See https://medium.com/codex/angular-guards-disabling-browsers-back-button-for-specific-url-fdf05d9fe155#4f13\n // This makes the current location the last entry in the browser history and clears any forward history\n this.window.history.pushState(null, '', this.getCurrentAddress());\n // The popstate event is triggered every time the user clicks back/forward button, but the forward history\n // has been cleared, and now if we go back, we call `history.forward()`, which go 1 page forward,\n // but there's no page forward, so effectively, the user remains on the same page\n this.window.onpopstate = () => {\n window.history.forward();\n this.onNativePlatformNavigationBlock?.();\n };\n // Block browser navigation: e.g. reload, setting `window.href` directly, etc.\n this._blockCheckers = blockCheckers;\n this.window.removeEventListener('beforeunload', this._beforeUnloadListener);\n this.window.addEventListener('beforeunload', this._beforeUnloadListener);\n }\n unblockNavigation() {\n this._isNavigationBlocked = false;\n this.onBlock = undefined;\n this.window.onpopstate = null;\n this._blockCheckers = [];\n this.window.removeEventListener('beforeunload', this._beforeUnloadListener);\n }\n get isNavigationBlocked() {\n return this._isNavigationBlocked;\n }\n INTERNAL__internalizeTransientParameter(key) {\n const currentZone = this.getCurrentZone();\n const parameters = this.getCurrentLocationParameters();\n delete parameters[key];\n this.updateCurrentLocation(addQueryParametersToUrl(this.getCurrentLocation(), stringifyQueryParams(parameters)));\n this.updateCurrentZone(currentZone);\n }\n}\n//# sourceMappingURL=BrowserNavigator.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class ApplicationPlatform {\n applicationStore;\n constructor(applicationStore) {\n this.applicationStore = applicationStore;\n }\n async initialize() {\n // do nothing\n }\n}\n//# sourceMappingURL=ApplicationPlatform.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { BrowserNavigator } from '../navigation/BrowserNavigator.js';\nimport { ApplicationPlatform } from './ApplicationPlatform.js';\nimport { LEGEND_APPLICATION_PARAM_TOKEN } from '../../__lib__/LegendApplicationNavigation.js';\nexport class BrowserPlatform extends ApplicationPlatform {\n navigator;\n constructor(applicationStore, config) {\n super(applicationStore);\n this.navigator = new BrowserNavigator(config.navigate, config.baseUrl);\n }\n getNavigator() {\n return this.navigator;\n }\n async initialize() {\n // set initial color theme\n // NOTE: we allow this to avoid the flash of default color theme\n // when loading the page from another page/ when using the application in an iframe\n const initialColorTheme = this.applicationStore.navigationService.navigator.getCurrentLocationParameterValue(LEGEND_APPLICATION_PARAM_TOKEN.INITIAL_COLOR_THEME);\n if (initialColorTheme) {\n this.applicationStore.layoutService.setColorTheme(initialColorTheme);\n this.applicationStore.navigationService.navigator.INTERNAL__internalizeTransientParameter(LEGEND_APPLICATION_PARAM_TOKEN.INITIAL_COLOR_THEME);\n }\n }\n}\n//# sourceMappingURL=BrowserPlatform.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { guaranteeNonNullable } from '@finos/legend-shared';\nimport { createContext, useContext } from 'react';\nexport const ApplicationPlatformContext = createContext(undefined);\nexport const useApplicationPlatform = () => guaranteeNonNullable(useContext(ApplicationPlatformContext), `Can't find application platform in context`);\n//# sourceMappingURL=ApplicationPlatformProvider.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useLocalObservable } from 'mobx-react-lite';\nimport { useNavigate } from 'react-router';\nimport { BrowserRouter } from 'react-router-dom';\nimport { BrowserPlatform } from '../stores/platform/BrowserPlatform.js';\nimport { ApplicationPlatformContext } from './ApplicationPlatformProvider.js';\nimport { useApplicationStore } from './ApplicationStoreProvider.js';\nimport { stripTrailingSlash } from '../stores/navigation/BrowserNavigator.js';\nconst BrowserPlatformProvider = ({ children, baseUrl }) => {\n const applicationStore = useApplicationStore();\n const navigate = useNavigate();\n const platform = useLocalObservable(() => new BrowserPlatform(applicationStore, {\n navigate,\n baseUrl: stripTrailingSlash(baseUrl),\n }));\n return (_jsx(ApplicationPlatformContext.Provider, { value: platform, children: children }));\n};\nexport const BrowserEnvironmentProvider = ({ children, baseUrl }) => (_jsx(BrowserRouter, { basename: stripTrailingSlash(baseUrl), children: _jsx(BrowserPlatformProvider, { baseUrl: baseUrl, children: children }) }));\n//# sourceMappingURL=BrowserEnvironmentProvider.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport const TailwindCSSPalette = {\n transparent: '#00000000',\n black: '#000000',\n white: '#ffffff',\n slate: {\n 50: '#f8fafc',\n 100: '#f1f5f9',\n 200: '#e2e8f0',\n 300: '#cbd5e1',\n 400: '#94a3b8',\n 500: '#64748b',\n 600: '#475569',\n 700: '#334155',\n 800: '#1e293b',\n 900: '#0f172a',\n 950: '#020617',\n },\n gray: {\n 50: '#f9fafb',\n 100: '#f3f4f6',\n 200: '#e5e7eb',\n 300: '#d1d5db',\n 400: '#9ca3af',\n 500: '#6b7280',\n 600: '#4b5563',\n 700: '#374151',\n 800: '#1f2937',\n 900: '#111827',\n 950: '#030712',\n },\n zinc: {\n 50: '#fafafa',\n 100: '#f4f4f5',\n 200: '#e4e4e7',\n 300: '#d4d4d8',\n 400: '#a1a1aa',\n 500: '#71717a',\n 600: '#52525b',\n 700: '#3f3f46',\n 800: '#27272a',\n 900: '#18181b',\n 950: '#09090b',\n },\n neutral: {\n 50: '#fafafa',\n 100: '#f5f5f5',\n 200: '#e5e5e5',\n 300: '#d4d4d4',\n 400: '#a3a3a3',\n 500: '#737373',\n 600: '#525252',\n 700: '#404040',\n 800: '#262626',\n 900: '#171717',\n 950: '#0a0a0a',\n },\n stone: {\n 50: '#fafaf9',\n 100: '#f5f5f4',\n 200: '#e7e5e4',\n 300: '#d6d3d1',\n 400: '#a8a29e',\n 500: '#78716c',\n 600: '#57534e',\n 700: '#44403c',\n 800: '#292524',\n 900: '#1c1917',\n 950: '#0c0a09',\n },\n red: {\n 50: '#fef2f2',\n 100: '#fee2e2',\n 200: '#fecaca',\n 300: '#fca5a5',\n 400: '#f87171',\n 500: '#ef4444',\n 600: '#dc2626',\n 700: '#b91c1c',\n 800: '#991b1b',\n 900: '#7f1d1d',\n 950: '#450a0a',\n },\n orange: {\n 50: '#fff7ed',\n 100: '#ffedd5',\n 200: '#fed7aa',\n 300: '#fdba74',\n 400: '#fb923c',\n 500: '#f97316',\n 600: '#ea580c',\n 700: '#c2410c',\n 800: '#9a3412',\n 900: '#7c2d12',\n 950: '#431407',\n },\n amber: {\n 50: '#fffbeb',\n 100: '#fef3c7',\n 200: '#fde68a',\n 300: '#fcd34d',\n 400: '#fbbf24',\n 500: '#f59e0b',\n 600: '#d97706',\n 700: '#b45309',\n 800: '#92400e',\n 900: '#78350f',\n 950: '#451a03',\n },\n yellow: {\n 50: '#fefce8',\n 100: '#fef9c3',\n 200: '#fef08a',\n 300: '#fde047',\n 400: '#facc15',\n 500: '#eab308',\n 600: '#ca8a04',\n 700: '#a16207',\n 800: '#854d0e',\n 900: '#713f12',\n 950: '#422006',\n },\n lime: {\n 50: '#f7fee7',\n 100: '#ecfccb',\n 200: '#d9f99d',\n 300: '#bef264',\n 400: '#a3e635',\n 500: '#84cc16',\n 600: '#65a30d',\n 700: '#4d7c0f',\n 800: '#3f6212',\n 900: '#365314',\n 950: '#1a2e05',\n },\n green: {\n 50: '#f0fdf4',\n 100: '#dcfce7',\n 200: '#bbf7d0',\n 300: '#86efac',\n 400: '#4ade80',\n 500: '#22c55e',\n 600: '#16a34a',\n 700: '#15803d',\n 800: '#166534',\n 900: '#14532d',\n 950: '#052e16',\n },\n emerald: {\n 50: '#ecfdf5',\n 100: '#d1fae5',\n 200: '#a7f3d0',\n 300: '#6ee7b7',\n 400: '#34d399',\n 500: '#10b981',\n 600: '#059669',\n 700: '#047857',\n 800: '#065f46',\n 900: '#064e3b',\n 950: '#022c22',\n },\n teal: {\n 50: '#f0fdfa',\n 100: '#ccfbf1',\n 200: '#99f6e4',\n 300: '#5eead4',\n 400: '#2dd4bf',\n 500: '#14b8a6',\n 600: '#0d9488',\n 700: '#0f766e',\n 800: '#115e59',\n 900: '#134e4a',\n 950: '#042f2e',\n },\n cyan: {\n 50: '#ecfeff',\n 100: '#cffafe',\n 200: '#a5f3fc',\n 300: '#67e8f9',\n 400: '#22d3ee',\n 500: '#06b6d4',\n 600: '#0891b2',\n 700: '#0e7490',\n 800: '#155e75',\n 900: '#164e63',\n 950: '#083344',\n },\n sky: {\n 50: '#f0f9ff',\n 100: '#e0f2fe',\n 200: '#bae6fd',\n 300: '#7dd3fc',\n 400: '#38bdf8',\n 500: '#0ea5e9',\n 600: '#0284c7',\n 700: '#0369a1',\n 800: '#075985',\n 900: '#0c4a6e',\n 950: '#082f49',\n },\n blue: {\n 50: '#eff6ff',\n 100: '#dbeafe',\n 200: '#bfdbfe',\n 300: '#93c5fd',\n 400: '#60a5fa',\n 500: '#3b82f6',\n 600: '#2563eb',\n 700: '#1d4ed8',\n 800: '#1e40af',\n 900: '#1e3a8a',\n 950: '#172554',\n },\n indigo: {\n 50: '#eef2ff',\n 100: '#e0e7ff',\n 200: '#c7d2fe',\n 300: '#a5b4fc',\n 400: '#818cf8',\n 500: '#6366f1',\n 600: '#4f46e5',\n 700: '#4338ca',\n 800: '#3730a3',\n 900: '#312e81',\n 950: '#1e1b4b',\n },\n violet: {\n 50: '#f5f3ff',\n 100: '#ede9fe',\n 200: '#ddd6fe',\n 300: '#c4b5fd',\n 400: '#a78bfa',\n 500: '#8b5cf6',\n 600: '#7c3aed',\n 700: '#6d28d9',\n 800: '#5b21b6',\n 900: '#4c1d95',\n 950: '#2e1065',\n },\n purple: {\n 50: '#faf5ff',\n 100: '#f3e8ff',\n 200: '#e9d5ff',\n 300: '#d8b4fe',\n 400: '#c084fc',\n 500: '#a855f7',\n 600: '#9333ea',\n 700: '#7e22ce',\n 800: '#6b21a8',\n 900: '#581c87',\n 950: '#3b0764',\n },\n fuchsia: {\n 50: '#fdf4ff',\n 100: '#fae8ff',\n 200: '#f5d0fe',\n 300: '#f0abfc',\n 400: '#e879f9',\n 500: '#d946ef',\n 600: '#c026d3',\n 700: '#a21caf',\n 800: '#86198f',\n 900: '#701a75',\n 950: '#4a044e',\n },\n pink: {\n 50: '#fdf2f8',\n 100: '#fce7f3',\n 200: '#fbcfe8',\n 300: '#f9a8d4',\n 400: '#f472b6',\n 500: '#ec4899',\n 600: '#db2777',\n 700: '#be185d',\n 800: '#9d174d',\n 900: '#831843',\n 950: '#500724',\n },\n rose: {\n 50: '#fff1f2',\n 100: '#ffe4e6',\n 200: '#fecdd3',\n 300: '#fda4af',\n 400: '#fb7185',\n 500: '#f43f5e',\n 600: '#e11d48',\n 700: '#be123c',\n 800: '#9f1239',\n 900: '#881337',\n 950: '#4c0519',\n },\n};\n//# sourceMappingURL=TailwindCSSPalette.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport const MULTIPLICITY_INFINITE = '*';\nexport const ELEMENT_PATH_DELIMITER = '::';\nexport const MULTIPLICITY_RANGE_OPERATOR = '..';\nexport const PROPERTY_ACCESSOR = '.';\nexport const UNIT_PATH_DELIMITER = '~';\nexport const LAMBDA_PIPE = '|';\nexport const DEFAULT_SOURCE_PARAMETER_NAME = 'src';\nexport const DEFAULT_DATABASE_SCHEMA_NAME = 'default';\nexport const SECTION_INDEX_ELEMENT_PATH = '__internal__::SectionIndex';\nexport const VARIABLE_REFERENCE_TOKEN = '$';\nexport const TYPE_CAST_TOKEN = '@';\nexport const ARROW_FUNCTION_TOKEN = '->';\nexport const LATEST_DATE = '%latest';\nexport const PARSER_SECTION_MARKER = '###';\nexport const FUNCTION_SIGNATURE_MULTIPLICITY_INFINITE_TOKEN = 'MANY';\nexport const DIRECTORY_PATH_DELIMITER = '/';\nexport const SOURCE_INFORMATION_PROPERTY_KEY_SUFFIX = 'sourceInformation';\nexport const RESERVERD_PACKAGE_NAMES = ['$implicit'];\nexport var ROOT_PACKAGE_NAME;\n(function (ROOT_PACKAGE_NAME) {\n ROOT_PACKAGE_NAME[\"CORE\"] = \"CORE\";\n ROOT_PACKAGE_NAME[\"MAIN\"] = \"ROOT\";\n ROOT_PACKAGE_NAME[\"MODEL_GENERATION\"] = \"MODEL_GENERATION_ROOT\";\n ROOT_PACKAGE_NAME[\"SYSTEM\"] = \"SYSTEM_ROOT\";\n ROOT_PACKAGE_NAME[\"PROJECT_DEPENDENCY_ROOT\"] = \"PROJECT_DEPENDENCY_ROOT\";\n})(ROOT_PACKAGE_NAME || (ROOT_PACKAGE_NAME = {}));\nexport var PRIMITIVE_TYPE;\n(function (PRIMITIVE_TYPE) {\n PRIMITIVE_TYPE[\"STRING\"] = \"String\";\n PRIMITIVE_TYPE[\"BOOLEAN\"] = \"Boolean\";\n PRIMITIVE_TYPE[\"BINARY\"] = \"Binary\";\n PRIMITIVE_TYPE[\"NUMBER\"] = \"Number\";\n PRIMITIVE_TYPE[\"INTEGER\"] = \"Integer\";\n PRIMITIVE_TYPE[\"FLOAT\"] = \"Float\";\n PRIMITIVE_TYPE[\"DECIMAL\"] = \"Decimal\";\n PRIMITIVE_TYPE[\"DATE\"] = \"Date\";\n PRIMITIVE_TYPE[\"STRICTDATE\"] = \"StrictDate\";\n PRIMITIVE_TYPE[\"DATETIME\"] = \"DateTime\";\n PRIMITIVE_TYPE[\"STRICTTIME\"] = \"StrictTime\";\n // NOTE: `LatestDate` is a special type that is used for milestoning in store so its used in the body of function and lamdba but never should be exposed to users\n // as such, if there is a day we want to have `LatestDate` in the graph but not exposed to the users\n PRIMITIVE_TYPE[\"LATESTDATE\"] = \"LatestDate\";\n PRIMITIVE_TYPE[\"BYTE\"] = \"Byte\";\n})(PRIMITIVE_TYPE || (PRIMITIVE_TYPE = {}));\nexport var ATOMIC_TEST_TYPE;\n(function (ATOMIC_TEST_TYPE) {\n ATOMIC_TEST_TYPE[\"Service_Test\"] = \"serviceTest\";\n ATOMIC_TEST_TYPE[\"Mapping_Test\"] = \"mappingTest\";\n ATOMIC_TEST_TYPE[\"Function_Test\"] = \"functionTest\";\n})(ATOMIC_TEST_TYPE || (ATOMIC_TEST_TYPE = {}));\n// NOTE: the list of auto-import are kept in `m3.pure` file in `finos/legend-pure`,\n// this includes a more extensive list of packages which contain native functions, classes, etc.\n// See https://github.com/finos/legend-pure/blob/master/legend-pure-core/legend-pure-m3-core/src/main/resources/platform/pure/grammar/m3.pure\nexport const AUTO_IMPORTS = [\n // 'meta::pure::metamodel',\n 'meta::pure::metamodel::type',\n // 'meta::pure::metamodel::type::generics',\n // 'meta::pure::metamodel::relationship',\n // 'meta::pure::metamodel::valuespecification',\n // 'meta::pure::metamodel::multiplicity',\n // 'meta::pure::metamodel::function',\n // 'meta::pure::metamodel::function::property',\n // 'meta::pure::metamodel::extension',\n // 'meta::pure::metamodel::import',\n 'meta::pure::functions::date',\n // 'meta::pure::functions::string',\n // 'meta::pure::functions::collection',\n // 'meta::pure::functions::meta',\n // 'meta::pure::functions::constraints',\n // 'meta::pure::functions::lang',\n // 'meta::pure::functions::boolean',\n // 'meta::pure::functions::tools',\n // 'meta::pure::functions::io',\n // 'meta::pure::functions::math',\n // 'meta::pure::functions::asserts',\n // 'meta::pure::functions::test',\n // 'meta::pure::functions::multiplicity',\n // 'meta::pure::router',\n // 'meta::pure::service',\n // 'meta::pure::tds',\n // 'meta::pure::tools',\n 'meta::pure::profiles',\n];\nexport var CORE_PURE_PATH;\n(function (CORE_PURE_PATH) {\n // type\n CORE_PURE_PATH[\"ANY\"] = \"meta::pure::metamodel::type::Any\";\n CORE_PURE_PATH[\"NIL\"] = \"meta::pure::metamodel::type::Nil\";\n CORE_PURE_PATH[\"RELATION\"] = \"meta::pure::metamodel::relation::Relation\";\n // profile\n CORE_PURE_PATH[\"PROFILE_DOC\"] = \"meta::pure::profiles::doc\";\n CORE_PURE_PATH[\"PROFILE_TEMPORAL\"] = \"meta::pure::profiles::temporal\";\n // classifier paths\n CORE_PURE_PATH[\"PROFILE\"] = \"meta::pure::metamodel::extension::Profile\";\n CORE_PURE_PATH[\"ENUMERATION\"] = \"meta::pure::metamodel::type::Enumeration\";\n CORE_PURE_PATH[\"MEASURE\"] = \"meta::pure::metamodel::type::Measure\";\n CORE_PURE_PATH[\"CLASS\"] = \"meta::pure::metamodel::type::Class\";\n CORE_PURE_PATH[\"ASSOCIATION\"] = \"meta::pure::metamodel::relationship::Association\";\n CORE_PURE_PATH[\"FUNCTION\"] = \"meta::pure::metamodel::function::ConcreteFunctionDefinition\";\n CORE_PURE_PATH[\"FLAT_DATA\"] = \"meta::flatData::metamodel::FlatData\";\n CORE_PURE_PATH[\"DATABASE\"] = \"meta::relational::metamodel::Database\";\n CORE_PURE_PATH[\"MAPPING\"] = \"meta::pure::mapping::Mapping\";\n CORE_PURE_PATH[\"SERVICE\"] = \"meta::legend::service::metamodel::Service\";\n CORE_PURE_PATH[\"CONNECTION\"] = \"meta::pure::runtime::PackageableConnection\";\n CORE_PURE_PATH[\"RUNTIME\"] = \"meta::pure::runtime::PackageableRuntime\";\n CORE_PURE_PATH[\"EXECUTION_ENVIRONMENT\"] = \"meta::legend::service::metamodel::ExecutionEnvironmentInstance\";\n CORE_PURE_PATH[\"FILE_GENERATION\"] = \"meta::pure::generation::metamodel::GenerationConfiguration\";\n CORE_PURE_PATH[\"GENERATION_SPECIFICATION\"] = \"meta::pure::generation::metamodel::GenerationSpecification\";\n CORE_PURE_PATH[\"SECTION_INDEX\"] = \"meta::pure::metamodel::section::SectionIndex\";\n CORE_PURE_PATH[\"DATA_ELEMENT\"] = \"meta::pure::data::DataElement\";\n CORE_PURE_PATH[\"SNOWFLAKE_APP\"] = \"meta::external::function::activator::snowflakeApp::SnowflakeApp\";\n CORE_PURE_PATH[\"HOSTED_SERVICE\"] = \"meta::external::function::activator::hostedService::HostedService\";\n CORE_PURE_PATH[\"TABULAR_RESULT\"] = \"meta::pure::mapping::Result\";\n})(CORE_PURE_PATH || (CORE_PURE_PATH = {}));\nexport const PURE_DOC_TAG = 'doc';\nexport const PURE_DEPRECATED_STEREOTYPE = 'deprecated';\nexport var MILESTONING_STEREOTYPE;\n(function (MILESTONING_STEREOTYPE) {\n MILESTONING_STEREOTYPE[\"BUSINESS_TEMPORAL\"] = \"businesstemporal\";\n MILESTONING_STEREOTYPE[\"PROCESSING_TEMPORAL\"] = \"processingtemporal\";\n MILESTONING_STEREOTYPE[\"BITEMPORAL\"] = \"bitemporal\";\n})(MILESTONING_STEREOTYPE || (MILESTONING_STEREOTYPE = {}));\nexport var MILESTONING_VERSION_PROPERTY_SUFFIX;\n(function (MILESTONING_VERSION_PROPERTY_SUFFIX) {\n MILESTONING_VERSION_PROPERTY_SUFFIX[\"ALL_VERSIONS\"] = \"AllVersions\";\n MILESTONING_VERSION_PROPERTY_SUFFIX[\"ALL_VERSIONS_IN_RANGE\"] = \"AllVersionsInRange\";\n})(MILESTONING_VERSION_PROPERTY_SUFFIX || (MILESTONING_VERSION_PROPERTY_SUFFIX = {}));\nexport const MILESTONING_START_DATE_PARAMETER_NAME = 'startDate';\nexport const MILESTONING_END_DATE_PARAMETER_NAME = 'endDate';\nexport const PROCESSING_DATE_MILESTONING_PROPERTY_NAME = 'processingDate';\nexport const BUSINESS_DATE_MILESTONING_PROPERTY_NAME = 'businessDate';\nexport var PackageableElementPointerType;\n(function (PackageableElementPointerType) {\n PackageableElementPointerType[\"CLASS\"] = \"CLASS\";\n PackageableElementPointerType[\"STORE\"] = \"STORE\";\n PackageableElementPointerType[\"MAPPING\"] = \"MAPPING\";\n PackageableElementPointerType[\"RUNTIME\"] = \"RUNTIME\";\n PackageableElementPointerType[\"FUNCTION\"] = \"FUNCTION\";\n PackageableElementPointerType[\"FILE_GENERATION\"] = \"FILE_GENERATION\";\n PackageableElementPointerType[\"SERVICE\"] = \"SERVICE\";\n PackageableElementPointerType[\"DATA\"] = \"DATA\";\n})(PackageableElementPointerType || (PackageableElementPointerType = {}));\nexport var SUPPORTED_FUNCTIONS;\n(function (SUPPORTED_FUNCTIONS) {\n SUPPORTED_FUNCTIONS[\"LET\"] = \"meta::pure::functions::lang::letFunction\";\n SUPPORTED_FUNCTIONS[\"NEW\"] = \"meta::pure::functions::meta::new\";\n // from\n SUPPORTED_FUNCTIONS[\"FROM\"] = \"meta::pure::mapping::from\";\n})(SUPPORTED_FUNCTIONS || (SUPPORTED_FUNCTIONS = {}));\nexport const DATE_TIME_FORMAT_WITH_MILLISECONDS = \"yyyy-MM-dd'T'HH:mm:ss.SSSxxxx\";\nexport const DATE_TIME_FORMAT = \"yyyy-MM-dd'T'HH:mm:ssxxxx\";\nexport const DATE_FORMAT = 'yyyy-MM-dd';\n// Generation Const\nexport const DEFAULT_GENERATION_PACKAGE = 'generated';\n// Query\nexport const QUERY_PROFILE_TAG_CLASS = 'class';\nexport const QUERY_PROFILE_PATH = 'meta::pure::profiles::query';\n//# sourceMappingURL=MetaModelConst.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { TailwindCSSPalette } from '@finos/legend-art';\nimport { PRIMITIVE_TYPE } from '@finos/legend-graph';\nimport { IllegalStateError } from '@finos/legend-shared';\nexport var DataCubeFunction;\n(function (DataCubeFunction) {\n // relation\n DataCubeFunction[\"EXTEND\"] = \"meta::pure::functions::relation::extend\";\n DataCubeFunction[\"FILTER\"] = \"meta::pure::functions::relation::filter\";\n DataCubeFunction[\"GROUP_BY\"] = \"meta::pure::functions::relation::groupBy\";\n DataCubeFunction[\"LIMIT\"] = \"meta::pure::functions::relation::limit\";\n DataCubeFunction[\"PIVOT\"] = \"meta::pure::functions::relation::pivot\";\n // RENAME = 'meta::pure::functions::relation::rename',\n DataCubeFunction[\"SELECT\"] = \"meta::pure::functions::relation::select\";\n DataCubeFunction[\"SLICE\"] = \"meta::pure::functions::relation::slice\";\n DataCubeFunction[\"SORT\"] = \"meta::pure::functions::relation::sort\";\n // generic\n DataCubeFunction[\"CAST\"] = \"meta::pure::functions::lang::cast\";\n DataCubeFunction[\"FROM\"] = \"meta::pure::mapping::from\";\n // sort\n DataCubeFunction[\"ASCENDING\"] = \"meta::pure::functions::relation::ascending\";\n DataCubeFunction[\"DESCENDING\"] = \"meta::pure::functions::relation::descending\";\n DataCubeFunction[\"ABS\"] = \"meta::pure::functions::math::abs\";\n // filter\n DataCubeFunction[\"AND\"] = \"meta::pure::functions::boolean::and\";\n DataCubeFunction[\"OR\"] = \"meta::pure::functions::boolean::or\";\n DataCubeFunction[\"NOT\"] = \"meta::pure::functions::boolean::not\";\n DataCubeFunction[\"TO_LOWERCASE\"] = \"meta::pure::functions::string::toLower\";\n DataCubeFunction[\"CONTAINS\"] = \"meta::pure::functions::string::contains\";\n DataCubeFunction[\"ENDS_WITH\"] = \"meta::pure::functions::string::endsWith\";\n DataCubeFunction[\"EQUAL\"] = \"meta::pure::functions::boolean::equal\";\n DataCubeFunction[\"GREATER_THAN\"] = \"meta::pure::functions::boolean::greaterThan\";\n DataCubeFunction[\"GREATER_THAN_OR_EQUAL\"] = \"meta::pure::functions::boolean::greaterThanEqual\";\n DataCubeFunction[\"IN\"] = \"meta::pure::functions::collection::in\";\n DataCubeFunction[\"IS_EMPTY\"] = \"meta::pure::functions::collection::isEmpty\";\n DataCubeFunction[\"LESS_THAN\"] = \"meta::pure::functions::boolean::lessThan\";\n DataCubeFunction[\"LESS_THAN_OR_EQUAL\"] = \"meta::pure::functions::boolean::lessThanEqual\";\n DataCubeFunction[\"STARTS_WITH\"] = \"meta::pure::functions::string::startsWith\";\n // aggregate\n DataCubeFunction[\"AVERAGE\"] = \"meta::pure::functions::math::average\";\n DataCubeFunction[\"COUNT\"] = \"meta::pure::functions::collection::count\";\n DataCubeFunction[\"DISTINCT\"] = \"meta::pure::functions::collection::distinct\";\n DataCubeFunction[\"FIRST\"] = \"meta::pure::functions::collection::first\";\n DataCubeFunction[\"JOIN_STRINGS\"] = \"meta::pure::functions::string::joinStrings\";\n DataCubeFunction[\"LAST\"] = \"meta::pure::functions::collection::last\";\n DataCubeFunction[\"MAX\"] = \"meta::pure::functions::collection::max\";\n DataCubeFunction[\"MIN\"] = \"meta::pure::functions::collection::min\";\n DataCubeFunction[\"SUM\"] = \"meta::pure::functions::math::sum\";\n DataCubeFunction[\"STANDARD_DEVIATION_POPULATION\"] = \"meta::pure::functions::math::stdDevPopulation\";\n DataCubeFunction[\"STANDARD_DEVIATION_SAMPLE\"] = \"meta::pure::functions::math::stdDevSample\";\n DataCubeFunction[\"UNIQUE_VALUE_ONLY\"] = \"meta::pure::functions::collection::uniqueValueOnly\";\n DataCubeFunction[\"VARIANCE_POPULATION\"] = \"meta::pure::functions::math::variancePopulation\";\n DataCubeFunction[\"VARIANCE_SAMPLE\"] = \"meta::pure::functions::math::varianceSample\";\n // PERCENTILE = 'meta::pure::functions::math::percentile',\n})(DataCubeFunction || (DataCubeFunction = {}));\nexport var DataCubeNumberScale;\n(function (DataCubeNumberScale) {\n DataCubeNumberScale[\"BASIS_POINT\"] = \"Basis Points (bp)\";\n DataCubeNumberScale[\"PERCENT\"] = \"Percent (%)\";\n DataCubeNumberScale[\"THOUSANDS\"] = \"Thousands (k)\";\n DataCubeNumberScale[\"MILLIONS\"] = \"Millions (m)\";\n DataCubeNumberScale[\"BILLIONS\"] = \"Billions (b)\";\n DataCubeNumberScale[\"TRILLIONS\"] = \"Trillions (t)\";\n DataCubeNumberScale[\"AUTO\"] = \"Auto (k/m/b/t)\";\n})(DataCubeNumberScale || (DataCubeNumberScale = {}));\nexport var DataCubeFont;\n(function (DataCubeFont) {\n // sans-serif\n DataCubeFont[\"ARIAL\"] = \"Arial\";\n DataCubeFont[\"ROBOTO\"] = \"Roboto\";\n DataCubeFont[\"ROBOTO_CONDENSED\"] = \"Roboto Condensed\";\n // serif\n DataCubeFont[\"TIMES_NEW_ROMAN\"] = \"Times New Roman\";\n DataCubeFont[\"GEORGIA\"] = \"Georgia\";\n DataCubeFont[\"ROBOTO_SERIF\"] = \"Roboto Serif\";\n // monospace\n DataCubeFont[\"JERBRAINS_MONO\"] = \"Jetbrains Mono\";\n DataCubeFont[\"ROBOTO_MONO\"] = \"Roboto Mono\";\n DataCubeFont[\"UBUNTU_MONO\"] = \"Ubuntu Mono\";\n})(DataCubeFont || (DataCubeFont = {}));\nexport var DataCubeFontTextAlignment;\n(function (DataCubeFontTextAlignment) {\n DataCubeFontTextAlignment[\"CENTER\"] = \"center\";\n DataCubeFontTextAlignment[\"LEFT\"] = \"left\";\n DataCubeFontTextAlignment[\"RIGHT\"] = \"right\";\n})(DataCubeFontTextAlignment || (DataCubeFontTextAlignment = {}));\nexport var DataCubeFontCase;\n(function (DataCubeFontCase) {\n DataCubeFontCase[\"LOWERCASE\"] = \"lowercase\";\n DataCubeFontCase[\"UPPERCASE\"] = \"uppercase\";\n DataCubeFontCase[\"CAPITALIZE\"] = \"capitalize\";\n})(DataCubeFontCase || (DataCubeFontCase = {}));\nexport var DataCubeFontFormatUnderlineVariant;\n(function (DataCubeFontFormatUnderlineVariant) {\n DataCubeFontFormatUnderlineVariant[\"SOLID\"] = \"solid\";\n DataCubeFontFormatUnderlineVariant[\"DASHED\"] = \"dashed\";\n DataCubeFontFormatUnderlineVariant[\"DOTTED\"] = \"dotted\";\n DataCubeFontFormatUnderlineVariant[\"DOUBLE\"] = \"double\";\n DataCubeFontFormatUnderlineVariant[\"WAVY\"] = \"wavy\";\n})(DataCubeFontFormatUnderlineVariant || (DataCubeFontFormatUnderlineVariant = {}));\nexport var DataCubeColumnKind;\n(function (DataCubeColumnKind) {\n DataCubeColumnKind[\"MEASURE\"] = \"Measure\";\n DataCubeColumnKind[\"DIMENSION\"] = \"Dimension\";\n})(DataCubeColumnKind || (DataCubeColumnKind = {}));\nexport var DataCubeOperationAdvancedValueType;\n(function (DataCubeOperationAdvancedValueType) {\n DataCubeOperationAdvancedValueType[\"COLUMN\"] = \"COLUMN\";\n // PARAMETER\n})(DataCubeOperationAdvancedValueType || (DataCubeOperationAdvancedValueType = {}));\nexport var DataCubeQueryAggregateOperator;\n(function (DataCubeQueryAggregateOperator) {\n DataCubeQueryAggregateOperator[\"SUM\"] = \"sum\";\n DataCubeQueryAggregateOperator[\"AVERAGE\"] = \"avg\";\n DataCubeQueryAggregateOperator[\"COUNT\"] = \"count\";\n DataCubeQueryAggregateOperator[\"MIN\"] = \"min\";\n DataCubeQueryAggregateOperator[\"MAX\"] = \"max\";\n DataCubeQueryAggregateOperator[\"UNIQUE\"] = \"uniq\";\n DataCubeQueryAggregateOperator[\"FIRST\"] = \"first\";\n DataCubeQueryAggregateOperator[\"LAST\"] = \"last\";\n // MEDIAN = 'median',\n DataCubeQueryAggregateOperator[\"VARIANCE_POPULATION\"] = \"var\";\n DataCubeQueryAggregateOperator[\"VARIANCE_SAMPLE\"] = \"var_sample\";\n DataCubeQueryAggregateOperator[\"STANDARD_DEVIATION_POPULATION\"] = \"std\";\n DataCubeQueryAggregateOperator[\"STANDARD_DEVIATION_SAMPLE\"] = \"std_sample\";\n // STANDARD_ERROR = 'stderr',\n // NULL = 'null',\n // ssq\n // countvalid\n // countnull\n // uniqunstrict\n // minmagnitude\n // maxmagnitude\n // commonprefix\n // commonprefixunstrict\n DataCubeQueryAggregateOperator[\"JOIN_STRINGS\"] = \"strjoin\";\n // strjoinuniq\n // splitjoin\n // daterange\n // wavg\n // wstderr\n // wsum\n // custom\n})(DataCubeQueryAggregateOperator || (DataCubeQueryAggregateOperator = {}));\nexport var DataCubeQueryClientSideAggregateOperator;\n(function (DataCubeQueryClientSideAggregateOperator) {\n DataCubeQueryClientSideAggregateOperator[\"SUM\"] = \"sum\";\n DataCubeQueryClientSideAggregateOperator[\"AVERAGE\"] = \"avg\";\n DataCubeQueryClientSideAggregateOperator[\"MEDIAN\"] = \"median\";\n DataCubeQueryClientSideAggregateOperator[\"COUNT\"] = \"count\";\n DataCubeQueryClientSideAggregateOperator[\"MIN\"] = \"min\";\n DataCubeQueryClientSideAggregateOperator[\"MAX\"] = \"max\";\n DataCubeQueryClientSideAggregateOperator[\"VARIANCE_POPULATION\"] = \"var\";\n DataCubeQueryClientSideAggregateOperator[\"VARIANCE_SAMPLE\"] = \"var_sample\";\n DataCubeQueryClientSideAggregateOperator[\"STANDARD_DEVIATION_POPULATION\"] = \"std\";\n DataCubeQueryClientSideAggregateOperator[\"STANDARD_DEVIATION_SAMPLE\"] = \"std_sample\";\n})(DataCubeQueryClientSideAggregateOperator || (DataCubeQueryClientSideAggregateOperator = {}));\nexport var DataCubeQueryFilterOperator;\n(function (DataCubeQueryFilterOperator) {\n DataCubeQueryFilterOperator[\"LESS_THAN\"] = \"<\";\n DataCubeQueryFilterOperator[\"LESS_THAN_OR_EQUAL\"] = \"<=\";\n DataCubeQueryFilterOperator[\"EQUAL\"] = \"=\";\n DataCubeQueryFilterOperator[\"NOT_EQUAL\"] = \"!=\";\n DataCubeQueryFilterOperator[\"GREATER_THAN\"] = \">\";\n DataCubeQueryFilterOperator[\"GREATER_THAN_OR_EQUAL\"] = \">=\";\n DataCubeQueryFilterOperator[\"IN\"] = \"in\";\n DataCubeQueryFilterOperator[\"NOT_IN\"] = \"not in\";\n DataCubeQueryFilterOperator[\"IS_NULL\"] = \"is null\";\n DataCubeQueryFilterOperator[\"IS_NOT_NULL\"] = \"is not null\";\n // string ONLY\n DataCubeQueryFilterOperator[\"EQUAL_CASE_INSENSITIVE\"] = \"= (case-insensitive)\";\n DataCubeQueryFilterOperator[\"NOT_EQUAL_CASE_INSENSITIVE\"] = \"!= (case-insensitive)\";\n DataCubeQueryFilterOperator[\"IN_CASE_INSENSITIVE\"] = \"in (case-insensitive)\";\n DataCubeQueryFilterOperator[\"NOT_IN_CASE_INSENSITIVE\"] = \"not in (case-insensitive)\";\n DataCubeQueryFilterOperator[\"CONTAIN\"] = \"contains\";\n DataCubeQueryFilterOperator[\"CONTAIN_CASE_INSENSITIVE\"] = \"contains (case-insensitive)\";\n DataCubeQueryFilterOperator[\"NOT_CONTAIN\"] = \"does not contain\";\n DataCubeQueryFilterOperator[\"START_WITH\"] = \"starts with\";\n DataCubeQueryFilterOperator[\"START_WITH_CASE_INSENSITIVE\"] = \"starts with (case-insensitive)\";\n DataCubeQueryFilterOperator[\"NOT_START_WITH\"] = \"does not start with\";\n DataCubeQueryFilterOperator[\"END_WITH\"] = \"ends with\";\n DataCubeQueryFilterOperator[\"END_WITH_CASE_INSENSITIVE\"] = \"ends with (case-insensitive)\";\n DataCubeQueryFilterOperator[\"NOT_END_WITH\"] = \"does not end with\";\n // column\n DataCubeQueryFilterOperator[\"LESS_THAN_COLUMN\"] = \"< value in column\";\n DataCubeQueryFilterOperator[\"LESS_THAN_OR_EQUAL_COLUMN\"] = \"<= value in column\";\n DataCubeQueryFilterOperator[\"EQUAL_COLUMN\"] = \"= value in column\";\n DataCubeQueryFilterOperator[\"EQUAL_CASE_INSENSITIVE_COLUMN\"] = \"= (case-insensitive) value in column\";\n DataCubeQueryFilterOperator[\"NOT_EQUAL_COLUMN\"] = \"!= value in column\";\n DataCubeQueryFilterOperator[\"NOT_EQUAL_CASE_INSENSITIVE_COLUMN\"] = \"!= (case-insensitive) value in column\";\n DataCubeQueryFilterOperator[\"GREATER_THAN_COLUMN\"] = \"> value in column\";\n DataCubeQueryFilterOperator[\"GREATER_THAN_OR_EQUAL_COLUMN\"] = \">= value in column\";\n // TODO?: having, having in aggregate, between\n})(DataCubeQueryFilterOperator || (DataCubeQueryFilterOperator = {}));\nexport var DataCubeQueryFilterGroupOperator;\n(function (DataCubeQueryFilterGroupOperator) {\n DataCubeQueryFilterGroupOperator[\"AND\"] = \"and\";\n DataCubeQueryFilterGroupOperator[\"OR\"] = \"or\";\n})(DataCubeQueryFilterGroupOperator || (DataCubeQueryFilterGroupOperator = {}));\nexport var DataCubeQuerySortDirection;\n(function (DataCubeQuerySortDirection) {\n DataCubeQuerySortDirection[\"ASCENDING\"] = \"Ascending\";\n DataCubeQuerySortDirection[\"DESCENDING\"] = \"Descending\";\n})(DataCubeQuerySortDirection || (DataCubeQuerySortDirection = {}));\nexport var DataCubeColumnPinPlacement;\n(function (DataCubeColumnPinPlacement) {\n DataCubeColumnPinPlacement[\"LEFT\"] = \"Left\";\n DataCubeColumnPinPlacement[\"RIGHT\"] = \"Right\";\n})(DataCubeColumnPinPlacement || (DataCubeColumnPinPlacement = {}));\nexport var DataCubeColumnDataType;\n(function (DataCubeColumnDataType) {\n DataCubeColumnDataType[\"NUMBER\"] = \"Numeric\";\n DataCubeColumnDataType[\"TEXT\"] = \"Text\";\n DataCubeColumnDataType[\"DATE\"] = \"Date\";\n DataCubeColumnDataType[\"TIME\"] = \"Time\";\n})(DataCubeColumnDataType || (DataCubeColumnDataType = {}));\nexport function getDataType(type) {\n switch (type) {\n case PRIMITIVE_TYPE.NUMBER:\n case PRIMITIVE_TYPE.INTEGER:\n case PRIMITIVE_TYPE.DECIMAL:\n case PRIMITIVE_TYPE.FLOAT:\n return DataCubeColumnDataType.NUMBER;\n case PRIMITIVE_TYPE.DATE:\n case PRIMITIVE_TYPE.STRICTDATE:\n return DataCubeColumnDataType.DATE;\n case PRIMITIVE_TYPE.DATETIME:\n return DataCubeColumnDataType.TIME;\n case PRIMITIVE_TYPE.STRING:\n default:\n return DataCubeColumnDataType.TEXT;\n }\n}\nexport function ofDataType(type, dataTypes) {\n return dataTypes.includes(getDataType(type));\n}\nexport const PIVOT_COLUMN_NAME_VALUE_SEPARATOR = '__|__';\nexport function isPivotResultColumnName(columnName) {\n return columnName.includes(PIVOT_COLUMN_NAME_VALUE_SEPARATOR);\n}\nexport function getPivotResultColumnBaseColumnName(columnName) {\n if (!isPivotResultColumnName(columnName)) {\n throw new IllegalStateError(`Column '${columnName}' is not a pivot result column`);\n }\n return columnName.substring(columnName.lastIndexOf(PIVOT_COLUMN_NAME_VALUE_SEPARATOR) +\n PIVOT_COLUMN_NAME_VALUE_SEPARATOR.length);\n}\nexport const TREE_COLUMN_VALUE_SEPARATOR = '__/__';\nexport const DEFAULT_LAMBDA_VARIABLE_NAME = 'x';\nexport const DEFAULT_REPORT_NAME = 'New Report';\nexport const DEFAULT_TREE_COLUMN_SORT_DIRECTION = DataCubeQuerySortDirection.ASCENDING;\nexport const DEFAULT_PIVOT_STATISTIC_COLUMN_NAME = 'Total';\nexport const DEFAULT_URL_LABEL_QUERY_PARAM = 'dataCube.linkLabel';\nexport const DEFAULT_MISSING_VALUE_DISPLAY_TEXT = '';\nexport const DEFAULT_GRID_LINE_COLOR = TailwindCSSPalette.neutral[300];\nexport const DEFAULT_ROW_HIGHLIGHT_BACKGROUND_COLOR = '#d7e0eb';\nexport const DEFAULT_COLUMN_WIDTH = 300;\nexport const DEFAULT_COLUMN_MIN_WIDTH = 50;\nexport const DEFAULT_COLUMN_MAX_WIDTH = undefined;\nexport const DEFAULT_FONT_FAMILY = DataCubeFont.ROBOTO;\nexport const DEFAULT_FONT_SIZE = 11;\nexport const DEFAULT_FONT_BOLD = false;\nexport const DEFAULT_FONT_ITALIC = false;\nexport const DEFAULT_FONT_CASE = undefined;\nexport const DEFAULT_FONT_UNDERLINED = undefined;\nexport const DEFAULT_FONT_STRIKETHROUGH = false;\nexport const DEFAULT_TEXT_ALIGN = DataCubeFontTextAlignment.LEFT;\nexport const DEFAULT_FOREGROUND_COLOR = TailwindCSSPalette.black;\nexport const DEFAULT_BACKGROUND_COLOR = TailwindCSSPalette.transparent;\nexport const DEFAULT_ROW_BACKGROUND_COLOR = TailwindCSSPalette.white;\nexport const DEFAULT_NEGATIVE_FOREGROUND_COLOR = TailwindCSSPalette.red[500];\nexport const DEFAULT_ZERO_FOREGROUND_COLOR = TailwindCSSPalette.neutral[400];\nexport const DEFAULT_ERROR_FOREGROUND_COLOR = TailwindCSSPalette.blue[600];\n//# sourceMappingURL=DataCubeQueryEngine.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DEFAULT_BACKGROUND_COLOR, DEFAULT_ERROR_FOREGROUND_COLOR, DEFAULT_FOREGROUND_COLOR, DEFAULT_NEGATIVE_FOREGROUND_COLOR, DEFAULT_ROW_HIGHLIGHT_BACKGROUND_COLOR, DEFAULT_ZERO_FOREGROUND_COLOR, DEFAULT_GRID_LINE_COLOR, DEFAULT_FONT_FAMILY, DEFAULT_FONT_SIZE, DEFAULT_FONT_BOLD, DEFAULT_FONT_ITALIC, DEFAULT_FONT_STRIKETHROUGH, DEFAULT_TEXT_ALIGN, DEFAULT_FONT_UNDERLINED, DEFAULT_FONT_CASE, DataCubeColumnKind, DEFAULT_PIVOT_STATISTIC_COLUMN_NAME, DEFAULT_TREE_COLUMN_SORT_DIRECTION, DEFAULT_REPORT_NAME, } from '../DataCubeQueryEngine.js';\nimport { SerializationFactory, usingModelSchema } from '@finos/legend-shared';\nimport { createModelSchema, list, optional, primitive, raw } from 'serializr';\nexport class DataCubeColumnConfiguration {\n name;\n type;\n kind = DataCubeColumnKind.DIMENSION;\n displayName;\n decimals;\n displayCommas = false;\n negativeNumberInParens = false;\n numberScale;\n missingValueDisplayText;\n fontFamily;\n fontSize;\n fontBold;\n fontItalic;\n fontUnderline;\n fontStrikethrough;\n fontCase;\n textAlign;\n normalForegroundColor;\n negativeForegroundColor;\n zeroForegroundColor;\n errorForegroundColor;\n normalBackgroundColor;\n negativeBackgroundColor;\n zeroBackgroundColor;\n errorBackgroundColor;\n /**\n * Used to indicate if the column is to be fetched as part of the result\n * or to be used in aggregation. This would influence data-fetching.\n */\n isSelected = true;\n /**\n * Unlike `isSelected`, this is used to indicate if the column is to be displayed\n * in the grid or not, this would not influence data-fetching, i.e. the column\n * is still fetched and used in various part of the queries, but the column associated\n * will not be displayed in the result grid.\n */\n hideFromView = false;\n blur = false;\n fixedWidth;\n minWidth;\n maxWidth;\n pinned;\n displayAsLink = false;\n linkLabelParameter;\n // NOTE: these configurations, when changed, would potentially trigger data-fetching\n aggregateOperator;\n aggregationParameters = [];\n excludedFromPivot = true; // this agrees with default column kind set as Dimension\n pivotSortDirection;\n pivotStatisticColumnFunction;\n constructor(name, type) {\n this.name = name;\n this.type = type;\n }\n static serialization = new SerializationFactory(createModelSchema(DataCubeColumnConfiguration, {\n aggregateOperator: primitive(),\n aggregationParameters: list(raw()),\n blur: primitive(),\n decimals: optional(primitive()),\n displayAsLink: primitive(),\n displayCommas: primitive(),\n displayName: optional(primitive()),\n errorBackgroundColor: optional(primitive()),\n errorForegroundColor: optional(primitive()),\n excludedFromPivot: primitive(),\n fixedWidth: optional(primitive()),\n fontBold: optional(primitive()),\n fontCase: optional(primitive()),\n fontFamily: optional(primitive()),\n fontItalic: optional(primitive()),\n fontSize: optional(primitive()),\n fontStrikethrough: optional(primitive()),\n fontUnderline: optional(primitive()),\n hideFromView: primitive(),\n isSelected: primitive(),\n kind: primitive(),\n linkLabelParameter: optional(primitive()),\n maxWidth: optional(primitive()),\n minWidth: optional(primitive()),\n missingValueDisplayText: optional(primitive()),\n name: primitive(),\n negativeBackgroundColor: optional(primitive()),\n negativeForegroundColor: optional(primitive()),\n normalBackgroundColor: optional(primitive()),\n normalForegroundColor: optional(primitive()),\n negativeNumberInParens: primitive(),\n numberScale: optional(primitive()),\n pinned: optional(primitive()),\n pivotSortDirection: optional(primitive()),\n pivotStatisticColumnFunction: optional(primitive()),\n textAlign: optional(primitive()),\n type: primitive(),\n zeroBackgroundColor: optional(primitive()),\n zeroForegroundColor: optional(primitive()),\n }));\n serialize() {\n return DataCubeColumnConfiguration.serialization.toJson(this);\n }\n}\nexport class DataCubePivotLayoutConfiguration {\n expandedPaths = [];\n static serialization = new SerializationFactory(createModelSchema(DataCubePivotLayoutConfiguration, {\n expandedPaths: list(primitive()),\n }));\n serialize() {\n return DataCubePivotLayoutConfiguration.serialization.toJson(this);\n }\n}\nexport class DataCubeConfiguration {\n name = DEFAULT_REPORT_NAME;\n description;\n columns = [];\n showHorizontalGridLines = false;\n showVerticalGridLines = true;\n gridLineColor = DEFAULT_GRID_LINE_COLOR;\n fontFamily = DEFAULT_FONT_FAMILY;\n fontSize = DEFAULT_FONT_SIZE;\n fontBold = DEFAULT_FONT_BOLD;\n fontItalic = DEFAULT_FONT_ITALIC;\n fontUnderline = DEFAULT_FONT_UNDERLINED;\n fontStrikethrough = DEFAULT_FONT_STRIKETHROUGH;\n fontCase = DEFAULT_FONT_CASE;\n textAlign = DEFAULT_TEXT_ALIGN;\n normalForegroundColor = DEFAULT_FOREGROUND_COLOR;\n negativeForegroundColor = DEFAULT_NEGATIVE_FOREGROUND_COLOR;\n zeroForegroundColor = DEFAULT_ZERO_FOREGROUND_COLOR;\n errorForegroundColor = DEFAULT_ERROR_FOREGROUND_COLOR;\n normalBackgroundColor = DEFAULT_BACKGROUND_COLOR;\n negativeBackgroundColor = DEFAULT_BACKGROUND_COLOR;\n zeroBackgroundColor = DEFAULT_BACKGROUND_COLOR;\n errorBackgroundColor = DEFAULT_BACKGROUND_COLOR;\n alternateRows = false;\n alternateRowsStandardMode = true;\n alternateRowsColor = DEFAULT_ROW_HIGHLIGHT_BACKGROUND_COLOR;\n alternateRowsCount = 1;\n showSelectionStats = false;\n showWarningForTruncatedResult = true;\n // these configurations, when changed, would potentially trigger data-fetching\n initialExpandLevel;\n showRootAggregation = false;\n showLeafCount = true;\n treeColumnSortDirection = DEFAULT_TREE_COLUMN_SORT_DIRECTION;\n pivotStatisticColumnName = DEFAULT_PIVOT_STATISTIC_COLUMN_NAME;\n pivotStatisticColumnPlacement; // unspecified -> hide the column\n pivotLayout = new DataCubePivotLayoutConfiguration();\n static serialization = new SerializationFactory(createModelSchema(DataCubeConfiguration, {\n alternateRows: primitive(),\n alternateRowsColor: primitive(),\n alternateRowsCount: primitive(),\n alternateRowsStandardMode: primitive(),\n columns: list(usingModelSchema(DataCubeColumnConfiguration.serialization.schema)),\n errorBackgroundColor: primitive(),\n errorForegroundColor: primitive(),\n description: optional(primitive()),\n fontBold: primitive(),\n fontCase: optional(primitive()),\n fontFamily: primitive(),\n fontItalic: primitive(),\n fontSize: primitive(),\n fontStrikethrough: primitive(),\n fontUnderline: optional(primitive()),\n gridLineColor: primitive(),\n initialExpandLevel: optional(primitive()),\n name: primitive(),\n negativeBackgroundColor: primitive(),\n negativeForegroundColor: primitive(),\n normalBackgroundColor: primitive(),\n normalForegroundColor: primitive(),\n pivotStatisticColumnName: primitive(),\n pivotStatisticColumnPlacement: optional(primitive()),\n pivotLayout: usingModelSchema(DataCubePivotLayoutConfiguration.serialization.schema),\n showHorizontalGridLines: primitive(),\n showLeafCount: primitive(),\n showSelectionStats: primitive(),\n showRootAggregation: primitive(),\n showVerticalGridLines: primitive(),\n showWarningForTruncatedResult: primitive(),\n textAlign: primitive(),\n treeColumnSortDirection: primitive(),\n zeroBackgroundColor: primitive(),\n zeroForegroundColor: primitive(),\n }));\n serialize() {\n return DataCubeConfiguration.serialization.toJson(this);\n }\n}\n//# sourceMappingURL=DataCubeConfiguration.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { SerializationFactory, usingModelSchema, } from '@finos/legend-shared';\nimport { createModelSchema, primitive } from 'serializr';\nimport { DataCubeConfiguration } from './DataCubeConfiguration.js';\nexport class DataCubeQuery {\n query;\n configuration;\n constructor(configuration) {\n this.configuration = configuration;\n }\n static serialization = new SerializationFactory(createModelSchema(DataCubeQuery, {\n configuration: usingModelSchema(DataCubeConfiguration.serialization.schema),\n query: primitive(),\n }));\n}\n//# sourceMappingURL=DataCubeQuery.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ContentType, guaranteeNonNullable, HttpHeader, SerializationFactory, usingModelSchema, } from '@finos/legend-shared';\nimport { DataCubeQuery, } from '@finos/legend-data-cube';\nimport { createModelSchema, optional, primitive } from 'serializr';\nclass QuerySource {\n runtime;\n mapping;\n query;\n timestamp;\n static serialization = new SerializationFactory(createModelSchema(QuerySource, {\n mapping: optional(primitive()),\n query: primitive(),\n runtime: primitive(),\n timestamp: primitive(),\n }));\n}\nexport class GetBaseQueryResult {\n query;\n source;\n static serialization = new SerializationFactory(createModelSchema(GetBaseQueryResult, {\n query: usingModelSchema(DataCubeQuery.serialization.schema),\n source: usingModelSchema(QuerySource.serialization.schema),\n }));\n}\nexport class LegendREPLServerClient {\n networkClient;\n constructor(networkClient) {\n this.networkClient = networkClient;\n }\n get baseUrl() {\n return guaranteeNonNullable(this.networkClient.baseUrl, `REPL server client has not been configured properly`);\n }\n get dataCube() {\n return `${this.baseUrl}/api/dataCube`;\n }\n async getInfrastructureInfo() {\n return this.networkClient.get(`${this.dataCube}/infrastructureInfo`);\n }\n async getQueryTypeahead(input) {\n return this.networkClient.post(`${this.dataCube}/typeahead`, input);\n }\n async parseValueSpecification(input) {\n return this.networkClient.post(`${this.dataCube}/parseValueSpecification`, input);\n }\n async getValueSpecificationCode(input) {\n return this.networkClient.post(`${this.dataCube}/getValueSpecificationCode`, input, {}, { [HttpHeader.ACCEPT]: ContentType.TEXT_PLAIN });\n }\n async getBaseQuery() {\n return this.networkClient.get(`${this.dataCube}/getBaseQuery`);\n }\n async getQueryRelationReturnType(input) {\n return this.networkClient.post(`${this.dataCube}/getRelationReturnType`, input);\n }\n async getQueryCodeRelationReturnType(input) {\n return this.networkClient.post(`${this.dataCube}/getRelationReturnType/code`, input);\n }\n async executeQuery(input) {\n return this.networkClient.post(`${this.dataCube}/executeQuery`, input);\n }\n}\n//# sourceMappingURL=LegendREPLServerClient.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { formatDate, guaranteeNonNullable, UnsupportedOperationError, } from '@finos/legend-shared';\nimport { DATE_FORMAT, DATE_TIME_FORMAT, PRIMITIVE_TYPE, } from '@finos/legend-graph';\n// --------------------------------- UTILITIES ---------------------------------\nexport function generateDefaultFilterConditionPrimitiveTypeValue(type) {\n switch (type) {\n case PRIMITIVE_TYPE.STRING:\n return '';\n case PRIMITIVE_TYPE.BOOLEAN:\n return false;\n case PRIMITIVE_TYPE.BYTE:\n return btoa('');\n case PRIMITIVE_TYPE.NUMBER:\n case PRIMITIVE_TYPE.DECIMAL:\n case PRIMITIVE_TYPE.FLOAT:\n case PRIMITIVE_TYPE.INTEGER:\n case PRIMITIVE_TYPE.BINARY:\n return 0;\n case PRIMITIVE_TYPE.DATE:\n case PRIMITIVE_TYPE.STRICTDATE:\n return formatDate(new Date(Date.now()), DATE_FORMAT);\n case PRIMITIVE_TYPE.DATETIME:\n return formatDate(new Date(Date.now()), DATE_TIME_FORMAT);\n default:\n throw new UnsupportedOperationError(`Can't generate value for type '${type}'`);\n }\n}\nexport function getFilterOperation(operator, operators) {\n return guaranteeNonNullable(operators.find((op) => op.operator === operator), `Can't find filter operation '${operator}'`);\n}\n// --------------------------------- CONTRACT ---------------------------------\nexport class DataCubeQueryFilterOperation {\n}\n//# sourceMappingURL=DataCubeQueryFilterOperation.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { guaranteeNonNullable } from '@finos/legend-shared';\nimport {} from '@finos/legend-graph';\n// --------------------------------- UTILITIES ---------------------------------\nexport function getAggregateOperation(operator, aggregateOperations) {\n return guaranteeNonNullable(aggregateOperations.find((op) => op.operator === operator), `Can't find aggregate operation '${operator}'`);\n}\n// --------------------------------- CONTRACT ---------------------------------\nexport class DataCubeQueryAggregateOperation {\n}\n//# sourceMappingURL=DataCubeQueryAggregateOperation.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class V1_ValueSpecification {\n}\n//# sourceMappingURL=V1_ValueSpecification.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_ValueSpecification, } from '../../model/valueSpecification/V1_ValueSpecification.js';\nexport class V1_Variable extends V1_ValueSpecification {\n name;\n multiplicity;\n genericType;\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_Variable(this);\n }\n}\n//# sourceMappingURL=V1_Variable.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class V1_GraphFetchTree {\n subTrees = [];\n subTypeTrees = [];\n}\n//# sourceMappingURL=V1_GraphFetchTree.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { hashArray, hashObject, hashValue } from '@finos/legend-shared';\nimport { SOURCE_INFORMATION_PROPERTY_KEY_SUFFIX } from './MetaModelConst.js';\n/**\n * The main point of maintaining this enum is to keep lessen magic string in hash computation\n * so that we are less error-prone in the process of defining hash.\n *\n * These tokens will be used in the definition of the hash as marker for the type of the strucure\n * arguably some of these can be redundant since this information is encoded in the resulting hash\n * code anyway, but sometimes when polymorphism manifests, such as when we have an array of structure\n * which are subclasses of an abstract stucture, hashing the marker is sometimes the only way to\n * discern between instances of different sub-structures\n *\n * TODO: when we refactor hashing, we could potentially move this to graphManager/changeDetection/\n */\nexport var CORE_HASH_STRUCTURE;\n(function (CORE_HASH_STRUCTURE) {\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_ELEMENT\"] = \"INTERNAL__UNKNOWN_ELEMENT\";\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_PACKAGEABLE_ELEMENT\"] = \"INTERNAL__UNKNOWN_PACKAGEABLE_ELEMENT\";\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_FUNCTION_ACTIVATOR\"] = \"INTERNAL__UNKNOWN_FUNCTION_ACTIVATOR\";\n CORE_HASH_STRUCTURE[\"PACKAGE\"] = \"PACKAGE\";\n CORE_HASH_STRUCTURE[\"PACKAGEABLE_ELEMENT\"] = \"PACKAGEABLE_ELEMENT\";\n CORE_HASH_STRUCTURE[\"PACKAGEABLE_ELEMENT_POINTER\"] = \"PACKAGEABLE_ELEMENT_POINTER\";\n // domain\n CORE_HASH_STRUCTURE[\"PROFILE\"] = \"PROFILE\";\n CORE_HASH_STRUCTURE[\"TAG_POINTER\"] = \"TAG_POINTER\";\n CORE_HASH_STRUCTURE[\"STEREOTYPE_POINTER\"] = \"STEREOTYPE_POINTER\";\n CORE_HASH_STRUCTURE[\"TAGGED_VALUE\"] = \"TAGGED_VALUE\";\n CORE_HASH_STRUCTURE[\"ENUMERATION\"] = \"ENUMERATION\";\n CORE_HASH_STRUCTURE[\"ENUM_VALUE\"] = \"ENUM_VALUE\";\n CORE_HASH_STRUCTURE[\"CLASS\"] = \"CLASS\";\n CORE_HASH_STRUCTURE[\"PROPERTY\"] = \"PROPERTY\";\n CORE_HASH_STRUCTURE[\"PROPERTY_DEFAULT_VALUE\"] = \"PROPERTY_DEFAULT_VALUE\";\n CORE_HASH_STRUCTURE[\"PROPERTY_POINTER\"] = \"PROPERTY_POINTER\";\n CORE_HASH_STRUCTURE[\"MULTIPLICITY\"] = \"MULTIPLICITY\";\n CORE_HASH_STRUCTURE[\"CONSTRAINT\"] = \"CONSTRAINT\";\n CORE_HASH_STRUCTURE[\"DERIVED_PROPERTY\"] = \"DERIVED_PROPERTY\";\n CORE_HASH_STRUCTURE[\"ASSOCIATION\"] = \"ASSOCIATION\";\n CORE_HASH_STRUCTURE[\"FUNCTION\"] = \"FUNCTION\";\n CORE_HASH_STRUCTURE[\"MEASURE\"] = \"MEASURE\";\n CORE_HASH_STRUCTURE[\"UNIT\"] = \"UNIT\";\n // function test\n CORE_HASH_STRUCTURE[\"FUNCTION_TEST_SUITE\"] = \"FUNCTION_TEST_SUITE\";\n CORE_HASH_STRUCTURE[\"FUNCTION_TEST\"] = \"FUNCTION_TEST\";\n CORE_HASH_STRUCTURE[\"FUNCTION_STORE_TEST_DATA\"] = \"FUNCTION_STORE_TEST_DATA\";\n CORE_HASH_STRUCTURE[\"FUNCTION_PARAMETER_VALUE\"] = \"FUNCTION_PARAMETER_VALUE\";\n // testable\n CORE_HASH_STRUCTURE[\"ASSERT_FAIL\"] = \"ASSERT_FAIL\";\n CORE_HASH_STRUCTURE[\"ASSERT_PASS\"] = \"ASSERT_PASS\";\n CORE_HASH_STRUCTURE[\"EQUAL_TO_JSON_ASSERT_FAIL\"] = \"EQUAL_TO_JSON_ASSERT_FAIL\";\n CORE_HASH_STRUCTURE[\"EQUAL_TO\"] = \"EQUAL_TO\";\n CORE_HASH_STRUCTURE[\"EQUAL_TO_JSON\"] = \"EQUAL_TO_JSON\";\n CORE_HASH_STRUCTURE[\"EQUAL_TO_TDS\"] = \"EQUAL_TO_TDS\";\n // section index\n CORE_HASH_STRUCTURE[\"SECTION_INDEX\"] = \"SECTION_INDEX\";\n CORE_HASH_STRUCTURE[\"SECTION\"] = \"SECTION\";\n CORE_HASH_STRUCTURE[\"IMPORT_AWARE_CODE_SECTION\"] = \"IMPORT_AWARE_CODE_SECTION\";\n CORE_HASH_STRUCTURE[\"DEFAULT_CODE_SECTION\"] = \"DEFAULT_CODE_SECTION\";\n // raw value specification\n CORE_HASH_STRUCTURE[\"RAW_LAMBDA\"] = \"RAW_LAMBDA\";\n CORE_HASH_STRUCTURE[\"RAW_VARIABLE\"] = \"RAW_VARIABLE\";\n CORE_HASH_STRUCTURE[\"RAW_INSTANCE_VALUE\"] = \"RAW_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"BINDING_TRANSFORMER\"] = \"BINDING_TRANSFORMER\";\n // value specification\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_VALUE_SPECIFICATION\"] = \"INTERNAL__UNKNOWN_VALUE_SPECIFICATION\";\n CORE_HASH_STRUCTURE[\"INTERNAL__PROPAGATED_VALUE\"] = \"INTERNAL__PROPAGATED_VALUE\";\n CORE_HASH_STRUCTURE[\"VARIABLE_EXPRESSION\"] = \"VARIABLE_EXPRESSION\";\n CORE_HASH_STRUCTURE[\"EXPRESSION\"] = \"EXPRESSION\";\n CORE_HASH_STRUCTURE[\"FUNCTION_EXPRESSION\"] = \"FUNCTION_EXPRESSION\";\n CORE_HASH_STRUCTURE[\"SIMPLE_FUNCTION_EXPRESSION\"] = \"SIMPLE_FUNCTION_EXPRESSION\";\n CORE_HASH_STRUCTURE[\"ABSTRACT_PROPERTY_EXPRESSION\"] = \"ABSTRACT_PROPERTY_EXPRESSION\";\n CORE_HASH_STRUCTURE[\"INSTANCE_VALUE\"] = \"INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"PRIMITIVE_INSTANCE_VALUE\"] = \"PRIMITIVE_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"ENUM_INSTANCE_VALUE\"] = \"ENUM_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"KEY_EXPRESSION_INSTANCE_VALUE\"] = \"KEY_EXPRESSION_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"KEY_EXPRESSION_VALUE\"] = \"KEY_EXPRESSION_VALUE\";\n CORE_HASH_STRUCTURE[\"RUNTIME_INSTANCE_VALUE\"] = \"RUNTIME_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"PAIR_INSTANCE_VALUE\"] = \"PAIR_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"MAPPING_INSTANCE_VALUE\"] = \"MAPPING_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"PURE_LIST_INSTANCE_VALUE\"] = \"PURE_LIST_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"COLLECTION_INSTANCE_VALUE\"] = \"COLLECTION_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"LAMBDA_FUNCTION_INSTANCE_VALUE\"] = \"LAMBDA_FUNCTION_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"FUNCTION_TYPE\"] = \"FUNCTION_TYPE\";\n CORE_HASH_STRUCTURE[\"LAMBDA_FUNCTION\"] = \"LAMBDA_FUNCTION\";\n CORE_HASH_STRUCTURE[\"ALLOY_SERIALIZATION_CONFIG_INSTANCE_VALUE\"] = \"ALLOY_SERIALIZATION_CONFIG_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"ALLOY_SERIALIZATION_CONFIG\"] = \"ALLOY_SERIALIZATION_CONFIG\";\n CORE_HASH_STRUCTURE[\"ROOT_GRAPH_FETCH_TREE\"] = \"ROOT_GRAPH_FETCH_TREE\";\n CORE_HASH_STRUCTURE[\"PROPERTY_GRAPH_FETCH_TREE\"] = \"PROPERTY_GRAPH_FETCH_TREE\";\n CORE_HASH_STRUCTURE[\"SUBTYPE_GRAPH_FETCH_TREE\"] = \"SUBTYPE_GRAPH_FETCH_TREE\";\n CORE_HASH_STRUCTURE[\"SUBTYPE_GRAPH_FETCH_TREE_INSTANCE_VALUE\"] = \"SUBTYPE_GRAPH_FETCH_TREE_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"PROPERTY_GRAPH_FETCH_TREE_INSTANCE_VALUE\"] = \"PROEPRTY_GRAPH_FETCH_TREE_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"ROOT_GRAPH_FETCH_TREE_INSTANCE_VALUE\"] = \"ROOT_GRAPH_FETCH_TREE_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"RELATION_COL_SPEC_ARRAY\"] = \"RELATION_COL_SPEC_ARRAY\";\n CORE_HASH_STRUCTURE[\"RELATION_COL_SPEC\"] = \"RELATION_COL_SPEC\";\n // ---------------------------------- DSL Mapping --------------------------------------\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_STORE\"] = \"INTERNAL__UNKNOWN_STORE\";\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_CONNECTION\"] = \"INTERNAL__UNKNOWN_CONNECTION\";\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_PROPERTY_MAPPING\"] = \"INTERNAL__UNKNOWN_PROPERTY_MAPPING\";\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_CLASS_MAPPING\"] = \"INTERNAL__UNKNOWN_CLASS_MAPPING\";\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_MAPPING_INCLUDE\"] = \"INTERNAL__UNKNOWN_MAPPING_INCLUDE\";\n CORE_HASH_STRUCTURE[\"MAPPING\"] = \"MAPPING\";\n CORE_HASH_STRUCTURE[\"MAPPING_INCLUDE_MAPPING\"] = \"MAPPING_INCLUDE_MAPPING\";\n CORE_HASH_STRUCTURE[\"ASSOCIATION_IMPLEMENTATION\"] = \"ASSOCIATION_IMPLEMENTATION\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_ASSOCIATION_IMPLEMENTATION\"] = \"RELATIONAL_ASSOCIATION_IMPLEMENTATION\";\n CORE_HASH_STRUCTURE[\"XSTORE_ASSOCIATION_IMPLEMENTATION\"] = \"XSTORE_ASSOCIATION_IMPLEMENTATION\";\n CORE_HASH_STRUCTURE[\"ENUMERATION_MAPPING\"] = \"ENUMERATION_MAPPING\";\n CORE_HASH_STRUCTURE[\"ENUM_VALUE_MAPPING\"] = \"ENUM_VALUE_MAPPING\";\n CORE_HASH_STRUCTURE[\"SET_IMPLEMENTATION\"] = \"SET_IMPLEMENTATION\";\n CORE_HASH_STRUCTURE[\"OPERATION_SET_IMPLEMENTATION\"] = \"OPERATION_SET_IMPLEMENTATION\";\n CORE_HASH_STRUCTURE[\"PURE_INSTANCE_SET_IMPLEMENTATION\"] = \"PURE_INSTANCE_SET_IMPLEMENTATION\";\n CORE_HASH_STRUCTURE[\"PROPERTY_MAPPING\"] = \"PROPERTY_MAPPING\";\n CORE_HASH_STRUCTURE[\"LOCAL_MAPPING_PROPERTY\"] = \"LOCAL_MAPPING_PROPERTY\";\n CORE_HASH_STRUCTURE[\"PURE_PROPERTY_MAPPING\"] = \"PURE_PROPERTY_MAPPING\";\n CORE_HASH_STRUCTURE[\"XSTORE_PROPERTY_MAPPING\"] = \"XSTORE_PROPERTY_MAPPING\";\n CORE_HASH_STRUCTURE[\"MAPPING_TEST_LEGACY\"] = \"MAPPING_TEST_LEGACY\";\n CORE_HASH_STRUCTURE[\"MAPPING_TEST_SUITE\"] = \"MAPPING_TEST_SUITE\";\n CORE_HASH_STRUCTURE[\"MAPPING_TEST\"] = \"MAPPING_TEST\";\n CORE_HASH_STRUCTURE[\"STORE_TEST_DATA\"] = \"STORE_TEST_DATA\";\n CORE_HASH_STRUCTURE[\"INPUT_DATA\"] = \"INPUT_DATA\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_INPUT_DATA\"] = \"FLAT_DATA_INPUT_DATA\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_INPUT_DATA\"] = \"RELATIONAL_INPUT_DATA\";\n CORE_HASH_STRUCTURE[\"OBJECT_INPUT_DATA\"] = \"OBJECT_INPUT_DATA\";\n CORE_HASH_STRUCTURE[\"MAPPING_TEST_ASSERT\"] = \"MAPPING_TEST_ASSERT\";\n CORE_HASH_STRUCTURE[\"EXPECTED_OUTPUT_MAPPING_TEST_ASSERT\"] = \"EXPECTED_OUTPUT_MAPPING_TEST_ASSERT\";\n CORE_HASH_STRUCTURE[\"FILTER_MAPPING\"] = \"FILTER_MAPPING\";\n CORE_HASH_STRUCTURE[\"COLUMN_MAPPING\"] = \"COLUMN_MAPPING\";\n CORE_HASH_STRUCTURE[\"GROUP_BY_MAPPING\"] = \"GROUP_BY_MAPPING\";\n // runtime\n CORE_HASH_STRUCTURE[\"RUNTIME\"] = \"RUNTIME\";\n CORE_HASH_STRUCTURE[\"PACKAGEABLE_RUNTIME\"] = \"PACKAGEABLE_RUNTIME\";\n CORE_HASH_STRUCTURE[\"ENGINE_RUNTIME\"] = \"ENGINE_RUNTIME\";\n CORE_HASH_STRUCTURE[\"SINGLE_ENGINE_RUNTIME\"] = \"SINGLE_ENGINE_RUNTIME\";\n CORE_HASH_STRUCTURE[\"LEGACY_RUNTIME\"] = \"LEGACY_RUNTIME\";\n CORE_HASH_STRUCTURE[\"RUNTIME_POINTER\"] = \"RUNTIME_POINTER\";\n CORE_HASH_STRUCTURE[\"STORE_CONNECTIONS\"] = \"STORE_CONNECTIONS\";\n CORE_HASH_STRUCTURE[\"IDENTIFIED_CONNECTION\"] = \"IDENTIFIED_CONNECTION\";\n // connection\n CORE_HASH_STRUCTURE[\"PACKAGEABLE_CONNECTION\"] = \"PACKAGEABLE_CONNECTION\";\n CORE_HASH_STRUCTURE[\"CONNECTION_POINTER\"] = \"CONNECTION_POINTER\";\n CORE_HASH_STRUCTURE[\"XML_MODEL_CONNECTION\"] = \"XML_MODEL_CONNECTION\";\n CORE_HASH_STRUCTURE[\"JSON_MODEL_CONNECTION\"] = \"JSON_MODEL_CONNECTION\";\n CORE_HASH_STRUCTURE[\"MODEL_CHAIN_CONNECTION\"] = \"MODEL_CHAIN_CONNECTION\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_CONNECTION\"] = \"FLAT_DATA_CONNECTION\";\n // aggregation aware mapping\n CORE_HASH_STRUCTURE[\"AGGREGATION_AWARE_MAPPING\"] = \"AGGREGATION_AWARE_MAPPING\";\n CORE_HASH_STRUCTURE[\"AGGREGATION_AWARE_SPECIFICATION\"] = \"AGGREGATION_AWARE_SPECIFICATION\";\n CORE_HASH_STRUCTURE[\"AGGREGATION_AWARE_SET_IMPLEMENTATION_CONTAINER\"] = \"AGGREGATION_AWARE_SET_IMPLEMENTATION_CONTAINER\";\n CORE_HASH_STRUCTURE[\"AGGREGATE_FUNCTION\"] = \"AGGREGATE_FUNCTION\";\n CORE_HASH_STRUCTURE[\"GROUP_BY_FUNCTION\"] = \"GROUP_BY_FUNCTION\";\n // ---------------------------------- DSL Generation --------------------------------------\n CORE_HASH_STRUCTURE[\"GENERATION_TREE\"] = \"GENERATION_TREE\";\n CORE_HASH_STRUCTURE[\"GENERATION_TREE_NODE\"] = \"GENERATION_TREE_NODE\";\n CORE_HASH_STRUCTURE[\"FILE_GENERATION\"] = \"FILE_GENERATION\";\n CORE_HASH_STRUCTURE[\"CONFIGURATION_PROPERTY\"] = \"CONFIGURATION_PROPERTY\";\n // ---------------------------------- DSL Data --------------------------------------\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_EMBEDDED_DATA\"] = \"INTERNAL__UNKNOWN_EMBEDDED_DATA\";\n CORE_HASH_STRUCTURE[\"EXTERNAL_FORMAT_DATA\"] = \"EXTERNAL_FORMAT_DATA\";\n CORE_HASH_STRUCTURE[\"MODEL_STORE_DATA\"] = \"MODEL_STORE_DATA\";\n CORE_HASH_STRUCTURE[\"MODEL_DATA\"] = \"MODEL_DATA\";\n CORE_HASH_STRUCTURE[\"MODEL_EMBEDDED_DATA\"] = \"MODEL_EMBEDDED_DATA\";\n CORE_HASH_STRUCTURE[\"MODEL_INSTANCE_DATA\"] = \"MODEL_INSTANCE_DATA\";\n CORE_HASH_STRUCTURE[\"DATA_ELEMENT_REFERENCE\"] = \"DATA_ELEMENT_REFERENCE\";\n CORE_HASH_STRUCTURE[\"DATA_ELEMENT\"] = \"DATA_ELEMENT\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_CSV_DATA\"] = \"RELATIONAL_CSV_DATA\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_TDS\"] = \"RELATIONAL_TDS\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_CSV_DATA_TABLE\"] = \"RELATIONAL_CSV_DATA_TABLE\";\n // ---------------------------------- DSL External Format --------------------------------------\n CORE_HASH_STRUCTURE[\"BINDING\"] = \"BINDING\";\n CORE_HASH_STRUCTURE[\"SCHEMA_SET\"] = \"SCHEMA_SET\";\n CORE_HASH_STRUCTURE[\"SCHEMA\"] = \"SCHEMA\";\n CORE_HASH_STRUCTURE[\"MODEL_UNIT\"] = \"MODEL_UNIT\";\n CORE_HASH_STRUCTURE[\"URL_STREAM\"] = \"URL_STREAM\";\n CORE_HASH_STRUCTURE[\"EXTERNAL_FORMAT_CONNECTION\"] = \"EXTERNAL_FORMAT_CONNECTION\";\n // ---------------------------------- DSL Service --------------------------------------\n CORE_HASH_STRUCTURE[\"SERVICE\"] = \"SERVICE\";\n CORE_HASH_STRUCTURE[\"SERVICE_OWNER\"] = \"SERVICE_OWNER\";\n CORE_HASH_STRUCTURE[\"SERVICE_PURE_EXECUTION\"] = \"SERVICE_PURE_EXECUTION\";\n CORE_HASH_STRUCTURE[\"SERVICE_PURE_SINGLE_EXECUTION\"] = \"SERVICE_PURE_SINGLE_EXECUTION\";\n CORE_HASH_STRUCTURE[\"SERVICE_KEYED_EXECUTION_PARAMETER\"] = \"SERVICE_KEYED_EXECUTION_PARAMETER\";\n CORE_HASH_STRUCTURE[\"SERVICE_PURE_MULTI_EXECUTION\"] = \"SERVICE_PURE_MULTI_EXECUTION\";\n CORE_HASH_STRUCTURE[\"SERVICE_TEST_CONTAINER\"] = \"SERVICE_TEST_CONTAINER\";\n CORE_HASH_STRUCTURE[\"SERVICE_LEGACY_SINGLE_EXECUTION_TEST\"] = \"SERVICE_LEGACY_SINGLE_EXECUTION_TEST\";\n CORE_HASH_STRUCTURE[\"SERVICE_LEGACY_KEYED_SINGLE_EXECUTION_TEST\"] = \"SERVICE_LEGACY_KEYED_SINGLE_EXECUTION_TEST\";\n CORE_HASH_STRUCTURE[\"SERVICE_LEGACY_MULTI_EXECUTION_TEST\"] = \"SERVICE_LEGACY_MULTI_EXECUTION_TEST\";\n CORE_HASH_STRUCTURE[\"SERVICE_CONNECTION_TEST_DATA\"] = \"SERVICE_CONNECTION_TEST_DATA\";\n CORE_HASH_STRUCTURE[\"SERVICE_TEST_DATA\"] = \"SERVICE_TEST_DATA\";\n CORE_HASH_STRUCTURE[\"SERVICE_TEST_SUITE\"] = \"SERVICE_TEST_SUITE\";\n CORE_HASH_STRUCTURE[\"SERVICE_TEST\"] = \"SERVICE_TEST\";\n CORE_HASH_STRUCTURE[\"SERVICE_PARAMETER_VALUE\"] = \"SERVICE_PARAMETER_VALUE\";\n CORE_HASH_STRUCTURE[\"SERVICE_POST_VALIDATION\"] = \"SERVICE_POST_VALIDATION\";\n CORE_HASH_STRUCTURE[\"SERVICE_POST_VALIDATION_ASSERTION\"] = \"SERVICE_POST_VALIDATION_ASSERTION\";\n // execution environment instance\n CORE_HASH_STRUCTURE[\"EXECUTION_ENVIRONMENT_INSTANCE\"] = \"EXECUTION_ENVIRONMENT_INSTANCE\";\n CORE_HASH_STRUCTURE[\"SINGLE_EXECUTION_PARAMETER\"] = \"SINGLE_EXECUTION_PARAMETER\";\n CORE_HASH_STRUCTURE[\"MULTI_EXECUTION_PARAMETER\"] = \"MULTI_EXECUTION_PARAMETER\";\n // ---------------------------------- STO Relational --------------------------------------\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_DATASOURCE_SPECIFICATION\"] = \"INTERNAL__UNKNOWN_DATASOURCE_SPECIFICATION\";\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_AUTHENTICATION_STRATEGY\"] = \"INTERNAL__UNKNOWN_AUTHENTICATION_STRATEGY\";\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_POST_PROCESSOR\"] = \"INTERNAL__UNKNOWN_POST_PROCESSOR\";\n // database\n CORE_HASH_STRUCTURE[\"DATABASE\"] = \"DATABASE\";\n CORE_HASH_STRUCTURE[\"DATABASE_SCHEMA\"] = \"DATABASE_SCHEMA\";\n CORE_HASH_STRUCTURE[\"DATABASE_JOIN\"] = \"DATABASE_JOIN\";\n CORE_HASH_STRUCTURE[\"DATABASE_FILTER\"] = \"DATABASE_FILTER\";\n CORE_HASH_STRUCTURE[\"DATBASE_VIEW\"] = \"DATBASE_VIEW\";\n CORE_HASH_STRUCTURE[\"DATABASE_SCHEMA_TABLE\"] = \"DATABASE_SCHEMA_TABLE\";\n CORE_HASH_STRUCTURE[\"DATABASE_TABLE_COLUMN\"] = \"DATABASE_TABLE_COLUMN\";\n // relational operation element\n CORE_HASH_STRUCTURE[\"RELATIONAL\"] = \"RELATIONAL\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_OPERATION_DYNA_FUNC\"] = \"RELATIONAL_OPERATION_DYNA_FUNC\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_OPERATION_ELEMENTS_WITH_JOINS\"] = \"RELATIONAL_OPERATION_ELEMENTS_WITH_JOINS\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_OPERATION_LITERAL\"] = \"RELATIONAL_OPERATION_LITERAL\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_OPERATION_LITERAL_LIST\"] = \"RELATIONAL_OPERATION_LITERAL_LIST\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_OPERATION_TABLE_ALIAS_COLUMN\"] = \"RELATIONAL_OPERATION_TABLE_ALIAS_COLUMN\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_OPERATION_TABLE_POINTER\"] = \"RELATIONAL_OPERATION_TABLE_POINTER\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_OPERATION_JOIN_POINTER\"] = \"RELATIONAL_OPERATION_JOIN_POINTER\";\n // relational data type\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_VARCHAR\"] = \"RELATIONAL_DATATYPE_VARCHAR\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_CHAR\"] = \"RELATIONAL_DATATYPE_CHAR\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_VARBINARY\"] = \"RELATIONAL_DATATYPE_VARBINARY\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_BINARY\"] = \"RELATIONAL_DATATYPE_BINARY\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_BIT\"] = \"RELATIONAL_DATATYPE_BIT\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_INTEGER\"] = \"RELATIONAL_DATATYPE_INTEGER\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_BIGINT\"] = \"RELATIONAL_DATATYPE_BIGINT\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_SMALLINT\"] = \"RELATIONAL_DATATYPE_SMALLINT\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_TINYINT\"] = \"RELATIONAL_DATATYPE_TINYINT\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_NUMERIC\"] = \"RELATIONAL_DATATYPE_NUMERIC\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_DECIMAL\"] = \"RELATIONAL_DATATYPE_DECIMAL\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_DOUBLE\"] = \"RELATIONAL_DATATYPE_DOUBLE\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_FLOAT\"] = \"RELATIONAL_DATATYPE_FLOAT\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_REAL\"] = \"RELATIONAL_DATATYPE_REAL\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_DATE\"] = \"RELATIONAL_DATATYPE_DATE\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_TIMESTAMP\"] = \"RELATIONAL_DATATYPE_TIMESTAMP\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_OTHER\"] = \"RELATIONAL_DATATYPE_OTHER\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_SEMISTRUCTURED\"] = \"RELATIONAL_DATATYPE_SEMISTRUCTURED\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_JSON\"] = \"RELATIONAL_DATATYPE_JSON\";\n // relational mapping\n CORE_HASH_STRUCTURE[\"ROOT_RELATIONAL_INSTANCE_SET_IMPLEMENTATION\"] = \"ROOT_RELATIONAL_INSTANCE_SET_IMPLEMENTATION\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_INSTANCE_SET_IMPLEMENTATION\"] = \"RELATIONAL_INSTANCE_SET_IMPLEMENTATION\";\n CORE_HASH_STRUCTURE[\"REALTIONAL_PROPERTY_MAPPING\"] = \"REALTIONAL_PROPERTY_MAPPING\";\n CORE_HASH_STRUCTURE[\"EMBEDDED_REALTIONAL_PROPERTY_MAPPING\"] = \"EMBEDDED_REALTIONAL_PROPERTY_MAPPING\";\n CORE_HASH_STRUCTURE[\"INLINE_EMBEDDED_REALTIONAL_PROPERTY_MAPPING\"] = \"INLINE_EMBEDDED_REALTIONAL_PROPERTY_MAPPING\";\n CORE_HASH_STRUCTURE[\"OTHERWISE_EMBEDDED_REALTIONAL_PROPERTY_MAPPING\"] = \"OTHERWISE_EMBEDDED_REALTIONAL_PROPERTY_MAPPING\";\n // milestoning\n CORE_HASH_STRUCTURE[\"BUSINESS_MILESTONING\"] = \"BUSINESS_MILESTONING\";\n CORE_HASH_STRUCTURE[\"BUSINESS_SNAPSHOT_MILESTONING\"] = \"BUSINESS_SNAPSHOT_MILESTONING\";\n CORE_HASH_STRUCTURE[\"PROCESSING_MILESTONING\"] = \"PROCESSING_MILESTONING\";\n // relational database connection\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATABASE_CONNECTION\"] = \"RELATIONAL_DATABASE_CONNECTION\";\n // relational database connection datasource specification\n CORE_HASH_STRUCTURE[\"STATIC_DATASOURCE_SPECIFICATION\"] = \"STATIC_DATASOURCE_SPECIFICATION\";\n CORE_HASH_STRUCTURE[\"LOCAL_H2_DATASOURCE_SPECIFICATION\"] = \"LOCAL_H2_DATASOURCE_SPECIFICATION\";\n CORE_HASH_STRUCTURE[\"EMBEDDED_H2_DATASOURCE_SPECIFICATION\"] = \"EMBEDDED_H2_DATASOURCE_SPECIFICATION\";\n CORE_HASH_STRUCTURE[\"SNOWFLAKE_DATASOURCE_SPECIFICATION\"] = \"SNOWFLAKE_DATASOURCE_SPECIFICATION\";\n CORE_HASH_STRUCTURE[\"REDSHIFT_DATASOURCE_SPECIFICATION\"] = \"REDSHIFT_DATASOURCE_SPECIFICATION\";\n CORE_HASH_STRUCTURE[\"BIGQUERY_DATASOURCE_SPECIFICATION\"] = \"BIGQUERY_DATASOURCE_SPECIFICATION\";\n CORE_HASH_STRUCTURE[\"DATABRICKS_DATASOURCE_SPECIFICATION\"] = \"DATABRICKS_DATASOURCE_SPECIFICATION\";\n CORE_HASH_STRUCTURE[\"SPANNER_DATASOURCE_SPECIFICATION\"] = \"SPANNER_DATASOURCE_SPECIFICATION\";\n CORE_HASH_STRUCTURE[\"TRINO_DATASOURCE_SPECIFICATION\"] = \"TRINO_DATASOURCE_SPECIFICATION\";\n CORE_HASH_STRUCTURE[\"TRINO_SSL_SPECIFICATION\"] = \"TRINO_SSL_SPECIFICATION\";\n // relational database connection authentication strategy\n CORE_HASH_STRUCTURE[\"DELEGRATED_KEREBEROS_AUTHENTICATION_STRATEGY\"] = \"DELEGRATED_KEREBEROS_AUTHENTICATION_STRATEGY\";\n CORE_HASH_STRUCTURE[\"DEFAULT_H2_AUTHENTICATION_STRATEGY\"] = \"DEFAULT_H2_AUTHENTICATION_STRATEGY\";\n CORE_HASH_STRUCTURE[\"SNOWFLAKE_PUBLIC_AUTHENTICATION_STRATEGY\"] = \"SNOWFLAKE_PUBLIC_AUTHENTICATION_STRATEGY\";\n CORE_HASH_STRUCTURE[\"API_TOKEN_AUTHENTICATION_STRATEGY\"] = \"API_TOKEN_AUTHENTICATION_STRATEGY\";\n CORE_HASH_STRUCTURE[\"GCP_APPLICATION_DEFAULT_CREDENTIALS_AUTHENTICATION_STRATEGY\"] = \"GCP_APPLICATION_DEFAULT_CREDENTIALS_AUTHENTICATION_STRATEGY\";\n CORE_HASH_STRUCTURE[\"USERNAME_PASSWORD_AUTHENTICATION_STRATEGY\"] = \"USERNAME_PASSWORD_AUTHENTICATION_STRATEGY\";\n CORE_HASH_STRUCTURE[\"OAUTH_AUTHENTICATION_STRATEGY\"] = \"OAUTH_AUTHENTICATION_STRATEGY\";\n CORE_HASH_STRUCTURE[\"GCP_WORKLOAD_IDENTITY_FEDERATION_AUTHENTICATION_STRATEGY\"] = \"GCP_WORKLOAD_IDENTITY_FEDERATION_AUTHENTICATION_STRATEGY\";\n CORE_HASH_STRUCTURE[\"MIDDLE_TIER_USERNAME_PASSWORD_AUTHENTICATION_STRATEGY\"] = \"MIDDLE_TIER_USERNAME_PASSWORD_AUTHENTICATION_STRATEGY\";\n CORE_HASH_STRUCTURE[\"TRINO_DELEGATED_KERBEROS_AUTHENTICATION_STRATEGY\"] = \"TRINO_KEREBEROS_AUTHENTICATION_STRATEGY\";\n // relational database connection post-processors\n CORE_HASH_STRUCTURE[\"MAPPER_POST_PROCESSOR\"] = \"MAPPER_POST_PROCESSOR\";\n CORE_HASH_STRUCTURE[\"SCHEMA_MAPPER\"] = \"SCHEMA_MAPPER\";\n CORE_HASH_STRUCTURE[\"TABLE_MAPPER\"] = \"TABLE_MAPPER\";\n // ---------------------------------- STO Flat-Data --------------------------------------\n CORE_HASH_STRUCTURE[\"FLAT_DATA\"] = \"FLAT_DATA\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_SECTION\"] = \"FLAT_DATA_SECTION\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_PROPERTY\"] = \"FLAT_DATA_PROPERTY\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_ROOT_RECORD_TYPE\"] = \"FLAT_DATA_ROOT_RECORD_TYPE\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_RECORD_TYPE\"] = \"FLAT_DATA_RECORD_TYPE\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_RECORD_FIELD\"] = \"FLAT_DATA_RECORD_FIELD\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_STRING\"] = \"FLAT_DATA_STRING\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_BOOLEAN\"] = \"FLAT_DATA_BOOLEAN\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_NUMBER\"] = \"FLAT_DATA_NUMBER\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_INTEGER\"] = \"FLAT_DATA_INTEGER\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_FLOAT\"] = \"FLAT_DATA_FLOAT\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_DECIMAL\"] = \"FLAT_DATA_DECIMAL\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_DATE\"] = \"FLAT_DATA_DATE\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_DATE_TIME\"] = \"FLAT_DATA_DATE_TIME\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_STRICT_DATE\"] = \"FLAT_DATA_STRICT_DATE\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_INSTANCE_SET_IMPLEMENTATION\"] = \"FLAT_DATA_INSTANCE_SET_IMPLEMENTATION\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_PROPERTY_MAPPING\"] = \"FLAT_DATA_PROPERTY_MAPPING\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_ASSOCIATION_IMPLEMENTATION\"] = \"FLAT_DATA_ASSOCIATION_IMPLEMENTATION\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_ASSOCIATION_PROPERTY_MAPPING\"] = \"FLAT_DATA_ASSOCIATION_PROPERTY_MAPPING\";\n CORE_HASH_STRUCTURE[\"EMBEDDED_FLAT_DATA_PROPERTY_MAPPING\"] = \"EMBEDDED_FLAT_DATA_PROPERTY_MAPPING\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_SECTION_POINTER\"] = \"FLAT_DATA_SECTION_POINTER\";\n // -------------------------------------- Function Activator --------------------------------------\n CORE_HASH_STRUCTURE[\"SNOWFLAKE_APP\"] = \"SNOWFLAKE_APP\";\n CORE_HASH_STRUCTURE[\"HOSTED_SERVICE\"] = \"HOSTED_SERVICE\";\n CORE_HASH_STRUCTURE[\"HOSTED_SERVICE_OWNER\"] = \"HOSTED_SERVICE_OWNER\";\n // ---------------------------------- Relation --------------------------------------\n CORE_HASH_STRUCTURE[\"REALTION_TYPE\"] = \"REALTION_TYPE\";\n CORE_HASH_STRUCTURE[\"REALTION_COLUMN\"] = \"REALTION_COLUMN\";\n})(CORE_HASH_STRUCTURE || (CORE_HASH_STRUCTURE = {}));\nexport const hashObjectWithoutSourceInformation = (val) => hashObject(val, {\n /**\n * NOTE: this is over-simplification as there could be source information fields with other names\n * see note in {@link pruneSourceInformation}\n */\n excludeKeys: (propKey) => propKey\n .toLowerCase()\n .endsWith(SOURCE_INFORMATION_PROPERTY_KEY_SUFFIX.toLowerCase()),\n});\nexport const hashRawLambda = (parameters, body) => hashArray([\n parameters ? hashObjectWithoutSourceInformation(parameters) : '',\n body ? hashObjectWithoutSourceInformation(body) : '',\n]);\nexport const hashElementPointer = (pointerType, path) => [CORE_HASH_STRUCTURE.PACKAGEABLE_ELEMENT_POINTER, pointerType ?? '', path]\n .map(hashValue)\n .join(',');\n//# sourceMappingURL=Core_HashUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport hash from 'hash.js';\nimport { default as objectHash, } from 'object-hash';\nimport { assertTrue, isObject, isBoolean, isNumber, isString, isNonNullable, } from '../error/AssertionUtils.js';\nexport const hashValue = (val) => hash.sha1().update(val).digest('hex');\nexport const hashUnknownValue = (val) => {\n assertTrue(isString(val) || isBoolean(val) || isNumber(val), `Can't hash non-primitive value`);\n return hashValue(val);\n};\nexport const hashArray = (arr) => hashValue(arr\n .filter(isNonNullable)\n .map((val) => typeof val === 'string' ||\n typeof val === 'boolean' ||\n typeof val === 'number'\n ? hashValue(val)\n : val.hashCode)\n .join(','));\n/**\n * NOTE: `node-object-hash` seems to be the much more efficient library. But it's based on Node's `crypto` module\n * which is not supported in browser (so we have map `crypto` module to `crypto-browserify` or `crypto-js`).\n * If this object-hashing becomes the performance bottle-neck, we should think about adopting this hashing library\n * See https://www.npmjs.com/package/node-object-hash\n */\nexport const hashObject = (value, options) => {\n assertTrue(isObject(value), `Can't hash non-object value`);\n return objectHash(value, options);\n};\n/**\n * This method can be used to debug hashing.\n *\n * We have tried to come up with a more robust way to debug hash, such as to construct the hash tree, but that's not\n * quite feasible for the following reasons:\n * 1. Since sometimes there are properties we don't drill down like for a class, we just take the path, we don't have\n * a systematic way to construct the hash tree, so we have to rely on the implementation of the hashCode function\n * in each element, which defeats the purpose of having a generic approach for debugging hash\n * 2. If we ignore the implementation detail of `get hashCode` and expand the property if it has `hashCode` then we\n * might risk getting into an infinite loop\n * 3. The manual way to come up with the `get hashCode` is in order to reconcile the differences between metamodels and\n * protocol models. If we only compare metamodels to protocol models for example, the problem might be less complicated,\n * but we're dealing with 2 hash systems (in a way)\n * 4. As such, the best solution at the moment is to come up with a function like this\n * to debug hash where we can put it at a top level structure like `Mapping` and then choose which part of the hash\n * we would like to `explore`\n *\n * @param typesToExpand when we trickle down the object properties, we want to drill down so we want to choose\n * the property to drill down (by its type) since sometimes we don't need to compute the\n * actual hash code for the property (for example: a class, or an enumeration) while computing\n * the hash, just their path.\n */\nexport const debugHash = (obj, typesToExpand, depth = 0) => {\n let res = depth !== 0 ? `${obj.hashCode}` : '';\n res += ` {\\n`;\n Object.entries(obj)\n .filter(([key, value]) => typeof value === 'object' &&\n (!Array.isArray(value) ||\n (value.length !== 0 &&\n value.every((v) => typesToExpand.some((typeToExpand) => v instanceof typeToExpand)))) &&\n (Array.isArray(value) ||\n typesToExpand.some((typeToExpand) => value instanceof typeToExpand)))\n .forEach(([key, value]) => {\n res += `${' '.repeat(depth + 1)}${key}: ${Array.isArray(value)\n ? !value.length\n ? '[]'\n : `[\\n${' '.repeat(depth + 2)}${value\n .map((val, idx) => `${idx}: ${debugHash(val, typesToExpand, depth + 2)}`)\n .join(`\\n${' '.repeat(depth + 2)}`)}\\n${' '.repeat(depth + 1)}]`\n : debugHash(value, typesToExpand, depth + 1)}\\n`;\n });\n res += `${' '.repeat(depth)}}`;\n return res;\n};\n//# sourceMappingURL=HashUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_GraphFetchTree, } from './V1_GraphFetchTree.js';\nimport { CORE_HASH_STRUCTURE } from '../../../../../../../../../graph/Core_HashUtils.js';\nimport { hashArray } from '@finos/legend-shared';\nexport class V1_RootGraphFetchTree extends V1_GraphFetchTree {\n class;\n accept_GraphFetchTreeVisitor(visitor) {\n return visitor.visit_RootGraphFetchTree(this);\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.ROOT_GRAPH_FETCH_TREE,\n hashArray(this.subTrees),\n hashArray(this.subTypeTrees),\n this.class,\n ]);\n }\n}\n//# sourceMappingURL=V1_RootGraphFetchTree.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { CORE_HASH_STRUCTURE } from '../../../../../../../graph/Core_HashUtils.js';\nimport { hashArray } from '@finos/legend-shared';\nexport class V1_Multiplicity {\n lowerBound = 0;\n upperBound;\n constructor(lowerBound, upperBound) {\n this.lowerBound = lowerBound;\n this.upperBound = upperBound;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.MULTIPLICITY,\n this.lowerBound.toString(),\n this.upperBound?.toString() ?? '',\n ]);\n }\n // common multiplicities\n static ZERO = new V1_Multiplicity(0, 0);\n static ZERO_ONE = new V1_Multiplicity(0, 1);\n static ZERO_MANY = new V1_Multiplicity(0, undefined);\n static ONE = new V1_Multiplicity(1, 1);\n static ONE_MANY = new V1_Multiplicity(1, undefined);\n}\n//# sourceMappingURL=V1_Multiplicity.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_Multiplicity } from '../../packageableElements/domain/V1_Multiplicity.js';\nimport { V1_ValueSpecification } from '../V1_ValueSpecification.js';\n/**\n * Similar to class instances, but these constructs are too fundamental for the system\n * so we group them as **core** class instances.\n */\nexport class V1_CoreClassInstance extends V1_ValueSpecification {\n multiplicity = V1_Multiplicity.ONE;\n}\n//# sourceMappingURL=V1_CoreClassInstance.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_CoreClassInstance } from './V1_CoreClassInstance.js';\nexport class V1_Lambda extends V1_CoreClassInstance {\n body = [];\n parameters = [];\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_Lambda(this);\n }\n}\n//# sourceMappingURL=V1_Lambda.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_Multiplicity } from '../../packageableElements/domain/V1_Multiplicity.js';\nimport { V1_ValueSpecification } from '../V1_ValueSpecification.js';\nexport class V1_DataTypeValueSpecification extends V1_ValueSpecification {\n multiplicity = V1_Multiplicity.ONE;\n}\n//# sourceMappingURL=V1_DataTypeValueSpecification.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class V1_Path {\n name;\n startType;\n path = [];\n}\n//# sourceMappingURL=V1_Path.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_Multiplicity } from '../../packageableElements/domain/V1_Multiplicity.js';\nimport { V1_ValueSpecification } from '../V1_ValueSpecification.js';\nexport class V1_AbstractAppliedFunction extends V1_ValueSpecification {\n multiplicity = V1_Multiplicity.ONE;\n}\n//# sourceMappingURL=V1_AbstractAppliedFunction.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_AbstractAppliedFunction } from '../raw/V1_AbstractAppliedFunction.js';\nexport class V1_AppliedFunction extends V1_AbstractAppliedFunction {\n function;\n fControl;\n parameters = [];\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_AppliedFunction(this);\n }\n}\n//# sourceMappingURL=V1_AppliedFunction.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_ValueSpecification, } from '../../../model/valueSpecification/V1_ValueSpecification.js';\nimport { V1_Multiplicity } from '../../../model/packageableElements/domain/V1_Multiplicity.js';\nexport class V1_Collection extends V1_ValueSpecification {\n multiplicity = V1_Multiplicity.ONE_MANY;\n values = [];\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_Collection(this);\n }\n}\n//# sourceMappingURL=V1_Collection.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_DataTypeValueSpecification } from './V1_DataTypeValueSpecification.js';\nexport class V1_PrimitiveValueSpecification extends V1_DataTypeValueSpecification {\n}\n//# sourceMappingURL=V1_PrimitiveValueSpecification.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_PrimitiveValueSpecification } from './V1_PrimitiveValueSpecification.js';\nexport class V1_CDecimal extends V1_PrimitiveValueSpecification {\n value;\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_CDecimal(this);\n }\n}\n//# sourceMappingURL=V1_CDecimal.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_PrimitiveValueSpecification } from './V1_PrimitiveValueSpecification.js';\nexport class V1_CInteger extends V1_PrimitiveValueSpecification {\n value;\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_CInteger(this);\n }\n}\n//# sourceMappingURL=V1_CInteger.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_PrimitiveValueSpecification } from './V1_PrimitiveValueSpecification.js';\nexport class V1_CString extends V1_PrimitiveValueSpecification {\n value;\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_CString(this);\n }\n}\n//# sourceMappingURL=V1_CString.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_PrimitiveValueSpecification } from './V1_PrimitiveValueSpecification.js';\nexport class V1_CFloat extends V1_PrimitiveValueSpecification {\n value;\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_CFloat(this);\n }\n}\n//# sourceMappingURL=V1_CFloat.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_PrimitiveValueSpecification } from './V1_PrimitiveValueSpecification.js';\nexport class V1_CDate extends V1_PrimitiveValueSpecification {\n}\n//# sourceMappingURL=V1_CDate.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_CDate } from './V1_CDate.js';\nexport class V1_CDateTime extends V1_CDate {\n value;\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_CDateTime(this);\n }\n}\n//# sourceMappingURL=V1_CDateTime.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_CDate } from './V1_CDate.js';\nexport class V1_CStrictDate extends V1_CDate {\n value;\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_CStrictDate(this);\n }\n}\n//# sourceMappingURL=V1_CStrictDate.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_PrimitiveValueSpecification } from './V1_PrimitiveValueSpecification.js';\nexport class V1_CStrictTime extends V1_PrimitiveValueSpecification {\n value;\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_CStrictTime(this);\n }\n}\n//# sourceMappingURL=V1_CStrictTime.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_PrimitiveValueSpecification } from './V1_PrimitiveValueSpecification.js';\nexport class V1_CBoolean extends V1_PrimitiveValueSpecification {\n value;\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_CBoolean(this);\n }\n}\n//# sourceMappingURL=V1_CBoolean.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class V1_AggregateValue {\n mapFn;\n aggregateFn;\n}\n//# sourceMappingURL=V1_AggregateValue.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class V1_Pair {\n first;\n second;\n}\n//# sourceMappingURL=V1_Pair.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class V1_RuntimeInstance {\n runtime;\n}\n//# sourceMappingURL=V1_RuntimeInstance.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class V1_ExecutionContextInstance {\n executionContext;\n}\n//# sourceMappingURL=V1_ExecutionContextInstance.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_GraphFetchTree, } from './V1_GraphFetchTree.js';\nimport { hashArray } from '@finos/legend-shared';\nimport { CORE_HASH_STRUCTURE } from '../../../../../../../../../graph/Core_HashUtils.js';\nexport class V1_PropertyGraphFetchTree extends V1_GraphFetchTree {\n property;\n parameters = [];\n alias;\n subType;\n accept_GraphFetchTreeVisitor(visitor) {\n return visitor.visit_PropertyGraphFetchTree(this);\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.PROPERTY_GRAPH_FETCH_TREE,\n hashArray(this.subTrees),\n this.property,\n this.alias ?? '',\n this.subType ?? '',\n ]);\n }\n}\n//# sourceMappingURL=V1_PropertyGraphFetchTree.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_GraphFetchTree, } from './V1_GraphFetchTree.js';\nimport { CORE_HASH_STRUCTURE } from '../../../../../../../../../graph/Core_HashUtils.js';\nimport { hashArray } from '@finos/legend-shared';\nexport class V1_SubTypeGraphFetchTree extends V1_GraphFetchTree {\n subTypeClass;\n accept_GraphFetchTreeVisitor(visitor) {\n return visitor.visit_SubTypeGraphFetchTree(this);\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.SUBTYPE_GRAPH_FETCH_TREE,\n hashArray(this.subTrees),\n this.subTypeClass,\n ]);\n }\n}\n//# sourceMappingURL=V1_SubTypeGraphFetchTree.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class V1_SerializationConfig {\n includeType;\n typeKeyName;\n includeEnumType;\n removePropertiesWithNullValues;\n removePropertiesWithEmptySets;\n fullyQualifiedTypePath;\n includeObjectReference;\n}\n//# sourceMappingURL=V1_SerializationConfig.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_CoreClassInstance } from './V1_CoreClassInstance.js';\nexport class V1_KeyExpression extends V1_CoreClassInstance {\n add;\n expression;\n key;\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_KeyExpression(this);\n }\n}\n//# sourceMappingURL=V1_KeyExpression.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class V1_PureList {\n values = [];\n}\n//# sourceMappingURL=V1_PureList.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class V1_TDSAggregateValue {\n name;\n pmapFn;\n aggregateFn;\n}\n//# sourceMappingURL=V1_TDSAggregateValue.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class V1_TDSColumnInformation {\n name;\n columnFn;\n}\n//# sourceMappingURL=V1_TDSColumnInformation.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class V1_TDSSortInformation {\n column;\n direction;\n}\n//# sourceMappingURL=V1_TDSSortInformation.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class V1_TDSOlapRank {\n function;\n}\n//# sourceMappingURL=V1_TDSOlapRank.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class V1_TDSOlapAggregation {\n function;\n columnName;\n}\n//# sourceMappingURL=V1_TDSOlapAggregation.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class V1_ColSpecArray {\n colSpecs = [];\n}\n//# sourceMappingURL=V1_ColSpecArray.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class V1_ColSpec {\n name;\n type;\n function1;\n function2;\n}\n//# sourceMappingURL=V1_ColSpec.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class V1_RelationStoreAccessor {\n path = [];\n}\n//# sourceMappingURL=V1_RelationStoreAccessor.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { CORE_HASH_STRUCTURE } from '../../../../../../graph/Core_HashUtils.js';\nimport { hashArray } from '@finos/legend-shared';\nimport { ELEMENT_PATH_DELIMITER } from '../../../../../../graph/MetaModelConst.js';\nexport class V1_PackageableElement {\n package;\n name;\n /**\n * This logic is specific to the codebase and this is not part of the native metamodel.\n * If needed, we can probably move this out as an utility or do type declaration merge\n * and define this externally using `Object.defineProperty`.\n *\n * @internal model logic\n */\n get path() {\n return `${this.package}${ELEMENT_PATH_DELIMITER}${this.name}`;\n }\n get hashCode() {\n return hashArray([CORE_HASH_STRUCTURE.PACKAGEABLE_ELEMENT, this.path]);\n }\n}\nexport class V1_PackageableElementPointer {\n type;\n path;\n constructor(type, path) {\n this.type = type;\n this.path = path;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.PACKAGEABLE_ELEMENT_POINTER,\n this.type ?? '',\n this.path,\n ]);\n }\n}\n//# sourceMappingURL=V1_PackageableElement.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { primitive, createModelSchema, optional } from 'serializr';\nimport { SerializationFactory, optionalCustomUsingModelSchema, } from '@finos/legend-shared';\nimport { V1_Multiplicity } from '../../../model/packageableElements/domain/V1_Multiplicity.js';\nimport { V1_PackageableElementPointer } from '../../../model/packageableElements/V1_PackageableElement.js';\nimport { V1_SourceInformation } from '../../../model/V1_SourceInformation.js';\nexport const V1_sourceInformationSerialization = new SerializationFactory(createModelSchema(V1_SourceInformation, {\n sourceId: primitive(),\n startLine: primitive(),\n startColumn: primitive(),\n endLine: primitive(),\n endColumn: primitive(),\n}));\nexport class V1_INTERNAL__PackageableElementWithSourceInformation {\n package;\n name;\n sourceInformation;\n static serialization = new SerializationFactory(createModelSchema(V1_INTERNAL__PackageableElementWithSourceInformation, {\n package: primitive(),\n name: primitive(),\n sourceInformation: optionalCustomUsingModelSchema(V1_sourceInformationSerialization.schema),\n }));\n}\nexport const V1_packageableElementPointerModelSchema = createModelSchema(V1_PackageableElementPointer, {\n path: primitive(),\n type: optional(primitive()),\n});\nexport const V1_multiplicityModelSchema = createModelSchema(V1_Multiplicity, {\n lowerBound: primitive(),\n upperBound: optional(primitive()),\n});\n//# sourceMappingURL=V1_CoreSerializationHelper.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class V1_SourceInformation {\n sourceId;\n startLine;\n startColumn;\n endLine;\n endColumn;\n}\n//# sourceMappingURL=V1_SourceInformation.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class V1_PathElement {\n}\n//# sourceMappingURL=V1_PathElement.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_PathElement } from './V1_PathElement.js';\nexport class V1_PropertyPathElement extends V1_PathElement {\n property;\n parameters = [];\n}\n//# sourceMappingURL=V1_PropertyPathElement.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_AbstractAppliedFunction } from '../raw/V1_AbstractAppliedFunction.js';\nexport class V1_AppliedProperty extends V1_AbstractAppliedFunction {\n class;\n property;\n parameters = [];\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_AppliedProperty(this);\n }\n}\n//# sourceMappingURL=V1_AppliedProperty.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { CORE_HASH_STRUCTURE } from '../../../../../../../graph/Core_HashUtils.js';\nimport { hashArray } from '@finos/legend-shared';\nexport class V1_Runtime {\n}\nexport class V1_IdentifiedConnection {\n id;\n connection;\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.IDENTIFIED_CONNECTION,\n this.id,\n this.connection,\n ]);\n }\n}\nexport class V1_StoreConnections {\n store;\n storeConnections = [];\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.STORE_CONNECTIONS,\n this.store,\n hashArray(this.storeConnections),\n ]);\n }\n}\nexport class V1_ConnectionStores {\n connectionPointer;\n storePointers = [];\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.STORE_CONNECTIONS,\n this.connectionPointer,\n hashArray(this.storePointers),\n ]);\n }\n}\nexport class V1_EngineRuntime extends V1_Runtime {\n mappings = [];\n connectionStores = [];\n connections = [];\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.ENGINE_RUNTIME,\n hashArray(this.mappings),\n hashArray(this.connectionStores),\n hashArray(this.connections),\n ]);\n }\n}\nexport class V1_SingleConnectionEngineRuntime extends V1_EngineRuntime {\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.SINGLE_ENGINE_RUNTIME,\n hashArray(this.mappings),\n hashArray(this.connectionStores),\n hashArray(this.connections),\n ]);\n }\n}\nexport class V1_LegacyRuntime extends V1_Runtime {\n mappings = [];\n connections = [];\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.LEGACY_RUNTIME,\n hashArray(this.mappings),\n hashArray(this.connections),\n ]);\n }\n}\nexport class V1_RuntimePointer extends V1_Runtime {\n runtime;\n get hashCode() {\n return hashArray([CORE_HASH_STRUCTURE.RUNTIME_POINTER, this.runtime]);\n }\n}\n//# sourceMappingURL=V1_Runtime.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createModelSchema, primitive, list, custom, serialize, deserialize, object, } from 'serializr';\nimport { usingConstantValueSchema, UnsupportedOperationError, usingModelSchema, } from '@finos/legend-shared';\nimport { V1_packageableElementPointerModelSchema } from '../../../transformation/pureProtocol/serializationHelpers/V1_CoreSerializationHelper.js';\nimport { V1_PackageableRuntime } from '../../../model/packageableElements/runtime/V1_PackageableRuntime.js';\nimport { V1_EngineRuntime, V1_IdentifiedConnection, V1_LegacyRuntime, V1_RuntimePointer, V1_StoreConnections, V1_ConnectionStores, V1_SingleConnectionEngineRuntime, } from '../../../model/packageableElements/runtime/V1_Runtime.js';\nimport { V1_serializeConnectionValue, V1_deserializeConnectionValue, V1_connectionPointerModelSchema, } from './V1_ConnectionSerializationHelper.js';\nexport const V1_PACKAGEABLE_RUNTIME_ELEMENT_PROTOCOL_TYPE = 'runtime';\nexport var V1_RuntimeType;\n(function (V1_RuntimeType) {\n V1_RuntimeType[\"RUNTIME_POINTER\"] = \"runtimePointer\";\n V1_RuntimeType[\"LEGACY_RUNTIME\"] = \"legacyRuntime\";\n V1_RuntimeType[\"ENGINE_RUNTIME\"] = \"engineRuntime\";\n V1_RuntimeType[\"SINGLE_ENGINE_RUNTIME\"] = \"localEngineRuntime\";\n})(V1_RuntimeType || (V1_RuntimeType = {}));\nexport const V1_runtimePointerModelSchema = createModelSchema(V1_RuntimePointer, {\n _type: usingConstantValueSchema(V1_RuntimeType.RUNTIME_POINTER),\n runtime: primitive(),\n});\nexport const V1_setupLegacyRuntimeSerialization = (plugins) => {\n createModelSchema(V1_LegacyRuntime, {\n _type: usingConstantValueSchema(V1_RuntimeType.LEGACY_RUNTIME),\n connections: list(custom((val) => V1_serializeConnectionValue(val, true, plugins), (val) => V1_deserializeConnectionValue(val, true, plugins))),\n mappings: list(usingModelSchema(V1_packageableElementPointerModelSchema)),\n });\n};\nexport const V1_setupEngineRuntimeSerialization = (plugins) => {\n createModelSchema(V1_IdentifiedConnection, {\n connection: custom((val) => V1_serializeConnectionValue(val, true, plugins), (val) => V1_deserializeConnectionValue(val, true, plugins)),\n id: primitive(),\n });\n createModelSchema(V1_ConnectionStores, {\n connectionPointer: usingModelSchema(V1_connectionPointerModelSchema),\n storePointers: list(usingModelSchema(V1_packageableElementPointerModelSchema)),\n });\n createModelSchema(V1_StoreConnections, {\n store: usingModelSchema(V1_packageableElementPointerModelSchema),\n storeConnections: list(object(V1_IdentifiedConnection)),\n });\n createModelSchema(V1_EngineRuntime, {\n _type: usingConstantValueSchema(V1_RuntimeType.ENGINE_RUNTIME),\n connectionStores: list(object(V1_ConnectionStores)),\n connections: list(object(V1_StoreConnections)),\n mappings: list(usingModelSchema(V1_packageableElementPointerModelSchema)),\n });\n createModelSchema(V1_SingleConnectionEngineRuntime, {\n _type: usingConstantValueSchema(V1_RuntimeType.SINGLE_ENGINE_RUNTIME),\n connectionStores: list(object(V1_ConnectionStores)),\n connections: list(object(V1_StoreConnections)),\n mappings: list(usingModelSchema(V1_packageableElementPointerModelSchema)),\n });\n};\nexport const V1_serializeRuntime = (protocol) => {\n if (protocol instanceof V1_EngineRuntime) {\n return serialize(V1_EngineRuntime, protocol);\n }\n else if (protocol instanceof V1_RuntimePointer) {\n return serialize(V1_runtimePointerModelSchema, protocol);\n }\n // NOTE: we don't want to serialize legacy runtime as we no longer want to circulate it any further\n throw new UnsupportedOperationError(`Can't serialize runtime`, protocol);\n};\nexport const V1_deserializeRuntime = (json) => {\n switch (json._type) {\n case V1_RuntimeType.RUNTIME_POINTER:\n return deserialize(V1_runtimePointerModelSchema, json);\n case V1_RuntimeType.ENGINE_RUNTIME:\n return deserialize(V1_EngineRuntime, json);\n case V1_RuntimeType.LEGACY_RUNTIME:\n case undefined:\n return deserialize(V1_LegacyRuntime, json);\n default:\n throw new UnsupportedOperationError(`Can't deeserialize runtime of type '${json._type}'`);\n }\n};\nexport const V1_serializeRuntimeValue = (protocol) => {\n if (protocol instanceof V1_SingleConnectionEngineRuntime) {\n return serialize(V1_SingleConnectionEngineRuntime, protocol);\n }\n return serialize(V1_EngineRuntime, protocol);\n};\nexport const V1_deserializeRuntimeValue = (json) => {\n if (json._type === V1_RuntimeType.SINGLE_ENGINE_RUNTIME) {\n return deserialize(V1_SingleConnectionEngineRuntime, json);\n }\n return deserialize(V1_EngineRuntime, json);\n};\nexport const V1_packageableRuntimeModelSchema = createModelSchema(V1_PackageableRuntime, {\n _type: usingConstantValueSchema(V1_PACKAGEABLE_RUNTIME_ELEMENT_PROTOCOL_TYPE),\n name: primitive(),\n package: primitive(),\n runtimeValue: custom((val) => V1_serializeRuntimeValue(val), (val) => V1_deserializeRuntimeValue(val)),\n});\n//# sourceMappingURL=V1_RuntimeSerializationHelper.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { hashArray } from '@finos/legend-shared';\nimport { CORE_HASH_STRUCTURE } from '../../../../../../../graph/Core_HashUtils.js';\nimport { V1_PackageableElement, } from '../../../model/packageableElements/V1_PackageableElement.js';\nexport class V1_PackageableRuntime extends V1_PackageableElement {\n runtimeValue;\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.PACKAGEABLE_RUNTIME,\n this.path,\n this.runtimeValue,\n ]);\n }\n accept_PackageableElementVisitor(visitor) {\n return visitor.visit_PackageableRuntime(this);\n }\n}\n//# sourceMappingURL=V1_PackageableRuntime.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class V1_ExecutionContext {\n queryTimeOutInSeconds;\n enableConstraints;\n}\n//# sourceMappingURL=V1_ExecutionContext.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_ExecutionContext } from './V1_ExecutionContext.js';\nexport class V1_AnalyticsExecutionContext extends V1_ExecutionContext {\n useAnalytics;\n toFlowSetFunction;\n}\n//# sourceMappingURL=V1_AnalyticsExecutionContext.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_ExecutionContext } from './V1_ExecutionContext.js';\nexport class V1_BaseExecutionContext extends V1_ExecutionContext {\n}\n//# sourceMappingURL=V1_BaseExecutionContext.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_ValueSpecification, } from '../../../model/valueSpecification/V1_ValueSpecification.js';\nimport { V1_Multiplicity } from '../../packageableElements/domain/V1_Multiplicity.js';\nexport class V1_PackageableElementPtr extends V1_ValueSpecification {\n multiplicity = V1_Multiplicity.ONE;\n fullPath;\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_PackageableElementPtr(this);\n }\n}\nexport class V1_PackageableType extends V1_PackageableElementPtr {\n get hashCode() {\n return this.fullPath;\n }\n}\n//# sourceMappingURL=V1_PackageableElementPtr.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_PackageableElementPtr } from './V1_PackageableElementPtr.js';\nexport class V1_GenericTypeInstance extends V1_PackageableElementPtr {\n typeArguments = [];\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_GenericTypeInstance(this);\n }\n}\n//# sourceMappingURL=V1_GenericTypeInstance.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_Multiplicity } from '../../packageableElements/domain/V1_Multiplicity.js';\nimport { V1_ValueSpecification, } from '../V1_ValueSpecification.js';\n/**\n * This is the mechanism by which we scale the system. Pretty much any constructs like\n * graph-fetch, path, etc, which have the need to store some data and manifest in value\n * specification space can be wrapped in form of a class instance. Here, we also keep\n * track of the type in order to interpret the value for processing.\n */\nexport class V1_ClassInstance extends V1_ValueSpecification {\n multiplicity = V1_Multiplicity.ONE;\n type;\n value;\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_ClassInstance(this);\n }\n}\n//# sourceMappingURL=V1_ClassInstance.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class V1_GenericType {\n rawType;\n typeArguments = [];\n multiplicityArguments = [];\n typeVariableValues = [];\n get hashCode() {\n return this.rawType.hashCode;\n }\n}\n//# sourceMappingURL=V1_GenericType.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * NOTE: this file holds the most basic utilties to deal with the graph and\n * metamodels. Any methods which requires importing some metamodel or graph\n * are meant to be put into helpers method, e.g. `DomainHelper`.\n *\n * This is to avoid circular dependencies and also to keep things in the\n * right layer\n */\nimport { ELEMENT_PATH_DELIMITER, SOURCE_INFORMATION_PROPERTY_KEY_SUFFIX, } from './MetaModelConst.js';\nimport { findLast, guaranteeNonNullable, isString, recursiveOmit, } from '@finos/legend-shared';\nexport const extractElementNameFromPath = (fullPath) => guaranteeNonNullable(findLast(fullPath.split(ELEMENT_PATH_DELIMITER)));\nexport const extractPackagePathFromPath = (fullPath) => {\n const idx = fullPath.lastIndexOf(ELEMENT_PATH_DELIMITER);\n return idx === -1 ? undefined : fullPath.substring(0, idx);\n};\nexport const isValidIdentifier = (input, allowDollarSymbol) => allowDollarSymbol\n ? Boolean(input.match(/^[a-z][\\w\\d$]*$/))\n : Boolean(input.match(/^[a-z][\\w\\d]*$/));\nexport const matchFunctionName = (functionName, functionFullPaths) => Array.isArray(functionFullPaths)\n ? functionFullPaths.some((functionFullPath) => matchFunctionName(functionName, functionFullPath))\n : functionName === functionFullPaths ||\n extractElementNameFromPath(functionFullPaths) === functionName;\n/**\n * This method concatenate 2 fully-qualified elementh paths to form a single one\n * and then extracts the name and package part from it.\n */\nexport const resolvePackagePathAndElementName = (path, defaultPath) => {\n const index = path.lastIndexOf(ELEMENT_PATH_DELIMITER);\n if (index === -1) {\n return [defaultPath ?? '', path];\n }\n return [\n path.substring(0, index),\n path.substring(index + ELEMENT_PATH_DELIMITER.length, path.length),\n ];\n};\nexport const buildPath = (packagePath, name) => `${guaranteeNonNullable(packagePath, 'Package path is required')}${ELEMENT_PATH_DELIMITER}${guaranteeNonNullable(name, 'Name is required')}`;\nexport const createPath = (packagePath, name) => `${packagePath ? `${packagePath}${ELEMENT_PATH_DELIMITER}` : ''}${name}`;\n// TODO: we might need to support quoted identifier in the future\nexport const isValidPathIdentifier = (val) => Boolean(val.match(/^\\w[\\w$_-]*$/));\nexport const isValidFullPath = (fullPath) => Boolean(fullPath.match(/^(?:\\w[\\w$_-]*)(?:::\\w[\\w$_-]*)+$/));\nexport const isValidPath = (path) => Boolean(path.match(/^(?:\\w[\\w$_-]*)(?:::\\w[\\w$_-]*)*$/));\nexport const fromElementPathToMappingElementId = (className) => className.split(ELEMENT_PATH_DELIMITER).join('_');\n/**\n * Prune source information from object such as raw lambda, raw value specification, etc.\n *\n * NOTE: currently, there is no exhaustive way to do this. Majority of the cases, the source information field\n * is suffixed with `sourceInformation` (e.g. `profileSourceInformation`, `propertyTypeSourceInformation`),\n * however, we have sometimes deviated from this pattern in our protocol model, so we have fields like `classSourceInformation`,\n * etc. So this is really an optimistic, non-exhaustive prune.\n *\n * To do this exhaustively, we need to tweak this method to also check for the structure of the (sub)object to make sure\n * it is structually equivalent to the shape of source information to prune it. However, this is computationally expensive.\n *\n * NOTE: That aside, We should cleanup these in the backend and use pointer instead so source information is coupled\n * with the value instead of having custom-name source information fields like these, polluting the protocol models.\n */\nexport const pruneSourceInformation = (object) => recursiveOmit(object, (obj, propKey) => isString(propKey) &&\n propKey\n .toLowerCase()\n .endsWith(SOURCE_INFORMATION_PROPERTY_KEY_SUFFIX.toLowerCase()));\n//# sourceMappingURL=MetaModelUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { hashArray } from '@finos/legend-shared';\nimport { CORE_HASH_STRUCTURE } from '../../../../../../graph/Core_HashUtils.js';\nimport { V1_RawValueSpecification, } from '../../model/rawValueSpecification/V1_RawValueSpecification.js';\nexport class V1_RawRawType {\n fullPath;\n}\nexport class V1_RawGenricType {\n rawType;\n multiplicityArguments = [];\n typeArguments = [];\n typeVariableValues = [];\n}\nexport class V1_RawVariable extends V1_RawValueSpecification {\n genericType;\n name;\n multiplicity;\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.RAW_VARIABLE,\n this.genericType.rawType.fullPath,\n this.name,\n this.multiplicity,\n ]);\n }\n accept_RawValueSpecificationVisitor(visitor) {\n return visitor.visit_Variable(this);\n }\n}\n//# sourceMappingURL=V1_RawVariable.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createModelSchema, custom, deserialize, list, optional, primitive, serialize, } from 'serializr';\nimport { V1_GenericType } from '../../../model/packageableElements/type/V1_GenericType.js';\nimport { V1_PackageableType } from '../../../model/valueSpecification/raw/V1_PackageableElementPtr.js';\nimport { customList, isString, returnUndefOnError, UnsupportedOperationError, usingConstantValueSchema, usingModelSchema, } from '@finos/legend-shared';\nimport { V1_Multiplicity } from '../../../model/packageableElements/domain/V1_Multiplicity.js';\nimport { V1_multiplicityModelSchema } from './V1_CoreSerializationHelper.js';\nimport { matchFunctionName } from '../../../../../../../graph/MetaModelUtils.js';\nimport { CORE_PURE_PATH } from '../../../../../../../graph/MetaModelConst.js';\nimport { V1_RawGenricType, V1_RawRawType, } from '../../../model/rawValueSpecification/V1_RawVariable.js';\nimport { V1_getGenericTypeFullPath } from '../../../helpers/V1_DomainHelper.js';\nexport var V1_Type_Type;\n(function (V1_Type_Type) {\n V1_Type_Type[\"PackageableType\"] = \"packageableType\";\n V1_Type_Type[\"RelationType\"] = \"relationType\";\n})(V1_Type_Type || (V1_Type_Type = {}));\nexport const V1_PackageableTypeSchema = createModelSchema(V1_PackageableType, {\n _type: usingConstantValueSchema(V1_Type_Type.PackageableType),\n fullPath: primitive(),\n});\nexport function V1_deserializeType(json) {\n switch (json._type) {\n case V1_Type_Type.PackageableType:\n return deserialize(V1_PackageableTypeSchema, json);\n default:\n throw new UnsupportedOperationError(`Can't deserialize v1 type: '${json._type}'`);\n }\n}\nexport function V1_serializeType(json) {\n if (json instanceof V1_PackageableType) {\n return serialize(V1_PackageableTypeSchema, json);\n }\n throw new UnsupportedOperationError(`Can't deserialize v1_type'`);\n}\nexport const V1_GenericTypeModelSchema = createModelSchema(V1_GenericType, {\n multiplicityArguments: customList((val) => serialize(V1_multiplicityModelSchema, val), (val) => deserialize(V1_multiplicityModelSchema, val), {\n INTERNAL__forceReturnEmptyInTest: true,\n }),\n rawType: custom((val) => V1_serializeType(val), (val) => V1_deserializeType(val)),\n typeVariableValues: optional(list(primitive())),\n typeArguments: optional(list(primitive())),\n});\nconst appendAnyGenericType = (current) => {\n current.multiplicityArguments = [new V1_Multiplicity(1, undefined)];\n const _anytype = new V1_PackageableType();\n _anytype.fullPath = CORE_PURE_PATH.ANY;\n const arGenType = new V1_GenericType();\n arGenType.rawType = _anytype;\n current.typeArguments = [arGenType];\n};\nexport const V1_deserializeGenericType = (val) => {\n // backward compatible\n let genType;\n if (isString(val)) {\n genType = new V1_GenericType();\n const packageableType = new V1_PackageableType();\n packageableType.fullPath = val;\n genType.rawType = packageableType;\n if (matchFunctionName(val, CORE_PURE_PATH.TABULAR_RESULT)) {\n appendAnyGenericType(genType);\n }\n }\n else {\n genType = deserialize(V1_GenericTypeModelSchema, val);\n }\n const classPath = returnUndefOnError(() => V1_getGenericTypeFullPath(genType));\n if (classPath &&\n matchFunctionName(classPath, CORE_PURE_PATH.TABULAR_RESULT) &&\n !genType.multiplicityArguments.length &&\n !genType.typeArguments.length) {\n appendAnyGenericType(genType);\n }\n return genType;\n};\n// Raw Generic Type\nexport const V1_RawRawTypeSchemaModel = createModelSchema(V1_RawRawType, {\n _type: usingConstantValueSchema(V1_Type_Type.PackageableType),\n fullPath: primitive(),\n});\nconst V1_RawGenricTypeSchemaModelInner = createModelSchema(V1_RawGenricType, {\n multiplicityArguments: customList((val) => serialize(V1_multiplicityModelSchema, val), (val) => deserialize(V1_multiplicityModelSchema, val), {\n INTERNAL__forceReturnEmptyInTest: true,\n }),\n rawType: usingConstantValueSchema(V1_RawRawTypeSchemaModel),\n typeVariableValues: optional(list(primitive())),\n typeArguments: optional(list(primitive())),\n});\nexport const V1_RawGenricTypeSchemaModel = createModelSchema(V1_RawGenricType, {\n multiplicityArguments: customList((val) => serialize(V1_multiplicityModelSchema, val), (val) => deserialize(V1_multiplicityModelSchema, val), {\n INTERNAL__forceReturnEmptyInTest: true,\n }),\n rawType: usingModelSchema(V1_RawRawTypeSchemaModel),\n typeVariableValues: optional(list(primitive())),\n typeArguments: optional(list(usingModelSchema(V1_RawGenricTypeSchemaModelInner))),\n});\nexport const V1_deserializeRawGenericType = (val) => {\n let genericType;\n // backward compatible\n if (isString(val)) {\n genericType = new V1_RawGenricType();\n const packageableType = new V1_RawRawType();\n packageableType.fullPath = val;\n genericType.rawType = packageableType;\n }\n else {\n genericType = deserialize(V1_RawGenricTypeSchemaModel, val);\n }\n if (matchFunctionName(genericType.rawType.fullPath, CORE_PURE_PATH.TABULAR_RESULT) &&\n !genericType.multiplicityArguments.length &&\n !genericType.typeArguments.length) {\n genericType.multiplicityArguments = [new V1_Multiplicity(1, undefined)];\n const _anytype = new V1_RawRawType();\n _anytype.fullPath = CORE_PURE_PATH.ANY;\n const arGenType = new V1_RawGenricType();\n arGenType.rawType = _anytype;\n genericType.typeArguments = [arGenType];\n }\n return genericType;\n};\n//# sourceMappingURL=V1_TypeSerializationHelper.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createModelSchema, primitive, serialize, SKIP, list, custom, deserialize, optional, } from 'serializr';\nimport { usingConstantValueSchema, UnsupportedOperationError, usingModelSchema, guaranteeIsString, isString, isPlainObject, optionalCustomList, optionalCustom, } from '@finos/legend-shared';\nimport { V1_Variable } from '../../../model/valueSpecification/V1_Variable.js';\nimport { V1_RootGraphFetchTree } from '../../../model/valueSpecification/raw/classInstance/graph/V1_RootGraphFetchTree.js';\nimport { V1_Lambda } from '../../../model/valueSpecification/raw/V1_Lambda.js';\nimport { V1_EnumValue } from '../../../model/valueSpecification/raw/V1_EnumValue.js';\nimport { V1_Path } from '../../../model/valueSpecification/raw/classInstance/path/V1_Path.js';\nimport { V1_AppliedFunction } from '../../../model/valueSpecification/application/V1_AppliedFunction.js';\nimport { V1_Collection } from '../../../model/valueSpecification/raw/V1_Collection.js';\nimport { V1_CDecimal } from '../../../model/valueSpecification/raw/V1_CDecimal.js';\nimport { V1_CInteger } from '../../../model/valueSpecification/raw/V1_CInteger.js';\nimport { V1_CString } from '../../../model/valueSpecification/raw/V1_CString.js';\nimport { V1_CFloat } from '../../../model/valueSpecification/raw/V1_CFloat.js';\nimport { V1_CDateTime } from '../../../model/valueSpecification/raw/V1_CDateTime.js';\nimport { V1_CStrictDate } from '../../../model/valueSpecification/raw/V1_CStrictDate.js';\nimport { V1_CStrictTime } from '../../../model/valueSpecification/raw/V1_CStrictTime.js';\nimport { V1_CLatestDate } from '../../../model/valueSpecification/raw/V1_CLatestDate.js';\nimport { V1_CBoolean } from '../../../model/valueSpecification/raw/V1_CBoolean.js';\nimport { V1_AggregateValue } from '../../../model/valueSpecification/raw/classInstance/V1_AggregateValue.js';\nimport { V1_Pair } from '../../../model/valueSpecification/raw/classInstance/V1_Pair.js';\nimport { V1_RuntimeInstance } from '../../../model/valueSpecification/raw/classInstance/V1_RuntimeInstance.js';\nimport { V1_ExecutionContextInstance } from '../../../model/valueSpecification/raw/classInstance/V1_ExecutionContextInstance.js';\nimport { V1_PropertyGraphFetchTree } from '../../../model/valueSpecification/raw/classInstance/graph/V1_PropertyGraphFetchTree.js';\nimport { V1_SubTypeGraphFetchTree } from '../../../model/valueSpecification/raw/classInstance/graph/V1_SubTypeGraphFetchTree.js';\nimport { V1_SerializationConfig } from '../../../model/valueSpecification/raw/classInstance/V1_SerializationConfig.js';\nimport { V1_KeyExpression } from '../../../model/valueSpecification/raw/V1_KeyExpression.js';\nimport { V1_PureList } from '../../../model/valueSpecification/raw/classInstance/V1_PureList.js';\nimport { V1_TDSAggregateValue } from '../../../model/valueSpecification/raw/classInstance/V1_TDSAggregateValue.js';\nimport { V1_TDSColumnInformation } from '../../../model/valueSpecification/raw/classInstance/V1_TDSColumnInformation.js';\nimport { V1_TDSSortInformation } from '../../../model/valueSpecification/raw/classInstance/V1_TDSSortInformation.js';\nimport { V1_TDSOlapRank } from '../../../model/valueSpecification/raw/classInstance/V1_TDSOlapRank.js';\nimport { V1_TDSOlapAggregation } from '../../../model/valueSpecification/raw/classInstance/V1_TDSOlapAggregation.js';\nimport { V1_ColSpecArray } from '../../../model/valueSpecification/raw/classInstance/relation/V1_ColSpecArray.js';\nimport { V1_ColSpec } from '../../../model/valueSpecification/raw/classInstance/relation/V1_ColSpec.js';\nimport { V1_RelationStoreAccessor } from '../../../model/valueSpecification/raw/classInstance/relation/V1_RelationStoreAccessor.js';\nimport { V1_multiplicityModelSchema } from './V1_CoreSerializationHelper.js';\nimport { V1_PropertyPathElement } from '../../../model/valueSpecification/raw/classInstance/path/V1_PropertyPathElement.js';\nimport { V1_AppliedProperty } from '../../../model/valueSpecification/application/V1_AppliedProperty.js';\nimport { V1_serializeRuntime } from './V1_RuntimeSerializationHelper.js';\nimport { V1_AnalyticsExecutionContext } from '../../../model/valueSpecification/raw/executionContext/V1_AnalyticsExecutionContext.js';\nimport { V1_BaseExecutionContext } from '../../../model/valueSpecification/raw/executionContext/V1_BaseExecutionContext.js';\nimport { V1_PackageableElementPtr } from '../../../model/valueSpecification/raw/V1_PackageableElementPtr.js';\nimport { V1_EngineRuntime } from '../../../model/packageableElements/runtime/V1_Runtime.js';\nimport { V1_GenericTypeInstance } from '../../../model/valueSpecification/raw/V1_GenericTypeInstance.js';\nimport { V1_Multiplicity } from '../../../model/packageableElements/domain/V1_Multiplicity.js';\nimport { V1_ClassInstance } from '../../../model/valueSpecification/raw/V1_ClassInstance.js';\nimport { V1_CByteArray } from '../../../model/valueSpecification/raw/V1_CByteArray.js';\nimport { V1_deserializeGenericType, V1_GenericTypeModelSchema, } from './V1_TypeSerializationHelper.js';\nvar V1_ExecutionContextType;\n(function (V1_ExecutionContextType) {\n V1_ExecutionContextType[\"BASE_EXECUTION_CONTEXT\"] = \"BaseExecutionContext\";\n V1_ExecutionContextType[\"ANALYTICS_EXECUTION_CONTEXT\"] = \"AnalyticsExecutionContext\";\n})(V1_ExecutionContextType || (V1_ExecutionContextType = {}));\nvar V1_PathElementType;\n(function (V1_PathElementType) {\n V1_PathElementType[\"PROPERTY_PATH_ELEMENT\"] = \"propertyPath\";\n})(V1_PathElementType || (V1_PathElementType = {}));\nexport var V1_GraphFetchTreeType;\n(function (V1_GraphFetchTreeType) {\n V1_GraphFetchTreeType[\"PROPERTY_GRAPH_FETCH_TREE\"] = \"propertyGraphFetchTree\";\n})(V1_GraphFetchTreeType || (V1_GraphFetchTreeType = {}));\nexport var V1_ClassInstanceType;\n(function (V1_ClassInstanceType) {\n V1_ClassInstanceType[\"ROOT_GRAPH_FETCH_TREE\"] = \"rootGraphFetchTree\";\n V1_ClassInstanceType[\"SUBTYPE_GRAPH_FETCH_TREE\"] = \"subTypeGraphFetchTree\";\n V1_ClassInstanceType[\"PATH\"] = \"path\";\n V1_ClassInstanceType[\"AGGREGATE_VALUE\"] = \"aggregateValue\";\n V1_ClassInstanceType[\"EXECUTION_CONTEXT_INSTANCE\"] = \"executionContextInstance\";\n V1_ClassInstanceType[\"PAIR\"] = \"pair\";\n V1_ClassInstanceType[\"PURE_LIST\"] = \"listInstance\";\n V1_ClassInstanceType[\"RUNTIME_INSTANCE\"] = \"runtimeInstance\";\n V1_ClassInstanceType[\"SERIALIZATION_CONFIG\"] = \"alloySerializationConfig\";\n V1_ClassInstanceType[\"COL_SPEC\"] = \"colSpec\";\n V1_ClassInstanceType[\"COL_SPEC_ARRAY\"] = \"colSpecArray\";\n V1_ClassInstanceType[\"RELATION_STORE_ACCESSOR\"] = \">\";\n V1_ClassInstanceType[\"TDS_AGGREGATE_VALUE\"] = \"tdsAggregateValue\";\n V1_ClassInstanceType[\"TDS_COLUMN_INFORMATION\"] = \"tdsColumnInformation\";\n V1_ClassInstanceType[\"TDS_SORT_INFORMATION\"] = \"tdsSortInformation\";\n V1_ClassInstanceType[\"TDS_OLAP_RANK\"] = \"tdsOlapRank\";\n V1_ClassInstanceType[\"TDS_OLAP_AGGREGATION\"] = \"tdsOlapAggregation\";\n})(V1_ClassInstanceType || (V1_ClassInstanceType = {}));\nvar V1_ValueSpecificationType;\n(function (V1_ValueSpecificationType) {\n V1_ValueSpecificationType[\"VARIABLE\"] = \"var\";\n V1_ValueSpecificationType[\"LAMBDA\"] = \"lambda\";\n V1_ValueSpecificationType[\"KEY_EXPRESSION\"] = \"keyExpression\";\n V1_ValueSpecificationType[\"APPLIED_FUNCTION\"] = \"func\";\n V1_ValueSpecificationType[\"APPLIED_PROPERTY\"] = \"property\";\n V1_ValueSpecificationType[\"PACKAGEABLE_ELEMENT_PTR\"] = \"packageableElementPtr\";\n V1_ValueSpecificationType[\"GENERIC_TYPE_INSTANCE\"] = \"genericTypeInstance\";\n V1_ValueSpecificationType[\"ENUM_VALUE\"] = \"enumValue\";\n V1_ValueSpecificationType[\"COLLECTION\"] = \"collection\";\n V1_ValueSpecificationType[\"CINTEGER\"] = \"integer\";\n V1_ValueSpecificationType[\"CDECIMAL\"] = \"decimal\";\n V1_ValueSpecificationType[\"CSTRING\"] = \"string\";\n V1_ValueSpecificationType[\"CBOOLEAN\"] = \"boolean\";\n V1_ValueSpecificationType[\"CBYTEARRAY\"] = \"byteArray\";\n V1_ValueSpecificationType[\"CFLOAT\"] = \"float\";\n V1_ValueSpecificationType[\"CDATETIME\"] = \"dateTime\";\n V1_ValueSpecificationType[\"CSTRICTDATE\"] = \"strictDate\";\n V1_ValueSpecificationType[\"CSTRICTTIME\"] = \"strictTime\";\n V1_ValueSpecificationType[\"CLATESTDATE\"] = \"latestDate\";\n V1_ValueSpecificationType[\"CLASS_INSTANCE\"] = \"classInstance\";\n // ------------------------------ DEPRECATED ----------------------------------\n V1_ValueSpecificationType[\"HACKED_CLASS\"] = \"hackedClass\";\n V1_ValueSpecificationType[\"HACKED_UNIT\"] = \"hackedUnit\";\n V1_ValueSpecificationType[\"UNIT_TYPE\"] = \"unitType\";\n V1_ValueSpecificationType[\"PRIMITIVE_TYPE\"] = \"primitiveType\";\n V1_ValueSpecificationType[\"CLASS\"] = \"class\";\n V1_ValueSpecificationType[\"ENUM\"] = \"enum\";\n V1_ValueSpecificationType[\"MAPPING_INSTANCE\"] = \"mappingInstance\";\n})(V1_ValueSpecificationType || (V1_ValueSpecificationType = {}));\n// ---------------------------------------- Value Specification --------------------------------------\nexport const V1_variableModelSchema = createModelSchema(V1_Variable, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.VARIABLE),\n genericType: optionalCustom((val) => serialize(V1_GenericTypeModelSchema, val), (val) => V1_deserializeGenericType(val), {\n beforeDeserialize: function (callback, jsonValue, jsonParentValue) {\n const parentVal = jsonParentValue;\n // backward compatible\n if (parentVal.class !== undefined &&\n parentVal.genericType === undefined) {\n callback(null, parentVal.class);\n }\n else {\n callback(null, parentVal.genericType);\n }\n },\n }),\n multiplicity: usingModelSchema(V1_multiplicityModelSchema),\n name: primitive(),\n});\nexport const V1_lambdaModelSchema = (plugins) => createModelSchema(V1_Lambda, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.LAMBDA),\n body: list(custom((val) => V1_serializeValueSpecification(val, plugins), (val) => V1_deserializeValueSpecification(val, plugins))),\n parameters: list(usingModelSchema(V1_variableModelSchema)),\n});\nconst keyExpressionModelSchema = (plugins) => createModelSchema(V1_KeyExpression, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.KEY_EXPRESSION),\n add: optional(primitive()),\n expression: custom((val) => V1_serializeValueSpecification(val, plugins), (val) => V1_deserializeValueSpecification(val, plugins)),\n key: custom((val) => V1_serializeValueSpecification(val, plugins), (val) => V1_deserializeValueSpecification(val, plugins)),\n});\nconst appliedFunctionModelSchema = (plugins) => createModelSchema(V1_AppliedFunction, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.APPLIED_FUNCTION),\n function: primitive(),\n parameters: list(custom((val) => V1_serializeValueSpecification(val, plugins), (val) => V1_deserializeValueSpecification(val, plugins))),\n});\nconst appliedPropertyModelSchema = (plugins) => createModelSchema(V1_AppliedProperty, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.APPLIED_PROPERTY),\n class: optional(primitive()),\n parameters: list(custom((val) => V1_serializeValueSpecification(val, plugins), (val) => V1_deserializeValueSpecification(val, plugins))),\n property: primitive(),\n});\nexport const V1_packageableElementPtrSchema = (isType) => createModelSchema(V1_PackageableElementPtr, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.PACKAGEABLE_ELEMENT_PTR),\n fullPath: primitive(),\n});\nconst genericTypeInstanceSchema = (plugins) => createModelSchema(V1_GenericTypeInstance, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.GENERIC_TYPE_INSTANCE),\n fullPath: primitive(),\n typeArguments: optionalCustomList((val) => V1_serializeValueSpecification(val, plugins), (val) => V1_deserializeValueSpecification(val, plugins), {\n INTERNAL__forceReturnEmptyInTest: true,\n }),\n});\n/**\n * @backwardCompatibility\n */\nconst deserializeHackedUnit = (json) => {\n const protocol = new V1_GenericTypeInstance();\n if (isString(json.unitType)) {\n protocol.fullPath = json.unitType;\n }\n else {\n protocol.fullPath = guaranteeIsString(json.fullPath, `Can't deserialize hacked unit: either field 'fullPath' or 'unitType' must be a non-empty string`);\n }\n return protocol;\n};\n/**\n * @backwardCompatibility\n */\nconst deserializeHackedClass = (json) => {\n const protocol = new V1_GenericTypeInstance();\n protocol.fullPath = guaranteeIsString(json.fullPath, `Can't deserialize hacked class: field 'fullPath' must be a non-empty string`);\n return protocol;\n};\nconst collectionModelSchema = (plugins) => createModelSchema(V1_Collection, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.COLLECTION),\n multiplicity: usingModelSchema(V1_multiplicityModelSchema),\n values: list(custom((val) => V1_serializeValueSpecification(val, plugins), (val) => V1_deserializeValueSpecification(val, plugins))),\n});\nconst enumValueModelSchema = createModelSchema(V1_EnumValue, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.ENUM_VALUE),\n fullPath: primitive(),\n value: primitive(),\n});\nconst CDecimalModelSchema = createModelSchema(V1_CDecimal, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.CDECIMAL),\n value: primitive(),\n});\nconst CIntegerModelSchema = createModelSchema(V1_CInteger, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.CINTEGER),\n value: primitive(),\n});\nconst CStringModelSchema = createModelSchema(V1_CString, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.CSTRING),\n value: primitive(),\n});\nconst CFloatModelSchema = createModelSchema(V1_CFloat, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.CFLOAT),\n value: primitive(),\n});\nconst CDateTimeModelSchema = createModelSchema(V1_CDateTime, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.CDATETIME),\n value: primitive(),\n});\nconst CStrictTimeModelSchema = createModelSchema(V1_CStrictTime, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.CSTRICTTIME),\n value: primitive(),\n});\nconst CStrictDateModelSchema = createModelSchema(V1_CStrictDate, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.CSTRICTDATE),\n value: primitive(),\n});\nconst CLatestDateModelSchema = createModelSchema(V1_CLatestDate, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.CLATESTDATE),\n});\nconst CBooleanModelSchema = createModelSchema(V1_CBoolean, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.CBOOLEAN),\n value: primitive(),\n});\nconst CByteArrayModelSchema = createModelSchema(V1_CByteArray, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.CBYTEARRAY),\n value: primitive(),\n});\n/**\n * @backwardCompatibility\n */\nconst deserializePrimitiveValueSpecification = (json, plugins, deserializer) => {\n if (Array.isArray(json.values)) {\n if (json.values.length === 0) {\n const collection = new V1_Collection();\n collection.multiplicity = V1_Multiplicity.ZERO;\n return collection;\n }\n else if (json.values.length === 1) {\n return deserializer({\n ...json,\n value: json.values[0],\n });\n }\n else {\n return V1_deserializeValueSpecification({\n ...json,\n _type: V1_ValueSpecificationType.COLLECTION,\n }, plugins);\n }\n }\n return deserializer(json);\n};\n// ---------------------------------------- Class Instance --------------------------------------\nconst classInstanceModelSchema = (plugins) => createModelSchema(V1_ClassInstance, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.CLASS_INSTANCE),\n multiplicity: usingModelSchema(V1_multiplicityModelSchema),\n type: primitive(),\n value: custom((val) => V1_serializeClassInstanceValue(val, plugins), (val, context) => V1_deserializeClassInstanceValue(val, context.json.type, plugins)),\n});\n// path\nconst propertyPathElementModelSchema = (plugins) => createModelSchema(V1_PropertyPathElement, {\n _type: usingConstantValueSchema(V1_PathElementType.PROPERTY_PATH_ELEMENT),\n property: primitive(),\n parameters: list(custom((val) => V1_serializeValueSpecification(val, plugins), (val) => V1_deserializeValueSpecification(val, plugins))),\n});\nfunction V1_serializePathElement(protocol, plugins) {\n if (protocol instanceof V1_PropertyPathElement) {\n return serialize(propertyPathElementModelSchema(plugins), protocol);\n }\n return SKIP;\n}\nfunction V1_deserializePathElement(json, plugins) {\n switch (json._type) {\n case V1_PathElementType.PROPERTY_PATH_ELEMENT:\n return deserialize(propertyPathElementModelSchema(plugins), json);\n default:\n return SKIP;\n }\n}\nconst pathModelSchema = (plugins) => createModelSchema(V1_Path, {\n _type: usingConstantValueSchema(V1_ClassInstanceType.PATH),\n name: primitive(),\n startType: primitive(),\n path: list(custom((val) => V1_serializePathElement(val, plugins), (val) => V1_deserializePathElement(val, plugins))),\n});\n// graph fetch tree\nconst rootGraphFetchTreeModelSchema = (plugins) => createModelSchema(V1_RootGraphFetchTree, {\n _type: usingConstantValueSchema(V1_ClassInstanceType.ROOT_GRAPH_FETCH_TREE),\n class: primitive(),\n subTrees: list(custom((val) => V1_serializeGraphFetchTree(val, plugins), (val) => V1_deserializeGraphFetchTree(val, plugins))),\n subTypeTrees: list(custom((val) => V1_serializeGraphFetchTree(val, plugins), (val) => V1_deserializeGraphFetchTree(val, plugins))),\n});\nconst propertyGraphFetchTreeModelSchema = (plugins) => createModelSchema(V1_PropertyGraphFetchTree, {\n _type: usingConstantValueSchema(V1_GraphFetchTreeType.PROPERTY_GRAPH_FETCH_TREE),\n alias: optional(primitive()),\n parameters: list(custom((val) => V1_serializeValueSpecification(val, plugins), (val) => V1_deserializeValueSpecification(val, plugins))),\n property: primitive(),\n subTrees: list(custom((val) => V1_serializeGraphFetchTree(val, plugins), (val) => V1_deserializeGraphFetchTree(val, plugins))),\n subTypeTrees: list(custom((val) => V1_serializeGraphFetchTree(val, plugins), (val) => V1_deserializeGraphFetchTree(val, plugins))),\n subType: optional(primitive()),\n});\nconst subTypeGraphFetchTreeModelSchema = (plugins) => createModelSchema(V1_SubTypeGraphFetchTree, {\n _type: usingConstantValueSchema(V1_ClassInstanceType.SUBTYPE_GRAPH_FETCH_TREE),\n subTrees: list(custom((val) => V1_serializeGraphFetchTree(val, plugins), (val) => V1_deserializeGraphFetchTree(val, plugins))),\n subTypeClass: primitive(),\n});\nexport function V1_serializeGraphFetchTree(protocol, plugins) {\n // we have further subtypes of Property and RootGraph Tree so we should look at the extensions first\n const serializers = plugins.flatMap((plugin) => plugin.V1_getExtraGraphFetchProtocolSerializers?.() ?? []);\n for (const serializer of serializers) {\n const json = serializer(protocol, plugins);\n if (json) {\n return json;\n }\n }\n if (protocol instanceof V1_PropertyGraphFetchTree) {\n return serialize(propertyGraphFetchTreeModelSchema(plugins), protocol);\n }\n else if (protocol instanceof V1_RootGraphFetchTree) {\n return serialize(rootGraphFetchTreeModelSchema(plugins), protocol);\n }\n else if (protocol instanceof V1_SubTypeGraphFetchTree) {\n return serialize(subTypeGraphFetchTreeModelSchema(plugins), protocol);\n }\n throw new UnsupportedOperationError(`Can't serialize graph fetch tree: no compatible serializer available from plugins`, protocol);\n}\nexport function V1_deserializeGraphFetchTree(json, plugins) {\n switch (json._type) {\n case V1_GraphFetchTreeType.PROPERTY_GRAPH_FETCH_TREE:\n return deserialize(propertyGraphFetchTreeModelSchema(plugins), json);\n case V1_ClassInstanceType.ROOT_GRAPH_FETCH_TREE:\n return deserialize(rootGraphFetchTreeModelSchema(plugins), json);\n case V1_ClassInstanceType.SUBTYPE_GRAPH_FETCH_TREE:\n return deserialize(subTypeGraphFetchTreeModelSchema(plugins), json);\n default: {\n const deserializers = plugins.flatMap((plugin) => plugin.V1_getExtraGraphFetchProtocolDeserializers?.() ?? []);\n for (const deserializer of deserializers) {\n const protocol = deserializer(json, plugins);\n if (protocol) {\n return protocol;\n }\n }\n throw new UnsupportedOperationError(`Can't deserialize graph fetch tree node of type '${json._type}': no compatible deserializer available from plugins`);\n }\n }\n}\n// execution context\nconst analyticsExecutionContextModelSchema = (plugins) => createModelSchema(V1_AnalyticsExecutionContext, {\n _type: usingConstantValueSchema(V1_ExecutionContextType.ANALYTICS_EXECUTION_CONTEXT),\n enableConstraints: optional(primitive()),\n queryTimeOutInSeconds: optional(primitive()),\n toFlowSetFunction: usingModelSchema(V1_lambdaModelSchema(plugins)),\n useAnalytics: primitive(),\n});\nconst baseExecutionContextModelSchema = createModelSchema(V1_BaseExecutionContext, {\n _type: usingConstantValueSchema(V1_ExecutionContextType.BASE_EXECUTION_CONTEXT),\n enableConstraints: optional(primitive()),\n queryTimeOutInSeconds: optional(primitive()),\n});\nfunction V1_serializeExecutionContext(protocol, plugins) {\n if (protocol instanceof V1_AnalyticsExecutionContext) {\n return serialize(analyticsExecutionContextModelSchema(plugins), protocol);\n }\n else if (protocol instanceof V1_BaseExecutionContext) {\n return serialize(baseExecutionContextModelSchema, protocol);\n }\n return SKIP;\n}\nfunction V1_deserializeExecutionContext(json, plugins) {\n switch (json._type) {\n case V1_ExecutionContextType.ANALYTICS_EXECUTION_CONTEXT:\n return deserialize(analyticsExecutionContextModelSchema(plugins), json);\n case V1_ExecutionContextType.BASE_EXECUTION_CONTEXT:\n return deserialize(baseExecutionContextModelSchema, json);\n default:\n return SKIP;\n }\n}\nconst executionContextInstanceModelSchema = (plugins) => createModelSchema(V1_ExecutionContextInstance, {\n _type: usingConstantValueSchema(V1_ClassInstanceType.EXECUTION_CONTEXT_INSTANCE),\n executionContext: custom((val) => V1_serializeExecutionContext(val, plugins), (val) => V1_deserializeExecutionContext(val, plugins)),\n});\n// others\nconst aggregationValueModelSchema = (plugins) => createModelSchema(V1_AggregateValue, {\n _type: usingConstantValueSchema(V1_ClassInstanceType.AGGREGATE_VALUE),\n mapFn: usingModelSchema(V1_lambdaModelSchema(plugins)),\n aggregateFn: usingModelSchema(V1_lambdaModelSchema(plugins)),\n});\nconst pairModelSchema = (plugins) => createModelSchema(V1_Pair, {\n _type: usingConstantValueSchema(V1_ClassInstanceType.PAIR),\n first: custom((val) => V1_serializeValueSpecification(val, plugins), (val) => V1_deserializeValueSpecification(val, plugins)),\n second: custom((val) => V1_serializeValueSpecification(val, plugins), (val) => V1_deserializeValueSpecification(val, plugins)),\n});\nconst runtimeInstanceModelSchema = createModelSchema(V1_RuntimeInstance, {\n _type: usingConstantValueSchema(V1_ClassInstanceType.RUNTIME_INSTANCE),\n runtime: custom((val) => V1_serializeRuntime(val), (val) => deserialize(V1_EngineRuntime, val)),\n});\nconst pureListModelSchema = (plugins) => createModelSchema(V1_PureList, {\n _type: usingConstantValueSchema(V1_ClassInstanceType.PURE_LIST),\n values: list(custom((val) => V1_serializeValueSpecification(val, plugins), (val) => V1_deserializeValueSpecification(val, plugins))),\n});\nconst serializationConfigModelSchema = createModelSchema(V1_SerializationConfig, {\n _type: usingConstantValueSchema(V1_ClassInstanceType.SERIALIZATION_CONFIG),\n includeType: optional(primitive()),\n typeKeyName: primitive(),\n includeEnumTypee: optional(primitive()),\n removePropertiesWithNullValuese: optional(primitive()),\n removePropertiesWithEmptySetse: optional(primitive()),\n fullyQualifiedTypePathe: optional(primitive()),\n includeObjectReferencee: optional(primitive()),\n});\n// TDS\nconst tdsAggregrateValueModelSchema = (plugins) => createModelSchema(V1_TDSAggregateValue, {\n _type: usingConstantValueSchema(V1_ClassInstanceType.TDS_AGGREGATE_VALUE),\n name: primitive(),\n pmapFn: usingModelSchema(V1_lambdaModelSchema(plugins)),\n aggregateFn: usingModelSchema(V1_lambdaModelSchema(plugins)),\n});\nconst tdsColumnInformationModelSchema = (plugins) => createModelSchema(V1_TDSColumnInformation, {\n _type: usingConstantValueSchema(V1_ClassInstanceType.TDS_COLUMN_INFORMATION),\n name: primitive(),\n columnFn: usingModelSchema(V1_lambdaModelSchema(plugins)),\n});\nconst tdsSortInformationModelSchema = createModelSchema(V1_TDSSortInformation, {\n _type: usingConstantValueSchema(V1_ClassInstanceType.TDS_SORT_INFORMATION),\n column: primitive(),\n direction: primitive(),\n});\nconst relationStoreAccessorModelSchema = createModelSchema(V1_RelationStoreAccessor, {\n path: list(primitive()),\n});\nconst colSpecModelSchema = (plugins) => createModelSchema(V1_ColSpec, {\n function1: optional(usingModelSchema(V1_lambdaModelSchema(plugins))),\n function2: optional(usingModelSchema(V1_lambdaModelSchema(plugins))),\n name: primitive(),\n type: optional(primitive()),\n});\nconst colSpecArrayModelSchema = (plugins) => createModelSchema(V1_ColSpecArray, {\n colSpecs: list(usingModelSchema(colSpecModelSchema(plugins))),\n});\nconst tdsOlapRankModelSchema = (plugins) => createModelSchema(V1_TDSOlapRank, {\n _type: usingConstantValueSchema(V1_ClassInstanceType.TDS_OLAP_RANK),\n function: usingModelSchema(V1_lambdaModelSchema(plugins)),\n});\nconst tdsOlapAggregationModelSchema = (plugins) => createModelSchema(V1_TDSOlapAggregation, {\n _type: usingConstantValueSchema(V1_ClassInstanceType.TDS_OLAP_AGGREGATION),\n function: usingModelSchema(V1_lambdaModelSchema(plugins)),\n columnName: primitive(),\n});\nexport function V1_deserializeClassInstanceValue(json, type, plugins) {\n switch (type) {\n case V1_ClassInstanceType.PATH:\n return deserialize(pathModelSchema(plugins), json);\n case V1_ClassInstanceType.ROOT_GRAPH_FETCH_TREE:\n return deserialize(rootGraphFetchTreeModelSchema(plugins), json);\n case V1_ClassInstanceType.AGGREGATE_VALUE:\n return deserialize(aggregationValueModelSchema(plugins), json);\n case V1_ClassInstanceType.EXECUTION_CONTEXT_INSTANCE:\n return deserialize(executionContextInstanceModelSchema(plugins), json);\n case V1_ClassInstanceType.PAIR:\n return deserialize(pairModelSchema(plugins), json);\n case V1_ClassInstanceType.PURE_LIST:\n return deserialize(pureListModelSchema(plugins), json);\n case V1_ClassInstanceType.RUNTIME_INSTANCE:\n return deserialize(runtimeInstanceModelSchema, json);\n case V1_ClassInstanceType.SERIALIZATION_CONFIG:\n return deserialize(serializationConfigModelSchema, json);\n case V1_ClassInstanceType.TDS_AGGREGATE_VALUE:\n return deserialize(tdsAggregrateValueModelSchema(plugins), json);\n case V1_ClassInstanceType.TDS_COLUMN_INFORMATION:\n return deserialize(tdsColumnInformationModelSchema(plugins), json);\n case V1_ClassInstanceType.TDS_OLAP_AGGREGATION:\n return deserialize(tdsOlapAggregationModelSchema(plugins), json);\n case V1_ClassInstanceType.TDS_OLAP_RANK:\n return deserialize(tdsOlapRankModelSchema(plugins), json);\n case V1_ClassInstanceType.TDS_SORT_INFORMATION:\n return deserialize(tdsSortInformationModelSchema, json);\n case V1_ClassInstanceType.COL_SPEC:\n return deserialize(colSpecModelSchema(plugins), json);\n case V1_ClassInstanceType.COL_SPEC_ARRAY:\n return deserialize(colSpecArrayModelSchema(plugins), json);\n case V1_ClassInstanceType.RELATION_STORE_ACCESSOR:\n return deserialize(relationStoreAccessorModelSchema, json);\n default: {\n const deserializers = plugins.flatMap((plugin) => plugin.V1_getExtraClassInstanceValueProtocolDeserializers?.() ?? []);\n for (const deserializer of deserializers) {\n const protocol = deserializer(json, type, plugins);\n if (protocol) {\n return protocol;\n }\n }\n throw new UnsupportedOperationError(`Can't deserialize value specification of type '${json._type}': no compatible deserializer available from plugins`);\n }\n }\n}\nexport function V1_serializeClassInstanceValue(protocol, plugins) {\n if (protocol instanceof V1_Path) {\n return serialize(pathModelSchema(plugins), protocol);\n }\n else if (protocol instanceof V1_RootGraphFetchTree) {\n return serialize(rootGraphFetchTreeModelSchema(plugins), protocol);\n }\n else if (protocol instanceof V1_ExecutionContextInstance) {\n return serialize(executionContextInstanceModelSchema(plugins), protocol);\n }\n else if (protocol instanceof V1_AggregateValue) {\n return serialize(aggregationValueModelSchema(plugins), protocol);\n }\n else if (protocol instanceof V1_Pair) {\n return serialize(pairModelSchema(plugins), protocol);\n }\n else if (protocol instanceof V1_PureList) {\n return serialize(pureListModelSchema(plugins), protocol);\n }\n else if (protocol instanceof V1_RuntimeInstance) {\n return serialize(runtimeInstanceModelSchema, protocol);\n }\n else if (protocol instanceof V1_SerializationConfig) {\n return serialize(serializationConfigModelSchema, protocol);\n }\n else if (protocol instanceof V1_TDSAggregateValue) {\n return serialize(tdsAggregrateValueModelSchema(plugins), protocol);\n }\n else if (protocol instanceof V1_TDSColumnInformation) {\n return serialize(tdsColumnInformationModelSchema(plugins), protocol);\n }\n else if (protocol instanceof V1_TDSOlapAggregation) {\n return serialize(tdsOlapAggregationModelSchema(plugins), protocol);\n }\n else if (protocol instanceof V1_TDSOlapRank) {\n return serialize(tdsOlapRankModelSchema(plugins), protocol);\n }\n else if (protocol instanceof V1_TDSSortInformation) {\n return serialize(tdsSortInformationModelSchema, protocol);\n }\n else if (protocol instanceof V1_ColSpec) {\n return serialize(colSpecModelSchema(plugins), protocol);\n }\n else if (protocol instanceof V1_ColSpecArray) {\n return serialize(colSpecArrayModelSchema(plugins), protocol);\n }\n else if (protocol instanceof V1_RelationStoreAccessor) {\n return serialize(relationStoreAccessorModelSchema, protocol);\n }\n const serializers = plugins.flatMap((plugin) => plugin.V1_getExtraClassInstanceValueProtocolSerializers?.() ?? []);\n for (const serializer of serializers) {\n const json = serializer(protocol, plugins);\n if (json) {\n return json;\n }\n }\n throw new UnsupportedOperationError(`Can't serialize class instance value: no compatible serializer available from plugins`, protocol);\n}\n// ---------------------------------------- Serialization Methods --------------------------------------\nclass V1_ValueSpecificationSerializer {\n plugins = [];\n constructor(plugins) {\n this.plugins = plugins;\n }\n visit_INTERNAL__UnknownValueSpecfication(valueSpecification) {\n return valueSpecification.content;\n }\n visit_Variable(valueSpecification) {\n return serialize(V1_variableModelSchema, valueSpecification);\n }\n visit_Lambda(valueSpecification) {\n return serialize(V1_lambdaModelSchema(this.plugins), valueSpecification);\n }\n visit_KeyExpression(valueSpecification) {\n return serialize(keyExpressionModelSchema(this.plugins), valueSpecification);\n }\n visit_PackageableElementPtr(valueSpecification) {\n return serialize(V1_packageableElementPtrSchema(), valueSpecification);\n }\n visit_GenericTypeInstance(valueSpecification) {\n return serialize(genericTypeInstanceSchema(this.plugins), valueSpecification);\n }\n visit_AppliedFunction(valueSpecification) {\n return serialize(appliedFunctionModelSchema(this.plugins), valueSpecification);\n }\n visit_AppliedProperty(valueSpecification) {\n return serialize(appliedPropertyModelSchema(this.plugins), valueSpecification);\n }\n visit_Collection(valueSpecification) {\n return serialize(collectionModelSchema(this.plugins), valueSpecification);\n }\n visit_EnumValue(valueSpecification) {\n return serialize(enumValueModelSchema, valueSpecification);\n }\n visit_CInteger(valueSpecification) {\n return serialize(CIntegerModelSchema, valueSpecification);\n }\n visit_CDecimal(valueSpecification) {\n return serialize(CDecimalModelSchema, valueSpecification);\n }\n visit_CString(valueSpecification) {\n return serialize(CStringModelSchema, valueSpecification);\n }\n visit_CBoolean(valueSpecification) {\n return serialize(CBooleanModelSchema, valueSpecification);\n }\n visit_CByteArray(valueSpecification) {\n return serialize(CByteArrayModelSchema, valueSpecification);\n }\n visit_CFloat(valueSpecification) {\n return serialize(CFloatModelSchema, valueSpecification);\n }\n visit_CDateTime(valueSpecification) {\n return serialize(CDateTimeModelSchema, valueSpecification);\n }\n visit_CStrictDate(valueSpecification) {\n return serialize(CStrictDateModelSchema, valueSpecification);\n }\n visit_CStrictTime(valueSpecification) {\n return serialize(CStrictTimeModelSchema, valueSpecification);\n }\n visit_CLatestDate(valueSpecification) {\n return serialize(CLatestDateModelSchema, valueSpecification);\n }\n visit_ClassInstance(valueSpecification) {\n return serialize(classInstanceModelSchema(this.plugins), valueSpecification);\n }\n}\nexport function V1_deserializeValueSpecification(json, plugins) {\n switch (json._type) {\n case V1_ValueSpecificationType.APPLIED_FUNCTION:\n return deserialize(appliedFunctionModelSchema(plugins), json);\n case V1_ValueSpecificationType.APPLIED_PROPERTY:\n return deserialize(appliedPropertyModelSchema(plugins), json);\n case V1_ValueSpecificationType.VARIABLE:\n return deserialize(V1_variableModelSchema, json);\n case V1_ValueSpecificationType.LAMBDA:\n return deserialize(V1_lambdaModelSchema(plugins), json);\n case V1_ValueSpecificationType.KEY_EXPRESSION:\n return deserialize(keyExpressionModelSchema(plugins), json);\n case V1_ValueSpecificationType.COLLECTION:\n return deserialize(collectionModelSchema(plugins), json);\n case V1_ValueSpecificationType.ENUM_VALUE:\n return deserialize(enumValueModelSchema, json);\n // primitive values\n case V1_ValueSpecificationType.CBOOLEAN:\n return deserializePrimitiveValueSpecification(json, plugins, (val) => deserialize(CBooleanModelSchema, val));\n case V1_ValueSpecificationType.CBYTEARRAY: {\n return deserializePrimitiveValueSpecification(json, plugins, (val) => deserialize(CByteArrayModelSchema, val));\n }\n case V1_ValueSpecificationType.CDATETIME:\n return deserializePrimitiveValueSpecification(json, plugins, (val) => deserialize(CDateTimeModelSchema, val));\n case V1_ValueSpecificationType.CSTRICTTIME:\n return deserializePrimitiveValueSpecification(json, plugins, (val) => deserialize(CStrictTimeModelSchema, val));\n case V1_ValueSpecificationType.CDECIMAL:\n return deserializePrimitiveValueSpecification(json, plugins, (val) => deserialize(CDecimalModelSchema, val));\n case V1_ValueSpecificationType.CFLOAT:\n return deserializePrimitiveValueSpecification(json, plugins, (val) => deserialize(CFloatModelSchema, val));\n case V1_ValueSpecificationType.CINTEGER:\n return deserializePrimitiveValueSpecification(json, plugins, (val) => deserialize(CIntegerModelSchema, val));\n case V1_ValueSpecificationType.CLATESTDATE:\n return deserializePrimitiveValueSpecification(json, plugins, (val) => deserialize(CLatestDateModelSchema, val));\n case V1_ValueSpecificationType.CSTRICTDATE:\n return deserializePrimitiveValueSpecification(json, plugins, (val) => deserialize(CStrictDateModelSchema, val));\n case V1_ValueSpecificationType.CSTRING: {\n // This workaround is intended to handle an edge case where CString is sent with empty values\n // we will convert it to an empty string instead\n // See https://github.com/finos/legend-engine/pull/1076\n if (Array.isArray(json.values) &&\n !json.values.length &&\n isPlainObject(json.multiplicity) &&\n json.multiplicity.upperBound === 1) {\n const result = new V1_CString();\n result.value = '';\n return result;\n }\n return deserializePrimitiveValueSpecification(json, plugins, (val) => deserialize(CStringModelSchema, val));\n }\n // class instance\n case V1_ValueSpecificationType.CLASS_INSTANCE:\n return deserialize(classInstanceModelSchema(plugins), json);\n /**\n * NOTE: the following types are here for backward compatibility\n * as some of these are used to be value specifications, but now\n * transformed into class instances\n *\n * @backwardCompatibility\n */\n case V1_ClassInstanceType.PAIR:\n case V1_ClassInstanceType.AGGREGATE_VALUE:\n case V1_ClassInstanceType.EXECUTION_CONTEXT_INSTANCE:\n case V1_ClassInstanceType.PATH:\n case V1_ClassInstanceType.ROOT_GRAPH_FETCH_TREE:\n case V1_ClassInstanceType.PURE_LIST:\n case V1_ClassInstanceType.RUNTIME_INSTANCE:\n case V1_ClassInstanceType.SERIALIZATION_CONFIG:\n case V1_ClassInstanceType.TDS_AGGREGATE_VALUE:\n case V1_ClassInstanceType.TDS_COLUMN_INFORMATION:\n case V1_ClassInstanceType.TDS_OLAP_AGGREGATION:\n case V1_ClassInstanceType.TDS_OLAP_RANK:\n case V1_ClassInstanceType.TDS_SORT_INFORMATION:\n return deserialize(classInstanceModelSchema(plugins), {\n _type: V1_ValueSpecificationType.CLASS_INSTANCE,\n type: json._type,\n value: json,\n });\n // packageable element pointer\n case V1_ValueSpecificationType.HACKED_CLASS: // deprecated\n return deserializeHackedClass(json);\n case V1_ValueSpecificationType.UNIT_TYPE: // deprecated\n case V1_ValueSpecificationType.HACKED_UNIT: // deprecated\n return deserializeHackedUnit(json);\n case V1_ValueSpecificationType.PRIMITIVE_TYPE: // deprecated\n case V1_ValueSpecificationType.ENUM: // deprecated\n case V1_ValueSpecificationType.CLASS: // deprecated\n case V1_ValueSpecificationType.MAPPING_INSTANCE: // deprecated\n case V1_ValueSpecificationType.PACKAGEABLE_ELEMENT_PTR:\n return deserialize(V1_packageableElementPtrSchema(), json);\n case V1_ValueSpecificationType.GENERIC_TYPE_INSTANCE:\n return deserialize(genericTypeInstanceSchema(plugins), json);\n default:\n throw new UnsupportedOperationError(`Can't deserialize value specification of type '${json._type}'`);\n }\n}\nexport function V1_serializeValueSpecification(protocol, plugins) {\n return protocol.accept_ValueSpecificationVisitor(new V1_ValueSpecificationSerializer(plugins));\n}\n//# sourceMappingURL=V1_ValueSpecificationSerializer.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { UnsupportedOperationError } from '@finos/legend-shared';\nimport { FunctionAnalysisInfo, FunctionAnalysisParameterInfo, } from '../../../../../graph/helpers/FunctionAnalysis.js';\nimport { generateMultiplicityString } from '../../../../../graph/helpers/PureLanguageHelper.js';\nimport { ELEMENT_PATH_DELIMITER, FUNCTION_SIGNATURE_MULTIPLICITY_INFINITE_TOKEN, } from '../../../../../graph/MetaModelConst.js';\nimport { V1_PackageableType } from '../model/valueSpecification/raw/V1_PackageableElementPtr.js';\nexport const V1_getGenericTypeFullPath = (val) => {\n if (val.rawType instanceof V1_PackageableType) {\n return val.rawType.fullPath;\n }\n throw new UnsupportedOperationError('Failed to get full path from generic type');\n};\nconst V1_buildFunctionMultiplicitySignature = (multiplicity) => {\n if (multiplicity.lowerBound === multiplicity.upperBound) {\n return multiplicity.lowerBound.toString();\n }\n else if (multiplicity.lowerBound === 0 &&\n multiplicity.upperBound === undefined) {\n return FUNCTION_SIGNATURE_MULTIPLICITY_INFINITE_TOKEN;\n }\n return `$${multiplicity.lowerBound}_${multiplicity.upperBound ?? FUNCTION_SIGNATURE_MULTIPLICITY_INFINITE_TOKEN}$`;\n};\nconst V1_buildFunctionParameterSignature = (variable) => `${variable.genericType.rawType.fullPath\n .split(ELEMENT_PATH_DELIMITER)\n .pop()}_${V1_buildFunctionMultiplicitySignature(variable.multiplicity)}_`;\nconst V1_buildFunctionSignatureSuffix = (func) => `_${func.parameters\n .map((p) => V1_buildFunctionParameterSignature(p))\n .join('_')}_${V1_getGenericTypeFullPath(func.returnGenericType)\n .split(ELEMENT_PATH_DELIMITER)\n .pop()}_${V1_buildFunctionMultiplicitySignature(func.returnMultiplicity)}_`;\nexport const V1_buildFunctionSignature = (func) => {\n const functionSignature = V1_buildFunctionSignatureSuffix(func);\n return func.name.endsWith(functionSignature)\n ? func.name\n : func.name + functionSignature;\n};\nexport const V1_getFunctionNameWithoutSignature = (func) => {\n const signatureSuffix = V1_buildFunctionSignatureSuffix(func);\n return func.name.endsWith(signatureSuffix)\n ? func.name.substring(0, func.name.length - signatureSuffix.length)\n : func.name;\n};\nconst V1_buildFunctionPrettyName = (element, options) => `${options?.fullPath ? `${element.package}${ELEMENT_PATH_DELIMITER}` : ''}${element.name.substring(0, element.name.indexOf(V1_buildFunctionSignatureSuffix(element)))}(${element.parameters\n .map((p) => !options?.notIncludeParamName\n ? `${p.name}: ${p.genericType.rawType.fullPath}[${generateMultiplicityString(p.multiplicity.lowerBound, p.multiplicity.upperBound)}]`\n : `${p.genericType.rawType.fullPath}[${generateMultiplicityString(p.multiplicity.lowerBound, p.multiplicity.upperBound)}]`)\n .join(', ')}): ${V1_getGenericTypeFullPath(element.returnGenericType)}[${generateMultiplicityString(element.returnMultiplicity.lowerBound, element.returnMultiplicity.upperBound)}]`.replaceAll(/\\s*/gu, (val) => {\n if (options?.spacing) {\n return val;\n }\n return '';\n});\nexport const V1_buildFunctionInfoAnalysis = (functionProtocols, graph) => {\n const functionInfos = functionProtocols.map((func) => {\n const functionInfo = new FunctionAnalysisInfo();\n functionInfo.functionPath = func.path;\n functionInfo.name = func.name;\n functionInfo.functionName =\n func.name.split(V1_buildFunctionSignatureSuffix(func))[0] ?? func.name;\n functionInfo.functionPrettyName = V1_buildFunctionPrettyName(func, {\n fullPath: true,\n });\n functionInfo.packagePath = func.package;\n functionInfo.returnType = V1_getGenericTypeFullPath(func.returnGenericType);\n functionInfo.parameterInfoList = func.parameters.map((param) => {\n const paramInfo = new FunctionAnalysisParameterInfo();\n paramInfo.multiplicity = graph.getMultiplicity(param.multiplicity.lowerBound, param.multiplicity.upperBound);\n paramInfo.name = param.name;\n paramInfo.type = param.genericType.rawType.fullPath;\n return paramInfo;\n });\n return functionInfo;\n });\n return functionInfos;\n};\n//# sourceMappingURL=V1_DomainHelper.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_DataTypeValueSpecification } from './V1_DataTypeValueSpecification.js';\nexport class V1_EnumValue extends V1_DataTypeValueSpecification {\n fullPath;\n value;\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_EnumValue(this);\n }\n}\n//# sourceMappingURL=V1_EnumValue.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_CDate } from './V1_CDate.js';\nexport class V1_CLatestDate extends V1_CDate {\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_CLatestDate(this);\n }\n}\n//# sourceMappingURL=V1_CLatestDate.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_PrimitiveValueSpecification } from './V1_PrimitiveValueSpecification.js';\nexport class V1_CByteArray extends V1_PrimitiveValueSpecification {\n value; // the Base64String transformed from byte[] by Jackson\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_CByteArray(this);\n }\n}\n//# sourceMappingURL=V1_CByteArray.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/***************************************************************************************\n * [CORE]\n *\n * These are utilities used to build the executable query from the query snapshot.\n * The executable query is then used to fetch data.\n ***************************************************************************************/\nimport { PRIMITIVE_TYPE, V1_AppliedFunction, V1_AppliedProperty, V1_CBoolean, V1_CDateTime, V1_CDecimal, V1_CFloat, V1_CInteger, V1_CStrictDate, V1_CStrictTime, V1_CString, V1_ClassInstance, V1_ClassInstanceType, V1_ColSpec, V1_ColSpecArray, V1_Collection, V1_Lambda, V1_Multiplicity, V1_PackageableElementPtr, V1_Variable, V1_deserializeValueSpecification, extractElementNameFromPath, extractPackagePathFromPath, CORE_PURE_PATH, V1_GenericTypeInstance, } from '@finos/legend-graph';\nimport {} from './DataCubeQuerySnapshot.js';\nimport {} from './models/DataCubeColumn.js';\nimport { guaranteeNonNullable, guaranteeIsString, guaranteeIsBoolean, guaranteeIsNumber, UnsupportedOperationError, guaranteeType, } from '@finos/legend-shared';\nimport { DataCubeFunction, DEFAULT_LAMBDA_VARIABLE_NAME, DataCubeQueryFilterGroupOperator, DataCubeOperationAdvancedValueType, DataCubeColumnKind, isPivotResultColumnName, getPivotResultColumnBaseColumnName, } from './DataCubeQueryEngine.js';\nimport { DataCubeColumnConfiguration, } from './models/DataCubeConfiguration.js';\n// --------------------------------- UTILITIES ---------------------------------\nexport function _functionCompositionProcessor(sequence, funcMap) {\n return (key, func) => {\n sequence.push(func);\n funcMap[key] = func;\n };\n}\nexport function _functionCompositionUnProcessor(sequence, funcMap) {\n return (key) => {\n const func = funcMap[key];\n if (func) {\n sequence.splice(sequence.indexOf(func), 1);\n funcMap[key] = undefined;\n }\n };\n}\nexport function _deserializeLambda(json) {\n return guaranteeType(V1_deserializeValueSpecification(json, []), V1_Lambda);\n}\nexport function _deserializeFunction(json) {\n return guaranteeType(V1_deserializeValueSpecification(json, []), V1_AppliedFunction);\n}\nexport function _var(name) {\n const variable = new V1_Variable();\n variable.name = name ?? DEFAULT_LAMBDA_VARIABLE_NAME;\n return variable;\n}\nexport function _property(name, variable) {\n const property = new V1_AppliedProperty();\n property.property = name;\n property.parameters.push(variable ?? _var());\n return property;\n}\nexport function _lambda(parameters, body) {\n const lambda = new V1_Lambda();\n lambda.parameters = parameters;\n lambda.body = body;\n return lambda;\n}\n// NOTE: the list of auto-import are kept in `m3.pure` file in `finos/legend-pure`,\n// this includes a more extensive list of packges which contain native functions, classes, etc.\n// See https://github.com/finos/legend-pure/blob/master/legend-pure-core/legend-pure-m3-core/src/main/resources/platform/pure/grammar/m3.pure\nconst PURE_AUTO_IMPORT_PACKAGE_PATHS = [\n 'meta::pure::metamodel',\n 'meta::pure::metamodel::type',\n 'meta::pure::metamodel::type::generics',\n 'meta::pure::metamodel::relationship',\n 'meta::pure::metamodel::valuespecification',\n 'meta::pure::metamodel::multiplicity',\n 'meta::pure::metamodel::function',\n 'meta::pure::metamodel::function::property',\n 'meta::pure::metamodel::extension',\n 'meta::pure::metamodel::import',\n 'meta::pure::functions::date',\n 'meta::pure::functions::string',\n 'meta::pure::functions::collection',\n 'meta::pure::functions::meta',\n 'meta::pure::functions::constraints',\n 'meta::pure::functions::lang',\n 'meta::pure::functions::boolean',\n 'meta::pure::functions::tools',\n 'meta::pure::functions::relation',\n 'meta::pure::functions::io',\n 'meta::pure::functions::math',\n 'meta::pure::functions::asserts',\n 'meta::pure::functions::test',\n 'meta::pure::functions::multiplicity',\n 'meta::pure::router',\n 'meta::pure::service',\n 'meta::pure::tds',\n 'meta::pure::tools',\n 'meta::pure::profiles',\n];\nexport function _functionName(funcNameOrPath) {\n const funcPakagePath = extractPackagePathFromPath(funcNameOrPath);\n if (funcPakagePath &&\n PURE_AUTO_IMPORT_PACKAGE_PATHS.includes(funcPakagePath)) {\n return extractElementNameFromPath(funcNameOrPath);\n }\n return funcNameOrPath;\n}\nexport function _function(functionName, parameters) {\n const func = new V1_AppliedFunction();\n func.function = _functionName(functionName);\n func.parameters = parameters;\n return func;\n}\nexport function _collection(values) {\n const collection = new V1_Collection();\n collection.multiplicity = new V1_Multiplicity(values.length, values.length);\n collection.values = values;\n return collection;\n}\nexport function _primitiveValue(type, value) {\n const _val = (primitiveValue, val) => {\n primitiveValue.value = val;\n return primitiveValue;\n };\n switch (type) {\n case PRIMITIVE_TYPE.STRING:\n return _val(new V1_CString(), guaranteeIsString(value));\n case PRIMITIVE_TYPE.BOOLEAN:\n return _val(new V1_CBoolean(), guaranteeIsBoolean(value));\n case PRIMITIVE_TYPE.NUMBER:\n case PRIMITIVE_TYPE.DECIMAL:\n return _val(new V1_CDecimal(), guaranteeIsNumber(value));\n case PRIMITIVE_TYPE.INTEGER:\n return _val(new V1_CInteger(), guaranteeIsNumber(value));\n case PRIMITIVE_TYPE.FLOAT:\n return _val(new V1_CFloat(), guaranteeIsNumber(value));\n case PRIMITIVE_TYPE.DATE:\n case PRIMITIVE_TYPE.STRICTDATE:\n return _val(new V1_CStrictDate(), guaranteeIsString(value));\n case PRIMITIVE_TYPE.DATETIME:\n return _val(new V1_CDateTime(), guaranteeIsString(value));\n case PRIMITIVE_TYPE.STRICTTIME:\n return _val(new V1_CStrictTime(), guaranteeIsString(value));\n default:\n throw new UnsupportedOperationError(`Unsupported value type '${type}'`);\n }\n}\nexport function _elementPtr(fullPath) {\n const ptr = new V1_PackageableElementPtr();\n ptr.fullPath = fullPath;\n return ptr;\n}\nfunction _classInstance(type, value) {\n const instance = new V1_ClassInstance();\n instance.type = type;\n instance.value = value;\n return instance;\n}\nexport function _colSpec(name, function1, function2, type) {\n const colSpec = new V1_ColSpec();\n colSpec.name = name;\n colSpec.function1 = function1;\n colSpec.function2 = function2;\n colSpec.type = type;\n return colSpec;\n}\nexport function _value(value, variable) {\n switch (value.type) {\n case PRIMITIVE_TYPE.STRING:\n case PRIMITIVE_TYPE.BOOLEAN:\n case PRIMITIVE_TYPE.NUMBER:\n case PRIMITIVE_TYPE.DECIMAL:\n case PRIMITIVE_TYPE.INTEGER:\n case PRIMITIVE_TYPE.FLOAT:\n case PRIMITIVE_TYPE.DATE:\n case PRIMITIVE_TYPE.DATETIME:\n case PRIMITIVE_TYPE.STRICTDATE:\n case PRIMITIVE_TYPE.STRICTTIME: {\n if (Array.isArray(value.value)) {\n return _collection(value.value.map((val) => _primitiveValue(value.type, val)));\n }\n return _primitiveValue(value.type, value.value);\n }\n case DataCubeOperationAdvancedValueType.COLUMN:\n return _property(guaranteeIsString(value.value), variable);\n default:\n throw new UnsupportedOperationError(`Unsupported value type '${value.type}'`);\n }\n}\nexport function _not(fn) {\n return _function(_functionName(DataCubeFunction.NOT), [fn]);\n}\n// --------------------------------- BUILDING BLOCKS ---------------------------------\nexport function _col(name, function1, function2) {\n return _classInstance(V1_ClassInstanceType.COL_SPEC, _colSpec(name, function1, function2));\n}\nexport function _cols(colSpecs) {\n const colSpecArray = new V1_ColSpecArray();\n colSpecArray.colSpecs = colSpecs;\n return _classInstance(V1_ClassInstanceType.COL_SPEC_ARRAY, colSpecArray);\n}\n// NOTE: this is the column name used for the dummy count() aggregate\n// when no aggregate is specified in groupBy() or pivot()\nconst INTERNAL__FILLER_COUNT_AGG_COLUMN_NAME = 'INTERNAL__filler_count_agg_column';\n// if no aggregates are specified, add a dummy count() aggregate to satisfy compiler\nfunction fixEmptyAggCols(aggCols) {\n const variable = _var();\n return aggCols.length\n ? aggCols\n : [\n _colSpec(INTERNAL__FILLER_COUNT_AGG_COLUMN_NAME, _lambda([variable], [variable]), _lambda([variable], [_function(DataCubeFunction.COUNT, [variable])])),\n ];\n}\nexport function _aggCol_basic(column, func) {\n const variable = _var();\n return _colSpec(column.name, _lambda([variable], [_property(column.name, variable)]), _lambda([variable], [_function(_functionName(func), [variable])]));\n}\nexport function _pivotAggCols(pivotColumns, snapshot, configuration, aggregateOperations) {\n const aggColumns = configuration.columns.filter((column) => column.isSelected &&\n // unlike groupBy, pivot aggreation on dimension columns (e.g. unique values aggregator)\n // are not helpful and therefore excluded\n column.kind === DataCubeColumnKind.MEASURE &&\n !pivotColumns.find((col) => col.name === column.name) &&\n !column.excludedFromPivot &&\n !snapshot.data.groupExtendedColumns.find((col) => col.name === column.name));\n return fixEmptyAggCols(aggColumns.map((agg) => {\n const operation = aggregateOperations.find((op) => op.operator === agg.aggregateOperator);\n const aggCol = operation?.buildAggregateColumn(agg);\n if (!aggCol) {\n throw new UnsupportedOperationError(`Unsupported aggregate operation '${agg.aggregateOperator}'`);\n }\n return aggCol;\n }));\n}\nexport function _castCols(columns) {\n const genericType = new V1_GenericTypeInstance();\n genericType.fullPath = CORE_PURE_PATH.RELATION;\n genericType.typeArguments = [\n _cols(columns.map((col) => _colSpec(col.name, undefined, undefined, col.type))),\n ];\n return genericType;\n}\nexport function _groupByAggCols(groupByColumns, snapshot, configuration, aggregateOperations) {\n const pivot = snapshot.data.pivot;\n if (!pivot) {\n // NOTE: reference off column configuration so we follow the order of columns\n // established in columns selector\n const aggColumns = configuration.columns.filter((column) => column.isSelected &&\n !groupByColumns.find((col) => col.name === column.name) &&\n !snapshot.data.groupExtendedColumns.find((col) => col.name === column.name));\n return fixEmptyAggCols(aggColumns.map((agg) => {\n const operation = aggregateOperations.find((op) => op.operator === agg.aggregateOperator);\n const aggCol = operation?.buildAggregateColumn(agg);\n if (!aggCol) {\n throw new UnsupportedOperationError(`Unsupported aggregate operation '${agg.aggregateOperator}'`);\n }\n return aggCol;\n }));\n }\n const pivotResultColumns = pivot.castColumns.filter((col) => isPivotResultColumnName(col.name));\n const pivotGroupByColumns = pivot.castColumns.filter((col) => !isPivotResultColumnName(col.name));\n return fixEmptyAggCols([\n // for pivot result columns, resolve the base aggregate column to get aggregate configuration\n ...pivotResultColumns\n .map((column) => {\n const baseAggColName = getPivotResultColumnBaseColumnName(column.name);\n return {\n ...column,\n matchingColumnConfiguration: configuration.columns.find((col) => col.name === baseAggColName),\n };\n })\n .filter((column) => column.matchingColumnConfiguration)\n .map((column) => {\n const columnConfiguration = DataCubeColumnConfiguration.serialization.fromJson(guaranteeNonNullable(column.matchingColumnConfiguration).serialize());\n columnConfiguration.name = column.name;\n const operation = aggregateOperations.find((op) => op.operator === columnConfiguration.aggregateOperator);\n const aggCol = operation?.buildAggregateColumn(columnConfiguration);\n if (!aggCol) {\n throw new UnsupportedOperationError(`Unsupported aggregate operation '${columnConfiguration.aggregateOperator}'`);\n }\n return aggCol;\n }),\n // these are the columns which are available for groupBy but not selected for groupBy\n // operation, they would be aggregated as well\n ...pivotGroupByColumns\n .filter((column) => !groupByColumns.find((col) => col.name === column.name))\n .map((column) => {\n const columnConfiguration = guaranteeNonNullable(configuration.columns.find((col) => col.name === column.name));\n const operation = aggregateOperations.find((op) => op.operator === columnConfiguration.aggregateOperator);\n const aggCol = operation?.buildAggregateColumn(columnConfiguration);\n if (!aggCol) {\n throw new UnsupportedOperationError(`Unsupported aggregate operation '${columnConfiguration.aggregateOperator}'`);\n }\n return aggCol;\n }),\n ]);\n}\nexport function _filter(filter, filterOperations) {\n if ('groupOperator' in filter) {\n const filterGroup = filter;\n const groupOperation = filterGroup.groupOperator === DataCubeQueryFilterGroupOperator.AND\n ? DataCubeFunction.AND\n : DataCubeFunction.OR;\n let conditions = [];\n filterGroup.conditions.forEach((condition) => {\n conditions.push(_filter(condition, filterOperations));\n // NOTE: a group operation (and/or) function can only have 2 parameters, so we\n // have to breakdown the group operation into nested group functions\n if (conditions.length === 2) {\n conditions = [_function(groupOperation, conditions)];\n }\n });\n const groupCondition = guaranteeNonNullable(conditions[0]);\n return filterGroup.not ? _not(groupCondition) : groupCondition;\n }\n else {\n const filterCondition = filter;\n const operation = filterOperations.find((op) => op.operator === filterCondition.operator);\n const condition = operation?.buildConditionExpression(filterCondition);\n if (!condition) {\n throw new UnsupportedOperationError(`Unsupported filter operation '${filterCondition.operator}'`);\n }\n return filterCondition.not ? _not(condition) : condition;\n }\n}\n//# sourceMappingURL=DataCubeQueryBuilderUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DataCubeQueryAggregateOperation } from './DataCubeQueryAggregateOperation.js';\nimport { DataCubeQueryAggregateOperator, DataCubeColumnDataType, DataCubeFunction, ofDataType, } from '../DataCubeQueryEngine.js';\nimport { _aggCol_basic } from '../DataCubeQueryBuilderUtils.js';\nexport class DataCubeQueryAggregateOperation__Sum extends DataCubeQueryAggregateOperation {\n get label() {\n return 'sum';\n }\n get textLabel() {\n return 'sum';\n }\n get description() {\n return 'sum';\n }\n get operator() {\n return DataCubeQueryAggregateOperator.SUM;\n }\n isCompatibleWithColumn(column) {\n return ofDataType(column.type, [DataCubeColumnDataType.NUMBER]);\n }\n buildAggregateColumn(column) {\n return _aggCol_basic(column, DataCubeFunction.SUM);\n }\n}\n//# sourceMappingURL=DataCubeQueryAggregateOperation__Sum.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DataCubeQueryAggregateOperation } from './DataCubeQueryAggregateOperation.js';\nimport { DataCubeQueryAggregateOperator, DataCubeColumnDataType, DataCubeFunction, ofDataType, } from '../DataCubeQueryEngine.js';\nimport { _aggCol_basic } from '../DataCubeQueryBuilderUtils.js';\nexport class DataCubeQueryAggregateOperation__Average extends DataCubeQueryAggregateOperation {\n get label() {\n return 'avg';\n }\n get textLabel() {\n return 'average';\n }\n get description() {\n return 'average';\n }\n get operator() {\n return DataCubeQueryAggregateOperator.AVERAGE;\n }\n isCompatibleWithColumn(column) {\n return ofDataType(column.type, [DataCubeColumnDataType.NUMBER]);\n }\n buildAggregateColumn(column) {\n return _aggCol_basic(column, DataCubeFunction.AVERAGE);\n }\n}\n//# sourceMappingURL=DataCubeQueryAggregateOperation__Average.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DataCubeQueryAggregateOperation } from './DataCubeQueryAggregateOperation.js';\nimport { DataCubeQueryAggregateOperator, DataCubeColumnDataType, DataCubeFunction, ofDataType, } from '../DataCubeQueryEngine.js';\nimport { _aggCol_basic } from '../DataCubeQueryBuilderUtils.js';\nexport class DataCubeQueryAggregateOperation__Count extends DataCubeQueryAggregateOperation {\n get label() {\n return 'count';\n }\n get textLabel() {\n return 'count';\n }\n get description() {\n return 'count';\n }\n get operator() {\n return DataCubeQueryAggregateOperator.COUNT;\n }\n isCompatibleWithColumn(column) {\n return ofDataType(column.type, [\n // NOTE: technically all data types are suported,\n // but we can't because we must preserve the type\n // of the original column\n //\n // typically, what users usually do is to create a \"dummy\"\n // extended column of value=1 and aggregate on that for the count\n DataCubeColumnDataType.NUMBER,\n ]);\n }\n buildAggregateColumn(column) {\n return _aggCol_basic(column, DataCubeFunction.COUNT);\n }\n}\n//# sourceMappingURL=DataCubeQueryAggregateOperation__Count.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DataCubeQueryAggregateOperation } from './DataCubeQueryAggregateOperation.js';\nimport { DataCubeQueryAggregateOperator, DataCubeColumnDataType, DataCubeFunction, ofDataType, } from '../DataCubeQueryEngine.js';\nimport { _aggCol_basic } from '../DataCubeQueryBuilderUtils.js';\nexport class DataCubeQueryAggregateOperation__Min extends DataCubeQueryAggregateOperation {\n get label() {\n return 'min';\n }\n get textLabel() {\n return 'min';\n }\n get description() {\n return 'min';\n }\n get operator() {\n return DataCubeQueryAggregateOperator.MIN;\n }\n isCompatibleWithColumn(column) {\n return ofDataType(column.type, [DataCubeColumnDataType.NUMBER]);\n }\n buildAggregateColumn(column) {\n return _aggCol_basic(column, DataCubeFunction.MIN);\n }\n}\n//# sourceMappingURL=DataCubeQueryAggregateOperation__Min.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DataCubeQueryAggregateOperation } from './DataCubeQueryAggregateOperation.js';\nimport { DataCubeQueryAggregateOperator, DataCubeColumnDataType, DataCubeFunction, ofDataType, } from '../DataCubeQueryEngine.js';\nimport { _aggCol_basic } from '../DataCubeQueryBuilderUtils.js';\nexport class DataCubeQueryAggregateOperation__Max extends DataCubeQueryAggregateOperation {\n get label() {\n return 'max';\n }\n get textLabel() {\n return 'max';\n }\n get description() {\n return 'max';\n }\n get operator() {\n return DataCubeQueryAggregateOperator.MAX;\n }\n isCompatibleWithColumn(column) {\n return ofDataType(column.type, [DataCubeColumnDataType.NUMBER]);\n }\n buildAggregateColumn(column) {\n return _aggCol_basic(column, DataCubeFunction.MAX);\n }\n}\n//# sourceMappingURL=DataCubeQueryAggregateOperation__Max.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DataCubeQueryAggregateOperation } from './DataCubeQueryAggregateOperation.js';\nimport { DataCubeQueryAggregateOperator, DataCubeColumnDataType, DataCubeFunction, ofDataType, } from '../DataCubeQueryEngine.js';\nimport { _aggCol_basic } from '../DataCubeQueryBuilderUtils.js';\nexport class DataCubeQueryAggregateOperation__UniqueValue extends DataCubeQueryAggregateOperation {\n get label() {\n return 'uniq';\n }\n get textLabel() {\n return 'unique value';\n }\n get description() {\n return 'unique value';\n }\n get operator() {\n return DataCubeQueryAggregateOperator.UNIQUE;\n }\n isCompatibleWithColumn(column) {\n return ofDataType(column.type, [\n DataCubeColumnDataType.TEXT,\n DataCubeColumnDataType.NUMBER,\n DataCubeColumnDataType.DATE,\n DataCubeColumnDataType.TIME,\n ]);\n }\n buildAggregateColumn(column) {\n return _aggCol_basic(column, DataCubeFunction.UNIQUE_VALUE_ONLY);\n }\n}\n//# sourceMappingURL=DataCubeQueryAggregateOperation__UniqueValue.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DataCubeQueryAggregateOperation } from './DataCubeQueryAggregateOperation.js';\nimport { DataCubeQueryAggregateOperator, DataCubeColumnDataType, DataCubeFunction, ofDataType, } from '../DataCubeQueryEngine.js';\nimport { _aggCol_basic } from '../DataCubeQueryBuilderUtils.js';\nexport class DataCubeQueryAggregateOperation__First extends DataCubeQueryAggregateOperation {\n get label() {\n return 'first';\n }\n get textLabel() {\n return 'first';\n }\n get description() {\n return 'first';\n }\n get operator() {\n return DataCubeQueryAggregateOperator.FIRST;\n }\n isCompatibleWithColumn(column) {\n return ofDataType(column.type, [\n DataCubeColumnDataType.TEXT,\n DataCubeColumnDataType.NUMBER,\n DataCubeColumnDataType.DATE,\n DataCubeColumnDataType.TIME,\n ]);\n }\n buildAggregateColumn(column) {\n return _aggCol_basic(column, DataCubeFunction.FIRST);\n }\n}\n//# sourceMappingURL=DataCubeQueryAggregateOperation__First.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DataCubeQueryAggregateOperation } from './DataCubeQueryAggregateOperation.js';\nimport { DataCubeQueryAggregateOperator, DataCubeColumnDataType, DataCubeFunction, ofDataType, } from '../DataCubeQueryEngine.js';\nimport { _aggCol_basic } from '../DataCubeQueryBuilderUtils.js';\nexport class DataCubeQueryAggregateOperation__Last extends DataCubeQueryAggregateOperation {\n get label() {\n return 'last';\n }\n get textLabel() {\n return 'last';\n }\n get description() {\n return 'last';\n }\n get operator() {\n return DataCubeQueryAggregateOperator.LAST;\n }\n isCompatibleWithColumn(column) {\n return ofDataType(column.type, [\n DataCubeColumnDataType.TEXT,\n DataCubeColumnDataType.NUMBER,\n DataCubeColumnDataType.DATE,\n DataCubeColumnDataType.TIME,\n ]);\n }\n buildAggregateColumn(column) {\n return _aggCol_basic(column, DataCubeFunction.LAST);\n }\n}\n//# sourceMappingURL=DataCubeQueryAggregateOperation__Last.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DataCubeQueryAggregateOperation } from './DataCubeQueryAggregateOperation.js';\nimport { DataCubeQueryAggregateOperator, DataCubeColumnDataType, DataCubeFunction, ofDataType, } from '../DataCubeQueryEngine.js';\nimport { _aggCol_basic } from '../DataCubeQueryBuilderUtils.js';\nexport class DataCubeQueryAggregateOperation__VariancePopulation extends DataCubeQueryAggregateOperation {\n get label() {\n return 'var';\n }\n get textLabel() {\n return 'variance (population)';\n }\n get description() {\n return 'variance (population)';\n }\n get operator() {\n return DataCubeQueryAggregateOperator.VARIANCE_POPULATION;\n }\n isCompatibleWithColumn(column) {\n return ofDataType(column.type, [DataCubeColumnDataType.NUMBER]);\n }\n buildAggregateColumn(column) {\n return _aggCol_basic(column, DataCubeFunction.VARIANCE_POPULATION);\n }\n}\n//# sourceMappingURL=DataCubeQueryAggregateOperation__VariancePopulation.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DataCubeQueryAggregateOperation } from './DataCubeQueryAggregateOperation.js';\nimport { DataCubeQueryAggregateOperator, DataCubeColumnDataType, DataCubeFunction, ofDataType, } from '../DataCubeQueryEngine.js';\nimport { _aggCol_basic } from '../DataCubeQueryBuilderUtils.js';\nexport class DataCubeQueryAggregateOperation__VarianceSample extends DataCubeQueryAggregateOperation {\n get label() {\n return 'var (sample)';\n }\n get textLabel() {\n return 'variance (sample)';\n }\n get description() {\n return 'variance (sample)';\n }\n get operator() {\n return DataCubeQueryAggregateOperator.VARIANCE_SAMPLE;\n }\n isCompatibleWithColumn(column) {\n return ofDataType(column.type, [DataCubeColumnDataType.NUMBER]);\n }\n buildAggregateColumn(column) {\n return _aggCol_basic(column, DataCubeFunction.VARIANCE_SAMPLE);\n }\n}\n//# sourceMappingURL=DataCubeQueryAggregateOperation__VarianceSample.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DataCubeQueryAggregateOperation } from './DataCubeQueryAggregateOperation.js';\nimport { DataCubeQueryAggregateOperator, DataCubeColumnDataType, DataCubeFunction, ofDataType, } from '../DataCubeQueryEngine.js';\nimport { _aggCol_basic } from '../DataCubeQueryBuilderUtils.js';\nexport class DataCubeQueryAggregateOperation__StdDevPopulation extends DataCubeQueryAggregateOperation {\n get label() {\n return 'std';\n }\n get textLabel() {\n return 'standard deviation (population)';\n }\n get description() {\n return 'standard deviation (population)';\n }\n get operator() {\n return DataCubeQueryAggregateOperator.STANDARD_DEVIATION_POPULATION;\n }\n isCompatibleWithColumn(column) {\n return ofDataType(column.type, [DataCubeColumnDataType.NUMBER]);\n }\n buildAggregateColumn(column) {\n return _aggCol_basic(column, DataCubeFunction.STANDARD_DEVIATION_POPULATION);\n }\n}\n//# sourceMappingURL=DataCubeQueryAggregateOperation__StdDevPopulation.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DataCubeQueryAggregateOperation } from './DataCubeQueryAggregateOperation.js';\nimport { DataCubeQueryAggregateOperator, DataCubeColumnDataType, DataCubeFunction, ofDataType, } from '../DataCubeQueryEngine.js';\nimport { _aggCol_basic } from '../DataCubeQueryBuilderUtils.js';\nexport class DataCubeQueryAggregateOperation__StdDevSample extends DataCubeQueryAggregateOperation {\n get label() {\n return 'std (sample)';\n }\n get textLabel() {\n return 'standard deviation (sample)';\n }\n get description() {\n return 'standard deviation (sample)';\n }\n get operator() {\n return DataCubeQueryAggregateOperator.STANDARD_DEVIATION_SAMPLE;\n }\n isCompatibleWithColumn(column) {\n return ofDataType(column.type, [DataCubeColumnDataType.NUMBER]);\n }\n buildAggregateColumn(column) {\n return _aggCol_basic(column, DataCubeFunction.STANDARD_DEVIATION_SAMPLE);\n }\n}\n//# sourceMappingURL=DataCubeQueryAggregateOperation__StdDevSample.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { PRIMITIVE_TYPE } from '@finos/legend-graph';\nimport { DataCubeQueryAggregateOperation } from './DataCubeQueryAggregateOperation.js';\nimport { DataCubeQueryAggregateOperator, DataCubeColumnDataType, DataCubeFunction, ofDataType, } from '../DataCubeQueryEngine.js';\nimport { _colSpec, _function, _functionName, _lambda, _primitiveValue, _property, _var, } from '../DataCubeQueryBuilderUtils.js';\nexport class DataCubeQueryAggregateOperation__JoinStrings extends DataCubeQueryAggregateOperation {\n get label() {\n return 'strjoin';\n }\n get textLabel() {\n return 'join strings';\n }\n get description() {\n return 'join strings';\n }\n get operator() {\n return DataCubeQueryAggregateOperator.JOIN_STRINGS;\n }\n isCompatibleWithColumn(column) {\n return ofDataType(column.type, [\n // NOTE: technically all data types should be suported,\n // i.e. we can use meta::pure::functions::string::makeString\n // instead, but we can't because must preserve the type of\n // the original column\n DataCubeColumnDataType.TEXT,\n ]);\n }\n buildAggregateColumn(column) {\n const variable = _var();\n return _colSpec(column.name, _lambda([variable], [_property(column.name, variable)]), _lambda([variable], [\n _function(_functionName(DataCubeFunction.JOIN_STRINGS), [\n variable,\n // TODO: we might want to support customizing the delimiter in this case\n _primitiveValue(PRIMITIVE_TYPE.STRING, ','),\n ]),\n ]));\n }\n}\n//# sourceMappingURL=DataCubeQueryAggregateOperation__JoinStrings.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {} from '@finos/legend-graph';\nimport { DataCubeQueryFilterOperation, generateDefaultFilterConditionPrimitiveTypeValue, } from './DataCubeQueryFilterOperation.js';\nimport { DataCubeColumnDataType, DataCubeFunction, DataCubeQueryFilterOperator, ofDataType, } from '../DataCubeQueryEngine.js';\nimport { _function, _functionName, _property, _value, } from '../DataCubeQueryBuilderUtils.js';\nimport { guaranteeNonNullable } from '@finos/legend-shared';\nexport class DataCubeQueryFilterOperation__Equal extends DataCubeQueryFilterOperation {\n get label() {\n return '=';\n }\n get textLabel() {\n return '=';\n }\n get description() {\n return 'equals';\n }\n get operator() {\n return DataCubeQueryFilterOperator.EQUAL;\n }\n isCompatibleWithColumn(column) {\n return ofDataType(column.type, [\n DataCubeColumnDataType.TEXT,\n DataCubeColumnDataType.NUMBER,\n DataCubeColumnDataType.DATE,\n DataCubeColumnDataType.TIME,\n ]);\n }\n isCompatibleWithValue(value) {\n return (ofDataType(value.type, [\n DataCubeColumnDataType.TEXT,\n DataCubeColumnDataType.NUMBER,\n DataCubeColumnDataType.DATE,\n DataCubeColumnDataType.TIME,\n ]) &&\n value.value !== undefined &&\n !Array.isArray(value.value));\n }\n generateDefaultValue(column) {\n return {\n type: column.type,\n value: generateDefaultFilterConditionPrimitiveTypeValue(column.type),\n };\n }\n buildConditionSnapshot(expression) {\n /** TODO: @datacube roundtrip */\n // export const buildPostFilterConditionState = (\n // postFilterState: QueryBuilderPostFilterState,\n // expression: FunctionExpression,\n // operatorFunctionFullPath | undefined,\n // operator: QueryBuilderPostFilterOperator,\n // ): PostFilterConditionState | undefined => {\n // let postConditionState: PostFilterConditionState | undefined;\n // const tdsColumnGetter = operator.getTDSColumnGetter();\n // if (\n // tdsColumnGetter &&\n // expression instanceof AbstractPropertyExpression &&\n // expression.func.value.name === tdsColumnGetter\n // ) {\n // const columnState = findProjectionColumnState(expression, postFilterState);\n // postConditionState = new PostFilterConditionState(\n // postFilterState,\n // columnState,\n // operator,\n // );\n // return postConditionState;\n // } else if (\n // operatorFunctionFullPath &&\n // matchFunctionName(expression.functionName, operatorFunctionFullPath)\n // ) {\n // assertTrue(\n // expression.parametersValues.length === 2,\n // `Can't process ${extractElementNameFromPath(\n // operatorFunctionFullPath,\n // )}() expression: ${extractElementNameFromPath(\n // operatorFunctionFullPath,\n // )}() expects '1 argument'`,\n // );\n // // get projection column\n // const tdsColumnPropertyExpression = guaranteeType(\n // expression.parametersValues[0],\n // AbstractPropertyExpression,\n // `Can't process ${extractElementNameFromPath(\n // operatorFunctionFullPath,\n // )}() expression: expects property expression in lambda body`,\n // );\n // const columnState = findProjectionColumnState(\n // tdsColumnPropertyExpression,\n // postFilterState,\n // );\n // // get operation value specification\n // const rightSide = expression.parametersValues[1];\n // // create state\n // postConditionState = new PostFilterConditionState(\n // postFilterState,\n // columnState,\n // operator,\n // );\n // buildPostFilterConditionValueState(rightSide, postConditionState);\n // //post checks\n // assertTrue(\n // operator.isCompatibleWithPostFilterColumn(postConditionState),\n // `Can't process ${extractElementNameFromPath(\n // operatorFunctionFullPath,\n // )}() expression: property is not compatible with post-filter operator`,\n // );\n // assertTrue(\n // operator.isCompatibleWithConditionValue(postConditionState),\n // `Operator '${operator.getLabel()}' not compatible with value specification ${rightSide?.toString()}`,\n // );\n // }\n // return postConditionState;\n // };\n return undefined;\n }\n buildConditionExpression(condition) {\n return _function(_functionName(DataCubeFunction.EQUAL), [\n _property(condition.name),\n _value(guaranteeNonNullable(condition.value)),\n ]);\n }\n}\n//# sourceMappingURL=DataCubeQueryFilterOperation__Equal.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {} from '@finos/legend-graph';\nimport { DataCubeQueryFilterOperation, generateDefaultFilterConditionPrimitiveTypeValue, } from './DataCubeQueryFilterOperation.js';\nimport { DataCubeColumnDataType, DataCubeFunction, DataCubeQueryFilterOperator, ofDataType, } from '../DataCubeQueryEngine.js';\nimport { _function, _functionName, _property, _value, } from '../DataCubeQueryBuilderUtils.js';\nimport { guaranteeNonNullable } from '@finos/legend-shared';\nexport class DataCubeQueryFilterOperation__LessThanOrEqual extends DataCubeQueryFilterOperation {\n get label() {\n return '<=';\n }\n get textLabel() {\n return '<=';\n }\n get description() {\n return 'is less than or equals';\n }\n get operator() {\n return DataCubeQueryFilterOperator.LESS_THAN_OR_EQUAL;\n }\n isCompatibleWithColumn(column) {\n return ofDataType(column.type, [\n DataCubeColumnDataType.NUMBER,\n DataCubeColumnDataType.DATE,\n DataCubeColumnDataType.TIME,\n ]);\n }\n isCompatibleWithValue(value) {\n return (ofDataType(value.type, [\n DataCubeColumnDataType.NUMBER,\n DataCubeColumnDataType.DATE,\n DataCubeColumnDataType.TIME,\n ]) &&\n value.value !== undefined &&\n !Array.isArray(value.value));\n }\n generateDefaultValue(column) {\n return {\n type: column.type,\n value: generateDefaultFilterConditionPrimitiveTypeValue(column.type),\n };\n }\n buildConditionSnapshot(expression) {\n /** TODO: @datacube roundtrip */\n return undefined;\n }\n buildConditionExpression(condition) {\n return _function(_functionName(DataCubeFunction.LESS_THAN_OR_EQUAL), [\n _property(condition.name),\n _value(guaranteeNonNullable(condition.value)),\n ]);\n }\n}\n//# sourceMappingURL=DataCubeQueryFilterOperation__LessThanOrEqual.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {} from '@finos/legend-graph';\nimport { DataCubeQueryFilterOperation, generateDefaultFilterConditionPrimitiveTypeValue, } from './DataCubeQueryFilterOperation.js';\nimport { DataCubeColumnDataType, DataCubeFunction, DataCubeQueryFilterOperator, ofDataType, } from '../DataCubeQueryEngine.js';\nimport { _function, _functionName, _property, _value, } from '../DataCubeQueryBuilderUtils.js';\nimport { guaranteeNonNullable } from '@finos/legend-shared';\nexport class DataCubeQueryFilterOperation__LessThan extends DataCubeQueryFilterOperation {\n get label() {\n return '<';\n }\n get textLabel() {\n return '<';\n }\n get description() {\n return 'is less than';\n }\n get operator() {\n return DataCubeQueryFilterOperator.LESS_THAN;\n }\n isCompatibleWithColumn(column) {\n return ofDataType(column.type, [\n DataCubeColumnDataType.NUMBER,\n DataCubeColumnDataType.DATE,\n DataCubeColumnDataType.TIME,\n ]);\n }\n isCompatibleWithValue(value) {\n return (ofDataType(value.type, [\n DataCubeColumnDataType.NUMBER,\n DataCubeColumnDataType.DATE,\n DataCubeColumnDataType.TIME,\n ]) &&\n value.value !== undefined &&\n !Array.isArray(value.value));\n }\n generateDefaultValue(column) {\n return {\n type: column.type,\n value: generateDefaultFilterConditionPrimitiveTypeValue(column.type),\n };\n }\n buildConditionSnapshot(expression) {\n /** TODO: @datacube roundtrip */\n return undefined;\n }\n buildConditionExpression(condition) {\n return _function(_functionName(DataCubeFunction.LESS_THAN), [\n _property(condition.name),\n _value(guaranteeNonNullable(condition.value)),\n ]);\n }\n}\n//# sourceMappingURL=DataCubeQueryFilterOperation__LessThan.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {} from '@finos/legend-graph';\nimport { DataCubeQueryFilterOperation, generateDefaultFilterConditionPrimitiveTypeValue, } from './DataCubeQueryFilterOperation.js';\nimport { DataCubeColumnDataType, DataCubeFunction, DataCubeQueryFilterOperator, ofDataType, } from '../DataCubeQueryEngine.js';\nimport { _function, _functionName, _property, _value, } from '../DataCubeQueryBuilderUtils.js';\nimport { guaranteeNonNullable } from '@finos/legend-shared';\nexport class DataCubeQueryFilterOperation__GreaterThanOrEqual extends DataCubeQueryFilterOperation {\n get label() {\n return '>=';\n }\n get textLabel() {\n return '>=';\n }\n get description() {\n return 'is greater than or equals';\n }\n get operator() {\n return DataCubeQueryFilterOperator.GREATER_THAN_OR_EQUAL;\n }\n isCompatibleWithColumn(column) {\n return ofDataType(column.type, [\n DataCubeColumnDataType.NUMBER,\n DataCubeColumnDataType.DATE,\n DataCubeColumnDataType.TIME,\n ]);\n }\n isCompatibleWithValue(value) {\n return (ofDataType(value.type, [\n DataCubeColumnDataType.NUMBER,\n DataCubeColumnDataType.DATE,\n DataCubeColumnDataType.TIME,\n ]) &&\n value.value !== undefined &&\n !Array.isArray(value.value));\n }\n generateDefaultValue(column) {\n return {\n type: column.type,\n value: generateDefaultFilterConditionPrimitiveTypeValue(column.type),\n };\n }\n buildConditionSnapshot(expression) {\n /** TODO: @datacube roundtrip */\n return undefined;\n }\n buildConditionExpression(condition) {\n return _function(_functionName(DataCubeFunction.GREATER_THAN_OR_EQUAL), [\n _property(condition.name),\n _value(guaranteeNonNullable(condition.value)),\n ]);\n }\n}\n//# sourceMappingURL=DataCubeQueryFilterOperation__GreaterThanOrEqual.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {} from '@finos/legend-graph';\nimport { DataCubeQueryFilterOperation, generateDefaultFilterConditionPrimitiveTypeValue, } from './DataCubeQueryFilterOperation.js';\nimport { DataCubeColumnDataType, DataCubeFunction, DataCubeQueryFilterOperator, ofDataType, } from '../DataCubeQueryEngine.js';\nimport { _function, _functionName, _property, _value, } from '../DataCubeQueryBuilderUtils.js';\nimport { guaranteeNonNullable } from '@finos/legend-shared';\nexport class DataCubeQueryFilterOperation__GreaterThan extends DataCubeQueryFilterOperation {\n get label() {\n return '>';\n }\n get textLabel() {\n return '>';\n }\n get description() {\n return 'is greater than';\n }\n get operator() {\n return DataCubeQueryFilterOperator.GREATER_THAN;\n }\n isCompatibleWithColumn(column) {\n return ofDataType(column.type, [\n DataCubeColumnDataType.NUMBER,\n DataCubeColumnDataType.DATE,\n DataCubeColumnDataType.TIME,\n ]);\n }\n isCompatibleWithValue(value) {\n return (ofDataType(value.type, [\n DataCubeColumnDataType.NUMBER,\n DataCubeColumnDataType.DATE,\n DataCubeColumnDataType.TIME,\n ]) &&\n value.value !== undefined &&\n !Array.isArray(value.value));\n }\n generateDefaultValue(column) {\n return {\n type: column.type,\n value: generateDefaultFilterConditionPrimitiveTypeValue(column.type),\n };\n }\n buildConditionSnapshot(expression) {\n /** TODO: @datacube roundtrip */\n return undefined;\n }\n buildConditionExpression(condition) {\n return _function(_functionName(DataCubeFunction.GREATER_THAN), [\n _property(condition.name),\n _value(guaranteeNonNullable(condition.value)),\n ]);\n }\n}\n//# sourceMappingURL=DataCubeQueryFilterOperation__GreaterThan.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {} from '@finos/legend-graph';\nimport { DataCubeQueryFilterOperation, generateDefaultFilterConditionPrimitiveTypeValue, } from './DataCubeQueryFilterOperation.js';\nimport { DataCubeColumnDataType, DataCubeFunction, DataCubeQueryFilterOperator, ofDataType, } from '../DataCubeQueryEngine.js';\nimport { _function, _functionName, _not, _property, _value, } from '../DataCubeQueryBuilderUtils.js';\nimport { guaranteeNonNullable } from '@finos/legend-shared';\nexport class DataCubeQueryFilterOperation__NotEqual extends DataCubeQueryFilterOperation {\n get label() {\n return '!=';\n }\n get textLabel() {\n return '!=';\n }\n get description() {\n return 'does not equal';\n }\n get operator() {\n return DataCubeQueryFilterOperator.NOT_EQUAL;\n }\n isCompatibleWithColumn(column) {\n return ofDataType(column.type, [\n DataCubeColumnDataType.TEXT,\n DataCubeColumnDataType.NUMBER,\n DataCubeColumnDataType.DATE,\n DataCubeColumnDataType.TIME,\n ]);\n }\n isCompatibleWithValue(value) {\n return (ofDataType(value.type, [\n DataCubeColumnDataType.TEXT,\n DataCubeColumnDataType.NUMBER,\n DataCubeColumnDataType.DATE,\n DataCubeColumnDataType.TIME,\n ]) &&\n value.value !== undefined &&\n !Array.isArray(value.value));\n }\n generateDefaultValue(column) {\n return {\n type: column.type,\n value: generateDefaultFilterConditionPrimitiveTypeValue(column.type),\n };\n }\n buildConditionSnapshot(expression) {\n /** TODO: @datacube roundtrip */\n return undefined;\n }\n buildConditionExpression(condition) {\n return _not(_function(_functionName(DataCubeFunction.EQUAL), [\n _property(condition.name),\n _value(guaranteeNonNullable(condition.value)),\n ]));\n }\n}\n//# sourceMappingURL=DataCubeQueryFilterOperation__NotEqual.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {} from '@finos/legend-graph';\nimport { DataCubeQueryFilterOperation } from './DataCubeQueryFilterOperation.js';\nimport { DataCubeColumnDataType, DataCubeFunction, DataCubeOperationAdvancedValueType, DataCubeQueryFilterOperator, ofDataType, } from '../DataCubeQueryEngine.js';\nimport { _function, _functionName, _property, _value, _var, } from '../DataCubeQueryBuilderUtils.js';\nimport { guaranteeNonNullable, isString } from '@finos/legend-shared';\nexport class DataCubeQueryFilterOperation__EqualColumn extends DataCubeQueryFilterOperation {\n get label() {\n return '= value in column';\n }\n get textLabel() {\n return '= value in column';\n }\n get description() {\n return 'equals to value in column';\n }\n get operator() {\n return DataCubeQueryFilterOperator.EQUAL_COLUMN;\n }\n isCompatibleWithColumn(column) {\n return ofDataType(column.type, [\n DataCubeColumnDataType.TEXT,\n DataCubeColumnDataType.NUMBER,\n DataCubeColumnDataType.DATE,\n DataCubeColumnDataType.TIME,\n ]);\n }\n isCompatibleWithValue(value) {\n return (value.type === DataCubeOperationAdvancedValueType.COLUMN &&\n value.value !== undefined &&\n isString(value.value));\n }\n generateDefaultValue(column) {\n return {\n type: DataCubeOperationAdvancedValueType.COLUMN,\n value: column.name,\n };\n }\n buildConditionSnapshot(expression) {\n /** TODO: @datacube roundtrip */\n return undefined;\n }\n buildConditionExpression(condition) {\n const variable = _var();\n return _function(_functionName(DataCubeFunction.EQUAL), [\n _property(condition.name, variable),\n _value(guaranteeNonNullable(condition.value), variable),\n ]);\n }\n}\n//# sourceMappingURL=DataCubeQueryFilterOperation__EqualColumn.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {} from '@finos/legend-graph';\nimport { DataCubeQueryFilterOperation, generateDefaultFilterConditionPrimitiveTypeValue, } from './DataCubeQueryFilterOperation.js';\nimport { DataCubeColumnDataType, DataCubeFunction, DataCubeQueryFilterOperator, ofDataType, } from '../DataCubeQueryEngine.js';\nimport { _function, _functionName, _property, _value, _var, } from '../DataCubeQueryBuilderUtils.js';\nimport { guaranteeNonNullable } from '@finos/legend-shared';\nexport class DataCubeQueryFilterOperation__EqualCaseInsensitive extends DataCubeQueryFilterOperation {\n get label() {\n return '= (case-insensitive)';\n }\n get textLabel() {\n return '= (case-insensitive)';\n }\n get description() {\n return 'equals (case-insensitive)';\n }\n get operator() {\n return DataCubeQueryFilterOperator.EQUAL_CASE_INSENSITIVE;\n }\n isCompatibleWithColumn(column) {\n return ofDataType(column.type, [DataCubeColumnDataType.TEXT]);\n }\n isCompatibleWithValue(value) {\n return (ofDataType(value.type, [DataCubeColumnDataType.TEXT]) &&\n value.value !== undefined &&\n !Array.isArray(value.value));\n }\n generateDefaultValue(column) {\n return {\n type: column.type,\n value: generateDefaultFilterConditionPrimitiveTypeValue(column.type),\n };\n }\n buildConditionSnapshot(expression) {\n /** TODO: @datacube roundtrip */\n return undefined;\n }\n buildConditionExpression(condition) {\n const variable = _var();\n return _function(_functionName(DataCubeFunction.EQUAL), [\n _function(_functionName(DataCubeFunction.TO_LOWERCASE), [\n _property(condition.name, variable),\n ]),\n _function(_functionName(DataCubeFunction.TO_LOWERCASE), [\n _value(guaranteeNonNullable(condition.value), variable),\n ]),\n ]);\n }\n}\n//# sourceMappingURL=DataCubeQueryFilterOperation__EqualCaseInsensitive.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {} from '@finos/legend-graph';\nimport { DataCubeQueryFilterOperation, generateDefaultFilterConditionPrimitiveTypeValue, } from './DataCubeQueryFilterOperation.js';\nimport { DataCubeColumnDataType, DataCubeFunction, DataCubeQueryFilterOperator, ofDataType, } from '../DataCubeQueryEngine.js';\nimport { _function, _functionName, _not, _property, _value, _var, } from '../DataCubeQueryBuilderUtils.js';\nimport { guaranteeNonNullable } from '@finos/legend-shared';\nexport class DataCubeQueryFilterOperation__NotEqualCaseInsensitive extends DataCubeQueryFilterOperation {\n get label() {\n return '!= (case-insensitive)';\n }\n get textLabel() {\n return '!= (case-insensitive)';\n }\n get description() {\n return 'does not equal (case-insensitive)';\n }\n get operator() {\n return DataCubeQueryFilterOperator.NOT_EQUAL_CASE_INSENSITIVE;\n }\n isCompatibleWithColumn(column) {\n return ofDataType(column.type, [DataCubeColumnDataType.TEXT]);\n }\n isCompatibleWithValue(value) {\n return (ofDataType(value.type, [DataCubeColumnDataType.TEXT]) &&\n value.value !== undefined &&\n !Array.isArray(value.value));\n }\n generateDefaultValue(column) {\n return {\n type: column.type,\n value: generateDefaultFilterConditionPrimitiveTypeValue(column.type),\n };\n }\n buildConditionSnapshot(expression) {\n /** TODO: @datacube roundtrip */\n return undefined;\n }\n buildConditionExpression(condition) {\n const variable = _var();\n return _not(_function(_functionName(DataCubeFunction.EQUAL), [\n _function(_functionName(DataCubeFunction.TO_LOWERCASE), [\n _property(condition.name, variable),\n ]),\n _function(_functionName(DataCubeFunction.TO_LOWERCASE), [\n _value(guaranteeNonNullable(condition.value), variable),\n ]),\n ]));\n }\n}\n//# sourceMappingURL=DataCubeQueryFilterOperation__NotEqualCaseInsensitive.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {} from '@finos/legend-graph';\nimport { DataCubeQueryFilterOperation } from './DataCubeQueryFilterOperation.js';\nimport { DataCubeColumnDataType, DataCubeFunction, DataCubeOperationAdvancedValueType, DataCubeQueryFilterOperator, ofDataType, } from '../DataCubeQueryEngine.js';\nimport { _function, _functionName, _property, _value, _var, } from '../DataCubeQueryBuilderUtils.js';\nimport { guaranteeNonNullable, isString } from '@finos/legend-shared';\nexport class DataCubeQueryFilterOperation__EqualCaseInsensitiveColumn extends DataCubeQueryFilterOperation {\n get label() {\n return '= (case-insensitive) value in column';\n }\n get textLabel() {\n return '= (case-insensitive) value in column';\n }\n get description() {\n return 'equals to (case-insensitive) value in column';\n }\n get operator() {\n return DataCubeQueryFilterOperator.EQUAL_CASE_INSENSITIVE_COLUMN;\n }\n isCompatibleWithColumn(column) {\n return ofDataType(column.type, [DataCubeColumnDataType.TEXT]);\n }\n isCompatibleWithValue(value) {\n return (value.type === DataCubeOperationAdvancedValueType.COLUMN &&\n value.value !== undefined &&\n isString(value.value));\n }\n generateDefaultValue(column) {\n return {\n type: DataCubeOperationAdvancedValueType.COLUMN,\n value: column.name,\n };\n }\n buildConditionSnapshot(expression) {\n /** TODO: @datacube roundtrip */\n return undefined;\n }\n buildConditionExpression(condition) {\n const variable = _var();\n return _function(_functionName(DataCubeFunction.EQUAL), [\n _function(_functionName(DataCubeFunction.TO_LOWERCASE), [\n _property(condition.name, variable),\n ]),\n _function(_functionName(DataCubeFunction.TO_LOWERCASE), [\n _value(guaranteeNonNullable(condition.value), variable),\n ]),\n ]);\n }\n}\n//# sourceMappingURL=DataCubeQueryFilterOperation__EqualCaseInsensitiveColumn.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {} from '@finos/legend-graph';\nimport { DataCubeQueryFilterOperation } from './DataCubeQueryFilterOperation.js';\nimport { DataCubeColumnDataType, DataCubeFunction, DataCubeOperationAdvancedValueType, DataCubeQueryFilterOperator, ofDataType, } from '../DataCubeQueryEngine.js';\nimport { _function, _functionName, _not, _property, _value, _var, } from '../DataCubeQueryBuilderUtils.js';\nimport { guaranteeNonNullable, isString } from '@finos/legend-shared';\nexport class DataCubeQueryFilterOperation__NotEqualCaseInsensitiveColumn extends DataCubeQueryFilterOperation {\n get label() {\n return '!= (case-insensitive) value in column';\n }\n get textLabel() {\n return '!= (case-insensitive) value in column';\n }\n get description() {\n return 'does not equal (case-insensitive) value in column';\n }\n get operator() {\n return DataCubeQueryFilterOperator.NOT_EQUAL_CASE_INSENSITIVE_COLUMN;\n }\n isCompatibleWithColumn(column) {\n return ofDataType(column.type, [DataCubeColumnDataType.TEXT]);\n }\n isCompatibleWithValue(value) {\n return (value.type === DataCubeOperationAdvancedValueType.COLUMN &&\n value.value !== undefined &&\n isString(value.value));\n }\n generateDefaultValue(column) {\n return {\n type: DataCubeOperationAdvancedValueType.COLUMN,\n value: column.name,\n };\n }\n buildConditionSnapshot(expression) {\n /** TODO: @datacube roundtrip */\n return undefined;\n }\n buildConditionExpression(condition) {\n const variable = _var();\n return _not(_function(_functionName(DataCubeFunction.EQUAL), [\n _function(_functionName(DataCubeFunction.TO_LOWERCASE), [\n _property(condition.name, variable),\n ]),\n _function(_functionName(DataCubeFunction.TO_LOWERCASE), [\n _value(guaranteeNonNullable(condition.value), variable),\n ]),\n ]));\n }\n}\n//# sourceMappingURL=DataCubeQueryFilterOperation__NotEqualCaseInsensitiveColumn.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {} from '@finos/legend-graph';\nimport { DataCubeQueryFilterOperation } from './DataCubeQueryFilterOperation.js';\nimport { DataCubeColumnDataType, DataCubeFunction, DataCubeOperationAdvancedValueType, DataCubeQueryFilterOperator, ofDataType, } from '../DataCubeQueryEngine.js';\nimport { _function, _functionName, _not, _property, _value, _var, } from '../DataCubeQueryBuilderUtils.js';\nimport { guaranteeNonNullable, isString } from '@finos/legend-shared';\nexport class DataCubeQueryFilterOperation__NotEqualColumn extends DataCubeQueryFilterOperation {\n get label() {\n return '!= value in column';\n }\n get textLabel() {\n return '!= value in column';\n }\n get description() {\n return 'does not equal value in column';\n }\n get operator() {\n return DataCubeQueryFilterOperator.NOT_EQUAL_COLUMN;\n }\n isCompatibleWithColumn(column) {\n return ofDataType(column.type, [\n DataCubeColumnDataType.TEXT,\n DataCubeColumnDataType.NUMBER,\n DataCubeColumnDataType.DATE,\n DataCubeColumnDataType.TIME,\n ]);\n }\n isCompatibleWithValue(value) {\n return (value.type === DataCubeOperationAdvancedValueType.COLUMN &&\n value.value !== undefined &&\n isString(value.value));\n }\n generateDefaultValue(column) {\n return {\n type: DataCubeOperationAdvancedValueType.COLUMN,\n value: column.name,\n };\n }\n buildConditionSnapshot(expression) {\n /** TODO: @datacube roundtrip */\n return undefined;\n }\n buildConditionExpression(condition) {\n const variable = _var();\n return _not(_function(_functionName(DataCubeFunction.EQUAL), [\n _property(condition.name, variable),\n _value(guaranteeNonNullable(condition.value), variable),\n ]));\n }\n}\n//# sourceMappingURL=DataCubeQueryFilterOperation__NotEqualColumn.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {} from '@finos/legend-graph';\nimport { DataCubeQueryFilterOperation } from './DataCubeQueryFilterOperation.js';\nimport { DataCubeColumnDataType, DataCubeFunction, DataCubeOperationAdvancedValueType, DataCubeQueryFilterOperator, ofDataType, } from '../DataCubeQueryEngine.js';\nimport { _function, _functionName, _property, _value, _var, } from '../DataCubeQueryBuilderUtils.js';\nimport { guaranteeNonNullable, isString } from '@finos/legend-shared';\nexport class DataCubeQueryFilterOperation__LessThanColumn extends DataCubeQueryFilterOperation {\n get label() {\n return '< value in column';\n }\n get textLabel() {\n return '< value in column';\n }\n get description() {\n return 'is less than value in column';\n }\n get operator() {\n return DataCubeQueryFilterOperator.LESS_THAN_COLUMN;\n }\n isCompatibleWithColumn(column) {\n return ofDataType(column.type, [\n DataCubeColumnDataType.NUMBER,\n DataCubeColumnDataType.DATE,\n DataCubeColumnDataType.TIME,\n ]);\n }\n isCompatibleWithValue(value) {\n return (value.type === DataCubeOperationAdvancedValueType.COLUMN &&\n value.value !== undefined &&\n isString(value.value));\n }\n generateDefaultValue(column) {\n return {\n type: DataCubeOperationAdvancedValueType.COLUMN,\n value: column.name,\n };\n }\n buildConditionSnapshot(expression) {\n /** TODO: @datacube roundtrip */\n return undefined;\n }\n buildConditionExpression(condition) {\n const variable = _var();\n return _function(_functionName(DataCubeFunction.LESS_THAN), [\n _property(condition.name, variable),\n _value(guaranteeNonNullable(condition.value), variable),\n ]);\n }\n}\n//# sourceMappingURL=DataCubeQueryFilterOperation__LessThanColumn.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {} from '@finos/legend-graph';\nimport { DataCubeQueryFilterOperation } from './DataCubeQueryFilterOperation.js';\nimport { DataCubeColumnDataType, DataCubeFunction, DataCubeOperationAdvancedValueType, DataCubeQueryFilterOperator, ofDataType, } from '../DataCubeQueryEngine.js';\nimport { _function, _functionName, _property, _value, _var, } from '../DataCubeQueryBuilderUtils.js';\nimport { guaranteeNonNullable, isString } from '@finos/legend-shared';\nexport class DataCubeQueryFilterOperation__LessThanOrEqualColumn extends DataCubeQueryFilterOperation {\n get label() {\n return '<= value in column';\n }\n get textLabel() {\n return '<= value in column';\n }\n get description() {\n return 'is less than or equals value in column';\n }\n get operator() {\n return DataCubeQueryFilterOperator.LESS_THAN_OR_EQUAL_COLUMN;\n }\n isCompatibleWithColumn(column) {\n return ofDataType(column.type, [\n DataCubeColumnDataType.NUMBER,\n DataCubeColumnDataType.DATE,\n DataCubeColumnDataType.TIME,\n ]);\n }\n isCompatibleWithValue(value) {\n return (value.type === DataCubeOperationAdvancedValueType.COLUMN &&\n value.value !== undefined &&\n isString(value.value));\n }\n generateDefaultValue(column) {\n return {\n type: DataCubeOperationAdvancedValueType.COLUMN,\n value: column.name,\n };\n }\n buildConditionSnapshot(expression) {\n /** TODO: @datacube roundtrip */\n return undefined;\n }\n buildConditionExpression(condition) {\n const variable = _var();\n return _function(_functionName(DataCubeFunction.LESS_THAN_OR_EQUAL), [\n _property(condition.name, variable),\n _value(guaranteeNonNullable(condition.value), variable),\n ]);\n }\n}\n//# sourceMappingURL=DataCubeQueryFilterOperation__LessThanOrEqualColumn.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {} from '@finos/legend-graph';\nimport { DataCubeQueryFilterOperation } from './DataCubeQueryFilterOperation.js';\nimport { DataCubeColumnDataType, DataCubeFunction, DataCubeOperationAdvancedValueType, DataCubeQueryFilterOperator, ofDataType, } from '../DataCubeQueryEngine.js';\nimport { _function, _functionName, _property, _value, _var, } from '../DataCubeQueryBuilderUtils.js';\nimport { guaranteeNonNullable, isString } from '@finos/legend-shared';\nexport class DataCubeQueryFilterOperation__GreaterThanColumn extends DataCubeQueryFilterOperation {\n get label() {\n return '> value in column';\n }\n get textLabel() {\n return '> value in column';\n }\n get description() {\n return 'is greater than value in column';\n }\n get operator() {\n return DataCubeQueryFilterOperator.GREATER_THAN_COLUMN;\n }\n isCompatibleWithColumn(column) {\n return ofDataType(column.type, [\n DataCubeColumnDataType.NUMBER,\n DataCubeColumnDataType.DATE,\n DataCubeColumnDataType.TIME,\n ]);\n }\n isCompatibleWithValue(value) {\n return (value.type === DataCubeOperationAdvancedValueType.COLUMN &&\n value.value !== undefined &&\n isString(value.value));\n }\n generateDefaultValue(column) {\n return {\n type: DataCubeOperationAdvancedValueType.COLUMN,\n value: column.name,\n };\n }\n buildConditionSnapshot(expression) {\n /** TODO: @datacube roundtrip */\n return undefined;\n }\n buildConditionExpression(condition) {\n const variable = _var();\n return _function(_functionName(DataCubeFunction.GREATER_THAN), [\n _property(condition.name, variable),\n _value(guaranteeNonNullable(condition.value), variable),\n ]);\n }\n}\n//# sourceMappingURL=DataCubeQueryFilterOperation__GreaterThanColumn.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {} from '@finos/legend-graph';\nimport { DataCubeQueryFilterOperation } from './DataCubeQueryFilterOperation.js';\nimport { DataCubeColumnDataType, DataCubeFunction, DataCubeOperationAdvancedValueType, DataCubeQueryFilterOperator, ofDataType, } from '../DataCubeQueryEngine.js';\nimport { _function, _functionName, _property, _value, _var, } from '../DataCubeQueryBuilderUtils.js';\nimport { guaranteeNonNullable, isString } from '@finos/legend-shared';\nexport class DataCubeQueryFilterOperation__GreaterThanOrEqualColumn extends DataCubeQueryFilterOperation {\n get label() {\n return '>= value in column';\n }\n get textLabel() {\n return '>= value in column';\n }\n get description() {\n return 'is greater than or equals value in column';\n }\n get operator() {\n return DataCubeQueryFilterOperator.GREATER_THAN_OR_EQUAL_COLUMN;\n }\n isCompatibleWithColumn(column) {\n return ofDataType(column.type, [\n DataCubeColumnDataType.NUMBER,\n DataCubeColumnDataType.DATE,\n DataCubeColumnDataType.TIME,\n ]);\n }\n isCompatibleWithValue(value) {\n return (value.type === DataCubeOperationAdvancedValueType.COLUMN &&\n value.value !== undefined &&\n isString(value.value));\n }\n generateDefaultValue(column) {\n return {\n type: DataCubeOperationAdvancedValueType.COLUMN,\n value: column.name,\n };\n }\n buildConditionSnapshot(expression) {\n /** TODO: @datacube roundtrip */\n return undefined;\n }\n buildConditionExpression(condition) {\n const variable = _var();\n return _function(_functionName(DataCubeFunction.GREATER_THAN_OR_EQUAL), [\n _property(condition.name, variable),\n _value(guaranteeNonNullable(condition.value), variable),\n ]);\n }\n}\n//# sourceMappingURL=DataCubeQueryFilterOperation__GreaterThanOrEqualColumn.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {} from '@finos/legend-graph';\nimport { DataCubeQueryFilterOperation, generateDefaultFilterConditionPrimitiveTypeValue, } from './DataCubeQueryFilterOperation.js';\nimport { DataCubeColumnDataType, DataCubeFunction, DataCubeQueryFilterOperator, ofDataType, } from '../DataCubeQueryEngine.js';\nimport { _function, _functionName, _property, _value, } from '../DataCubeQueryBuilderUtils.js';\nimport { guaranteeNonNullable } from '@finos/legend-shared';\nexport class DataCubeQueryFilterOperation__Contain extends DataCubeQueryFilterOperation {\n get label() {\n return 'contains';\n }\n get textLabel() {\n return 'contains';\n }\n get description() {\n return 'contains';\n }\n get operator() {\n return DataCubeQueryFilterOperator.CONTAIN;\n }\n isCompatibleWithColumn(column) {\n return ofDataType(column.type, [DataCubeColumnDataType.TEXT]);\n }\n isCompatibleWithValue(value) {\n return (ofDataType(value.type, [DataCubeColumnDataType.TEXT]) &&\n value.value !== undefined &&\n !Array.isArray(value.value));\n }\n generateDefaultValue(column) {\n return {\n type: column.type,\n value: generateDefaultFilterConditionPrimitiveTypeValue(column.type),\n };\n }\n buildConditionSnapshot(expression) {\n /** TODO: @datacube roundtrip */\n return undefined;\n }\n buildConditionExpression(condition) {\n return _function(_functionName(DataCubeFunction.CONTAINS), [\n _property(condition.name),\n _value(guaranteeNonNullable(condition.value)),\n ]);\n }\n}\n//# sourceMappingURL=DataCubeQueryFilterOperation__Contain.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {} from '@finos/legend-graph';\nimport { DataCubeQueryFilterOperation, generateDefaultFilterConditionPrimitiveTypeValue, } from './DataCubeQueryFilterOperation.js';\nimport { DataCubeColumnDataType, DataCubeFunction, DataCubeQueryFilterOperator, ofDataType, } from '../DataCubeQueryEngine.js';\nimport { _function, _functionName, _property, _value, _var, } from '../DataCubeQueryBuilderUtils.js';\nimport { guaranteeNonNullable } from '@finos/legend-shared';\nexport class DataCubeQueryFilterOperation__ContainCaseInsensitive extends DataCubeQueryFilterOperation {\n get label() {\n return 'contains (case-insensitive)';\n }\n get textLabel() {\n return 'contains (case-insensitive)';\n }\n get description() {\n return 'contains (case-insensitive)';\n }\n get operator() {\n return DataCubeQueryFilterOperator.CONTAIN_CASE_INSENSITIVE;\n }\n isCompatibleWithColumn(column) {\n return ofDataType(column.type, [DataCubeColumnDataType.TEXT]);\n }\n isCompatibleWithValue(value) {\n return (ofDataType(value.type, [DataCubeColumnDataType.TEXT]) &&\n value.value !== undefined &&\n !Array.isArray(value.value));\n }\n generateDefaultValue(column) {\n return {\n type: column.type,\n value: generateDefaultFilterConditionPrimitiveTypeValue(column.type),\n };\n }\n buildConditionSnapshot(expression) {\n /** TODO: @datacube roundtrip */\n return undefined;\n }\n buildConditionExpression(condition) {\n const variable = _var();\n return _function(_functionName(DataCubeFunction.CONTAINS), [\n _function(_functionName(DataCubeFunction.TO_LOWERCASE), [\n _property(condition.name, variable),\n ]),\n _function(_functionName(DataCubeFunction.TO_LOWERCASE), [\n _value(guaranteeNonNullable(condition.value), variable),\n ]),\n ]);\n }\n}\n//# sourceMappingURL=DataCubeQueryFilterOperation__ContainCaseInsensitive.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {} from '@finos/legend-graph';\nimport { DataCubeQueryFilterOperation, generateDefaultFilterConditionPrimitiveTypeValue, } from './DataCubeQueryFilterOperation.js';\nimport { DataCubeColumnDataType, DataCubeFunction, DataCubeQueryFilterOperator, ofDataType, } from '../DataCubeQueryEngine.js';\nimport { _function, _functionName, _not, _property, _value, } from '../DataCubeQueryBuilderUtils.js';\nimport { guaranteeNonNullable } from '@finos/legend-shared';\nexport class DataCubeQueryFilterOperation__NotContain extends DataCubeQueryFilterOperation {\n get label() {\n return 'does not contain';\n }\n get textLabel() {\n return '!contains';\n }\n get description() {\n return 'does not contain';\n }\n get operator() {\n return DataCubeQueryFilterOperator.NOT_CONTAIN;\n }\n isCompatibleWithColumn(column) {\n return ofDataType(column.type, [DataCubeColumnDataType.TEXT]);\n }\n isCompatibleWithValue(value) {\n return (ofDataType(value.type, [DataCubeColumnDataType.TEXT]) &&\n value.value !== undefined &&\n !Array.isArray(value.value));\n }\n generateDefaultValue(column) {\n return {\n type: column.type,\n value: generateDefaultFilterConditionPrimitiveTypeValue(column.type),\n };\n }\n buildConditionSnapshot(expression) {\n /** TODO: @datacube roundtrip */\n return undefined;\n }\n buildConditionExpression(condition) {\n return _not(_function(_functionName(DataCubeFunction.CONTAINS), [\n _property(condition.name),\n _value(guaranteeNonNullable(condition.value)),\n ]));\n }\n}\n//# sourceMappingURL=DataCubeQueryFilterOperation__NotContain.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {} from '@finos/legend-graph';\nimport { DataCubeQueryFilterOperation, generateDefaultFilterConditionPrimitiveTypeValue, } from './DataCubeQueryFilterOperation.js';\nimport { DataCubeColumnDataType, DataCubeFunction, DataCubeQueryFilterOperator, ofDataType, } from '../DataCubeQueryEngine.js';\nimport { _function, _functionName, _property, _value, } from '../DataCubeQueryBuilderUtils.js';\nimport { guaranteeNonNullable } from '@finos/legend-shared';\nexport class DataCubeQueryFilterOperation__StartWith extends DataCubeQueryFilterOperation {\n get label() {\n return 'starts with';\n }\n get textLabel() {\n return 'startsWith';\n }\n get description() {\n return 'starts with';\n }\n get operator() {\n return DataCubeQueryFilterOperator.START_WITH;\n }\n isCompatibleWithColumn(column) {\n return ofDataType(column.type, [DataCubeColumnDataType.TEXT]);\n }\n isCompatibleWithValue(value) {\n return (ofDataType(value.type, [DataCubeColumnDataType.TEXT]) &&\n value.value !== undefined &&\n !Array.isArray(value.value));\n }\n generateDefaultValue(column) {\n return {\n type: column.type,\n value: generateDefaultFilterConditionPrimitiveTypeValue(column.type),\n };\n }\n buildConditionSnapshot(expression) {\n /** TODO: @datacube roundtrip */\n return undefined;\n }\n buildConditionExpression(condition) {\n return _function(_functionName(DataCubeFunction.STARTS_WITH), [\n _property(condition.name),\n _value(guaranteeNonNullable(condition.value)),\n ]);\n }\n}\n//# sourceMappingURL=DataCubeQueryFilterOperation__StartWith.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {} from '@finos/legend-graph';\nimport { DataCubeQueryFilterOperation, generateDefaultFilterConditionPrimitiveTypeValue, } from './DataCubeQueryFilterOperation.js';\nimport { DataCubeColumnDataType, DataCubeFunction, DataCubeQueryFilterOperator, ofDataType, } from '../DataCubeQueryEngine.js';\nimport { _function, _functionName, _property, _value, _var, } from '../DataCubeQueryBuilderUtils.js';\nimport { guaranteeNonNullable } from '@finos/legend-shared';\nexport class DataCubeQueryFilterOperation__StartWithCaseInsensitive extends DataCubeQueryFilterOperation {\n get label() {\n return 'starts with (case-insensitive)';\n }\n get textLabel() {\n return 'startsWith (case-insensitive)';\n }\n get description() {\n return 'starts with (case-insensitive)';\n }\n get operator() {\n return DataCubeQueryFilterOperator.START_WITH_CASE_INSENSITIVE;\n }\n isCompatibleWithColumn(column) {\n return ofDataType(column.type, [DataCubeColumnDataType.TEXT]);\n }\n isCompatibleWithValue(value) {\n return (ofDataType(value.type, [DataCubeColumnDataType.TEXT]) &&\n value.value !== undefined &&\n !Array.isArray(value.value));\n }\n generateDefaultValue(column) {\n return {\n type: column.type,\n value: generateDefaultFilterConditionPrimitiveTypeValue(column.type),\n };\n }\n buildConditionSnapshot(expression) {\n /** TODO: @datacube roundtrip */\n return undefined;\n }\n buildConditionExpression(condition) {\n const variable = _var();\n return _function(_functionName(DataCubeFunction.STARTS_WITH), [\n _function(_functionName(DataCubeFunction.TO_LOWERCASE), [\n _property(condition.name, variable),\n ]),\n _function(_functionName(DataCubeFunction.TO_LOWERCASE), [\n _value(guaranteeNonNullable(condition.value), variable),\n ]),\n ]);\n }\n}\n//# sourceMappingURL=DataCubeQueryFilterOperation__StartWithCaseInsensitive.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {} from '@finos/legend-graph';\nimport { DataCubeQueryFilterOperation, generateDefaultFilterConditionPrimitiveTypeValue, } from './DataCubeQueryFilterOperation.js';\nimport { DataCubeColumnDataType, DataCubeFunction, DataCubeQueryFilterOperator, ofDataType, } from '../DataCubeQueryEngine.js';\nimport { _function, _functionName, _not, _property, _value, } from '../DataCubeQueryBuilderUtils.js';\nimport { guaranteeNonNullable } from '@finos/legend-shared';\nexport class DataCubeQueryFilterOperation__NotStartWith extends DataCubeQueryFilterOperation {\n get label() {\n return 'doest not start with';\n }\n get textLabel() {\n return '!startsWith';\n }\n get description() {\n return 'does not start with';\n }\n get operator() {\n return DataCubeQueryFilterOperator.NOT_START_WITH;\n }\n isCompatibleWithColumn(column) {\n return ofDataType(column.type, [DataCubeColumnDataType.TEXT]);\n }\n isCompatibleWithValue(value) {\n return (ofDataType(value.type, [DataCubeColumnDataType.TEXT]) &&\n value.value !== undefined &&\n !Array.isArray(value.value));\n }\n generateDefaultValue(column) {\n return {\n type: column.type,\n value: generateDefaultFilterConditionPrimitiveTypeValue(column.type),\n };\n }\n buildConditionSnapshot(expression) {\n /** TODO: @datacube roundtrip */\n return undefined;\n }\n buildConditionExpression(condition) {\n return _not(_function(_functionName(DataCubeFunction.STARTS_WITH), [\n _property(condition.name),\n _value(guaranteeNonNullable(condition.value)),\n ]));\n }\n}\n//# sourceMappingURL=DataCubeQueryFilterOperation__NotStartWith.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {} from '@finos/legend-graph';\nimport { DataCubeQueryFilterOperation, generateDefaultFilterConditionPrimitiveTypeValue, } from './DataCubeQueryFilterOperation.js';\nimport { DataCubeColumnDataType, DataCubeFunction, DataCubeQueryFilterOperator, ofDataType, } from '../DataCubeQueryEngine.js';\nimport { _function, _functionName, _property, _value, } from '../DataCubeQueryBuilderUtils.js';\nimport { guaranteeNonNullable } from '@finos/legend-shared';\nexport class DataCubeQueryFilterOperation__EndWith extends DataCubeQueryFilterOperation {\n get label() {\n return 'ends with';\n }\n get textLabel() {\n return '!endsWith';\n }\n get description() {\n return 'ends with';\n }\n get operator() {\n return DataCubeQueryFilterOperator.END_WITH;\n }\n isCompatibleWithColumn(column) {\n return ofDataType(column.type, [DataCubeColumnDataType.TEXT]);\n }\n isCompatibleWithValue(value) {\n return (ofDataType(value.type, [DataCubeColumnDataType.TEXT]) &&\n value.value !== undefined &&\n !Array.isArray(value.value));\n }\n generateDefaultValue(column) {\n return {\n type: column.type,\n value: generateDefaultFilterConditionPrimitiveTypeValue(column.type),\n };\n }\n buildConditionSnapshot(expression) {\n /** TODO: @datacube roundtrip */\n return undefined;\n }\n buildConditionExpression(condition) {\n return _function(_functionName(DataCubeFunction.ENDS_WITH), [\n _property(condition.name),\n _value(guaranteeNonNullable(condition.value)),\n ]);\n }\n}\n//# sourceMappingURL=DataCubeQueryFilterOperation__EndWith.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {} from '@finos/legend-graph';\nimport { DataCubeQueryFilterOperation, generateDefaultFilterConditionPrimitiveTypeValue, } from './DataCubeQueryFilterOperation.js';\nimport { DataCubeColumnDataType, DataCubeFunction, DataCubeQueryFilterOperator, ofDataType, } from '../DataCubeQueryEngine.js';\nimport { _function, _functionName, _property, _value, _var, } from '../DataCubeQueryBuilderUtils.js';\nimport { guaranteeNonNullable } from '@finos/legend-shared';\nexport class DataCubeQueryFilterOperation__EndWithCaseInsensitive extends DataCubeQueryFilterOperation {\n get label() {\n return 'ends with (case-insensitive)';\n }\n get textLabel() {\n return 'endsWith (case-insensitive)';\n }\n get description() {\n return 'ends with (case-insensitive)';\n }\n get operator() {\n return DataCubeQueryFilterOperator.END_WITH_CASE_INSENSITIVE;\n }\n isCompatibleWithColumn(column) {\n return ofDataType(column.type, [DataCubeColumnDataType.TEXT]);\n }\n isCompatibleWithValue(value) {\n return (ofDataType(value.type, [DataCubeColumnDataType.TEXT]) &&\n value.value !== undefined &&\n !Array.isArray(value.value));\n }\n generateDefaultValue(column) {\n return {\n type: column.type,\n value: generateDefaultFilterConditionPrimitiveTypeValue(column.type),\n };\n }\n buildConditionSnapshot(expression) {\n /** TODO: @datacube roundtrip */\n return undefined;\n }\n buildConditionExpression(condition) {\n const variable = _var();\n return _function(_functionName(DataCubeFunction.ENDS_WITH), [\n _function(_functionName(DataCubeFunction.TO_LOWERCASE), [\n _property(condition.name, variable),\n ]),\n _function(_functionName(DataCubeFunction.TO_LOWERCASE), [\n _value(guaranteeNonNullable(condition.value), variable),\n ]),\n ]);\n }\n}\n//# sourceMappingURL=DataCubeQueryFilterOperation__EndWithCaseInsensitive.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {} from '@finos/legend-graph';\nimport { DataCubeQueryFilterOperation, generateDefaultFilterConditionPrimitiveTypeValue, } from './DataCubeQueryFilterOperation.js';\nimport { DataCubeColumnDataType, DataCubeFunction, DataCubeQueryFilterOperator, ofDataType, } from '../DataCubeQueryEngine.js';\nimport { _function, _functionName, _not, _property, _value, } from '../DataCubeQueryBuilderUtils.js';\nimport { guaranteeNonNullable } from '@finos/legend-shared';\nexport class DataCubeQueryFilterOperation__NotEndWith extends DataCubeQueryFilterOperation {\n get label() {\n return 'does not end with';\n }\n get textLabel() {\n return '!endsWith';\n }\n get description() {\n return 'does not end with';\n }\n get operator() {\n return DataCubeQueryFilterOperator.NOT_END_WITH;\n }\n isCompatibleWithColumn(column) {\n return ofDataType(column.type, [DataCubeColumnDataType.TEXT]);\n }\n isCompatibleWithValue(value) {\n return (ofDataType(value.type, [DataCubeColumnDataType.TEXT]) &&\n value.value !== undefined &&\n !Array.isArray(value.value));\n }\n generateDefaultValue(column) {\n return {\n type: column.type,\n value: generateDefaultFilterConditionPrimitiveTypeValue(column.type),\n };\n }\n buildConditionSnapshot(expression) {\n /** TODO: @datacube roundtrip */\n return undefined;\n }\n buildConditionExpression(condition) {\n return _not(_function(_functionName(DataCubeFunction.ENDS_WITH), [\n _property(condition.name),\n _value(guaranteeNonNullable(condition.value)),\n ]));\n }\n}\n//# sourceMappingURL=DataCubeQueryFilterOperation__NotEndWith.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {} from '@finos/legend-graph';\nimport { DataCubeQueryFilterOperation } from './DataCubeQueryFilterOperation.js';\nimport { DataCubeColumnDataType, DataCubeFunction, DataCubeQueryFilterOperator, ofDataType, } from '../DataCubeQueryEngine.js';\nimport { _function, _functionName, _property, } from '../DataCubeQueryBuilderUtils.js';\nexport class DataCubeQueryFilterOperation__IsNull extends DataCubeQueryFilterOperation {\n get label() {\n return 'is null';\n }\n get textLabel() {\n return '= NULL';\n }\n get description() {\n return 'is NULL';\n }\n get operator() {\n return DataCubeQueryFilterOperator.IS_NULL;\n }\n isCompatibleWithColumn(column) {\n return ofDataType(column.type, [\n DataCubeColumnDataType.TEXT,\n DataCubeColumnDataType.NUMBER,\n DataCubeColumnDataType.DATE,\n DataCubeColumnDataType.TIME,\n ]);\n }\n isCompatibleWithValue(value) {\n return (ofDataType(value.type, [\n DataCubeColumnDataType.TEXT,\n DataCubeColumnDataType.NUMBER,\n DataCubeColumnDataType.DATE,\n DataCubeColumnDataType.TIME,\n ]) &&\n value.value !== undefined &&\n !Array.isArray(value.value));\n }\n generateDefaultValue(column) {\n return undefined;\n }\n buildConditionSnapshot(expression) {\n /** TODO: @datacube roundtrip */\n return undefined;\n }\n buildConditionExpression(condition) {\n return _function(_functionName(DataCubeFunction.IS_EMPTY), [\n _property(condition.name),\n ]);\n }\n}\n//# sourceMappingURL=DataCubeQueryFilterOperation__IsNull.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {} from '@finos/legend-graph';\nimport { DataCubeQueryFilterOperation } from './DataCubeQueryFilterOperation.js';\nimport { DataCubeColumnDataType, DataCubeFunction, DataCubeQueryFilterOperator, ofDataType, } from '../DataCubeQueryEngine.js';\nimport { _function, _functionName, _not, _property, } from '../DataCubeQueryBuilderUtils.js';\nexport class DataCubeQueryFilterOperation__IsNotNull extends DataCubeQueryFilterOperation {\n get label() {\n return 'is not null';\n }\n get textLabel() {\n return '!= NULL';\n }\n get description() {\n return 'is not NULL';\n }\n get operator() {\n return DataCubeQueryFilterOperator.IS_NOT_NULL;\n }\n isCompatibleWithColumn(column) {\n return ofDataType(column.type, [\n DataCubeColumnDataType.TEXT,\n DataCubeColumnDataType.NUMBER,\n DataCubeColumnDataType.DATE,\n DataCubeColumnDataType.TIME,\n ]);\n }\n isCompatibleWithValue(value) {\n return (ofDataType(value.type, [\n DataCubeColumnDataType.TEXT,\n DataCubeColumnDataType.NUMBER,\n DataCubeColumnDataType.DATE,\n DataCubeColumnDataType.TIME,\n ]) &&\n value.value !== undefined &&\n !Array.isArray(value.value));\n }\n generateDefaultValue(column) {\n return undefined;\n }\n buildConditionSnapshot(expression) {\n /** TODO: @datacube roundtrip */\n return undefined;\n }\n buildConditionExpression(condition) {\n return _not(_function(_functionName(DataCubeFunction.IS_EMPTY), [\n _property(condition.name),\n ]));\n }\n}\n//# sourceMappingURL=DataCubeQueryFilterOperation__IsNotNull.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport var PURE_GRAMMAR_TOKEN;\n(function (PURE_GRAMMAR_TOKEN) {\n PURE_GRAMMAR_TOKEN[\"WHITESPACE\"] = \"\";\n PURE_GRAMMAR_TOKEN[\"KEYWORD\"] = \"keyword\";\n PURE_GRAMMAR_TOKEN[\"IDENTIFIER\"] = \"identifier\";\n PURE_GRAMMAR_TOKEN[\"OPERATOR\"] = \"operator\";\n PURE_GRAMMAR_TOKEN[\"DELIMITER\"] = \"delimiter\";\n PURE_GRAMMAR_TOKEN[\"PARSER\"] = \"parser\";\n PURE_GRAMMAR_TOKEN[\"NUMBER\"] = \"number\";\n PURE_GRAMMAR_TOKEN[\"DATE\"] = \"date\";\n PURE_GRAMMAR_TOKEN[\"COLOR\"] = \"color\";\n PURE_GRAMMAR_TOKEN[\"PACKAGE\"] = \"package\";\n PURE_GRAMMAR_TOKEN[\"STRING\"] = \"string\";\n PURE_GRAMMAR_TOKEN[\"COMMENT\"] = \"comment\";\n PURE_GRAMMAR_TOKEN[\"LANGUAGE_STRUCT\"] = \"language-struct\";\n PURE_GRAMMAR_TOKEN[\"MULTIPLICITY\"] = \"multiplicity\";\n PURE_GRAMMAR_TOKEN[\"GENERICS\"] = \"generics\";\n PURE_GRAMMAR_TOKEN[\"PROPERTY\"] = \"property\";\n PURE_GRAMMAR_TOKEN[\"PARAMETER\"] = \"parameter\";\n PURE_GRAMMAR_TOKEN[\"VARIABLE\"] = \"variable\";\n PURE_GRAMMAR_TOKEN[\"TYPE\"] = \"type\";\n PURE_GRAMMAR_TOKEN[\"INVALID\"] = \"invalid\";\n})(PURE_GRAMMAR_TOKEN || (PURE_GRAMMAR_TOKEN = {}));\n//# sourceMappingURL=PureLanguage.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { getNonNullableEntry, isNonNullable, isString, } from '@finos/legend-shared';\nconst parseVSCodeTheme = (rawData) => {\n const rules = [];\n rawData.tokenColors.forEach((tokenColor) => {\n if (!tokenColor.settings) {\n return;\n }\n let scopes = [];\n if (isString(tokenColor.scope)) {\n scopes = tokenColor.scope\n .replace(/^[,]+/, '')\n .replace(/[,]+$/, '')\n .split(',')\n .map((scope) => scope.trim());\n }\n else if (Array.isArray(tokenColor.scope)) {\n scopes = tokenColor.scope;\n }\n else {\n scopes = [''];\n }\n const baseRule = {};\n if (tokenColor.settings.foreground &&\n isString(tokenColor.settings.foreground)) {\n baseRule.foreground = tokenColor.settings.foreground;\n }\n if (tokenColor.settings.background &&\n isString(tokenColor.settings.background)) {\n baseRule.background = tokenColor.settings.background;\n }\n if (tokenColor.settings.fontStyle &&\n isString(tokenColor.settings.fontStyle)) {\n baseRule.fontStyle = tokenColor.settings.fontStyle;\n }\n scopes.forEach((scope) => {\n if (isNonNullable(scope) || !Object.keys(baseRule).length) {\n return;\n }\n const rule = {\n ...baseRule,\n token: scope,\n };\n rules.push(rule);\n });\n });\n const colors = {};\n Object.entries(rawData.colors).forEach(([key, value]) => {\n if (Array.isArray(value)) {\n if (value.length) {\n colors[key] = getNonNullableEntry(value, 0);\n }\n }\n else {\n colors[key] = value;\n }\n });\n return {\n base: 'vs-dark',\n inherit: true,\n rules: rules,\n colors,\n };\n};\nexport const buildCodeEditorTheme = (vscodeThemeData, baseTheme, colorsOverride, rulesOverride) => {\n const baseThemeData = parseVSCodeTheme(vscodeThemeData);\n return {\n ...baseThemeData,\n base: baseTheme,\n colors: { ...baseThemeData.colors, ...colorsOverride },\n rules: [...baseThemeData.rules, ...rulesOverride],\n };\n};\n//# sourceMappingURL=MonacoEditorThemeUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { PURE_GRAMMAR_TOKEN } from './PureLanguage.js';\nimport { buildCodeEditorTheme } from './themes/MonacoEditorThemeUtils.js';\nimport SOLARIZED_DARK_THEME_DATA from './themes/solarized-dark-color-theme.json' with { type: 'json' };\nimport GITHUB_DARK_THEME_DATA from './themes/Github-Theme-dark.json' with { type: 'json' };\nimport GITHUB_DARK_DIMMED_THEME_DATA from './themes/Github-Theme-dark-dimmed.json' with { type: 'json' };\nimport GITHUB_LIGHT_THEME_DATA from './themes/Github-Theme-light.json' with { type: 'json' };\nimport MATERIAL_DEFAULT_THEME_DATA from './themes/Material-Theme-Default.json' with { type: 'json' };\nimport MATERIAL_DARKER_THEME_DATA from './themes/Material-Theme-Darker.json' with { type: 'json' };\nimport ONE_DARK_PRO_THEME_DATA from './themes/OneDark-Pro.json' with { type: 'json' };\nimport ONE_DARK_PRO_DARKER_THEME_DATA from './themes/OneDark-Pro-darker.json' with { type: 'json' };\nconst BASE_PURE_LANGUAGE_COLOR_TOKENS = [\n // NOTE: `monaco-editor` only accepts HEX values, not CSS variables\n { token: PURE_GRAMMAR_TOKEN.IDENTIFIER, foreground: 'dcdcaa' },\n { token: PURE_GRAMMAR_TOKEN.NUMBER, foreground: 'b5cea8' },\n { token: PURE_GRAMMAR_TOKEN.DATE, foreground: 'b5cea8' },\n { token: PURE_GRAMMAR_TOKEN.COLOR, foreground: 'b5cea8' },\n { token: PURE_GRAMMAR_TOKEN.PACKAGE, foreground: '808080' },\n { token: PURE_GRAMMAR_TOKEN.PARSER, foreground: 'c586c0' },\n { token: PURE_GRAMMAR_TOKEN.LANGUAGE_STRUCT, foreground: 'c586c0' },\n { token: PURE_GRAMMAR_TOKEN.MULTIPLICITY, foreground: '2d796b' },\n { token: PURE_GRAMMAR_TOKEN.GENERICS, foreground: '2d796b' },\n { token: PURE_GRAMMAR_TOKEN.PROPERTY, foreground: '9cdcfe' },\n { token: PURE_GRAMMAR_TOKEN.PARAMETER, foreground: '9cdcfe' },\n { token: PURE_GRAMMAR_TOKEN.VARIABLE, foreground: '4fc1ff' },\n { token: PURE_GRAMMAR_TOKEN.TYPE, foreground: '3dc9b0' },\n { token: `${PURE_GRAMMAR_TOKEN.STRING}.escape`, foreground: 'd7ba7d' },\n];\nexport var CODE_EDITOR_THEME;\n(function (CODE_EDITOR_THEME) {\n CODE_EDITOR_THEME[\"DEFAULT_DARK\"] = \"default-dark\";\n CODE_EDITOR_THEME[\"GITHUB_LIGHT\"] = \"github-light\";\n CODE_EDITOR_THEME[\"GITHUB_DARK\"] = \"github-dark\";\n CODE_EDITOR_THEME[\"GITHUB_DARK_DIMMED\"] = \"github-dark-dimmed\";\n CODE_EDITOR_THEME[\"SOLARIZED_DARK\"] = \"solarized-dark\";\n CODE_EDITOR_THEME[\"ONE_DARK_PRO\"] = \"one-dark-pro\";\n CODE_EDITOR_THEME[\"ONE_DARK_PRO_DARKER\"] = \"one-dark-pro-darker\";\n CODE_EDITOR_THEME[\"MATERIAL_DEFAULT\"] = \"material-default\";\n CODE_EDITOR_THEME[\"MATERIAL_DARKER\"] = \"material-darker\";\n // default themes in Monaco editor\n // See https://github.com/microsoft/vscode/blob/main/src/vs/editor/standalone/common/themes.ts\n CODE_EDITOR_THEME[\"BUILT_IN__VSCODE_LIGHT\"] = \"vs\";\n CODE_EDITOR_THEME[\"BUILT_IN__VSCODE_DARK\"] = \"vs-dark\";\n CODE_EDITOR_THEME[\"BUILT_IN__VSCODE_HC_BLACK\"] = \"hc-black\";\n CODE_EDITOR_THEME[\"BUILT_IN__VSCODE_HC_LIGHT\"] = \"hc-light\";\n})(CODE_EDITOR_THEME || (CODE_EDITOR_THEME = {}));\nexport const DEFAULT_DARK_THEME = {\n base: 'vs-dark',\n inherit: true,\n colors: {},\n rules: [\n ...BASE_PURE_LANGUAGE_COLOR_TOKENS,\n // NOTE: correct a problem with syntax highlighting of string in SQL\n { token: 'string.sql', foreground: 'ce9178' },\n { token: 'white.sql', foreground: 'd4d4d4' },\n { token: 'identifier.sql', foreground: 'd4d4d4' },\n { token: 'operator.sql', foreground: 'd4d4d4' },\n ],\n};\nexport const SOLARIZED_DARK_THEME = buildCodeEditorTheme(SOLARIZED_DARK_THEME_DATA, CODE_EDITOR_THEME.BUILT_IN__VSCODE_DARK, {}, []);\nexport const GITHUB_DARK_THEME = buildCodeEditorTheme(GITHUB_DARK_THEME_DATA, CODE_EDITOR_THEME.BUILT_IN__VSCODE_DARK, {}, []);\nexport const GITHUB_LIGHT_THEME = buildCodeEditorTheme(GITHUB_LIGHT_THEME_DATA, CODE_EDITOR_THEME.BUILT_IN__VSCODE_LIGHT, {}, [\n// NOTE: `monaco-editor` only accepts HEX values, not CSS variables\n// { token: PURE_GRAMMAR_TOKEN.IDENTIFIER, foreground: '000000' },\n// { token: PURE_GRAMMAR_TOKEN.NUMBER, foreground: 'b5cea8' },\n// { token: PURE_GRAMMAR_TOKEN.DATE, foreground: 'b5cea8' },\n// { token: PURE_GRAMMAR_TOKEN.COLOR, foreground: 'b5cea8' },\n// { token: PURE_GRAMMAR_TOKEN.PACKAGE, foreground: '808080' },\n// { token: PURE_GRAMMAR_TOKEN.PARSER, foreground: 'c586c0' },\n// { token: PURE_GRAMMAR_TOKEN.LANGUAGE_STRUCT, foreground: 'c586c0' },\n// { token: PURE_GRAMMAR_TOKEN.MULTIPLICITY, foreground: '2d796b' },\n// { token: PURE_GRAMMAR_TOKEN.GENERICS, foreground: '2d796b' },\n// { token: PURE_GRAMMAR_TOKEN.PROPERTY, foreground: '9cdcfe' },\n// { token: PURE_GRAMMAR_TOKEN.PARAMETER, foreground: '9cdcfe' },\n// { token: PURE_GRAMMAR_TOKEN.VARIABLE, foreground: '4fc1ff' },\n// { token: PURE_GRAMMAR_TOKEN.TYPE, foreground: '3dc9b0' },\n// { token: `${PURE_GRAMMAR_TOKEN.STRING}.escape`, foreground: 'd7ba7d' },\n// TODO: handle SQL formatting like in dark theme?\n]);\nexport const GITHUB_DARK_DIMMED_THEME = buildCodeEditorTheme(GITHUB_DARK_DIMMED_THEME_DATA, CODE_EDITOR_THEME.BUILT_IN__VSCODE_DARK, {}, []);\nexport const MATERIAL_DEFAULT_THEME = buildCodeEditorTheme(MATERIAL_DEFAULT_THEME_DATA, CODE_EDITOR_THEME.BUILT_IN__VSCODE_DARK, {}, []);\nexport const MATERIAL_DARKER_THEME = buildCodeEditorTheme(MATERIAL_DARKER_THEME_DATA, CODE_EDITOR_THEME.BUILT_IN__VSCODE_DARK, {}, []);\nexport const ONE_DARK_PRO_THEME = buildCodeEditorTheme(ONE_DARK_PRO_THEME_DATA, CODE_EDITOR_THEME.BUILT_IN__VSCODE_DARK, {}, []);\nexport const ONE_DARK_PRO_DARKER_THEME = buildCodeEditorTheme(ONE_DARK_PRO_DARKER_THEME_DATA, CODE_EDITOR_THEME.BUILT_IN__VSCODE_DARK, {}, []);\n//# sourceMappingURL=CodeEditorTheme.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { editor as monacoEditorAPI, MarkerSeverity } from 'monaco-editor';\nimport { CODE_EDITOR_THEME, DEFAULT_DARK_THEME, GITHUB_DARK_DIMMED_THEME, GITHUB_DARK_THEME, GITHUB_LIGHT_THEME, MATERIAL_DARKER_THEME, MATERIAL_DEFAULT_THEME, ONE_DARK_PRO_DARKER_THEME, ONE_DARK_PRO_THEME, SOLARIZED_DARK_THEME, } from './CodeEditorTheme.js';\n/**\n * Get the text value with LF line ending.\n * This is needed since if there are CR `\\r` characters in the text input\n * (e.g. users of Windows doing copy/paste)\n * the default mode of `monaco-editor` is `TextDefined` which means if the text\n * contains CR character(s), it will automatically be treated as CRLF. As such, we want\n * an utility method to extract the text value with line ending option LF\n * to force omission of CR characters\n * See https://github.com/finos/legend-studio/issues/608\n */\nexport const getCodeEditorValue = (editor) => editor.getModel()?.getValue(monacoEditorAPI.EndOfLinePreference.LF) ?? '';\nexport const getBaseCodeEditorOptions = () => ({\n contextmenu: false,\n copyWithSyntaxHighlighting: false,\n // NOTE: These following font options are needed (and CSS font-size option `.monaco-editor * { font-size: ... }` as well)\n // in order to make the editor appear properly on multiple platform, the ligatures option is needed for Mac to display properly\n // otherwise the cursor position relatively to text would be off\n // Another potential cause for this misaligment is that the fonts are being lazy-loaded and made available after `monaco-editor`\n // calculated the font-width, for this, we can use `remeasureFonts`, but our case here, `fontLigatures: true` seems\n // to do the trick\n // See https://github.com/microsoft/monaco-editor/issues/392\n fontSize: 14,\n // Enforce a fixed font-family to make cross platform display consistent (i.e. Mac defaults to use `Menlo` which is bigger than\n // `Consolas` on Windows, etc.)\n fontFamily: 'Roboto Mono',\n // Enable font ligature: glyphs which combine the shapes of certain sequences of characters into a new form that makes for\n // a more harmonious reading experience.\n fontLigatures: true,\n // Make sure hover or widget shown near boundary are not truncated by setting their position to `fixed`\n fixedOverflowWidgets: true,\n detectIndentation: false, // i.e. so we can force tab-size\n tabSize: 2,\n // The typing is currently not correct for `bracketPairColorization`, until this is fixed, we will remove the cast\n // See https://github.com/microsoft/monaco-editor/issues/3013\n 'bracketPairColorization.enabled': false,\n automaticLayout: true,\n});\nexport const moveCursorToPosition = (editor, position) => {\n if (!editor.hasTextFocus()) {\n editor.focus();\n } // focus the editor first so that it can shows the cursor\n editor.revealPositionInCenter(position, 0);\n editor.setPosition(position);\n};\nconst INTERNAL__DUMMY_PROBLEM_MARKER_OWNER = 'dummy_problem_marker_owner';\nexport const setErrorMarkers = (editorModel, errors, ownerId) => {\n monacoEditorAPI.setModelMarkers(editorModel, ownerId ?? INTERNAL__DUMMY_PROBLEM_MARKER_OWNER, errors.map((error) => ({\n startLineNumber: error.startLineNumber,\n startColumn: error.startColumn,\n endLineNumber: error.endLineNumber,\n endColumn: error.endColumn + 1, // add a 1 to endColumn as monaco editor range is not inclusive\n // NOTE: when the message is empty, no error tooltip is shown, we want to avoid this\n message: error.message === '' ? '(no error message)' : error.message,\n severity: MarkerSeverity.Error,\n })));\n};\nexport const setWarningMarkers = (editorModel, warnings, ownerId) => {\n monacoEditorAPI.setModelMarkers(editorModel, ownerId ?? INTERNAL__DUMMY_PROBLEM_MARKER_OWNER, warnings.map((warning) => ({\n startLineNumber: warning.startLineNumber,\n startColumn: warning.startColumn,\n endColumn: warning.endColumn,\n endLineNumber: warning.endLineNumber,\n message: warning.message === '' ? '(no warning message)' : warning.message,\n severity: MarkerSeverity.Warning,\n })));\n};\nexport const clearMarkers = (ownerId) => {\n monacoEditorAPI.removeAllMarkers(ownerId ?? INTERNAL__DUMMY_PROBLEM_MARKER_OWNER);\n};\n/**\n * This method eliminates CR '\\r' character(s) in the provided text value.\n */\nexport const normalizeLineEnding = (val) => val.replace(/\\r/g, '');\n// We need to dynamically adjust the width of the line number gutter, otherwise as the document gets\n// larger, the left margin will start to shrink\n// See https://github.com/microsoft/monaco-editor/issues/2206\nexport const resetLineNumberGutterWidth = (editor) => {\n const currentValue = editor.getValue();\n editor.updateOptions({\n lineNumbersMinChars: Math.max(Math.floor(Math.log10(currentValue.split(/\\r\\n|\\r|\\n/g).length)) + 3, 5),\n });\n};\nexport const configureCodeEditor = async (fontFamily, onError) => {\n // themes\n monacoEditorAPI.defineTheme(CODE_EDITOR_THEME.DEFAULT_DARK, DEFAULT_DARK_THEME);\n monacoEditorAPI.defineTheme(CODE_EDITOR_THEME.SOLARIZED_DARK, SOLARIZED_DARK_THEME);\n monacoEditorAPI.defineTheme(CODE_EDITOR_THEME.GITHUB_DARK, GITHUB_DARK_THEME);\n monacoEditorAPI.defineTheme(CODE_EDITOR_THEME.GITHUB_DARK_DIMMED, GITHUB_DARK_DIMMED_THEME);\n monacoEditorAPI.defineTheme(CODE_EDITOR_THEME.GITHUB_LIGHT, GITHUB_LIGHT_THEME);\n monacoEditorAPI.defineTheme(CODE_EDITOR_THEME.MATERIAL_DEFAULT, MATERIAL_DEFAULT_THEME);\n monacoEditorAPI.defineTheme(CODE_EDITOR_THEME.MATERIAL_DARKER, MATERIAL_DARKER_THEME);\n monacoEditorAPI.defineTheme(CODE_EDITOR_THEME.ONE_DARK_PRO, ONE_DARK_PRO_THEME);\n monacoEditorAPI.defineTheme(CODE_EDITOR_THEME.ONE_DARK_PRO_DARKER, ONE_DARK_PRO_DARKER_THEME);\n /**\n * Since we use a custom fonts for text-editor, we want to make sure the font is loaded before any text-editor is opened\n * this is to ensure\n */\n const fontLoadFailureErrorMessage = `Monospaced font '${fontFamily}' has not been loaded properly, code editor might not display properly`;\n await Promise.all([400, 700].map((weight) => document.fonts.load(`${weight} 1em ${fontFamily}`)))\n .then(() => {\n if (document.fonts.check(`1em ${fontFamily}`)) {\n monacoEditorAPI.remeasureFonts();\n }\n else {\n onError(new Error(fontLoadFailureErrorMessage));\n }\n })\n .catch(() => onError(new Error(fontLoadFailureErrorMessage)));\n};\nexport var CODE_EDITOR_LANGUAGE;\n(function (CODE_EDITOR_LANGUAGE) {\n CODE_EDITOR_LANGUAGE[\"TEXT\"] = \"plaintext\";\n CODE_EDITOR_LANGUAGE[\"PURE\"] = \"pure\";\n CODE_EDITOR_LANGUAGE[\"JSON\"] = \"json\";\n CODE_EDITOR_LANGUAGE[\"JAVA\"] = \"java\";\n CODE_EDITOR_LANGUAGE[\"MARKDOWN\"] = \"markdown\";\n CODE_EDITOR_LANGUAGE[\"SQL\"] = \"sql\";\n CODE_EDITOR_LANGUAGE[\"XML\"] = \"xml\";\n CODE_EDITOR_LANGUAGE[\"YAML\"] = \"yaml\";\n CODE_EDITOR_LANGUAGE[\"GRAPHQL\"] = \"graphql\";\n})(CODE_EDITOR_LANGUAGE || (CODE_EDITOR_LANGUAGE = {}));\n//# sourceMappingURL=CodeEditorUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DATE_FORMAT, ELEMENT_PATH_DELIMITER, MULTIPLICITY_INFINITE, MULTIPLICITY_RANGE_OPERATOR, PRIMITIVE_TYPE, } from '../MetaModelConst.js';\nimport { PrimitiveType } from '../metamodel/pure/packageableElements/domain/PrimitiveType.js';\nimport { Enumeration } from '../metamodel/pure/packageableElements/domain/Enumeration.js';\nimport { formatDate } from '@finos/legend-shared';\nexport var PURE_ELEMENT_NAME;\n(function (PURE_ELEMENT_NAME) {\n PURE_ELEMENT_NAME[\"PROFILE\"] = \"Profile\";\n PURE_ELEMENT_NAME[\"CLASS\"] = \"Class\";\n PURE_ELEMENT_NAME[\"ENUMERATION\"] = \"Enum\";\n PURE_ELEMENT_NAME[\"MEASURE\"] = \"Measure\";\n PURE_ELEMENT_NAME[\"ASSOCIATION\"] = \"Association\";\n PURE_ELEMENT_NAME[\"FUNCTION\"] = \"function\";\n PURE_ELEMENT_NAME[\"MAPPING\"] = \"Mapping\";\n PURE_ELEMENT_NAME[\"FLAT_DATA\"] = \"FlatData\";\n PURE_ELEMENT_NAME[\"DATABASE\"] = \"Database\";\n PURE_ELEMENT_NAME[\"SERVICE\"] = \"Service\";\n PURE_ELEMENT_NAME[\"RUNTIME\"] = \"Runtime\";\n PURE_ELEMENT_NAME[\"CONNECTION\"] = \"Connection\";\n PURE_ELEMENT_NAME[\"FILE_GENERATION\"] = \"FileGeneration\";\n PURE_ELEMENT_NAME[\"GENERATION_SPECIFICATION\"] = \"GenerationSpecification\";\n PURE_ELEMENT_NAME[\"DATA_ELEMENT\"] = \"Data\";\n PURE_ELEMENT_NAME[\"EXECUTION_ENVIRONMENT\"] = \"ExecutionEnvironment\";\n})(PURE_ELEMENT_NAME || (PURE_ELEMENT_NAME = {}));\nexport var PURE_CONNECTION_NAME;\n(function (PURE_CONNECTION_NAME) {\n PURE_CONNECTION_NAME[\"JSON_MODEL_CONNECTION\"] = \"JsonModelConnection\";\n PURE_CONNECTION_NAME[\"XML_MODEL_CONNECTION\"] = \"XmlModelConnection\";\n PURE_CONNECTION_NAME[\"MODEL_CHAIN_CONNECTION\"] = \"ModelChainConnection\";\n PURE_CONNECTION_NAME[\"RELATIONAL_DATABASE_CONNECTION\"] = \"RelationalDatabaseConnection\";\n PURE_CONNECTION_NAME[\"FLAT_DATA_CONNECTION\"] = \"FlatDataConnection\";\n})(PURE_CONNECTION_NAME || (PURE_CONNECTION_NAME = {}));\nexport var PURE_PARSER;\n(function (PURE_PARSER) {\n PURE_PARSER[\"PURE\"] = \"Pure\";\n PURE_PARSER[\"CONNECTION\"] = \"Connection\";\n PURE_PARSER[\"RUNTIME\"] = \"Runtime\";\n PURE_PARSER[\"MAPPING\"] = \"Mapping\";\n PURE_PARSER[\"SERVICE\"] = \"Service\";\n PURE_PARSER[\"FLATDATA\"] = \"FlatData\";\n PURE_PARSER[\"RELATIONAL\"] = \"Relational\";\n PURE_PARSER[\"GENERATION_SPECIFICATION\"] = \"GenerationSpecification\";\n PURE_PARSER[\"FILE_GENERATION_SPECIFICATION\"] = \"FileGeneration\";\n PURE_PARSER[\"DATA\"] = \"Data\";\n})(PURE_PARSER || (PURE_PARSER = {}));\nexport const generateMultiplicityString = (lowerBound, upperBound) => {\n if (lowerBound === upperBound) {\n return lowerBound.toString();\n }\n else if (lowerBound === 0 && upperBound === undefined) {\n return MULTIPLICITY_INFINITE;\n }\n return `${lowerBound}${MULTIPLICITY_RANGE_OPERATOR}${upperBound ?? MULTIPLICITY_INFINITE}`;\n};\nexport const generateDefaultParameterValueForType = (type, index) => {\n if (!type) {\n return `param${index}`;\n }\n if (type instanceof Enumeration) {\n return type.values.length !== 0\n ? `${type.path}.${type.values[0]?.name}`\n : `param${index}`;\n }\n else if (type instanceof PrimitiveType) {\n switch (type.name) {\n case PRIMITIVE_TYPE.BOOLEAN:\n return true;\n case PRIMITIVE_TYPE.FLOAT:\n case PRIMITIVE_TYPE.DECIMAL:\n return 0.0;\n case PRIMITIVE_TYPE.NUMBER:\n case PRIMITIVE_TYPE.INTEGER:\n return 0;\n case PRIMITIVE_TYPE.DATE:\n case PRIMITIVE_TYPE.STRICTDATE:\n return `%${formatDate(new Date(), DATE_FORMAT)}`;\n case PRIMITIVE_TYPE.DATETIME:\n return `%${formatDate(new Date(), DATE_FORMAT)}T00:00:00`;\n case PRIMITIVE_TYPE.STRICTTIME:\n return `%00:00:00`;\n case PRIMITIVE_TYPE.STRING:\n return \"''\";\n default:\n return `param${index}`;\n }\n }\n // Other non-primitive types, e.g. Class\n return `param${index}`;\n};\nexport const generateFunctionCallString = (element) => {\n let lambdaString = '';\n if (element.parameters.length > 0) {\n for (let i = 0; i < element.parameters.length; i++) {\n const paramType = element.parameters[i]?.type.value;\n const separator = i !== element.parameters.length - 1 ? ', ' : '';\n lambdaString =\n lambdaString +\n generateDefaultParameterValueForType(paramType, i) +\n separator;\n }\n }\n return `${element.package?.path}${ELEMENT_PATH_DELIMITER}${element.functionName}(${lambdaString})`;\n};\nexport const generateFunctionCallStringFromFunctionAnalysisInfo = (graph, functionInfo) => {\n let lambdaString = '';\n const parameterLength = functionInfo.parameterInfoList.length;\n if (parameterLength > 0) {\n for (let i = 0; i < parameterLength; i++) {\n let paramType;\n if (functionInfo.parameterInfoList[i] !== undefined) {\n try {\n paramType = graph.getType(functionInfo.parameterInfoList[i].type);\n }\n catch {\n // graph might not contain classes used as type, set it to undefine\n }\n }\n const separator = i !== parameterLength - 1 ? ', ' : '';\n lambdaString =\n lambdaString +\n generateDefaultParameterValueForType(paramType, i) +\n separator;\n }\n }\n return `${functionInfo.packagePath}${ELEMENT_PATH_DELIMITER}${functionInfo.functionName}(${lambdaString})`;\n};\nexport const generateFunctionPrettyName = (element, options) => `${options?.fullPath ? `${element.package?.path}${ELEMENT_PATH_DELIMITER}` : ''}${element.functionName}(${element.parameters\n .map((p) => !options?.notIncludeParamName\n ? `${p.name}: ${p.type.value.name}[${generateMultiplicityString(p.multiplicity.lowerBound, p.multiplicity.upperBound)}]`\n : `${p.type.value.name}[${generateMultiplicityString(p.multiplicity.lowerBound, p.multiplicity.upperBound)}]`)\n .join(', ')}): ${element.returnType.value.name}[${generateMultiplicityString(element.returnMultiplicity.lowerBound, element.returnMultiplicity.upperBound)}]`.replaceAll(/\\s*/gu, (val) => {\n if (options?.spacing) {\n return val;\n }\n return '';\n});\n//# sourceMappingURL=PureLanguageHelper.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/* eslint-disable prefer-named-capture-group */\nimport { PURE_ELEMENT_NAME, PURE_CONNECTION_NAME } from '@finos/legend-graph';\nimport { languages as monacoLanguagesAPI } from 'monaco-editor';\nimport { PURE_GRAMMAR_TOKEN } from './PureLanguage.js';\nimport { CODE_EDITOR_LANGUAGE } from './CodeEditorUtils.js';\n/**\n * The postfix to be added to all token types, i.e. identifier.pure, number.pure, etc.\n */\nconst PURE_GRAMMAR_TOKEN_POSTFIX = '.pure';\n// Taken from `monaco-languages` configuration for Java in order to do propert brace matching\n// See https://github.com/microsoft/monaco-languages/blob/master/src/java/java.ts\nconst configuration = {\n // NOTE: Pure identifier includes $ but not in the first position (as that is parsed as a variable)\n wordPattern: /(-?\\d*\\.\\d\\w*)|([^`~!@#%^$&*()\\-=+[{\\]}\\\\|;:'\",.<>/?\\s][^`~!@#%^&*()\\-=+[{\\]}\\\\|;:'\",.<>/?\\s]*)/,\n comments: {\n lineComment: '//',\n blockComment: ['/*', '*/'],\n },\n brackets: [\n ['{', '}'],\n ['[', ']'],\n ['(', ')'],\n ],\n autoClosingPairs: [\n { open: '{', close: '}' },\n { open: '[', close: ']' },\n { open: '(', close: ')' },\n { open: '\"', close: '\"' },\n { open: \"'\", close: \"'\" },\n ],\n surroundingPairs: [\n { open: '{', close: '}' },\n { open: '[', close: ']' },\n { open: '(', close: ')' },\n { open: '\"', close: '\"' },\n { open: \"'\", close: \"'\" },\n { open: '<', close: '>' },\n { open: '<<', close: '>>' },\n ],\n folding: {\n markers: {\n start: new RegExp('^\\\\s*//\\\\s*(?:(?:#?region\\\\b)|(?:<editor-fold\\\\b))'),\n end: new RegExp('^\\\\s*//\\\\s*(?:(?:#?endregion\\\\b)|(?:</editor-fold>))'),\n },\n },\n};\n/**\n * Create new monarch definition to support syntax-highlighting\n * See https://microsoft.github.io/monaco-editor/monarch.html\n *\n * The way SQL monarch definition is organized is good and worth learning from\n * See https://github.com/microsoft/monaco-languages/blob/master/src/sql/sql.ts\n *\n * NOTE: using `monarch` only allows fairly very basic syntax-highlighting\n * to actually do full AST analysis, we might need something more serious like\n * using TextMate grammar which is used by VSCode itself\n * See https://github.com/microsoft/monaco-editor#faq\n * See https://code.visualstudio.com/api/language-extensions/syntax-highlight-guide\n */\nconst generateLanguageMonarch = (extraKeywords) => \n// TODO: complete syntax-highlighter for core features like constraint, derived properties, etc.\n// TODO: add syntax highlighting for modules/plugins (come up with a plugin mechanism to do this).\n({\n defaultToken: 'invalid',\n tokenPostfix: PURE_GRAMMAR_TOKEN_POSTFIX,\n keywords: [\n ...extraKeywords,\n // relational\n 'Schema',\n 'Table',\n 'Join',\n 'View',\n 'primaryKey',\n 'groupBy',\n 'mainTable',\n // native\n 'let',\n 'extends',\n 'true',\n 'false',\n 'projects',\n // elements\n PURE_ELEMENT_NAME.CLASS,\n PURE_ELEMENT_NAME.ASSOCIATION,\n PURE_ELEMENT_NAME.ENUMERATION,\n PURE_ELEMENT_NAME.MEASURE,\n PURE_ELEMENT_NAME.PROFILE,\n PURE_ELEMENT_NAME.FUNCTION,\n PURE_ELEMENT_NAME.MAPPING,\n PURE_ELEMENT_NAME.RUNTIME,\n PURE_ELEMENT_NAME.CONNECTION,\n PURE_ELEMENT_NAME.FILE_GENERATION,\n PURE_ELEMENT_NAME.GENERATION_SPECIFICATION,\n PURE_ELEMENT_NAME.DATA_ELEMENT,\n // connections\n PURE_CONNECTION_NAME.JSON_MODEL_CONNECTION,\n PURE_CONNECTION_NAME.MODEL_CHAIN_CONNECTION,\n PURE_CONNECTION_NAME.XML_MODEL_CONNECTION,\n // mapping\n 'include',\n 'EnumerationMapping',\n 'Pure',\n 'AssociationMapping',\n 'XStore',\n 'AggregationAware',\n /**\n * @modularize\n * See https://github.com/finos/legend-studio/issues/65\n */\n PURE_ELEMENT_NAME.SERVICE,\n PURE_ELEMENT_NAME.FLAT_DATA,\n PURE_ELEMENT_NAME.DATABASE,\n PURE_CONNECTION_NAME.FLAT_DATA_CONNECTION,\n PURE_CONNECTION_NAME.RELATIONAL_DATABASE_CONNECTION,\n 'Relational',\n ],\n operators: [\n '=',\n '>',\n '<',\n '!',\n '~',\n '?',\n ':',\n '==',\n '<=',\n '>=',\n '&&',\n '||',\n '++',\n '--',\n '+',\n '-',\n '*',\n '/',\n '&',\n '|',\n '^',\n '%',\n '->',\n '#{',\n '}#',\n '@',\n '<<',\n '>>',\n ],\n languageStructs: ['import', 'native'],\n // common regular expressions to be used in tokenizer\n identifier: /[a-zA-Z_$][\\w$]*/,\n symbols: /[=><!~?:&|+\\-*/^%#@]+/,\n escapes: /\\\\(?:[abfnrtv\\\\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,\n digits: /\\d+(_+\\d+)*/,\n octaldigits: /[0-7]+(_+[0-7]+)*/,\n binarydigits: /[0-1]+(_+[0-1]+)*/,\n hexdigits: /[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,\n multiplicity: /\\[(?:[a-zA-Z0-9]+(?:\\.\\.(?:[a-zA-Z0-9]+|\\*|))?|\\*)\\]/,\n package: /(?:[\\w_]+::)+/,\n // NOTE: generics is a little tricky because in order to do it right, we have to\n // do some sort of bracket matching, but we just can use a simple tokenizer here\n // so to account for cases like `<Nil,Any|*>)->` `Function<{T[1]->Boolean[1]}>[1]`\n // we have to make sure the content does not contain any `:` or `.` characters\n // in order to avoid the accidental greedy match with inputs like\n // `function doSomething<T>(a: Function<T[1]->Boolean[1]>)`\n // nor we want to make sure the last character of the content is not `-` to avoid\n // accidentally matching `->` as the end of the generics\n generics: /(?:(?:<\\w+>)|(?:<[^:.@^()]+[^-]>))/,\n date: /%-?\\d+(?:-\\d+(?:-\\d+(?:T(?:\\d+(?::\\d+(?::\\d+(?:.\\d+)?)?)?)(?:[+-][0-9]{4})?)))/,\n time: /%\\d+(?::\\d+(?::\\d+(?:.\\d+)?)?)?/,\n tokenizer: {\n root: [\n // NOTE: since `monaco-editor` Monarch is only meant for tokenizing\n // and the need to highlight Pure syntax is more than just token-based,\n // but semantic/syntax-based we have to create these complex rules.\n // the things to note here is these are not meant to match multilines\n // and they must be placed before identifier rules since token matching\n // is run in order\n // See https://github.com/microsoft/monaco-editor/issues/316#issuecomment-273555698\n // See https://github.com/microsoft/monaco-editor/issues/571#issuecomment-342555050\n // See https://microsoft.github.io/monaco-editor/monarch.html\n { include: '@pure' },\n { include: '@date' },\n { include: '@color' },\n // parser markers\n [\n // NOTE: any leading whitespace to the section header is considered invalid syntax\n /^\\s*###[\\w]+/,\n PURE_GRAMMAR_TOKEN.PARSER,\n ],\n // identifiers and keywords\n [\n /(@identifier)/,\n {\n cases: {\n '@languageStructs': PURE_GRAMMAR_TOKEN.LANGUAGE_STRUCT,\n '@keywords': `${PURE_GRAMMAR_TOKEN.KEYWORD}.$0`,\n // function descriptor\n '([a-zA-Z_$][\\\\w$]*)_((\\\\w+_(([a-zA-Z0-9]+)|(\\\\$[a-zA-Z0-9]+_[a-zA-Z0-9]+\\\\$)))__)*(\\\\w+_(([a-zA-Z0-9]+)|(\\\\$[a-zA-Z0-9]+_[a-zA-Z0-9]+\\\\$)))_': PURE_GRAMMAR_TOKEN.TYPE,\n '@default': PURE_GRAMMAR_TOKEN.IDENTIFIER,\n },\n },\n ],\n // whitespace\n { include: '@whitespace' },\n // delimiters and operators\n [/[{}()[\\]]/, '@brackets'],\n [/[<>](?!@symbols)/, '@brackets'],\n [\n /@symbols/,\n {\n cases: {\n '@operators': PURE_GRAMMAR_TOKEN.OPERATOR,\n '@default': PURE_GRAMMAR_TOKEN.IDENTIFIER,\n },\n },\n ],\n { include: '@number' },\n // delimiter: after number because of .\\d floats\n [/[;,.]/, PURE_GRAMMAR_TOKEN.DELIMITER],\n // strings\n // NOTE: including non-teminated string so as people type ', we can start showing them that they're working on a string\n [/'([^'\\\\]|\\\\.)*$/, `${PURE_GRAMMAR_TOKEN.STRING}.invalid`],\n [/'/, PURE_GRAMMAR_TOKEN.STRING, '@string'],\n { include: '@characters' },\n ],\n pure: [\n // type\n [/(@package\\*)/, [PURE_GRAMMAR_TOKEN.PACKAGE]], // import path\n [\n /(@package?)(@identifier)(@generics?)(\\s*)(@multiplicity)/,\n [\n PURE_GRAMMAR_TOKEN.PACKAGE,\n PURE_GRAMMAR_TOKEN.TYPE,\n PURE_GRAMMAR_TOKEN.GENERICS,\n PURE_GRAMMAR_TOKEN.WHITESPACE,\n PURE_GRAMMAR_TOKEN.MULTIPLICITY,\n ],\n ],\n [\n /(@package)(@identifier)(@generics?)/,\n [\n PURE_GRAMMAR_TOKEN.PACKAGE,\n PURE_GRAMMAR_TOKEN.TYPE,\n PURE_GRAMMAR_TOKEN.GENERICS,\n ],\n ],\n // special operators that uses type (e.g. constructor, cast)\n [\n /([@^])(\\s*)(@package?)(@identifier)(@generics?)(@multiplicity?)/,\n [\n `${PURE_GRAMMAR_TOKEN.TYPE}.operator`,\n PURE_GRAMMAR_TOKEN.WHITESPACE,\n PURE_GRAMMAR_TOKEN.PACKAGE,\n PURE_GRAMMAR_TOKEN.TYPE,\n PURE_GRAMMAR_TOKEN.GENERICS,\n PURE_GRAMMAR_TOKEN.MULTIPLICITY,\n ],\n ],\n // property / parameter\n [\n /(\\.\\s*)(@identifier)/,\n [PURE_GRAMMAR_TOKEN.DELIMITER, PURE_GRAMMAR_TOKEN.PROPERTY],\n ],\n [\n /(@identifier)(\\s*=)/,\n [PURE_GRAMMAR_TOKEN.PROPERTY, PURE_GRAMMAR_TOKEN.OPERATOR],\n ],\n [\n /(@identifier)(\\.)(@identifier)/,\n [\n PURE_GRAMMAR_TOKEN.TYPE,\n PURE_GRAMMAR_TOKEN.OPERATOR,\n PURE_GRAMMAR_TOKEN.PROPERTY,\n ],\n ], // could be: property chain, profile tag, and stereotype\n [\n /(@identifier)(\\s*:)/,\n [PURE_GRAMMAR_TOKEN.PARAMETER, PURE_GRAMMAR_TOKEN.OPERATOR],\n ],\n // variables\n [\n /(let)(\\s+)(@identifier)(\\s*=)/,\n [\n PURE_GRAMMAR_TOKEN.KEYWORD,\n PURE_GRAMMAR_TOKEN.WHITESPACE,\n PURE_GRAMMAR_TOKEN.VARIABLE,\n PURE_GRAMMAR_TOKEN.OPERATOR,\n ],\n ],\n [/(\\$@identifier)/, [`${PURE_GRAMMAR_TOKEN.VARIABLE}.reference`]],\n ],\n date: [\n [/(%latest)/, [`${PURE_GRAMMAR_TOKEN.DATE}.latest`]],\n [/(@date)/, [PURE_GRAMMAR_TOKEN.DATE]],\n [/(@time)/, [`${PURE_GRAMMAR_TOKEN.DATE}.time`]],\n ],\n color: [[/(#[0-9a-fA-F]{6})/, [PURE_GRAMMAR_TOKEN.COLOR]]],\n number: [\n [\n /(@digits)[eE]([-+]?(@digits))?[fFdD]?/,\n `${PURE_GRAMMAR_TOKEN.NUMBER}.float`,\n ],\n [\n /(@digits)\\.(@digits)([eE][-+]?(@digits))?[fFdD]?/,\n `${PURE_GRAMMAR_TOKEN.NUMBER}.float`,\n ],\n [/0[xX](@hexdigits)[Ll]?/, `${PURE_GRAMMAR_TOKEN.NUMBER}.hex`],\n [/0(@octaldigits)[Ll]?/, `${PURE_GRAMMAR_TOKEN.NUMBER}.octal`],\n [/0[bB](@binarydigits)[Ll]?/, `${PURE_GRAMMAR_TOKEN.NUMBER}.binary`],\n [/(@digits)[fFdD]/, `${PURE_GRAMMAR_TOKEN.NUMBER}.float`],\n [/(@digits)[lL]?/, PURE_GRAMMAR_TOKEN.NUMBER],\n ],\n whitespace: [\n [/[ \\t\\r\\n]+/, PURE_GRAMMAR_TOKEN.WHITESPACE],\n [/\\/\\*\\*(?!\\/)/, `${PURE_GRAMMAR_TOKEN.COMMENT}.doc`, '@doc'],\n [/\\/\\*/, PURE_GRAMMAR_TOKEN.COMMENT, '@comment'],\n [/\\/\\/.*$/, PURE_GRAMMAR_TOKEN.COMMENT],\n ],\n comment: [\n [/[^/*]+/, PURE_GRAMMAR_TOKEN.COMMENT],\n // [/\\/\\*/, PURE_GRAMMAR_TOKEN.COMMENT, '@push' ], // nested comment not allowed :-(\n // [/\\/\\*/, ${PURE_GRAMMAR_TOKEN.COMMENT}.invalid` ], // this breaks block comments in the shape of /* //*/\n [/\\*\\//, PURE_GRAMMAR_TOKEN.COMMENT, '@pop'],\n [/[/*]/, PURE_GRAMMAR_TOKEN.COMMENT],\n ],\n // Identical copy of comment above, except for the addition of .doc\n doc: [\n [/[^/*]+/, `${PURE_GRAMMAR_TOKEN.COMMENT}.doc`],\n // [/\\/\\*/, `${PURE_GRAMMAR_TOKEN.COMMENT}.doc`, '@push' ], // nested comment not allowed :-(\n [/\\/\\*/, `${PURE_GRAMMAR_TOKEN.COMMENT}.doc.invalid`],\n [/\\*\\//, `${PURE_GRAMMAR_TOKEN.COMMENT}.doc`, '@pop'],\n [/[/*]/, `${PURE_GRAMMAR_TOKEN.COMMENT}.doc`],\n ],\n string: [\n [/[^\\\\']+/, PURE_GRAMMAR_TOKEN.STRING],\n [/@escapes/, `${PURE_GRAMMAR_TOKEN.STRING}.escape`],\n [/\\\\./, `${PURE_GRAMMAR_TOKEN.STRING}.escape.invalid`],\n [/'/, PURE_GRAMMAR_TOKEN.STRING, '@pop'],\n ],\n characters: [\n [/'[^\\\\']'/, PURE_GRAMMAR_TOKEN.STRING],\n [\n /(')(@escapes)(')/,\n [\n PURE_GRAMMAR_TOKEN.STRING,\n `${PURE_GRAMMAR_TOKEN.STRING}.escape`,\n PURE_GRAMMAR_TOKEN.STRING,\n ],\n ],\n [/'/, `${PURE_GRAMMAR_TOKEN.STRING}.invalid`],\n ],\n },\n});\nexport function setupPureLanguageService(options) {\n monacoLanguagesAPI.register({ id: CODE_EDITOR_LANGUAGE.PURE });\n monacoLanguagesAPI.setLanguageConfiguration(CODE_EDITOR_LANGUAGE.PURE, configuration);\n monacoLanguagesAPI.setMonarchTokensProvider(CODE_EDITOR_LANGUAGE.PURE, generateLanguageMonarch(options?.extraKeywords ?? []));\n}\n//# sourceMappingURL=PureLanguageService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/***************************************************************************************\n * [CORE]\n *\n * This and its corresponding utilitites are used to build the executable query from\n * the query snapshot. The executable query is then used to fetch data.\n ***************************************************************************************/\nimport { PRIMITIVE_TYPE } from '@finos/legend-graph';\nimport {} from './DataCubeQuerySnapshot.js';\nimport { guaranteeNonNullable } from '@finos/legend-shared';\nimport { DataCubeFunction, DataCubeQuerySortDirection, } from './DataCubeQueryEngine.js';\nimport { DataCubeConfiguration } from './models/DataCubeConfiguration.js';\nimport { _col, _collection, _cols, _colSpec, _deserializeLambda, _filter, _function, _groupByAggCols, _lambda, _pivotAggCols, _castCols, _primitiveValue, _var, _functionCompositionProcessor, } from './DataCubeQueryBuilderUtils.js';\nexport function buildExecutableQuery(snapshot, source, executionContextBuilder, filterOperations, aggregateOperations, options) {\n const data = snapshot.data;\n const configuration = DataCubeConfiguration.serialization.fromJson(data.configuration);\n const sequence = [];\n const funcMap = {};\n const _process = _functionCompositionProcessor(sequence, funcMap);\n // --------------------------------- LEAF-LEVEL EXTEND ---------------------------------\n if (data.leafExtendedColumns.length) {\n const leafExtendedFuncs = data.leafExtendedColumns.map((col) => _function(DataCubeFunction.EXTEND, [\n _col(col.name, _deserializeLambda(col.mapFn)),\n ]));\n _process('leafExtend', guaranteeNonNullable(leafExtendedFuncs[0]));\n leafExtendedFuncs.slice(1).forEach((func) => {\n sequence.push(func);\n });\n }\n // --------------------------------- FILTER ---------------------------------\n if (data.filter) {\n _process('filter', _function(DataCubeFunction.FILTER, [\n _lambda([_var()], [_filter(data.filter, filterOperations)]),\n ]));\n }\n // --------------------------------- SELECT ---------------------------------\n if (data.selectColumns.length) {\n _process('select', _function(DataCubeFunction.SELECT, [\n _cols(data.selectColumns.map((col) => _colSpec(col.name))),\n ]));\n }\n // --------------------------------- PIVOT ---------------------------------\n if (data.pivot) {\n const pivot = data.pivot;\n // pre-sort to maintain stable order for pivot result columns\n _process('sort', _function(DataCubeFunction.SORT, [\n _collection(data.pivot.columns.map((col) => _function(DataCubeFunction.ASCENDING, [_col(col.name)]))),\n ]));\n _process('pivot', _function(DataCubeFunction.PIVOT, [\n _cols(pivot.columns.map((col) => _colSpec(col.name))),\n _cols(_pivotAggCols(pivot.columns, snapshot, configuration, aggregateOperations)),\n ]));\n if (pivot.castColumns.length) {\n _process('pivotCast', _function(DataCubeFunction.CAST, [_castCols(pivot.castColumns)]));\n }\n }\n // --------------------------------- GROUP BY ---------------------------------\n if (data.groupBy) {\n const groupBy = data.groupBy;\n _process('groupBy', _function(DataCubeFunction.GROUP_BY, [\n _cols(groupBy.columns.map((col) => _colSpec(col.name))),\n _cols(_groupByAggCols(groupBy.columns, snapshot, configuration, aggregateOperations)),\n ]));\n _process('groupBySort', _function(DataCubeFunction.SORT, [\n _collection(groupBy.columns.map((col) => _function(configuration.treeColumnSortDirection ===\n DataCubeQuerySortDirection.ASCENDING\n ? DataCubeFunction.ASCENDING\n : DataCubeFunction.DESCENDING, [_col(col.name)]))),\n ]));\n }\n // --------------------------------- GROUP-LEVEL EXTEND ---------------------------------\n if (data.groupExtendedColumns.length) {\n const groupExtendedFuncs = data.groupExtendedColumns.map((col) => _function(DataCubeFunction.EXTEND, [\n _col(col.name, _deserializeLambda(col.mapFn)),\n ]));\n _process('groupExtend', guaranteeNonNullable(groupExtendedFuncs[0]));\n groupExtendedFuncs.slice(1).forEach((func) => {\n sequence.push(func);\n });\n }\n // --------------------------------- SORT ---------------------------------\n if (data.sortColumns.length) {\n _process('sort', _function(DataCubeFunction.SORT, [\n _collection(data.sortColumns.map((col) => _function(col.direction === DataCubeQuerySortDirection.ASCENDING\n ? DataCubeFunction.ASCENDING\n : DataCubeFunction.DESCENDING, [_col(col.name)]))),\n ]));\n }\n // --------------------------------- LIMIT ---------------------------------\n if (data.limit !== undefined) {\n _process('limit', _function(DataCubeFunction.LIMIT, [\n _primitiveValue(PRIMITIVE_TYPE.INTEGER, data.limit),\n ]));\n }\n // --------------------------------- SLICE ---------------------------------\n if (options?.pagination) {\n sequence.push(_function(DataCubeFunction.SLICE, [\n _primitiveValue(PRIMITIVE_TYPE.INTEGER, options.pagination.start),\n _primitiveValue(PRIMITIVE_TYPE.INTEGER, options.pagination.end),\n ]));\n }\n // --------------------------------- FINALIZE ---------------------------------\n const executionContext = executionContextBuilder(source);\n if (executionContext) {\n sequence.push(executionContext);\n }\n options?.postProcessor?.(snapshot, sequence, funcMap, configuration, filterOperations, aggregateOperations);\n if (sequence.length === 0) {\n return source.query;\n }\n for (let i = 0; i < sequence.length; i++) {\n guaranteeNonNullable(sequence[i]).parameters.unshift(i === 0 ? source.query : guaranteeNonNullable(sequence[i - 1]));\n }\n return guaranteeNonNullable(sequence[sequence.length - 1]);\n}\n//# sourceMappingURL=DataCubeQueryBuilder.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class DataCubeSource {\n sourceColumns = [];\n query;\n}\nexport class INTERNAL__DataCubeSource extends DataCubeSource {\n}\n//# sourceMappingURL=DataCubeSource.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useState, useEffect } from 'react';\nimport { clsx } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\nexport { clsx };\nexport { Portal, useForkRef } from '@mui/material';\nexport function cn(...inputs) {\n return twMerge(clsx(inputs));\n}\nexport { useResizeDetector } from 'react-resize-detector';\n// React `setState` used to come with a callback that runs after the state is updated\n// See https://www.robinwieruch.de/react-usestate-callback\nexport const useStateWithCallback = (initialState, callback) => {\n const [state, setState] = useState(initialState);\n useEffect(() => callback(state), [state, callback]);\n return [state, setState];\n};\nexport { Global, css } from '@emotion/react';\n//# sourceMappingURL=ComponentUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// NOTE: the icons in this file is pertained to only Data Cube, before\n// merging them in the main icon registry, we should review them\nimport { GoBrowser, GoPin, GoX } from 'react-icons/go';\nimport { GrCheckbox, GrCheckboxSelected } from 'react-icons/gr';\nimport { MdOutlineFormatBold, MdOutlineFormatItalic, MdOutlineStrikethroughS, MdOutlineFormatUnderlined, MdOutlineInsertPageBreak, } from 'react-icons/md';\nimport { PiMouseScroll, PiTextAlignCenter, PiTextAlignLeft, PiTextAlignRight, } from 'react-icons/pi';\nimport { RxLetterCaseCapitalize } from 'react-icons/rx';\nimport { TbBook, TbCube, TbNote, TbTable, TbTableColumn, TbTableRow, TbTableDown, TbTableOptions, TbColumnInsertRight, TbTablePlus, TbColumnRemove, TbColumns3, TbFreezeRow, TbFreezeColumn, TbFreezeRowColumn, TbCode, TbFilter, TbFilterPlus, TbFilterCode, TbSettingsFilled, TbChevronLeft, TbChevronRight, TbSearch, TbAlertTriangle, TbExclamationCircle, TbCaretDownFilled, TbLoader2, TbSettingsBolt, TbSettings, TbChevronDown, TbCaretRightFilled, TbMenu2, TbBug, TbBorderCornerSquare, TbCornerDownRight, TbX, TbPlus, TbLetterCase, TbCalendarEvent, TbCalculator, TbCircleCheckFilled, TbCircleXFilled, } from 'react-icons/tb';\nimport { VscError, VscInfo, VscQuestion, VscWarning } from 'react-icons/vsc';\nexport const DataCubeIcon = {\n AdvancedSettings: TbSettingsBolt,\n AlertError: VscError,\n AlertInfo: VscInfo,\n AlertWarning: VscWarning,\n Calculate: TbCalculator,\n Calendar: TbCalendarEvent,\n CaretDown: TbCaretDownFilled,\n CaretRight: TbCaretRightFilled,\n Checkbox: GrCheckbox,\n CheckboxSelected: GrCheckboxSelected,\n ChevronLeft: TbChevronLeft,\n ChevronRight: TbChevronRight,\n ChevronDown: TbChevronDown,\n CircleChecked: TbCircleCheckFilled,\n CircledFailed: TbCircleXFilled,\n Code: TbCode,\n Cube: TbCube,\n Debug: TbBug,\n Documentation: TbBook,\n DocumentationHint: VscQuestion,\n FilterAddOperator: TbPlus,\n FilterRemoveOperator: TbX,\n FilterGroupOperator: TbCornerDownRight,\n FilterNotOperator: TbBorderCornerSquare,\n FontBold: MdOutlineFormatBold,\n FontCase: RxLetterCaseCapitalize,\n FontItalic: MdOutlineFormatItalic,\n FontUnderline: MdOutlineFormatUnderlined,\n FontStrikethrough: MdOutlineStrikethroughS,\n LetterCase: TbLetterCase,\n Loader: TbLoader2,\n Menu: TbMenu2,\n Note: TbNote,\n Pin: GoPin,\n Search: TbSearch,\n Settings: TbSettings,\n Table: TbTable,\n TableColumn: TbFreezeColumn,\n TableColumnOptions__Settings: TbSettingsFilled,\n TableColumns: TbColumns3,\n TableExtendedColumn: TbColumnInsertRight,\n TableFilter: TbFilter,\n TableFilterPlus: TbFilterPlus,\n TableFilterCode: TbFilterCode,\n TableGroupBy: TbTableColumn,\n TableOptions: TbTableOptions,\n TablePagination: MdOutlineInsertPageBreak,\n TablePivot: TbTableRow,\n TablePlus: TbTablePlus,\n TableRemoveColumn: TbColumnRemove,\n TableRow: TbFreezeRow,\n TableRowColumn: TbFreezeRowColumn,\n TableScroll: PiMouseScroll,\n TableSort: TbTableDown,\n TextAlignLeft: PiTextAlignLeft,\n TextAlignCenter: PiTextAlignCenter,\n TextAlignRight: PiTextAlignRight,\n Window: GoBrowser,\n X: GoX,\n Warning: TbAlertTriangle,\n WarningCircle: TbExclamationCircle,\n};\n//# sourceMappingURL=DataCubeIcon.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createContext, useContext } from 'react';\nimport { guaranteeNonNullable } from '@finos/legend-shared';\nimport {} from '../stores/DataCubeState.js';\nconst DataCubeStateContext = createContext(undefined);\nexport const DataCubeContextProvider = DataCubeStateContext.Provider;\nexport const useDataCube = () => guaranteeNonNullable(useContext(DataCubeStateContext), `Can't find Data Cube in context`);\n//# sourceMappingURL=DataCubeProvider.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { cn, DataCubeIcon, Dialog } from '@finos/legend-art';\nimport { noop } from '@finos/legend-shared';\nimport { observer } from 'mobx-react-lite';\nimport { useRef } from 'react';\nimport { useDataCube } from '../DataCubeProvider.js';\nexport var AlertType;\n(function (AlertType) {\n AlertType[\"INFO\"] = \"INFO\";\n AlertType[\"WARNING\"] = \"WARNING\";\n AlertType[\"ERROR\"] = \"ERROR\";\n})(AlertType || (AlertType = {}));\nexport function Alert(props) {\n const { message, type, text, actions = [], onClose } = props;\n return (_jsxs(\"div\", { className: \"h-full w-full\", children: [_jsxs(\"div\", { className: cn('flex w-full overflow-auto p-6', {\n 'h-[calc(100%_-_40px)]': actions.length !== 0,\n 'h-full': !actions.length,\n }), children: [_jsxs(\"div\", { className: \"mr-3\", children: [type === AlertType.INFO && (_jsx(DataCubeIcon.AlertInfo, { className: \"flex-shrink-0 stroke-[0.5px] text-[40px] text-sky-500\" })), type === AlertType.WARNING && (_jsx(DataCubeIcon.AlertWarning, { className: \"flex-shrink-0 stroke-[0.3px] text-[40px] text-amber-500\" })), type === AlertType.ERROR && (_jsx(DataCubeIcon.AlertError, { className: \"flex-shrink-0 stroke-[0.5px] text-[40px] text-red-500\" }))] }), _jsxs(\"div\", { children: [_jsx(\"div\", { className: \"whitespace-break-spaces text-lg\", children: message }), _jsx(\"div\", { className: \"mt-1 whitespace-break-spaces text-neutral-500\", children: text })] })] }), actions.length !== 0 && (_jsx(\"div\", { className: \"flex h-10 items-center justify-center border border-t-neutral-300 px-2\", children: actions.map((action, idx) => (_jsx(\"button\", { className: \"ml-2 h-6 border border-neutral-400 bg-neutral-300 px-2 first-of-type:ml-0 hover:brightness-95\", onClick: () => {\n action.handler();\n onClose?.();\n }, autoFocus: idx === 0, children: action.label }, idx))) }))] }));\n}\nconst BlockingActionAlertContent = observer((props) => {\n const { alert } = props;\n const { title, message, prompt, type, onClose, actions } = alert;\n const ref = useRef(null);\n const dataCube = useDataCube();\n // set the width and height of the dialog to make sure content overflow works properly\n const handleEnter = () => {\n if (ref.current?.parentElement) {\n const { width, height } = ref.current.parentElement.getBoundingClientRect();\n ref.current.style.width = `${width}px`;\n ref.current.style.height = `${height}px`;\n }\n };\n return (_jsx(Dialog, { open: true, onClose: noop, TransitionProps: {\n onEnter: handleEnter,\n }, PaperProps: {\n elevation: 0,\n }, slotProps: {\n backdrop: {\n classes: {\n root: 'bg-black !opacity-25',\n },\n },\n }, classes: {\n root: 'h-full w-full flex items-center justify-center',\n paper: 'min-h-10 min-w-40 rounded-none shadow-md',\n }, children: _jsxs(\"div\", { className: \"border border-neutral-400 bg-neutral-200 shadow-xl\", ref: ref, children: [_jsx(\"div\", { className: \"flex h-6 w-full select-none items-center justify-between border-b border-b-neutral-300 bg-white\", children: _jsx(\"div\", { className: \"px-2\", children: title ?? '' }) }), _jsx(\"div\", { className: \"h-[calc(100%_-_24px)] w-full\", children: _jsx(Alert, { type: type, message: message, text: prompt, actions: (actions ?? []).map((action) => ({\n label: action.label,\n handler: () => {\n action.handler();\n onClose?.();\n dataCube.alertAction(undefined);\n },\n })) }) })] }) }));\n});\nexport const DataCubeBlockingActionAlert = observer(() => {\n const dataCube = useDataCube();\n const actionAlert = dataCube.currentActionAlert;\n if (!actionAlert) {\n return null;\n }\n return _jsx(BlockingActionAlertContent, { alert: actionAlert });\n});\n//# sourceMappingURL=DataCubeAlert.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { uuid } from '@finos/legend-shared';\nimport { action, computed, makeObservable, observable, runInAction, } from 'mobx';\nexport class LayoutConfiguration {\n title;\n contentRenderer;\n window = {};\n constructor(title, contentRenderer) {\n this.contentRenderer = contentRenderer;\n this.title = title;\n }\n}\nexport class WindowState {\n uuid = uuid();\n configuration;\n onClose;\n constructor(configuration, onClose) {\n this.configuration = configuration;\n this.onClose = onClose;\n }\n}\nexport const WINDOW_DEFAULT_OFFSET = 50;\nexport const WINDOW_DEFAULT_WIDTH = 800;\nexport const WINDOW_DEFAULT_HEIGHT = 600;\nexport const WINDOW_DEFAULT_MIN_WIDTH = 300;\nexport const WINDOW_DEFAULT_MIN_HEIGHT = 300;\nexport const DEFAULT_TOOL_PANEL_WINDOW_CONFIG = {\n width: WINDOW_DEFAULT_WIDTH,\n height: WINDOW_DEFAULT_HEIGHT,\n minWidth: WINDOW_DEFAULT_MIN_WIDTH,\n minHeight: WINDOW_DEFAULT_MIN_HEIGHT,\n center: true,\n};\nexport const DEFAULT_SMALL_ALERT_WINDOW_CONFIG = {\n width: 500,\n height: 200,\n minWidth: 200,\n minHeight: 80,\n center: true,\n};\nexport const DEFAULT_LARGE_ALERT_WINDOW_CONFIG = {\n width: 600,\n height: 200,\n minWidth: 300,\n minHeight: 150,\n center: true,\n};\nexport class DisplayState {\n layoutManagerState;\n configuration;\n window;\n constructor(layoutManagerState, title, contentRenderer) {\n makeObservable(this, {\n window: observable,\n isOpen: computed,\n open: action,\n close: action,\n });\n this.layoutManagerState = layoutManagerState;\n this.configuration = new LayoutConfiguration(title, contentRenderer);\n this.configuration.window = DEFAULT_TOOL_PANEL_WINDOW_CONFIG;\n }\n get isOpen() {\n return Boolean(this.window);\n }\n open() {\n if (this.window) {\n this.layoutManagerState.bringWindowFront(this.window);\n }\n else {\n this.window = new WindowState(this.configuration, () => runInAction(() => {\n this.window = undefined;\n }));\n this.layoutManagerState.newWindow(this.window);\n }\n }\n close() {\n if (this.window) {\n this.layoutManagerState.closeWindow(this.window);\n this.window = undefined;\n }\n }\n}\nexport class LayoutManagerState {\n windows = [];\n constructor() {\n makeObservable(this, {\n windows: observable,\n newWindow: action,\n bringWindowFront: action,\n closeWindow: action,\n });\n }\n newDisplay(title, contentRenderer, windowConfiguration) {\n const display = new DisplayState(this, title, contentRenderer);\n if (windowConfiguration) {\n display.configuration.window = windowConfiguration;\n }\n return display;\n }\n newWindow(window) {\n this.windows.push(window);\n }\n bringWindowFront(window) {\n const matchingWindow = this.windows.find((w) => w.uuid === window.uuid);\n if (matchingWindow) {\n this.windows = this.windows.filter((w) => w.uuid !== window.uuid);\n this.windows.push(window);\n }\n }\n closeWindow(window) {\n const matchingWindow = this.windows.find((w) => w.uuid === window.uuid);\n if (matchingWindow) {\n this.windows = this.windows.filter((w) => w.uuid !== window.uuid);\n window.onClose?.();\n }\n }\n}\n//# sourceMappingURL=DataCubeLayoutManagerState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { PARSER_SECTION_MARKER, PURE_PARSER } from '@finos/legend-graph';\nimport { getNullableFirstEntry, guaranteeNonNullable, hasWhiteSpace, } from '@finos/legend-shared';\nimport { languages as monacoLanguagesAPI, } from 'monaco-editor';\nexport const getParserKeywordSuggestions = (position, model, suggestions) => {\n const results = [];\n const currentWord = model.getWordUntilPosition(position);\n // suggestions for parser keyword\n const lineTextIncludingWordRange = {\n startLineNumber: position.lineNumber,\n startColumn: 1,\n endLineNumber: position.lineNumber,\n endColumn: currentWord.endColumn,\n };\n const lineTextIncludingWord = model.getValueInRange(lineTextIncludingWordRange);\n // NOTE: make sure parser keyword suggestions only show up when the current word is the\n // the first word of the line since parser section header must not be preceded by anything\n if (!hasWhiteSpace(lineTextIncludingWord.trim())) {\n suggestions.forEach((suggestion) => {\n results.push({\n label: {\n label: `${PARSER_SECTION_MARKER}${suggestion.text}`,\n description: suggestion.description,\n },\n kind: monacoLanguagesAPI.CompletionItemKind.Keyword,\n insertText: `${PARSER_SECTION_MARKER}${suggestion.insertText}\\n`,\n range: lineTextIncludingWordRange,\n documentation: suggestion.documentation\n ? suggestion.documentation.markdownText\n ? {\n value: suggestion.documentation.markdownText.value,\n }\n : suggestion.documentation.text\n : undefined,\n });\n });\n }\n return results;\n};\nexport const getSectionParserNameFromLineText = (lineText) => {\n if (lineText.startsWith(PARSER_SECTION_MARKER)) {\n return lineText.substring(PARSER_SECTION_MARKER.length).split(' ')[0];\n }\n // NOTE: since leading whitespace to parser name is considered invalid, we will return `undefined`\n return undefined;\n};\nexport const getParserElementSnippetSuggestions = (position, model, suggestionsGetter) => {\n const results = [];\n const currentWord = model.getWordUntilPosition(position);\n // suggestions for parser element snippets\n const textUntilPosition = model.getValueInRange({\n startLineNumber: 1,\n startColumn: 1,\n endLineNumber: position.lineNumber,\n endColumn: position.column,\n });\n const allParserSectionHeaders = \n // NOTE: since `###Pure` is implicitly considered as the first section, we prepend it to the text\n `${PARSER_SECTION_MARKER}${PURE_PARSER.PURE}\\n${textUntilPosition}`\n .split('\\n')\n .filter((line) => line.startsWith(PARSER_SECTION_MARKER));\n const currentParserName = getSectionParserNameFromLineText(allParserSectionHeaders[allParserSectionHeaders.length - 1] ?? '');\n if (currentParserName) {\n suggestionsGetter(currentParserName).forEach((snippetSuggestion) => {\n results.push({\n label: {\n label: snippetSuggestion.text,\n description: snippetSuggestion.description,\n },\n kind: monacoLanguagesAPI.CompletionItemKind.Snippet,\n insertTextRules: monacoLanguagesAPI.CompletionItemInsertTextRule.InsertAsSnippet,\n insertText: `${snippetSuggestion.insertText}\\n`,\n range: {\n startLineNumber: position.lineNumber,\n startColumn: currentWord.startColumn,\n endLineNumber: position.lineNumber,\n endColumn: currentWord.endColumn,\n },\n documentation: snippetSuggestion.documentation\n ? snippetSuggestion.documentation.markdownText\n ? {\n value: snippetSuggestion.documentation.markdownText.value,\n }\n : snippetSuggestion.documentation.text\n : undefined,\n });\n });\n }\n return results;\n};\nexport const getInlineSnippetSuggestions = (position, model, extraSnippetSuggestions = []) => {\n const currentWord = model.getWordUntilPosition(position);\n return [\n {\n text: 'let',\n description: 'new variable',\n insertText: `let \\${1:} = \\${2:};`,\n },\n {\n text: 'let',\n description: 'new collection',\n insertText: `let \\${1:} = [\\${2:}];`,\n },\n {\n text: 'cast',\n description: 'type casting',\n insertText: `cast(@\\${1:model::SomeClass})`,\n },\n // conditionals\n {\n text: 'if',\n description: '(conditional)',\n insertText: `if(\\${1:'true'}, | \\${2:/* if true do this */}, | \\${3:/* if false do this */})`,\n },\n {\n text: 'case',\n description: '(conditional)',\n insertText: `case(\\${1:}, \\${2:'true'}, \\${3:'false'})`,\n },\n {\n text: 'match',\n description: '(conditional)',\n insertText: `match([x:\\${1:String[1]}, \\${2:''}])`,\n },\n // collection\n {\n text: 'map',\n description: '(collection)',\n insertText: `map(x|\\${1:})`,\n },\n {\n text: 'filter',\n description: '(collection)',\n insertText: `filter(x|\\${1:})`,\n },\n {\n text: 'fold',\n description: '(collection)',\n insertText: `fold({a, b| \\${1:$a + $b}}, \\${2:0})`,\n },\n {\n text: 'filter',\n description: '(collection)',\n insertText: `filter(x|\\${1:})`,\n },\n {\n text: 'sort',\n description: '(collection)',\n insertText: `sort()`,\n },\n {\n text: 'in',\n description: '(collection)',\n insertText: `in()`,\n },\n {\n text: 'slice',\n description: '(collection)',\n insertText: `slice(\\${1:1},$\\{2:2})`,\n },\n {\n text: 'removeDuplicates',\n description: '(collection)',\n insertText: `removeDuplicates()`,\n },\n {\n text: 'toOne',\n description: '(collection)',\n insertText: `toOne(\\${1:})`,\n },\n {\n text: 'toOneMany',\n description: '(collection)',\n insertText: `toOneMany(\\${1:})`,\n },\n {\n text: 'isEmpty',\n description: '(collection)',\n insertText: `isEmpty()`,\n },\n // string\n {\n text: 'endsWith',\n description: '(string)',\n insertText: `endsWith()`,\n },\n {\n text: 'startsWith',\n description: '(string)',\n insertText: `startsWith()`,\n },\n ...extraSnippetSuggestions,\n ].map((snippetSuggestion) => ({\n label: {\n label: snippetSuggestion.text,\n description: snippetSuggestion.description,\n },\n kind: monacoLanguagesAPI.CompletionItemKind.Snippet,\n insertTextRules: monacoLanguagesAPI.CompletionItemInsertTextRule.InsertAsSnippet,\n insertText: snippetSuggestion.insertText,\n range: {\n startLineNumber: position.lineNumber,\n startColumn: currentWord.startColumn,\n endLineNumber: position.lineNumber,\n endColumn: currentWord.endColumn,\n },\n documentation: snippetSuggestion.documentation\n ? snippetSuggestion.documentation.markdownText\n ? {\n value: snippetSuggestion.documentation.markdownText.value,\n }\n : snippetSuggestion.documentation.text\n : undefined,\n }));\n};\nexport const isTokenOneOf = (token, baseTokens, exact = false) => {\n if (exact) {\n return baseTokens.map((baseToken) => `${baseToken}.pure`).includes(token);\n }\n const baseToken = guaranteeNonNullable(getNullableFirstEntry(token.split('.')));\n return baseTokens.includes(baseToken);\n};\nexport const PURE_CODE_EDITOR_WORD_SEPARATORS = '`~!@#%^&*()-=+[{]}\\\\|;:\\'\",.<>/?'; // omit $ from default word separators\n//# sourceMappingURL=PureLanguageCodeEditorSupport.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { languages as monacoLanguagesAPI, } from 'monaco-editor';\n// Since we render the editor in a window which has been CSS transformed, and monaco-editor renders\n// the widgets with position=fixed, the position of the widgets will be off, we need to move the root\n// which monaco-editor uses to calculate the offset to outside of the transformed container\n// See https://dev.to/salilnaik/the-uncanny-relationship-between-position-fixed-and-transform-property-32f6\n// See https://github.com/microsoft/monaco-editor/issues/2793#issuecomment-999337740\nexport const MONACO_EDITOR_OVERFLOW_WIDGETS_ROOT_ID = 'monaco-editor-overflow-widgets-root';\nexport function INTERNAL__MonacoEditorWidgetsRoot() {\n return (_jsx(\"div\", { id: MONACO_EDITOR_OVERFLOW_WIDGETS_ROOT_ID, className: \"monaco-editor\" // keep this root class so widgets can be styled properly\n }));\n}\nexport async function getCodeSuggestions(position, model, prefix, view, baseQueryBuilder) {\n const textUntilPosition = model.getValueInRange({\n startLineNumber: 1,\n startColumn: 1,\n endLineNumber: position.lineNumber,\n endColumn: position.column,\n });\n const currentWord = model.getWordAtPosition(position);\n let suggestions = [];\n try {\n suggestions = await view.engine.getQueryTypeahead((prefix ?? '') + textUntilPosition, baseQueryBuilder(), view.source);\n }\n catch {\n // do nothing: provide no suggestions when error ocurred\n }\n return suggestions.map((suggestion) => ({\n label: suggestion.display,\n kind: monacoLanguagesAPI.CompletionItemKind.Text, // TODO?: the engine should provide this information\n filterText: suggestion.display,\n insertTextRules: monacoLanguagesAPI.CompletionItemInsertTextRule.InsertAsSnippet,\n insertText: suggestion.completion,\n // NOTE: the following replace range is equivalent to the current word range, if there is a current word,\n // replace this word with the suggestions, otherwise, if there is no current word, we use the current position\n // as insertion point for the suggestion. This is due to the fact that the auto-completer gives full word\n // suggestions even when the user is typing the middle of that word\n //\n // For example, if the current input is 'a' and the suggestion is 'abc', we need to make sure\n // the suggestion is inserted so that the final result is 'abc', not 'aabc'\n range: {\n startLineNumber: position.lineNumber,\n startColumn: currentWord?.startColumn ?? position.column,\n endLineNumber: position.lineNumber,\n endColumn: currentWord?.endColumn ?? position.column,\n },\n }));\n}\n//# sourceMappingURL=DataCubePureCodeEditorUtils.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DataCubeIcon } from '@finos/legend-art';\nimport { CODE_EDITOR_LANGUAGE, CODE_EDITOR_THEME, getBaseCodeEditorOptions, moveCursorToPosition, PURE_CODE_EDITOR_WORD_SEPARATORS, setErrorMarkers, } from '@finos/legend-code-editor';\nimport { editor as monacoEditorAPI } from 'monaco-editor';\nimport { useEffect, useRef, useState } from 'react';\nimport { MONACO_EDITOR_OVERFLOW_WIDGETS_ROOT_ID } from './DataCubePureCodeEditorUtils.js';\nexport function DataCubeCodeCheckErrorAlert(props) {\n const { editorModel, error, message, text } = props;\n const editorRef = useRef(null);\n const [editor, setEditor] = useState();\n useEffect(() => {\n if (!editor && editorRef.current) {\n const element = editorRef.current;\n const newEditor = monacoEditorAPI.create(element, {\n ...getBaseCodeEditorOptions(),\n fontSize: 12,\n language: CODE_EDITOR_LANGUAGE.PURE,\n theme: CODE_EDITOR_THEME.GITHUB_LIGHT,\n wordSeparators: PURE_CODE_EDITOR_WORD_SEPARATORS,\n // Make sure the widgets (tooltips, menus) are not clipped by the container bounds\n // and fix the problem where widgets are rendered with position=fixed not working well with parent\n // containers (i.e. the draggable window) which has been transformed\n // See https://dev.to/salilnaik/the-uncanny-relationship-between-position-fixed-and-transform-property-32f6\n // See https://github.com/microsoft/monaco-editor/issues/2793#issuecomment-999337740\n fixedOverflowWidgets: true,\n overflowWidgetsDomNode: document.getElementById(MONACO_EDITOR_OVERFLOW_WIDGETS_ROOT_ID),\n readOnly: true,\n // By design, error markers would not show in read-only mode, use this to force it\n // See https://github.com/microsoft/monaco-editor/issues/311\n renderValidationDecorations: 'on',\n });\n newEditor.setModel(editorModel);\n setEditor(newEditor);\n }\n }, [editor, editorModel]);\n useEffect(() => {\n if (error.sourceInformation) {\n setErrorMarkers(editorModel, [\n {\n message: error.message,\n startLineNumber: error.sourceInformation.startLine,\n startColumn: error.sourceInformation.startColumn,\n endLineNumber: error.sourceInformation.endLine,\n endColumn: error.sourceInformation.endColumn,\n },\n ]);\n if (editor) {\n moveCursorToPosition(editor, {\n lineNumber: error.sourceInformation.startLine,\n column: error.sourceInformation.startColumn,\n });\n }\n }\n }, [editor, editorModel, error]);\n // clean up\n useEffect(() => () => {\n if (editor) {\n editor.dispose();\n }\n }, [editor]);\n return (_jsxs(\"div\", { className: \"h-full w-full overflow-auto\", children: [_jsxs(\"div\", { className: \"flex w-full p-6 pb-2.5\", children: [_jsx(\"div\", { className: \"mr-3\", children: _jsx(DataCubeIcon.AlertError, { className: \"flex-shrink-0 stroke-[0.5px] text-[40px] text-red-500\" }) }), _jsxs(\"div\", { children: [_jsx(\"div\", { className: \"whitespace-break-spaces text-lg\", children: message }), _jsx(\"div\", { className: \"mt-1 whitespace-break-spaces text-neutral-500\", children: text })] })] }), _jsx(\"div\", { className: \"h-60 justify-center border px-2\", children: _jsx(\"div\", { className: \"h-full w-full p-2 pt-1\", children: _jsx(\"div\", { className: \"relative h-full w-full border border-red-500\", children: _jsx(\"div\", { className: \"absolute left-0 top-0 h-full w-full overflow-hidden\", ref: editorRef }) }) }) })] }));\n}\n//# sourceMappingURL=DataCubeCodeCheckErrorAlert.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { PRIMITIVE_TYPE, } from '@finos/legend-graph';\nimport { getFilterOperation } from './filter/DataCubeQueryFilterOperation.js';\nimport { getAggregateOperation } from './aggregation/DataCubeQueryAggregateOperation.js';\nimport { DataCubeQueryAggregateOperation__Sum } from './aggregation/DataCubeQueryAggregateOperation__Sum.js';\nimport { DataCubeQueryAggregateOperation__Average } from './aggregation/DataCubeQueryAggregateOperation__Average.js';\nimport { DataCubeQueryAggregateOperation__Count } from './aggregation/DataCubeQueryAggregateOperation__Count.js';\nimport { DataCubeQueryAggregateOperation__Min } from './aggregation/DataCubeQueryAggregateOperation__Min.js';\nimport { DataCubeQueryAggregateOperation__Max } from './aggregation/DataCubeQueryAggregateOperation__Max.js';\nimport { DataCubeQueryAggregateOperation__UniqueValue } from './aggregation/DataCubeQueryAggregateOperation__UniqueValue.js';\nimport { DataCubeQueryAggregateOperation__First } from './aggregation/DataCubeQueryAggregateOperation__First.js';\nimport { DataCubeQueryAggregateOperation__Last } from './aggregation/DataCubeQueryAggregateOperation__Last.js';\nimport { DataCubeQueryAggregateOperation__VariancePopulation } from './aggregation/DataCubeQueryAggregateOperation__VariancePopulation.js';\nimport { DataCubeQueryAggregateOperation__VarianceSample } from './aggregation/DataCubeQueryAggregateOperation__VarianceSample.js';\nimport { DataCubeQueryAggregateOperation__StdDevPopulation } from './aggregation/DataCubeQueryAggregateOperation__StdDevPopulation.js';\nimport { DataCubeQueryAggregateOperation__StdDevSample } from './aggregation/DataCubeQueryAggregateOperation__StdDevSample.js';\nimport { DataCubeQueryAggregateOperation__JoinStrings } from './aggregation/DataCubeQueryAggregateOperation__JoinStrings.js';\nimport { DataCubeQueryFilterOperation__Equal } from './filter/DataCubeQueryFilterOperation__Equal.js';\nimport { DataCubeQueryFilterOperation__LessThanOrEqual } from './filter/DataCubeQueryFilterOperation__LessThanOrEqual.js';\nimport { DataCubeQueryFilterOperation__LessThan } from './filter/DataCubeQueryFilterOperation__LessThan.js';\nimport { DataCubeQueryFilterOperation__GreaterThanOrEqual } from './filter/DataCubeQueryFilterOperation__GreaterThanOrEqual.js';\nimport { DataCubeQueryFilterOperation__GreaterThan } from './filter/DataCubeQueryFilterOperation__GreaterThan.js';\nimport { DataCubeQueryFilterOperation__NotEqual } from './filter/DataCubeQueryFilterOperation__NotEqual.js';\nimport { DataCubeQueryFilterOperation__EqualColumn } from './filter/DataCubeQueryFilterOperation__EqualColumn.js';\nimport { DataCubeQueryFilterOperation__EqualCaseInsensitive } from './filter/DataCubeQueryFilterOperation__EqualCaseInsensitive.js';\nimport { DataCubeQueryFilterOperation__NotEqualCaseInsensitive } from './filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitive.js';\nimport { DataCubeQueryFilterOperation__EqualCaseInsensitiveColumn } from './filter/DataCubeQueryFilterOperation__EqualCaseInsensitiveColumn.js';\nimport { DataCubeQueryFilterOperation__NotEqualCaseInsensitiveColumn } from './filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitiveColumn.js';\nimport { DataCubeQueryFilterOperation__NotEqualColumn } from './filter/DataCubeQueryFilterOperation__NotEqualColumn.js';\nimport { DataCubeQueryFilterOperation__LessThanColumn } from './filter/DataCubeQueryFilterOperation__LessThanColumn.js';\nimport { DataCubeQueryFilterOperation__LessThanOrEqualColumn } from './filter/DataCubeQueryFilterOperation__LessThanOrEqualColumn.js';\nimport { DataCubeQueryFilterOperation__GreaterThanColumn } from './filter/DataCubeQueryFilterOperation__GreaterThanColumn.js';\nimport { DataCubeQueryFilterOperation__GreaterThanOrEqualColumn } from './filter/DataCubeQueryFilterOperation__GreaterThanOrEqualColumn.js';\nimport { DataCubeQueryFilterOperation__Contain } from './filter/DataCubeQueryFilterOperation__Contain.js';\nimport { DataCubeQueryFilterOperation__ContainCaseInsensitive } from './filter/DataCubeQueryFilterOperation__ContainCaseInsensitive.js';\nimport { DataCubeQueryFilterOperation__NotContain } from './filter/DataCubeQueryFilterOperation__NotContain.js';\nimport { DataCubeQueryFilterOperation__StartWith } from './filter/DataCubeQueryFilterOperation__StartWith.js';\nimport { DataCubeQueryFilterOperation__StartWithCaseInsensitive } from './filter/DataCubeQueryFilterOperation__StartWithCaseInsensitive.js';\nimport { DataCubeQueryFilterOperation__NotStartWith } from './filter/DataCubeQueryFilterOperation__NotStartWith.js';\nimport { DataCubeQueryFilterOperation__EndWith } from './filter/DataCubeQueryFilterOperation__EndWith.js';\nimport { DataCubeQueryFilterOperation__EndWithCaseInsensitive } from './filter/DataCubeQueryFilterOperation__EndWithCaseInsensitive.js';\nimport { DataCubeQueryFilterOperation__NotEndWith } from './filter/DataCubeQueryFilterOperation__NotEndWith.js';\nimport { DataCubeQueryFilterOperation__IsNull } from './filter/DataCubeQueryFilterOperation__IsNull.js';\nimport { DataCubeQueryFilterOperation__IsNotNull } from './filter/DataCubeQueryFilterOperation__IsNotNull.js';\nimport { CODE_EDITOR_LANGUAGE, configureCodeEditor, setupPureLanguageService, } from '@finos/legend-code-editor';\nimport { DataCubeFont } from './DataCubeQueryEngine.js';\nimport { buildExecutableQuery } from './DataCubeQueryBuilder.js';\nimport { LicenseManager } from '@ag-grid-enterprise/core';\nimport { INTERNAL__DataCubeSource, } from './models/DataCubeSource.js';\nimport { _primitiveValue } from './DataCubeQueryBuilderUtils.js';\nimport { uuid, } from '@finos/legend-shared';\nimport { Alert, AlertType, } from '../../components/core/DataCubeAlert.js';\nimport { DEFAULT_SMALL_ALERT_WINDOW_CONFIG, LayoutConfiguration, LayoutManagerState, WindowState, } from './DataCubeLayoutManagerState.js';\nimport { editor as monacoEditorAPI, Uri } from 'monaco-editor';\nimport { DataCubeCodeCheckErrorAlert } from '../../components/core/DataCubeCodeCheckErrorAlert.js';\nexport class DataCubeEngine {\n layout = new LayoutManagerState();\n filterOperations = [\n new DataCubeQueryFilterOperation__LessThan(),\n new DataCubeQueryFilterOperation__LessThanOrEqual(),\n new DataCubeQueryFilterOperation__Equal(),\n new DataCubeQueryFilterOperation__NotEqual(),\n new DataCubeQueryFilterOperation__GreaterThanOrEqual(),\n new DataCubeQueryFilterOperation__GreaterThan(),\n new DataCubeQueryFilterOperation__IsNull(),\n new DataCubeQueryFilterOperation__IsNotNull(),\n new DataCubeQueryFilterOperation__EqualCaseInsensitive(),\n new DataCubeQueryFilterOperation__NotEqualCaseInsensitive(),\n new DataCubeQueryFilterOperation__Contain(),\n new DataCubeQueryFilterOperation__ContainCaseInsensitive(),\n new DataCubeQueryFilterOperation__NotContain(),\n new DataCubeQueryFilterOperation__StartWith(),\n new DataCubeQueryFilterOperation__StartWithCaseInsensitive(),\n new DataCubeQueryFilterOperation__NotStartWith(),\n new DataCubeQueryFilterOperation__EndWith(),\n new DataCubeQueryFilterOperation__EndWithCaseInsensitive(),\n new DataCubeQueryFilterOperation__NotEndWith(),\n new DataCubeQueryFilterOperation__LessThanColumn(),\n new DataCubeQueryFilterOperation__LessThanOrEqualColumn(),\n new DataCubeQueryFilterOperation__EqualColumn(),\n new DataCubeQueryFilterOperation__NotEqualColumn(),\n new DataCubeQueryFilterOperation__EqualCaseInsensitiveColumn(),\n new DataCubeQueryFilterOperation__NotEqualCaseInsensitiveColumn(),\n new DataCubeQueryFilterOperation__GreaterThanColumn(),\n new DataCubeQueryFilterOperation__GreaterThanOrEqualColumn(),\n ];\n aggregateOperations = [\n new DataCubeQueryAggregateOperation__Sum(),\n new DataCubeQueryAggregateOperation__Average(),\n new DataCubeQueryAggregateOperation__Count(),\n new DataCubeQueryAggregateOperation__Min(),\n new DataCubeQueryAggregateOperation__Max(),\n new DataCubeQueryAggregateOperation__UniqueValue(),\n new DataCubeQueryAggregateOperation__First(),\n new DataCubeQueryAggregateOperation__Last(),\n new DataCubeQueryAggregateOperation__VariancePopulation(),\n new DataCubeQueryAggregateOperation__VarianceSample(),\n new DataCubeQueryAggregateOperation__StdDevPopulation(),\n new DataCubeQueryAggregateOperation__StdDevSample(),\n new DataCubeQueryAggregateOperation__JoinStrings(),\n ];\n async fetchConfiguration() {\n return {\n gridClientLicense: undefined,\n };\n }\n async initialize() {\n const config = await this.fetchConfiguration();\n if (config.gridClientLicense) {\n LicenseManager.setLicenseKey(config.gridClientLicense);\n }\n await configureCodeEditor(DataCubeFont.ROBOTO_MONO, (error) => {\n throw error;\n });\n setupPureLanguageService({});\n }\n // ------------------------------- CORE OPERATIONS -------------------------------\n getFilterOperation(value) {\n return getFilterOperation(value, this.filterOperations);\n }\n getAggregateOperation(value) {\n return getAggregateOperation(value, this.aggregateOperations);\n }\n async getInitialInput() {\n return undefined;\n }\n /**\n * By default, for a function chain, Pure grammar composer will extract the first parameter of the first function\n * and render it as the caller of that function rather than a parameter\n * e.g. fx(fy(p1, p2), p3) will be rendered as p1->fy(p2)->fx(p3) instead of fy(p1, p2)-> fx(p3)\n *\n * We do a hack to get around this by setting a dummy value as the first parameter of the first function in the chain.\n * Then remove this dummy value from the final code.\n */\n async getPartialQueryCode(snapshot, pretty) {\n const source = new INTERNAL__DataCubeSource();\n source.query = _primitiveValue(PRIMITIVE_TYPE.STRING, '');\n return (await this.getValueSpecificationCode(buildExecutableQuery(snapshot, source, () => undefined, this.filterOperations, this.aggregateOperations), pretty)).substring(`''->`.length);\n }\n // ---------------------------------- DOCUMENTATION ----------------------------------\n getDocumentationURL() {\n return undefined;\n }\n getDocumentationEntry(key) {\n return undefined;\n }\n shouldDisplayDocumentationEntry(entry) {\n return false;\n }\n // ---------------------------------- LOGGING ----------------------------------\n logDebug(message, ...data) {\n // do nothing\n }\n debugProcess(processName, ...data) {\n // do nothing\n }\n logInfo(event, ...data) {\n // do nothing\n }\n logWarning(event, ...data) {\n // do nothing\n }\n logError(event, ...data) {\n // do nothing\n }\n logUnhandledError(error) {\n // do nothing\n }\n logIllegalStateError(message, error) {\n // do nothing\n }\n // ---------------------------------- ALERT ----------------------------------\n alert(options) {\n const { message, type, text, actions, windowTitle, windowConfig } = options;\n const window = new WindowState(new LayoutConfiguration(windowTitle ?? '', () => (_jsx(Alert, { type: type, message: message, text: text, actions: actions, onClose: () => this.layout.closeWindow(window) }))));\n window.configuration.window =\n windowConfig ?? DEFAULT_SMALL_ALERT_WINDOW_CONFIG;\n this.layout.newWindow(window);\n }\n alertError(error, options) {\n const { message, text, actions, windowTitle, windowConfig } = options;\n const window = new WindowState(new LayoutConfiguration(windowTitle ?? 'Error', () => (_jsx(Alert, { type: AlertType.ERROR, message: message, text: text, actions: actions }))));\n window.configuration.window =\n windowConfig ?? DEFAULT_SMALL_ALERT_WINDOW_CONFIG;\n this.layout.newWindow(window);\n }\n alertUnhandledError(error) {\n this.logUnhandledError(error);\n this.alertError(error, {\n message: error.message,\n });\n }\n alertCodeCheckError(error, code, codePrefix, options) {\n const { message, text, windowTitle, windowConfig } = options;\n // correct the source information since we added prefix to the code\n // and reveal error in the editor\n if (error.sourceInformation) {\n error.sourceInformation.startColumn -=\n error.sourceInformation.startLine === 1 ? codePrefix.length : 0;\n error.sourceInformation.endColumn -=\n error.sourceInformation.endLine === 1 ? codePrefix.length : 0;\n const editorModel = monacoEditorAPI.createModel(code, CODE_EDITOR_LANGUAGE.PURE, Uri.file(`/${uuid()}.pure`));\n const fullRange = editorModel.getFullModelRange();\n if (error.sourceInformation.startLine < 1 ||\n (error.sourceInformation.startLine === 1 &&\n error.sourceInformation.startColumn < 1) ||\n error.sourceInformation.endLine > fullRange.endLineNumber ||\n (error.sourceInformation.endLine === fullRange.endLineNumber &&\n error.sourceInformation.endColumn > fullRange.endColumn)) {\n error.sourceInformation.startColumn = fullRange.startColumn;\n error.sourceInformation.startLine = fullRange.startLineNumber;\n error.sourceInformation.endColumn = fullRange.endColumn;\n error.sourceInformation.endLine = fullRange.endLineNumber;\n }\n const window = new WindowState(new LayoutConfiguration(windowTitle ?? 'Error', () => (_jsx(DataCubeCodeCheckErrorAlert, { editorModel: editorModel, error: error, message: message, text: text }))));\n window.configuration.window = windowConfig ?? {\n width: 500,\n height: 400,\n minWidth: 300,\n minHeight: 300,\n center: true,\n };\n this.layout.newWindow(window);\n }\n }\n // ---------------------------------- MISC ----------------------------------\n openLink(url) {\n // do nothing\n }\n sendTelemetry(event, data) {\n // do nothing\n }\n}\n//# sourceMappingURL=DataCubeEngine.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { guaranteeNonNullable, isString, uuid } from '@finos/legend-shared';\n// Core\nexport var BuilderType;\n(function (BuilderType) {\n BuilderType[\"CLASS_BUILDER\"] = \"classBuilder\";\n BuilderType[\"TDS_BUILDER\"] = \"tdsBuilder\";\n BuilderType[\"JSON_BUILDER\"] = \"json\";\n})(BuilderType || (BuilderType = {}));\nexport var ExecutionActivityType;\n(function (ExecutionActivityType) {\n ExecutionActivityType[\"RELATIONAL\"] = \"relational\";\n ExecutionActivityType[\"RELATIONAL_EXECUTION_ACTIVITY\"] = \"RelationalExecutionActivity\";\n ExecutionActivityType[\"AGGREGATION_AWARE_ACTIVITY\"] = \"aggregationAware\";\n})(ExecutionActivityType || (ExecutionActivityType = {}));\n// TODO: Refactor to use external format (https://github.com/finos/legend-studio/issues/732)\nexport var EXECUTION_SERIALIZATION_FORMAT;\n(function (EXECUTION_SERIALIZATION_FORMAT) {\n EXECUTION_SERIALIZATION_FORMAT[\"CSV\"] = \"CSV\";\n})(EXECUTION_SERIALIZATION_FORMAT || (EXECUTION_SERIALIZATION_FORMAT = {}));\nexport class ResultBuilder {\n _type;\n constructor(type) {\n this._type = type;\n }\n}\n// ------------------------------------------ Execution Activities -----------------------------------------------\nexport class ExecutionActivities {\n}\nexport class RelationalExecutionActivities extends ExecutionActivities {\n sql;\n comment;\n constructor(sql) {\n super();\n this.sql = sql;\n }\n}\nexport class AggregationAwareActivities extends ExecutionActivities {\n rewrittenQuery;\n}\nexport class UnknownExecutionActivities extends ExecutionActivities {\n values;\n constructor(content) {\n super();\n this.values = content;\n }\n}\nexport class ExecutionResult {\n builder;\n activities;\n}\n// ------------------------------------------ Model -----------------------------------------------\nexport class JsonBuilder {\n _type = BuilderType.JSON_BUILDER;\n}\nexport class JsonExecutionResult extends ExecutionResult {\n values;\n}\nexport class RawExecutionResult extends ExecutionResult {\n value;\n constructor(content) {\n super();\n this.value = content;\n }\n}\n// ------------------------------------------ TDS -----------------------------------------------\n/**\n * TODO?: maybe we converge to use TDSColumn\n *\n * Since here, we're building out the result builder config, we don't need\n * to fully resolve all the references, hence we have this simplified version of TDSColumn\n */\nexport class INTERNAL__TDSColumn {\n name;\n type;\n relationalType;\n doc;\n}\nexport class TDSBuilder extends ResultBuilder {\n columns = [];\n constructor() {\n super(BuilderType.TDS_BUILDER);\n }\n}\nexport class TDSRow {\n values = [];\n}\nexport class TabularDataSet {\n columns = [];\n rows = [];\n}\nexport class TDSExecutionResult extends ExecutionResult {\n _UUID = uuid();\n builder = new TDSBuilder();\n result = new TabularDataSet();\n}\nexport class ClassBuilder extends ResultBuilder {\n _type = BuilderType.CLASS_BUILDER;\n}\nexport class ClassExecutionResult extends ExecutionResult {\n builder = new ClassBuilder(BuilderType.CLASS_BUILDER);\n objects;\n}\nexport const getTDSRowRankByColumnInAsc = (a, b, colIndex) => {\n const a1 = a.values[colIndex];\n const b1 = b.values[colIndex];\n if (a1 === null || a1 === undefined) {\n return -1;\n }\n if (b1 === null || b1 === undefined) {\n return 1;\n }\n if (isString(a1) && isString(b1)) {\n return a1.localeCompare(b1);\n }\n else {\n return Number(guaranteeNonNullable(a1)) - Number(guaranteeNonNullable(b1));\n }\n};\n//# sourceMappingURL=ExecutionResult.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createModelSchema, custom, list, optional, primitive, raw, SKIP, } from 'serializr';\nimport { SerializationFactory, usingModelSchema, } from '@finos/legend-shared';\nimport { ExecutionActivityType } from '../../../../../../graph-manager/action/execution/ExecutionResult.js';\nexport const V1_EXECUTION_RESULT = 'executionResult';\nexport const V1_ZIPKIN_TRACE_HEADER = 'x-b3-traceid';\nexport const V1_DELEGATED_EXPORT_HEADER = 'x-legend-delegated-export';\nexport class V1_ResultBuilder {\n static builderSerialization = new SerializationFactory(createModelSchema(V1_ResultBuilder, {\n _type: primitive(),\n }));\n}\nexport class V1_ExecutionActivities {\n}\nexport class V1_RelationalExecutionActivities extends V1_ExecutionActivities {\n sql;\n comment;\n static serialization = new SerializationFactory(createModelSchema(V1_RelationalExecutionActivities, {\n sql: primitive(),\n comment: optional(primitive()),\n }));\n}\nexport class V1_AggregationAwareActivities extends V1_ExecutionActivities {\n rewrittenQuery;\n static serialization = new SerializationFactory(createModelSchema(V1_AggregationAwareActivities, {\n rewrittenQuery: primitive(),\n }));\n}\nexport class V1_ExecutionResult {\n builder;\n activities;\n}\nexport class V1_UnknownExecutionActivity extends V1_ExecutionActivities {\n content;\n constructor(content) {\n super();\n this.content = content;\n }\n}\nexport class V1_JsonExecutionResult extends V1_ExecutionResult {\n values;\n static serialization = new SerializationFactory(createModelSchema(V1_JsonExecutionResult, {\n _type: primitive(),\n builder: usingModelSchema(V1_ResultBuilder.builderSerialization.schema),\n values: raw(),\n }));\n}\n/**\n * TODO?: maybe we converge to use V1_TDSColumn\n *\n * Since here, we're building out the result builder config, we don't need\n * to fully resolve all the references, hence we have this simplified version of V1_TDSColumn\n */\nexport class V1_INTERNAL__TDSColumn {\n name;\n doc;\n type;\n relationalType;\n static serialization = new SerializationFactory(createModelSchema(V1_INTERNAL__TDSColumn, {\n name: primitive(),\n doc: optional(primitive()),\n type: optional(primitive()),\n relationalType: optional(primitive()),\n }));\n}\nexport class V1_TDSBuilder extends V1_ResultBuilder {\n columns = [];\n static serialization = new SerializationFactory(createModelSchema(V1_TDSBuilder, {\n _type: primitive(),\n columns: list(usingModelSchema(V1_INTERNAL__TDSColumn.serialization.schema)),\n }));\n}\nfunction V1_serializeExecutionActivities(value) {\n switch (value._type) {\n case ExecutionActivityType.RELATIONAL:\n return V1_RelationalExecutionActivities.serialization.fromJson(value);\n case ExecutionActivityType.RELATIONAL_EXECUTION_ACTIVITY:\n return V1_RelationalExecutionActivities.serialization.fromJson(value);\n case ExecutionActivityType.AGGREGATION_AWARE_ACTIVITY:\n return V1_AggregationAwareActivities.serialization.fromJson(value);\n default:\n return new V1_UnknownExecutionActivity(value);\n }\n}\nexport class V1_TDSExecutionResult extends V1_ExecutionResult {\n result;\n static serialization = new SerializationFactory(createModelSchema(V1_TDSExecutionResult, {\n builder: usingModelSchema(V1_TDSBuilder.serialization.schema),\n activities: list(custom(() => SKIP, V1_serializeExecutionActivities)),\n result: raw(),\n }));\n}\nexport class V1_ClassExecutionResult extends V1_ExecutionResult {\n objects;\n static serialization = new SerializationFactory(createModelSchema(V1_ClassExecutionResult, {\n builder: usingModelSchema(V1_ResultBuilder.builderSerialization.schema),\n activities: list(custom(() => SKIP, V1_serializeExecutionActivities)),\n objects: raw(),\n }));\n}\nexport class V1_RawExecutionResult extends V1_ExecutionResult {\n value;\n constructor(value) {\n super();\n this.value = value;\n }\n}\n//# sourceMappingURL=V1_ExecutionResult.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_ExecutionResult } from './V1_ExecutionResult.js';\nexport class V1_INTERNAL__UnknownExecutionResult extends V1_ExecutionResult {\n content;\n}\n//# sourceMappingURL=V1_INTERNAL__UnknownExecutionResult.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ExecutionResult } from './ExecutionResult.js';\nexport class INTERNAL__UnknownExecutionResult extends ExecutionResult {\n content;\n}\n//# sourceMappingURL=INTERNAL__UnknownExecutionResult.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { guaranteeNonNullable, UnsupportedOperationError, isString, isNumber, isBoolean, } from '@finos/legend-shared';\nimport { TDSRow, ClassExecutionResult, JsonExecutionResult, TDSExecutionResult, TDSBuilder, INTERNAL__TDSColumn, RawExecutionResult, RelationalExecutionActivities, UnknownExecutionActivities, AggregationAwareActivities, BuilderType, } from '../../../../../../graph-manager/action/execution/ExecutionResult.js';\nimport { V1_ClassExecutionResult, V1_JsonExecutionResult, V1_TDSExecutionResult, V1_RawExecutionResult, V1_RelationalExecutionActivities, V1_UnknownExecutionActivity, V1_AggregationAwareActivities, } from './V1_ExecutionResult.js';\nimport { V1_INTERNAL__UnknownExecutionResult } from './V1_INTERNAL__UnknownExecutionResult.js';\nimport { INTERNAL__UnknownExecutionResult } from '../../../../../action/execution/INTERNAL__UnknownExecutionResult.js';\nconst buildExecutionActivities = (protocol) => {\n if (protocol instanceof V1_RelationalExecutionActivities) {\n const metamodel = new RelationalExecutionActivities(protocol.sql);\n metamodel.comment = protocol.comment;\n return metamodel;\n }\n else if (protocol instanceof V1_AggregationAwareActivities) {\n const metamodel = new AggregationAwareActivities();\n metamodel.rewrittenQuery = guaranteeNonNullable(protocol.rewrittenQuery, `Aggregation aware execution activities 'rewritenQuery' field is missing`);\n return metamodel;\n }\n else if (protocol instanceof V1_UnknownExecutionActivity) {\n const metamodel = new UnknownExecutionActivities(protocol);\n return metamodel;\n }\n throw new UnsupportedOperationError(`Can't build execution activities`, protocol);\n};\nconst buildJSONExecutionResult = (protocol) => {\n const metamodel = new JsonExecutionResult();\n metamodel.values = guaranteeNonNullable(protocol.values, `JSON execution result 'values' field is missing`);\n return metamodel;\n};\nconst INTERNAL__buildTDSColumn = (protocol) => {\n const metamodel = new INTERNAL__TDSColumn();\n metamodel.name = guaranteeNonNullable(protocol.name, `TDS column 'name' field is missing`);\n metamodel.type = protocol.type;\n metamodel.doc = protocol.doc;\n metamodel.relationalType = protocol.relationalType;\n return metamodel;\n};\nconst buildTDSBuilder = (protocol) => {\n const builder = new TDSBuilder();\n builder.columns = protocol.columns.map(INTERNAL__buildTDSColumn);\n return builder;\n};\nconst buildTDSExecutionResult = (protocol) => {\n const metamodel = new TDSExecutionResult();\n metamodel.builder = buildTDSBuilder(guaranteeNonNullable(protocol.builder, `TDS execution result 'builder' field is missing`));\n metamodel.activities = protocol.activities?.map(buildExecutionActivities);\n metamodel.result.columns = protocol.result.columns;\n metamodel.result.rows = protocol.result.rows.map((_row) => {\n const row = new TDSRow();\n row.values = _row.values;\n return row;\n });\n return metamodel;\n};\nconst buildClassExecutionResult = (protocol) => {\n const metamodel = new ClassExecutionResult();\n metamodel.objects = guaranteeNonNullable(protocol.objects, `Class execution result 'objects' field is missing`);\n metamodel.activities = protocol.activities?.map(buildExecutionActivities);\n return metamodel;\n};\nexport const V1_buildExecutionResult = (protocol) => {\n if (protocol instanceof V1_INTERNAL__UnknownExecutionResult) {\n const metamodel = new INTERNAL__UnknownExecutionResult();\n metamodel.content = protocol.content;\n return metamodel;\n }\n else if (protocol instanceof V1_ClassExecutionResult) {\n return buildClassExecutionResult(protocol);\n }\n else if (protocol instanceof V1_TDSExecutionResult) {\n return buildTDSExecutionResult(protocol);\n }\n else if (protocol instanceof V1_JsonExecutionResult) {\n return buildJSONExecutionResult(protocol);\n }\n else if (protocol instanceof V1_RawExecutionResult) {\n return new RawExecutionResult(protocol.value);\n }\n throw new UnsupportedOperationError(`Can't build execution result`, protocol);\n};\nexport const V1_serializeExecutionResult = (json) => {\n if (json === null || isString(json) || isNumber(json) || isBoolean(json)) {\n return new V1_RawExecutionResult(json);\n }\n switch (json.builder?._type) {\n case BuilderType.CLASS_BUILDER:\n return V1_ClassExecutionResult.serialization.fromJson(json);\n case BuilderType.TDS_BUILDER:\n return V1_TDSExecutionResult.serialization.fromJson(json);\n case BuilderType.JSON_BUILDER:\n return V1_JsonExecutionResult.serialization.fromJson(json);\n default: {\n // Fall back to create unknown stub if not supported\n const protocol = new V1_INTERNAL__UnknownExecutionResult();\n protocol.content = json;\n return protocol;\n }\n }\n};\n//# sourceMappingURL=V1_ExecutionHelper.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DataCubeSource } from '@finos/legend-data-cube';\nexport class LegendREPLDataCubeSource extends DataCubeSource {\n runtime;\n mapping;\n timestamp;\n}\n//# sourceMappingURL=LegendREPLDataCubeSource.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { GetBaseQueryResult, } from './LegendREPLServerClient.js';\nimport { _elementPtr, _function, _lambda, DataCubeEngine, DataCubeFunction, } from '@finos/legend-data-cube';\nimport { TDSExecutionResult, V1_buildExecutionResult, V1_deserializeValueSpecification, V1_serializeExecutionResult, V1_serializeValueSpecification, } from '@finos/legend-graph';\nimport { guaranteeType, isNonNullable, LogEvent, } from '@finos/legend-shared';\nimport { LegendREPLDataCubeSource } from './LegendREPLDataCubeSource.js';\nimport { APPLICATION_EVENT, shouldDisplayVirtualAssistantDocumentationEntry, } from '@finos/legend-application';\nexport class LegendREPLDataCubeEngine extends DataCubeEngine {\n application;\n client;\n constructor(application, client) {\n super();\n this.application = application;\n this.client = client;\n }\n blockNavigation(blockCheckers, onBlock, onNativePlatformNavigationBlock) {\n this.application.navigationService.navigator.blockNavigation(blockCheckers, onBlock, onNativePlatformNavigationBlock);\n }\n unblockNavigation() {\n this.application.navigationService.navigator.unblockNavigation();\n }\n persistSettingValue(key, value) {\n this.application.settingService.persistValue(key, value);\n }\n // ---------------------------------- IMPLEMENTATION ----------------------------------\n async fetchConfiguration() {\n const info = await this.client.getInfrastructureInfo();\n return {\n gridClientLicense: info.gridClientLicense,\n };\n }\n async getInitialInput() {\n const baseQuery = GetBaseQueryResult.serialization.fromJson(await this.client.getBaseQuery());\n const source = new LegendREPLDataCubeSource();\n source.mapping = baseQuery.source.mapping;\n source.query = await this.parseValueSpecification(baseQuery.source.query, false);\n source.runtime = baseQuery.source.runtime;\n source.timestamp = baseQuery.source.timestamp;\n source.sourceColumns = (await this.getQueryRelationType(_lambda([], [source.query]), source)).columns;\n return {\n query: baseQuery.query,\n source,\n };\n }\n async parseValueSpecification(code, returnSourceInformation) {\n return V1_deserializeValueSpecification(await this.client.parseValueSpecification({\n code,\n returnSourceInformation,\n }), []);\n }\n getValueSpecificationCode(value, pretty) {\n return this.client.getValueSpecificationCode({\n value: V1_serializeValueSpecification(value, []),\n pretty,\n });\n }\n async getQueryTypeahead(code, baseQuery, source) {\n return this.client.getQueryTypeahead({\n code,\n baseQuery: V1_serializeValueSpecification(baseQuery, []),\n });\n }\n async getQueryRelationType(query, source) {\n return this.client.getQueryRelationReturnType({\n query: V1_serializeValueSpecification(query, []),\n });\n }\n async getQueryCodeRelationReturnType(code, baseQuery, source) {\n return this.client.getQueryCodeRelationReturnType({\n code,\n baseQuery: V1_serializeValueSpecification(baseQuery, []),\n });\n }\n async executeQuery(query, source, api) {\n const result = await this.client.executeQuery({\n query: V1_serializeValueSpecification(query, []),\n debug: api.getSettings().enableDebugMode,\n });\n return {\n result: guaranteeType(V1_buildExecutionResult(V1_serializeExecutionResult(JSON.parse(result.result))), TDSExecutionResult),\n executedQuery: result.executedQuery,\n executedSQL: result.executedSQL,\n };\n }\n buildExecutionContext(source) {\n if (source instanceof LegendREPLDataCubeSource) {\n return _function(DataCubeFunction.FROM, [\n source.mapping ? _elementPtr(source.mapping) : undefined,\n _elementPtr(source.runtime),\n ].filter(isNonNullable));\n }\n return undefined;\n }\n getDocumentationURL() {\n return this.application.documentationService.url;\n }\n getDocumentationEntry(key) {\n return this.application.documentationService.getDocEntry(key);\n }\n shouldDisplayDocumentationEntry(entry) {\n return shouldDisplayVirtualAssistantDocumentationEntry(entry);\n }\n openLink(url) {\n this.application.navigationService.navigator.visitAddress(url);\n }\n sendTelemetry(event, data) {\n this.application.telemetryService.logEvent(event, data);\n }\n logDebug(message, ...data) {\n this.application.logService.debug(LogEvent.create(APPLICATION_EVENT.DEBUG), message, ...data);\n }\n debugProcess(processName, ...data) {\n this.application.logService.debug(LogEvent.create(APPLICATION_EVENT.DEBUG), `\\n------ START DEBUG PROCESS: ${processName} ------`, ...data.flatMap(([key, value]) => [`\\n[${key.toUpperCase()}]:`, value]), `\\n------- END DEBUG PROCESS: ${processName} -------\\n\\n`);\n }\n logInfo(event, ...data) {\n this.application.logService.info(event, ...data);\n }\n logWarning(event, ...data) {\n this.application.logService.warn(event, ...data);\n }\n logError(event, ...data) {\n this.application.logService.error(event, ...data);\n }\n logUnhandledError(error) {\n this.application.logUnhandledError(error);\n }\n logIllegalStateError(message, error) {\n this.logError(LogEvent.create(APPLICATION_EVENT.ILLEGAL_APPLICATION_STATE_OCCURRED), message, error);\n }\n}\n//# sourceMappingURL=LegendREPLDataCubeEngine.js.map","import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useEffect, useRef, useState } from 'react';\nimport { BaseMenu, BaseMenuItem, Menu } from './BaseMenu.js';\nexport const ControlledDropdownMenu = (props) => {\n const { open, className, children, menuProps, content, title, disabled, onClose, onOpen, useCapture, } = props;\n const triggerRef = useRef(null);\n const [anchorEl, setAnchorEl] = useState(null);\n const onTriggerClick = (event) => {\n event.stopPropagation();\n event.preventDefault();\n if (disabled) {\n return;\n }\n if (triggerRef.current) {\n onOpen?.();\n setAnchorEl(triggerRef.current);\n }\n };\n // if the menu is forced to open or close, set the anchor accordinly\n // NOTE: unlike normal clicking on the trigger, this way of forcing the menu to open will require\n // to call `onClose` explicitly\n useEffect(() => {\n if (open !== undefined) {\n if (open && !anchorEl && triggerRef.current) {\n setAnchorEl(triggerRef.current);\n }\n else if (!open && anchorEl) {\n setAnchorEl(null);\n }\n }\n }, [anchorEl, open]);\n return (_jsxs(_Fragment, { children: [_jsx(\"button\", { ref: triggerRef, className: className, disabled: disabled, ...(useCapture\n ? {\n onClickCapture: onTriggerClick,\n onClick: (event) => {\n event.stopPropagation();\n },\n }\n : { onClick: onTriggerClick }), title: title, children: children }), _jsx(Menu, { anchorOrigin: { vertical: 'bottom', horizontal: 'right' }, transformOrigin: { vertical: 'top', horizontal: 'right' }, anchorEl: anchorEl, open: (open === undefined || Boolean(open)) && Boolean(anchorEl), slotProps: {\n root: {\n slotProps: {\n backdrop: {\n invisible: true,\n },\n },\n },\n }, elevation: 0, marginThreshold: 0, disableRestoreFocus: true, hideBackdrop: true, transitionDuration: 0, onClick: () => {\n onClose?.();\n setAnchorEl(null);\n }, ...menuProps, children: content })] }));\n};\nexport function useDropdownMenu() {\n const [anchorEl, setAnchorEl] = useState(null);\n return [\n (event) => setAnchorEl(event.currentTarget),\n () => setAnchorEl(null),\n {\n anchorEl,\n onClose: () => setAnchorEl(null),\n },\n Boolean(anchorEl),\n ];\n}\nexport function DropdownMenu(props) {\n const { menuProps, children, onClosed, onClose, anchorEl } = props;\n // Make sure the first time the menu is opened, we don't trigger onLeave\n const [hasBeenOpened, setHasBeenOpened] = useState(false);\n useEffect(() => {\n if (hasBeenOpened && !anchorEl) {\n onClosed?.();\n }\n }, [anchorEl, hasBeenOpened, onClosed]);\n if (!anchorEl) {\n return null;\n }\n return (_jsx(BaseMenu, { anchorOrigin: { vertical: 'bottom', horizontal: 'right' }, transformOrigin: { vertical: 'top', horizontal: 'right' }, anchorEl: anchorEl, open: Boolean(anchorEl), slotProps: {\n root: {\n slotProps: {\n backdrop: {\n invisible: true,\n },\n },\n },\n }, elevation: 1, marginThreshold: 0, transitionDuration: 0, TransitionProps: {\n onEnter: () => setHasBeenOpened(true),\n }, onClose: onClose, ...menuProps, children: children }));\n}\nexport function DropdownMenuItem(props) {\n return (_jsx(BaseMenuItem, { ...props, style: {\n cursor: 'default',\n } }));\n}\n//# sourceMappingURL=DropdownMenu.js.map","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useState } from 'react';\nimport { DataCubeIcon, ResizableAndDraggableBox, cn } from '@finos/legend-art';\nimport { WINDOW_DEFAULT_HEIGHT, WINDOW_DEFAULT_MIN_HEIGHT, WINDOW_DEFAULT_MIN_WIDTH, WINDOW_DEFAULT_OFFSET, WINDOW_DEFAULT_WIDTH, } from '../../stores/core/DataCubeLayoutManagerState.js';\nimport { observer } from 'mobx-react-lite';\nexport const Window = (props) => {\n const { parent, layout, windowState } = props;\n const configuration = windowState.configuration.window;\n const [windowSpec, setWindowSpec] = useState(() => {\n const x = configuration.x ?? WINDOW_DEFAULT_OFFSET;\n const y = configuration.y ?? WINDOW_DEFAULT_OFFSET;\n const width = configuration.width ?? WINDOW_DEFAULT_WIDTH;\n const height = configuration.height ?? WINDOW_DEFAULT_HEIGHT;\n const parentElement = parent?.current ?? document.body;\n const { width: containerWidth, height: containerHeight } = parentElement.getBoundingClientRect();\n if (configuration.center) {\n const finalWidth = width + WINDOW_DEFAULT_OFFSET * 2 > containerWidth\n ? containerWidth - WINDOW_DEFAULT_OFFSET * 2\n : width;\n const finalHeight = height + WINDOW_DEFAULT_OFFSET * 2 > containerHeight\n ? containerHeight - WINDOW_DEFAULT_OFFSET * 2\n : height;\n return {\n x: (containerWidth - finalWidth) / 2,\n y: (containerHeight - finalHeight) / 2,\n width: finalWidth,\n height: finalHeight,\n };\n }\n const finalWidth = width + Math.abs(x) + WINDOW_DEFAULT_OFFSET > containerWidth\n ? containerWidth - Math.abs(x) - WINDOW_DEFAULT_OFFSET\n : width;\n const finalHeight = height + Math.abs(y) + WINDOW_DEFAULT_OFFSET > containerHeight\n ? containerHeight - Math.abs(y) - WINDOW_DEFAULT_OFFSET\n : height;\n return {\n x: x < 0 ? containerWidth - Math.abs(x) - finalWidth : x,\n y: y < 0 ? containerHeight - Math.abs(y) - finalHeight : y,\n width: finalWidth,\n height: finalHeight,\n };\n });\n return (_jsx(ResizableAndDraggableBox, { className: \"absolute z-10\", handle: `.data-cube__window-${windowState.uuid}`, position: { x: windowSpec.x, y: windowSpec.y }, size: { width: windowSpec.width, height: windowSpec.height }, minWidth: configuration.minWidth ?? WINDOW_DEFAULT_MIN_WIDTH, minHeight: configuration.minHeight ?? WINDOW_DEFAULT_MIN_HEIGHT, onDragStop: (event, data) => {\n setWindowSpec({ ...windowSpec, x: data.x, y: data.y });\n }, dragHandleClassName: `data-cube__window-${windowState.uuid}`, onResize: (event, direction, ref, delta, position) => {\n setWindowSpec({\n ...position,\n width: ref.offsetWidth,\n height: ref.offsetHeight,\n });\n }, enableResizing: {\n top: true,\n right: true,\n bottom: true,\n left: true,\n topRight: true,\n bottomRight: true,\n bottomLeft: true,\n topLeft: true,\n }, resizeHandleStyles: {\n top: { cursor: 'ns-resize' },\n right: { cursor: 'ew-resize' },\n bottom: { cursor: 'ns-resize' },\n left: { cursor: 'ew-resize' },\n topRight: {\n cursor: 'nesw-resize',\n width: 14,\n height: 14,\n top: -7,\n right: -7,\n },\n bottomRight: {\n cursor: 'nwse-resize',\n width: 14,\n height: 14,\n bottom: -7,\n right: -7,\n },\n bottomLeft: {\n cursor: 'nesw-resize',\n width: 14,\n height: 14,\n bottom: -7,\n left: -7,\n },\n topLeft: {\n cursor: 'nwse-resize',\n width: 14,\n height: 14,\n top: -7,\n left: -7,\n },\n }, children: _jsxs(\"div\", { className: \"h-full w-full border border-neutral-400 bg-neutral-200 shadow-xl\", onMouseDown: () => {\n layout.bringWindowFront(windowState);\n }, children: [_jsxs(\"div\", { className: cn(`data-cube__window-${windowState.uuid}`, 'flex h-6 w-full select-none items-center justify-between border-b border-b-neutral-300 bg-white active:cursor-move'), children: [_jsx(\"div\", { className: \"px-2\", children: windowState.configuration.title }), _jsx(\"button\", { className: \"flex h-[23px] w-6 items-center justify-center hover:bg-red-500 hover:text-white\", onClick: () => layout.closeWindow(windowState), children: _jsx(DataCubeIcon.X, {}) })] }), _jsx(\"div\", { className: \"h-[calc(100%_-_24px)] w-full\", children: windowState.configuration.contentRenderer(windowState.configuration) })] }) }));\n};\nexport const DataCubeLayoutManager = observer((props) => {\n const { layout } = props;\n return (_jsx(_Fragment, { children: layout.windows.map((windowState) => (_jsx(Window, { layout: layout, windowState: windowState }, windowState.uuid))) }));\n});\n//# sourceMappingURL=DataCubeLayoutManager.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_AppliedFunction, V1_ClassInstance, V1_ColSpec, V1_ColSpecArray, extractElementNameFromPath as _name, matchFunctionName, } from '@finos/legend-graph';\nimport {} from './models/DataCubeColumn.js';\nimport { assertTrue, assertType, guaranteeNonNullable, guaranteeType, } from '@finos/legend-shared';\nimport { TREE_COLUMN_VALUE_SEPARATOR } from './DataCubeQueryEngine.js';\n// --------------------------------- UTILITIES ---------------------------------\nexport function _param(func, paramIdx, clazz) {\n assertTrue(func.parameters.length >= paramIdx + 1, `Can't process ${_name(func.function)}: Expected at least ${paramIdx + 1} parameter(s)`);\n return guaranteeType(func.parameters[paramIdx], clazz, `Can't process ${_name(func.function)}: Found unexpected type for parameter at index ${paramIdx}`);\n}\nexport function _colSpecParam(func, paramIdx) {\n return guaranteeType(_param(func, paramIdx, V1_ClassInstance).value, V1_ColSpec, `Can't process ${_name(func.function)}: Expected parameter at index ${paramIdx} to be a column specification`);\n}\nexport function _colSpecArrayParam(func, paramIdx) {\n return guaranteeType(_param(func, paramIdx, V1_ClassInstance).value, V1_ColSpecArray, `Can't process ${_name(func.function)}: Expected parameter at index ${paramIdx} to be a column specification list`);\n}\nexport function _funcMatch(value, functionNames) {\n assertType(value, V1_AppliedFunction, `Can't process function: Found unexpected value specification type`);\n assertTrue(matchFunctionName(value.function, Array.isArray(functionNames) ? functionNames : [functionNames]), `Can't process function: Expected function name to be one of [${Array.isArray(functionNames) ? functionNames.join(', ') : functionNames}]`);\n return value;\n}\n// --------------------------------- BUILDING BLOCKS ---------------------------------\n/**\n * This method prunes expanded paths that are no longer valid due to changes in group by columns.\n * It finds the last common group by column between the previous and current group by columns and\n * prune the expanded paths beyond that point.\n */\nexport function _pruneExpandedPaths(prevGroupByCols, currentGroupByCols, expandedPaths) {\n const length = Math.min(prevGroupByCols.length, currentGroupByCols.length);\n if (!length) {\n return [];\n }\n let lastCommonIndex = -1;\n for (let i = 0; i < length; i++) {\n if (guaranteeNonNullable(prevGroupByCols[i]).name !==\n guaranteeNonNullable(currentGroupByCols[i]).name ||\n guaranteeNonNullable(prevGroupByCols[i]).type !==\n guaranteeNonNullable(currentGroupByCols[i]).type) {\n break;\n }\n lastCommonIndex = i;\n }\n return expandedPaths\n .filter((path) => path.split(TREE_COLUMN_VALUE_SEPARATOR).length <= lastCommonIndex + 1)\n .sort();\n}\n//# sourceMappingURL=DataCubeQuerySnapshotBuilderUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { PRIMITIVE_TYPE, V1_ClassInstance, V1_ColSpecArray, V1_GenericTypeInstance, } from '@finos/legend-graph';\nimport {} from '../../core/DataCubeQuerySnapshot.js';\nimport { DataCubeQueryFilterGroupOperator, DataCubeQueryFilterOperator, DataCubeFunction, isPivotResultColumnName, PIVOT_COLUMN_NAME_VALUE_SEPARATOR, DataCubeQuerySortDirection, } from '../../core/DataCubeQueryEngine.js';\nimport { guaranteeNonNullable, guaranteeType, isNullable, uniq, } from '@finos/legend-shared';\nimport { _groupByAggCols, _colSpec, _cols, _filter, _function, _lambda, _var, _functionCompositionUnProcessor, _property, _collection, _col, } from '../../core/DataCubeQueryBuilderUtils.js';\nimport { INTERNAL__GRID_CLIENT_MISSING_VALUE, INTERNAL__GRID_CLIENT_ROW_GROUPING_COUNT_AGG_COLUMN_ID, } from './DataCubeGridClientEngine.js';\nimport { _colSpecArrayParam } from '../../core/DataCubeQuerySnapshotBuilderUtils.js';\n/*****************************************************************************\n * [GRID]\n *\n * These are utilities used to build adhoc executable queries for fetching\n * data for the grid. The grid comes with features that requires building\n * slight modifications of the persistent query that would be generated from\n * the snapshot, such as in the case of pagination, drilldown (group by).\n *****************************************************************************/\n// --------------------------------- BUILDING BLOCKS ---------------------------------\nfunction _aggCountCol() {\n const variable = _var();\n return _colSpec(INTERNAL__GRID_CLIENT_ROW_GROUPING_COUNT_AGG_COLUMN_ID, _lambda([variable], [variable]), _lambda([variable], [_function(DataCubeFunction.COUNT, [variable])]));\n}\nfunction _aggCountCastCol(colName) {\n const variable = _var();\n return _colSpec(colName, _lambda([variable], [_property(colName, variable)]), _lambda([variable], [_function(DataCubeFunction.SUM, [variable])]));\n}\n// if pivot is present, modify pivot and pivot cast expressions to include\n// count aggregation columns.\nfunction _addCountAggColumnToPivot(funcMap, countAggColumns) {\n if (funcMap.pivot && funcMap.pivotCast) {\n _colSpecArrayParam(funcMap.pivot, 1).colSpecs.push(_aggCountCol());\n const castColumns = guaranteeType(guaranteeType(guaranteeType(funcMap.pivotCast.parameters[0], V1_GenericTypeInstance)\n .typeArguments[0], V1_ClassInstance).value, V1_ColSpecArray).colSpecs;\n uniq(castColumns\n .filter((col) => isPivotResultColumnName(col.name))\n .map((col) => col.name.substring(0, col.name.lastIndexOf(PIVOT_COLUMN_NAME_VALUE_SEPARATOR))))\n .map((col) => col +\n PIVOT_COLUMN_NAME_VALUE_SEPARATOR +\n INTERNAL__GRID_CLIENT_ROW_GROUPING_COUNT_AGG_COLUMN_ID)\n .map((col) => _colSpec(col, undefined, undefined, PRIMITIVE_TYPE.INTEGER))\n .forEach((col) => {\n castColumns.push(col);\n countAggColumns.push(col);\n });\n }\n}\n// --------------------------------- MAIN ---------------------------------\nexport function generateRowGroupingDrilldownExecutableQueryPostProcessor(drilldownValues) {\n return (snapshot, sequence, funcMap, configuration, filterOperations, aggregateOperations) => {\n const _unprocess = _functionCompositionUnProcessor(sequence, funcMap);\n const data = snapshot.data;\n if (funcMap.groupBy) {\n // --------------------------------- GROUP BY ---------------------------------\n const groupBy = guaranteeNonNullable(data.groupBy);\n // if any level of drilldown has been done\n // add a pre-filter to groupBy()\n if (drilldownValues.length) {\n sequence.splice(sequence.indexOf(funcMap.groupBy), 0, _function(DataCubeFunction.FILTER, [\n _lambda([_var()], [\n _filter({\n conditions: drilldownValues.map((value, i) => {\n const groupByColumn = guaranteeNonNullable(groupBy.columns[i]);\n if (isNullable(value) ||\n value === INTERNAL__GRID_CLIENT_MISSING_VALUE) {\n return {\n ...groupByColumn,\n operator: DataCubeQueryFilterOperator.IS_NULL,\n value: undefined,\n };\n }\n const condition = {\n ...groupByColumn,\n operator: DataCubeQueryFilterOperator.EQUAL,\n value: undefined,\n };\n switch (groupByColumn.type) {\n case PRIMITIVE_TYPE.BOOLEAN:\n return {\n ...condition,\n value: {\n type: PRIMITIVE_TYPE.BOOLEAN,\n value: value === 'true',\n },\n };\n case PRIMITIVE_TYPE.INTEGER:\n return {\n ...condition,\n value: {\n type: groupByColumn.type,\n value: parseInt(value, 10),\n },\n };\n case PRIMITIVE_TYPE.NUMBER:\n case PRIMITIVE_TYPE.DECIMAL:\n case PRIMITIVE_TYPE.FLOAT:\n return {\n ...condition,\n value: {\n type: groupByColumn.type,\n value: parseFloat(value),\n },\n };\n case PRIMITIVE_TYPE.STRING:\n case PRIMITIVE_TYPE.DATE:\n case PRIMITIVE_TYPE.DATETIME:\n case PRIMITIVE_TYPE.STRICTDATE:\n case PRIMITIVE_TYPE.STRICTTIME:\n default:\n return {\n ...condition,\n value: { type: groupByColumn.type, value },\n };\n }\n }),\n groupOperator: DataCubeQueryFilterGroupOperator.AND,\n }, filterOperations),\n ]),\n ]));\n }\n // modify groupBy() based off the current drilldown level\n if (drilldownValues.length < groupBy.columns.length) {\n const countAggColumns = [];\n _addCountAggColumnToPivot(funcMap, countAggColumns);\n const groupByIdx = sequence.indexOf(funcMap.groupBy);\n const groupByColumns = groupBy.columns.slice(0, drilldownValues.length + 1);\n const groupByFunc = _function(DataCubeFunction.GROUP_BY, [\n _cols(groupByColumns.map((col) => _colSpec(col.name))),\n _cols([\n ..._groupByAggCols(groupByColumns, snapshot, configuration, aggregateOperations),\n // if pivot is present, add sum aggregation columns for each\n // count aggregation column from pivot aggregation\n // else, simply add a count aggregation column\n ...(countAggColumns.length\n ? countAggColumns.map((col) => _aggCountCastCol(col.name))\n : [_aggCountCol()]),\n ]),\n ]);\n sequence[groupByIdx] = groupByFunc;\n funcMap.groupBy = groupByFunc;\n // update sort accordingly\n const groupBySort = guaranteeNonNullable(funcMap.groupBySort);\n groupBySort.parameters[0] = _collection(groupByColumns.map((col) => _function(configuration.treeColumnSortDirection ===\n DataCubeQuerySortDirection.ASCENDING\n ? DataCubeFunction.ASCENDING\n : DataCubeFunction.DESCENDING, [_col(col.name)])));\n }\n else {\n // when maximum level of drilldown is reached, we simply just need to\n // filter the data to match drilldown values, no groupBy() is needed.\n _unprocess('groupBy');\n _unprocess('groupBySort');\n }\n }\n };\n}\n//# sourceMappingURL=DataCubeGridQueryBuilder.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport function _findCol(cols, name) {\n return cols?.find((c) => c.name === name);\n}\nexport function _toCol(col) {\n return { name: col.name, type: col.type };\n}\nexport const _sortByColName = (a, b) => a.name.localeCompare(b.name);\n//# sourceMappingURL=DataCubeColumn.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {} from '../../core/DataCubeQuerySnapshot.js';\nimport { _toCol } from '../../core/models/DataCubeColumn.js';\nimport { GridClientSortDirection, INTERNAL__GRID_CLIENT_TREE_COLUMN_ID, } from './DataCubeGridClientEngine.js';\nimport { DataCubeQuerySortDirection, getPivotResultColumnBaseColumnName, isPivotResultColumnName, } from '../../core/DataCubeQueryEngine.js';\nimport { DataCubeConfiguration } from '../../core/models/DataCubeConfiguration.js';\nimport { guaranteeNonNullable, uniqBy } from '@finos/legend-shared';\nimport { _pruneExpandedPaths } from '../../core/DataCubeQuerySnapshotBuilderUtils.js';\nexport function getColumnConfiguration(colName, configuration) {\n return guaranteeNonNullable(configuration.columns.find((col) => col.name === colName), `Can't find configuration for column '${colName}'`);\n}\n// --------------------------------- MAIN ---------------------------------\nexport function buildQuerySnapshot(request, baseSnapshot) {\n const snapshot = baseSnapshot.clone();\n const configuration = DataCubeConfiguration.serialization.fromJson(snapshot.data.configuration);\n // --------------------------------- SELECT ---------------------------------\n snapshot.data.selectColumns = uniqBy([\n ...snapshot.data.selectColumns,\n ...request.pivotCols.map((col) => getColumnConfiguration(col.id, configuration)),\n ...request.rowGroupCols.map((col) => getColumnConfiguration(col.id, configuration)),\n ], (col) => col.name).map(_toCol);\n // --------------------------------- PIVOT ---------------------------------\n snapshot.data.pivot = request.pivotCols.length\n ? {\n columns: request.pivotCols.map((col) => _toCol(getColumnConfiguration(col.id, configuration))),\n // NOTE: since we re-fetch the cast columns anyway in this flow, we just\n // reuse the current cast columns\n castColumns: baseSnapshot.data.pivot?.castColumns ?? [],\n }\n : undefined;\n // --------------------------------- GROUP BY ---------------------------------\n snapshot.data.groupBy = request.rowGroupCols.length\n ? {\n columns: request.rowGroupCols.map((col) => _toCol(getColumnConfiguration(col.id, configuration))),\n }\n : undefined;\n // --------------------------------- SORT ---------------------------------\n snapshot.data.sortColumns = request.sortModel\n // Make sure the tree column is not being sorted since it's a synthetic column\n // the sorting state of this special column is `synthesized` by ag-grid\n // so when all group by columns are sorted in the same direction, the tree group\n // column will be sorted in that direction, and vice versa, when user sorts\n // the tree column, all groupBy columns will be sorted in that direction\n .filter((item) => item.colId !== INTERNAL__GRID_CLIENT_TREE_COLUMN_ID)\n .map((item) => ({\n name: item.colId,\n type: getColumnConfiguration(isPivotResultColumnName(item.colId)\n ? getPivotResultColumnBaseColumnName(item.colId)\n : item.colId, configuration).type,\n direction: item.sort === GridClientSortDirection.ASCENDING\n ? DataCubeQuerySortDirection.ASCENDING\n : DataCubeQuerySortDirection.DESCENDING,\n }));\n // --------------------------------- CONFIGURATION ---------------------------------\n configuration.pivotLayout.expandedPaths = _pruneExpandedPaths(baseSnapshot.data.groupBy?.columns ?? [], snapshot.data.groupBy?.columns ?? [], configuration.pivotLayout.expandedPaths);\n snapshot.data.configuration = configuration.serialize();\n // --------------------------------- FINALIZE ---------------------------------\n return snapshot;\n}\n//# sourceMappingURL=DataCubeGridQuerySnapshotBuilder.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { IllegalStateError, assertErrorThrown, guaranteeNonNullable, hashObject, isBoolean, isNonNullable, pruneObject, } from '@finos/legend-shared';\nimport { buildExecutableQuery } from '../../core/DataCubeQueryBuilder.js';\nimport { V1_Lambda } from '@finos/legend-graph';\nimport { generateRowGroupingDrilldownExecutableQueryPostProcessor } from './DataCubeGridQueryBuilder.js';\nimport { makeObservable, observable, runInAction } from 'mobx';\nimport { DEFAULT_LARGE_ALERT_WINDOW_CONFIG } from '../../core/DataCubeLayoutManagerState.js';\nimport {} from '../../core/DataCubeQuerySnapshot.js';\nimport { _sortByColName } from '../../core/models/DataCubeColumn.js';\nimport { isPivotResultColumnName, } from '../../core/DataCubeQueryEngine.js';\nimport { buildQuerySnapshot } from './DataCubeGridQuerySnapshotBuilder.js';\nimport { AlertType } from '../../../components/core/DataCubeAlert.js';\nimport { sum } from 'mathjs';\nexport var DataCubeGridClientExportFormat;\n(function (DataCubeGridClientExportFormat) {\n DataCubeGridClientExportFormat[\"CSV\"] = \"CSV\";\n DataCubeGridClientExportFormat[\"EXCEL\"] = \"EXCEL\";\n DataCubeGridClientExportFormat[\"PLAIN_TEXT\"] = \"PLAIN_TEXT\";\n DataCubeGridClientExportFormat[\"HTML\"] = \"HTML\";\n DataCubeGridClientExportFormat[\"PDF\"] = \"PDF\";\n})(DataCubeGridClientExportFormat || (DataCubeGridClientExportFormat = {}));\nexport var INTERNAL__GridClientUtilityCssClassName;\n(function (INTERNAL__GridClientUtilityCssClassName) {\n INTERNAL__GridClientUtilityCssClassName[\"ROOT\"] = \"data-cube-grid.ag-theme-quartz\";\n INTERNAL__GridClientUtilityCssClassName[\"HIGHLIGHT_ROW\"] = \"data-cube-grid__utility--highlight-row\";\n INTERNAL__GridClientUtilityCssClassName[\"SHOW_VERTICAL_GRID_LINES\"] = \"data-cube-grid__utility--show-vertical-grid-lines\";\n INTERNAL__GridClientUtilityCssClassName[\"SHOW_HORIZONTAL_GRID_LINES\"] = \"data-cube-grid__utility--show-horizontal-grid-lines\";\n INTERNAL__GridClientUtilityCssClassName[\"BLUR\"] = \"data-cube-grid__utility--blur\";\n INTERNAL__GridClientUtilityCssClassName[\"FONT_FAMILY_PREFIX\"] = \"data-cube-grid__utility--font-family-\";\n INTERNAL__GridClientUtilityCssClassName[\"FONT_SIZE_PREFIX\"] = \"data-cube-grid__utility--font-size-\";\n INTERNAL__GridClientUtilityCssClassName[\"FONT_BOLD\"] = \"data-cube-grid__utility--font-style-bold\";\n INTERNAL__GridClientUtilityCssClassName[\"FONT_ITALIC\"] = \"data-cube-grid__utility--font-style-italic\";\n INTERNAL__GridClientUtilityCssClassName[\"FONT_UNDERLINE_PREFIX\"] = \"data-cube-grid__utility--font-style-underline-\";\n INTERNAL__GridClientUtilityCssClassName[\"FONT_STRIKETHROUGH\"] = \"data-cube-grid__utility--font-style-strikethrough\";\n INTERNAL__GridClientUtilityCssClassName[\"FONT_CASE_PREFIX\"] = \"data-cube-grid__utility--font-style-case-\";\n INTERNAL__GridClientUtilityCssClassName[\"TEXT_ALIGN_PREFIX\"] = \"data-cube-grid__utility--text-align-\";\n INTERNAL__GridClientUtilityCssClassName[\"TEXT_COLOR_PREFIX\"] = \"data-cube-grid__utility--text-color-\";\n INTERNAL__GridClientUtilityCssClassName[\"BACKGROUND_COLOR_PREFIX\"] = \"data-cube-grid__utility--background-color-\";\n INTERNAL__GridClientUtilityCssClassName[\"PIVOT_COLUMN_GROUP\"] = \"data-cube-grid__utility--pivot-column-group\";\n INTERNAL__GridClientUtilityCssClassName[\"PIVOT_COLUMN_GROUP_PREFIX\"] = \"data-cube-grid__utility--pivot-column-group-\";\n})(INTERNAL__GridClientUtilityCssClassName || (INTERNAL__GridClientUtilityCssClassName = {}));\nexport const generateFontFamilyUtilityClassName = (fontFamily) => `${INTERNAL__GridClientUtilityCssClassName.FONT_FAMILY_PREFIX}${fontFamily.replaceAll(' ', '-')}`;\nexport const generateFontSizeUtilityClassName = (fontSize) => `${INTERNAL__GridClientUtilityCssClassName.FONT_SIZE_PREFIX}${fontSize}`;\nexport const generateFontUnderlineUtilityClassName = (variant) => `${INTERNAL__GridClientUtilityCssClassName.FONT_UNDERLINE_PREFIX}${variant ?? 'none'}`;\nexport const generateFontCaseUtilityClassName = (fontCase) => `${INTERNAL__GridClientUtilityCssClassName.FONT_CASE_PREFIX}${fontCase ?? 'none'}`;\nexport const generateTextAlignUtilityClassName = (alignment) => `${INTERNAL__GridClientUtilityCssClassName.TEXT_ALIGN_PREFIX}${alignment}`;\nexport const generateTextColorUtilityClassName = (color, key) => `${INTERNAL__GridClientUtilityCssClassName.TEXT_COLOR_PREFIX}${key}-${color.substring(1)}`;\nexport const generateBackgroundColorUtilityClassName = (color, key) => `${INTERNAL__GridClientUtilityCssClassName.BACKGROUND_COLOR_PREFIX}${key}-${color.substring(1)}`;\n// Indicates how many rows for each block in the cache, i.e. how many rows returned from the server at a time.\n// ag-grid will dedicte space in advanced to store these rows. In server-side row model, this is used as the page size.\n// See https://www.ag-grid.com/react-data-grid/server-side-model-configuration/#server-side-cache\nexport const INTERNAL__GRID_CLIENT_DEFAULT_CACHE_BLOCK_SIZE = 500;\nexport const INTERNAL__GRID_CLIENT_DEFAULT_ENABLE_PAGINATION = true;\n// NOTE: The cache block size is used by ag-grid to pre-allocate memory for the grid\n// so the value set must be reasonable, or else it can crash the engine!\nexport const INTERNAL__GRID_CLIENT_MAX_CACHE_BLOCK_SIZE = 1e4;\nexport const INTERNAL__GRID_CLIENT_PIVOT_COLUMN_GROUP_COLOR_ROTATION_SIZE = 5;\nexport const INTERNAL__GRID_CLIENT_SIDE_BAR_WIDTH = 200;\nexport const INTERNAL__GRID_CLIENT_COLUMN_MIN_WIDTH = 50;\nexport const INTERNAL__GRID_CLIENT_HEADER_HEIGHT = 24;\nexport const INTERNAL__GRID_CLIENT_ROW_HEIGHT = 20;\nexport const INTERNAL__GRID_CLIENT_TOOLTIP_SHOW_DELAY = 1500;\nexport const INTERNAL__GRID_CLIENT_AUTO_RESIZE_PADDING = 10;\nexport const INTERNAL__GRID_CLIENT_MISSING_VALUE = '__MISSING';\nexport const INTERNAL__GRID_CLIENT_TREE_COLUMN_ID = 'ag-Grid-AutoColumn';\nexport const INTERNAL__GRID_CLIENT_DATA_FETCH_MANUAL_TRIGGER_COLUMN_ID = 'INTERNAL__dataFetchManualTrigger';\nexport const INTERNAL__GRID_CLIENT_ROW_GROUPING_COUNT_AGG_COLUMN_ID = 'INTERNAL__count';\nexport var GridClientPinnedAlignement;\n(function (GridClientPinnedAlignement) {\n GridClientPinnedAlignement[\"LEFT\"] = \"left\";\n GridClientPinnedAlignement[\"RIGHT\"] = \"right\";\n})(GridClientPinnedAlignement || (GridClientPinnedAlignement = {}));\nexport var GridClientSortDirection;\n(function (GridClientSortDirection) {\n GridClientSortDirection[\"ASCENDING\"] = \"asc\";\n GridClientSortDirection[\"DESCENDING\"] = \"desc\";\n})(GridClientSortDirection || (GridClientSortDirection = {}));\nexport function getDataForAllNodes(client) {\n const rows = [];\n client.forEachNode((node) => {\n if (node.data) {\n rows.push(node.data);\n }\n });\n return rows;\n}\n/**\n * NOTE: this method does not work for server-side row model.\n * It only works when client-side filter is being applied\n */\nexport function getDataForAllFilteredNodes(client) {\n const rows = [];\n client.forEachNodeAfterFilter((node) => {\n if (node.data) {\n rows.push(node.data);\n }\n });\n return rows;\n}\n/**\n * This method computes the hash code for the parts of the snapshot that should trigger data fetching.\n * This is used to manually trigger server-side row model data source getRows() method.\n */\nexport function computeHashCodeForDataFetchManualTrigger(snapshot, configuration) {\n return hashObject(pruneObject({\n configuration: {\n showRootAggregation: configuration.showRootAggregation,\n pivotStatisticColumnPlacement: configuration.pivotStatisticColumnPlacement,\n treeColumnSortDirection: configuration.treeColumnSortDirection,\n columns: configuration.columns\n .map((column) => ({\n name: column.name,\n type: column.type,\n kind: column.kind,\n aggregateOperator: column.aggregateOperator,\n aggregationParameters: column.aggregationParameters,\n excludedFromPivot: column.excludedFromPivot,\n pivotSortDirection: column.pivotSortDirection,\n // technically, we just need to refresh the row-data since this computation\n // is done on the client-side, but to simplify the flow, we can just refetch data\n pivotStatisticColumnFunction: column.pivotStatisticColumnFunction,\n }))\n .sort(_sortByColName), // sort to make sure column reordering does not trigger data fetching\n },\n leafExtendedColumns: snapshot.data.leafExtendedColumns,\n filter: snapshot.data.filter,\n selectColumns: snapshot.data.selectColumns.slice().sort(_sortByColName), // sort to make sure column reordering does not trigger data fetching\n groupExtendedColumns: snapshot.data.groupExtendedColumns,\n limit: snapshot.data.limit,\n }));\n}\nfunction buildRowData(result, snapshot) {\n return result.rows.map((_row, rowIdx) => {\n const row = {};\n const cols = result.columns;\n _row.values.forEach((value, colIdx) => {\n // `ag-grid` shows `false` value as empty string so we have\n // call `.toString()` to avoid this behavior.\n row[cols[colIdx]] = isBoolean(value)\n ? String(value)\n : isNonNullable(value)\n ? value\n : INTERNAL__GRID_CLIENT_MISSING_VALUE;\n if (snapshot.data.pivot && snapshot.data.groupBy) {\n row[INTERNAL__GRID_CLIENT_ROW_GROUPING_COUNT_AGG_COLUMN_ID] = Number(sum(result.columns\n .filter((col) => isPivotResultColumnName(col) &&\n col.endsWith(INTERNAL__GRID_CLIENT_ROW_GROUPING_COUNT_AGG_COLUMN_ID))\n .map((col) => row[col] ?? 0)).toString());\n }\n });\n return row;\n });\n}\nasync function getCastColumns(currentSnapshot, view) {\n if (!currentSnapshot.data.pivot) {\n throw new IllegalStateError(`Can't build cast columns collector query when no pivot is specified`);\n }\n const snapshot = currentSnapshot.clone();\n guaranteeNonNullable(snapshot.data.pivot).castColumns = [];\n snapshot.data.groupBy = undefined;\n snapshot.data.sortColumns = [];\n snapshot.data.limit = 0;\n const query = buildExecutableQuery(snapshot, view.source, (source) => view.engine.buildExecutionContext(source), view.engine.filterOperations, view.engine.aggregateOperations, {\n postProcessor: (_snapshot, sequence, funcMap, configuration, filterOperations, aggregateOperations) => {\n const _unprocess = (funcMapKey) => {\n const func = funcMap[funcMapKey];\n if (func) {\n sequence.splice(sequence.indexOf(func), 1);\n funcMap[funcMapKey] = undefined;\n }\n };\n if (funcMap.groupExtend) {\n _unprocess('groupExtend');\n }\n },\n });\n const lambda = new V1_Lambda();\n lambda.body.push(query);\n const result = await view.engine.executeQuery(lambda, view.source, view.dataCube);\n return result.result.builder.columns.map((column) => ({\n name: column.name,\n type: column.type,\n }));\n}\nexport class DataCubeGridClientServerSideDataSource {\n grid;\n rowCount = undefined;\n constructor(grid) {\n makeObservable(this, {\n rowCount: observable,\n });\n this.grid = grid;\n }\n async fetchRows(params) {\n const task = this.grid.view.newTask('Fetching data');\n // ------------------------------ GRID OPTIONS ------------------------------\n // Here, we make adjustments to the grid display in response to the new\n // request, in case the grid action has not impacted the layout in an\n // adequate way.\n // Toggle the visibility of the tree column based on the presence of row-group columns\n if (params.request.rowGroupCols.length) {\n params.api.setColumnsVisible([INTERNAL__GRID_CLIENT_TREE_COLUMN_ID], true);\n }\n else {\n params.api.setColumnsVisible([INTERNAL__GRID_CLIENT_TREE_COLUMN_ID], false);\n }\n // ------------------------------ SNAPSHOT ------------------------------\n const currentSnapshot = guaranteeNonNullable(this.grid.getLatestSnapshot());\n let newSnapshot = currentSnapshot;\n // only recompute the snapshot if this is not a drilldown request\n if (params.request.groupKeys.length === 0) {\n newSnapshot = buildQuerySnapshot(params.request, currentSnapshot);\n // NOTE: if h-pivot is enabled, update the cast columns\n // and panels which might be affected by this (e.g. sorts)\n // Because is an expensive operation in certain case, we only\n // recompute when it's not a drilldown or paging request,\n // but we could still optimize further if needed.\n if (!this.grid.isPaginationEnabled || params.request.startRow === 0) {\n if (newSnapshot.data.pivot) {\n try {\n const castColumns = await getCastColumns(newSnapshot, this.grid.view);\n newSnapshot.data.pivot.castColumns = castColumns;\n newSnapshot.data.sortColumns = newSnapshot.data.sortColumns.filter((column) => [...castColumns, ...newSnapshot.data.groupExtendedColumns].find((col) => column.name === col.name));\n }\n catch (error) {\n assertErrorThrown(error);\n this.grid.view.engine.alertError(error, {\n message: `Query Validation Failure: Can't retrieve pivot results column metadata. ${error.message}`,\n });\n // fail early since we can't proceed without the cast columns validated\n params.fail();\n this.grid.view.endTask(task);\n return;\n }\n }\n }\n newSnapshot.finalize();\n if (newSnapshot.hashCode !== currentSnapshot.hashCode) {\n // NOTE: we need to be careful with the computation of the snapshot\n // here since we run the risk of triggering an multiple data-fetches,\n // as applying snapshot to grid state could potentially update the grid\n // options and set SSRM filter model.\n newSnapshot.markAsPatchChange();\n await this.grid.applySnapshot(newSnapshot, currentSnapshot);\n this.grid.publishSnapshot(newSnapshot);\n }\n }\n // ------------------------------ DATA ------------------------------\n try {\n const executableQuery = buildExecutableQuery(newSnapshot, this.grid.view.source, (source) => this.grid.view.engine.buildExecutionContext(source), this.grid.view.engine.filterOperations, this.grid.view.engine.aggregateOperations, {\n postProcessor: generateRowGroupingDrilldownExecutableQueryPostProcessor(params.request.groupKeys),\n pagination: this.grid.isPaginationEnabled &&\n params.request.startRow !== undefined &&\n params.request.endRow !== undefined\n ? {\n start: params.request.startRow,\n end: params.request.endRow,\n }\n : undefined,\n });\n const lambda = new V1_Lambda();\n lambda.body.push(executableQuery);\n const result = await this.grid.view.engine.executeQuery(lambda, this.grid.view.source, this.grid.view.dataCube);\n const rowData = buildRowData(result.result.result, newSnapshot);\n if (this.grid.view.dataCube.settings.enableDebugMode) {\n this.grid.view.engine.debugProcess(`Execution`, ['Query', result.executedQuery], ['Config', `pagination=${this.grid.isPaginationEnabled}`], [\n 'Stats',\n `${rowData.length} rows, ${result.result.result.columns.length} columns`,\n ], ['SQL', result.executedSQL]);\n }\n if (this.grid.isPaginationEnabled) {\n params.success({ rowData });\n // only update row count when loading the top-level drilldown data\n if (params.request.groupKeys.length === 0) {\n runInAction(() => {\n this.rowCount = (params.request.startRow ?? 0) + rowData.length;\n });\n }\n // toggle no-rows overlay\n if (params.request.groupKeys.length === 0 &&\n params.request.startRow === 0 &&\n rowData.length === 0) {\n this.grid.client.showNoRowsOverlay();\n }\n else {\n this.grid.client.hideOverlay();\n }\n }\n else {\n // NOTE: When pagination is disabled and the user currently scrolls to somewhere in the grid, as data is fetched\n // and the operation does not force a scroll top (for example, grouping will always force scrolling to the\n // top, while sorting will leave scroll position as is), the grid ends up showing the wrong data because\n // the data being displayed does not take into account the scroll position, but by the start and end row\n // which stay constant as pagination is disabled.\n //\n // In order to handle this, when pagination is disabled, we tune the start and end row by setting the cache block size\n // to a high-enough value (100k-1m). However, ag-grid use cache block size to pre-allocate memory for the rows,\n // which means we must cap/tune this value reasonably to prevent the app from crashing.\n //\n // When there are just too many rows (exceeding the maximum cache block size), we will fallback to a slightly less ideal\n // behavior by forcing a scroll top for every data fetch and also reset the cache block size to the default value to save memory\n if (rowData.length > INTERNAL__GRID_CLIENT_MAX_CACHE_BLOCK_SIZE) {\n if (!this.grid.view.dataCube.settings\n .gridClientSuppressLargeDatasetWarning) {\n this.grid.view.engine.alert({\n message: `Large dataset (>${INTERNAL__GRID_CLIENT_MAX_CACHE_BLOCK_SIZE} rows) detected!`,\n text: `Overall app performance can be impacted by large dataset due to longer query execution time and increased memory usage. At its limit, the engine can crash!\\nTo boost performance, consider enabling pagination while working with large dataset.`,\n type: AlertType.WARNING,\n actions: [\n {\n label: 'Enable Pagination',\n handler: () => {\n this.grid.setPaginationEnabled(true);\n },\n },\n {\n label: 'Dismiss Warning',\n handler: () => {\n this.grid.view.dataCube.settings.setGridClientSuppressLargeDatasetWarning(true);\n },\n },\n ],\n windowConfig: DEFAULT_LARGE_ALERT_WINDOW_CONFIG,\n });\n }\n // NOTE: when drilldown occurs, we will scroll top until the drilldown row is reached\n params.api.ensureIndexVisible(params.parentNode.rowIndex ?? 0, 'top');\n }\n params.success({\n rowData,\n // Setting row count to disable infinite-scrolling when pagination is disabled\n // See https://www.ag-grid.com/react-data-grid/infinite-scrolling/#setting-last-row-index\n rowCount: rowData.length,\n });\n // only update row count when loading the top-level drilldown data\n if (params.request.groupKeys.length === 0) {\n runInAction(() => {\n this.rowCount = rowData.length;\n });\n }\n // toggle no-rows overlay\n if (params.request.groupKeys.length === 0 && rowData.length === 0) {\n this.grid.client.showNoRowsOverlay();\n }\n else {\n this.grid.client.hideOverlay();\n }\n }\n }\n catch (error) {\n assertErrorThrown(error);\n this.grid.view.engine.alertError(error, {\n message: `Data Fetch Failure: ${error.message}`,\n });\n params.fail();\n }\n finally {\n this.grid.view.endTask(task);\n }\n }\n getRows(params) {\n this.fetchRows(params).catch((error) => {\n assertErrorThrown(error);\n this.grid.view.engine.logIllegalStateError(`Error ocurred while fetching data for grid should have been handled gracefully`, error);\n });\n }\n}\n//# sourceMappingURL=DataCubeGridClientEngine.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/***************************************************************************************\n * [GRID]\n *\n * These are utilities used to build the configuration for the grid client,\n * AG Grid, from the query snapshot.\n ***************************************************************************************/\nimport {} from '../../core/DataCubeQuerySnapshot.js';\nimport { _findCol, } from '../../core/models/DataCubeColumn.js';\nimport { GridClientSortDirection, INTERNAL__GRID_CLIENT_COLUMN_MIN_WIDTH, INTERNAL__GridClientUtilityCssClassName, generateFontFamilyUtilityClassName, generateFontSizeUtilityClassName, generateFontUnderlineUtilityClassName, generateTextAlignUtilityClassName, generateTextColorUtilityClassName, generateBackgroundColorUtilityClassName, generateFontCaseUtilityClassName, GridClientPinnedAlignement, INTERNAL__GRID_CLIENT_ROW_HEIGHT, INTERNAL__GRID_CLIENT_AUTO_RESIZE_PADDING, INTERNAL__GRID_CLIENT_HEADER_HEIGHT, INTERNAL__GRID_CLIENT_TOOLTIP_SHOW_DELAY, INTERNAL__GRID_CLIENT_SIDE_BAR_WIDTH, INTERNAL__GRID_CLIENT_ROW_GROUPING_COUNT_AGG_COLUMN_ID, INTERNAL__GRID_CLIENT_MISSING_VALUE, INTERNAL__GRID_CLIENT_DATA_FETCH_MANUAL_TRIGGER_COLUMN_ID, INTERNAL__GRID_CLIENT_PIVOT_COLUMN_GROUP_COLOR_ROTATION_SIZE, INTERNAL__GRID_CLIENT_TREE_COLUMN_ID, } from './DataCubeGridClientEngine.js';\nimport { getNonNullableEntry, getNullableLastEntry, getQueryParameters, getQueryParameterValue, guaranteeNonNullable, isNonNullable, isNullable, isNumber, isValidUrl, } from '@finos/legend-shared';\nimport { DataCubeColumnDataType, DataCubeColumnPinPlacement, DataCubeNumberScale, DEFAULT_URL_LABEL_QUERY_PARAM, getDataType, DataCubeQuerySortDirection, DataCubeColumnKind, DEFAULT_MISSING_VALUE_DISPLAY_TEXT, PIVOT_COLUMN_NAME_VALUE_SEPARATOR, isPivotResultColumnName, TREE_COLUMN_VALUE_SEPARATOR, } from '../../core/DataCubeQueryEngine.js';\nimport { DataCubeIcon } from '@finos/legend-art';\n// --------------------------------- UTILITIES ---------------------------------\nfunction scaleNumber(value, type) {\n switch (type) {\n case DataCubeNumberScale.PERCENT:\n return { value: value * 1e2, unit: '%' };\n case DataCubeNumberScale.BASIS_POINT:\n return { value: value * 1e4, unit: 'bp' };\n case DataCubeNumberScale.THOUSANDS:\n return { value: value / 1e3, unit: 'k' };\n case DataCubeNumberScale.MILLIONS:\n return { value: value / 1e6, unit: 'm' };\n case DataCubeNumberScale.BILLIONS:\n return { value: value / 1e9, unit: 'b' };\n case DataCubeNumberScale.TRILLIONS:\n return { value: value / 1e12, unit: 't' };\n case DataCubeNumberScale.AUTO:\n return scaleNumber(value, value >= 1e12\n ? DataCubeNumberScale.TRILLIONS\n : value >= 1e9\n ? DataCubeNumberScale.BILLIONS\n : value >= 1e6\n ? DataCubeNumberScale.MILLIONS\n : value >= 1e3\n ? DataCubeNumberScale.THOUSANDS\n : undefined);\n default:\n return { value, unit: undefined };\n }\n}\nfunction DataCubeGridLoadingCellRenderer(props) {\n if (props.node.failedLoad) {\n return _jsx(\"span\", { className: \"inline-flex items-center\", children: \"#ERR\" });\n }\n return (_jsxs(\"span\", { className: \"inline-flex items-center\", children: [_jsx(DataCubeIcon.Loader, { className: \"mr-1 animate-spin stroke-2\" }), \"Loading\"] }));\n}\nfunction getCellRenderer(columnData) {\n const { column } = columnData;\n const dataType = getDataType(column.type);\n if (dataType === DataCubeColumnDataType.TEXT && column.displayAsLink) {\n return function LinkRenderer(params) {\n const isUrl = isValidUrl(params.value);\n if (!isUrl) {\n return params.value;\n }\n const url = params.value;\n const label = getQueryParameterValue(column.linkLabelParameter ?? DEFAULT_URL_LABEL_QUERY_PARAM, getQueryParameters(url, true));\n return (_jsx(\"a\", { href: url, target: \"_blank\", rel: \"noreferrer\", className: \"text-blue-600 underline\", children: label ?? url }));\n };\n }\n return null;\n}\nfunction _displaySpec(columnData) {\n const { name, snapshot, column, configuration } = columnData;\n const dataType = getDataType(column.type);\n const fontFamily = column.fontFamily ?? configuration.fontFamily;\n const fontSize = column.fontSize ?? configuration.fontSize;\n const fontBold = column.fontBold ?? configuration.fontBold;\n const fontItalic = column.fontItalic ?? configuration.fontItalic;\n const fontStrikethrough = column.fontStrikethrough ?? configuration.fontStrikethrough;\n const fontUnderline = column.fontUnderline ?? configuration.fontUnderline;\n const fontCase = column.fontCase ?? configuration.fontCase;\n const textAlign = column.textAlign ?? configuration.textAlign;\n const normalForegroundColor = column.normalForegroundColor ?? configuration.normalForegroundColor;\n const normalBackgroundColor = column.normalBackgroundColor ?? configuration.normalBackgroundColor;\n const negativeForegroundColor = column.negativeForegroundColor ?? configuration.negativeForegroundColor;\n const negativeBackgroundColor = column.negativeBackgroundColor ?? configuration.negativeBackgroundColor;\n const zeroForegroundColor = column.zeroForegroundColor ?? configuration.zeroForegroundColor;\n const zeroBackgroundColor = column.zeroBackgroundColor ?? configuration.zeroBackgroundColor;\n const errorForegroundColor = column.errorForegroundColor ?? configuration.errorForegroundColor;\n const errorBackgroundColor = column.errorBackgroundColor ?? configuration.errorBackgroundColor;\n return {\n // disabling cell data type inference can grid performance\n // especially when this information is only necessary for cell value editor\n cellDataType: false,\n hide: column.hideFromView ||\n !column.isSelected ||\n Boolean(snapshot.data.pivot &&\n !snapshot.data.pivot.castColumns.find((col) => col.name === name)),\n lockVisible: !column.isSelected ||\n Boolean(snapshot.data.pivot &&\n !snapshot.data.pivot.castColumns.find((col) => col.name === name)),\n pinned: column.pinned !== undefined\n ? column.pinned === DataCubeColumnPinPlacement.RIGHT\n ? GridClientPinnedAlignement.RIGHT\n : GridClientPinnedAlignement.LEFT\n : null,\n headerClass: isPivotResultColumnName(name)\n ? 'pl-1 border border-neutral-300'\n : 'pl-1 border border-neutral-200',\n cellClassRules: {\n [generateFontFamilyUtilityClassName(fontFamily)]: () => true,\n [generateFontSizeUtilityClassName(fontSize)]: () => true,\n [INTERNAL__GridClientUtilityCssClassName.FONT_BOLD]: () => fontBold,\n [INTERNAL__GridClientUtilityCssClassName.FONT_ITALIC]: () => fontItalic,\n [INTERNAL__GridClientUtilityCssClassName.FONT_STRIKETHROUGH]: () => fontStrikethrough,\n [generateFontUnderlineUtilityClassName(fontUnderline)]: () => Boolean(fontUnderline),\n [generateFontCaseUtilityClassName(fontCase)]: (params) => dataType === DataCubeColumnDataType.TEXT && Boolean(fontCase),\n [generateTextAlignUtilityClassName(textAlign)]: () => true,\n [generateTextColorUtilityClassName(normalForegroundColor, 'normal')]: () => true,\n [generateBackgroundColorUtilityClassName(normalBackgroundColor, 'normal')]: () => true,\n [generateTextColorUtilityClassName(zeroForegroundColor, 'zero')]: (params) => dataType === DataCubeColumnDataType.NUMBER &&\n isNumber(params.value) &&\n params.value === 0,\n [generateBackgroundColorUtilityClassName(zeroBackgroundColor, 'zero')]: (params) => dataType === DataCubeColumnDataType.NUMBER &&\n isNumber(params.value) &&\n params.value === 0,\n [generateTextColorUtilityClassName(negativeForegroundColor, 'negative')]: (params) => dataType === DataCubeColumnDataType.NUMBER &&\n isNumber(params.value) &&\n params.value < 0,\n [generateBackgroundColorUtilityClassName(negativeBackgroundColor, 'negative')]: (params) => dataType === DataCubeColumnDataType.NUMBER &&\n isNumber(params.value) &&\n params.value < 0,\n [generateTextColorUtilityClassName(errorForegroundColor, 'error')]: (params) => Boolean(params.node.failedLoad),\n [generateBackgroundColorUtilityClassName(errorBackgroundColor, 'error')]: (params) => Boolean(params.node.failedLoad),\n [INTERNAL__GridClientUtilityCssClassName.BLUR]: () => column.blur,\n },\n valueFormatter: dataType === DataCubeColumnDataType.NUMBER\n ? (params) => {\n const value = params.value;\n if (isNullable(value) ||\n value ===\n INTERNAL__GRID_CLIENT_MISSING_VALUE) {\n return (column.missingValueDisplayText ??\n DEFAULT_MISSING_VALUE_DISPLAY_TEXT);\n }\n const showNegativeNumberInParens = column.negativeNumberInParens && value < 0;\n // 1. apply the number scale\n const scaledNumber = scaleNumber(value, column.numberScale);\n // 2. apply the number formatter\n const formattedValue = (showNegativeNumberInParens\n ? Math.abs(scaledNumber.value)\n : scaledNumber.value).toLocaleString(undefined, {\n useGrouping: column.displayCommas,\n ...(column.decimals !== undefined\n ? {\n minimumFractionDigits: column.decimals,\n maximumFractionDigits: column.decimals,\n }\n : {}),\n });\n // 3. add the parentheses (and then the unit)\n return ((showNegativeNumberInParens\n ? `(${formattedValue})`\n : formattedValue) +\n (scaledNumber.unit ? ` ${scaledNumber.unit}` : ''));\n }\n : (params) => params.value === INTERNAL__GRID_CLIENT_MISSING_VALUE\n ? (column.missingValueDisplayText ??\n DEFAULT_MISSING_VALUE_DISPLAY_TEXT)\n : params.value,\n tooltipValueGetter: (params) => isNonNullable(params.value) &&\n params.value !== INTERNAL__GRID_CLIENT_MISSING_VALUE\n ? `Value = ${params.value === '' ? \"''\" : params.value === true ? 'TRUE' : params.value === false ? 'FALSE' : params.value}`\n : `Missing Value`,\n cellRenderer: getCellRenderer(columnData),\n };\n}\nfunction _groupDisplaySpec(snapshot, configuration) {\n // TODO?: we can technically alternate the styling based on the column at various drilldown level\n // but for now,we will simply use the same styling as the (default) grid styling\n const fontFamily = configuration.fontFamily;\n const fontSize = configuration.fontSize;\n const fontBold = configuration.fontBold;\n const fontItalic = configuration.fontItalic;\n const fontStrikethrough = configuration.fontStrikethrough;\n const fontUnderline = configuration.fontUnderline;\n const fontCase = configuration.fontCase;\n const textAlign = configuration.textAlign;\n const normalForegroundColor = configuration.normalForegroundColor;\n const normalBackgroundColor = configuration.normalBackgroundColor;\n return {\n cellDataType: false, // no point in specifying a type here since it can be of multiple types\n hide: !snapshot.data.groupBy,\n lockPosition: true,\n lockPinned: true,\n pinned: GridClientPinnedAlignement.LEFT,\n cellClassRules: {\n [generateFontFamilyUtilityClassName(fontFamily)]: () => true,\n [generateFontSizeUtilityClassName(fontSize)]: () => true,\n [INTERNAL__GridClientUtilityCssClassName.FONT_BOLD]: () => fontBold,\n [INTERNAL__GridClientUtilityCssClassName.FONT_ITALIC]: () => fontItalic,\n [INTERNAL__GridClientUtilityCssClassName.FONT_STRIKETHROUGH]: () => fontStrikethrough,\n [generateFontUnderlineUtilityClassName(fontUnderline)]: () => Boolean(fontUnderline),\n [generateFontCaseUtilityClassName(fontCase)]: (params) => Boolean(fontCase),\n [generateTextAlignUtilityClassName(textAlign)]: () => true,\n [generateTextColorUtilityClassName(normalForegroundColor, 'normal')]: () => true,\n [generateBackgroundColorUtilityClassName(normalBackgroundColor, 'normal')]: () => true,\n },\n tooltipValueGetter: (params) => {\n if (isNonNullable(params.value) &&\n params.value !== INTERNAL__GRID_CLIENT_MISSING_VALUE) {\n return (`Group Value = ${params.value === '' ? \"''\" : params.value === true ? 'TRUE' : params.value === false ? 'FALSE' : params.value}` +\n `${params.data[INTERNAL__GRID_CLIENT_ROW_GROUPING_COUNT_AGG_COLUMN_ID] !== undefined ? ` (${params.data[INTERNAL__GRID_CLIENT_ROW_GROUPING_COUNT_AGG_COLUMN_ID]})` : ''}`);\n }\n return null;\n },\n };\n}\nfunction _sizeSpec(columnData) {\n const { column } = columnData;\n return {\n // NOTE: there is a problem with ag-grid when scrolling horizontally, the header row\n // lags behind the data, it seems to be caused by synchronizing scroll not working properly\n // There is currently, no way around this\n // See https://github.com/ag-grid/ag-grid/issues/5233\n // See https://github.com/ag-grid/ag-grid/issues/7620\n // See https://github.com/ag-grid/ag-grid/issues/6292\n // See https://issues.chromium.org/issues/40890343#comment11\n //\n // TODO: if we support column resize to fit content, should we disable this behavior?\n resizable: column.fixedWidth === undefined,\n suppressAutoSize: column.fixedWidth !== undefined,\n suppressSizeToFit: column.fixedWidth !== undefined,\n width: column.fixedWidth,\n minWidth: Math.max(column.minWidth ?? INTERNAL__GRID_CLIENT_COLUMN_MIN_WIDTH, INTERNAL__GRID_CLIENT_COLUMN_MIN_WIDTH),\n maxWidth: column.maxWidth,\n // Make sure the column spans the width if possible so when total width\n // is less than grid width, removing/adding one column will cause the other\n // columns to take/give up space\n flex: column.fixedWidth === undefined ? 1 : undefined,\n };\n}\nfunction _sortSpec(columnData) {\n const { name, snapshot } = columnData;\n const sortColumns = snapshot.data.sortColumns;\n const sortCol = _findCol(sortColumns, name);\n return {\n sortable: true, // if this is pivot column, no sorting is supported yet\n sort: sortCol\n ? sortCol.direction === DataCubeQuerySortDirection.ASCENDING\n ? GridClientSortDirection.ASCENDING\n : GridClientSortDirection.DESCENDING\n : null,\n sortIndex: sortCol ? sortColumns.indexOf(sortCol) : null,\n };\n}\nfunction _aggregationSpec(columnData) {\n const { name, snapshot, column } = columnData;\n const data = snapshot.data;\n const pivotCol = _findCol(data.pivot?.columns, name);\n const groupByCol = _findCol(data.groupBy?.columns, name);\n const isGroupExtendedColumn = Boolean(_findCol(data.groupExtendedColumns, name));\n return {\n enableRowGroup: !isGroupExtendedColumn && column.kind === DataCubeColumnKind.DIMENSION,\n rowGroup: !isGroupExtendedColumn && Boolean(groupByCol),\n rowGroupIndex: !isGroupExtendedColumn && groupByCol\n ? (data.groupBy?.columns.indexOf(groupByCol) ?? null)\n : null,\n enablePivot: !isGroupExtendedColumn && column.kind === DataCubeColumnKind.DIMENSION,\n pivot: !isGroupExtendedColumn && Boolean(pivotCol),\n pivotIndex: !isGroupExtendedColumn && pivotCol\n ? (data.pivot?.columns.indexOf(pivotCol) ?? null)\n : null,\n // NOTE: we don't quite care about populating these accurately\n // since ag-grid aggregation does not support parameters, so\n // its set of supported aggregators will never match that specified\n // in the editor. But we MUST set this to make sure sorting works\n // when row grouping is used, so we need to set a non-null value here.\n aggFunc: !isGroupExtendedColumn ? column.aggregateOperator : null,\n enableValue: false, // disable GUI interactions to modify this column's aggregate function\n allowedAggFuncs: [], // disable GUI for options of the agg functions\n };\n}\n// --------------------------------- MAIN ---------------------------------\nexport function generateBaseGridOptions(view) {\n const grid = view.grid;\n return {\n // -------------------------------------- README --------------------------------------\n // NOTE: we observe performance degradataion when configuring the grid via React component\n // props when the options is non-static, i.e. changed when the query configuration changes.\n // As such, we must ONLY ADD STATIC CONFIGURATION HERE, and dynamic configuration should be\n // programatically updated when the query is modified.\n //\n //\n // -------------------------------------- ROW GROUPING --------------------------------------\n rowGroupPanelShow: 'always',\n // use the auto-generated group column to make it work with pivot mode\n // See https://github.com/ag-grid/ag-grid/issues/8088\n groupDisplayType: 'singleColumn',\n suppressRowGroupHidesColumns: true, // keeps the column set stable even when row grouping is used\n suppressAggFuncInHeader: true, // keeps the columns stable when aggregation is used\n getChildCount: (data) => data[INTERNAL__GRID_CLIENT_ROW_GROUPING_COUNT_AGG_COLUMN_ID],\n // -------------------------------------- PIVOT --------------------------------------\n // NOTE: when enabled, pivot mode will show the pivot panel (allowing drag and drop)\n // and pivot section in column tools panel, but it comes with many restrictions/opinionated\n // behaviors on column grouping: i.e. it disallow full control of column definitions, so we\n // couldn't display dimension columns which are not part of pivot while pivoting.\n //\n // Even setting flag pivotSuppressAutoColumn=true does not seem to remove the column\n // auto-grouping behavior\n //\n // As such, we will just make use of column pivot settings to trigger server-side row\n // model data-fetching when pivot changes, and would opt out from all GUI features\n // that pivot mode offers by disabling pivot mode and will re-assess its usage in the future.\n //\n // pivotMode: Boolean(snapshot.data.pivot),\n // pivotPanelShow: 'always',\n // pivotSuppressAutoColumn: true,\n // -------------------------------------- SORT --------------------------------------\n // Force multi-sorting since this is what the query supports anyway\n alwaysMultiSort: true,\n // -------------------------------------- DISPLAY --------------------------------------\n rowHeight: INTERNAL__GRID_CLIENT_ROW_HEIGHT,\n headerHeight: INTERNAL__GRID_CLIENT_HEADER_HEIGHT,\n noRowsOverlayComponent: () => (_jsxs(\"div\", { className: \"flex items-center border-[1.5px] border-neutral-300 p-2 font-medium text-neutral-400\", children: [_jsx(\"div\", { children: _jsx(DataCubeIcon.WarningCircle, { className: \"mr-1 stroke-2 text-lg\" }) }), \"0 rows\"] })),\n loadingOverlayComponent: () => (_jsxs(\"div\", { className: \"flex items-center border-[1.5px] border-neutral-300 p-2 font-medium text-neutral-400\", children: [_jsx(\"div\", { children: _jsx(DataCubeIcon.Loader, { className: \"mr-1 animate-spin stroke-2 text-lg\" }) }), \"Loading...\"] })),\n // Show cursor position when scrolling\n onBodyScroll: (event) => {\n const rowCount = event.api.getDisplayedRowCount();\n const range = event.api.getVerticalPixelRange();\n const start = Math.max(1, Math.ceil(range.top / INTERNAL__GRID_CLIENT_ROW_HEIGHT) + 1);\n const end = Math.min(rowCount, Math.floor(range.bottom / INTERNAL__GRID_CLIENT_ROW_HEIGHT));\n grid.setScrollHintText(`${start}-${end}/${rowCount}`);\n event.api.hidePopupMenu(); // hide context-menu while scrolling\n },\n onBodyScrollEnd: () => grid.setScrollHintText(undefined),\n scrollbarWidth: 10,\n alwaysShowVerticalScroll: true, // this is needed to ensure column resize calculation is accurate\n // -------------------------------------- CONTEXT MENU --------------------------------------\n preventDefaultOnContextMenu: true, // prevent showing the browser's context menu\n columnMenu: 'new', // ensure context menu works on header\n // NOTE: dynamically generate the content of the context menu to make sure the items are not stale\n getContextMenuItems: (params) => grid.controller.menuBuilder?.(params, false) ?? [],\n getMainMenuItems: (params) => grid.controller.menuBuilder?.(params, true) ?? [],\n // NOTE: when right-clicking empty space in the header, a menu will show up\n // with 2 default options: 'Choose Columns` and `Reset Columns`, which is not\n // a desired behavior, so we hide the popup menu immediately\n onColumnMenuVisibleChanged: (event) => {\n if (!event.column) {\n const menuElement = document.querySelector(`.${INTERNAL__GridClientUtilityCssClassName.ROOT} .ag-popup .ag-menu`);\n if (menuElement) {\n menuElement.style.display = 'none';\n }\n event.api.hidePopupMenu();\n }\n },\n // -------------------------------------- COLUMN SIZING --------------------------------------\n autoSizePadding: INTERNAL__GRID_CLIENT_AUTO_RESIZE_PADDING,\n // ensure columns are resized to fit the grid width initially and on window resize\n // NOTE: this has to be used with `alwaysShowVerticalScroll` to ensure accurate sizing\n // otherwise on initial load, the computation will be done when no data is rendered,\n // so when data is rendered and the vertical scrollbar shows up, it will block a part of\n // the last column.\n autoSizeStrategy: {\n type: 'fitGridWidth',\n },\n onGridSizeChanged: (event) => {\n event.api.sizeColumnsToFit();\n },\n // -------------------------------------- TOOLTIP --------------------------------------\n tooltipShowDelay: INTERNAL__GRID_CLIENT_TOOLTIP_SHOW_DELAY,\n // though this is a nice behavior to have enabled, ag-grid not dismissing tooltip\n // when context-menu is triggered makes it an undesirable interaction.\n tooltipInteraction: false,\n // -------------------------------------- COLUMN MOVING --------------------------------------\n suppressDragLeaveHidesColumns: true, // disable this since it's quite easy to accidentally hide columns while moving\n // -------------------------------------- SERVER SIDE ROW MODEL --------------------------------------\n suppressScrollOnNewData: true,\n // NOTE: use row loader instead of showing loader in each cell to improve performance\n // otherwise, when we have many columns (i.e. when pivoting), the app could freeze.\n loadingCellRenderer: DataCubeGridLoadingCellRenderer,\n // By default, when row-grouping is active, ag-grid's caching mechanism causes sort\n // to not work properly for pivot result columns, so we must disable this mechanism.\n serverSideSortAllLevels: true,\n // -------------------------------------- SELECTION --------------------------------------\n cellSelection: true,\n // -------------------------------------- SIDEBAR --------------------------------------\n sideBar: {\n toolPanels: [\n {\n id: 'columns',\n labelDefault: 'Columns',\n labelKey: 'columns',\n iconKey: 'columns',\n toolPanel: 'agColumnsToolPanel',\n minWidth: INTERNAL__GRID_CLIENT_SIDE_BAR_WIDTH,\n width: INTERNAL__GRID_CLIENT_SIDE_BAR_WIDTH,\n toolPanelParams: {\n suppressValues: true,\n suppressPivotMode: true,\n },\n },\n ],\n position: 'right',\n },\n allowDragFromColumnsToolPanel: true,\n // -------------------------------------- PERFORMANCE --------------------------------------\n animateRows: false, // improve performance\n suppressColumnMoveAnimation: true, // improve performance\n };\n}\nfunction generatePivotResultColumnHeaderTooltip(id, snapshot, configuration) {\n const values = id.split(PIVOT_COLUMN_NAME_VALUE_SEPARATOR);\n if (!snapshot.data.pivot ||\n values.length > snapshot.data.pivot.columns.length + 1) {\n return values.join(' / ');\n }\n if (values.length === snapshot.data.pivot.columns.length + 1) {\n const baseColumnName = guaranteeNonNullable(values[values.length - 1]);\n const columnConfiguration = _findCol(configuration.columns, baseColumnName);\n return `Column = ${columnConfiguration\n ? columnConfiguration.displayName\n ? `${columnConfiguration.displayName} (${columnConfiguration.name})`\n : columnConfiguration.name\n : baseColumnName} ~ [ ${snapshot.data.pivot.columns.map((col, i) => `${_findCol(configuration.columns, col.name)?.displayName ?? col.name} = ${values[i]}`).join(', ')} ]`;\n }\n return `[ ${snapshot.data.pivot.columns\n .slice(0, values.length)\n .map((col, i) => `${_findCol(configuration.columns, col.name)?.displayName ?? col.name} = ${values[i]}`)\n .join(', ')} ]`;\n}\nfunction generateDefinitionForPivotResultColumns(pivotResultColumns, snapshot, configuration, view) {\n const columns = pivotResultColumns\n .map((col) => ({\n ...col,\n values: col.name.split(PIVOT_COLUMN_NAME_VALUE_SEPARATOR),\n }))\n .filter((col) => col.values.length > 1);\n const columnDefs = [];\n columns.forEach((col) => {\n const groups = [];\n let leaf = undefined;\n let id = '';\n for (let i = 0; i < col.values.length; i++) {\n const value = getNonNullableEntry(col.values, i);\n id =\n id === ''\n ? getNonNullableEntry(col.values, i)\n : `${id}${PIVOT_COLUMN_NAME_VALUE_SEPARATOR}${value}`;\n if (i !== col.values.length - 1) {\n groups.push({\n groupId: id,\n children: [],\n suppressColumnsToolPanel: true,\n headerName: value,\n headerTooltip: generatePivotResultColumnHeaderTooltip(id, snapshot, configuration),\n });\n }\n else {\n const column = _findCol(configuration.columns, value);\n if (column) {\n const columnData = {\n name: col.name,\n snapshot,\n column,\n configuration,\n };\n leaf = {\n headerName: column.displayName ?? column.name,\n colId: col.name,\n field: col.name,\n menuTabs: [],\n ..._displaySpec(columnData),\n ..._sortSpec(columnData),\n ..._sizeSpec(columnData),\n // disallow pinning and moving pivot result columns\n pinned: false,\n lockPinned: true,\n lockPosition: true,\n suppressColumnsToolPanel: true, // hide from column tool panel\n headerTooltip: generatePivotResultColumnHeaderTooltip(id, snapshot, configuration),\n };\n }\n }\n }\n let currentCollection = columnDefs;\n groups.forEach((group) => {\n const existingGroup = currentCollection.find((collection) => 'groupId' in collection && collection.groupId === group.groupId);\n if (existingGroup) {\n currentCollection = existingGroup.children;\n }\n else {\n const newGroup = {\n ...group,\n headerClass: `${INTERNAL__GridClientUtilityCssClassName.PIVOT_COLUMN_GROUP} ${INTERNAL__GridClientUtilityCssClassName.PIVOT_COLUMN_GROUP_PREFIX}${currentCollection.length % INTERNAL__GRID_CLIENT_PIVOT_COLUMN_GROUP_COLOR_ROTATION_SIZE}`,\n };\n currentCollection.push(newGroup);\n currentCollection = newGroup.children;\n }\n });\n if (leaf) {\n currentCollection.push(leaf);\n // sort the leaf level columns based on the order of selected/configuration columns\n currentCollection.sort((a, b) => {\n const colAName = getNullableLastEntry(a.colId?.split(PIVOT_COLUMN_NAME_VALUE_SEPARATOR) ?? []);\n const colAConf = colAName\n ? _findCol(configuration.columns, colAName)\n : undefined;\n const colBName = getNullableLastEntry(b.colId?.split(PIVOT_COLUMN_NAME_VALUE_SEPARATOR) ?? []);\n const colBConf = colBName\n ? _findCol(configuration.columns, colBName)\n : undefined;\n return ((colAConf\n ? configuration.columns.indexOf(colAConf)\n : Number.MAX_VALUE) -\n (colBConf\n ? configuration.columns.indexOf(colBConf)\n : Number.MAX_VALUE));\n });\n }\n });\n return columnDefs;\n}\nexport function generateColumnDefs(snapshot, configuration, view) {\n // NOTE: only show columns which are fetched in select() as we\n // can't solely rely on column selection because of certain restrictions\n // from ag-grid, e.g. in the case of row grouping tree column: the columns\n // which are grouped must be present in the column definitions, so even\n // when some of these might not be selected explicitly by the users, they\n // must still be included in the column definitions, and made hidden instead.\n const columns = configuration.columns.filter((col) => snapshot.data.selectColumns.find((column) => column.name === col.name) ??\n snapshot.data.groupExtendedColumns.find((column) => column.name === col.name));\n let pivotResultColumns = [];\n if (snapshot.data.pivot) {\n const castColumns = snapshot.data.pivot.castColumns;\n pivotResultColumns = castColumns.filter((col) => isPivotResultColumnName(col.name));\n }\n return [\n // NOTE: Internal column used for programatically trigger data fetch when filter is modified\n {\n colId: INTERNAL__GRID_CLIENT_DATA_FETCH_MANUAL_TRIGGER_COLUMN_ID,\n hide: true,\n enableValue: false, // disable GUI interactions to modify this column's aggregate function\n allowedAggFuncs: [], // disable GUI for options of the agg functions\n enablePivot: false,\n enableRowGroup: false,\n filter: 'agTextColumnFilter',\n suppressColumnsToolPanel: true,\n },\n ...generateDefinitionForPivotResultColumns(pivotResultColumns, snapshot, configuration, view),\n ...columns.map((column) => {\n const columnData = {\n name: column.name,\n snapshot,\n column,\n configuration,\n };\n return {\n headerName: column.displayName ?? column.name,\n headerTooltip: `Column = ${column.displayName\n ? `${column.displayName} (${column.name})`\n : column.name}`,\n suppressSpanHeaderHeight: true,\n colId: column.name,\n field: column.name,\n menuTabs: [],\n ..._displaySpec(columnData),\n ..._sizeSpec(columnData),\n ..._sortSpec(columnData),\n ..._aggregationSpec(columnData),\n };\n }),\n ];\n}\nexport function generateGridOptionsFromSnapshot(snapshot, configuration, view) {\n return {\n isServerSideGroupOpenByDefault: (params) => {\n if (configuration.initialExpandLevel !== undefined &&\n configuration.initialExpandLevel > 0 &&\n params.rowNode.level <= configuration.initialExpandLevel - 1) {\n return true;\n }\n const routes = params.rowNode.getRoute();\n if (!routes) {\n return false;\n }\n const path = routes.join(TREE_COLUMN_VALUE_SEPARATOR);\n if (configuration.pivotLayout.expandedPaths.includes(path)) {\n return true;\n }\n return false;\n },\n /**\n * NOTE: there is a strange issue where if we put dynamic configuration directly\n * such as rowClassRules which depends on some changing state (e.g. alternateRows)\n * as the grid component's props, the grid performance will be heavily compromised\n * while if we programatically set it like this, it does not seem so taxing to the\n * performance; perhaps something to do with React component rendering on props change\n * so in general for grid options which are not static, we must configure them here\n */\n rowClassRules: configuration.alternateRows\n ? {\n [INTERNAL__GridClientUtilityCssClassName.HIGHLIGHT_ROW]: (params) => params.rowIndex % (configuration.alternateRowsCount * 2) >=\n configuration.alternateRowsCount,\n }\n : {},\n // -------------------------------------- EVENT HANDLERS --------------------------------------\n // NOTE: make sure the event source must not be 'api' since these handlers are meant for direct\n // user interaction with the grid. Actions through context menu (i.e. grid controller) or programatic\n // update of the grid options due to change in query snapshot should not trigger these handlers.\n onColumnPinned: (event) => {\n if (event.source !== 'api' && event.column) {\n const column = event.column;\n const pinned = column.getPinned();\n view.grid.controller.pinColumn(column.getColId(), pinned === null\n ? undefined\n : pinned === GridClientPinnedAlignement.LEFT\n ? DataCubeColumnPinPlacement.LEFT\n : DataCubeColumnPinPlacement.RIGHT);\n }\n },\n onColumnMoved: (event) => {\n // make sure the move event is finished before syncing the changes\n if (event.source !== 'api' && event.column && event.finished) {\n view.grid.controller.rearrangeColumns((event.api.getColumnDefs() ?? [])\n .filter((col) => !('children' in col))\n .map((col) => col.colId ?? ''));\n }\n },\n onColumnVisible: (event) => {\n if (event.source !== 'api' && event.column) {\n const column = event.column;\n const isVisible = column.isVisible();\n view.grid.controller.showColumn(column.getColId(), isVisible);\n }\n },\n onRowGroupOpened: (event) => {\n // NOTE: only update the pivot layout expanded paths when the user manually expands/collapses\n // a path. If the path is expanded/collapsed programmatically, such as when tree column initially-\n // expanded-to-level is specified, causing the groups to be automatically drilled down, resultant\n // expanded paths will not be kept for record.\n if (event.event) {\n const path = event.node.getRoute()?.join(TREE_COLUMN_VALUE_SEPARATOR);\n if (!path) {\n return;\n }\n if (event.expanded) {\n view.grid.controller.expandPath(path);\n }\n else {\n view.grid.controller.collapsePath(path);\n }\n }\n },\n // -------------------------------------- COLUMNS --------------------------------------\n columnDefs: generateColumnDefs(snapshot, configuration, view),\n autoGroupColumnDef: {\n // NOTE: the column ID here is set for explicitness, but this is not something ag-grid\n // allows setting for auto-group column, for more advanced use cases, we might want to\n // look into custom group columns\n // See https://www.ag-grid.com/react-data-grid/grouping-custom-group-columns/\n colId: INTERNAL__GRID_CLIENT_TREE_COLUMN_ID,\n headerName: '',\n cellRendererParams: {\n suppressCount: !configuration.showLeafCount,\n },\n // display\n ..._groupDisplaySpec(snapshot, configuration),\n // size\n suppressAutoSize: true,\n suppressSizeToFit: true,\n minWidth: 200,\n // sorting\n sortable: true,\n // aggregation\n showRowGroup: true,\n suppressSpanHeaderHeight: true,\n },\n };\n}\n//# sourceMappingURL=DataCubeGridConfigurationBuilder.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { returnUndefOnError } from '../error/ErrorUtils.js';\nconst VALID_STRING = /^[\\w_][\\w_$]*$/u;\nexport const isValidString = (val) => Boolean(val.match(VALID_STRING));\nexport const isValidJSONString = (value) => {\n try {\n JSON.parse(value);\n return true;\n }\n catch {\n return false;\n }\n};\nexport const isValidUrl = (val) => Boolean(returnUndefOnError(() => new URL(val)));\n//# sourceMappingURL=ValidatorUtils.js.map","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { observer } from 'mobx-react-lite';\nimport { ClientSideRowModelModule } from '@ag-grid-community/client-side-row-model';\nimport { ServerSideRowModelModule } from '@ag-grid-enterprise/server-side-row-model';\nimport { RowGroupingModule } from '@ag-grid-enterprise/row-grouping';\nimport { ClipboardModule } from '@ag-grid-enterprise/clipboard';\nimport { MenuModule } from '@ag-grid-enterprise/menu';\nimport { SideBarModule } from '@ag-grid-enterprise/side-bar';\nimport { ColumnsToolPanelModule } from '@ag-grid-enterprise/column-tool-panel';\nimport { AgGridReact } from '@ag-grid-community/react';\nimport { CsvExportModule } from '@ag-grid-community/csv-export';\nimport { ExcelExportModule } from '@ag-grid-enterprise/excel-export';\nimport { DataCubeIcon, Switch, cn, Global, css } from '@finos/legend-art';\nimport { generateBackgroundColorUtilityClassName, generateFontCaseUtilityClassName, generateFontFamilyUtilityClassName, generateFontSizeUtilityClassName, generateFontUnderlineUtilityClassName, generateTextAlignUtilityClassName, generateTextColorUtilityClassName, INTERNAL__GridClientUtilityCssClassName, } from '../../../stores/view/grid/DataCubeGridClientEngine.js';\nimport { RangeSelectionModule } from '@ag-grid-enterprise/range-selection';\nimport { DataCubeFont, DataCubeFontCase, DataCubeFontFormatUnderlineVariant, DataCubeFontTextAlignment, DEFAULT_ROW_BACKGROUND_COLOR, DEFAULT_ROW_HIGHLIGHT_BACKGROUND_COLOR, } from '../../../stores/core/DataCubeQueryEngine.js';\nimport { isNonNullable } from '@finos/legend-shared';\nimport { generateBaseGridOptions } from '../../../stores/view/grid/DataCubeGridConfigurationBuilder.js';\n// NOTE: This is a workaround to prevent ag-grid license key check from flooding the console screen\n// with its stack trace in Chrome.\n// We MUST NEVER completely surpress this warning in production, else it's a violation of the ag-grid license!\n// See https://www.ag-grid.com/react-data-grid/licensing/\nconst __INTERNAL__original_console_error = console.error; // eslint-disable-line no-console\n// eslint-disable-next-line no-process-env\nif (process.env.NODE_ENV === 'development') {\n // eslint-disable-next-line no-console\n console.error = (message, ...agrs) => {\n console.debug(`%c ${message}`, 'color: silver'); // eslint-disable-line no-console\n };\n}\nfunction textColorStyle(key, configuration) {\n return `${Array.from(new Set([\n configuration[`${key}ForegroundColor`],\n ...configuration.columns\n .map((column) => column[`${key}ForegroundColor`])\n .filter(isNonNullable),\n ]).values())\n .map((color) => `.${INTERNAL__GridClientUtilityCssClassName.ROOT} .${generateTextColorUtilityClassName(color, key)}{color:${color};}`)\n .join('\\n')}`;\n}\nfunction backgroundColorStyle(key, configuration) {\n return `${Array.from(new Set([\n configuration[`${key}BackgroundColor`],\n ...configuration.columns\n .map((column) => column[`${key}BackgroundColor`])\n .filter(isNonNullable),\n ]).values())\n .map((color) => `.${INTERNAL__GridClientUtilityCssClassName.ROOT} .${generateBackgroundColorUtilityClassName(color, key)}{background-color:${color};}`)\n .join('\\n')};`;\n}\nexport const DataCubeGridStyleController = observer((props) => {\n const { view } = props;\n const grid = view.grid;\n const configuration = grid.queryConfiguration;\n return (_jsx(Global, { styles: css `\n .${INTERNAL__GridClientUtilityCssClassName.ROOT} {\n --ag-odd-row-background-color: ${grid.queryConfiguration\n .alternateRowsStandardMode &&\n !grid.queryConfiguration.alternateRows\n ? DEFAULT_ROW_HIGHLIGHT_BACKGROUND_COLOR\n : DEFAULT_ROW_BACKGROUND_COLOR};\n --ag-cell-horizontal-border: ${grid.queryConfiguration\n .showVerticalGridLines\n ? `1px solid\n ${grid.queryConfiguration.gridLineColor}`\n : 'none'};\n --ag-row-border-color: ${grid.queryConfiguration\n .showHorizontalGridLines\n ? grid.queryConfiguration.gridLineColor\n : 'transparent'};\n }\n .${INTERNAL__GridClientUtilityCssClassName.ROOT}\n .${INTERNAL__GridClientUtilityCssClassName.HIGHLIGHT_ROW} {\n background-color: ${grid.queryConfiguration.alternateRows\n ? grid.queryConfiguration.alternateRowsColor\n : DEFAULT_ROW_BACKGROUND_COLOR};\n }\n ${[\n DataCubeFont.ARIAL,\n DataCubeFont.ROBOTO,\n DataCubeFont.ROBOTO_CONDENSED,\n ]\n .map((fontFamily) => `.${INTERNAL__GridClientUtilityCssClassName.ROOT} .${generateFontFamilyUtilityClassName(fontFamily)}{font-family:${fontFamily},sans-serif;}`)\n .join('\\n')}\n ${[\n DataCubeFont.GEORGIA,\n DataCubeFont.ROBOTO_SERIF,\n DataCubeFont.TIMES_NEW_ROMAN,\n ]\n .map((fontFamily) => `.${INTERNAL__GridClientUtilityCssClassName.ROOT} .${generateFontFamilyUtilityClassName(fontFamily)}{font-family:${fontFamily},serif;}`)\n .join('\\n')}\n ${[\n DataCubeFont.JERBRAINS_MONO,\n DataCubeFont.ROBOTO_MONO,\n DataCubeFont.UBUNTU_MONO,\n ]\n .map((fontFamily) => `.${INTERNAL__GridClientUtilityCssClassName.ROOT} .${generateFontFamilyUtilityClassName(fontFamily)}{font-family:${fontFamily},monospace;}`)\n .join('\\n')}\n .${INTERNAL__GridClientUtilityCssClassName.FONT_BOLD} {\n font-weight: 700;\n }\n ${[\n 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 24, 26, 28, 32,\n 36, 48, 72,\n ]\n .map((fontSize) => `.${INTERNAL__GridClientUtilityCssClassName.ROOT} .${generateFontSizeUtilityClassName(fontSize)}{font-size:${fontSize}px;}`)\n .join('\\n')}\n .${INTERNAL__GridClientUtilityCssClassName.ROOT}\n .${INTERNAL__GridClientUtilityCssClassName.FONT_ITALIC} {\n font-style: italic;\n }\n ${[\n DataCubeFontFormatUnderlineVariant.SOLID,\n DataCubeFontFormatUnderlineVariant.DASHED,\n DataCubeFontFormatUnderlineVariant.DOTTED,\n DataCubeFontFormatUnderlineVariant.DOUBLE,\n DataCubeFontFormatUnderlineVariant.WAVY,\n ]\n .map((variant) => `.${INTERNAL__GridClientUtilityCssClassName.ROOT} .${generateFontUnderlineUtilityClassName(variant)}{text-decoration:underline ${variant};}`)\n .join('\\n')}\n .${INTERNAL__GridClientUtilityCssClassName.ROOT} .${INTERNAL__GridClientUtilityCssClassName.FONT_STRIKETHROUGH} {\n text-decoration: line-through;\n }\n ${[\n DataCubeFontCase.LOWERCASE,\n DataCubeFontCase.UPPERCASE,\n DataCubeFontCase.CAPITALIZE,\n ]\n .map((fontCase) => `.${INTERNAL__GridClientUtilityCssClassName.ROOT} .${generateFontCaseUtilityClassName(fontCase)}{text-transform:${fontCase};}`)\n .join('\\n')}\n ${[\n DataCubeFontTextAlignment.LEFT,\n DataCubeFontTextAlignment.CENTER,\n DataCubeFontTextAlignment.RIGHT,\n ]\n .map((alignment) => `.${INTERNAL__GridClientUtilityCssClassName.ROOT} .${generateTextAlignUtilityClassName(alignment)}{text-align:${alignment};}`)\n .join('\\n')};\n ${backgroundColorStyle('normal', configuration)}\n ${backgroundColorStyle('zero', configuration)}\n ${backgroundColorStyle('negative', configuration)}\n ${backgroundColorStyle('error', configuration)}\n ${textColorStyle('normal', configuration)}\n ${textColorStyle('zero', configuration)}\n ${textColorStyle('negative', configuration)}\n ${textColorStyle('error', configuration)}\n .${INTERNAL__GridClientUtilityCssClassName.ROOT}\n .${INTERNAL__GridClientUtilityCssClassName.BLUR} {\n filter: blur(3px);\n }\n .${INTERNAL__GridClientUtilityCssClassName.ROOT}\n .${INTERNAL__GridClientUtilityCssClassName.BLUR}:hover {\n filter: none;\n }\n ` }));\n});\nconst DataCubeGridScroller = observer((props) => {\n const { view } = props;\n const grid = view.grid;\n const scrollHintText = grid.scrollHintText;\n const gridClientSideBarElement = document.querySelector('.data-cube-grid .ag-side-bar');\n const gridVerticalScrollbar = document.querySelector('.data-cube-grid .ag-body-vertical-scroll');\n return (_jsxs(\"div\", { className: \"absolute -top-10 flex items-center rounded-sm border border-neutral-300 bg-neutral-100 p-1 pr-2 text-neutral-500 shadow-sm\", style: {\n right: (gridClientSideBarElement !== null\n ? gridClientSideBarElement.getBoundingClientRect().width + 6\n : 10) +\n (gridVerticalScrollbar !== null\n ? gridVerticalScrollbar.getBoundingClientRect().width\n : 0),\n }, children: [_jsx(DataCubeIcon.TableScroll, { className: \"text-lg\" }), _jsx(\"div\", { className: \"ml-1 font-mono text-sm\", children: scrollHintText ?? '' })] }));\n});\nconst DataCubeGridStatusBar = observer((props) => {\n const { view } = props;\n const grid = view.grid;\n return (_jsxs(\"div\", { className: \"relative flex h-5 w-full select-none justify-between border-b border-neutral-200 bg-neutral-100\", children: [Boolean(grid.scrollHintText) && _jsx(DataCubeGridScroller, { view: view }), _jsx(\"div\", {}), _jsxs(\"div\", { className: \"flex h-full items-center\", children: [_jsx(\"div\", { className: \"flex h-full items-center px-2 font-mono text-sm text-neutral-500\", children: grid.clientDataSource.rowCount\n ? `Rows: ${grid.clientDataSource.rowCount}`\n : '' }), grid.rowLimit !== undefined &&\n grid.queryConfiguration.showWarningForTruncatedResult && (\n // TODO: if we want to properly warn if the data has been truncated due to row limit,\n // this would require us to fetch n+1 rows when limit=n\n // This is feature is not difficult to implement, but it would be implemented most cleanly\n // when we change the query execution engine to return the total number of rows,\n // so for now, we simply just warn about truncation whenever a limit != -1 is specified\n _jsxs(_Fragment, { children: [_jsx(\"div\", { className: \"h-3 w-[1px] bg-neutral-200\" }), _jsxs(\"div\", { className: \"flex h-full items-center px-2 text-orange-500\", children: [_jsx(DataCubeIcon.Warning, { className: \"stroke-[3px]\" }), _jsx(\"div\", { className: \"ml-1 text-sm font-semibold\", children: `Results truncated to fit within row limit (${grid.rowLimit})` })] })] })), _jsx(\"div\", { className: \"h-3 w-[1px] bg-neutral-200\" }), _jsxs(\"button\", { className: \"flex h-full items-center p-2\", onClick: () => grid.setPaginationEnabled(!grid.isPaginationEnabled), children: [_jsx(Switch, { checked: grid.isPaginationEnabled, classes: {\n root: 'p-0 w-6 h-5 flex items-center',\n input: 'w-2',\n checked: '!translate-x-2 ease-in-out duration-100 transition',\n thumb: cn('w-2 h-2', {\n 'bg-sky-600': grid.isPaginationEnabled,\n 'bg-neutral-500': !grid.isPaginationEnabled,\n }),\n switchBase: 'p-0.5 mt-1 translate-x-0 ease-in-out duration-100 transition',\n track: cn('h-3 w-5 border', {\n '!bg-sky-100 border-sky-600': grid.isPaginationEnabled,\n '!bg-neutral-100 border-neutral-500': !grid.isPaginationEnabled,\n }),\n }, disableRipple: true, disableFocusRipple: true }), _jsx(\"div\", { className: cn('text-sm', {\n 'text-sky-600': grid.isPaginationEnabled,\n 'text-neutral-500': !grid.isPaginationEnabled,\n }), children: \"Pagination\" })] })] })] }));\n});\nconst DataCubeGridClient = observer((props) => {\n const { view } = props;\n const grid = view.grid;\n return (_jsx(\"div\", { className: \"relative h-[calc(100%_-_20px)] w-full\", children: _jsx(AgGridReact, { className: \"data-cube-grid ag-theme-quartz\", rowModelType: \"serverSide\", serverSideDatasource: grid.clientDataSource, context: {\n view,\n }, onGridReady: (params) => {\n grid.configureClient(params.api);\n // eslint-disable-next-line no-process-env\n if (process.env.NODE_ENV === 'development') {\n // restore original error logging\n console.error = __INTERNAL__original_console_error; // eslint-disable-line no-console\n }\n }, modules: [\n // community\n ClientSideRowModelModule,\n CsvExportModule,\n // enterprise\n ServerSideRowModelModule,\n RowGroupingModule,\n MenuModule,\n ClipboardModule,\n RangeSelectionModule,\n SideBarModule,\n ColumnsToolPanelModule,\n ExcelExportModule,\n ], ...generateBaseGridOptions(view) }) }));\n});\nexport const DataCubeGrid = observer((props) => {\n const { view } = props;\n return (_jsxs(\"div\", { className: \"h-full w-full\", children: [_jsx(DataCubeGridStyleController, { view: view }), _jsx(DataCubeGridClient, { view: view }), _jsx(DataCubeGridStatusBar, { view: view })] }));\n});\n//# sourceMappingURL=DataCubeGrid.js.map","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DataCubeIcon, ProgressBar } from '@finos/legend-art';\nimport { observer } from 'mobx-react-lite';\nimport { DataCubeGrid } from './view/grid/DataCubeGrid.js';\nconst DataCubeStatusBar = observer((props) => {\n const { view } = props;\n return (_jsxs(\"div\", { className: \"flex h-5 w-full justify-between bg-neutral-100\", children: [_jsxs(\"div\", { className: \"flex\", children: [_jsxs(\"button\", { className: \"flex items-center px-2 text-sky-600 hover:text-sky-700\", onClick: () => view.editor.display.open(), children: [_jsx(DataCubeIcon.Settings, { className: \"text-xl\" }), _jsx(\"div\", { className: \"pl-0.5 underline\", children: \"Properties\" })] }), _jsx(\"div\", { className: \"flex\", children: _jsxs(\"button\", { className: \"flex items-center text-sky-600 hover:text-sky-700\", onClick: () => {\n view.filter.display.open();\n }, children: [_jsx(DataCubeIcon.TableFilter, { className: \"text-lg\" }), _jsx(\"div\", { className: \"pl-0.5 underline\", children: \"Filter\" })] }) })] }), _jsx(\"div\", { className: \"flex items-center px-2\", children: _jsx(\"div\", { className: \"flex h-3.5 w-48 border-[0.5px] border-neutral-300\", children: view.runningTasks.size > 0 && (_jsx(ProgressBar, { classes: {\n root: 'h-3.5 w-full bg-transparent',\n bar1Indeterminate: 'bg-green-500',\n bar2Indeterminate: 'bg-green-500',\n }, variant: \"indeterminate\" })) }) })] }));\n});\nexport const DataCubeView = observer((props) => {\n const { view } = props;\n return (_jsxs(_Fragment, { children: [_jsx(DataCubeGrid, { view: view }), _jsx(DataCubeStatusBar, { view: view })] }));\n});\n//# sourceMappingURL=DataCubeView.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { IllegalStateError, assertErrorThrown, deepDiff, guaranteeNonNullable, } from '@finos/legend-shared';\nexport class DataCubeQuerySnapshotController {\n view;\n latestSnapshot;\n constructor(view) {\n this.view = view;\n }\n async receiveSnapshot(snapshot) {\n const previousSnapshot = this.latestSnapshot;\n this.latestSnapshot = snapshot;\n // NOTE: fully clone the snapshot before applying it to avoid any potential\n // mutation of the snapshot by the subscriber\n await this.applySnapshot(snapshot.INTERNAL__fullClone(), previousSnapshot);\n }\n publishSnapshot(snapshot) {\n const previousSnapshot = this.latestSnapshot;\n this.latestSnapshot = snapshot;\n if (this.view.dataCube.settings.enableDebugMode) {\n this.view.engine.debugProcess(`New Snapshot`, ['Publisher', this.getSnapshotSubscriberName()], ['Snapshot', snapshot], ['Previous Snapshot', previousSnapshot], ['Diff', deepDiff(previousSnapshot ?? {}, snapshot)]);\n }\n this.view.snapshotManager.broadcastSnapshot(snapshot);\n }\n getLatestSnapshot() {\n return this.latestSnapshot;\n }\n}\nexport class DataCubeQuerySnapshotManager {\n view;\n subscribers = [];\n snapshots = [];\n _initialSnapshot;\n _initialQuery;\n constructor(view) {\n this.view = view;\n }\n get currentSnapshot() {\n return guaranteeNonNullable(this.snapshots[this.snapshots.length - 1]);\n }\n registerSubscriber(subscriber) {\n const existingSubscriber = this.subscribers.find((sub) => sub.getSnapshotSubscriberName() ===\n subscriber.getSnapshotSubscriberName());\n if (existingSubscriber) {\n throw new IllegalStateError(`Subscriber with name '${subscriber.getSnapshotSubscriberName()}' already exists`);\n }\n this.subscribers.push(subscriber);\n }\n initialize(initialSnapshot, initialQuery) {\n if (this._initialSnapshot || this._initialQuery) {\n throw new IllegalStateError(`Snapshot manager has already been initialized`);\n }\n this._initialSnapshot = initialSnapshot;\n this._initialQuery = initialQuery;\n }\n get initialSnapshot() {\n return guaranteeNonNullable(this._initialSnapshot, `Snapshot manager has not been initialized`);\n }\n get initialQuery() {\n return guaranteeNonNullable(this._initialQuery, `Snapshot manager has not been initialized`);\n }\n broadcastSnapshot(snapshot) {\n if (!snapshot.isFinalized()) {\n this.view.engine.logIllegalStateError(`Snapshot must be finalized before broadcasting`);\n return;\n }\n this.snapshots.push(snapshot);\n this.subscribers.forEach((subscriber) => {\n const currentSnapshot = subscriber.getLatestSnapshot();\n if (currentSnapshot?.uuid !== snapshot.uuid) {\n subscriber.receiveSnapshot(snapshot).catch((error) => {\n assertErrorThrown(error);\n this.view.engine.logIllegalStateError(`Error occured while subscribers receiving and applying new snapshot should be handled gracefully`, error);\n });\n }\n });\n }\n}\n//# sourceMappingURL=DataCubeQuerySnapshotManager.js.map","import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { BasePopover, Checkbox, cn, DataCubeIcon, DropdownMenu, DropdownMenuItem, HexAlphaColorPicker, HexColorInput, parseColor, TailwindCSSPalette, useForkRef, } from '@finos/legend-art';\nimport React, { forwardRef, useEffect, useRef, useState } from 'react';\nimport { isString } from '@finos/legend-shared';\nimport { useDataCube } from '../DataCubeProvider.js';\nexport function FormBadge_WIP() {\n return (_jsx(\"div\", { className: \"text-2xs ml-1 flex h-2.5 flex-shrink-0 select-none items-center rounded-md bg-sky-500 px-1 font-semibold leading-[10px] text-white\", title: \"Work In Progress\", children: \"WIP\" }));\n}\nexport function FormBadge_Advanced() {\n return (_jsx(\"div\", { className: \"text-2xs ml-1 select-none rounded-md bg-amber-500 px-1 py-0.5 font-semibold text-white\", title: \"Advanced: Becareful when using this feature!\", children: \"ADV\" }));\n}\nexport const FormNumberInput = forwardRef(function FormNumberInput(props, ref) {\n const { min, max, step, value, setValue, isValid, isDecimal, defaultValue, disabled, className, } = props;\n const [inputValue, setInputValue] = useState(value ?? '');\n const inputRef = useRef(null);\n const handleRef = useForkRef(inputRef, ref);\n useEffect(() => {\n setInputValue(value ?? '');\n }, [value]);\n return (_jsx(\"input\", { className: cn('h-5 flex-shrink-0 border border-neutral-400 px-1.5 text-sm disabled:border-neutral-300 disabled:bg-neutral-50 disabled:text-neutral-300', className), ref: handleRef, inputMode: \"numeric\", type: \"number\", min: min, max: max, step: step, value: inputValue, disabled: Boolean(disabled), onKeyDown: (event) => {\n if (event.code === 'Escape') {\n inputRef.current?.select();\n }\n else if (event.code === 'ArrowUp') {\n event.preventDefault();\n if (value !== undefined && step !== undefined) {\n const newValue = value + step;\n if ((min !== undefined && newValue < min) ||\n (max !== undefined && newValue > max)) {\n return;\n }\n setInputValue(newValue.toString());\n setValue(newValue);\n }\n }\n else if (event.code === 'ArrowDown') {\n event.preventDefault();\n if (value !== undefined && step !== undefined) {\n const newValue = value - step;\n if ((min !== undefined && newValue < min) ||\n (max !== undefined && newValue > max)) {\n return;\n }\n setInputValue(newValue.toString());\n setValue(newValue);\n }\n }\n }, onChange: (event) => {\n const newInputValue = event.target.value;\n setInputValue(newInputValue);\n const numericValue = isDecimal\n ? Number(newInputValue)\n : parseInt(newInputValue, 10);\n if (isNaN(numericValue) ||\n (isString(newInputValue) && !newInputValue) || // Explicitly check this case since `Number()` parses empty string as `0`\n (isValid !== undefined\n ? !isValid(numericValue)\n : (min !== undefined && numericValue < min) ||\n (max !== undefined && numericValue > max))) {\n return;\n }\n setValue(numericValue);\n }, onBlur: () => {\n const numericValue = isDecimal\n ? Number(inputValue)\n : parseInt(inputValue.toString(), 10);\n if (isNaN(numericValue) ||\n (isString(inputValue) && !inputValue) || // Explicitly check this case since `Number()` parses empty string as `0`\n (isValid !== undefined\n ? !isValid(numericValue)\n : (min !== undefined && numericValue < min) ||\n (max !== undefined && numericValue > max))) {\n setValue(defaultValue);\n setInputValue(defaultValue ?? '');\n }\n else {\n setInputValue(value ?? '');\n }\n } }));\n});\nexport const FormTextInput = forwardRef(function FormTextInput(props, ref) {\n const { className, ...otherProps } = props;\n const inputRef = useRef(null);\n const handleRef = useForkRef(inputRef, ref);\n return (_jsx(\"input\", { ref: handleRef, className: cn('h-5 flex-shrink-0 border border-neutral-400 px-1.5 text-sm disabled:border-neutral-300 disabled:bg-neutral-50 disabled:text-neutral-300', className), onKeyDown: (event) => {\n if (event.code === 'Escape') {\n inputRef.current?.select();\n }\n }, ...otherProps }));\n});\nexport function FormCheckbox(props) {\n const { label, className, onChange, disabled, ...otherProps } = props;\n return (_jsxs(_Fragment, { children: [_jsx(Checkbox, { icon: _jsx(DataCubeIcon.Checkbox, {}), checkedIcon: _jsx(DataCubeIcon.CheckboxSelected, {}), disableRipple: true, classes: {\n root: cn(\n // Make sure the icons used have consistent stroke width with other components' borders\n // and that the left side is offseted to align well with other components\n 'p-0 text-neutral-600 [&_*]:stroke-[1.5px] -ml-[1px]', className),\n checked: 'data-cube-editor-checkbox--checked',\n disabled: 'data-cube-editor-checkbox--disabled',\n }, onChange: onChange, disabled: disabled, ...otherProps }), Boolean(label) && (_jsx(\"button\", { className: \"flex-shrink-0 pl-1 text-sm disabled:text-neutral-300\", onClick: onChange, disabled: disabled, tabIndex: -1, children: label }))] }));\n}\nexport const FormDropdownMenuTrigger = forwardRef(function FormDropdownMenuTrigger(props, ref) {\n const { children, className, open, ...otherProps } = props;\n return (_jsxs(\"button\", { ref: ref, className: cn('group flex h-5 flex-shrink-0 items-center justify-between border border-neutral-400 bg-white pl-1.5 text-sm disabled:select-none disabled:border-neutral-300 disabled:bg-neutral-50 disabled:text-neutral-300', {\n 'border-sky-600': Boolean(open),\n 'bg-sky-100': Boolean(open),\n }, className), ...otherProps, children: [_jsx(\"div\", { className: \"w-[calc(100%_-_12px)] overflow-hidden overflow-ellipsis whitespace-nowrap text-left\", children: props.children }), _jsx(\"div\", { className: \"flex h-full w-3 items-center justify-center text-neutral-500 group-disabled:text-neutral-400\", children: _jsx(DataCubeIcon.CaretDown, {}) })] }));\n});\nexport function FormDropdownMenu(props) {\n const { className, ...otherProps } = props;\n return (_jsx(DropdownMenu, { ...otherProps, menuProps: {\n classes: {\n paper: 'rounded-none mt-[1px]',\n list: cn('p-0 rounded-none border border-neutral-400 bg-white max-h-40 overflow-y-auto', className),\n },\n } }));\n}\nexport function FormDropdownMenuItem(props) {\n const { className, ...otherProps } = props;\n return (_jsx(DropdownMenuItem, { className: cn('flex h-5 w-full items-center px-1.5 text-sm hover:bg-neutral-100 focus:bg-sky-600 focus:text-white', className), ...otherProps }));\n}\nexport function FormDropdownMenuItemSeparator() {\n return _jsx(\"div\", { className: \"my-0.5 h-[1px] w-full bg-neutral-200\" });\n}\nfunction FormColorPicker(props) {\n const { onChange, onClose, defaultColor } = props;\n const [color, setColor] = useState(props.color);\n const submit = () => {\n onChange(\n // if color is completely transparent, set it to #00000000\n parseColor(color).alpha === 0 ? TailwindCSSPalette.transparent : color);\n onClose();\n };\n return (_jsxs(\"div\", { className: \"data-cube-color-picker rounded-none border border-neutral-400 bg-white\", children: [_jsx(\"div\", { className: \"p-2\", children: _jsx(HexAlphaColorPicker, { color: color, onChange: setColor }) }), _jsx(\"div\", { className: \"flex justify-center px-2\", children: [\n 'slate',\n 'neutral',\n 'red',\n 'orange',\n 'amber',\n 'yellow',\n 'lime',\n 'green',\n 'emerald',\n 'teal',\n 'sky',\n 'blue',\n 'indigo',\n 'violet',\n 'purple',\n 'fuchsia',\n 'pink',\n 'rose',\n ].map((scale) => (_jsx(\"div\", { className: \"mr-0.5 flex flex-col border-[0.5px] border-neutral-300 last:mr-0\", children: [\n 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950,\n ].map((level) => (_jsx(\"button\", { className: \"h-3 w-3 flex-shrink-0\", style: {\n background: TailwindCSSPalette[scale][level],\n }, onClick: () => {\n setColor(TailwindCSSPalette[scale][level]);\n }, onDoubleClick: () => {\n setColor(TailwindCSSPalette[scale][level]);\n submit();\n } }, `${scale}-${level}`))) }, scale))) }), _jsx(\"div\", { className: \"flex justify-center px-2 pb-1 pt-0.5\", children: _jsx(\"div\", { className: \"flex\", children: [\n // Colors from Better Colors - https://clrs.cc/\n TailwindCSSPalette.transparent,\n '#000000',\n '#aaaaaa',\n '#dddddd',\n '#ffffff',\n '#ff4136',\n '#ff851b',\n '#ffdc00',\n '#01ff70',\n '#2ecc40',\n '#3d9970',\n '#39cccc',\n '#7fdbff',\n '#0074d9',\n '#001f3f',\n '#b10dc9',\n '#f012be',\n '#85144b',\n ].map((_color) => (_jsx(\"div\", { className: cn('mr-0.5 border-[0.5px] border-neutral-300 last:mr-0', {\n 'data-cube-color-picker--transparent border-neutral-400': _color === TailwindCSSPalette.transparent,\n }), children: _jsx(\"button\", { className: \"flex h-3 w-3 flex-shrink-0\", style: {\n background: _color,\n }, onClick: () => {\n setColor(_color);\n }, onDoubleClick: () => {\n setColor(_color);\n submit();\n } }) }, _color))) }) }), _jsx(\"div\", { className: \"h-[1px] w-full bg-neutral-200\" }), _jsxs(\"div\", { className: \"flex h-6 items-center justify-between p-1\", children: [_jsxs(\"div\", { className: \"flex\", children: [_jsx(\"div\", { className: \"h-4 w-4 flex-shrink-0 rounded-sm border-[0.5px] border-neutral-300\", style: { background: color } }), _jsx(HexColorInput, { className: \"ml-0.5 h-4 w-14 border border-neutral-400 px-1 text-sm\", color: color, autoFocus: true, tabIndex: 0, onChange: setColor, prefix: \"#\", alpha: true })] }), _jsxs(\"div\", { className: \"flex\", children: [defaultColor !== undefined && (_jsx(\"button\", { className: \"ml-1 h-4 w-9 border border-neutral-400 bg-neutral-300 px-1 text-xs hover:brightness-95\", onClick: () => {\n setColor(defaultColor);\n }, children: \"Reset\" })), _jsx(\"button\", { className: \"ml-1 h-4 w-9 border border-neutral-400 bg-neutral-300 px-1 text-xs hover:brightness-95\", onClick: () => {\n onClose();\n }, children: \"Cancel\" }), _jsx(\"button\", { className: \"ml-1 h-4 w-9 border border-neutral-400 bg-neutral-300 px-1 text-xs hover:brightness-95\", onClick: () => {\n submit();\n }, children: \"OK\" })] })] })] }));\n}\nexport function FormColorPickerButton(props) {\n const { color, onChange, className, disabled, defaultColor } = props;\n const [anchorEl, setAnchorEl] = useState(null);\n return (_jsxs(_Fragment, { children: [_jsx(\"button\", { className: cn('group h-5 w-10 border border-neutral-300 p-[1px] disabled:border-neutral-200', {\n 'data-cube-color-picker--disabled': Boolean(disabled),\n 'data-cube-color-picker--transparent': !disabled && color === TailwindCSSPalette.transparent,\n }, className), onClick: (event) => {\n setAnchorEl(event.currentTarget);\n }, disabled: disabled, children: _jsx(\"div\", { className: \"h-full w-full group-disabled:hidden\", style: {\n background: color,\n } }) }), Boolean(anchorEl) && (_jsx(BasePopover, { open: Boolean(anchorEl), anchorEl: anchorEl, anchorOrigin: { vertical: 'center', horizontal: 'right' }, transformOrigin: { vertical: 'center', horizontal: 'left' }, onClose: () => setAnchorEl(null), children: _jsx(FormColorPicker, { color: color, onChange: onChange, onClose: () => setAnchorEl(null), defaultColor: defaultColor }) }))] }));\n}\nexport const FormDocumentation = ({ documentationKey, title, className }) => {\n const dataCube = useDataCube();\n const engine = dataCube.engine;\n const documentationEntry = engine.getDocumentationEntry(documentationKey);\n const openDocLink = (event) => {\n event.preventDefault();\n event.stopPropagation();\n const entry = engine.getDocumentationEntry(documentationKey);\n if (entry) {\n if (engine.shouldDisplayDocumentationEntry(entry)) {\n dataCube.openDocumentationEntry(entry);\n dataCube.documentationDisplay.open();\n }\n else if (entry.url) {\n engine.openLink(entry.url);\n }\n }\n };\n if (!documentationEntry ||\n (!documentationEntry.url &&\n !engine.shouldDisplayDocumentationEntry(documentationEntry))) {\n return null;\n }\n return (_jsx(\"div\", { onClick: openDocLink, title: title ?? documentationEntry.text ?? 'Click to see documentation', className: cn('cursor-pointer text-xl text-sky-500', className), children: _jsx(DataCubeIcon.DocumentationHint, {}) }));\n};\n//# sourceMappingURL=DataCubeFormUtils.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useGridMenuItem, } from '@ag-grid-community/react';\nimport { FormBadge_WIP } from '../../core/DataCubeFormUtils.js';\nexport function WIP_GridMenuItem({ name, subMenu, checked, }) {\n useGridMenuItem({\n configureDefaults: () => true,\n });\n return (_jsxs(\"div\", { children: [_jsx(\"span\", { className: \"ag-menu-option-part ag-menu-option-icon\" }), _jsxs(\"span\", { className: \"ag-menu-option-part ag-menu-option-text !inline-flex items-center\", children: [_jsx(\"span\", { className: \"opacity-50\", children: name }), _jsx(FormBadge_WIP, {})] }), _jsx(\"span\", { className: \"ag-menu-option-part ag-menu-option-shortcut\" }), _jsx(\"span\", { className: \"ag-menu-option-part ag-menu-option-popup-pointer select-none\", children: subMenu && _jsx(\"span\", { className: \"ag-icon ag-icon-small-right\" }) })] }));\n}\n//# sourceMappingURL=DataCubeGridShared.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { deepClone, deleteEntry, IllegalStateError, uuid, } from '@finos/legend-shared';\nimport { makeObservable, observable, action, isObservable } from 'mobx';\nimport { DataCubeQueryFilterGroupOperator, } from '../DataCubeQueryEngine.js';\nexport class DataCubeFilterEditorTreeNode {\n uuid = uuid();\n parent;\n not = false;\n constructor(parent, not) {\n makeObservable(this, {\n parent: observable,\n setParent: action,\n not: observable,\n setNot: action,\n });\n this.parent = parent;\n this.not = Boolean(not);\n }\n setNot(not) {\n this.not = not;\n }\n setParent(parent) {\n this.parent = parent;\n }\n}\nexport class DataCubeFilterEditorConditionTreeNode extends DataCubeFilterEditorTreeNode {\n column;\n operation;\n value;\n constructor(parent, column, operation, value, not) {\n super(parent, not);\n makeObservable(this, {\n column: observable,\n setColumn: action,\n operation: observable,\n setOperation: action,\n value: observable.ref,\n setValue: action,\n updateValue: action,\n });\n this.column = column;\n this.operation = operation;\n this.setValue(value);\n }\n setColumn(col) {\n this.column = col;\n }\n setOperation(operation) {\n this.operation = operation;\n }\n setValue(value) {\n this.value = value\n ? isObservable(value)\n ? value\n : makeObservable(value, { value: observable })\n : undefined;\n }\n updateValue(value) {\n if (this.value) {\n this.value.value = value;\n }\n }\n}\nexport class DataCubeFilterEditorConditionGroupTreeNode extends DataCubeFilterEditorTreeNode {\n children = [];\n operation = DataCubeQueryFilterGroupOperator.AND;\n constructor(parent, operation, not) {\n super(parent, not);\n makeObservable(this, {\n children: observable,\n removeChild: action,\n addChild: action,\n operation: observable,\n setOperation: action,\n });\n this.operation = operation;\n }\n setOperation(operation) {\n this.operation = operation;\n }\n removeChild(node) {\n const found = deleteEntry(this.children, node);\n if (found) {\n node.setParent(undefined);\n }\n }\n addChild(node, idx) {\n if (!this.children.includes(node)) {\n if (idx !== undefined) {\n idx = Math.max(0, Math.min(idx, this.children.length));\n this.children.splice(idx, 0, node);\n }\n else {\n this.children.push(node);\n }\n node.setParent(this);\n }\n }\n}\nexport function buildFilterQuerySnapshot(node) {\n return {\n groupOperator: node.operation,\n not: node.not,\n conditions: node.children.map((childNode) => {\n if (childNode instanceof DataCubeFilterEditorConditionTreeNode) {\n return {\n name: childNode.column.name,\n type: childNode.column.type,\n operator: childNode.operation.operator,\n value: deepClone(childNode.value),\n not: childNode.not,\n };\n }\n else if (childNode instanceof DataCubeFilterEditorConditionGroupTreeNode) {\n return buildFilterQuerySnapshot(childNode);\n }\n throw new IllegalStateError('Unknown filter node');\n }),\n };\n}\nexport function buildFilterEditorTree(_node, parent, nodes, operationGetter) {\n const node = new DataCubeFilterEditorConditionGroupTreeNode(parent, _node.groupOperator === DataCubeQueryFilterGroupOperator.AND\n ? DataCubeQueryFilterGroupOperator.AND\n : DataCubeQueryFilterGroupOperator.OR, _node.not);\n _node.conditions.forEach((_childNode) => {\n let childNode;\n if ('groupOperator' in _childNode) {\n childNode = buildFilterEditorTree(_childNode, node, nodes, operationGetter);\n }\n else {\n childNode = new DataCubeFilterEditorConditionTreeNode(node, { name: _childNode.name, type: _childNode.type }, operationGetter(_childNode.operator), _childNode.value, _childNode.not);\n }\n node.addChild(childNode);\n nodes.set(childNode.uuid, childNode);\n });\n nodes.set(node.uuid, node);\n return node;\n}\n//# sourceMappingURL=DataCubeQueryFilterEditorState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { makeObservable, observable, action, computed } from 'mobx';\nimport { guaranteeNonNullable } from '@finos/legend-shared';\nimport { _sortByColName } from '../../core/models/DataCubeColumn.js';\nexport class DataCubeEditorColumnSelectorColumnState {\n name;\n type;\n constructor(name, type) {\n this.name = name;\n this.type = type;\n }\n}\nexport class DataCubeEditorColumnSelectorState {\n view;\n editor;\n selectedColumns = [];\n availableColumnsSearchText = '';\n selectedColumnsSearchText = '';\n onChange;\n constructor(editor, options) {\n makeObservable(this, {\n availableColumns: computed,\n availableColumnsForDisplay: computed,\n selectedColumnsForDisplay: computed,\n selectedColumns: observable,\n setSelectedColumns: action,\n availableColumnsSearchText: observable,\n setAvailableColumnsSearchText: action,\n selectedColumnsSearchText: observable,\n setSelectedColumnsSearchText: action,\n });\n this.editor = editor;\n this.view = editor.view;\n this.onChange = options?.onChange;\n }\n get availableColumnsForDisplay() {\n return this.availableColumns\n .filter((column) => !this.selectedColumns.find((col) => column.name === col.name))\n .sort(_sortByColName);\n }\n get selectedColumnsForDisplay() {\n return this.selectedColumns;\n }\n setSelectedColumns(val) {\n // NOTE: since we have a list of columns available which we treat as\n // \"templates\" to select from, we need to clone these columns in order\n // to avoid modifying the original available columns\n this.selectedColumns = val.map((col) => this.cloneColumn(col));\n this.onChange?.(this);\n }\n setAvailableColumnsSearchText(val) {\n this.availableColumnsSearchText = val;\n }\n setSelectedColumnsSearchText(val) {\n this.selectedColumnsSearchText = val;\n }\n getColumn(colName) {\n return guaranteeNonNullable(this.availableColumns.find((col) => col.name === colName), `Can't find column '${colName}'`);\n }\n}\n//# sourceMappingURL=DataCubeEditorColumnSelectorState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { action, makeObservable, observable } from 'mobx';\nimport {} from '../../core/DataCubeQuerySnapshot.js';\nimport { _toCol } from '../../core/models/DataCubeColumn.js';\nimport { DataCubeColumnKind, DataCubeQuerySortDirection, } from '../../core/DataCubeQueryEngine.js';\nimport { DataCubeEditorColumnSelectorColumnState, DataCubeEditorColumnSelectorState, } from './DataCubeEditorColumnSelectorState.js';\nimport { uniqBy } from '@finos/legend-shared';\nexport class DataCubeEditorSortColumnState extends DataCubeEditorColumnSelectorColumnState {\n direction;\n constructor(name, type, direction) {\n super(name, type);\n makeObservable(this, {\n direction: observable,\n setDirection: action,\n });\n this.direction = direction;\n }\n setDirection(val) {\n this.direction = val;\n }\n}\nexport class DataCubeEditorSortColumnSelectorState extends DataCubeEditorColumnSelectorState {\n cloneColumn(column) {\n return new DataCubeEditorSortColumnState(column.name, column.type, column.direction);\n }\n get availableColumns() {\n return uniqBy([\n // if pivot is active, take the pivot result columns and include\n // selected dimension columns which are not part of pivot columns\n ...(this.editor.horizontalPivots.selector.selectedColumns.length\n ? [\n ...this.editor.horizontalPivots.pivotResultColumns,\n ...[\n ...this.editor.columns.selector.selectedColumns,\n ...this.editor.verticalPivots.selector.selectedColumns,\n ].filter((column) => this.editor.columnProperties.getColumnConfiguration(column.name).kind === DataCubeColumnKind.DIMENSION &&\n !this.editor.horizontalPivots.selector.selectedColumns.find((col) => col.name === column.name)),\n ]\n : [\n ...this.editor.columns.selector.selectedColumns,\n ...this.editor.verticalPivots.selector.selectedColumns,\n ]),\n ...this.editor.groupExtendColumns,\n ], (col) => col.name).map((col) => new DataCubeEditorSortColumnState(col.name, col.type, DataCubeQuerySortDirection.ASCENDING));\n }\n}\nexport class DataCubeEditorSortsPanelState {\n view;\n editor;\n selector;\n constructor(editor) {\n this.editor = editor;\n this.view = editor.view;\n this.selector = new DataCubeEditorSortColumnSelectorState(editor);\n }\n adaptPropagatedChanges() {\n this.selector.setSelectedColumns(this.selector.selectedColumns.filter((column) => this.selector.availableColumns.find((col) => col.name === column.name)));\n }\n applySnaphot(snapshot, configuration) {\n this.selector.setSelectedColumns(snapshot.data.sortColumns.map((col) => {\n const column = this.selector.getColumn(col.name);\n return new DataCubeEditorSortColumnState(column.name, column.type, col.direction);\n }));\n }\n buildSnapshot(newSnapshot, baseSnapshot) {\n newSnapshot.data.sortColumns = this.selector.selectedColumns.map((col) => ({\n ..._toCol(col),\n direction: col.direction,\n }));\n }\n}\n//# sourceMappingURL=DataCubeEditorSortsPanelState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { PRIMITIVE_TYPE } from '@finos/legend-graph';\nimport { DataCubeColumnConfiguration, DataCubeConfiguration, } from './models/DataCubeConfiguration.js';\nimport { DataCubeQueryAggregateOperator, DataCubeColumnKind, DataCubeFontTextAlignment, } from './DataCubeQueryEngine.js';\nexport function buildDefaultColumnConfiguration(column) {\n const { name, type } = column;\n const config = new DataCubeColumnConfiguration(name, type);\n switch (type) {\n case PRIMITIVE_TYPE.NUMBER:\n case PRIMITIVE_TYPE.INTEGER:\n case PRIMITIVE_TYPE.DECIMAL:\n case PRIMITIVE_TYPE.FLOAT: {\n config.kind = DataCubeColumnKind.MEASURE;\n config.decimals = type === PRIMITIVE_TYPE.INTEGER ? 0 : 2;\n config.displayCommas = true;\n config.negativeNumberInParens = true;\n config.textAlign = DataCubeFontTextAlignment.RIGHT; // always align number to the right\n config.excludedFromPivot = false;\n config.aggregateOperator = DataCubeQueryAggregateOperator.SUM;\n config.pivotStatisticColumnFunction = DataCubeQueryAggregateOperator.SUM;\n break;\n }\n default: {\n config.kind = DataCubeColumnKind.DIMENSION;\n config.excludedFromPivot = true;\n config.aggregateOperator = DataCubeQueryAggregateOperator.UNIQUE;\n break;\n }\n }\n return config;\n}\nexport function buildDefaultConfiguration(columns) {\n const configuration = new DataCubeConfiguration();\n configuration.columns = columns.map((column) => buildDefaultColumnConfiguration(column));\n return configuration;\n}\n//# sourceMappingURL=DataCubeConfigurationBuilder.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { getDataType, DEFAULT_FONT_FAMILY, DEFAULT_FONT_SIZE, DEFAULT_FONT_BOLD, DEFAULT_FONT_ITALIC, DEFAULT_FONT_UNDERLINED, DEFAULT_FONT_STRIKETHROUGH, DEFAULT_TEXT_ALIGN, DEFAULT_FOREGROUND_COLOR, DEFAULT_NEGATIVE_FOREGROUND_COLOR, DEFAULT_ZERO_FOREGROUND_COLOR, DEFAULT_ERROR_FOREGROUND_COLOR, DEFAULT_BACKGROUND_COLOR, } from '../../core/DataCubeQueryEngine.js';\nimport {} from '@finos/legend-shared';\nimport { makeObservable, observable, action, computed } from 'mobx';\nimport { DataCubeColumnConfiguration, DataCubeConfiguration, DataCubePivotLayoutConfiguration, } from '../../core/models/DataCubeConfiguration.js';\nimport { buildDefaultColumnConfiguration } from '../../core/DataCubeConfigurationBuilder.js';\nimport {} from '../../core/DataCubeQuerySnapshot.js';\nimport { getAggregateOperation, } from '../../core/aggregation/DataCubeQueryAggregateOperation.js';\nexport class DataCubeEditorMutableColumnConfiguration extends DataCubeColumnConfiguration {\n dataType;\n aggregateOperation;\n static create(json, snapshot, aggregateOperations) {\n const configuration = Object.assign(new DataCubeEditorMutableColumnConfiguration('', ''), DataCubeColumnConfiguration.serialization.fromJson(json));\n configuration.dataType = getDataType(configuration.type);\n configuration.aggregateOperation = getAggregateOperation(configuration.aggregateOperator, aggregateOperations);\n makeObservable(configuration, {\n kind: observable,\n setKind: action,\n displayName: observable,\n setDisplayName: action,\n decimals: observable,\n setDecimals: action,\n displayCommas: observable,\n setDisplayCommas: action,\n negativeNumberInParens: observable,\n setNegativeNumberInParens: action,\n numberScale: observable,\n setNumberScale: action,\n missingValueDisplayText: observable,\n setMissingValueDisplayText: action,\n fontFamily: observable,\n setFontFamily: action,\n fontSize: observable,\n setFontSize: action,\n fontBold: observable,\n setFontBold: action,\n fontItalic: observable,\n setFontItalic: action,\n fontUnderline: observable,\n setFontUnderline: action,\n fontStrikethrough: observable,\n setFontStrikethrough: action,\n fontCase: observable,\n setFontCase: action,\n textAlign: observable,\n setTextAlign: action,\n normalForegroundColor: observable,\n setNormalForegroundColor: action,\n negativeForegroundColor: observable,\n setNegativeForegroundColor: action,\n zeroForegroundColor: observable,\n setZeroForegroundColor: action,\n errorForegroundColor: observable,\n setErrorForegroundColor: action,\n normalBackgroundColor: observable,\n setNormalBackgroundColor: action,\n negativeBackgroundColor: observable,\n setNegativeBackgroundColor: action,\n zeroBackgroundColor: observable,\n setZeroBackgroundColor: action,\n errorBackgroundColor: observable,\n setErrorBackgroundColor: action,\n isSelected: observable,\n setIsSelected: action,\n hideFromView: observable,\n setHideFromView: action,\n blur: observable,\n setBlur: action,\n fixedWidth: observable,\n setFixedWidth: action,\n minWidth: observable,\n setMinWidth: action,\n maxWidth: observable,\n setMaxWidth: action,\n pinned: observable,\n setPinned: action,\n displayAsLink: observable,\n setDisplayAsLink: action,\n linkLabelParameter: observable,\n setLinkLabelParameter: action,\n isUsingDefaultStyling: computed,\n useDefaultStyling: action,\n aggregateOperator: observable,\n aggregateOperation: observable,\n setAggregateOperation: action,\n aggregationParameters: observable,\n setAggregationParameters: action,\n excludedFromPivot: observable,\n setExcludedFromPivot: action,\n pivotSortDirection: observable,\n setPivotSortDirection: action,\n pivotStatisticColumnFunction: observable,\n setPivotStatisticColumnFunction: action,\n });\n return configuration;\n }\n static createDefault(column, aggregateOperations) {\n return DataCubeEditorMutableColumnConfiguration.create(DataCubeColumnConfiguration.serialization.toJson(buildDefaultColumnConfiguration(column)), undefined, aggregateOperations);\n }\n get isUsingDefaultStyling() {\n return (this.fontFamily === undefined &&\n this.fontSize === undefined &&\n this.fontBold === undefined &&\n this.fontItalic === undefined &&\n this.fontUnderline === undefined &&\n this.fontStrikethrough === undefined &&\n this.textAlign === undefined &&\n this.normalForegroundColor === undefined &&\n this.negativeForegroundColor === undefined &&\n this.zeroForegroundColor === undefined &&\n this.errorForegroundColor === undefined &&\n this.normalBackgroundColor === undefined &&\n this.negativeBackgroundColor === undefined &&\n this.zeroBackgroundColor === undefined &&\n this.errorBackgroundColor === undefined);\n }\n useDefaultStyling() {\n this.fontFamily = undefined;\n this.fontSize = undefined;\n this.fontBold = undefined;\n this.fontItalic = undefined;\n this.fontUnderline = undefined;\n this.fontStrikethrough = undefined;\n this.textAlign = undefined;\n this.normalForegroundColor = undefined;\n this.negativeForegroundColor = undefined;\n this.zeroForegroundColor = undefined;\n this.errorForegroundColor = undefined;\n this.normalBackgroundColor = undefined;\n this.negativeBackgroundColor = undefined;\n this.zeroBackgroundColor = undefined;\n this.errorBackgroundColor = undefined;\n }\n setKind(value) {\n this.kind = value;\n }\n setDisplayName(value) {\n this.displayName = value;\n }\n setDecimals(value) {\n this.decimals = value;\n }\n setDisplayCommas(value) {\n this.displayCommas = value;\n }\n setNegativeNumberInParens(value) {\n this.negativeNumberInParens = value;\n }\n setNumberScale(value) {\n this.numberScale = value;\n }\n setMissingValueDisplayText(value) {\n this.missingValueDisplayText = value;\n }\n setFontFamily(value) {\n this.fontFamily = value;\n }\n setFontSize(value) {\n this.fontSize = value;\n }\n setFontBold(value) {\n this.fontBold = value;\n }\n setFontItalic(value) {\n this.fontItalic = value;\n }\n setFontUnderline(value) {\n this.fontUnderline = value;\n }\n setFontStrikethrough(value) {\n this.fontStrikethrough = value;\n }\n setFontCase(value) {\n this.fontCase = value;\n }\n setTextAlign(value) {\n this.textAlign = value;\n }\n setNormalForegroundColor(value) {\n this.normalForegroundColor = value;\n }\n setNegativeForegroundColor(value) {\n this.negativeForegroundColor = value;\n }\n setZeroForegroundColor(value) {\n this.zeroForegroundColor = value;\n }\n setErrorForegroundColor(value) {\n this.errorForegroundColor = value;\n }\n setNormalBackgroundColor(value) {\n this.normalBackgroundColor = value;\n }\n setNegativeBackgroundColor(value) {\n this.negativeBackgroundColor = value;\n }\n setZeroBackgroundColor(value) {\n this.zeroBackgroundColor = value;\n }\n setErrorBackgroundColor(value) {\n this.errorBackgroundColor = value;\n }\n setIsSelected(value) {\n this.isSelected = value;\n }\n setHideFromView(value) {\n this.hideFromView = value;\n }\n setBlur(value) {\n this.blur = value;\n }\n setFixedWidth(value) {\n this.fixedWidth = value;\n }\n setMinWidth(value) {\n this.minWidth = value;\n }\n setMaxWidth(value) {\n this.maxWidth = value;\n }\n setPinned(value) {\n this.pinned = value;\n }\n setDisplayAsLink(value) {\n this.displayAsLink = value;\n }\n setLinkLabelParameter(value) {\n this.linkLabelParameter = value;\n }\n setAggregateOperation(value) {\n this.aggregateOperation = value;\n this.aggregateOperator = value.operator;\n }\n setAggregationParameters(value) {\n this.aggregationParameters = value;\n }\n setExcludedFromPivot(value) {\n this.excludedFromPivot = value;\n }\n setPivotSortDirection(value) {\n this.pivotSortDirection = value;\n }\n setPivotStatisticColumnFunction(value) {\n this.pivotStatisticColumnFunction = value;\n }\n}\nexport class DataCubeEditorMutablePivotLayoutConfiguration extends DataCubePivotLayoutConfiguration {\n static create(json) {\n const configuration = Object.assign(new DataCubeEditorMutablePivotLayoutConfiguration(), DataCubePivotLayoutConfiguration.serialization.fromJson(json));\n makeObservable(configuration, {\n expandedPaths: observable,\n setExpandedPaths: action,\n });\n return configuration;\n }\n setExpandedPaths(value) {\n this.expandedPaths = value;\n }\n}\nexport class DataCubeEditorMutableConfiguration extends DataCubeConfiguration {\n static create(json) {\n const configuration = Object.assign(new DataCubeEditorMutableConfiguration(), DataCubeConfiguration.serialization.fromJson(json));\n configuration.columns = [];\n makeObservable(configuration, {\n name: observable,\n setName: action,\n description: observable,\n setDescription: action,\n showHorizontalGridLines: observable,\n setShowHorizontalGridLines: action,\n showVerticalGridLines: observable,\n setShowVerticalGridLines: action,\n gridLineColor: observable,\n setGridLineColor: action,\n fontFamily: observable,\n setFontFamily: action,\n fontSize: observable,\n setFontSize: action,\n fontBold: observable,\n setFontBold: action,\n fontItalic: observable,\n setFontItalic: action,\n fontUnderline: observable,\n setFontUnderline: action,\n fontStrikethrough: observable,\n setFontStrikethrough: action,\n fontCase: observable,\n setFontCase: action,\n textAlign: observable,\n setTextAlign: action,\n normalForegroundColor: observable,\n setNormalForegroundColor: action,\n negativeForegroundColor: observable,\n setNegativeForegroundColor: action,\n zeroForegroundColor: observable,\n setZeroForegroundColor: action,\n errorForegroundColor: observable,\n setErrorForegroundColor: action,\n normalBackgroundColor: observable,\n setNormalBackgroundColor: action,\n negativeBackgroundColor: observable,\n setNegativeBackgroundColor: action,\n zeroBackgroundColor: observable,\n setZeroBackgroundColor: action,\n errorBackgroundColor: observable,\n setErrorBackgroundColor: action,\n alternateRows: observable,\n setAlternateRows: action,\n alternateRowsColor: observable,\n setAlternateRowsColor: action,\n alternateRowsCount: observable,\n setAlternateRowsCount: action,\n alternateRowsStandardMode: observable,\n setAlternateRowsStandardMode: action,\n showSelectionStats: observable,\n setShowSelectionStats: action,\n showWarningForTruncatedResult: observable,\n setShowWarningForTruncatedResult: action,\n initialExpandLevel: observable,\n setInitialExpandLevel: action,\n showRootAggregation: observable,\n setShowRootAggregation: action,\n showLeafCount: observable,\n setShowLeafCount: action,\n treeColumnSortDirection: observable,\n setTreeColumnSortDirection: action,\n pivotStatisticColumnName: observable,\n setPivotStatisticColumnName: action,\n pivotStatisticColumnPlacement: observable,\n setPivotStatisticColumnPlacement: action,\n isUsingDefaultStyling: computed,\n useDefaultStyling: action,\n });\n return configuration;\n }\n get isUsingDefaultStyling() {\n return (this.fontFamily === DEFAULT_FONT_FAMILY &&\n this.fontSize === DEFAULT_FONT_SIZE &&\n this.fontBold === DEFAULT_FONT_BOLD &&\n this.fontItalic === DEFAULT_FONT_ITALIC &&\n this.fontUnderline === DEFAULT_FONT_UNDERLINED &&\n this.fontStrikethrough === DEFAULT_FONT_STRIKETHROUGH &&\n this.textAlign === DEFAULT_TEXT_ALIGN &&\n this.normalForegroundColor === DEFAULT_FOREGROUND_COLOR &&\n this.negativeForegroundColor === DEFAULT_NEGATIVE_FOREGROUND_COLOR &&\n this.zeroForegroundColor === DEFAULT_ZERO_FOREGROUND_COLOR &&\n this.errorForegroundColor === DEFAULT_ERROR_FOREGROUND_COLOR &&\n this.normalBackgroundColor === DEFAULT_BACKGROUND_COLOR &&\n this.negativeBackgroundColor === DEFAULT_BACKGROUND_COLOR &&\n this.zeroBackgroundColor === DEFAULT_BACKGROUND_COLOR &&\n this.errorBackgroundColor === DEFAULT_BACKGROUND_COLOR);\n }\n useDefaultStyling() {\n this.fontFamily = DEFAULT_FONT_FAMILY;\n this.fontSize = DEFAULT_FONT_SIZE;\n this.fontBold = DEFAULT_FONT_BOLD;\n this.fontItalic = DEFAULT_FONT_ITALIC;\n this.fontUnderline = DEFAULT_FONT_UNDERLINED;\n this.fontStrikethrough = DEFAULT_FONT_STRIKETHROUGH;\n this.textAlign = DEFAULT_TEXT_ALIGN;\n this.normalForegroundColor = DEFAULT_FOREGROUND_COLOR;\n this.negativeForegroundColor = DEFAULT_NEGATIVE_FOREGROUND_COLOR;\n this.zeroForegroundColor = DEFAULT_ZERO_FOREGROUND_COLOR;\n this.errorForegroundColor = DEFAULT_ERROR_FOREGROUND_COLOR;\n this.normalBackgroundColor = DEFAULT_BACKGROUND_COLOR;\n this.negativeBackgroundColor = DEFAULT_BACKGROUND_COLOR;\n this.zeroBackgroundColor = DEFAULT_BACKGROUND_COLOR;\n this.errorBackgroundColor = DEFAULT_BACKGROUND_COLOR;\n }\n setName(value) {\n this.name = value;\n }\n setDescription(value) {\n this.description = value;\n }\n setShowHorizontalGridLines(value) {\n this.showHorizontalGridLines = value;\n }\n setShowVerticalGridLines(value) {\n this.showVerticalGridLines = value;\n }\n setGridLineColor(value) {\n this.gridLineColor = value;\n }\n setFontFamily(value) {\n this.fontFamily = value;\n }\n setFontSize(value) {\n this.fontSize = value;\n }\n setFontBold(value) {\n this.fontBold = value;\n }\n setFontItalic(value) {\n this.fontItalic = value;\n }\n setFontUnderline(value) {\n this.fontUnderline = value;\n }\n setFontStrikethrough(value) {\n this.fontStrikethrough = value;\n }\n setFontCase(value) {\n this.fontCase = value;\n }\n setTextAlign(value) {\n this.textAlign = value;\n }\n setNormalForegroundColor(value) {\n this.normalForegroundColor = value;\n }\n setNegativeForegroundColor(value) {\n this.negativeForegroundColor = value;\n }\n setZeroForegroundColor(value) {\n this.zeroForegroundColor = value;\n }\n setErrorForegroundColor(value) {\n this.errorForegroundColor = value;\n }\n setNormalBackgroundColor(value) {\n this.normalBackgroundColor = value;\n }\n setNegativeBackgroundColor(value) {\n this.negativeBackgroundColor = value;\n }\n setZeroBackgroundColor(value) {\n this.zeroBackgroundColor = value;\n }\n setErrorBackgroundColor(value) {\n this.errorBackgroundColor = value;\n }\n setAlternateRows(value) {\n this.alternateRows = value;\n }\n setAlternateRowsColor(value) {\n this.alternateRowsColor = value;\n }\n setAlternateRowsCount(value) {\n this.alternateRowsCount = value;\n }\n setAlternateRowsStandardMode(value) {\n this.alternateRowsStandardMode = value;\n }\n setShowSelectionStats(value) {\n this.showSelectionStats = value;\n }\n setShowWarningForTruncatedResult(value) {\n this.showWarningForTruncatedResult = value;\n }\n setInitialExpandLevel(value) {\n this.initialExpandLevel = value;\n }\n setShowRootAggregation(value) {\n this.showRootAggregation = value;\n }\n setShowLeafCount(value) {\n this.showLeafCount = value;\n }\n setTreeColumnSortDirection(value) {\n this.treeColumnSortDirection = value;\n }\n setPivotStatisticColumnPlacement(value) {\n this.pivotStatisticColumnPlacement = value;\n }\n setPivotStatisticColumnName(value) {\n this.pivotStatisticColumnName = value;\n }\n setExpandedPaths(value) {\n this.pivotLayout.expandedPaths = value;\n }\n}\n//# sourceMappingURL=DataCubeEditorMutableConfiguration.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { action, makeObservable, observable } from 'mobx';\nimport {} from '../../core/DataCubeQuerySnapshot.js';\nimport { DataCubeEditorMutableConfiguration } from './DataCubeEditorMutableConfiguration.js';\nexport class DataCubeEditorGeneralPropertiesPanelState {\n view;\n editor;\n limit = -1;\n configuration = new DataCubeEditorMutableConfiguration();\n constructor(editor) {\n makeObservable(this, {\n configuration: observable,\n limit: observable,\n setLimit: action,\n applySnaphot: action,\n });\n this.editor = editor;\n this.view = editor.view;\n }\n setLimit(val) {\n this.limit = val;\n }\n applySnaphot(snapshot, configuration) {\n this.setLimit(snapshot.data.limit !== undefined && snapshot.data.limit >= 0\n ? snapshot.data.limit\n : -1);\n this.configuration = DataCubeEditorMutableConfiguration.create(snapshot.data.configuration);\n }\n buildSnapshot(newSnapshot, baseSnapshot) {\n const data = newSnapshot.data;\n data.limit = this.limit < 0 ? undefined : this.limit;\n data.configuration = this.configuration.serialize();\n }\n}\n//# sourceMappingURL=DataCubeEditorGeneralPropertiesPanelState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { action, computed, makeObservable, observable } from 'mobx';\nimport {} from '../../core/DataCubeQuerySnapshot.js';\nimport { DataCubeEditorMutableColumnConfiguration } from './DataCubeEditorMutableConfiguration.js';\nimport { getNonNullableEntry, guaranteeNonNullable, } from '@finos/legend-shared';\nexport class DataCubeEditorColumnPropertiesPanelState {\n view;\n editor;\n columns = [];\n selectedColumnName;\n showAdvancedSettings = false;\n constructor(editor) {\n makeObservable(this, {\n columns: observable,\n setColumns: action,\n selectedColumnName: observable,\n setSelectedColumnName: action,\n selectedColumn: computed,\n showAdvancedSettings: observable,\n setShowAdvancedSettings: action,\n applySnaphot: action,\n });\n this.editor = editor;\n this.view = editor.view;\n }\n getColumnConfiguration(colName) {\n return guaranteeNonNullable(this.columns.find((col) => col.name === colName), `Can't find configuration for column '${colName}'`);\n }\n setColumns(val) {\n this.columns = val;\n }\n setSelectedColumnName(val) {\n this.selectedColumnName = val;\n }\n get selectedColumn() {\n return this.columns.find((col) => col.name === this.selectedColumnName);\n }\n setShowAdvancedSettings(val) {\n this.showAdvancedSettings = val;\n }\n applySnaphot(snapshot, configuration) {\n this.setColumns(snapshot.data.configuration.columns.map((column) => DataCubeEditorMutableColumnConfiguration.create(column, snapshot, this.view.engine.aggregateOperations)));\n if (!this.selectedColumn && this.columns.length) {\n this.setSelectedColumnName(getNonNullableEntry(this.columns, 0).name);\n }\n }\n buildSnapshot(newSnapshot, baseSnapshot) {\n newSnapshot.data.configuration = {\n ...newSnapshot.data.configuration,\n columns: this.columns.map((column) => column.serialize()),\n };\n }\n}\n//# sourceMappingURL=DataCubeEditorColumnPropertiesPanelState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { action, makeObservable, observable, override } from 'mobx';\nimport {} from '../../core/DataCubeQuerySnapshot.js';\nimport { _toCol } from '../../core/models/DataCubeColumn.js';\nimport { DataCubeEditorColumnSelectorColumnState, DataCubeEditorColumnSelectorState, } from './DataCubeEditorColumnSelectorState.js';\nimport {} from '../../core/models/DataCubeConfiguration.js';\nexport class DataCubeEditorBasicColumnSelectorState extends DataCubeEditorColumnSelectorState {\n showHiddenColumns = false;\n constructor(editor, options) {\n super(editor, options);\n makeObservable(this, {\n availableColumnsForDisplay: override,\n selectedColumnsForDisplay: override,\n showHiddenColumns: observable,\n setShowHiddenColumns: action,\n });\n }\n cloneColumn(column) {\n return new DataCubeEditorColumnSelectorColumnState(column.name, column.type);\n }\n get availableColumns() {\n return [\n ...this.editor.sourceColumns,\n ...this.editor.leafExtendColumns,\n ...this.editor.groupExtendColumns,\n ].map((col) => new DataCubeEditorColumnSelectorColumnState(col.name, col.type));\n }\n get availableColumnsForDisplay() {\n return super.availableColumnsForDisplay.filter((column) => this.showHiddenColumns ||\n !this.editor.columnProperties.getColumnConfiguration(column.name)\n .hideFromView);\n }\n get selectedColumnsForDisplay() {\n return super.selectedColumnsForDisplay.filter((column) => this.showHiddenColumns ||\n !this.editor.columnProperties.getColumnConfiguration(column.name)\n .hideFromView);\n }\n setShowHiddenColumns(val) {\n this.showHiddenColumns = val;\n }\n}\n/**\n * This panel allows selection of columns (including extended columns) for the query.\n *\n * NOTE: this does not really represent the `select()` function in the query. Think about\n * this column selection more intuitively from users' perspective, i.e. what columns they\n * wish to see in the grid. Whereas the `select()` function actually impact the data fetching\n * which should be computed based on more than just information coming from this panels, such\n * as horizontal pivots and vertical pivots, since regardless of whether user choose to see\n * those columns or not, they still need to be fetched.\n */\nexport class DataCubeEditorColumnsPanelState {\n view;\n editor;\n selector;\n constructor(editor) {\n makeObservable(this, {\n applySnaphot: action,\n });\n this.editor = editor;\n this.view = editor.view;\n this.selector = new DataCubeEditorBasicColumnSelectorState(editor, {\n onChange: (selector) => {\n const selectedColumnConfigurations = selector.selectedColumns.map((col) => this.editor.columnProperties.getColumnConfiguration(col.name));\n const unselectedColumnConfigurations = this.editor.columnProperties.columns.filter((col) => !selectedColumnConfigurations.includes(col));\n // update selection config in column configurations and apply the\n // order of selected columns in the column configurations list (unselected\n // columns are kept in the same order and placed after all selected ones)\n selectedColumnConfigurations.forEach((col) => col.setIsSelected(true));\n unselectedColumnConfigurations.forEach((col) => col.setIsSelected(false));\n this.editor.columnProperties.setColumns([\n ...selectedColumnConfigurations,\n ...unselectedColumnConfigurations,\n ]);\n },\n });\n }\n /**\n * NOTE: Ideally, this should be called on every changes made to the column selection, but to\n * give user some room for error, i.e. when user accidentally select/deselect columns, we would\n * not propagate this change until user either leaves this panel or explicitly applies changes\n * (i.e. publishes a new snapshot)\n */\n propagateChanges() {\n this.editor.sorts.adaptPropagatedChanges();\n }\n applySnaphot(snapshot, configuration) {\n this.selector.setSelectedColumns(this.editor.columnProperties.columns\n // extract from the configuration since it specifies the order of columns\n // there taking into account group-level extended columns\n .filter((col) => col.isSelected)\n .map((col) => {\n const column = this.selector.getColumn(col.name);\n return new DataCubeEditorColumnSelectorColumnState(column.name, column.type);\n }));\n }\n buildSnapshot(newSnapshot, baseSnapshot) {\n this.propagateChanges();\n // NOTE: these columns make up just part of the set of columns we want to fetch with `select()`.\n // Subsequently, we need to include columns used for horizontal pivots and vertical pivots.\n //\n // Note that this is a fairly simple way to determine the set of columns to fetch, but we have a\n // compile check to ensure the columns needed by parts we don't account for well such as group-level\n // extended columns must be properly included.\n //\n // Maybe, we can improve this later by having an algorithm to determine the set of columns needed\n // by each extended column.\n newSnapshot.data.selectColumns = this.selector.selectedColumns\n // filter out group-level extended columns since these columns are technically not selectable\n .filter((col) => !this.editor.groupExtendColumns.find((column) => column.name === col.name))\n .map(_toCol);\n }\n}\n//# sourceMappingURL=DataCubeEditorColumnsPanelState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { uniqBy } from '@finos/legend-shared';\nimport { DataCubeColumnKind } from '../../core/DataCubeQueryEngine.js';\nimport {} from '../../core/DataCubeQuerySnapshot.js';\nimport { _toCol } from '../../core/models/DataCubeColumn.js';\nimport { DataCubeEditorColumnSelectorColumnState, DataCubeEditorColumnSelectorState, } from './DataCubeEditorColumnSelectorState.js';\nexport class DataCubeEditorVerticalPivotColumnSelectorState extends DataCubeEditorColumnSelectorState {\n cloneColumn(column) {\n return new DataCubeEditorColumnSelectorColumnState(column.name, column.type);\n }\n get availableColumns() {\n return this.editor.columnProperties.columns\n .filter((column) => column.kind === DataCubeColumnKind.DIMENSION &&\n // exclude group-level extended columns\n !this.editor.groupExtendColumns.find((col) => col.name === column.name) &&\n // exclude pivot columns\n !this.editor.horizontalPivots.selector.selectedColumns.find((col) => col.name === column.name))\n .map((col) => new DataCubeEditorColumnSelectorColumnState(col.name, col.type));\n }\n}\nexport class DataCubeEditorVerticalPivotsPanelState {\n view;\n editor;\n selector;\n constructor(editor) {\n this.editor = editor;\n this.view = editor.view;\n this.selector = new DataCubeEditorVerticalPivotColumnSelectorState(editor);\n }\n adaptPropagatedChanges() {\n this.selector.setSelectedColumns(this.selector.selectedColumns.filter((column) => this.selector.availableColumns.find((col) => col.name === column.name)));\n }\n applySnaphot(snapshot, configuration) {\n this.selector.setSelectedColumns((snapshot.data.groupBy?.columns ?? []).map((col) => new DataCubeEditorColumnSelectorColumnState(col.name, col.type)));\n }\n buildSnapshot(newSnapshot, baseSnapshot) {\n newSnapshot.data.groupBy = this.selector.selectedColumns.length\n ? {\n columns: this.selector.selectedColumns.map(_toCol),\n }\n : undefined;\n newSnapshot.data.selectColumns = uniqBy([...newSnapshot.data.selectColumns, ...this.selector.selectedColumns], (col) => col.name).map(_toCol);\n }\n}\n//# sourceMappingURL=DataCubeEditorVerticalPivotsPanelState.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { observer } from 'mobx-react-lite';\nimport { DataCubeIcon } from '@finos/legend-art';\nimport React, { useCallback, useEffect, useRef, useState } from 'react';\nimport { AgGridReact, } from '@ag-grid-community/react';\nimport { ClientSideRowModelModule } from '@ag-grid-community/client-side-row-model';\nimport {} from '../../../stores/view/editor/DataCubeEditorColumnSelectorState.js';\nimport { isNonNullable } from '@finos/legend-shared';\nimport { getDataForAllFilteredNodes, getDataForAllNodes, } from '../../../stores/view/grid/DataCubeGridClientEngine.js';\nfunction getBaseGridProps() {\n return {\n modules: [ClientSideRowModelModule],\n className: 'ag-theme-quartz',\n animateRows: false,\n getRowId: (params) => params.data.name,\n editType: 'fullRow',\n rowDragMultiRow: true,\n rowDragEntireRow: true,\n rowSelection: {\n mode: 'multiRow',\n checkboxes: true,\n headerCheckbox: true,\n enableClickSelection: true,\n },\n selectionColumnDef: {\n width: 40,\n headerClass: '!pl-[23px]',\n cellClass: '!pl-1.5',\n rowDrag: true,\n rowDragText: (params, dragItemCount) => {\n if (dragItemCount > 1) {\n return `${dragItemCount} columns`;\n }\n return (params.rowNode?.data).name;\n },\n sortable: false,\n resizable: false,\n suppressHeaderMenuButton: true,\n },\n suppressMoveWhenRowDragging: true,\n rowHeight: 20,\n headerHeight: 20,\n suppressRowHoverHighlight: false,\n noRowsOverlayComponent: (params) => {\n if (params.api.getQuickFilter()) {\n return (_jsxs(\"div\", { className: \"flex items-center border-[1.5px] border-neutral-300 p-2 font-semibold text-neutral-400\", children: [_jsx(\"div\", { children: _jsx(DataCubeIcon.WarningCircle, { className: \"mr-1 text-lg\" }) }), \"No match found\"] }));\n }\n if (params.noColumnsSelectedRenderer) {\n return params.noColumnsSelectedRenderer();\n }\n return _jsx(\"div\", {});\n },\n // Show no rows overlay when there are no search results\n // See https://stackoverflow.com/a/72637410\n onModelUpdated: (event) => {\n if (event.api.getDisplayedRowCount() === 0) {\n event.api.showNoRowsOverlay();\n }\n else {\n event.api.hideOverlay();\n }\n },\n };\n}\nfunction getBaseColumnDef() {\n return {\n field: 'name',\n colId: 'name',\n flex: 1,\n minWidth: 100,\n filter: true,\n sortable: false,\n resizable: false,\n suppressHeaderMenuButton: true,\n getQuickFilterText: (params) => params.value,\n };\n}\n/**\n * Move this display to a separate component to avoid re-rendering the header too frequently\n */\nconst ColumnsSearchResultCountBadge = observer(function ColumnsSearchResultCountBadge(props) {\n const { selector, gridApi, scope } = props;\n return (_jsxs(\"div\", { className: \"flex items-center justify-center rounded-lg bg-neutral-500 px-1 py-0.5 font-mono text-xs font-bold text-white\", children: [`${getDataForAllFilteredNodes(gridApi).length}/${scope === 'available' ? selector.availableColumnsForDisplay.length : selector.selectedColumnsForDisplay.length}`, _jsx(\"span\", { className: \"hidden\", children: scope === 'available'\n ? // subscribing to the search text to trigger re-render as it changes\n selector.availableColumnsSearchText\n : selector.selectedColumnsSearchText })] }));\n});\nexport const DataCubeEditorColumnSelector = observer(function DataCubeEditorColumnSelector(props) {\n const { selector, columnLabelRenderer, columnActionRenderer, noColumnsSelectedRenderer, } = props;\n const [selectedAvailableColumns, setSelectedAvailableColumns] = useState([]);\n const [selectedSelectedColumns, setSelectedSelectedColumns] = useState([]);\n const [availableColumnsGridApi, setAvailableColumnsGridApi] = useState(null);\n const [selectedColumnsGridApi, setSelectedColumnsGridApi] = useState(null);\n const searchAvailableColumnsInputRef = useRef(null);\n const searchSelectedColumnsInputRef = useRef(null);\n /**\n * Since we use managed row dragging for selected columns,\n * we just need to sync the row data with the state.\n * Dragging (multiple) row(s) to specific position have been\n * handled by ag-grid.\n */\n const onSelectedColumnsDragStop = useCallback((params) => {\n selector.setSelectedColumns(getDataForAllNodes(params.api));\n }, [selector]);\n const onAvailableColumnsDragStop = useCallback((params) => {\n const nodes = params.nodes;\n const columnsToMove = nodes\n .map((node) => node.data)\n .filter(isNonNullable);\n selector.setSelectedColumns(selector.selectedColumns.filter((column) => !columnsToMove.includes(column)));\n }, [selector]);\n /**\n * Since we use managed row dragging for selected columns,\n * we just need to sync the row data with the state\n * Dragging (multiple) row(s) to specific position have been\n * handled by ag-grid.\n */\n const onSelectedColumnsDragEnd = useCallback((event) => {\n if (event.overIndex === -1) {\n return;\n }\n selector.setSelectedColumns(getDataForAllNodes(event.api));\n }, [selector]);\n /**\n * Setup row drop zones for each grid to be the other\n * See https://www.ag-grid.com/react-data-grid/row-dragging-to-grid/\n */\n useEffect(() => {\n if (!availableColumnsGridApi || !selectedColumnsGridApi) {\n return;\n }\n const selectedColumnsDropZoneParams = selectedColumnsGridApi.getRowDropZoneParams({\n onDragStop: (event) => {\n onSelectedColumnsDragStop(event);\n availableColumnsGridApi.clearFocusedCell();\n },\n });\n availableColumnsGridApi.removeRowDropZone(selectedColumnsDropZoneParams);\n availableColumnsGridApi.addRowDropZone(selectedColumnsDropZoneParams);\n const availableColumnsDropZoneParams = availableColumnsGridApi.getRowDropZoneParams({\n onDragStop: (event) => {\n onAvailableColumnsDragStop(event);\n selectedColumnsGridApi.clearFocusedCell();\n },\n });\n selectedColumnsGridApi.removeRowDropZone(availableColumnsDropZoneParams);\n selectedColumnsGridApi.addRowDropZone(availableColumnsDropZoneParams);\n }, [\n availableColumnsGridApi,\n selectedColumnsGridApi,\n onSelectedColumnsDragStop,\n onAvailableColumnsDragStop,\n ]);\n return (_jsxs(\"div\", { className: \"data-cube-column-selector flex h-full w-full\", children: [_jsxs(\"div\", { className: \"h-full w-[calc(50%_-_20px)]\", children: [_jsx(\"div\", { className: \"flex h-5 items-center text-sm\", children: \"Available columns:\" }), _jsxs(\"div\", { className: \"h-[calc(100%_-_20px)] rounded-sm border border-neutral-200\", children: [_jsxs(\"div\", { className: \"relative h-6 border-b border-neutral-200\", children: [_jsx(\"input\", { className: \"h-full w-full pl-10 pr-6 placeholder-neutral-400\", ref: searchAvailableColumnsInputRef, placeholder: \"Click here to search...\", value: selector.availableColumnsSearchText, onChange: (event) => selector.setAvailableColumnsSearchText(event.target.value), onKeyDown: (event) => {\n if (event.code === 'Escape') {\n event.stopPropagation();\n searchAvailableColumnsInputRef.current?.select();\n selector.setAvailableColumnsSearchText('');\n }\n } }), _jsx(\"div\", { className: \"absolute left-0 top-0 flex h-6 w-10 items-center justify-center\", children: _jsx(DataCubeIcon.Search, { className: \"stroke-[3px] text-lg text-neutral-500\" }) }), _jsx(\"button\", { className: \"absolute right-0 top-0 flex h-6 w-6 items-center justify-center text-neutral-500 disabled:text-neutral-300\", disabled: !selector.availableColumnsSearchText, title: \"Clear search [Esc]\", onClick: () => {\n selector.setAvailableColumnsSearchText('');\n searchAvailableColumnsInputRef.current?.focus();\n }, children: _jsx(DataCubeIcon.X, { className: \"text-lg\" }) })] }), _jsx(\"div\", { className: \"h-[calc(100%_-_24px)]\", children: _jsx(AgGridReact, { ...getBaseGridProps(), \n // Disable managed row-dragging to disallow changing the order of columns\n // and to make sure the row data and the available columns state are in sync\n rowDragManaged: false, onGridReady: (params) => setAvailableColumnsGridApi(params.api), onSelectionChanged: (event) => {\n setSelectedAvailableColumns(event.api\n .getSelectedNodes()\n .map((node) => node.data)\n .filter(isNonNullable));\n }, \n // Using ag-grid quick filter is a cheap way to implement search\n quickFilterText: selector.availableColumnsSearchText, rowData: selector.availableColumnsForDisplay, columnDefs: [\n {\n ...getBaseColumnDef(),\n /**\n * Support double-click to add all (filtered by search) columns\n */\n headerComponent: (params) => (_jsxs(\"button\", { title: \"Double-click to add all columns\", className: \"flex h-full w-full items-center justify-between pl-0.5\", onDoubleClick: () => {\n // The columns being moved are scoped by the current search\n const filteredData = getDataForAllFilteredNodes(params.api);\n selector.setSelectedColumns([\n ...selector.selectedColumns,\n ...filteredData,\n ]);\n params.api.clearFocusedCell();\n }, children: [_jsx(\"div\", { children: `[All Columns]` }), _jsx(ColumnsSearchResultCountBadge, { selector: selector, gridApi: params.api, scope: \"available\" })] })),\n cellRenderer: (params) => {\n const data = params.data;\n if (!data) {\n return null;\n }\n return (_jsxs(\"div\", { className: \"flex h-full w-full cursor-pointer items-center\", title: `[${data.name}]\\nDouble-click to add column`, onDoubleClick: () => {\n selector.setSelectedColumns([\n ...selector.selectedColumns,\n data,\n ]);\n params.api.clearFocusedCell();\n }, children: [columnLabelRenderer?.({\n selector,\n column: data,\n }) ?? (_jsx(\"div\", { className: \"h-full flex-1 items-center overflow-hidden overflow-ellipsis whitespace-nowrap pl-2\", children: data.name })), _jsx(\"div\", { className: \"flex h-full\", children: columnActionRenderer?.({\n selector,\n column: data,\n }) ?? null })] }));\n },\n },\n ] }) })] })] }), _jsx(\"div\", { className: \"flex h-full w-10 items-center justify-center\", children: _jsxs(\"div\", { className: \"flex flex-col\", children: [_jsx(\"button\", { className: \"flex items-center justify-center rounded-sm border border-neutral-300 bg-neutral-100 text-neutral-500 hover:bg-neutral-200 disabled:bg-neutral-200 disabled:text-neutral-400\", title: \"Add selected columns\", \n /**\n * Support add selected (filtered by search) columns\n * We reset the selection after this operation\n */\n onClick: () => {\n if (!availableColumnsGridApi) {\n return;\n }\n // The columns being moved are scoped by the current search\n const filteredData = getDataForAllFilteredNodes(availableColumnsGridApi);\n const columnsToMove = selectedAvailableColumns.filter((column) => filteredData.includes(column));\n selector.setSelectedColumns([\n ...selector.selectedColumns,\n ...columnsToMove,\n ]);\n availableColumnsGridApi.clearFocusedCell();\n }, disabled: selectedAvailableColumns.length === 0, children: _jsx(DataCubeIcon.ChevronRight, { className: \"text-2xl\" }) }), _jsx(\"button\", { className: \"mt-2 flex items-center justify-center rounded-sm border border-neutral-300 bg-neutral-100 text-neutral-500 hover:bg-neutral-200 disabled:bg-neutral-200 disabled:text-neutral-400\", title: \"Remove selected columns\", \n /**\n * Support remove selected (filtered by search) columns\n * We reset the selection after this operation\n */\n onClick: () => {\n if (!selectedColumnsGridApi) {\n return;\n }\n // The columns being moved are scoped by the current search\n const filteredData = getDataForAllFilteredNodes(selectedColumnsGridApi);\n const columnsToMove = selectedSelectedColumns.filter((column) => filteredData.includes(column));\n selector.setSelectedColumns(selector.selectedColumns.filter((column) => !columnsToMove.includes(column)));\n selectedColumnsGridApi.clearFocusedCell();\n }, disabled: selectedSelectedColumns.length === 0, children: _jsx(DataCubeIcon.ChevronLeft, { className: \"text-2xl\" }) })] }) }), _jsxs(\"div\", { className: \"h-full w-[calc(50%_-_20px)]\", children: [_jsx(\"div\", { className: \"flex h-5 items-center text-sm\", children: \"Selected columns:\" }), _jsxs(\"div\", { className: \"h-[calc(100%_-_20px)] rounded-sm border border-neutral-200\", children: [_jsxs(\"div\", { className: \"relative h-6 border-b border-neutral-200\", children: [_jsx(\"input\", { className: \"h-full w-full pl-10 placeholder-neutral-400\", ref: searchSelectedColumnsInputRef, placeholder: \"Click here to search...\", value: selector.selectedColumnsSearchText, onChange: (event) => selector.setSelectedColumnsSearchText(event.target.value), onKeyDown: (event) => {\n if (event.code === 'Escape') {\n event.stopPropagation();\n selector.setSelectedColumnsSearchText('');\n }\n } }), _jsx(\"div\", { className: \"absolute left-0 top-0 flex h-6 w-10 items-center justify-center\", children: _jsx(DataCubeIcon.Search, { className: \"stroke-[3px] text-lg text-neutral-500\" }) }), _jsx(\"button\", { className: \"absolute right-0 top-0 flex h-6 w-6 items-center justify-center text-neutral-500 disabled:text-neutral-300\", disabled: !selector.selectedColumnsSearchText, title: \"Clear search [Esc]\", onClick: () => {\n selector.setSelectedColumnsSearchText('');\n searchSelectedColumnsInputRef.current?.focus();\n }, children: _jsx(DataCubeIcon.X, { className: \"text-lg\" }) })] }), _jsx(\"div\", { className: \"h-[calc(100%_-_24px)]\", children: _jsx(AgGridReact, { ...getBaseGridProps(), \n // NOTE: technically, we don't want to enable managed row-dragging here\n // but enabling this gives us free row moving management and interaction\n // comes out of the box from ag-grid, we will just sync the state with\n // grid row data afterwards to ensure consistency\n rowDragManaged: true, onRowDragEnd: onSelectedColumnsDragEnd, onGridReady: (params) => setSelectedColumnsGridApi(params.api), onSelectionChanged: (event) => {\n setSelectedSelectedColumns(event.api\n .getSelectedNodes()\n .map((node) => node.data)\n .filter(isNonNullable));\n }, \n // Using ag-grid quick filter is a cheap way to implement search\n quickFilterText: selector.selectedColumnsSearchText, noRowsOverlayComponentParams: {\n noColumnsSelectedRenderer,\n }, rowData: selector.selectedColumnsForDisplay, columnDefs: [\n {\n ...getBaseColumnDef(),\n /**\n * Support double-click to remove all (filtered by search) columns\n */\n headerComponent: (params) => (_jsxs(\"button\", { title: \"Double-click to remove all columns\", className: \"flex h-full w-full items-center justify-between pl-0.5\", onDoubleClick: () => {\n // The columns being moved are scoped by the current search\n const filteredData = getDataForAllFilteredNodes(params.api);\n selector.setSelectedColumns(selector.selectedColumns.filter((column) => !filteredData.includes(column)));\n params.api.clearFocusedCell();\n }, children: [_jsx(\"div\", { children: `[All Columns]` }), _jsx(ColumnsSearchResultCountBadge, { selector: selector, gridApi: params.api, scope: \"selected\" })] })),\n cellRenderer: (params) => {\n const data = params.data;\n if (!data) {\n return null;\n }\n return (_jsxs(\"div\", { className: \"flex h-full w-full cursor-pointer items-center\", title: `[${data.name}]\\nDouble-click to add column`, onDoubleClick: () => {\n selector.setSelectedColumns(selector.selectedColumns.filter((column) => column !== data));\n params.api.clearFocusedCell();\n }, children: [columnLabelRenderer?.({\n selector,\n column: data,\n }) ?? (_jsx(\"div\", { className: \"h-full flex-1 items-center overflow-hidden overflow-ellipsis whitespace-nowrap pl-2\", children: data.name })), _jsx(\"div\", { className: \"flex h-full\", children: columnActionRenderer?.({\n selector,\n column: data,\n }) ?? null })] }));\n },\n },\n ] }) })] })] })] }));\n});\n//# sourceMappingURL=DataCubeEditorColumnSelector.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { observer } from 'mobx-react-lite';\nimport { DataCubeIcon, useDropdownMenu } from '@finos/legend-art';\nimport { DataCubeEditorColumnSelector } from './DataCubeEditorColumnSelector.js';\nimport { DataCubeQuerySortDirection, PIVOT_COLUMN_NAME_VALUE_SEPARATOR, } from '../../../stores/core/DataCubeQueryEngine.js';\nimport { FormDropdownMenu, FormDropdownMenuItem, } from '../../core/DataCubeFormUtils.js';\nconst SortDirectionDropdown = observer((props) => {\n const { column } = props;\n const [openDirectionDropdown, closeDirectionDropdown, directionDropdownProps, directionDropdownPropsOpen,] = useDropdownMenu();\n return (_jsxs(\"div\", { className: \"group relative flex h-full items-center\", children: [!directionDropdownPropsOpen && (_jsx(\"div\", { className: \"flex h-[18px] w-32 items-center border border-transparent px-2 text-sm text-neutral-400 group-hover:invisible\", children: column.direction })), directionDropdownPropsOpen && (_jsxs(\"div\", { className: \"flex h-[18px] w-32 items-center justify-between border border-sky-600 bg-sky-50 pl-2 pr-0.5 text-sm\", children: [_jsx(\"div\", { children: column.direction }), _jsx(\"div\", { children: _jsx(DataCubeIcon.CaretDown, {}) })] })), _jsxs(\"button\", { className: \"invisible absolute right-0 z-10 flex h-[18px] w-32 items-center justify-between border border-neutral-400 pl-2 pr-0.5 text-sm text-neutral-700 group-hover:visible\", \n /**\n * ag-grid row select event listener is at a deeper layer than this dropdown trigger\n * so in order to prevent selecting the row while opening the dropdown, we need to stop\n * the propagation as event capturing is happening, not when it's bubbling.\n */\n onClickCapture: (event) => {\n event.stopPropagation();\n openDirectionDropdown(event);\n }, onClick: (event) => event.stopPropagation(), children: [_jsx(\"div\", { children: column.direction }), _jsx(\"div\", { children: _jsx(DataCubeIcon.CaretDown, {}) })] }), _jsx(FormDropdownMenu, { className: \"w-32\", ...directionDropdownProps, children: [\n DataCubeQuerySortDirection.ASCENDING,\n DataCubeQuerySortDirection.DESCENDING,\n ].map((direction) => (_jsx(FormDropdownMenuItem, { onClick: () => {\n column.setDirection(direction);\n closeDirectionDropdown();\n }, autoFocus: column.direction === direction, children: direction }, direction))) })] }));\n});\nconst SortColumnLabel = observer((props) => {\n const { column } = props;\n return (_jsx(\"div\", { className: \"h-full flex-1 items-center overflow-hidden overflow-ellipsis whitespace-nowrap pl-2\", children: column.name.split(PIVOT_COLUMN_NAME_VALUE_SEPARATOR).join(' / ') }));\n});\nexport const DataCubeEditorSortsPanel = observer((props) => {\n const { view } = props;\n const panel = view.editor.sorts;\n return (_jsxs(\"div\", { className: \"h-full w-full select-none p-2\", children: [_jsxs(\"div\", { className: \"flex h-6\", children: [_jsx(\"div\", { className: \"flex h-6 items-center text-xl font-medium\", children: _jsx(DataCubeIcon.TableSort, {}) }), _jsx(\"div\", { className: \"ml-1 flex h-6 items-center text-xl font-medium\", children: \"Sorts\" })] }), _jsx(\"div\", { className: \"flex h-[calc(100%_-_24px)] w-full\", children: _jsx(DataCubeEditorColumnSelector, { selector: panel.selector, columnLabelRenderer: (p) => _jsx(SortColumnLabel, { ...p }), columnActionRenderer: (p) => _jsx(SortDirectionDropdown, { ...p }) }) })] }));\n});\n//# sourceMappingURL=DataCubeEditorSortsPanel.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { observer } from 'mobx-react-lite';\nimport { cn, DataCubeIcon, useDropdownMenu } from '@finos/legend-art';\nimport { DataCubeFont, DataCubeFontCase, DataCubeFontFormatUnderlineVariant, DataCubeFontTextAlignment, DataCubeQuerySortDirection, DEFAULT_BACKGROUND_COLOR, DEFAULT_ERROR_FOREGROUND_COLOR, DEFAULT_FOREGROUND_COLOR, DEFAULT_GRID_LINE_COLOR, DEFAULT_NEGATIVE_FOREGROUND_COLOR, DEFAULT_ROW_HIGHLIGHT_BACKGROUND_COLOR, DEFAULT_ZERO_FOREGROUND_COLOR, } from '../../../stores/core/DataCubeQueryEngine.js';\nimport { FormCheckbox, FormColorPickerButton, FormDropdownMenu, FormDropdownMenuItem, FormDropdownMenuItemSeparator, FormDropdownMenuTrigger, FormTextInput, FormNumberInput, FormBadge_WIP, } from '../../core/DataCubeFormUtils.js';\nexport const DataCubeEditorGeneralPropertiesPanel = observer((props) => {\n const { view } = props;\n const panel = view.editor.generalProperties;\n const configuration = panel.configuration;\n const [openTreeColumnSortOperatorDropdown, closeTreeColumnSortOperatorDropdown, treeColumnSortOperatorDropdownProps, treeColumnSortOperatorDropdownPropsOpen,] = useDropdownMenu();\n const [openInitialExpandLevelDropdown, closeInitialExpandLevelDropdown, initialExpandLevelDropdownProps, initialExpandLevelDropdownPropsOpen,] = useDropdownMenu();\n const [openFontFamilyDropdown, closeFontFamilyDropdown, fontFamilyDropdownProps, fontFamilyDropdownPropsOpen,] = useDropdownMenu();\n const [openFontSizeDropdown, closeFontSizeDropdown, openFontSizeDropdownProps, openFontSizeDropdownPropsOpen,] = useDropdownMenu();\n const [openFontFormatUnderlineVariantDropdown, closeFontFormatUnderlineVariantDropdown, fontFormatUnderlineVariantDropdownProps,] = useDropdownMenu();\n const [openFontCaseDropdown, closeFontCaseDropdown, fontCaseDropdownProps] = useDropdownMenu();\n return (_jsxs(\"div\", { className: \"h-full w-full select-none p-2\", children: [_jsxs(\"div\", { className: \"flex h-6\", children: [_jsx(\"div\", { className: \"flex h-6 items-center text-xl font-medium\", children: _jsx(DataCubeIcon.TableOptions, {}) }), _jsx(\"div\", { className: \"ml-1 flex h-6 items-center text-xl font-medium\", children: \"General Properties\" })] }), _jsx(\"div\", { className: \"flex h-[calc(100%_-_24px)] w-full\", children: _jsxs(\"div\", { className: \"h-full w-full py-2\", children: [_jsxs(\"div\", { className: \"flex h-6 w-full items-center\", children: [_jsx(\"div\", { className: \"flex h-full w-32 flex-shrink-0 items-center text-sm\", children: \"Report Title:\" }), _jsx(FormTextInput, { className: \"h-6 w-96 text-lg font-semibold\", value: configuration.name, onChange: (event) => {\n configuration.setName(event.target.value);\n } })] }), _jsxs(\"div\", { className: \"mt-2 flex h-5 w-full items-center\", children: [_jsx(\"div\", { className: \"flex h-full w-32 flex-shrink-0 items-center text-sm\", children: \"Tree Column:\" }), _jsx(FormCheckbox, { label: \"Show root aggregation\", checked: configuration.showRootAggregation, onChange: () => configuration.setShowRootAggregation(!configuration.showRootAggregation), disabled: true }), _jsx(FormBadge_WIP, {}), _jsx(FormCheckbox, { className: \"ml-3\", label: \"Show leaf count\", checked: configuration.showLeafCount, onChange: () => configuration.setShowLeafCount(!configuration.showLeafCount) }), _jsx(\"div\", { className: \"ml-3 mr-1.5 flex h-full flex-shrink-0 items-center text-sm\", children: \"Sort:\" }), _jsx(FormDropdownMenuTrigger, { className: \"w-20\", onClick: openTreeColumnSortOperatorDropdown, open: treeColumnSortOperatorDropdownPropsOpen, children: configuration.treeColumnSortDirection }), _jsx(FormDropdownMenu, { className: \"w-20\", ...treeColumnSortOperatorDropdownProps, children: [\n DataCubeQuerySortDirection.ASCENDING,\n DataCubeQuerySortDirection.DESCENDING,\n ].map((direction) => (_jsx(FormDropdownMenuItem, { onClick: () => {\n configuration.setTreeColumnSortDirection(direction);\n closeTreeColumnSortOperatorDropdown();\n }, autoFocus: direction === configuration.treeColumnSortDirection, children: direction }, direction))) })] }), _jsxs(\"div\", { className: \"mt-2 flex h-5 w-full items-center\", children: [_jsx(\"div\", { className: \"flex h-full w-32 flex-shrink-0 items-center text-sm\" }), _jsx(\"div\", { className: \"mr-1.5 flex h-full flex-shrink-0 items-center text-sm\", children: \"Initially expand to level:\" }), _jsx(FormDropdownMenuTrigger, { className: \"w-16\", onClick: openInitialExpandLevelDropdown, open: initialExpandLevelDropdownPropsOpen, children: configuration.initialExpandLevel ?? '(None)' }), _jsx(FormDropdownMenu, { className: \"w-16\", ...initialExpandLevelDropdownProps, children: [undefined, 1, 2, 3, 4, 5, 6, 7, 8].map((level) => (_jsx(FormDropdownMenuItem, { onClick: () => {\n configuration.setInitialExpandLevel(level);\n closeInitialExpandLevelDropdown();\n }, autoFocus: level === configuration.initialExpandLevel, children: level ?? '(None)' }, level ?? ''))) })] }), _jsxs(\"div\", { className: \"mt-2 flex h-5 w-full items-center\", children: [_jsx(\"div\", { className: \"flex h-full w-32 flex-shrink-0 items-center text-sm\", children: \"Row Limit:\" }), _jsx(FormNumberInput, { className: \"w-16 text-sm\", value: panel.limit, min: -1, step: 1, defaultValue: -1, isValid: (value) => value !== undefined && value >= -1, setValue: (value) => panel.setLimit(value ?? -1) }), _jsx(\"div\", { className: \"flex-shrink-0 pl-1 text-sm italic text-neutral-500\", children: \"Truncate result to this many rows at every level. Use -1 for unlimited.\" })] }), _jsxs(\"div\", { className: \"mt-2 flex h-5 w-full items-center\", children: [_jsx(\"div\", { className: \"flex h-full w-32 flex-shrink-0 items-center text-sm\" }), _jsx(FormCheckbox, { label: \"Display warning when truncated\", checked: configuration.showWarningForTruncatedResult, onChange: () => configuration.setShowWarningForTruncatedResult(!configuration.showWarningForTruncatedResult) })] }), _jsxs(\"div\", { className: \"mt-2 flex h-5 w-full items-center\", children: [_jsx(\"div\", { className: \"flex h-full w-32 flex-shrink-0 items-center text-sm\", children: \"Show Selection Stats?\" }), _jsx(FormCheckbox, { checked: configuration.showSelectionStats, onChange: () => configuration.setShowSelectionStats(!configuration.showSelectionStats), disabled: true }), _jsx(FormBadge_WIP, {})] }), _jsxs(\"div\", { className: \"mt-2 flex h-5 w-full items-center\", children: [_jsx(\"div\", { className: \"flex h-full w-32 flex-shrink-0 items-center text-sm\", children: \"Show Lines?\" }), _jsx(FormCheckbox, { label: \"Horizontal\", checked: configuration.showHorizontalGridLines, onChange: () => configuration.setShowHorizontalGridLines(!configuration.showHorizontalGridLines) }), _jsx(FormCheckbox, { className: \"ml-3\", label: \"Vertical\", checked: configuration.showVerticalGridLines, onChange: () => configuration.setShowVerticalGridLines(!configuration.showVerticalGridLines) }), _jsx(\"div\", { className: \"ml-2 h-[1px] w-2 flex-shrink-0 bg-neutral-400\" }), _jsx(FormColorPickerButton, { className: \"ml-2\", color: configuration.gridLineColor, defaultColor: DEFAULT_GRID_LINE_COLOR, onChange: (value) => configuration.setGridLineColor(value) })] }), _jsxs(\"div\", { className: \"mt-2 flex h-5 w-full items-center\", children: [_jsx(\"div\", { className: \"flex h-full w-32 flex-shrink-0 items-center text-sm\", children: \"Hightlight Rows:\" }), _jsx(FormCheckbox, { label: \"Standard mode\", checked: configuration.alternateRowsStandardMode, onChange: () => {\n if (configuration.alternateRowsStandardMode) {\n configuration.setAlternateRowsStandardMode(false);\n }\n else {\n configuration.setAlternateRowsStandardMode(true);\n configuration.setAlternateRows(false);\n }\n } }), _jsx(FormCheckbox, { className: \"ml-3\", label: \"Custom: Alternate color every\", checked: configuration.alternateRows, onChange: () => {\n if (configuration.alternateRows) {\n configuration.setAlternateRows(false);\n }\n else {\n configuration.setAlternateRows(true);\n configuration.setAlternateRowsStandardMode(false);\n }\n } }), _jsx(FormNumberInput, { className: \"ml-1.5 w-16 text-sm\", disabled: !configuration.alternateRows, min: 1, step: 1, defaultValue: 1, isValid: (value) => value !== undefined && value > 0, value: configuration.alternateRowsCount, setValue: (value) => configuration.setAlternateRowsCount(value ?? 1) }), _jsx(\"div\", { className: \"ml-1.5 flex-shrink-0 text-sm\", children: `row(s)` }), _jsx(FormColorPickerButton, { className: \"ml-[5px]\", disabled: !configuration.alternateRows, color: configuration.alternateRowsColor, defaultColor: DEFAULT_ROW_HIGHLIGHT_BACKGROUND_COLOR, onChange: (value) => configuration.setAlternateRowsColor(value) })] }), _jsx(\"div\", { className: \"my-2 h-[1px] w-full bg-neutral-200\" }), _jsxs(\"div\", { className: \"mt-2 flex h-5 w-full items-center\", children: [_jsx(\"div\", { className: \"flex h-full w-32 flex-shrink-0 items-center text-sm\", children: \"Default Font:\" }), _jsx(FormDropdownMenuTrigger, { className: \"w-28\", onClick: openFontFamilyDropdown, open: fontFamilyDropdownPropsOpen, children: configuration.fontFamily }), _jsxs(FormDropdownMenu, { className: \"w-28\", ...fontFamilyDropdownProps, children: [[\n DataCubeFont.ARIAL,\n DataCubeFont.ROBOTO,\n DataCubeFont.ROBOTO_CONDENSED,\n ].map((font) => (_jsx(FormDropdownMenuItem, { onClick: () => {\n configuration.setFontFamily(font);\n closeFontFamilyDropdown();\n }, autoFocus: font === configuration.fontFamily, children: font }, font))), _jsx(FormDropdownMenuItemSeparator, {}), [\n DataCubeFont.GEORGIA,\n DataCubeFont.ROBOTO_SERIF,\n DataCubeFont.TIMES_NEW_ROMAN,\n ].map((font) => (_jsx(FormDropdownMenuItem, { onClick: () => {\n configuration.setFontFamily(font);\n closeFontFamilyDropdown();\n }, autoFocus: font === configuration.fontFamily, children: font }, font))), _jsx(FormDropdownMenuItemSeparator, {}), [\n DataCubeFont.JERBRAINS_MONO,\n DataCubeFont.ROBOTO_MONO,\n DataCubeFont.UBUNTU_MONO,\n ].map((font) => (_jsx(FormDropdownMenuItem, { onClick: () => {\n configuration.setFontFamily(font);\n closeFontFamilyDropdown();\n }, autoFocus: font === configuration.fontFamily, children: font }, font)))] }), _jsx(FormDropdownMenuTrigger, { className: \"ml-1 w-10\", onClick: openFontSizeDropdown, open: openFontSizeDropdownPropsOpen, children: configuration.fontSize }), _jsx(FormDropdownMenu, { className: \"w-10\", ...openFontSizeDropdownProps, children: [\n 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 24, 26, 28,\n 32, 36, 48, 72,\n ].map((size) => (_jsx(FormDropdownMenuItem, { onClick: () => {\n configuration.setFontSize(size);\n closeFontSizeDropdown();\n }, autoFocus: size === configuration.fontSize, children: size }, size))) }), _jsxs(\"div\", { className: \"relative ml-2 flex h-5\", children: [_jsx(\"button\", { title: \"Bold\", className: cn('relative flex h-5 w-5 items-center justify-center rounded-bl-sm rounded-tl-sm border border-neutral-400 bg-neutral-50 p-0 text-neutral-700 focus:z-[1]', {\n 'bg-neutral-200': configuration.fontBold,\n }), onClick: () => configuration.setFontBold(!configuration.fontBold), children: _jsx(DataCubeIcon.FontBold, {}) }), _jsx(\"button\", { title: \"Italic\", className: cn('relative -ml-[1px] flex h-5 w-5 items-center justify-center border border-neutral-400 bg-neutral-50 p-0 text-neutral-700 focus:z-[1]', {\n 'bg-neutral-200': configuration.fontItalic,\n }), onClick: () => configuration.setFontItalic(!configuration.fontItalic), children: _jsx(DataCubeIcon.FontItalic, {}) }), _jsx(\"button\", { title: `Underline${configuration.fontUnderline ? ` (${configuration.fontUnderline})` : ''}`, className: cn('relative -ml-[1px] flex h-5 w-5 items-center justify-center border border-r-0 border-neutral-400 bg-neutral-50 p-0 text-neutral-700 focus:z-[1]', {\n 'bg-neutral-200': configuration.fontUnderline !== undefined,\n }), onClick: () => {\n if (configuration.fontUnderline === undefined) {\n configuration.setFontUnderline(DataCubeFontFormatUnderlineVariant.SOLID);\n configuration.setFontStrikethrough(false);\n }\n else {\n configuration.setFontUnderline(undefined);\n }\n }, children: _jsx(DataCubeIcon.FontUnderline, {}) }), _jsxs(\"button\", { className: \"text-2xs relative -ml-[1px] flex h-5 w-2.5 items-center justify-center border border-l-0 border-neutral-400 bg-neutral-50 p-0 text-neutral-600 focus:z-[1]\", onClick: openFontFormatUnderlineVariantDropdown, children: [_jsx(\"div\", { className: cn('h-4 w-[0.5px] bg-neutral-200', {\n 'opacity-0': configuration.fontUnderline !== undefined,\n }) }), _jsx(DataCubeIcon.CaretDown, {})] }), _jsx(FormDropdownMenu, { className: \"w-14\", ...fontFormatUnderlineVariantDropdownProps, children: [\n DataCubeFontFormatUnderlineVariant.SOLID,\n DataCubeFontFormatUnderlineVariant.DASHED,\n DataCubeFontFormatUnderlineVariant.DOTTED,\n DataCubeFontFormatUnderlineVariant.DOUBLE,\n DataCubeFontFormatUnderlineVariant.WAVY,\n ].map((variant) => (_jsx(FormDropdownMenuItem, { className: \"relative\", onClick: () => {\n configuration.setFontUnderline(variant);\n configuration.setFontStrikethrough(false);\n closeFontFormatUnderlineVariantDropdown();\n }, autoFocus: variant === configuration.fontUnderline, children: _jsx(\"div\", { className: cn('!hover:underline absolute top-0 !underline', {\n '!hover:decoration-solid !decoration-solid': variant ===\n DataCubeFontFormatUnderlineVariant.SOLID,\n '!hover:decoration-dashed !decoration-dashed': variant ===\n DataCubeFontFormatUnderlineVariant.DASHED,\n '!hover:decoration-dotted !decoration-dotted': variant ===\n DataCubeFontFormatUnderlineVariant.DOTTED,\n '!hover:decoration-double !decoration-double': variant ===\n DataCubeFontFormatUnderlineVariant.DOUBLE,\n '!hover:decoration-wavy !decoration-wavy': variant ===\n DataCubeFontFormatUnderlineVariant.WAVY,\n }), children: \"\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\" }) }, variant))) }), _jsx(\"button\", { title: \"Strikethrough\", className: cn('relative -ml-[1px] flex h-5 w-5 items-center justify-center border border-neutral-400 bg-neutral-50 p-0 text-neutral-700 focus:z-[1]', {\n 'bg-neutral-200': configuration.fontStrikethrough,\n }), onClick: () => {\n if (configuration.fontStrikethrough) {\n configuration.setFontStrikethrough(false);\n }\n else {\n configuration.setFontStrikethrough(true);\n configuration.setFontUnderline(undefined);\n }\n }, children: _jsx(DataCubeIcon.FontStrikethrough, {}) }), _jsx(\"button\", { title: `Case${configuration.fontCase ? ` (${configuration.fontCase})` : ''}`, className: cn('relative -ml-[1px] flex h-5 w-5 items-center justify-center border border-r-0 border-neutral-400 bg-neutral-50 p-0 text-neutral-700 focus:z-[1]', {\n 'bg-neutral-200': configuration.fontCase !== undefined,\n }), onClick: () => {\n configuration.setFontCase(configuration.fontCase === undefined\n ? DataCubeFontCase.UPPERCASE\n : undefined);\n }, children: _jsx(DataCubeIcon.FontCase, { className: \"stroke-[0.5px]\" }) }), _jsxs(\"button\", { className: \"text-2xs relative -ml-[1px] flex h-5 w-2.5 items-center justify-center rounded-br-sm rounded-tr-sm border border-l-0 border-neutral-400 bg-neutral-50 p-0 text-neutral-600 focus:z-[1]\", onClick: openFontCaseDropdown, children: [_jsx(\"div\", { className: cn('h-4 w-[0.5px] bg-neutral-200', {\n 'opacity-0': configuration.fontCase !== undefined,\n }) }), _jsx(DataCubeIcon.CaretDown, {})] }), _jsx(FormDropdownMenu, { className: \"w-20\", ...fontCaseDropdownProps, children: [\n DataCubeFontCase.LOWERCASE,\n DataCubeFontCase.UPPERCASE,\n DataCubeFontCase.CAPITALIZE,\n ].map((fontCase) => (_jsx(FormDropdownMenuItem, { onClick: () => {\n configuration.setFontCase(fontCase);\n closeFontCaseDropdown();\n }, autoFocus: fontCase === configuration.fontCase, children: _jsx(\"div\", { className: cn({\n lowercase: fontCase === DataCubeFontCase.LOWERCASE,\n uppercase: fontCase === DataCubeFontCase.UPPERCASE,\n capitalize: fontCase === DataCubeFontCase.CAPITALIZE,\n }), children: fontCase }) }, fontCase))) })] }), _jsxs(\"div\", { className: \"relative ml-2 flex h-5\", children: [_jsx(\"button\", { title: \"Align Left\", className: cn('relative flex h-5 w-5 items-center justify-center rounded-bl-sm rounded-tl-sm border border-neutral-400 bg-neutral-50 p-0 text-neutral-700 focus:z-[1]', {\n 'bg-neutral-200': configuration.textAlign ===\n DataCubeFontTextAlignment.LEFT,\n }), onClick: () => configuration.setTextAlign(DataCubeFontTextAlignment.LEFT), children: _jsx(DataCubeIcon.TextAlignLeft, {}) }), _jsx(\"button\", { title: \"Align Center\", className: cn('relative -ml-[1px] flex h-5 w-5 items-center justify-center border border-neutral-400 bg-neutral-50 p-0 text-neutral-700 focus:z-[1]', {\n 'bg-neutral-200': configuration.textAlign ===\n DataCubeFontTextAlignment.CENTER,\n }), onClick: () => configuration.setTextAlign(DataCubeFontTextAlignment.CENTER), children: _jsx(DataCubeIcon.TextAlignCenter, {}) }), _jsx(\"button\", { title: \"Align Right\", className: cn('relative -ml-[1px] flex h-5 w-5 items-center justify-center rounded-br-sm rounded-tr-sm border border-neutral-400 bg-neutral-50 p-0 text-neutral-700 focus:z-[1]', {\n 'bg-neutral-200': configuration.textAlign ===\n DataCubeFontTextAlignment.RIGHT,\n }), onClick: () => configuration.setTextAlign(DataCubeFontTextAlignment.RIGHT), children: _jsx(DataCubeIcon.TextAlignRight, {}) })] })] }), _jsxs(\"div\", { className: \"mt-2 flex w-full\", children: [_jsx(\"div\", { className: \"flex h-6 w-32 flex-shrink-0 items-center text-sm\", children: \"Default Colors:\" }), _jsxs(\"div\", { className: \"h-18\", children: [_jsxs(\"div\", { className: \"flex h-6\", children: [_jsx(\"div\", { className: \"w-16 flex-shrink-0\" }), _jsx(\"div\", { className: \"flex h-full w-12 flex-shrink-0 items-center justify-center text-sm\", children: \"Normal\" }), _jsx(\"div\", { className: \"flex h-full w-12 flex-shrink-0 items-center justify-center text-sm\", children: \"Negative\" }), _jsx(\"div\", { className: \"flex h-full w-12 flex-shrink-0 items-center justify-center text-sm\", children: \"Zero\" }), _jsx(\"div\", { className: \"flex h-full w-12 flex-shrink-0 items-center justify-center text-sm\", children: \"Error\" })] }), _jsxs(\"div\", { className: \"flex h-6\", children: [_jsx(\"div\", { className: \"flex h-full w-16 flex-shrink-0 items-center text-sm\", children: \"Foreground:\" }), _jsx(\"div\", { className: \"flex h-full w-12 flex-shrink-0 items-center justify-center\", children: _jsx(FormColorPickerButton, { color: configuration.normalForegroundColor, defaultColor: DEFAULT_FOREGROUND_COLOR, onChange: (value) => configuration.setNormalForegroundColor(value) }) }), _jsx(\"div\", { className: \"flex h-full w-12 flex-shrink-0 items-center justify-center\", children: _jsx(FormColorPickerButton, { color: configuration.negativeForegroundColor, defaultColor: DEFAULT_NEGATIVE_FOREGROUND_COLOR, onChange: (value) => configuration.setNegativeForegroundColor(value) }) }), _jsx(\"div\", { className: \"flex h-full w-12 flex-shrink-0 items-center justify-center\", children: _jsx(FormColorPickerButton, { color: configuration.zeroForegroundColor, defaultColor: DEFAULT_ZERO_FOREGROUND_COLOR, onChange: (value) => configuration.setZeroForegroundColor(value) }) }), _jsx(\"div\", { className: \"flex h-full w-12 flex-shrink-0 items-center justify-center\", children: _jsx(FormColorPickerButton, { color: configuration.errorForegroundColor, defaultColor: DEFAULT_ERROR_FOREGROUND_COLOR, onChange: (value) => configuration.setErrorForegroundColor(value) }) })] }), _jsxs(\"div\", { className: \"flex h-6\", children: [_jsx(\"div\", { className: \"flex h-full w-16 flex-shrink-0 items-center text-sm\", children: \"Background:\" }), _jsx(\"div\", { className: \"flex h-full w-12 flex-shrink-0 items-center justify-center\", children: _jsx(FormColorPickerButton, { color: configuration.normalBackgroundColor, defaultColor: DEFAULT_BACKGROUND_COLOR, onChange: (value) => configuration.setNormalBackgroundColor(value) }) }), _jsx(\"div\", { className: \"flex h-full w-12 flex-shrink-0 items-center justify-center\", children: _jsx(FormColorPickerButton, { color: configuration.negativeBackgroundColor, defaultColor: DEFAULT_BACKGROUND_COLOR, onChange: (value) => configuration.setNegativeBackgroundColor(value) }) }), _jsx(\"div\", { className: \"flex h-full w-12 flex-shrink-0 items-center justify-center\", children: _jsx(FormColorPickerButton, { color: configuration.zeroBackgroundColor, defaultColor: DEFAULT_BACKGROUND_COLOR, onChange: (value) => configuration.setZeroBackgroundColor(value) }) }), _jsx(\"div\", { className: \"flex h-full w-12 flex-shrink-0 items-center justify-center\", children: _jsx(FormColorPickerButton, { color: configuration.errorBackgroundColor, defaultColor: DEFAULT_BACKGROUND_COLOR, onChange: (value) => configuration.setErrorBackgroundColor(value) }) })] })] })] }), _jsxs(\"div\", { className: \"mt-2 flex w-full\", children: [_jsx(\"div\", { className: \"flex h-6 w-32 flex-shrink-0 items-center text-sm\" }), _jsxs(\"div\", { className: \"w-80\", children: [_jsx(\"div\", { className: \"mb-2 h-[1px] w-full bg-neutral-200\" }), _jsx(\"button\", { className: \"flex h-5 items-center justify-center rounded-sm border border-neutral-400 bg-neutral-200 p-0 px-1 text-sm text-neutral-700 disabled:text-neutral-400\", disabled: configuration.isUsingDefaultStyling, onClick: () => configuration.useDefaultStyling(), children: \"Use Default Styling\" })] })] })] }) })] }));\n});\n//# sourceMappingURL=DataCubeEditorGeneralPropertiesPanel.js.map","import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { cn, DataCubeIcon } from '@finos/legend-art';\nimport { observer } from 'mobx-react-lite';\nimport { DataCubeEditorColumnSelector } from './DataCubeEditorColumnSelector.js';\nimport { useEffect } from 'react';\nimport { FormCheckbox } from '../../core/DataCubeFormUtils.js';\nconst ColumnSelectorLabel = observer((props) => {\n const { selector, column } = props;\n const showHiddenIndicator = selector.editor.columnProperties.getColumnConfiguration(column.name).hideFromView;\n return (_jsxs(_Fragment, { children: [_jsx(\"div\", { className: cn('items-center overflow-hidden overflow-ellipsis whitespace-nowrap pl-2', {\n 'text-neutral-400': showHiddenIndicator,\n }), children: column.name }), Boolean(selector.editor.leafExtendColumns.find((col) => col.name === column.name)) && (_jsx(\"div\", { className: \"ml-1.5 mr-0.5 flex h-3.5 flex-shrink-0 items-center rounded-sm border border-neutral-300 bg-neutral-100 px-1 text-xs font-medium uppercase text-neutral-600\", children: `Extended (Leaf Level)` })), Boolean(selector.editor.groupExtendColumns.find((col) => col.name === column.name)) && (_jsx(\"div\", { className: \"ml-1.5 mr-0.5 flex h-3.5 flex-shrink-0 items-center rounded-sm border border-neutral-300 bg-neutral-100 px-1 text-xs font-medium uppercase text-neutral-600\", children: `Extended (Group Level)` }))] }));\n});\nexport const DataCubeEditorColumnsPanel = observer((props) => {\n const { view } = props;\n const panel = view.editor.columns;\n useEffect(() => () => panel.propagateChanges(), [panel]);\n return (_jsxs(\"div\", { className: \"h-full w-full select-none p-2\", children: [_jsxs(\"div\", { className: \"flex h-6 justify-between\", children: [_jsxs(\"div\", { className: \"flex h-full\", children: [_jsx(\"div\", { className: \"flex h-6 items-center text-xl font-medium\", children: _jsx(DataCubeIcon.TableColumns, {}) }), _jsx(\"div\", { className: \"ml-1 flex h-6 items-center text-xl font-medium\", children: \"Columns\" })] }), _jsx(\"div\", { className: \"flex h-full items-center pr-2\", children: _jsx(FormCheckbox, { label: \"Show hidden columns?\", checked: panel.selector.showHiddenColumns, onChange: () => panel.selector.setShowHiddenColumns(!panel.selector.showHiddenColumns) }) })] }), _jsx(\"div\", { className: \"flex h-[calc(100%_-_24px)] w-full\", children: _jsx(DataCubeEditorColumnSelector, { selector: panel.selector, noColumnsSelectedRenderer: () => (_jsxs(\"div\", { className: \"flex items-center border-[1.5px] border-neutral-200 p-2 font-semibold text-neutral-400\", children: [_jsx(\"div\", { children: _jsx(DataCubeIcon.Warning, { className: \"mr-1 text-lg\" }) }), \"No columns selected\"] })), columnLabelRenderer: (p) => _jsx(ColumnSelectorLabel, { ...p }) }) })] }));\n});\n//# sourceMappingURL=DataCubeEditorColumnsPanel.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DataCubeIcon } from '@finos/legend-art';\nimport { observer } from 'mobx-react-lite';\nimport { DataCubeEditorColumnSelector } from './DataCubeEditorColumnSelector.js';\nexport const DataCubeEditorVerticalPivotsPanel = observer((props) => {\n const { view } = props;\n const panel = view.editor.verticalPivots;\n return (_jsxs(\"div\", { className: \"h-full w-full select-none p-2\", children: [_jsxs(\"div\", { className: \"flex h-6\", children: [_jsx(\"div\", { className: \"flex h-6 items-center text-xl font-medium\", children: _jsx(DataCubeIcon.TableGroupBy, {}) }), _jsx(\"div\", { className: \"ml-1 flex h-6 items-center text-xl font-medium\", children: \"Vertical Pivots\" })] }), _jsx(\"div\", { className: \"flex h-[calc(100%_-_24px)] w-full\", children: _jsx(DataCubeEditorColumnSelector, { selector: panel.selector }) })] }));\n});\n//# sourceMappingURL=DataCubeEditorVerticalPivotsPanel.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DataCubeIcon } from '@finos/legend-art';\nimport { observer } from 'mobx-react-lite';\nimport { DataCubeEditorColumnSelector } from './DataCubeEditorColumnSelector.js';\nimport { useEffect } from 'react';\nimport { FormBadge_WIP } from '../../core/DataCubeFormUtils.js';\nconst PivotColumnSortDirectionDropdown = observer((props) => (_jsx(\"div\", { className: \"relative flex h-full items-center\", children: _jsxs(\"div\", { className: \"flex h-[18px] w-32 items-center border border-transparent px-2 text-sm text-neutral-400\", children: [\"Ascending\", _jsx(FormBadge_WIP, {})] }) })));\nexport const DataCubeEditorHorizontalPivotsPanel = observer((props) => {\n const { view } = props;\n const panel = view.editor.horizontalPivots;\n useEffect(() => () => panel.propagateChanges(), [panel]);\n return (_jsxs(\"div\", { className: \"h-full w-full select-none p-2\", children: [_jsxs(\"div\", { className: \"flex h-6\", children: [_jsx(\"div\", { className: \"flex h-6 items-center text-xl font-medium\", children: _jsx(DataCubeIcon.TablePivot, {}) }), _jsx(\"div\", { className: \"ml-1 flex h-6 items-center text-xl font-medium\", children: \"Horizontal Pivots\" })] }), _jsx(\"div\", { className: \"flex h-[calc(100%_-_24px)] w-full\", children: _jsx(DataCubeEditorColumnSelector, { selector: panel.selector, columnActionRenderer: (p) => (_jsx(PivotColumnSortDirectionDropdown, { ...p })) }) })] }));\n});\n//# sourceMappingURL=DataCubeEditorHorizontalPivotsPanel.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport var DocumentationKey;\n(function (DocumentationKey) {\n DocumentationKey[\"DATA_CUBE_EXTENDED_COLUMN_LEVELS\"] = \"data-cube.extended-column.levels\";\n DocumentationKey[\"DATA_CUBE_COLUMN_KINDS\"] = \"data-cube.column.kinds\";\n DocumentationKey[\"DATA_CUBE_COLUMN_DISPLAY_AS_LINK\"] = \"data-cube.column.display-as-link\";\n DocumentationKey[\"DATA_CUBE_COLUMN_MISSING_VALUE_FORMAT\"] = \"data-cube.column.missing-value-format\";\n})(DocumentationKey || (DocumentationKey = {}));\n//# sourceMappingURL=DataCubeDocumentation.js.map","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { cn, DataCubeIcon, useDropdownMenu } from '@finos/legend-art';\nimport { observer } from 'mobx-react-lite';\nimport { FormBadge_Advanced, FormCheckbox, FormColorPickerButton, FormDropdownMenu, FormDropdownMenuItem, FormDropdownMenuItemSeparator, FormDropdownMenuTrigger, FormNumberInput, FormTextInput, FormDocumentation, } from '../../core/DataCubeFormUtils.js';\nimport { DataCubeQueryClientSideAggregateOperator, DataCubeColumnDataType, DataCubeColumnKind, DataCubeColumnPinPlacement, DataCubeFont, DataCubeFontCase, DataCubeFontFormatUnderlineVariant, DataCubeFontTextAlignment, DataCubeNumberScale, DEFAULT_COLUMN_MAX_WIDTH, DEFAULT_COLUMN_MIN_WIDTH, DEFAULT_COLUMN_WIDTH, DEFAULT_URL_LABEL_QUERY_PARAM, } from '../../../stores/core/DataCubeQueryEngine.js';\nimport { DocumentationKey } from '../../../__lib__/DataCubeDocumentation.js';\nimport { _sortByColName } from '../../../stores/core/models/DataCubeColumn.js';\nexport const DataCubeEditorColumnPropertiesPanel = observer((props) => {\n const { view } = props;\n const panel = view.editor.columnProperties;\n const gridConfiguration = view.editor.generalProperties.configuration;\n const selectedColumn = panel.selectedColumn;\n const [openColumnDropdown, closeColumnDropdown, columnDropdownProps, columnDropPropsOpen,] = useDropdownMenu();\n const [openKindDropdown, closeKindDropdown, kindDropdownProps, kindDropdownPropsOpen,] = useDropdownMenu();\n const [openAggregationOperationDropdown, closeAggregationOperationDropdown, aggregationOperationDropdownProps, aggregationOperationDropdownPropsOpen,] = useDropdownMenu();\n const [openNumberScaleDropdown, closeNumberScaleDropdown, numberScaleDropdownProps, numberScaleDropdownPropsOpen,] = useDropdownMenu();\n const [openColumnPinDropdown, closeColumnPinDropdown, columnPinDropdownProps, columnPinDropdownPropsOpen,] = useDropdownMenu();\n const [openFontFamilyDropdown, closeFontFamilyDropdown, fontFamilyDropdownProps, fontFamilyDropdownPropsOpen,] = useDropdownMenu();\n const [openFontSizeDropdown, closeFontSizeDropdown, openFontSizeDropdownProps, openFontSizeDropdownPropsOpen,] = useDropdownMenu();\n const [openFontFormatUnderlineVariantDropdown, closeFontFormatUnderlineVariantDropdown, fontFormatUnderlineVariantDropdownProps,] = useDropdownMenu();\n const [openFontCaseDropdown, closeFontCaseDropdown, fontCaseDropdownProps] = useDropdownMenu();\n return (_jsxs(\"div\", { className: \"h-full w-full select-none p-2\", children: [_jsxs(\"div\", { className: \"flex h-6 justify-between\", children: [_jsxs(\"div\", { className: \"flex h-full\", children: [_jsxs(\"div\", { className: \"relative flex h-6 items-center text-xl font-medium\", children: [_jsx(DataCubeIcon.TableColumn, {}), _jsx(DataCubeIcon.TableColumnOptions__Settings, { className: \"absolute bottom-1 right-0 bg-white text-xs\" })] }), _jsx(\"div\", { className: \"ml-1 flex h-6 items-center text-xl font-medium\", children: \"Column Properties\" })] }), _jsxs(\"div\", { className: \"flex h-full items-center pr-2\", children: [_jsx(FormCheckbox, { label: \"Show advanced settings?\", checked: panel.showAdvancedSettings, onChange: () => panel.setShowAdvancedSettings(!panel.showAdvancedSettings) }), _jsx(FormBadge_Advanced, {})] })] }), _jsx(\"div\", { className: \"flex h-[calc(100%_-_24px)] w-full\", children: _jsxs(\"div\", { className: \"h-full w-full py-2\", children: [_jsxs(\"div\", { className: \"flex h-6 w-full items-center\", children: [_jsx(\"div\", { className: \"flex h-full w-32 flex-shrink-0 items-center text-sm\", children: \"Choose Column:\" }), _jsx(FormDropdownMenuTrigger, { className: \"w-80\", onClick: openColumnDropdown, open: columnDropPropsOpen, children: _jsxs(\"div\", { className: \"flex h-full w-full items-center\", children: [_jsx(\"div\", { className: \"overflow-hidden overflow-ellipsis whitespace-nowrap\", children: selectedColumn?.name ?? '(None)' }), selectedColumn && (_jsxs(_Fragment, { children: [_jsx(\"div\", { className: \"ml-1.5 mr-0.5 flex h-3.5 w-12 flex-shrink-0 items-center justify-center rounded-sm border border-neutral-300 bg-neutral-100 text-xs font-medium uppercase text-neutral-600\", children: selectedColumn.dataType }), Boolean(panel.editor.leafExtendColumns.find((col) => col.name === selectedColumn.name)) && (_jsx(\"div\", { className: \"mr-0.5 flex h-3.5 flex-shrink-0 items-center rounded-sm border border-neutral-300 bg-neutral-100 px-1 text-xs font-medium uppercase text-neutral-600\", children: `Extended (Leaf Level)` })), Boolean(panel.editor.groupExtendColumns.find((col) => col.name === selectedColumn.name)) && (_jsx(\"div\", { className: \"mr-0.5 flex h-3.5 flex-shrink-0 items-center rounded-sm border border-neutral-300 bg-neutral-100 px-1 text-xs font-medium uppercase text-neutral-600\", children: `Extended (Group Level)` }))] }))] }) }), _jsx(FormDropdownMenu, { className: \"w-80\", ...columnDropdownProps, children: panel.columns\n .slice()\n .sort(_sortByColName)\n .map((column) => (_jsxs(FormDropdownMenuItem, { onClick: () => {\n panel.setSelectedColumnName(column.name);\n closeColumnDropdown();\n }, autoFocus: column.name === selectedColumn?.name, children: [_jsx(\"div\", { className: \"overflow-hidden overflow-ellipsis whitespace-nowrap\", children: column.name }), _jsx(\"div\", { className: \"ml-1.5 mr-0.5 flex h-3.5 w-12 flex-shrink-0 items-center justify-center rounded-sm border border-neutral-300 bg-neutral-100 text-xs font-medium uppercase text-neutral-600\", children: column.dataType }), Boolean(panel.editor.leafExtendColumns.find((col) => col.name === column.name)) && (_jsx(\"div\", { className: \"mr-0.5 flex h-3.5 flex-shrink-0 items-center rounded-sm border border-neutral-300 bg-neutral-100 px-1 text-xs font-medium uppercase text-neutral-600\", children: `Extended (Leaf Level)` })), Boolean(panel.editor.groupExtendColumns.find((col) => col.name === column.name)) && (_jsx(\"div\", { className: \"mr-0.5 flex h-3.5 flex-shrink-0 items-center rounded-sm border border-neutral-300 bg-neutral-100 px-1 text-xs font-medium uppercase text-neutral-600\", children: `Extended (Group Level)` }))] }, column.name))) }), panel.showAdvancedSettings && selectedColumn && (_jsxs(_Fragment, { children: [_jsx(\"div\", { className: \"mx-2 h-[1px] w-4 flex-shrink-0 bg-neutral-400\" }), _jsxs(\"div\", { className: \"flex h-6 items-center\", children: [_jsxs(\"div\", { className: \"flex h-full flex-shrink-0 items-center text-sm\", children: [\"Column Kind:\", _jsx(FormDocumentation, { className: \"ml-1\", documentationKey: DocumentationKey.DATA_CUBE_COLUMN_KINDS })] }), _jsx(FormDropdownMenuTrigger, { className: \"ml-1.5 w-20\", onClick: openKindDropdown, open: kindDropdownPropsOpen, \n // disallow changing the column kind if the column is being used as pivot column\n disabled: Boolean(panel.editor.verticalPivots.selector.selectedColumns.find((col) => col.name === selectedColumn.name) ??\n panel.editor.horizontalPivots.selector.selectedColumns.find((col) => col.name === selectedColumn.name)), children: selectedColumn.kind }), _jsx(FormDropdownMenu, { className: \"w-20\", ...kindDropdownProps, children: [\n DataCubeColumnKind.DIMENSION,\n DataCubeColumnKind.MEASURE,\n ].map((kind) => (_jsx(FormDropdownMenuItem, { onClick: () => {\n if (kind !== selectedColumn.kind) {\n selectedColumn.setKind(kind);\n selectedColumn.setExcludedFromPivot(kind === DataCubeColumnKind.DIMENSION);\n selectedColumn.setPivotStatisticColumnFunction(kind === DataCubeColumnKind.DIMENSION\n ? undefined\n : DataCubeQueryClientSideAggregateOperator.SUM);\n }\n closeKindDropdown();\n }, autoFocus: kind === selectedColumn.kind, children: kind }, kind))) }), _jsx(FormBadge_Advanced, {})] })] }))] }), _jsx(\"div\", { className: \"-ml-2 mb-2 mt-3 h-[1px] w-[calc(100%_+_16px)] bg-neutral-200\" }), selectedColumn && (_jsxs(_Fragment, { children: [_jsxs(\"div\", { className: \"mt-2 flex h-5 w-full items-center\", children: [_jsx(\"div\", { className: \"flex h-full w-32 flex-shrink-0 items-center text-sm\", children: \"Display Name:\" }), _jsx(FormTextInput, { className: \"w-80\", value: selectedColumn.displayName ?? '', onChange: (event) => {\n const value = event.target.value.trim();\n selectedColumn.setDisplayName(value !== '' ? value : undefined);\n } })] }), _jsxs(\"div\", { className: \"mt-2 flex h-5 w-full items-center\", children: [_jsx(\"div\", { className: \"flex h-full w-32 flex-shrink-0 items-center text-sm\", children: \"Aggregation:\" }), _jsx(FormDropdownMenuTrigger, { className: \"w-32\", onClick: openAggregationOperationDropdown, disabled: selectedColumn.kind === DataCubeColumnKind.DIMENSION, open: aggregationOperationDropdownPropsOpen, children: selectedColumn.aggregateOperation.operator }), _jsx(FormDropdownMenu, { className: \"w-32\", ...aggregationOperationDropdownProps, children: panel.view.engine.aggregateOperations\n .filter((op) => op.isCompatibleWithColumn(selectedColumn))\n .map((op) => (_jsx(FormDropdownMenuItem, { onClick: () => {\n selectedColumn.setAggregateOperation(op);\n closeAggregationOperationDropdown();\n }, autoFocus: op === selectedColumn.aggregateOperation, children: op.label }, op.operator))) }), _jsx(FormCheckbox, { className: \"ml-3\", label: \"Exclude from H-Pivot\", checked: selectedColumn.excludedFromPivot, onChange: () => selectedColumn.setExcludedFromPivot(!selectedColumn.excludedFromPivot), disabled: selectedColumn.kind === DataCubeColumnKind.DIMENSION })] }), selectedColumn.dataType === DataCubeColumnDataType.NUMBER && (_jsxs(_Fragment, { children: [_jsxs(\"div\", { className: \"mt-2 flex h-5 w-full items-center\", children: [_jsx(\"div\", { className: \"flex h-full w-32 flex-shrink-0 items-center text-sm\", children: \"Number Format:\" }), _jsx(FormNumberInput, { className: \"w-16 text-sm\", min: 0, step: 1, value: selectedColumn.decimals ?? 0, setValue: (value) => {\n selectedColumn.setDecimals(value);\n } }), _jsx(\"div\", { className: \"ml-1 flex-shrink-0 text-sm\", children: \"Decimal places\" }), _jsx(FormCheckbox, { className: \"ml-3\", label: \"Display commas\", checked: selectedColumn.displayCommas, onChange: () => selectedColumn.setDisplayCommas(!selectedColumn.displayCommas) }), _jsx(FormCheckbox, { className: \"ml-3\", label: \"Negative number in parens\", checked: selectedColumn.negativeNumberInParens, onChange: () => selectedColumn.setNegativeNumberInParens(!selectedColumn.negativeNumberInParens) })] }), _jsxs(\"div\", { className: \"mt-2 flex h-5 w-full items-center\", children: [_jsx(\"div\", { className: \"flex h-full w-32 flex-shrink-0 items-center text-sm\", children: \"Number Scale:\" }), _jsx(FormDropdownMenuTrigger, { className: \"w-32\", onClick: openNumberScaleDropdown, open: numberScaleDropdownPropsOpen, children: selectedColumn.numberScale ?? '(None)' }), _jsx(FormDropdownMenu, { className: \"w-32\", ...numberScaleDropdownProps, children: [\n undefined,\n DataCubeNumberScale.PERCENT,\n DataCubeNumberScale.BASIS_POINT,\n DataCubeNumberScale.THOUSANDS,\n DataCubeNumberScale.MILLIONS,\n DataCubeNumberScale.BILLIONS,\n DataCubeNumberScale.TRILLIONS,\n DataCubeNumberScale.AUTO,\n ].map((scale) => (_jsx(FormDropdownMenuItem, { onClick: () => {\n selectedColumn.setNumberScale(scale);\n closeNumberScaleDropdown();\n }, autoFocus: scale === selectedColumn.numberScale, children: scale ?? '(None)' }, scale ?? ''))) })] })] })), selectedColumn.dataType === DataCubeColumnDataType.TEXT && (_jsx(_Fragment, { children: _jsxs(\"div\", { className: \"mt-2 flex h-5 w-full items-center\", children: [_jsxs(\"div\", { className: \"flex h-full w-32 flex-shrink-0 items-center text-sm\", children: [\"Dislay as Link?\", _jsx(FormDocumentation, { className: \"ml-1\", documentationKey: DocumentationKey.DATA_CUBE_COLUMN_DISPLAY_AS_LINK })] }), _jsx(FormCheckbox, { checked: selectedColumn.displayAsLink, onChange: () => selectedColumn.setDisplayAsLink(!selectedColumn.displayAsLink) }), _jsx(\"div\", { className: \"ml-1 h-[1px] w-2 flex-shrink-0 bg-neutral-400\" }), _jsx(\"div\", { className: \"ml-2 mr-1.5 flex h-full flex-shrink-0 items-center text-sm\", children: \"Use parameter in link as label:\" }), _jsx(FormTextInput, { className: \"w-48\", placeholder: DEFAULT_URL_LABEL_QUERY_PARAM, value: selectedColumn.linkLabelParameter ?? '', onChange: (event) => {\n const value = event.target.value.trim();\n selectedColumn.setLinkLabelParameter(value !== '' ? value : undefined);\n } })] }) })), _jsxs(\"div\", { className: \"mt-2 flex h-5 w-full items-center\", children: [_jsxs(\"div\", { className: \"flex h-full w-32 flex-shrink-0 items-center text-sm\", children: [`Missing Value Format:`, _jsx(FormDocumentation, { className: \"ml-1\", documentationKey: DocumentationKey.DATA_CUBE_COLUMN_MISSING_VALUE_FORMAT })] }), _jsx(FormTextInput, { className: \"w-16\", value: selectedColumn.missingValueDisplayText ?? '', onChange: (event) => {\n const value = event.target.value.trim();\n selectedColumn.setMissingValueDisplayText(value !== '' ? value : undefined);\n }, placeholder: \"(empty)\" })] }), _jsxs(\"div\", { className: \"mt-2 flex h-5 w-full items-center\", children: [_jsx(\"div\", { className: \"flex h-full w-32 flex-shrink-0 items-center text-sm\", children: \"Visibility:\" }), _jsx(FormCheckbox, { label: \"Blur content\", checked: selectedColumn.blur, onChange: () => selectedColumn.setBlur(!selectedColumn.blur), disabled: selectedColumn.hideFromView }), _jsx(FormCheckbox, { className: \"ml-3\", label: \"Hide from view\", checked: selectedColumn.hideFromView, onChange: () => selectedColumn.setHideFromView(!selectedColumn.hideFromView) })] }), _jsxs(\"div\", { className: \"mt-2 flex h-5 w-full items-center\", children: [_jsx(\"div\", { className: \"flex h-full w-32 flex-shrink-0 items-center text-sm\", children: \"Pin:\" }), _jsx(FormDropdownMenuTrigger, { className: \"w-16\", onClick: openColumnPinDropdown, open: columnPinDropdownPropsOpen, children: selectedColumn.pinned ?? '(None)' }), _jsx(FormDropdownMenu, { className: \"w-16\", ...columnPinDropdownProps, children: [\n undefined,\n DataCubeColumnPinPlacement.LEFT,\n DataCubeColumnPinPlacement.RIGHT,\n ].map((placement) => (_jsx(FormDropdownMenuItem, { onClick: () => {\n selectedColumn.setPinned(placement);\n closeColumnPinDropdown();\n }, autoFocus: placement === selectedColumn.pinned, children: placement ?? '(None)' }, placement ?? ''))) })] }), _jsxs(\"div\", { className: \"mt-1.5 flex h-6 w-full items-center\", children: [_jsx(\"div\", { className: \"flex h-full w-32 flex-shrink-0 items-center text-sm\", children: \"Width:\" }), _jsx(FormCheckbox, { label: \"(Any)\", checked: selectedColumn.fixedWidth === undefined &&\n selectedColumn.minWidth === undefined &&\n selectedColumn.maxWidth === undefined, onChange: () => {\n if (selectedColumn.fixedWidth === undefined &&\n selectedColumn.minWidth === undefined &&\n selectedColumn.maxWidth === undefined) {\n selectedColumn.setFixedWidth(DEFAULT_COLUMN_WIDTH);\n selectedColumn.setMinWidth(undefined);\n selectedColumn.setMaxWidth(undefined);\n }\n else {\n selectedColumn.setFixedWidth(undefined);\n selectedColumn.setMinWidth(undefined);\n selectedColumn.setMaxWidth(undefined);\n }\n } }), _jsx(FormCheckbox, { className: \"ml-3\", label: \"Fixed\", checked: selectedColumn.fixedWidth !== undefined, onChange: () => {\n selectedColumn.setFixedWidth(selectedColumn.fixedWidth !== undefined\n ? undefined\n : DEFAULT_COLUMN_WIDTH);\n selectedColumn.setMinWidth(undefined);\n selectedColumn.setMaxWidth(undefined);\n } }), _jsx(\"div\", { className: \"ml-1 h-[1px] w-2 flex-shrink-0 bg-neutral-400\" }), _jsx(FormNumberInput, { className: \"ml-1 w-16 text-sm\", min: 0, step: 50, defaultValue: undefined, isValid: (value) => value !== undefined && value > 0, value: selectedColumn.fixedWidth, setValue: (value) => {\n selectedColumn.setFixedWidth(value);\n }, disabled: selectedColumn.minWidth !== undefined ||\n selectedColumn.maxWidth !== undefined }), _jsx(FormCheckbox, { className: \"ml-3\", label: \"In range\", checked: selectedColumn.minWidth !== undefined ||\n selectedColumn.maxWidth !== undefined, onChange: () => {\n if (selectedColumn.minWidth === undefined &&\n selectedColumn.maxWidth === undefined) {\n selectedColumn.setMinWidth(DEFAULT_COLUMN_MIN_WIDTH);\n selectedColumn.setMaxWidth(DEFAULT_COLUMN_MAX_WIDTH);\n selectedColumn.setFixedWidth(undefined);\n }\n else {\n selectedColumn.setMinWidth(undefined);\n selectedColumn.setMaxWidth(undefined);\n selectedColumn.setFixedWidth(undefined);\n }\n } }), _jsx(\"div\", { className: \"ml-1 h-[1px] w-2 flex-shrink-0 bg-neutral-400\" }), _jsx(FormNumberInput, { className: \"ml-1 w-16 text-sm\", min: 0, step: 50, defaultValue: undefined, isValid: (value) => value !== undefined && value > 0, value: selectedColumn.minWidth, setValue: (value) => {\n selectedColumn.setMinWidth(value);\n }, disabled: selectedColumn.fixedWidth !== undefined }), _jsx(\"div\", { className: \"ml-1 h-[1px] w-1 flex-shrink-0 bg-neutral-400\" }), _jsx(FormNumberInput, { className: \"ml-1 w-16 text-sm\", min: selectedColumn.minWidth ?? 0, step: 50, defaultValue: undefined, isValid: (value) => value !== undefined &&\n value >= (selectedColumn.minWidth ?? 0), value: selectedColumn.maxWidth, setValue: (value) => {\n selectedColumn.setMaxWidth(value);\n }, disabled: selectedColumn.fixedWidth !== undefined })] }), _jsx(\"div\", { className: \"my-2 h-[1px] w-full bg-neutral-200\" }), _jsxs(\"div\", { className: \"mt-2 flex h-5 w-full items-center\", children: [_jsx(\"div\", { className: \"flex h-full w-32 flex-shrink-0 items-center text-sm\", children: \"Font:\" }), _jsx(FormDropdownMenuTrigger, { className: \"w-28\", onClick: openFontFamilyDropdown, open: fontFamilyDropdownPropsOpen, children: selectedColumn.fontFamily ?? gridConfiguration.fontFamily }), _jsxs(FormDropdownMenu, { className: \"w-28\", ...fontFamilyDropdownProps, children: [[\n DataCubeFont.ARIAL,\n DataCubeFont.ROBOTO,\n DataCubeFont.ROBOTO_CONDENSED,\n ].map((font) => (_jsx(FormDropdownMenuItem, { onClick: () => {\n selectedColumn.setFontFamily(font);\n closeFontFamilyDropdown();\n }, autoFocus: font ===\n (selectedColumn.fontFamily ??\n gridConfiguration.fontFamily), children: font }, font))), _jsx(FormDropdownMenuItemSeparator, {}), [\n DataCubeFont.GEORGIA,\n DataCubeFont.ROBOTO_SERIF,\n DataCubeFont.TIMES_NEW_ROMAN,\n ].map((font) => (_jsx(FormDropdownMenuItem, { onClick: () => {\n selectedColumn.setFontFamily(font);\n closeFontFamilyDropdown();\n }, autoFocus: font ===\n (selectedColumn.fontFamily ??\n gridConfiguration.fontFamily), children: font }, font))), _jsx(FormDropdownMenuItemSeparator, {}), [\n DataCubeFont.JERBRAINS_MONO,\n DataCubeFont.ROBOTO_MONO,\n DataCubeFont.UBUNTU_MONO,\n ].map((font) => (_jsx(FormDropdownMenuItem, { onClick: () => {\n selectedColumn.setFontFamily(font);\n closeFontFamilyDropdown();\n }, autoFocus: font ===\n (selectedColumn.fontFamily ??\n gridConfiguration.fontFamily), children: font }, font)))] }), _jsx(FormDropdownMenuTrigger, { className: \"ml-1 w-10\", onClick: openFontSizeDropdown, open: openFontSizeDropdownPropsOpen, children: selectedColumn.fontSize ?? gridConfiguration.fontSize }), _jsx(FormDropdownMenu, { className: \"w-10\", ...openFontSizeDropdownProps, children: [\n 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 24, 26,\n 28, 32, 36, 48, 72,\n ].map((size) => (_jsx(FormDropdownMenuItem, { onClick: () => {\n selectedColumn.setFontSize(size);\n closeFontSizeDropdown();\n }, autoFocus: size ===\n (selectedColumn.fontSize ??\n gridConfiguration.fontSize), children: size }, size))) }), _jsxs(\"div\", { className: \"relative ml-2 flex h-5\", children: [_jsx(\"button\", { title: \"Bold\", className: cn('relative flex h-5 w-5 items-center justify-center rounded-bl-sm rounded-tl-sm border border-neutral-400 bg-neutral-50 p-0 text-neutral-700 focus:z-[1]', {\n 'bg-neutral-200': selectedColumn.fontBold ??\n gridConfiguration.fontBold,\n }), onClick: () => selectedColumn.setFontBold(!(selectedColumn.fontBold ??\n gridConfiguration.fontBold)), children: _jsx(DataCubeIcon.FontBold, {}) }), _jsx(\"button\", { title: \"Italic\", className: cn('relative -ml-[1px] flex h-5 w-5 items-center justify-center border border-neutral-400 bg-neutral-50 p-0 text-neutral-700 focus:z-[1]', {\n 'bg-neutral-200': selectedColumn.fontItalic ??\n gridConfiguration.fontItalic,\n }), onClick: () => selectedColumn.setFontItalic(!(selectedColumn.fontItalic ??\n gridConfiguration.fontItalic)), children: _jsx(DataCubeIcon.FontItalic, {}) }), _jsx(\"button\", { title: `Underline${(selectedColumn.fontUnderline ?? gridConfiguration.fontUnderline) ? ` (${selectedColumn.fontUnderline ?? gridConfiguration.fontUnderline})` : ''}`, className: cn('relative -ml-[1px] flex h-5 w-5 items-center justify-center border border-r-0 border-neutral-400 bg-neutral-50 p-0 text-neutral-700 focus:z-[1]', {\n 'bg-neutral-200': (selectedColumn.fontUnderline ??\n gridConfiguration.fontUnderline) !== undefined,\n }), onClick: () => {\n if ((selectedColumn.fontUnderline ??\n gridConfiguration.fontUnderline) === undefined) {\n selectedColumn.setFontUnderline(DataCubeFontFormatUnderlineVariant.SOLID);\n selectedColumn.setFontStrikethrough(false);\n }\n else {\n selectedColumn.setFontUnderline(undefined);\n }\n }, children: _jsx(DataCubeIcon.FontUnderline, {}) }), _jsxs(\"button\", { className: \"text-2xs relative -ml-[1px] flex h-5 w-2.5 items-center justify-center border border-l-0 border-neutral-400 bg-neutral-50 p-0 text-neutral-600 focus:z-[1]\", onClick: openFontFormatUnderlineVariantDropdown, children: [_jsx(\"div\", { className: cn('h-4 w-[0.5px] bg-neutral-200', {\n 'opacity-0': (selectedColumn.fontUnderline ??\n gridConfiguration.fontUnderline) !== undefined,\n }) }), _jsx(DataCubeIcon.CaretDown, {})] }), _jsx(FormDropdownMenu, { className: \"w-14\", ...fontFormatUnderlineVariantDropdownProps, children: [\n DataCubeFontFormatUnderlineVariant.SOLID,\n DataCubeFontFormatUnderlineVariant.DASHED,\n DataCubeFontFormatUnderlineVariant.DOTTED,\n DataCubeFontFormatUnderlineVariant.DOUBLE,\n DataCubeFontFormatUnderlineVariant.WAVY,\n ].map((variant) => (_jsx(FormDropdownMenuItem, { className: \"relative\", onClick: () => {\n selectedColumn.setFontUnderline(variant);\n selectedColumn.setFontStrikethrough(false);\n closeFontFormatUnderlineVariantDropdown();\n }, autoFocus: variant ===\n (selectedColumn.fontUnderline ??\n gridConfiguration.fontUnderline), children: _jsx(\"div\", { className: cn('!hover:underline absolute top-0 !underline', {\n '!hover:decoration-solid !decoration-solid': variant ===\n DataCubeFontFormatUnderlineVariant.SOLID,\n '!hover:decoration-dashed !decoration-dashed': variant ===\n DataCubeFontFormatUnderlineVariant.DASHED,\n '!hover:decoration-dotted !decoration-dotted': variant ===\n DataCubeFontFormatUnderlineVariant.DOTTED,\n '!hover:decoration-double !decoration-double': variant ===\n DataCubeFontFormatUnderlineVariant.DOUBLE,\n '!hover:decoration-wavy !decoration-wavy': variant ===\n DataCubeFontFormatUnderlineVariant.WAVY,\n }), children: \"\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\\u00A0\" }) }, variant))) }), _jsx(\"button\", { title: \"Strikethrough\", className: cn('relative -ml-[1px] flex h-5 w-5 items-center justify-center border border-neutral-400 bg-neutral-50 p-0 text-neutral-700 focus:z-[1]', {\n 'bg-neutral-200': selectedColumn.fontStrikethrough ??\n gridConfiguration.fontStrikethrough,\n }), onClick: () => {\n if (selectedColumn.fontStrikethrough ??\n gridConfiguration.fontStrikethrough) {\n selectedColumn.setFontStrikethrough(false);\n }\n else {\n selectedColumn.setFontStrikethrough(true);\n selectedColumn.setFontUnderline(undefined);\n }\n }, children: _jsx(DataCubeIcon.FontStrikethrough, {}) }), _jsx(\"button\", { title: `Case${(selectedColumn.fontCase ?? gridConfiguration.fontCase) ? ` (${selectedColumn.fontCase ?? gridConfiguration.fontCase})` : ''}`, className: cn('relative -ml-[1px] flex h-5 w-5 items-center justify-center border border-r-0 border-neutral-400 bg-neutral-50 p-0 text-neutral-700 focus:z-[1]', {\n 'bg-neutral-200': (selectedColumn.fontCase ??\n gridConfiguration.fontCase) !== undefined,\n }), onClick: () => {\n if ((selectedColumn.fontCase ??\n gridConfiguration.fontCase) === undefined) {\n selectedColumn.setFontCase(DataCubeFontCase.UPPERCASE);\n }\n else {\n selectedColumn.setFontCase(undefined);\n }\n }, children: _jsx(DataCubeIcon.FontCase, { className: \"stroke-[0.5px]\" }) }), _jsxs(\"button\", { className: \"text-2xs relative -ml-[1px] flex h-5 w-2.5 items-center justify-center rounded-br-sm rounded-tr-sm border border-l-0 border-neutral-400 bg-neutral-50 p-0 text-neutral-600 focus:z-[1]\", onClick: openFontCaseDropdown, children: [_jsx(\"div\", { className: cn('h-4 w-[0.5px] bg-neutral-200', {\n 'opacity-0': (selectedColumn.fontCase ??\n gridConfiguration.fontCase) !== undefined,\n }) }), _jsx(DataCubeIcon.CaretDown, {})] }), _jsx(FormDropdownMenu, { className: \"w-20\", ...fontCaseDropdownProps, children: [\n DataCubeFontCase.LOWERCASE,\n DataCubeFontCase.UPPERCASE,\n DataCubeFontCase.CAPITALIZE,\n ].map((fontCase) => (_jsx(FormDropdownMenuItem, { onClick: () => {\n selectedColumn.setFontCase(fontCase);\n closeFontCaseDropdown();\n }, autoFocus: fontCase ===\n (selectedColumn.fontCase ??\n gridConfiguration.fontCase), children: _jsx(\"div\", { className: cn({\n lowercase: fontCase === DataCubeFontCase.LOWERCASE,\n uppercase: fontCase === DataCubeFontCase.UPPERCASE,\n capitalize: fontCase === DataCubeFontCase.CAPITALIZE,\n }), children: fontCase }) }, fontCase))) })] }), _jsxs(\"div\", { className: \"relative ml-2 flex h-5\", children: [_jsx(\"button\", { title: \"Align Left\", className: cn('relative flex h-5 w-5 items-center justify-center rounded-bl-sm rounded-tl-sm border border-neutral-400 bg-neutral-50 p-0 text-neutral-700 focus:z-[1]', {\n 'bg-neutral-200': (selectedColumn.textAlign ??\n gridConfiguration.textAlign) ===\n DataCubeFontTextAlignment.LEFT,\n }), onClick: () => selectedColumn.setTextAlign(DataCubeFontTextAlignment.LEFT), children: _jsx(DataCubeIcon.TextAlignLeft, {}) }), _jsx(\"button\", { title: \"Align Center\", className: cn('relative -ml-[1px] flex h-5 w-5 items-center justify-center border border-neutral-400 bg-neutral-50 p-0 text-neutral-700 focus:z-[1]', {\n 'bg-neutral-200': (selectedColumn.textAlign ??\n gridConfiguration.textAlign) ===\n DataCubeFontTextAlignment.CENTER,\n }), onClick: () => selectedColumn.setTextAlign(DataCubeFontTextAlignment.CENTER), children: _jsx(DataCubeIcon.TextAlignCenter, {}) }), _jsx(\"button\", { title: \"Align Right\", className: cn('relative -ml-[1px] flex h-5 w-5 items-center justify-center rounded-br-sm rounded-tr-sm border border-neutral-400 bg-neutral-50 p-0 text-neutral-700 focus:z-[1]', {\n 'bg-neutral-200': (selectedColumn.textAlign ??\n gridConfiguration.textAlign) ===\n DataCubeFontTextAlignment.RIGHT,\n }), onClick: () => selectedColumn.setTextAlign(DataCubeFontTextAlignment.RIGHT), children: _jsx(DataCubeIcon.TextAlignRight, {}) })] })] }), _jsxs(\"div\", { className: \"mt-2 flex w-full\", children: [_jsx(\"div\", { className: \"flex h-6 w-32 flex-shrink-0 items-center text-sm\", children: \"Colors:\" }), _jsxs(\"div\", { className: \"h-18\", children: [_jsxs(\"div\", { className: \"flex h-6\", children: [_jsx(\"div\", { className: \"w-16 flex-shrink-0\" }), _jsx(\"div\", { className: \"flex h-full w-12 flex-shrink-0 items-center justify-center text-sm\", children: \"Normal\" }), _jsx(\"div\", { className: \"flex h-full w-12 flex-shrink-0 items-center justify-center text-sm\", children: \"Negative\" }), _jsx(\"div\", { className: \"flex h-full w-12 flex-shrink-0 items-center justify-center text-sm\", children: \"Zero\" }), _jsx(\"div\", { className: \"flex h-full w-12 flex-shrink-0 items-center justify-center text-sm\", children: \"Error\" })] }), _jsxs(\"div\", { className: \"flex h-6\", children: [_jsx(\"div\", { className: \"flex h-full w-16 flex-shrink-0 items-center text-sm\", children: \"Foreground:\" }), _jsx(\"div\", { className: \"flex h-full w-12 flex-shrink-0 items-center justify-center\", children: _jsx(FormColorPickerButton, { color: selectedColumn.normalForegroundColor ??\n gridConfiguration.normalForegroundColor, defaultColor: gridConfiguration.normalForegroundColor, onChange: (value) => selectedColumn.setNormalForegroundColor(value) }) }), _jsx(\"div\", { className: \"flex h-full w-12 flex-shrink-0 items-center justify-center\", children: _jsx(FormColorPickerButton, { color: selectedColumn.negativeForegroundColor ??\n gridConfiguration.negativeForegroundColor, defaultColor: gridConfiguration.negativeForegroundColor, onChange: (value) => selectedColumn.setNegativeForegroundColor(value) }) }), _jsx(\"div\", { className: \"flex h-full w-12 flex-shrink-0 items-center justify-center\", children: _jsx(FormColorPickerButton, { color: selectedColumn.zeroForegroundColor ??\n gridConfiguration.zeroForegroundColor, defaultColor: gridConfiguration.zeroForegroundColor, onChange: (value) => selectedColumn.setZeroForegroundColor(value) }) }), _jsx(\"div\", { className: \"flex h-full w-12 flex-shrink-0 items-center justify-center\", children: _jsx(FormColorPickerButton, { color: selectedColumn.errorForegroundColor ??\n gridConfiguration.errorForegroundColor, defaultColor: gridConfiguration.errorForegroundColor, onChange: (value) => selectedColumn.setErrorForegroundColor(value) }) })] }), _jsxs(\"div\", { className: \"flex h-6\", children: [_jsx(\"div\", { className: \"flex h-full w-16 flex-shrink-0 items-center text-sm\", children: \"Background:\" }), _jsx(\"div\", { className: \"flex h-full w-12 flex-shrink-0 items-center justify-center\", children: _jsx(FormColorPickerButton, { color: selectedColumn.normalBackgroundColor ??\n gridConfiguration.normalBackgroundColor, defaultColor: gridConfiguration.normalBackgroundColor, onChange: (value) => selectedColumn.setNormalBackgroundColor(value) }) }), _jsx(\"div\", { className: \"flex h-full w-12 flex-shrink-0 items-center justify-center\", children: _jsx(FormColorPickerButton, { color: selectedColumn.negativeBackgroundColor ??\n gridConfiguration.negativeBackgroundColor, defaultColor: gridConfiguration.negativeBackgroundColor, onChange: (value) => selectedColumn.setNegativeBackgroundColor(value) }) }), _jsx(\"div\", { className: \"flex h-full w-12 flex-shrink-0 items-center justify-center\", children: _jsx(FormColorPickerButton, { color: selectedColumn.zeroBackgroundColor ??\n gridConfiguration.zeroBackgroundColor, defaultColor: gridConfiguration.zeroBackgroundColor, onChange: (value) => selectedColumn.setZeroBackgroundColor(value) }) }), _jsx(\"div\", { className: \"flex h-full w-12 flex-shrink-0 items-center justify-center\", children: _jsx(FormColorPickerButton, { color: selectedColumn.errorBackgroundColor ??\n gridConfiguration.errorBackgroundColor, defaultColor: gridConfiguration.errorBackgroundColor, onChange: (value) => selectedColumn.setErrorBackgroundColor(value) }) })] })] })] }), _jsxs(\"div\", { className: \"mt-2 flex w-full\", children: [_jsx(\"div\", { className: \"flex h-6 w-32 flex-shrink-0 items-center text-sm\" }), _jsxs(\"div\", { className: \"w-80\", children: [_jsx(\"div\", { className: \"mb-2 h-[1px] w-full bg-neutral-200\" }), _jsx(\"button\", { className: \"flex h-5 items-center justify-center rounded-sm border border-neutral-400 bg-neutral-200 p-0 px-1 text-sm text-neutral-700 disabled:text-neutral-400\", disabled: selectedColumn.isUsingDefaultStyling, onClick: () => selectedColumn.useDefaultStyling(), children: \"Use Default Styling\" })] })] })] }))] }) })] }));\n});\n//# sourceMappingURL=DataCubeEditorColumnPropertiesPanel.js.map","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { observer } from 'mobx-react-lite';\nimport { DataCubeEditorTab } from '../../../stores/view/editor/DataCubeEditorState.js';\nimport { DataCubeEditorSortsPanel } from './DataCubeEditorSortsPanel.js';\nimport { DataCubeEditorGeneralPropertiesPanel } from './DataCubeEditorGeneralPropertiesPanel.js';\nimport { DataCubeEditorColumnsPanel } from './DataCubeEditorColumnsPanel.js';\nimport { DataCubeEditorVerticalPivotsPanel } from './DataCubeEditorVerticalPivotsPanel.js';\nimport { DataCubeEditorHorizontalPivotsPanel } from './DataCubeEditorHorizontalPivotsPanel.js';\nimport { DataCubeEditorColumnPropertiesPanel } from './DataCubeEditorColumnPropertiesPanel.js';\nimport { cn } from '@finos/legend-art';\nexport const DataCubeEditor = observer((props) => {\n const { view } = props;\n const editor = view.editor;\n const engine = view.engine;\n const selectedTab = editor.currentTab;\n const tabs = [\n DataCubeEditorTab.COLUMNS,\n DataCubeEditorTab.VERTICAL_PIVOTS,\n DataCubeEditorTab.HORIZONTAL_PIVOTS,\n DataCubeEditorTab.SORTS,\n DataCubeEditorTab.GENERAL_PROPERTIES,\n DataCubeEditorTab.COLUMN_PROPERTIES,\n ];\n return (_jsxs(_Fragment, { children: [_jsxs(\"div\", { className: \"relative h-[calc(100%_-_40px)] w-full px-2 pt-8\", children: [_jsx(\"div\", { className: \"absolute top-0 flex h-9 w-[calc(100%_-_16px)] overflow-y-hidden pt-2\", children: tabs.map((tab) => (_jsx(\"button\", { onClick: () => editor.setCurrentTab(tab), className: cn('relative flex h-6 items-center justify-center whitespace-nowrap border border-b-0 border-l-0 border-neutral-300 px-2 first:border-l focus:z-10', {\n '-top-0.5 h-[27px] border-b-0 bg-white': tab === selectedTab,\n }), children: tab }, tab))) }), _jsxs(\"div\", { className: \"h-full w-full overflow-auto border border-neutral-300 bg-white\", children: [selectedTab === DataCubeEditorTab.COLUMNS && (_jsx(DataCubeEditorColumnsPanel, { view: view })), selectedTab === DataCubeEditorTab.VERTICAL_PIVOTS && (_jsx(DataCubeEditorVerticalPivotsPanel, { view: view })), selectedTab === DataCubeEditorTab.HORIZONTAL_PIVOTS && (_jsx(DataCubeEditorHorizontalPivotsPanel, { view: view })), selectedTab === DataCubeEditorTab.SORTS && (_jsx(DataCubeEditorSortsPanel, { view: view })), selectedTab === DataCubeEditorTab.GENERAL_PROPERTIES && (_jsx(DataCubeEditorGeneralPropertiesPanel, { view: view })), selectedTab === DataCubeEditorTab.COLUMN_PROPERTIES && (_jsx(DataCubeEditorColumnPropertiesPanel, { view: view }))] })] }), _jsxs(\"div\", { className: \"flex h-10 items-center justify-end px-2\", children: [_jsx(\"button\", { className: \"h-6 w-20 border border-neutral-400 bg-neutral-300 px-2 hover:brightness-95 disabled:cursor-not-allowed disabled:border-neutral-300 disabled:text-neutral-400 disabled:hover:brightness-100\", disabled: editor.finalizationState.isInProgress, onClick: () => {\n editor\n .applyChanges({ closeAfterApply: true })\n .catch((error) => engine.alertUnhandledError(error));\n }, children: \"OK\" }), _jsx(\"button\", { className: \"ml-2 h-6 w-20 border border-neutral-400 bg-neutral-300 px-2 hover:brightness-95\", onClick: () => editor.display.close(), children: \"Cancel\" }), _jsx(\"button\", { className: \"ml-2 h-6 w-20 border border-neutral-400 bg-neutral-300 px-2 hover:brightness-95 disabled:cursor-not-allowed disabled:border-neutral-300 disabled:text-neutral-400 disabled:hover:brightness-100\", disabled: editor.finalizationState.isInProgress, onClick: () => {\n editor\n .applyChanges()\n .catch((error) => engine.alertUnhandledError(error));\n }, children: \"Apply\" })] })] }));\n});\n//# sourceMappingURL=DataCubeEditor.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { action, computed, makeObservable, observable } from 'mobx';\nimport { DataCubeColumnKind, isPivotResultColumnName, } from '../../core/DataCubeQueryEngine.js';\nimport {} from '../../core/DataCubeQuerySnapshot.js';\nimport { _toCol, } from '../../core/models/DataCubeColumn.js';\nimport { DataCubeEditorColumnSelectorColumnState, DataCubeEditorColumnSelectorState, } from './DataCubeEditorColumnSelectorState.js';\nimport { uniqBy } from '@finos/legend-shared';\nexport class DataCubeEditorHorizontalPivotColumnSelectorState extends DataCubeEditorColumnSelectorState {\n cloneColumn(column) {\n return new DataCubeEditorColumnSelectorColumnState(column.name, column.type);\n }\n get availableColumns() {\n return this.editor.columnProperties.columns\n .filter((col) => col.kind === DataCubeColumnKind.DIMENSION &&\n // exclude group-level extended columns\n !this.editor.groupExtendColumns.find((column) => column.name === col.name))\n .map((col) => new DataCubeEditorColumnSelectorColumnState(col.name, col.type));\n }\n}\nexport class DataCubeEditorHorizontalPivotsPanelState {\n view;\n editor;\n selector;\n castColumns = [];\n constructor(editor) {\n makeObservable(this, {\n castColumns: observable.ref,\n pivotResultColumns: computed,\n setCastColumns: action,\n applySnaphot: action,\n });\n this.editor = editor;\n this.view = editor.view;\n this.selector = new DataCubeEditorHorizontalPivotColumnSelectorState(editor);\n }\n get pivotResultColumns() {\n return this.castColumns\n .filter((col) => isPivotResultColumnName(col.name))\n .map(_toCol);\n }\n setCastColumns(value) {\n this.castColumns = value;\n }\n propagateChanges() {\n this.editor.verticalPivots.adaptPropagatedChanges();\n this.editor.sorts.adaptPropagatedChanges();\n }\n applySnaphot(snapshot, configuration) {\n this.selector.setSelectedColumns((snapshot.data.pivot?.columns ?? []).map((col) => new DataCubeEditorColumnSelectorColumnState(col.name, col.type)));\n this.setCastColumns(snapshot.data.pivot?.castColumns ?? []);\n }\n buildSnapshot(newSnapshot, baseSnapshot) {\n newSnapshot.data.pivot = this.selector.selectedColumns.length\n ? {\n columns: this.selector.selectedColumns.map(_toCol),\n castColumns: this.castColumns.map(_toCol),\n }\n : undefined;\n newSnapshot.data.selectColumns = uniqBy([...newSnapshot.data.selectColumns, ...this.selector.selectedColumns], (col) => col.name).map(_toCol);\n }\n}\n//# sourceMappingURL=DataCubeEditorHorizontalPivotsPanelState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { action, makeObservable, observable } from 'mobx';\nimport {} from '../../core/DataCubeQuerySnapshot.js';\nimport { DataCubeEditorMutablePivotLayoutConfiguration } from './DataCubeEditorMutableConfiguration.js';\nimport { _pruneExpandedPaths } from '../../core/DataCubeQuerySnapshotBuilderUtils.js';\nexport class DataCubeEditorPivotLayoutPanelState {\n view;\n editor;\n pivotLayout = new DataCubeEditorMutablePivotLayoutConfiguration();\n constructor(editor) {\n makeObservable(this, {\n pivotLayout: observable,\n applySnaphot: action,\n });\n this.editor = editor;\n this.view = editor.view;\n }\n applySnaphot(snapshot, configuration) {\n this.pivotLayout = DataCubeEditorMutablePivotLayoutConfiguration.create(snapshot.data.configuration.pivotLayout);\n }\n buildSnapshot(newSnapshot, baseSnapshot) {\n this.pivotLayout.setExpandedPaths(_pruneExpandedPaths(baseSnapshot.data.groupBy?.columns ?? [], this.editor.verticalPivots.selector.selectedColumns, this.pivotLayout.expandedPaths));\n newSnapshot.data.configuration = {\n ...newSnapshot.data.configuration,\n pivotLayout: this.pivotLayout.serialize(),\n };\n }\n}\n//# sourceMappingURL=DataCubeEditorPivotLayoutPanelState.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { action, makeObservable, observable } from 'mobx';\nimport { DataCubeEditorSortsPanelState } from './DataCubeEditorSortsPanelState.js';\nimport { DataCubeQuerySnapshotController } from '../DataCubeQuerySnapshotManager.js';\nimport {} from '../../core/DataCubeQuerySnapshot.js';\nimport { _toCol, } from '../../core/models/DataCubeColumn.js';\nimport { ActionState, assertErrorThrown, guaranteeNonNullable, HttpStatus, NetworkClientError, } from '@finos/legend-shared';\nimport { DataCubeEditorGeneralPropertiesPanelState } from './DataCubeEditorGeneralPropertiesPanelState.js';\nimport { DataCubeEditorColumnPropertiesPanelState } from './DataCubeEditorColumnPropertiesPanelState.js';\nimport { DataCubeEditorColumnsPanelState } from './DataCubeEditorColumnsPanelState.js';\nimport { DataCubeConfiguration } from '../../core/models/DataCubeConfiguration.js';\nimport { DataCubeEditorVerticalPivotsPanelState } from './DataCubeEditorVerticalPivotsPanelState.js';\nimport { DataCubeEditor } from '../../../components/view/editor/DataCubeEditor.js';\nimport { DataCubeEditorHorizontalPivotsPanelState } from './DataCubeEditorHorizontalPivotsPanelState.js';\nimport { DataCubeEditorPivotLayoutPanelState } from './DataCubeEditorPivotLayoutPanelState.js';\nimport { _lambda } from '../../core/DataCubeQueryBuilderUtils.js';\nexport var DataCubeEditorTab;\n(function (DataCubeEditorTab) {\n DataCubeEditorTab[\"GENERAL_PROPERTIES\"] = \"General Properties\";\n DataCubeEditorTab[\"COLUMN_PROPERTIES\"] = \"Column Properties\";\n DataCubeEditorTab[\"COLUMNS\"] = \"Columns\";\n DataCubeEditorTab[\"VERTICAL_PIVOTS\"] = \"Vertical Pivots\";\n DataCubeEditorTab[\"HORIZONTAL_PIVOTS\"] = \"Horizontal Pivots\";\n DataCubeEditorTab[\"SORTS\"] = \"Sorts\";\n})(DataCubeEditorTab || (DataCubeEditorTab = {}));\n/**\n * This query editor state backs the main form editor of data cube. It supports\n * batching changes before engine, i.e. allowing user to make multiple edits before\n * applying and propgating them.\n *\n * NOTE: It allows almost FULL 1-1 control over the data cube query state.\n * It could also host other form editor states like filter editors, but due to ergonomic\n * reasons, those have been separated out into their own respective query editor states.\n */\nexport class DataCubeEditorState extends DataCubeQuerySnapshotController {\n display;\n finalizationState = ActionState.create();\n generalProperties;\n pivotLayout;\n columnProperties;\n columns;\n horizontalPivots;\n verticalPivots;\n sorts;\n currentTab = DataCubeEditorTab.GENERAL_PROPERTIES;\n sourceColumns = [];\n leafExtendColumns = [];\n groupExtendColumns = [];\n constructor(view) {\n super(view);\n makeObservable(this, {\n currentTab: observable,\n setCurrentTab: action,\n sourceColumns: observable.ref,\n leafExtendColumns: observable.ref,\n groupExtendColumns: observable.ref,\n applySnapshot: action,\n applyChanges: action,\n });\n this.display = this.view.engine.layout.newDisplay('Properties', () => (_jsx(DataCubeEditor, { view: this.view })));\n this.generalProperties = new DataCubeEditorGeneralPropertiesPanelState(this);\n this.pivotLayout = new DataCubeEditorPivotLayoutPanelState(this);\n this.columnProperties = new DataCubeEditorColumnPropertiesPanelState(this);\n this.columns = new DataCubeEditorColumnsPanelState(this);\n this.horizontalPivots = new DataCubeEditorHorizontalPivotsPanelState(this);\n this.verticalPivots = new DataCubeEditorVerticalPivotsPanelState(this);\n this.sorts = new DataCubeEditorSortsPanelState(this);\n }\n setCurrentTab(val) {\n this.currentTab = val;\n }\n async applySnapshot(snapshot, previousSnapshot) {\n this.sourceColumns = snapshot.data.sourceColumns;\n this.leafExtendColumns = snapshot.data.leafExtendedColumns;\n this.groupExtendColumns = snapshot.data.groupExtendedColumns;\n const configuration = DataCubeConfiguration.serialization.fromJson(snapshot.data.configuration);\n this.generalProperties.applySnaphot(snapshot, configuration);\n this.pivotLayout.applySnaphot(snapshot, configuration);\n this.columnProperties.applySnaphot(snapshot, configuration);\n this.columns.applySnaphot(snapshot, configuration);\n this.horizontalPivots.applySnaphot(snapshot, configuration);\n this.verticalPivots.applySnaphot(snapshot, configuration);\n this.sorts.applySnaphot(snapshot, configuration);\n }\n getSnapshotSubscriberName() {\n return 'editor';\n }\n async applyChanges(options) {\n this.finalizationState.inProgress();\n const baseSnapshot = guaranteeNonNullable(this.getLatestSnapshot());\n const newSnapshot = baseSnapshot.clone();\n // grid configuration must be processed before processing columns' configuration\n // to properly generate the container configuration\n this.generalProperties.buildSnapshot(newSnapshot, baseSnapshot);\n this.pivotLayout.buildSnapshot(newSnapshot, baseSnapshot);\n this.columnProperties.buildSnapshot(newSnapshot, baseSnapshot);\n // NOTE: column selection must be processed first since the snapshot\n // processing of other parts of the query can be affected by column selection.\n this.columns.buildSnapshot(newSnapshot, baseSnapshot);\n this.horizontalPivots.buildSnapshot(newSnapshot, baseSnapshot);\n this.verticalPivots.buildSnapshot(newSnapshot, baseSnapshot);\n this.sorts.buildSnapshot(newSnapshot, baseSnapshot);\n // finalize\n newSnapshot.finalize();\n if (newSnapshot.hashCode !== baseSnapshot.hashCode) {\n const task = this.view.newTask('Validate query');\n // NOTE: Compile the query to validate. This is a helpful check for a lot of different scenarios\n // where the consistency of the query might be thrown off by changes from various parts that the\n // editor does not have full control over (i.e. extended columns, pivot cast columns, etc.)\n // e.g. when a column that group-level extended columns' expressions depend on has been unselected.\n const tempSnapshot = newSnapshot.clone();\n // NOTE: in order to obtain the actual pivot result columns information, we need to execute\n // the query which is expensive in certain cases, so here, we just compute the \"optimistic\" set\n // of pivot result columns for casting to guarantee validation is not thronn off.\n if (tempSnapshot.data.pivot) {\n tempSnapshot.data.pivot.castColumns =\n this.sorts.selector.availableColumns\n .filter((col) => !tempSnapshot.data.groupExtendedColumns.find((column) => column.name === col.name))\n .map(_toCol);\n }\n const codePrefix = `->`;\n const code = await this.view.engine.getPartialQueryCode(tempSnapshot, true);\n try {\n await this.view.engine.getQueryCodeRelationReturnType(codePrefix + code, _lambda([], [this.view.source.query]), this.view.source);\n }\n catch (error) {\n assertErrorThrown(error);\n if (error instanceof NetworkClientError &&\n error.response.status === HttpStatus.BAD_REQUEST) {\n this.view.engine.alertCodeCheckError(error.payload, code, codePrefix, {\n message: `Query Validation Failure: Can't safely apply changes. Check the query code below for more details.`,\n text: `Error: ${error.message}`,\n });\n }\n else {\n this.view.engine.alertError(error, {\n message: `Query Validation Failure: Can't safely apply changes.`,\n text: `Error: ${error.message}`,\n });\n }\n return;\n }\n finally {\n this.view.endTask(task);\n this.finalizationState.complete();\n }\n this.publishSnapshot(newSnapshot);\n }\n else {\n this.finalizationState.complete();\n }\n if (options?.closeAfterApply) {\n this.display.close();\n }\n }\n}\n//# sourceMappingURL=DataCubeEditorState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { WIP_GridMenuItem } from '../../../components/view/grid/DataCubeGridShared.js';\nimport { DataCubeQuerySortDirection, DataCubeColumnPinPlacement, DEFAULT_COLUMN_MIN_WIDTH, DataCubeColumnKind, DataCubeQueryFilterOperator, isPivotResultColumnName, getPivotResultColumnBaseColumnName, } from '../../core/DataCubeQueryEngine.js';\nimport { guaranteeIsNumber, isNonNullable, UnsupportedOperationError, } from '@finos/legend-shared';\nimport { DataCubeGridClientExportFormat, INTERNAL__GRID_CLIENT_MISSING_VALUE, INTERNAL__GRID_CLIENT_TREE_COLUMN_ID, } from './DataCubeGridClientEngine.js';\nimport { PRIMITIVE_TYPE } from '@finos/legend-graph';\nimport { DataCubeFilterEditorConditionTreeNode } from '../../core/filter/DataCubeQueryFilterEditorState.js';\nimport { DataCubeEditorTab } from '../editor/DataCubeEditorState.js';\nfunction toFilterValue(value, columnConfiguration) {\n const label = `${columnConfiguration.type === PRIMITIVE_TYPE.STRING ? `'${value}'` : value}`;\n let val;\n switch (columnConfiguration.type) {\n case PRIMITIVE_TYPE.STRING: {\n val = value;\n break;\n }\n case PRIMITIVE_TYPE.NUMBER:\n case PRIMITIVE_TYPE.DECIMAL:\n case PRIMITIVE_TYPE.FLOAT:\n case PRIMITIVE_TYPE.INTEGER: {\n val = guaranteeIsNumber(Number(value));\n break;\n }\n case PRIMITIVE_TYPE.DATE:\n case PRIMITIVE_TYPE.STRICTDATE:\n case PRIMITIVE_TYPE.DATETIME: {\n val = value; // TODO?: make sure this is a parsable date string\n break;\n }\n default: {\n throw new UnsupportedOperationError(`Can't filter on column with unsupported type '${columnConfiguration.type}'`);\n }\n }\n return { label, value: { type: columnConfiguration.type, value: val } };\n}\nfunction getColumnFilterOperations(columnConfiguration) {\n switch (columnConfiguration.type) {\n case PRIMITIVE_TYPE.STRING: {\n return [\n DataCubeQueryFilterOperator.EQUAL,\n DataCubeQueryFilterOperator.NOT_EQUAL,\n DataCubeQueryFilterOperator.LESS_THAN,\n DataCubeQueryFilterOperator.LESS_THAN_OR_EQUAL,\n DataCubeQueryFilterOperator.GREATER_THAN,\n DataCubeQueryFilterOperator.GREATER_THAN_OR_EQUAL,\n DataCubeQueryFilterOperator.CONTAIN,\n DataCubeQueryFilterOperator.NOT_CONTAIN,\n DataCubeQueryFilterOperator.START_WITH,\n DataCubeQueryFilterOperator.NOT_START_WITH,\n DataCubeQueryFilterOperator.END_WITH,\n DataCubeQueryFilterOperator.NOT_END_WITH,\n ];\n }\n case PRIMITIVE_TYPE.NUMBER:\n case PRIMITIVE_TYPE.DECIMAL:\n case PRIMITIVE_TYPE.FLOAT:\n case PRIMITIVE_TYPE.INTEGER: {\n return [\n DataCubeQueryFilterOperator.EQUAL,\n DataCubeQueryFilterOperator.NOT_EQUAL,\n DataCubeQueryFilterOperator.LESS_THAN,\n DataCubeQueryFilterOperator.LESS_THAN_OR_EQUAL,\n DataCubeQueryFilterOperator.GREATER_THAN,\n DataCubeQueryFilterOperator.GREATER_THAN_OR_EQUAL,\n ];\n }\n case PRIMITIVE_TYPE.DATE:\n case PRIMITIVE_TYPE.STRICTDATE:\n case PRIMITIVE_TYPE.DATETIME: {\n return [\n DataCubeQueryFilterOperator.EQUAL,\n DataCubeQueryFilterOperator.NOT_EQUAL,\n DataCubeQueryFilterOperator.LESS_THAN,\n DataCubeQueryFilterOperator.LESS_THAN_OR_EQUAL,\n DataCubeQueryFilterOperator.GREATER_THAN,\n DataCubeQueryFilterOperator.GREATER_THAN_OR_EQUAL,\n ];\n }\n default: {\n return [];\n }\n }\n}\nfunction buildNewFilterConditionMenuItem(columnConfiguration, operator, value, controller) {\n const operation = controller.view.engine.getFilterOperation(operator);\n return {\n name: `Add Filter: ${columnConfiguration.name} ${operation.textLabel}${value ? ` ${value.label}` : ''}`,\n action: () => {\n controller.addNewFilterCondition(new DataCubeFilterEditorConditionTreeNode(controller.filterTree.root, {\n name: columnConfiguration.name,\n type: columnConfiguration.type,\n }, operation, value?.value, undefined));\n },\n };\n}\nexport function generateMenuBuilder(controller) {\n const view = controller.view;\n const engine = view.engine;\n // NOTE: we need to minimize the usage of these states\n // since the grid context-menu should be solely driven\n // by the grid controller\n const filter = view.filter;\n const editor = view.editor;\n const extend = view.extend;\n return (params, fromHeader) => {\n const column = params.column ?? undefined;\n const columnName = column?.getColId();\n const columnConfiguration = controller.getColumnConfiguration(columnName);\n const baseColumnConfiguration = columnName && isPivotResultColumnName(columnName)\n ? controller.getColumnConfiguration(getPivotResultColumnBaseColumnName(columnName))\n : undefined;\n const isExtendedColumn = columnName &&\n [\n ...controller.leafExtendedColumns,\n ...controller.groupExtendedColumns,\n ].find((col) => col.name === columnName);\n // NOTE: here we assume the value must be coming from the same column\n const value = 'value' in params ? params.value : undefined;\n const sortMenu = [\n {\n name: 'Sort',\n subMenu: [\n ...(column && columnName && controller.getSortableColumn(columnName)\n ? [\n {\n name: 'Ascending',\n action: () => controller.setSortByColumn(columnName, DataCubeQuerySortDirection.ASCENDING),\n },\n {\n name: 'Descending',\n action: () => controller.setSortByColumn(columnName, DataCubeQuerySortDirection.DESCENDING),\n },\n {\n name: 'Clear Sort',\n disabled: !controller.sortColumns.find((col) => col.name === columnName),\n action: () => controller.clearSortByColumn(columnName),\n },\n 'separator',\n {\n name: 'Add Ascending',\n disabled: Boolean(controller.sortColumns.find((col) => col.name === columnName &&\n col.direction === DataCubeQuerySortDirection.ASCENDING)),\n action: () => controller.addSortByColumn(columnName, DataCubeQuerySortDirection.ASCENDING),\n },\n {\n name: 'Add Descending',\n disabled: Boolean(controller.sortColumns.find((col) => col.name === columnName &&\n col.direction === DataCubeQuerySortDirection.DESCENDING)),\n action: () => controller.addSortByColumn(columnName, DataCubeQuerySortDirection.DESCENDING),\n },\n 'separator',\n ]\n : []),\n {\n name: 'Clear All Sorts',\n disabled: controller.sortColumns.length === 0,\n action: () => controller.clearAllSorts(),\n },\n ],\n },\n ];\n let newFilterMenu = [];\n if (column && value !== undefined) {\n let _columnConfiguration = columnConfiguration;\n if (column.getColId() === INTERNAL__GRID_CLIENT_TREE_COLUMN_ID &&\n controller.verticalPivotColumns.length &&\n 'node' in params &&\n params.node) {\n const groupByColumn = controller.verticalPivotColumns[params.node.level];\n _columnConfiguration = controller.getColumnConfiguration(groupByColumn?.name);\n }\n if (_columnConfiguration) {\n if (value !== INTERNAL__GRID_CLIENT_MISSING_VALUE) {\n const filterValue = toFilterValue(value, _columnConfiguration);\n const filterOperations = getColumnFilterOperations(_columnConfiguration);\n if (filterOperations.length &&\n filterOperations.includes(DataCubeQueryFilterOperator.EQUAL)) {\n const moreFilterOperations = filterOperations.filter((op) => op !== DataCubeQueryFilterOperator.EQUAL);\n newFilterMenu = [\n buildNewFilterConditionMenuItem(_columnConfiguration, DataCubeQueryFilterOperator.EQUAL, filterValue, controller),\n moreFilterOperations.length\n ? {\n name: `More Filters on ${columnName}...`,\n subMenu: moreFilterOperations.map((operator) => buildNewFilterConditionMenuItem(_columnConfiguration, operator, filterValue, controller)),\n }\n : undefined,\n ].filter(isNonNullable);\n }\n }\n else {\n newFilterMenu = [\n buildNewFilterConditionMenuItem(_columnConfiguration, DataCubeQueryFilterOperator.IS_NULL, undefined, controller),\n buildNewFilterConditionMenuItem(_columnConfiguration, DataCubeQueryFilterOperator.IS_NOT_NULL, undefined, controller),\n ];\n }\n }\n }\n return [\n {\n name: 'Export',\n subMenu: [\n {\n name: 'HTML',\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: true,\n },\n {\n name: 'Plain Text',\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: true,\n },\n {\n name: 'PDF',\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: true,\n },\n {\n name: 'Excel',\n action: () => view.grid.exportEngine.exportFile(DataCubeGridClientExportFormat.EXCEL),\n },\n {\n name: 'CSV',\n action: () => view.grid.exportEngine.exportFile(DataCubeGridClientExportFormat.CSV),\n },\n 'separator',\n {\n name: 'DataCube Specification',\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: true,\n },\n ],\n },\n {\n name: 'Email',\n subMenu: [\n {\n name: 'HTML',\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: true,\n },\n {\n name: 'Plain Text',\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: true,\n },\n 'separator',\n {\n name: 'HTML Attachment',\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: true,\n },\n {\n name: 'Plain Text Attachment',\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: true,\n },\n {\n name: 'PDF Attachment',\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: true,\n },\n {\n name: 'Excel Attachment',\n action: () => {\n view.grid.exportEngine\n .exportEmail(DataCubeGridClientExportFormat.EXCEL)\n .catch((error) => engine.logUnhandledError(error));\n },\n },\n {\n name: 'CSV Attachment',\n action: () => {\n view.grid.exportEngine\n .exportEmail(DataCubeGridClientExportFormat.CSV)\n .catch((error) => engine.logUnhandledError(error));\n },\n },\n {\n name: 'DataCube Specification Attachment',\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: true,\n },\n ],\n },\n {\n name: 'Copy',\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n subMenu: [\n {\n name: 'Plain Text',\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: true,\n },\n {\n name: 'Selected Row(s) as Plain Text',\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: true,\n },\n {\n name: 'Selected Column as Plain Text',\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: true,\n },\n ],\n },\n 'separator',\n ...sortMenu,\n {\n name: 'Filter',\n subMenu: [\n ...newFilterMenu,\n newFilterMenu.length ? 'separator' : undefined,\n {\n name: 'Filters...',\n action: () => {\n filter.display.open();\n },\n },\n {\n name: 'Clear All Filters',\n action: () => controller.clearFilters(),\n },\n ].filter(isNonNullable),\n },\n {\n name: 'Pivot',\n subMenu: [\n ...(column &&\n columnName &&\n columnConfiguration?.kind === DataCubeColumnKind.DIMENSION &&\n controller.getVerticalPivotableColumn(columnName)\n ? [\n {\n name: `Vertical Pivot on ${columnName}`,\n action: () => controller.setVerticalPivotOnColumn(columnName),\n },\n {\n name: `Add Vertical Pivot on ${columnName}`,\n disabled: Boolean(controller.verticalPivotColumns.find((col) => col.name === columnName)),\n action: () => controller.addVerticalPivotOnColumn(columnName),\n },\n {\n name: `Remove Vertical Pivot on ${columnName}`,\n disabled: !controller.verticalPivotColumns.find((col) => col.name === columnName),\n action: () => controller.removeVerticalPivotOnColumn(columnName),\n },\n 'separator',\n ]\n : []),\n ...(column &&\n columnName &&\n columnConfiguration?.kind === DataCubeColumnKind.DIMENSION &&\n controller.getHorizontalPivotableColumn(columnName)\n ? [\n {\n name: `Horizontal Pivot on ${columnName}`,\n action: () => controller.setHorizontalPivotOnColumn(columnName),\n },\n {\n name: `Add Horizontal Pivot on ${columnName}`,\n disabled: Boolean(controller.horizontalPivotColumns.find((col) => col.name === columnName)),\n action: () => controller.addHorizontalPivotOnColumn(columnName),\n },\n 'separator',\n ]\n : []),\n ...(column &&\n columnName &&\n baseColumnConfiguration?.kind === DataCubeColumnKind.MEASURE &&\n !baseColumnConfiguration.excludedFromPivot &&\n controller.horizontalPivotColumns.length !== 0 // pivot must be active\n ? [\n {\n name: `Exclude Column ${baseColumnConfiguration.name} from Horizontal Pivot`,\n action: () => controller.excludeColumnFromHorizontalPivot(columnName),\n },\n 'separator',\n ]\n : []),\n ...(column &&\n columnName &&\n columnConfiguration?.kind === DataCubeColumnKind.MEASURE &&\n columnConfiguration.excludedFromPivot &&\n controller.horizontalPivotColumns.length !== 0 // pivot must be active\n ? [\n {\n name: `Include Column ${columnName} in Horizontal Pivot`,\n action: () => controller.includeColumnInHorizontalPivot(columnName),\n },\n 'separator',\n ]\n : []),\n {\n name: `Clear All Vertical Pivots`,\n disabled: controller.verticalPivotColumns.length === 0,\n action: () => controller.clearAllVerticalPivots(),\n },\n {\n name: `Clear All Horizontal Pivots`,\n disabled: controller.horizontalPivotColumns.length === 0,\n action: () => controller.clearAllHorizontalPivots(),\n },\n ],\n },\n {\n name: 'Extended Columns',\n subMenu: [\n {\n name: `Add New Column...`,\n action: () => {\n extend\n .openNewColumnEditor()\n .catch((error) => engine.alertUnhandledError(error));\n },\n },\n ...(columnConfiguration && columnName\n ? [\n {\n name: `Extend Column ${columnName}...`,\n action: () => {\n extend\n .openNewColumnEditor(columnConfiguration)\n .catch((error) => engine.alertUnhandledError(error));\n },\n },\n ]\n : []),\n ...(isExtendedColumn\n ? [\n 'separator',\n {\n name: `Edit Column ${columnName}...`,\n action: () => {\n extend\n .openExistingColumnEditor(columnName)\n .catch((error) => engine.alertUnhandledError(error));\n },\n },\n {\n name: `Delete Column ${columnName}`,\n action: () => {\n extend\n .deleteColumn(columnName)\n .catch((error) => engine.alertUnhandledError(error));\n },\n },\n ]\n : []),\n ],\n },\n 'separator',\n {\n name: 'Resize',\n subMenu: [\n {\n name: `Auto-size to Fit Content`,\n disabled: !column ||\n !columnConfiguration ||\n columnConfiguration.fixedWidth !== undefined,\n action: () => params.api.autoSizeColumns([column?.getColId()].filter(isNonNullable)),\n },\n {\n name: `Minimize Column`,\n disabled: !column ||\n !columnConfiguration ||\n columnConfiguration.fixedWidth !== undefined,\n action: () => {\n if (column && columnConfiguration) {\n params.api.setColumnWidths([\n {\n key: columnConfiguration.name,\n newWidth: columnConfiguration.minWidth ?? DEFAULT_COLUMN_MIN_WIDTH,\n },\n ]);\n }\n },\n },\n 'separator',\n {\n name: `Auto-size All Columns`,\n action: () => params.api.autoSizeColumns([\n ...controller.configuration.columns\n .filter((col) => col.fixedWidth === undefined &&\n col.isSelected &&\n !col.hideFromView)\n .map((col) => col.name),\n ...controller.horizontalPivotCastColumns\n .map((col) => {\n if (isPivotResultColumnName(col.name)) {\n const colConf = controller.configuration.columns.find((c) => c.name ===\n getPivotResultColumnBaseColumnName(col.name));\n if (colConf &&\n colConf.fixedWidth === undefined &&\n colConf.isSelected &&\n !colConf.hideFromView) {\n return col.name;\n }\n }\n return undefined;\n })\n .filter(isNonNullable),\n ]),\n },\n {\n name: `Minimize All Columns`,\n action: () => {\n params.api.setColumnWidths([\n ...controller.configuration.columns\n .filter((col) => col.fixedWidth === undefined)\n .map((col) => ({\n key: col.name,\n newWidth: columnConfiguration?.minWidth ?? DEFAULT_COLUMN_MIN_WIDTH,\n })),\n ...controller.horizontalPivotCastColumns\n .map((col) => {\n if (isPivotResultColumnName(col.name)) {\n const colConf = controller.configuration.columns.find((c) => c.name ===\n getPivotResultColumnBaseColumnName(col.name));\n if (colConf &&\n colConf.fixedWidth === undefined &&\n colConf.isSelected &&\n !colConf.hideFromView) {\n return {\n key: col.name,\n newWidth: colConf.minWidth ?? DEFAULT_COLUMN_MIN_WIDTH,\n };\n }\n }\n return undefined;\n })\n .filter(isNonNullable),\n ]);\n },\n },\n {\n name: `Size Grid to Fit Screen`,\n action: () => params.api.sizeColumnsToFit(),\n },\n ],\n },\n {\n name: 'Pin',\n subMenu: [\n ...(columnConfiguration\n ? [\n {\n name: `Pin Left`,\n disabled: !column || column.isPinnedLeft(),\n checked: Boolean(column?.isPinnedLeft()),\n action: () => controller.pinColumn(columnName, DataCubeColumnPinPlacement.LEFT),\n },\n {\n name: `Pin Right`,\n disabled: !column || column.isPinnedRight(),\n checked: Boolean(column?.isPinnedRight()),\n action: () => controller.pinColumn(columnName, DataCubeColumnPinPlacement.RIGHT),\n },\n {\n name: `Unpin`,\n disabled: !column?.isPinned(),\n action: () => controller.pinColumn(columnName, undefined),\n },\n 'separator',\n ]\n : []),\n {\n name: `Remove All Pinnings`,\n disabled: controller.configuration.columns.every((col) => col.pinned === undefined),\n action: () => controller.removeAllPins(),\n },\n ],\n },\n {\n name: 'Hide',\n disabled: !columnConfiguration,\n action: () => controller.showColumn(columnName, false),\n },\n ...(columnName === INTERNAL__GRID_CLIENT_TREE_COLUMN_ID\n ? [\n 'separator',\n {\n name: 'Collapse All',\n action: () => {\n controller.collapseAllPaths();\n },\n },\n ]\n : []),\n 'separator',\n {\n name: 'Heatmap',\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: !column,\n subMenu: column\n ? [\n {\n name: `Add to ${column.getColId()}`,\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: true,\n },\n {\n name: `Remove from ${column.getColId()}`,\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: true,\n },\n ]\n : [],\n },\n {\n name: 'Show Plot...',\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: true,\n },\n {\n name: 'Show TreeMap...',\n menuItem: WIP_GridMenuItem,\n cssClasses: ['!opacity-100'],\n disabled: true,\n },\n 'separator',\n {\n name: 'Properties...',\n disabled: editor.display.isOpen,\n action: () => {\n // open the column property\n if (column && fromHeader) {\n editor.setCurrentTab(DataCubeEditorTab.COLUMN_PROPERTIES);\n editor.columnProperties.setSelectedColumnName(baseColumnConfiguration?.name ??\n columnConfiguration?.name ??\n columnName);\n }\n editor.display.open();\n },\n },\n ];\n };\n}\n//# sourceMappingURL=DataCubeGridMenuBuilder.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { guaranteeNonNullable, isNonNullable, uniq, uniqBy, } from '@finos/legend-shared';\nimport { DataCubeConfiguration } from '../../core/models/DataCubeConfiguration.js';\nimport {} from '../../core/DataCubeQuerySnapshot.js';\nimport { _toCol, } from '../../core/models/DataCubeColumn.js';\nimport { DataCubeQuerySnapshotController } from '../DataCubeQuerySnapshotManager.js';\nimport { DataCubeColumnKind, DataCubeQueryFilterGroupOperator, isPivotResultColumnName, getPivotResultColumnBaseColumnName, } from '../../core/DataCubeQueryEngine.js';\nimport { generateMenuBuilder } from './DataCubeGridMenuBuilder.js';\nimport { buildFilterEditorTree, buildFilterQuerySnapshot, DataCubeFilterEditorConditionGroupTreeNode, } from '../../core/filter/DataCubeQueryFilterEditorState.js';\nimport { _pruneExpandedPaths } from '../../core/DataCubeQuerySnapshotBuilderUtils.js';\n/**\n * This query editor state is responsible for capturing updates to the data cube query\n * caused by interactions with the grid which are either not captured by the server-side row model\n * datasource, e.g. column pinning, column visibility changes, etc or done programatically via grid\n * context menu. Think of this as a companion state for grid editor which bridges the gap between\n * ag-grid state and data cube query state.\n *\n * More technically, this handles interactions that result in instant (not batched) change to the query.\n * For example, in the editor, users can make changes to multiple parts of the query, but until they are\n * explicit applied, these changes will not impact the query; whereas here a change immediately take effect.\n *\n * NOTE: since typically, each grid action causes a new snapshot to be created,\n * we MUST NEVER use the editor here, as it could potentially create illegal state\n * while the editor is still in the middle of a modification that has not been applied.\n */\nexport class DataCubeGridControllerState extends DataCubeQuerySnapshotController {\n configuration = new DataCubeConfiguration();\n menuBuilder;\n getColumnConfiguration(colName) {\n return this.configuration.columns.find((col) => col.name === colName);\n }\n // --------------------------------- FILTER ---------------------------------\n filterTree = {\n nodes: new Map(),\n };\n /**\n * Add a new filter condition to the root of the filter tree.\n * 1. If the root is empty, add a new AND group with the condition as the root\n * 2. If the root is an AND group, add the condition to the root\n * 3. If the root is an OR group, create a new AND group with the condition and\n * wrapping the current root and set that as the new root\n */\n addNewFilterCondition(condition) {\n if (!this.filterTree.root) {\n const root = new DataCubeFilterEditorConditionGroupTreeNode(undefined, DataCubeQueryFilterGroupOperator.AND, undefined);\n this.filterTree.nodes.set(root.uuid, root);\n this.filterTree.root = root;\n root.addChild(condition);\n this.filterTree.nodes.set(condition.uuid, condition);\n }\n else if (this.filterTree.root.operation === DataCubeQueryFilterGroupOperator.AND) {\n this.filterTree.root.addChild(condition);\n this.filterTree.nodes.set(condition.uuid, condition);\n }\n else {\n // Normally, for this case, we just wrap the current root with a new AND group\n // but if the current (OR group) root has only 1 condition (this is only allowed\n // if the group is root), we can just simply change the group operator to AND\n const currentRoot = this.filterTree.root;\n if (currentRoot.children.length === 1) {\n currentRoot.operation = DataCubeQueryFilterGroupOperator.AND;\n currentRoot.addChild(condition);\n this.filterTree.nodes.set(condition.uuid, condition);\n }\n else {\n const newRoot = new DataCubeFilterEditorConditionGroupTreeNode(undefined, DataCubeQueryFilterGroupOperator.AND, undefined);\n this.filterTree.nodes.set(newRoot.uuid, newRoot);\n this.filterTree.root = newRoot;\n newRoot.addChild(currentRoot);\n newRoot.addChild(condition);\n this.filterTree.nodes.set(condition.uuid, condition);\n }\n }\n this.applyChanges();\n }\n clearFilters() {\n this.filterTree.root = undefined;\n this.filterTree.nodes = new Map();\n this.applyChanges();\n }\n // --------------------------------- COLUMNS ---------------------------------\n selectColumns = [];\n leafExtendedColumns = [];\n groupExtendedColumns = [];\n pinColumn(colName, placement) {\n const columnConfiguration = this.getColumnConfiguration(colName);\n if (columnConfiguration) {\n columnConfiguration.pinned = placement;\n this.applyChanges();\n }\n }\n rearrangeColumns(columns) {\n const rearrangedColumnConfigurations = columns\n .map((colName) => this.getColumnConfiguration(colName))\n .filter(isNonNullable);\n this.configuration.columns = [\n ...rearrangedColumnConfigurations,\n ...this.configuration.columns.filter((col) => !rearrangedColumnConfigurations.includes(col)),\n ];\n const rearrangedSelectColumns = columns\n .map((colName) => this.selectColumns.find((col) => col.name === colName))\n .filter(isNonNullable);\n this.selectColumns = [\n ...rearrangedSelectColumns,\n ...rearrangedSelectColumns.filter((col) => !rearrangedSelectColumns.includes(col)),\n ];\n this.applyChanges();\n }\n removeAllPins() {\n this.configuration.columns.forEach((col) => (col.pinned = undefined));\n this.applyChanges();\n }\n showColumn(colName, isVisible) {\n const columnConfiguration = this.getColumnConfiguration(colName);\n if (columnConfiguration) {\n columnConfiguration.hideFromView = !isVisible;\n this.applyChanges();\n }\n }\n // --------------------------------- PIVOT ---------------------------------\n horizontalPivotColumns = [];\n horizontalPivotCastColumns = [];\n get horizontalPivotResultColumns() {\n return this.horizontalPivotCastColumns\n .filter((col) => isPivotResultColumnName(col.name))\n .map(_toCol);\n }\n getHorizontalPivotableColumn(colName) {\n return this.configuration.columns\n .filter((col) => col.kind === DataCubeColumnKind.DIMENSION &&\n // exclude group-level extended columns\n !this.groupExtendedColumns.find((column) => column.name === col.name))\n .find((col) => col.name === colName);\n }\n setHorizontalPivotOnColumn(colName) {\n const column = this.getHorizontalPivotableColumn(colName);\n if (column) {\n this.horizontalPivotColumns = [column];\n this.applyChanges();\n }\n }\n addHorizontalPivotOnColumn(colName) {\n const column = this.getHorizontalPivotableColumn(colName);\n if (column) {\n this.horizontalPivotColumns = [...this.horizontalPivotColumns, column];\n this.applyChanges();\n }\n }\n clearAllHorizontalPivots() {\n this.horizontalPivotColumns = [];\n this.horizontalPivotCastColumns = [];\n this.applyChanges();\n }\n excludeColumnFromHorizontalPivot(colName) {\n if (isPivotResultColumnName(colName)) {\n const baseColumnName = getPivotResultColumnBaseColumnName(colName);\n const columnConfiguration = this.getColumnConfiguration(baseColumnName);\n if (columnConfiguration && !columnConfiguration.excludedFromPivot) {\n columnConfiguration.excludedFromPivot = true;\n this.applyChanges();\n }\n }\n }\n includeColumnInHorizontalPivot(colName) {\n const columnConfiguration = this.getColumnConfiguration(colName);\n if (columnConfiguration?.excludedFromPivot) {\n columnConfiguration.excludedFromPivot = false;\n this.applyChanges();\n }\n }\n // --------------------------------- GROUP BY ---------------------------------\n verticalPivotColumns = [];\n getVerticalPivotableColumn(colName) {\n return this.configuration.columns\n .filter((col) => col.kind === DataCubeColumnKind.DIMENSION &&\n // exclude group-level extended columns\n !this.groupExtendedColumns.find((column) => column.name === col.name) &&\n // exclude pivot columns\n !this.horizontalPivotColumns.find((column) => column.name === col.name))\n .find((col) => col.name === colName);\n }\n setVerticalPivotOnColumn(colName) {\n const column = this.getVerticalPivotableColumn(colName);\n if (column) {\n this.verticalPivotColumns = [column];\n this.applyChanges();\n }\n }\n addVerticalPivotOnColumn(colName) {\n const column = this.getVerticalPivotableColumn(colName);\n if (column) {\n this.verticalPivotColumns = [...this.verticalPivotColumns, column];\n this.applyChanges();\n }\n }\n removeVerticalPivotOnColumn(colName) {\n this.verticalPivotColumns = this.verticalPivotColumns.filter((col) => col.name !== colName);\n this.applyChanges();\n }\n clearAllVerticalPivots() {\n this.verticalPivotColumns = [];\n this.applyChanges();\n }\n collapseAllPaths() {\n this.view.grid.client.collapseAll();\n this.configuration.pivotLayout.expandedPaths = [];\n this.applyChanges();\n }\n expandPath(path) {\n this.configuration.pivotLayout.expandedPaths = uniq([\n ...this.configuration.pivotLayout.expandedPaths,\n path,\n ]).sort();\n this.applyChanges();\n }\n collapsePath(path) {\n this.configuration.pivotLayout.expandedPaths =\n this.configuration.pivotLayout.expandedPaths.filter((p) => p !== path);\n this.applyChanges();\n }\n // --------------------------------- SORT ---------------------------------\n sortColumns = [];\n getSortableColumn(colName) {\n if (!colName) {\n return undefined;\n }\n return [\n ...(this.horizontalPivotCastColumns.length\n ? this.horizontalPivotCastColumns\n : this.selectColumns),\n ...this.groupExtendedColumns,\n ].find((col) => col.name === colName);\n }\n setSortByColumn(colName, direction) {\n const column = this.getSortableColumn(colName);\n if (!column) {\n return;\n }\n this.sortColumns = [\n {\n ...column,\n direction,\n },\n ];\n this.applyChanges();\n }\n addSortByColumn(colName, direction) {\n const column = this.getSortableColumn(colName);\n if (!column) {\n return;\n }\n this.sortColumns = [...this.sortColumns, { ...column, direction }];\n this.applyChanges();\n }\n clearSortByColumn(colName) {\n this.sortColumns = this.sortColumns.filter((col) => col.name !== colName);\n this.applyChanges();\n }\n clearAllSorts() {\n this.sortColumns = [];\n this.applyChanges();\n }\n // --------------------------------- MAIN ---------------------------------\n getSnapshotSubscriberName() {\n return 'grid-controller';\n }\n async applySnapshot(snapshot, previousSnapshot) {\n this.configuration = DataCubeConfiguration.serialization.fromJson(snapshot.data.configuration);\n this.filterTree.nodes = new Map();\n this.filterTree.root = snapshot.data.filter\n ? buildFilterEditorTree(snapshot.data.filter, undefined, this.filterTree.nodes, (operator) => this.view.engine.getFilterOperation(operator))\n : undefined;\n this.selectColumns = snapshot.data.selectColumns;\n this.leafExtendedColumns = snapshot.data.leafExtendedColumns;\n this.groupExtendedColumns = snapshot.data.groupExtendedColumns;\n this.horizontalPivotColumns = snapshot.data.pivot?.columns ?? [];\n this.horizontalPivotCastColumns = snapshot.data.pivot?.castColumns ?? [];\n this.verticalPivotColumns = snapshot.data.groupBy?.columns ?? [];\n this.sortColumns = snapshot.data.sortColumns;\n this.menuBuilder = generateMenuBuilder(this);\n }\n propagateChanges(baseSnapshot) {\n this.verticalPivotColumns = this.verticalPivotColumns.filter((col) => !this.horizontalPivotColumns.find((column) => column.name === col.name));\n this.configuration.pivotLayout.expandedPaths = _pruneExpandedPaths(baseSnapshot.data.groupBy?.columns ?? [], this.verticalPivotColumns, this.configuration.pivotLayout.expandedPaths);\n this.selectColumns = uniqBy([\n ...this.configuration.columns.filter((col) => col.isSelected &&\n !this.groupExtendedColumns.find((column) => column.name === col.name)),\n ...this.horizontalPivotColumns,\n ...this.verticalPivotColumns,\n ], (col) => col.name).map(_toCol);\n const sortableColumns = uniqBy([\n // if pivot is active, take the pivot result columns and include\n // selected dimension columns which are not part of pivot columns\n ...(this.horizontalPivotColumns.length\n ? [\n ...this.horizontalPivotResultColumns,\n ...[\n ...this.configuration.columns.filter((col) => col.isSelected),\n ...this.verticalPivotColumns,\n ].filter((column) => this.getColumnConfiguration(column.name)?.kind ===\n DataCubeColumnKind.DIMENSION &&\n !this.horizontalPivotColumns.find((col) => col.name === column.name)),\n ]\n : [\n ...this.configuration.columns.filter((col) => col.isSelected),\n ...this.verticalPivotColumns,\n ]),\n ...this.groupExtendedColumns,\n ], (col) => col.name);\n this.sortColumns = this.sortColumns.filter((col) => sortableColumns.find((column) => column.name === col.name));\n }\n applyChanges() {\n const baseSnapshot = guaranteeNonNullable(this.getLatestSnapshot());\n const snapshot = baseSnapshot.clone();\n this.propagateChanges(baseSnapshot);\n snapshot.data.configuration = this.configuration.serialize();\n snapshot.data.filter = this.filterTree.root\n ? buildFilterQuerySnapshot(this.filterTree.root)\n : undefined;\n snapshot.data.selectColumns = this.selectColumns;\n snapshot.data.pivot = this.horizontalPivotColumns.length\n ? {\n columns: this.horizontalPivotColumns,\n castColumns: this.horizontalPivotCastColumns,\n }\n : undefined;\n snapshot.data.groupBy = this.verticalPivotColumns.length\n ? {\n columns: this.verticalPivotColumns,\n }\n : undefined;\n snapshot.data.sortColumns = this.sortColumns;\n snapshot.finalize();\n if (snapshot.hashCode !== baseSnapshot.hashCode) {\n this.publishSnapshot(snapshot);\n }\n }\n}\n//# sourceMappingURL=DataCubeGridControllerState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ContentType, downloadFileUsingDataURI, formatDate, IllegalStateError, isString, UnsupportedOperationError, } from '@finos/legend-shared';\nimport { DataCubeGridClientExportFormat } from './DataCubeGridClientEngine.js';\nfunction blobToBase64(blob) {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onloadend = () => {\n const result = reader.result;\n if (isString(result)) {\n const base64Data = result.split(',')[1];\n if (base64Data) {\n resolve(base64Data);\n return;\n }\n }\n reject(new Error(`Can't base64 encode blob data`));\n };\n reader.onerror = (error) => reject(error);\n reader.readAsDataURL(blob);\n });\n}\nconst EMAIL_TEXT_CONTENT = '';\nconst EMAIL_HTML_CONTENT = `<html><body><p>${EMAIL_TEXT_CONTENT}</p><body></html>`;\n// See https://stackoverflow.com/questions/3902455/mail-multipart-alternative-vs-multipart-mixed\nconst EMAIL_MIXED_BOUNDARY = 'mixed_boundary';\nconst EMAIL_ALTERNATIVE_BOUNDARY = 'alternative_boundary';\nconst EMAIL_CONTENT = `\nFrom:\nTo:\nSubject:\nX-Unsent: 1\nContent-Type: multipart/mixed; boundary=\"${EMAIL_MIXED_BOUNDARY}\"\n\n--${EMAIL_MIXED_BOUNDARY}\nContent-Type: multipart/alternative; boundary=\"${EMAIL_ALTERNATIVE_BOUNDARY}\"\n\n--${EMAIL_ALTERNATIVE_BOUNDARY}\nContent-Type: text/plain; charset=\"UTF-8\"\nContent-Transfer-Encoding: 7bit\n\n${EMAIL_TEXT_CONTENT}\n\n--${EMAIL_ALTERNATIVE_BOUNDARY}\nContent-Type: text/html; charset=\"UTF-8\"\nContent-Transfer-Encoding: 7bit\n\n${EMAIL_HTML_CONTENT}\n\n--${EMAIL_ALTERNATIVE_BOUNDARY}--\n\n`;\n/**\n * NOTE: this is a client-side export engine, this will and should eventually be replaced by a\n * server-side export engine which is more standardized and scalable.\n */\nexport class DataCubeGridClientExportEngine {\n view;\n grid;\n constructor(grid) {\n this.view = grid.view;\n this.grid = grid;\n }\n generateFileName() {\n return `${this.grid.queryConfiguration.name} - ${formatDate(new Date(), 'EEE MMM dd yyyy HH_mm_ss')}`;\n }\n exportFile(format) {\n const fileName = this.generateFileName();\n switch (format) {\n case DataCubeGridClientExportFormat.CSV: {\n this.grid.client.exportDataAsCsv({\n fileName: `${fileName}.csv`,\n });\n return;\n }\n case DataCubeGridClientExportFormat.EXCEL: {\n // TODO?: configure settings for Excel export so we can export styling as well\n // See https://www.ag-grid.com/angular-data-grid/excel-export-styles/\n this.grid.client.exportDataAsExcel({\n fileName: `${fileName}.xlsx`,\n });\n return;\n }\n default:\n // do nothing\n }\n }\n async exportEmail(format) {\n const fileName = this.generateFileName();\n let fileNameWithExtension = fileName;\n let attachment;\n let contentType;\n switch (format) {\n case DataCubeGridClientExportFormat.CSV: {\n fileNameWithExtension = `${fileName}.csv`;\n contentType = ContentType.TEXT_CSV;\n attachment = await blobToBase64(new Blob([this.grid.client.getDataAsCsv() ?? ''], {\n type: ContentType.TEXT_CSV,\n }));\n break;\n }\n case DataCubeGridClientExportFormat.EXCEL: {\n fileNameWithExtension += `${fileName}.xlsx`;\n contentType = ContentType.APPLICATION_XLSX;\n // TODO?: configure settings for Excel export so we can export styling as well\n // See https://www.ag-grid.com/angular-data-grid/excel-export-styles/\n const xlsxContent = this.grid.client.getDataAsExcel();\n let xlsxBlob;\n if (xlsxContent instanceof Blob) {\n xlsxBlob = xlsxContent;\n }\n else if (typeof xlsxContent === 'string') {\n xlsxBlob = new Blob([xlsxContent], {\n type: ContentType.APPLICATION_XLSX,\n });\n }\n else {\n throw new IllegalStateError(`Can't export Excel content`);\n }\n attachment = await blobToBase64(xlsxBlob);\n break;\n }\n default:\n throw new UnsupportedOperationError(`Can't export email in format '${format}'`);\n }\n downloadFileUsingDataURI(`${fileName}.eml`, \n // NOTE: empty lines before email content can cause some mail client to not\n // recognize the email content, e.g. Outlook\n `${EMAIL_CONTENT.trimStart()}--${EMAIL_MIXED_BOUNDARY}\\n` +\n `Content-Type: ${contentType}; name=\"${fileNameWithExtension}\"\\n` +\n `Content-Transfer-Encoding: base64\\n` +\n `Content-Disposition: attachment; filename=\"${fileNameWithExtension}\"\\n\\n` +\n `${attachment}\\n\\n` +\n `--${EMAIL_MIXED_BOUNDARY}--`, \n // This MIME type here might not matter\n ContentType.MESSAGE_RFC822);\n }\n}\n//# sourceMappingURL=DataCubeGridClientExportEngine.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { guaranteeNonNullable } from '@finos/legend-shared';\nimport { action, makeObservable, observable } from 'mobx';\nimport { DataCubeGridClientServerSideDataSource, INTERNAL__GRID_CLIENT_DEFAULT_CACHE_BLOCK_SIZE, INTERNAL__GRID_CLIENT_DATA_FETCH_MANUAL_TRIGGER_COLUMN_ID, INTERNAL__GRID_CLIENT_MAX_CACHE_BLOCK_SIZE, INTERNAL__GRID_CLIENT_DEFAULT_ENABLE_PAGINATION, computeHashCodeForDataFetchManualTrigger, } from './DataCubeGridClientEngine.js';\nimport { DataCubeQuerySnapshotController } from '../DataCubeQuerySnapshotManager.js';\nimport { generateGridOptionsFromSnapshot } from './DataCubeGridConfigurationBuilder.js';\nimport { DataCubeConfiguration } from '../../core/models/DataCubeConfiguration.js';\nimport { DataCubeGridControllerState } from './DataCubeGridControllerState.js';\nimport { DataCubeGridClientExportEngine } from './DataCubeGridClientExportEngine.js';\n/**\n * This query editor state is responsible for syncing the internal state of ag-grid\n * server-side row model data source with the data cube query state. When new snapshot\n * is published, this editor will translate parts of the snapshot into ag-grid grid\n * configuration to update; on the other hand, when the grid is interacted with in a way\n * that impacts the data state of the server-side row model datasource (e.g. filter, sort\n * pivot, etc.), getRows() is called, a new snapshot is published.\n * See https://www.ag-grid.com/javascript-data-grid/server-side-model-datasource/#implementing-the-server-side-datasource\n *\n * NOTE: The server-side row model data source state is not 1-1 with data cube query state\n * so we need the {@link DataCubeGridControllerState} to bridge this gap. For example,\n * interactions like column pinning, column resizing, etc. are not handled by server-side\n * row model datasource, so without the companion grid controller, these changes will not\n * trigger publishing a new snapshot, hence not propagated.\n */\nexport class DataCubeGridState extends DataCubeQuerySnapshotController {\n controller;\n exportEngine;\n _client;\n clientDataSource;\n queryConfiguration;\n rowLimit;\n isPaginationEnabled = INTERNAL__GRID_CLIENT_DEFAULT_ENABLE_PAGINATION;\n scrollHintText;\n constructor(view) {\n super(view);\n makeObservable(this, {\n clientDataSource: observable,\n queryConfiguration: observable.ref,\n rowLimit: observable,\n isPaginationEnabled: observable,\n setPaginationEnabled: action,\n scrollHintText: observable,\n setScrollHintText: action,\n applySnapshot: action,\n });\n this.controller = new DataCubeGridControllerState(this.view);\n this.exportEngine = new DataCubeGridClientExportEngine(this);\n this.queryConfiguration = new DataCubeConfiguration();\n this.clientDataSource = new DataCubeGridClientServerSideDataSource(this);\n }\n setPaginationEnabled(val) {\n this.isPaginationEnabled = val;\n // hard reset the grid, this will force the grid to fetch data again\n // NOTE: if we don't fully reset the datasource, and say we just turned on pagination,\n // for how many page that we loaded when pagination is off, the datasource\n // will fire that many data fetch operations which is expensive.\n this.clientDataSource = new DataCubeGridClientServerSideDataSource(this);\n // NOTE: ag-grid uses the cache block size as page size, so it's important to set this\n // in corresponding to the pagination setting, else it would cause unexpected scrolling behavior\n this.client.updateGridOptions({\n cacheBlockSize: val\n ? INTERNAL__GRID_CLIENT_DEFAULT_CACHE_BLOCK_SIZE\n : INTERNAL__GRID_CLIENT_MAX_CACHE_BLOCK_SIZE,\n });\n }\n setScrollHintText(val) {\n this.scrollHintText = val;\n }\n get client() {\n return guaranteeNonNullable(this._client, 'Grid client is not configured');\n }\n configureClient(val) {\n this._client = val;\n }\n getSnapshotSubscriberName() {\n return 'grid';\n }\n async applySnapshot(snapshot, previousSnapshot) {\n const configuration = DataCubeConfiguration.serialization.fromJson(snapshot.data.configuration);\n this.queryConfiguration = configuration;\n this.rowLimit = snapshot.data.limit;\n const gridOptions = generateGridOptionsFromSnapshot(snapshot, configuration, this.view);\n if (this.view.dataCube.settings.enableDebugMode) {\n this.view.engine.debugProcess(`New Grid Options`, [\n 'Grid Options',\n gridOptions,\n ]);\n }\n this.client.updateGridOptions({\n ...gridOptions,\n rowBuffer: this.view.dataCube.settings.gridClientRowBuffer,\n // NOTE: ag-grid uses the cache block size as page size, so it's important to set this\n // in corresponding to the pagination setting, else it would cause unexpected scrolling behavior\n cacheBlockSize: this.isPaginationEnabled\n ? INTERNAL__GRID_CLIENT_DEFAULT_CACHE_BLOCK_SIZE\n : INTERNAL__GRID_CLIENT_MAX_CACHE_BLOCK_SIZE,\n });\n // NOTE: when there are changes that affect the data query specification but cannot be captured\n // in the grid client options, we will need to manually trigger data fetching by updating the\n // following hash code which is computed from those parts of the new snapshot then making use of\n // the filter configuration mechanism to trigger getRows() method of server-side row model data source\n this.client.setFilterModel({\n [INTERNAL__GRID_CLIENT_DATA_FETCH_MANUAL_TRIGGER_COLUMN_ID]: {\n type: 'equals',\n filter: computeHashCodeForDataFetchManualTrigger(snapshot, configuration),\n },\n });\n }\n}\n//# sourceMappingURL=DataCubeGridState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { action, makeObservable, observable } from 'mobx';\nimport { DataCubeQuerySnapshotController } from './DataCubeQuerySnapshotManager.js';\nimport { DataCubeConfiguration } from '../core/models/DataCubeConfiguration.js';\n/**\n * Unlike other query editor state, this state does not support making any\n * modification to the query, it simplies subscribe to extract information\n * from the latest snapshot to help display latest static info about the query.\n */\nexport class DataCubeInfoState extends DataCubeQuerySnapshotController {\n name = '';\n // TODO: filter preview text\n constructor(view) {\n super(view);\n makeObservable(this, {\n name: observable,\n applySnapshot: action,\n });\n }\n getSnapshotSubscriberName() {\n return 'info';\n }\n async applySnapshot(snapshot, previousSnapshot) {\n const data = snapshot.data;\n const configuration = DataCubeConfiguration.serialization.fromJson(data.configuration);\n if (configuration.name !== this.name) {\n this.name = configuration.name;\n // TODO: make sure we only call this for the main view of data cube when we support multi views\n this.view.dataCube.onNameChanged?.(this.name, this.view.source);\n }\n // TODO: filter preview text\n }\n}\n//# sourceMappingURL=DataCubeInfoState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { IllegalStateError, hashObject, pruneObject, uuid, } from '@finos/legend-shared';\nexport class DataCubeQuerySnapshot {\n uuid = uuid();\n data;\n _isPatchChange = false;\n _finalized = false;\n _hashCode;\n constructor(configuration) {\n this.data = {\n configuration,\n sourceColumns: [],\n leafExtendedColumns: [],\n selectColumns: [],\n filter: undefined,\n groupBy: undefined,\n pivot: undefined,\n groupExtendedColumns: [],\n sortColumns: [],\n limit: undefined,\n };\n }\n static create(configuration) {\n return new DataCubeQuerySnapshot(configuration);\n }\n /**\n * When we support undo/redo, patch changes should be grouped\n * together with the most recent non-patch change snapshot and treated\n * as a single step.\n *\n * e.g. if we have a stack of snapshots [A, B, C, D] where D is the current\n * snapshot and C is a patch change. When undo, we should go back to C.\n * When undo again, we should go back to A instead of B.\n */\n markAsPatchChange() {\n this._isPatchChange = true;\n }\n isPatchChange() {\n return this._isPatchChange;\n }\n isFinalized() {\n return this._finalized;\n }\n finalize() {\n if (this._finalized) {\n return this;\n }\n /**\n * NOTE: if this becomes a performance bottleneck, we can consider\n * more granular hashing strategy\n *\n * Here, we are just hashing the raw object, but we must ensure\n * to properly prune the snapshot data object before hashing\n * else there would be mismatch\n */\n this._hashCode = hashObject(pruneObject(this.data));\n this._finalized = true;\n return this;\n }\n get hashCode() {\n if (!this._finalized || !this._hashCode) {\n throw new IllegalStateError('Snapshot is not finalized');\n }\n return this._hashCode;\n }\n clone() {\n const clone = new DataCubeQuerySnapshot({});\n clone.data = JSON.parse(JSON.stringify(this.data));\n return clone;\n }\n /**\n * Only use this if an absolute identical clone is needed.\n * This should rarely be used, and ideally by core engine only.\n */\n INTERNAL__fullClone() {\n const clone = new DataCubeQuerySnapshot({});\n clone.uuid = this.uuid;\n clone.data = JSON.parse(JSON.stringify(this.data));\n clone._isPatchChange = this._isPatchChange;\n clone._finalized = this._finalized;\n clone._hashCode = this._hashCode;\n return clone;\n }\n}\n//# sourceMappingURL=DataCubeQuerySnapshot.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/***************************************************************************************\n * [CORE]\n *\n * This and its corresponding utilitites are used to build the query snapshot from the\n * executable query. This is needed when we initialize the engine by loading a\n * persisted query.\n ***************************************************************************************/\nimport { V1_AppliedFunction, V1_CInteger, V1_Collection, extractElementNameFromPath as _name, matchFunctionName, } from '@finos/legend-graph';\nimport { DataCubeQuerySnapshot } from './DataCubeQuerySnapshot.js';\nimport { _toCol } from './models/DataCubeColumn.js';\nimport { assertType, guaranteeNonNullable } from '@finos/legend-shared';\nimport { DataCubeQuerySortDirection, DataCubeFunction, } from './DataCubeQueryEngine.js';\nimport { DataCubeConfiguration } from './models/DataCubeConfiguration.js';\nimport { buildDefaultConfiguration } from './DataCubeConfigurationBuilder.js';\nimport { _colSpecArrayParam, _colSpecParam, _funcMatch, _param, } from './DataCubeQuerySnapshotBuilderUtils.js';\n// --------------------------------- BUILDING BLOCKS ---------------------------------\nconst _SUPPORTED_TOP_LEVEL_FUNCTIONS = [\n { func: DataCubeFunction.EXTEND, parameters: 2 }, // support both signatures of extend()\n { func: DataCubeFunction.FILTER, parameters: 1 },\n { func: DataCubeFunction.SELECT, parameters: 1 },\n { func: DataCubeFunction.GROUP_BY, parameters: 3 },\n { func: DataCubeFunction.PIVOT, parameters: 3 },\n { func: DataCubeFunction.CAST, parameters: 1 },\n { func: DataCubeFunction.SORT, parameters: 1 },\n { func: DataCubeFunction.LIMIT, parameters: 1 },\n];\nvar _FUNCTION_SEQUENCE_COMPOSITION_PART;\n(function (_FUNCTION_SEQUENCE_COMPOSITION_PART) {\n _FUNCTION_SEQUENCE_COMPOSITION_PART[\"LEAF_EXTEND\"] = \"leaf_extend\";\n _FUNCTION_SEQUENCE_COMPOSITION_PART[\"FILTER\"] = \"filter\";\n _FUNCTION_SEQUENCE_COMPOSITION_PART[\"SELECT\"] = \"select\";\n _FUNCTION_SEQUENCE_COMPOSITION_PART[\"PIVOT__GROUP\"] = \"pivot__group\";\n _FUNCTION_SEQUENCE_COMPOSITION_PART[\"PIVOT_SORT\"] = \"pivot_sort\";\n _FUNCTION_SEQUENCE_COMPOSITION_PART[\"PIVOT\"] = \"pivot\";\n _FUNCTION_SEQUENCE_COMPOSITION_PART[\"PIVOT_CAST\"] = \"pivot_cast\";\n _FUNCTION_SEQUENCE_COMPOSITION_PART[\"GROUP_BY__GROUP\"] = \"group_by__group\";\n _FUNCTION_SEQUENCE_COMPOSITION_PART[\"GROUP_BY\"] = \"group_by\";\n _FUNCTION_SEQUENCE_COMPOSITION_PART[\"GROUP_BY_SORT\"] = \"group_by_sort\";\n _FUNCTION_SEQUENCE_COMPOSITION_PART[\"GROUP_EXTEND\"] = \"group_extend\";\n _FUNCTION_SEQUENCE_COMPOSITION_PART[\"SORT\"] = \"sort\";\n _FUNCTION_SEQUENCE_COMPOSITION_PART[\"LIMIT\"] = \"limit\";\n})(_FUNCTION_SEQUENCE_COMPOSITION_PART || (_FUNCTION_SEQUENCE_COMPOSITION_PART = {}));\n// This corresponds to the function sequence that we currently support:\n//\n// ->extend()*\n// ->filter()\n// ->select()\n// ->sort()->pivot()->cast()\n// ->groupBy()->sort()\n// ->extend()*\n// ->sort()\n// ->limit()\n//\nconst _FUNCTION_SEQUENCE_COMPOSITION_PATTERN = [\n {\n // leaf-level extend\n name: _FUNCTION_SEQUENCE_COMPOSITION_PART.LEAF_EXTEND,\n func: DataCubeFunction.EXTEND,\n repeat: true,\n },\n {\n name: _FUNCTION_SEQUENCE_COMPOSITION_PART.FILTER,\n func: DataCubeFunction.FILTER,\n },\n {\n name: _FUNCTION_SEQUENCE_COMPOSITION_PART.SELECT,\n func: DataCubeFunction.SELECT,\n },\n {\n name: _FUNCTION_SEQUENCE_COMPOSITION_PART.PIVOT__GROUP,\n funcs: [\n {\n // sort to ensure stable column ordering\n name: _FUNCTION_SEQUENCE_COMPOSITION_PART.PIVOT_SORT,\n func: DataCubeFunction.SORT,\n required: true,\n },\n {\n name: _FUNCTION_SEQUENCE_COMPOSITION_PART.PIVOT,\n func: DataCubeFunction.PIVOT,\n required: true,\n },\n {\n // cast to a relation type post pivot() to enable type-checking\n name: _FUNCTION_SEQUENCE_COMPOSITION_PART.PIVOT_CAST,\n func: DataCubeFunction.CAST,\n required: true,\n },\n ],\n },\n {\n name: _FUNCTION_SEQUENCE_COMPOSITION_PART.GROUP_BY__GROUP,\n funcs: [\n {\n name: _FUNCTION_SEQUENCE_COMPOSITION_PART.GROUP_BY,\n func: DataCubeFunction.GROUP_BY,\n required: true,\n },\n {\n // sort to ensure stable row ordering\n name: _FUNCTION_SEQUENCE_COMPOSITION_PART.GROUP_BY_SORT,\n func: DataCubeFunction.SORT,\n required: true,\n },\n ],\n },\n {\n // group-level extend\n name: _FUNCTION_SEQUENCE_COMPOSITION_PART.GROUP_EXTEND,\n func: DataCubeFunction.EXTEND,\n repeat: true,\n },\n {\n name: _FUNCTION_SEQUENCE_COMPOSITION_PART.SORT,\n func: DataCubeFunction.SORT,\n },\n {\n name: _FUNCTION_SEQUENCE_COMPOSITION_PART.LIMIT,\n func: DataCubeFunction.LIMIT,\n },\n];\nconst _FUNCTION_SEQUENCE_COMPOSITION_PATTERN_REGEXP = new RegExp(`^${_FUNCTION_SEQUENCE_COMPOSITION_PATTERN\n .map((node) => 'funcs' in node\n ? `(${node.funcs\n .map((childNode) => `(?<${childNode.name}><${_name(childNode.func)}>____\\\\d+)${childNode.repeat ? '*' : !childNode.required ? '?' : ''}`)\n .join('')})${node.repeat ? '*' : !node.required ? '?' : ''}`\n : `(?<${node.name}><${_name(node.func)}>____\\\\d+)${node.repeat ? '*' : !node.required ? '?' : ''}`)\n .join('')}$`);\n/**\n * Turn the function sequence into a map of available functions\n * for easier construction of the snapshot\n */\nfunction extractFunctionMap(query) {\n // Make sure this is a sequence of function calls\n if (!(query instanceof V1_AppliedFunction)) {\n throw new Error(`Query must be a sequence of function calls (e.g. x()->y()->z())`);\n }\n const sequence = [];\n let currentFunc = query;\n while (currentFunc instanceof V1_AppliedFunction) {\n const supportedFunc = _SUPPORTED_TOP_LEVEL_FUNCTIONS.find((spec) => matchFunctionName(currentFunc.function, spec.func));\n // Check that all functions in sequence are supported\n if (!supportedFunc) {\n throw new Error(`Found unsupported function ${currentFunc.function}()`);\n }\n if (currentFunc.parameters.length > supportedFunc.parameters) {\n const vs = currentFunc.parameters[0];\n if (!(vs instanceof V1_AppliedFunction)) {\n throw new Error(`Query must be a sequence of function calls (e.g. x()->y()->z())`);\n }\n currentFunc.parameters = currentFunc.parameters.slice(1);\n sequence.unshift(currentFunc);\n currentFunc = vs;\n }\n else {\n sequence.unshift(currentFunc);\n break;\n }\n }\n // Check that sequence follows the supported pattern\n const sequenceFormText = sequence\n .map((func, idx) => `<${_name(func.function)}>____${idx}`)\n .join('');\n const matchResult = sequenceFormText.match(_FUNCTION_SEQUENCE_COMPOSITION_PATTERN_REGEXP);\n if (!matchResult) {\n throw new Error(`Unsupported function composition ${sequence.map((fn) => `${_name(fn.function)}()`).join('->')} (supported composition: ${_FUNCTION_SEQUENCE_COMPOSITION_PATTERN.map((node) => `${'funcs' in node ? `[${node.funcs.map((childNode) => `${_name(childNode.func)}()`).join('->')}]` : `${_name(node.func)}()`}`).join('->')})`);\n }\n const _process = (key) => {\n const match = matchResult.groups?.[key];\n if (!match || match.indexOf('____') === -1) {\n return undefined;\n }\n const idx = Number(match.split('____')[1]);\n if (isNaN(idx) || idx >= sequence.length) {\n return undefined;\n }\n return sequence[idx];\n };\n return {\n leafExtend: _process(_FUNCTION_SEQUENCE_COMPOSITION_PART.LEAF_EXTEND),\n select: _process(_FUNCTION_SEQUENCE_COMPOSITION_PART.SELECT),\n filter: _process(_FUNCTION_SEQUENCE_COMPOSITION_PART.FILTER),\n pivotSort: _process(_FUNCTION_SEQUENCE_COMPOSITION_PART.PIVOT_SORT),\n pivot: _process(_FUNCTION_SEQUENCE_COMPOSITION_PART.PIVOT_CAST),\n pivotCast: _process(_FUNCTION_SEQUENCE_COMPOSITION_PART.PIVOT_CAST),\n groupBy: _process(_FUNCTION_SEQUENCE_COMPOSITION_PART.GROUP_BY),\n groupBySort: _process(_FUNCTION_SEQUENCE_COMPOSITION_PART.GROUP_BY_SORT),\n groupExtend: _process(_FUNCTION_SEQUENCE_COMPOSITION_PART.GROUP_EXTEND),\n sort: _process(_FUNCTION_SEQUENCE_COMPOSITION_PART.SORT),\n limit: _process(_FUNCTION_SEQUENCE_COMPOSITION_PART.LIMIT),\n };\n}\n// --------------------------------- MAIN ---------------------------------\n/**\n * Analyze the partial query to build a query snapshot.\n *\n * Implementation-wise, this extracts the function call sequence, then walk the\n * sequence in order to fill in the information for the snapshot.\n */\nexport function validateAndBuildQuerySnapshot(partialQuery, source, baseQuery) {\n // --------------------------------- BASE ---------------------------------\n // Build the function call sequence and the function map to make the\n // analysis more ergonomic\n const funcMap = extractFunctionMap(partialQuery);\n const snapshot = DataCubeQuerySnapshot.create({});\n const data = snapshot.data;\n const colsMap = new Map();\n const _col = (colSpec) => {\n const column = guaranteeNonNullable(colsMap.get(colSpec.name), `Can't find column '${colSpec.name}'`);\n return _toCol(column);\n };\n // --------------------------------- SOURCE ---------------------------------\n data.sourceColumns = source.sourceColumns;\n data.sourceColumns.map((col) => colsMap.set(col.name, col));\n // --------------------------------- LEAF-LEVEL EXTEND ---------------------------------\n /** TODO: @datacube roundtrip */\n // --------------------------------- FILTER ---------------------------------\n /** TODO: @datacube roundtrip */\n // --------------------------------- SELECT ---------------------------------\n if (funcMap.select) {\n data.selectColumns = _colSpecArrayParam(funcMap.select, 0).colSpecs.map((colSpec) => _col(colSpec));\n }\n // --------------------------------- PIVOT ---------------------------------\n /** TODO: @datacube roundtrip */\n // TODO: verify groupBy agg columns, pivot agg columns and configuration agree\n // --------------------------------- GROUP BY ---------------------------------\n if (funcMap.groupBy) {\n data.groupBy = {\n columns: _colSpecArrayParam(funcMap.groupBy, 0).colSpecs.map((colSpec) => _col(colSpec)),\n // TODO: verify groupBy agg columns, pivot agg columns and configuration agree\n // TODO: verify groupBy sort columns and configuration agree\n };\n }\n // --------------------------------- GROUP-LEVEL EXTEND ---------------------------------\n /** TODO: @datacube roundtrip */\n // --------------------------------- SORT ---------------------------------\n if (funcMap.sort) {\n data.sortColumns = _param(funcMap.sort, 0, V1_Collection).values.map((value) => {\n const sortColFunc = _funcMatch(value, [\n DataCubeFunction.ASCENDING,\n DataCubeFunction.DESCENDING,\n ]);\n return {\n ..._col(_colSpecParam(sortColFunc, 0)),\n direction: _name(sortColFunc.function) === DataCubeFunction.ASCENDING\n ? DataCubeQuerySortDirection.ASCENDING\n : DataCubeQuerySortDirection.DESCENDING,\n };\n });\n }\n // --------------------------------- LIMIT ---------------------------------\n if (funcMap.limit) {\n const value = funcMap.limit.parameters[0];\n assertType(value, V1_CInteger);\n data.limit = value.value;\n }\n // --------------------------------- CONFIGURATION ---------------------------------\n // NOTE: we aim to keep the data query a Pure query instead of a specification object\n // so this configuration holds mostly layout and styling customization.\n // But there are overlaps, i.e. certain data query configuration are stored in the\n // configuration, e.g. column aggregation type, this is because a column\n // aggregation's preference can be populated even when there's no aggregation specified\n // in the data query.\n //\n // Arguably, the query should be the single source for these information, but when\n // the configuration for a particular data query function coming from multiple sources\n // conflict, we need to do some reconciliation (or throw error). Some examples include:\n // - missing/extra columns present in the configuration\n // - column kind and type conflict with aggregation\n // - column kind and type conflict with the column configuration\n //\n // In certain cases, configuration needs to be generated from default presets. This\n // helps with use cases where the query might comes from a different source, such as\n // Studio or Query, or another part of Engine.\n const configuration = baseQuery.configuration\n ? DataCubeConfiguration.serialization.fromJson(baseQuery.configuration)\n : buildDefaultConfiguration([\n ...source.sourceColumns,\n ...data.leafExtendedColumns,\n ...data.groupExtendedColumns,\n ]);\n data.configuration = configuration.serialize();\n /**\n * TODO: @datacube roundtrip - implement the logic to reconcile the configuration with the query\n * - [ ] columns (missing/extra columns - remove or generate default column configuration)\n * - [ ] column kind\n * - [ ] column type\n * - [ ] base off the type, check the settings\n * - [ ] aggregation\n * - [ ] verify groupBy agg columns, pivot agg columns and configuration agree\n * - [ ] verify groupBy sort columns and tree column sort direction configuration agree\n */\n return snapshot.finalize();\n}\n//# sourceMappingURL=DataCubeQuerySnapshotBuilder.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useForkRef } from '@mui/material';\nimport { DatePicker as BaseDatePicker, DateCalendar as BaseDateCalendar, } from '@mui/x-date-pickers';\nimport { useDateField } from '@mui/x-date-pickers/DateField/useDateField.js';\nimport { forwardRef } from 'react';\nexport const DateCalendar = forwardRef(function DatePicker(props, ref) {\n return _jsx(BaseDateCalendar, { ref: ref, ...props });\n});\nexport const DatePicker = forwardRef(function DatePicker(props, ref) {\n return _jsx(BaseDatePicker, { ref: ref, ...props });\n});\n// Make text field work with the browser input\n// See https://mui.com/x/react-date-pickers/custom-field/#using-the-browser-input\nconst DatePickerFieldInput = forwardRef(function DatePickerFieldInput(props, ref) {\n const { inputRef, className, disabled, InputProps: { ref: containerRef, endAdornment } = {}, \n // ignore\n ownerState, enableAccessibleFieldDOMStructure, clearable, onClear, error, focused, ...otherProps } = props;\n const handleRef = useForkRef(containerRef, ref);\n return (_jsxs(\"div\", { style: { display: 'flex', alignItems: 'center', position: 'relative' }, ref: handleRef, children: [_jsx(\"input\", { className: className, disabled: disabled, ref: inputRef, ...otherProps }), endAdornment] }));\n});\nexport const DatePickerField = forwardRef(function DatePickerField(props, ref) {\n const { slots, slotProps, onClear, ...textFieldProps } = props;\n const fieldResponse = useDateField({\n ...textFieldProps,\n });\n return _jsx(DatePickerFieldInput, { ...fieldResponse, ref: ref });\n});\n//# sourceMappingURL=DatePicker.js.map","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { BasePopover, cn, DataCubeIcon, DateCalendar, DatePicker, DatePickerField, useDropdownMenu, useForkRef, } from '@finos/legend-art';\nimport { observer } from 'mobx-react-lite';\nimport { DataCubeOperationAdvancedValueType, DataCubeQueryFilterGroupOperator, getDataType, } from '../../../stores/core/DataCubeQueryEngine.js';\nimport { DataCubeFilterEditorConditionGroupTreeNode, DataCubeFilterEditorConditionTreeNode, } from '../../../stores/core/filter/DataCubeQueryFilterEditorState.js';\nimport { FormDropdownMenu, FormDropdownMenuItem, FormDropdownMenuTrigger, } from '../../core/DataCubeFormUtils.js';\nimport { forwardRef, useCallback, useEffect, useRef, useState } from 'react';\nimport { DATE_FORMAT, PRIMITIVE_TYPE } from '@finos/legend-graph';\nimport { formatDate, getNullableFirstEntry, guaranteeIsNumber, parseISO, } from '@finos/legend-shared';\nimport { evaluate } from 'mathjs';\nconst FILTER_TREE_OFFSET = 10;\nconst FILTER_TREE_INDENTATION_SPACE = 36;\nconst FILTER_TREE_HORIZONTAL_GUTTER_LINE_PADDING = 8;\nconst FILTER_TREE_VERTICAL_GUTTER_LINE_OFFSET = 6;\nconst FILTER_TREE_CONTROLLER_OFFSET = 60;\nconst FILTER_TREE_GROUP_HIGHLIGHT_PADDING = 2;\nconst DataCubeEditorFilterConditionNodeTextValueEditor = observer(forwardRef(function DataCubeEditorFilterConditionNodeValueEditor(props, ref) {\n const { value, updateValue } = props;\n const inputRef = useRef(null);\n const handleRef = useForkRef(inputRef, ref);\n return (_jsx(\"input\", { ref: handleRef, className: \"h-5 w-full flex-shrink-0 border border-neutral-400 px-1 text-sm disabled:border-neutral-300 disabled:bg-neutral-50 disabled:text-neutral-300\", value: value, onKeyDown: (event) => {\n if (event.code === 'Escape') {\n inputRef.current?.select();\n }\n }, onChange: (event) => {\n updateValue(event.target.value);\n } }));\n}));\nconst EVLUATION_ERROR_LABEL = '#ERR';\nconst DataCubeEditorFilterConditionNodeNumberValueEditor = observer(forwardRef(function DataCubeEditorFilterConditionNodeValueEditor(props, ref) {\n const { value, updateValue, defaultValue = 0, step = 1 } = props;\n const [inputValue, setInputValue] = useState(value.toString());\n const inputRef = useRef(null);\n const handleRef = useForkRef(inputRef, ref);\n const calculateExpression = () => {\n const numericValue = Number(inputValue);\n if (inputValue === '') {\n // Explicitly check this case since `Number()` parses empty string as `0`\n setInputValue(defaultValue.toString());\n updateValue(defaultValue);\n }\n else if (isNaN(numericValue)) {\n if (inputValue === EVLUATION_ERROR_LABEL) {\n setInputValue(value.toString());\n return;\n }\n // If the value is not a number, try to evaluate it as an expression\n try {\n const calculatedValue = guaranteeIsNumber(evaluate(inputValue));\n setInputValue(calculatedValue.toString());\n updateValue(calculatedValue);\n }\n catch {\n setInputValue(EVLUATION_ERROR_LABEL);\n updateValue(defaultValue);\n }\n }\n };\n useEffect(() => {\n setInputValue(value.toString());\n }, [value]);\n return (_jsxs(\"div\", { className: \"relative h-5 w-full flex-shrink-0\", children: [_jsx(\"input\", { ref: handleRef, inputMode: \"numeric\", spellCheck: false, type: \"text\" // NOTE: we leave this as text so that we can support expression evaluation\n , className: \"h-full w-full border border-neutral-400 px-1 pr-5 text-sm disabled:border-neutral-300 disabled:bg-neutral-50 disabled:text-neutral-300\", value: inputValue, onKeyDown: (event) => {\n if (event.code === 'Enter') {\n calculateExpression();\n inputRef.current?.focus();\n }\n else if (event.code === 'Escape') {\n inputRef.current?.select();\n }\n else if (event.code === 'ArrowUp') {\n event.preventDefault();\n const newValue = value + step;\n setInputValue(newValue.toString());\n updateValue(newValue);\n }\n else if (event.code === 'ArrowDown') {\n event.preventDefault();\n const newValue = value - step;\n setInputValue(newValue.toString());\n updateValue(newValue);\n }\n }, onChange: (event) => {\n const newInputValue = event.target.value;\n setInputValue(newInputValue);\n const numericValue = Number(newInputValue);\n if (isNaN(numericValue) ||\n !newInputValue // Explicitly check this case since `Number()` parses empty string as `0`\n ) {\n return;\n }\n updateValue(numericValue);\n }, onBlur: () => calculateExpression() }), _jsx(\"div\", { className: \"absolute right-0 top-0 flex h-5 w-5 items-center justify-center\", children: _jsx(\"button\", { className: \"text-lg text-neutral-500 hover:text-neutral-600\", title: \"Evaluate Expression (Enter)\", onClick: calculateExpression, tabIndex: -1, children: _jsx(DataCubeIcon.Calculate, {}) }) })] }));\n}));\n// NOTE: this has to be declared here instead of defined inline in slot configuration of DatePicker\n// else, with each re-render, a new function will be created and the ref might be lost\nconst CustomDateFieldPicker = forwardRef(function CustomDateFieldPicker(p, r) {\n return (_jsx(DatePickerField, { ...p, ref: r, className: \"h-5 w-full flex-shrink-0 border border-neutral-400 px-1 pr-5 text-sm disabled:border-neutral-300 disabled:bg-neutral-50 disabled:text-neutral-300\" }));\n});\nconst CustomDateFieldPickerOpenCalendarButton = observer((props) => {\n const { value, updateValue } = props;\n const [anchorEl, setAnchorEl] = useState(null);\n return (_jsxs(_Fragment, { children: [_jsx(\"button\", { className: \"absolute right-0 top-0 flex h-5 w-5 items-center justify-center\", title: \"Open Date Picker...\", onClick: (event) => {\n setAnchorEl(event.currentTarget);\n }, tabIndex: -1, children: _jsx(DataCubeIcon.Calendar, { className: \"text-lg text-neutral-500 hover:text-neutral-600\" }) }), _jsx(BasePopover, { open: Boolean(anchorEl), anchorEl: anchorEl, anchorOrigin: { vertical: 'bottom', horizontal: 'center' }, transformOrigin: { vertical: 'top', horizontal: 'center' }, onClose: () => setAnchorEl(null), classes: {\n root: 'data-cube-editor-date-calendar mt-0.5',\n paper: 'shadow-md rounded-none border border-neutral-300',\n }, children: _jsx(DateCalendar, { autoFocus: true, value: parseISO(value), onChange: (newValue) => {\n updateValue(formatDate(newValue, DATE_FORMAT));\n setAnchorEl(null);\n } }) })] }));\n});\nconst DataCubeEditorFilterConditionNodeDateValueEditor = observer(forwardRef(function DataCubeEditorFilterConditionNodeValueEditor(props, ref) {\n const { value, updateValue } = props;\n return (_jsx(DatePicker, { ref: ref, value: parseISO(value), format: DATE_FORMAT, slots: {\n field: CustomDateFieldPicker,\n openPickerButton: () => (_jsx(CustomDateFieldPickerOpenCalendarButton, { value: value, updateValue: updateValue })),\n }, onChange: (newValue) => {\n if (newValue) {\n updateValue(formatDate(newValue, DATE_FORMAT));\n }\n } }));\n}));\nconst DataCubeEditorFilterConditionNodeColumnSelector = observer(forwardRef(function DataCubeEditorFilterConditionNodeColumnSelector(props, ref) {\n const { value, updateValue, view } = props;\n const editor = view.filter;\n const matchingColumn = editor.columns.find((column) => column.name === value);\n const [openColumnDropdown, closeColumnDropdown, columnDropdownProps, columnDropdownPropsOpen,] = useDropdownMenu();\n return (_jsxs(_Fragment, { children: [_jsx(FormDropdownMenuTrigger, { ref: ref, className: \"relative mr-1 w-32\", onClick: openColumnDropdown, open: columnDropdownPropsOpen, children: value }), _jsx(FormDropdownMenu, { className: \"w-32\", ...columnDropdownProps, children: editor.columns\n .filter((column) => matchingColumn &&\n getDataType(matchingColumn.type) === getDataType(column.type))\n .map((column) => (_jsx(FormDropdownMenuItem, { onClick: () => {\n updateValue(column.name);\n closeColumnDropdown();\n }, autoFocus: value === column.name, children: column.name }, column.name))) })] }));\n}));\nconst DataCubeEditorFilterConditionNodeValueEditor = observer(forwardRef(function DataCubeEditorFilterConditionNodeValueEditor(props, ref) {\n const { value, updateValue, view } = props;\n // WIP: support collection/column\n switch (value.type) {\n case PRIMITIVE_TYPE.STRING:\n return (_jsx(DataCubeEditorFilterConditionNodeTextValueEditor, { ref: ref, value: value.value, updateValue: (val) => updateValue(val) }));\n case PRIMITIVE_TYPE.NUMBER:\n case PRIMITIVE_TYPE.DECIMAL:\n case PRIMITIVE_TYPE.FLOAT:\n case PRIMITIVE_TYPE.INTEGER:\n return (_jsx(DataCubeEditorFilterConditionNodeNumberValueEditor, { ref: ref, value: value.value, updateValue: (val) => updateValue(val) }));\n case PRIMITIVE_TYPE.DATE:\n case PRIMITIVE_TYPE.STRICTDATE:\n case PRIMITIVE_TYPE.DATETIME:\n return (_jsx(DataCubeEditorFilterConditionNodeDateValueEditor, { ref: ref, value: value.value, updateValue: (val) => updateValue(val) }));\n case DataCubeOperationAdvancedValueType.COLUMN:\n return (_jsx(DataCubeEditorFilterConditionNodeColumnSelector, { ref: ref, value: value.value, updateValue: (val) => updateValue(val), view: view }));\n default:\n return null;\n }\n}));\nfunction DataCubeEditorFilterNotLabel() {\n return (_jsxs(\"div\", { className: \"relative flex pl-2.5\", children: [_jsx(\"div\", { className: \"pointer-events-none absolute -left-2 h-0 w-0 border-[9px] border-neutral-600 border-b-transparent border-l-transparent border-t-transparent\" }), _jsx(\"div\", { className: \"mr-1 flex h-[18px] w-10 flex-shrink-0 items-center bg-neutral-600 pl-2 text-sm font-medium text-white\", title: \"Filter is inverted: select all but what matches.\", children: \"NOT\" })] }));\n}\nconst DataCubeEditorFilterConditionNodeController = observer((props) => {\n const { className, node, view } = props;\n const editor = view.filter;\n return (_jsxs(\"div\", { className: cn('flex h-3.5 w-14 flex-shrink-0 bg-neutral-100', className), children: [_jsx(\"button\", { className: \"flex h-3.5 w-3.5 items-center justify-center rounded-bl-sm rounded-tl-sm border border-neutral-400 hover:bg-neutral-200\", onClick: () => editor.addFilterNode(node), title: \"Insert a new column filter, just after this filter.\", children: _jsx(DataCubeIcon.FilterAddOperator, { className: \"stroke-[2.5] text-sm\" }) }), _jsx(\"button\", { className: \"flex h-3.5 w-3.5 items-center justify-center border border-l-0 border-neutral-400 hover:bg-neutral-200\", onClick: () => editor.removeFilterNode(node), title: \"Remove this filter\", children: _jsx(DataCubeIcon.FilterRemoveOperator, { className: \"stroke-[2.5] text-sm\" }) }), _jsx(\"button\", { className: \"flex h-3.5 w-3.5 items-center justify-center border border-l-0 border-neutral-400 hover:bg-neutral-200\", onClick: () => editor.layerFilterNode(node), title: \"Put this filter in its own sub-group (and combine it with other filters).\", children: _jsx(DataCubeIcon.FilterGroupOperator, { className: \"stroke-[2.5] text-sm\" }) }), _jsx(\"button\", { className: cn('flex h-3.5 w-3.5 items-center justify-center rounded-br-sm rounded-tr-sm border border-l-0 border-neutral-400 hover:bg-neutral-200', {\n 'bg-neutral-600': node.not,\n 'border-neutral-600': node.not,\n 'text-white': node.not,\n 'hover:bg-neutral-600': node.not,\n }), onClick: () => node.setNot(!node.not), title: node.not\n ? 'Turn off the NOT operator on this filter to select only what matches.'\n : 'Turn on the NOT operator on this filter to select all but what matches.', children: _jsx(DataCubeIcon.FilterNotOperator, { className: \"stroke-[3] text-xs\" }) })] }));\n});\nconst DataCubeEditorFilterConditionNodeDisplay = observer((props) => {\n const { node, level, view } = props;\n const editor = view.filter;\n const parentNode = node.parent;\n const nodeIdx = parentNode ? parentNode.children.indexOf(node) : undefined;\n const valueEditorRef = useRef(null);\n const [openColumnDropdown, closeColumnDropdown, columnDropdownProps, columnDropdownPropsOpen,] = useDropdownMenu();\n const [openOperationDropdown, closeOperationDropdown, operationDropdownProps, operationDropdownPropsOpen,] = useDropdownMenu();\n const focusOnValueEditor = useCallback(() => valueEditorRef.current?.focus(), []);\n return (_jsxs(\"div\", { className: \"group flex h-6 items-center\", children: [_jsx(\"div\", { className: cn('z-1 absolute h-6 w-full bg-opacity-50 group-hover:bg-sky-100 group-hover:bg-opacity-50', {\n 'bg-sky-50': node === editor.selectedNode,\n 'border-[0.5px] border-l-2 border-sky-200 border-l-sky-600': node === editor.selectedNode,\n }), onClick: () => editor.setSelectedNode(node) }), _jsx(\"div\", { style: {\n paddingLeft: `${level * FILTER_TREE_INDENTATION_SPACE + FILTER_TREE_OFFSET + (level - 1) * FILTER_TREE_CONTROLLER_OFFSET}px`,\n }, className: \"relative h-6 flex-shrink-0\", onClick: () => editor.setSelectedNode(node), children: parentNode && (_jsxs(\"div\", { className: \"absolute top-0 flex h-6 items-center justify-end\", style: {\n width: `${FILTER_TREE_INDENTATION_SPACE - FILTER_TREE_HORIZONTAL_GUTTER_LINE_PADDING - FILTER_TREE_VERTICAL_GUTTER_LINE_OFFSET}px`,\n right: `${FILTER_TREE_HORIZONTAL_GUTTER_LINE_PADDING}px`,\n }, children: [_jsx(\"div\", { className: cn('h-[1px] w-full flex-1 bg-neutral-200', {\n 'bg-sky-600': parentNode === editor.selectedGroupNode,\n }) }), nodeIdx !== undefined && nodeIdx > 0 && (_jsx(\"div\", { className: cn('flex h-6 items-center justify-center pl-1 text-xs text-neutral-600', {\n 'text-sky-600': parentNode === editor.selectedGroupNode,\n }), children: parentNode.operation === DataCubeQueryFilterGroupOperator.AND\n ? 'and'\n : 'or' }))] })) }), _jsx(DataCubeEditorFilterConditionNodeController, { className: \"relative mr-1\", node: node, view: view }), node.not && _jsx(DataCubeEditorFilterNotLabel, {}), _jsx(FormDropdownMenuTrigger, { className: \"relative mr-1 w-32\", onClick: openColumnDropdown, open: columnDropdownPropsOpen, children: node.column.name }), _jsx(FormDropdownMenu, { className: \"w-32\", ...columnDropdownProps, onClosed: focusOnValueEditor, children: editor.columns.map((column) => (_jsx(FormDropdownMenuItem, { onClick: () => {\n if (column !== node.column) {\n const newOp = node.operation.isCompatibleWithColumn(column)\n ? node.operation\n : getNullableFirstEntry(editor.view.engine.filterOperations.filter((op) => op.isCompatibleWithColumn(column)));\n if (newOp) {\n node.setColumn(column);\n node.setOperation(newOp);\n node.setValue(newOp.generateDefaultValue(column));\n }\n }\n closeColumnDropdown();\n }, autoFocus: node.column.name === column.name, children: column.name }, column.name))) }), _jsx(FormDropdownMenuTrigger, { className: \"relative mr-1 w-24\", onClick: openOperationDropdown, open: operationDropdownPropsOpen, children: node.operation.label }), _jsx(FormDropdownMenu, { className: \"w-24\", ...operationDropdownProps, onClosed: focusOnValueEditor, children: editor.view.engine.filterOperations\n .filter((op) => op.isCompatibleWithColumn(node.column))\n .map((op) => (_jsx(FormDropdownMenuItem, { onClick: () => {\n if (op !== node.operation) {\n if (op.isCompatibleWithColumn(node.column)) {\n node.setOperation(op);\n node.setValue(op.generateDefaultValue(node.column));\n }\n }\n closeOperationDropdown();\n }, autoFocus: node.operation.operator === op.operator, children: op.label }, op.operator))) }), _jsx(\"div\", { className: \"relative w-32 flex-shrink-0\", children: node.value && (_jsx(DataCubeEditorFilterConditionNodeValueEditor, { ref: valueEditorRef, value: node.value, updateValue: (val) => node.updateValue(val), view: view })) })] }));\n});\nconst DataCubeEditorFilterGroupNodeDisplay = observer((props) => {\n const { node, level, view } = props;\n const editor = view.filter;\n const parentNode = node.parent;\n const nodeIdx = parentNode ? parentNode.children.indexOf(node) : undefined;\n const [openOperationDropdown, closeOperationDropdown, operationDropdownProps, operationDropdownPropsOpen,] = useDropdownMenu();\n return (_jsxs(\"div\", { className: \"group flex h-6 items-center\", children: [_jsx(\"div\", { className: cn('z-1 absolute h-6 w-full bg-opacity-50 group-hover:bg-sky-100 group-hover:bg-opacity-50', {\n 'bg-sky-50': node === editor.selectedNode,\n 'border-[0.5px] border-l-2 border-sky-200 border-l-sky-600': node === editor.selectedNode,\n }), onClick: () => editor.setSelectedNode(node) }), _jsx(\"div\", { style: {\n paddingLeft: `${level * FILTER_TREE_INDENTATION_SPACE + FILTER_TREE_OFFSET + (level !== 0 ? (level - 1) * FILTER_TREE_CONTROLLER_OFFSET : 0)}px`,\n }, className: \"relative h-6 flex-shrink-0\", onClick: () => editor.setSelectedNode(node), children: level !== 0 && parentNode && (_jsxs(\"div\", { className: \"absolute top-0 flex h-6 items-center justify-end\", style: {\n width: `${FILTER_TREE_INDENTATION_SPACE - FILTER_TREE_HORIZONTAL_GUTTER_LINE_PADDING - FILTER_TREE_VERTICAL_GUTTER_LINE_OFFSET}px`,\n right: `${FILTER_TREE_HORIZONTAL_GUTTER_LINE_PADDING}px`,\n }, children: [_jsx(\"div\", { className: cn('h-[1px] w-full flex-1 bg-neutral-200', {\n 'bg-sky-600': parentNode === editor.selectedGroupNode,\n }) }), nodeIdx !== undefined && nodeIdx > 0 && (_jsx(\"div\", { className: cn('flex h-6 items-center justify-center pl-1 text-xs text-neutral-600', {\n 'text-sky-600': parentNode === editor.selectedGroupNode,\n }), children: parentNode.operation === DataCubeQueryFilterGroupOperator.AND\n ? 'and'\n : 'or' }))] })) }), level !== 0 && (_jsxs(_Fragment, { children: [_jsx(DataCubeEditorFilterConditionNodeController, { className: \"relative mr-1\", node: node, view: view }), node.not && _jsx(DataCubeEditorFilterNotLabel, {})] })), _jsx(FormDropdownMenuTrigger, { className: \"relative w-14\", onClick: openOperationDropdown, open: operationDropdownPropsOpen, children: node.operation === DataCubeQueryFilterGroupOperator.AND\n ? 'All of'\n : 'Any of' }), _jsxs(FormDropdownMenu, { className: \"w-14\", ...operationDropdownProps, children: [_jsx(FormDropdownMenuItem, { onClick: () => {\n node.setOperation(DataCubeQueryFilterGroupOperator.AND);\n closeOperationDropdown();\n }, autoFocus: node.operation === DataCubeQueryFilterGroupOperator.AND, children: \"All of\" }), _jsx(FormDropdownMenuItem, { onClick: () => {\n node.setOperation(DataCubeQueryFilterGroupOperator.OR);\n closeOperationDropdown();\n }, autoFocus: node.operation === DataCubeQueryFilterGroupOperator.OR, children: \"Any of\" })] })] }));\n});\n// NOTE: This particular rendering of the filter tree leans on tree data structure used to organize the nodes\n// and thus, though simpler to implement, makes it harder to implement certain features which favors flat\n// structure like list, such as drag and drop, multi-select, etc.\n// If those needs come up we could shift the implementation or look out for a library that already works well\n// out of the box such as:\n// See https://mui.com/x/react-tree-view/\n// See https://github.com/lukasbach/react-complex-tree\nconst DataCubeEditorFilterGroupDisplay = observer((props) => {\n const { node, level, view } = props;\n const editor = view.filter;\n return (_jsxs(\"div\", { className: \"relative w-full\", children: [_jsx(\"div\", { className: cn('pointer-events-none absolute h-full', {\n 'border-[0.5px] border-sky-200 bg-sky-50': node === editor.selectedGroupNode,\n }), style: {\n marginLeft: `${level * FILTER_TREE_INDENTATION_SPACE + FILTER_TREE_OFFSET + level * FILTER_TREE_CONTROLLER_OFFSET - FILTER_TREE_GROUP_HIGHLIGHT_PADDING}px`,\n width: `calc(100% - ${level * FILTER_TREE_INDENTATION_SPACE + FILTER_TREE_OFFSET + level * FILTER_TREE_CONTROLLER_OFFSET - 2 * FILTER_TREE_GROUP_HIGHLIGHT_PADDING}px)`,\n } }), _jsx(DataCubeEditorFilterGroupNodeDisplay, { node: node, level: level, view: view }), _jsxs(\"div\", { className: \"relative\", children: [_jsx(\"div\", { className: cn('pointer-events-none absolute z-10 h-[calc(100%_-_12px)] w-0 border-l border-neutral-200', {\n 'border-sky-600': node === editor.selectedGroupNode,\n }), style: {\n marginLeft: `${level * FILTER_TREE_INDENTATION_SPACE + FILTER_TREE_OFFSET + FILTER_TREE_VERTICAL_GUTTER_LINE_OFFSET + level * FILTER_TREE_CONTROLLER_OFFSET}px`,\n } }), node.children.map((childNode) => {\n if (childNode instanceof DataCubeFilterEditorConditionTreeNode) {\n return (_jsx(DataCubeEditorFilterConditionNodeDisplay, { level: level + 1, node: childNode, view: view }, childNode.uuid));\n }\n else if (childNode instanceof DataCubeFilterEditorConditionGroupTreeNode) {\n return (_jsx(DataCubeEditorFilterGroupDisplay, { level: level + 1, node: childNode, view: view }, childNode.uuid));\n }\n return null;\n })] })] }));\n});\nexport const DataCubeFilterEditor = observer((props) => {\n const { view } = props;\n const editor = view.filter;\n useEffect(() => {\n editor.setSelectedNode(undefined);\n }, [editor]);\n return (_jsxs(_Fragment, { children: [_jsx(\"div\", { className: \"relative h-[calc(100%_-_40px)] w-full px-2 pt-2\", children: _jsx(\"div\", { className: \"h-full w-full overflow-auto border border-neutral-300 bg-white\", children: _jsx(\"div\", { className: \"h-full w-full select-none p-2\", children: _jsx(\"div\", { className: \"flex h-full w-full\", children: _jsxs(\"div\", { className: \"relative flex h-full w-full overflow-auto rounded-sm border border-neutral-200\", onClick: () => editor.setSelectedNode(undefined), children: [!editor.tree.root && (_jsxs(\"div\", { className: \"h-full w-full p-3\", children: [_jsx(\"div\", { children: \"No filter is specified. Click the button below to start.\" }), _jsx(\"button\", { className: \"w-30 mt-2 h-6 border border-neutral-400 bg-neutral-300 px-2 hover:brightness-95\", onClick: () => {\n editor.initializeTree();\n }, children: \"Create New Filter\" })] })), editor.tree.root && (_jsxs(\"div\", { className: \"flex flex-col py-1\", \n // prevent click event of filter tree from propagating to the\n // container which when clicked, will clear node selection\n onClick: (event) => event.stopPropagation(), children: [_jsx(DataCubeEditorFilterGroupDisplay, { node: editor.tree.root, level: 0, view: view }), _jsx(\"div\", { \n // add a padding so there will always be a clickable area to clear node selection\n className: \"min-h-6 w-full flex-1\", onClick: () => editor.setSelectedNode(undefined) })] }))] }) }) }) }) }), _jsxs(\"div\", { className: \"flex h-10 items-center justify-end px-2\", children: [_jsx(\"button\", { className: \"h-6 w-20 border border-neutral-400 bg-neutral-300 px-2 hover:brightness-95\", onClick: () => {\n editor.applyChanges();\n editor.display.close();\n }, children: \"OK\" }), _jsx(\"button\", { className: \"ml-2 h-6 w-20 border border-neutral-400 bg-neutral-300 px-2 hover:brightness-95\", onClick: () => editor.display.close(), children: \"Cancel\" }), _jsx(\"button\", { className: \"ml-2 h-6 w-20 border border-neutral-400 bg-neutral-300 px-2 hover:brightness-95\", onClick: () => editor.applyChanges(), children: \"Apply\" })] })] }));\n});\n//# sourceMappingURL=DataCubeFilterEditor.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { action, computed, makeObservable, observable } from 'mobx';\nimport { DataCubeQueryFilterGroupOperator, DataCubeQueryFilterOperator, } from '../../core/DataCubeQueryEngine.js';\nimport { deepClone, getNonNullableEntry, guaranteeNonNullable, } from '@finos/legend-shared';\nimport { DataCubeFilterEditorConditionGroupTreeNode, DataCubeFilterEditorConditionTreeNode, buildFilterEditorTree, buildFilterQuerySnapshot, } from '../../core/filter/DataCubeQueryFilterEditorState.js';\nimport { DataCubeQuerySnapshotController } from '../DataCubeQuerySnapshotManager.js';\nimport { DataCubeConfiguration, } from '../../core/models/DataCubeConfiguration.js';\nimport { DataCubeFilterEditor } from '../../../components/view/filter/DataCubeFilterEditor.js';\n/**\n * This query editor state backs the form editor for filter. It batches changes made\n * to the filter in the form editor.\n */\nexport class DataCubeFilterEditorState extends DataCubeQuerySnapshotController {\n display;\n tree;\n selectedNode;\n columns = [];\n constructor(view) {\n super(view);\n makeObservable(this, {\n tree: observable.ref,\n initializeTree: action,\n refreshTree: action,\n columns: observable.struct,\n applySnapshot: action,\n selectedNode: observable,\n selectedGroupNode: computed,\n setSelectedNode: action,\n addFilterNode: action,\n removeFilterNode: action,\n layerFilterNode: action,\n });\n this.display = this.view.engine.layout.newDisplay('Filter', () => _jsx(DataCubeFilterEditor, { view: this.view }), {\n x: -50,\n y: 50,\n width: 600,\n height: 400,\n minWidth: 300,\n minHeight: 200,\n center: false,\n });\n this.tree = {\n nodes: new Map(),\n };\n }\n initializeTree() {\n if (this.tree.root === undefined && this.tree.nodes.size === 0) {\n const root = new DataCubeFilterEditorConditionGroupTreeNode(undefined, DataCubeQueryFilterGroupOperator.AND, undefined);\n this.tree.nodes.set(root.uuid, root);\n this.tree.root = root;\n const condition = this.generateNewFilterNode(root);\n if (condition) {\n root.addChild(condition);\n this.tree.nodes.set(condition.uuid, condition);\n }\n this.refreshTree();\n }\n }\n refreshTree() {\n this.tree = { ...this.tree };\n }\n get selectedGroupNode() {\n return this.selectedNode instanceof\n DataCubeFilterEditorConditionGroupTreeNode\n ? this.selectedNode\n : this.selectedNode?.parent;\n }\n setSelectedNode(node) {\n this.selectedNode = node;\n }\n generateNewFilterNode(baseNode) {\n if (baseNode instanceof DataCubeFilterEditorConditionTreeNode) {\n return new DataCubeFilterEditorConditionTreeNode(undefined, baseNode.column, baseNode.operation, deepClone(baseNode.value), baseNode.not);\n }\n else if (baseNode instanceof DataCubeFilterEditorConditionGroupTreeNode) {\n if (this.columns.length !== 0) {\n const columnConfig = getNonNullableEntry(this.columns, 0);\n const column = {\n name: columnConfig.name,\n type: columnConfig.type,\n };\n const operation = this.view.engine.getFilterOperation(DataCubeQueryFilterOperator.EQUAL);\n return new DataCubeFilterEditorConditionTreeNode(undefined, column, operation, operation.generateDefaultValue(column), undefined);\n }\n }\n return undefined;\n }\n /**\n * Add a new filter condition node just after the specified filter node.\n * The added node is a clone of the specified node to make the filter's overall match unaffected,\n * except if the specified node is a group node, then a new (default) condition will be added.\n */\n addFilterNode(baseNode) {\n if (this.tree.root) {\n const node = this.generateNewFilterNode(baseNode);\n const parentNode = baseNode.parent;\n if (parentNode && node) {\n parentNode.addChild(node, baseNode instanceof DataCubeFilterEditorConditionTreeNode\n ? parentNode.children.indexOf(baseNode) + 1\n : undefined);\n this.tree.nodes.set(node.uuid, node);\n this.refreshTree();\n }\n }\n }\n /**\n * Remove the specified filter node.\n * If its parent node has just one child, then flatten the parent node if:\n * 1. parent node is not the root node and has exactly one child left\n * 2. OR parent node is the root node and has no child left, in this case,\n * flattening means completely remove the filter tree\n */\n removeFilterNode(nodeToRemove) {\n if (this.tree.root) {\n const parentNode = nodeToRemove.parent;\n // skip root node\n if (nodeToRemove !== this.tree.root && parentNode) {\n // remove all nodes in the subtree\n let childNodesToRemove = [nodeToRemove];\n while (childNodesToRemove.length) {\n childNodesToRemove.forEach((node) => {\n if (node instanceof DataCubeFilterEditorConditionGroupTreeNode) {\n node.children.forEach((child) => {\n child.setParent(undefined);\n });\n }\n this.tree.nodes.delete(node.uuid);\n });\n childNodesToRemove = Array.from(this.tree.nodes.values()).filter((node) => node !== this.tree.root && !node.parent);\n }\n // remove node from parent\n parentNode.removeChild(nodeToRemove);\n this.tree.nodes.delete(nodeToRemove.uuid);\n // flatten parent node if\n // 1. parent node is not the root node and has exactly one child left\n // 2. OR parent node is the root node and has no child left, in this case,\n // flattening means completely remove the filter tree\n if (parentNode.children.length === 1) {\n if (parentNode !== this.tree.root) {\n const childNode = getNonNullableEntry(parentNode.children, 0);\n const grandParentNode = guaranteeNonNullable(parentNode.parent);\n parentNode.removeChild(childNode);\n const parentNodeIndex = grandParentNode.children.indexOf(parentNode);\n grandParentNode.removeChild(parentNode);\n this.tree.nodes.delete(parentNode.uuid);\n grandParentNode.addChild(childNode, parentNodeIndex);\n }\n }\n else if (parentNode.children.length === 0) {\n if (parentNode === this.tree.root) {\n this.tree.root = undefined;\n this.tree.nodes.delete(parentNode.uuid);\n }\n }\n this.refreshTree();\n if (this.selectedNode === nodeToRemove) {\n this.setSelectedNode(undefined);\n }\n }\n }\n }\n /**\n * Replace the specified filter node with a group which contains\n * the specified node and a new condition node.\n * The added node is a clone of the specified node to make the filter's overall match unaffected,\n * except if the specified node is a group node, then a new (default) condition will be added.\n */\n layerFilterNode(baseNode) {\n if (this.tree.root) {\n const node = this.generateNewFilterNode(baseNode);\n const parentNode = baseNode.parent;\n if (parentNode && node) {\n const baseNodeIndex = parentNode.children.indexOf(baseNode);\n parentNode.removeChild(baseNode);\n const subGroupNode = new DataCubeFilterEditorConditionGroupTreeNode(undefined, \n // Use OR condition when we create sub-group to relax filtering\n DataCubeQueryFilterGroupOperator.OR, undefined);\n subGroupNode.addChild(baseNode);\n subGroupNode.addChild(node);\n parentNode.addChild(subGroupNode, baseNodeIndex);\n this.tree.nodes.set(subGroupNode.uuid, subGroupNode);\n this.tree.nodes.set(node.uuid, node);\n this.refreshTree();\n if (this.selectedNode === baseNode) {\n this.setSelectedNode(subGroupNode);\n }\n }\n }\n }\n getSnapshotSubscriberName() {\n return 'filter-editor';\n }\n async applySnapshot(snapshot, previousSnapshot) {\n const configuration = DataCubeConfiguration.serialization.fromJson(snapshot.data.configuration);\n // NOTE: filtering group-level extended columns is not supported\n this.columns = configuration.columns.filter((column) => !snapshot.data.groupExtendedColumns.find((col) => col.name === column.name));\n this.tree.nodes = new Map();\n this.tree.root = snapshot.data.filter\n ? buildFilterEditorTree(snapshot.data.filter, undefined, this.tree.nodes, (op) => this.view.engine.getFilterOperation(op))\n : undefined;\n this.setSelectedNode(undefined);\n this.refreshTree();\n }\n applyChanges() {\n const baseSnapshot = guaranteeNonNullable(this.getLatestSnapshot());\n const newSnapshot = baseSnapshot.clone();\n newSnapshot.data.filter = this.tree.root\n ? buildFilterQuerySnapshot(this.tree.root)\n : undefined;\n newSnapshot.finalize();\n if (newSnapshot.hashCode !== baseSnapshot.hashCode) {\n this.publishSnapshot(newSnapshot);\n }\n }\n}\n//# sourceMappingURL=DataCubeFilterEditorState.js.map","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { observer } from 'mobx-react-lite';\nimport { DataCubeExistingColumnEditorState, } from '../../../stores/view/extend/DataCubeColumnEditorState.js';\nimport { editor as monacoEditorAPI, languages as monacoLanguagesAPI, } from 'monaco-editor';\nimport { useEffect, useMemo, useRef, useState } from 'react';\nimport { CODE_EDITOR_THEME, PURE_CODE_EDITOR_WORD_SEPARATORS, CODE_EDITOR_LANGUAGE, getBaseCodeEditorOptions, } from '@finos/legend-code-editor';\nimport { getCodeSuggestions, MONACO_EDITOR_OVERFLOW_WIDGETS_ROOT_ID, } from '../../core/DataCubePureCodeEditorUtils.js';\nimport { FormDocumentation, FormDropdownMenu, FormDropdownMenuItem, FormDropdownMenuTrigger, FormTextInput, } from '../../core/DataCubeFormUtils.js';\nimport { debounce } from '@finos/legend-shared';\nimport { cn, DataCubeIcon, useDropdownMenu } from '@finos/legend-art';\nimport { DataCubeColumnDataType, DataCubeColumnKind, } from '../../../stores/core/DataCubeQueryEngine.js';\nimport { DocumentationKey } from '../../../__lib__/DataCubeDocumentation.js';\nvar DataCubeExtendedColumnKind;\n(function (DataCubeExtendedColumnKind) {\n DataCubeExtendedColumnKind[\"LEAF_LEVEL_MEASURE\"] = \"Leaf Level Measure\";\n DataCubeExtendedColumnKind[\"LEAF_LEVEL_DIMENSION\"] = \"Leaf Level Dimension\";\n DataCubeExtendedColumnKind[\"GROUP_LEVEL\"] = \"Group Level\";\n})(DataCubeExtendedColumnKind || (DataCubeExtendedColumnKind = {}));\nexport const DataCubeColumnCreator = observer((props) => {\n const { state } = props;\n const view = state.view;\n const engine = view.engine;\n const nameInputRef = useRef(null);\n const currentColumnKind = state.isGroupLevel\n ? DataCubeExtendedColumnKind.GROUP_LEVEL\n : state.columnKind === DataCubeColumnKind.MEASURE\n ? DataCubeExtendedColumnKind.LEAF_LEVEL_MEASURE\n : DataCubeExtendedColumnKind.LEAF_LEVEL_DIMENSION;\n const [openKindDropdown, closeKindDropdown, kindDropdownProps, kindDropPropsOpen,] = useDropdownMenu();\n const [openTypeDropdown, closeTypeDropdown, typeDropdownProps, typeDropPropsOpen,] = useDropdownMenu();\n const suggestionsProvider = useRef(undefined);\n const editorRef = useRef(null);\n const [editor, setEditor] = useState();\n const debouncedCheckReturnType = useMemo(() => debounce(() => {\n state\n .getReturnType()\n .catch((error) => engine.alertUnhandledError(error));\n }, 500), [state, engine]);\n useEffect(() => {\n if (!editor && editorRef.current) {\n const element = editorRef.current;\n const newEditor = monacoEditorAPI.create(element, {\n ...getBaseCodeEditorOptions(),\n fontSize: 12,\n language: CODE_EDITOR_LANGUAGE.PURE,\n theme: CODE_EDITOR_THEME.GITHUB_LIGHT,\n wordSeparators: PURE_CODE_EDITOR_WORD_SEPARATORS,\n // Make sure the widgets (tooltips, menus) are not clipped by the container bounds\n // and fix the problem where widgets are rendered with position=fixed not working well with parent\n // containers (i.e. the draggable window) which has been transformed\n // See https://dev.to/salilnaik/the-uncanny-relationship-between-position-fixed-and-transform-property-32f6\n // See https://github.com/microsoft/monaco-editor/issues/2793#issuecomment-999337740\n fixedOverflowWidgets: true,\n overflowWidgetsDomNode: document.getElementById(MONACO_EDITOR_OVERFLOW_WIDGETS_ROOT_ID),\n });\n // NOTE: since engine suggestions are computed based on the current text content\n // we put it in this block to simplify the flow and really to \"bend\" monaco-editor\n // suggestion provider to our needs. But we also need to make sure this suggestion\n // provider is scoped to the current editor only by checking the editor model\n suggestionsProvider.current?.dispose();\n suggestionsProvider.current =\n monacoLanguagesAPI.registerCompletionItemProvider(CODE_EDITOR_LANGUAGE.PURE, {\n // NOTE: this is a hack to fetch suggestions from engine for every keystroke\n triggerCharacters: [...PURE_CODE_EDITOR_WORD_SEPARATORS, '$'],\n provideCompletionItems: async (model, position, context) => {\n let suggestions = [];\n if (model.uri === state.editorModelUri) {\n suggestions = suggestions.concat(await getCodeSuggestions(position, model, state.codePrefix, view, () => state.buildExtendBaseQuery()));\n }\n return { suggestions };\n },\n });\n newEditor.setModel(state.editorModel);\n newEditor.onDidChangeModelContent(() => {\n const currentVal = newEditor.getValue();\n if (currentVal !== state.code) {\n state.code = currentVal;\n // clear error on content change/typing\n state.clearError();\n state.setReturnType(undefined);\n debouncedCheckReturnType.cancel();\n debouncedCheckReturnType();\n }\n });\n // focus on the editor initially and set the cursor to the end\n // since we're trying to create a new column\n newEditor.focus();\n newEditor.setPosition({\n lineNumber: 1,\n column: state.code.length + 1,\n });\n state.setEditor(newEditor);\n setEditor(newEditor);\n }\n }, [state, editor, debouncedCheckReturnType, view]);\n // clean up\n useEffect(() => () => {\n if (editor) {\n editor.dispose();\n suggestionsProvider.current?.dispose();\n }\n }, [editor]);\n useEffect(() => {\n state.editor?.updateOptions({\n readOnly: state.finalizationState.isInProgress,\n });\n }, [state, state.finalizationState.isInProgress]);\n return (_jsxs(_Fragment, { children: [_jsx(\"div\", { className: \"relative h-[calc(100%_-_40px)] w-full px-2 pt-2\", children: _jsx(\"div\", { className: \"h-full w-full overflow-auto border border-neutral-300 bg-white\", children: _jsxs(\"div\", { className: \"h-full w-full select-none p-0\", children: [_jsxs(\"div\", { className: \"h-24 w-full p-2\", children: [_jsxs(\"div\", { className: \"mt-1 flex h-5 w-full items-center\", children: [_jsx(\"div\", { className: \"flex h-full w-24 flex-shrink-0 items-center text-sm\", children: \"Column Name:\" }), _jsx(FormTextInput, { className: \"w-32\", ref: nameInputRef, disabled: state.finalizationState.isInProgress, value: state.name, onChange: (event) => {\n state.setName(event.target.value.trim());\n } }), _jsx(\"div\", { className: \"ml-0.5 flex h-5 w-5 flex-shrink-0 items-center justify-center text-lg\", children: state.isNameValid ? (_jsx(DataCubeIcon.CircleChecked, { className: \"text-green-500\" })) : (_jsx(DataCubeIcon.CircledFailed, { className: \"text-red-500\" })) })] }), _jsxs(\"div\", { className: \"mt-2 flex h-5 w-full items-center\", children: [_jsxs(\"div\", { className: \"flex h-full w-24 flex-shrink-0 items-center text-sm\", children: [\"Column Kind:\", _jsx(FormDocumentation, { className: \"ml-1\", documentationKey: DocumentationKey.DATA_CUBE_EXTENDED_COLUMN_LEVELS })] }), _jsx(FormDropdownMenuTrigger, { className: \"w-32\", onClick: openKindDropdown, open: kindDropPropsOpen, disabled: state.finalizationState.isInProgress, children: currentColumnKind }), _jsx(FormDropdownMenu, { className: \"w-32\", ...kindDropdownProps, children: [\n DataCubeExtendedColumnKind.LEAF_LEVEL_MEASURE,\n DataCubeExtendedColumnKind.LEAF_LEVEL_DIMENSION,\n DataCubeExtendedColumnKind.GROUP_LEVEL,\n ].map((columnKind) => (_jsx(FormDropdownMenuItem, { onClick: () => {\n switch (columnKind) {\n case DataCubeExtendedColumnKind.LEAF_LEVEL_MEASURE: {\n state.setColumnKind(false, DataCubeColumnKind.MEASURE);\n break;\n }\n case DataCubeExtendedColumnKind.LEAF_LEVEL_DIMENSION: {\n state.setColumnKind(false, DataCubeColumnKind.DIMENSION);\n break;\n }\n case DataCubeExtendedColumnKind.GROUP_LEVEL: {\n state.setColumnKind(true, undefined);\n break;\n }\n default:\n return;\n }\n state.clearError();\n state.setReturnType(undefined);\n debouncedCheckReturnType.cancel();\n debouncedCheckReturnType();\n closeKindDropdown();\n }, autoFocus: columnKind === currentColumnKind, children: columnKind }, columnKind))) })] }), _jsxs(\"div\", { className: \"mt-2 flex h-5 w-full items-center\", children: [_jsx(\"div\", { className: \"flex h-full w-24 flex-shrink-0 items-center text-sm\", children: \"Value Type:\" }), _jsx(FormDropdownMenuTrigger, { className: \"w-32\", onClick: openTypeDropdown, open: typeDropPropsOpen, disabled: state.finalizationState.isInProgress, children: state.expectedType }), _jsx(\"div\", { className: \"ml-0.5 flex h-5 w-5 flex-shrink-0 items-center justify-center text-lg\", children: state.validationState.isInProgress ? (_jsx(DataCubeIcon.Loader, { className: \"animate-spin stroke-2 text-neutral-400\" })) : state.returnType ? (state.isTypeValid ? (_jsx(DataCubeIcon.CircleChecked, { className: \"text-green-500\" })) : (_jsx(DataCubeIcon.CircledFailed, { className: \"text-red-500\" }))) : null }), _jsx(FormDropdownMenu, { className: \"w-32\", ...typeDropdownProps, children: [\n DataCubeColumnDataType.TEXT,\n DataCubeColumnDataType.NUMBER,\n DataCubeColumnDataType.DATE,\n ].map((dataType) => (_jsx(FormDropdownMenuItem, { onClick: () => {\n state.setExpectedType(dataType);\n closeTypeDropdown();\n }, autoFocus: dataType === state.expectedType, children: dataType }, dataType))) })] })] }), _jsx(\"div\", { className: \"h-[calc(100%_-_96px)] w-full p-2 pt-1\", children: _jsx(\"div\", { className: cn('relative h-full w-full border border-neutral-200', {\n 'border-red-500': Boolean(state.codeError),\n }), children: _jsx(\"div\", { className: \"absolute left-0 top-0 h-full w-full overflow-hidden\", ref: editorRef }) }) })] }) }) }), _jsxs(\"div\", { className: \"flex h-10 items-center justify-end px-2\", children: [_jsx(\"button\", { className: \"h-6 w-20 border border-neutral-400 bg-neutral-300 px-2 hover:brightness-95 disabled:cursor-not-allowed disabled:border-neutral-300 disabled:text-neutral-400 disabled:hover:brightness-100\", disabled: !state.isNameValid ||\n !state.isTypeValid ||\n state.validationState.isInProgress ||\n state.finalizationState.isInProgress, onClick: () => {\n state\n .applyChanges()\n .catch((error) => engine.alertUnhandledError(error));\n }, children: \"OK\" }), state instanceof DataCubeExistingColumnEditorState && (_jsxs(_Fragment, { children: [_jsx(\"button\", { className: \"ml-2 h-6 w-20 border border-neutral-400 bg-neutral-300 px-2 hover:brightness-95\", onClick: () => {\n state.manager\n .deleteColumn(state.initialData.name)\n .catch((error) => engine.alertUnhandledError(error));\n }, children: \"Delete\" }), _jsx(\"button\", { className: \"ml-2 h-6 w-20 border border-neutral-400 bg-neutral-300 px-2 hover:brightness-95\", onClick: () => {\n state\n .reset()\n .catch((error) => engine.alertUnhandledError(error));\n }, children: \"Reset\" })] })), _jsx(\"button\", { className: \"ml-2 h-6 w-20 border border-neutral-400 bg-neutral-300 px-2 hover:brightness-95\", onClick: () => state.close(), children: \"Cancel\" })] })] }));\n});\n//# sourceMappingURL=DataCubeColumnEditor.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { action, computed, makeObservable, observable, override } from 'mobx';\nimport { DataCubeColumnCreator } from '../../../components/view/extend/DataCubeColumnEditor.js';\nimport { editor as monacoEditorAPI, Uri } from 'monaco-editor';\nimport { ActionState, assertErrorThrown, guaranteeNonNullable, HttpStatus, NetworkClientError, uuid, } from '@finos/legend-shared';\nimport { buildExecutableQuery } from '../../core/DataCubeQueryBuilder.js';\nimport { DataCubeColumnDataType, DataCubeColumnKind, DEFAULT_LAMBDA_VARIABLE_NAME, getDataType, } from '../../core/DataCubeQueryEngine.js';\nimport { clearMarkers, CODE_EDITOR_LANGUAGE, setErrorMarkers, } from '@finos/legend-code-editor';\nimport { PRIMITIVE_TYPE, V1_deserializeValueSpecification, V1_Lambda, V1_serializeValueSpecification, } from '@finos/legend-graph';\nimport { _lambda } from '../../core/DataCubeQueryBuilderUtils.js';\nexport class DataCubeColumnBaseEditorState {\n uuid = uuid();\n view;\n manager;\n // NOTE: use UUID in the column name to prevent collision\n // when parsing/compiling the expression\n _name = `col_${this.uuid.replaceAll('-', '_')}`;\n display;\n validationState = ActionState.create();\n finalizationState = ActionState.create();\n name;\n expectedType;\n isGroupLevel;\n columnKind;\n code = '';\n codePrefix;\n codeSuffix;\n editor;\n editorModel;\n editorModelUri;\n codeError;\n returnType;\n constructor(manager, name, expectedType, isGroupLevel, columnKind) {\n makeObservable(this, {\n name: observable,\n setName: action,\n isNameValid: computed,\n expectedType: observable,\n setExpectedType: action,\n isTypeValid: computed,\n isGroupLevel: observable,\n columnKind: observable,\n setColumnKind: action,\n editor: observable.ref,\n setEditor: action,\n codeError: observable.ref,\n showError: action,\n clearError: action,\n returnType: observable,\n setReturnType: action,\n });\n this.manager = manager;\n this.view = manager.view;\n this.display = this.newDisplay(this);\n this.name = name;\n this.expectedType = expectedType;\n this.isGroupLevel = isGroupLevel;\n this.columnKind = columnKind;\n this.codePrefix = `->extend(~${this._name}:`;\n this.codeSuffix = `)`;\n this.editorModelUri = Uri.file(`/${this.uuid}.pure`);\n this.editorModel = monacoEditorAPI.createModel('', CODE_EDITOR_LANGUAGE.PURE, this.editorModelUri);\n }\n async initialize() {\n this.code = await this.getInitialCode();\n this.editorModel.setValue(this.code);\n }\n setName(value) {\n this.name = value;\n }\n get isNameValid() {\n return !this.manager.allColumnNames.includes(this.name);\n }\n setExpectedType(value) {\n this.expectedType = value;\n }\n get isTypeValid() {\n return (this.returnType !== undefined &&\n this.expectedType === getDataType(this.returnType));\n }\n setColumnKind(isGroupLevel, columnKind) {\n this.isGroupLevel = isGroupLevel;\n this.columnKind = columnKind;\n }\n setEditor(editor) {\n this.editor = editor;\n }\n setReturnType(value) {\n this.returnType = value;\n }\n showError(error) {\n this.codeError = error;\n if (error.sourceInformation) {\n setErrorMarkers(this.editorModel, [\n {\n message: error.message,\n startLineNumber: error.sourceInformation.startLine,\n startColumn: error.sourceInformation.startColumn,\n endLineNumber: error.sourceInformation.endLine,\n endColumn: error.sourceInformation.endColumn,\n },\n ], this.uuid);\n }\n }\n clearError() {\n this.codeError = undefined;\n clearMarkers(this.uuid);\n }\n buildExtendBaseQuery() {\n const currentSnapshot = guaranteeNonNullable(this.manager.getLatestSnapshot());\n const snapshot = currentSnapshot.clone();\n if (!this.isGroupLevel) {\n snapshot.data.leafExtendedColumns = [];\n snapshot.data.selectColumns = [];\n snapshot.data.filter = undefined;\n snapshot.data.groupBy = undefined;\n snapshot.data.pivot = undefined;\n }\n snapshot.data.groupExtendedColumns = [];\n snapshot.data.sortColumns = [];\n snapshot.data.limit = undefined;\n return _lambda([], [\n buildExecutableQuery(snapshot, this.manager.view.source, () => undefined, this.manager.view.engine.filterOperations, this.manager.view.engine.aggregateOperations),\n ]);\n }\n async getReturnType() {\n this.validationState.inProgress();\n // properly reset the error state before revalidating\n this.clearError();\n this.setReturnType(undefined);\n try {\n const returnRelationType = await this.view.engine.getQueryCodeRelationReturnType(this.codePrefix + this.code + this.codeSuffix, this.buildExtendBaseQuery(), this.view.source);\n let returnType = returnRelationType.columns.find((col) => col.name === this._name)?.type;\n returnType =\n returnType &&\n Object.values(PRIMITIVE_TYPE).includes(returnType)\n ? returnType\n : undefined;\n this.setReturnType(returnType);\n return returnType;\n }\n catch (err) {\n assertErrorThrown(err);\n if (err instanceof NetworkClientError &&\n err.response.status === HttpStatus.BAD_REQUEST) {\n this.validationState.fail();\n // correct the source information since we added prefix to the code\n // and reveal error in the editor\n const error = err.payload;\n if (error.sourceInformation) {\n error.sourceInformation.startColumn -=\n error.sourceInformation.startLine === 1\n ? this.codePrefix.length\n : 0;\n error.sourceInformation.endColumn -=\n error.sourceInformation.endLine === 1 ? this.codePrefix.length : 0;\n const fullRange = this.editorModel.getFullModelRange();\n if (error.sourceInformation.startLine < 1 ||\n (error.sourceInformation.startLine === 1 &&\n error.sourceInformation.startColumn < 1) ||\n error.sourceInformation.endLine > fullRange.endLineNumber ||\n (error.sourceInformation.endLine === fullRange.endLineNumber &&\n error.sourceInformation.endColumn > fullRange.endColumn)) {\n error.sourceInformation.startColumn = fullRange.startColumn;\n error.sourceInformation.startLine = fullRange.startLineNumber;\n error.sourceInformation.endColumn = fullRange.endColumn;\n error.sourceInformation.endLine = fullRange.endLineNumber;\n }\n }\n this.showError(err.payload);\n return undefined;\n }\n this.view.engine.alertError(err, {\n message: `Expression Validation Failure: ${err.message}`,\n });\n }\n finally {\n this.validationState.complete();\n }\n return undefined;\n }\n close() {\n // dispose the editor and its model to avoid memory leak\n this.editorModel.dispose();\n this.editor?.dispose();\n this.display.close();\n }\n}\nexport class DataCubeNewColumnState extends DataCubeColumnBaseEditorState {\n initialCode;\n constructor(manager, referenceColumn) {\n super(manager, `col_${manager.allColumnNames.length + 1}`, referenceColumn\n ? getDataType(referenceColumn.type)\n : DataCubeColumnDataType.NUMBER, false, referenceColumn ? referenceColumn.kind : DataCubeColumnKind.MEASURE);\n this.initialCode = referenceColumn\n ? `${DEFAULT_LAMBDA_VARIABLE_NAME}|$${DEFAULT_LAMBDA_VARIABLE_NAME}.${referenceColumn.name}`\n : `${DEFAULT_LAMBDA_VARIABLE_NAME}|`;\n }\n async getInitialCode() {\n return this.initialCode;\n }\n newDisplay(state) {\n return this.view.engine.layout.newDisplay('Add New Column', () => _jsx(DataCubeColumnCreator, { state: this }), {\n x: 50,\n y: 50,\n width: 500,\n height: 300,\n minWidth: 300,\n minHeight: 200,\n center: false,\n });\n }\n async applyChanges() {\n if (!this.validationState.hasCompleted ||\n !this.isNameValid ||\n !this.isTypeValid) {\n return;\n }\n this.finalizationState.inProgress();\n let query;\n let returnType;\n try {\n [query, returnType] = await Promise.all([\n this.view.engine.parseValueSpecification(this.code, false),\n this.getReturnType(), // recompile to get the return type\n ]);\n }\n catch (error) {\n assertErrorThrown(error);\n this.view.engine.alertError(error, {\n message: `Expression Validation Failure: ${error.message}`,\n });\n return;\n }\n finally {\n this.finalizationState.complete();\n }\n if (!(query instanceof V1_Lambda)) {\n this.view.engine.alertError(new Error(), {\n message: `Expression Validation Failure: Expression must be a lambda.`,\n });\n return;\n }\n if (!returnType) {\n this.view.engine.alertError(new Error(), {\n message: `Expression Validation Failure: Can't compute expression return type.`,\n });\n return;\n }\n this.manager.addNewColumn({\n name: this.name,\n type: returnType,\n mapFn: V1_serializeValueSpecification(query, []),\n }, this.isGroupLevel, this.columnKind, this);\n this.close();\n }\n}\nexport class DataCubeExistingColumnEditorState extends DataCubeColumnBaseEditorState {\n initialData;\n constructor(manager, column, kind, isGroupLevel) {\n super(manager, column.name, getDataType(column.type), isGroupLevel, kind);\n makeObservable(this, {\n initialData: observable.ref,\n isNameValid: override,\n });\n this.initialData = {\n name: column.name,\n type: column.type,\n kind,\n isGroupLevel: isGroupLevel,\n mapFn: column.mapFn,\n };\n }\n get isNameValid() {\n return !this.manager.allColumnNames\n .filter((colName) => colName !== this.initialData.name)\n .includes(this.name);\n }\n async getInitialCode() {\n return this.view.engine.getValueSpecificationCode(V1_deserializeValueSpecification(this.initialData.mapFn, []), true);\n }\n newDisplay(state) {\n return this.view.engine.layout.newDisplay('Edit Column', () => _jsx(DataCubeColumnCreator, { state: this }), {\n x: 50,\n y: 50,\n width: 500,\n height: 300,\n minWidth: 300,\n minHeight: 200,\n center: false,\n });\n }\n async reset() {\n this.setName(this.initialData.name);\n this.setExpectedType(getDataType(this.initialData.type));\n this.setColumnKind(this.initialData.isGroupLevel, this.initialData.kind);\n await this.initialize();\n await this.getReturnType();\n }\n async applyChanges() {\n if (!this.validationState.hasCompleted ||\n !this.isNameValid ||\n !this.isTypeValid) {\n return;\n }\n this.finalizationState.inProgress();\n let query;\n let returnType;\n try {\n [query, returnType] = await Promise.all([\n this.view.engine.parseValueSpecification(this.code, false),\n this.getReturnType(), // recompile to get the return type\n ]);\n }\n catch (error) {\n assertErrorThrown(error);\n this.view.engine.alertError(error, {\n message: `Expression Validation Failure: ${error.message}`,\n });\n return;\n }\n finally {\n this.finalizationState.complete();\n }\n if (!(query instanceof V1_Lambda)) {\n this.view.engine.alertError(new Error(), {\n message: `Expression Validation Failure: Expression must be a lambda.`,\n });\n return;\n }\n if (!returnType) {\n this.view.engine.alertError(new Error(), {\n message: `Expression Validation Failure: Can't compute expression return type.`,\n });\n return;\n }\n await this.manager.updateColumn(this.initialData.name, {\n name: this.name,\n type: returnType,\n mapFn: V1_serializeValueSpecification(query, []),\n }, this.isGroupLevel, this.columnKind);\n }\n}\n//# sourceMappingURL=DataCubeColumnEditorState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { action, computed, makeObservable, observable } from 'mobx';\nimport {} from '../../core/DataCubeQuerySnapshot.js';\nimport { _toCol, } from '../../core/models/DataCubeColumn.js';\nimport { assertErrorThrown, deleteEntry, guaranteeNonNullable, HttpStatus, NetworkClientError, noop, uniqBy, } from '@finos/legend-shared';\nimport { DataCubeQuerySnapshotController } from '../DataCubeQuerySnapshotManager.js';\nimport { DataCubeConfiguration, } from '../../core/models/DataCubeConfiguration.js';\nimport { DataCubeExistingColumnEditorState, DataCubeNewColumnState, } from './DataCubeColumnEditorState.js';\nimport { DataCubeColumnDataType, DataCubeColumnKind, getDataType, } from '../../core/DataCubeQueryEngine.js';\nimport { buildDefaultColumnConfiguration } from '../../core/DataCubeConfigurationBuilder.js';\nimport { _lambda } from '../../core/DataCubeQueryBuilderUtils.js';\nclass DataCubeQueryExtendedColumnState {\n name;\n type;\n data;\n constructor(data) {\n makeObservable(this, {\n name: observable,\n type: observable,\n });\n this.name = data.name;\n this.type = data.type;\n this.data = data;\n }\n}\n/**\n * This query editor state backs the form editor for extend columns, i.e. creating new columns.\n */\nexport class DataCubeExtendManagerState extends DataCubeQuerySnapshotController {\n columnConfigurations = [];\n selectColumns = [];\n sourceColumns = [];\n horizontalPivotCastColumns = [];\n leafExtendedColumns = [];\n groupExtendedColumns = [];\n newColumnEditors = [];\n existingColumnEditors = [];\n constructor(view) {\n super(view);\n makeObservable(this, {\n sourceColumns: observable.ref,\n horizontalPivotCastColumns: observable.ref,\n leafExtendedColumns: observable,\n setLeafExtendedColumns: action,\n groupExtendedColumns: observable,\n setGroupExtendedColumns: action,\n allColumnNames: computed,\n addNewColumn: action,\n updateColumn: action,\n deleteColumn: action,\n applySnapshot: action,\n });\n }\n setLeafExtendedColumns(val) {\n this.leafExtendedColumns = val;\n }\n setGroupExtendedColumns(val) {\n this.groupExtendedColumns = val;\n }\n get allColumnNames() {\n return uniqBy([\n ...this.sourceColumns,\n ...this.leafExtendedColumns,\n ...this.groupExtendedColumns,\n ...this.horizontalPivotCastColumns,\n ], (col) => col.name).map((col) => col.name);\n }\n async openNewColumnEditor(referenceColumn) {\n const editor = new DataCubeNewColumnState(this, referenceColumn);\n await editor.initialize();\n this.newColumnEditors.push(editor);\n editor.display.open();\n }\n async openExistingColumnEditor(columnName) {\n const existingEditor = this.existingColumnEditors.find((editor) => editor.initialData.name === columnName);\n if (existingEditor) {\n existingEditor.display.open();\n return;\n }\n if (!this.leafExtendedColumns.find((col) => col.name === columnName) &&\n !this.groupExtendedColumns.find((col) => col.name === columnName)) {\n return;\n }\n const editor = new DataCubeExistingColumnEditorState(this, guaranteeNonNullable(this.leafExtendedColumns.find((col) => col.name === columnName) ??\n this.groupExtendedColumns.find((col) => col.name === columnName)).data, guaranteeNonNullable(this.columnConfigurations.find((col) => col.name === columnName)).kind, Boolean(this.groupExtendedColumns.find((col) => col.name === columnName)));\n await editor.initialize();\n this.existingColumnEditors.push(editor);\n editor.display.open();\n }\n addNewColumn(column, isGroupLevel, columnKind, editor) {\n const columnConfiguration = buildDefaultColumnConfiguration(column);\n if (columnKind) {\n columnConfiguration.kind = columnKind;\n columnConfiguration.excludedFromPivot =\n columnKind === DataCubeColumnKind.DIMENSION;\n }\n this.columnConfigurations.push(columnConfiguration);\n deleteEntry(this.newColumnEditors, editor);\n if (isGroupLevel) {\n this.groupExtendedColumns.push(new DataCubeQueryExtendedColumnState(column));\n }\n else {\n this.leafExtendedColumns.push(new DataCubeQueryExtendedColumnState(column));\n this.selectColumns.push(_toCol(column));\n }\n this.applyChanges();\n }\n async updateColumn(columnName, updatedColumn, isGroupLevel, columnKind) {\n if (!this.leafExtendedColumns.find((col) => col.name === columnName) &&\n !this.groupExtendedColumns.find((col) => col.name === columnName)) {\n return;\n }\n const columnConfiguration = guaranteeNonNullable(this.columnConfigurations.find((col) => col.name === columnName));\n const task = this.view.newTask('Column update check');\n const currentSnapshot = guaranteeNonNullable(this.getLatestSnapshot());\n const tempSnapshot = currentSnapshot.clone();\n tempSnapshot.data.leafExtendedColumns =\n tempSnapshot.data.leafExtendedColumns.filter((col) => col.name !== columnName);\n tempSnapshot.data.groupExtendedColumns =\n tempSnapshot.data.groupExtendedColumns.filter((col) => col.name !== columnName);\n tempSnapshot.data.selectColumns = tempSnapshot.data.selectColumns.filter((col) => col.name !== columnName);\n if (isGroupLevel) {\n tempSnapshot.data.groupExtendedColumns.push(updatedColumn);\n }\n else {\n tempSnapshot.data.leafExtendedColumns.push(updatedColumn);\n if (columnConfiguration.isSelected) {\n tempSnapshot.data.selectColumns.push(_toCol(updatedColumn));\n }\n }\n tempSnapshot.data.configuration = {\n ...tempSnapshot.data.configuration,\n columns: this.columnConfigurations.map((col) => {\n if (col.name === columnName) {\n return {\n ...col.serialize(),\n ..._toCol(updatedColumn),\n kind: columnKind,\n };\n }\n return col.serialize();\n }),\n };\n const codePrefix = `->`;\n const code = await this.view.engine.getPartialQueryCode(tempSnapshot, true);\n try {\n await this.view.engine.getQueryCodeRelationReturnType(codePrefix + code, _lambda([], [this.view.source.query]), this.view.source);\n }\n catch (error) {\n assertErrorThrown(error);\n if (error instanceof NetworkClientError &&\n error.response.status === HttpStatus.BAD_REQUEST) {\n this.view.engine.alertCodeCheckError(error.payload, code, codePrefix, {\n message: `Column Update Check Failure: Can't safely update column '${columnName}'. Check the query code below for more details.`,\n text: `Error: ${error.message}`,\n });\n }\n else {\n this.view.engine.alertError(error, {\n message: `Column Update Check Failure: Can't safely update column '${columnName}'.`,\n text: `Error: ${error.message}`,\n });\n }\n return;\n }\n finally {\n this.view.endTask(task);\n }\n this.setLeafExtendedColumns(this.leafExtendedColumns.filter((col) => col.name !== columnName));\n this.setGroupExtendedColumns(this.groupExtendedColumns.filter((col) => col.name !== columnName));\n this.selectColumns = this.selectColumns.filter((col) => col.name !== columnName);\n if (isGroupLevel) {\n this.setGroupExtendedColumns([\n ...this.groupExtendedColumns,\n new DataCubeQueryExtendedColumnState(updatedColumn),\n ]);\n }\n else {\n this.setLeafExtendedColumns([\n ...this.leafExtendedColumns,\n new DataCubeQueryExtendedColumnState(updatedColumn),\n ]);\n if (columnConfiguration.isSelected) {\n this.selectColumns.push(_toCol(updatedColumn));\n }\n }\n this.columnConfigurations = this.columnConfigurations.map((col) => {\n if (col.name === columnName) {\n col.kind =\n (columnKind ??\n getDataType(updatedColumn.type) === DataCubeColumnDataType.NUMBER)\n ? DataCubeColumnKind.MEASURE\n : DataCubeColumnKind.DIMENSION;\n col.name = updatedColumn.name;\n col.type = updatedColumn.type;\n col.excludedFromPivot = col.kind === DataCubeColumnKind.DIMENSION;\n }\n return col;\n });\n // close and remove editors for the updated column\n const matchingEditors = this.existingColumnEditors.filter((editor) => editor.initialData.name === columnName);\n matchingEditors.forEach((editor) => editor.display.close());\n this.existingColumnEditors = this.existingColumnEditors.filter((editor) => editor.initialData.name !== columnName);\n this.applyChanges();\n }\n async deleteColumn(columnName) {\n if (!this.leafExtendedColumns.find((col) => col.name === columnName) &&\n !this.groupExtendedColumns.find((col) => col.name === columnName)) {\n return;\n }\n const task = this.view.newTask('Column delete check');\n const currentSnapshot = guaranteeNonNullable(this.getLatestSnapshot());\n const tempSnapshot = currentSnapshot.clone();\n tempSnapshot.data.leafExtendedColumns =\n tempSnapshot.data.leafExtendedColumns.filter((col) => col.name !== columnName);\n tempSnapshot.data.groupExtendedColumns =\n tempSnapshot.data.groupExtendedColumns.filter((col) => col.name !== columnName);\n tempSnapshot.data.selectColumns = tempSnapshot.data.selectColumns.filter((col) => col.name !== columnName);\n tempSnapshot.data.configuration = {\n ...tempSnapshot.data.configuration,\n columns: this.columnConfigurations\n .filter((col) => col.name !== columnName)\n .map((col) => col.serialize()),\n };\n const codePrefix = `->`;\n const code = await this.view.engine.getPartialQueryCode(tempSnapshot, true);\n try {\n await this.view.engine.getQueryCodeRelationReturnType(codePrefix + code, _lambda([], [this.view.source.query]), this.view.source);\n }\n catch (error) {\n assertErrorThrown(error);\n if (error instanceof NetworkClientError &&\n error.response.status === HttpStatus.BAD_REQUEST) {\n this.view.engine.alertCodeCheckError(error.payload, code, codePrefix, {\n message: `Column Delete Check Failure: Can't safely delete column '${columnName}'. Check the query code below for more details.`,\n text: `Error: ${error.message}`,\n });\n }\n else {\n this.view.engine.alertError(error, {\n message: `Column Delete Check Failure: Can't safely delete column '${columnName}'.`,\n text: `Error: ${error.message}`,\n });\n }\n return;\n }\n finally {\n this.view.endTask(task);\n }\n this.setLeafExtendedColumns(this.leafExtendedColumns.filter((col) => col.name !== columnName));\n this.setGroupExtendedColumns(this.groupExtendedColumns.filter((col) => col.name !== columnName));\n this.columnConfigurations = this.columnConfigurations.filter((col) => col.name !== columnName);\n this.selectColumns = this.selectColumns.filter((col) => col.name !== columnName);\n // close and remove editors for the deleted column\n const matchingEditors = this.existingColumnEditors.filter((editor) => editor.initialData.name === columnName);\n matchingEditors.forEach((editor) => editor.display.close());\n this.existingColumnEditors = this.existingColumnEditors.filter((editor) => editor.initialData.name !== columnName);\n this.applyChanges();\n }\n getSnapshotSubscriberName() {\n return 'extend-manager';\n }\n async applySnapshot(snapshot, previousSnapshot) {\n const configuration = DataCubeConfiguration.serialization.fromJson(snapshot.data.configuration);\n this.columnConfigurations = configuration.columns;\n this.sourceColumns = snapshot.data.sourceColumns;\n this.leafExtendedColumns = snapshot.data.leafExtendedColumns.map((col) => new DataCubeQueryExtendedColumnState(col));\n this.groupExtendedColumns = snapshot.data.groupExtendedColumns.map((col) => new DataCubeQueryExtendedColumnState(col));\n this.horizontalPivotCastColumns = snapshot.data.pivot?.castColumns ?? [];\n this.selectColumns = snapshot.data.selectColumns.map(_toCol);\n // trigger re-compile in each existing column editor as the base query has changed\n [...this.newColumnEditors, ...this.existingColumnEditors].forEach((editor) => {\n editor.getReturnType().catch(noop());\n });\n }\n applyChanges() {\n const baseSnapshot = guaranteeNonNullable(this.getLatestSnapshot());\n const newSnapshot = baseSnapshot.clone();\n newSnapshot.data.configuration = {\n ...baseSnapshot.data.configuration,\n columns: this.columnConfigurations.map((col) => col.serialize()),\n };\n newSnapshot.data.leafExtendedColumns = this.leafExtendedColumns.map((col) => col.data);\n newSnapshot.data.groupExtendedColumns = this.groupExtendedColumns.map((col) => col.data);\n newSnapshot.data.selectColumns = [...this.selectColumns];\n newSnapshot.finalize();\n if (newSnapshot.hashCode !== baseSnapshot.hashCode) {\n this.publishSnapshot(newSnapshot);\n }\n }\n}\n//# sourceMappingURL=DataCubeExtendManagerState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DataCubeGridState } from './grid/DataCubeGridState.js';\nimport { DataCubeEditorState } from './editor/DataCubeEditorState.js';\nimport { assertErrorThrown, IllegalStateError, uuid, } from '@finos/legend-shared';\nimport { DataCubeQuerySnapshotManager } from './DataCubeQuerySnapshotManager.js';\nimport { DataCubeInfoState } from './DataCubeInfoState.js';\nimport { validateAndBuildQuerySnapshot } from '../core/DataCubeQuerySnapshotBuilder.js';\nimport { action, makeObservable, observable } from 'mobx';\nimport { DataCubeFilterEditorState } from './filter/DataCubeFilterEditorState.js';\nimport { DataCubeExtendManagerState } from './extend/DataCubeExtendManagerState.js';\nimport { AlertType } from '../../components/core/DataCubeAlert.js';\nclass DataCubeTask {\n uuid = uuid();\n name;\n startTime = Date.now();\n endTime;\n constructor(name) {\n this.name = name;\n }\n end() {\n this.endTime = Date.now();\n }\n}\nexport class DataCubeViewState {\n dataCube;\n engine;\n snapshotManager;\n info;\n editor;\n grid;\n filter;\n extend;\n runningTasks = new Map();\n _source;\n constructor(dataCube) {\n makeObservable(this, {\n runningTasks: observable,\n newTask: action,\n endTask: action,\n });\n this.dataCube = dataCube;\n this.engine = dataCube.engine;\n this.engine = dataCube.engine;\n // NOTE: snapshot manager must be instantiated before subscribers\n this.snapshotManager = new DataCubeQuerySnapshotManager(this);\n this.info = new DataCubeInfoState(this);\n this.editor = new DataCubeEditorState(this);\n this.grid = new DataCubeGridState(this);\n this.filter = new DataCubeFilterEditorState(this);\n this.extend = new DataCubeExtendManagerState(this);\n }\n get source() {\n if (!this._source) {\n throw new IllegalStateError('Source is not initialized');\n }\n return this._source;\n }\n newTask(name) {\n const task = new DataCubeTask(name);\n this.runningTasks.set(task.uuid, task);\n return task;\n }\n endTask(task) {\n task.end();\n this.runningTasks.delete(task.uuid);\n return task;\n }\n async initialize(initialInput) {\n const task = this.newTask('Initializing');\n try {\n await Promise.all([\n this.info,\n this.editor,\n this.grid,\n this.grid.controller,\n this.filter,\n this.extend,\n ].map(async (state) => {\n this.snapshotManager.registerSubscriber(state);\n }));\n const input = initialInput ?? (await this.engine.getInitialInput());\n if (!input) {\n this.dataCube.alertAction({\n message: `Initialization Failure: No initial input provided`,\n prompt: `Make sure to either specify the initial input when setting up DataCube or the initial input getter in engine.`,\n type: AlertType.ERROR,\n actions: [],\n });\n return;\n }\n this._source = input.source;\n const partialQuery = await this.engine.parseValueSpecification(input.query.query);\n const initialSnapshot = validateAndBuildQuerySnapshot(partialQuery, this.source, input.query);\n this.snapshotManager.broadcastSnapshot(initialSnapshot);\n }\n catch (error) {\n assertErrorThrown(error);\n this.dataCube.alertAction({\n message: `Initialization Failure: ${error.message}`,\n prompt: `Resolve the issue and reload the engine.`,\n type: AlertType.ERROR,\n actions: [],\n });\n }\n finally {\n this.endTask(task);\n }\n }\n}\n//# sourceMappingURL=DataCubeViewState.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { MarkdownTextViewer } from '@finos/legend-art';\nimport { isString } from '@finos/legend-shared';\nimport { observer } from 'mobx-react-lite';\nimport { useDataCube } from '../DataCubeProvider.js';\nexport const DocumentationPanel = observer(() => {\n const dataCube = useDataCube();\n const entry = dataCube.currentDocumentationEntry;\n if (!entry) {\n return null;\n }\n const content = entry.markdownText ?? entry.text;\n return (_jsxs(\"div\", { className: \"h-full w-full overflow-auto bg-white p-4\", children: [_jsx(\"div\", { className: \"mb-3 text-2xl font-bold\", children: entry.title }), content &&\n (isString(content) ? (_jsx(\"div\", { className: \"\", children: content })) : (_jsx(MarkdownTextViewer, { value: content })))] }));\n});\n//# sourceMappingURL=DataCubeDocumentationPanel.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { makeObservable, observable, action } from 'mobx';\nexport var DataCubeSettingKey;\n(function (DataCubeSettingKey) {\n DataCubeSettingKey[\"ENABLE_DEBUG_MODE\"] = \"engine.enableDebugMode\";\n DataCubeSettingKey[\"GRID_CLIENT_ROW_BUFFER\"] = \"engine.grid-client.rowBuffer\";\n DataCubeSettingKey[\"GRID_CLIENT_PURGE_CLOSED_ROW_NODES\"] = \"engine.grid-client.purgeClosedRowNodes\";\n DataCubeSettingKey[\"GRID_CLIENT_SUPPRESS_LARGE_DATASET_WARNING\"] = \"engine.grid-client.suppressLargeDatasetWarning\";\n})(DataCubeSettingKey || (DataCubeSettingKey = {}));\nexport const DEFAULT_SETTINGS = {\n [DataCubeSettingKey.ENABLE_DEBUG_MODE]: false,\n [DataCubeSettingKey.GRID_CLIENT_ROW_BUFFER]: 50,\n [DataCubeSettingKey.GRID_CLIENT_PURGE_CLOSED_ROW_NODES]: false,\n [DataCubeSettingKey.GRID_CLIENT_SUPPRESS_LARGE_DATASET_WARNING]: false,\n};\nexport class DataCubeSettings {\n dataCube;\n constructor(dataCube) {\n makeObservable(this, {\n enableDebugMode: observable,\n setEnableDebugMode: action,\n gridClientRowBuffer: observable,\n setGridClientRowBuffer: action,\n gridClientPurgeClosedRowNodes: observable,\n setGridClientPurgeClosedRowNodes: action,\n gridClientSuppressLargeDatasetWarning: observable,\n setGridClientSuppressLargeDatasetWarning: action,\n });\n this.dataCube = dataCube;\n }\n enableDebugMode = DEFAULT_SETTINGS[DataCubeSettingKey.ENABLE_DEBUG_MODE];\n gridClientRowBuffer = DEFAULT_SETTINGS[DataCubeSettingKey.GRID_CLIENT_ROW_BUFFER];\n gridClientPurgeClosedRowNodes = DEFAULT_SETTINGS[DataCubeSettingKey.GRID_CLIENT_PURGE_CLOSED_ROW_NODES];\n gridClientSuppressLargeDatasetWarning = DEFAULT_SETTINGS[DataCubeSettingKey.GRID_CLIENT_SUPPRESS_LARGE_DATASET_WARNING];\n setEnableDebugMode(value) {\n this.enableDebugMode = value;\n this.dataCube.onSettingChanged?.(DataCubeSettingKey.ENABLE_DEBUG_MODE, value);\n }\n setGridClientRowBuffer(value) {\n this.gridClientRowBuffer = value;\n this.dataCube.onSettingChanged?.(DataCubeSettingKey.GRID_CLIENT_ROW_BUFFER, value);\n this.propagateGridOptionUpdates();\n }\n setGridClientPurgeClosedRowNodes(value) {\n this.gridClientPurgeClosedRowNodes = value;\n this.dataCube.onSettingChanged?.(DataCubeSettingKey.GRID_CLIENT_PURGE_CLOSED_ROW_NODES, value);\n this.propagateGridOptionUpdates();\n }\n setGridClientSuppressLargeDatasetWarning(value) {\n this.gridClientSuppressLargeDatasetWarning = value;\n this.dataCube.onSettingChanged?.(DataCubeSettingKey.GRID_CLIENT_SUPPRESS_LARGE_DATASET_WARNING, value);\n }\n propagateGridOptionUpdates() {\n this.dataCube.runTaskForEachView((view) => {\n view.grid.client.updateGridOptions({\n rowBuffer: this.gridClientRowBuffer,\n purgeClosedRowNodes: this.gridClientPurgeClosedRowNodes,\n });\n });\n }\n}\n//# sourceMappingURL=DataCubeSettings.js.map","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { observer } from 'mobx-react-lite';\nimport { DataCubeIcon } from '@finos/legend-art';\nimport { FormCheckbox, FormNumberInput } from './DataCubeFormUtils.js';\nimport { useState } from 'react';\nimport { useDataCube } from '../DataCubeProvider.js';\nimport { DataCubeSettingKey, DEFAULT_SETTINGS, } from '../../stores/DataCubeSettings.js';\nexport const DataCubeSettingsPanel = observer(() => {\n const dataCube = useDataCube();\n // NOTE: this makes sure the changes are not applied until saved, but it generates\n // a lot of boilerplate code, consider using a more ergonomic approach when we need\n // to scale this to more settings.\n const [enableDebugMode, setEnableDebugMode] = useState(dataCube.settings.enableDebugMode);\n const [gridClientRowBuffer, setGridClientRowBuffer] = useState(dataCube.settings.gridClientRowBuffer);\n const [gridClientPurgeClosedRowNodes, setGridClientPurgeClosedRowNodes] = useState(dataCube.settings.gridClientPurgeClosedRowNodes);\n const [gridClientSuppressLargeDatasetWarning, setGridClientSuppressLargeDatasetWarning,] = useState(dataCube.settings.gridClientSuppressLargeDatasetWarning);\n const save = () => {\n dataCube.settings.setEnableDebugMode(enableDebugMode);\n dataCube.settings.setGridClientRowBuffer(gridClientRowBuffer);\n dataCube.settings.setGridClientPurgeClosedRowNodes(gridClientPurgeClosedRowNodes);\n dataCube.settings.setGridClientSuppressLargeDatasetWarning(gridClientSuppressLargeDatasetWarning);\n };\n const restoreDefaults = () => {\n setEnableDebugMode(DEFAULT_SETTINGS[DataCubeSettingKey.ENABLE_DEBUG_MODE]);\n setGridClientRowBuffer(DEFAULT_SETTINGS[DataCubeSettingKey.GRID_CLIENT_ROW_BUFFER]);\n setGridClientPurgeClosedRowNodes(DEFAULT_SETTINGS[DataCubeSettingKey.GRID_CLIENT_PURGE_CLOSED_ROW_NODES]);\n setGridClientSuppressLargeDatasetWarning(DEFAULT_SETTINGS[DataCubeSettingKey.GRID_CLIENT_SUPPRESS_LARGE_DATASET_WARNING]);\n save();\n };\n return (_jsxs(_Fragment, { children: [_jsx(\"div\", { className: \"h-[calc(100%_-_40px)] w-full p-2 pb-0\", children: _jsxs(\"div\", { className: \"h-full w-full select-none overflow-auto border border-neutral-300 bg-white p-2\", children: [_jsx(\"div\", { className: \"flex h-6\", children: _jsxs(\"div\", { className: \"flex h-full\", children: [_jsx(\"div\", { className: \"flex h-6 items-center text-xl font-medium\", children: _jsx(DataCubeIcon.Table, {}) }), _jsx(\"div\", { className: \"ml-1 flex h-6 items-center text-xl font-medium\", children: \"Grid\" })] }) }), _jsxs(\"div\", { className: \"mt-1.5\", children: [_jsx(\"div\", { className: \"font-medium\", children: \"Large Dataset Warning: Disabled\" }), _jsx(\"div\", { className: \"flex pr-2\", children: _jsx(FormCheckbox, { label: \"Suggests user to enable pagination when handling large datasets to improve performance.\", checked: gridClientSuppressLargeDatasetWarning, onChange: () => setGridClientSuppressLargeDatasetWarning(!gridClientSuppressLargeDatasetWarning) }) })] }), _jsxs(\"div\", { className: \"my-2\", children: [_jsx(\"div\", { className: \"font-medium\", children: \"Refresh Failed Data Fetch: Action\" }), _jsx(\"div\", { className: \"mb-1.5 text-sm text-neutral-700\", children: `Manually re-run all failed data fetches in the grid.` }), _jsx(\"div\", { className: \"flex pr-2\", children: _jsx(\"button\", { className: \"ml-2 h-5 min-w-16 border border-neutral-400 bg-neutral-300 px-2 text-sm first-of-type:ml-0 hover:brightness-95\", onClick: () => dataCube.refreshFailedDataFetches(), children: \"Run Action\" }) })] }), _jsxs(\"div\", { className: \"my-2\", children: [_jsx(\"div\", { className: \"font-medium\", children: \"Refresh Group Node Data: Enabled\" }), _jsx(\"div\", { className: \"flex pr-2\", children: _jsx(FormCheckbox, { label: \"Force refresh data when group node is opened.\", checked: gridClientPurgeClosedRowNodes, onChange: () => setGridClientPurgeClosedRowNodes(!gridClientPurgeClosedRowNodes) }) })] }), _jsxs(\"div\", { className: \"my-2\", children: [_jsx(\"div\", { className: \"font-medium\", children: \"Row Buffer\" }), _jsx(\"div\", { className: \"mb-1.5 text-sm text-neutral-700\", children: `Sets the number of rows the grid renders outside of the viewable area. e.g. if the buffer is 10 and your grid is showing 50 rows (as that's all that fits on your screen without scrolling), then the grid will actually render 70 in total (10 extra above and 10 extra below). Then when you scroll, the grid will already have 10 rows ready and waiting to show, no redraw is needed. A low small buffer will make initial draws of the grid faster; whereas a big one will reduce the redraw visible vertically scrolling.` }), _jsx(\"div\", { className: \"flex pr-2\", children: _jsx(FormNumberInput, { className: \"w-16 text-sm\", min: 10, step: 10, defaultValue: DEFAULT_SETTINGS[DataCubeSettingKey.GRID_CLIENT_ROW_BUFFER], value: gridClientRowBuffer, setValue: (value) => {\n setGridClientRowBuffer(value ??\n DEFAULT_SETTINGS[DataCubeSettingKey.GRID_CLIENT_ROW_BUFFER]);\n } }) })] }), _jsx(\"div\", { className: \"my-2 h-[1px] w-full bg-neutral-200\" }), _jsx(\"div\", { className: \"flex h-6\", children: _jsxs(\"div\", { className: \"flex h-full\", children: [_jsx(\"div\", { className: \"flex h-6 items-center text-xl font-medium\", children: _jsx(DataCubeIcon.Debug, {}) }), _jsx(\"div\", { className: \"ml-1 flex h-6 items-center text-xl font-medium\", children: \"Debug\" })] }) }), _jsxs(\"div\", { className: \"mt-1.5\", children: [_jsx(\"div\", { className: \"font-medium\", children: \"Debug Mode: Enabled\" }), _jsx(\"div\", { className: \"flex pr-2\", children: _jsx(FormCheckbox, { label: \"Enable debug logging when running data queries, updating snapshots, etc.\", checked: enableDebugMode, onChange: () => setEnableDebugMode(!enableDebugMode) }) })] })] }) }), _jsxs(\"div\", { className: \"flex h-10 items-center justify-end px-2\", children: [_jsx(\"button\", { className: \"ml-2 h-6 w-48 border border-neutral-400 bg-neutral-300 px-2 hover:brightness-95\", onClick: restoreDefaults, children: \"Restore Default Settings\" }), _jsx(\"button\", { className: \"ml-2 h-6 w-36 border border-neutral-400 bg-neutral-300 px-2 hover:brightness-95\", onClick: save, children: \"Save Settings\" })] })] }));\n});\n//# sourceMappingURL=DataCubeSettingsPanel.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {} from './core/DataCubeEngine.js';\nimport { DataCubeViewState } from './view/DataCubeViewState.js';\nimport { DocumentationPanel } from '../components/core/DataCubeDocumentationPanel.js';\nimport { DataCubeSettingsPanel } from '../components/core/DataCubeSettingsPanel.js';\nimport { ActionState, assertErrorThrown, } from '@finos/legend-shared';\nimport { AlertType, } from '../components/core/DataCubeAlert.js';\nimport { action, makeObservable, observable } from 'mobx';\nimport { DataCubeSettings } from './DataCubeSettings.js';\nexport class DataCubeState {\n engine;\n settings;\n initState = ActionState.create();\n settingsDisplay;\n documentationDisplay;\n // NOTE: when we support multiview, there can be multiple view states to support\n // the first one in that list will be taken as the main view state\n view;\n onNameChanged;\n onSettingChanged;\n initialInput;\n currentDocumentationEntry;\n currentActionAlert;\n constructor(engine, options) {\n makeObservable(this, {\n currentDocumentationEntry: observable,\n openDocumentationEntry: action,\n currentActionAlert: observable,\n alertAction: action,\n });\n this.engine = engine;\n this.settings = new DataCubeSettings(this);\n this.view = new DataCubeViewState(this);\n this.settingsDisplay = this.engine.layout.newDisplay('Settings', () => _jsx(DataCubeSettingsPanel, {}), {\n x: -50,\n y: 50,\n width: 600,\n height: 400,\n minWidth: 300,\n minHeight: 200,\n center: false,\n });\n this.documentationDisplay = this.engine.layout.newDisplay('Documentation', () => _jsx(DocumentationPanel, {}), {\n x: -50,\n y: -50,\n width: 400,\n height: 400,\n minWidth: 300,\n minHeight: 200,\n center: false,\n });\n this.onNameChanged = options?.onNameChanged;\n this.onSettingChanged = options?.onSettingChanged;\n this.initialInput = options?.initialInput;\n this.settings.enableDebugMode =\n options?.enableDebugMode !== undefined\n ? options.enableDebugMode\n : this.settings.enableDebugMode;\n this.settings.gridClientRowBuffer =\n options?.gridClientRowBuffer !== undefined\n ? options.gridClientRowBuffer\n : this.settings.gridClientRowBuffer;\n this.settings.gridClientPurgeClosedRowNodes =\n options?.gridClientPurgeClosedRowNodes !== undefined\n ? options.gridClientPurgeClosedRowNodes\n : this.settings.gridClientPurgeClosedRowNodes;\n this.settings.gridClientSuppressLargeDatasetWarning =\n options?.gridClientSuppressLargeDatasetWarning !== undefined\n ? options.gridClientSuppressLargeDatasetWarning\n : this.settings.gridClientSuppressLargeDatasetWarning;\n }\n getSettings() {\n return this.settings;\n }\n openDocumentationEntry(entry) {\n this.currentDocumentationEntry = entry;\n }\n alertAction(alert) {\n this.currentActionAlert = alert;\n }\n refreshFailedDataFetches() {\n this.runTaskForEachView((view) => {\n view.grid.client.retryServerSideLoads();\n });\n }\n runTaskForEachView(runner) {\n // TODO: When we support multi-view (i.e. multiple instances of DataCubes) we would need\n // to traverse through and update the configurations of all of their grid clients\n runner(this.view);\n }\n async initialize() {\n if (!this.initState.isInInitialState) {\n this.engine.logDebug('REPL store is re-initialized');\n return;\n }\n this.initState.inProgress();\n try {\n await this.engine.initialize();\n this.initState.pass();\n }\n catch (error) {\n assertErrorThrown(error);\n this.alertAction({\n message: `Initialization Failure: ${error.message}`,\n prompt: `Resolve the issue and reload the engine.`,\n type: AlertType.ERROR,\n actions: [],\n });\n this.initState.fail();\n }\n }\n}\n//# sourceMappingURL=DataCubeState.js.map","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { observer, useLocalObservable } from 'mobx-react-lite';\nimport { DataCubeIcon, DropdownMenu, DropdownMenuItem, useDropdownMenu, } from '@finos/legend-art';\nimport { DataCubeLayoutManager } from './core/DataCubeLayoutManager.js';\nimport { INTERNAL__MonacoEditorWidgetsRoot } from './core/DataCubePureCodeEditorUtils.js';\nimport { DataCubeBlockingActionAlert } from './core/DataCubeAlert.js';\nimport { DataCubeView } from './DataCubeView.js';\nimport { useEffect } from 'react';\nimport { DataCubeState } from '../stores/DataCubeState.js';\nimport {} from '../stores/DataCubeOptions.js';\nimport { DataCubeContextProvider, useDataCube } from './DataCubeProvider.js';\nconst DataCubeTitleBar = observer(() => {\n const dataCube = useDataCube();\n const engine = dataCube.engine;\n const view = dataCube.view;\n const [openMenuDropdown, closeMenuDropdown, menuDropdownProps] = useDropdownMenu();\n return (_jsxs(\"div\", { className: \"flex h-6 justify-between bg-neutral-100\", children: [_jsxs(\"div\", { className: \"flex select-none items-center pl-1 pr-2 text-lg font-medium\", children: [_jsx(DataCubeIcon.Cube, { className: \"mr-1 h-4 w-4\" }), _jsx(\"div\", { children: view.info.name })] }), _jsxs(\"div\", { children: [_jsx(\"button\", { className: \"flex h-6 w-6 flex-shrink-0 items-center justify-center text-lg\", onClick: openMenuDropdown, children: _jsx(DataCubeIcon.Menu, {}) }), _jsxs(DropdownMenu, { ...menuDropdownProps, menuProps: {\n anchorOrigin: { vertical: 'top', horizontal: 'left' },\n transformOrigin: { vertical: 'top', horizontal: 'right' },\n classes: {\n paper: 'rounded-none mt-[1px]',\n list: 'w-36 p-0 rounded-none border border-neutral-400 bg-white max-h-40 overflow-y-auto py-0.5',\n },\n }, children: [_jsx(DropdownMenuItem, { className: \"flex h-[22px] w-full items-center px-2.5 text-base hover:bg-neutral-100 focus:bg-neutral-100\", onClick: () => {\n const url = engine.getDocumentationURL();\n if (url) {\n engine.openLink(url);\n }\n closeMenuDropdown();\n }, disabled: true, children: \"See Documentation\" }), _jsx(\"div\", { className: \"my-0.5 h-[1px] w-full bg-neutral-200\" }), _jsx(DropdownMenuItem, { className: \"flex h-[22px] w-full items-center px-2.5 text-base hover:bg-neutral-100 focus:bg-neutral-100\", onClick: () => {\n view.dataCube.settingsDisplay.open();\n closeMenuDropdown();\n }, children: \"Settings...\" })] })] })] }));\n});\nconst DataCubeRoot = observer(() => {\n const dataCube = useDataCube();\n const engine = dataCube.engine;\n const view = dataCube.view;\n useEffect(() => {\n dataCube.view\n .initialize()\n .catch((error) => dataCube.engine.logUnhandledError(error));\n }, [dataCube]);\n return (_jsxs(\"div\", { className: \"data-cube relative flex h-full w-full flex-col bg-white\", children: [_jsx(DataCubeTitleBar, {}), _jsx(DataCubeView, { view: view }), _jsx(DataCubeLayoutManager, { layout: engine.layout }), _jsx(DataCubeBlockingActionAlert, {}), _jsx(INTERNAL__MonacoEditorWidgetsRoot, {})] }));\n});\nexport const DataCube = observer((props) => {\n const { engine, options } = props;\n const state = useLocalObservable(() => new DataCubeState(engine, options));\n useEffect(() => {\n state\n .initialize()\n .catch((error) => state.engine.logUnhandledError(error));\n }, [state]);\n if (!state.initState.hasSucceeded) {\n return _jsx(_Fragment, {});\n }\n return (_jsx(DataCubeContextProvider, { value: state, children: _jsx(DataCubeRoot, {}) }));\n});\n//# sourceMappingURL=DataCube.js.map","import { Fragment as _Fragment, jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useEffect } from 'react';\nimport { observer } from 'mobx-react-lite';\nimport { ApplicationComponentFrameworkProvider, SimpleApplicationComponentFrameworkProvider, } from './ApplicationComponentFrameworkProvider.js';\nimport { useApplicationStore } from './ApplicationStoreProvider.js';\nimport { useApplicationPlatform } from './ApplicationPlatformProvider.js';\nexport const ApplicationFrameworkProvider = observer((props) => {\n const { children, simple } = props;\n const platform = useApplicationPlatform();\n const applicationStore = useApplicationStore();\n useEffect(() => {\n applicationStore\n .initialize(platform)\n .catch(applicationStore.alertUnhandledError);\n }, [applicationStore, platform]);\n if (!applicationStore.initState.hasSucceeded) {\n return _jsx(_Fragment, {});\n }\n // TODO: would be great if we can have <React.StrictMode> here but since Mobx React is not ready for\n // concurrency yet, we would have to wait\n // See https://github.com/mobxjs/mobx/issues/2526\n if (simple) {\n return (_jsx(SimpleApplicationComponentFrameworkProvider, { children: children }));\n }\n return (_jsx(ApplicationComponentFrameworkProvider, { children: children }));\n});\n//# sourceMappingURL=ApplicationFrameworkProvider.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { BrowserEnvironmentProvider, Route, Routes, } from '@finos/legend-application/browser';\nimport { observer } from 'mobx-react-lite';\nimport { useEffect, useMemo } from 'react';\nimport { formatDate, guaranteeNonNullable, LogEvent, NetworkClient, } from '@finos/legend-shared';\nimport { LegendREPLServerClient } from '../stores/LegendREPLServerClient.js';\nimport { LegendREPLDataCubeEngine } from '../stores/LegendREPLDataCubeEngine.js';\nimport { DataCube, DataCubeSettingKey } from '@finos/legend-data-cube';\nimport { APPLICATION_EVENT, ApplicationFrameworkProvider, useApplicationStore, } from '@finos/legend-application';\nimport { LegendREPLDataCubeSource } from '../stores/LegendREPLDataCubeSource.js';\nconst LegendREPLDataCube = observer(() => {\n const application = useApplicationStore();\n const config = application.config;\n const engine = useMemo(() => new LegendREPLDataCubeEngine(application, new LegendREPLServerClient(new NetworkClient({\n baseUrl: config.useDynamicREPLServer\n ? window.location.origin +\n guaranteeNonNullable(config.baseAddress).replace('/repl/', '')\n : config.replUrl,\n }))), [application, config]);\n useEffect(() => {\n engine.blockNavigation(\n // Only block navigation in production\n // eslint-disable-next-line no-process-env\n [() => process.env.NODE_ENV === 'production'], undefined, () => {\n engine.logWarning(LogEvent.create(APPLICATION_EVENT.NAVIGATION_BLOCKED), `Navigation from the application is blocked`);\n });\n return () => {\n engine.unblockNavigation();\n };\n }, [engine]);\n return (_jsx(DataCube, { engine: engine, options: {\n onNameChanged(name, source) {\n const timestamp = source instanceof LegendREPLDataCubeSource\n ? source.timestamp\n : undefined;\n application.layoutService.setWindowTitle(`\\u229E ${name}${timestamp ? ` - ${formatDate(new Date(timestamp), 'HH:mm:ss EEE MMM dd yyyy')}` : ''}`);\n },\n onSettingChanged(key, value) {\n engine.persistSettingValue(key, value);\n },\n enableDebugMode: application.settingService.getBooleanValue(DataCubeSettingKey.ENABLE_DEBUG_MODE),\n gridClientRowBuffer: application.settingService.getNumericValue(DataCubeSettingKey.GRID_CLIENT_ROW_BUFFER),\n gridClientPurgeClosedRowNodes: application.settingService.getBooleanValue(DataCubeSettingKey.GRID_CLIENT_PURGE_CLOSED_ROW_NODES),\n gridClientSuppressLargeDatasetWarning: application.settingService.getBooleanValue(DataCubeSettingKey.GRID_CLIENT_SUPPRESS_LARGE_DATASET_WARNING),\n } }));\n});\nexport const LEGEND_REPL_GRID_CLIENT_ROUTE_PATTERN = Object.freeze({\n DATA_CUBE: `/dataCube`,\n});\nexport const LegendREPLRouter = observer(() => (_jsx(\"div\", { className: \"h-full\", children: _jsx(Routes, { children: _jsx(Route, { path: LEGEND_REPL_GRID_CLIENT_ROUTE_PATTERN.DATA_CUBE, element: _jsx(LegendREPLDataCube, {}) }) }) })));\nexport const LegendREPLWebApplication = (props) => {\n const { baseUrl } = props;\n return (_jsx(BrowserEnvironmentProvider, { baseUrl: baseUrl, children: _jsx(ApplicationFrameworkProvider, { simple: true, children: _jsx(LegendREPLRouter, {}) }) }));\n};\n//# sourceMappingURL=LegendREPLApplication.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createRoot } from 'react-dom/client';\nimport { LegendApplication, ApplicationStoreProvider, getApplicationRootElement, LegendApplicationPluginManager, Core_LegendApplicationPlugin, } from '@finos/legend-application';\nimport { LegendREPLApplicationConfig, } from './LegendREPLApplicationConfig.js';\nimport { LegendREPLWebApplication } from '../components/LegendREPLApplication.js';\nexport class LegendREPL extends LegendApplication {\n static create() {\n const application = new LegendREPL(new LegendApplicationPluginManager());\n application.withBasePlugins([new Core_LegendApplicationPlugin()]);\n return application;\n }\n async configureApplication(input) {\n return new LegendREPLApplicationConfig(input);\n }\n async loadApplication(application) {\n createRoot(getApplicationRootElement()).render(_jsx(ApplicationStoreProvider, { store: application, children: _jsx(LegendREPLWebApplication, { baseUrl: this.baseAddress }) }));\n }\n}\n//# sourceMappingURL=LegendREPL.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { WebConsole } from '@finos/legend-shared';\nimport { LegendREPL } from './application/LegendREPL.js';\nexport class LegendREPLWebApplication {\n static getPresetCollection() {\n return [];\n }\n static getPluginCollection() {\n return [new WebConsole()];\n }\n static run(baseUrl) {\n LegendREPL.create()\n .setup({ baseAddress: baseUrl })\n .withPresets(LegendREPLWebApplication.getPresetCollection())\n .withPlugins(LegendREPLWebApplication.getPluginCollection())\n .start()\n .catch((e) => {\n throw e;\n });\n }\n}\n//# sourceMappingURL=index.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { LegendREPLWebApplication } from '@finos/legend-application-repl';\nimport '../lib/tailwind.css'; // eslint-disable-line @finos/legend/no-cross-workspace-non-export-usage\nimport './index.css';\n\n// Resolve baseUrl relatively for application to work in vscode code-server\nconst relativeBaseUrl = new URL('./', window.location.href).pathname;\nLegendREPLWebApplication.run(relativeBaseUrl);\n","var map = {\n\t\"./simpleWorker\": 99246,\n\t\"./simpleWorker.js\": 99246\n};\n\nfunction webpackAsyncContext(req) {\n\treturn Promise.resolve().then(() => {\n\t\tif(!__webpack_require__.o(map, req)) {\n\t\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\t\te.code = 'MODULE_NOT_FOUND';\n\t\t\tthrow e;\n\t\t}\n\n\t\tvar id = map[req];\n\t\treturn __webpack_require__(id);\n\t});\n}\nwebpackAsyncContext.keys = () => (Object.keys(map));\nwebpackAsyncContext.id = 98933;\nmodule.exports = webpackAsyncContext;","var map = {\n\t\"./editorBaseApi\": [\n\t\t37970\n\t],\n\t\"./editorBaseApi.js\": [\n\t\t37970\n\t],\n\t\"./editorSimpleWorker\": [\n\t\t41122\n\t],\n\t\"./editorSimpleWorker.js\": [\n\t\t41122\n\t],\n\t\"./editorWorker\": [\n\t\t22143\n\t],\n\t\"./editorWorker.js\": [\n\t\t22143\n\t],\n\t\"./editorWorkerHost\": [\n\t\t70869\n\t],\n\t\"./editorWorkerHost.js\": [\n\t\t70869\n\t],\n\t\"./findSectionHeaders\": [\n\t\t97716\n\t],\n\t\"./findSectionHeaders.js\": [\n\t\t97716\n\t],\n\t\"./getIconClasses\": [\n\t\t45555\n\t],\n\t\"./getIconClasses.js\": [\n\t\t45555\n\t],\n\t\"./languageFeatureDebounce\": [\n\t\t26973\n\t],\n\t\"./languageFeatureDebounce.js\": [\n\t\t26973\n\t],\n\t\"./languageFeatures\": [\n\t\t33653\n\t],\n\t\"./languageFeatures.js\": [\n\t\t33653\n\t],\n\t\"./languageFeaturesService\": [\n\t\t78330\n\t],\n\t\"./languageFeaturesService.js\": [\n\t\t78330\n\t],\n\t\"./languageService\": [\n\t\t22155\n\t],\n\t\"./languageService.js\": [\n\t\t22155\n\t],\n\t\"./languagesAssociations\": [\n\t\t25709\n\t],\n\t\"./languagesAssociations.js\": [\n\t\t25709\n\t],\n\t\"./languagesRegistry\": [\n\t\t35074\n\t],\n\t\"./languagesRegistry.js\": [\n\t\t35074\n\t],\n\t\"./markerDecorations\": [\n\t\t86259\n\t],\n\t\"./markerDecorations.js\": [\n\t\t86259\n\t],\n\t\"./markerDecorationsService\": [\n\t\t72524\n\t],\n\t\"./markerDecorationsService.js\": [\n\t\t72524\n\t],\n\t\"./model\": [\n\t\t16911\n\t],\n\t\"./model.js\": [\n\t\t16911\n\t],\n\t\"./modelService\": [\n\t\t91320\n\t],\n\t\"./modelService.js\": [\n\t\t91320\n\t],\n\t\"./resolverService\": [\n\t\t55387\n\t],\n\t\"./resolverService.js\": [\n\t\t55387\n\t],\n\t\"./semanticTokensDto\": [\n\t\t7029,\n\t\t121\n\t],\n\t\"./semanticTokensDto.js\": [\n\t\t7029,\n\t\t121\n\t],\n\t\"./semanticTokensProviderStyling\": [\n\t\t4399\n\t],\n\t\"./semanticTokensProviderStyling.js\": [\n\t\t4399\n\t],\n\t\"./semanticTokensStyling\": [\n\t\t74566\n\t],\n\t\"./semanticTokensStyling.js\": [\n\t\t74566\n\t],\n\t\"./semanticTokensStylingService\": [\n\t\t28843\n\t],\n\t\"./semanticTokensStylingService.js\": [\n\t\t28843\n\t],\n\t\"./textModelSync/textModelSync.impl\": [\n\t\t43481\n\t],\n\t\"./textModelSync/textModelSync.impl.js\": [\n\t\t43481\n\t],\n\t\"./textModelSync/textModelSync.protocol\": [\n\t\t37619,\n\t\t121\n\t],\n\t\"./textModelSync/textModelSync.protocol.js\": [\n\t\t37619,\n\t\t121\n\t],\n\t\"./textResourceConfiguration\": [\n\t\t93533\n\t],\n\t\"./textResourceConfiguration.js\": [\n\t\t93533\n\t],\n\t\"./treeSitterParserService\": [\n\t\t47105\n\t],\n\t\"./treeSitterParserService.js\": [\n\t\t47105\n\t],\n\t\"./treeViewsDnd\": [\n\t\t29740,\n\t\t121\n\t],\n\t\"./treeViewsDnd.js\": [\n\t\t29740,\n\t\t121\n\t],\n\t\"./treeViewsDndService\": [\n\t\t95621,\n\t\t121\n\t],\n\t\"./treeViewsDndService.js\": [\n\t\t95621,\n\t\t121\n\t],\n\t\"./unicodeTextModelHighlighter\": [\n\t\t14818\n\t],\n\t\"./unicodeTextModelHighlighter.js\": [\n\t\t14818\n\t]\n};\nfunction webpackAsyncContext(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\treturn Promise.resolve().then(() => {\n\t\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\t\te.code = 'MODULE_NOT_FOUND';\n\t\t\tthrow e;\n\t\t});\n\t}\n\n\tvar ids = map[req], id = ids[0];\n\treturn Promise.all(ids.slice(1).map(__webpack_require__.e)).then(() => {\n\t\treturn __webpack_require__(id);\n\t});\n}\nwebpackAsyncContext.keys = () => (Object.keys(map));\nwebpackAsyncContext.id = 59135;\nmodule.exports = webpackAsyncContext;","// 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","__webpack_require__.amdD = function () {\n\tthrow new Error('define cannot be used indirect');\n};","__webpack_require__.amdO = {};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (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__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"static/\" + chunkId + \".\" + \"a0ce728d\" + \".js\";\n};","// This function allow to reference async chunks\n__webpack_require__.miniCssF = (chunkId) => {\n\t// return url for filenames based on template\n\treturn undefined;\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__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (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 = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.p = \"./\";","// no baseURI\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\t57: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\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((id) => (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 = globalThis[\"webpackChunk_finos_legend_application_repl_deployment\"] = globalThis[\"webpackChunk_finos_legend_application_repl_deployment\"] || [];\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, [121], () => (__webpack_require__(94601)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","leafPrototypes","getProto","inProgress","dataWebpackPrefix","LOG_LEVEL","PluginInfo","name","version","signature","uuid","constructor","this","getName","getVersion","getSignature","getUUID","getInfo","info","configure","configData","AbstractPluginManager","plugins","presets","usePlugins","usePresets","Object","keys","forEach","key","configObj","preset","plugin","install","filter","getHiddenPluginNames","includes","map","sort","a","b","localeCompare","getHiddenPresetNames","LogEvent","channel","timestamp","Date","now","create","event","LoggerPlugin","level","DEBUG","setLevel","pluginManager","registerLoggerPlugin","debug","data","_debug","INFO","_info","warn","WARN","_warn","error","ERROR","_error","LogService","loggers","registerPlugins","loggerPlugins","logger","console","WebConsole","super","length","noop","pruneObject","obj","pickBy","val","undefined","getNullableLastEntry","array","getNonNullableEntry","idx","message","deleteEntry","entryToDelete","comparator","val1","val2","findIndex","entry","splice","ApplicationError","Error","detail","EnrichedError","overideMessage","messageLines","match","stack","split","slice","join","captureStackTrace","IllegalStateError","unsupportedObject","value","opts","printFunctionName","maxDepth","replace","printObject","assertErrorThrown","returnUndefOnError","fn","AssertionError","isNullable","isNonNullable","assertType","clazz","guaranteeNonEmptyString","str","assertNonEmptyString","assertionValue","isNaN","guaranteeIsString","assertIsString","guaranteeIsNumber","assertIsNumber","guaranteeIsBoolean","assertIsBoolean","HttpStatus","CHARSET","HttpHeader","ContentType","HttpMethod","DEFAULT_CLIENT_REQUEST_OPTIONS","mode","credentials","redirect","mergeRequestHeaders","headersOne","headersTwo","requestHeaders","entries","NetworkClientError","response","payload","status","statusText","url","summary","JSON","stringify","payloadAsObject","parse","extractMessage","substring","processResponse","async","init","responseProcessConfig","preprocess","ok","text","Promise","reject","skipProcessing","resolve","NO_CONTENT","accept","headers","Accept","APPLICATION_JSON","json","TEXT_PLAIN","createRequestHeaders","method","baseRequestHeaders","GET","CONTENT_TYPE","NetworkClient","options","baseUrl","config","get","parameters","requestProcessConfig","request","put","PUT","post","POST","DELETE","requestUrl","URL","fullUrl","Array","isArray","subVal","searchParams","append","toString","makeUrl","body","enableCompression","Blob","compressData","APPLICATION_ZLIB","requestInit","fetch","then","UNAUTHORIZED","autoReAuthenticateUrl","id","previous","document","getElementById","remove","element","createElement","src","style","display","addEventListener","appendChild","autoReAuthenticate","resp","catch","TypeError","couldBeCORS","fileName","content","contentType","blob","type","createObjectURL","link","download","href","click","removeChild","location","getQueryParameters","isFullUrl","parseUrl","query","getQueryParameterValue","paramValue","decodeURIComponent","APPLICATION_EVENT","SerializationFactory","schema","deserializeNullAsUndefined","Boolean","toJson","fromJson","optionalCustom","serializer","deserializer","additionalArgs","optionalCustomUsingModelSchema","deserializeArray","values","itemDeserializer","skipIfEmpty","serializeArray","itemSerializer","customList","INTERNAL__forceReturnEmptyInTest","DocumentationEntry","markdownText","title","related","static","documentationKey","serialization","collectKeyedDocumentationEntriesFromConfig","rawEntries","DocumentationService","links","docRegistry","Map","contextualDocIndex","applicationStore","documentationUrl","documentationLinkEntries","getApplicationPlugins","flatMap","getExtraKeyedDocumentationEntries","hasDocEntry","logService","DOCUMENTATION_LOAD__SKIP","set","keyedDocumentationEntries","contextualDocEntries","getExtraContextualDocumentationEntries","missingDocumentationEntries","uniq","getExtraRequiredDocumentationKeys","concat","has","push","DOCUMENTATION_REQUIREMENT_CHECK__FAILURE","hasContextualDocEntry","context","CONTEXTUAL_DOCUMENTATION_LOAD__SKIP","existingDocEntry","getDocEntry","getContextualDocEntry","getAllDocEntries","from","publishDocRegistry","result","publishContextualDocIndex","ACTION_STATE","CORE_TRACER_TAG","ActionState","state","_message","_messageFormatter","INITIAL","setMessage","setMessageFormatter","reset","IN_PROGRESS","fail","FAILED","pass","SUCCEEDED","complete","hasSucceeded","sync","exportData","isInInitialState","isInProgress","hasFailed","hasCompleted","Trace","traceEntries","setup","bootstrap","clientSpan","reportSuccess","concludeClientSpan","reportError","close","concludeServerSpan","serverSpan","TracerService","createTrace","traceData","trace","createClientSpan","createServerSpan","FuzzySearchEngine","ADVANCED_FUZZY_SEARCH_MODE","VIRTUAL_ASSISTANT_TAB","FuzzySearchAdvancedConfigState","currentMode","STANDARD","onSearchModeChange","isAdvancedSearchActive","setCurrentMode","generateSearchText","INCLUDE","EXACT","INVERSE","VirtualAssistantDocumentationEntry","isOpen","docEntry","setIsOpen","VirtualAssistantContextualDocumentationEntry","isValidVirtualAssistantDocumentationEntry","shouldDisplayVirtualAssistantDocumentationEntry","AssistantService","panelRenderingKey","isDisabled","isHidden","isPanelMaximized","selectedTab","SEARCH","currentDocumentationEntry","searchEngine","searchConfigurationState","searchState","searchText","searchResults","showSearchConfigurationMenu","isOverSearchLimit","currentContextualDocumentationEntry","setIsDisabled","setIsHidden","setIsPanelMaximized","setSelectedTab","setSearchText","resetSearch","search","openDocumentationEntry","refreshPanelRendering","setShowSearchConfigurationMenu","documentationService","includeScore","shouldSort","ignoreLocation","threshold","weight","useExtendedSearch","navigationContextService","currentContext","openDocumentationEntryLink","navigationService","navigator","visitAddress","hideAssistant","toggleAssistant","limit","DOCUMENTATION_SEARCH_RESULTS_LIMIT","item","EventService","notifierPlugins","registerEventNotifierPlugins","notify","LegendApplicationTelemetryHelper","logEvent_ApplicationInitializationSucceeded","service","logEvent","APPLICATION_LOAD__SUCCESS","application","appName","appVersion","env","browser","userAgent","screen","height","window","width","logEvent_ApplicationContextAccessed","APPLICATION_CONTEXT__ACCESS","logEvent_VirtualAssistantDocumentationEntryAccessed","VIRTUAL_ASSISTANT_DOCUMENTATION_ENTRY__ACCESS","logEvent_ApplicationUsageInterrupted","APPLICATION_USAGE__INTERRUPT","ApplicationNavigationContextService","contextStack","pop","newContextStack","ctx","isTransient","find","getExtraAccessEventLoggingApplicationContextKeys","telemetryService","existingCtx","indexOf","CommandService","commandRegistry","registerCommand","deregisterCommand","command","commandKey","COMMAND_CENTER_REGISTRATION__FAILURE","delete","runCommand","args","trigger","action","KeyboardShortcutsService","keyMap","commandKeyMap","isHotkeysBlocked","addHotkey","blockGlobalHotkeys","unblockGlobalHotkeys","getExtraKeyedCommandConfigEntries","shortcuts","defaultKeyboardShortcut","additionalKeyboardShortcuts","shortcut","keyCombination","dispatch","mappedCommandKeys","commandService","DEFAULT_DATE_TIME_FORMAT","DISPLAY_ANSI_ESCAPE","ANSI_moveCursor","line","column","ConsoleSearchConfiguration","searchInput","useRegex","matchWholeWord","matchCaseSensitive","resultCount","currentResultIndex","setSearchInput","el","focus","Console","searchConfig","setSearchRegex","setSearchWholeWord","setSearchCaseSensitive","setSearchResultCount","setSearchCurrentResultIndex","Terminal","preserveLog","setPreserveLog","showHelp","showCommonANSIEscapeSequences","capitalize","toUpperCase","TITLE_CASE_EXCEPTION_WORDS","toTitleCase","trim","toLowerCase","KEYBOARD_NAMED_KEY","parseKeybinding","press","modifiers","isMatchingKeyPressData","keyPressData","code","every","modifier","getModifierState","SHIFT","META","ALT","CONTROL","isMatchingKeyCombination","createKeybindingsHandler","possibleMatches","timer","KeyboardEvent","uniqBy","combinations","combination","handler","parsedKeyCombination","remainingExpectedKeyPresses","currentExpectedKeyPress","clearTimeout","setTimeout","clear","bind","LegendCustomMUITheme","createTheme","transitions","components","MuiButtonBase","defaultProps","disableRipple","LegendStyleProvider","props","children","StyledEngineProvider","injectFirst","ThemeProvider","theme","LocalizationProvider","dateAdapter","generateSimpleDIVComponent","componentName","divClassName","component","className","displayName","Modal","darkMode","ModalTitle","icon","ModalHeader","ModalBody","ModalFooter","ActionAlertType","ActionAlertActionType","AlertService","blockingAlertInfo","actionAlertInfo","setBlockingAlert","setActionAlertInfo","alertInfo","keyboardShortcutsService","notificationService","notifyIllegalState","ApplicationStoreContext","createContext","useApplicationStore","useContext","ApplicationStoreProvider","store","Provider","getActionButtonClassName","PROCEED_WITH_CAUTION","PROCEED","ActionAlertContent","prompt","onClose","onEnter","actions","handleClose","alertService","Dialog","open","TransitionProps","onSubmit","preventDefault","default","onClick","e","autoFocus","label","ActionAlert","PanelLoadingIndicator","isLoading","ref","useRef","useEffect","current","parentElement","classList","add","BlockingAlert","classes","root","container","layoutService","TEMPORARY__isLightColorThemeEnabled","showLoading","CloseIcon","ThinVerticalDragHandleIcon","TimesIcon","TimesCircleIcon","CogIcon","QuestionCircleIcon","InfoCircleIcon","SearchIcon","MinusCircleIcon","CheckCircleIcon","ExclamationTriangleIcon","BugIcon","EmptyWindowRestoreIcon","WindowMaximizeIcon","MapMarkerIcon","WizardHatIcon","FaceLaughWinkIcon","FaceSadTearIcon","BeardIcon","SunglassesIcon","ChevronDownIcon","ChevronUpIcon","ChevronRightIcon","DEFAULT_NOTIFICATION_HIDE_TIME","NOTIFCATION_SEVERITY","Notification","severity","autoHideDuration","NotificationService","notification","setNotification","notifySuccess","notifyWarning","notifyError","SUCCESS","WARNING","getErrorMessage","ILEGAL_STATE","notifyUnsupportedFeature","featureName","notifyAndReturnAlternativeOnError","alternative","NotificationManager","isExpanded","setIsExpanded","useState","notificationIcon","handleCopy","guardUnhandledError","clipboardService","copyTextToClipboard","anchorOriginBottomRight","anchorOrigin","vertical","horizontal","reason","tabIndex","otherProps","paper","list","transitionDuration","ContextMenu","menuProps","disabled","onOpen","contextMenuRoot","anchorEl","setAnchorEl","left","setLeft","top","setTop","stopPropagation","onContextMenu","containerRect","getBoundingClientRect","containerLeft","scrollX","documentElement","scrollLeft","containerTop","scrollY","scrollTop","clientX","clientY","target","eventTarget","elementsFromPoint","some","anchorPosition","anchorReference","BackdropProps","invisible","disableRestoreFocus","MenuContent","forwardRef","MenuContentItem","MarkdownTextViewer","initialize","startOnLoad","contentLoaded","remarkPlugins","_props","node","rest","exec","groups","language","BlankPanelContent","contentRef","contentWidth","contentHeight","u","refreshMode","refreshRate","refreshOptions","trailing","showContent","setShowContent","containerRef","containerWidth","containerHeight","DEFAULT_CONTENT_PADDING","BaseRadioGroup","size","targetOptionsValuesInMatrix","arr","stepSize","matrix","i","transformToMatrix","row","op","FormControlLabel","control","Radio","checked","BasePopover","LEGEND_APPLICATION_DOCUMENTATION_KEY","VirtualAssistantDocumentationEntryViewer","toggleExpand","copyDocumentationKey","elevation","rel","VirtualAssistantContextualSupportPanel","contextualEntry","assistantService","copyContextIDToClipboard","copyCurrentContextIDToClipboard","copyContextStackToClipboard","VirtualAssistantSearchPanel","searchInputRef","debouncedSearch","useMemo","debounce","querySelectorAll","activeElement","spellCheck","onChange","placeholder","QUESTION_HOW_TO_USE_ADVANCED_SEARCH_SYNTAX","searchMode","format","VirtualAssistantPanel","triggerElement","extraViewConfigurations","getExtraVirtualAssistantViewConfigurations","currentExtensionView","hideBackdrop","PaperProps","disableEnforceFocus","transformOrigin","onKeyDown","CONTEXTUAL_SUPPORT","autoExpandOnOpen","renderer","VirtualAssistant","isDragging","setIsDragging","_key","_setKey","assistantRef","toggleAssistantPanel","bounds","onStart","onStop","nodeRef","handle","APPLICATION_COMPONENT_ELEMENT_ID","PLATFORM_NATIVE_KEYBOARD_SHORTCUTS","buildHotkeysConfiguration","keyCombinations","BackdropContainer","elementId","ApplicationComponentFrameworkProvider","keyBindingMap","onKeyEvent","removeEventListener","onVisibilityChange","hidden","timeService","recordUsageInterruption","showBackdrop","Portal","getElementByID","backdropContainerElementID","BACKDROP_CONTAINER","Backdrop","DndProvider","backend","TOP_LEVEL_CONTAINER","SimpleApplicationComponentFrameworkProvider","LEGEND_XTERM_THEME","foreground","background","cursor","selectionBackground","black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite","LEGEND_XTERM_SEARCH_THEME","matchOverviewRuler","activeMatchColorOverviewRuler","matchBackground","activeMatchBackground","DEFAULT_COMMAND_HEADER","BOLD","BRIGHT_BLUE","RESET","MAGENTA","COMMAND_START","RegexLinkProvider","terminal","regex","provideLinks","lineNumber","callback","computeLink","range","activate","startLineIndex","translateBufferLineToStringWithWrap","rex","RegExp","source","flags","stringIndex","lastIndex","start","stringIndexToBufferPosition","end","lineIndex","lineWrapsToNext","prevLinesToWrap","lineString","buffer","active","getLine","isWrapped","nextLine","translateToString","cols","reportLastCell","cell","getNullCell","x","y","getCell","getChars","getWidth","XTerm","instance","resizer","searcher","linkProvider","_TEMPORARY__onKeyListener","_TEMPORARY__onDataListener","commandHistory","currentCommandSearchString","commandHistoryNavigationIdx","isRunningCommand","setupState","allowProposedApi","fontSize","letterSpacing","fontWeight","fontWeightBold","fontFamily","tabStopWidth","overviewRulerWidth","scrollback","convertEol","scrollOnUserInput","configuration","onContextLoss","dispose","loadAddon","unicode","activeVersion","attachCustomKeyEventHandler","hasSelection","webLinkProvider","registerLinkProvider","commands","commandConfig","aliases","TERMINAL_COMMAND_CONFIGURATION_CHECK__FAILURE","onDidChangeResults","resultIndex","onKey","domEvent","replaceAll","addCommandToHistory","matchingCommand","arg","finally","isFlushed","abort","deleteFromCommand","altKey","ctrlKey","computeCursorJumpMovement","movement","computeCursorMovement","scrollLines","scroll","write","seq","writeToCommand","dispatchEvent","setCommandFromHistory","onData","startsWith","trimEnd","getCommandRange","commandText","commandFirstLine","repeat","startY","cursorIdx","baseY","cursorY","cursorX","startX","endY","endX","back","distance","foundWord","charAt","rows","maxDistance","Math","min","abs","newCursorX","newCursorY","abs_cursorY","ceil","max","floor","viewportY","right","setCommand","cursorMovement","isSetup","isFocused","textarea","mount","autoResize","fit","at","unshift","padEnd","newCommand","newSystemCommand","DIM","flushScreen","isLastLineEmpty","lineText","scrollToTop","resetANSIStyling","scrollToBottom","BRIGHT_BLACK","BRIGHT_GREEN","description","usage","chunk","systemCommand","output","findNext","decorations","wholeWord","caseSensitive","incremental","clearSearch","clearDecorations","clearSelection","findPrevious","getContent","lines","copy","getSelection","alertUnhandledError","copyAll","TerminalService","UNKNOWN_USER_ID","IdentityService","currentUser","setCurrentUser","isAnonymous","LEGEND_APPLICATION_COLOR_THEME","LocalStorage","localStorage","setItem","getItem","removeItem","hasItem","StorageStore","storeIndex","storageService","getIndex","getValue","getNumericValue","getStringValue","getBooleanValue","getObjectValue","assertIsObject","guaranteeIsObject","hasValue","persistValue","updateIndex","StorageService","storage","applicationStorageKey","index","isEmpty","TelemetryService","userId","identityService","appEnv","appSessionId","appStartTime","eventType","TimeService","interruptions","finalizeTimingsRecord","stopWatch","timings","totalTime","elapsed","startTime","endTime","record","fromEntries","records","total","numberOfInteruptions","interruption","__numberOfInteruptions","DEFAULT_DARK_COLOR_THEME","DEFAULT_DARK","TEMPORARY__globalCSSClassName","colors","LEGACY_LIGHT_COLOR_THEME","LEGACY_LIGHT","HIGH_CONTRAST_LIGHT_COLOR_THEME","HIGH_CONTRAST_LIGHT","LEGEND_APPLICATION_SETTING_KEY","LEGEND_APPLICATION_SETTING_CONFIG","COLOR_THEME","defaultValue","LayoutService","colorThemeRegistry","currentColorTheme","setBackdropContainerElementID","setShowBackdrop","setColorTheme","getExtraColorThemes","colorTheme","COLOR_THEME_CONFIGURATION_CHECK__FAILURE","themeKey","settingService","TEMPORARY__syncGlobalCSSClassName","querySelector","setWindowTitle","previousTheme","newColorTheme","previousColorTheme","persist","getColor","ClipboardService","clipboard","writeText","notifySuccessMessage","NavigationService","SettingService","registry","getExtraSettingConfigurationEntries","SETTING_CONFIGURATION_CHECK__FAILURE","SETTING_RETRIVE_FAILURE","DefaultNavigator","goToLocation","reload","goToAddress","address","generateAddress","updateCurrentLocation","updateCurrentZone","zone","resetZone","getCurrentBaseAddress","getCurrentAddress","getCurrentLocation","getCurrentLocationParameters","getCurrentLocationParameterValue","getCurrentZone","blockNavigation","blockCheckers","onBlock","onNativePlatformNavigationBlock","unblockNavigation","isNavigationBlocked","INTERNAL__internalizeTransientParameter","UserDataService","USER_DATA_RETRIEVE_FAILURE","isSemVer","test","RELEASE_UPDATE_TYPE","APPLICATION_LAST_OPENED_VERSION","ReleaseNotesService","releaseNotes","showCurrentReleaseModal","showReleaseLog","isConfigured","setShowCurrentRelease","setReleaseLog","release","notes","note","collectReleaseNotes","getViewedVersion","userDataService","updateViewedVersion","showVersion","versionNotes","lastOpenedVersion","numeric","showableVersions","ApplicationStore","extensionStates","initState","platform","terminalService","releaseNotesService","eventService","tracerService","getLoggerPlugins","getEventNotifierPlugins","getTelemetryServicePlugins","getTracerServicePlugins","getExtraApplicationExtensionStateBuilders","creator","getNavigator","APPLICATION_LOAD__FAILURE","logUnhandledError","ILLEGAL_APPLICATION_STATE_OCCURRED","actionFn","DOWNLOAD_EVENTS","LegendApplicationLogger","LegendApplicationWebConsole","LegendApplication","basePresets","basePlugins","baseAddress","pluginRegister","_isConfigured","downloadHelperServiceWorkerPath","downloadHelper","withBasePresets","withPresets","withBasePlugins","withPlugins","withDownloadHelper","path","withReleaseNotes","setupApplicationStore","fetchApplicationConfiguration","client","versionData","origin","APPLICATION_CONFIGURATION__FAILURE","configureApplication","extensions","loadDocumentationRegistryData","all","documentationRegistryEntries","getExtraDocumentationRegistryEntries","simple","docData","patterns","pattern","DOCUMENTATION_FETCH__FAILURE","extensionConfigData","getExtraApplicationSetups","loadApplication","workerPath","serviceWorker","register","reg","registerDownloadHelperServiceWorker","LEGEND_APPLICATION_ROOT_ELEMENT_TAG","LegendApplicationPluginManager","telemetryServicePlugins","tracerServicePlugins","eventNotifierPlugins","applicationPlugins","registerTelemetryServicePlugin","registerTracerServicePlugin","registerEventNotifierPlugin","registerApplicationPlugin","LegendApplicationPlugin","Core_LegendApplicationPlugin","NAME","LegendApplicationConfig","appVersionBuildTime","appVersionCommitId","input","storageKey","getDefaultApplicationStorageKey","documentation","contextualEntries","buildTime","commitSHA","resolveAbsoluteUrl","LegendREPLApplicationConfig","replUrl","useDynamicREPLServer","repl","dynamic","LEGEND_APPLICATION_PARAM_TOKEN","stripTrailingSlash","_url","endsWith","BrowserNavigator","navigate","_isNavigationBlocked","_forceBypassNavigationBlocking","_blockCheckers","_beforeUnloadListener","checker","returnValue","ignoreBlocking","onProceed","hash","withAppRoot","pathname","history","pushState","onpopstate","forward","currentZone","params","stringifyQueryParams","ApplicationPlatform","BrowserPlatform","initialColorTheme","INITIAL_COLOR_THEME","ApplicationPlatformContext","BrowserPlatformProvider","BrowserEnvironmentProvider","basename","TailwindCSSPalette","transparent","slate","gray","zinc","neutral","stone","orange","amber","lime","emerald","teal","sky","indigo","violet","purple","fuchsia","pink","rose","ROOT_PACKAGE_NAME","ATOMIC_TEST_TYPE","PRIMITIVE_TYPE","CORE_PURE_PATH","MILESTONING_STEREOTYPE","MILESTONING_VERSION_PROPERTY_SUFFIX","PackageableElementPointerType","SUPPORTED_FUNCTIONS","DataCubeFunction","DataCubeNumberScale","DataCubeFont","DataCubeFontTextAlignment","DataCubeFontCase","DataCubeFontFormatUnderlineVariant","DataCubeColumnKind","DataCubeOperationAdvancedValueType","DataCubeQueryAggregateOperator","DataCubeQueryClientSideAggregateOperator","DataCubeQueryFilterOperator","DataCubeQueryFilterGroupOperator","DataCubeQuerySortDirection","DataCubeColumnPinPlacement","DataCubeColumnDataType","getDataType","NUMBER","INTEGER","DECIMAL","FLOAT","DATE","STRICTDATE","DATETIME","TIME","STRING","TEXT","ofDataType","dataTypes","PIVOT_COLUMN_NAME_VALUE_SEPARATOR","isPivotResultColumnName","columnName","getPivotResultColumnBaseColumnName","lastIndexOf","TREE_COLUMN_VALUE_SEPARATOR","DEFAULT_LAMBDA_VARIABLE_NAME","DEFAULT_TREE_COLUMN_SORT_DIRECTION","ASCENDING","DEFAULT_URL_LABEL_QUERY_PARAM","DEFAULT_GRID_LINE_COLOR","DEFAULT_ROW_HIGHLIGHT_BACKGROUND_COLOR","DEFAULT_FONT_FAMILY","ROBOTO","DEFAULT_FONT_BOLD","DEFAULT_FONT_ITALIC","DEFAULT_FONT_UNDERLINED","DEFAULT_FONT_STRIKETHROUGH","DEFAULT_TEXT_ALIGN","LEFT","DEFAULT_FOREGROUND_COLOR","DEFAULT_BACKGROUND_COLOR","DEFAULT_ROW_BACKGROUND_COLOR","DEFAULT_NEGATIVE_FOREGROUND_COLOR","DEFAULT_ZERO_FOREGROUND_COLOR","DEFAULT_ERROR_FOREGROUND_COLOR","DataCubeColumnConfiguration","kind","DIMENSION","decimals","displayCommas","negativeNumberInParens","numberScale","missingValueDisplayText","fontBold","fontItalic","fontUnderline","fontStrikethrough","fontCase","textAlign","normalForegroundColor","negativeForegroundColor","zeroForegroundColor","errorForegroundColor","normalBackgroundColor","negativeBackgroundColor","zeroBackgroundColor","errorBackgroundColor","isSelected","hideFromView","blur","fixedWidth","minWidth","maxWidth","pinned","displayAsLink","linkLabelParameter","aggregateOperator","aggregationParameters","excludedFromPivot","pivotSortDirection","pivotStatisticColumnFunction","serialize","DataCubePivotLayoutConfiguration","expandedPaths","DataCubeConfiguration","columns","showHorizontalGridLines","showVerticalGridLines","gridLineColor","alternateRows","alternateRowsStandardMode","alternateRowsColor","alternateRowsCount","showSelectionStats","showWarningForTruncatedResult","initialExpandLevel","showRootAggregation","showLeafCount","treeColumnSortDirection","pivotStatisticColumnName","pivotStatisticColumnPlacement","pivotLayout","DataCubeQuery","QuerySource","runtime","mapping","GetBaseQueryResult","LegendREPLServerClient","networkClient","dataCube","getInfrastructureInfo","getQueryTypeahead","parseValueSpecification","getValueSpecificationCode","ACCEPT","getBaseQuery","getQueryRelationReturnType","getQueryCodeRelationReturnType","executeQuery","generateDefaultFilterConditionPrimitiveTypeValue","BOOLEAN","BYTE","btoa","BINARY","DataCubeQueryFilterOperation","getAggregateOperation","operator","aggregateOperations","DataCubeQueryAggregateOperation","V1_ValueSpecification","V1_Variable","multiplicity","genericType","accept_ValueSpecificationVisitor","visitor","visit_Variable","V1_GraphFetchTree","subTrees","subTypeTrees","CORE_HASH_STRUCTURE","sha1","update","digest","hashCode","V1_RootGraphFetchTree","class","accept_GraphFetchTreeVisitor","visit_RootGraphFetchTree","ROOT_GRAPH_FETCH_TREE","lowerBound","upperBound","MULTIPLICITY","V1_CoreClassInstance","ONE","V1_Lambda","visit_Lambda","V1_DataTypeValueSpecification","V1_Path","startType","V1_AbstractAppliedFunction","function","fControl","visit_AppliedFunction","V1_Collection","ONE_MANY","visit_Collection","V1_PrimitiveValueSpecification","V1_CDecimal","visit_CDecimal","V1_CInteger","visit_CInteger","V1_CString","visit_CString","V1_CFloat","visit_CFloat","V1_CDate","V1_CDateTime","visit_CDateTime","V1_CStrictDate","visit_CStrictDate","V1_CStrictTime","visit_CStrictTime","V1_CBoolean","visit_CBoolean","V1_AggregateValue","mapFn","aggregateFn","V1_Pair","first","second","V1_RuntimeInstance","V1_ExecutionContextInstance","executionContext","V1_PropertyGraphFetchTree","property","alias","subType","visit_PropertyGraphFetchTree","PROPERTY_GRAPH_FETCH_TREE","V1_SubTypeGraphFetchTree","subTypeClass","visit_SubTypeGraphFetchTree","SUBTYPE_GRAPH_FETCH_TREE","V1_SerializationConfig","includeType","typeKeyName","includeEnumType","removePropertiesWithNullValues","removePropertiesWithEmptySets","fullyQualifiedTypePath","includeObjectReference","V1_KeyExpression","expression","visit_KeyExpression","V1_PureList","V1_TDSAggregateValue","pmapFn","V1_TDSColumnInformation","columnFn","V1_TDSSortInformation","direction","V1_TDSOlapRank","V1_TDSOlapAggregation","V1_ColSpecArray","colSpecs","V1_ColSpec","function1","function2","V1_RelationStoreAccessor","V1_PackageableElement","package","PACKAGEABLE_ELEMENT","V1_sourceInformationSerialization","sourceId","startLine","startColumn","endLine","endColumn","V1_INTERNAL__PackageableElementWithSourceInformation","sourceInformation","PACKAGEABLE_ELEMENT_POINTER","V1_multiplicityModelSchema","V1_PathElement","V1_PropertyPathElement","V1_AppliedProperty","visit_AppliedProperty","V1_Runtime","mappings","connectionStores","connections","ENGINE_RUNTIME","SINGLE_ENGINE_RUNTIME","V1_RuntimePointer","RUNTIME_POINTER","V1_RuntimeType","V1_runtimePointerModelSchema","_type","runtimeValue","PACKAGEABLE_RUNTIME","accept_PackageableElementVisitor","visit_PackageableRuntime","V1_serializeRuntimeValue","protocol","V1_deserializeRuntimeValue","V1_ExecutionContext","queryTimeOutInSeconds","enableConstraints","V1_AnalyticsExecutionContext","useAnalytics","toFlowSetFunction","V1_BaseExecutionContext","V1_PackageableElementPtr","fullPath","visit_PackageableElementPtr","V1_PackageableType","V1_GenericTypeInstance","typeArguments","visit_GenericTypeInstance","V1_ClassInstance","visit_ClassInstance","V1_GenericType","rawType","multiplicityArguments","typeVariableValues","extractElementNameFromPath","findLast","functionName","functionFullPaths","functionFullPath","V1_Type_Type","V1_PackageableTypeSchema","PackageableType","V1_GenericTypeModelSchema","V1_serializeType","V1_deserializeType","appendAnyGenericType","_anytype","ANY","arGenType","V1_RawRawTypeSchemaModel","V1_RawGenricTypeSchemaModelInner","V1_ExecutionContextType","V1_PathElementType","V1_GraphFetchTreeType","V1_ClassInstanceType","V1_ValueSpecificationType","V1_variableModelSchema","VARIABLE","genType","packageableType","TABULAR_RESULT","classPath","V1_getGenericTypeFullPath","V1_deserializeGenericType","beforeDeserialize","jsonValue","jsonParentValue","parentVal","V1_lambdaModelSchema","LAMBDA","V1_serializeValueSpecification","keyExpressionModelSchema","KEY_EXPRESSION","appliedFunctionModelSchema","APPLIED_FUNCTION","appliedPropertyModelSchema","APPLIED_PROPERTY","V1_packageableElementPtrSchema","isType","PACKAGEABLE_ELEMENT_PTR","genericTypeInstanceSchema","GENERIC_TYPE_INSTANCE","deserializeHackedUnit","unitType","deserializeHackedClass","collectionModelSchema","COLLECTION","enumValueModelSchema","visit_EnumValue","ENUM_VALUE","CDecimalModelSchema","CDECIMAL","CIntegerModelSchema","CINTEGER","CStringModelSchema","CSTRING","CFloatModelSchema","CFLOAT","CDateTimeModelSchema","CDATETIME","CStrictTimeModelSchema","CSTRICTTIME","CStrictDateModelSchema","CSTRICTDATE","CLatestDateModelSchema","visit_CLatestDate","CLATESTDATE","CBooleanModelSchema","CBOOLEAN","CByteArrayModelSchema","visit_CByteArray","CBYTEARRAY","deserializePrimitiveValueSpecification","collection","ZERO","classInstanceModelSchema","CLASS_INSTANCE","pathModelSchema","rootGraphFetchTreeModelSchema","executionContextInstanceModelSchema","aggregationValueModelSchema","pairModelSchema","pureListModelSchema","runtimeInstanceModelSchema","serializationConfigModelSchema","tdsAggregrateValueModelSchema","tdsColumnInformationModelSchema","tdsOlapAggregationModelSchema","tdsOlapRankModelSchema","tdsSortInformationModelSchema","colSpecModelSchema","colSpecArrayModelSchema","relationStoreAccessorModelSchema","serializers","V1_getExtraClassInstanceValueProtocolSerializers","V1_serializeClassInstanceValue","PATH","AGGREGATE_VALUE","EXECUTION_CONTEXT_INSTANCE","PAIR","PURE_LIST","RUNTIME_INSTANCE","SERIALIZATION_CONFIG","TDS_AGGREGATE_VALUE","TDS_COLUMN_INFORMATION","TDS_OLAP_AGGREGATION","TDS_OLAP_RANK","TDS_SORT_INFORMATION","COL_SPEC","COL_SPEC_ARRAY","RELATION_STORE_ACCESSOR","deserializers","V1_getExtraClassInstanceValueProtocolDeserializers","V1_deserializeClassInstanceValue","propertyPathElementModelSchema","PROPERTY_PATH_ELEMENT","V1_serializePathElement","V1_deserializePathElement","V1_serializeGraphFetchTree","V1_deserializeGraphFetchTree","propertyGraphFetchTreeModelSchema","subTypeGraphFetchTreeModelSchema","V1_getExtraGraphFetchProtocolSerializers","V1_getExtraGraphFetchProtocolDeserializers","analyticsExecutionContextModelSchema","ANALYTICS_EXECUTION_CONTEXT","baseExecutionContextModelSchema","BASE_EXECUTION_CONTEXT","V1_serializeExecutionContext","V1_deserializeExecutionContext","V1_serializeRuntime","includeEnumTypee","removePropertiesWithNullValuese","removePropertiesWithEmptySetse","fullyQualifiedTypePathe","includeObjectReferencee","V1_ValueSpecificationSerializer","visit_INTERNAL__UnknownValueSpecfication","valueSpecification","HACKED_CLASS","UNIT_TYPE","HACKED_UNIT","ENUM","CLASS","MAPPING_INSTANCE","_deserializeLambda","_var","variable","_property","_lambda","lambda","PURE_AUTO_IMPORT_PACKAGE_PATHS","_functionName","funcNameOrPath","funcPakagePath","extractPackagePathFromPath","_function","func","_collection","_primitiveValue","_val","primitiveValue","STRICTTIME","_elementPtr","ptr","_classInstance","_colSpec","colSpec","_value","COLUMN","_not","NOT","_col","_cols","colSpecArray","fixEmptyAggCols","aggCols","COUNT","_aggCol_basic","_pivotAggCols","pivotColumns","snapshot","MEASURE","col","groupExtendedColumns","agg","operation","aggCol","buildAggregateColumn","_castCols","RELATION","_groupByAggCols","groupByColumns","pivot","pivotResultColumns","castColumns","pivotGroupByColumns","baseAggColName","matchingColumnConfiguration","columnConfiguration","_filter","filterOperations","filterGroup","groupOperation","groupOperator","AND","OR","conditions","condition","groupCondition","not","filterCondition","buildConditionExpression","DataCubeQueryAggregateOperation__Sum","textLabel","SUM","isCompatibleWithColumn","DataCubeQueryAggregateOperation__Average","AVERAGE","DataCubeQueryAggregateOperation__Count","DataCubeQueryAggregateOperation__Min","MIN","DataCubeQueryAggregateOperation__Max","MAX","DataCubeQueryAggregateOperation__UniqueValue","UNIQUE","UNIQUE_VALUE_ONLY","DataCubeQueryAggregateOperation__First","FIRST","DataCubeQueryAggregateOperation__Last","LAST","DataCubeQueryAggregateOperation__VariancePopulation","VARIANCE_POPULATION","DataCubeQueryAggregateOperation__VarianceSample","VARIANCE_SAMPLE","DataCubeQueryAggregateOperation__StdDevPopulation","STANDARD_DEVIATION_POPULATION","DataCubeQueryAggregateOperation__StdDevSample","STANDARD_DEVIATION_SAMPLE","DataCubeQueryAggregateOperation__JoinStrings","JOIN_STRINGS","DataCubeQueryFilterOperation__Equal","EQUAL","isCompatibleWithValue","generateDefaultValue","buildConditionSnapshot","DataCubeQueryFilterOperation__LessThanOrEqual","LESS_THAN_OR_EQUAL","DataCubeQueryFilterOperation__LessThan","LESS_THAN","DataCubeQueryFilterOperation__GreaterThanOrEqual","GREATER_THAN_OR_EQUAL","DataCubeQueryFilterOperation__GreaterThan","GREATER_THAN","DataCubeQueryFilterOperation__NotEqual","NOT_EQUAL","DataCubeQueryFilterOperation__EqualColumn","EQUAL_COLUMN","DataCubeQueryFilterOperation__EqualCaseInsensitive","EQUAL_CASE_INSENSITIVE","TO_LOWERCASE","DataCubeQueryFilterOperation__NotEqualCaseInsensitive","NOT_EQUAL_CASE_INSENSITIVE","DataCubeQueryFilterOperation__EqualCaseInsensitiveColumn","EQUAL_CASE_INSENSITIVE_COLUMN","DataCubeQueryFilterOperation__NotEqualCaseInsensitiveColumn","NOT_EQUAL_CASE_INSENSITIVE_COLUMN","DataCubeQueryFilterOperation__NotEqualColumn","NOT_EQUAL_COLUMN","DataCubeQueryFilterOperation__LessThanColumn","LESS_THAN_COLUMN","DataCubeQueryFilterOperation__LessThanOrEqualColumn","LESS_THAN_OR_EQUAL_COLUMN","DataCubeQueryFilterOperation__GreaterThanColumn","GREATER_THAN_COLUMN","DataCubeQueryFilterOperation__GreaterThanOrEqualColumn","GREATER_THAN_OR_EQUAL_COLUMN","DataCubeQueryFilterOperation__Contain","CONTAIN","CONTAINS","DataCubeQueryFilterOperation__ContainCaseInsensitive","CONTAIN_CASE_INSENSITIVE","DataCubeQueryFilterOperation__NotContain","NOT_CONTAIN","DataCubeQueryFilterOperation__StartWith","START_WITH","STARTS_WITH","DataCubeQueryFilterOperation__StartWithCaseInsensitive","START_WITH_CASE_INSENSITIVE","DataCubeQueryFilterOperation__NotStartWith","NOT_START_WITH","DataCubeQueryFilterOperation__EndWith","END_WITH","ENDS_WITH","DataCubeQueryFilterOperation__EndWithCaseInsensitive","END_WITH_CASE_INSENSITIVE","DataCubeQueryFilterOperation__NotEndWith","NOT_END_WITH","DataCubeQueryFilterOperation__IsNull","IS_NULL","IS_EMPTY","DataCubeQueryFilterOperation__IsNotNull","IS_NOT_NULL","PURE_GRAMMAR_TOKEN","buildCodeEditorTheme","vscodeThemeData","baseTheme","colorsOverride","rulesOverride","baseThemeData","rawData","rules","tokenColors","tokenColor","settings","scopes","scope","baseRule","fontStyle","rule","token","base","inherit","parseVSCodeTheme","BASE_PURE_LANGUAGE_COLOR_TOKENS","IDENTIFIER","COLOR","PACKAGE","PARSER","LANGUAGE_STRUCT","GENERICS","PROPERTY","PARAMETER","TYPE","CODE_EDITOR_THEME","DEFAULT_DARK_THEME","SOLARIZED_DARK_THEME","BUILT_IN__VSCODE_DARK","GITHUB_DARK_THEME","GITHUB_LIGHT_THEME","BUILT_IN__VSCODE_LIGHT","GITHUB_DARK_DIMMED_THEME","MATERIAL_DEFAULT_THEME","MATERIAL_DARKER_THEME","ONE_DARK_PRO_THEME","ONE_DARK_PRO_DARKER_THEME","INTERNAL__DUMMY_PROBLEM_MARKER_OWNER","setErrorMarkers","editorModel","errors","ownerId","setModelMarkers","startLineNumber","endLineNumber","MarkerSeverity","CODE_EDITOR_LANGUAGE","PURE_ELEMENT_NAME","PURE_CONNECTION_NAME","PURE_PARSER","wordPattern","comments","lineComment","blockComment","brackets","autoClosingPairs","surroundingPairs","folding","markers","buildExecutableQuery","executionContextBuilder","sequence","funcMap","_process","_functionCompositionProcessor","leafExtendedColumns","leafExtendedFuncs","EXTEND","FILTER","selectColumns","SELECT","SORT","PIVOT","CAST","groupBy","GROUP_BY","DESCENDING","groupExtendedFuncs","sortColumns","LIMIT","pagination","SLICE","postProcessor","DataCubeSource","sourceColumns","INTERNAL__DataCubeSource","cn","inputs","DataCubeIcon","AdvancedSettings","AlertError","AlertInfo","AlertWarning","Calculate","Calendar","CaretDown","CaretRight","Checkbox","CheckboxSelected","ChevronLeft","ChevronRight","ChevronDown","CircleChecked","CircledFailed","Code","Cube","Debug","Documentation","DocumentationHint","FilterAddOperator","FilterRemoveOperator","FilterGroupOperator","FilterNotOperator","FontBold","FontCase","FontItalic","FontUnderline","FontStrikethrough","LetterCase","Loader","Menu","Note","Pin","Search","Settings","Table","TableColumn","TableColumnOptions__Settings","TableColumns","TableExtendedColumn","TableFilter","TableFilterPlus","TableFilterCode","TableGroupBy","TableOptions","TablePagination","TablePivot","TablePlus","TableRemoveColumn","TableRow","TableRowColumn","TableScroll","TableSort","TextAlignLeft","TextAlignCenter","TextAlignRight","Window","X","Warning","WarningCircle","DataCubeStateContext","DataCubeContextProvider","useDataCube","AlertType","Alert","BlockingActionAlertContent","alert","slotProps","backdrop","alertAction","DataCubeBlockingActionAlert","actionAlert","currentActionAlert","LayoutConfiguration","contentRenderer","WindowState","WINDOW_DEFAULT_OFFSET","DEFAULT_TOOL_PANEL_WINDOW_CONFIG","minHeight","center","DEFAULT_SMALL_ALERT_WINDOW_CONFIG","DEFAULT_LARGE_ALERT_WINDOW_CONFIG","DisplayState","layoutManagerState","bringWindowFront","newWindow","closeWindow","LayoutManagerState","windows","newDisplay","windowConfiguration","w","PURE_CODE_EDITOR_WORD_SEPARATORS","MONACO_EDITOR_OVERFLOW_WIDGETS_ROOT_ID","INTERNAL__MonacoEditorWidgetsRoot","DataCubeCodeCheckErrorAlert","editorRef","editor","setEditor","newEditor","contextmenu","copyWithSyntaxHighlighting","fontLigatures","fixedOverflowWidgets","detectIndentation","tabSize","automaticLayout","PURE","GITHUB_LIGHT","wordSeparators","overflowWidgetsDomNode","readOnly","renderValidationDecorations","setModel","position","hasTextFocus","revealPositionInCenter","setPosition","moveCursorToPosition","DataCubeEngine","layout","fetchConfiguration","gridClientLicense","extraKeywords","setLicenseKey","onError","defineTheme","SOLARIZED_DARK","GITHUB_DARK","GITHUB_DARK_DIMMED","MATERIAL_DEFAULT","MATERIAL_DARKER","ONE_DARK_PRO","ONE_DARK_PRO_DARKER","fontLoadFailureErrorMessage","fonts","load","check","remeasureFonts","configureCodeEditor","ROBOTO_MONO","setLanguageConfiguration","setMonarchTokensProvider","defaultToken","tokenPostfix","keywords","ASSOCIATION","ENUMERATION","PROFILE","FUNCTION","MAPPING","RUNTIME","CONNECTION","FILE_GENERATION","GENERATION_SPECIFICATION","DATA_ELEMENT","JSON_MODEL_CONNECTION","MODEL_CHAIN_CONNECTION","XML_MODEL_CONNECTION","SERVICE","FLAT_DATA","DATABASE","FLAT_DATA_CONNECTION","RELATIONAL_DATABASE_CONNECTION","operators","languageStructs","identifier","symbols","escapes","digits","octaldigits","binarydigits","hexdigits","generics","date","time","tokenizer","include","cases","KEYWORD","OPERATOR","DELIMITER","pure","WHITESPACE","color","number","whitespace","COMMENT","comment","doc","string","characters","getFilterOperation","getInitialInput","getPartialQueryCode","pretty","getDocumentationURL","getDocumentationEntry","shouldDisplayDocumentationEntry","logDebug","debugProcess","processName","logInfo","logWarning","logError","logIllegalStateError","windowTitle","windowConfig","alertError","alertCodeCheckError","codePrefix","createModel","Uri","file","fullRange","getFullModelRange","openLink","sendTelemetry","BuilderType","ExecutionActivityType","EXECUTION_SERIALIZATION_FORMAT","ResultBuilder","ExecutionActivities","RelationalExecutionActivities","sql","AggregationAwareActivities","rewrittenQuery","UnknownExecutionActivities","ExecutionResult","builder","activities","JsonExecutionResult","RawExecutionResult","INTERNAL__TDSColumn","relationalType","TDSBuilder","TDS_BUILDER","TDSRow","TabularDataSet","TDSExecutionResult","_UUID","ClassBuilder","CLASS_BUILDER","ClassExecutionResult","objects","V1_ResultBuilder","V1_ExecutionActivities","V1_RelationalExecutionActivities","V1_AggregationAwareActivities","V1_ExecutionResult","V1_UnknownExecutionActivity","V1_JsonExecutionResult","builderSerialization","V1_INTERNAL__TDSColumn","V1_TDSBuilder","V1_serializeExecutionActivities","RELATIONAL","RELATIONAL_EXECUTION_ACTIVITY","AGGREGATION_AWARE_ACTIVITY","V1_TDSExecutionResult","V1_ClassExecutionResult","V1_RawExecutionResult","V1_INTERNAL__UnknownExecutionResult","INTERNAL__UnknownExecutionResult","buildExecutionActivities","metamodel","INTERNAL__buildTDSColumn","V1_buildExecutionResult","buildClassExecutionResult","buildTDSBuilder","_row","buildTDSExecutionResult","buildJSONExecutionResult","V1_serializeExecutionResult","JSON_BUILDER","LegendREPLDataCubeSource","LegendREPLDataCubeEngine","persistSettingValue","baseQuery","getQueryRelationType","returnSourceInformation","api","getSettings","enableDebugMode","executedQuery","executedSQL","buildExecutionContext","FROM","useDropdownMenu","currentTarget","DropdownMenu","onClosed","hasBeenOpened","setHasBeenOpened","marginThreshold","DropdownMenuItem","parent","windowState","windowSpec","setWindowSpec","finalWidth","finalHeight","onDragStop","dragHandleClassName","onResize","delta","offsetWidth","offsetHeight","enableResizing","bottom","topRight","bottomRight","bottomLeft","topLeft","resizeHandleStyles","onMouseDown","DataCubeLayoutManager","_param","paramIdx","_colSpecArrayParam","_pruneExpandedPaths","prevGroupByCols","currentGroupByCols","lastCommonIndex","_aggCountCol","INTERNAL__GRID_CLIENT_ROW_GROUPING_COUNT_AGG_COLUMN_ID","_findCol","c","_toCol","_sortByColName","getColumnConfiguration","colName","DataCubeGridClientExportFormat","INTERNAL__GridClientUtilityCssClassName","generateFontFamilyUtilityClassName","FONT_FAMILY_PREFIX","generateFontSizeUtilityClassName","FONT_SIZE_PREFIX","generateFontUnderlineUtilityClassName","variant","FONT_UNDERLINE_PREFIX","generateFontCaseUtilityClassName","FONT_CASE_PREFIX","generateTextAlignUtilityClassName","alignment","TEXT_ALIGN_PREFIX","generateTextColorUtilityClassName","TEXT_COLOR_PREFIX","generateBackgroundColorUtilityClassName","BACKGROUND_COLOR_PREFIX","INTERNAL__GRID_CLIENT_MAX_CACHE_BLOCK_SIZE","INTERNAL__GRID_CLIENT_MISSING_VALUE","INTERNAL__GRID_CLIENT_TREE_COLUMN_ID","INTERNAL__GRID_CLIENT_DATA_FETCH_MANUAL_TRIGGER_COLUMN_ID","GridClientPinnedAlignement","GridClientSortDirection","getDataForAllNodes","forEachNode","getDataForAllFilteredNodes","forEachNodeAfterFilter","computeHashCodeForDataFetchManualTrigger","DataCubeGridClientServerSideDataSource","grid","rowCount","fetchRows","task","view","newTask","rowGroupCols","setColumnsVisible","currentSnapshot","getLatestSnapshot","newSnapshot","groupKeys","baseSnapshot","clone","pivotCols","sortModel","colId","buildQuerySnapshot","isPaginationEnabled","startRow","engine","_snapshot","groupExtend","funcMapKey","_unprocess","getCastColumns","endTask","finalize","markAsPatchChange","applySnapshot","publishSnapshot","executableQuery","drilldownValues","_functionCompositionUnProcessor","groupByColumn","parseInt","parseFloat","countAggColumns","pivotCast","_addCountAggColumnToPivot","groupByIdx","groupByFunc","_aggCountCastCol","groupBySort","endRow","rowData","rowIdx","colIdx","String","Number","buildRowData","success","showNoRowsOverlay","hideOverlay","gridClientSuppressLargeDatasetWarning","setPaginationEnabled","setGridClientSuppressLargeDatasetWarning","ensureIndexVisible","parentNode","rowIndex","getRows","scaleNumber","PERCENT","unit","BASIS_POINT","THOUSANDS","MILLIONS","BILLIONS","TRILLIONS","AUTO","DataCubeGridLoadingCellRenderer","failedLoad","getCellRenderer","columnData","_displaySpec","dataType","cellDataType","hide","lockVisible","RIGHT","headerClass","cellClassRules","FONT_BOLD","FONT_ITALIC","FONT_STRIKETHROUGH","BLUR","valueFormatter","showNegativeNumberInParens","scaledNumber","formattedValue","toLocaleString","useGrouping","minimumFractionDigits","maximumFractionDigits","tooltipValueGetter","cellRenderer","_groupDisplaySpec","lockPosition","lockPinned","_sizeSpec","resizable","suppressAutoSize","suppressSizeToFit","flex","_sortSpec","sortCol","sortable","sortIndex","_aggregationSpec","pivotCol","groupByCol","isGroupExtendedColumn","enableRowGroup","rowGroup","rowGroupIndex","enablePivot","pivotIndex","aggFunc","enableValue","allowedAggFuncs","generateBaseGridOptions","rowGroupPanelShow","groupDisplayType","suppressRowGroupHidesColumns","suppressAggFuncInHeader","getChildCount","alwaysMultiSort","rowHeight","headerHeight","noRowsOverlayComponent","loadingOverlayComponent","onBodyScroll","getDisplayedRowCount","getVerticalPixelRange","setScrollHintText","hidePopupMenu","onBodyScrollEnd","scrollbarWidth","alwaysShowVerticalScroll","preventDefaultOnContextMenu","columnMenu","getContextMenuItems","controller","menuBuilder","getMainMenuItems","onColumnMenuVisibleChanged","menuElement","ROOT","autoSizePadding","autoSizeStrategy","onGridSizeChanged","sizeColumnsToFit","tooltipShowDelay","tooltipInteraction","suppressDragLeaveHidesColumns","suppressScrollOnNewData","loadingCellRenderer","serverSideSortAllLevels","cellSelection","sideBar","toolPanels","labelDefault","labelKey","iconKey","toolPanel","toolPanelParams","suppressValues","suppressPivotMode","allowDragFromColumnsToolPanel","animateRows","suppressColumnMoveAnimation","generatePivotResultColumnHeaderTooltip","baseColumnName","generateDefinitionForPivotResultColumns","columnDefs","leaf","groupId","suppressColumnsToolPanel","headerName","headerTooltip","field","menuTabs","currentCollection","group","existingGroup","newGroup","PIVOT_COLUMN_GROUP","PIVOT_COLUMN_GROUP_PREFIX","colAName","colAConf","colBName","colBConf","MAX_VALUE","generateColumnDefs","suppressSpanHeaderHeight","textColorStyle","Set","backgroundColorStyle","DataCubeGridStyleController","queryConfiguration","styles","HIGHLIGHT_ROW","ARIAL","ROBOTO_CONDENSED","GEORGIA","ROBOTO_SERIF","TIMES_NEW_ROMAN","JERBRAINS_MONO","UBUNTU_MONO","SOLID","DASHED","DOTTED","DOUBLE","WAVY","LOWERCASE","UPPERCASE","CAPITALIZE","CENTER","DataCubeGridScroller","scrollHintText","gridClientSideBarElement","gridVerticalScrollbar","DataCubeGridStatusBar","clientDataSource","rowLimit","Switch","thumb","switchBase","track","disableFocusRipple","DataCubeGridClient","rowModelType","serverSideDatasource","onGridReady","configureClient","modules","M","DataCubeGrid","DataCubeStatusBar","runningTasks","bar1Indeterminate","bar2Indeterminate","DataCubeView","DataCubeQuerySnapshotController","latestSnapshot","receiveSnapshot","previousSnapshot","INTERNAL__fullClone","getSnapshotSubscriberName","snapshotManager","broadcastSnapshot","DataCubeQuerySnapshotManager","subscribers","snapshots","_initialSnapshot","_initialQuery","registerSubscriber","subscriber","sub","initialSnapshot","initialQuery","isFinalized","FormBadge_WIP","FormBadge_Advanced","FormNumberInput","step","setValue","isValid","isDecimal","inputValue","setInputValue","inputRef","handleRef","useForkRef","inputMode","select","newValue","newInputValue","numericValue","onBlur","FormTextInput","FormCheckbox","checkedIcon","FormDropdownMenuTrigger","FormDropdownMenu","FormDropdownMenuItem","FormDropdownMenuItemSeparator","FormColorPicker","defaultColor","setColor","submit","alpha","scale","onDoubleClick","_color","prefix","FormColorPickerButton","FormDocumentation","documentationEntry","documentationDisplay","WIP_GridMenuItem","subMenu","configureDefaults","DataCubeFilterEditorTreeNode","setParent","setNot","DataCubeFilterEditorConditionTreeNode","setColumn","setOperation","updateValue","DataCubeFilterEditorConditionGroupTreeNode","addChild","buildFilterQuerySnapshot","childNode","buildFilterEditorTree","_node","nodes","operationGetter","_childNode","DataCubeEditorColumnSelectorColumnState","DataCubeEditorColumnSelectorState","selectedColumns","availableColumnsSearchText","selectedColumnsSearchText","availableColumns","availableColumnsForDisplay","selectedColumnsForDisplay","setSelectedColumns","setAvailableColumnsSearchText","setSelectedColumnsSearchText","cloneColumn","getColumn","DataCubeEditorSortColumnState","setDirection","DataCubeEditorSortColumnSelectorState","horizontalPivots","selector","verticalPivots","columnProperties","groupExtendColumns","DataCubeEditorSortsPanelState","adaptPropagatedChanges","applySnaphot","buildSnapshot","buildDefaultColumnConfiguration","DataCubeEditorMutableColumnConfiguration","aggregateOperation","assign","setKind","setDisplayName","setDecimals","setDisplayCommas","setNegativeNumberInParens","setNumberScale","setMissingValueDisplayText","setFontFamily","setFontSize","setFontBold","setFontItalic","setFontUnderline","setFontStrikethrough","setFontCase","setTextAlign","setNormalForegroundColor","setNegativeForegroundColor","setZeroForegroundColor","setErrorForegroundColor","setNormalBackgroundColor","setNegativeBackgroundColor","setZeroBackgroundColor","setErrorBackgroundColor","setIsSelected","setHideFromView","setBlur","setFixedWidth","setMinWidth","setMaxWidth","setPinned","setDisplayAsLink","setLinkLabelParameter","isUsingDefaultStyling","useDefaultStyling","setAggregateOperation","setAggregationParameters","setExcludedFromPivot","setPivotSortDirection","setPivotStatisticColumnFunction","createDefault","DataCubeEditorMutablePivotLayoutConfiguration","setExpandedPaths","DataCubeEditorMutableConfiguration","setName","setDescription","setShowHorizontalGridLines","setShowVerticalGridLines","setGridLineColor","setAlternateRows","setAlternateRowsColor","setAlternateRowsCount","setAlternateRowsStandardMode","setShowSelectionStats","setShowWarningForTruncatedResult","setInitialExpandLevel","setShowRootAggregation","setShowLeafCount","setTreeColumnSortDirection","setPivotStatisticColumnName","setPivotStatisticColumnPlacement","DataCubeEditorGeneralPropertiesPanelState","setLimit","DataCubeEditorColumnPropertiesPanelState","selectedColumnName","showAdvancedSettings","setColumns","setSelectedColumnName","selectedColumn","setShowAdvancedSettings","DataCubeEditorBasicColumnSelectorState","showHiddenColumns","setShowHiddenColumns","leafExtendColumns","DataCubeEditorColumnsPanelState","selectedColumnConfigurations","unselectedColumnConfigurations","propagateChanges","sorts","DataCubeEditorVerticalPivotColumnSelectorState","DataCubeEditorVerticalPivotsPanelState","getBaseGridProps","getRowId","editType","rowDragMultiRow","rowDragEntireRow","rowSelection","checkboxes","headerCheckbox","enableClickSelection","selectionColumnDef","cellClass","rowDrag","rowDragText","dragItemCount","rowNode","suppressHeaderMenuButton","suppressMoveWhenRowDragging","suppressRowHoverHighlight","getQuickFilter","noColumnsSelectedRenderer","onModelUpdated","ColumnsSearchResultCountBadge","gridApi","DataCubeEditorColumnSelector","columnLabelRenderer","columnActionRenderer","selectedAvailableColumns","setSelectedAvailableColumns","selectedSelectedColumns","setSelectedSelectedColumns","availableColumnsGridApi","setAvailableColumnsGridApi","selectedColumnsGridApi","setSelectedColumnsGridApi","searchAvailableColumnsInputRef","searchSelectedColumnsInputRef","onSelectedColumnsDragStop","useCallback","onAvailableColumnsDragStop","columnsToMove","onSelectedColumnsDragEnd","overIndex","selectedColumnsDropZoneParams","getRowDropZoneParams","clearFocusedCell","removeRowDropZone","addRowDropZone","availableColumnsDropZoneParams","rowDragManaged","onSelectionChanged","getSelectedNodes","quickFilterText","getQuickFilterText","headerComponent","filteredData","onRowDragEnd","noRowsOverlayComponentParams","SortDirectionDropdown","openDirectionDropdown","closeDirectionDropdown","directionDropdownProps","directionDropdownPropsOpen","onClickCapture","SortColumnLabel","DataCubeEditorSortsPanel","panel","p","DataCubeEditorGeneralPropertiesPanel","generalProperties","openTreeColumnSortOperatorDropdown","closeTreeColumnSortOperatorDropdown","treeColumnSortOperatorDropdownProps","treeColumnSortOperatorDropdownPropsOpen","openInitialExpandLevelDropdown","closeInitialExpandLevelDropdown","initialExpandLevelDropdownProps","initialExpandLevelDropdownPropsOpen","openFontFamilyDropdown","closeFontFamilyDropdown","fontFamilyDropdownProps","fontFamilyDropdownPropsOpen","openFontSizeDropdown","closeFontSizeDropdown","openFontSizeDropdownProps","openFontSizeDropdownPropsOpen","openFontFormatUnderlineVariantDropdown","closeFontFormatUnderlineVariantDropdown","fontFormatUnderlineVariantDropdownProps","openFontCaseDropdown","closeFontCaseDropdown","fontCaseDropdownProps","font","lowercase","uppercase","ColumnSelectorLabel","showHiddenIndicator","DataCubeEditorColumnsPanel","DataCubeEditorVerticalPivotsPanel","PivotColumnSortDirectionDropdown","DataCubeEditorHorizontalPivotsPanel","DocumentationKey","DataCubeEditorColumnPropertiesPanel","gridConfiguration","openColumnDropdown","closeColumnDropdown","columnDropdownProps","columnDropPropsOpen","openKindDropdown","closeKindDropdown","kindDropdownProps","kindDropdownPropsOpen","openAggregationOperationDropdown","closeAggregationOperationDropdown","aggregationOperationDropdownProps","aggregationOperationDropdownPropsOpen","openNumberScaleDropdown","closeNumberScaleDropdown","numberScaleDropdownProps","numberScaleDropdownPropsOpen","openColumnPinDropdown","closeColumnPinDropdown","columnPinDropdownProps","columnPinDropdownPropsOpen","DATA_CUBE_COLUMN_KINDS","DATA_CUBE_COLUMN_DISPLAY_AS_LINK","DATA_CUBE_COLUMN_MISSING_VALUE_FORMAT","placement","DataCubeEditor","currentTab","tabs","DataCubeEditorTab","COLUMNS","VERTICAL_PIVOTS","HORIZONTAL_PIVOTS","SORTS","GENERAL_PROPERTIES","COLUMN_PROPERTIES","tab","setCurrentTab","finalizationState","applyChanges","closeAfterApply","DataCubeEditorHorizontalPivotColumnSelectorState","DataCubeEditorHorizontalPivotsPanelState","setCastColumns","DataCubeEditorPivotLayoutPanelState","DataCubeEditorState","tempSnapshot","BAD_REQUEST","buildNewFilterConditionMenuItem","addNewFilterCondition","filterTree","DataCubeGridControllerState","currentRoot","newRoot","clearFilters","pinColumn","rearrangeColumns","rearrangedColumnConfigurations","rearrangedSelectColumns","removeAllPins","showColumn","isVisible","horizontalPivotColumns","horizontalPivotCastColumns","horizontalPivotResultColumns","getHorizontalPivotableColumn","setHorizontalPivotOnColumn","addHorizontalPivotOnColumn","clearAllHorizontalPivots","excludeColumnFromHorizontalPivot","includeColumnInHorizontalPivot","verticalPivotColumns","getVerticalPivotableColumn","setVerticalPivotOnColumn","addVerticalPivotOnColumn","removeVerticalPivotOnColumn","clearAllVerticalPivots","collapseAllPaths","collapseAll","expandPath","collapsePath","getSortableColumn","setSortByColumn","addSortByColumn","clearSortByColumn","clearAllSorts","extend","fromHeader","getColId","baseColumnConfiguration","isExtendedColumn","sortMenu","newFilterMenu","_columnConfiguration","filterValue","toFilterValue","getColumnFilterOperations","moreFilterOperations","menuItem","cssClasses","exportEngine","exportFile","EXCEL","CSV","exportEmail","openNewColumnEditor","openExistingColumnEditor","deleteColumn","autoSizeColumns","setColumnWidths","newWidth","colConf","isPinnedLeft","isPinnedRight","isPinned","generateMenuBuilder","sortableColumns","blobToBase64","reader","FileReader","onloadend","base64Data","onerror","readAsDataURL","EMAIL_MIXED_BOUNDARY","EMAIL_ALTERNATIVE_BOUNDARY","EMAIL_CONTENT","DataCubeGridClientExportEngine","generateFileName","exportDataAsCsv","exportDataAsExcel","attachment","fileNameWithExtension","TEXT_CSV","getDataAsCsv","APPLICATION_XLSX","xlsxContent","getDataAsExcel","xlsxBlob","trimStart","MESSAGE_RFC822","DataCubeGridState","_client","updateGridOptions","cacheBlockSize","gridOptions","isServerSideGroupOpenByDefault","routes","getRoute","rowClassRules","onColumnPinned","getPinned","onColumnMoved","finished","getColumnDefs","onColumnVisible","onRowGroupOpened","expanded","autoGroupColumnDef","cellRendererParams","suppressCount","showRowGroup","generateGridOptionsFromSnapshot","rowBuffer","gridClientRowBuffer","setFilterModel","DataCubeInfoState","onNameChanged","DataCubeQuerySnapshot","_isPatchChange","_finalized","_hashCode","isPatchChange","_SUPPORTED_TOP_LEVEL_FUNCTIONS","_FUNCTION_SEQUENCE_COMPOSITION_PART","_FUNCTION_SEQUENCE_COMPOSITION_PATTERN","LEAF_EXTEND","PIVOT__GROUP","funcs","PIVOT_SORT","required","PIVOT_CAST","GROUP_BY__GROUP","GROUP_BY_SORT","GROUP_EXTEND","_FUNCTION_SEQUENCE_COMPOSITION_PATTERN_REGEXP","DatePicker","DatePickerFieldInput","InputProps","endAdornment","ownerState","enableAccessibleFieldDOMStructure","clearable","onClear","focused","alignItems","DatePickerField","slots","textFieldProps","fieldResponse","useDateField","DataCubeEditorFilterConditionNodeTextValueEditor","EVLUATION_ERROR_LABEL","DataCubeEditorFilterConditionNodeNumberValueEditor","calculateExpression","calculatedValue","CustomDateFieldPicker","r","CustomDateFieldPickerOpenCalendarButton","parseISO","DataCubeEditorFilterConditionNodeDateValueEditor","openPickerButton","DataCubeEditorFilterConditionNodeColumnSelector","matchingColumn","columnDropdownPropsOpen","DataCubeEditorFilterConditionNodeValueEditor","DataCubeEditorFilterNotLabel","DataCubeEditorFilterConditionNodeController","addFilterNode","removeFilterNode","layerFilterNode","DataCubeEditorFilterConditionNodeDisplay","nodeIdx","valueEditorRef","openOperationDropdown","closeOperationDropdown","operationDropdownProps","operationDropdownPropsOpen","focusOnValueEditor","selectedNode","setSelectedNode","paddingLeft","selectedGroupNode","newOp","DataCubeEditorFilterGroupNodeDisplay","DataCubeEditorFilterGroupDisplay","marginLeft","DataCubeFilterEditor","tree","initializeTree","DataCubeFilterEditorState","refreshTree","struct","generateNewFilterNode","baseNode","columnConfig","nodeToRemove","childNodesToRemove","child","grandParentNode","parentNodeIndex","baseNodeIndex","subGroupNode","DataCubeExtendedColumnKind","DataCubeColumnCreator","nameInputRef","currentColumnKind","isGroupLevel","GROUP_LEVEL","columnKind","LEAF_LEVEL_MEASURE","LEAF_LEVEL_DIMENSION","kindDropPropsOpen","openTypeDropdown","closeTypeDropdown","typeDropdownProps","typeDropPropsOpen","suggestionsProvider","debouncedCheckReturnType","getReturnType","registerCompletionItemProvider","triggerCharacters","provideCompletionItems","model","suggestions","uri","editorModelUri","textUntilPosition","getValueInRange","currentWord","getWordAtPosition","buildExtendBaseQuery","suggestion","CompletionItemKind","Text","filterText","insertTextRules","CompletionItemInsertTextRule","InsertAsSnippet","insertText","completion","getCodeSuggestions","onDidChangeModelContent","currentVal","clearError","setReturnType","cancel","updateOptions","isNameValid","DATA_CUBE_EXTENDED_COLUMN_LEVELS","setColumnKind","expectedType","validationState","returnType","isTypeValid","setExpectedType","codeError","DataCubeExistingColumnEditorState","manager","initialData","DataCubeColumnBaseEditorState","_name","codeSuffix","showError","getInitialCode","allColumnNames","removeAllMarkers","returnRelationType","err","DataCubeNewColumnState","initialCode","referenceColumn","addNewColumn","updateColumn","DataCubeQueryExtendedColumnState","DataCubeExtendManagerState","columnConfigurations","newColumnEditors","existingColumnEditors","setLeafExtendedColumns","setGroupExtendedColumns","existingEditor","updatedColumn","DataCubeTask","DataCubeViewState","_source","initialInput","partialQuery","currentFunc","supportedFunc","spec","vs","matchResult","leafExtend","pivotSort","extractFunctionMap","colsMap","sortColFunc","functionNames","_funcMatch","buildDefaultConfiguration","validateAndBuildQuerySnapshot","DocumentationPanel","DataCubeSettingKey","DEFAULT_SETTINGS","ENABLE_DEBUG_MODE","GRID_CLIENT_ROW_BUFFER","GRID_CLIENT_PURGE_CLOSED_ROW_NODES","GRID_CLIENT_SUPPRESS_LARGE_DATASET_WARNING","DataCubeSettings","setEnableDebugMode","setGridClientRowBuffer","gridClientPurgeClosedRowNodes","setGridClientPurgeClosedRowNodes","onSettingChanged","propagateGridOptionUpdates","runTaskForEachView","purgeClosedRowNodes","DataCubeSettingsPanel","save","refreshFailedDataFetches","DataCubeState","settingsDisplay","retryServerSideLoads","runner","DataCubeTitleBar","openMenuDropdown","closeMenuDropdown","menuDropdownProps","DataCubeRoot","DataCube","ApplicationFrameworkProvider","LegendREPLDataCube","NAVIGATION_BLOCKED","LEGEND_REPL_GRID_CLIENT_ROUTE_PATTERN","freeze","DATA_CUBE","LegendREPLRouter","LegendREPLWebApplication","LegendREPL","rootEl","getElementsByTagName","setAttribute","getApplicationRootElement","render","getPresetCollection","getPluginCollection","run","relativeBaseUrl","webpackAsyncContext","req","__webpack_require__","o","module","exports","ids","__webpack_module_cache__","moduleId","cachedModule","loaded","__webpack_modules__","call","m","amdD","amdO","O","chunkIds","priority","notFulfilled","Infinity","fulfilled","j","n","getter","__esModule","d","getPrototypeOf","t","ns","def","getOwnPropertyNames","definition","defineProperty","enumerable","f","chunkId","reduce","promises","miniCssF","g","globalThis","Function","prop","prototype","hasOwnProperty","l","done","script","needAttach","scripts","s","getAttribute","charset","timeout","nc","onScriptComplete","prev","onload","doneFns","head","Symbol","toStringTag","nmd","paths","installedChunks","installedChunkData","promise","errorType","realSrc","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","chunkLoadingGlobal","__webpack_exports__"],"sourceRoot":""}
|