@ytsaurus/ui 1.75.1 → 1.77.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/public/build/assets-manifest.json +75 -75
- package/dist/public/build/css/{job.c7c99207.chunk.css → job.9757ff68.chunk.css} +2 -2
- package/dist/public/build/css/job.9757ff68.chunk.css.map +1 -0
- package/dist/public/build/css/main.0efa9da5.css +10 -0
- package/dist/public/build/css/main.0efa9da5.css.map +1 -0
- package/dist/public/build/css/navigation.c199c4f2.chunk.css +2 -0
- package/dist/public/build/css/navigation.c199c4f2.chunk.css.map +1 -0
- package/dist/public/build/js/{1260.534f3f75.chunk.js → 1260.a1e22005.chunk.js} +2 -2
- package/dist/public/build/js/{1260.534f3f75.chunk.js.map → 1260.a1e22005.chunk.js.map} +1 -1
- package/dist/public/build/js/{1879.23423388.chunk.js → 1879.3975650a.chunk.js} +3 -3
- package/dist/public/build/js/{1879.23423388.chunk.js.map → 1879.3975650a.chunk.js.map} +1 -1
- package/dist/public/build/js/{1983.666923be.chunk.js → 1983.64a2e22f.chunk.js} +2 -2
- package/dist/public/build/js/{1983.666923be.chunk.js.map → 1983.64a2e22f.chunk.js.map} +1 -1
- package/dist/public/build/js/{2447.b2877275.chunk.js → 2447.eb8fde89.chunk.js} +2 -2
- package/dist/public/build/js/{2447.b2877275.chunk.js.map → 2447.eb8fde89.chunk.js.map} +1 -1
- package/dist/public/build/js/3724.3e5848f0.chunk.js +2 -0
- package/dist/public/build/js/{3724.425d01ec.chunk.js.map → 3724.3e5848f0.chunk.js.map} +1 -1
- package/dist/public/build/js/6729.39d7cf60.chunk.js +2 -0
- package/dist/public/build/js/6729.39d7cf60.chunk.js.map +1 -0
- package/dist/public/build/js/{7959.95ebd185.chunk.js → 7959.faac2ff8.chunk.js} +2 -2
- package/dist/public/build/js/{7959.95ebd185.chunk.js.map → 7959.faac2ff8.chunk.js.map} +1 -1
- package/dist/public/build/js/{8390.83f4531a.chunk.js → 8390.c3d2de6a.chunk.js} +2 -2
- package/dist/public/build/js/{8390.83f4531a.chunk.js.map → 8390.c3d2de6a.chunk.js.map} +1 -1
- package/dist/public/build/js/{8460.2d4d237e.chunk.js → 8460.fc8e2238.chunk.js} +2 -2
- package/dist/public/build/js/{8460.2d4d237e.chunk.js.map → 8460.fc8e2238.chunk.js.map} +1 -1
- package/dist/public/build/js/{8778.e18e655b.chunk.js → 8778.f3ea089f.chunk.js} +2 -2
- package/dist/public/build/js/{8778.e18e655b.chunk.js.map → 8778.f3ea089f.chunk.js.map} +1 -1
- package/dist/public/build/js/{9558.a6ea64c9.chunk.js → 9558.6a4bf9a9.chunk.js} +2 -2
- package/dist/public/build/js/{9558.a6ea64c9.chunk.js.map → 9558.6a4bf9a9.chunk.js.map} +1 -1
- package/dist/public/build/js/9569.aac48f3b.chunk.js +2 -0
- package/dist/public/build/js/9569.aac48f3b.chunk.js.map +1 -0
- package/dist/public/build/js/{accounts.2ba221c2.chunk.js → accounts.aa7ed73f.chunk.js} +2 -2
- package/dist/public/build/js/accounts.aa7ed73f.chunk.js.map +1 -0
- package/dist/public/build/js/{acl.c948c339.chunk.js → acl.4cd54663.chunk.js} +2 -2
- package/dist/public/build/js/{acl.c948c339.chunk.js.map → acl.4cd54663.chunk.js.map} +1 -1
- package/dist/public/build/js/{app-navigation.b062662b.chunk.js → app-navigation.13c65573.chunk.js} +2 -2
- package/dist/public/build/js/app-navigation.13c65573.chunk.js.map +1 -0
- package/dist/public/build/js/chyt.0ee6bfa2.chunk.js +2 -0
- package/dist/public/build/js/chyt.0ee6bfa2.chunk.js.map +1 -0
- package/dist/public/build/js/cluster-page-wrapper.bdc8607f.chunk.js +2 -0
- package/dist/public/build/js/cluster-page-wrapper.bdc8607f.chunk.js.map +1 -0
- package/dist/public/build/js/{components.bbe331cb.chunk.js → components.b39828bc.chunk.js} +2 -2
- package/dist/public/build/js/components.b39828bc.chunk.js.map +1 -0
- package/dist/public/build/js/job.ea2ba82d.chunk.js +2 -0
- package/dist/public/build/js/job.ea2ba82d.chunk.js.map +1 -0
- package/dist/public/build/js/main.6375dbc6.js +3 -0
- package/dist/public/build/js/main.6375dbc6.js.map +1 -0
- package/dist/public/build/js/manage-tokens.e1e791fc.chunk.js +2 -0
- package/dist/public/build/js/manage-tokens.e1e791fc.chunk.js.map +1 -0
- package/dist/public/build/js/{navigation-flow.eeb01518.chunk.js → navigation-flow.6d67215a.chunk.js} +2 -2
- package/dist/public/build/js/{navigation-flow.eeb01518.chunk.js.map → navigation-flow.6d67215a.chunk.js.map} +1 -1
- package/dist/public/build/js/navigation.529208de.chunk.js +2 -0
- package/dist/public/build/js/navigation.529208de.chunk.js.map +1 -0
- package/dist/public/build/js/odin.c4c4ef6f.chunk.js +2 -0
- package/dist/public/build/js/odin.c4c4ef6f.chunk.js.map +1 -0
- package/dist/public/build/js/{path-viewer.b1b3328d.chunk.js → path-viewer.c091d9f4.chunk.js} +2 -2
- package/dist/public/build/js/{path-viewer.b1b3328d.chunk.js.map → path-viewer.c091d9f4.chunk.js.map} +1 -1
- package/dist/public/build/js/{query-navigation.9964bfcf.chunk.js → query-navigation.b1574290.chunk.js} +2 -2
- package/dist/public/build/js/{query-navigation.9964bfcf.chunk.js.map → query-navigation.b1574290.chunk.js.map} +1 -1
- package/dist/public/build/js/{query-results.733b1795.chunk.js → query-results.0a05cc41.chunk.js} +2 -2
- package/dist/public/build/js/{query-results.733b1795.chunk.js.map → query-results.0a05cc41.chunk.js.map} +1 -1
- package/dist/public/build/js/query-tracker.515069f6.chunk.js +2 -0
- package/dist/public/build/js/query-tracker.515069f6.chunk.js.map +1 -0
- package/dist/public/build/js/{runtime.481a6d3a.js → runtime.09217c31.js} +2 -2
- package/dist/public/build/js/{runtime.481a6d3a.js.map → runtime.09217c31.js.map} +1 -1
- package/dist/public/build/js/{scheduling.b70d4627.chunk.js → scheduling.6448eabd.chunk.js} +2 -2
- package/dist/public/build/js/{scheduling.b70d4627.chunk.js.map → scheduling.6448eabd.chunk.js.map} +1 -1
- package/dist/public/build/js/system.1114aa96.chunk.js +2 -0
- package/dist/public/build/js/system.1114aa96.chunk.js.map +1 -0
- package/dist/public/build/js/{yt-df-dialog.9ddda260.chunk.js → yt-df-dialog.4ad719bf.chunk.js} +2 -2
- package/dist/public/build/js/yt-df-dialog.4ad719bf.chunk.js.map +1 -0
- package/dist/public/build/manifest.json +70 -70
- package/dist/shared/constants/settings-types.d.ts +1 -0
- package/package.json +3 -2
- package/dist/public/build/css/job.c7c99207.chunk.css.map +0 -1
- package/dist/public/build/css/main.2d3cbfcd.css +0 -10
- package/dist/public/build/css/main.2d3cbfcd.css.map +0 -1
- package/dist/public/build/css/navigation.0a9042b3.chunk.css +0 -2
- package/dist/public/build/css/navigation.0a9042b3.chunk.css.map +0 -1
- package/dist/public/build/js/3724.425d01ec.chunk.js +0 -2
- package/dist/public/build/js/5177.b4cec253.chunk.js +0 -2
- package/dist/public/build/js/5177.b4cec253.chunk.js.map +0 -1
- package/dist/public/build/js/6729.da9aa02f.chunk.js +0 -2
- package/dist/public/build/js/6729.da9aa02f.chunk.js.map +0 -1
- package/dist/public/build/js/accounts.2ba221c2.chunk.js.map +0 -1
- package/dist/public/build/js/app-navigation.b062662b.chunk.js.map +0 -1
- package/dist/public/build/js/chyt.7f99f87d.chunk.js +0 -2
- package/dist/public/build/js/chyt.7f99f87d.chunk.js.map +0 -1
- package/dist/public/build/js/cluster-page-wrapper.894fbacc.chunk.js +0 -2
- package/dist/public/build/js/cluster-page-wrapper.894fbacc.chunk.js.map +0 -1
- package/dist/public/build/js/components.bbe331cb.chunk.js.map +0 -1
- package/dist/public/build/js/job.4fc50056.chunk.js +0 -2
- package/dist/public/build/js/job.4fc50056.chunk.js.map +0 -1
- package/dist/public/build/js/main.7981a440.js +0 -3
- package/dist/public/build/js/main.7981a440.js.map +0 -1
- package/dist/public/build/js/manage-tokens.286a4da9.chunk.js +0 -2
- package/dist/public/build/js/manage-tokens.286a4da9.chunk.js.map +0 -1
- package/dist/public/build/js/navigation.d891266d.chunk.js +0 -2
- package/dist/public/build/js/navigation.d891266d.chunk.js.map +0 -1
- package/dist/public/build/js/odin.df1cfe56.chunk.js +0 -2
- package/dist/public/build/js/odin.df1cfe56.chunk.js.map +0 -1
- package/dist/public/build/js/query-tracker.06cc4fdc.chunk.js +0 -2
- package/dist/public/build/js/query-tracker.06cc4fdc.chunk.js.map +0 -1
- package/dist/public/build/js/system.f759d3f0.chunk.js +0 -2
- package/dist/public/build/js/system.f759d3f0.chunk.js.map +0 -1
- package/dist/public/build/js/yt-df-dialog.9ddda260.chunk.js.map +0 -1
- /package/dist/public/build/js/{1879.23423388.chunk.js.LICENSE.txt → 1879.3975650a.chunk.js.LICENSE.txt} +0 -0
- /package/dist/public/build/js/{main.7981a440.js.LICENSE.txt → main.6375dbc6.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"js/query-results.733b1795.chunk.js","mappings":"2PAWaA,GAAQC,EAAAA,EAAAA,GAAG,qBAEjB,SAASC,EAAqBC,GAA+D,IAAnCC,EAA2BC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,GACrFG,EAAwB,GACxBC,EAAsB,GACtBC,EAAyB,GACzBC,EAA6B,GACnCC,IAAST,GAAO,SAACU,GACb,IAAOC,EAAwDD,EAAxDC,eAAgBC,EAAwCF,EAAxCE,YAAaC,EAA2BH,EAA3BG,WAAYC,EAAeJ,EAAfI,YAC5CH,EACAH,EAAaO,KAAKL,GACXI,EACPP,EAASQ,KAAKL,GACPG,GAAcD,EACrBN,EAAMS,KAAKL,GAEXL,EAAQU,KAAKL,EAErB,IAEA,IAAMM,EAAaX,EAAQY,KAAI,SAACP,GAAI,OAAKQ,EAAqBR,EAAK,IAC7DS,EAAWlB,EAAagB,KAAI,SAACP,GAAI,MAAM,CACzCU,MAAOV,EACPW,KAAM,CAAC,EACPC,QAAQ,EACX,IAED,MAAO,CACHC,SAAU,GACVlB,QAAS,CA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IACAjjB,KAAK8jB,UAAUrjB,KAAK8c,EAAK5I,EAAS4I,GAClCvd,KAAKmkB,aAPL,CAQJ,EAMAX,EAAkBxG,UAAUmH,YAAc,WACtCnkB,KAAK2jB,oBAAoB7P,OAAO,EACpC,EAMA0P,EAAkBxG,UAAU8C,UAAY,WACpC,OAAO9f,KAAK2jB,oBAAoB/pB,OAAS,CAC7C,EACO4pB,CACX,CAnJsC,GAwJlC/D,EAA+B,oBAAZ6E,QAA0B,IAAIA,QAAY,IAAI7H,EAKjE/Y,EAOA,SAASA,EAAe4Z,GACpB,KAAMtd,gBAAgB0D,GAClB,MAAM,IAAImgB,UAAU,sCAExB,IAAKlqB,UAAUC,OACX,MAAM,IAAIiqB,UAAU,4CAExB,IAAIJ,EAAapF,EAAyBiC,cACtC7c,EAAW,IAAI+f,EAAkBlG,EAAUmG,EAAYzjB,MAC3Dyf,EAAUzc,IAAIhD,KAAMyD,EACxB,EAIJ,CACI,UACA,YACA,cACFuF,SAAQ,SAAUub,GAChB7gB,EAAesZ,UAAUuH,GAAU,WAC/B,IAAIjkB,EACJ,OAAQA,EAAKmf,EAAUtd,IAAInC,OAAOukB,GAAQC,MAAMlkB,EAAI3G,UACxD,CACJ,IAUA,aAN2C,IAA5B+jB,EAASha,eACTga,EAASha,eAEbA,C","sources":["webpack://@ytsaurus/ui/./src/ui/components/Dialog/controls/RoleListControl/utils.ts","webpack://@ytsaurus/ui/./src/ui/components/Dialog/DialogError.tsx","webpack://@ytsaurus/ui/./src/ui/components/Dialog/index.tsx","webpack://@ytsaurus/ui/./src/ui/hocs/withDelayedMount.tsx","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/utils/react.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/components/ErrorBoundary/ErrorBoundary.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/utils/getErrorMessage.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/components/Loader/Loader.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/components/ChartKit.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/index.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/plugins/yagr/index.js","webpack://@ytsaurus/ui/./src/ui/components/YagrChartKit/YagrChartKit.tsx","webpack://@ytsaurus/ui/./src/ui/hooks/useResizeObserver.tsx","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/preparers/getPointData.ts","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/preparers/splitDataByColor.ts","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/preparers/utils.ts","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/preparers/prepareWidgetData.ts","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/preparers/d3config.ts","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/preparers/scatter.ts","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/preparers/bar.ts","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/helpers/placeholdersToMap.ts","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/validation/lineAndBarValidation.ts","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/validation/scatterValidation.ts","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/module/queryChart/selectors.ts","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/validation/colorsValidation.ts","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/components/EmptyPlaceholdersMessage.tsx","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/plugins/d3/index.js","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/components/Chart.tsx","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/icons/esm/Plus.js","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/components/ChartFields/ChartFieldName.tsx","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/components/ChartFields/ChartField.tsx","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/components/ChartFields/ChartFields.tsx","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/components/ChartSettings.tsx","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/components/VisualizationSelector.tsx","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/icons/esm/ArrowsRotateRight.js","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/components/SavingIndicator.tsx","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/components/ChartValidation.tsx","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/icons/esm/CircleExclamation.js","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/components/QueryResultsVisualization.tsx","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/i18n/index.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/libs/chartkit-error/chartkit-error.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/libs/settings/mergeSettingStrategy.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/libs/settings/settings.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/libs/settings/eventEmitter.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/utils/cn.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/utils/common.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/icons/esm/Gear.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/components/Alert/AlertContext.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/components/Alert/useAlertContext.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/components/Alert/AlertAction.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/components/Alert/constants.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/components/Alert/AlertContextProvider.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/components/Alert/AlertIcon.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/icons/esm/CircleXmarkFill.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/icons/esm/CircleXmark.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/icons/esm/CircleInfoFill.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/icons/esm/CircleCheckFill.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/icons/esm/TriangleExclamationFill.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/icons/esm/ThunderboltFill.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/components/Alert/i18n/index.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/components/Alert/Alert.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/components/Alert/AlertTitle.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/components/Alert/AlertActions.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/components/Card/Card.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/components/Tooltip/Tooltip.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/hooks/private/useTooltipVisible/index.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/hooks/private/useBoolean/useBoolean.js","webpack://@ytsaurus/ui/./node_modules/react-use/esm/useToggle.js","webpack://@ytsaurus/ui/./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js"],"sourcesContent":["import cn from 'bem-cn-lite';\n\nimport filter_ from 'lodash/filter';\nimport forEach_ from 'lodash/forEach';\nimport map_ from 'lodash/map';\n\nimport type {EditableManyListsItemType} from '../../../../components/Dialog';\nimport type {ResponsibleType, RoleConverted, Subject} from '../../../../utils/acl/acl-types';\nimport type {PreparedRole} from '../../../../utils/acl';\nimport {RoleListControlProps} from './RoleListControl';\n\nexport const block = cn('role-list-control');\n\nexport function prepareRoleListValue(roles: Array<PreparedRole>, otherMembers: Array<string> = []) {\n const current: typeof roles = [];\n const toAdd: typeof roles = [];\n const toRemove: typeof roles = [];\n const unrecognized: typeof roles = [];\n forEach_(roles, (item) => {\n const {isUnrecognized, isRequested, isApproved, isDepriving} = item;\n if (isUnrecognized) {\n unrecognized.push(item);\n } else if (isDepriving) {\n toRemove.push(item);\n } else if (isApproved || isRequested) {\n toAdd.push(item);\n } else {\n current.push(item);\n }\n });\n\n const currentArr = current.map((item) => prepareItemOfCurrent(item));\n const otherArr = otherMembers.map((item) => ({\n title: item,\n data: {},\n frozen: true,\n }));\n\n return {\n newItems: [],\n current: {title: 'Current', data: currentArr.concat(otherArr)},\n toAdd: {\n title: 'Will be added',\n itemClassName: block('item-to-add'),\n data: toAdd.map((item) => prepareItemOfCurrent(item, {frozen: true})),\n },\n toRemove: {\n title: 'Will be removed',\n itemClassName: block('item-to-remove'),\n data: toRemove.map((item) => prepareItemOfCurrent(item, {frozen: true})),\n },\n unrecognized: {\n title: 'Unrecognized',\n itemClassName: block('item-unrecognized'),\n data: unrecognized.map((item) => prepareItemOfCurrent(item, {frozen: true})),\n },\n };\n}\n\nfunction prepareItemOfCurrent(role: PreparedRole, extraProps: any = {}) {\n return {\n title: role.text || role.value,\n data: role,\n ...extraProps,\n };\n}\n\nexport function roleListValueToSubjectList(\n value: RoleListControlProps['value'],\n): Array<ResponsibleType> {\n const {current, newItems, toAdd} = value;\n return [\n ...newItems,\n ...manyListDataItemToSubjectList(current),\n ...manyListDataItemToSubjectList(toAdd),\n ];\n}\n\nfunction manyListDataItemToSubjectList(\n manyListDataItem: EditableManyListsItemType<RoleConverted>,\n): Array<ResponsibleType> {\n const {data} = manyListDataItem || {};\n return map_(\n filter_(data, ({removed}) => !removed),\n ({data}) => {\n const {type, value} = data || {};\n return {type: type!, value: value!};\n },\n );\n}\n\nexport function extractChangedSubjects(value: {\n current: EditableManyListsItemType<RoleConverted>;\n newItems: Array<ResponsibleType>;\n}): {\n added: Subject[];\n removed: Subject[];\n} {\n const {current, newItems} = value;\n const added = newItems || [];\n const removed = ((current && current.data) || []).filter(({removed}) => removed);\n return {\n added: added.map(({type, value}) => {\n return type === 'users' ? {user: value} : {group: value};\n }),\n removed: removed.map(({data}) => {\n const {value, type} = data || {};\n return type === 'users' ? {user: value!} : {group: value!};\n }),\n };\n}\n","import React from 'react';\nimport cn from 'bem-cn-lite';\n\nimport type {FORM_ERROR as FormErrorType} from './index';\n\nimport {FIX_MY_TYPE, YTError} from '../../types';\nimport Block from '../../components/Block/Block';\n\nimport compact_ from 'lodash/compact';\nimport map_ from 'lodash/map';\n\nconst block = cn('yt-dialog-error');\n\nexport function DialogError(props: FIX_MY_TYPE) {\n return <Block {...props} className={block()} />;\n}\n\nexport function makeErrorFields(errors: Array<YTError | Error | undefined>) {\n return compact_(\n map_(errors, (error, index) => {\n return error\n ? {\n name: `error_${index}`,\n type: 'block' as const,\n extras: {\n children: <DialogError error={error} />,\n },\n }\n : undefined;\n }),\n );\n}\n\nconst FORM_ERROR: typeof FormErrorType = 'FINAL_FORM/form-error';\n\nexport function makeFormSubmitError(error: YTError) {\n return {\n validationErrors: {\n [FORM_ERROR]: <DialogError error={error} />,\n },\n };\n}\n","import React from 'react';\nimport withLazyLoading from '../../hocs/withLazyLoading';\nimport {withDelayedMount} from '../../hocs/withDelayedMount';\n\nimport type {\n registerDialogControl as RegisterDialogControlFn,\n registerDialogTabControl as RegisterDialogTabControlFn,\n YTDialogType,\n} from './Dialog';\n\nexport type * from './Dialog';\nexport * from './DialogError';\nexport * from './controls/RoleListControl/utils';\n\nexport function importYTDFDialog() {\n return import(/* webpackChunkName: \"yt-df-dialog\" */ './Dialog');\n}\n\nexport const YTDFDialog = withDelayedMount(\n withLazyLoading(\n React.lazy(async () => {\n return {default: (await importYTDFDialog()).YTDialog};\n }),\n '',\n ),\n) as YTDialogType;\n\nexport function useControlRegistration(\n fn: (params: {\n registerDialogControl: typeof RegisterDialogControlFn;\n registerDialogTabControl: typeof RegisterDialogTabControlFn;\n }) => void,\n) {\n importYTDFDialog().then(({registerDialogControl, registerDialogTabControl}) => {\n fn({registerDialogControl, registerDialogTabControl});\n });\n}\n\nexport type {RoleListControlProps} from './controls/RoleListControl/RoleListControl';\nexport const RoleListControl = withLazyLoading(\n React.lazy(async () => {\n return {default: (await importYTDFDialog()).RoleListControl};\n }),\n '',\n);\n\nexport const EditableList = withLazyLoading(\n React.lazy(async () => {\n return {default: (await importYTDFDialog()).EditableList};\n }),\n '',\n);\n\nexport const TabFieldVertical = withLazyLoading(\n React.lazy(async () => {\n return {default: (await importYTDFDialog()).TabFieldVertical};\n }),\n '',\n);\n","import React from 'react';\n\n/**\n * The hoc allows to delay mounting until `props.visible == true`.\n * The hoc might be useful to wrap components wrapped by React.lazy\n * @param Component\n * @returns\n */\nexport function withDelayedMount<P extends {visible?: boolean}>(Component: React.ComponentType<P>) {\n return function MountOnFirstVisible(props: P) {\n const [mounted, setMounted] = React.useState(false);\n React.useEffect(() => {\n if (!mounted && props.visible) {\n setMounted(true);\n }\n }, [props.visible, mounted]);\n return !mounted ? null : <Component {...props} />;\n };\n}\n","import React from 'react';\n// For some reason React.memo drops the generic prop type and creates a regular union type\n// https://github.com/DefinitelyTyped/DefinitelyTyped/issues/37087#issuecomment-542793243\nexport const typedMemo = React.memo;\n","import React from 'react';\nimport { CHARTKIT_ERROR_CODE } from '../../libs';\nimport { getErrorMessage } from '../../utils/getErrorMessage';\nexport class ErrorBoundary extends React.Component {\n constructor() {\n super(...arguments);\n this.state = {\n error: undefined,\n };\n this.resetError = () => {\n if (this.state.error) {\n this.setState({ error: undefined });\n }\n };\n }\n static getDerivedStateFromError(error) {\n return { error };\n }\n componentDidCatch() {\n var _a, _b;\n const { error } = this.state;\n if (error) {\n (_b = (_a = this.props).onError) === null || _b === void 0 ? void 0 : _b.call(_a, { error });\n }\n }\n componentDidUpdate(prevProps) {\n if (prevProps.data !== this.props.data) {\n const { error } = this.state;\n if (error && 'code' in error && error.code === CHARTKIT_ERROR_CODE.NO_DATA) {\n this.resetError();\n }\n }\n }\n render() {\n const { error } = this.state;\n if (error) {\n const message = getErrorMessage(error);\n if (this.props.renderError) {\n return this.props.renderError({\n error,\n message,\n resetError: this.resetError,\n });\n }\n return React.createElement(\"div\", null, message);\n }\n return this.props.children;\n }\n}\n","import { i18n } from '../i18n';\nexport function getErrorMessage(error) {\n const code = 'code' in error && error.code;\n return (error.message || code || i18n('error', 'label_unknown-error')).toString();\n}\n","import { __rest } from \"tslib\";\nimport React from 'react';\nimport { Loader as BaseLoader } from '@gravity-ui/uikit';\nimport { block } from '../../utils/cn';\nimport './Loader.css';\nconst b = block('loader');\nexport const Loader = (_a) => {\n var { renderPluginLoader } = _a, props = __rest(_a, [\"renderPluginLoader\"]);\n const pluginLoader = renderPluginLoader === null || renderPluginLoader === void 0 ? void 0 : renderPluginLoader();\n // React.Suspense complains about possible undefined in \"fallback\" property\n if (typeof pluginLoader !== 'undefined') {\n return pluginLoader;\n }\n return (React.createElement(\"div\", { className: b() },\n React.createElement(BaseLoader, Object.assign({}, props))));\n};\n","import { __rest } from \"tslib\";\nimport React from 'react';\nimport { i18n } from '../i18n';\nimport { CHARTKIT_ERROR_CODE, ChartKitError, settings } from '../libs';\nimport { getRandomCKId, typedMemo } from '../utils';\nimport { cn } from '../utils/cn';\nimport { ErrorBoundary } from './ErrorBoundary/ErrorBoundary';\nimport { Loader } from './Loader/Loader';\nimport './ChartKit.css';\nconst b = cn('chartkit');\nconst ChartKitComponent = (props) => {\n const widgetRef = React.useRef();\n const { instanceRef, id: propsId, type, isMobile, renderPluginLoader } = props, restProps = __rest(props, [\"instanceRef\", \"id\", \"type\", \"isMobile\", \"renderPluginLoader\"]);\n const ckId = React.useMemo(() => getRandomCKId(), []);\n const id = propsId || ckId;\n const lang = settings.get('lang');\n const plugins = settings.get('plugins');\n const plugin = plugins.find((iteratedPlugin) => iteratedPlugin.type === type);\n if (!plugin) {\n throw new ChartKitError({\n code: CHARTKIT_ERROR_CODE.UNKNOWN_PLUGIN,\n message: i18n('error', 'label_unknown-plugin', { type }),\n });\n }\n const ChartComponent = plugin.renderer;\n React.useImperativeHandle(instanceRef, () => ({\n reflow(details) {\n var _a;\n if ((_a = widgetRef.current) === null || _a === void 0 ? void 0 : _a.reflow) {\n widgetRef.current.reflow(details);\n }\n },\n }), []);\n return (React.createElement(React.Suspense, { fallback: React.createElement(Loader, { renderPluginLoader: renderPluginLoader }) },\n React.createElement(\"div\", { className: b({ mobile: isMobile }, 'chartkit-theme_common') },\n React.createElement(ChartComponent, Object.assign({ ref: widgetRef, id: id, lang: lang }, restProps)))));\n};\nconst ChartKitComponentWithErrorBoundary = React.forwardRef(function ChartKitComponentWithErrorBoundary(props, ref) {\n return (React.createElement(ErrorBoundary, { onError: props.onError, data: props.data, renderError: props.renderError },\n React.createElement(ChartKitComponent, Object.assign({ instanceRef: ref }, props))));\n}) /* https://stackoverflow.com/a/58473012 */;\nexport const ChartKit = typedMemo(ChartKitComponentWithErrorBoundary);\n","import { ChartKit } from './components/ChartKit';\nimport { settings } from './libs';\nexport * from './types/widget-data';\nexport * from './libs/chartkit-error/chartkit-error';\nexport { settings };\nexport default ChartKit;\n","import React from 'react';\nexport * from './types';\nexport const YagrPlugin = {\n type: 'yagr',\n renderer: React.lazy(() => import('./renderer/YagrWidget')),\n};\n","import ChartKit, {settings} from '@gravity-ui/chartkit';\nimport {YagrPlugin} from '@gravity-ui/chartkit/yagr';\nexport type {RawSerieData, YagrWidgetData} from '@gravity-ui/chartkit/yagr';\n\nimport '@gravity-ui/yagr/dist/index.css';\n\nsettings.set({plugins: [YagrPlugin]});\n\nconst COLORS = ['rgb(77, 162, 241)', 'rgb(255, 61, 100)'];\n\nexport function getSerieColor(serieIndex: number) {\n return COLORS[serieIndex % COLORS.length];\n}\n\nexport default ChartKit;\n","import React from 'react';\nimport ResizeObserver from 'resize-observer-polyfill';\n\ninterface Props {\n element?: Element;\n onResize: ResizeObserverCallback;\n}\n\nexport default function useResizeObserver({element, onResize}: Props) {\n React.useEffect(() => {\n if (element) {\n const observer = new ResizeObserver(onResize);\n observer.observe(element);\n return () => {\n if (element) {\n observer.unobserve(element);\n }\n };\n } else {\n return undefined;\n }\n }, [element, onResize]);\n}\n","import {Result} from '../../module/query_result/types';\n\nexport const getPointValue = (value: Result) => {\n switch (value.$type) {\n case 'yql.interval': {\n return Number(value.$value);\n }\n\n case 'yql.int32':\n case 'yql.int64':\n case 'yql.uint8':\n case 'yql.uint32':\n case 'yql.uint64':\n case 'yql.float':\n case 'yql.double':\n case 'yql.decimal':\n return Number(value.$value);\n default:\n return value.$rawValue;\n }\n};\n","import transform_ from 'lodash/transform';\nimport groupBy_ from 'lodash/groupBy';\nimport type {QueryResult} from './types';\nimport {getPointValue} from './getPointData';\n\nexport const splitDataByColor = ({\n rows,\n colorFieldName,\n xFieldName,\n yFieldName,\n}: {\n rows: QueryResult;\n xFieldName: string;\n yFieldName: string;\n colorFieldName: string;\n}) => {\n const xFieldPath = `${xFieldName}.$rawValue`;\n const colorFieldPath = `${colorFieldName}.$rawValue`;\n\n return transform_<\n Record<string, QueryResult>,\n Array<{name: string; data: {x: string; y: number}[]}>\n >(\n groupBy_(rows, colorFieldPath),\n (result, value, key) => {\n const data = transform_<Record<string, QueryResult>, {x: string; y: number}[]>(\n groupBy_(value, xFieldPath),\n (acc, y, x) => {\n const point = Array.isArray(y) ? y[0] : y;\n\n acc.push({\n x,\n y: Number(getPointValue(point[yFieldName])),\n });\n\n return acc;\n },\n [],\n );\n\n result.push({\n name: key,\n data,\n });\n\n return result;\n },\n [],\n );\n};\n","import type {Placeholder, Visualization} from '../types';\n\ntype VisualizationPlaceholders = {\n xPlaceholder: Placeholder | undefined;\n yPlaceholder: Placeholder | undefined;\n colorPlaceholder: Placeholder | undefined;\n};\n\nexport function getVisualizationPlaceholders(\n visualization: Visualization,\n): VisualizationPlaceholders {\n return visualization.placeholders.reduce(\n (acc: VisualizationPlaceholders, placeholder) => {\n if (placeholder.id === 'x') {\n acc.xPlaceholder = placeholder;\n }\n\n if (placeholder.id === 'y') {\n acc.yPlaceholder = placeholder;\n }\n\n if (placeholder.id === 'colors') {\n acc.colorPlaceholder = placeholder;\n }\n\n return acc;\n },\n {\n xPlaceholder: undefined,\n yPlaceholder: undefined,\n colorPlaceholder: undefined,\n },\n );\n}\n","import merge_ from 'lodash/merge';\nimport type {ChartKitWidgetData} from '@gravity-ui/chartkit';\nimport {prepareBar} from './bar';\nimport {prepareScatter} from './scatter';\nimport type {PrepareLineArgs} from './types';\nimport {buildD3Config} from './d3config';\n\nexport const prepareWidgetData = (args: PrepareLineArgs): ChartKitWidgetData => {\n const d3Config = buildD3Config(args);\n\n let data;\n\n switch (args.visualization.id) {\n case 'scatter': {\n data = prepareScatter(args);\n break;\n }\n default: {\n data = prepareBar(args);\n }\n }\n\n return merge_(data, d3Config);\n};\n","import type {ChartKitWidgetAxisType, ChartKitWidgetData} from '@gravity-ui/chartkit';\nimport type {PrepareLineArgs} from './types';\nimport {VisualizationId} from '../types';\n\n// Inspired by\n// https://github.com/datalens-tech/datalens-ui/blob/e978d82ce785d4321057942d0ff05a163c12ade7/src/server/modes/charts/plugins/datalens/d3/index.ts#L24\n\nexport function buildD3Config(args: PrepareLineArgs) {\n const chartSettings = args.visualization.chartSettings;\n\n const xAxisGridEnabled = true;\n const xAxisIsLegendEnabled = chartSettings.xAxis.legend === 'on';\n const xAxisEnableLabels = chartSettings.xAxis.labels === 'on';\n const xAxisTitle = chartSettings.xAxis.title;\n const xAxisPixelInterval = Number(chartSettings.xAxis.pixelInterval || '120');\n\n const yAxisEnableLabels = chartSettings.yAxis.labels === 'on';\n const yAxisTitle = chartSettings.yAxis.title;\n const yAxisGridEnabled = chartSettings.yAxis.grid === 'on';\n const yAxisPixelInterval = Number(chartSettings.yAxis.pixelInterval || '120');\n\n const chartWidgetData: Partial<ChartKitWidgetData> = {\n tooltip: {enabled: true},\n legend: {enabled: xAxisIsLegendEnabled},\n xAxis: {\n type: getAxisType(args.visualization.id),\n labels: {\n enabled: xAxisEnableLabels,\n },\n title: {\n text: xAxisTitle,\n },\n grid: {\n enabled: xAxisGridEnabled,\n },\n ticks: {\n pixelInterval: xAxisPixelInterval,\n },\n },\n yAxis: [\n {\n // todo: the axis type should depend on the type of field\n type: 'linear',\n lineColor: 'transparent',\n labels: {\n enabled: yAxisEnableLabels,\n },\n title: {\n text: yAxisTitle,\n },\n grid: {\n enabled: yAxisGridEnabled,\n },\n ticks: {\n pixelInterval: yAxisPixelInterval,\n },\n },\n ],\n series: {\n data: [],\n options: {\n 'bar-x': {\n barMaxWidth: 50,\n barPadding: 0.05,\n groupPadding: 0.4,\n dataSorting: {\n direction: 'desc',\n key: 'name',\n },\n },\n line: {\n lineWidth: 2,\n },\n },\n },\n chart: {\n margin: {\n top: 10,\n left: 10,\n right: 10,\n bottom: 15,\n },\n },\n };\n\n return chartWidgetData;\n}\n\n// Write this function, using reference:\n// https://github.com/datalens-tech/datalens-ui/blob/e978d82ce785d4321057942d0ff05a163c12ade7/src/server/modes/charts/plugins/datalens/preparers/helpers/axis.ts\nfunction getAxisType(visualizationId: VisualizationId): ChartKitWidgetAxisType {\n return visualizationId === 'scatter' ? 'linear' : 'category';\n}\n","import type {ChartKitWidgetData} from '@gravity-ui/chartkit';\nimport type {PrepareLineArgs} from './types';\nimport {splitDataByColor} from './splitDataByColor';\nimport {getVisualizationPlaceholders} from './utils';\n\nexport function prepareScatter(args: PrepareLineArgs): ChartKitWidgetData {\n const {visualization} = args;\n const rows = args.result;\n const {xPlaceholder, yPlaceholder, colorPlaceholder} =\n getVisualizationPlaceholders(visualization);\n const [colorField] = [colorPlaceholder?.field] || [];\n\n const xField = xPlaceholder?.field;\n const yField = yPlaceholder?.field;\n\n if (!xField || !yField) {\n return {\n series: {\n data: [],\n },\n };\n }\n\n if (colorField) {\n return {\n series: {\n data: splitDataByColor({\n rows,\n yFieldName: yField,\n xFieldName: xField,\n colorFieldName: colorField,\n }).map((item) => ({\n data: item.data.map(({x, y}) => ({\n x: Number(x),\n y: Number(y),\n })),\n name: item.name,\n type: 'scatter',\n })),\n },\n };\n }\n\n return {\n series: {\n data: [\n {\n type: 'scatter',\n data: rows.map((row) => {\n return {\n x: Number(row[xField].$rawValue),\n y: Number(row[yField].$rawValue),\n };\n }),\n name: `${xField} x ${yField}`,\n },\n ],\n },\n };\n}\n","import uniq_ from 'lodash/uniq';\nimport map_ from 'lodash/map';\nimport type {ChartKitWidgetData} from '@gravity-ui/chartkit';\nimport type {PrepareLineArgs, QueryResult} from './types';\nimport {VisualizationId} from '../types';\nimport {splitDataByColor} from './splitDataByColor';\nimport {getPointValue} from './getPointData';\nimport {getVisualizationPlaceholders} from './utils';\n\n// Inspired by datalens ql chart\n// https://github.com/datalens-tech/datalens-ui/blob/e978d82ce785d4321057942d0ff05a163c12ade7/src/server/modes/charts/plugins/ql/preparers/line.ts#L82\n\ninterface PrepareColoredSeriesDataArgs {\n rows: QueryResult;\n xField: string;\n yField: string;\n colorField: string;\n visualizationId: VisualizationId;\n}\n\nfunction prepareColoredSeriesData({\n rows,\n xField,\n yField,\n colorField,\n visualizationId,\n}: PrepareColoredSeriesDataArgs): ChartKitWidgetData {\n const xFieldPath = `${xField}.$rawValue`;\n\n return {\n series: {\n data: splitDataByColor({\n rows,\n xFieldName: xField,\n yFieldName: yField,\n colorFieldName: colorField,\n }).map((item) => {\n return {\n type: visualizationId,\n stacking: 'normal',\n name: item.name,\n data: item.data,\n };\n }),\n },\n xAxis: {\n type: 'category',\n categories: uniq_(map_(rows, xFieldPath) as unknown as string[]),\n },\n };\n}\n\ninterface PrepareSeriesDataArgs {\n rows: QueryResult;\n xField: string;\n yField: string;\n visualizationId: VisualizationId;\n}\n\nfunction prepareSeriesData({\n xField,\n yField,\n rows,\n visualizationId,\n}: PrepareSeriesDataArgs): ChartKitWidgetData {\n const result: Record<any, any> = {};\n\n let xValues: (string | number)[] = [];\n\n const dataMatrix: Record<string, any> = {};\n\n rows.forEach((row) => {\n const xRowItem = row[xField];\n const xValue = xRowItem.$rawValue;\n\n xValues.push(xValue);\n\n dataMatrix[xValue] = getPointValue(row[yField]);\n });\n\n xValues = Array.from(new Set(xValues));\n\n result.categories = xValues.map((value) => value);\n\n result.graphs = [];\n\n const graph = {\n data: xValues.map((xValue) => {\n return dataMatrix[String(xValue)];\n }),\n };\n\n result.graphs?.push(graph);\n\n return {\n series: {\n data: [\n {\n type: visualizationId,\n data: result.graphs[0].data.map((item: string, index: number) => {\n return {\n x: result.categories[index],\n y: Number(item),\n };\n }),\n name: yField,\n },\n ],\n },\n xAxis: {\n type: 'category',\n categories: result.categories,\n },\n };\n}\n\nexport function prepareBar(args: PrepareLineArgs): ChartKitWidgetData {\n const {visualization} = args;\n const visualizationId = visualization.id;\n const rows = args.result;\n const {xPlaceholder, yPlaceholder, colorPlaceholder} =\n getVisualizationPlaceholders(visualization);\n\n const colorField = colorPlaceholder?.field;\n const xField = xPlaceholder?.field;\n const yField = yPlaceholder?.field;\n\n if (!xField || !yField) {\n return {\n series: {\n data: [],\n },\n };\n }\n\n if (colorField) {\n return prepareColoredSeriesData({\n rows,\n yField,\n xField,\n colorField,\n visualizationId,\n });\n }\n\n return prepareSeriesData({\n rows,\n yField,\n xField,\n visualizationId,\n });\n}\n","import {Placeholder} from '../types';\n\nexport const placeholdersToMap = (placeholders: Placeholder[]) => {\n return new Map(placeholders.map((placeholder) => [placeholder.id, placeholder.field]));\n};\n","import type {QueryResult} from '../preparers/types';\nimport type {Placeholder} from '../types';\nimport {placeholdersToMap} from '../helpers/placeholdersToMap';\n\nexport const lineAndBarValidation = (queryResult: QueryResult, placeholders: Placeholder[]) => {\n const fields = placeholdersToMap(placeholders);\n\n const xFieldName = fields.get('x');\n const yFieldName = fields.get('y');\n const notAllFieldsSelected = !xFieldName || !yFieldName;\n\n if (notAllFieldsSelected) {\n return {\n x: {invalid: false},\n };\n }\n\n const xCoords: Record<string, boolean> = {};\n\n const isXCoordsDuplicated = queryResult.some((item) => {\n const xValue = item[xFieldName].$rawValue;\n\n const isXValueDuplicated = xCoords[xValue];\n\n xCoords[xValue] = true;\n\n return isXValueDuplicated;\n });\n\n return {\n x: {invalid: isXCoordsDuplicated},\n } as unknown as Record<string, {invalid: boolean}>;\n};\n","import type {QueryResult} from '../preparers/types';\nimport type {Placeholder} from '../types';\nimport objectHash from 'object-hash';\nimport {placeholdersToMap} from '../helpers/placeholdersToMap';\n\nexport const scatterValidation = (queryResult: QueryResult, placeholders: Placeholder[]) => {\n const fields = placeholdersToMap(placeholders);\n\n const xFieldName = fields.get('x');\n const yFieldName = fields.get('y');\n const notAllFieldsSelected = !xFieldName || !yFieldName;\n\n if (notAllFieldsSelected) {\n return {\n x: {invalid: false},\n y: {invalid: false},\n };\n }\n\n const hashes: Record<string, boolean> = {};\n\n const isPointsDuplicated = queryResult.some((item) => {\n const xValue = item[xFieldName].$rawValue;\n const yValue = item[yFieldName].$rawValue;\n // eslint-disable-next-line new-cap\n const hash = objectHash.MD5({\n xValue,\n yValue,\n });\n\n const isPointDuplicated = hashes[hash];\n\n hashes[hash] = true;\n\n return isPointDuplicated;\n });\n\n return {\n x: {invalid: isPointsDuplicated},\n y: {invalid: isPointsDuplicated},\n };\n};\n","import {createSelector} from 'reselect';\nimport {RootState} from '../../../../store/reducers';\nimport {getQueryResultsState} from '../query_result/selectors';\nimport {getQueryDraft} from '../query/selectors';\nimport {QueryResultReadyState} from '../query_result/types';\nimport {colorsValidation} from '../../QueryResultsVisualization/validation/colorsValidation';\nimport {lineAndBarValidation} from '../../QueryResultsVisualization/validation/lineAndBarValidation';\nimport {scatterValidation} from '../../QueryResultsVisualization/validation/scatterValidation';\n\nexport const selectQueryResultVisualization = (state: RootState) =>\n state.queryTracker.queryChart.visualization;\n\nexport const selectQueryResultVisualizationPlaceholders = (state: RootState) =>\n selectQueryResultVisualization(state).placeholders;\n\nexport const selectQueryResultVisualizationId = (state: RootState) =>\n selectQueryResultVisualization(state).id;\n\nexport const selectQueryResultChartSettings = (state: RootState) =>\n selectQueryResultVisualization(state).chartSettings;\n\nexport const selectQueryResultChartSaved = (state: RootState) =>\n state.queryTracker.queryChart.saved;\n\nexport const selectQueryResult = createSelector(\n [getQueryDraft, getQueryResultsState],\n (draft, results) => {\n const {id} = draft;\n\n if (!id || !(id in results)) return [];\n\n return (results[id][0] as QueryResultReadyState).results;\n },\n);\n\nexport const selectAvailableFields = (state: RootState) => {\n const result = selectQueryResult(state);\n\n const row = (result && result[0]) || [];\n\n const columns: string[] = Object.keys(row).map((name) => {\n return name;\n });\n\n return columns;\n};\n\nexport const resultsPlaceholdersValidation = createSelector(\n [\n selectQueryResult,\n selectQueryResultVisualizationPlaceholders,\n selectQueryResultVisualizationId,\n ],\n (queryResult, placeholders, visualizationId): Record<string, {invalid: boolean}> => {\n const hasColors = Boolean(\n placeholders.find((placeholder) => placeholder.id === 'colors')?.field,\n );\n\n if (hasColors) {\n return colorsValidation(queryResult, placeholders);\n }\n\n const validationFunction =\n visualizationId === 'scatter' ? scatterValidation : lineAndBarValidation;\n\n return validationFunction(queryResult, placeholders);\n },\n);\n\nexport const selectIsPlaceholdersFieldsFilled = createSelector(\n [selectQueryResultVisualizationPlaceholders],\n (placeholders) => {\n return placeholders.every((item) => {\n return (item.id !== 'x' && item.id !== 'y') || item.field !== '';\n });\n },\n);\n","import type {QueryResult} from '../preparers/types';\nimport type {Placeholder} from '../types';\nimport objectHash from 'object-hash';\n\nexport const colorsValidation = (queryResult: QueryResult, placeholders: Placeholder[]) => {\n const fields = placeholders.reduce((acc: string[], {field}) => {\n if (field) {\n acc.push(field);\n }\n\n return acc;\n }, []);\n\n const notAllFieldsSelected = fields.length < placeholders.length;\n\n if (notAllFieldsSelected) {\n return {\n x: {invalid: false},\n };\n }\n\n const hashes: Record<string, boolean> = {};\n\n const isDataDuplicated = queryResult.some((item) => {\n const newObject = fields.reduce((acc: Record<string, string>, field: string) => {\n acc[field] = item[field].$rawValue;\n return acc;\n }, {});\n\n // eslint-disable-next-line new-cap\n const lineHash = objectHash.MD5(newObject);\n\n const isLineDuplicated = hashes[lineHash];\n\n hashes[lineHash] = true;\n\n return isLineDuplicated;\n });\n\n return {\n x: {invalid: isDataDuplicated},\n };\n};\n","import React from 'react';\nimport block from 'bem-cn-lite';\nimport './EmptyPlaceholdersMessage.scss';\n\nconst b = block('empty-placeholders-message');\n\nexport function EmptyPlaceholdersMessage() {\n return <div className={b()}>Add fields in X and Y placeholders</div>;\n}\n","import React from 'react';\nexport * from './types';\nexport * from './utils';\n/**\n * It is an experemental plugin\n *\n * DO NOT USE IT IN YOUR PRODUCTION\n * */\nexport const D3Plugin = {\n type: 'd3',\n renderer: React.lazy(() => import('./renderer/D3Widget')),\n};\n","import React, {useMemo} from 'react';\nimport ChartKit from '../../../../components/YagrChartKit/YagrChartKit';\nimport {settings} from '@gravity-ui/chartkit';\nimport type {ChartKitRef} from '@gravity-ui/chartkit';\nimport {prepareWidgetData} from '../preparers/prepareWidgetData';\nimport {useSelector} from 'react-redux';\nimport {\n selectIsPlaceholdersFieldsFilled,\n selectQueryResultVisualization,\n} from '../../module/queryChart/selectors';\nimport type {QueryResult} from '../preparers/types';\nimport {EmptyPlaceholdersMessage} from './EmptyPlaceholdersMessage';\nimport {D3Plugin} from '@gravity-ui/chartkit/d3';\n\nsettings.set({plugins: [...settings.get('plugins'), D3Plugin]});\n\ntype LineBasicProps = {\n result: QueryResult;\n};\n\nexport const BaseChart = React.forwardRef<ChartKitRef | undefined, LineBasicProps>(\n function BaseChartComponent({result}, ref) {\n const visualization = useSelector(selectQueryResultVisualization);\n const fieldsIsFilled = useSelector(selectIsPlaceholdersFieldsFilled);\n\n const widgetData = useMemo(() => {\n return prepareWidgetData({result, visualization});\n }, [result, visualization]);\n\n if (!fieldsIsFilled) {\n return <EmptyPlaceholdersMessage />;\n }\n\n return <ChartKit type=\"d3\" data={widgetData} ref={ref} />;\n },\n);\n\nexport const Chart = React.memo(BaseChart);\n","import * as React from 'react';\nconst Plus = (props) => (React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: 16, height: 16, fill: \"none\", viewBox: \"0 0 16 16\" }, props),\n React.createElement(\"path\", { fill: \"currentColor\", fillRule: \"evenodd\", d: \"M8 1.75a.75.75 0 0 1 .75.75v4.75h4.75a.75.75 0 0 1 0 1.5H8.75v4.75a.75.75 0 0 1-1.5 0V8.75H2.5a.75.75 0 0 1 0-1.5h4.75V2.5A.75.75 0 0 1 8 1.75Z\", clipRule: \"evenodd\" })));\nexport default Plus;\n","import React, {FC} from 'react';\nimport {Button, Icon} from '@gravity-ui/uikit';\nimport {Xmark as XmarkIcon} from '@gravity-ui/icons';\nimport cn from 'bem-cn-lite';\nimport './ChartFieldName.scss';\n\nconst b = cn('yt-chart-field-name');\n\ntype Props = {\n fieldName: string;\n placeholderId: string;\n onRemove: (fieldName: string, placeholderId: string) => void;\n};\n\nexport const ChartFieldName: FC<Props> = ({fieldName, placeholderId, onRemove}) => {\n if (!fieldName) return null;\n\n const handleRemoveField = () => {\n onRemove(fieldName, placeholderId);\n };\n\n return (\n <div key={fieldName} className={b()}>\n <div className={b('spacer')}></div>\n <div className={b('title')} title={fieldName}>\n {fieldName}\n </div>\n <div className={b('actions')}>\n <Button onClick={handleRemoveField}>\n <Icon data={XmarkIcon} size={16} />\n </Button>\n </div>\n </div>\n );\n};\n","import React, {useCallback} from 'react';\nimport block from 'bem-cn-lite';\nimport './ChartField.scss';\nimport {Placeholder} from '../../types';\nimport {Button, Icon, Select} from '@gravity-ui/uikit';\nimport {Plus as PlusIcon} from '@gravity-ui/icons';\nimport {useDispatch} from 'react-redux';\nimport {removeField, setField} from '../../../module/queryChart/queryChartSlice';\nimport {ChartFieldName} from './ChartFieldName';\n\nconst b = block('yt-chart-field');\n\ntype PlaceholderComponentProps = {\n placeholder: Placeholder;\n availableFields: string[];\n};\n\nexport const ChartField = ({placeholder, availableFields}: PlaceholderComponentProps) => {\n const {id, field} = placeholder;\n const dispatch = useDispatch();\n\n const handleRemoveField = useCallback(\n (fieldName: string, placeholderId: string) => {\n dispatch(\n removeField({\n fieldName,\n placeholderId,\n }),\n );\n },\n [dispatch],\n );\n\n const onSelectUpdate = React.useCallback(\n (value: string[]) => {\n dispatch(\n setField({\n placeholderId: placeholder.id,\n fieldName: value[0],\n }),\n );\n },\n [dispatch, placeholder.id],\n );\n\n return (\n <div className={b()}>\n <div className={b('header')}>\n <div className={b('name')}>{id}</div>\n <Select\n value={[]}\n filterable={true}\n options={availableFields.map((item) => ({\n content: item,\n value: item,\n data: item,\n }))}\n onUpdate={onSelectUpdate}\n renderControl={({onClick, ref}) => {\n return (\n <Button onClick={onClick} ref={ref}>\n <Icon data={PlusIcon} size={16} />\n </Button>\n );\n }}\n />\n </div>\n\n <ChartFieldName\n fieldName={field}\n placeholderId={placeholder.id}\n onRemove={handleRemoveField}\n />\n </div>\n );\n};\n","import React, {FC} from 'react';\nimport {ChartField} from './ChartField';\nimport block from 'bem-cn-lite';\nimport './ChartFields.scss';\nimport {useSelector} from 'react-redux';\nimport {selectQueryResultVisualizationPlaceholders} from '../../../module/queryChart/selectors';\n\nconst b = block('yt-query-chart-fields');\n\ntype PlaceholdersContainerProps = {\n availableFields: string[];\n};\n\nexport const ChartFields: FC<PlaceholdersContainerProps> = ({availableFields}) => {\n const placeholders = useSelector(selectQueryResultVisualizationPlaceholders);\n\n return (\n <div className={b()}>\n {placeholders.map((placeholder) => (\n <ChartField\n key={placeholder.id}\n placeholder={placeholder}\n availableFields={availableFields}\n />\n ))}\n </div>\n );\n};\n","import React, {useCallback} from 'react';\nimport {Gear} from '@gravity-ui/icons';\nimport {Icon} from '@gravity-ui/uikit';\nimport Button from '../../../../components/Button/Button';\nimport {DialogField, DialogTabField, FormApi, YTDFDialog} from '../../../../components/Dialog';\nimport type {ChartSettings} from '../types';\nimport {useDispatch, useSelector} from 'react-redux';\nimport {selectQueryResultChartSettings} from '../../module/queryChart/selectors';\nimport {setChartSettings} from '../../module/queryChart/queryChartSlice';\nimport {useToggle} from 'react-use';\n\ntype FormValues = ChartSettings;\n\nfunction pixelIntervalValidator(value: string) {\n return !value || /^\\d+$/.test(value) ? undefined : 'Should be a number';\n}\n\nconst extras = {\n options: [\n {\n value: 'on',\n label: 'On',\n },\n {\n value: 'off',\n label: 'Off',\n },\n ],\n};\n\nconst xAxisTab: DialogTabField<DialogField<FormValues>> = {\n type: 'tab',\n name: 'xAxis',\n title: 'X axis',\n fields: [\n {\n name: 'legend',\n caption: 'Legend',\n type: 'radio',\n extras,\n },\n {\n name: 'labels',\n caption: 'Labels',\n type: 'radio',\n extras,\n },\n {\n caption: 'Title',\n name: 'title',\n type: 'text',\n },\n {\n caption: 'Grid step, px',\n name: 'pixelInterval',\n type: 'text',\n validator: pixelIntervalValidator,\n },\n ],\n};\n\nconst yAxisTab: DialogTabField<DialogField<FormValues>> = {\n type: 'tab',\n name: 'yAxis',\n title: 'Y axis',\n fields: [\n {\n name: 'labels',\n caption: 'Labels',\n type: 'radio',\n extras,\n },\n {\n caption: 'Title',\n name: 'title',\n type: 'text',\n },\n {\n name: 'grid',\n caption: 'Grid',\n type: 'radio',\n extras,\n },\n {\n caption: 'Grid step, px',\n name: 'pixelInterval',\n type: 'text',\n validator: pixelIntervalValidator,\n },\n ],\n};\n\nconst fields: DialogTabField<DialogField<FormValues>>[] = [xAxisTab, yAxisTab];\n\nexport function ChartSettingsComponent() {\n const [visible, toggleVisibility] = useToggle(false);\n const chartSettings = useSelector(selectQueryResultChartSettings);\n const dispatch = useDispatch();\n\n const handleOnAdd = useCallback(\n (form: FormApi<FormValues, Partial<FormValues>>) => {\n dispatch(setChartSettings(form.getState().values));\n return Promise.resolve();\n },\n [dispatch],\n );\n\n return (\n <span>\n <Button onClick={toggleVisibility}>\n <Icon data={Gear} size={16} />\n </Button>\n <YTDFDialog<FormValues>\n visible={visible}\n initialValues={chartSettings}\n onClose={toggleVisibility}\n onAdd={handleOnAdd}\n fields={fields}\n />\n </span>\n );\n}\n","import React, {FC, useCallback} from 'react';\nimport {Select} from '@gravity-ui/uikit';\nimport type {VisualizationId} from '../types';\nimport {useDispatch, useSelector} from 'react-redux';\nimport {selectQueryResultVisualization} from '../../module/queryChart/selectors';\nimport {setVisualization} from '../../module/queryChart/queryChartSlice';\n\nconst options: {value: VisualizationId; content: string}[] = [\n {\n value: 'line',\n content: 'Line chart',\n },\n {\n value: 'bar-x',\n content: 'Bar chart',\n },\n {\n value: 'scatter',\n content: 'Scatter chart',\n },\n];\n\nexport const VisualizationSelector: FC = () => {\n const visualization = useSelector(selectQueryResultVisualization);\n const dispatch = useDispatch();\n\n const onUpdate = useCallback(\n ([visualizationId]: string[]) => {\n dispatch(setVisualization({...visualization, id: visualizationId as VisualizationId}));\n },\n [dispatch, visualization],\n );\n\n return <Select width={125} value={[visualization.id]} options={options} onUpdate={onUpdate} />;\n};\n","import * as React from 'react';\nconst ArrowsRotateRight = (props) => (React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: 16, height: 16, fill: \"none\", viewBox: \"0 0 16 16\" }, props),\n React.createElement(\"path\", { fill: \"currentColor\", fillRule: \"evenodd\", d: \"M8 1.5a6.501 6.501 0 0 0-6.445 5.649.75.75 0 1 0 1.488.194A5.001 5.001 0 0 1 11.57 4.5h-1.32a.75.75 0 0 0 0 1.5h3a.75.75 0 0 0 .75-.75v-3a.75.75 0 0 0-1.5 0v1.06A6.48 6.48 0 0 0 8 1.5Zm-5.25 13a.75.75 0 0 1-.75-.75v-3a.75.75 0 0 1 .75-.75h3a.75.75 0 0 1 0 1.5H4.43a5.001 5.001 0 0 0 8.528-2.843.75.75 0 1 1 1.487.194A6.501 6.501 0 0 1 3.5 12.691v1.059a.75.75 0 0 1-.75.75Z\", clipRule: \"evenodd\" })));\nexport default ArrowsRotateRight;\n","import React from 'react';\nimport {useSelector} from 'react-redux';\nimport {selectQueryResultChartSaved} from '../../module/queryChart/selectors';\nimport {ArrowsRotateRight, CircleCheck} from '@gravity-ui/icons';\nimport {Icon, Tooltip} from '@gravity-ui/uikit';\nimport block from 'bem-cn-lite';\nimport './SavingIndicator.scss';\n\nconst b = block('saving-indicator');\n\nexport function SavingIndicator() {\n const saved = useSelector(selectQueryResultChartSaved);\n const tooltipContent = saved ? 'Saved' : 'Saving in progress';\n\n return (\n <Tooltip content={tooltipContent}>\n <Icon\n className={b({saving: !saved})}\n data={saved ? CircleCheck : ArrowsRotateRight}\n size={16}\n />\n </Tooltip>\n );\n}\n","import React, {FC, PropsWithChildren, useState} from 'react';\nimport {useSelector} from 'react-redux';\nimport type {AlertProps} from '@gravity-ui/uikit';\nimport {Alert, Button, Icon} from '@gravity-ui/uikit';\nimport block from 'bem-cn-lite';\nimport {resultsPlaceholdersValidation} from '../../module/queryChart/selectors';\nimport {CircleExclamation as CircleExclamationIcon} from '@gravity-ui/icons';\n\nimport './ChartValidation.scss';\n\nconst b = block('chart-validation');\n\nconst ALERT_TEXT =\n 'Your data contains duplicate values for one or more points. </br> This can lead to incorrect graph plotting. Please ensure that each point has a unique value.';\n\nconst ALERT_PROPS = {\n title: 'Duplicate Values',\n theme: 'warning' as AlertProps['theme'],\n message: (\n <span\n dangerouslySetInnerHTML={{\n __html: ALERT_TEXT,\n }}\n />\n ),\n icon: (\n <Icon className={b('field-icon', {invalid: true})} data={CircleExclamationIcon} size={16} />\n ),\n};\n\nexport const ChartValidation: FC<PropsWithChildren> = ({children}) => {\n const [isErrorHidden, hideError] = useState(false);\n const placeholdersValidation = useSelector(resultsPlaceholdersValidation);\n const hasError = placeholdersValidation?.x?.invalid || placeholdersValidation?.y?.invalid;\n const showBigAlert = hasError && !isErrorHidden;\n const showSmallAlert = isErrorHidden;\n\n if (showBigAlert) {\n return (\n <div className={b()}>\n <Alert\n {...ALERT_PROPS}\n actions={\n <Alert.Actions>\n <Button onClick={() => hideError(true)}>Show chart</Button>\n </Alert.Actions>\n }\n />\n </div>\n );\n }\n\n if (showSmallAlert) {\n return (\n <>\n <div className={b('alert')}>\n <Alert {...ALERT_PROPS} />\n </div>\n {children}\n </>\n );\n }\n\n return children;\n};\n","import * as React from 'react';\nconst CircleExclamation = (props) => (React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: 16, height: 16, fill: \"none\", viewBox: \"0 0 16 16\" }, props),\n React.createElement(\"path\", { fill: \"currentColor\", fillRule: \"evenodd\", d: \"M8 13.5a5.5 5.5 0 1 0 0-11 5.5 5.5 0 0 0 0 11ZM8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14Zm1-4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM8.75 5a.75.75 0 0 0-1.5 0v2.5a.75.75 0 0 0 1.5 0V5Z\", clipRule: \"evenodd\" })));\nexport default CircleExclamation;\n","import React, {useEffect} from 'react';\nimport {useDispatch, useSelector} from 'react-redux';\nimport throttle_ from 'lodash/throttle';\nimport block from 'bem-cn-lite';\nimport {type ChartKitRef} from '@gravity-ui/chartkit';\nimport {Chart} from './Chart';\nimport {QueryItem} from '../../module/api';\nimport useResizeObserver from '../../../../hooks/useResizeObserver';\nimport {ChartFields} from './ChartFields';\nimport './QueryResultsVisualization.scss';\nimport {saveQueryChartConfig} from '../../module/queryChart/actions';\nimport {\n selectAvailableFields,\n selectQueryResult,\n selectQueryResultVisualization,\n} from '../../module/queryChart/selectors';\nimport {ChartSettingsComponent} from './ChartSettings';\nimport {VisualizationSelector} from './VisualizationSelector';\nimport {SavingIndicator} from './SavingIndicator';\nimport {ChartValidation} from './ChartValidation';\n\nimport ErrorBoundary from '../../../../components/ErrorBoundary/ErrorBoundary';\n\nconst b = block('query-result-visualization');\n\ntype QueryResultsVisualizationProps = {\n query: QueryItem;\n};\n\nexport function QueryResultsVisualization({query}: QueryResultsVisualizationProps) {\n const containerRef = React.useRef<HTMLDivElement>(null);\n const chartKitRef = React.useRef<ChartKitRef>();\n const visualization = useSelector(selectQueryResultVisualization);\n const queryResult = useSelector(selectQueryResult);\n const availableFields = useSelector(selectAvailableFields);\n\n const dispatch = useDispatch();\n\n useEffect(() => {\n dispatch(\n saveQueryChartConfig({\n queryId: query.id,\n visualization,\n }),\n );\n }, [query.id, visualization, dispatch]);\n\n const debouncedChartResize = React.useMemo(() => {\n return throttle_(() => {\n chartKitRef.current?.reflow();\n }, 300);\n }, []);\n\n useResizeObserver({\n element: containerRef.current ?? undefined,\n onResize: debouncedChartResize,\n });\n\n return (\n <div className={b()} ref={containerRef}>\n <div className={b('controls-wrapper')}>\n <div className={b('group-wrapper')}>\n <VisualizationSelector />\n <ChartSettingsComponent />\n <SavingIndicator />\n </div>\n <ChartFields availableFields={availableFields} />\n </div>\n <div className={b('chartkit-wrapper')}>\n <ErrorBoundary>\n <ChartValidation>\n <Chart result={queryResult} ref={chartKitRef} />\n </ChartValidation>\n </ErrorBoundary>\n </div>\n </div>\n );\n}\n","import { I18N } from '@gravity-ui/i18n';\nimport en from './keysets/en.json';\nimport ru from './keysets/ru.json';\nconst i18nFactory = new I18N();\nconst EN = 'en';\nconst RU = 'ru';\ni18nFactory.registerKeysets(EN, en);\ni18nFactory.registerKeysets(RU, ru);\nconst i18n = i18nFactory.i18n.bind(i18nFactory);\nexport { i18nFactory, i18n };\n","export const CHARTKIT_ERROR_CODE = {\n NO_DATA: 'ERR.CK.NO_DATA',\n INVALID_DATA: 'ERR.CK.INVALID_DATA',\n UNKNOWN: 'ERR.CK.UNKNOWN_ERROR',\n UNKNOWN_PLUGIN: 'ERR.CK.UNKNOWN_PLUGIN',\n TOO_MANY_LINES: 'ERR.CK.TOO_MANY_LINES',\n};\nexport class ChartKitError extends Error {\n constructor({ originalError, message, code = CHARTKIT_ERROR_CODE.UNKNOWN, } = {}) {\n super(message);\n this.isCustomError = true;\n this.code = code;\n if (originalError) {\n this.name = originalError.name;\n this.stack = originalError.stack;\n }\n }\n}\nexport const isChartKitError = (error) => {\n return error instanceof Error && 'isCustomError' in error;\n};\n","import isObject from 'lodash/isObject';\nimport mergeWith from 'lodash/mergeWith';\n// @ts-ignore\nexport function mergeSettingStrategy(objValue, srcValue, key) {\n if (key === 'plugins') {\n const currentPlugins = [...objValue];\n const newPlugins = [...srcValue];\n // modify existing plugins\n let newSettingsPlugins = currentPlugins.map((currentPlugin) => {\n const newPluginIndex = newPlugins.findIndex(({ type }) => type === currentPlugin.type);\n if (newPluginIndex !== -1) {\n const newPlugin = newPlugins[newPluginIndex];\n newPlugins.splice(newPluginIndex, 1);\n return {\n type: currentPlugin.type,\n renderer: newPlugin.renderer,\n };\n }\n return currentPlugin;\n });\n // add new plugins if it exist after modified\n if (newPlugins.length > 0) {\n newSettingsPlugins = [...newSettingsPlugins, ...newPlugins];\n }\n return newSettingsPlugins;\n }\n if (isObject(objValue)) {\n return mergeWith(objValue, srcValue, mergeSettingStrategy);\n }\n return srcValue;\n}\n","import { configure } from '@gravity-ui/uikit';\nimport get from 'lodash/get';\nimport mergeWith from 'lodash/mergeWith';\nimport { i18nFactory } from '../../i18n';\nimport { EventEmitter } from './eventEmitter';\nimport { mergeSettingStrategy } from './mergeSettingStrategy';\nexport const settingsEventEmitter = new EventEmitter();\nconst removeUndefinedValues = (data) => {\n return Object.entries(data).reduce((acc, [key, value]) => {\n if (typeof value !== 'undefined') {\n acc[key] = value;\n }\n return acc;\n }, {});\n};\nconst updateLang = (lang) => {\n configure({ lang });\n i18nFactory.setLang(lang);\n};\nclass ChartKitSettings {\n constructor() {\n this.settings = {\n plugins: [],\n lang: 'en',\n };\n updateLang(this.get('lang'));\n }\n get(key) {\n return get(this.settings, key);\n }\n set(updates) {\n const filteredUpdates = removeUndefinedValues(updates);\n this.settings = mergeWith(this.settings, filteredUpdates, mergeSettingStrategy);\n if (filteredUpdates.lang) {\n const lang = filteredUpdates.lang || this.get('lang');\n updateLang(lang);\n settingsEventEmitter.dispatch('change-lang', lang);\n }\n }\n}\nexport const settings = new ChartKitSettings();\n","export class EventEmitter {\n constructor() {\n this.events = {};\n }\n on(type, event) {\n if (this.events[type]) {\n this.events[type].push(event);\n }\n else {\n this.events[type] = [event];\n }\n }\n off(type, eventId) {\n if (this.events[type]) {\n this.events[type] = this.events[type].filter(({ id }) => id !== eventId);\n }\n }\n dispatch(type, args) {\n if (this.events[type]) {\n this.events[type].forEach(({ action }) => {\n action(args);\n });\n }\n }\n}\n","import { withNaming } from '@bem-react/classname';\nexport const NAMESPACE = 'chartkit-';\nexport const cn = withNaming({ e: '__', m: '_' });\nexport const block = withNaming({ n: NAMESPACE, e: '__', m: '_' });\n","export const randomString = (length, chars) => {\n let result = '';\n for (let i = length; i > 0; --i) {\n result += chars[Math.floor(Math.random() * chars.length)];\n }\n return result;\n};\nexport const getRandomCKId = () => `ck.${randomString(10, '0123456789abcdefghijklmnopqrstuvwxyz')}`;\n","import * as React from 'react';\nconst Gear = (props) => (React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: 16, height: 16, fill: \"none\", viewBox: \"0 0 16 16\" }, props),\n React.createElement(\"g\", { clipPath: \"url(#a)\" },\n React.createElement(\"path\", { fill: \"currentColor\", fillRule: \"evenodd\", d: \"M7.199 2H8.8a.2.2 0 0 1 .2.2c0 1.808 1.958 2.939 3.524 2.034a.199.199 0 0 1 .271.073l.802 1.388a.199.199 0 0 1-.073.272c-1.566.904-1.566 3.164 0 4.069a.199.199 0 0 1 .073.271l-.802 1.388a.199.199 0 0 1-.271.073C10.958 10.863 9 11.993 9 13.8a.2.2 0 0 1-.199.2H7.2a.199.199 0 0 1-.2-.2c0-1.808-1.958-2.938-3.524-2.034a.199.199 0 0 1-.272-.073l-.8-1.388a.199.199 0 0 1 .072-.271c1.566-.905 1.566-3.165 0-4.07a.199.199 0 0 1-.073-.271l.801-1.388a.199.199 0 0 1 .272-.073C5.042 5.138 7 4.007 7 2.2c0-.11.089-.199.199-.199ZM5.5 2.2c0-.94.76-1.7 1.699-1.7H8.8c.94 0 1.7.76 1.7 1.7a.85.85 0 0 0 1.274.735 1.699 1.699 0 0 1 2.32.622l.802 1.388c.469.813.19 1.851-.622 2.32a.85.85 0 0 0 0 1.472 1.7 1.7 0 0 1 .622 2.32l-.802 1.388a1.699 1.699 0 0 1-2.32.622.85.85 0 0 0-1.274.735c0 .939-.76 1.7-1.699 1.7H7.2a1.7 1.7 0 0 1-1.699-1.7.85.85 0 0 0-1.274-.735 1.698 1.698 0 0 1-2.32-.622l-.802-1.388a1.699 1.699 0 0 1 .622-2.32.85.85 0 0 0 0-1.471 1.699 1.699 0 0 1-.622-2.321l.801-1.388a1.699 1.699 0 0 1 2.32-.622A.85.85 0 0 0 5.5 2.2Zm4 5.8a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0ZM11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z\", clipRule: \"evenodd\" })),\n React.createElement(\"defs\", null,\n React.createElement(\"clipPath\", { id: \"a\" },\n React.createElement(\"path\", { fill: \"currentColor\", d: \"M0 0h16v16H0z\" })))));\nexport default Gear;\n","import React from 'react';\nexport const AlertContext = React.createContext(null);\n","'use client';\nimport React from 'react';\nimport { AlertContext } from './AlertContext';\nexport const useAlertContext = () => {\n const context = React.useContext(AlertContext);\n if (!context)\n throw new Error('Alert: `useAlertContext` hook is used out of \"AlertContext\"');\n return context;\n};\n","'use client';\nimport React from 'react';\nimport { Button } from '../Button';\nimport { useAlertContext } from './useAlertContext';\nexport const AlertAction = (props) => {\n const { view } = useAlertContext();\n return React.createElement(Button, Object.assign({ view: view === 'filled' ? 'normal-contrast' : undefined }, props));\n};\n","import { block } from '../utils/cn';\nimport './Alert.css';\nexport const DEFAULT_ICON_SIZE = 18;\nexport const bAlert = block('alert');\n","'use client';\nimport React from 'react';\nimport { AlertContext } from './AlertContext';\nexport const AlertContextProvider = ({ layout, view, children }) => {\n return React.createElement(AlertContext.Provider, { value: { layout, view } }, children);\n};\n","import React from 'react';\nimport { CircleCheck, CircleCheckFill, CircleInfo, CircleInfoFill, CircleXmark, CircleXmarkFill, Thunderbolt, ThunderboltFill, TriangleExclamation, TriangleExclamationFill, } from '@gravity-ui/icons';\nimport { Icon } from '../Icon';\nimport { colorText } from '../Text/colorText/colorText';\nimport { DEFAULT_ICON_SIZE, bAlert } from './constants';\nconst typeToIcon = {\n danger: {\n filled: CircleXmarkFill,\n outlined: CircleXmark,\n },\n info: {\n filled: CircleInfoFill,\n outlined: CircleInfo,\n },\n success: {\n filled: CircleCheckFill,\n outlined: CircleCheck,\n },\n warning: {\n filled: TriangleExclamationFill,\n outlined: TriangleExclamation,\n },\n utility: {\n filled: ThunderboltFill,\n outlined: Thunderbolt,\n },\n normal: null,\n};\nexport const AlertIcon = ({ className, theme, view = 'filled', size = DEFAULT_ICON_SIZE, }) => {\n const iconByTheme = typeToIcon[theme];\n if (!iconByTheme) {\n return null;\n }\n let color;\n if (theme === 'success') {\n color = 'positive';\n }\n else if (theme !== 'normal') {\n color = theme;\n }\n return (React.createElement(\"div\", { className: bAlert('icon', colorText({ color }, className)) },\n React.createElement(Icon, { data: iconByTheme[view], size: size })));\n};\n","import * as React from 'react';\nconst CircleXmarkFill = (props) => (React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: 16, height: 16, fill: \"none\", viewBox: \"0 0 16 16\" }, props),\n React.createElement(\"path\", { fill: \"currentColor\", fillRule: \"evenodd\", d: \"M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14ZM6.53 5.47a.75.75 0 0 0-1.06 1.06L6.94 8 5.47 9.47a.75.75 0 1 0 1.06 1.06L8 9.06l1.47 1.47a.75.75 0 1 0 1.06-1.06L9.06 8l1.47-1.47a.75.75 0 1 0-1.06-1.06L8 6.94 6.53 5.47Z\", clipRule: \"evenodd\" })));\nexport default CircleXmarkFill;\n","import * as React from 'react';\nconst CircleXmark = (props) => (React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: 16, height: 16, fill: \"none\", viewBox: \"0 0 16 16\" }, props),\n React.createElement(\"path\", { fill: \"currentColor\", fillRule: \"evenodd\", d: \"M13.5 8a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0ZM15 8A7 7 0 1 1 1 8a7 7 0 0 1 14 0ZM6.53 5.47a.75.75 0 0 0-1.06 1.06L6.94 8 5.47 9.47a.75.75 0 1 0 1.06 1.06L8 9.06l1.47 1.47a.75.75 0 1 0 1.06-1.06L9.06 8l1.47-1.47a.75.75 0 1 0-1.06-1.06L8 6.94 6.53 5.47Z\", clipRule: \"evenodd\" })));\nexport default CircleXmark;\n","import * as React from 'react';\nconst CircleInfoFill = (props) => (React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: 16, height: 16, fill: \"none\", viewBox: \"0 0 16 16\" }, props),\n React.createElement(\"path\", { fill: \"currentColor\", fillRule: \"evenodd\", d: \"M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14Zm1-9.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM8 7.75a.75.75 0 0 1 .75.75V11a.75.75 0 0 1-1.5 0V8.5A.75.75 0 0 1 8 7.75Z\", clipRule: \"evenodd\" })));\nexport default CircleInfoFill;\n","import * as React from 'react';\nconst CircleCheckFill = (props) => (React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: 16, height: 16, fill: \"none\", viewBox: \"0 0 16 16\" }, props),\n React.createElement(\"path\", { fill: \"currentColor\", fillRule: \"evenodd\", d: \"M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14Zm3.1-8.55a.75.75 0 1 0-1.2-.9L7.419 8.858 6.03 7.47a.75.75 0 0 0-1.06 1.06l2 2a.75.75 0 0 0 1.13-.08l3-4Z\", clipRule: \"evenodd\" })));\nexport default CircleCheckFill;\n","import * as React from 'react';\nconst TriangleExclamationFill = (props) => (React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: 16, height: 16, fill: \"none\", viewBox: \"0 0 16 16\" }, props),\n React.createElement(\"path\", { fill: \"currentColor\", fillRule: \"evenodd\", d: \"M5.836 2.244c.962-1.665 3.366-1.665 4.328 0l4.917 8.505c.964 1.666-.239 3.751-2.164 3.751H3.083c-1.925 0-3.128-2.085-2.164-3.751l4.917-8.505ZM8 5a.75.75 0 0 1 .75.75v2a.75.75 0 1 1-1.5 0v-2A.75.75 0 0 1 8 5Zm1 5.75a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z\", clipRule: \"evenodd\" })));\nexport default TriangleExclamationFill;\n","import * as React from 'react';\nconst ThunderboltFill = (props) => (React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: 16, height: 16, fill: \"none\", viewBox: \"0 0 16 16\" }, props),\n React.createElement(\"path\", { fill: \"currentColor\", d: \"m14.61 6.914-7.632 8.08a1.614 1.614 0 0 1-2.69-1.66L5.5 10H2.677A1.677 1.677 0 0 1 1.12 7.7l2.323-5.807A2.216 2.216 0 0 1 5.5.5h4c.968 0 1.637.967 1.298 1.873L10 4.5h3.569a1.431 1.431 0 0 1 1.04 2.414Z\" })));\nexport default ThunderboltFill;\n","import { addComponentKeysets } from '../../utils/addComponentKeysets';\nimport en from './en.json';\nimport ru from './ru.json';\nconst COMPONENT = 'Alert';\nexport default addComponentKeysets({ en, ru }, COMPONENT);\n","import React from 'react';\nimport { Xmark } from '@gravity-ui/icons';\nimport { Button } from '../Button';\nimport { Card } from '../Card';\nimport { Icon } from '../Icon';\nimport { colorText } from '../Text';\nimport { Flex, spacing } from '../layout';\nimport { AlertAction } from './AlertAction';\nimport { AlertActions } from './AlertActions';\nimport { AlertContextProvider } from './AlertContextProvider';\nimport { AlertIcon } from './AlertIcon';\nimport { AlertTitle } from './AlertTitle';\nimport { DEFAULT_ICON_SIZE, bAlert } from './constants';\nimport i18n from './i18n';\nexport const Alert = (props) => {\n const { theme = 'normal', view = 'filled', layout = 'vertical', message, className, corners, style, onClose, align, qa, } = props;\n return (React.createElement(AlertContextProvider, { layout: layout, view: view },\n React.createElement(Card, { style: style, className: bAlert({ corners }, spacing({ py: 4, px: 5 }, className)), theme: theme, view: view, qa: qa },\n React.createElement(Flex, { gap: \"3\", alignItems: align },\n typeof props.icon === 'undefined' ? (React.createElement(Alert.Icon, { theme: theme, view: view })) : (props.icon // ability to pass `null` as `icon` prop value\n ),\n React.createElement(Flex, { direction: layout === 'vertical' ? 'column' : 'row', gap: \"5\", grow: true },\n React.createElement(Flex, { gap: \"2\", grow: true, className: bAlert('text-content') },\n React.createElement(Flex, { direction: \"column\", gap: \"1\", grow: true, justifyContent: align },\n typeof props.title === 'string' ? (React.createElement(Alert.Title, { text: props.title })) : (props.title),\n message)),\n Array.isArray(props.actions) ? (React.createElement(Alert.Actions, { items: props.actions })) : (props.actions)),\n onClose && (React.createElement(Button, { view: \"flat\", className: bAlert('close-btn'), onClick: onClose, extraProps: {\n 'aria-label': i18n('label_close'),\n } },\n React.createElement(Icon, { data: Xmark, size: DEFAULT_ICON_SIZE, className: colorText({ color: 'secondary' }) })))))));\n};\nAlert.Icon = AlertIcon;\nAlert.Title = AlertTitle;\nAlert.Actions = AlertActions;\nAlert.Action = AlertAction;\n","import React from 'react';\nimport { Text } from '../Text';\nimport { bAlert } from './constants';\nexport const AlertTitle = ({ text, className }) => {\n return (React.createElement(Text, { variant: \"subheader-2\", className: bAlert('title', className) }, text));\n};\n","'use client';\nimport React from 'react';\nimport { Flex } from '../layout';\nimport { AlertAction } from './AlertAction';\nimport { bAlert } from './constants';\nimport { useAlertContext } from './useAlertContext';\nexport const AlertActions = ({ items, children, className }) => {\n const { layout } = useAlertContext();\n return (React.createElement(Flex, { className: bAlert('actions', { minContent: layout === 'horizontal' }, className), direction: \"row\", gap: \"3\", wrap: true, alignItems: layout === 'horizontal' ? 'center' : 'flex-start' }, (items === null || items === void 0 ? void 0 : items.map(({ handler, text }, i) => (React.createElement(AlertAction, { key: i, onClick: handler }, text)))) || children));\n};\n","'use client';\nimport { __rest } from \"tslib\";\nimport React from 'react';\nimport { useActionHandlers } from '../../hooks';\nimport { Box } from '../layout';\nimport { block } from '../utils/cn';\nimport './Card.css';\nconst b = block('card');\nexport const Card = React.forwardRef(function Card(props, ref) {\n const { type = 'container', theme, view, size = 'm', children, className, onClick, disabled, selected } = props, restProps = __rest(props, [\"type\", \"theme\", \"view\", \"size\", \"children\", \"className\", \"onClick\", \"disabled\", \"selected\"]);\n const isTypeAction = type === 'action';\n const isTypeSelection = type === 'selection';\n const isTypeContainer = type === 'container';\n /* Clickable card — only with type 'action' or 'selection' and not selected or disabled */\n const hasAction = isTypeAction || isTypeSelection;\n const isClickable = hasAction && Boolean(onClick) && !(disabled || selected);\n /* Theme only with type 'container' */\n const defaultTheme = isTypeContainer ? 'normal' : undefined;\n /* View only with type 'container' and 'selection' */\n const defaultView = isTypeContainer || isTypeSelection ? 'outlined' : undefined;\n const handleClick = isClickable ? onClick : undefined;\n const { onKeyDown } = useActionHandlers(onClick);\n return (React.createElement(Box, Object.assign({ ref: ref, role: isClickable ? 'button' : undefined, className: b({\n theme: theme || defaultTheme,\n view: view || defaultView,\n type,\n selected,\n size,\n disabled,\n clickable: isClickable,\n }, className), onClick: handleClick, onKeyDown: isClickable ? onKeyDown : undefined, tabIndex: isClickable ? 0 : undefined }, restProps), children));\n});\n","'use client';\nimport React from 'react';\nimport { useForkRef } from '../../hooks';\nimport { useTooltipVisible } from '../../hooks/private';\nimport { Popup } from '../Popup';\nimport { Text } from '../Text';\nimport { block } from '../utils/cn';\nimport './Tooltip.css';\nconst b = block('tooltip');\nconst DEFAULT_PLACEMENT = ['bottom', 'top'];\nexport const Tooltip = (props) => {\n const { children, content, disabled, placement = DEFAULT_PLACEMENT, qa, id, className, style, disablePortal, contentClassName, openDelay = 1000, closeDelay, } = props;\n const [anchorElement, setAnchorElement] = React.useState(null);\n const tooltipVisible = useTooltipVisible(anchorElement, {\n openDelay,\n closeDelay,\n preventTriggerOnFocus: true,\n });\n const renderPopup = () => {\n return (React.createElement(Popup, { id: id, role: \"tooltip\", className: b(null, className), style: style, open: tooltipVisible && !disabled, placement: placement, anchorRef: { current: anchorElement }, disablePortal: disablePortal, disableEscapeKeyDown: true, disableOutsideClick: true, disableLayer: true, qa: qa },\n React.createElement(\"div\", { className: b('content', contentClassName) },\n React.createElement(Text, { variant: \"body-short\", color: \"complementary\" }, content))));\n };\n const child = React.Children.only(children);\n const childRef = child.ref;\n const ref = useForkRef(setAnchorElement, childRef);\n return (React.createElement(React.Fragment, null,\n React.cloneElement(child, { ref }),\n anchorElement ? renderPopup() : null));\n};\n","import React from 'react';\nimport { KeyCode } from '../../../constants';\nimport { useBoolean } from '../useBoolean';\nexport const useTooltipVisible = (anchor, { openDelay = 250, closeDelay, preventTriggerOnFocus = false, }) => {\n const [tooltipVisible, showTooltip, hideTooltip] = useBoolean(false);\n const timeoutRef = React.useRef();\n const isFocusWithinRef = React.useRef(false);\n React.useEffect(() => {\n if (!anchor) {\n return undefined;\n }\n function handleMouseEnter() {\n clearTimeout(timeoutRef.current);\n timeoutRef.current = window.setTimeout(showTooltip, openDelay);\n }\n function handleMouseLeave() {\n clearTimeout(timeoutRef.current);\n timeoutRef.current = window.setTimeout(hideTooltip, closeDelay);\n }\n function handleFocusWithin(e) {\n if (!isFocusWithinRef.current && document.activeElement === e.target) {\n isFocusWithinRef.current = true;\n clearTimeout(timeoutRef.current);\n showTooltip();\n }\n }\n function handleBlurWithin(e) {\n if (isFocusWithinRef.current &&\n !e.currentTarget.contains(e.relatedTarget)) {\n isFocusWithinRef.current = false;\n clearTimeout(timeoutRef.current);\n hideTooltip();\n }\n }\n function handleKeyDown(e) {\n if (e.key === KeyCode.ESCAPE) {\n clearTimeout(timeoutRef.current);\n hideTooltip();\n }\n }\n anchor.addEventListener('mouseenter', handleMouseEnter);\n anchor.addEventListener('mouseleave', handleMouseLeave);\n anchor.addEventListener('keydown', handleKeyDown);\n if (!preventTriggerOnFocus) {\n anchor.addEventListener('focus', handleFocusWithin);\n anchor.addEventListener('blur', handleBlurWithin);\n }\n return () => {\n anchor.removeEventListener('mouseenter', handleMouseEnter);\n anchor.removeEventListener('mouseleave', handleMouseLeave);\n anchor.removeEventListener('focus', handleFocusWithin);\n anchor.removeEventListener('blur', handleBlurWithin);\n anchor.removeEventListener('keydown', handleKeyDown);\n };\n }, [anchor, showTooltip, hideTooltip, openDelay, closeDelay, preventTriggerOnFocus]);\n return tooltipVisible;\n};\n","import React from 'react';\nexport function useBoolean(initialState) {\n const [value, setValue] = React.useState(initialState);\n return [\n value,\n React.useCallback(() => setValue(true), []),\n React.useCallback(() => setValue(false), []),\n React.useCallback(() => setValue((val) => !val), []),\n ];\n}\n","import { useReducer } from 'react';\nvar toggleReducer = function (state, nextValue) {\n return typeof nextValue === 'boolean' ? nextValue : !state;\n};\nvar useToggle = function (initialValue) {\n return useReducer(toggleReducer, initialValue);\n};\nexport default useToggle;\n","/**\r\n * A collection of shims that provide minimal functionality of the ES6 collections.\r\n *\r\n * These implementations are not meant to be used outside of the ResizeObserver\r\n * modules as they cover only a limited range of use cases.\r\n */\r\n/* eslint-disable require-jsdoc, valid-jsdoc */\r\nvar MapShim = (function () {\r\n if (typeof Map !== 'undefined') {\r\n return Map;\r\n }\r\n /**\r\n * Returns index in provided array that matches the specified key.\r\n *\r\n * @param {Array<Array>} arr\r\n * @param {*} key\r\n * @returns {number}\r\n */\r\n function getIndex(arr, key) {\r\n var result = -1;\r\n arr.some(function (entry, index) {\r\n if (entry[0] === key) {\r\n result = index;\r\n return true;\r\n }\r\n return false;\r\n });\r\n return result;\r\n }\r\n return /** @class */ (function () {\r\n function class_1() {\r\n this.__entries__ = [];\r\n }\r\n Object.defineProperty(class_1.prototype, \"size\", {\r\n /**\r\n * @returns {boolean}\r\n */\r\n get: function () {\r\n return this.__entries__.length;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * @param {*} key\r\n * @returns {*}\r\n */\r\n class_1.prototype.get = function (key) {\r\n var index = getIndex(this.__entries__, key);\r\n var entry = this.__entries__[index];\r\n return entry && entry[1];\r\n };\r\n /**\r\n * @param {*} key\r\n * @param {*} value\r\n * @returns {void}\r\n */\r\n class_1.prototype.set = function (key, value) {\r\n var index = getIndex(this.__entries__, key);\r\n if (~index) {\r\n this.__entries__[index][1] = value;\r\n }\r\n else {\r\n this.__entries__.push([key, value]);\r\n }\r\n };\r\n /**\r\n * @param {*} key\r\n * @returns {void}\r\n */\r\n class_1.prototype.delete = function (key) {\r\n var entries = this.__entries__;\r\n var index = getIndex(entries, key);\r\n if (~index) {\r\n entries.splice(index, 1);\r\n }\r\n };\r\n /**\r\n * @param {*} key\r\n * @returns {void}\r\n */\r\n class_1.prototype.has = function (key) {\r\n return !!~getIndex(this.__entries__, key);\r\n };\r\n /**\r\n * @returns {void}\r\n */\r\n class_1.prototype.clear = function () {\r\n this.__entries__.splice(0);\r\n };\r\n /**\r\n * @param {Function} callback\r\n * @param {*} [ctx=null]\r\n * @returns {void}\r\n */\r\n class_1.prototype.forEach = function (callback, ctx) {\r\n if (ctx === void 0) { ctx = null; }\r\n for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) {\r\n var entry = _a[_i];\r\n callback.call(ctx, entry[1], entry[0]);\r\n }\r\n };\r\n return class_1;\r\n }());\r\n})();\n\n/**\r\n * Detects whether window and document objects are available in current environment.\r\n */\r\nvar isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document;\n\n// Returns global object of a current environment.\r\nvar global$1 = (function () {\r\n if (typeof global !== 'undefined' && global.Math === Math) {\r\n return global;\r\n }\r\n if (typeof self !== 'undefined' && self.Math === Math) {\r\n return self;\r\n }\r\n if (typeof window !== 'undefined' && window.Math === Math) {\r\n return window;\r\n }\r\n // eslint-disable-next-line no-new-func\r\n return Function('return this')();\r\n})();\n\n/**\r\n * A shim for the requestAnimationFrame which falls back to the setTimeout if\r\n * first one is not supported.\r\n *\r\n * @returns {number} Requests' identifier.\r\n */\r\nvar requestAnimationFrame$1 = (function () {\r\n if (typeof requestAnimationFrame === 'function') {\r\n // It's required to use a bounded function because IE sometimes throws\r\n // an \"Invalid calling object\" error if rAF is invoked without the global\r\n // object on the left hand side.\r\n return requestAnimationFrame.bind(global$1);\r\n }\r\n return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); };\r\n})();\n\n// Defines minimum timeout before adding a trailing call.\r\nvar trailingTimeout = 2;\r\n/**\r\n * Creates a wrapper function which ensures that provided callback will be\r\n * invoked only once during the specified delay period.\r\n *\r\n * @param {Function} callback - Function to be invoked after the delay period.\r\n * @param {number} delay - Delay after which to invoke callback.\r\n * @returns {Function}\r\n */\r\nfunction throttle (callback, delay) {\r\n var leadingCall = false, trailingCall = false, lastCallTime = 0;\r\n /**\r\n * Invokes the original callback function and schedules new invocation if\r\n * the \"proxy\" was called during current request.\r\n *\r\n * @returns {void}\r\n */\r\n function resolvePending() {\r\n if (leadingCall) {\r\n leadingCall = false;\r\n callback();\r\n }\r\n if (trailingCall) {\r\n proxy();\r\n }\r\n }\r\n /**\r\n * Callback invoked after the specified delay. It will further postpone\r\n * invocation of the original function delegating it to the\r\n * requestAnimationFrame.\r\n *\r\n * @returns {void}\r\n */\r\n function timeoutCallback() {\r\n requestAnimationFrame$1(resolvePending);\r\n }\r\n /**\r\n * Schedules invocation of the original function.\r\n *\r\n * @returns {void}\r\n */\r\n function proxy() {\r\n var timeStamp = Date.now();\r\n if (leadingCall) {\r\n // Reject immediately following calls.\r\n if (timeStamp - lastCallTime < trailingTimeout) {\r\n return;\r\n }\r\n // Schedule new call to be in invoked when the pending one is resolved.\r\n // This is important for \"transitions\" which never actually start\r\n // immediately so there is a chance that we might miss one if change\r\n // happens amids the pending invocation.\r\n trailingCall = true;\r\n }\r\n else {\r\n leadingCall = true;\r\n trailingCall = false;\r\n setTimeout(timeoutCallback, delay);\r\n }\r\n lastCallTime = timeStamp;\r\n }\r\n return proxy;\r\n}\n\n// Minimum delay before invoking the update of observers.\r\nvar REFRESH_DELAY = 20;\r\n// A list of substrings of CSS properties used to find transition events that\r\n// might affect dimensions of observed elements.\r\nvar transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight'];\r\n// Check if MutationObserver is available.\r\nvar mutationObserverSupported = typeof MutationObserver !== 'undefined';\r\n/**\r\n * Singleton controller class which handles updates of ResizeObserver instances.\r\n */\r\nvar ResizeObserverController = /** @class */ (function () {\r\n /**\r\n * Creates a new instance of ResizeObserverController.\r\n *\r\n * @private\r\n */\r\n function ResizeObserverController() {\r\n /**\r\n * Indicates whether DOM listeners have been added.\r\n *\r\n * @private {boolean}\r\n */\r\n this.connected_ = false;\r\n /**\r\n * Tells that controller has subscribed for Mutation Events.\r\n *\r\n * @private {boolean}\r\n */\r\n this.mutationEventsAdded_ = false;\r\n /**\r\n * Keeps reference to the instance of MutationObserver.\r\n *\r\n * @private {MutationObserver}\r\n */\r\n this.mutationsObserver_ = null;\r\n /**\r\n * A list of connected observers.\r\n *\r\n * @private {Array<ResizeObserverSPI>}\r\n */\r\n this.observers_ = [];\r\n this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);\r\n this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);\r\n }\r\n /**\r\n * Adds observer to observers list.\r\n *\r\n * @param {ResizeObserverSPI} observer - Observer to be added.\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.addObserver = function (observer) {\r\n if (!~this.observers_.indexOf(observer)) {\r\n this.observers_.push(observer);\r\n }\r\n // Add listeners if they haven't been added yet.\r\n if (!this.connected_) {\r\n this.connect_();\r\n }\r\n };\r\n /**\r\n * Removes observer from observers list.\r\n *\r\n * @param {ResizeObserverSPI} observer - Observer to be removed.\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.removeObserver = function (observer) {\r\n var observers = this.observers_;\r\n var index = observers.indexOf(observer);\r\n // Remove observer if it's present in registry.\r\n if (~index) {\r\n observers.splice(index, 1);\r\n }\r\n // Remove listeners if controller has no connected observers.\r\n if (!observers.length && this.connected_) {\r\n this.disconnect_();\r\n }\r\n };\r\n /**\r\n * Invokes the update of observers. It will continue running updates insofar\r\n * it detects changes.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.refresh = function () {\r\n var changesDetected = this.updateObservers_();\r\n // Continue running updates if changes have been detected as there might\r\n // be future ones caused by CSS transitions.\r\n if (changesDetected) {\r\n this.refresh();\r\n }\r\n };\r\n /**\r\n * Updates every observer from observers list and notifies them of queued\r\n * entries.\r\n *\r\n * @private\r\n * @returns {boolean} Returns \"true\" if any observer has detected changes in\r\n * dimensions of it's elements.\r\n */\r\n ResizeObserverController.prototype.updateObservers_ = function () {\r\n // Collect observers that have active observations.\r\n var activeObservers = this.observers_.filter(function (observer) {\r\n return observer.gatherActive(), observer.hasActive();\r\n });\r\n // Deliver notifications in a separate cycle in order to avoid any\r\n // collisions between observers, e.g. when multiple instances of\r\n // ResizeObserver are tracking the same element and the callback of one\r\n // of them changes content dimensions of the observed target. Sometimes\r\n // this may result in notifications being blocked for the rest of observers.\r\n activeObservers.forEach(function (observer) { return observer.broadcastActive(); });\r\n return activeObservers.length > 0;\r\n };\r\n /**\r\n * Initializes DOM listeners.\r\n *\r\n * @private\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.connect_ = function () {\r\n // Do nothing if running in a non-browser environment or if listeners\r\n // have been already added.\r\n if (!isBrowser || this.connected_) {\r\n return;\r\n }\r\n // Subscription to the \"Transitionend\" event is used as a workaround for\r\n // delayed transitions. This way it's possible to capture at least the\r\n // final state of an element.\r\n document.addEventListener('transitionend', this.onTransitionEnd_);\r\n window.addEventListener('resize', this.refresh);\r\n if (mutationObserverSupported) {\r\n this.mutationsObserver_ = new MutationObserver(this.refresh);\r\n this.mutationsObserver_.observe(document, {\r\n attributes: true,\r\n childList: true,\r\n characterData: true,\r\n subtree: true\r\n });\r\n }\r\n else {\r\n document.addEventListener('DOMSubtreeModified', this.refresh);\r\n this.mutationEventsAdded_ = true;\r\n }\r\n this.connected_ = true;\r\n };\r\n /**\r\n * Removes DOM listeners.\r\n *\r\n * @private\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.disconnect_ = function () {\r\n // Do nothing if running in a non-browser environment or if listeners\r\n // have been already removed.\r\n if (!isBrowser || !this.connected_) {\r\n return;\r\n }\r\n document.removeEventListener('transitionend', this.onTransitionEnd_);\r\n window.removeEventListener('resize', this.refresh);\r\n if (this.mutationsObserver_) {\r\n this.mutationsObserver_.disconnect();\r\n }\r\n if (this.mutationEventsAdded_) {\r\n document.removeEventListener('DOMSubtreeModified', this.refresh);\r\n }\r\n this.mutationsObserver_ = null;\r\n this.mutationEventsAdded_ = false;\r\n this.connected_ = false;\r\n };\r\n /**\r\n * \"Transitionend\" event handler.\r\n *\r\n * @private\r\n * @param {TransitionEvent} event\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.onTransitionEnd_ = function (_a) {\r\n var _b = _a.propertyName, propertyName = _b === void 0 ? '' : _b;\r\n // Detect whether transition may affect dimensions of an element.\r\n var isReflowProperty = transitionKeys.some(function (key) {\r\n return !!~propertyName.indexOf(key);\r\n });\r\n if (isReflowProperty) {\r\n this.refresh();\r\n }\r\n };\r\n /**\r\n * Returns instance of the ResizeObserverController.\r\n *\r\n * @returns {ResizeObserverController}\r\n */\r\n ResizeObserverController.getInstance = function () {\r\n if (!this.instance_) {\r\n this.instance_ = new ResizeObserverController();\r\n }\r\n return this.instance_;\r\n };\r\n /**\r\n * Holds reference to the controller's instance.\r\n *\r\n * @private {ResizeObserverController}\r\n */\r\n ResizeObserverController.instance_ = null;\r\n return ResizeObserverController;\r\n}());\n\n/**\r\n * Defines non-writable/enumerable properties of the provided target object.\r\n *\r\n * @param {Object} target - Object for which to define properties.\r\n * @param {Object} props - Properties to be defined.\r\n * @returns {Object} Target object.\r\n */\r\nvar defineConfigurable = (function (target, props) {\r\n for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {\r\n var key = _a[_i];\r\n Object.defineProperty(target, key, {\r\n value: props[key],\r\n enumerable: false,\r\n writable: false,\r\n configurable: true\r\n });\r\n }\r\n return target;\r\n});\n\n/**\r\n * Returns the global object associated with provided element.\r\n *\r\n * @param {Object} target\r\n * @returns {Object}\r\n */\r\nvar getWindowOf = (function (target) {\r\n // Assume that the element is an instance of Node, which means that it\r\n // has the \"ownerDocument\" property from which we can retrieve a\r\n // corresponding global object.\r\n var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;\r\n // Return the local global object if it's not possible extract one from\r\n // provided element.\r\n return ownerGlobal || global$1;\r\n});\n\n// Placeholder of an empty content rectangle.\r\nvar emptyRect = createRectInit(0, 0, 0, 0);\r\n/**\r\n * Converts provided string to a number.\r\n *\r\n * @param {number|string} value\r\n * @returns {number}\r\n */\r\nfunction toFloat(value) {\r\n return parseFloat(value) || 0;\r\n}\r\n/**\r\n * Extracts borders size from provided styles.\r\n *\r\n * @param {CSSStyleDeclaration} styles\r\n * @param {...string} positions - Borders positions (top, right, ...)\r\n * @returns {number}\r\n */\r\nfunction getBordersSize(styles) {\r\n var positions = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n positions[_i - 1] = arguments[_i];\r\n }\r\n return positions.reduce(function (size, position) {\r\n var value = styles['border-' + position + '-width'];\r\n return size + toFloat(value);\r\n }, 0);\r\n}\r\n/**\r\n * Extracts paddings sizes from provided styles.\r\n *\r\n * @param {CSSStyleDeclaration} styles\r\n * @returns {Object} Paddings box.\r\n */\r\nfunction getPaddings(styles) {\r\n var positions = ['top', 'right', 'bottom', 'left'];\r\n var paddings = {};\r\n for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {\r\n var position = positions_1[_i];\r\n var value = styles['padding-' + position];\r\n paddings[position] = toFloat(value);\r\n }\r\n return paddings;\r\n}\r\n/**\r\n * Calculates content rectangle of provided SVG element.\r\n *\r\n * @param {SVGGraphicsElement} target - Element content rectangle of which needs\r\n * to be calculated.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction getSVGContentRect(target) {\r\n var bbox = target.getBBox();\r\n return createRectInit(0, 0, bbox.width, bbox.height);\r\n}\r\n/**\r\n * Calculates content rectangle of provided HTMLElement.\r\n *\r\n * @param {HTMLElement} target - Element for which to calculate the content rectangle.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction getHTMLElementContentRect(target) {\r\n // Client width & height properties can't be\r\n // used exclusively as they provide rounded values.\r\n var clientWidth = target.clientWidth, clientHeight = target.clientHeight;\r\n // By this condition we can catch all non-replaced inline, hidden and\r\n // detached elements. Though elements with width & height properties less\r\n // than 0.5 will be discarded as well.\r\n //\r\n // Without it we would need to implement separate methods for each of\r\n // those cases and it's not possible to perform a precise and performance\r\n // effective test for hidden elements. E.g. even jQuery's ':visible' filter\r\n // gives wrong results for elements with width & height less than 0.5.\r\n if (!clientWidth && !clientHeight) {\r\n return emptyRect;\r\n }\r\n var styles = getWindowOf(target).getComputedStyle(target);\r\n var paddings = getPaddings(styles);\r\n var horizPad = paddings.left + paddings.right;\r\n var vertPad = paddings.top + paddings.bottom;\r\n // Computed styles of width & height are being used because they are the\r\n // only dimensions available to JS that contain non-rounded values. It could\r\n // be possible to utilize the getBoundingClientRect if only it's data wasn't\r\n // affected by CSS transformations let alone paddings, borders and scroll bars.\r\n var width = toFloat(styles.width), height = toFloat(styles.height);\r\n // Width & height include paddings and borders when the 'border-box' box\r\n // model is applied (except for IE).\r\n if (styles.boxSizing === 'border-box') {\r\n // Following conditions are required to handle Internet Explorer which\r\n // doesn't include paddings and borders to computed CSS dimensions.\r\n //\r\n // We can say that if CSS dimensions + paddings are equal to the \"client\"\r\n // properties then it's either IE, and thus we don't need to subtract\r\n // anything, or an element merely doesn't have paddings/borders styles.\r\n if (Math.round(width + horizPad) !== clientWidth) {\r\n width -= getBordersSize(styles, 'left', 'right') + horizPad;\r\n }\r\n if (Math.round(height + vertPad) !== clientHeight) {\r\n height -= getBordersSize(styles, 'top', 'bottom') + vertPad;\r\n }\r\n }\r\n // Following steps can't be applied to the document's root element as its\r\n // client[Width/Height] properties represent viewport area of the window.\r\n // Besides, it's as well not necessary as the <html> itself neither has\r\n // rendered scroll bars nor it can be clipped.\r\n if (!isDocumentElement(target)) {\r\n // In some browsers (only in Firefox, actually) CSS width & height\r\n // include scroll bars size which can be removed at this step as scroll\r\n // bars are the only difference between rounded dimensions + paddings\r\n // and \"client\" properties, though that is not always true in Chrome.\r\n var vertScrollbar = Math.round(width + horizPad) - clientWidth;\r\n var horizScrollbar = Math.round(height + vertPad) - clientHeight;\r\n // Chrome has a rather weird rounding of \"client\" properties.\r\n // E.g. for an element with content width of 314.2px it sometimes gives\r\n // the client width of 315px and for the width of 314.7px it may give\r\n // 314px. And it doesn't happen all the time. So just ignore this delta\r\n // as a non-relevant.\r\n if (Math.abs(vertScrollbar) !== 1) {\r\n width -= vertScrollbar;\r\n }\r\n if (Math.abs(horizScrollbar) !== 1) {\r\n height -= horizScrollbar;\r\n }\r\n }\r\n return createRectInit(paddings.left, paddings.top, width, height);\r\n}\r\n/**\r\n * Checks whether provided element is an instance of the SVGGraphicsElement.\r\n *\r\n * @param {Element} target - Element to be checked.\r\n * @returns {boolean}\r\n */\r\nvar isSVGGraphicsElement = (function () {\r\n // Some browsers, namely IE and Edge, don't have the SVGGraphicsElement\r\n // interface.\r\n if (typeof SVGGraphicsElement !== 'undefined') {\r\n return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; };\r\n }\r\n // If it's so, then check that element is at least an instance of the\r\n // SVGElement and that it has the \"getBBox\" method.\r\n // eslint-disable-next-line no-extra-parens\r\n return function (target) { return (target instanceof getWindowOf(target).SVGElement &&\r\n typeof target.getBBox === 'function'); };\r\n})();\r\n/**\r\n * Checks whether provided element is a document element (<html>).\r\n *\r\n * @param {Element} target - Element to be checked.\r\n * @returns {boolean}\r\n */\r\nfunction isDocumentElement(target) {\r\n return target === getWindowOf(target).document.documentElement;\r\n}\r\n/**\r\n * Calculates an appropriate content rectangle for provided html or svg element.\r\n *\r\n * @param {Element} target - Element content rectangle of which needs to be calculated.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction getContentRect(target) {\r\n if (!isBrowser) {\r\n return emptyRect;\r\n }\r\n if (isSVGGraphicsElement(target)) {\r\n return getSVGContentRect(target);\r\n }\r\n return getHTMLElementContentRect(target);\r\n}\r\n/**\r\n * Creates rectangle with an interface of the DOMRectReadOnly.\r\n * Spec: https://drafts.fxtf.org/geometry/#domrectreadonly\r\n *\r\n * @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions.\r\n * @returns {DOMRectReadOnly}\r\n */\r\nfunction createReadOnlyRect(_a) {\r\n var x = _a.x, y = _a.y, width = _a.width, height = _a.height;\r\n // If DOMRectReadOnly is available use it as a prototype for the rectangle.\r\n var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object;\r\n var rect = Object.create(Constr.prototype);\r\n // Rectangle's properties are not writable and non-enumerable.\r\n defineConfigurable(rect, {\r\n x: x, y: y, width: width, height: height,\r\n top: y,\r\n right: x + width,\r\n bottom: height + y,\r\n left: x\r\n });\r\n return rect;\r\n}\r\n/**\r\n * Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.\r\n * Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit\r\n *\r\n * @param {number} x - X coordinate.\r\n * @param {number} y - Y coordinate.\r\n * @param {number} width - Rectangle's width.\r\n * @param {number} height - Rectangle's height.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction createRectInit(x, y, width, height) {\r\n return { x: x, y: y, width: width, height: height };\r\n}\n\n/**\r\n * Class that is responsible for computations of the content rectangle of\r\n * provided DOM element and for keeping track of it's changes.\r\n */\r\nvar ResizeObservation = /** @class */ (function () {\r\n /**\r\n * Creates an instance of ResizeObservation.\r\n *\r\n * @param {Element} target - Element to be observed.\r\n */\r\n function ResizeObservation(target) {\r\n /**\r\n * Broadcasted width of content rectangle.\r\n *\r\n * @type {number}\r\n */\r\n this.broadcastWidth = 0;\r\n /**\r\n * Broadcasted height of content rectangle.\r\n *\r\n * @type {number}\r\n */\r\n this.broadcastHeight = 0;\r\n /**\r\n * Reference to the last observed content rectangle.\r\n *\r\n * @private {DOMRectInit}\r\n */\r\n this.contentRect_ = createRectInit(0, 0, 0, 0);\r\n this.target = target;\r\n }\r\n /**\r\n * Updates content rectangle and tells whether it's width or height properties\r\n * have changed since the last broadcast.\r\n *\r\n * @returns {boolean}\r\n */\r\n ResizeObservation.prototype.isActive = function () {\r\n var rect = getContentRect(this.target);\r\n this.contentRect_ = rect;\r\n return (rect.width !== this.broadcastWidth ||\r\n rect.height !== this.broadcastHeight);\r\n };\r\n /**\r\n * Updates 'broadcastWidth' and 'broadcastHeight' properties with a data\r\n * from the corresponding properties of the last observed content rectangle.\r\n *\r\n * @returns {DOMRectInit} Last observed content rectangle.\r\n */\r\n ResizeObservation.prototype.broadcastRect = function () {\r\n var rect = this.contentRect_;\r\n this.broadcastWidth = rect.width;\r\n this.broadcastHeight = rect.height;\r\n return rect;\r\n };\r\n return ResizeObservation;\r\n}());\n\nvar ResizeObserverEntry = /** @class */ (function () {\r\n /**\r\n * Creates an instance of ResizeObserverEntry.\r\n *\r\n * @param {Element} target - Element that is being observed.\r\n * @param {DOMRectInit} rectInit - Data of the element's content rectangle.\r\n */\r\n function ResizeObserverEntry(target, rectInit) {\r\n var contentRect = createReadOnlyRect(rectInit);\r\n // According to the specification following properties are not writable\r\n // and are also not enumerable in the native implementation.\r\n //\r\n // Property accessors are not being used as they'd require to define a\r\n // private WeakMap storage which may cause memory leaks in browsers that\r\n // don't support this type of collections.\r\n defineConfigurable(this, { target: target, contentRect: contentRect });\r\n }\r\n return ResizeObserverEntry;\r\n}());\n\nvar ResizeObserverSPI = /** @class */ (function () {\r\n /**\r\n * Creates a new instance of ResizeObserver.\r\n *\r\n * @param {ResizeObserverCallback} callback - Callback function that is invoked\r\n * when one of the observed elements changes it's content dimensions.\r\n * @param {ResizeObserverController} controller - Controller instance which\r\n * is responsible for the updates of observer.\r\n * @param {ResizeObserver} callbackCtx - Reference to the public\r\n * ResizeObserver instance which will be passed to callback function.\r\n */\r\n function ResizeObserverSPI(callback, controller, callbackCtx) {\r\n /**\r\n * Collection of resize observations that have detected changes in dimensions\r\n * of elements.\r\n *\r\n * @private {Array<ResizeObservation>}\r\n */\r\n this.activeObservations_ = [];\r\n /**\r\n * Registry of the ResizeObservation instances.\r\n *\r\n * @private {Map<Element, ResizeObservation>}\r\n */\r\n this.observations_ = new MapShim();\r\n if (typeof callback !== 'function') {\r\n throw new TypeError('The callback provided as parameter 1 is not a function.');\r\n }\r\n this.callback_ = callback;\r\n this.controller_ = controller;\r\n this.callbackCtx_ = callbackCtx;\r\n }\r\n /**\r\n * Starts observing provided element.\r\n *\r\n * @param {Element} target - Element to be observed.\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.observe = function (target) {\r\n if (!arguments.length) {\r\n throw new TypeError('1 argument required, but only 0 present.');\r\n }\r\n // Do nothing if current environment doesn't have the Element interface.\r\n if (typeof Element === 'undefined' || !(Element instanceof Object)) {\r\n return;\r\n }\r\n if (!(target instanceof getWindowOf(target).Element)) {\r\n throw new TypeError('parameter 1 is not of type \"Element\".');\r\n }\r\n var observations = this.observations_;\r\n // Do nothing if element is already being observed.\r\n if (observations.has(target)) {\r\n return;\r\n }\r\n observations.set(target, new ResizeObservation(target));\r\n this.controller_.addObserver(this);\r\n // Force the update of observations.\r\n this.controller_.refresh();\r\n };\r\n /**\r\n * Stops observing provided element.\r\n *\r\n * @param {Element} target - Element to stop observing.\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.unobserve = function (target) {\r\n if (!arguments.length) {\r\n throw new TypeError('1 argument required, but only 0 present.');\r\n }\r\n // Do nothing if current environment doesn't have the Element interface.\r\n if (typeof Element === 'undefined' || !(Element instanceof Object)) {\r\n return;\r\n }\r\n if (!(target instanceof getWindowOf(target).Element)) {\r\n throw new TypeError('parameter 1 is not of type \"Element\".');\r\n }\r\n var observations = this.observations_;\r\n // Do nothing if element is not being observed.\r\n if (!observations.has(target)) {\r\n return;\r\n }\r\n observations.delete(target);\r\n if (!observations.size) {\r\n this.controller_.removeObserver(this);\r\n }\r\n };\r\n /**\r\n * Stops observing all elements.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.disconnect = function () {\r\n this.clearActive();\r\n this.observations_.clear();\r\n this.controller_.removeObserver(this);\r\n };\r\n /**\r\n * Collects observation instances the associated element of which has changed\r\n * it's content rectangle.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.gatherActive = function () {\r\n var _this = this;\r\n this.clearActive();\r\n this.observations_.forEach(function (observation) {\r\n if (observation.isActive()) {\r\n _this.activeObservations_.push(observation);\r\n }\r\n });\r\n };\r\n /**\r\n * Invokes initial callback function with a list of ResizeObserverEntry\r\n * instances collected from active resize observations.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.broadcastActive = function () {\r\n // Do nothing if observer doesn't have active observations.\r\n if (!this.hasActive()) {\r\n return;\r\n }\r\n var ctx = this.callbackCtx_;\r\n // Create ResizeObserverEntry instance for every active observation.\r\n var entries = this.activeObservations_.map(function (observation) {\r\n return new ResizeObserverEntry(observation.target, observation.broadcastRect());\r\n });\r\n this.callback_.call(ctx, entries, ctx);\r\n this.clearActive();\r\n };\r\n /**\r\n * Clears the collection of active observations.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.clearActive = function () {\r\n this.activeObservations_.splice(0);\r\n };\r\n /**\r\n * Tells whether observer has active observations.\r\n *\r\n * @returns {boolean}\r\n */\r\n ResizeObserverSPI.prototype.hasActive = function () {\r\n return this.activeObservations_.length > 0;\r\n };\r\n return ResizeObserverSPI;\r\n}());\n\n// Registry of internal observers. If WeakMap is not available use current shim\r\n// for the Map collection as it has all required methods and because WeakMap\r\n// can't be fully polyfilled anyway.\r\nvar observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim();\r\n/**\r\n * ResizeObserver API. Encapsulates the ResizeObserver SPI implementation\r\n * exposing only those methods and properties that are defined in the spec.\r\n */\r\nvar ResizeObserver = /** @class */ (function () {\r\n /**\r\n * Creates a new instance of ResizeObserver.\r\n *\r\n * @param {ResizeObserverCallback} callback - Callback that is invoked when\r\n * dimensions of the observed elements change.\r\n */\r\n function ResizeObserver(callback) {\r\n if (!(this instanceof ResizeObserver)) {\r\n throw new TypeError('Cannot call a class as a function.');\r\n }\r\n if (!arguments.length) {\r\n throw new TypeError('1 argument required, but only 0 present.');\r\n }\r\n var controller = ResizeObserverController.getInstance();\r\n var observer = new ResizeObserverSPI(callback, controller, this);\r\n observers.set(this, observer);\r\n }\r\n return ResizeObserver;\r\n}());\r\n// Expose public methods of ResizeObserver.\r\n[\r\n 'observe',\r\n 'unobserve',\r\n 'disconnect'\r\n].forEach(function (method) {\r\n ResizeObserver.prototype[method] = function () {\r\n var _a;\r\n return (_a = observers.get(this))[method].apply(_a, arguments);\r\n };\r\n});\n\nvar index = (function () {\r\n // Export existing implementation if available.\r\n if (typeof global$1.ResizeObserver !== 'undefined') {\r\n return global$1.ResizeObserver;\r\n }\r\n return ResizeObserver;\r\n})();\n\nexport default index;\n"],"names":["block","cn","prepareRoleListValue","roles","otherMembers","arguments","length","undefined","current","toAdd","toRemove","unrecognized","forEach_","item","isUnrecognized","isRequested","isApproved","isDepriving","push","currentArr","map","prepareItemOfCurrent","otherArr","title","data","frozen","newItems","concat","itemClassName","role","extraProps","_objectSpread","text","value","roleListValueToSubjectList","_toConsumableArray","manyListDataItemToSubjectList","manyListDataItem","map_","filter_","_ref2","removed","_ref3","_ref4","type","extractChangedSubjects","added","filter","_ref5","_ref6","user","group","_ref7","_ref8","DialogError","props","_jsx","Block","className","makeErrorFields","errors","compact_","error","index","name","extras","children","FORM_ERROR","makeFormSubmitError","validationErrors","_defineProperty","importYTDFDialog","Component","YTDFDialog","withLazyLoading","React","_asyncToGenerator","_regeneratorRuntime","_callee","_context","prev","next","t0","sent","YTDialog","abrupt","stop","_React$useState","_React$useState2","_slicedToArray","mounted","setMounted","visible","_callee2","_context2","RoleListControl","EditableList","_callee3","_context3","TabFieldVertical","_callee4","_context4","typedMemo","ErrorBoundary","constructor","super","this","state","resetError","setState","getDerivedStateFromError","componentDidCatch","_a","_b","onError","call","componentDidUpdate","prevProps","code","NO_DATA","render","message","i18n","toString","getErrorMessage","renderError","b","renderPluginLoader","pluginLoader","Object","assign","ChartKitComponent","widgetRef","instanceRef","id","propsId","isMobile","restProps","ckId","lang","settings","get","plugin","find","iteratedPlugin","UNKNOWN_PLUGIN","ChartComponent","renderer","reflow","details","fallback","mobile","ref","YagrPlugin","set","plugins","COLORS","getSerieColor","serieIndex","useResizeObserver","_ref","element","onResize","observer","ResizeObserver","observe","unobserve","getPointValue","$type","Number","$value","$rawValue","splitDataByColor","rows","colorFieldName","xFieldName","yFieldName","xFieldPath","colorFieldPath","transform_","groupBy_","result","key","acc","y","x","point","Array","isArray","getVisualizationPlaceholders","visualization","placeholders","reduce","placeholder","xPlaceholder","yPlaceholder","colorPlaceholder","prepareWidgetData","args","d3Config","visualizationId","chartSettings","xAxisIsLegendEnabled","xAxis","legend","xAxisEnableLabels","labels","xAxisTitle","xAxisPixelInterval","pixelInterval","yAxisEnableLabels","yAxis","yAxisTitle","yAxisGridEnabled","grid","yAxisPixelInterval","tooltip","enabled","ticks","lineColor","series","options","barMaxWidth","barPadding","groupPadding","dataSorting","direction","line","lineWidth","chart","margin","top","left","right","bottom","buildD3Config","_getVisualizationPlac","field","colorField","xField","yField","row","prepareScatter","stacking","categories","uniq_","prepareColoredSeriesData","_result$graphs","xValues","dataMatrix","forEach","xValue","from","Set","graphs","graph","String","prepareSeriesData","prepareBar","merge_","placeholdersToMap","Map","lineAndBarValidation","queryResult","fields","invalid","xCoords","some","isXValueDuplicated","scatterValidation","hashes","isPointsDuplicated","yValue","hash","objectHash","isPointDuplicated","selectQueryResultVisualization","queryTracker","queryChart","selectQueryResultVisualizationPlaceholders","selectQueryResultChartSettings","selectQueryResultChartSaved","saved","selectQueryResult","createSelector","getQueryDraft","getQueryResultsState","draft","results","selectAvailableFields","keys","resultsPlaceholdersValidation","_placeholders$find","Boolean","newObject","lineHash","isLineDuplicated","colorsValidation","selectIsPlaceholdersFieldsFilled","every","EmptyPlaceholdersMessage","D3Plugin","BaseChart","useSelector","fieldsIsFilled","widgetData","useMemo","ChartKit","Chart","xmlns","width","height","fill","viewBox","fillRule","d","clipRule","ChartFieldName","fieldName","placeholderId","onRemove","_jsxs","Button","onClick","Icon","XmarkIcon","size","ChartField","availableFields","dispatch","useDispatch","handleRemoveField","useCallback","removeField","onSelectUpdate","setField","Select","filterable","content","onUpdate","renderControl","PlusIcon","ChartFields","pixelIntervalValidator","test","label","caption","validator","ChartSettingsComponent","_useToggle","useToggle","_useToggle2","toggleVisibility","handleOnAdd","form","setChartSettings","getState","values","Promise","resolve","Gear","initialValues","onClose","onAdd","VisualizationSelector","setVisualization","SavingIndicator","tooltipContent","Tooltip","saving","CircleCheck","ArrowsRotateRight","ALERT_PROPS","theme","dangerouslySetInnerHTML","__html","icon","ChartValidation","_placeholdersValidati","_placeholdersValidati2","_useState","useState","_useState2","isErrorHidden","hideError","placeholdersValidation","showSmallAlert","_Fragment","Alert","actions","Actions","QueryResultsVisualization","_containerRef$current","query","containerRef","chartKitRef","useEffect","saveQueryChartConfig","queryId","debouncedChartResize","throttle_","_chartKitRef$current","i18nFactory","registerKeysets","bind","CHARTKIT_ERROR_CODE","INVALID_DATA","UNKNOWN","TOO_MANY_LINES","ChartKitError","Error","originalError","isCustomError","stack","mergeSettingStrategy","objValue","srcValue","currentPlugins","newPlugins","newSettingsPlugins","currentPlugin","newPluginIndex","findIndex","newPlugin","splice","settingsEventEmitter","events","on","event","off","eventId","action","updateLang","configure","setLang","updates","filteredUpdates","entries","withNaming","e","m","n","getRandomCKId","chars","i","Math","floor","random","randomString","clipPath","AlertContext","useAlertContext","context","AlertAction","view","bAlert","AlertContextProvider","layout","Provider","typeToIcon","danger","filled","outlined","info","CircleInfo","success","warning","TriangleExclamation","utility","Thunderbolt","normal","addComponentKeysets","en","corners","style","align","qa","Card","spacing","py","px","Flex","gap","alignItems","grow","justifyContent","Title","items","I","Xmark","colorText","color","iconByTheme","Text","variant","minContent","wrap","handler","Action","disabled","selected","isTypeSelection","isTypeContainer","isClickable","defaultTheme","defaultView","handleClick","onKeyDown","useActionHandlers","Box","clickable","tabIndex","DEFAULT_PLACEMENT","placement","disablePortal","contentClassName","openDelay","closeDelay","anchorElement","setAnchorElement","tooltipVisible","useTooltipVisible","preventTriggerOnFocus","child","only","childRef","useForkRef","Popup","open","anchorRef","disableEscapeKeyDown","disableOutsideClick","disableLayer","anchor","showTooltip","hideTooltip","initialState","setValue","val","useBoolean","timeoutRef","isFocusWithinRef","addEventListener","handleMouseEnter","handleMouseLeave","handleKeyDown","handleFocusWithin","handleBlurWithin","removeEventListener","clearTimeout","window","setTimeout","document","activeElement","target","currentTarget","contains","relatedTarget","ESCAPE","toggleReducer","nextValue","initialValue","useReducer","MapShim","getIndex","arr","entry","class_1","__entries__","defineProperty","prototype","enumerable","configurable","delete","has","clear","callback","ctx","_i","isBrowser","global$1","g","self","Function","requestAnimationFrame$1","requestAnimationFrame","Date","now","transitionKeys","mutationObserverSupported","MutationObserver","ResizeObserverController","connected_","mutationEventsAdded_","mutationsObserver_","observers_","onTransitionEnd_","refresh","delay","leadingCall","trailingCall","lastCallTime","resolvePending","proxy","timeoutCallback","timeStamp","throttle","addObserver","indexOf","connect_","removeObserver","observers","disconnect_","updateObservers_","activeObservers","gatherActive","hasActive","broadcastActive","attributes","childList","characterData","subtree","disconnect","propertyName","getInstance","instance_","defineConfigurable","writable","getWindowOf","ownerDocument","emptyRect","createRectInit","toFloat","parseFloat","getBordersSize","styles","positions","position","isSVGGraphicsElement","SVGGraphicsElement","SVGElement","getBBox","getContentRect","bbox","getSVGContentRect","clientWidth","clientHeight","getComputedStyle","paddings","positions_1","getPaddings","horizPad","vertPad","boxSizing","round","documentElement","isDocumentElement","vertScrollbar","horizScrollbar","abs","getHTMLElementContentRect","ResizeObservation","broadcastWidth","broadcastHeight","contentRect_","isActive","rect","broadcastRect","ResizeObserverEntry","rectInit","Constr","contentRect","DOMRectReadOnly","create","ResizeObserverSPI","controller","callbackCtx","activeObservations_","observations_","TypeError","callback_","controller_","callbackCtx_","Element","observations","clearActive","_this","observation","WeakMap","method","apply"],"sourceRoot":""}
|
1
|
+
{"version":3,"file":"js/query-results.0a05cc41.chunk.js","mappings":"2PAWaA,GAAQC,EAAAA,EAAAA,GAAG,qBAEjB,SAASC,EAAqBC,GAA+D,IAAnCC,EAA2BC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,GACrFG,EAAwB,GACxBC,EAAsB,GACtBC,EAAyB,GACzBC,EAA6B,GACnCC,IAAST,GAAO,SAACU,GACb,IAAOC,EAAwDD,EAAxDC,eAAgBC,EAAwCF,EAAxCE,YAAaC,EAA2BH,EAA3BG,WAAYC,EAAeJ,EAAfI,YAC5CH,EACAH,EAAaO,KAAKL,GACXI,EACPP,EAASQ,KAAKL,GACPG,GAAcD,EACrBN,EAAMS,KAAKL,GAEXL,EAAQU,KAAKL,EAErB,IAEA,IAAMM,EAAaX,EAAQY,KAAI,SAACP,GAAI,OAAKQ,EAAqBR,EAAK,IAC7DS,EAAWlB,EAAagB,KAAI,SAACP,GAAI,MAAM,CACzCU,MAAOV,EACPW,KAAM,CAAC,EACPC,QAAQ,EACX,IAED,MAAO,CACHC,SAAU,GACVlB,QAAS,CAACe,MAAO,UAAWC,KAAML,EAAWQ,OAAOL,IACpDb,MAAO,CACHc,MAAO,gBACPK,cAAe5B,EAAM,eACrBwB,KAAMf,EAA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UmH,YAAc,WACtCnkB,KAAK2jB,oBAAoB7P,OAAO,EACpC,EAMA0P,EAAkBxG,UAAU8C,UAAY,WACpC,OAAO9f,KAAK2jB,oBAAoB/pB,OAAS,CAC7C,EACO4pB,CACX,CAnJsC,GAwJlC/D,EAA+B,oBAAZ6E,QAA0B,IAAIA,QAAY,IAAI7H,EAKjE/Y,EAOA,SAASA,EAAe4Z,GACpB,KAAMtd,gBAAgB0D,GAClB,MAAM,IAAImgB,UAAU,sCAExB,IAAKlqB,UAAUC,OACX,MAAM,IAAIiqB,UAAU,4CAExB,IAAIJ,EAAapF,EAAyBiC,cACtC7c,EAAW,IAAI+f,EAAkBlG,EAAUmG,EAAYzjB,MAC3Dyf,EAAUzc,IAAIhD,KAAMyD,EACxB,EAIJ,CACI,UACA,YACA,cACFuF,SAAQ,SAAUub,GAChB7gB,EAAesZ,UAAUuH,GAAU,WAC/B,IAAIjkB,EACJ,OAAQA,EAAKmf,EAAUtd,IAAInC,OAAOukB,GAAQC,MAAMlkB,EAAI3G,UACxD,CACJ,IAUA,aAN2C,IAA5B+jB,EAASha,eACTga,EAASha,eAEbA,C","sources":["webpack://@ytsaurus/ui/./src/ui/components/Dialog/controls/RoleListControl/utils.ts","webpack://@ytsaurus/ui/./src/ui/components/Dialog/DialogError.tsx","webpack://@ytsaurus/ui/./src/ui/components/Dialog/index.tsx","webpack://@ytsaurus/ui/./src/ui/hocs/withDelayedMount.tsx","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/utils/react.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/components/ErrorBoundary/ErrorBoundary.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/utils/getErrorMessage.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/components/Loader/Loader.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/components/ChartKit.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/index.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/plugins/yagr/index.js","webpack://@ytsaurus/ui/./src/ui/components/YagrChartKit/YagrChartKit.tsx","webpack://@ytsaurus/ui/./src/ui/hooks/useResizeObserver.tsx","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/preparers/getPointData.ts","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/preparers/splitDataByColor.ts","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/preparers/utils.ts","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/preparers/prepareWidgetData.ts","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/preparers/d3config.ts","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/preparers/scatter.ts","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/preparers/bar.ts","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/helpers/placeholdersToMap.ts","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/validation/lineAndBarValidation.ts","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/validation/scatterValidation.ts","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/module/queryChart/selectors.ts","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/validation/colorsValidation.ts","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/components/EmptyPlaceholdersMessage.tsx","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/plugins/d3/index.js","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/components/Chart.tsx","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/icons/esm/Plus.js","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/components/ChartFields/ChartFieldName.tsx","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/components/ChartFields/ChartField.tsx","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/components/ChartFields/ChartFields.tsx","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/components/ChartSettings.tsx","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/components/VisualizationSelector.tsx","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/icons/esm/ArrowsRotateRight.js","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/components/SavingIndicator.tsx","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/components/ChartValidation.tsx","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/icons/esm/CircleExclamation.js","webpack://@ytsaurus/ui/./src/ui/pages/query-tracker/QueryResultsVisualization/components/QueryResultsVisualization.tsx","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/i18n/index.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/libs/chartkit-error/chartkit-error.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/libs/settings/mergeSettingStrategy.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/libs/settings/settings.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/libs/settings/eventEmitter.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/utils/cn.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/chartkit/build/utils/common.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/icons/esm/Gear.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/components/Alert/AlertContext.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/components/Alert/useAlertContext.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/components/Alert/AlertAction.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/components/Alert/constants.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/components/Alert/AlertContextProvider.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/components/Alert/AlertIcon.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/icons/esm/CircleXmarkFill.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/icons/esm/CircleXmark.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/icons/esm/CircleInfoFill.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/icons/esm/CircleCheckFill.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/icons/esm/TriangleExclamationFill.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/icons/esm/ThunderboltFill.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/components/Alert/i18n/index.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/components/Alert/Alert.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/components/Alert/AlertTitle.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/components/Alert/AlertActions.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/components/Card/Card.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/components/Tooltip/Tooltip.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/hooks/private/useTooltipVisible/index.js","webpack://@ytsaurus/ui/./node_modules/@gravity-ui/uikit/build/esm/hooks/private/useBoolean/useBoolean.js","webpack://@ytsaurus/ui/./node_modules/react-use/esm/useToggle.js","webpack://@ytsaurus/ui/./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js"],"sourcesContent":["import cn from 'bem-cn-lite';\n\nimport filter_ from 'lodash/filter';\nimport forEach_ from 'lodash/forEach';\nimport map_ from 'lodash/map';\n\nimport type {EditableManyListsItemType} from '../../../../components/Dialog';\nimport type {ResponsibleType, RoleConverted, Subject} from '../../../../utils/acl/acl-types';\nimport type {PreparedRole} from '../../../../utils/acl';\nimport {RoleListControlProps} from './RoleListControl';\n\nexport const block = cn('role-list-control');\n\nexport function prepareRoleListValue(roles: Array<PreparedRole>, otherMembers: Array<string> = []) {\n const current: typeof roles = [];\n const toAdd: typeof roles = [];\n const toRemove: typeof roles = [];\n const unrecognized: typeof roles = [];\n forEach_(roles, (item) => {\n const {isUnrecognized, isRequested, isApproved, isDepriving} = item;\n if (isUnrecognized) {\n unrecognized.push(item);\n } else if (isDepriving) {\n toRemove.push(item);\n } else if (isApproved || isRequested) {\n toAdd.push(item);\n } else {\n current.push(item);\n }\n });\n\n const currentArr = current.map((item) => prepareItemOfCurrent(item));\n const otherArr = otherMembers.map((item) => ({\n title: item,\n data: {},\n frozen: true,\n }));\n\n return {\n newItems: [],\n current: {title: 'Current', data: currentArr.concat(otherArr)},\n toAdd: {\n title: 'Will be added',\n itemClassName: block('item-to-add'),\n data: toAdd.map((item) => prepareItemOfCurrent(item, {frozen: true})),\n },\n toRemove: {\n title: 'Will be removed',\n itemClassName: block('item-to-remove'),\n data: toRemove.map((item) => prepareItemOfCurrent(item, {frozen: true})),\n },\n unrecognized: {\n title: 'Unrecognized',\n itemClassName: block('item-unrecognized'),\n data: unrecognized.map((item) => prepareItemOfCurrent(item, {frozen: true})),\n },\n };\n}\n\nfunction prepareItemOfCurrent(role: PreparedRole, extraProps: any = {}) {\n return {\n title: role.text || role.value,\n data: role,\n ...extraProps,\n };\n}\n\nexport function roleListValueToSubjectList(\n value: RoleListControlProps['value'],\n): Array<ResponsibleType> {\n const {current, newItems, toAdd} = value;\n return [\n ...newItems,\n ...manyListDataItemToSubjectList(current),\n ...manyListDataItemToSubjectList(toAdd),\n ];\n}\n\nfunction manyListDataItemToSubjectList(\n manyListDataItem: EditableManyListsItemType<RoleConverted>,\n): Array<ResponsibleType> {\n const {data} = manyListDataItem || {};\n return map_(\n filter_(data, ({removed}) => !removed),\n ({data}) => {\n const {type, value} = data || {};\n return {type: type!, value: value!};\n },\n );\n}\n\nexport function extractChangedSubjects(value: {\n current: EditableManyListsItemType<RoleConverted>;\n newItems: Array<ResponsibleType>;\n}): {\n added: Subject[];\n removed: Subject[];\n} {\n const {current, newItems} = value;\n const added = newItems || [];\n const removed = ((current && current.data) || []).filter(({removed}) => removed);\n return {\n added: added.map(({type, value}) => {\n return type === 'users' ? {user: value} : {group: value};\n }),\n removed: removed.map(({data}) => {\n const {value, type} = data || {};\n return type === 'users' ? {user: value!} : {group: value!};\n }),\n };\n}\n","import React from 'react';\nimport cn from 'bem-cn-lite';\n\nimport type {FORM_ERROR as FormErrorType} from './index';\n\nimport {FIX_MY_TYPE, YTError} from '../../types';\nimport Block from '../../components/Block/Block';\n\nimport compact_ from 'lodash/compact';\nimport map_ from 'lodash/map';\n\nconst block = cn('yt-dialog-error');\n\nexport function DialogError(props: FIX_MY_TYPE) {\n return <Block {...props} className={block()} />;\n}\n\nexport function makeErrorFields(errors: Array<YTError | Error | undefined>) {\n return compact_(\n map_(errors, (error, index) => {\n return error\n ? {\n name: `error_${index}`,\n type: 'block' as const,\n extras: {\n children: <DialogError error={error} />,\n },\n }\n : undefined;\n }),\n );\n}\n\nconst FORM_ERROR: typeof FormErrorType = 'FINAL_FORM/form-error';\n\nexport function makeFormSubmitError(error: YTError) {\n return {\n validationErrors: {\n [FORM_ERROR]: <DialogError error={error} />,\n },\n };\n}\n","import React from 'react';\nimport withLazyLoading from '../../hocs/withLazyLoading';\nimport {withDelayedMount} from '../../hocs/withDelayedMount';\n\nimport type {\n registerDialogControl as RegisterDialogControlFn,\n registerDialogTabControl as RegisterDialogTabControlFn,\n YTDialogType,\n} from './Dialog';\n\nexport type * from './Dialog';\nexport * from './DialogError';\nexport * from './controls/RoleListControl/utils';\n\nexport function importYTDFDialog() {\n return import(/* webpackChunkName: \"yt-df-dialog\" */ './Dialog');\n}\n\nexport const YTDFDialog = withDelayedMount(\n withLazyLoading(\n React.lazy(async () => {\n return {default: (await importYTDFDialog()).YTDialog};\n }),\n '',\n ),\n) as YTDialogType;\n\nexport function useControlRegistration(\n fn: (params: {\n registerDialogControl: typeof RegisterDialogControlFn;\n registerDialogTabControl: typeof RegisterDialogTabControlFn;\n }) => void,\n) {\n importYTDFDialog().then(({registerDialogControl, registerDialogTabControl}) => {\n fn({registerDialogControl, registerDialogTabControl});\n });\n}\n\nexport type {RoleListControlProps} from './controls/RoleListControl/RoleListControl';\nexport const RoleListControl = withLazyLoading(\n React.lazy(async () => {\n return {default: (await importYTDFDialog()).RoleListControl};\n }),\n '',\n);\n\nexport const EditableList = withLazyLoading(\n React.lazy(async () => {\n return {default: (await importYTDFDialog()).EditableList};\n }),\n '',\n);\n\nexport const TabFieldVertical = withLazyLoading(\n React.lazy(async () => {\n return {default: (await importYTDFDialog()).TabFieldVertical};\n }),\n '',\n);\n","import React from 'react';\n\n/**\n * The hoc allows to delay mounting until `props.visible == true`.\n * The hoc might be useful to wrap components wrapped by React.lazy\n * @param Component\n * @returns\n */\nexport function withDelayedMount<P extends {visible?: boolean}>(Component: React.ComponentType<P>) {\n return function MountOnFirstVisible(props: P) {\n const [mounted, setMounted] = React.useState(false);\n React.useEffect(() => {\n if (!mounted && props.visible) {\n setMounted(true);\n }\n }, [props.visible, mounted]);\n return !mounted ? null : <Component {...props} />;\n };\n}\n","import React from 'react';\n// For some reason React.memo drops the generic prop type and creates a regular union type\n// https://github.com/DefinitelyTyped/DefinitelyTyped/issues/37087#issuecomment-542793243\nexport const typedMemo = React.memo;\n","import React from 'react';\nimport { CHARTKIT_ERROR_CODE } from '../../libs';\nimport { getErrorMessage } from '../../utils/getErrorMessage';\nexport class ErrorBoundary extends React.Component {\n constructor() {\n super(...arguments);\n this.state = {\n error: undefined,\n };\n this.resetError = () => {\n if (this.state.error) {\n this.setState({ error: undefined });\n }\n };\n }\n static getDerivedStateFromError(error) {\n return { error };\n }\n componentDidCatch() {\n var _a, _b;\n const { error } = this.state;\n if (error) {\n (_b = (_a = this.props).onError) === null || _b === void 0 ? void 0 : _b.call(_a, { error });\n }\n }\n componentDidUpdate(prevProps) {\n if (prevProps.data !== this.props.data) {\n const { error } = this.state;\n if (error && 'code' in error && error.code === CHARTKIT_ERROR_CODE.NO_DATA) {\n this.resetError();\n }\n }\n }\n render() {\n const { error } = this.state;\n if (error) {\n const message = getErrorMessage(error);\n if (this.props.renderError) {\n return this.props.renderError({\n error,\n message,\n resetError: this.resetError,\n });\n }\n return React.createElement(\"div\", null, message);\n }\n return this.props.children;\n }\n}\n","import { i18n } from '../i18n';\nexport function getErrorMessage(error) {\n const code = 'code' in error && error.code;\n return (error.message || code || i18n('error', 'label_unknown-error')).toString();\n}\n","import { __rest } from \"tslib\";\nimport React from 'react';\nimport { Loader as BaseLoader } from '@gravity-ui/uikit';\nimport { block } from '../../utils/cn';\nimport './Loader.css';\nconst b = block('loader');\nexport const Loader = (_a) => {\n var { renderPluginLoader } = _a, props = __rest(_a, [\"renderPluginLoader\"]);\n const pluginLoader = renderPluginLoader === null || renderPluginLoader === void 0 ? void 0 : renderPluginLoader();\n // React.Suspense complains about possible undefined in \"fallback\" property\n if (typeof pluginLoader !== 'undefined') {\n return pluginLoader;\n }\n return (React.createElement(\"div\", { className: b() },\n React.createElement(BaseLoader, Object.assign({}, props))));\n};\n","import { __rest } from \"tslib\";\nimport React from 'react';\nimport { i18n } from '../i18n';\nimport { CHARTKIT_ERROR_CODE, ChartKitError, settings } from '../libs';\nimport { getRandomCKId, typedMemo } from '../utils';\nimport { cn } from '../utils/cn';\nimport { ErrorBoundary } from './ErrorBoundary/ErrorBoundary';\nimport { Loader } from './Loader/Loader';\nimport './ChartKit.css';\nconst b = cn('chartkit');\nconst ChartKitComponent = (props) => {\n const widgetRef = React.useRef();\n const { instanceRef, id: propsId, type, isMobile, renderPluginLoader } = props, restProps = __rest(props, [\"instanceRef\", \"id\", \"type\", \"isMobile\", \"renderPluginLoader\"]);\n const ckId = React.useMemo(() => getRandomCKId(), []);\n const id = propsId || ckId;\n const lang = settings.get('lang');\n const plugins = settings.get('plugins');\n const plugin = plugins.find((iteratedPlugin) => iteratedPlugin.type === type);\n if (!plugin) {\n throw new ChartKitError({\n code: CHARTKIT_ERROR_CODE.UNKNOWN_PLUGIN,\n message: i18n('error', 'label_unknown-plugin', { type }),\n });\n }\n const ChartComponent = plugin.renderer;\n React.useImperativeHandle(instanceRef, () => ({\n reflow(details) {\n var _a;\n if ((_a = widgetRef.current) === null || _a === void 0 ? void 0 : _a.reflow) {\n widgetRef.current.reflow(details);\n }\n },\n }), []);\n return (React.createElement(React.Suspense, { fallback: React.createElement(Loader, { renderPluginLoader: renderPluginLoader }) },\n React.createElement(\"div\", { className: b({ mobile: isMobile }, 'chartkit-theme_common') },\n React.createElement(ChartComponent, Object.assign({ ref: widgetRef, id: id, lang: lang }, restProps)))));\n};\nconst ChartKitComponentWithErrorBoundary = React.forwardRef(function ChartKitComponentWithErrorBoundary(props, ref) {\n return (React.createElement(ErrorBoundary, { onError: props.onError, data: props.data, renderError: props.renderError },\n React.createElement(ChartKitComponent, Object.assign({ instanceRef: ref }, props))));\n}) /* https://stackoverflow.com/a/58473012 */;\nexport const ChartKit = typedMemo(ChartKitComponentWithErrorBoundary);\n","import { ChartKit } from './components/ChartKit';\nimport { settings } from './libs';\nexport * from './types/widget-data';\nexport * from './libs/chartkit-error/chartkit-error';\nexport { settings };\nexport default ChartKit;\n","import React from 'react';\nexport * from './types';\nexport const YagrPlugin = {\n type: 'yagr',\n renderer: React.lazy(() => import('./renderer/YagrWidget')),\n};\n","import ChartKit, {settings} from '@gravity-ui/chartkit';\nimport {YagrPlugin} from '@gravity-ui/chartkit/yagr';\nexport type {RawSerieData, YagrWidgetData} from '@gravity-ui/chartkit/yagr';\n\nimport '@gravity-ui/yagr/dist/index.css';\n\nsettings.set({plugins: [YagrPlugin]});\n\nconst COLORS = ['rgb(77, 162, 241)', 'rgb(255, 61, 100)'];\n\nexport function getSerieColor(serieIndex: number) {\n return COLORS[serieIndex % COLORS.length];\n}\n\nexport default ChartKit;\n","import React from 'react';\nimport ResizeObserver from 'resize-observer-polyfill';\n\ninterface Props {\n element?: Element;\n onResize: ResizeObserverCallback;\n}\n\nexport default function useResizeObserver({element, onResize}: Props) {\n React.useEffect(() => {\n if (element) {\n const observer = new ResizeObserver(onResize);\n observer.observe(element);\n return () => {\n if (element) {\n observer.unobserve(element);\n }\n };\n } else {\n return undefined;\n }\n }, [element, onResize]);\n}\n","import {Result} from '../../module/query_result/types';\n\nexport const getPointValue = (value: Result) => {\n switch (value.$type) {\n case 'yql.interval': {\n return Number(value.$value);\n }\n\n case 'yql.int32':\n case 'yql.int64':\n case 'yql.uint8':\n case 'yql.uint32':\n case 'yql.uint64':\n case 'yql.float':\n case 'yql.double':\n case 'yql.decimal':\n return Number(value.$value);\n default:\n return value.$rawValue;\n }\n};\n","import transform_ from 'lodash/transform';\nimport groupBy_ from 'lodash/groupBy';\nimport type {QueryResult} from './types';\nimport {getPointValue} from './getPointData';\n\nexport const splitDataByColor = ({\n rows,\n colorFieldName,\n xFieldName,\n yFieldName,\n}: {\n rows: QueryResult;\n xFieldName: string;\n yFieldName: string;\n colorFieldName: string;\n}) => {\n const xFieldPath = `${xFieldName}.$rawValue`;\n const colorFieldPath = `${colorFieldName}.$rawValue`;\n\n return transform_<\n Record<string, QueryResult>,\n Array<{name: string; data: {x: string; y: number}[]}>\n >(\n groupBy_(rows, colorFieldPath),\n (result, value, key) => {\n const data = transform_<Record<string, QueryResult>, {x: string; y: number}[]>(\n groupBy_(value, xFieldPath),\n (acc, y, x) => {\n const point = Array.isArray(y) ? y[0] : y;\n\n acc.push({\n x,\n y: Number(getPointValue(point[yFieldName])),\n });\n\n return acc;\n },\n [],\n );\n\n result.push({\n name: key,\n data,\n });\n\n return result;\n },\n [],\n );\n};\n","import type {Placeholder, Visualization} from '../types';\n\ntype VisualizationPlaceholders = {\n xPlaceholder: Placeholder | undefined;\n yPlaceholder: Placeholder | undefined;\n colorPlaceholder: Placeholder | undefined;\n};\n\nexport function getVisualizationPlaceholders(\n visualization: Visualization,\n): VisualizationPlaceholders {\n return visualization.placeholders.reduce(\n (acc: VisualizationPlaceholders, placeholder) => {\n if (placeholder.id === 'x') {\n acc.xPlaceholder = placeholder;\n }\n\n if (placeholder.id === 'y') {\n acc.yPlaceholder = placeholder;\n }\n\n if (placeholder.id === 'colors') {\n acc.colorPlaceholder = placeholder;\n }\n\n return acc;\n },\n {\n xPlaceholder: undefined,\n yPlaceholder: undefined,\n colorPlaceholder: undefined,\n },\n );\n}\n","import merge_ from 'lodash/merge';\nimport type {ChartKitWidgetData} from '@gravity-ui/chartkit';\nimport {prepareBar} from './bar';\nimport {prepareScatter} from './scatter';\nimport type {PrepareLineArgs} from './types';\nimport {buildD3Config} from './d3config';\n\nexport const prepareWidgetData = (args: PrepareLineArgs): ChartKitWidgetData => {\n const d3Config = buildD3Config(args);\n\n let data;\n\n switch (args.visualization.id) {\n case 'scatter': {\n data = prepareScatter(args);\n break;\n }\n default: {\n data = prepareBar(args);\n }\n }\n\n return merge_(data, d3Config);\n};\n","import type {ChartKitWidgetAxisType, ChartKitWidgetData} from '@gravity-ui/chartkit';\nimport type {PrepareLineArgs} from './types';\nimport {VisualizationId} from '../types';\n\n// Inspired by\n// https://github.com/datalens-tech/datalens-ui/blob/e978d82ce785d4321057942d0ff05a163c12ade7/src/server/modes/charts/plugins/datalens/d3/index.ts#L24\n\nexport function buildD3Config(args: PrepareLineArgs) {\n const chartSettings = args.visualization.chartSettings;\n\n const xAxisGridEnabled = true;\n const xAxisIsLegendEnabled = chartSettings.xAxis.legend === 'on';\n const xAxisEnableLabels = chartSettings.xAxis.labels === 'on';\n const xAxisTitle = chartSettings.xAxis.title;\n const xAxisPixelInterval = Number(chartSettings.xAxis.pixelInterval || '120');\n\n const yAxisEnableLabels = chartSettings.yAxis.labels === 'on';\n const yAxisTitle = chartSettings.yAxis.title;\n const yAxisGridEnabled = chartSettings.yAxis.grid === 'on';\n const yAxisPixelInterval = Number(chartSettings.yAxis.pixelInterval || '120');\n\n const chartWidgetData: Partial<ChartKitWidgetData> = {\n tooltip: {enabled: true},\n legend: {enabled: xAxisIsLegendEnabled},\n xAxis: {\n type: getAxisType(args.visualization.id),\n labels: {\n enabled: xAxisEnableLabels,\n },\n title: {\n text: xAxisTitle,\n },\n grid: {\n enabled: xAxisGridEnabled,\n },\n ticks: {\n pixelInterval: xAxisPixelInterval,\n },\n },\n yAxis: [\n {\n // todo: the axis type should depend on the type of field\n type: 'linear',\n lineColor: 'transparent',\n labels: {\n enabled: yAxisEnableLabels,\n },\n title: {\n text: yAxisTitle,\n },\n grid: {\n enabled: yAxisGridEnabled,\n },\n ticks: {\n pixelInterval: yAxisPixelInterval,\n },\n },\n ],\n series: {\n data: [],\n options: {\n 'bar-x': {\n barMaxWidth: 50,\n barPadding: 0.05,\n groupPadding: 0.4,\n dataSorting: {\n direction: 'desc',\n key: 'name',\n },\n },\n line: {\n lineWidth: 2,\n },\n },\n },\n chart: {\n margin: {\n top: 10,\n left: 10,\n right: 10,\n bottom: 15,\n },\n },\n };\n\n return chartWidgetData;\n}\n\n// Write this function, using reference:\n// https://github.com/datalens-tech/datalens-ui/blob/e978d82ce785d4321057942d0ff05a163c12ade7/src/server/modes/charts/plugins/datalens/preparers/helpers/axis.ts\nfunction getAxisType(visualizationId: VisualizationId): ChartKitWidgetAxisType {\n return visualizationId === 'scatter' ? 'linear' : 'category';\n}\n","import type {ChartKitWidgetData} from '@gravity-ui/chartkit';\nimport type {PrepareLineArgs} from './types';\nimport {splitDataByColor} from './splitDataByColor';\nimport {getVisualizationPlaceholders} from './utils';\n\nexport function prepareScatter(args: PrepareLineArgs): ChartKitWidgetData {\n const {visualization} = args;\n const rows = args.result;\n const {xPlaceholder, yPlaceholder, colorPlaceholder} =\n getVisualizationPlaceholders(visualization);\n const [colorField] = [colorPlaceholder?.field] || [];\n\n const xField = xPlaceholder?.field;\n const yField = yPlaceholder?.field;\n\n if (!xField || !yField) {\n return {\n series: {\n data: [],\n },\n };\n }\n\n if (colorField) {\n return {\n series: {\n data: splitDataByColor({\n rows,\n yFieldName: yField,\n xFieldName: xField,\n colorFieldName: colorField,\n }).map((item) => ({\n data: item.data.map(({x, y}) => ({\n x: Number(x),\n y: Number(y),\n })),\n name: item.name,\n type: 'scatter',\n })),\n },\n };\n }\n\n return {\n series: {\n data: [\n {\n type: 'scatter',\n data: rows.map((row) => {\n return {\n x: Number(row[xField].$rawValue),\n y: Number(row[yField].$rawValue),\n };\n }),\n name: `${xField} x ${yField}`,\n },\n ],\n },\n };\n}\n","import uniq_ from 'lodash/uniq';\nimport map_ from 'lodash/map';\nimport type {ChartKitWidgetData} from '@gravity-ui/chartkit';\nimport type {PrepareLineArgs, QueryResult} from './types';\nimport {VisualizationId} from '../types';\nimport {splitDataByColor} from './splitDataByColor';\nimport {getPointValue} from './getPointData';\nimport {getVisualizationPlaceholders} from './utils';\n\n// Inspired by datalens ql chart\n// https://github.com/datalens-tech/datalens-ui/blob/e978d82ce785d4321057942d0ff05a163c12ade7/src/server/modes/charts/plugins/ql/preparers/line.ts#L82\n\ninterface PrepareColoredSeriesDataArgs {\n rows: QueryResult;\n xField: string;\n yField: string;\n colorField: string;\n visualizationId: VisualizationId;\n}\n\nfunction prepareColoredSeriesData({\n rows,\n xField,\n yField,\n colorField,\n visualizationId,\n}: PrepareColoredSeriesDataArgs): ChartKitWidgetData {\n const xFieldPath = `${xField}.$rawValue`;\n\n return {\n series: {\n data: splitDataByColor({\n rows,\n xFieldName: xField,\n yFieldName: yField,\n colorFieldName: colorField,\n }).map((item) => {\n return {\n type: visualizationId,\n stacking: 'normal',\n name: item.name,\n data: item.data,\n };\n }),\n },\n xAxis: {\n type: 'category',\n categories: uniq_(map_(rows, xFieldPath) as unknown as string[]),\n },\n };\n}\n\ninterface PrepareSeriesDataArgs {\n rows: QueryResult;\n xField: string;\n yField: string;\n visualizationId: VisualizationId;\n}\n\nfunction prepareSeriesData({\n xField,\n yField,\n rows,\n visualizationId,\n}: PrepareSeriesDataArgs): ChartKitWidgetData {\n const result: Record<any, any> = {};\n\n let xValues: (string | number)[] = [];\n\n const dataMatrix: Record<string, any> = {};\n\n rows.forEach((row) => {\n const xRowItem = row[xField];\n const xValue = xRowItem.$rawValue;\n\n xValues.push(xValue);\n\n dataMatrix[xValue] = getPointValue(row[yField]);\n });\n\n xValues = Array.from(new Set(xValues));\n\n result.categories = xValues.map((value) => value);\n\n result.graphs = [];\n\n const graph = {\n data: xValues.map((xValue) => {\n return dataMatrix[String(xValue)];\n }),\n };\n\n result.graphs?.push(graph);\n\n return {\n series: {\n data: [\n {\n type: visualizationId,\n data: result.graphs[0].data.map((item: string, index: number) => {\n return {\n x: result.categories[index],\n y: Number(item),\n };\n }),\n name: yField,\n },\n ],\n },\n xAxis: {\n type: 'category',\n categories: result.categories,\n },\n };\n}\n\nexport function prepareBar(args: PrepareLineArgs): ChartKitWidgetData {\n const {visualization} = args;\n const visualizationId = visualization.id;\n const rows = args.result;\n const {xPlaceholder, yPlaceholder, colorPlaceholder} =\n getVisualizationPlaceholders(visualization);\n\n const colorField = colorPlaceholder?.field;\n const xField = xPlaceholder?.field;\n const yField = yPlaceholder?.field;\n\n if (!xField || !yField) {\n return {\n series: {\n data: [],\n },\n };\n }\n\n if (colorField) {\n return prepareColoredSeriesData({\n rows,\n yField,\n xField,\n colorField,\n visualizationId,\n });\n }\n\n return prepareSeriesData({\n rows,\n yField,\n xField,\n visualizationId,\n });\n}\n","import {Placeholder} from '../types';\n\nexport const placeholdersToMap = (placeholders: Placeholder[]) => {\n return new Map(placeholders.map((placeholder) => [placeholder.id, placeholder.field]));\n};\n","import type {QueryResult} from '../preparers/types';\nimport type {Placeholder} from '../types';\nimport {placeholdersToMap} from '../helpers/placeholdersToMap';\n\nexport const lineAndBarValidation = (queryResult: QueryResult, placeholders: Placeholder[]) => {\n const fields = placeholdersToMap(placeholders);\n\n const xFieldName = fields.get('x');\n const yFieldName = fields.get('y');\n const notAllFieldsSelected = !xFieldName || !yFieldName;\n\n if (notAllFieldsSelected) {\n return {\n x: {invalid: false},\n };\n }\n\n const xCoords: Record<string, boolean> = {};\n\n const isXCoordsDuplicated = queryResult.some((item) => {\n const xValue = item[xFieldName].$rawValue;\n\n const isXValueDuplicated = xCoords[xValue];\n\n xCoords[xValue] = true;\n\n return isXValueDuplicated;\n });\n\n return {\n x: {invalid: isXCoordsDuplicated},\n } as unknown as Record<string, {invalid: boolean}>;\n};\n","import type {QueryResult} from '../preparers/types';\nimport type {Placeholder} from '../types';\nimport objectHash from 'object-hash';\nimport {placeholdersToMap} from '../helpers/placeholdersToMap';\n\nexport const scatterValidation = (queryResult: QueryResult, placeholders: Placeholder[]) => {\n const fields = placeholdersToMap(placeholders);\n\n const xFieldName = fields.get('x');\n const yFieldName = fields.get('y');\n const notAllFieldsSelected = !xFieldName || !yFieldName;\n\n if (notAllFieldsSelected) {\n return {\n x: {invalid: false},\n y: {invalid: false},\n };\n }\n\n const hashes: Record<string, boolean> = {};\n\n const isPointsDuplicated = queryResult.some((item) => {\n const xValue = item[xFieldName].$rawValue;\n const yValue = item[yFieldName].$rawValue;\n // eslint-disable-next-line new-cap\n const hash = objectHash.MD5({\n xValue,\n yValue,\n });\n\n const isPointDuplicated = hashes[hash];\n\n hashes[hash] = true;\n\n return isPointDuplicated;\n });\n\n return {\n x: {invalid: isPointsDuplicated},\n y: {invalid: isPointsDuplicated},\n };\n};\n","import {createSelector} from 'reselect';\nimport {RootState} from '../../../../store/reducers';\nimport {getQueryResultsState} from '../query_result/selectors';\nimport {getQueryDraft} from '../query/selectors';\nimport {QueryResultReadyState} from '../query_result/types';\nimport {colorsValidation} from '../../QueryResultsVisualization/validation/colorsValidation';\nimport {lineAndBarValidation} from '../../QueryResultsVisualization/validation/lineAndBarValidation';\nimport {scatterValidation} from '../../QueryResultsVisualization/validation/scatterValidation';\n\nexport const selectQueryResultVisualization = (state: RootState) =>\n state.queryTracker.queryChart.visualization;\n\nexport const selectQueryResultVisualizationPlaceholders = (state: RootState) =>\n selectQueryResultVisualization(state).placeholders;\n\nexport const selectQueryResultVisualizationId = (state: RootState) =>\n selectQueryResultVisualization(state).id;\n\nexport const selectQueryResultChartSettings = (state: RootState) =>\n selectQueryResultVisualization(state).chartSettings;\n\nexport const selectQueryResultChartSaved = (state: RootState) =>\n state.queryTracker.queryChart.saved;\n\nexport const selectQueryResult = createSelector(\n [getQueryDraft, getQueryResultsState],\n (draft, results) => {\n const {id} = draft;\n\n if (!id || !(id in results)) return [];\n\n return (results[id][0] as QueryResultReadyState).results;\n },\n);\n\nexport const selectAvailableFields = (state: RootState) => {\n const result = selectQueryResult(state);\n\n const row = (result && result[0]) || [];\n\n const columns: string[] = Object.keys(row).map((name) => {\n return name;\n });\n\n return columns;\n};\n\nexport const resultsPlaceholdersValidation = createSelector(\n [\n selectQueryResult,\n selectQueryResultVisualizationPlaceholders,\n selectQueryResultVisualizationId,\n ],\n (queryResult, placeholders, visualizationId): Record<string, {invalid: boolean}> => {\n const hasColors = Boolean(\n placeholders.find((placeholder) => placeholder.id === 'colors')?.field,\n );\n\n if (hasColors) {\n return colorsValidation(queryResult, placeholders);\n }\n\n const validationFunction =\n visualizationId === 'scatter' ? scatterValidation : lineAndBarValidation;\n\n return validationFunction(queryResult, placeholders);\n },\n);\n\nexport const selectIsPlaceholdersFieldsFilled = createSelector(\n [selectQueryResultVisualizationPlaceholders],\n (placeholders) => {\n return placeholders.every((item) => {\n return (item.id !== 'x' && item.id !== 'y') || item.field !== '';\n });\n },\n);\n","import type {QueryResult} from '../preparers/types';\nimport type {Placeholder} from '../types';\nimport objectHash from 'object-hash';\n\nexport const colorsValidation = (queryResult: QueryResult, placeholders: Placeholder[]) => {\n const fields = placeholders.reduce((acc: string[], {field}) => {\n if (field) {\n acc.push(field);\n }\n\n return acc;\n }, []);\n\n const notAllFieldsSelected = fields.length < placeholders.length;\n\n if (notAllFieldsSelected) {\n return {\n x: {invalid: false},\n };\n }\n\n const hashes: Record<string, boolean> = {};\n\n const isDataDuplicated = queryResult.some((item) => {\n const newObject = fields.reduce((acc: Record<string, string>, field: string) => {\n acc[field] = item[field].$rawValue;\n return acc;\n }, {});\n\n // eslint-disable-next-line new-cap\n const lineHash = objectHash.MD5(newObject);\n\n const isLineDuplicated = hashes[lineHash];\n\n hashes[lineHash] = true;\n\n return isLineDuplicated;\n });\n\n return {\n x: {invalid: isDataDuplicated},\n };\n};\n","import React from 'react';\nimport block from 'bem-cn-lite';\nimport './EmptyPlaceholdersMessage.scss';\n\nconst b = block('empty-placeholders-message');\n\nexport function EmptyPlaceholdersMessage() {\n return <div className={b()}>Add fields in X and Y placeholders</div>;\n}\n","import React from 'react';\nexport * from './types';\nexport * from './utils';\n/**\n * It is an experemental plugin\n *\n * DO NOT USE IT IN YOUR PRODUCTION\n * */\nexport const D3Plugin = {\n type: 'd3',\n renderer: React.lazy(() => import('./renderer/D3Widget')),\n};\n","import React, {useMemo} from 'react';\nimport ChartKit from '../../../../components/YagrChartKit/YagrChartKit';\nimport {settings} from '@gravity-ui/chartkit';\nimport type {ChartKitRef} from '@gravity-ui/chartkit';\nimport {prepareWidgetData} from '../preparers/prepareWidgetData';\nimport {useSelector} from 'react-redux';\nimport {\n selectIsPlaceholdersFieldsFilled,\n selectQueryResultVisualization,\n} from '../../module/queryChart/selectors';\nimport type {QueryResult} from '../preparers/types';\nimport {EmptyPlaceholdersMessage} from './EmptyPlaceholdersMessage';\nimport {D3Plugin} from '@gravity-ui/chartkit/d3';\n\nsettings.set({plugins: [...settings.get('plugins'), D3Plugin]});\n\ntype LineBasicProps = {\n result: QueryResult;\n};\n\nexport const BaseChart = React.forwardRef<ChartKitRef | undefined, LineBasicProps>(\n function BaseChartComponent({result}, ref) {\n const visualization = useSelector(selectQueryResultVisualization);\n const fieldsIsFilled = useSelector(selectIsPlaceholdersFieldsFilled);\n\n const widgetData = useMemo(() => {\n return prepareWidgetData({result, visualization});\n }, [result, visualization]);\n\n if (!fieldsIsFilled) {\n return <EmptyPlaceholdersMessage />;\n }\n\n return <ChartKit type=\"d3\" data={widgetData} ref={ref} />;\n },\n);\n\nexport const Chart = React.memo(BaseChart);\n","import * as React from 'react';\nconst Plus = (props) => (React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: 16, height: 16, fill: \"none\", viewBox: \"0 0 16 16\" }, props),\n React.createElement(\"path\", { fill: \"currentColor\", fillRule: \"evenodd\", d: \"M8 1.75a.75.75 0 0 1 .75.75v4.75h4.75a.75.75 0 0 1 0 1.5H8.75v4.75a.75.75 0 0 1-1.5 0V8.75H2.5a.75.75 0 0 1 0-1.5h4.75V2.5A.75.75 0 0 1 8 1.75Z\", clipRule: \"evenodd\" })));\nexport default Plus;\n","import React, {FC} from 'react';\nimport {Button, Icon} from '@gravity-ui/uikit';\nimport {Xmark as XmarkIcon} from '@gravity-ui/icons';\nimport cn from 'bem-cn-lite';\nimport './ChartFieldName.scss';\n\nconst b = cn('yt-chart-field-name');\n\ntype Props = {\n fieldName: string;\n placeholderId: string;\n onRemove: (fieldName: string, placeholderId: string) => void;\n};\n\nexport const ChartFieldName: FC<Props> = ({fieldName, placeholderId, onRemove}) => {\n if (!fieldName) return null;\n\n const handleRemoveField = () => {\n onRemove(fieldName, placeholderId);\n };\n\n return (\n <div key={fieldName} className={b()}>\n <div className={b('spacer')}></div>\n <div className={b('title')} title={fieldName}>\n {fieldName}\n </div>\n <div className={b('actions')}>\n <Button onClick={handleRemoveField}>\n <Icon data={XmarkIcon} size={16} />\n </Button>\n </div>\n </div>\n );\n};\n","import React, {useCallback} from 'react';\nimport block from 'bem-cn-lite';\nimport './ChartField.scss';\nimport {Placeholder} from '../../types';\nimport {Button, Icon, Select} from '@gravity-ui/uikit';\nimport {Plus as PlusIcon} from '@gravity-ui/icons';\nimport {useDispatch} from 'react-redux';\nimport {removeField, setField} from '../../../module/queryChart/queryChartSlice';\nimport {ChartFieldName} from './ChartFieldName';\n\nconst b = block('yt-chart-field');\n\ntype PlaceholderComponentProps = {\n placeholder: Placeholder;\n availableFields: string[];\n};\n\nexport const ChartField = ({placeholder, availableFields}: PlaceholderComponentProps) => {\n const {id, field} = placeholder;\n const dispatch = useDispatch();\n\n const handleRemoveField = useCallback(\n (fieldName: string, placeholderId: string) => {\n dispatch(\n removeField({\n fieldName,\n placeholderId,\n }),\n );\n },\n [dispatch],\n );\n\n const onSelectUpdate = React.useCallback(\n (value: string[]) => {\n dispatch(\n setField({\n placeholderId: placeholder.id,\n fieldName: value[0],\n }),\n );\n },\n [dispatch, placeholder.id],\n );\n\n return (\n <div className={b()}>\n <div className={b('header')}>\n <div className={b('name')}>{id}</div>\n <Select\n value={[]}\n filterable={true}\n options={availableFields.map((item) => ({\n content: item,\n value: item,\n data: item,\n }))}\n onUpdate={onSelectUpdate}\n renderControl={({onClick, ref}) => {\n return (\n <Button onClick={onClick} ref={ref}>\n <Icon data={PlusIcon} size={16} />\n </Button>\n );\n }}\n />\n </div>\n\n <ChartFieldName\n fieldName={field}\n placeholderId={placeholder.id}\n onRemove={handleRemoveField}\n />\n </div>\n );\n};\n","import React, {FC} from 'react';\nimport {ChartField} from './ChartField';\nimport block from 'bem-cn-lite';\nimport './ChartFields.scss';\nimport {useSelector} from 'react-redux';\nimport {selectQueryResultVisualizationPlaceholders} from '../../../module/queryChart/selectors';\n\nconst b = block('yt-query-chart-fields');\n\ntype PlaceholdersContainerProps = {\n availableFields: string[];\n};\n\nexport const ChartFields: FC<PlaceholdersContainerProps> = ({availableFields}) => {\n const placeholders = useSelector(selectQueryResultVisualizationPlaceholders);\n\n return (\n <div className={b()}>\n {placeholders.map((placeholder) => (\n <ChartField\n key={placeholder.id}\n placeholder={placeholder}\n availableFields={availableFields}\n />\n ))}\n </div>\n );\n};\n","import React, {useCallback} from 'react';\nimport {Gear} from '@gravity-ui/icons';\nimport {Icon} from '@gravity-ui/uikit';\nimport Button from '../../../../components/Button/Button';\nimport {DialogField, DialogTabField, FormApi, YTDFDialog} from '../../../../components/Dialog';\nimport type {ChartSettings} from '../types';\nimport {useDispatch, useSelector} from 'react-redux';\nimport {selectQueryResultChartSettings} from '../../module/queryChart/selectors';\nimport {setChartSettings} from '../../module/queryChart/queryChartSlice';\nimport {useToggle} from 'react-use';\n\ntype FormValues = ChartSettings;\n\nfunction pixelIntervalValidator(value: string) {\n return !value || /^\\d+$/.test(value) ? undefined : 'Should be a number';\n}\n\nconst extras = {\n options: [\n {\n value: 'on',\n label: 'On',\n },\n {\n value: 'off',\n label: 'Off',\n },\n ],\n};\n\nconst xAxisTab: DialogTabField<DialogField<FormValues>> = {\n type: 'tab',\n name: 'xAxis',\n title: 'X axis',\n fields: [\n {\n name: 'legend',\n caption: 'Legend',\n type: 'radio',\n extras,\n },\n {\n name: 'labels',\n caption: 'Labels',\n type: 'radio',\n extras,\n },\n {\n caption: 'Title',\n name: 'title',\n type: 'text',\n },\n {\n caption: 'Grid step, px',\n name: 'pixelInterval',\n type: 'text',\n validator: pixelIntervalValidator,\n },\n ],\n};\n\nconst yAxisTab: DialogTabField<DialogField<FormValues>> = {\n type: 'tab',\n name: 'yAxis',\n title: 'Y axis',\n fields: [\n {\n name: 'labels',\n caption: 'Labels',\n type: 'radio',\n extras,\n },\n {\n caption: 'Title',\n name: 'title',\n type: 'text',\n },\n {\n name: 'grid',\n caption: 'Grid',\n type: 'radio',\n extras,\n },\n {\n caption: 'Grid step, px',\n name: 'pixelInterval',\n type: 'text',\n validator: pixelIntervalValidator,\n },\n ],\n};\n\nconst fields: DialogTabField<DialogField<FormValues>>[] = [xAxisTab, yAxisTab];\n\nexport function ChartSettingsComponent() {\n const [visible, toggleVisibility] = useToggle(false);\n const chartSettings = useSelector(selectQueryResultChartSettings);\n const dispatch = useDispatch();\n\n const handleOnAdd = useCallback(\n (form: FormApi<FormValues, Partial<FormValues>>) => {\n dispatch(setChartSettings(form.getState().values));\n return Promise.resolve();\n },\n [dispatch],\n );\n\n return (\n <span>\n <Button onClick={toggleVisibility}>\n <Icon data={Gear} size={16} />\n </Button>\n <YTDFDialog<FormValues>\n visible={visible}\n initialValues={chartSettings}\n onClose={toggleVisibility}\n onAdd={handleOnAdd}\n fields={fields}\n />\n </span>\n );\n}\n","import React, {FC, useCallback} from 'react';\nimport {Select} from '@gravity-ui/uikit';\nimport type {VisualizationId} from '../types';\nimport {useDispatch, useSelector} from 'react-redux';\nimport {selectQueryResultVisualization} from '../../module/queryChart/selectors';\nimport {setVisualization} from '../../module/queryChart/queryChartSlice';\n\nconst options: {value: VisualizationId; content: string}[] = [\n {\n value: 'line',\n content: 'Line chart',\n },\n {\n value: 'bar-x',\n content: 'Bar chart',\n },\n {\n value: 'scatter',\n content: 'Scatter chart',\n },\n];\n\nexport const VisualizationSelector: FC = () => {\n const visualization = useSelector(selectQueryResultVisualization);\n const dispatch = useDispatch();\n\n const onUpdate = useCallback(\n ([visualizationId]: string[]) => {\n dispatch(setVisualization({...visualization, id: visualizationId as VisualizationId}));\n },\n [dispatch, visualization],\n );\n\n return <Select width={125} value={[visualization.id]} options={options} onUpdate={onUpdate} />;\n};\n","import * as React from 'react';\nconst ArrowsRotateRight = (props) => (React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: 16, height: 16, fill: \"none\", viewBox: \"0 0 16 16\" }, props),\n React.createElement(\"path\", { fill: \"currentColor\", fillRule: \"evenodd\", d: \"M8 1.5a6.501 6.501 0 0 0-6.445 5.649.75.75 0 1 0 1.488.194A5.001 5.001 0 0 1 11.57 4.5h-1.32a.75.75 0 0 0 0 1.5h3a.75.75 0 0 0 .75-.75v-3a.75.75 0 0 0-1.5 0v1.06A6.48 6.48 0 0 0 8 1.5Zm-5.25 13a.75.75 0 0 1-.75-.75v-3a.75.75 0 0 1 .75-.75h3a.75.75 0 0 1 0 1.5H4.43a5.001 5.001 0 0 0 8.528-2.843.75.75 0 1 1 1.487.194A6.501 6.501 0 0 1 3.5 12.691v1.059a.75.75 0 0 1-.75.75Z\", clipRule: \"evenodd\" })));\nexport default ArrowsRotateRight;\n","import React from 'react';\nimport {useSelector} from 'react-redux';\nimport {selectQueryResultChartSaved} from '../../module/queryChart/selectors';\nimport {ArrowsRotateRight, CircleCheck} from '@gravity-ui/icons';\nimport {Icon, Tooltip} from '@gravity-ui/uikit';\nimport block from 'bem-cn-lite';\nimport './SavingIndicator.scss';\n\nconst b = block('saving-indicator');\n\nexport function SavingIndicator() {\n const saved = useSelector(selectQueryResultChartSaved);\n const tooltipContent = saved ? 'Saved' : 'Saving in progress';\n\n return (\n <Tooltip content={tooltipContent}>\n <Icon\n className={b({saving: !saved})}\n data={saved ? CircleCheck : ArrowsRotateRight}\n size={16}\n />\n </Tooltip>\n );\n}\n","import React, {FC, PropsWithChildren, useState} from 'react';\nimport {useSelector} from 'react-redux';\nimport type {AlertProps} from '@gravity-ui/uikit';\nimport {Alert, Button, Icon} from '@gravity-ui/uikit';\nimport block from 'bem-cn-lite';\nimport {resultsPlaceholdersValidation} from '../../module/queryChart/selectors';\nimport {CircleExclamation as CircleExclamationIcon} from '@gravity-ui/icons';\n\nimport './ChartValidation.scss';\n\nconst b = block('chart-validation');\n\nconst ALERT_TEXT =\n 'Your data contains duplicate values for one or more points. </br> This can lead to incorrect graph plotting. Please ensure that each point has a unique value.';\n\nconst ALERT_PROPS = {\n title: 'Duplicate Values',\n theme: 'warning' as AlertProps['theme'],\n message: (\n <span\n dangerouslySetInnerHTML={{\n __html: ALERT_TEXT,\n }}\n />\n ),\n icon: (\n <Icon className={b('field-icon', {invalid: true})} data={CircleExclamationIcon} size={16} />\n ),\n};\n\nexport const ChartValidation: FC<PropsWithChildren> = ({children}) => {\n const [isErrorHidden, hideError] = useState(false);\n const placeholdersValidation = useSelector(resultsPlaceholdersValidation);\n const hasError = placeholdersValidation?.x?.invalid || placeholdersValidation?.y?.invalid;\n const showBigAlert = hasError && !isErrorHidden;\n const showSmallAlert = isErrorHidden;\n\n if (showBigAlert) {\n return (\n <div className={b()}>\n <Alert\n {...ALERT_PROPS}\n actions={\n <Alert.Actions>\n <Button onClick={() => hideError(true)}>Show chart</Button>\n </Alert.Actions>\n }\n />\n </div>\n );\n }\n\n if (showSmallAlert) {\n return (\n <>\n <div className={b('alert')}>\n <Alert {...ALERT_PROPS} />\n </div>\n {children}\n </>\n );\n }\n\n return children;\n};\n","import * as React from 'react';\nconst CircleExclamation = (props) => (React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: 16, height: 16, fill: \"none\", viewBox: \"0 0 16 16\" }, props),\n React.createElement(\"path\", { fill: \"currentColor\", fillRule: \"evenodd\", d: \"M8 13.5a5.5 5.5 0 1 0 0-11 5.5 5.5 0 0 0 0 11ZM8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14Zm1-4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM8.75 5a.75.75 0 0 0-1.5 0v2.5a.75.75 0 0 0 1.5 0V5Z\", clipRule: \"evenodd\" })));\nexport default CircleExclamation;\n","import React, {useEffect} from 'react';\nimport {useDispatch, useSelector} from 'react-redux';\nimport throttle_ from 'lodash/throttle';\nimport block from 'bem-cn-lite';\nimport {type ChartKitRef} from '@gravity-ui/chartkit';\nimport {Chart} from './Chart';\nimport {QueryItem} from '../../module/api';\nimport useResizeObserver from '../../../../hooks/useResizeObserver';\nimport {ChartFields} from './ChartFields';\nimport './QueryResultsVisualization.scss';\nimport {saveQueryChartConfig} from '../../module/queryChart/actions';\nimport {\n selectAvailableFields,\n selectQueryResult,\n selectQueryResultVisualization,\n} from '../../module/queryChart/selectors';\nimport {ChartSettingsComponent} from './ChartSettings';\nimport {VisualizationSelector} from './VisualizationSelector';\nimport {SavingIndicator} from './SavingIndicator';\nimport {ChartValidation} from './ChartValidation';\n\nimport ErrorBoundary from '../../../../components/ErrorBoundary/ErrorBoundary';\n\nconst b = block('query-result-visualization');\n\ntype QueryResultsVisualizationProps = {\n query: QueryItem;\n};\n\nexport function QueryResultsVisualization({query}: QueryResultsVisualizationProps) {\n const containerRef = React.useRef<HTMLDivElement>(null);\n const chartKitRef = React.useRef<ChartKitRef>();\n const visualization = useSelector(selectQueryResultVisualization);\n const queryResult = useSelector(selectQueryResult);\n const availableFields = useSelector(selectAvailableFields);\n\n const dispatch = useDispatch();\n\n useEffect(() => {\n dispatch(\n saveQueryChartConfig({\n queryId: query.id,\n visualization,\n }),\n );\n }, [query.id, visualization, dispatch]);\n\n const debouncedChartResize = React.useMemo(() => {\n return throttle_(() => {\n chartKitRef.current?.reflow();\n }, 300);\n }, []);\n\n useResizeObserver({\n element: containerRef.current ?? undefined,\n onResize: debouncedChartResize,\n });\n\n return (\n <div className={b()} ref={containerRef}>\n <div className={b('controls-wrapper')}>\n <div className={b('group-wrapper')}>\n <VisualizationSelector />\n <ChartSettingsComponent />\n <SavingIndicator />\n </div>\n <ChartFields availableFields={availableFields} />\n </div>\n <div className={b('chartkit-wrapper')}>\n <ErrorBoundary>\n <ChartValidation>\n <Chart result={queryResult} ref={chartKitRef} />\n </ChartValidation>\n </ErrorBoundary>\n </div>\n </div>\n );\n}\n","import { I18N } from '@gravity-ui/i18n';\nimport en from './keysets/en.json';\nimport ru from './keysets/ru.json';\nconst i18nFactory = new I18N();\nconst EN = 'en';\nconst RU = 'ru';\ni18nFactory.registerKeysets(EN, en);\ni18nFactory.registerKeysets(RU, ru);\nconst i18n = i18nFactory.i18n.bind(i18nFactory);\nexport { i18nFactory, i18n };\n","export const CHARTKIT_ERROR_CODE = {\n NO_DATA: 'ERR.CK.NO_DATA',\n INVALID_DATA: 'ERR.CK.INVALID_DATA',\n UNKNOWN: 'ERR.CK.UNKNOWN_ERROR',\n UNKNOWN_PLUGIN: 'ERR.CK.UNKNOWN_PLUGIN',\n TOO_MANY_LINES: 'ERR.CK.TOO_MANY_LINES',\n};\nexport class ChartKitError extends Error {\n constructor({ originalError, message, code = CHARTKIT_ERROR_CODE.UNKNOWN, } = {}) {\n super(message);\n this.isCustomError = true;\n this.code = code;\n if (originalError) {\n this.name = originalError.name;\n this.stack = originalError.stack;\n }\n }\n}\nexport const isChartKitError = (error) => {\n return error instanceof Error && 'isCustomError' in error;\n};\n","import isObject from 'lodash/isObject';\nimport mergeWith from 'lodash/mergeWith';\n// @ts-ignore\nexport function mergeSettingStrategy(objValue, srcValue, key) {\n if (key === 'plugins') {\n const currentPlugins = [...objValue];\n const newPlugins = [...srcValue];\n // modify existing plugins\n let newSettingsPlugins = currentPlugins.map((currentPlugin) => {\n const newPluginIndex = newPlugins.findIndex(({ type }) => type === currentPlugin.type);\n if (newPluginIndex !== -1) {\n const newPlugin = newPlugins[newPluginIndex];\n newPlugins.splice(newPluginIndex, 1);\n return {\n type: currentPlugin.type,\n renderer: newPlugin.renderer,\n };\n }\n return currentPlugin;\n });\n // add new plugins if it exist after modified\n if (newPlugins.length > 0) {\n newSettingsPlugins = [...newSettingsPlugins, ...newPlugins];\n }\n return newSettingsPlugins;\n }\n if (isObject(objValue)) {\n return mergeWith(objValue, srcValue, mergeSettingStrategy);\n }\n return srcValue;\n}\n","import { configure } from '@gravity-ui/uikit';\nimport get from 'lodash/get';\nimport mergeWith from 'lodash/mergeWith';\nimport { i18nFactory } from '../../i18n';\nimport { EventEmitter } from './eventEmitter';\nimport { mergeSettingStrategy } from './mergeSettingStrategy';\nexport const settingsEventEmitter = new EventEmitter();\nconst removeUndefinedValues = (data) => {\n return Object.entries(data).reduce((acc, [key, value]) => {\n if (typeof value !== 'undefined') {\n acc[key] = value;\n }\n return acc;\n }, {});\n};\nconst updateLang = (lang) => {\n configure({ lang });\n i18nFactory.setLang(lang);\n};\nclass ChartKitSettings {\n constructor() {\n this.settings = {\n plugins: [],\n lang: 'en',\n };\n updateLang(this.get('lang'));\n }\n get(key) {\n return get(this.settings, key);\n }\n set(updates) {\n const filteredUpdates = removeUndefinedValues(updates);\n this.settings = mergeWith(this.settings, filteredUpdates, mergeSettingStrategy);\n if (filteredUpdates.lang) {\n const lang = filteredUpdates.lang || this.get('lang');\n updateLang(lang);\n settingsEventEmitter.dispatch('change-lang', lang);\n }\n }\n}\nexport const settings = new ChartKitSettings();\n","export class EventEmitter {\n constructor() {\n this.events = {};\n }\n on(type, event) {\n if (this.events[type]) {\n this.events[type].push(event);\n }\n else {\n this.events[type] = [event];\n }\n }\n off(type, eventId) {\n if (this.events[type]) {\n this.events[type] = this.events[type].filter(({ id }) => id !== eventId);\n }\n }\n dispatch(type, args) {\n if (this.events[type]) {\n this.events[type].forEach(({ action }) => {\n action(args);\n });\n }\n }\n}\n","import { withNaming } from '@bem-react/classname';\nexport const NAMESPACE = 'chartkit-';\nexport const cn = withNaming({ e: '__', m: '_' });\nexport const block = withNaming({ n: NAMESPACE, e: '__', m: '_' });\n","export const randomString = (length, chars) => {\n let result = '';\n for (let i = length; i > 0; --i) {\n result += chars[Math.floor(Math.random() * chars.length)];\n }\n return result;\n};\nexport const getRandomCKId = () => `ck.${randomString(10, '0123456789abcdefghijklmnopqrstuvwxyz')}`;\n","import * as React from 'react';\nconst Gear = (props) => (React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: 16, height: 16, fill: \"none\", viewBox: \"0 0 16 16\" }, props),\n React.createElement(\"g\", { clipPath: \"url(#a)\" },\n React.createElement(\"path\", { fill: \"currentColor\", fillRule: \"evenodd\", d: \"M7.199 2H8.8a.2.2 0 0 1 .2.2c0 1.808 1.958 2.939 3.524 2.034a.199.199 0 0 1 .271.073l.802 1.388a.199.199 0 0 1-.073.272c-1.566.904-1.566 3.164 0 4.069a.199.199 0 0 1 .073.271l-.802 1.388a.199.199 0 0 1-.271.073C10.958 10.863 9 11.993 9 13.8a.2.2 0 0 1-.199.2H7.2a.199.199 0 0 1-.2-.2c0-1.808-1.958-2.938-3.524-2.034a.199.199 0 0 1-.272-.073l-.8-1.388a.199.199 0 0 1 .072-.271c1.566-.905 1.566-3.165 0-4.07a.199.199 0 0 1-.073-.271l.801-1.388a.199.199 0 0 1 .272-.073C5.042 5.138 7 4.007 7 2.2c0-.11.089-.199.199-.199ZM5.5 2.2c0-.94.76-1.7 1.699-1.7H8.8c.94 0 1.7.76 1.7 1.7a.85.85 0 0 0 1.274.735 1.699 1.699 0 0 1 2.32.622l.802 1.388c.469.813.19 1.851-.622 2.32a.85.85 0 0 0 0 1.472 1.7 1.7 0 0 1 .622 2.32l-.802 1.388a1.699 1.699 0 0 1-2.32.622.85.85 0 0 0-1.274.735c0 .939-.76 1.7-1.699 1.7H7.2a1.7 1.7 0 0 1-1.699-1.7.85.85 0 0 0-1.274-.735 1.698 1.698 0 0 1-2.32-.622l-.802-1.388a1.699 1.699 0 0 1 .622-2.32.85.85 0 0 0 0-1.471 1.699 1.699 0 0 1-.622-2.321l.801-1.388a1.699 1.699 0 0 1 2.32-.622A.85.85 0 0 0 5.5 2.2Zm4 5.8a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0ZM11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z\", clipRule: \"evenodd\" })),\n React.createElement(\"defs\", null,\n React.createElement(\"clipPath\", { id: \"a\" },\n React.createElement(\"path\", { fill: \"currentColor\", d: \"M0 0h16v16H0z\" })))));\nexport default Gear;\n","import React from 'react';\nexport const AlertContext = React.createContext(null);\n","'use client';\nimport React from 'react';\nimport { AlertContext } from './AlertContext';\nexport const useAlertContext = () => {\n const context = React.useContext(AlertContext);\n if (!context)\n throw new Error('Alert: `useAlertContext` hook is used out of \"AlertContext\"');\n return context;\n};\n","'use client';\nimport React from 'react';\nimport { Button } from '../Button';\nimport { useAlertContext } from './useAlertContext';\nexport const AlertAction = (props) => {\n const { view } = useAlertContext();\n return React.createElement(Button, Object.assign({ view: view === 'filled' ? 'normal-contrast' : undefined }, props));\n};\n","import { block } from '../utils/cn';\nimport './Alert.css';\nexport const DEFAULT_ICON_SIZE = 18;\nexport const bAlert = block('alert');\n","'use client';\nimport React from 'react';\nimport { AlertContext } from './AlertContext';\nexport const AlertContextProvider = ({ layout, view, children }) => {\n return React.createElement(AlertContext.Provider, { value: { layout, view } }, children);\n};\n","import React from 'react';\nimport { CircleCheck, CircleCheckFill, CircleInfo, CircleInfoFill, CircleXmark, CircleXmarkFill, Thunderbolt, ThunderboltFill, TriangleExclamation, TriangleExclamationFill, } from '@gravity-ui/icons';\nimport { Icon } from '../Icon';\nimport { colorText } from '../Text/colorText/colorText';\nimport { DEFAULT_ICON_SIZE, bAlert } from './constants';\nconst typeToIcon = {\n danger: {\n filled: CircleXmarkFill,\n outlined: CircleXmark,\n },\n info: {\n filled: CircleInfoFill,\n outlined: CircleInfo,\n },\n success: {\n filled: CircleCheckFill,\n outlined: CircleCheck,\n },\n warning: {\n filled: TriangleExclamationFill,\n outlined: TriangleExclamation,\n },\n utility: {\n filled: ThunderboltFill,\n outlined: Thunderbolt,\n },\n normal: null,\n};\nexport const AlertIcon = ({ className, theme, view = 'filled', size = DEFAULT_ICON_SIZE, }) => {\n const iconByTheme = typeToIcon[theme];\n if (!iconByTheme) {\n return null;\n }\n let color;\n if (theme === 'success') {\n color = 'positive';\n }\n else if (theme !== 'normal') {\n color = theme;\n }\n return (React.createElement(\"div\", { className: bAlert('icon', colorText({ color }, className)) },\n React.createElement(Icon, { data: iconByTheme[view], size: size })));\n};\n","import * as React from 'react';\nconst CircleXmarkFill = (props) => (React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: 16, height: 16, fill: \"none\", viewBox: \"0 0 16 16\" }, props),\n React.createElement(\"path\", { fill: \"currentColor\", fillRule: \"evenodd\", d: \"M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14ZM6.53 5.47a.75.75 0 0 0-1.06 1.06L6.94 8 5.47 9.47a.75.75 0 1 0 1.06 1.06L8 9.06l1.47 1.47a.75.75 0 1 0 1.06-1.06L9.06 8l1.47-1.47a.75.75 0 1 0-1.06-1.06L8 6.94 6.53 5.47Z\", clipRule: \"evenodd\" })));\nexport default CircleXmarkFill;\n","import * as React from 'react';\nconst CircleXmark = (props) => (React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: 16, height: 16, fill: \"none\", viewBox: \"0 0 16 16\" }, props),\n React.createElement(\"path\", { fill: \"currentColor\", fillRule: \"evenodd\", d: \"M13.5 8a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0ZM15 8A7 7 0 1 1 1 8a7 7 0 0 1 14 0ZM6.53 5.47a.75.75 0 0 0-1.06 1.06L6.94 8 5.47 9.47a.75.75 0 1 0 1.06 1.06L8 9.06l1.47 1.47a.75.75 0 1 0 1.06-1.06L9.06 8l1.47-1.47a.75.75 0 1 0-1.06-1.06L8 6.94 6.53 5.47Z\", clipRule: \"evenodd\" })));\nexport default CircleXmark;\n","import * as React from 'react';\nconst CircleInfoFill = (props) => (React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: 16, height: 16, fill: \"none\", viewBox: \"0 0 16 16\" }, props),\n React.createElement(\"path\", { fill: \"currentColor\", fillRule: \"evenodd\", d: \"M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14Zm1-9.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM8 7.75a.75.75 0 0 1 .75.75V11a.75.75 0 0 1-1.5 0V8.5A.75.75 0 0 1 8 7.75Z\", clipRule: \"evenodd\" })));\nexport default CircleInfoFill;\n","import * as React from 'react';\nconst CircleCheckFill = (props) => (React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: 16, height: 16, fill: \"none\", viewBox: \"0 0 16 16\" }, props),\n React.createElement(\"path\", { fill: \"currentColor\", fillRule: \"evenodd\", d: \"M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14Zm3.1-8.55a.75.75 0 1 0-1.2-.9L7.419 8.858 6.03 7.47a.75.75 0 0 0-1.06 1.06l2 2a.75.75 0 0 0 1.13-.08l3-4Z\", clipRule: \"evenodd\" })));\nexport default CircleCheckFill;\n","import * as React from 'react';\nconst TriangleExclamationFill = (props) => (React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: 16, height: 16, fill: \"none\", viewBox: \"0 0 16 16\" }, props),\n React.createElement(\"path\", { fill: \"currentColor\", fillRule: \"evenodd\", d: \"M5.836 2.244c.962-1.665 3.366-1.665 4.328 0l4.917 8.505c.964 1.666-.239 3.751-2.164 3.751H3.083c-1.925 0-3.128-2.085-2.164-3.751l4.917-8.505ZM8 5a.75.75 0 0 1 .75.75v2a.75.75 0 1 1-1.5 0v-2A.75.75 0 0 1 8 5Zm1 5.75a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z\", clipRule: \"evenodd\" })));\nexport default TriangleExclamationFill;\n","import * as React from 'react';\nconst ThunderboltFill = (props) => (React.createElement(\"svg\", Object.assign({ xmlns: \"http://www.w3.org/2000/svg\", width: 16, height: 16, fill: \"none\", viewBox: \"0 0 16 16\" }, props),\n React.createElement(\"path\", { fill: \"currentColor\", d: \"m14.61 6.914-7.632 8.08a1.614 1.614 0 0 1-2.69-1.66L5.5 10H2.677A1.677 1.677 0 0 1 1.12 7.7l2.323-5.807A2.216 2.216 0 0 1 5.5.5h4c.968 0 1.637.967 1.298 1.873L10 4.5h3.569a1.431 1.431 0 0 1 1.04 2.414Z\" })));\nexport default ThunderboltFill;\n","import { addComponentKeysets } from '../../utils/addComponentKeysets';\nimport en from './en.json';\nimport ru from './ru.json';\nconst COMPONENT = 'Alert';\nexport default addComponentKeysets({ en, ru }, COMPONENT);\n","import React from 'react';\nimport { Xmark } from '@gravity-ui/icons';\nimport { Button } from '../Button';\nimport { Card } from '../Card';\nimport { Icon } from '../Icon';\nimport { colorText } from '../Text';\nimport { Flex, spacing } from '../layout';\nimport { AlertAction } from './AlertAction';\nimport { AlertActions } from './AlertActions';\nimport { AlertContextProvider } from './AlertContextProvider';\nimport { AlertIcon } from './AlertIcon';\nimport { AlertTitle } from './AlertTitle';\nimport { DEFAULT_ICON_SIZE, bAlert } from './constants';\nimport i18n from './i18n';\nexport const Alert = (props) => {\n const { theme = 'normal', view = 'filled', layout = 'vertical', message, className, corners, style, onClose, align, qa, } = props;\n return (React.createElement(AlertContextProvider, { layout: layout, view: view },\n React.createElement(Card, { style: style, className: bAlert({ corners }, spacing({ py: 4, px: 5 }, className)), theme: theme, view: view, qa: qa },\n React.createElement(Flex, { gap: \"3\", alignItems: align },\n typeof props.icon === 'undefined' ? (React.createElement(Alert.Icon, { theme: theme, view: view })) : (props.icon // ability to pass `null` as `icon` prop value\n ),\n React.createElement(Flex, { direction: layout === 'vertical' ? 'column' : 'row', gap: \"5\", grow: true },\n React.createElement(Flex, { gap: \"2\", grow: true, className: bAlert('text-content') },\n React.createElement(Flex, { direction: \"column\", gap: \"1\", grow: true, justifyContent: align },\n typeof props.title === 'string' ? (React.createElement(Alert.Title, { text: props.title })) : (props.title),\n message)),\n Array.isArray(props.actions) ? (React.createElement(Alert.Actions, { items: props.actions })) : (props.actions)),\n onClose && (React.createElement(Button, { view: \"flat\", className: bAlert('close-btn'), onClick: onClose, extraProps: {\n 'aria-label': i18n('label_close'),\n } },\n React.createElement(Icon, { data: Xmark, size: DEFAULT_ICON_SIZE, className: colorText({ color: 'secondary' }) })))))));\n};\nAlert.Icon = AlertIcon;\nAlert.Title = AlertTitle;\nAlert.Actions = AlertActions;\nAlert.Action = AlertAction;\n","import React from 'react';\nimport { Text } from '../Text';\nimport { bAlert } from './constants';\nexport const AlertTitle = ({ text, className }) => {\n return (React.createElement(Text, { variant: \"subheader-2\", className: bAlert('title', className) }, text));\n};\n","'use client';\nimport React from 'react';\nimport { Flex } from '../layout';\nimport { AlertAction } from './AlertAction';\nimport { bAlert } from './constants';\nimport { useAlertContext } from './useAlertContext';\nexport const AlertActions = ({ items, children, className }) => {\n const { layout } = useAlertContext();\n return (React.createElement(Flex, { className: bAlert('actions', { minContent: layout === 'horizontal' }, className), direction: \"row\", gap: \"3\", wrap: true, alignItems: layout === 'horizontal' ? 'center' : 'flex-start' }, (items === null || items === void 0 ? void 0 : items.map(({ handler, text }, i) => (React.createElement(AlertAction, { key: i, onClick: handler }, text)))) || children));\n};\n","'use client';\nimport { __rest } from \"tslib\";\nimport React from 'react';\nimport { useActionHandlers } from '../../hooks';\nimport { Box } from '../layout';\nimport { block } from '../utils/cn';\nimport './Card.css';\nconst b = block('card');\nexport const Card = React.forwardRef(function Card(props, ref) {\n const { type = 'container', theme, view, size = 'm', children, className, onClick, disabled, selected } = props, restProps = __rest(props, [\"type\", \"theme\", \"view\", \"size\", \"children\", \"className\", \"onClick\", \"disabled\", \"selected\"]);\n const isTypeAction = type === 'action';\n const isTypeSelection = type === 'selection';\n const isTypeContainer = type === 'container';\n /* Clickable card — only with type 'action' or 'selection' and not selected or disabled */\n const hasAction = isTypeAction || isTypeSelection;\n const isClickable = hasAction && Boolean(onClick) && !(disabled || selected);\n /* Theme only with type 'container' */\n const defaultTheme = isTypeContainer ? 'normal' : undefined;\n /* View only with type 'container' and 'selection' */\n const defaultView = isTypeContainer || isTypeSelection ? 'outlined' : undefined;\n const handleClick = isClickable ? onClick : undefined;\n const { onKeyDown } = useActionHandlers(onClick);\n return (React.createElement(Box, Object.assign({ ref: ref, role: isClickable ? 'button' : undefined, className: b({\n theme: theme || defaultTheme,\n view: view || defaultView,\n type,\n selected,\n size,\n disabled,\n clickable: isClickable,\n }, className), onClick: handleClick, onKeyDown: isClickable ? onKeyDown : undefined, tabIndex: isClickable ? 0 : undefined }, restProps), children));\n});\n","'use client';\nimport React from 'react';\nimport { useForkRef } from '../../hooks';\nimport { useTooltipVisible } from '../../hooks/private';\nimport { Popup } from '../Popup';\nimport { Text } from '../Text';\nimport { block } from '../utils/cn';\nimport './Tooltip.css';\nconst b = block('tooltip');\nconst DEFAULT_PLACEMENT = ['bottom', 'top'];\nexport const Tooltip = (props) => {\n const { children, content, disabled, placement = DEFAULT_PLACEMENT, qa, id, className, style, disablePortal, contentClassName, openDelay = 1000, closeDelay, } = props;\n const [anchorElement, setAnchorElement] = React.useState(null);\n const tooltipVisible = useTooltipVisible(anchorElement, {\n openDelay,\n closeDelay,\n preventTriggerOnFocus: true,\n });\n const renderPopup = () => {\n return (React.createElement(Popup, { id: id, role: \"tooltip\", className: b(null, className), style: style, open: tooltipVisible && !disabled, placement: placement, anchorRef: { current: anchorElement }, disablePortal: disablePortal, disableEscapeKeyDown: true, disableOutsideClick: true, disableLayer: true, qa: qa },\n React.createElement(\"div\", { className: b('content', contentClassName) },\n React.createElement(Text, { variant: \"body-short\", color: \"complementary\" }, content))));\n };\n const child = React.Children.only(children);\n const childRef = child.ref;\n const ref = useForkRef(setAnchorElement, childRef);\n return (React.createElement(React.Fragment, null,\n React.cloneElement(child, { ref }),\n anchorElement ? renderPopup() : null));\n};\n","import React from 'react';\nimport { KeyCode } from '../../../constants';\nimport { useBoolean } from '../useBoolean';\nexport const useTooltipVisible = (anchor, { openDelay = 250, closeDelay, preventTriggerOnFocus = false, }) => {\n const [tooltipVisible, showTooltip, hideTooltip] = useBoolean(false);\n const timeoutRef = React.useRef();\n const isFocusWithinRef = React.useRef(false);\n React.useEffect(() => {\n if (!anchor) {\n return undefined;\n }\n function handleMouseEnter() {\n clearTimeout(timeoutRef.current);\n timeoutRef.current = window.setTimeout(showTooltip, openDelay);\n }\n function handleMouseLeave() {\n clearTimeout(timeoutRef.current);\n timeoutRef.current = window.setTimeout(hideTooltip, closeDelay);\n }\n function handleFocusWithin(e) {\n if (!isFocusWithinRef.current && document.activeElement === e.target) {\n isFocusWithinRef.current = true;\n clearTimeout(timeoutRef.current);\n showTooltip();\n }\n }\n function handleBlurWithin(e) {\n if (isFocusWithinRef.current &&\n !e.currentTarget.contains(e.relatedTarget)) {\n isFocusWithinRef.current = false;\n clearTimeout(timeoutRef.current);\n hideTooltip();\n }\n }\n function handleKeyDown(e) {\n if (e.key === KeyCode.ESCAPE) {\n clearTimeout(timeoutRef.current);\n hideTooltip();\n }\n }\n anchor.addEventListener('mouseenter', handleMouseEnter);\n anchor.addEventListener('mouseleave', handleMouseLeave);\n anchor.addEventListener('keydown', handleKeyDown);\n if (!preventTriggerOnFocus) {\n anchor.addEventListener('focus', handleFocusWithin);\n anchor.addEventListener('blur', handleBlurWithin);\n }\n return () => {\n anchor.removeEventListener('mouseenter', handleMouseEnter);\n anchor.removeEventListener('mouseleave', handleMouseLeave);\n anchor.removeEventListener('focus', handleFocusWithin);\n anchor.removeEventListener('blur', handleBlurWithin);\n anchor.removeEventListener('keydown', handleKeyDown);\n };\n }, [anchor, showTooltip, hideTooltip, openDelay, closeDelay, preventTriggerOnFocus]);\n return tooltipVisible;\n};\n","import React from 'react';\nexport function useBoolean(initialState) {\n const [value, setValue] = React.useState(initialState);\n return [\n value,\n React.useCallback(() => setValue(true), []),\n React.useCallback(() => setValue(false), []),\n React.useCallback(() => setValue((val) => !val), []),\n ];\n}\n","import { useReducer } from 'react';\nvar toggleReducer = function (state, nextValue) {\n return typeof nextValue === 'boolean' ? nextValue : !state;\n};\nvar useToggle = function (initialValue) {\n return useReducer(toggleReducer, initialValue);\n};\nexport default useToggle;\n","/**\r\n * A collection of shims that provide minimal functionality of the ES6 collections.\r\n *\r\n * These implementations are not meant to be used outside of the ResizeObserver\r\n * modules as they cover only a limited range of use cases.\r\n */\r\n/* eslint-disable require-jsdoc, valid-jsdoc */\r\nvar MapShim = (function () {\r\n if (typeof Map !== 'undefined') {\r\n return Map;\r\n }\r\n /**\r\n * Returns index in provided array that matches the specified key.\r\n *\r\n * @param {Array<Array>} arr\r\n * @param {*} key\r\n * @returns {number}\r\n */\r\n function getIndex(arr, key) {\r\n var result = -1;\r\n arr.some(function (entry, index) {\r\n if (entry[0] === key) {\r\n result = index;\r\n return true;\r\n }\r\n return false;\r\n });\r\n return result;\r\n }\r\n return /** @class */ (function () {\r\n function class_1() {\r\n this.__entries__ = [];\r\n }\r\n Object.defineProperty(class_1.prototype, \"size\", {\r\n /**\r\n * @returns {boolean}\r\n */\r\n get: function () {\r\n return this.__entries__.length;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * @param {*} key\r\n * @returns {*}\r\n */\r\n class_1.prototype.get = function (key) {\r\n var index = getIndex(this.__entries__, key);\r\n var entry = this.__entries__[index];\r\n return entry && entry[1];\r\n };\r\n /**\r\n * @param {*} key\r\n * @param {*} value\r\n * @returns {void}\r\n */\r\n class_1.prototype.set = function (key, value) {\r\n var index = getIndex(this.__entries__, key);\r\n if (~index) {\r\n this.__entries__[index][1] = value;\r\n }\r\n else {\r\n this.__entries__.push([key, value]);\r\n }\r\n };\r\n /**\r\n * @param {*} key\r\n * @returns {void}\r\n */\r\n class_1.prototype.delete = function (key) {\r\n var entries = this.__entries__;\r\n var index = getIndex(entries, key);\r\n if (~index) {\r\n entries.splice(index, 1);\r\n }\r\n };\r\n /**\r\n * @param {*} key\r\n * @returns {void}\r\n */\r\n class_1.prototype.has = function (key) {\r\n return !!~getIndex(this.__entries__, key);\r\n };\r\n /**\r\n * @returns {void}\r\n */\r\n class_1.prototype.clear = function () {\r\n this.__entries__.splice(0);\r\n };\r\n /**\r\n * @param {Function} callback\r\n * @param {*} [ctx=null]\r\n * @returns {void}\r\n */\r\n class_1.prototype.forEach = function (callback, ctx) {\r\n if (ctx === void 0) { ctx = null; }\r\n for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) {\r\n var entry = _a[_i];\r\n callback.call(ctx, entry[1], entry[0]);\r\n }\r\n };\r\n return class_1;\r\n }());\r\n})();\n\n/**\r\n * Detects whether window and document objects are available in current environment.\r\n */\r\nvar isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document;\n\n// Returns global object of a current environment.\r\nvar global$1 = (function () {\r\n if (typeof global !== 'undefined' && global.Math === Math) {\r\n return global;\r\n }\r\n if (typeof self !== 'undefined' && self.Math === Math) {\r\n return self;\r\n }\r\n if (typeof window !== 'undefined' && window.Math === Math) {\r\n return window;\r\n }\r\n // eslint-disable-next-line no-new-func\r\n return Function('return this')();\r\n})();\n\n/**\r\n * A shim for the requestAnimationFrame which falls back to the setTimeout if\r\n * first one is not supported.\r\n *\r\n * @returns {number} Requests' identifier.\r\n */\r\nvar requestAnimationFrame$1 = (function () {\r\n if (typeof requestAnimationFrame === 'function') {\r\n // It's required to use a bounded function because IE sometimes throws\r\n // an \"Invalid calling object\" error if rAF is invoked without the global\r\n // object on the left hand side.\r\n return requestAnimationFrame.bind(global$1);\r\n }\r\n return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); };\r\n})();\n\n// Defines minimum timeout before adding a trailing call.\r\nvar trailingTimeout = 2;\r\n/**\r\n * Creates a wrapper function which ensures that provided callback will be\r\n * invoked only once during the specified delay period.\r\n *\r\n * @param {Function} callback - Function to be invoked after the delay period.\r\n * @param {number} delay - Delay after which to invoke callback.\r\n * @returns {Function}\r\n */\r\nfunction throttle (callback, delay) {\r\n var leadingCall = false, trailingCall = false, lastCallTime = 0;\r\n /**\r\n * Invokes the original callback function and schedules new invocation if\r\n * the \"proxy\" was called during current request.\r\n *\r\n * @returns {void}\r\n */\r\n function resolvePending() {\r\n if (leadingCall) {\r\n leadingCall = false;\r\n callback();\r\n }\r\n if (trailingCall) {\r\n proxy();\r\n }\r\n }\r\n /**\r\n * Callback invoked after the specified delay. It will further postpone\r\n * invocation of the original function delegating it to the\r\n * requestAnimationFrame.\r\n *\r\n * @returns {void}\r\n */\r\n function timeoutCallback() {\r\n requestAnimationFrame$1(resolvePending);\r\n }\r\n /**\r\n * Schedules invocation of the original function.\r\n *\r\n * @returns {void}\r\n */\r\n function proxy() {\r\n var timeStamp = Date.now();\r\n if (leadingCall) {\r\n // Reject immediately following calls.\r\n if (timeStamp - lastCallTime < trailingTimeout) {\r\n return;\r\n }\r\n // Schedule new call to be in invoked when the pending one is resolved.\r\n // This is important for \"transitions\" which never actually start\r\n // immediately so there is a chance that we might miss one if change\r\n // happens amids the pending invocation.\r\n trailingCall = true;\r\n }\r\n else {\r\n leadingCall = true;\r\n trailingCall = false;\r\n setTimeout(timeoutCallback, delay);\r\n }\r\n lastCallTime = timeStamp;\r\n }\r\n return proxy;\r\n}\n\n// Minimum delay before invoking the update of observers.\r\nvar REFRESH_DELAY = 20;\r\n// A list of substrings of CSS properties used to find transition events that\r\n// might affect dimensions of observed elements.\r\nvar transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight'];\r\n// Check if MutationObserver is available.\r\nvar mutationObserverSupported = typeof MutationObserver !== 'undefined';\r\n/**\r\n * Singleton controller class which handles updates of ResizeObserver instances.\r\n */\r\nvar ResizeObserverController = /** @class */ (function () {\r\n /**\r\n * Creates a new instance of ResizeObserverController.\r\n *\r\n * @private\r\n */\r\n function ResizeObserverController() {\r\n /**\r\n * Indicates whether DOM listeners have been added.\r\n *\r\n * @private {boolean}\r\n */\r\n this.connected_ = false;\r\n /**\r\n * Tells that controller has subscribed for Mutation Events.\r\n *\r\n * @private {boolean}\r\n */\r\n this.mutationEventsAdded_ = false;\r\n /**\r\n * Keeps reference to the instance of MutationObserver.\r\n *\r\n * @private {MutationObserver}\r\n */\r\n this.mutationsObserver_ = null;\r\n /**\r\n * A list of connected observers.\r\n *\r\n * @private {Array<ResizeObserverSPI>}\r\n */\r\n this.observers_ = [];\r\n this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);\r\n this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);\r\n }\r\n /**\r\n * Adds observer to observers list.\r\n *\r\n * @param {ResizeObserverSPI} observer - Observer to be added.\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.addObserver = function (observer) {\r\n if (!~this.observers_.indexOf(observer)) {\r\n this.observers_.push(observer);\r\n }\r\n // Add listeners if they haven't been added yet.\r\n if (!this.connected_) {\r\n this.connect_();\r\n }\r\n };\r\n /**\r\n * Removes observer from observers list.\r\n *\r\n * @param {ResizeObserverSPI} observer - Observer to be removed.\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.removeObserver = function (observer) {\r\n var observers = this.observers_;\r\n var index = observers.indexOf(observer);\r\n // Remove observer if it's present in registry.\r\n if (~index) {\r\n observers.splice(index, 1);\r\n }\r\n // Remove listeners if controller has no connected observers.\r\n if (!observers.length && this.connected_) {\r\n this.disconnect_();\r\n }\r\n };\r\n /**\r\n * Invokes the update of observers. It will continue running updates insofar\r\n * it detects changes.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.refresh = function () {\r\n var changesDetected = this.updateObservers_();\r\n // Continue running updates if changes have been detected as there might\r\n // be future ones caused by CSS transitions.\r\n if (changesDetected) {\r\n this.refresh();\r\n }\r\n };\r\n /**\r\n * Updates every observer from observers list and notifies them of queued\r\n * entries.\r\n *\r\n * @private\r\n * @returns {boolean} Returns \"true\" if any observer has detected changes in\r\n * dimensions of it's elements.\r\n */\r\n ResizeObserverController.prototype.updateObservers_ = function () {\r\n // Collect observers that have active observations.\r\n var activeObservers = this.observers_.filter(function (observer) {\r\n return observer.gatherActive(), observer.hasActive();\r\n });\r\n // Deliver notifications in a separate cycle in order to avoid any\r\n // collisions between observers, e.g. when multiple instances of\r\n // ResizeObserver are tracking the same element and the callback of one\r\n // of them changes content dimensions of the observed target. Sometimes\r\n // this may result in notifications being blocked for the rest of observers.\r\n activeObservers.forEach(function (observer) { return observer.broadcastActive(); });\r\n return activeObservers.length > 0;\r\n };\r\n /**\r\n * Initializes DOM listeners.\r\n *\r\n * @private\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.connect_ = function () {\r\n // Do nothing if running in a non-browser environment or if listeners\r\n // have been already added.\r\n if (!isBrowser || this.connected_) {\r\n return;\r\n }\r\n // Subscription to the \"Transitionend\" event is used as a workaround for\r\n // delayed transitions. This way it's possible to capture at least the\r\n // final state of an element.\r\n document.addEventListener('transitionend', this.onTransitionEnd_);\r\n window.addEventListener('resize', this.refresh);\r\n if (mutationObserverSupported) {\r\n this.mutationsObserver_ = new MutationObserver(this.refresh);\r\n this.mutationsObserver_.observe(document, {\r\n attributes: true,\r\n childList: true,\r\n characterData: true,\r\n subtree: true\r\n });\r\n }\r\n else {\r\n document.addEventListener('DOMSubtreeModified', this.refresh);\r\n this.mutationEventsAdded_ = true;\r\n }\r\n this.connected_ = true;\r\n };\r\n /**\r\n * Removes DOM listeners.\r\n *\r\n * @private\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.disconnect_ = function () {\r\n // Do nothing if running in a non-browser environment or if listeners\r\n // have been already removed.\r\n if (!isBrowser || !this.connected_) {\r\n return;\r\n }\r\n document.removeEventListener('transitionend', this.onTransitionEnd_);\r\n window.removeEventListener('resize', this.refresh);\r\n if (this.mutationsObserver_) {\r\n this.mutationsObserver_.disconnect();\r\n }\r\n if (this.mutationEventsAdded_) {\r\n document.removeEventListener('DOMSubtreeModified', this.refresh);\r\n }\r\n this.mutationsObserver_ = null;\r\n this.mutationEventsAdded_ = false;\r\n this.connected_ = false;\r\n };\r\n /**\r\n * \"Transitionend\" event handler.\r\n *\r\n * @private\r\n * @param {TransitionEvent} event\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.onTransitionEnd_ = function (_a) {\r\n var _b = _a.propertyName, propertyName = _b === void 0 ? '' : _b;\r\n // Detect whether transition may affect dimensions of an element.\r\n var isReflowProperty = transitionKeys.some(function (key) {\r\n return !!~propertyName.indexOf(key);\r\n });\r\n if (isReflowProperty) {\r\n this.refresh();\r\n }\r\n };\r\n /**\r\n * Returns instance of the ResizeObserverController.\r\n *\r\n * @returns {ResizeObserverController}\r\n */\r\n ResizeObserverController.getInstance = function () {\r\n if (!this.instance_) {\r\n this.instance_ = new ResizeObserverController();\r\n }\r\n return this.instance_;\r\n };\r\n /**\r\n * Holds reference to the controller's instance.\r\n *\r\n * @private {ResizeObserverController}\r\n */\r\n ResizeObserverController.instance_ = null;\r\n return ResizeObserverController;\r\n}());\n\n/**\r\n * Defines non-writable/enumerable properties of the provided target object.\r\n *\r\n * @param {Object} target - Object for which to define properties.\r\n * @param {Object} props - Properties to be defined.\r\n * @returns {Object} Target object.\r\n */\r\nvar defineConfigurable = (function (target, props) {\r\n for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {\r\n var key = _a[_i];\r\n Object.defineProperty(target, key, {\r\n value: props[key],\r\n enumerable: false,\r\n writable: false,\r\n configurable: true\r\n });\r\n }\r\n return target;\r\n});\n\n/**\r\n * Returns the global object associated with provided element.\r\n *\r\n * @param {Object} target\r\n * @returns {Object}\r\n */\r\nvar getWindowOf = (function (target) {\r\n // Assume that the element is an instance of Node, which means that it\r\n // has the \"ownerDocument\" property from which we can retrieve a\r\n // corresponding global object.\r\n var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;\r\n // Return the local global object if it's not possible extract one from\r\n // provided element.\r\n return ownerGlobal || global$1;\r\n});\n\n// Placeholder of an empty content rectangle.\r\nvar emptyRect = createRectInit(0, 0, 0, 0);\r\n/**\r\n * Converts provided string to a number.\r\n *\r\n * @param {number|string} value\r\n * @returns {number}\r\n */\r\nfunction toFloat(value) {\r\n return parseFloat(value) || 0;\r\n}\r\n/**\r\n * Extracts borders size from provided styles.\r\n *\r\n * @param {CSSStyleDeclaration} styles\r\n * @param {...string} positions - Borders positions (top, right, ...)\r\n * @returns {number}\r\n */\r\nfunction getBordersSize(styles) {\r\n var positions = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n positions[_i - 1] = arguments[_i];\r\n }\r\n return positions.reduce(function (size, position) {\r\n var value = styles['border-' + position + '-width'];\r\n return size + toFloat(value);\r\n }, 0);\r\n}\r\n/**\r\n * Extracts paddings sizes from provided styles.\r\n *\r\n * @param {CSSStyleDeclaration} styles\r\n * @returns {Object} Paddings box.\r\n */\r\nfunction getPaddings(styles) {\r\n var positions = ['top', 'right', 'bottom', 'left'];\r\n var paddings = {};\r\n for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {\r\n var position = positions_1[_i];\r\n var value = styles['padding-' + position];\r\n paddings[position] = toFloat(value);\r\n }\r\n return paddings;\r\n}\r\n/**\r\n * Calculates content rectangle of provided SVG element.\r\n *\r\n * @param {SVGGraphicsElement} target - Element content rectangle of which needs\r\n * to be calculated.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction getSVGContentRect(target) {\r\n var bbox = target.getBBox();\r\n return createRectInit(0, 0, bbox.width, bbox.height);\r\n}\r\n/**\r\n * Calculates content rectangle of provided HTMLElement.\r\n *\r\n * @param {HTMLElement} target - Element for which to calculate the content rectangle.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction getHTMLElementContentRect(target) {\r\n // Client width & height properties can't be\r\n // used exclusively as they provide rounded values.\r\n var clientWidth = target.clientWidth, clientHeight = target.clientHeight;\r\n // By this condition we can catch all non-replaced inline, hidden and\r\n // detached elements. Though elements with width & height properties less\r\n // than 0.5 will be discarded as well.\r\n //\r\n // Without it we would need to implement separate methods for each of\r\n // those cases and it's not possible to perform a precise and performance\r\n // effective test for hidden elements. E.g. even jQuery's ':visible' filter\r\n // gives wrong results for elements with width & height less than 0.5.\r\n if (!clientWidth && !clientHeight) {\r\n return emptyRect;\r\n }\r\n var styles = getWindowOf(target).getComputedStyle(target);\r\n var paddings = getPaddings(styles);\r\n var horizPad = paddings.left + paddings.right;\r\n var vertPad = paddings.top + paddings.bottom;\r\n // Computed styles of width & height are being used because they are the\r\n // only dimensions available to JS that contain non-rounded values. It could\r\n // be possible to utilize the getBoundingClientRect if only it's data wasn't\r\n // affected by CSS transformations let alone paddings, borders and scroll bars.\r\n var width = toFloat(styles.width), height = toFloat(styles.height);\r\n // Width & height include paddings and borders when the 'border-box' box\r\n // model is applied (except for IE).\r\n if (styles.boxSizing === 'border-box') {\r\n // Following conditions are required to handle Internet Explorer which\r\n // doesn't include paddings and borders to computed CSS dimensions.\r\n //\r\n // We can say that if CSS dimensions + paddings are equal to the \"client\"\r\n // properties then it's either IE, and thus we don't need to subtract\r\n // anything, or an element merely doesn't have paddings/borders styles.\r\n if (Math.round(width + horizPad) !== clientWidth) {\r\n width -= getBordersSize(styles, 'left', 'right') + horizPad;\r\n }\r\n if (Math.round(height + vertPad) !== clientHeight) {\r\n height -= getBordersSize(styles, 'top', 'bottom') + vertPad;\r\n }\r\n }\r\n // Following steps can't be applied to the document's root element as its\r\n // client[Width/Height] properties represent viewport area of the window.\r\n // Besides, it's as well not necessary as the <html> itself neither has\r\n // rendered scroll bars nor it can be clipped.\r\n if (!isDocumentElement(target)) {\r\n // In some browsers (only in Firefox, actually) CSS width & height\r\n // include scroll bars size which can be removed at this step as scroll\r\n // bars are the only difference between rounded dimensions + paddings\r\n // and \"client\" properties, though that is not always true in Chrome.\r\n var vertScrollbar = Math.round(width + horizPad) - clientWidth;\r\n var horizScrollbar = Math.round(height + vertPad) - clientHeight;\r\n // Chrome has a rather weird rounding of \"client\" properties.\r\n // E.g. for an element with content width of 314.2px it sometimes gives\r\n // the client width of 315px and for the width of 314.7px it may give\r\n // 314px. And it doesn't happen all the time. So just ignore this delta\r\n // as a non-relevant.\r\n if (Math.abs(vertScrollbar) !== 1) {\r\n width -= vertScrollbar;\r\n }\r\n if (Math.abs(horizScrollbar) !== 1) {\r\n height -= horizScrollbar;\r\n }\r\n }\r\n return createRectInit(paddings.left, paddings.top, width, height);\r\n}\r\n/**\r\n * Checks whether provided element is an instance of the SVGGraphicsElement.\r\n *\r\n * @param {Element} target - Element to be checked.\r\n * @returns {boolean}\r\n */\r\nvar isSVGGraphicsElement = (function () {\r\n // Some browsers, namely IE and Edge, don't have the SVGGraphicsElement\r\n // interface.\r\n if (typeof SVGGraphicsElement !== 'undefined') {\r\n return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; };\r\n }\r\n // If it's so, then check that element is at least an instance of the\r\n // SVGElement and that it has the \"getBBox\" method.\r\n // eslint-disable-next-line no-extra-parens\r\n return function (target) { return (target instanceof getWindowOf(target).SVGElement &&\r\n typeof target.getBBox === 'function'); };\r\n})();\r\n/**\r\n * Checks whether provided element is a document element (<html>).\r\n *\r\n * @param {Element} target - Element to be checked.\r\n * @returns {boolean}\r\n */\r\nfunction isDocumentElement(target) {\r\n return target === getWindowOf(target).document.documentElement;\r\n}\r\n/**\r\n * Calculates an appropriate content rectangle for provided html or svg element.\r\n *\r\n * @param {Element} target - Element content rectangle of which needs to be calculated.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction getContentRect(target) {\r\n if (!isBrowser) {\r\n return emptyRect;\r\n }\r\n if (isSVGGraphicsElement(target)) {\r\n return getSVGContentRect(target);\r\n }\r\n return getHTMLElementContentRect(target);\r\n}\r\n/**\r\n * Creates rectangle with an interface of the DOMRectReadOnly.\r\n * Spec: https://drafts.fxtf.org/geometry/#domrectreadonly\r\n *\r\n * @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions.\r\n * @returns {DOMRectReadOnly}\r\n */\r\nfunction createReadOnlyRect(_a) {\r\n var x = _a.x, y = _a.y, width = _a.width, height = _a.height;\r\n // If DOMRectReadOnly is available use it as a prototype for the rectangle.\r\n var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object;\r\n var rect = Object.create(Constr.prototype);\r\n // Rectangle's properties are not writable and non-enumerable.\r\n defineConfigurable(rect, {\r\n x: x, y: y, width: width, height: height,\r\n top: y,\r\n right: x + width,\r\n bottom: height + y,\r\n left: x\r\n });\r\n return rect;\r\n}\r\n/**\r\n * Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.\r\n * Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit\r\n *\r\n * @param {number} x - X coordinate.\r\n * @param {number} y - Y coordinate.\r\n * @param {number} width - Rectangle's width.\r\n * @param {number} height - Rectangle's height.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction createRectInit(x, y, width, height) {\r\n return { x: x, y: y, width: width, height: height };\r\n}\n\n/**\r\n * Class that is responsible for computations of the content rectangle of\r\n * provided DOM element and for keeping track of it's changes.\r\n */\r\nvar ResizeObservation = /** @class */ (function () {\r\n /**\r\n * Creates an instance of ResizeObservation.\r\n *\r\n * @param {Element} target - Element to be observed.\r\n */\r\n function ResizeObservation(target) {\r\n /**\r\n * Broadcasted width of content rectangle.\r\n *\r\n * @type {number}\r\n */\r\n this.broadcastWidth = 0;\r\n /**\r\n * Broadcasted height of content rectangle.\r\n *\r\n * @type {number}\r\n */\r\n this.broadcastHeight = 0;\r\n /**\r\n * Reference to the last observed content rectangle.\r\n *\r\n * @private {DOMRectInit}\r\n */\r\n this.contentRect_ = createRectInit(0, 0, 0, 0);\r\n this.target = target;\r\n }\r\n /**\r\n * Updates content rectangle and tells whether it's width or height properties\r\n * have changed since the last broadcast.\r\n *\r\n * @returns {boolean}\r\n */\r\n ResizeObservation.prototype.isActive = function () {\r\n var rect = getContentRect(this.target);\r\n this.contentRect_ = rect;\r\n return (rect.width !== this.broadcastWidth ||\r\n rect.height !== this.broadcastHeight);\r\n };\r\n /**\r\n * Updates 'broadcastWidth' and 'broadcastHeight' properties with a data\r\n * from the corresponding properties of the last observed content rectangle.\r\n *\r\n * @returns {DOMRectInit} Last observed content rectangle.\r\n */\r\n ResizeObservation.prototype.broadcastRect = function () {\r\n var rect = this.contentRect_;\r\n this.broadcastWidth = rect.width;\r\n this.broadcastHeight = rect.height;\r\n return rect;\r\n };\r\n return ResizeObservation;\r\n}());\n\nvar ResizeObserverEntry = /** @class */ (function () {\r\n /**\r\n * Creates an instance of ResizeObserverEntry.\r\n *\r\n * @param {Element} target - Element that is being observed.\r\n * @param {DOMRectInit} rectInit - Data of the element's content rectangle.\r\n */\r\n function ResizeObserverEntry(target, rectInit) {\r\n var contentRect = createReadOnlyRect(rectInit);\r\n // According to the specification following properties are not writable\r\n // and are also not enumerable in the native implementation.\r\n //\r\n // Property accessors are not being used as they'd require to define a\r\n // private WeakMap storage which may cause memory leaks in browsers that\r\n // don't support this type of collections.\r\n defineConfigurable(this, { target: target, contentRect: contentRect });\r\n }\r\n return ResizeObserverEntry;\r\n}());\n\nvar ResizeObserverSPI = /** @class */ (function () {\r\n /**\r\n * Creates a new instance of ResizeObserver.\r\n *\r\n * @param {ResizeObserverCallback} callback - Callback function that is invoked\r\n * when one of the observed elements changes it's content dimensions.\r\n * @param {ResizeObserverController} controller - Controller instance which\r\n * is responsible for the updates of observer.\r\n * @param {ResizeObserver} callbackCtx - Reference to the public\r\n * ResizeObserver instance which will be passed to callback function.\r\n */\r\n function ResizeObserverSPI(callback, controller, callbackCtx) {\r\n /**\r\n * Collection of resize observations that have detected changes in dimensions\r\n * of elements.\r\n *\r\n * @private {Array<ResizeObservation>}\r\n */\r\n this.activeObservations_ = [];\r\n /**\r\n * Registry of the ResizeObservation instances.\r\n *\r\n * @private {Map<Element, ResizeObservation>}\r\n */\r\n this.observations_ = new MapShim();\r\n if (typeof callback !== 'function') {\r\n throw new TypeError('The callback provided as parameter 1 is not a function.');\r\n }\r\n this.callback_ = callback;\r\n this.controller_ = controller;\r\n this.callbackCtx_ = callbackCtx;\r\n }\r\n /**\r\n * Starts observing provided element.\r\n *\r\n * @param {Element} target - Element to be observed.\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.observe = function (target) {\r\n if (!arguments.length) {\r\n throw new TypeError('1 argument required, but only 0 present.');\r\n }\r\n // Do nothing if current environment doesn't have the Element interface.\r\n if (typeof Element === 'undefined' || !(Element instanceof Object)) {\r\n return;\r\n }\r\n if (!(target instanceof getWindowOf(target).Element)) {\r\n throw new TypeError('parameter 1 is not of type \"Element\".');\r\n }\r\n var observations = this.observations_;\r\n // Do nothing if element is already being observed.\r\n if (observations.has(target)) {\r\n return;\r\n }\r\n observations.set(target, new ResizeObservation(target));\r\n this.controller_.addObserver(this);\r\n // Force the update of observations.\r\n this.controller_.refresh();\r\n };\r\n /**\r\n * Stops observing provided element.\r\n *\r\n * @param {Element} target - Element to stop observing.\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.unobserve = function (target) {\r\n if (!arguments.length) {\r\n throw new TypeError('1 argument required, but only 0 present.');\r\n }\r\n // Do nothing if current environment doesn't have the Element interface.\r\n if (typeof Element === 'undefined' || !(Element instanceof Object)) {\r\n return;\r\n }\r\n if (!(target instanceof getWindowOf(target).Element)) {\r\n throw new TypeError('parameter 1 is not of type \"Element\".');\r\n }\r\n var observations = this.observations_;\r\n // Do nothing if element is not being observed.\r\n if (!observations.has(target)) {\r\n return;\r\n }\r\n observations.delete(target);\r\n if (!observations.size) {\r\n this.controller_.removeObserver(this);\r\n }\r\n };\r\n /**\r\n * Stops observing all elements.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.disconnect = function () {\r\n this.clearActive();\r\n this.observations_.clear();\r\n this.controller_.removeObserver(this);\r\n };\r\n /**\r\n * Collects observation instances the associated element of which has changed\r\n * it's content rectangle.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.gatherActive = function () {\r\n var _this = this;\r\n this.clearActive();\r\n this.observations_.forEach(function (observation) {\r\n if (observation.isActive()) {\r\n _this.activeObservations_.push(observation);\r\n }\r\n });\r\n };\r\n /**\r\n * Invokes initial callback function with a list of ResizeObserverEntry\r\n * instances collected from active resize observations.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.broadcastActive = function () {\r\n // Do nothing if observer doesn't have active observations.\r\n if (!this.hasActive()) {\r\n return;\r\n }\r\n var ctx = this.callbackCtx_;\r\n // Create ResizeObserverEntry instance for every active observation.\r\n var entries = this.activeObservations_.map(function (observation) {\r\n return new ResizeObserverEntry(observation.target, observation.broadcastRect());\r\n });\r\n this.callback_.call(ctx, entries, ctx);\r\n this.clearActive();\r\n };\r\n /**\r\n * Clears the collection of active observations.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.clearActive = function () {\r\n this.activeObservations_.splice(0);\r\n };\r\n /**\r\n * Tells whether observer has active observations.\r\n *\r\n * @returns {boolean}\r\n */\r\n ResizeObserverSPI.prototype.hasActive = function () {\r\n return this.activeObservations_.length > 0;\r\n };\r\n return ResizeObserverSPI;\r\n}());\n\n// Registry of internal observers. If WeakMap is not available use current shim\r\n// for the Map collection as it has all required methods and because WeakMap\r\n// can't be fully polyfilled anyway.\r\nvar observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim();\r\n/**\r\n * ResizeObserver API. Encapsulates the ResizeObserver SPI implementation\r\n * exposing only those methods and properties that are defined in the spec.\r\n */\r\nvar ResizeObserver = /** @class */ (function () {\r\n /**\r\n * Creates a new instance of ResizeObserver.\r\n *\r\n * @param {ResizeObserverCallback} callback - Callback that is invoked when\r\n * dimensions of the observed elements change.\r\n */\r\n function ResizeObserver(callback) {\r\n if (!(this instanceof ResizeObserver)) {\r\n throw new TypeError('Cannot call a class as a function.');\r\n }\r\n if (!arguments.length) {\r\n throw new TypeError('1 argument required, but only 0 present.');\r\n }\r\n var controller = ResizeObserverController.getInstance();\r\n var observer = new ResizeObserverSPI(callback, controller, this);\r\n observers.set(this, observer);\r\n }\r\n return ResizeObserver;\r\n}());\r\n// Expose public methods of ResizeObserver.\r\n[\r\n 'observe',\r\n 'unobserve',\r\n 'disconnect'\r\n].forEach(function (method) {\r\n ResizeObserver.prototype[method] = function () {\r\n var _a;\r\n return (_a = observers.get(this))[method].apply(_a, arguments);\r\n };\r\n});\n\nvar index = (function () {\r\n // Export existing implementation if available.\r\n if (typeof global$1.ResizeObserver !== 'undefined') {\r\n return global$1.ResizeObserver;\r\n }\r\n return ResizeObserver;\r\n})();\n\nexport default index;\n"],"names":["block","cn","prepareRoleListValue","roles","otherMembers","arguments","length","undefined","current","toAdd","toRemove","unrecognized","forEach_","item","isUnrecognized","isRequested","isApproved","isDepriving","push","currentArr","map","prepareItemOfCurrent","otherArr","title","data","frozen","newItems","concat","itemClassName","role","extraProps","_objectSpread","text","value","roleListValueToSubjectList","_toConsumableArray","manyListDataItemToSubjectList","manyListDataItem","map_","filter_","_ref2","removed","_ref3","_ref4","type","extractChangedSubjects","added","filter","_ref5","_ref6","user","group","_ref7","_ref8","DialogError","props","_jsx","Block","className","makeErrorFields","errors","compact_","error","index","name","extras","children","FORM_ERROR","makeFormSubmitError","validationErrors","_defineProperty","importYTDFDialog","Component","YTDFDialog","withLazyLoading","React","_asyncToGenerator","_regeneratorRuntime","_callee","_context","prev","next","t0","sent","YTDialog","abrupt","stop","_React$useState","_React$useState2","_slicedToArray","mounted","setMounted","visible","_callee2","_context2","RoleListControl","EditableList","_callee3","_context3","TabFieldVertical","_callee4","_context4","typedMemo","ErrorBoundary","constructor","super","this","state","resetError","setState","getDerivedStateFromError","componentDidCatch","_a","_b","onError","call","componentDidUpdate","prevProps","code","NO_DATA","render","message","i18n","toString","getErrorMessage","renderError","b","renderPluginLoader","pluginLoader","Object","assign","ChartKitComponent","widgetRef","instanceRef","id","propsId","isMobile","restProps","ckId","lang","settings","get","plugin","find","iteratedPlugin","UNKNOWN_PLUGIN","ChartComponent","renderer","reflow","details","fallback","mobile","ref","YagrPlugin","set","plugins","COLORS","getSerieColor","serieIndex","useResizeObserver","_ref","element","onResize","observer","ResizeObserver","observe","unobserve","getPointValue","$type","Number","$value","$rawValue","splitDataByColor","rows","colorFieldName","xFieldName","yFieldName","xFieldPath","colorFieldPath","transform_","groupBy_","result","key","acc","y","x","point","Array","isArray","getVisualizationPlaceholders","visualization","placeholders","reduce","placeholder","xPlaceholder","yPlaceholder","colorPlaceholder","prepareWidgetData","args","d3Config","visualizationId","chartSettings","xAxisIsLegendEnabled","xAxis","legend","xAxisEnableLabels","labels","xAxisTitle","xAxisPixelInterval","pixelInterval","yAxisEnableLabels","yAxis","yAxisTitle","yAxisGridEnabled","grid","yAxisPixelInterval","tooltip","enabled","ticks","lineColor","series","options","barMaxWidth","barPadding","groupPadding","dataSorting","direction","line","lineWidth","chart","margin","top","left","right","bottom","buildD3Config","_getVisualizationPlac","field","colorField","xField","yField","row","prepareScatter","stacking","categories","uniq_","prepareColoredSeriesData","_result$graphs","xValues","dataMatrix","forEach","xValue","from","Set","graphs","graph","String","prepareSeriesData","prepareBar","merge_","placeholdersToMap","Map","lineAndBarValidation","queryResult","fields","invalid","xCoords","some","isXValueDuplicated","scatterValidation","hashes","isPointsDuplicated","yValue","hash","objectHash","isPointDuplicated","selectQueryResultVisualization","queryTracker","queryChart","selectQueryResultVisualizationPlaceholders","selectQueryResultChartSettings","selectQueryResultChartSaved","saved","selectQueryResult","createSelector","getQueryDraft","getQueryResultsState","draft","results","selectAvailableFields","keys","resultsPlaceholdersValidation","_placeholders$find","Boolean","newObject","lineHash","isLineDuplicated","colorsValidation","selectIsPlaceholdersFieldsFilled","every","EmptyPlaceholdersMessage","D3Plugin","BaseChart","useSelector","fieldsIsFilled","widgetData","useMemo","ChartKit","Chart","xmlns","width","height","fill","viewBox","fillRule","d","clipRule","ChartFieldName","fieldName","placeholderId","onRemove","_jsxs","Button","onClick","Icon","XmarkIcon","size","ChartField","availableFields","dispatch","useDispatch","handleRemoveField","useCallback","removeField","onSelectUpdate","setField","Select","filterable","content","onUpdate","renderControl","PlusIcon","ChartFields","pixelIntervalValidator","test","label","caption","validator","ChartSettingsComponent","_useToggle","useToggle","_useToggle2","toggleVisibility","handleOnAdd","form","setChartSettings","getState","values","Promise","resolve","Gear","initialValues","onClose","onAdd","VisualizationSelector","setVisualization","SavingIndicator","tooltipContent","Tooltip","saving","CircleCheck","ArrowsRotateRight","ALERT_PROPS","theme","dangerouslySetInnerHTML","__html","icon","ChartValidation","_placeholdersValidati","_placeholdersValidati2","_useState","useState","_useState2","isErrorHidden","hideError","placeholdersValidation","showSmallAlert","_Fragment","Alert","actions","Actions","QueryResultsVisualization","_containerRef$current","query","containerRef","chartKitRef","useEffect","saveQueryChartConfig","queryId","debouncedChartResize","throttle_","_chartKitRef$current","i18nFactory","registerKeysets","bind","CHARTKIT_ERROR_CODE","INVALID_DATA","UNKNOWN","TOO_MANY_LINES","ChartKitError","Error","originalError","isCustomError","stack","mergeSettingStrategy","objValue","srcValue","currentPlugins","newPlugins","newSettingsPlugins","currentPlugin","newPluginIndex","findIndex","newPlugin","splice","settingsEventEmitter","events","on","event","off","eventId","action","updateLang","configure","setLang","updates","filteredUpdates","entries","withNaming","e","m","n","getRandomCKId","chars","i","Math","floor","random","randomString","clipPath","AlertContext","useAlertContext","context","AlertAction","view","bAlert","AlertContextProvider","layout","Provider","typeToIcon","danger","filled","outlined","info","CircleInfo","success","warning","TriangleExclamation","utility","Thunderbolt","normal","addComponentKeysets","en","corners","style","align","qa","Card","spacing","py","px","Flex","gap","alignItems","grow","justifyContent","Title","items","I","Xmark","colorText","color","iconByTheme","Text","variant","minContent","wrap","handler","Action","disabled","selected","isTypeSelection","isTypeContainer","isClickable","defaultTheme","defaultView","handleClick","onKeyDown","useActionHandlers","Box","clickable","tabIndex","DEFAULT_PLACEMENT","placement","disablePortal","contentClassName","openDelay","closeDelay","anchorElement","setAnchorElement","tooltipVisible","useTooltipVisible","preventTriggerOnFocus","child","only","childRef","useForkRef","Popup","open","anchorRef","disableEscapeKeyDown","disableOutsideClick","disableLayer","anchor","showTooltip","hideTooltip","initialState","setValue","val","useBoolean","timeoutRef","isFocusWithinRef","addEventListener","handleMouseEnter","handleMouseLeave","handleKeyDown","handleFocusWithin","handleBlurWithin","removeEventListener","clearTimeout","window","setTimeout","document","activeElement","target","currentTarget","contains","relatedTarget","ESCAPE","toggleReducer","nextValue","initialValue","useReducer","MapShim","getIndex","arr","entry","class_1","__entries__","defineProperty","prototype","enumerable","configurable","delete","has","clear","callback","ctx","_i","isBrowser","global$1","g","self","Function","requestAnimationFrame$1","requestAnimationFrame","Date","now","transitionKeys","mutationObserverSupported","MutationObserver","ResizeObserverController","connected_","mutationEventsAdded_","mutationsObserver_","observers_","onTransitionEnd_","refresh","delay","leadingCall","trailingCall","lastCallTime","resolvePending","proxy","timeoutCallback","timeStamp","throttle","addObserver","indexOf","connect_","removeObserver","observers","disconnect_","updateObservers_","activeObservers","gatherActive","hasActive","broadcastActive","attributes","childList","characterData","subtree","disconnect","propertyName","getInstance","instance_","defineConfigurable","writable","getWindowOf","ownerDocument","emptyRect","createRectInit","toFloat","parseFloat","getBordersSize","styles","positions","position","isSVGGraphicsElement","SVGGraphicsElement","SVGElement","getBBox","getContentRect","bbox","getSVGContentRect","clientWidth","clientHeight","getComputedStyle","paddings","positions_1","getPaddings","horizPad","vertPad","boxSizing","round","documentElement","isDocumentElement","vertScrollbar","horizScrollbar","abs","getHTMLElementContentRect","ResizeObservation","broadcastWidth","broadcastHeight","contentRect_","isActive","rect","broadcastRect","ResizeObserverEntry","rectInit","Constr","contentRect","DOMRectReadOnly","create","ResizeObserverSPI","controller","callbackCtx","activeObservations_","observations_","TypeError","callback_","controller_","callbackCtx_","Element","observations","clearActive","_this","observation","WeakMap","method","apply"],"sourceRoot":""}
|