@dr.pogodin/react-utils 1.46.1 → 1.46.3
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/bin/build.js +8 -5
- package/build/development/shared/components/Button/index.js +10 -1
- package/build/development/shared/components/Button/index.js.map +1 -1
- package/build/development/web.bundle.js +1 -1
- package/build/production/shared/components/Button/index.js +6 -1
- package/build/production/shared/components/Button/index.js.map +1 -1
- package/build/production/web.bundle.js +1 -1
- package/build/production/web.bundle.js.map +1 -1
- package/build/types-code/shared/components/Button/index.d.ts +1 -0
- package/package.json +15 -15
- package/src/shared/components/Button/index.tsx +10 -0
- package/tstyche.config.json +1 -1
package/bin/build.js
CHANGED
|
@@ -63,6 +63,7 @@ program
|
|
|
63
63
|
.option('-i, --in-dir <path>', 'input folder for the build', 'src')
|
|
64
64
|
.option('--lib', 'library build', false)
|
|
65
65
|
.option('--no-babel', 'opts out the Babel (server-side code) build')
|
|
66
|
+
.option('--no-webpack', 'opts out the Webpack (client-side code) build')
|
|
66
67
|
.option('-o, --out-dir <path>', 'output folder for the build', 'build')
|
|
67
68
|
.option('-w, --watch', 'build, watch, and rebuild on source changes')
|
|
68
69
|
.option(
|
|
@@ -165,11 +166,13 @@ function handleWebpackCompilationResults(error, stats) {
|
|
|
165
166
|
);
|
|
166
167
|
}
|
|
167
168
|
|
|
168
|
-
if (cmdLineArgs.
|
|
169
|
-
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
|
|
169
|
+
if (cmdLineArgs.webpack) {
|
|
170
|
+
if (cmdLineArgs.watch) {
|
|
171
|
+
webpackCompiler.watch({}, handleWebpackCompilationResults);
|
|
172
|
+
} else {
|
|
173
|
+
webpackCompiler.run(handleWebpackCompilationResults);
|
|
174
|
+
webpackCompiler.close(() => null);
|
|
175
|
+
}
|
|
173
176
|
}
|
|
174
177
|
|
|
175
178
|
/* ************************************************************************** */
|
|
@@ -22,6 +22,7 @@ const BaseButton = ({
|
|
|
22
22
|
children,
|
|
23
23
|
disabled,
|
|
24
24
|
enforceA,
|
|
25
|
+
keepScrollPosition,
|
|
25
26
|
onClick,
|
|
26
27
|
onKeyDown: onKeyDownProp,
|
|
27
28
|
onKeyUp,
|
|
@@ -55,7 +56,15 @@ const BaseButton = ({
|
|
|
55
56
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Link.default, {
|
|
56
57
|
className: className,
|
|
57
58
|
"data-testid": process.env.NODE_ENV === 'production' ? undefined : testId,
|
|
58
|
-
enforceA: enforceA
|
|
59
|
+
enforceA: enforceA
|
|
60
|
+
|
|
61
|
+
// TODO: This was exposed as a hotifx... however, I guess we better want
|
|
62
|
+
// to check if the `to` URL contains an anchor (#), and if it does we should
|
|
63
|
+
// automatically opt to keep the position here; and enforce <a> (as
|
|
64
|
+
// react-router link does not seem to respect the hash tag either,
|
|
65
|
+
// at least not without some additional settings).
|
|
66
|
+
,
|
|
67
|
+
keepScrollPosition: keepScrollPosition,
|
|
59
68
|
onClick: onClick
|
|
60
69
|
|
|
61
70
|
// TODO: For now, the `onKeyDown` handler is not passed to the <Link>,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_reactThemes","_interopRequireDefault","require","_Link","_jsxRuntime","defaultTheme","BaseButton","active","children","disabled","enforceA","onClick","onKeyDown","onKeyDownProp","onKeyUp","onMouseDown","onMouseUp","onPointerDown","onPointerUp","openNewTab","replace","testId","theme","to","className","button","jsx","process","env","NODE_ENV","undefined","e","key","default","role","tabIndex","exports","_default","themed"],"sources":["../../../../../src/shared/components/Button/index.tsx"],"sourcesContent":["// The <Button> component implements a standard button / button-like link.\n\nimport type {\n FunctionComponent,\n KeyboardEventHandler,\n MouseEventHandler,\n PointerEventHandler,\n ReactNode,\n} from 'react';\n\nimport themed, { type Theme } from '@dr.pogodin/react-themes';\n\nimport Link from 'components/Link';\n\nimport defaultTheme from './style.scss';\n\ntype PropsT = {\n active?: boolean;\n children?: ReactNode;\n disabled?: boolean;\n enforceA?: boolean;\n onClick?: MouseEventHandler & KeyboardEventHandler;\n onKeyDown?: KeyboardEventHandler;\n onKeyUp?: KeyboardEventHandler;\n onMouseDown?: MouseEventHandler;\n onMouseUp?: MouseEventHandler;\n onPointerDown?: PointerEventHandler;\n onPointerUp?: PointerEventHandler;\n openNewTab?: boolean;\n replace?: boolean;\n testId?: string;\n theme: Theme<'active' | 'button' | 'disabled'>;\n // TODO: It needs a more precise typing of the object option.\n to?: object | string;\n};\n\nexport const BaseButton: FunctionComponent<PropsT> = ({\n active,\n children,\n disabled,\n enforceA,\n onClick,\n onKeyDown: onKeyDownProp,\n onKeyUp,\n onMouseDown,\n onMouseUp,\n onPointerDown,\n onPointerUp,\n openNewTab,\n replace,\n testId,\n theme,\n to,\n}) => {\n let className = theme.button;\n if (active && theme.active) className += ` ${theme.active}`;\n if (disabled) {\n if (theme.disabled) className += ` ${theme.disabled}`;\n return (\n <div\n className={className}\n data-testid={process.env.NODE_ENV === 'production' ? undefined : testId}\n >\n {children}\n </div>\n );\n }\n\n let onKeyDown = onKeyDownProp;\n if (!onKeyDown && onClick) {\n onKeyDown = (e) => {\n if (e.key === 'Enter') onClick(e);\n };\n }\n\n if (to) {\n return (\n <Link\n className={className}\n data-testid={process.env.NODE_ENV === 'production' ? undefined : testId}\n enforceA={enforceA}\n onClick={onClick}\n\n // TODO: For now, the `onKeyDown` handler is not passed to the <Link>,\n // as <Link> component does not call it anyway, presumably due to\n // the inner implementation details. We should look into supporting it:\n // https://github.com/birdofpreyru/react-utils/issues/444\n // onKeyDown={onKeyDown}\n\n onKeyUp={onKeyUp}\n onMouseDown={onMouseDown}\n onMouseUp={onMouseUp}\n onPointerDown={onPointerDown}\n onPointerUp={onPointerUp}\n openNewTab={openNewTab}\n replace={replace}\n to={to}\n >\n {children}\n </Link>\n );\n }\n\n return (\n <div\n className={className}\n data-testid={process.env.NODE_ENV === 'production' ? undefined : testId}\n onClick={onClick}\n onKeyDown={onKeyDown}\n onKeyUp={onKeyUp}\n onMouseDown={onMouseDown}\n onMouseUp={onMouseUp}\n onPointerDown={onPointerDown}\n onPointerUp={onPointerUp}\n role=\"button\"\n tabIndex={0}\n >\n {children}\n </div>\n );\n};\n\n/**\n * Button component theme: a map of CSS\n * class names to append to button elements:\n * @prop {string} [active] to the root element of active button.\n * @prop {string} [button] to the root element of any button.\n * @prop {string} [disabled] to the root element of disabled button.\n */\nexport default themed(BaseButton, 'Button', defaultTheme);\n"],"mappings":";;;;;;;AAUA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,KAAA,GAAAF,sBAAA,CAAAC,OAAA;AAAmC,IAAAE,WAAA,GAAAF,OAAA;AAZnC;AAAA,MAAAG,YAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;
|
|
1
|
+
{"version":3,"file":"index.js","names":["_reactThemes","_interopRequireDefault","require","_Link","_jsxRuntime","defaultTheme","BaseButton","active","children","disabled","enforceA","keepScrollPosition","onClick","onKeyDown","onKeyDownProp","onKeyUp","onMouseDown","onMouseUp","onPointerDown","onPointerUp","openNewTab","replace","testId","theme","to","className","button","jsx","process","env","NODE_ENV","undefined","e","key","default","role","tabIndex","exports","_default","themed"],"sources":["../../../../../src/shared/components/Button/index.tsx"],"sourcesContent":["// The <Button> component implements a standard button / button-like link.\n\nimport type {\n FunctionComponent,\n KeyboardEventHandler,\n MouseEventHandler,\n PointerEventHandler,\n ReactNode,\n} from 'react';\n\nimport themed, { type Theme } from '@dr.pogodin/react-themes';\n\nimport Link from 'components/Link';\n\nimport defaultTheme from './style.scss';\n\ntype PropsT = {\n active?: boolean;\n children?: ReactNode;\n disabled?: boolean;\n enforceA?: boolean;\n keepScrollPosition?: boolean;\n onClick?: MouseEventHandler & KeyboardEventHandler;\n onKeyDown?: KeyboardEventHandler;\n onKeyUp?: KeyboardEventHandler;\n onMouseDown?: MouseEventHandler;\n onMouseUp?: MouseEventHandler;\n onPointerDown?: PointerEventHandler;\n onPointerUp?: PointerEventHandler;\n openNewTab?: boolean;\n replace?: boolean;\n testId?: string;\n theme: Theme<'active' | 'button' | 'disabled'>;\n // TODO: It needs a more precise typing of the object option.\n to?: object | string;\n};\n\nexport const BaseButton: FunctionComponent<PropsT> = ({\n active,\n children,\n disabled,\n enforceA,\n keepScrollPosition,\n onClick,\n onKeyDown: onKeyDownProp,\n onKeyUp,\n onMouseDown,\n onMouseUp,\n onPointerDown,\n onPointerUp,\n openNewTab,\n replace,\n testId,\n theme,\n to,\n}) => {\n let className = theme.button;\n if (active && theme.active) className += ` ${theme.active}`;\n if (disabled) {\n if (theme.disabled) className += ` ${theme.disabled}`;\n return (\n <div\n className={className}\n data-testid={process.env.NODE_ENV === 'production' ? undefined : testId}\n >\n {children}\n </div>\n );\n }\n\n let onKeyDown = onKeyDownProp;\n if (!onKeyDown && onClick) {\n onKeyDown = (e) => {\n if (e.key === 'Enter') onClick(e);\n };\n }\n\n if (to) {\n return (\n <Link\n className={className}\n data-testid={process.env.NODE_ENV === 'production' ? undefined : testId}\n enforceA={enforceA}\n\n // TODO: This was exposed as a hotifx... however, I guess we better want\n // to check if the `to` URL contains an anchor (#), and if it does we should\n // automatically opt to keep the position here; and enforce <a> (as\n // react-router link does not seem to respect the hash tag either,\n // at least not without some additional settings).\n keepScrollPosition={keepScrollPosition}\n\n onClick={onClick}\n\n // TODO: For now, the `onKeyDown` handler is not passed to the <Link>,\n // as <Link> component does not call it anyway, presumably due to\n // the inner implementation details. We should look into supporting it:\n // https://github.com/birdofpreyru/react-utils/issues/444\n // onKeyDown={onKeyDown}\n\n onKeyUp={onKeyUp}\n onMouseDown={onMouseDown}\n onMouseUp={onMouseUp}\n onPointerDown={onPointerDown}\n onPointerUp={onPointerUp}\n openNewTab={openNewTab}\n replace={replace}\n to={to}\n >\n {children}\n </Link>\n );\n }\n\n return (\n <div\n className={className}\n data-testid={process.env.NODE_ENV === 'production' ? undefined : testId}\n onClick={onClick}\n onKeyDown={onKeyDown}\n onKeyUp={onKeyUp}\n onMouseDown={onMouseDown}\n onMouseUp={onMouseUp}\n onPointerDown={onPointerDown}\n onPointerUp={onPointerUp}\n role=\"button\"\n tabIndex={0}\n >\n {children}\n </div>\n );\n};\n\n/**\n * Button component theme: a map of CSS\n * class names to append to button elements:\n * @prop {string} [active] to the root element of active button.\n * @prop {string} [button] to the root element of any button.\n * @prop {string} [disabled] to the root element of disabled button.\n */\nexport default themed(BaseButton, 'Button', defaultTheme);\n"],"mappings":";;;;;;;AAUA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,KAAA,GAAAF,sBAAA,CAAAC,OAAA;AAAmC,IAAAE,WAAA,GAAAF,OAAA;AAZnC;AAAA,MAAAG,YAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAqCO,MAAMC,UAAqC,GAAGA,CAAC;EACpDC,MAAM;EACNC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,kBAAkB;EAClBC,OAAO;EACPC,SAAS,EAAEC,aAAa;EACxBC,OAAO;EACPC,WAAW;EACXC,SAAS;EACTC,aAAa;EACbC,WAAW;EACXC,UAAU;EACVC,OAAO;EACPC,MAAM;EACNC,KAAK;EACLC;AACF,CAAC,KAAK;EACJ,IAAIC,SAAS,GAAGF,KAAK,CAACG,MAAM;EAC5B,IAAInB,MAAM,IAAIgB,KAAK,CAAChB,MAAM,EAAEkB,SAAS,IAAI,IAAIF,KAAK,CAAChB,MAAM,EAAE;EAC3D,IAAIE,QAAQ,EAAE;IACZ,IAAIc,KAAK,CAACd,QAAQ,EAAEgB,SAAS,IAAI,IAAIF,KAAK,CAACd,QAAQ,EAAE;IACrD,oBACE,IAAAL,WAAA,CAAAuB,GAAA;MACEF,SAAS,EAAEA,SAAU;MACrB,eAAaG,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,GAAGC,SAAS,GAAGT,MAAO;MAAAd,QAAA,EAEvEA;IAAQ,CACN,CAAC;EAEV;EAEA,IAAIK,S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ED;AACA;AACA;AACA;AACA;AACA;AACA;AANA6B,OAAA,CAAA/B,UAAA,GAAAA,UAAA;AAAA,IAAAgC,QAAA,GAAAD,OAAA,CAAAH,OAAA,GAOe,IAAAK,oBAAM,EAACjC,UAAU,EAAE,QAAQ,EAAED,YAAY,CAAC","ignoreList":[]}
|
|
@@ -76,7 +76,7 @@ eval("{var __dirname = \"/\";\n__webpack_require__.r(__webpack_exports__);\n/* h
|
|
|
76
76
|
\************************************************/
|
|
77
77
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
78
78
|
|
|
79
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ BaseButton: function() { return /* binding */ BaseButton; }\n/* harmony export */ });\n/* harmony import */ var _dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @dr.pogodin/react-themes */ \"@dr.pogodin/react-themes\");\n/* harmony import */ var _dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Link__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Link */ \"./src/shared/components/Link.tsx\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./style.scss */ \"./src/shared/components/Button/style.scss\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n// The <Button> component implements a standard button / button-like link.\n\n\n\n\n\nconst BaseButton = ({\n active,\n children,\n disabled,\n enforceA,\n onClick,\n onKeyDown: onKeyDownProp,\n onKeyUp,\n onMouseDown,\n onMouseUp,\n onPointerDown,\n onPointerUp,\n openNewTab,\n replace,\n testId,\n theme,\n to\n}) => {\n let className = theme.button;\n if (active && theme.active) className += ` ${theme.active}`;\n if (disabled) {\n if (theme.disabled) className += ` ${theme.disabled}`;\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"div\", {\n className: className,\n \"data-testid\": false ? 0 : testId,\n children: children\n });\n }\n let onKeyDown = onKeyDownProp;\n if (!onKeyDown && onClick) {\n onKeyDown = e => {\n if (e.key === 'Enter') onClick(e);\n };\n }\n if (to) {\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_Link__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n className: className,\n \"data-testid\": false ? 0 : testId,\n enforceA: enforceA,\n onClick: onClick\n\n // TODO: For now, the `onKeyDown` handler is not passed to the <Link>,\n // as <Link> component does not call it anyway, presumably due to\n // the inner implementation details. We should look into supporting it:\n // https://github.com/birdofpreyru/react-utils/issues/444\n // onKeyDown={onKeyDown}\n ,\n\n onKeyUp: onKeyUp,\n onMouseDown: onMouseDown,\n onMouseUp: onMouseUp,\n onPointerDown: onPointerDown,\n onPointerUp: onPointerUp,\n openNewTab: openNewTab,\n replace: replace,\n to: to,\n children: children\n });\n }\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"div\", {\n className: className,\n \"data-testid\": false ? 0 : testId,\n onClick: onClick,\n onKeyDown: onKeyDown,\n onKeyUp: onKeyUp,\n onMouseDown: onMouseDown,\n onMouseUp: onMouseUp,\n onPointerDown: onPointerDown,\n onPointerUp: onPointerUp,\n role: \"button\",\n tabIndex: 0,\n children: children\n });\n};\n\n/**\n * Button component theme: a map of CSS\n * class names to append to button elements:\n * @prop {string} [active] to the root element of active button.\n * @prop {string} [button] to the root element of any button.\n * @prop {string} [disabled] to the root element of disabled button.\n */\n/* harmony default export */ __webpack_exports__[\"default\"] = (_dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_0___default()(BaseButton, 'Button', _style_scss__WEBPACK_IMPORTED_MODULE_2__[\"default\"]));\n\n//# sourceURL=webpack://@dr.pogodin/react-utils/./src/shared/components/Button/index.tsx?\n}");
|
|
79
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ BaseButton: function() { return /* binding */ BaseButton; }\n/* harmony export */ });\n/* harmony import */ var _dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @dr.pogodin/react-themes */ \"@dr.pogodin/react-themes\");\n/* harmony import */ var _dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Link__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Link */ \"./src/shared/components/Link.tsx\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./style.scss */ \"./src/shared/components/Button/style.scss\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n// The <Button> component implements a standard button / button-like link.\n\n\n\n\n\nconst BaseButton = ({\n active,\n children,\n disabled,\n enforceA,\n keepScrollPosition,\n onClick,\n onKeyDown: onKeyDownProp,\n onKeyUp,\n onMouseDown,\n onMouseUp,\n onPointerDown,\n onPointerUp,\n openNewTab,\n replace,\n testId,\n theme,\n to\n}) => {\n let className = theme.button;\n if (active && theme.active) className += ` ${theme.active}`;\n if (disabled) {\n if (theme.disabled) className += ` ${theme.disabled}`;\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"div\", {\n className: className,\n \"data-testid\": false ? 0 : testId,\n children: children\n });\n }\n let onKeyDown = onKeyDownProp;\n if (!onKeyDown && onClick) {\n onKeyDown = e => {\n if (e.key === 'Enter') onClick(e);\n };\n }\n if (to) {\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_Link__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n className: className,\n \"data-testid\": false ? 0 : testId,\n enforceA: enforceA\n\n // TODO: This was exposed as a hotifx... however, I guess we better want\n // to check if the `to` URL contains an anchor (#), and if it does we should\n // automatically opt to keep the position here; and enforce <a> (as\n // react-router link does not seem to respect the hash tag either,\n // at least not without some additional settings).\n ,\n keepScrollPosition: keepScrollPosition,\n onClick: onClick\n\n // TODO: For now, the `onKeyDown` handler is not passed to the <Link>,\n // as <Link> component does not call it anyway, presumably due to\n // the inner implementation details. We should look into supporting it:\n // https://github.com/birdofpreyru/react-utils/issues/444\n // onKeyDown={onKeyDown}\n ,\n\n onKeyUp: onKeyUp,\n onMouseDown: onMouseDown,\n onMouseUp: onMouseUp,\n onPointerDown: onPointerDown,\n onPointerUp: onPointerUp,\n openNewTab: openNewTab,\n replace: replace,\n to: to,\n children: children\n });\n }\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"div\", {\n className: className,\n \"data-testid\": false ? 0 : testId,\n onClick: onClick,\n onKeyDown: onKeyDown,\n onKeyUp: onKeyUp,\n onMouseDown: onMouseDown,\n onMouseUp: onMouseUp,\n onPointerDown: onPointerDown,\n onPointerUp: onPointerUp,\n role: \"button\",\n tabIndex: 0,\n children: children\n });\n};\n\n/**\n * Button component theme: a map of CSS\n * class names to append to button elements:\n * @prop {string} [active] to the root element of active button.\n * @prop {string} [button] to the root element of any button.\n * @prop {string} [disabled] to the root element of disabled button.\n */\n/* harmony default export */ __webpack_exports__[\"default\"] = (_dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_0___default()(BaseButton, 'Button', _style_scss__WEBPACK_IMPORTED_MODULE_2__[\"default\"]));\n\n//# sourceURL=webpack://@dr.pogodin/react-utils/./src/shared/components/Button/index.tsx?\n}");
|
|
80
80
|
|
|
81
81
|
/***/ }),
|
|
82
82
|
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=exports.BaseButton=void 0;var _reactThemes=_interopRequireDefault(require("@dr.pogodin/react-themes"));var _Link=_interopRequireDefault(require("../Link"));var _jsxRuntime=require("react/jsx-runtime");// The <Button> component implements a standard button / button-like link.
|
|
2
|
-
const defaultTheme={"context":"KM0v4f","ad":"_3jm1-Q","hoc":"_0plpDL","button":"E1FNQT","active":"MAe9O6","disabled":"Br9IWV"};const BaseButton=({active,children,disabled,enforceA,onClick,onKeyDown:onKeyDownProp,onKeyUp,onMouseDown,onMouseUp,onPointerDown,onPointerUp,openNewTab,replace,testId,theme,to})=>{let className=theme.button;if(active&&theme.active)className+=` ${theme.active}`;if(disabled){if(theme.disabled)className+=` ${theme.disabled}`;return/*#__PURE__*/(0,_jsxRuntime.jsx)("div",{className:className,"data-testid":process.env.NODE_ENV==="production"?undefined:testId,children:children})}let onKeyDown=onKeyDownProp;if(!onKeyDown&&onClick){onKeyDown=e=>{if(e.key==="Enter")onClick(e)}}if(to){return/*#__PURE__*/(0,_jsxRuntime.jsx)(_Link.default,{className:className,"data-testid":process.env.NODE_ENV==="production"?undefined:testId,enforceA:enforceA
|
|
2
|
+
const defaultTheme={"context":"KM0v4f","ad":"_3jm1-Q","hoc":"_0plpDL","button":"E1FNQT","active":"MAe9O6","disabled":"Br9IWV"};const BaseButton=({active,children,disabled,enforceA,keepScrollPosition,onClick,onKeyDown:onKeyDownProp,onKeyUp,onMouseDown,onMouseUp,onPointerDown,onPointerUp,openNewTab,replace,testId,theme,to})=>{let className=theme.button;if(active&&theme.active)className+=` ${theme.active}`;if(disabled){if(theme.disabled)className+=` ${theme.disabled}`;return/*#__PURE__*/(0,_jsxRuntime.jsx)("div",{className:className,"data-testid":process.env.NODE_ENV==="production"?undefined:testId,children:children})}let onKeyDown=onKeyDownProp;if(!onKeyDown&&onClick){onKeyDown=e=>{if(e.key==="Enter")onClick(e)}}if(to){return/*#__PURE__*/(0,_jsxRuntime.jsx)(_Link.default,{className:className,"data-testid":process.env.NODE_ENV==="production"?undefined:testId,enforceA:enforceA// TODO: This was exposed as a hotifx... however, I guess we better want
|
|
3
|
+
// to check if the `to` URL contains an anchor (#), and if it does we should
|
|
4
|
+
// automatically opt to keep the position here; and enforce <a> (as
|
|
5
|
+
// react-router link does not seem to respect the hash tag either,
|
|
6
|
+
// at least not without some additional settings).
|
|
7
|
+
,keepScrollPosition:keepScrollPosition,onClick:onClick// TODO: For now, the `onKeyDown` handler is not passed to the <Link>,
|
|
3
8
|
// as <Link> component does not call it anyway, presumably due to
|
|
4
9
|
// the inner implementation details. We should look into supporting it:
|
|
5
10
|
// https://github.com/birdofpreyru/react-utils/issues/444
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_reactThemes","_interopRequireDefault","require","_Link","_jsxRuntime","defaultTheme","BaseButton","active","children","disabled","enforceA","onClick","onKeyDown","onKeyDownProp","onKeyUp","onMouseDown","onMouseUp","onPointerDown","onPointerUp","openNewTab","replace","testId","theme","to","className","button","jsx","process","env","NODE_ENV","undefined","e","key","default","role","tabIndex","exports","_default","themed"],"sources":["../../../../../src/shared/components/Button/index.tsx"],"sourcesContent":["// The <Button> component implements a standard button / button-like link.\n\nimport type {\n FunctionComponent,\n KeyboardEventHandler,\n MouseEventHandler,\n PointerEventHandler,\n ReactNode,\n} from 'react';\n\nimport themed, { type Theme } from '@dr.pogodin/react-themes';\n\nimport Link from 'components/Link';\n\nimport defaultTheme from './style.scss';\n\ntype PropsT = {\n active?: boolean;\n children?: ReactNode;\n disabled?: boolean;\n enforceA?: boolean;\n onClick?: MouseEventHandler & KeyboardEventHandler;\n onKeyDown?: KeyboardEventHandler;\n onKeyUp?: KeyboardEventHandler;\n onMouseDown?: MouseEventHandler;\n onMouseUp?: MouseEventHandler;\n onPointerDown?: PointerEventHandler;\n onPointerUp?: PointerEventHandler;\n openNewTab?: boolean;\n replace?: boolean;\n testId?: string;\n theme: Theme<'active' | 'button' | 'disabled'>;\n // TODO: It needs a more precise typing of the object option.\n to?: object | string;\n};\n\nexport const BaseButton: FunctionComponent<PropsT> = ({\n active,\n children,\n disabled,\n enforceA,\n onClick,\n onKeyDown: onKeyDownProp,\n onKeyUp,\n onMouseDown,\n onMouseUp,\n onPointerDown,\n onPointerUp,\n openNewTab,\n replace,\n testId,\n theme,\n to,\n}) => {\n let className = theme.button;\n if (active && theme.active) className += ` ${theme.active}`;\n if (disabled) {\n if (theme.disabled) className += ` ${theme.disabled}`;\n return (\n <div\n className={className}\n data-testid={process.env.NODE_ENV === 'production' ? undefined : testId}\n >\n {children}\n </div>\n );\n }\n\n let onKeyDown = onKeyDownProp;\n if (!onKeyDown && onClick) {\n onKeyDown = (e) => {\n if (e.key === 'Enter') onClick(e);\n };\n }\n\n if (to) {\n return (\n <Link\n className={className}\n data-testid={process.env.NODE_ENV === 'production' ? undefined : testId}\n enforceA={enforceA}\n onClick={onClick}\n\n // TODO: For now, the `onKeyDown` handler is not passed to the <Link>,\n // as <Link> component does not call it anyway, presumably due to\n // the inner implementation details. We should look into supporting it:\n // https://github.com/birdofpreyru/react-utils/issues/444\n // onKeyDown={onKeyDown}\n\n onKeyUp={onKeyUp}\n onMouseDown={onMouseDown}\n onMouseUp={onMouseUp}\n onPointerDown={onPointerDown}\n onPointerUp={onPointerUp}\n openNewTab={openNewTab}\n replace={replace}\n to={to}\n >\n {children}\n </Link>\n );\n }\n\n return (\n <div\n className={className}\n data-testid={process.env.NODE_ENV === 'production' ? undefined : testId}\n onClick={onClick}\n onKeyDown={onKeyDown}\n onKeyUp={onKeyUp}\n onMouseDown={onMouseDown}\n onMouseUp={onMouseUp}\n onPointerDown={onPointerDown}\n onPointerUp={onPointerUp}\n role=\"button\"\n tabIndex={0}\n >\n {children}\n </div>\n );\n};\n\n/**\n * Button component theme: a map of CSS\n * class names to append to button elements:\n * @prop {string} [active] to the root element of active button.\n * @prop {string} [button] to the root element of any button.\n * @prop {string} [disabled] to the root element of disabled button.\n */\nexport default themed(BaseButton, 'Button', defaultTheme);\n"],"mappings":"mMAUA,IAAAA,YAAA,CAAAC,sBAAA,CAAAC,OAAA,8BAEA,IAAAC,KAAA,CAAAF,sBAAA,CAAAC,OAAA,aAAmC,IAAAE,WAAA,CAAAF,OAAA,sBAZnC;AAAA,MAAAG,YAAA,
|
|
1
|
+
{"version":3,"file":"index.js","names":["_reactThemes","_interopRequireDefault","require","_Link","_jsxRuntime","defaultTheme","BaseButton","active","children","disabled","enforceA","keepScrollPosition","onClick","onKeyDown","onKeyDownProp","onKeyUp","onMouseDown","onMouseUp","onPointerDown","onPointerUp","openNewTab","replace","testId","theme","to","className","button","jsx","process","env","NODE_ENV","undefined","e","key","default","role","tabIndex","exports","_default","themed"],"sources":["../../../../../src/shared/components/Button/index.tsx"],"sourcesContent":["// The <Button> component implements a standard button / button-like link.\n\nimport type {\n FunctionComponent,\n KeyboardEventHandler,\n MouseEventHandler,\n PointerEventHandler,\n ReactNode,\n} from 'react';\n\nimport themed, { type Theme } from '@dr.pogodin/react-themes';\n\nimport Link from 'components/Link';\n\nimport defaultTheme from './style.scss';\n\ntype PropsT = {\n active?: boolean;\n children?: ReactNode;\n disabled?: boolean;\n enforceA?: boolean;\n keepScrollPosition?: boolean;\n onClick?: MouseEventHandler & KeyboardEventHandler;\n onKeyDown?: KeyboardEventHandler;\n onKeyUp?: KeyboardEventHandler;\n onMouseDown?: MouseEventHandler;\n onMouseUp?: MouseEventHandler;\n onPointerDown?: PointerEventHandler;\n onPointerUp?: PointerEventHandler;\n openNewTab?: boolean;\n replace?: boolean;\n testId?: string;\n theme: Theme<'active' | 'button' | 'disabled'>;\n // TODO: It needs a more precise typing of the object option.\n to?: object | string;\n};\n\nexport const BaseButton: FunctionComponent<PropsT> = ({\n active,\n children,\n disabled,\n enforceA,\n keepScrollPosition,\n onClick,\n onKeyDown: onKeyDownProp,\n onKeyUp,\n onMouseDown,\n onMouseUp,\n onPointerDown,\n onPointerUp,\n openNewTab,\n replace,\n testId,\n theme,\n to,\n}) => {\n let className = theme.button;\n if (active && theme.active) className += ` ${theme.active}`;\n if (disabled) {\n if (theme.disabled) className += ` ${theme.disabled}`;\n return (\n <div\n className={className}\n data-testid={process.env.NODE_ENV === 'production' ? undefined : testId}\n >\n {children}\n </div>\n );\n }\n\n let onKeyDown = onKeyDownProp;\n if (!onKeyDown && onClick) {\n onKeyDown = (e) => {\n if (e.key === 'Enter') onClick(e);\n };\n }\n\n if (to) {\n return (\n <Link\n className={className}\n data-testid={process.env.NODE_ENV === 'production' ? undefined : testId}\n enforceA={enforceA}\n\n // TODO: This was exposed as a hotifx... however, I guess we better want\n // to check if the `to` URL contains an anchor (#), and if it does we should\n // automatically opt to keep the position here; and enforce <a> (as\n // react-router link does not seem to respect the hash tag either,\n // at least not without some additional settings).\n keepScrollPosition={keepScrollPosition}\n\n onClick={onClick}\n\n // TODO: For now, the `onKeyDown` handler is not passed to the <Link>,\n // as <Link> component does not call it anyway, presumably due to\n // the inner implementation details. We should look into supporting it:\n // https://github.com/birdofpreyru/react-utils/issues/444\n // onKeyDown={onKeyDown}\n\n onKeyUp={onKeyUp}\n onMouseDown={onMouseDown}\n onMouseUp={onMouseUp}\n onPointerDown={onPointerDown}\n onPointerUp={onPointerUp}\n openNewTab={openNewTab}\n replace={replace}\n to={to}\n >\n {children}\n </Link>\n );\n }\n\n return (\n <div\n className={className}\n data-testid={process.env.NODE_ENV === 'production' ? undefined : testId}\n onClick={onClick}\n onKeyDown={onKeyDown}\n onKeyUp={onKeyUp}\n onMouseDown={onMouseDown}\n onMouseUp={onMouseUp}\n onPointerDown={onPointerDown}\n onPointerUp={onPointerUp}\n role=\"button\"\n tabIndex={0}\n >\n {children}\n </div>\n );\n};\n\n/**\n * Button component theme: a map of CSS\n * class names to append to button elements:\n * @prop {string} [active] to the root element of active button.\n * @prop {string} [button] to the root element of any button.\n * @prop {string} [disabled] to the root element of disabled button.\n */\nexport default themed(BaseButton, 'Button', defaultTheme);\n"],"mappings":"mMAUA,IAAAA,YAAA,CAAAC,sBAAA,CAAAC,OAAA,8BAEA,IAAAC,KAAA,CAAAF,sBAAA,CAAAC,OAAA,aAAmC,IAAAE,WAAA,CAAAF,OAAA,sBAZnC;AAAA,MAAAG,YAAA,6GAqCO,KAAM,CAAAC,UAAqC,CAAGA,CAAC,CACpDC,MAAM,CACNC,QAAQ,CACRC,QAAQ,CACRC,QAAQ,CACRC,kBAAkB,CAClBC,OAAO,CACPC,SAAS,CAAEC,aAAa,CACxBC,OAAO,CACPC,WAAW,CACXC,SAAS,CACTC,aAAa,CACbC,WAAW,CACXC,UAAU,CACVC,OAAO,CACPC,MAAM,CACNC,KAAK,CACLC,EACF,CAAC,GAAK,CACJ,GAAI,CAAAC,SAAS,CAAGF,KAAK,CAACG,MAAM,CAC5B,GAAInB,MAAM,EAAIgB,KAAK,CAAChB,MAAM,CAAEkB,SAAS,EAAI,IAAIF,KAAK,CAAChB,MAAM,EAAE,CAC3D,GAAIE,QAAQ,CAAE,CACZ,GAAIc,KAAK,CAACd,QAAQ,CAAEgB,SAAS,EAAI,IAAIF,KAAK,CAACd,QAAQ,EAAE,CACrD,mBACE,GAAAL,WAAA,CAAAuB,GAAA,SACEF,SAAS,CAAEA,SAAU,CACrB,cAAaG,OAAO,CAACC,GAAG,CAACC,QAAQ,GAAK,YAAY,CAAGC,SAAS,CAAGT,MAAO,CAAAd,QAAA,CAEvEA,QAAQ,CACN,CAET,CAEA,GAAI,CAAAK,SAAS,CAAGC,aAAa,CAC7B,GAAI,CAACD,SAAS,EAAID,OAAO,CAAE,CACzBC,SAAS,CAAImB,CAAC,EAAK,CACjB,GAAIA,CAAC,CAACC,GAAG,GAAK,OAAO,CAAErB,OAAO,CAACoB,CAAC,CAClC,CACF,CAEA,GAAIR,EAAE,CAAE,CACN,mBACE,GAAApB,WAAA,CAAAuB,GAAA,E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-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@dr.pogodin/js-utils"),require("@dr.pogodin/react-global-state"),require("@dr.pogodin/react-helmet"),require("@dr.pogodin/react-themes"),require("cookie"),require("dayjs"),require("node-forge/lib/aes"),require("node-forge/lib/forge"),require("qs"),require("react"),require("react-dom"),require("react-dom/client"),require("react-router")):"function"==typeof define&&define.amd?define(["@dr.pogodin/js-utils","@dr.pogodin/react-global-state","@dr.pogodin/react-helmet","@dr.pogodin/react-themes","cookie","dayjs","node-forge/lib/aes","node-forge/lib/forge","qs","react","react-dom","react-dom/client","react-router"],t):"object"==typeof exports?exports["@dr.pogodin/react-utils"]=t(require("@dr.pogodin/js-utils"),require("@dr.pogodin/react-global-state"),require("@dr.pogodin/react-helmet"),require("@dr.pogodin/react-themes"),require("cookie"),require("dayjs"),require("node-forge/lib/aes"),require("node-forge/lib/forge"),require("qs"),require("react"),require("react-dom"),require("react-dom/client"),require("react-router")):e["@dr.pogodin/react-utils"]=t(e["@dr.pogodin/js-utils"],e["@dr.pogodin/react-global-state"],e["@dr.pogodin/react-helmet"],e["@dr.pogodin/react-themes"],e.cookie,e.dayjs,e["node-forge/lib/aes"],e["node-forge/lib/forge"],e.qs,e.react,e["react-dom"],e["react-dom/client"],e["react-router"])}("undefined"!=typeof self?self:this,function(__WEBPACK_EXTERNAL_MODULE__864__,__WEBPACK_EXTERNAL_MODULE__126__,__WEBPACK_EXTERNAL_MODULE__264__,__WEBPACK_EXTERNAL_MODULE__859__,__WEBPACK_EXTERNAL_MODULE__462__,__WEBPACK_EXTERNAL_MODULE__185__,__WEBPACK_EXTERNAL_MODULE__958__,__WEBPACK_EXTERNAL_MODULE__814__,__WEBPACK_EXTERNAL_MODULE__360__,__WEBPACK_EXTERNAL_MODULE__155__,__WEBPACK_EXTERNAL_MODULE__514__,__WEBPACK_EXTERNAL_MODULE__236__,__WEBPACK_EXTERNAL_MODULE__707__){return function(){"use strict";var __webpack_modules__={48:function(e,t,r){r.d(t,{B:function(){return n},p:function(){return o}});const n="object"!=typeof process||!process.versions?.node||!!r.g.REACT_UTILS_FORCE_CLIENT_SIDE||!0,o=!n},126:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__126__},148:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{requireWeak:function(){return requireWeak},resolveWeak:function(){return resolveWeak}});var _isomorphy__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(724);function requireWeak(modulePath,basePathOrOptions){if(_isomorphy__WEBPACK_IMPORTED_MODULE_0__.IS_CLIENT_SIDE)return null;let basePath,ops;"string"==typeof basePathOrOptions?basePath=basePathOrOptions:(ops=basePathOrOptions??{},({basePath:basePath}=ops));const req=eval("require"),{resolve:resolve}=req("path"),path=basePath?resolve(basePath,modulePath):modulePath,module=req(path);if(!("default"in module)||!module.default)return module;const{default:def,...named}=module,res=def;return Object.entries(named).forEach(([e,t])=>{const r=res[e];if(r)res[e]=t;else if(r!==t)throw Error("Conflict between default and named exports")}),res}function resolveWeak(e){return e}},155:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__155__},185:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__185__},208:function(e,t){var r=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function o(e,t,n){var o=null;if(void 0!==n&&(o=""+n),void 0!==t.key&&(o=""+t.key),"key"in t)for(var a in n={},t)"key"!==a&&(n[a]=t[a]);else n=t;return t=n.ref,{$$typeof:r,type:e,key:o,ref:void 0!==t?t:null,props:n}}t.Fragment=n,t.jsx=o,t.jsxs=o},236:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__236__},264:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__264__},360:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__360__},462:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__462__},514:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__514__},540:function(e,t,r){let n;function o(){if(void 0===n)throw Error('"Build Info" has not been initialized yet');return n}r.d(t,{F:function(){return o}}),"undefined"!=typeof BUILD_INFO&&(n=BUILD_INFO)},668:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{A:function(){return getInj}});var node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(814),node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0__),node_forge_lib_aes__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(958),node_forge_lib_aes__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(node_forge_lib_aes__WEBPACK_IMPORTED_MODULE_1__),_shared_utils_isomorphy_buildInfo__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(540);let inj={};const metaElement="undefined"==typeof document?null:document.querySelector('meta[itemprop="drpruinj"]');if(metaElement){metaElement.remove();let data=node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0___default().util.decode64(metaElement.content);const{key:key}=(0,_shared_utils_isomorphy_buildInfo__WEBPACK_IMPORTED_MODULE_2__.F)(),d=node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0___default().cipher.createDecipher("AES-CBC",key);d.start({iv:data.slice(0,key.length)}),d.update(node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0___default().util.createBuffer(data.slice(key.length))),d.finish(),data=node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0___default().util.decodeUtf8(d.output.data),inj=eval(`(${data})`)}else"undefined"!=typeof window&&window.REACT_UTILS_INJECTION?(inj=window.REACT_UTILS_INJECTION,delete window.REACT_UTILS_INJECTION):inj={};function getInj(){return inj}},707:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__707__},724:function(e,t,r){r.r(t),r.d(t,{IS_CLIENT_SIDE:function(){return o.B},IS_SERVER_SIDE:function(){return o.p},buildTimestamp:function(){return _},getBuildInfo:function(){return n.F},isDevBuild:function(){return a},isProdBuild:function(){return i}});var n=r(540),o=r(48);function a(){return!1}function i(){return!0}function _(){return(0,n.F)().timestamp}},814:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__814__},859:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__859__},864:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__864__},922:function(e,t,r){e.exports=r(208)},958:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__958__},969:function(e,t,r){r.d(t,{A:function(){return c}});var n=r(236),o=r(264),a=r(707),i=r(126),_=r(668),s=r(922);function c(e,t={}){const r=document.getElementById("react-view");if(!r)throw Error("Failed to find container for React app");const c=(0,s.jsx)(i.GlobalStateProvider,{initialState:(0,_.A)().ISTATE??t.initialState,children:(0,s.jsx)(a.BrowserRouter,{children:(0,s.jsx)(o.HelmetProvider,{children:(0,s.jsx)(e,{})})})});t.dontHydrate?(0,n.createRoot)(r).render(c):(0,n.hydrateRoot)(r,c)}}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](r,r.exports,__webpack_require__),r.exports}__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=function(e,t){for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Barrier:function(){return js_utils_.Barrier},BaseButton:function(){return BaseButton},BaseModal:function(){return BaseModal},Button:function(){return Button},Cached:function(){return js_utils_.Cached},Checkbox:function(){return components_Checkbox},CustomDropdown:function(){return CustomDropdown},Dropdown:function(){return NativeDropdown},Emitter:function(){return js_utils_.Emitter},GlobalStateProvider:function(){return react_global_state_.GlobalStateProvider},Input:function(){return components_Input},Link:function(){return components_Link},MetaTags:function(){return react_helmet_.MetaTags},Modal:function(){return Modal},NavLink:function(){return components_NavLink},PageLayout:function(){return components_PageLayout},Semaphore:function(){return js_utils_.Semaphore},Switch:function(){return Switch},TextArea:function(){return components_TextArea},ThemeProvider:function(){return react_themes_.ThemeProvider},Throbber:function(){return components_Throbber},WithTooltip:function(){return WithTooltip},YouTubeVideo:function(){return components_YouTubeVideo},assertEmptyObject:function(){return js_utils_.assertEmptyObject},client:function(){return client},config:function(){return utils_config},getGlobalState:function(){return react_global_state_.getGlobalState},getSsrContext:function(){return getSsrContext},isomorphy:function(){return isomorphy},newAsyncDataEnvelope:function(){return react_global_state_.newAsyncDataEnvelope},server:function(){return server},splitComponent:function(){return splitComponent},themed:function(){return themed},time:function(){return utils_time},useAsyncCollection:function(){return react_global_state_.useAsyncCollection},useAsyncData:function(){return react_global_state_.useAsyncData},useGlobalState:function(){return react_global_state_.useGlobalState},webpack:function(){return webpack},withGlobalStateType:function(){return react_global_state_.withGlobalStateType},withRetries:function(){return js_utils_.withRetries}});var global={},react_themes_=__webpack_require__(859),react_themes_default=__webpack_require__.n(react_themes_),environment_check=__webpack_require__(48),webpack=__webpack_require__(148);const config=(environment_check.B?__webpack_require__(668).A().CONFIG:(0,webpack.requireWeak)("config"))??{};if(environment_check.B&&"undefined"!=typeof document){const e=__webpack_require__(462);config.CSRF=e.parse(document.cookie).csrfToken}var utils_config=config,isomorphy=__webpack_require__(724),external_cookie_=__webpack_require__(462),external_react_=__webpack_require__(155),external_dayjs_=__webpack_require__(185),external_dayjs_default=__webpack_require__.n(external_dayjs_),js_utils_=__webpack_require__(864),react_global_state_=__webpack_require__(126);const{getSsrContext:getSsrContext}=(0,react_global_state_.withGlobalStateType)();function useCurrent({autorefresh:e=!1,globalStatePath:t="currentTime",precision:r=5*js_utils_.SEC_MS}={}){const[n,o]=(0,react_global_state_.useGlobalState)(t,Date.now);return(0,external_react_.useEffect)(()=>{let t;const n=()=>{o(e=>{const t=Date.now();return Math.abs(t-e)>r?t:e}),e&&(t=setTimeout(n,r))};return n(),()=>{t&&clearTimeout(t)}},[e,r,o]),n}function useTimezoneOffset({cookieName:e="timezoneOffset",globalStatePath:t="timezoneOffset"}={}){const r=getSsrContext(!1),[n,o]=(0,react_global_state_.useGlobalState)(t,()=>{const t=e&&r?.req.cookies[e];return t?parseInt(t):0});return(0,external_react_.useEffect)(()=>{const t=(new Date).getTimezoneOffset();o(t),e&&(document.cookie=(0,external_cookie_.serialize)(e,t.toString(),{path:"/"}))},[e,o]),n}const time={DAY_MS:js_utils_.DAY_MS,HOUR_MS:js_utils_.HOUR_MS,MIN_MS:js_utils_.MIN_MS,SEC_MS:js_utils_.SEC_MS,YEAR_MS:js_utils_.YEAR_MS,now:Date.now,timer:js_utils_.timer,useCurrent:useCurrent,useTimezoneOffset:useTimezoneOffset};var utils_time=Object.assign(external_dayjs_default(),time),jsx_runtime=__webpack_require__(922);let clientChunkGroups;isomorphy.IS_CLIENT_SIDE&&(clientChunkGroups=__webpack_require__(668).A().CHUNK_GROUPS??{});const refCounts={};function getPublicPath(){return(0,isomorphy.getBuildInfo)().publicPath}function bookStyleSheet(e,t,r){let n;const o=`${getPublicPath()}/${e}`,a=`${document.location.origin}${o}`;if(!t.has(a)){let e=document.querySelector(`link[href="${o}"]`);e||(e=document.createElement("link"),e.setAttribute("rel","stylesheet"),e.setAttribute("href",o),document.head.appendChild(e)),n=new js_utils_.Barrier,e.addEventListener("load",()=>{if(!n)throw Error("Internal error");n.resolve()}),e.addEventListener("error",()=>{if(!n)throw Error("Internal error");n.resolve()})}if(r){const e=refCounts[o]??0;refCounts[o]=1+e}return n}function getLoadedStyleSheets(){const e=new Set,{styleSheets:t}=document;for(const{href:r}of t)r&&e.add(r);return e}function assertChunkName(e,t){if(!t[e])throw Error(`Unknown chunk name "${e}"`)}async function bookStyleSheets(e,t,r){const n=[],o=t[e];if(!o)return Promise.resolve();const a=getLoadedStyleSheets();for(const e of o)if(e.endsWith(".css")){const t=bookStyleSheet(e,a,r);t&&n.push(t)}return n.length?Promise.allSettled(n).then():Promise.resolve()}function freeStyleSheets(e,t){const r=t[e];if(r)for(const e of r)if(e.endsWith(".css")){const t=`${getPublicPath()}/${e}`,r=refCounts[t];r&&(r<=1?(document.head.querySelector(`link[href="${t}"]`).remove(),delete refCounts[t]):refCounts[t]=r-1)}}const usedChunkNames=new Set;function splitComponent({chunkName:e,getComponent:t,placeholder:r}){if(isomorphy.IS_CLIENT_SIDE&&assertChunkName(e,clientChunkGroups),usedChunkNames.has(e))throw Error(`Repeated splitComponent() call for the chunk "${e}"`);usedChunkNames.add(e);const n=(0,external_react_.lazy)(async()=>{const r=await t(),n="default"in r?r.default:r;return isomorphy.IS_CLIENT_SIDE&&await bookStyleSheets(e,clientChunkGroups,!1),{default:({children:t,ref:r,...o})=>{if(isomorphy.IS_SERVER_SIDE){const{chunkGroups:t,chunks:r}=getSsrContext();assertChunkName(e,t),r.includes(e)||r.push(e)}return(0,external_react_.useInsertionEffect)(()=>(bookStyleSheets(e,clientChunkGroups,!0),()=>{freeStyleSheets(e,clientChunkGroups)}),[]),(0,jsx_runtime.jsx)(n,{...o,ref:r,children:t})}}});return({children:e,...t})=>(0,jsx_runtime.jsx)(external_react_.Suspense,{fallback:r,children:(0,jsx_runtime.jsx)(n,{...t,children:e})})}const themed=react_themes_default();themed.COMPOSE=react_themes_.COMPOSE,themed.PRIORITY=react_themes_.PRIORITY;var react_helmet_=__webpack_require__(264);function isValue(e){const t=typeof e;return"number"===t||"string"===t}function optionValueName(e){return isValue(e)?[e,e]:[e.value,e.name??e.value]}var external_react_dom_=__webpack_require__(514),external_react_dom_default=__webpack_require__.n(external_react_dom_),base_theme={overlay:"ye2BZo",context:"Szmbbz",ad:"Ah-Nsc",hoc:"Wki41G",container:"gyZ4rc"},styles={scrollingDisabledByModal:"_5fRFtF"};const BaseModal=({cancelOnScrolling:e,children:t,containerStyle:r,dontDisableScrolling:n,onCancel:o,overlayStyle:a,style:i,testId:_,testIdForOverlay:s,theme:c})=>{const l=(0,external_react_.useRef)(null),u=(0,external_react_.useRef)(null);(0,external_react_.useEffect)(()=>(e&&o&&(window.addEventListener("scroll",o),window.addEventListener("wheel",o)),()=>{e&&o&&(window.removeEventListener("scroll",o),window.removeEventListener("wheel",o))}),[e,o]),(0,external_react_.useEffect)(()=>(n||document.body.classList.add(styles.scrollingDisabledByModal),()=>{n||document.body.classList.remove(styles.scrollingDisabledByModal)}),[n]);const d=(0,external_react_.useMemo)(()=>(0,jsx_runtime.jsx)("div",{onFocus:()=>{const e=l.current.querySelectorAll("*");for(let t=e.length-1;t>=0;--t)if(e[t].focus(),document.activeElement===e[t])return;u.current?.focus()},tabIndex:0}),[]);return external_react_dom_default().createPortal((0,jsx_runtime.jsxs)("div",{children:[d,(0,jsx_runtime.jsx)("div",{"aria-label":"Cancel",className:c.overlay,"data-testid":void 0,onClick:e=>{o&&(o(),e.stopPropagation())},onKeyDown:e=>{"Escape"===e.key&&o&&(o(),e.stopPropagation())},ref:e=>{e&&e!==u.current&&(u.current=e,e.focus())},role:"button",style:a,tabIndex:0}),(0,jsx_runtime.jsx)("div",{"aria-modal":"true",className:c.container,"data-testid":void 0,onClick:e=>{e.stopPropagation()},onWheel:e=>{e.stopPropagation()},ref:l,role:"dialog",style:i??r,children:t}),(0,jsx_runtime.jsx)("div",{onFocus:()=>{u.current?.focus()},tabIndex:0}),d]}),document.body)};var Modal=react_themes_default()(BaseModal,"Modal",base_theme),style={overlay:"jKsMKG"};function areEqual(e,t){return e?.left===t?.left&&e?.top===t?.top&&e?.width===t?.width}const Options=({containerClass:e,containerStyle:t,filter:r,onCancel:n,onChange:o,optionClass:a,options:i,ref:_})=>{const s=(0,external_react_.useRef)(null);(0,external_react_.useImperativeHandle)(_,()=>({measure:()=>{const e=s.current?.parentElement;if(!e)return;const t=s.current.getBoundingClientRect(),r=window.getComputedStyle(e),n=parseFloat(r.marginBottom),o=parseFloat(r.marginTop);return t.height+=n+o,t}}),[]);const c=[];for(const e of i)if(!r||r(e)){const[t,r]=optionValueName(e);c.push((0,jsx_runtime.jsx)("div",{className:a,onClick:e=>{o(t),e.stopPropagation()},onKeyDown:e=>{"Enter"===e.key&&(o(t),e.stopPropagation())},role:"button",tabIndex:0,children:r},t))}return(0,jsx_runtime.jsx)(BaseModal,{cancelOnScrolling:!0,dontDisableScrolling:!0,onCancel:n,style:t,theme:{ad:"",container:e,context:"",hoc:"",overlay:style.overlay},children:(0,jsx_runtime.jsx)("div",{ref:s,children:c})})};var CustomDropdown_Options=Options,theme={container:"oQKv0Y",context:"_9Tod5r",ad:"R58zIg",hoc:"O-Tp1i",label:"YUPUNs",dropdown:"pNEyAA",option:"LD2Kzy",select:"LP5azC",arrow:"-wscve",active:"k2UDsV",upward:"HWRvu4"};const BaseCustomDropdown=({filter:e,label:t,onChange:r,options:n,theme:o,value:a})=>{const[i,_]=(0,external_react_.useState)(!1),s=(0,external_react_.useRef)(null),c=(0,external_react_.useRef)(null),[l,u]=(0,external_react_.useState)(),[d,p]=(0,external_react_.useState)(!1);(0,external_react_.useEffect)(()=>{if(!i)return;let e;const t=()=>{const r=s.current?.getBoundingClientRect(),n=c.current?.measure();if(r&&n){const e=r.bottom+n.height<(window.visualViewport?.height??0),t=r.top-n.height>0,o=!e&&t;p(o);const a=o?{left:r.left,top:r.top-n.height-1,width:r.width}:{left:r.left,top:r.bottom,width:r.width};u(e=>areEqual(e,a)?e:a)}e=requestAnimationFrame(t)};return requestAnimationFrame(t),()=>{cancelAnimationFrame(e)}},[i]);const m=e=>{const t=window.visualViewport,r=s.current.getBoundingClientRect();_(!0),u({left:t?.width??0,top:t?.height??0,width:r.width}),e.stopPropagation()};let f=(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:""});for(const t of n)if(!e||e(t)){const[e,r]=optionValueName(t);if(e===a){f=r;break}}let h=o.container;i&&(h+=` ${o.active}`);let b=o.select??"";return d&&(h+=` ${o.upward}`,b+=` ${o.upward}`),(0,jsx_runtime.jsxs)("div",{className:h,children:[void 0===t?null:(0,jsx_runtime.jsx)("div",{className:o.label,children:t}),(0,jsx_runtime.jsxs)("div",{className:o.dropdown,onClick:m,onKeyDown:e=>{"Enter"===e.key&&m(e)},ref:s,role:"listbox",tabIndex:0,children:[f,(0,jsx_runtime.jsx)("div",{className:o.arrow})]}),i?(0,jsx_runtime.jsx)(CustomDropdown_Options,{containerClass:b,containerStyle:l,onCancel:()=>{_(!1)},onChange:e=>{_(!1),r&&r(e)},optionClass:o.option??"",options:n,ref:c}):null]})};var CustomDropdown=react_themes_default()(BaseCustomDropdown,"CustomDropdown",theme),NativeDropdown_theme={dropdown:"kI9A9U",context:"xHyZo4",ad:"ADu59e",hoc:"FTP2bb",arrow:"DubGkT",container:"WtSZPd",active:"ayMn7O",label:"K7JYKw",option:"_27pZ6W",hiddenOption:"clAKFJ",select:"N0Fc14",invalid:"wL4umU"};const Dropdown=({filter:e,label:t,onChange:r,options:n,testId:o,theme:a,value:i})=>{let _=!1;const s=[];for(const t of n)if(!e||e(t)){const[e,r]=optionValueName(t);_||=e===i,s.push((0,jsx_runtime.jsx)("option",{className:a.option,value:e,children:r},e))}const c=_?null:(0,jsx_runtime.jsx)("option",{className:a.hiddenOption,disabled:!0,value:i,children:i},"__reactUtilsHiddenOption");let l=a.select;return _||(l+=` ${a.invalid}`),(0,jsx_runtime.jsxs)("div",{className:a.container,children:[void 0===t?null:(0,jsx_runtime.jsx)("div",{className:a.label,children:t}),(0,jsx_runtime.jsxs)("div",{className:a.dropdown,children:[(0,jsx_runtime.jsxs)("select",{className:l,"data-testid":void 0,onChange:r,value:i,children:[c,s]}),(0,jsx_runtime.jsx)("div",{className:a.arrow})]})]})};var NativeDropdown=react_themes_default()(Dropdown,"Dropdown",NativeDropdown_theme),Switch_theme={container:"AWNvRj",context:"VMHfnP",ad:"HNliRC",hoc:"_2Ue-db",option:"fUfIAd",selected:"Wco-qk",options:"CZYtcC"};const BaseSwitch=({label:e,onChange:t,options:r,theme:n,value:o})=>{if(!r||!n.option)throw Error("Internal error");const a=[];for(const e of r){const[r,i]=optionValueName(e);let _,s=n.option;r===o?s+=` ${n.selected}`:t&&(_=()=>{t(r)}),a.push(_?(0,jsx_runtime.jsx)("div",{className:s,onClick:_,onKeyDown:e=>{"Enter"===e.key&&_()},role:"button",tabIndex:0,children:i},r):(0,jsx_runtime.jsx)("div",{className:s,children:i},r))}return(0,jsx_runtime.jsxs)("div",{className:n.container,children:[e?(0,jsx_runtime.jsx)("div",{className:n.label,children:e}):null,(0,jsx_runtime.jsx)("div",{className:n.options,children:a})]})};var Switch=react_themes_default()(BaseSwitch,"Switch",Switch_theme),external_react_router_=__webpack_require__(707),GenericLink_style={link:"zH52sA"};const GenericLink=({children:e,className:t,disabled:r,enforceA:n,keepScrollPosition:o,onClick:a,onMouseDown:i,openNewTab:_,replace:s,routerLinkType:c,to:l,...u})=>{if(r||n||_||l.match(/^(#|(https?|mailto):)/))return(0,jsx_runtime.jsx)("a",{className:(t?t+" ":"")+"zH52sA",href:l,onClick:r?e=>{e.preventDefault()}:a,onMouseDown:r?e=>{e.preventDefault()}:i,rel:"noopener noreferrer",target:_?"_blank":"",children:e});const d=c;return(0,jsx_runtime.jsx)(d,{className:t,discover:"none",onClick:e=>{a&&a(e),o||window.scroll(0,0)},onMouseDown:i,replace:s,to:l,...u,children:e})};var components_GenericLink=GenericLink;const Link=e=>(0,jsx_runtime.jsx)(components_GenericLink,{...e,routerLinkType:external_react_router_.Link});var components_Link=Link,Button_style={button:"E1FNQT",context:"KM0v4f",ad:"_3jm1-Q",hoc:"_0plpDL",active:"MAe9O6",disabled:"Br9IWV"};const BaseButton=({active:e,children:t,disabled:r,enforceA:n,onClick:o,onKeyDown:a,onKeyUp:i,onMouseDown:_,onMouseUp:s,onPointerDown:c,onPointerUp:l,openNewTab:u,replace:d,testId:p,theme:m,to:f})=>{let h=m.button;if(e&&m.active&&(h+=` ${m.active}`),r)return m.disabled&&(h+=` ${m.disabled}`),(0,jsx_runtime.jsx)("div",{className:h,"data-testid":void 0,children:t});let b=a;return!b&&o&&(b=e=>{"Enter"===e.key&&o(e)}),f?(0,jsx_runtime.jsx)(components_Link,{className:h,"data-testid":void 0,enforceA:n,onClick:o,onKeyUp:i,onMouseDown:_,onMouseUp:s,onPointerDown:c,onPointerUp:l,openNewTab:u,replace:d,to:f,children:t}):(0,jsx_runtime.jsx)("div",{className:h,"data-testid":void 0,onClick:o,onKeyDown:b,onKeyUp:i,onMouseDown:_,onMouseUp:s,onPointerDown:c,onPointerUp:l,role:"button",tabIndex:0,children:t})};var Button=react_themes_default()(BaseButton,"Button",Button_style),Checkbox_theme={checkbox:"A-f8qJ",context:"dNQcC6",ad:"earXxa",hoc:"qAPfQ6",indeterminate:"N9bCb8",container:"Kr0g3M",label:"_3dML-O",disabled:"EzQra1"};const Checkbox=({checked:e,disabled:t,label:r,onChange:n,testId:o,theme:a})=>{let i=a.container;t&&(i+=` ${a.disabled}`);let _=a.checkbox;return"indeterminate"===e&&(_+=` ${a.indeterminate}`),(0,jsx_runtime.jsxs)("div",{className:i,children:[void 0===r?null:(0,jsx_runtime.jsx)("div",{className:a.label,children:r}),(0,jsx_runtime.jsx)("input",{checked:void 0===e?void 0:!0===e,className:_,"data-testid":void 0,disabled:t,onChange:n,onClick:e=>{e.stopPropagation()},type:"checkbox"})]})};var components_Checkbox=react_themes_default()(Checkbox,"Checkbox",Checkbox_theme),Input_theme={container:"Cxx397",context:"X5WszA",ad:"_8s7GCr",hoc:"TVlBYc",children:"m4FpDO",input:"M07d4s",label:"gfbdq-",error:"p2idHY",errorMessage:"Q9uslG"};const Input=({children:e,error:t,label:r,ref:n,testId:o,theme:a,...i})=>{const[_,s]=(0,external_react_.useState)(!1),c=(0,external_react_.useRef)(null);let l=a.container;return _&&(l+=` ${a.focused}`),!i.value&&a.empty&&(l+=` ${a.empty}`),t&&(l+=` ${a.error}`),(0,jsx_runtime.jsxs)("div",{className:l,onFocus:()=>{"object"==typeof n?n?.current?.focus():c.current?.focus()},children:[void 0===r?null:(0,jsx_runtime.jsx)("div",{className:a.label,children:r}),(0,jsx_runtime.jsx)("input",{className:a.input,"data-testid":void 0,ref:n??c,...i,onBlur:a.focused?e=>{s(!1),i.onBlur?.(e)}:i.onBlur,onFocus:a.focused?e=>{s(!0),i.onFocus?.(e)}:i.onFocus}),t&&!0!==t?(0,jsx_runtime.jsx)("div",{className:a.errorMessage,children:t}):null,e?(0,jsx_runtime.jsx)("div",{className:a.children,children:e}):null]})};var components_Input=react_themes_default()(Input,"Input",Input_theme),PageLayout_base_theme={container:"T3cuHB",context:"m4mL-M",ad:"m3-mdC",hoc:"J15Z4H",mainPanel:"pPlQO2",sidePanel:"lqNh4h"};const PageLayout=({children:e,leftSidePanelContent:t,rightSidePanelContent:r,theme:n})=>(0,jsx_runtime.jsxs)("div",{className:n.container,children:[(0,jsx_runtime.jsx)("div",{className:[n.sidePanel,n.leftSidePanel].join(" "),children:t}),(0,jsx_runtime.jsx)("div",{className:n.mainPanel,children:e}),(0,jsx_runtime.jsx)("div",{className:[n.sidePanel,n.rightSidePanel].join(" "),children:r})]});var components_PageLayout=react_themes_default()(PageLayout,"PageLayout",PageLayout_base_theme);const NavLink=e=>(0,jsx_runtime.jsx)(components_GenericLink,{...e,routerLinkType:external_react_router_.NavLink});var components_NavLink=NavLink,Throbber_theme={container:"_7zdld4",context:"uIObt7",ad:"XIxe9o",hoc:"YOyORH",circle:"dBrB4g",bouncing:"TJe-6j"};const Throbber=({theme:e})=>(0,jsx_runtime.jsxs)("span",{className:e.container,children:[(0,jsx_runtime.jsx)("span",{className:e.circle}),(0,jsx_runtime.jsx)("span",{className:e.circle}),(0,jsx_runtime.jsx)("span",{className:e.circle})]});var components_Throbber=react_themes_default()(Throbber,"Throbber",Throbber_theme);let PLACEMENTS=function(e){return e.ABOVE_CURSOR="ABOVE_CURSOR",e.ABOVE_ELEMENT="ABOVE_ELEMENT",e.BELOW_CURSOR="BELOW_CURSOR",e.BELOW_ELEMENT="BELOW_ELEMENT",e}({});const ARROW_STYLE_DOWN=["border-bottom-color:transparent","border-left-color:transparent","border-right-color:transparent"].join(";"),ARROW_STYLE_UP=["border-top-color:transparent","border-left-color:transparent","border-right-color:transparent"].join(";");function calcTooltipRects(e){return{arrow:e.arrow.getBoundingClientRect(),container:e.container.getBoundingClientRect()}}function calcViewportRect(){const{scrollX:e,scrollY:t}=window,{documentElement:{clientHeight:r,clientWidth:n}}=document;return{bottom:t+r,left:e,right:e+n,top:t}}function calcPositionAboveXY(e,t,r){const{arrow:n,container:o}=r;return{arrowX:.5*(o.width-n.width),arrowY:o.height,containerX:e-o.width/2,containerY:t-o.height-n.height/1.5,baseArrowStyle:ARROW_STYLE_DOWN}}function setComponentPositions(e,t,r,n,o){const a=calcTooltipRects(o),i=calcViewportRect(),_=calcPositionAboveXY(e,t,a);if(_.containerX<i.left+6)_.containerX=i.left+6,_.arrowX=Math.max(6,e-_.containerX-a.arrow.width/2);else{const t=i.right-6-a.container.width;_.containerX>t&&(_.containerX=t,_.arrowX=Math.min(a.container.width-6,e-_.containerX-a.arrow.width/2))}_.containerY<i.top+6&&(_.containerY+=a.container.height+2*a.arrow.height,_.arrowY-=a.container.height+a.arrow.height,_.baseArrowStyle=ARROW_STYLE_UP);const s=`left:${_.containerX}px;top:${_.containerY}px`;o.container.setAttribute("style",s);const c=`${_.baseArrowStyle};left:${_.arrowX}px;top:${_.arrowY}px`;o.arrow.setAttribute("style",c)}const Tooltip=({children:e,ref:t,theme:r})=>{const n=(0,external_react_.useRef)(null),o=(0,external_react_.useRef)(null),a=(0,external_react_.useRef)(null),i=(e,t,r,i)=>{if(!n.current||!o.current||!a.current)throw Error("Internal error");setComponentPositions(e,t,r,i,{arrow:n.current,container:o.current,content:a.current})};return(0,external_react_.useImperativeHandle)(t,()=>({pointTo:i})),(0,external_react_dom_.createPortal)((0,jsx_runtime.jsxs)("div",{className:r.container,ref:o,children:[(0,jsx_runtime.jsx)("div",{className:r.arrow,ref:n}),(0,jsx_runtime.jsx)("div",{className:r.content,ref:a,children:e})]}),document.body)};var WithTooltip_Tooltip=Tooltip,default_theme={arrow:"M9gywF",ad:"_4xT7zE",hoc:"zd-vnH",context:"GdZucr",container:"f9gY8K",appearance:"L4ubm-",wrapper:"_4qDBRM"};const Wrapper=({children:e,placement:t=PLACEMENTS.ABOVE_CURSOR,tip:r,theme:n})=>{const{current:o}=(0,external_react_.useRef)({lastCursorX:0,lastCursorY:0,timerId:void 0,triggeredByTouch:!1}),a=(0,external_react_.useRef)(null),i=(0,external_react_.useRef)(null),[_,s]=(0,external_react_.useState)(!1);return(0,external_react_.useEffect)(()=>{if(_&&null!==r){a.current&&a.current.pointTo(o.lastCursorX+window.scrollX,o.lastCursorY+window.scrollY,t,i.current);const e=()=>{s(!1)};return window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}}},[o.lastCursorX,o.lastCursorY,t,_,r]),(0,jsx_runtime.jsxs)("div",{className:n.wrapper,onClick:()=>{o.timerId&&(clearTimeout(o.timerId),o.timerId=void 0,o.triggeredByTouch=!1)},onMouseLeave:()=>{s(!1)},onMouseMove:e=>{((e,r)=>{if(_){const n=i.current.getBoundingClientRect();e<n.left||e>n.right||r<n.top||r>n.bottom?s(!1):a.current&&a.current.pointTo(e+window.scrollX,r+window.scrollY,t,i.current)}else o.lastCursorX=e,o.lastCursorY=r,o.triggeredByTouch?o.timerId??=setTimeout(()=>{o.triggeredByTouch=!1,o.timerId=void 0,s(!0)},300):s(!0)})(e.clientX,e.clientY)},onTouchStart:()=>{o.triggeredByTouch=!0},ref:i,role:"presentation",children:[_&&null!==r?(0,jsx_runtime.jsx)(WithTooltip_Tooltip,{ref:a,theme:n,children:r}):null,e]})},ThemedWrapper=react_themes_default()(Wrapper,"WithTooltip",default_theme),e=ThemedWrapper;e.PLACEMENTS=PLACEMENTS;var WithTooltip=e,external_qs_=__webpack_require__(360),external_qs_default=__webpack_require__.n(external_qs_),base={container:"sXHM81",context:"veKyYi",ad:"r3ABzd",hoc:"YKcPnR",video:"SlV2zw"},throbber={container:"jTxmOX",context:"dzIcLh",ad:"_5a9XX1",hoc:"_7sH52O"};const YouTubeVideo=({autoplay:e,src:t,theme:r,title:n})=>{const o=t.split("?");let[a]=o;const[,i]=o,_=i?external_qs_default().parse(i):{},s=_.v??a?.match(/\/([a-zA-Z0-9-_]*)$/)?.[1];return a=`https://www.youtube.com/embed/${s}`,delete _.v,_.autoplay=e?"1":"0",a+=`?${external_qs_default().stringify(_)}`,(0,jsx_runtime.jsxs)("div",{className:r.container,children:[(0,jsx_runtime.jsx)(components_Throbber,{theme:throbber}),(0,jsx_runtime.jsx)("iframe",{allow:"autoplay",allowFullScreen:!0,className:r.video,src:a,title:n})]})};var components_YouTubeVideo=react_themes_default()(YouTubeVideo,"YouTubeVideo",base),TextArea_style={container:"dzMVIB",context:"KVPc7g",ad:"z2GQ0Z",hoc:"_8R1Qdj",label:"Vw9EKL",textarea:"zd-OFg",error:"K2JcEY",errorMessage:"nWsJDB",hidden:"GiHBXI"};const TextArea=({disabled:e,error:t,label:r,onBlur:n,onChange:o,onKeyDown:a,placeholder:i,testId:_,theme:s,value:c})=>{const l=(0,external_react_.useRef)(null),[u,d]=(0,external_react_.useState)(),p=(0,external_react_.useRef)(null),[m,f]=(0,external_react_.useState)(c??"");void 0!==c&&m!==c&&f(c),(0,external_react_.useEffect)(()=>{const e=l.current;if(!e)return;const t=new ResizeObserver(()=>{d(e.scrollHeight)});return t.observe(e),()=>{t.disconnect()}},[]),(0,external_react_.useLayoutEffect)(()=>{const e=l.current;e&&d(e.scrollHeight)},[m]);let h=s.container;return t&&(h+=` ${s.error}`),(0,jsx_runtime.jsxs)("div",{className:h,onFocus:()=>{p.current?.focus()},children:[void 0===r?null:(0,jsx_runtime.jsx)("div",{className:s.label,children:r}),(0,jsx_runtime.jsx)("textarea",{className:`${s.textarea} ${s.hidden}`,readOnly:!0,ref:l,tabIndex:-1,value:m||" "}),(0,jsx_runtime.jsx)("textarea",{className:s.textarea,"data-testid":void 0,disabled:e,onBlur:n,onChange:void 0===c?e=>{f(e.target.value)}:o,onKeyDown:a,placeholder:i,ref:p,style:{height:u},value:m}),t&&!0!==t?(0,jsx_runtime.jsx)("div",{className:s.errorMessage,children:t}):null]})};var components_TextArea=react_themes_default()(TextArea,"TextArea",TextArea_style),src_dirname="/";if(__webpack_require__.g.REACT_UTILS_LIBRARY_LOADED)throw Error("React utils library is already loaded");__webpack_require__.g.REACT_UTILS_LIBRARY_LOADED=!0;const server=webpack.requireWeak("./server",src_dirname),client=server?void 0:__webpack_require__(969).A;return __webpack_exports__}()});
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@dr.pogodin/js-utils"),require("@dr.pogodin/react-global-state"),require("@dr.pogodin/react-helmet"),require("@dr.pogodin/react-themes"),require("cookie"),require("dayjs"),require("node-forge/lib/aes"),require("node-forge/lib/forge"),require("qs"),require("react"),require("react-dom"),require("react-dom/client"),require("react-router")):"function"==typeof define&&define.amd?define(["@dr.pogodin/js-utils","@dr.pogodin/react-global-state","@dr.pogodin/react-helmet","@dr.pogodin/react-themes","cookie","dayjs","node-forge/lib/aes","node-forge/lib/forge","qs","react","react-dom","react-dom/client","react-router"],t):"object"==typeof exports?exports["@dr.pogodin/react-utils"]=t(require("@dr.pogodin/js-utils"),require("@dr.pogodin/react-global-state"),require("@dr.pogodin/react-helmet"),require("@dr.pogodin/react-themes"),require("cookie"),require("dayjs"),require("node-forge/lib/aes"),require("node-forge/lib/forge"),require("qs"),require("react"),require("react-dom"),require("react-dom/client"),require("react-router")):e["@dr.pogodin/react-utils"]=t(e["@dr.pogodin/js-utils"],e["@dr.pogodin/react-global-state"],e["@dr.pogodin/react-helmet"],e["@dr.pogodin/react-themes"],e.cookie,e.dayjs,e["node-forge/lib/aes"],e["node-forge/lib/forge"],e.qs,e.react,e["react-dom"],e["react-dom/client"],e["react-router"])}("undefined"!=typeof self?self:this,function(__WEBPACK_EXTERNAL_MODULE__864__,__WEBPACK_EXTERNAL_MODULE__126__,__WEBPACK_EXTERNAL_MODULE__264__,__WEBPACK_EXTERNAL_MODULE__859__,__WEBPACK_EXTERNAL_MODULE__462__,__WEBPACK_EXTERNAL_MODULE__185__,__WEBPACK_EXTERNAL_MODULE__958__,__WEBPACK_EXTERNAL_MODULE__814__,__WEBPACK_EXTERNAL_MODULE__360__,__WEBPACK_EXTERNAL_MODULE__155__,__WEBPACK_EXTERNAL_MODULE__514__,__WEBPACK_EXTERNAL_MODULE__236__,__WEBPACK_EXTERNAL_MODULE__707__){return function(){"use strict";var __webpack_modules__={48:function(e,t,r){r.d(t,{B:function(){return n},p:function(){return o}});const n="object"!=typeof process||!process.versions?.node||!!r.g.REACT_UTILS_FORCE_CLIENT_SIDE||!0,o=!n},126:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__126__},148:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{requireWeak:function(){return requireWeak},resolveWeak:function(){return resolveWeak}});var _isomorphy__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(724);function requireWeak(modulePath,basePathOrOptions){if(_isomorphy__WEBPACK_IMPORTED_MODULE_0__.IS_CLIENT_SIDE)return null;let basePath,ops;"string"==typeof basePathOrOptions?basePath=basePathOrOptions:(ops=basePathOrOptions??{},({basePath:basePath}=ops));const req=eval("require"),{resolve:resolve}=req("path"),path=basePath?resolve(basePath,modulePath):modulePath,module=req(path);if(!("default"in module)||!module.default)return module;const{default:def,...named}=module,res=def;return Object.entries(named).forEach(([e,t])=>{const r=res[e];if(r)res[e]=t;else if(r!==t)throw Error("Conflict between default and named exports")}),res}function resolveWeak(e){return e}},155:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__155__},185:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__185__},208:function(e,t){var r=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function o(e,t,n){var o=null;if(void 0!==n&&(o=""+n),void 0!==t.key&&(o=""+t.key),"key"in t)for(var a in n={},t)"key"!==a&&(n[a]=t[a]);else n=t;return t=n.ref,{$$typeof:r,type:e,key:o,ref:void 0!==t?t:null,props:n}}t.Fragment=n,t.jsx=o,t.jsxs=o},236:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__236__},264:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__264__},360:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__360__},462:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__462__},514:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__514__},540:function(e,t,r){let n;function o(){if(void 0===n)throw Error('"Build Info" has not been initialized yet');return n}r.d(t,{F:function(){return o}}),"undefined"!=typeof BUILD_INFO&&(n=BUILD_INFO)},668:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{A:function(){return getInj}});var node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(814),node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0__),node_forge_lib_aes__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(958),node_forge_lib_aes__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(node_forge_lib_aes__WEBPACK_IMPORTED_MODULE_1__),_shared_utils_isomorphy_buildInfo__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(540);let inj={};const metaElement="undefined"==typeof document?null:document.querySelector('meta[itemprop="drpruinj"]');if(metaElement){metaElement.remove();let data=node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0___default().util.decode64(metaElement.content);const{key:key}=(0,_shared_utils_isomorphy_buildInfo__WEBPACK_IMPORTED_MODULE_2__.F)(),d=node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0___default().cipher.createDecipher("AES-CBC",key);d.start({iv:data.slice(0,key.length)}),d.update(node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0___default().util.createBuffer(data.slice(key.length))),d.finish(),data=node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0___default().util.decodeUtf8(d.output.data),inj=eval(`(${data})`)}else"undefined"!=typeof window&&window.REACT_UTILS_INJECTION?(inj=window.REACT_UTILS_INJECTION,delete window.REACT_UTILS_INJECTION):inj={};function getInj(){return inj}},707:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__707__},724:function(e,t,r){r.r(t),r.d(t,{IS_CLIENT_SIDE:function(){return o.B},IS_SERVER_SIDE:function(){return o.p},buildTimestamp:function(){return _},getBuildInfo:function(){return n.F},isDevBuild:function(){return a},isProdBuild:function(){return i}});var n=r(540),o=r(48);function a(){return!1}function i(){return!0}function _(){return(0,n.F)().timestamp}},814:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__814__},859:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__859__},864:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__864__},922:function(e,t,r){e.exports=r(208)},958:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__958__},969:function(e,t,r){r.d(t,{A:function(){return c}});var n=r(236),o=r(264),a=r(707),i=r(126),_=r(668),s=r(922);function c(e,t={}){const r=document.getElementById("react-view");if(!r)throw Error("Failed to find container for React app");const c=(0,s.jsx)(i.GlobalStateProvider,{initialState:(0,_.A)().ISTATE??t.initialState,children:(0,s.jsx)(a.BrowserRouter,{children:(0,s.jsx)(o.HelmetProvider,{children:(0,s.jsx)(e,{})})})});t.dontHydrate?(0,n.createRoot)(r).render(c):(0,n.hydrateRoot)(r,c)}}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](r,r.exports,__webpack_require__),r.exports}__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=function(e,t){for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Barrier:function(){return js_utils_.Barrier},BaseButton:function(){return BaseButton},BaseModal:function(){return BaseModal},Button:function(){return Button},Cached:function(){return js_utils_.Cached},Checkbox:function(){return components_Checkbox},CustomDropdown:function(){return CustomDropdown},Dropdown:function(){return NativeDropdown},Emitter:function(){return js_utils_.Emitter},GlobalStateProvider:function(){return react_global_state_.GlobalStateProvider},Input:function(){return components_Input},Link:function(){return components_Link},MetaTags:function(){return react_helmet_.MetaTags},Modal:function(){return Modal},NavLink:function(){return components_NavLink},PageLayout:function(){return components_PageLayout},Semaphore:function(){return js_utils_.Semaphore},Switch:function(){return Switch},TextArea:function(){return components_TextArea},ThemeProvider:function(){return react_themes_.ThemeProvider},Throbber:function(){return components_Throbber},WithTooltip:function(){return WithTooltip},YouTubeVideo:function(){return components_YouTubeVideo},assertEmptyObject:function(){return js_utils_.assertEmptyObject},client:function(){return client},config:function(){return utils_config},getGlobalState:function(){return react_global_state_.getGlobalState},getSsrContext:function(){return getSsrContext},isomorphy:function(){return isomorphy},newAsyncDataEnvelope:function(){return react_global_state_.newAsyncDataEnvelope},server:function(){return server},splitComponent:function(){return splitComponent},themed:function(){return themed},time:function(){return utils_time},useAsyncCollection:function(){return react_global_state_.useAsyncCollection},useAsyncData:function(){return react_global_state_.useAsyncData},useGlobalState:function(){return react_global_state_.useGlobalState},webpack:function(){return webpack},withGlobalStateType:function(){return react_global_state_.withGlobalStateType},withRetries:function(){return js_utils_.withRetries}});var global={},react_themes_=__webpack_require__(859),react_themes_default=__webpack_require__.n(react_themes_),environment_check=__webpack_require__(48),webpack=__webpack_require__(148);const config=(environment_check.B?__webpack_require__(668).A().CONFIG:(0,webpack.requireWeak)("config"))??{};if(environment_check.B&&"undefined"!=typeof document){const e=__webpack_require__(462);config.CSRF=e.parse(document.cookie).csrfToken}var utils_config=config,isomorphy=__webpack_require__(724),external_cookie_=__webpack_require__(462),external_react_=__webpack_require__(155),external_dayjs_=__webpack_require__(185),external_dayjs_default=__webpack_require__.n(external_dayjs_),js_utils_=__webpack_require__(864),react_global_state_=__webpack_require__(126);const{getSsrContext:getSsrContext}=(0,react_global_state_.withGlobalStateType)();function useCurrent({autorefresh:e=!1,globalStatePath:t="currentTime",precision:r=5*js_utils_.SEC_MS}={}){const[n,o]=(0,react_global_state_.useGlobalState)(t,Date.now);return(0,external_react_.useEffect)(()=>{let t;const n=()=>{o(e=>{const t=Date.now();return Math.abs(t-e)>r?t:e}),e&&(t=setTimeout(n,r))};return n(),()=>{t&&clearTimeout(t)}},[e,r,o]),n}function useTimezoneOffset({cookieName:e="timezoneOffset",globalStatePath:t="timezoneOffset"}={}){const r=getSsrContext(!1),[n,o]=(0,react_global_state_.useGlobalState)(t,()=>{const t=e&&r?.req.cookies[e];return t?parseInt(t):0});return(0,external_react_.useEffect)(()=>{const t=(new Date).getTimezoneOffset();o(t),e&&(document.cookie=(0,external_cookie_.serialize)(e,t.toString(),{path:"/"}))},[e,o]),n}const time={DAY_MS:js_utils_.DAY_MS,HOUR_MS:js_utils_.HOUR_MS,MIN_MS:js_utils_.MIN_MS,SEC_MS:js_utils_.SEC_MS,YEAR_MS:js_utils_.YEAR_MS,now:Date.now,timer:js_utils_.timer,useCurrent:useCurrent,useTimezoneOffset:useTimezoneOffset};var utils_time=Object.assign(external_dayjs_default(),time),jsx_runtime=__webpack_require__(922);let clientChunkGroups;isomorphy.IS_CLIENT_SIDE&&(clientChunkGroups=__webpack_require__(668).A().CHUNK_GROUPS??{});const refCounts={};function getPublicPath(){return(0,isomorphy.getBuildInfo)().publicPath}function bookStyleSheet(e,t,r){let n;const o=`${getPublicPath()}/${e}`,a=`${document.location.origin}${o}`;if(!t.has(a)){let e=document.querySelector(`link[href="${o}"]`);e||(e=document.createElement("link"),e.setAttribute("rel","stylesheet"),e.setAttribute("href",o),document.head.appendChild(e)),n=new js_utils_.Barrier,e.addEventListener("load",()=>{if(!n)throw Error("Internal error");n.resolve()}),e.addEventListener("error",()=>{if(!n)throw Error("Internal error");n.resolve()})}if(r){const e=refCounts[o]??0;refCounts[o]=1+e}return n}function getLoadedStyleSheets(){const e=new Set,{styleSheets:t}=document;for(const{href:r}of t)r&&e.add(r);return e}function assertChunkName(e,t){if(!t[e])throw Error(`Unknown chunk name "${e}"`)}async function bookStyleSheets(e,t,r){const n=[],o=t[e];if(!o)return Promise.resolve();const a=getLoadedStyleSheets();for(const e of o)if(e.endsWith(".css")){const t=bookStyleSheet(e,a,r);t&&n.push(t)}return n.length?Promise.allSettled(n).then():Promise.resolve()}function freeStyleSheets(e,t){const r=t[e];if(r)for(const e of r)if(e.endsWith(".css")){const t=`${getPublicPath()}/${e}`,r=refCounts[t];r&&(r<=1?(document.head.querySelector(`link[href="${t}"]`).remove(),delete refCounts[t]):refCounts[t]=r-1)}}const usedChunkNames=new Set;function splitComponent({chunkName:e,getComponent:t,placeholder:r}){if(isomorphy.IS_CLIENT_SIDE&&assertChunkName(e,clientChunkGroups),usedChunkNames.has(e))throw Error(`Repeated splitComponent() call for the chunk "${e}"`);usedChunkNames.add(e);const n=(0,external_react_.lazy)(async()=>{const r=await t(),n="default"in r?r.default:r;return isomorphy.IS_CLIENT_SIDE&&await bookStyleSheets(e,clientChunkGroups,!1),{default:({children:t,ref:r,...o})=>{if(isomorphy.IS_SERVER_SIDE){const{chunkGroups:t,chunks:r}=getSsrContext();assertChunkName(e,t),r.includes(e)||r.push(e)}return(0,external_react_.useInsertionEffect)(()=>(bookStyleSheets(e,clientChunkGroups,!0),()=>{freeStyleSheets(e,clientChunkGroups)}),[]),(0,jsx_runtime.jsx)(n,{...o,ref:r,children:t})}}});return({children:e,...t})=>(0,jsx_runtime.jsx)(external_react_.Suspense,{fallback:r,children:(0,jsx_runtime.jsx)(n,{...t,children:e})})}const themed=react_themes_default();themed.COMPOSE=react_themes_.COMPOSE,themed.PRIORITY=react_themes_.PRIORITY;var react_helmet_=__webpack_require__(264);function isValue(e){const t=typeof e;return"number"===t||"string"===t}function optionValueName(e){return isValue(e)?[e,e]:[e.value,e.name??e.value]}var external_react_dom_=__webpack_require__(514),external_react_dom_default=__webpack_require__.n(external_react_dom_),base_theme={overlay:"ye2BZo",context:"Szmbbz",ad:"Ah-Nsc",hoc:"Wki41G",container:"gyZ4rc"},styles={scrollingDisabledByModal:"_5fRFtF"};const BaseModal=({cancelOnScrolling:e,children:t,containerStyle:r,dontDisableScrolling:n,onCancel:o,overlayStyle:a,style:i,testId:_,testIdForOverlay:s,theme:c})=>{const l=(0,external_react_.useRef)(null),u=(0,external_react_.useRef)(null);(0,external_react_.useEffect)(()=>(e&&o&&(window.addEventListener("scroll",o),window.addEventListener("wheel",o)),()=>{e&&o&&(window.removeEventListener("scroll",o),window.removeEventListener("wheel",o))}),[e,o]),(0,external_react_.useEffect)(()=>(n||document.body.classList.add(styles.scrollingDisabledByModal),()=>{n||document.body.classList.remove(styles.scrollingDisabledByModal)}),[n]);const d=(0,external_react_.useMemo)(()=>(0,jsx_runtime.jsx)("div",{onFocus:()=>{const e=l.current.querySelectorAll("*");for(let t=e.length-1;t>=0;--t)if(e[t].focus(),document.activeElement===e[t])return;u.current?.focus()},tabIndex:0}),[]);return external_react_dom_default().createPortal((0,jsx_runtime.jsxs)("div",{children:[d,(0,jsx_runtime.jsx)("div",{"aria-label":"Cancel",className:c.overlay,"data-testid":void 0,onClick:e=>{o&&(o(),e.stopPropagation())},onKeyDown:e=>{"Escape"===e.key&&o&&(o(),e.stopPropagation())},ref:e=>{e&&e!==u.current&&(u.current=e,e.focus())},role:"button",style:a,tabIndex:0}),(0,jsx_runtime.jsx)("div",{"aria-modal":"true",className:c.container,"data-testid":void 0,onClick:e=>{e.stopPropagation()},onWheel:e=>{e.stopPropagation()},ref:l,role:"dialog",style:i??r,children:t}),(0,jsx_runtime.jsx)("div",{onFocus:()=>{u.current?.focus()},tabIndex:0}),d]}),document.body)};var Modal=react_themes_default()(BaseModal,"Modal",base_theme),style={overlay:"jKsMKG"};function areEqual(e,t){return e?.left===t?.left&&e?.top===t?.top&&e?.width===t?.width}const Options=({containerClass:e,containerStyle:t,filter:r,onCancel:n,onChange:o,optionClass:a,options:i,ref:_})=>{const s=(0,external_react_.useRef)(null);(0,external_react_.useImperativeHandle)(_,()=>({measure:()=>{const e=s.current?.parentElement;if(!e)return;const t=s.current.getBoundingClientRect(),r=window.getComputedStyle(e),n=parseFloat(r.marginBottom),o=parseFloat(r.marginTop);return t.height+=n+o,t}}),[]);const c=[];for(const e of i)if(!r||r(e)){const[t,r]=optionValueName(e);c.push((0,jsx_runtime.jsx)("div",{className:a,onClick:e=>{o(t),e.stopPropagation()},onKeyDown:e=>{"Enter"===e.key&&(o(t),e.stopPropagation())},role:"button",tabIndex:0,children:r},t))}return(0,jsx_runtime.jsx)(BaseModal,{cancelOnScrolling:!0,dontDisableScrolling:!0,onCancel:n,style:t,theme:{ad:"",container:e,context:"",hoc:"",overlay:style.overlay},children:(0,jsx_runtime.jsx)("div",{ref:s,children:c})})};var CustomDropdown_Options=Options,theme={container:"oQKv0Y",context:"_9Tod5r",ad:"R58zIg",hoc:"O-Tp1i",label:"YUPUNs",dropdown:"pNEyAA",option:"LD2Kzy",select:"LP5azC",arrow:"-wscve",active:"k2UDsV",upward:"HWRvu4"};const BaseCustomDropdown=({filter:e,label:t,onChange:r,options:n,theme:o,value:a})=>{const[i,_]=(0,external_react_.useState)(!1),s=(0,external_react_.useRef)(null),c=(0,external_react_.useRef)(null),[l,u]=(0,external_react_.useState)(),[d,p]=(0,external_react_.useState)(!1);(0,external_react_.useEffect)(()=>{if(!i)return;let e;const t=()=>{const r=s.current?.getBoundingClientRect(),n=c.current?.measure();if(r&&n){const e=r.bottom+n.height<(window.visualViewport?.height??0),t=r.top-n.height>0,o=!e&&t;p(o);const a=o?{left:r.left,top:r.top-n.height-1,width:r.width}:{left:r.left,top:r.bottom,width:r.width};u(e=>areEqual(e,a)?e:a)}e=requestAnimationFrame(t)};return requestAnimationFrame(t),()=>{cancelAnimationFrame(e)}},[i]);const m=e=>{const t=window.visualViewport,r=s.current.getBoundingClientRect();_(!0),u({left:t?.width??0,top:t?.height??0,width:r.width}),e.stopPropagation()};let f=(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:""});for(const t of n)if(!e||e(t)){const[e,r]=optionValueName(t);if(e===a){f=r;break}}let h=o.container;i&&(h+=` ${o.active}`);let b=o.select??"";return d&&(h+=` ${o.upward}`,b+=` ${o.upward}`),(0,jsx_runtime.jsxs)("div",{className:h,children:[void 0===t?null:(0,jsx_runtime.jsx)("div",{className:o.label,children:t}),(0,jsx_runtime.jsxs)("div",{className:o.dropdown,onClick:m,onKeyDown:e=>{"Enter"===e.key&&m(e)},ref:s,role:"listbox",tabIndex:0,children:[f,(0,jsx_runtime.jsx)("div",{className:o.arrow})]}),i?(0,jsx_runtime.jsx)(CustomDropdown_Options,{containerClass:b,containerStyle:l,onCancel:()=>{_(!1)},onChange:e=>{_(!1),r&&r(e)},optionClass:o.option??"",options:n,ref:c}):null]})};var CustomDropdown=react_themes_default()(BaseCustomDropdown,"CustomDropdown",theme),NativeDropdown_theme={dropdown:"kI9A9U",context:"xHyZo4",ad:"ADu59e",hoc:"FTP2bb",arrow:"DubGkT",container:"WtSZPd",active:"ayMn7O",label:"K7JYKw",option:"_27pZ6W",hiddenOption:"clAKFJ",select:"N0Fc14",invalid:"wL4umU"};const Dropdown=({filter:e,label:t,onChange:r,options:n,testId:o,theme:a,value:i})=>{let _=!1;const s=[];for(const t of n)if(!e||e(t)){const[e,r]=optionValueName(t);_||=e===i,s.push((0,jsx_runtime.jsx)("option",{className:a.option,value:e,children:r},e))}const c=_?null:(0,jsx_runtime.jsx)("option",{className:a.hiddenOption,disabled:!0,value:i,children:i},"__reactUtilsHiddenOption");let l=a.select;return _||(l+=` ${a.invalid}`),(0,jsx_runtime.jsxs)("div",{className:a.container,children:[void 0===t?null:(0,jsx_runtime.jsx)("div",{className:a.label,children:t}),(0,jsx_runtime.jsxs)("div",{className:a.dropdown,children:[(0,jsx_runtime.jsxs)("select",{className:l,"data-testid":void 0,onChange:r,value:i,children:[c,s]}),(0,jsx_runtime.jsx)("div",{className:a.arrow})]})]})};var NativeDropdown=react_themes_default()(Dropdown,"Dropdown",NativeDropdown_theme),Switch_theme={container:"AWNvRj",context:"VMHfnP",ad:"HNliRC",hoc:"_2Ue-db",option:"fUfIAd",selected:"Wco-qk",options:"CZYtcC"};const BaseSwitch=({label:e,onChange:t,options:r,theme:n,value:o})=>{if(!r||!n.option)throw Error("Internal error");const a=[];for(const e of r){const[r,i]=optionValueName(e);let _,s=n.option;r===o?s+=` ${n.selected}`:t&&(_=()=>{t(r)}),a.push(_?(0,jsx_runtime.jsx)("div",{className:s,onClick:_,onKeyDown:e=>{"Enter"===e.key&&_()},role:"button",tabIndex:0,children:i},r):(0,jsx_runtime.jsx)("div",{className:s,children:i},r))}return(0,jsx_runtime.jsxs)("div",{className:n.container,children:[e?(0,jsx_runtime.jsx)("div",{className:n.label,children:e}):null,(0,jsx_runtime.jsx)("div",{className:n.options,children:a})]})};var Switch=react_themes_default()(BaseSwitch,"Switch",Switch_theme),external_react_router_=__webpack_require__(707),GenericLink_style={link:"zH52sA"};const GenericLink=({children:e,className:t,disabled:r,enforceA:n,keepScrollPosition:o,onClick:a,onMouseDown:i,openNewTab:_,replace:s,routerLinkType:c,to:l,...u})=>{if(r||n||_||l.match(/^(#|(https?|mailto):)/))return(0,jsx_runtime.jsx)("a",{className:(t?t+" ":"")+"zH52sA",href:l,onClick:r?e=>{e.preventDefault()}:a,onMouseDown:r?e=>{e.preventDefault()}:i,rel:"noopener noreferrer",target:_?"_blank":"",children:e});const d=c;return(0,jsx_runtime.jsx)(d,{className:t,discover:"none",onClick:e=>{a&&a(e),o||window.scroll(0,0)},onMouseDown:i,replace:s,to:l,...u,children:e})};var components_GenericLink=GenericLink;const Link=e=>(0,jsx_runtime.jsx)(components_GenericLink,{...e,routerLinkType:external_react_router_.Link});var components_Link=Link,Button_style={button:"E1FNQT",context:"KM0v4f",ad:"_3jm1-Q",hoc:"_0plpDL",active:"MAe9O6",disabled:"Br9IWV"};const BaseButton=({active:e,children:t,disabled:r,enforceA:n,keepScrollPosition:o,onClick:a,onKeyDown:i,onKeyUp:_,onMouseDown:s,onMouseUp:c,onPointerDown:l,onPointerUp:u,openNewTab:d,replace:p,testId:m,theme:f,to:h})=>{let b=f.button;if(e&&f.active&&(b+=` ${f.active}`),r)return f.disabled&&(b+=` ${f.disabled}`),(0,jsx_runtime.jsx)("div",{className:b,"data-testid":void 0,children:t});let x=i;return!x&&a&&(x=e=>{"Enter"===e.key&&a(e)}),h?(0,jsx_runtime.jsx)(components_Link,{className:b,"data-testid":void 0,enforceA:n,keepScrollPosition:o,onClick:a,onKeyUp:_,onMouseDown:s,onMouseUp:c,onPointerDown:l,onPointerUp:u,openNewTab:d,replace:p,to:h,children:t}):(0,jsx_runtime.jsx)("div",{className:b,"data-testid":void 0,onClick:a,onKeyDown:x,onKeyUp:_,onMouseDown:s,onMouseUp:c,onPointerDown:l,onPointerUp:u,role:"button",tabIndex:0,children:t})};var Button=react_themes_default()(BaseButton,"Button",Button_style),Checkbox_theme={checkbox:"A-f8qJ",context:"dNQcC6",ad:"earXxa",hoc:"qAPfQ6",indeterminate:"N9bCb8",container:"Kr0g3M",label:"_3dML-O",disabled:"EzQra1"};const Checkbox=({checked:e,disabled:t,label:r,onChange:n,testId:o,theme:a})=>{let i=a.container;t&&(i+=` ${a.disabled}`);let _=a.checkbox;return"indeterminate"===e&&(_+=` ${a.indeterminate}`),(0,jsx_runtime.jsxs)("div",{className:i,children:[void 0===r?null:(0,jsx_runtime.jsx)("div",{className:a.label,children:r}),(0,jsx_runtime.jsx)("input",{checked:void 0===e?void 0:!0===e,className:_,"data-testid":void 0,disabled:t,onChange:n,onClick:e=>{e.stopPropagation()},type:"checkbox"})]})};var components_Checkbox=react_themes_default()(Checkbox,"Checkbox",Checkbox_theme),Input_theme={container:"Cxx397",context:"X5WszA",ad:"_8s7GCr",hoc:"TVlBYc",children:"m4FpDO",input:"M07d4s",label:"gfbdq-",error:"p2idHY",errorMessage:"Q9uslG"};const Input=({children:e,error:t,label:r,ref:n,testId:o,theme:a,...i})=>{const[_,s]=(0,external_react_.useState)(!1),c=(0,external_react_.useRef)(null);let l=a.container;return _&&(l+=` ${a.focused}`),!i.value&&a.empty&&(l+=` ${a.empty}`),t&&(l+=` ${a.error}`),(0,jsx_runtime.jsxs)("div",{className:l,onFocus:()=>{"object"==typeof n?n?.current?.focus():c.current?.focus()},children:[void 0===r?null:(0,jsx_runtime.jsx)("div",{className:a.label,children:r}),(0,jsx_runtime.jsx)("input",{className:a.input,"data-testid":void 0,ref:n??c,...i,onBlur:a.focused?e=>{s(!1),i.onBlur?.(e)}:i.onBlur,onFocus:a.focused?e=>{s(!0),i.onFocus?.(e)}:i.onFocus}),t&&!0!==t?(0,jsx_runtime.jsx)("div",{className:a.errorMessage,children:t}):null,e?(0,jsx_runtime.jsx)("div",{className:a.children,children:e}):null]})};var components_Input=react_themes_default()(Input,"Input",Input_theme),PageLayout_base_theme={container:"T3cuHB",context:"m4mL-M",ad:"m3-mdC",hoc:"J15Z4H",mainPanel:"pPlQO2",sidePanel:"lqNh4h"};const PageLayout=({children:e,leftSidePanelContent:t,rightSidePanelContent:r,theme:n})=>(0,jsx_runtime.jsxs)("div",{className:n.container,children:[(0,jsx_runtime.jsx)("div",{className:[n.sidePanel,n.leftSidePanel].join(" "),children:t}),(0,jsx_runtime.jsx)("div",{className:n.mainPanel,children:e}),(0,jsx_runtime.jsx)("div",{className:[n.sidePanel,n.rightSidePanel].join(" "),children:r})]});var components_PageLayout=react_themes_default()(PageLayout,"PageLayout",PageLayout_base_theme);const NavLink=e=>(0,jsx_runtime.jsx)(components_GenericLink,{...e,routerLinkType:external_react_router_.NavLink});var components_NavLink=NavLink,Throbber_theme={container:"_7zdld4",context:"uIObt7",ad:"XIxe9o",hoc:"YOyORH",circle:"dBrB4g",bouncing:"TJe-6j"};const Throbber=({theme:e})=>(0,jsx_runtime.jsxs)("span",{className:e.container,children:[(0,jsx_runtime.jsx)("span",{className:e.circle}),(0,jsx_runtime.jsx)("span",{className:e.circle}),(0,jsx_runtime.jsx)("span",{className:e.circle})]});var components_Throbber=react_themes_default()(Throbber,"Throbber",Throbber_theme);let PLACEMENTS=function(e){return e.ABOVE_CURSOR="ABOVE_CURSOR",e.ABOVE_ELEMENT="ABOVE_ELEMENT",e.BELOW_CURSOR="BELOW_CURSOR",e.BELOW_ELEMENT="BELOW_ELEMENT",e}({});const ARROW_STYLE_DOWN=["border-bottom-color:transparent","border-left-color:transparent","border-right-color:transparent"].join(";"),ARROW_STYLE_UP=["border-top-color:transparent","border-left-color:transparent","border-right-color:transparent"].join(";");function calcTooltipRects(e){return{arrow:e.arrow.getBoundingClientRect(),container:e.container.getBoundingClientRect()}}function calcViewportRect(){const{scrollX:e,scrollY:t}=window,{documentElement:{clientHeight:r,clientWidth:n}}=document;return{bottom:t+r,left:e,right:e+n,top:t}}function calcPositionAboveXY(e,t,r){const{arrow:n,container:o}=r;return{arrowX:.5*(o.width-n.width),arrowY:o.height,containerX:e-o.width/2,containerY:t-o.height-n.height/1.5,baseArrowStyle:ARROW_STYLE_DOWN}}function setComponentPositions(e,t,r,n,o){const a=calcTooltipRects(o),i=calcViewportRect(),_=calcPositionAboveXY(e,t,a);if(_.containerX<i.left+6)_.containerX=i.left+6,_.arrowX=Math.max(6,e-_.containerX-a.arrow.width/2);else{const t=i.right-6-a.container.width;_.containerX>t&&(_.containerX=t,_.arrowX=Math.min(a.container.width-6,e-_.containerX-a.arrow.width/2))}_.containerY<i.top+6&&(_.containerY+=a.container.height+2*a.arrow.height,_.arrowY-=a.container.height+a.arrow.height,_.baseArrowStyle=ARROW_STYLE_UP);const s=`left:${_.containerX}px;top:${_.containerY}px`;o.container.setAttribute("style",s);const c=`${_.baseArrowStyle};left:${_.arrowX}px;top:${_.arrowY}px`;o.arrow.setAttribute("style",c)}const Tooltip=({children:e,ref:t,theme:r})=>{const n=(0,external_react_.useRef)(null),o=(0,external_react_.useRef)(null),a=(0,external_react_.useRef)(null),i=(e,t,r,i)=>{if(!n.current||!o.current||!a.current)throw Error("Internal error");setComponentPositions(e,t,r,i,{arrow:n.current,container:o.current,content:a.current})};return(0,external_react_.useImperativeHandle)(t,()=>({pointTo:i})),(0,external_react_dom_.createPortal)((0,jsx_runtime.jsxs)("div",{className:r.container,ref:o,children:[(0,jsx_runtime.jsx)("div",{className:r.arrow,ref:n}),(0,jsx_runtime.jsx)("div",{className:r.content,ref:a,children:e})]}),document.body)};var WithTooltip_Tooltip=Tooltip,default_theme={arrow:"M9gywF",ad:"_4xT7zE",hoc:"zd-vnH",context:"GdZucr",container:"f9gY8K",appearance:"L4ubm-",wrapper:"_4qDBRM"};const Wrapper=({children:e,placement:t=PLACEMENTS.ABOVE_CURSOR,tip:r,theme:n})=>{const{current:o}=(0,external_react_.useRef)({lastCursorX:0,lastCursorY:0,timerId:void 0,triggeredByTouch:!1}),a=(0,external_react_.useRef)(null),i=(0,external_react_.useRef)(null),[_,s]=(0,external_react_.useState)(!1);return(0,external_react_.useEffect)(()=>{if(_&&null!==r){a.current&&a.current.pointTo(o.lastCursorX+window.scrollX,o.lastCursorY+window.scrollY,t,i.current);const e=()=>{s(!1)};return window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}}},[o.lastCursorX,o.lastCursorY,t,_,r]),(0,jsx_runtime.jsxs)("div",{className:n.wrapper,onClick:()=>{o.timerId&&(clearTimeout(o.timerId),o.timerId=void 0,o.triggeredByTouch=!1)},onMouseLeave:()=>{s(!1)},onMouseMove:e=>{((e,r)=>{if(_){const n=i.current.getBoundingClientRect();e<n.left||e>n.right||r<n.top||r>n.bottom?s(!1):a.current&&a.current.pointTo(e+window.scrollX,r+window.scrollY,t,i.current)}else o.lastCursorX=e,o.lastCursorY=r,o.triggeredByTouch?o.timerId??=setTimeout(()=>{o.triggeredByTouch=!1,o.timerId=void 0,s(!0)},300):s(!0)})(e.clientX,e.clientY)},onTouchStart:()=>{o.triggeredByTouch=!0},ref:i,role:"presentation",children:[_&&null!==r?(0,jsx_runtime.jsx)(WithTooltip_Tooltip,{ref:a,theme:n,children:r}):null,e]})},ThemedWrapper=react_themes_default()(Wrapper,"WithTooltip",default_theme),e=ThemedWrapper;e.PLACEMENTS=PLACEMENTS;var WithTooltip=e,external_qs_=__webpack_require__(360),external_qs_default=__webpack_require__.n(external_qs_),base={container:"sXHM81",context:"veKyYi",ad:"r3ABzd",hoc:"YKcPnR",video:"SlV2zw"},throbber={container:"jTxmOX",context:"dzIcLh",ad:"_5a9XX1",hoc:"_7sH52O"};const YouTubeVideo=({autoplay:e,src:t,theme:r,title:n})=>{const o=t.split("?");let[a]=o;const[,i]=o,_=i?external_qs_default().parse(i):{},s=_.v??a?.match(/\/([a-zA-Z0-9-_]*)$/)?.[1];return a=`https://www.youtube.com/embed/${s}`,delete _.v,_.autoplay=e?"1":"0",a+=`?${external_qs_default().stringify(_)}`,(0,jsx_runtime.jsxs)("div",{className:r.container,children:[(0,jsx_runtime.jsx)(components_Throbber,{theme:throbber}),(0,jsx_runtime.jsx)("iframe",{allow:"autoplay",allowFullScreen:!0,className:r.video,src:a,title:n})]})};var components_YouTubeVideo=react_themes_default()(YouTubeVideo,"YouTubeVideo",base),TextArea_style={container:"dzMVIB",context:"KVPc7g",ad:"z2GQ0Z",hoc:"_8R1Qdj",label:"Vw9EKL",textarea:"zd-OFg",error:"K2JcEY",errorMessage:"nWsJDB",hidden:"GiHBXI"};const TextArea=({disabled:e,error:t,label:r,onBlur:n,onChange:o,onKeyDown:a,placeholder:i,testId:_,theme:s,value:c})=>{const l=(0,external_react_.useRef)(null),[u,d]=(0,external_react_.useState)(),p=(0,external_react_.useRef)(null),[m,f]=(0,external_react_.useState)(c??"");void 0!==c&&m!==c&&f(c),(0,external_react_.useEffect)(()=>{const e=l.current;if(!e)return;const t=new ResizeObserver(()=>{d(e.scrollHeight)});return t.observe(e),()=>{t.disconnect()}},[]),(0,external_react_.useLayoutEffect)(()=>{const e=l.current;e&&d(e.scrollHeight)},[m]);let h=s.container;return t&&(h+=` ${s.error}`),(0,jsx_runtime.jsxs)("div",{className:h,onFocus:()=>{p.current?.focus()},children:[void 0===r?null:(0,jsx_runtime.jsx)("div",{className:s.label,children:r}),(0,jsx_runtime.jsx)("textarea",{className:`${s.textarea} ${s.hidden}`,readOnly:!0,ref:l,tabIndex:-1,value:m||" "}),(0,jsx_runtime.jsx)("textarea",{className:s.textarea,"data-testid":void 0,disabled:e,onBlur:n,onChange:void 0===c?e=>{f(e.target.value)}:o,onKeyDown:a,placeholder:i,ref:p,style:{height:u},value:m}),t&&!0!==t?(0,jsx_runtime.jsx)("div",{className:s.errorMessage,children:t}):null]})};var components_TextArea=react_themes_default()(TextArea,"TextArea",TextArea_style),src_dirname="/";if(__webpack_require__.g.REACT_UTILS_LIBRARY_LOADED)throw Error("React utils library is already loaded");__webpack_require__.g.REACT_UTILS_LIBRARY_LOADED=!0;const server=webpack.requireWeak("./server",src_dirname),client=server?void 0:__webpack_require__(969).A;return __webpack_exports__}()});
|
|
3
3
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,EAAE2O,OAAOjU,QACrBuP,EAERb,UAAWA,EACXtD,YAAaA,EACbtK,IAAKsa,EACLrO,MAAO,CAAEsD,UACTrQ,MAAOqb,IAERjG,IAAmB,IAAVA,GACN1R,EAAAA,YAAAA,KAAA,OAAK4K,UAAWpB,EAAMyI,aAAa7R,SAAEsR,IACrC,SAKV,wBAAenJ,sBAAf,CAAsBgP,SAAU,WAAYrI,gB,gBC/H5C,GAAIhU,oBAAAA,EAAOqd,2BACT,MAAM/b,MAAM,yCACPtB,oBAAAA,EAAOqd,4BAA6B,EAE3C,MAAMC,OAASC,QAAQpd,YAAmC,WAAYqd,aAEhEC,OAASH,YACX5a,EAGChE,oBAAAA,KAAAA,E","sources":["webpack://@dr.pogodin/react-utils/webpack/universalModuleDefinition","webpack://@dr.pogodin/react-utils/./src/shared/utils/isomorphy/environment-check.ts","webpack://@dr.pogodin/react-utils/external umd \"@dr.pogodin/react-global-state\"","webpack://@dr.pogodin/react-utils/./src/shared/utils/webpack.ts","webpack://@dr.pogodin/react-utils/external umd \"react\"","webpack://@dr.pogodin/react-utils/external umd \"dayjs\"","webpack://@dr.pogodin/react-utils/./node_modules/react/cjs/react-jsx-runtime.production.js","webpack://@dr.pogodin/react-utils/external umd \"react-dom/client\"","webpack://@dr.pogodin/react-utils/external umd \"@dr.pogodin/react-helmet\"","webpack://@dr.pogodin/react-utils/external umd \"qs\"","webpack://@dr.pogodin/react-utils/external umd \"cookie\"","webpack://@dr.pogodin/react-utils/external umd \"react-dom\"","webpack://@dr.pogodin/react-utils/./src/shared/utils/isomorphy/buildInfo.ts","webpack://@dr.pogodin/react-utils/./src/client/getInj.ts","webpack://@dr.pogodin/react-utils/external umd \"react-router\"","webpack://@dr.pogodin/react-utils/./src/shared/utils/isomorphy/index.ts","webpack://@dr.pogodin/react-utils/external umd \"node-forge/lib/forge\"","webpack://@dr.pogodin/react-utils/external umd \"@dr.pogodin/react-themes\"","webpack://@dr.pogodin/react-utils/external umd \"@dr.pogodin/js-utils\"","webpack://@dr.pogodin/react-utils/./node_modules/react/jsx-runtime.js","webpack://@dr.pogodin/react-utils/external umd \"node-forge/lib/aes\"","webpack://@dr.pogodin/react-utils/./src/client/index.tsx","webpack://@dr.pogodin/react-utils/webpack/bootstrap","webpack://@dr.pogodin/react-utils/webpack/runtime/compat get default export","webpack://@dr.pogodin/react-utils/webpack/runtime/define property getters","webpack://@dr.pogodin/react-utils/webpack/runtime/global","webpack://@dr.pogodin/react-utils/webpack/runtime/hasOwnProperty shorthand","webpack://@dr.pogodin/react-utils/webpack/runtime/make namespace object","webpack://@dr.pogodin/react-utils/./src/styles/global.scss?d31e","webpack://@dr.pogodin/react-utils/./src/shared/utils/config.ts","webpack://@dr.pogodin/react-utils/./src/shared/utils/globalState.ts","webpack://@dr.pogodin/react-utils/./src/shared/utils/time.ts","webpack://@dr.pogodin/react-utils/./src/shared/utils/splitComponent.tsx","webpack://@dr.pogodin/react-utils/./src/shared/utils/index.ts","webpack://@dr.pogodin/react-utils/./src/shared/components/selectors/common.ts","webpack://@dr.pogodin/react-utils/./src/shared/components/Modal/base-theme.scss?3336","webpack://@dr.pogodin/react-utils/./src/shared/components/Modal/styles.scss?66aa","webpack://@dr.pogodin/react-utils/./src/shared/components/Modal/index.tsx","webpack://@dr.pogodin/react-utils/./src/shared/components/selectors/CustomDropdown/Options/style.scss?8cb9","webpack://@dr.pogodin/react-utils/./src/shared/components/selectors/CustomDropdown/Options/index.tsx","webpack://@dr.pogodin/react-utils/./src/shared/components/selectors/CustomDropdown/theme.scss?f940","webpack://@dr.pogodin/react-utils/./src/shared/components/selectors/CustomDropdown/index.tsx","webpack://@dr.pogodin/react-utils/./src/shared/components/selectors/NativeDropdown/theme.scss?47e7","webpack://@dr.pogodin/react-utils/./src/shared/components/selectors/NativeDropdown/index.tsx","webpack://@dr.pogodin/react-utils/./src/shared/components/selectors/Switch/theme.scss?69a8","webpack://@dr.pogodin/react-utils/./src/shared/components/selectors/Switch/index.tsx","webpack://@dr.pogodin/react-utils/./src/shared/components/GenericLink/style.scss?4542","webpack://@dr.pogodin/react-utils/./src/shared/components/GenericLink/index.tsx","webpack://@dr.pogodin/react-utils/./src/shared/components/Link.tsx","webpack://@dr.pogodin/react-utils/./src/shared/components/Button/style.scss?4dfe","webpack://@dr.pogodin/react-utils/./src/shared/components/Button/index.tsx","webpack://@dr.pogodin/react-utils/./src/shared/components/Checkbox/theme.scss?3b99","webpack://@dr.pogodin/react-utils/./src/shared/components/Checkbox/index.tsx","webpack://@dr.pogodin/react-utils/./src/shared/components/Input/theme.scss?9ab5","webpack://@dr.pogodin/react-utils/./src/shared/components/Input/index.tsx","webpack://@dr.pogodin/react-utils/./src/shared/components/PageLayout/base-theme.scss?2bfa","webpack://@dr.pogodin/react-utils/./src/shared/components/PageLayout/index.tsx","webpack://@dr.pogodin/react-utils/./src/shared/components/NavLink.tsx","webpack://@dr.pogodin/react-utils/./src/shared/components/Throbber/theme.scss?14fa","webpack://@dr.pogodin/react-utils/./src/shared/components/Throbber/index.tsx","webpack://@dr.pogodin/react-utils/./src/shared/components/WithTooltip/Tooltip.tsx","webpack://@dr.pogodin/react-utils/./src/shared/components/WithTooltip/default-theme.scss?0cd4","webpack://@dr.pogodin/react-utils/./src/shared/components/WithTooltip/index.tsx","webpack://@dr.pogodin/react-utils/./src/shared/components/YouTubeVideo/base.scss?60f0","webpack://@dr.pogodin/react-utils/./src/shared/components/YouTubeVideo/throbber.scss?a205","webpack://@dr.pogodin/react-utils/./src/shared/components/YouTubeVideo/index.tsx","webpack://@dr.pogodin/react-utils/./src/shared/components/TextArea/style.scss?7f40","webpack://@dr.pogodin/react-utils/./src/shared/components/TextArea/index.tsx","webpack://@dr.pogodin/react-utils/./src/index.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"@dr.pogodin/js-utils\"), require(\"@dr.pogodin/react-global-state\"), require(\"@dr.pogodin/react-helmet\"), require(\"@dr.pogodin/react-themes\"), require(\"cookie\"), require(\"dayjs\"), require(\"node-forge/lib/aes\"), require(\"node-forge/lib/forge\"), require(\"qs\"), require(\"react\"), require(\"react-dom\"), require(\"react-dom/client\"), require(\"react-router\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"@dr.pogodin/js-utils\", \"@dr.pogodin/react-global-state\", \"@dr.pogodin/react-helmet\", \"@dr.pogodin/react-themes\", \"cookie\", \"dayjs\", \"node-forge/lib/aes\", \"node-forge/lib/forge\", \"qs\", \"react\", \"react-dom\", \"react-dom/client\", \"react-router\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"@dr.pogodin/react-utils\"] = factory(require(\"@dr.pogodin/js-utils\"), require(\"@dr.pogodin/react-global-state\"), require(\"@dr.pogodin/react-helmet\"), require(\"@dr.pogodin/react-themes\"), require(\"cookie\"), require(\"dayjs\"), require(\"node-forge/lib/aes\"), require(\"node-forge/lib/forge\"), require(\"qs\"), require(\"react\"), require(\"react-dom\"), require(\"react-dom/client\"), require(\"react-router\"));\n\telse\n\t\troot[\"@dr.pogodin/react-utils\"] = factory(root[\"@dr.pogodin/js-utils\"], root[\"@dr.pogodin/react-global-state\"], root[\"@dr.pogodin/react-helmet\"], root[\"@dr.pogodin/react-themes\"], root[\"cookie\"], root[\"dayjs\"], root[\"node-forge/lib/aes\"], root[\"node-forge/lib/forge\"], root[\"qs\"], root[\"react\"], root[\"react-dom\"], root[\"react-dom/client\"], root[\"react-router\"]);\n})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE__864__, __WEBPACK_EXTERNAL_MODULE__126__, __WEBPACK_EXTERNAL_MODULE__264__, __WEBPACK_EXTERNAL_MODULE__859__, __WEBPACK_EXTERNAL_MODULE__462__, __WEBPACK_EXTERNAL_MODULE__185__, __WEBPACK_EXTERNAL_MODULE__958__, __WEBPACK_EXTERNAL_MODULE__814__, __WEBPACK_EXTERNAL_MODULE__360__, __WEBPACK_EXTERNAL_MODULE__155__, __WEBPACK_EXTERNAL_MODULE__514__, __WEBPACK_EXTERNAL_MODULE__236__, __WEBPACK_EXTERNAL_MODULE__707__) {\nreturn ","// Checks for client- vs. server-side environment detection.\n\n/**\n * `true` within client-side environment (browser), `false` at server-side.\n */\nexport const IS_CLIENT_SIDE: boolean = typeof process !== 'object'\n // NOTE: Because in this case we assume the host environment might be partially\n // polyfilled to emulate some Node interfaces, thus it might have global `process`\n // object, but without `versions` sub-object inside it.\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n || !process.versions?.node\n || !!global.REACT_UTILS_FORCE_CLIENT_SIDE\n || typeof REACT_UTILS_WEBPACK_BUNDLE !== 'undefined';\n\n/**\n * `true` within the server-side environment (node), `false` at client-side.\n */\nexport const IS_SERVER_SIDE: boolean = !IS_CLIENT_SIDE;\n","module.exports = __WEBPACK_EXTERNAL_MODULE__126__;","import type PathNS from 'node:path';\n\nimport { IS_CLIENT_SIDE } from './isomorphy';\n\ntype RequireWeakOptionsT = {\n basePath?: string;\n};\n\ntype RequireWeakResT<T> = T extends { default: infer D }\n ? (D extends null | undefined ? T : D & Omit<T, 'default'>)\n : T;\n\n/**\n * Requires the specified module without including it into the bundle during\n * Webpack build.\n * @param modulePath\n * @param [basePath]\n * @return Required module.\n */\nexport function requireWeak<T extends object>(\n modulePath: string,\n\n // TODO: For now `basePath` can be provided directly as a string here,\n // for backward compatibility. Deprecate it in future, if any other\n // breaking changes are done for requireWeak().\n basePathOrOptions?: string | RequireWeakOptionsT,\n): RequireWeakResT<T> | null {\n if (IS_CLIENT_SIDE) return null;\n\n let basePath: string | undefined;\n let ops: RequireWeakOptionsT;\n if (typeof basePathOrOptions === 'string') {\n basePath = basePathOrOptions;\n } else {\n ops = basePathOrOptions ?? {};\n ({ basePath } = ops);\n }\n\n // eslint-disable-next-line no-eval\n const req = eval('require') as (path: string) => unknown;\n\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const { resolve } = req('path') as typeof PathNS;\n\n const path = basePath ? resolve(basePath, modulePath) : modulePath;\n const module = req(path) as T;\n\n if (!('default' in module) || !module.default) return module as RequireWeakResT<T>;\n\n const { default: def, ...named } = module;\n\n const res = def as RequireWeakResT<T>;\n\n Object.entries(named).forEach(([name, value]) => {\n const assigned = res[name as keyof RequireWeakResT<T>];\n if (assigned) (res[name as keyof RequireWeakResT<T>] as unknown) = value;\n else if (assigned !== value) {\n throw Error('Conflict between default and named exports');\n }\n });\n return res;\n}\n\n/**\n * Resolves specified module path with help of Babel's module resolver.\n * Yes, the function itself just returns its argument to the caller, but Babel\n * is configured to resolve the first argument of resolveWeak(..) function, thus\n * the result will be the resolved path.\n * @param {string} modulePath\n * @return {string} Absolute or relative path to the module.\n */\nexport function resolveWeak(modulePath: string): string {\n return modulePath;\n}\n","module.exports = __WEBPACK_EXTERNAL_MODULE__155__;","module.exports = __WEBPACK_EXTERNAL_MODULE__185__;","/**\n * @license React\n * react-jsx-runtime.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\");\nfunction jsxProd(type, config, maybeKey) {\n var key = null;\n void 0 !== maybeKey && (key = \"\" + maybeKey);\n void 0 !== config.key && (key = \"\" + config.key);\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n config = maybeKey.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== config ? config : null,\n props: maybeKey\n };\n}\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsxProd;\nexports.jsxs = jsxProd;\n","module.exports = __WEBPACK_EXTERNAL_MODULE__236__;","module.exports = __WEBPACK_EXTERNAL_MODULE__264__;","module.exports = __WEBPACK_EXTERNAL_MODULE__360__;","module.exports = __WEBPACK_EXTERNAL_MODULE__462__;","module.exports = __WEBPACK_EXTERNAL_MODULE__514__;","// Encapsulates access to \"Build Info\" data.\n\n// BEWARE: This should match the type of build info object generated by\n// Webpack build (see \"/config/webpack/app-base.js\"), and currently this\n// match is not checked automatically.\nexport type BuildInfoT = {\n key: string;\n publicPath: string;\n timestamp: string;\n useServiceWorker: boolean;\n};\n\n// Depending on the build mode & environment, BUILD_INFO is either a global\n// variable defined at the app launch, or it is replaced by the actual value\n// by the Webpack build.\ndeclare const BUILD_INFO: BuildInfoT | undefined;\n\nlet buildInfo: BuildInfoT | undefined;\n\n// On the client side \"BUILD_INFO\" should be injected by Webpack. Note, however,\n// that in test environment we may need situations were environment is mocked as\n// client-side, although no proper Webpack compilation is executed, thus no info\n// injected; because of this we don't do a hard environment check here.\nif (typeof BUILD_INFO !== 'undefined') buildInfo = BUILD_INFO;\n\n/**\n * In scenarious where \"BUILD_INFO\" is not injected by Webpack (server-side,\n * tests, etc.) we expect the host codebase to explicitly set it before it is\n * ever requested. As a precaution, this function throws if build info has been\n * set already, unless `force` flag is explicitly set.\n * @param info\n * @param force\n */\nexport function setBuildInfo(info?: BuildInfoT, force = false): void {\n if (buildInfo !== undefined && !force) {\n throw Error('\"Build Info\" is already initialized');\n }\n buildInfo = info;\n}\n\n/**\n * Returns \"Build Info\" object; throws if it has not been initialized yet.\n * @returns\n */\nexport function getBuildInfo(): BuildInfoT {\n if (buildInfo === undefined) {\n throw Error('\"Build Info\" has not been initialized yet');\n }\n return buildInfo;\n}\n","// Encapsulates retrieval of server-side data injection into HTML template.\n\n/* global document */\n\n// Note: this way, only required part of \"node-forge\": AES, and some utils,\n// is bundled into client-side code.\nimport forge from 'node-forge/lib/forge';\n\n// eslint-disable-next-line import/no-unassigned-import\nimport 'node-forge/lib/aes';\n\nimport type { InjT } from 'utils/globalState';\n\nimport { getBuildInfo } from 'utils/isomorphy/buildInfo';\n\n// Safeguard is needed here, because the server-side version of Docusaurus docs\n// is compiled (at least now) with settings suggesting it is a client-side\n// environment, but there is no document.\nlet inj: InjT = {};\n\nconst metaElement: HTMLMetaElement | null = typeof document === 'undefined'\n ? null : document.querySelector('meta[itemprop=\"drpruinj\"]');\n\nif (metaElement) {\n metaElement.remove();\n let data = forge.util.decode64(metaElement.content);\n\n const { key } = getBuildInfo();\n const d = forge.cipher.createDecipher('AES-CBC', key);\n d.start({ iv: data.slice(0, key.length) });\n d.update(forge.util.createBuffer(data.slice(key.length)));\n d.finish();\n\n data = forge.util.decodeUtf8(d.output.data);\n\n // TODO: Double-check, if there is a safer alternative to parse it?\n // eslint-disable-next-line no-eval\n inj = eval(`(${data})`) as InjT;\n} else if (typeof window !== 'undefined' && window.REACT_UTILS_INJECTION) {\n inj = window.REACT_UTILS_INJECTION;\n delete window.REACT_UTILS_INJECTION;\n} else {\n // Otherwise, a bunch of dependent stuff will easily fail in non-standard\n // environments, where no client-side initialization is performed. Like tests,\n // Docusaurus examples, etc.\n inj = {};\n}\n\nexport default function getInj(): InjT {\n return inj;\n}\n","module.exports = __WEBPACK_EXTERNAL_MODULE__707__;","import { getBuildInfo } from './buildInfo';\nimport { IS_CLIENT_SIDE, IS_SERVER_SIDE } from './environment-check';\n\n/**\n * @ignore\n * @return {string} Code mode: \"development\" or \"production\".\n */\nfunction getMode() {\n return process.env.NODE_ENV;\n}\n\n/**\n * Returns `true` if development version of the code is running;\n * `false` otherwise.\n */\nexport function isDevBuild(): boolean {\n return getMode() === 'development';\n}\n\n/**\n * Returns `true` if production build of the code is running;\n * `false` otherwise.\n */\nexport function isProdBuild(): boolean {\n return getMode() === 'production';\n}\n\n/**\n * Returns build timestamp of the front-end JS bundle.\n * @return ISO date/time string.\n */\nexport function buildTimestamp(): string {\n return getBuildInfo().timestamp;\n}\n\nexport { IS_CLIENT_SIDE, IS_SERVER_SIDE, getBuildInfo };\n","module.exports = __WEBPACK_EXTERNAL_MODULE__814__;","module.exports = __WEBPACK_EXTERNAL_MODULE__859__;","module.exports = __WEBPACK_EXTERNAL_MODULE__864__;","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","module.exports = __WEBPACK_EXTERNAL_MODULE__958__;","// Initialization of client-side code.\n/* global document */\n\nimport type { ComponentType } from 'react';\nimport { createRoot, hydrateRoot } from 'react-dom/client';\nimport { HelmetProvider } from '@dr.pogodin/react-helmet';\nimport { BrowserRouter } from 'react-router';\n\nimport { GlobalStateProvider } from '@dr.pogodin/react-global-state';\n\nimport getInj from './getInj';\n\ntype OptionsT = {\n dontHydrate?: boolean;\n initialState?: unknown;\n};\n\n/**\n * Prepares and launches the app at client side.\n * @param Application Root application component\n * @param [options={}] Optional. Additional settings.\n */\nexport default function Launch(\n Application: ComponentType,\n options: OptionsT = {},\n): void {\n const container = document.getElementById('react-view');\n if (!container) throw Error('Failed to find container for React app');\n const scene = (\n <GlobalStateProvider initialState={getInj().ISTATE ?? options.initialState}>\n <BrowserRouter>\n <HelmetProvider>\n <Application />\n </HelmetProvider>\n </BrowserRouter>\n </GlobalStateProvider>\n );\n\n if (options.dontHydrate) {\n const root = createRoot(container);\n root.render(scene);\n } else hydrateRoot(container, scene);\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// extracted by mini-css-extract-plugin\nexport default {};","/* global document */\n\nimport type CookieM from 'cookie';\n\nimport { IS_CLIENT_SIDE } from './isomorphy/environment-check';\nimport { requireWeak } from './webpack';\n\n// TODO: The internal type casting is somewhat messed up here,\n// to be corrected later.\nconst config: Record<string, unknown> = (\n IS_CLIENT_SIDE\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n ? (require('client/getInj') as {\n default: () => Record<string, unknown>;\n }).default().CONFIG\n : requireWeak('config')\n) as (Record<string, unknown> | undefined) ?? ({} as Record<string, unknown>);\n\n// The safeguard for \"document\" is necessary because in non-Node environments,\n// like React Native, IS_CLIENT_SIDE is \"true\", however \"document\" and a bunch\n// of other browser-world features are not available.\nif (IS_CLIENT_SIDE && typeof document !== 'undefined') {\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n const cookie = require('cookie') as typeof CookieM;\n config.CSRF = cookie.parse(document.cookie).csrfToken;\n}\n\nexport default config;\n","import type { Request } from 'express';\n\nimport { type SsrContext, withGlobalStateType } from '@dr.pogodin/react-global-state';\n\n/** Mapping \"chunkName\" > array of asset paths. */\nexport type ChunkGroupsT = Record<string, string[]>;\n\n// The type of data object injected by server into generated markup.\nexport type InjT = {\n CHUNK_GROUPS?: ChunkGroupsT;\n CONFIG?: Record<string, unknown>;\n ISTATE?: unknown;\n};\n\ndeclare global {\n // eslint-disable-next-line @typescript-eslint/consistent-type-definitions\n interface Window {\n REACT_UTILS_INJECTION?: InjT;\n }\n}\n\n// TODO: Not 100% sure now, whether it indeed can be replaced by type,\n// or do we really need it to be an interface. Keeping the interface for now.\n// eslint-disable-next-line @typescript-eslint/consistent-type-definitions\nexport interface SsrContextT<StateT> extends SsrContext<StateT> {\n chunkGroups: ChunkGroupsT;\n chunks: string[];\n\n /** If set at the end of SSR, the rendered will trigger\n * server-side redirect to this URL (and use the status\n * code). */\n redirectTo?: string;\n\n req: Request;\n status: number;\n}\n\nconst {\n getSsrContext,\n} = withGlobalStateType<unknown, SsrContextT<unknown>>();\n\nexport {\n getSsrContext,\n};\n","import { serialize } from 'cookie';\nimport { useEffect } from 'react';\nimport dayjs from 'dayjs';\n\nimport {\n DAY_MS,\n HOUR_MS,\n MIN_MS,\n SEC_MS,\n YEAR_MS,\n timer,\n} from '@dr.pogodin/js-utils';\n\nimport { type ForceT, useGlobalState } from '@dr.pogodin/react-global-state';\n\nimport { getSsrContext } from './globalState';\n\n/**\n * This react hook wraps Date.now() function in a SSR friendly way,\n * ensuring that all calls to useCurrent() within the same render return\n * exactly the same time (which is retrieved from Date.now() first, and\n * then stored in the global state to be reused in all other calls), which\n * is also passed and used in the first client side render, and then updated\n * with a finite precision to avoid infinite re-rendering loops.\n */\n// TODO: Should we request the state type as generic parameter, to be able\n// to verify the give globalStatePath is correct?\nexport function useCurrent({\n autorefresh = false,\n globalStatePath = 'currentTime',\n precision = 5 * SEC_MS,\n} = {}): number {\n const [now, setter] = useGlobalState<ForceT, number>(\n globalStatePath,\n Date.now,\n );\n useEffect(() => {\n let timerId: NodeJS.Timeout | undefined;\n const update = (): void => {\n setter((old) => {\n const neu = Date.now();\n return Math.abs(neu - old) > precision ? neu : old;\n });\n if (autorefresh) timerId = setTimeout(update, precision);\n };\n update();\n return (): void => {\n if (timerId) clearTimeout(timerId);\n };\n }, [autorefresh, precision, setter]);\n return now;\n}\n\n/**\n * Wraps the standard Date.getTimezoneOffset() method in a SSR-friendly way.\n * This hook retrieves the offset value at the client side and uses a cookie\n * to pass it to the server in subsequent requests from that user. At the server\n * side the value from cookie is used in renders and passed back to the client\n * via the global state. Prior to the value being known (in the very first\n * request from the user, when the cookie is still missing), zero value is used\n * as the default value.\n */\n// TODO: Should we request the state type as generic parameter, to be able\n// to verify the give globalStatePath is correct?\nexport function useTimezoneOffset({\n cookieName = 'timezoneOffset',\n globalStatePath = 'timezoneOffset',\n} = {}): number {\n const ssrContext = getSsrContext(false);\n const [offset, setOffset] = useGlobalState<ForceT, number>(\n globalStatePath,\n () => {\n const value = cookieName\n && ssrContext?.req.cookies[cookieName] as string;\n return value ? parseInt(value) : 0;\n },\n );\n useEffect(() => {\n const date = new Date();\n const value = date.getTimezoneOffset();\n setOffset(value);\n if (cookieName) {\n document.cookie = serialize(cookieName, value.toString(), { path: '/' });\n }\n }, [cookieName, setOffset]);\n return offset;\n}\n\nconst time = {\n DAY_MS,\n HOUR_MS,\n MIN_MS,\n SEC_MS,\n YEAR_MS,\n now: Date.now,\n timer,\n useCurrent,\n useTimezoneOffset,\n};\n\nexport default Object.assign(dayjs, time);\n","/* global document */\n\nimport {\n type ComponentType,\n type FunctionComponent,\n type ReactNode,\n type RefObject,\n Suspense,\n lazy,\n useInsertionEffect,\n} from 'react';\n\nimport { Barrier } from '@dr.pogodin/js-utils';\n\nimport { type ChunkGroupsT, getSsrContext } from './globalState';\n\nimport {\n IS_CLIENT_SIDE,\n IS_SERVER_SIDE,\n getBuildInfo,\n} from './isomorphy';\n\n// Note: At the client side we can get chunk groups immediately when loading\n// the module; at the server-side we only can get them within React render flow.\n// Thus, we set and use the following variable at the client-side, and then when\n// needed on the server side, we'll fetch it differently.\nlet clientChunkGroups: ChunkGroupsT;\n\nif (IS_CLIENT_SIDE) {\n // TODO: Rewrite to avoid these overrides of ESLint rules.\n /* eslint-disable @typescript-eslint/no-unsafe-assignment,\n @typescript-eslint/no-require-imports,\n @typescript-eslint/no-unsafe-call,\n @typescript-eslint/no-unsafe-member-access */\n clientChunkGroups = require('client/getInj').default().CHUNK_GROUPS ?? {};\n /* eslint-enable @typescript-eslint/no-unsafe-assignment,\n @typescript-eslint/no-require-imports,\n @typescript-eslint/no-unsafe-call,\n @typescript-eslint/no-unsafe-member-access */\n}\n\nconst refCounts: Record<string, number> = {};\n\nfunction getPublicPath() {\n return getBuildInfo().publicPath;\n}\n\n/**\n * Client-side only! Ensures the specified CSS stylesheet is loaded into\n * the document; loads if it is missing; and does simple reference counting\n * to facilitate future clean-up.\n * @param name\n * @param loadedSheets\n * @param refCount\n * @return\n */\nfunction bookStyleSheet(\n name: string,\n loadedSheets: Set<string>,\n refCount: boolean,\n): Promise<void> | undefined {\n let res: Barrier<void> | undefined;\n const path = `${getPublicPath()}/${name}`;\n const fullPath = `${document.location.origin}${path}`;\n\n if (!loadedSheets.has(fullPath)) {\n let link = document.querySelector(`link[href=\"${path}\"]`);\n\n if (!link) {\n link = document.createElement('link');\n link.setAttribute('rel', 'stylesheet');\n link.setAttribute('href', path);\n document.head.appendChild(link);\n }\n\n res = new Barrier<void>();\n link.addEventListener('load', () => {\n if (!res) throw Error('Internal error');\n void res.resolve();\n });\n link.addEventListener('error', () => {\n if (!res) throw Error('Internal error');\n void res.resolve();\n });\n }\n\n if (refCount) {\n const current = refCounts[path] ?? 0;\n refCounts[path] = 1 + current;\n }\n\n return res;\n}\n\n/**\n * Generates the set of URLs for currently loaded, linked stylesheets.\n * @return\n */\nfunction getLoadedStyleSheets(): Set<string> {\n const res = new Set<string>();\n const { styleSheets } = document;\n for (const { href } of styleSheets) {\n if (href) res.add(href);\n }\n return res;\n}\n\nfunction assertChunkName(\n chunkName: string,\n chunkGroups: ChunkGroupsT,\n) {\n if (chunkGroups[chunkName]) return;\n throw Error(`Unknown chunk name \"${chunkName}\"`);\n}\n\n/**\n * Client-side only! Ensures all CSS stylesheets required for the specified\n * code chunk are loaded into the document; loads the missing ones; and does\n * simple reference counting to facilitate future clean-up.\n * @param chunkName Chunk name.\n * @param refCount\n * @return Resolves once all pending stylesheets, necessary for\n * the chunk, are either loaded, or failed to load.\n */\nexport async function bookStyleSheets(\n chunkName: string,\n chunkGroups: ChunkGroupsT,\n refCount: boolean,\n): Promise<void> {\n const promises = [];\n const assets = chunkGroups[chunkName];\n if (!assets) return Promise.resolve();\n\n const loadedSheets = getLoadedStyleSheets();\n\n for (const asset of assets) {\n if (asset.endsWith('.css')) {\n const promise = bookStyleSheet(asset, loadedSheets, refCount);\n if (promise) promises.push(promise);\n }\n }\n\n return promises.length\n ? Promise.allSettled(promises).then()\n : Promise.resolve();\n}\n\n/**\n * Client-side only! Frees from the document all CSS stylesheets that are\n * required by the specified chunk, and have reference counter equal to one\n * (for chunks with larger reference counter values, it just decrements\n * the reference counter).\n * @param {string} chunkName\n */\nexport function freeStyleSheets(\n chunkName: string,\n chunkGroups: ChunkGroupsT,\n): void {\n const assets = chunkGroups[chunkName];\n if (!assets) return;\n\n for (const asset of assets) {\n if (asset.endsWith('.css')) {\n const path = `${getPublicPath()}/${asset}`;\n\n const pathRefCount = refCounts[path];\n if (pathRefCount) {\n if (pathRefCount <= 1) {\n document.head.querySelector(`link[href=\"${path}\"]`)!.remove();\n delete refCounts[path];\n } else refCounts[path] = pathRefCount - 1;\n }\n }\n }\n}\n\n// Holds the set of chunk names already used for splitComponent() calls.\nconst usedChunkNames = new Set();\n\ntype ComponentOrModule<PropsT> = ComponentType<PropsT> | {\n default: ComponentType<PropsT>;\n};\n\n/**\n * Given an async component retrieval function `getComponent()` it creates\n * a special \"code split\" component, which uses <Suspense> to asynchronously\n * load on demand the code required by `getComponent()`.\n * @param options\n * @param options.chunkName\n * @param {function} options.getComponent\n * @param {React.Element} [options.placeholder]\n * @return {React.ElementType}\n */\nexport default function splitComponent<\n ComponentPropsT extends { children?: ReactNode; ref?: RefObject<unknown> },\n>({\n chunkName,\n getComponent,\n placeholder,\n}: {\n chunkName: string;\n getComponent: () => Promise<ComponentOrModule<ComponentPropsT>>;\n placeholder?: ReactNode;\n}): FunctionComponent<ComponentPropsT> {\n // On the client side we can check right away if the chunk name is known.\n if (IS_CLIENT_SIDE) assertChunkName(chunkName, clientChunkGroups);\n\n // The correct usage of splitComponent() assumes a single call per chunk.\n if (usedChunkNames.has(chunkName)) {\n throw Error(`Repeated splitComponent() call for the chunk \"${chunkName}\"`);\n } else usedChunkNames.add(chunkName);\n\n const LazyComponent = lazy(async () => {\n const resolved = await getComponent();\n const Component = 'default' in resolved ? resolved.default : resolved;\n\n // This pre-loads necessary stylesheets prior to the first mount of\n // the component (the lazy load function is executed by React one at\n // the frist mount).\n if (IS_CLIENT_SIDE) {\n await bookStyleSheets(chunkName, clientChunkGroups, false);\n }\n\n const Wrapper: FunctionComponent<ComponentPropsT> = ({\n children,\n ref,\n ...rest\n }) => {\n // On the server side we'll assert the chunk name here,\n // and also push it to the SSR chunks array.\n if (IS_SERVER_SIDE) {\n const { chunkGroups, chunks } = getSsrContext()!;\n assertChunkName(chunkName, chunkGroups);\n if (!chunks.includes(chunkName)) chunks.push(chunkName);\n }\n\n // This takes care about stylesheets management every time an instance of\n // this component is mounted / unmounted.\n useInsertionEffect(() => {\n void bookStyleSheets(chunkName, clientChunkGroups, true);\n return () => {\n freeStyleSheets(chunkName, clientChunkGroups);\n };\n }, []);\n\n return (\n <Component\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...(rest as unknown as ComponentPropsT)}\n ref={ref}\n >\n {children}\n </Component>\n );\n };\n\n return { default: Wrapper };\n });\n\n const CodeSplit: React.FunctionComponent<ComponentPropsT> = ({\n children,\n ...rest\n }: ComponentPropsT) => (\n <Suspense fallback={placeholder}>\n <LazyComponent\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...rest as Parameters<typeof LazyComponent>[0]}\n >\n {children}\n </LazyComponent>\n </Suspense>\n );\n\n return CodeSplit;\n}\n","import themedImpl, {\n COMPOSE,\n PRIORITY,\n type Theme,\n ThemeProvider,\n} from '@dr.pogodin/react-themes';\n\nimport config from './config';\nimport * as isomorphy from './isomorphy';\nimport time from './time';\nimport * as webpack from './webpack';\n\nexport {\n assertEmptyObject,\n type Listener,\n type ObjectKey,\n Barrier,\n Cached,\n Emitter,\n Semaphore,\n withRetries,\n} from '@dr.pogodin/js-utils';\n\nexport { getSsrContext } from './globalState';\nexport { default as splitComponent } from './splitComponent';\n\ntype ThemedT = typeof themedImpl & {\n COMPOSE: typeof COMPOSE;\n PRIORITY: typeof PRIORITY;\n};\n\nconst themed: ThemedT = themedImpl as ThemedT;\n\nthemed.COMPOSE = COMPOSE;\nthemed.PRIORITY = PRIORITY;\n\nexport {\n type Theme,\n config,\n isomorphy,\n themed,\n ThemeProvider,\n time,\n webpack,\n};\n","// The stuff common between different dropdown implementations.\n\nimport type { Theme } from '@dr.pogodin/react-themes';\n\ntype ThemeKeyT = 'active'\n | 'arrow'\n | 'container'\n | 'dropdown'\n | 'hiddenOption'\n | 'label'\n | 'option'\n | 'select'\n\n // TODO: This is currently only valid for (native) <Dropdown>,\n // other kinds of selectors should be evaluated, and aligned with this\n // feature, if appropriate.\n | 'invalid'\n\n // TODO: This is only valid for <CustomDropdown>, thus we need to re-factor it\n // into a separate theme spec for that component.\n | 'upward';\n\nexport type ValueT = number | string;\n\nexport type OptionT<NameT> = {\n name?: NameT | null;\n value: ValueT;\n};\n\nexport type OptionsT<NameT> = Readonly<Array<OptionT<NameT> | ValueT>>;\n\nexport type PropsT<\n NameT,\n OnChangeT = React.ChangeEventHandler<HTMLSelectElement>,\n> = {\n filter?: (item: OptionT<NameT> | ValueT) => boolean;\n label?: React.ReactNode;\n onChange?: OnChangeT;\n options: Readonly<OptionsT<NameT>>;\n testId?: string;\n theme: Theme<ThemeKeyT>;\n value?: ValueT;\n};\n\nfunction isValue<T>(x: OptionT<T> | ValueT): x is ValueT {\n const type = typeof x;\n return type === 'number' || type === 'string';\n}\n\n/** Returns option value and name as a tuple. */\nexport function optionValueName<NameT>(\n option: OptionT<NameT> | ValueT,\n): [ValueT, NameT | ValueT] {\n return isValue(option)\n ? [option, option]\n : [option.value, option.name ?? option.value];\n}\n","// extracted by mini-css-extract-plugin\nexport default {\"overlay\":\"ye2BZo\",\"context\":\"Szmbbz\",\"ad\":\"Ah-Nsc\",\"hoc\":\"Wki41G\",\"container\":\"gyZ4rc\"};","// extracted by mini-css-extract-plugin\nexport default {\"scrollingDisabledByModal\":\"_5fRFtF\"};","import {\n type CSSProperties,\n type FunctionComponent,\n type ReactNode,\n useEffect,\n useMemo,\n useRef,\n} from 'react';\n\nimport ReactDom from 'react-dom';\nimport themed, { type Theme } from '@dr.pogodin/react-themes';\n\nimport baseTheme from './base-theme.scss';\nimport S from './styles.scss';\n\ntype PropsT = {\n cancelOnScrolling?: boolean;\n children?: ReactNode;\n dontDisableScrolling?: boolean;\n onCancel?: () => void;\n overlayStyle?: CSSProperties;\n style?: CSSProperties;\n testId?: string;\n testIdForOverlay?: string;\n theme: Theme<'container' | 'overlay'>;\n\n /** @deprecated */\n containerStyle?: CSSProperties;\n};\n\n/**\n * The `<Modal>` component implements a simple themeable modal window, wrapped\n * into the default theme. `<BaseModal>` exposes the base non-themed component.\n * **Children:** Component children are rendered as the modal content.\n * @param {object} props Component properties. Beside props documented below,\n * [Other theming properties](https://www.npmjs.com/package/@dr.pogodin/react-themes#themed-component-properties) are supported as well.\n * @param {function} [props.onCancel] The callback to trigger when user\n * clicks outside the modal, or presses Escape. It is expected to hide the\n * modal.\n * @param {ModalTheme} [props.theme] _Ad hoc_ theme.\n */\nconst BaseModal: FunctionComponent<PropsT> = ({\n cancelOnScrolling,\n children,\n containerStyle,\n dontDisableScrolling,\n onCancel,\n overlayStyle,\n style,\n testId,\n testIdForOverlay,\n theme,\n}) => {\n const containerRef = useRef<HTMLDivElement | null>(null);\n const overlayRef = useRef<HTMLDivElement | null>(null);\n\n // Sets up modal cancellation of scrolling, if opted-in.\n useEffect(() => {\n if (cancelOnScrolling && onCancel) {\n window.addEventListener('scroll', onCancel);\n window.addEventListener('wheel', onCancel);\n }\n return () => {\n if (cancelOnScrolling && onCancel) {\n window.removeEventListener('scroll', onCancel);\n window.removeEventListener('wheel', onCancel);\n }\n };\n }, [cancelOnScrolling, onCancel]);\n\n // Disables window scrolling, if it is not opted-out.\n useEffect(() => {\n if (!dontDisableScrolling) {\n document.body.classList.add(S.scrollingDisabledByModal);\n }\n return () => {\n if (!dontDisableScrolling) {\n document.body.classList.remove(S.scrollingDisabledByModal);\n }\n };\n }, [dontDisableScrolling]);\n\n const focusLast = useMemo(() => (\n <div\n onFocus={() => {\n const elems = containerRef.current!.querySelectorAll('*');\n for (let i = elems.length - 1; i >= 0; --i) {\n (elems[i] as HTMLElement).focus();\n if (document.activeElement === elems[i]) return;\n }\n overlayRef.current?.focus();\n }}\n // TODO: Have a look at this later.\n // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex\n tabIndex={0}\n />\n ), []);\n\n return ReactDom.createPortal(\n (\n <div>\n {focusLast}\n <div\n aria-label=\"Cancel\"\n className={theme.overlay}\n data-testid={\n process.env.NODE_ENV === 'production'\n ? undefined : testIdForOverlay\n }\n onClick={(e) => {\n if (onCancel) {\n onCancel();\n e.stopPropagation();\n }\n }}\n onKeyDown={(e) => {\n if (e.key === 'Escape' && onCancel) {\n onCancel();\n e.stopPropagation();\n }\n }}\n ref={(node) => {\n if (node && node !== overlayRef.current) {\n overlayRef.current = node;\n node.focus();\n }\n }}\n role=\"button\"\n style={overlayStyle}\n tabIndex={0}\n />\n {\n // NOTE: These rules are disabled because our intention is to keep\n // the element non-interactive (thus not on the keyboard focus chain),\n // and it has `onClick` handler merely to stop propagation of click\n // events to its parent container. This is needed because, for example\n // when the modal is wrapped into an interactive element we don't want\n // any clicks inside the modal to bubble-up to that parent element\n // (because visually and logically the modal dialog does not belong\n // to its parent container, where it technically belongs from\n // the HTML mark-up perpective).\n }\n <div // eslint-disable-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions\n aria-modal=\"true\"\n className={theme.container}\n data-testid={process.env.NODE_ENV === 'production' ? undefined : testId}\n onClick={(e) => {\n e.stopPropagation();\n }}\n onWheel={(event) => {\n event.stopPropagation();\n }}\n ref={containerRef}\n role=\"dialog\"\n style={style ?? containerStyle}\n >\n {children}\n </div>\n <div\n onFocus={() => {\n overlayRef.current?.focus();\n }}\n // TODO: Have a look at this later.\n // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex\n tabIndex={0}\n />\n {focusLast}\n </div>\n ),\n document.body,\n );\n};\n\nexport default themed(BaseModal, 'Modal', baseTheme);\n\n/* Non-themed version of the Modal. */\nexport { BaseModal };\n","// extracted by mini-css-extract-plugin\nexport default {\"overlay\":\"jKsMKG\"};","import {\n type FunctionComponent,\n type ReactNode,\n type RefObject,\n useImperativeHandle,\n useRef,\n} from 'react';\n\nimport { BaseModal } from 'components/Modal';\n\nimport {\n type OptionT,\n type OptionsT,\n type ValueT,\n optionValueName,\n} from '../../common';\n\nimport S from './style.scss';\n\nexport type ContainerPosT = {\n left: number;\n top: number;\n width: number;\n};\n\nexport function areEqual(a?: ContainerPosT, b?: ContainerPosT): boolean {\n return a?.left === b?.left && a?.top === b?.top && a?.width === b?.width;\n}\n\nexport type RefT = {\n measure: () => DOMRect | undefined;\n};\n\ntype PropsT = {\n containerClass: string;\n containerStyle?: ContainerPosT;\n filter?: (item: OptionT<ReactNode> | ValueT) => boolean;\n optionClass: string;\n options: Readonly<OptionsT<ReactNode>>;\n onCancel: () => void;\n onChange: (value: ValueT) => void;\n ref?: RefObject<RefT | null>;\n};\n\nconst Options: FunctionComponent<PropsT> = ({\n containerClass,\n containerStyle,\n filter,\n onCancel,\n onChange,\n optionClass,\n options,\n ref,\n}) => {\n const opsRef = useRef<HTMLDivElement>(null);\n\n useImperativeHandle(ref, () => ({\n measure: () => {\n const e = opsRef.current?.parentElement;\n if (!e) return undefined;\n\n const rect = opsRef.current!.getBoundingClientRect();\n const style = window.getComputedStyle(e);\n const mBottom = parseFloat(style.marginBottom);\n const mTop = parseFloat(style.marginTop);\n\n rect.height += mBottom + mTop;\n\n return rect;\n },\n }), []);\n\n const optionNodes: ReactNode[] = [];\n for (const option of options) {\n if (!filter || filter(option)) {\n const [iValue, iName] = optionValueName(option);\n optionNodes.push(\n <div\n className={optionClass}\n key={iValue}\n onClick={(e) => {\n onChange(iValue);\n e.stopPropagation();\n }}\n onKeyDown={(e) => {\n if (e.key === 'Enter') {\n onChange(iValue);\n e.stopPropagation();\n }\n }}\n role=\"button\"\n tabIndex={0}\n >\n {iName}\n </div>,\n );\n }\n }\n\n return (\n <BaseModal\n // Closes the dropdown (cancels the selection) on any page scrolling attempt.\n // This is the same native <select> elements do on scrolling, and at least for\n // now we have no reason to deal with complications needed to support open\n // dropdowns during the scrolling (that would need to re-position it in\n // response to the position changes of the root dropdown element).\n cancelOnScrolling\n dontDisableScrolling\n onCancel={onCancel}\n style={containerStyle}\n theme={{\n ad: '',\n container: containerClass,\n context: '',\n hoc: '',\n overlay: S.overlay,\n }}\n >\n <div ref={opsRef}>{optionNodes}</div>\n </BaseModal>\n );\n};\n\nexport default Options;\n","// extracted by mini-css-extract-plugin\nexport default {\"container\":\"oQKv0Y\",\"context\":\"_9Tod5r\",\"ad\":\"R58zIg\",\"hoc\":\"O-Tp1i\",\"label\":\"YUPUNs\",\"dropdown\":\"pNEyAA\",\"option\":\"LD2Kzy\",\"select\":\"LP5azC\",\"arrow\":\"-wscve\",\"active\":\"k2UDsV\",\"upward\":\"HWRvu4\"};","import { useEffect, useRef, useState } from 'react';\n\nimport themed from '@dr.pogodin/react-themes';\n\nimport { type PropsT, type ValueT, optionValueName } from '../common';\n\nimport Options, { type ContainerPosT, type RefT, areEqual } from './Options';\n\nimport defaultTheme from './theme.scss';\n\nconst BaseCustomDropdown: React.FunctionComponent<\n PropsT<React.ReactNode, (value: ValueT) => void>\n> = ({\n filter,\n label,\n onChange,\n options,\n theme,\n value,\n}) => {\n const [active, setActive] = useState(false);\n\n const dropdownRef = useRef<HTMLDivElement>(null);\n const opsRef = useRef<RefT>(null);\n\n const [opsPos, setOpsPos] = useState<ContainerPosT>();\n const [upward, setUpward] = useState(false);\n\n useEffect(() => {\n if (!active) return undefined;\n\n let id: number;\n const cb = () => {\n const anchor = dropdownRef.current?.getBoundingClientRect();\n const opsRect = opsRef.current?.measure();\n if (anchor && opsRect) {\n const fitsDown = anchor.bottom + opsRect.height\n < (window.visualViewport?.height ?? 0);\n const fitsUp = anchor.top - opsRect.height > 0;\n\n const up = !fitsDown && fitsUp;\n setUpward(up);\n\n const pos = up ? {\n left: anchor.left,\n top: anchor.top - opsRect.height - 1,\n width: anchor.width,\n } : {\n left: anchor.left,\n top: anchor.bottom,\n width: anchor.width,\n };\n\n setOpsPos((now) => (areEqual(now, pos) ? now : pos));\n }\n id = requestAnimationFrame(cb);\n };\n requestAnimationFrame(cb);\n\n return () => {\n cancelAnimationFrame(id);\n };\n }, [active]);\n\n const openList = (\n e: React.KeyboardEvent<HTMLDivElement> | React.MouseEvent<HTMLDivElement>,\n ) => {\n const view = window.visualViewport;\n const rect = dropdownRef.current!.getBoundingClientRect();\n setActive(true);\n\n // NOTE: This first opens the dropdown off-screen, where it is measured\n // by an effect declared above, and then positioned below, or above\n // the original dropdown element, depending where it fits best\n // (if we first open it downward, it would flick if we immediately\n // move it above, at least with the current position update via local\n // react state, and not imperatively).\n setOpsPos({\n left: view?.width ?? 0,\n top: view?.height ?? 0,\n width: rect.width,\n });\n\n e.stopPropagation();\n };\n\n let selected: React.ReactNode = <>‌</>;\n for (const option of options) {\n if (!filter || filter(option)) {\n const [iValue, iName] = optionValueName(option);\n if (iValue === value) {\n selected = iName;\n break;\n }\n }\n }\n\n let containerClassName = theme.container;\n if (active) containerClassName += ` ${theme.active}`;\n\n let opsContainerClass = theme.select ?? '';\n if (upward) {\n containerClassName += ` ${theme.upward}`;\n opsContainerClass += ` ${theme.upward}`;\n }\n\n return (\n <div className={containerClassName}>\n {label === undefined ? null\n : <div className={theme.label}>{label}</div>}\n <div\n className={theme.dropdown}\n onClick={openList}\n onKeyDown={(e) => {\n if (e.key === 'Enter') openList(e);\n }}\n ref={dropdownRef}\n role=\"listbox\"\n tabIndex={0}\n >\n {selected}\n <div className={theme.arrow} />\n </div>\n {\n active ? (\n <Options\n containerClass={opsContainerClass}\n containerStyle={opsPos}\n onCancel={() => {\n setActive(false);\n }}\n onChange={(newValue) => {\n setActive(false);\n if (onChange) onChange(newValue);\n }}\n optionClass={theme.option ?? ''}\n options={options}\n ref={opsRef}\n />\n ) : null\n }\n </div>\n );\n};\n\nexport default themed(BaseCustomDropdown, 'CustomDropdown', defaultTheme);\n","// extracted by mini-css-extract-plugin\nexport default {\"dropdown\":\"kI9A9U\",\"context\":\"xHyZo4\",\"ad\":\"ADu59e\",\"hoc\":\"FTP2bb\",\"arrow\":\"DubGkT\",\"container\":\"WtSZPd\",\"active\":\"ayMn7O\",\"label\":\"K7JYKw\",\"option\":\"_27pZ6W\",\"hiddenOption\":\"clAKFJ\",\"select\":\"N0Fc14\",\"invalid\":\"wL4umU\"};","// Implements dropdown based on the native HTML <select> element.\n\nimport themed from '@dr.pogodin/react-themes';\n\nimport { type PropsT, optionValueName } from '../common';\n\nimport defaultTheme from './theme.scss';\n\n/**\n * Implements a themeable dropdown list. Internally it is rendered with help of\n * the standard HTML `<select>` element, thus the styling support is somewhat\n * limited.\n * @param [props] Component properties.\n * @param [props.filter] Options filter function. If provided, only\n * those elements of `options` list will be used by the dropdown, for which this\n * filter returns `true`.\n * @param [props.label] Dropdown label.\n * @param [props.onChange] Selection event handler.\n * @param [props.options=[]] Array of dropdown\n * options. For string elements the option value and name will be the same.\n * It is allowed to mix DropdownOption and string elements in the same option\n * list.\n * @param [props.theme] _Ad hoc_ theme.\n * @param [props.value] Currently selected value.\n * @param [props....]\n * [Other theming properties](https://www.npmjs.com/package/@dr.pogodin/react-themes#themed-component-properties)\n */\nconst Dropdown: React.FunctionComponent<PropsT<string>> = ({\n filter,\n label,\n onChange,\n options,\n testId,\n theme,\n value,\n}) => {\n let isValidValue = false;\n const optionElements = [];\n\n for (const option of options) {\n if (!filter || filter(option)) {\n const [iValue, iName] = optionValueName(option);\n isValidValue ||= iValue === value;\n optionElements.push(\n <option className={theme.option} key={iValue} value={iValue}>\n {iName}\n </option>,\n );\n }\n }\n\n // NOTE: This element represents the current `value` when it does not match\n // any valid option. In Chrome, and some other browsers, we are able to hide\n // it from the opened dropdown; in others, e.g. Safari, the best we can do is\n // to show it as disabled.\n const hiddenOption = isValidValue ? null : (\n <option\n className={theme.hiddenOption}\n disabled\n key=\"__reactUtilsHiddenOption\"\n value={value}\n >\n {value}\n </option>\n );\n\n let selectClassName = theme.select;\n if (!isValidValue) selectClassName += ` ${theme.invalid}`;\n\n return (\n <div className={theme.container}>\n { label === undefined\n ? null : <div className={theme.label}>{label}</div> }\n <div className={theme.dropdown}>\n <select\n className={selectClassName}\n data-testid={process.env.NODE_ENV === 'production' ? undefined : testId}\n onChange={onChange}\n value={value}\n >\n {hiddenOption}\n {optionElements}\n </select>\n <div className={theme.arrow} />\n </div>\n </div>\n );\n};\n\nexport default themed(Dropdown, 'Dropdown', defaultTheme);\n","// extracted by mini-css-extract-plugin\nexport default {\"container\":\"AWNvRj\",\"context\":\"VMHfnP\",\"ad\":\"HNliRC\",\"hoc\":\"_2Ue-db\",\"option\":\"fUfIAd\",\"selected\":\"Wco-qk\",\"options\":\"CZYtcC\"};","import themed, { type Theme } from '@dr.pogodin/react-themes';\n\nimport {\n type OptionsT,\n type ValueT,\n optionValueName,\n} from '../common';\n\nimport defaultTheme from './theme.scss';\n\ntype ThemeKeyT = 'container' | 'label' | 'option' | 'options' | 'selected';\n\ntype PropsT = {\n label?: React.ReactNode;\n onChange?: (value: ValueT) => void;\n options?: Readonly<OptionsT<React.ReactNode>>;\n theme: Theme<ThemeKeyT>;\n value?: ValueT;\n};\n\nconst BaseSwitch: React.FunctionComponent<PropsT> = ({\n label,\n onChange,\n options,\n theme,\n value,\n}) => {\n if (!options || !theme.option) throw Error('Internal error');\n\n const optionNodes: React.ReactNode[] = [];\n for (const option of options) {\n const [iValue, iName] = optionValueName(option);\n\n let className: string = theme.option;\n let onPress: (() => void) | undefined;\n if (iValue === value) className += ` ${theme.selected}`;\n else if (onChange) {\n onPress = () => {\n onChange(iValue);\n };\n }\n\n optionNodes.push(\n onPress\n ? (\n <div\n className={className}\n key={iValue}\n onClick={onPress}\n onKeyDown={(e) => {\n if (e.key === 'Enter') onPress();\n }}\n role=\"button\"\n tabIndex={0}\n >\n {iName}\n </div>\n )\n : <div className={className} key={iValue}>{iName}</div>,\n );\n }\n\n return (\n <div className={theme.container}>\n {label ? <div className={theme.label}>{label}</div> : null}\n\n <div className={theme.options}>\n {optionNodes}\n </div>\n </div>\n );\n};\n\nexport default themed(BaseSwitch, 'Switch', defaultTheme);\n","// extracted by mini-css-extract-plugin\nexport default {\"link\":\"zH52sA\"};","import type { ReactNode } from 'react';\n\nimport type {\n Link,\n LinkProps,\n NavLink,\n NavLinkProps,\n} from 'react-router';\n\nimport './style.scss';\n\ntype LinkT = typeof Link;\ntype NavLinkT = typeof NavLink;\n\ntype ToT = Parameters<typeof Link>[0]['to'];\n\nexport type PropsT = {\n children?: ReactNode;\n className?: string;\n disabled?: boolean;\n enforceA?: boolean;\n keepScrollPosition?: boolean;\n onClick?: React.MouseEventHandler<HTMLAnchorElement>;\n onMouseDown?: React.MouseEventHandler<HTMLAnchorElement>;\n openNewTab?: boolean;\n replace?: boolean;\n routerLinkType: LinkT | NavLinkT;\n to: ToT;\n};\n\n/**\n * The `<Link>` component, and almost identical `<NavLink>` component, are\n * auxiliary wrappers around\n * [React Router](https://github.com/ReactTraining/react-router)'s\n * `<Link>` and `<NavLink>` components; they help to handle external and\n * internal links in uniform manner.\n *\n * @param [props] Component properties.\n * @param [props.className] CSS classes to apply to the link.\n * @param [props.disabled] Disables the link.\n * @param [props.enforceA] `true` enforces rendering of the link as\n * a simple `<a>` element.\n * @param [props.keepScrollPosition] If `true`, and the link is\n * rendered as a React Router's component, it won't reset the viewport scrolling\n * position to the origin when clicked.\n * @param [props.onClick] Event handler to trigger upon click.\n * @param [props.onMouseDown] Event handler to trigger on MouseDown\n * event.\n * @param [props.openNewTab] If `true` the link opens in a new tab.\n * @param [props.replace] When `true`, the link will replace current\n * entry in the history stack instead of adding a new one.\n * @param [props.to] Link URL.\n * @param [props.activeClassName] **`<NavLink>`** only: CSS class(es)\n * to apply to rendered link when it is active.\n * @param [props.activeStyle] **`<NavLink>`** only: CSS styles\n * to apply to the rendered link when it is active.\n * @param [props.exact] **`<NavLink>`** only: if `true`, the active\n * class/style will only be applied if the location is matched exactly.\n * @param [props.isActive] **`<NavLink>`** only: Add extra\n * logic for determining whether the link is active. This should be used if you\n * want to do more than verify that the link’s pathname matches the current URL\n * pathname.\n * @param [props.location] **`<NavLink>`** only: `isActive` compares\n * current history location (usually the current browser URL). To compare to\n * a different location, a custom `location` can be passed.\n * @param [props.strict] **`<NavLink>`** only: . When `true`, trailing\n * slash on a location’s pathname will be taken into consideration when\n * determining if the location matches the current URL. See the `<Route strict>`\n * documentation for more information.\n */\nconst GenericLink = ({\n children,\n className,\n disabled,\n enforceA,\n keepScrollPosition,\n onClick,\n onMouseDown,\n openNewTab,\n replace,\n routerLinkType,\n to,\n ...rest\n}: (LinkProps | NavLinkProps) & PropsT): ReactNode => {\n /* Renders Link as <a> element if:\n * - It is opted explicitely by `enforceA` prop;\n * - It should be opened in a new tab;\n * - It is an absolte URL (starts with http:// or https://);\n * - It is anchor link (starts with #). */\n if (disabled || enforceA || openNewTab\n || (to as string).match(/^(#|(https?|mailto):)/)) {\n return (\n <a\n className={className}\n // TODO: This requires a fix: disabled is not really an attribute of <a>\n // tag, thus for disabled option we rather should render a plain text\n // styled as a link.\n // disabled={disabled}\n href={to as string}\n onClick={disabled ? (e) => {\n e.preventDefault();\n } : onClick}\n onMouseDown={disabled ? (e) => {\n e.preventDefault();\n } : onMouseDown}\n rel=\"noopener noreferrer\"\n styleName=\"link\"\n target={openNewTab ? '_blank' : ''}\n >\n {children}\n </a>\n );\n }\n\n const L = routerLinkType;\n\n return (\n <L\n className={className}\n discover=\"none\"\n // disabled\n onClick={(e: React.MouseEvent<HTMLAnchorElement>) => {\n // Executes the user-provided event handler, if any.\n if (onClick) onClick(e);\n\n // By default, clicking the link scrolls the page to beginning.\n if (!keepScrollPosition) window.scroll(0, 0);\n }}\n onMouseDown={onMouseDown}\n replace={replace}\n to={to}\n // TODO: Refactor it later.\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...rest}\n >\n {children}\n </L>\n );\n};\n\nexport default GenericLink;\n","/**\n * The Link wraps around React Router's Link component, to automatically replace\n * it by the regular <a> element when:\n * - The target reference points to another domain;\n * - User opts to open the reference in a new tab;\n * - User explicitely opts to use <a>.\n */\n\nimport { type LinkProps, Link as RrLink } from 'react-router';\n\nimport GenericLink, { type PropsT as GenericLinkPropsT } from './GenericLink';\n\ntype PropsT = Omit<GenericLinkPropsT, 'routerLinkType'> & LinkProps;\n\nconst Link: React.FunctionComponent<PropsT>\n = (props) => (\n <GenericLink\n // TODO: Avoid the spreading later.\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...props}\n routerLinkType={RrLink}\n />\n );\n\nexport default Link;\n","// extracted by mini-css-extract-plugin\nexport default {\"button\":\"E1FNQT\",\"context\":\"KM0v4f\",\"ad\":\"_3jm1-Q\",\"hoc\":\"_0plpDL\",\"active\":\"MAe9O6\",\"disabled\":\"Br9IWV\"};","// The <Button> component implements a standard button / button-like link.\n\nimport type {\n FunctionComponent,\n KeyboardEventHandler,\n MouseEventHandler,\n PointerEventHandler,\n ReactNode,\n} from 'react';\n\nimport themed, { type Theme } from '@dr.pogodin/react-themes';\n\nimport Link from 'components/Link';\n\nimport defaultTheme from './style.scss';\n\ntype PropsT = {\n active?: boolean;\n children?: ReactNode;\n disabled?: boolean;\n enforceA?: boolean;\n onClick?: MouseEventHandler & KeyboardEventHandler;\n onKeyDown?: KeyboardEventHandler;\n onKeyUp?: KeyboardEventHandler;\n onMouseDown?: MouseEventHandler;\n onMouseUp?: MouseEventHandler;\n onPointerDown?: PointerEventHandler;\n onPointerUp?: PointerEventHandler;\n openNewTab?: boolean;\n replace?: boolean;\n testId?: string;\n theme: Theme<'active' | 'button' | 'disabled'>;\n // TODO: It needs a more precise typing of the object option.\n to?: object | string;\n};\n\nexport const BaseButton: FunctionComponent<PropsT> = ({\n active,\n children,\n disabled,\n enforceA,\n onClick,\n onKeyDown: onKeyDownProp,\n onKeyUp,\n onMouseDown,\n onMouseUp,\n onPointerDown,\n onPointerUp,\n openNewTab,\n replace,\n testId,\n theme,\n to,\n}) => {\n let className = theme.button;\n if (active && theme.active) className += ` ${theme.active}`;\n if (disabled) {\n if (theme.disabled) className += ` ${theme.disabled}`;\n return (\n <div\n className={className}\n data-testid={process.env.NODE_ENV === 'production' ? undefined : testId}\n >\n {children}\n </div>\n );\n }\n\n let onKeyDown = onKeyDownProp;\n if (!onKeyDown && onClick) {\n onKeyDown = (e) => {\n if (e.key === 'Enter') onClick(e);\n };\n }\n\n if (to) {\n return (\n <Link\n className={className}\n data-testid={process.env.NODE_ENV === 'production' ? undefined : testId}\n enforceA={enforceA}\n onClick={onClick}\n\n // TODO: For now, the `onKeyDown` handler is not passed to the <Link>,\n // as <Link> component does not call it anyway, presumably due to\n // the inner implementation details. We should look into supporting it:\n // https://github.com/birdofpreyru/react-utils/issues/444\n // onKeyDown={onKeyDown}\n\n onKeyUp={onKeyUp}\n onMouseDown={onMouseDown}\n onMouseUp={onMouseUp}\n onPointerDown={onPointerDown}\n onPointerUp={onPointerUp}\n openNewTab={openNewTab}\n replace={replace}\n to={to}\n >\n {children}\n </Link>\n );\n }\n\n return (\n <div\n className={className}\n data-testid={process.env.NODE_ENV === 'production' ? undefined : testId}\n onClick={onClick}\n onKeyDown={onKeyDown}\n onKeyUp={onKeyUp}\n onMouseDown={onMouseDown}\n onMouseUp={onMouseUp}\n onPointerDown={onPointerDown}\n onPointerUp={onPointerUp}\n role=\"button\"\n tabIndex={0}\n >\n {children}\n </div>\n );\n};\n\n/**\n * Button component theme: a map of CSS\n * class names to append to button elements:\n * @prop {string} [active] to the root element of active button.\n * @prop {string} [button] to the root element of any button.\n * @prop {string} [disabled] to the root element of disabled button.\n */\nexport default themed(BaseButton, 'Button', defaultTheme);\n","// extracted by mini-css-extract-plugin\nexport default {\"checkbox\":\"A-f8qJ\",\"context\":\"dNQcC6\",\"ad\":\"earXxa\",\"hoc\":\"qAPfQ6\",\"indeterminate\":\"N9bCb8\",\"container\":\"Kr0g3M\",\"label\":\"_3dML-O\",\"disabled\":\"EzQra1\"};","import themed, { type Theme } from '@dr.pogodin/react-themes';\n\nimport defaultTheme from './theme.scss';\n\ntype PropT<ValueT> = {\n checked?: ValueT;\n disabled?: boolean;\n label?: React.ReactNode;\n onChange?: React.ChangeEventHandler<HTMLInputElement>;\n testId?: string;\n theme: Theme<\n | 'checkbox'\n | 'container'\n | 'disabled'\n | 'indeterminate'\n | 'label'\n >;\n};\n\nconst Checkbox = <ValueT extends boolean | 'indeterminate' = boolean>({\n checked,\n disabled,\n label,\n onChange,\n testId,\n theme,\n}: PropT<ValueT>) => {\n let containerClassName = theme.container;\n if (disabled) containerClassName += ` ${theme.disabled}`;\n\n let checkboxClassName = theme.checkbox;\n if (checked === 'indeterminate') checkboxClassName += ` ${theme.indeterminate}`;\n\n return (\n <div className={containerClassName}>\n { label === undefined\n ? null : <div className={theme.label}>{label}</div> }\n <input\n checked={checked === undefined ? undefined : checked === true}\n className={checkboxClassName}\n data-testid={process.env.NODE_ENV === 'production' ? undefined : testId}\n disabled={disabled}\n onChange={onChange}\n onClick={(e) => {\n e.stopPropagation();\n }}\n type=\"checkbox\"\n />\n </div>\n );\n};\n\nexport default themed(Checkbox, 'Checkbox', defaultTheme);\n","// extracted by mini-css-extract-plugin\nexport default {\"container\":\"Cxx397\",\"context\":\"X5WszA\",\"ad\":\"_8s7GCr\",\"hoc\":\"TVlBYc\",\"children\":\"m4FpDO\",\"input\":\"M07d4s\",\"label\":\"gfbdq-\",\"error\":\"p2idHY\",\"errorMessage\":\"Q9uslG\"};","import {\n type FunctionComponent,\n type ReactNode,\n type Ref,\n useRef,\n useState,\n} from 'react';\n\nimport themed, { type Theme } from '@dr.pogodin/react-themes';\n\nimport defaultTheme from './theme.scss';\n\ntype ThemeKeyT = 'children' | 'container' | 'empty' | 'error' | 'errorMessage'\n | 'focused' | 'input' | 'label';\n\ntype PropsT = React.InputHTMLAttributes<HTMLInputElement> & {\n children?: ReactNode;\n error?: ReactNode;\n label?: React.ReactNode;\n ref?: Ref<HTMLInputElement>;\n testId?: string;\n theme: Theme<ThemeKeyT>;\n};\n\n/**\n * Themeable input field, based on the standard HTML `<input>` element.\n * @param [props.label] Input label.\n * @param [props.theme] _Ad hoc_ theme.\n * @param [props...] [Other theming properties](https://www.npmjs.com/package/@dr.pogodin/react-themes#themed-component-properties)\n * @param [props...] Any other properties are passed to the underlying\n * `<input>` element.\n */\nconst Input: FunctionComponent<PropsT> = ({\n children,\n error,\n label,\n ref,\n testId,\n theme,\n ...rest\n}) => {\n // NOTE: As of now, it is only updated when \"theme.focused\" is defined,\n // as otherwise its value is not used.\n const [focused, setFocused] = useState(false);\n\n const localRef = useRef<HTMLInputElement>(null);\n\n let containerClassName = theme.container;\n\n // NOTE: As of now, \"focused\" can be true only when \"theme.focused\"\n // is provided.\n if (focused /* && theme.focused */) containerClassName += ` ${theme.focused}`;\n\n if (!rest.value && theme.empty) containerClassName += ` ${theme.empty}`;\n\n if (error) containerClassName += ` ${theme.error}`;\n\n return (\n <div\n className={containerClassName}\n onFocus={() => {\n // TODO: It does not really work if a callback-style `ref` is passed in,\n // we need a more complex logic to cover that case, but for now this serves\n // the case we need it for.\n if (typeof ref === 'object') ref?.current?.focus();\n else localRef.current?.focus();\n }}\n >\n {label === undefined ? null : <div className={theme.label}>{label}</div>}\n <input\n className={theme.input}\n data-testid={process.env.NODE_ENV === 'production' ? undefined : testId}\n ref={ref ?? localRef}\n\n // TODO: Avoid the spreading later.\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...rest}\n\n onBlur={theme.focused ? (e) => {\n setFocused(false);\n rest.onBlur?.(e);\n } : rest.onBlur}\n onFocus={theme.focused ? (e) => {\n setFocused(true);\n rest.onFocus?.(e);\n } : rest.onFocus}\n />\n {error && error !== true\n ? <div className={theme.errorMessage}>{error}</div>\n : null}\n {children ? <div className={theme.children}>{children}</div> : null}\n </div>\n );\n};\n\nexport default themed(Input, 'Input', defaultTheme);\n","// extracted by mini-css-extract-plugin\nexport default {\"container\":\"T3cuHB\",\"context\":\"m4mL-M\",\"ad\":\"m3-mdC\",\"hoc\":\"J15Z4H\",\"mainPanel\":\"pPlQO2\",\"sidePanel\":\"lqNh4h\"};","import type { ReactNode } from 'react';\n\nimport themed, { type Theme } from '@dr.pogodin/react-themes';\n\nimport baseTheme from './base-theme.scss';\n\ntype ThemeKeyT = 'container' | 'leftSidePanel' | 'mainPanel' | 'rightSidePanel'\n | 'sidePanel';\n\ntype PropsT = {\n children?: ReactNode;\n leftSidePanelContent?: ReactNode;\n rightSidePanelContent?: ReactNode;\n theme: Theme<ThemeKeyT>;\n};\n\n/**\n * Simple and themeable page layout. It keeps the main content centered in\n * a column of limited width, which fills entire viewport on small screens\n * (under `$screen-md = 1024px` size). At larger screens the column keeps\n * `$screen-md` size, and it is centered at the page, surrounded by side\n * panels, where additional content can be displayed.\n *\n * **Children:** Component children are rendered as the content of main panel.\n * @param {object} [props] Component properties.\n * @param {Node} [props.leftSidePanelContent] The content for left side panel.\n * @param {Node} [props.rightSidePanelContent] The content for right side panel.\n * @param {PageLayoutTheme} [props.theme] _Ad hoc_ theme.\n * @param {...any} [props....]\n * [Other theming properties](https://www.npmjs.com/package/@dr.pogodin/react-themes#themed-component-properties)\n */\nconst PageLayout: React.FunctionComponent<PropsT> = ({\n children,\n leftSidePanelContent,\n rightSidePanelContent,\n theme,\n}) => (\n <div className={theme.container}>\n <div className={[theme.sidePanel, theme.leftSidePanel].join(' ')}>\n {leftSidePanelContent}\n </div>\n <div className={theme.mainPanel}>\n {children}\n </div>\n <div className={[theme.sidePanel, theme.rightSidePanel].join(' ')}>\n {rightSidePanelContent}\n </div>\n </div>\n);\n\nexport default themed(PageLayout, 'PageLayout', baseTheme);\n","import { type NavLinkProps, NavLink as RrNavLink } from 'react-router';\n\nimport GenericLink, { type PropsT as GenericLinkPropsT } from './GenericLink';\n\ntype PropsT = Omit<GenericLinkPropsT, 'routerLinkType'> & NavLinkProps;\n\nconst NavLink: React.FunctionComponent<PropsT>\n = (props) => (\n <GenericLink\n // TODO: I guess, we better re-write it to avoid the props spreading,\n // but no need to spend time on it right now.\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...props}\n routerLinkType={RrNavLink}\n />\n );\n\nexport default NavLink;\n","// extracted by mini-css-extract-plugin\nexport default {\"container\":\"_7zdld4\",\"context\":\"uIObt7\",\"ad\":\"XIxe9o\",\"hoc\":\"YOyORH\",\"circle\":\"dBrB4g\",\"bouncing\":\"TJe-6j\"};","import themed, { type Theme } from '@dr.pogodin/react-themes';\n\nimport defaultTheme from './theme.scss';\n\ntype ThemeKeyT = 'bouncing' | 'circle' | 'container';\n\ntype PropsT = {\n theme: Theme<ThemeKeyT>;\n};\n\n/**\n * Throbber is an \"action in progress\" indicator, which renders\n * three bouncing circles as a simple pending activity indicator,\n * and can be further themed to a certain degree.\n * @param {object} [props] Component properties.\n * @param {ThrobberTheme} [props.theme] _Ad hoc_ theme.\n * @param {...any} [props....]\n * [Other theming properties](https://www.npmjs.com/package/@dr.pogodin/react-themes#themed-component-properties)\n */\nconst Throbber: React.FunctionComponent<PropsT> = ({ theme }) => (\n <span className={theme.container}>\n <span className={theme.circle} />\n <span className={theme.circle} />\n <span className={theme.circle} />\n </span>\n);\n\nexport default themed(Throbber, 'Throbber', defaultTheme);\n","/**\n * The actual tooltip component. It is rendered outside the regular document\n * hierarchy, and with sub-components managed without React to achieve the best\n * performance during animation.\n */\n\nimport {\n type FunctionComponent,\n type ReactNode,\n type RefObject,\n useImperativeHandle,\n useRef,\n} from 'react';\n\nimport { createPortal } from 'react-dom';\n\nimport type { Theme } from '@dr.pogodin/react-themes';\n\n/**\n * Valid placements of the rendered tooltip. They will be overriden when\n * necessary to fit the tooltip within the viewport.\n */\nexport enum PLACEMENTS {\n ABOVE_CURSOR = 'ABOVE_CURSOR',\n ABOVE_ELEMENT = 'ABOVE_ELEMENT',\n BELOW_CURSOR = 'BELOW_CURSOR',\n BELOW_ELEMENT = 'BELOW_ELEMENT',\n}\n\nconst ARROW_STYLE_DOWN = [\n 'border-bottom-color:transparent',\n 'border-left-color:transparent',\n 'border-right-color:transparent',\n].join(';');\n\nconst ARROW_STYLE_UP = [\n 'border-top-color:transparent',\n 'border-left-color:transparent',\n 'border-right-color:transparent',\n].join(';');\n\ntype ComponentsT = {\n container: HTMLDivElement;\n arrow: HTMLDivElement;\n content: HTMLDivElement;\n};\n\nexport type ThemeKeysT = 'appearance' | 'arrow' | 'content' | 'container';\n\ntype TooltipThemeT = Theme<ThemeKeysT>;\n\ntype TooltipRectsT = {\n arrow: DOMRect;\n container: DOMRect;\n};\n\n/**\n * Generates bounding client rectangles for tooltip components.\n * @ignore\n * @param tooltip DOM references to the tooltip components.\n * @param tooltip.arrow\n * @param tooltip.container\n * @return Object holding tooltip rectangles in\n * two fields.\n */\nfunction calcTooltipRects(tooltip: ComponentsT): TooltipRectsT {\n return {\n arrow: tooltip.arrow.getBoundingClientRect(),\n container: tooltip.container.getBoundingClientRect(),\n };\n}\n\n/**\n * Calculates the document viewport size.\n * @ignore\n * @return {{x, y, width, height}}\n */\nfunction calcViewportRect() {\n const { scrollX, scrollY } = window;\n const { documentElement: { clientHeight, clientWidth } } = document;\n return {\n bottom: scrollY + clientHeight,\n left: scrollX,\n right: scrollX + clientWidth,\n top: scrollY,\n };\n}\n\n/**\n * Calculates tooltip and arrow positions for the placement just above\n * the cursor.\n * @ignore\n * @param {number} x Cursor page-x position.\n * @param {number} y Cursor page-y position.\n * @param {object} tooltipRects Bounding client rectangles of tooltip parts.\n * @param {object} tooltipRects.arrow\n * @param {object} tooltipRects.container\n * @return {object} Contains the following fields:\n * - {number} arrowX\n * - {number} arrowY\n * - {number} containerX\n * - {number} containerY\n * - {string} baseArrowStyle\n */\nfunction calcPositionAboveXY(\n x: number,\n y: number,\n tooltipRects: TooltipRectsT,\n) {\n const { arrow, container } = tooltipRects;\n return {\n arrowX: 0.5 * (container.width - arrow.width),\n arrowY: container.height,\n containerX: x - container.width / 2,\n containerY: y - container.height - arrow.height / 1.5,\n\n // TODO: Instead of already setting the base style here, we should\n // introduce a set of constants for arrow directions, which will help\n // to do checks dependant on the arrow direction.\n baseArrowStyle: ARROW_STYLE_DOWN,\n };\n}\n\n// const HIT = {\n// NONE: false,\n// LEFT: 'LEFT',\n// RIGHT: 'RIGHT',\n// TOP: 'TOP',\n// BOTTOM: 'BOTTOM',\n// };\n\n/**\n * Checks whether\n * @param {object} pos\n * @param {object} tooltipRects\n * @param {object} viewportRect\n * @return {HIT}\n */\n// function checkViewportFit(pos, tooltipRects, viewportRect) {\n// const { containerX, containerY } = pos;\n// if (containerX < viewportRect.left + 6) return HIT.LEFT;\n// if (containerX > viewportRect.right - 6) return HIT.RIGHT;\n// return HIT.NONE;\n// }\n\n/**\n * Shifts tooltip horizontally to fit into the viewport, while keeping\n * the arrow pointed to the XY point.\n * @param {number} x\n * @param {number} y\n * @param {object} pos\n * @param {number} pageXOffset\n * @param {number} pageXWidth\n */\n// function xPageFitCorrection(x, y, pos, pageXOffset, pageXWidth) {\n// if (pos.containerX < pageXOffset + 6) {\n// pos.containerX = pageXOffset + 6;\n// pos.arrowX = Math.max(6, pageX - containerX - arrowRect.width / 2);\n// } else {\n// const maxX = pageXOffset + docRect.width - containerRect.width - 6;\n// if (containerX > maxX) {\n// containerX = maxX;\n// arrowX = Math.min(\n// containerRect.width - 6,\n// pageX - containerX - arrowRect.width / 2,\n// );\n// }\n// }\n// }\n\n/**\n * Sets positions of tooltip components to point the tooltip to the specified\n * page point.\n * @ignore\n * @param pageX\n * @param pageY\n * @param placement\n * @param element DOM reference to the element wrapped by the tooltip.\n * @param tooltip\n * @param tooltip.arrow DOM reference to the tooltip arrow.\n * @param tooltip.container DOM reference to the tooltip container.\n */\nfunction setComponentPositions(\n pageX: number,\n pageY: number,\n placement: PLACEMENTS | undefined,\n element: HTMLElement | undefined,\n tooltip: ComponentsT,\n) {\n const tooltipRects = calcTooltipRects(tooltip);\n const viewportRect = calcViewportRect();\n\n /* Default container coords: tooltip at the top. */\n const pos = calcPositionAboveXY(pageX, pageY, tooltipRects);\n\n if (pos.containerX < viewportRect.left + 6) {\n pos.containerX = viewportRect.left + 6;\n pos.arrowX = Math.max(\n 6,\n pageX - pos.containerX - tooltipRects.arrow.width / 2,\n );\n } else {\n const maxX = viewportRect.right - 6 - tooltipRects.container.width;\n if (pos.containerX > maxX) {\n pos.containerX = maxX;\n pos.arrowX = Math.min(\n tooltipRects.container.width - 6,\n pageX - pos.containerX - tooltipRects.arrow.width / 2,\n );\n }\n }\n\n /* If tooltip has not enough space on top - make it bottom tooltip. */\n if (pos.containerY < viewportRect.top + 6) {\n pos.containerY += tooltipRects.container.height\n + 2 * tooltipRects.arrow.height;\n pos.arrowY -= tooltipRects.container.height\n + tooltipRects.arrow.height;\n pos.baseArrowStyle = ARROW_STYLE_UP;\n }\n\n const containerStyle = `left:${pos.containerX}px;top:${pos.containerY}px`;\n tooltip.container.setAttribute('style', containerStyle);\n\n const arrowStyle = `${pos.baseArrowStyle};left:${pos.arrowX}px;top:${pos.arrowY}px`;\n tooltip.arrow.setAttribute('style', arrowStyle);\n}\n\n/* The Tooltip component itself. */\nconst Tooltip: FunctionComponent<{\n children?: ReactNode;\n ref?: RefObject<unknown>;\n theme: TooltipThemeT;\n}> = ({ children, ref, theme }) => {\n // NOTE: The way it has to be implemented, for clean mounting and unmounting\n // at the client side, the <Tooltip> is fully mounted into DOM in the next\n // rendering cycles, and only then it can be correctly measured and positioned.\n // Thus, when we create the <Tooltip> we have to record its target positioning\n // details, and then apply them when it is created.\n\n const arrowRef = useRef<HTMLDivElement>(null);\n const containerRef = useRef<HTMLDivElement>(null);\n const contentRef = useRef<HTMLDivElement>(null);\n\n const pointTo = (\n pageX: number,\n pageY: number,\n placement: PLACEMENTS,\n element: HTMLElement,\n ) => {\n if (!arrowRef.current || !containerRef.current || !contentRef.current) {\n throw Error('Internal error');\n }\n\n setComponentPositions(pageX, pageY, placement, element, {\n arrow: arrowRef.current,\n container: containerRef.current,\n content: contentRef.current,\n });\n };\n useImperativeHandle(ref, () => ({ pointTo }));\n\n return createPortal(\n (\n <div className={theme.container} ref={containerRef}>\n <div className={theme.arrow} ref={arrowRef} />\n <div className={theme.content} ref={contentRef}>{children}</div>\n </div>\n ),\n document.body,\n );\n};\n\nexport default Tooltip;\n","// extracted by mini-css-extract-plugin\nexport default {\"arrow\":\"M9gywF\",\"ad\":\"_4xT7zE\",\"hoc\":\"zd-vnH\",\"context\":\"GdZucr\",\"container\":\"f9gY8K\",\"appearance\":\"L4ubm-\",\"wrapper\":\"_4qDBRM\"};","/* global window */\n\nimport {\n type FunctionComponent,\n type ReactNode,\n useEffect,\n useRef,\n useState,\n} from 'react';\n\nimport themed, { type Theme } from '@dr.pogodin/react-themes';\n\nimport Tooltip, {\n type ThemeKeysT as TooltipThemeKeysT,\n PLACEMENTS,\n} from './Tooltip';\n\nimport defaultTheme from './default-theme.scss';\n\ntype PropsT = {\n children?: ReactNode;\n placement?: PLACEMENTS;\n tip?: ReactNode;\n theme: Theme<'wrapper' | TooltipThemeKeysT>;\n};\n\ntype TooltipRefT = {\n pointTo: (\n x: number,\n y: number,\n placement: PLACEMENTS,\n wrapperRef: HTMLDivElement,\n ) => void;\n};\n\ntype HeapT = {\n lastCursorX: number;\n lastCursorY: number;\n triggeredByTouch: boolean;\n timerId?: NodeJS.Timeout;\n};\n\n/**\n * Implements a simple to use and themeable tooltip component, _e.g._\n * ```js\n * <WithTooltip tip=\"This is example tooltip.\">\n * <p>Hover to see the tooltip.</p>\n * </WithTooltip>\n * ```\n * **Children:** Children are rendered in the place of `<WithTooltip>`,\n * and when hovered the tooltip is shown. By default the wrapper itself is\n * `<div>` block with `display: inline-block`.\n * @param tip – Anything React is able to render,\n * _e.g._ a tooltip text. This will be the tooltip content.\n * @param {WithTooltipTheme} props.theme _Ad hoc_ theme.\n */\nconst Wrapper: FunctionComponent<PropsT> = ({\n children,\n placement = PLACEMENTS.ABOVE_CURSOR,\n tip,\n theme,\n}) => {\n const { current: heap } = useRef<HeapT>({\n lastCursorX: 0,\n lastCursorY: 0,\n timerId: undefined,\n triggeredByTouch: false,\n });\n const tooltipRef = useRef<TooltipRefT>(null);\n const wrapperRef = useRef<HTMLDivElement>(null);\n const [showTooltip, setShowTooltip] = useState(false);\n\n const updatePortalPosition = (cursorX: number, cursorY: number) => {\n if (showTooltip) {\n const wrapperRect = wrapperRef.current!.getBoundingClientRect();\n if (\n cursorX < wrapperRect.left\n || cursorX > wrapperRect.right\n || cursorY < wrapperRect.top\n || cursorY > wrapperRect.bottom\n ) {\n setShowTooltip(false);\n } else if (tooltipRef.current) {\n tooltipRef.current.pointTo(\n cursorX + window.scrollX,\n cursorY + window.scrollY,\n placement,\n wrapperRef.current!,\n );\n }\n } else {\n heap.lastCursorX = cursorX;\n heap.lastCursorY = cursorY;\n\n // If tooltip was triggered by a touch, we delay its opening by a bit,\n // to ensure it was not a touch-click - in the case of touch click we\n // want to do the click, rather than show the tooltip, and the delay\n // gives click handler a chance to abort the tooltip openning.\n if (heap.triggeredByTouch) {\n heap.timerId ??= setTimeout(() => {\n heap.triggeredByTouch = false;\n heap.timerId = undefined;\n setShowTooltip(true);\n }, 300);\n\n // Otherwise we can just open the tooltip right away.\n } else setShowTooltip(true);\n }\n };\n\n useEffect(() => {\n if (showTooltip && tip !== null) {\n // This is necessary to ensure that even when a single mouse event\n // arrives to a tool-tipped component, the tooltip is correctly positioned\n // once opened (because similar call above does not have effect until\n // the tooltip is fully mounted, and that is delayed to future rendering\n // cycle due to the implementation).\n if (tooltipRef.current) {\n tooltipRef.current.pointTo(\n heap.lastCursorX + window.scrollX,\n heap.lastCursorY + window.scrollY,\n placement,\n wrapperRef.current!,\n );\n }\n\n const listener = () => {\n setShowTooltip(false);\n };\n window.addEventListener('scroll', listener);\n return () => {\n window.removeEventListener('scroll', listener);\n };\n }\n return undefined;\n }, [\n heap.lastCursorX,\n heap.lastCursorY,\n placement,\n showTooltip,\n tip,\n ]);\n\n return (\n <div\n className={theme.wrapper}\n onClick={() => {\n if (heap.timerId) {\n clearTimeout(heap.timerId);\n heap.timerId = undefined;\n heap.triggeredByTouch = false;\n }\n }}\n onMouseLeave={() => {\n setShowTooltip(false);\n }}\n onMouseMove={(e) => {\n updatePortalPosition(e.clientX, e.clientY);\n }}\n onTouchStart={() => {\n heap.triggeredByTouch = true;\n }}\n ref={wrapperRef}\n role=\"presentation\"\n >\n {\n showTooltip && tip !== null\n ? <Tooltip ref={tooltipRef} theme={theme}>{tip}</Tooltip>\n : null\n }\n {children}\n </div>\n );\n};\n\nconst ThemedWrapper = themed(Wrapper, 'WithTooltip', defaultTheme);\n\ntype ExportT = typeof ThemedWrapper & {\n PLACEMENTS: typeof PLACEMENTS;\n};\n\nconst e: ExportT = ThemedWrapper as ExportT;\n\ne.PLACEMENTS = PLACEMENTS;\n\nexport default e;\n","// extracted by mini-css-extract-plugin\nexport default {\"container\":\"sXHM81\",\"context\":\"veKyYi\",\"ad\":\"r3ABzd\",\"hoc\":\"YKcPnR\",\"video\":\"SlV2zw\"};","// extracted by mini-css-extract-plugin\nexport default {\"container\":\"jTxmOX\",\"context\":\"dzIcLh\",\"ad\":\"_5a9XX1\",\"hoc\":\"_7sH52O\"};","import qs from 'qs';\n\nimport themed, { type Theme } from '@dr.pogodin/react-themes';\n\nimport Throbber from 'components/Throbber';\n\nimport baseTheme from './base.scss';\nimport throbberTheme from './throbber.scss';\n\ntype ComponentThemeT = Theme<'container' | 'video'>;\n\ntype PropsT = {\n autoplay?: boolean;\n src: string;\n theme: ComponentThemeT;\n title?: string;\n};\n\n/**\n * A component for embeding a YouTube video.\n * @param [props] Component properties.\n * @param [props.autoplay] If `true` the video will start to play\n * automatically once loaded.\n * @param [props.src] URL of the video to play. Can be in any of\n * the following formats, and keeps any additional query parameters understood\n * by the YouTube IFrame player:\n * - `https://www.youtube.com/watch?v=NdF6Rmt6Ado`\n * - `https://youtu.be/NdF6Rmt6Ado`\n * - `https://www.youtube.com/embed/NdF6Rmt6Ado`\n * @param [props.theme] _Ad hoc_ theme.\n * @param [props.title] The `title` attribute to add to the player\n * IFrame.\n */\nconst YouTubeVideo: React.FunctionComponent<PropsT> = ({\n autoplay,\n src,\n theme,\n title,\n}) => {\n const srcParts = src.split('?');\n let [url] = srcParts;\n const [, queryString] = srcParts;\n const query = queryString ? qs.parse(queryString) : {};\n\n const videoId = query.v ?? url?.match(/\\/([a-zA-Z0-9-_]*)$/)?.[1];\n url = `https://www.youtube.com/embed/${videoId as string}`;\n\n delete query.v;\n query.autoplay = autoplay ? '1' : '0';\n url += `?${qs.stringify(query)}`;\n\n // TODO: https://developers.google.com/youtube/player_parameters\n // More query parameters can be exposed via the component props.\n\n return (\n <div className={theme.container}>\n <Throbber theme={throbberTheme} />\n {/* TODO: I guess, we better add the sanbox, but right now I don't have\n time to carefully explore which restrictions should be lifted to allow\n embed YouTube player to work... sometime later we'll take care of it */\n }\n <iframe // eslint-disable-line react/iframe-missing-sandbox\n allow=\"autoplay\"\n allowFullScreen\n className={theme.video}\n src={url}\n title={title}\n />\n </div>\n );\n};\n\nexport default themed(YouTubeVideo, 'YouTubeVideo', baseTheme);\n","// extracted by mini-css-extract-plugin\nexport default {\"container\":\"dzMVIB\",\"context\":\"KVPc7g\",\"ad\":\"z2GQ0Z\",\"hoc\":\"_8R1Qdj\",\"label\":\"Vw9EKL\",\"textarea\":\"zd-OFg\",\"error\":\"K2JcEY\",\"errorMessage\":\"nWsJDB\",\"hidden\":\"GiHBXI\"};","import {\n type ChangeEventHandler,\n type FocusEventHandler,\n type FunctionComponent,\n type KeyboardEventHandler,\n type ReactNode,\n useEffect,\n useLayoutEffect,\n useRef,\n useState,\n} from 'react';\n\nimport themed, { type Theme } from '@dr.pogodin/react-themes';\n\nimport defaultTheme from './style.scss';\n\ntype ThemeKeyT = 'container' | 'error' | 'errorMessage' | 'hidden' | 'label'\n | 'textarea';\n\ntype Props = {\n disabled?: boolean;\n error?: ReactNode;\n label?: string;\n onBlur?: FocusEventHandler<HTMLTextAreaElement>;\n onChange?: ChangeEventHandler<HTMLTextAreaElement>;\n onKeyDown?: KeyboardEventHandler<HTMLTextAreaElement>;\n placeholder?: string;\n testId?: string;\n theme: Theme<ThemeKeyT>;\n value?: string;\n};\n\nconst TextArea: FunctionComponent<Props> = ({\n disabled,\n error,\n label,\n onBlur,\n onChange,\n onKeyDown,\n placeholder,\n testId,\n theme,\n value,\n}) => {\n const hiddenAreaRef = useRef<HTMLTextAreaElement>(null);\n const [height, setHeight] = useState<number | undefined>();\n\n const textAreaRef = useRef<HTMLTextAreaElement>(null);\n\n const [localValue, setLocalValue] = useState(value ?? '');\n if (value !== undefined && localValue !== value) setLocalValue(value);\n\n // This resizes text area's height when its width is changed for any reason.\n useEffect(() => {\n const el = hiddenAreaRef.current;\n if (!el) return undefined;\n\n const cb = () => {\n setHeight(el.scrollHeight);\n };\n const observer = new ResizeObserver(cb);\n observer.observe(el);\n\n return () => {\n observer.disconnect();\n };\n }, []);\n\n // Resizes the text area when its content is modified.\n //\n // NOTE: useLayoutEffect() instead of useEffect() makes difference here,\n // as it helps to avoid visible \"content/height\" jumps (i.e. with just\n // useEffect() it becomes visible how the content is modified first,\n // and then input height is incremented, if necessary).\n // See: https://github.com/birdofpreyru/react-utils/issues/313\n useLayoutEffect(() => {\n const el = hiddenAreaRef.current;\n if (el) setHeight(el.scrollHeight);\n }, [localValue]);\n\n let containerClassName = theme.container;\n if (error) containerClassName += ` ${theme.error}`;\n\n return (\n <div\n className={containerClassName}\n onFocus={() => {\n textAreaRef.current?.focus();\n }}\n >\n {label === undefined ? null : <div className={theme.label}>{label}</div>}\n <textarea\n className={`${theme.textarea} ${theme.hidden}`}\n\n // This text area is hidden underneath the primary one below,\n // and it is used for text measurements, to implement auto-scaling\n // of the primary textarea's height.\n readOnly\n ref={hiddenAreaRef}\n\n // The \"-1\" value of \"tabIndex\" removes this hidden text area from\n // the tab-focus-chain.\n tabIndex={-1}\n\n // NOTE: With empty string value (\"\") the scrolling height of this text\n // area is zero, thus collapsing <TextArea> height below the single line\n // input height. To avoid it we fallback to whitespace (\" \") character\n // here.\n value={localValue || ' '}\n />\n <textarea\n className={theme.textarea}\n data-testid={process.env.NODE_ENV === 'production' ? undefined : testId}\n disabled={disabled}\n onBlur={onBlur}\n\n // When value is \"undefined\" the text area is not-managed, and we should\n // manage it internally for the measurement / resizing functionality\n // to work.\n onChange={\n value === undefined\n ? (e) => {\n setLocalValue(e.target.value);\n } : onChange\n }\n onKeyDown={onKeyDown}\n placeholder={placeholder}\n ref={textAreaRef}\n style={{ height }}\n value={localValue}\n />\n {error && error !== true\n ? <div className={theme.errorMessage}>{error}</div>\n : null}\n </div>\n );\n};\n\nexport default themed(TextArea, 'TextArea', defaultTheme);\n","import 'styles/global.scss';\n\nimport { webpack } from 'utils';\n\nimport type * as ClientM from './client';\nimport type * as ServerFactoryM from './server';\n\n// It is a safeguard against multiple instances / versions of the library\n// being loaded into environment by mistake (e.g. because of different\n// packages pinning down different exact versions of the lib, thus preventing\n// a proper dedupe and using a single common library version).\nif (global.REACT_UTILS_LIBRARY_LOADED) {\n throw Error('React utils library is already loaded');\n} else global.REACT_UTILS_LIBRARY_LOADED = true;\n\nconst server = webpack.requireWeak<typeof ServerFactoryM>('./server', __dirname);\n\nconst client = server\n ? undefined\n\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n : (require('./client') as typeof ClientM).default;\n\nexport {\n type AsyncCollectionT,\n type AsyncCollectionLoaderT,\n type AsyncDataEnvelopeT,\n type AsyncDataLoaderT,\n type ForceT,\n type UseAsyncDataOptionsT,\n type UseAsyncDataResT,\n type UseGlobalStateResT,\n type ValueOrInitializerT,\n getGlobalState,\n GlobalStateProvider,\n newAsyncDataEnvelope,\n useAsyncCollection,\n useAsyncData,\n useGlobalState,\n withGlobalStateType,\n} from '@dr.pogodin/react-global-state';\n\nexport * from 'components';\n\nexport {\n type BeforeRenderResT,\n type BeforeRenderT,\n type ConfigT,\n type ServerSsrContext,\n type ServerT,\n} from './server';\n\nexport {\n assertEmptyObject,\n config,\n Barrier,\n Cached,\n Emitter,\n isomorphy,\n getSsrContext,\n type Listener,\n type ObjectKey,\n Semaphore,\n splitComponent,\n type Theme,\n themed,\n ThemeProvider,\n time,\n webpack,\n withRetries,\n} from 'utils';\n\nexport { client, server };\n"],"names":["root","factory","exports","module","require","define","amd","self","this","__WEBPACK_EXTERNAL_MODULE__864__","__WEBPACK_EXTERNAL_MODULE__126__","__WEBPACK_EXTERNAL_MODULE__264__","__WEBPACK_EXTERNAL_MODULE__859__","__WEBPACK_EXTERNAL_MODULE__462__","__WEBPACK_EXTERNAL_MODULE__185__","__WEBPACK_EXTERNAL_MODULE__958__","__WEBPACK_EXTERNAL_MODULE__814__","__WEBPACK_EXTERNAL_MODULE__360__","__WEBPACK_EXTERNAL_MODULE__155__","__WEBPACK_EXTERNAL_MODULE__514__","__WEBPACK_EXTERNAL_MODULE__236__","__WEBPACK_EXTERNAL_MODULE__707__","IS_CLIENT_SIDE","process","versions","node","global","REACT_UTILS_FORCE_CLIENT_SIDE","IS_SERVER_SIDE","requireWeak","modulePath","basePathOrOptions","basePath","ops","req","eval","resolve","path","default","def","named","res","Object","entries","forEach","name","value","assigned","Error","resolveWeak","REACT_ELEMENT_TYPE","Symbol","for","REACT_FRAGMENT_TYPE","jsxProd","type","config","maybeKey","key","propName","ref","$$typeof","props","Fragment","jsx","jsxs","buildInfo","getBuildInfo","undefined","BUILD_INFO","inj","metaElement","document","querySelector","remove","data","forge","decode64","content","d","createDecipher","start","iv","slice","length","update","createBuffer","finish","decodeUtf8","output","window","REACT_UTILS_INJECTION","getInj","isDevBuild","getMode","isProdBuild","buildTimestamp","timestamp","Launch","Application","options","container","getElementById","scene","_jsx","GlobalStateProvider","initialState","ISTATE","children","BrowserRouter","HelmetProvider","dontHydrate","createRoot","render","hydrateRoot","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","n","getter","__esModule","a","definition","o","defineProperty","enumerable","get","g","globalThis","Function","e","obj","prop","prototype","hasOwnProperty","call","r","toStringTag","CONFIG","cookie","CSRF","parse","csrfToken","getSsrContext","withGlobalStateType","useCurrent","autorefresh","globalStatePath","precision","SEC_MS","now","setter","useGlobalState","Date","useEffect","timerId","old","neu","Math","abs","setTimeout","clearTimeout","useTimezoneOffset","cookieName","ssrContext","offset","setOffset","cookies","parseInt","getTimezoneOffset","serialize","toString","time","DAY_MS","HOUR_MS","MIN_MS","YEAR_MS","timer","assign","dayjs","clientChunkGroups","CHUNK_GROUPS","refCounts","getPublicPath","publicPath","bookStyleSheet","loadedSheets","refCount","fullPath","location","origin","has","link","createElement","setAttribute","head","appendChild","Barrier","addEventListener","current","getLoadedStyleSheets","Set","styleSheets","href","add","assertChunkName","chunkName","chunkGroups","async","bookStyleSheets","promises","assets","Promise","asset","endsWith","promise","push","allSettled","then","freeStyleSheets","pathRefCount","usedChunkNames","splitComponent","getComponent","placeholder","LazyComponent","lazy","resolved","Component","Wrapper","rest","chunks","includes","useInsertionEffect","CodeSplit","Suspense","fallback","themed","themedImpl","COMPOSE","PRIORITY","isValue","x","optionValueName","option","BaseModal","cancelOnScrolling","containerStyle","dontDisableScrolling","onCancel","overlayStyle","style","testId","testIdForOverlay","theme","containerRef","useRef","overlayRef","removeEventListener","body","classList","S","scrollingDisabledByModal","focusLast","useMemo","onFocus","elems","querySelectorAll","i","focus","activeElement","tabIndex","ReactDom","_jsxs","className","overlay","onClick","stopPropagation","onKeyDown","role","onWheel","event","baseTheme","areEqual","b","left","top","width","Options","containerClass","filter","onChange","optionClass","opsRef","useImperativeHandle","measure","parentElement","rect","getBoundingClientRect","getComputedStyle","mBottom","parseFloat","marginBottom","mTop","marginTop","height","optionNodes","iValue","iName","ad","context","hoc","BaseCustomDropdown","label","active","setActive","useState","dropdownRef","opsPos","setOpsPos","upward","setUpward","id","cb","anchor","opsRect","fitsDown","bottom","visualViewport","fitsUp","up","pos","requestAnimationFrame","cancelAnimationFrame","openList","view","selected","_Fragment","containerClassName","opsContainerClass","select","dropdown","arrow","newValue","defaultTheme","Dropdown","isValidValue","optionElements","hiddenOption","disabled","selectClassName","invalid","BaseSwitch","onPress","GenericLink","enforceA","keepScrollPosition","onMouseDown","openNewTab","replace","routerLinkType","to","match","preventDefault","rel","target","L","discover","scroll","Link","RrLink","BaseButton","onKeyDownProp","onKeyUp","onMouseUp","onPointerDown","onPointerUp","button","Checkbox","checked","checkboxClassName","checkbox","indeterminate","Input","error","focused","setFocused","localRef","empty","input","onBlur","errorMessage","PageLayout","leftSidePanelContent","rightSidePanelContent","sidePanel","leftSidePanel","join","mainPanel","rightSidePanel","NavLink","RrNavLink","Throbber","circle","PLACEMENTS","ARROW_STYLE_DOWN","ARROW_STYLE_UP","calcTooltipRects","tooltip","calcViewportRect","scrollX","scrollY","documentElement","clientHeight","clientWidth","right","calcPositionAboveXY","y","tooltipRects","arrowX","arrowY","containerX","containerY","baseArrowStyle","setComponentPositions","pageX","pageY","placement","element","viewportRect","max","maxX","min","arrowStyle","Tooltip","arrowRef","contentRef","pointTo","createPortal","ABOVE_CURSOR","tip","heap","lastCursorX","lastCursorY","triggeredByTouch","tooltipRef","wrapperRef","showTooltip","setShowTooltip","listener","wrapper","onMouseLeave","onMouseMove","updatePortalPosition","cursorX","cursorY","wrapperRect","clientX","clientY","onTouchStart","ThemedWrapper","YouTubeVideo","autoplay","src","title","srcParts","split","url","queryString","query","qs","videoId","v","throbberTheme","allow","allowFullScreen","video","TextArea","hiddenAreaRef","setHeight","textAreaRef","localValue","setLocalValue","el","observer","ResizeObserver","scrollHeight","observe","disconnect","useLayoutEffect","textarea","hidden","readOnly","REACT_UTILS_LIBRARY_LOADED","server","webpack","__dirname","client"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"web.bundle.js","mappings":";CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,wBAAyBA,QAAQ,kCAAmCA,QAAQ,4BAA6BA,QAAQ,4BAA6BA,QAAQ,UAAWA,QAAQ,SAAUA,QAAQ,sBAAuBA,QAAQ,wBAAyBA,QAAQ,MAAOA,QAAQ,SAAUA,QAAQ,aAAcA,QAAQ,oBAAqBA,QAAQ,iBACvV,mBAAXC,QAAyBA,OAAOC,IAC9CD,OAAO,CAAC,uBAAwB,iCAAkC,2BAA4B,2BAA4B,SAAU,QAAS,qBAAsB,uBAAwB,KAAM,QAAS,YAAa,mBAAoB,gBAAiBJ,GAClO,iBAAZC,QACdA,QAAQ,2BAA6BD,EAAQG,QAAQ,wBAAyBA,QAAQ,kCAAmCA,QAAQ,4BAA6BA,QAAQ,4BAA6BA,QAAQ,UAAWA,QAAQ,SAAUA,QAAQ,sBAAuBA,QAAQ,wBAAyBA,QAAQ,MAAOA,QAAQ,SAAUA,QAAQ,aAAcA,QAAQ,oBAAqBA,QAAQ,iBAEpYJ,EAAK,2BAA6BC,EAAQD,EAAK,wBAAyBA,EAAK,kCAAmCA,EAAK,4BAA6BA,EAAK,4BAA6BA,EAAa,OAAGA,EAAY,MAAGA,EAAK,sBAAuBA,EAAK,wBAAyBA,EAAS,GAAGA,EAAY,MAAGA,E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EAAM2D,MAAM/M,SAAE+M,KAC5DnN,EAAAA,YAAAA,KAAA,YACE4K,UAAW,GAAGpB,EAAM4O,YAAY5O,EAAM6O,SAKtCC,UAAQ,EACRlb,IAAKoa,EAIL/M,UAAW,EAMXnO,MAAOqb,GAAc,OAEvB3X,EAAAA,YAAAA,KAAA,YACE4K,UAAWpB,EAAM4O,SACjB,mBAAqDxa,EACrD2R,SAAUA,EACVyC,OAAQA,EAKRnG,cACYjO,IAAVtB,EACKsF,IACDgW,EAAchW,EAAE2O,OAAOjU,QACrBuP,EAERb,UAAWA,EACXtD,YAAaA,EACbtK,IAAKsa,EACLrO,MAAO,CAAEsD,UACTrQ,MAAOqb,IAERjG,IAAmB,IAAVA,GACN1R,EAAAA,YAAAA,KAAA,OAAK4K,UAAWpB,EAAMyI,aAAa7R,SAAEsR,IACrC,SAKV,wBAAenJ,sBAAf,CAAsBgP,SAAU,WAAYrI,gB,gBC/H5C,GAAIhU,oBAAAA,EAAOqd,2BACT,MAAM/b,MAAM,yCACPtB,oBAAAA,EAAOqd,4BAA6B,EAE3C,MAAMC,OAASC,QAAQpd,YAAmC,WAAYqd,aAEhEC,OAASH,YACX5a,EAGChE,oBAAAA,KAAAA,E","sources":["webpack://@dr.pogodin/react-utils/webpack/universalModuleDefinition","webpack://@dr.pogodin/react-utils/./src/shared/utils/isomorphy/environment-check.ts","webpack://@dr.pogodin/react-utils/external umd \"@dr.pogodin/react-global-state\"","webpack://@dr.pogodin/react-utils/./src/shared/utils/webpack.ts","webpack://@dr.pogodin/react-utils/external umd \"react\"","webpack://@dr.pogodin/react-utils/external umd \"dayjs\"","webpack://@dr.pogodin/react-utils/./node_modules/react/cjs/react-jsx-runtime.production.js","webpack://@dr.pogodin/react-utils/external umd \"react-dom/client\"","webpack://@dr.pogodin/react-utils/external umd \"@dr.pogodin/react-helmet\"","webpack://@dr.pogodin/react-utils/external umd \"qs\"","webpack://@dr.pogodin/react-utils/external umd \"cookie\"","webpack://@dr.pogodin/react-utils/external umd \"react-dom\"","webpack://@dr.pogodin/react-utils/./src/shared/utils/isomorphy/buildInfo.ts","webpack://@dr.pogodin/react-utils/./src/client/getInj.ts","webpack://@dr.pogodin/react-utils/external umd \"react-router\"","webpack://@dr.pogodin/react-utils/./src/shared/utils/isomorphy/index.ts","webpack://@dr.pogodin/react-utils/external umd \"node-forge/lib/forge\"","webpack://@dr.pogodin/react-utils/external umd \"@dr.pogodin/react-themes\"","webpack://@dr.pogodin/react-utils/external umd \"@dr.pogodin/js-utils\"","webpack://@dr.pogodin/react-utils/./node_modules/react/jsx-runtime.js","webpack://@dr.pogodin/react-utils/external umd \"node-forge/lib/aes\"","webpack://@dr.pogodin/react-utils/./src/client/index.tsx","webpack://@dr.pogodin/react-utils/webpack/bootstrap","webpack://@dr.pogodin/react-utils/webpack/runtime/compat get default export","webpack://@dr.pogodin/react-utils/webpack/runtime/define property getters","webpack://@dr.pogodin/react-utils/webpack/runtime/global","webpack://@dr.pogodin/react-utils/webpack/runtime/hasOwnProperty shorthand","webpack://@dr.pogodin/react-utils/webpack/runtime/make namespace object","webpack://@dr.pogodin/react-utils/./src/styles/global.scss?d31e","webpack://@dr.pogodin/react-utils/./src/shared/utils/config.ts","webpack://@dr.pogodin/react-utils/./src/shared/utils/globalState.ts","webpack://@dr.pogodin/react-utils/./src/shared/utils/time.ts","webpack://@dr.pogodin/react-utils/./src/shared/utils/splitComponent.tsx","webpack://@dr.pogodin/react-utils/./src/shared/utils/index.ts","webpack://@dr.pogodin/react-utils/./src/shared/components/selectors/common.ts","webpack://@dr.pogodin/react-utils/./src/shared/components/Modal/base-theme.scss?3336","webpack://@dr.pogodin/react-utils/./src/shared/components/Modal/styles.scss?66aa","webpack://@dr.pogodin/react-utils/./src/shared/components/Modal/index.tsx","webpack://@dr.pogodin/react-utils/./src/shared/components/selectors/CustomDropdown/Options/style.scss?8cb9","webpack://@dr.pogodin/react-utils/./src/shared/components/selectors/CustomDropdown/Options/index.tsx","webpack://@dr.pogodin/react-utils/./src/shared/components/selectors/CustomDropdown/theme.scss?f940","webpack://@dr.pogodin/react-utils/./src/shared/components/selectors/CustomDropdown/index.tsx","webpack://@dr.pogodin/react-utils/./src/shared/components/selectors/NativeDropdown/theme.scss?47e7","webpack://@dr.pogodin/react-utils/./src/shared/components/selectors/NativeDropdown/index.tsx","webpack://@dr.pogodin/react-utils/./src/shared/components/selectors/Switch/theme.scss?69a8","webpack://@dr.pogodin/react-utils/./src/shared/components/selectors/Switch/index.tsx","webpack://@dr.pogodin/react-utils/./src/shared/components/GenericLink/style.scss?4542","webpack://@dr.pogodin/react-utils/./src/shared/components/GenericLink/index.tsx","webpack://@dr.pogodin/react-utils/./src/shared/components/Link.tsx","webpack://@dr.pogodin/react-utils/./src/shared/components/Button/style.scss?4dfe","webpack://@dr.pogodin/react-utils/./src/shared/components/Button/index.tsx","webpack://@dr.pogodin/react-utils/./src/shared/components/Checkbox/theme.scss?3b99","webpack://@dr.pogodin/react-utils/./src/shared/components/Checkbox/index.tsx","webpack://@dr.pogodin/react-utils/./src/shared/components/Input/theme.scss?9ab5","webpack://@dr.pogodin/react-utils/./src/shared/components/Input/index.tsx","webpack://@dr.pogodin/react-utils/./src/shared/components/PageLayout/base-theme.scss?2bfa","webpack://@dr.pogodin/react-utils/./src/shared/components/PageLayout/index.tsx","webpack://@dr.pogodin/react-utils/./src/shared/components/NavLink.tsx","webpack://@dr.pogodin/react-utils/./src/shared/components/Throbber/theme.scss?14fa","webpack://@dr.pogodin/react-utils/./src/shared/components/Throbber/index.tsx","webpack://@dr.pogodin/react-utils/./src/shared/components/WithTooltip/Tooltip.tsx","webpack://@dr.pogodin/react-utils/./src/shared/components/WithTooltip/default-theme.scss?0cd4","webpack://@dr.pogodin/react-utils/./src/shared/components/WithTooltip/index.tsx","webpack://@dr.pogodin/react-utils/./src/shared/components/YouTubeVideo/base.scss?60f0","webpack://@dr.pogodin/react-utils/./src/shared/components/YouTubeVideo/throbber.scss?a205","webpack://@dr.pogodin/react-utils/./src/shared/components/YouTubeVideo/index.tsx","webpack://@dr.pogodin/react-utils/./src/shared/components/TextArea/style.scss?7f40","webpack://@dr.pogodin/react-utils/./src/shared/components/TextArea/index.tsx","webpack://@dr.pogodin/react-utils/./src/index.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"@dr.pogodin/js-utils\"), require(\"@dr.pogodin/react-global-state\"), require(\"@dr.pogodin/react-helmet\"), require(\"@dr.pogodin/react-themes\"), require(\"cookie\"), require(\"dayjs\"), require(\"node-forge/lib/aes\"), require(\"node-forge/lib/forge\"), require(\"qs\"), require(\"react\"), require(\"react-dom\"), require(\"react-dom/client\"), require(\"react-router\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"@dr.pogodin/js-utils\", \"@dr.pogodin/react-global-state\", \"@dr.pogodin/react-helmet\", \"@dr.pogodin/react-themes\", \"cookie\", \"dayjs\", \"node-forge/lib/aes\", \"node-forge/lib/forge\", \"qs\", \"react\", \"react-dom\", \"react-dom/client\", \"react-router\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"@dr.pogodin/react-utils\"] = factory(require(\"@dr.pogodin/js-utils\"), require(\"@dr.pogodin/react-global-state\"), require(\"@dr.pogodin/react-helmet\"), require(\"@dr.pogodin/react-themes\"), require(\"cookie\"), require(\"dayjs\"), require(\"node-forge/lib/aes\"), require(\"node-forge/lib/forge\"), require(\"qs\"), require(\"react\"), require(\"react-dom\"), require(\"react-dom/client\"), require(\"react-router\"));\n\telse\n\t\troot[\"@dr.pogodin/react-utils\"] = factory(root[\"@dr.pogodin/js-utils\"], root[\"@dr.pogodin/react-global-state\"], root[\"@dr.pogodin/react-helmet\"], root[\"@dr.pogodin/react-themes\"], root[\"cookie\"], root[\"dayjs\"], root[\"node-forge/lib/aes\"], root[\"node-forge/lib/forge\"], root[\"qs\"], root[\"react\"], root[\"react-dom\"], root[\"react-dom/client\"], root[\"react-router\"]);\n})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE__864__, __WEBPACK_EXTERNAL_MODULE__126__, __WEBPACK_EXTERNAL_MODULE__264__, __WEBPACK_EXTERNAL_MODULE__859__, __WEBPACK_EXTERNAL_MODULE__462__, __WEBPACK_EXTERNAL_MODULE__185__, __WEBPACK_EXTERNAL_MODULE__958__, __WEBPACK_EXTERNAL_MODULE__814__, __WEBPACK_EXTERNAL_MODULE__360__, __WEBPACK_EXTERNAL_MODULE__155__, __WEBPACK_EXTERNAL_MODULE__514__, __WEBPACK_EXTERNAL_MODULE__236__, __WEBPACK_EXTERNAL_MODULE__707__) {\nreturn ","// Checks for client- vs. server-side environment detection.\n\n/**\n * `true` within client-side environment (browser), `false` at server-side.\n */\nexport const IS_CLIENT_SIDE: boolean = typeof process !== 'object'\n // NOTE: Because in this case we assume the host environment might be partially\n // polyfilled to emulate some Node interfaces, thus it might have global `process`\n // object, but without `versions` sub-object inside it.\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n || !process.versions?.node\n || !!global.REACT_UTILS_FORCE_CLIENT_SIDE\n || typeof REACT_UTILS_WEBPACK_BUNDLE !== 'undefined';\n\n/**\n * `true` within the server-side environment (node), `false` at client-side.\n */\nexport const IS_SERVER_SIDE: boolean = !IS_CLIENT_SIDE;\n","module.exports = __WEBPACK_EXTERNAL_MODULE__126__;","import type PathNS from 'node:path';\n\nimport { IS_CLIENT_SIDE } from './isomorphy';\n\ntype RequireWeakOptionsT = {\n basePath?: string;\n};\n\ntype RequireWeakResT<T> = T extends { default: infer D }\n ? (D extends null | undefined ? T : D & Omit<T, 'default'>)\n : T;\n\n/**\n * Requires the specified module without including it into the bundle during\n * Webpack build.\n * @param modulePath\n * @param [basePath]\n * @return Required module.\n */\nexport function requireWeak<T extends object>(\n modulePath: string,\n\n // TODO: For now `basePath` can be provided directly as a string here,\n // for backward compatibility. Deprecate it in future, if any other\n // breaking changes are done for requireWeak().\n basePathOrOptions?: string | RequireWeakOptionsT,\n): RequireWeakResT<T> | null {\n if (IS_CLIENT_SIDE) return null;\n\n let basePath: string | undefined;\n let ops: RequireWeakOptionsT;\n if (typeof basePathOrOptions === 'string') {\n basePath = basePathOrOptions;\n } else {\n ops = basePathOrOptions ?? {};\n ({ basePath } = ops);\n }\n\n // eslint-disable-next-line no-eval\n const req = eval('require') as (path: string) => unknown;\n\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const { resolve } = req('path') as typeof PathNS;\n\n const path = basePath ? resolve(basePath, modulePath) : modulePath;\n const module = req(path) as T;\n\n if (!('default' in module) || !module.default) return module as RequireWeakResT<T>;\n\n const { default: def, ...named } = module;\n\n const res = def as RequireWeakResT<T>;\n\n Object.entries(named).forEach(([name, value]) => {\n const assigned = res[name as keyof RequireWeakResT<T>];\n if (assigned) (res[name as keyof RequireWeakResT<T>] as unknown) = value;\n else if (assigned !== value) {\n throw Error('Conflict between default and named exports');\n }\n });\n return res;\n}\n\n/**\n * Resolves specified module path with help of Babel's module resolver.\n * Yes, the function itself just returns its argument to the caller, but Babel\n * is configured to resolve the first argument of resolveWeak(..) function, thus\n * the result will be the resolved path.\n * @param {string} modulePath\n * @return {string} Absolute or relative path to the module.\n */\nexport function resolveWeak(modulePath: string): string {\n return modulePath;\n}\n","module.exports = __WEBPACK_EXTERNAL_MODULE__155__;","module.exports = __WEBPACK_EXTERNAL_MODULE__185__;","/**\n * @license React\n * react-jsx-runtime.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\");\nfunction jsxProd(type, config, maybeKey) {\n var key = null;\n void 0 !== maybeKey && (key = \"\" + maybeKey);\n void 0 !== config.key && (key = \"\" + config.key);\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n config = maybeKey.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== config ? config : null,\n props: maybeKey\n };\n}\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsxProd;\nexports.jsxs = jsxProd;\n","module.exports = __WEBPACK_EXTERNAL_MODULE__236__;","module.exports = __WEBPACK_EXTERNAL_MODULE__264__;","module.exports = __WEBPACK_EXTERNAL_MODULE__360__;","module.exports = __WEBPACK_EXTERNAL_MODULE__462__;","module.exports = __WEBPACK_EXTERNAL_MODULE__514__;","// Encapsulates access to \"Build Info\" data.\n\n// BEWARE: This should match the type of build info object generated by\n// Webpack build (see \"/config/webpack/app-base.js\"), and currently this\n// match is not checked automatically.\nexport type BuildInfoT = {\n key: string;\n publicPath: string;\n timestamp: string;\n useServiceWorker: boolean;\n};\n\n// Depending on the build mode & environment, BUILD_INFO is either a global\n// variable defined at the app launch, or it is replaced by the actual value\n// by the Webpack build.\ndeclare const BUILD_INFO: BuildInfoT | undefined;\n\nlet buildInfo: BuildInfoT | undefined;\n\n// On the client side \"BUILD_INFO\" should be injected by Webpack. Note, however,\n// that in test environment we may need situations were environment is mocked as\n// client-side, although no proper Webpack compilation is executed, thus no info\n// injected; because of this we don't do a hard environment check here.\nif (typeof BUILD_INFO !== 'undefined') buildInfo = BUILD_INFO;\n\n/**\n * In scenarious where \"BUILD_INFO\" is not injected by Webpack (server-side,\n * tests, etc.) we expect the host codebase to explicitly set it before it is\n * ever requested. As a precaution, this function throws if build info has been\n * set already, unless `force` flag is explicitly set.\n * @param info\n * @param force\n */\nexport function setBuildInfo(info?: BuildInfoT, force = false): void {\n if (buildInfo !== undefined && !force) {\n throw Error('\"Build Info\" is already initialized');\n }\n buildInfo = info;\n}\n\n/**\n * Returns \"Build Info\" object; throws if it has not been initialized yet.\n * @returns\n */\nexport function getBuildInfo(): BuildInfoT {\n if (buildInfo === undefined) {\n throw Error('\"Build Info\" has not been initialized yet');\n }\n return buildInfo;\n}\n","// Encapsulates retrieval of server-side data injection into HTML template.\n\n/* global document */\n\n// Note: this way, only required part of \"node-forge\": AES, and some utils,\n// is bundled into client-side code.\nimport forge from 'node-forge/lib/forge';\n\n// eslint-disable-next-line import/no-unassigned-import\nimport 'node-forge/lib/aes';\n\nimport type { InjT } from 'utils/globalState';\n\nimport { getBuildInfo } from 'utils/isomorphy/buildInfo';\n\n// Safeguard is needed here, because the server-side version of Docusaurus docs\n// is compiled (at least now) with settings suggesting it is a client-side\n// environment, but there is no document.\nlet inj: InjT = {};\n\nconst metaElement: HTMLMetaElement | null = typeof document === 'undefined'\n ? null : document.querySelector('meta[itemprop=\"drpruinj\"]');\n\nif (metaElement) {\n metaElement.remove();\n let data = forge.util.decode64(metaElement.content);\n\n const { key } = getBuildInfo();\n const d = forge.cipher.createDecipher('AES-CBC', key);\n d.start({ iv: data.slice(0, key.length) });\n d.update(forge.util.createBuffer(data.slice(key.length)));\n d.finish();\n\n data = forge.util.decodeUtf8(d.output.data);\n\n // TODO: Double-check, if there is a safer alternative to parse it?\n // eslint-disable-next-line no-eval\n inj = eval(`(${data})`) as InjT;\n} else if (typeof window !== 'undefined' && window.REACT_UTILS_INJECTION) {\n inj = window.REACT_UTILS_INJECTION;\n delete window.REACT_UTILS_INJECTION;\n} else {\n // Otherwise, a bunch of dependent stuff will easily fail in non-standard\n // environments, where no client-side initialization is performed. Like tests,\n // Docusaurus examples, etc.\n inj = {};\n}\n\nexport default function getInj(): InjT {\n return inj;\n}\n","module.exports = __WEBPACK_EXTERNAL_MODULE__707__;","import { getBuildInfo } from './buildInfo';\nimport { IS_CLIENT_SIDE, IS_SERVER_SIDE } from './environment-check';\n\n/**\n * @ignore\n * @return {string} Code mode: \"development\" or \"production\".\n */\nfunction getMode() {\n return process.env.NODE_ENV;\n}\n\n/**\n * Returns `true` if development version of the code is running;\n * `false` otherwise.\n */\nexport function isDevBuild(): boolean {\n return getMode() === 'development';\n}\n\n/**\n * Returns `true` if production build of the code is running;\n * `false` otherwise.\n */\nexport function isProdBuild(): boolean {\n return getMode() === 'production';\n}\n\n/**\n * Returns build timestamp of the front-end JS bundle.\n * @return ISO date/time string.\n */\nexport function buildTimestamp(): string {\n return getBuildInfo().timestamp;\n}\n\nexport { IS_CLIENT_SIDE, IS_SERVER_SIDE, getBuildInfo };\n","module.exports = __WEBPACK_EXTERNAL_MODULE__814__;","module.exports = __WEBPACK_EXTERNAL_MODULE__859__;","module.exports = __WEBPACK_EXTERNAL_MODULE__864__;","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","module.exports = __WEBPACK_EXTERNAL_MODULE__958__;","// Initialization of client-side code.\n/* global document */\n\nimport type { ComponentType } from 'react';\nimport { createRoot, hydrateRoot } from 'react-dom/client';\nimport { HelmetProvider } from '@dr.pogodin/react-helmet';\nimport { BrowserRouter } from 'react-router';\n\nimport { GlobalStateProvider } from '@dr.pogodin/react-global-state';\n\nimport getInj from './getInj';\n\ntype OptionsT = {\n dontHydrate?: boolean;\n initialState?: unknown;\n};\n\n/**\n * Prepares and launches the app at client side.\n * @param Application Root application component\n * @param [options={}] Optional. Additional settings.\n */\nexport default function Launch(\n Application: ComponentType,\n options: OptionsT = {},\n): void {\n const container = document.getElementById('react-view');\n if (!container) throw Error('Failed to find container for React app');\n const scene = (\n <GlobalStateProvider initialState={getInj().ISTATE ?? options.initialState}>\n <BrowserRouter>\n <HelmetProvider>\n <Application />\n </HelmetProvider>\n </BrowserRouter>\n </GlobalStateProvider>\n );\n\n if (options.dontHydrate) {\n const root = createRoot(container);\n root.render(scene);\n } else hydrateRoot(container, scene);\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// extracted by mini-css-extract-plugin\nexport default {};","/* global document */\n\nimport type CookieM from 'cookie';\n\nimport { IS_CLIENT_SIDE } from './isomorphy/environment-check';\nimport { requireWeak } from './webpack';\n\n// TODO: The internal type casting is somewhat messed up here,\n// to be corrected later.\nconst config: Record<string, unknown> = (\n IS_CLIENT_SIDE\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n ? (require('client/getInj') as {\n default: () => Record<string, unknown>;\n }).default().CONFIG\n : requireWeak('config')\n) as (Record<string, unknown> | undefined) ?? ({} as Record<string, unknown>);\n\n// The safeguard for \"document\" is necessary because in non-Node environments,\n// like React Native, IS_CLIENT_SIDE is \"true\", however \"document\" and a bunch\n// of other browser-world features are not available.\nif (IS_CLIENT_SIDE && typeof document !== 'undefined') {\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n const cookie = require('cookie') as typeof CookieM;\n config.CSRF = cookie.parse(document.cookie).csrfToken;\n}\n\nexport default config;\n","import type { Request } from 'express';\n\nimport { type SsrContext, withGlobalStateType } from '@dr.pogodin/react-global-state';\n\n/** Mapping \"chunkName\" > array of asset paths. */\nexport type ChunkGroupsT = Record<string, string[]>;\n\n// The type of data object injected by server into generated markup.\nexport type InjT = {\n CHUNK_GROUPS?: ChunkGroupsT;\n CONFIG?: Record<string, unknown>;\n ISTATE?: unknown;\n};\n\ndeclare global {\n // eslint-disable-next-line @typescript-eslint/consistent-type-definitions\n interface Window {\n REACT_UTILS_INJECTION?: InjT;\n }\n}\n\n// TODO: Not 100% sure now, whether it indeed can be replaced by type,\n// or do we really need it to be an interface. Keeping the interface for now.\n// eslint-disable-next-line @typescript-eslint/consistent-type-definitions\nexport interface SsrContextT<StateT> extends SsrContext<StateT> {\n chunkGroups: ChunkGroupsT;\n chunks: string[];\n\n /** If set at the end of SSR, the rendered will trigger\n * server-side redirect to this URL (and use the status\n * code). */\n redirectTo?: string;\n\n req: Request;\n status: number;\n}\n\nconst {\n getSsrContext,\n} = withGlobalStateType<unknown, SsrContextT<unknown>>();\n\nexport {\n getSsrContext,\n};\n","import { serialize } from 'cookie';\nimport { useEffect } from 'react';\nimport dayjs from 'dayjs';\n\nimport {\n DAY_MS,\n HOUR_MS,\n MIN_MS,\n SEC_MS,\n YEAR_MS,\n timer,\n} from '@dr.pogodin/js-utils';\n\nimport { type ForceT, useGlobalState } from '@dr.pogodin/react-global-state';\n\nimport { getSsrContext } from './globalState';\n\n/**\n * This react hook wraps Date.now() function in a SSR friendly way,\n * ensuring that all calls to useCurrent() within the same render return\n * exactly the same time (which is retrieved from Date.now() first, and\n * then stored in the global state to be reused in all other calls), which\n * is also passed and used in the first client side render, and then updated\n * with a finite precision to avoid infinite re-rendering loops.\n */\n// TODO: Should we request the state type as generic parameter, to be able\n// to verify the give globalStatePath is correct?\nexport function useCurrent({\n autorefresh = false,\n globalStatePath = 'currentTime',\n precision = 5 * SEC_MS,\n} = {}): number {\n const [now, setter] = useGlobalState<ForceT, number>(\n globalStatePath,\n Date.now,\n );\n useEffect(() => {\n let timerId: NodeJS.Timeout | undefined;\n const update = (): void => {\n setter((old) => {\n const neu = Date.now();\n return Math.abs(neu - old) > precision ? neu : old;\n });\n if (autorefresh) timerId = setTimeout(update, precision);\n };\n update();\n return (): void => {\n if (timerId) clearTimeout(timerId);\n };\n }, [autorefresh, precision, setter]);\n return now;\n}\n\n/**\n * Wraps the standard Date.getTimezoneOffset() method in a SSR-friendly way.\n * This hook retrieves the offset value at the client side and uses a cookie\n * to pass it to the server in subsequent requests from that user. At the server\n * side the value from cookie is used in renders and passed back to the client\n * via the global state. Prior to the value being known (in the very first\n * request from the user, when the cookie is still missing), zero value is used\n * as the default value.\n */\n// TODO: Should we request the state type as generic parameter, to be able\n// to verify the give globalStatePath is correct?\nexport function useTimezoneOffset({\n cookieName = 'timezoneOffset',\n globalStatePath = 'timezoneOffset',\n} = {}): number {\n const ssrContext = getSsrContext(false);\n const [offset, setOffset] = useGlobalState<ForceT, number>(\n globalStatePath,\n () => {\n const value = cookieName\n && ssrContext?.req.cookies[cookieName] as string;\n return value ? parseInt(value) : 0;\n },\n );\n useEffect(() => {\n const date = new Date();\n const value = date.getTimezoneOffset();\n setOffset(value);\n if (cookieName) {\n document.cookie = serialize(cookieName, value.toString(), { path: '/' });\n }\n }, [cookieName, setOffset]);\n return offset;\n}\n\nconst time = {\n DAY_MS,\n HOUR_MS,\n MIN_MS,\n SEC_MS,\n YEAR_MS,\n now: Date.now,\n timer,\n useCurrent,\n useTimezoneOffset,\n};\n\nexport default Object.assign(dayjs, time);\n","/* global document */\n\nimport {\n type ComponentType,\n type FunctionComponent,\n type ReactNode,\n type RefObject,\n Suspense,\n lazy,\n useInsertionEffect,\n} from 'react';\n\nimport { Barrier } from '@dr.pogodin/js-utils';\n\nimport { type ChunkGroupsT, getSsrContext } from './globalState';\n\nimport {\n IS_CLIENT_SIDE,\n IS_SERVER_SIDE,\n getBuildInfo,\n} from './isomorphy';\n\n// Note: At the client side we can get chunk groups immediately when loading\n// the module; at the server-side we only can get them within React render flow.\n// Thus, we set and use the following variable at the client-side, and then when\n// needed on the server side, we'll fetch it differently.\nlet clientChunkGroups: ChunkGroupsT;\n\nif (IS_CLIENT_SIDE) {\n // TODO: Rewrite to avoid these overrides of ESLint rules.\n /* eslint-disable @typescript-eslint/no-unsafe-assignment,\n @typescript-eslint/no-require-imports,\n @typescript-eslint/no-unsafe-call,\n @typescript-eslint/no-unsafe-member-access */\n clientChunkGroups = require('client/getInj').default().CHUNK_GROUPS ?? {};\n /* eslint-enable @typescript-eslint/no-unsafe-assignment,\n @typescript-eslint/no-require-imports,\n @typescript-eslint/no-unsafe-call,\n @typescript-eslint/no-unsafe-member-access */\n}\n\nconst refCounts: Record<string, number> = {};\n\nfunction getPublicPath() {\n return getBuildInfo().publicPath;\n}\n\n/**\n * Client-side only! Ensures the specified CSS stylesheet is loaded into\n * the document; loads if it is missing; and does simple reference counting\n * to facilitate future clean-up.\n * @param name\n * @param loadedSheets\n * @param refCount\n * @return\n */\nfunction bookStyleSheet(\n name: string,\n loadedSheets: Set<string>,\n refCount: boolean,\n): Promise<void> | undefined {\n let res: Barrier<void> | undefined;\n const path = `${getPublicPath()}/${name}`;\n const fullPath = `${document.location.origin}${path}`;\n\n if (!loadedSheets.has(fullPath)) {\n let link = document.querySelector(`link[href=\"${path}\"]`);\n\n if (!link) {\n link = document.createElement('link');\n link.setAttribute('rel', 'stylesheet');\n link.setAttribute('href', path);\n document.head.appendChild(link);\n }\n\n res = new Barrier<void>();\n link.addEventListener('load', () => {\n if (!res) throw Error('Internal error');\n void res.resolve();\n });\n link.addEventListener('error', () => {\n if (!res) throw Error('Internal error');\n void res.resolve();\n });\n }\n\n if (refCount) {\n const current = refCounts[path] ?? 0;\n refCounts[path] = 1 + current;\n }\n\n return res;\n}\n\n/**\n * Generates the set of URLs for currently loaded, linked stylesheets.\n * @return\n */\nfunction getLoadedStyleSheets(): Set<string> {\n const res = new Set<string>();\n const { styleSheets } = document;\n for (const { href } of styleSheets) {\n if (href) res.add(href);\n }\n return res;\n}\n\nfunction assertChunkName(\n chunkName: string,\n chunkGroups: ChunkGroupsT,\n) {\n if (chunkGroups[chunkName]) return;\n throw Error(`Unknown chunk name \"${chunkName}\"`);\n}\n\n/**\n * Client-side only! Ensures all CSS stylesheets required for the specified\n * code chunk are loaded into the document; loads the missing ones; and does\n * simple reference counting to facilitate future clean-up.\n * @param chunkName Chunk name.\n * @param refCount\n * @return Resolves once all pending stylesheets, necessary for\n * the chunk, are either loaded, or failed to load.\n */\nexport async function bookStyleSheets(\n chunkName: string,\n chunkGroups: ChunkGroupsT,\n refCount: boolean,\n): Promise<void> {\n const promises = [];\n const assets = chunkGroups[chunkName];\n if (!assets) return Promise.resolve();\n\n const loadedSheets = getLoadedStyleSheets();\n\n for (const asset of assets) {\n if (asset.endsWith('.css')) {\n const promise = bookStyleSheet(asset, loadedSheets, refCount);\n if (promise) promises.push(promise);\n }\n }\n\n return promises.length\n ? Promise.allSettled(promises).then()\n : Promise.resolve();\n}\n\n/**\n * Client-side only! Frees from the document all CSS stylesheets that are\n * required by the specified chunk, and have reference counter equal to one\n * (for chunks with larger reference counter values, it just decrements\n * the reference counter).\n * @param {string} chunkName\n */\nexport function freeStyleSheets(\n chunkName: string,\n chunkGroups: ChunkGroupsT,\n): void {\n const assets = chunkGroups[chunkName];\n if (!assets) return;\n\n for (const asset of assets) {\n if (asset.endsWith('.css')) {\n const path = `${getPublicPath()}/${asset}`;\n\n const pathRefCount = refCounts[path];\n if (pathRefCount) {\n if (pathRefCount <= 1) {\n document.head.querySelector(`link[href=\"${path}\"]`)!.remove();\n delete refCounts[path];\n } else refCounts[path] = pathRefCount - 1;\n }\n }\n }\n}\n\n// Holds the set of chunk names already used for splitComponent() calls.\nconst usedChunkNames = new Set();\n\ntype ComponentOrModule<PropsT> = ComponentType<PropsT> | {\n default: ComponentType<PropsT>;\n};\n\n/**\n * Given an async component retrieval function `getComponent()` it creates\n * a special \"code split\" component, which uses <Suspense> to asynchronously\n * load on demand the code required by `getComponent()`.\n * @param options\n * @param options.chunkName\n * @param {function} options.getComponent\n * @param {React.Element} [options.placeholder]\n * @return {React.ElementType}\n */\nexport default function splitComponent<\n ComponentPropsT extends { children?: ReactNode; ref?: RefObject<unknown> },\n>({\n chunkName,\n getComponent,\n placeholder,\n}: {\n chunkName: string;\n getComponent: () => Promise<ComponentOrModule<ComponentPropsT>>;\n placeholder?: ReactNode;\n}): FunctionComponent<ComponentPropsT> {\n // On the client side we can check right away if the chunk name is known.\n if (IS_CLIENT_SIDE) assertChunkName(chunkName, clientChunkGroups);\n\n // The correct usage of splitComponent() assumes a single call per chunk.\n if (usedChunkNames.has(chunkName)) {\n throw Error(`Repeated splitComponent() call for the chunk \"${chunkName}\"`);\n } else usedChunkNames.add(chunkName);\n\n const LazyComponent = lazy(async () => {\n const resolved = await getComponent();\n const Component = 'default' in resolved ? resolved.default : resolved;\n\n // This pre-loads necessary stylesheets prior to the first mount of\n // the component (the lazy load function is executed by React one at\n // the frist mount).\n if (IS_CLIENT_SIDE) {\n await bookStyleSheets(chunkName, clientChunkGroups, false);\n }\n\n const Wrapper: FunctionComponent<ComponentPropsT> = ({\n children,\n ref,\n ...rest\n }) => {\n // On the server side we'll assert the chunk name here,\n // and also push it to the SSR chunks array.\n if (IS_SERVER_SIDE) {\n const { chunkGroups, chunks } = getSsrContext()!;\n assertChunkName(chunkName, chunkGroups);\n if (!chunks.includes(chunkName)) chunks.push(chunkName);\n }\n\n // This takes care about stylesheets management every time an instance of\n // this component is mounted / unmounted.\n useInsertionEffect(() => {\n void bookStyleSheets(chunkName, clientChunkGroups, true);\n return () => {\n freeStyleSheets(chunkName, clientChunkGroups);\n };\n }, []);\n\n return (\n <Component\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...(rest as unknown as ComponentPropsT)}\n ref={ref}\n >\n {children}\n </Component>\n );\n };\n\n return { default: Wrapper };\n });\n\n const CodeSplit: React.FunctionComponent<ComponentPropsT> = ({\n children,\n ...rest\n }: ComponentPropsT) => (\n <Suspense fallback={placeholder}>\n <LazyComponent\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...rest as Parameters<typeof LazyComponent>[0]}\n >\n {children}\n </LazyComponent>\n </Suspense>\n );\n\n return CodeSplit;\n}\n","import themedImpl, {\n COMPOSE,\n PRIORITY,\n type Theme,\n ThemeProvider,\n} from '@dr.pogodin/react-themes';\n\nimport config from './config';\nimport * as isomorphy from './isomorphy';\nimport time from './time';\nimport * as webpack from './webpack';\n\nexport {\n assertEmptyObject,\n type Listener,\n type ObjectKey,\n Barrier,\n Cached,\n Emitter,\n Semaphore,\n withRetries,\n} from '@dr.pogodin/js-utils';\n\nexport { getSsrContext } from './globalState';\nexport { default as splitComponent } from './splitComponent';\n\ntype ThemedT = typeof themedImpl & {\n COMPOSE: typeof COMPOSE;\n PRIORITY: typeof PRIORITY;\n};\n\nconst themed: ThemedT = themedImpl as ThemedT;\n\nthemed.COMPOSE = COMPOSE;\nthemed.PRIORITY = PRIORITY;\n\nexport {\n type Theme,\n config,\n isomorphy,\n themed,\n ThemeProvider,\n time,\n webpack,\n};\n","// The stuff common between different dropdown implementations.\n\nimport type { Theme } from '@dr.pogodin/react-themes';\n\ntype ThemeKeyT = 'active'\n | 'arrow'\n | 'container'\n | 'dropdown'\n | 'hiddenOption'\n | 'label'\n | 'option'\n | 'select'\n\n // TODO: This is currently only valid for (native) <Dropdown>,\n // other kinds of selectors should be evaluated, and aligned with this\n // feature, if appropriate.\n | 'invalid'\n\n // TODO: This is only valid for <CustomDropdown>, thus we need to re-factor it\n // into a separate theme spec for that component.\n | 'upward';\n\nexport type ValueT = number | string;\n\nexport type OptionT<NameT> = {\n name?: NameT | null;\n value: ValueT;\n};\n\nexport type OptionsT<NameT> = Readonly<Array<OptionT<NameT> | ValueT>>;\n\nexport type PropsT<\n NameT,\n OnChangeT = React.ChangeEventHandler<HTMLSelectElement>,\n> = {\n filter?: (item: OptionT<NameT> | ValueT) => boolean;\n label?: React.ReactNode;\n onChange?: OnChangeT;\n options: Readonly<OptionsT<NameT>>;\n testId?: string;\n theme: Theme<ThemeKeyT>;\n value?: ValueT;\n};\n\nfunction isValue<T>(x: OptionT<T> | ValueT): x is ValueT {\n const type = typeof x;\n return type === 'number' || type === 'string';\n}\n\n/** Returns option value and name as a tuple. */\nexport function optionValueName<NameT>(\n option: OptionT<NameT> | ValueT,\n): [ValueT, NameT | ValueT] {\n return isValue(option)\n ? [option, option]\n : [option.value, option.name ?? option.value];\n}\n","// extracted by mini-css-extract-plugin\nexport default {\"overlay\":\"ye2BZo\",\"context\":\"Szmbbz\",\"ad\":\"Ah-Nsc\",\"hoc\":\"Wki41G\",\"container\":\"gyZ4rc\"};","// extracted by mini-css-extract-plugin\nexport default {\"scrollingDisabledByModal\":\"_5fRFtF\"};","import {\n type CSSProperties,\n type FunctionComponent,\n type ReactNode,\n useEffect,\n useMemo,\n useRef,\n} from 'react';\n\nimport ReactDom from 'react-dom';\nimport themed, { type Theme } from '@dr.pogodin/react-themes';\n\nimport baseTheme from './base-theme.scss';\nimport S from './styles.scss';\n\ntype PropsT = {\n cancelOnScrolling?: boolean;\n children?: ReactNode;\n dontDisableScrolling?: boolean;\n onCancel?: () => void;\n overlayStyle?: CSSProperties;\n style?: CSSProperties;\n testId?: string;\n testIdForOverlay?: string;\n theme: Theme<'container' | 'overlay'>;\n\n /** @deprecated */\n containerStyle?: CSSProperties;\n};\n\n/**\n * The `<Modal>` component implements a simple themeable modal window, wrapped\n * into the default theme. `<BaseModal>` exposes the base non-themed component.\n * **Children:** Component children are rendered as the modal content.\n * @param {object} props Component properties. Beside props documented below,\n * [Other theming properties](https://www.npmjs.com/package/@dr.pogodin/react-themes#themed-component-properties) are supported as well.\n * @param {function} [props.onCancel] The callback to trigger when user\n * clicks outside the modal, or presses Escape. It is expected to hide the\n * modal.\n * @param {ModalTheme} [props.theme] _Ad hoc_ theme.\n */\nconst BaseModal: FunctionComponent<PropsT> = ({\n cancelOnScrolling,\n children,\n containerStyle,\n dontDisableScrolling,\n onCancel,\n overlayStyle,\n style,\n testId,\n testIdForOverlay,\n theme,\n}) => {\n const containerRef = useRef<HTMLDivElement | null>(null);\n const overlayRef = useRef<HTMLDivElement | null>(null);\n\n // Sets up modal cancellation of scrolling, if opted-in.\n useEffect(() => {\n if (cancelOnScrolling && onCancel) {\n window.addEventListener('scroll', onCancel);\n window.addEventListener('wheel', onCancel);\n }\n return () => {\n if (cancelOnScrolling && onCancel) {\n window.removeEventListener('scroll', onCancel);\n window.removeEventListener('wheel', onCancel);\n }\n };\n }, [cancelOnScrolling, onCancel]);\n\n // Disables window scrolling, if it is not opted-out.\n useEffect(() => {\n if (!dontDisableScrolling) {\n document.body.classList.add(S.scrollingDisabledByModal);\n }\n return () => {\n if (!dontDisableScrolling) {\n document.body.classList.remove(S.scrollingDisabledByModal);\n }\n };\n }, [dontDisableScrolling]);\n\n const focusLast = useMemo(() => (\n <div\n onFocus={() => {\n const elems = containerRef.current!.querySelectorAll('*');\n for (let i = elems.length - 1; i >= 0; --i) {\n (elems[i] as HTMLElement).focus();\n if (document.activeElement === elems[i]) return;\n }\n overlayRef.current?.focus();\n }}\n // TODO: Have a look at this later.\n // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex\n tabIndex={0}\n />\n ), []);\n\n return ReactDom.createPortal(\n (\n <div>\n {focusLast}\n <div\n aria-label=\"Cancel\"\n className={theme.overlay}\n data-testid={\n process.env.NODE_ENV === 'production'\n ? undefined : testIdForOverlay\n }\n onClick={(e) => {\n if (onCancel) {\n onCancel();\n e.stopPropagation();\n }\n }}\n onKeyDown={(e) => {\n if (e.key === 'Escape' && onCancel) {\n onCancel();\n e.stopPropagation();\n }\n }}\n ref={(node) => {\n if (node && node !== overlayRef.current) {\n overlayRef.current = node;\n node.focus();\n }\n }}\n role=\"button\"\n style={overlayStyle}\n tabIndex={0}\n />\n {\n // NOTE: These rules are disabled because our intention is to keep\n // the element non-interactive (thus not on the keyboard focus chain),\n // and it has `onClick` handler merely to stop propagation of click\n // events to its parent container. This is needed because, for example\n // when the modal is wrapped into an interactive element we don't want\n // any clicks inside the modal to bubble-up to that parent element\n // (because visually and logically the modal dialog does not belong\n // to its parent container, where it technically belongs from\n // the HTML mark-up perpective).\n }\n <div // eslint-disable-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions\n aria-modal=\"true\"\n className={theme.container}\n data-testid={process.env.NODE_ENV === 'production' ? undefined : testId}\n onClick={(e) => {\n e.stopPropagation();\n }}\n onWheel={(event) => {\n event.stopPropagation();\n }}\n ref={containerRef}\n role=\"dialog\"\n style={style ?? containerStyle}\n >\n {children}\n </div>\n <div\n onFocus={() => {\n overlayRef.current?.focus();\n }}\n // TODO: Have a look at this later.\n // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex\n tabIndex={0}\n />\n {focusLast}\n </div>\n ),\n document.body,\n );\n};\n\nexport default themed(BaseModal, 'Modal', baseTheme);\n\n/* Non-themed version of the Modal. */\nexport { BaseModal };\n","// extracted by mini-css-extract-plugin\nexport default {\"overlay\":\"jKsMKG\"};","import {\n type FunctionComponent,\n type ReactNode,\n type RefObject,\n useImperativeHandle,\n useRef,\n} from 'react';\n\nimport { BaseModal } from 'components/Modal';\n\nimport {\n type OptionT,\n type OptionsT,\n type ValueT,\n optionValueName,\n} from '../../common';\n\nimport S from './style.scss';\n\nexport type ContainerPosT = {\n left: number;\n top: number;\n width: number;\n};\n\nexport function areEqual(a?: ContainerPosT, b?: ContainerPosT): boolean {\n return a?.left === b?.left && a?.top === b?.top && a?.width === b?.width;\n}\n\nexport type RefT = {\n measure: () => DOMRect | undefined;\n};\n\ntype PropsT = {\n containerClass: string;\n containerStyle?: ContainerPosT;\n filter?: (item: OptionT<ReactNode> | ValueT) => boolean;\n optionClass: string;\n options: Readonly<OptionsT<ReactNode>>;\n onCancel: () => void;\n onChange: (value: ValueT) => void;\n ref?: RefObject<RefT | null>;\n};\n\nconst Options: FunctionComponent<PropsT> = ({\n containerClass,\n containerStyle,\n filter,\n onCancel,\n onChange,\n optionClass,\n options,\n ref,\n}) => {\n const opsRef = useRef<HTMLDivElement>(null);\n\n useImperativeHandle(ref, () => ({\n measure: () => {\n const e = opsRef.current?.parentElement;\n if (!e) return undefined;\n\n const rect = opsRef.current!.getBoundingClientRect();\n const style = window.getComputedStyle(e);\n const mBottom = parseFloat(style.marginBottom);\n const mTop = parseFloat(style.marginTop);\n\n rect.height += mBottom + mTop;\n\n return rect;\n },\n }), []);\n\n const optionNodes: ReactNode[] = [];\n for (const option of options) {\n if (!filter || filter(option)) {\n const [iValue, iName] = optionValueName(option);\n optionNodes.push(\n <div\n className={optionClass}\n key={iValue}\n onClick={(e) => {\n onChange(iValue);\n e.stopPropagation();\n }}\n onKeyDown={(e) => {\n if (e.key === 'Enter') {\n onChange(iValue);\n e.stopPropagation();\n }\n }}\n role=\"button\"\n tabIndex={0}\n >\n {iName}\n </div>,\n );\n }\n }\n\n return (\n <BaseModal\n // Closes the dropdown (cancels the selection) on any page scrolling attempt.\n // This is the same native <select> elements do on scrolling, and at least for\n // now we have no reason to deal with complications needed to support open\n // dropdowns during the scrolling (that would need to re-position it in\n // response to the position changes of the root dropdown element).\n cancelOnScrolling\n dontDisableScrolling\n onCancel={onCancel}\n style={containerStyle}\n theme={{\n ad: '',\n container: containerClass,\n context: '',\n hoc: '',\n overlay: S.overlay,\n }}\n >\n <div ref={opsRef}>{optionNodes}</div>\n </BaseModal>\n );\n};\n\nexport default Options;\n","// extracted by mini-css-extract-plugin\nexport default {\"container\":\"oQKv0Y\",\"context\":\"_9Tod5r\",\"ad\":\"R58zIg\",\"hoc\":\"O-Tp1i\",\"label\":\"YUPUNs\",\"dropdown\":\"pNEyAA\",\"option\":\"LD2Kzy\",\"select\":\"LP5azC\",\"arrow\":\"-wscve\",\"active\":\"k2UDsV\",\"upward\":\"HWRvu4\"};","import { useEffect, useRef, useState } from 'react';\n\nimport themed from '@dr.pogodin/react-themes';\n\nimport { type PropsT, type ValueT, optionValueName } from '../common';\n\nimport Options, { type ContainerPosT, type RefT, areEqual } from './Options';\n\nimport defaultTheme from './theme.scss';\n\nconst BaseCustomDropdown: React.FunctionComponent<\n PropsT<React.ReactNode, (value: ValueT) => void>\n> = ({\n filter,\n label,\n onChange,\n options,\n theme,\n value,\n}) => {\n const [active, setActive] = useState(false);\n\n const dropdownRef = useRef<HTMLDivElement>(null);\n const opsRef = useRef<RefT>(null);\n\n const [opsPos, setOpsPos] = useState<ContainerPosT>();\n const [upward, setUpward] = useState(false);\n\n useEffect(() => {\n if (!active) return undefined;\n\n let id: number;\n const cb = () => {\n const anchor = dropdownRef.current?.getBoundingClientRect();\n const opsRect = opsRef.current?.measure();\n if (anchor && opsRect) {\n const fitsDown = anchor.bottom + opsRect.height\n < (window.visualViewport?.height ?? 0);\n const fitsUp = anchor.top - opsRect.height > 0;\n\n const up = !fitsDown && fitsUp;\n setUpward(up);\n\n const pos = up ? {\n left: anchor.left,\n top: anchor.top - opsRect.height - 1,\n width: anchor.width,\n } : {\n left: anchor.left,\n top: anchor.bottom,\n width: anchor.width,\n };\n\n setOpsPos((now) => (areEqual(now, pos) ? now : pos));\n }\n id = requestAnimationFrame(cb);\n };\n requestAnimationFrame(cb);\n\n return () => {\n cancelAnimationFrame(id);\n };\n }, [active]);\n\n const openList = (\n e: React.KeyboardEvent<HTMLDivElement> | React.MouseEvent<HTMLDivElement>,\n ) => {\n const view = window.visualViewport;\n const rect = dropdownRef.current!.getBoundingClientRect();\n setActive(true);\n\n // NOTE: This first opens the dropdown off-screen, where it is measured\n // by an effect declared above, and then positioned below, or above\n // the original dropdown element, depending where it fits best\n // (if we first open it downward, it would flick if we immediately\n // move it above, at least with the current position update via local\n // react state, and not imperatively).\n setOpsPos({\n left: view?.width ?? 0,\n top: view?.height ?? 0,\n width: rect.width,\n });\n\n e.stopPropagation();\n };\n\n let selected: React.ReactNode = <>‌</>;\n for (const option of options) {\n if (!filter || filter(option)) {\n const [iValue, iName] = optionValueName(option);\n if (iValue === value) {\n selected = iName;\n break;\n }\n }\n }\n\n let containerClassName = theme.container;\n if (active) containerClassName += ` ${theme.active}`;\n\n let opsContainerClass = theme.select ?? '';\n if (upward) {\n containerClassName += ` ${theme.upward}`;\n opsContainerClass += ` ${theme.upward}`;\n }\n\n return (\n <div className={containerClassName}>\n {label === undefined ? null\n : <div className={theme.label}>{label}</div>}\n <div\n className={theme.dropdown}\n onClick={openList}\n onKeyDown={(e) => {\n if (e.key === 'Enter') openList(e);\n }}\n ref={dropdownRef}\n role=\"listbox\"\n tabIndex={0}\n >\n {selected}\n <div className={theme.arrow} />\n </div>\n {\n active ? (\n <Options\n containerClass={opsContainerClass}\n containerStyle={opsPos}\n onCancel={() => {\n setActive(false);\n }}\n onChange={(newValue) => {\n setActive(false);\n if (onChange) onChange(newValue);\n }}\n optionClass={theme.option ?? ''}\n options={options}\n ref={opsRef}\n />\n ) : null\n }\n </div>\n );\n};\n\nexport default themed(BaseCustomDropdown, 'CustomDropdown', defaultTheme);\n","// extracted by mini-css-extract-plugin\nexport default {\"dropdown\":\"kI9A9U\",\"context\":\"xHyZo4\",\"ad\":\"ADu59e\",\"hoc\":\"FTP2bb\",\"arrow\":\"DubGkT\",\"container\":\"WtSZPd\",\"active\":\"ayMn7O\",\"label\":\"K7JYKw\",\"option\":\"_27pZ6W\",\"hiddenOption\":\"clAKFJ\",\"select\":\"N0Fc14\",\"invalid\":\"wL4umU\"};","// Implements dropdown based on the native HTML <select> element.\n\nimport themed from '@dr.pogodin/react-themes';\n\nimport { type PropsT, optionValueName } from '../common';\n\nimport defaultTheme from './theme.scss';\n\n/**\n * Implements a themeable dropdown list. Internally it is rendered with help of\n * the standard HTML `<select>` element, thus the styling support is somewhat\n * limited.\n * @param [props] Component properties.\n * @param [props.filter] Options filter function. If provided, only\n * those elements of `options` list will be used by the dropdown, for which this\n * filter returns `true`.\n * @param [props.label] Dropdown label.\n * @param [props.onChange] Selection event handler.\n * @param [props.options=[]] Array of dropdown\n * options. For string elements the option value and name will be the same.\n * It is allowed to mix DropdownOption and string elements in the same option\n * list.\n * @param [props.theme] _Ad hoc_ theme.\n * @param [props.value] Currently selected value.\n * @param [props....]\n * [Other theming properties](https://www.npmjs.com/package/@dr.pogodin/react-themes#themed-component-properties)\n */\nconst Dropdown: React.FunctionComponent<PropsT<string>> = ({\n filter,\n label,\n onChange,\n options,\n testId,\n theme,\n value,\n}) => {\n let isValidValue = false;\n const optionElements = [];\n\n for (const option of options) {\n if (!filter || filter(option)) {\n const [iValue, iName] = optionValueName(option);\n isValidValue ||= iValue === value;\n optionElements.push(\n <option className={theme.option} key={iValue} value={iValue}>\n {iName}\n </option>,\n );\n }\n }\n\n // NOTE: This element represents the current `value` when it does not match\n // any valid option. In Chrome, and some other browsers, we are able to hide\n // it from the opened dropdown; in others, e.g. Safari, the best we can do is\n // to show it as disabled.\n const hiddenOption = isValidValue ? null : (\n <option\n className={theme.hiddenOption}\n disabled\n key=\"__reactUtilsHiddenOption\"\n value={value}\n >\n {value}\n </option>\n );\n\n let selectClassName = theme.select;\n if (!isValidValue) selectClassName += ` ${theme.invalid}`;\n\n return (\n <div className={theme.container}>\n { label === undefined\n ? null : <div className={theme.label}>{label}</div> }\n <div className={theme.dropdown}>\n <select\n className={selectClassName}\n data-testid={process.env.NODE_ENV === 'production' ? undefined : testId}\n onChange={onChange}\n value={value}\n >\n {hiddenOption}\n {optionElements}\n </select>\n <div className={theme.arrow} />\n </div>\n </div>\n );\n};\n\nexport default themed(Dropdown, 'Dropdown', defaultTheme);\n","// extracted by mini-css-extract-plugin\nexport default {\"container\":\"AWNvRj\",\"context\":\"VMHfnP\",\"ad\":\"HNliRC\",\"hoc\":\"_2Ue-db\",\"option\":\"fUfIAd\",\"selected\":\"Wco-qk\",\"options\":\"CZYtcC\"};","import themed, { type Theme } from '@dr.pogodin/react-themes';\n\nimport {\n type OptionsT,\n type ValueT,\n optionValueName,\n} from '../common';\n\nimport defaultTheme from './theme.scss';\n\ntype ThemeKeyT = 'container' | 'label' | 'option' | 'options' | 'selected';\n\ntype PropsT = {\n label?: React.ReactNode;\n onChange?: (value: ValueT) => void;\n options?: Readonly<OptionsT<React.ReactNode>>;\n theme: Theme<ThemeKeyT>;\n value?: ValueT;\n};\n\nconst BaseSwitch: React.FunctionComponent<PropsT> = ({\n label,\n onChange,\n options,\n theme,\n value,\n}) => {\n if (!options || !theme.option) throw Error('Internal error');\n\n const optionNodes: React.ReactNode[] = [];\n for (const option of options) {\n const [iValue, iName] = optionValueName(option);\n\n let className: string = theme.option;\n let onPress: (() => void) | undefined;\n if (iValue === value) className += ` ${theme.selected}`;\n else if (onChange) {\n onPress = () => {\n onChange(iValue);\n };\n }\n\n optionNodes.push(\n onPress\n ? (\n <div\n className={className}\n key={iValue}\n onClick={onPress}\n onKeyDown={(e) => {\n if (e.key === 'Enter') onPress();\n }}\n role=\"button\"\n tabIndex={0}\n >\n {iName}\n </div>\n )\n : <div className={className} key={iValue}>{iName}</div>,\n );\n }\n\n return (\n <div className={theme.container}>\n {label ? <div className={theme.label}>{label}</div> : null}\n\n <div className={theme.options}>\n {optionNodes}\n </div>\n </div>\n );\n};\n\nexport default themed(BaseSwitch, 'Switch', defaultTheme);\n","// extracted by mini-css-extract-plugin\nexport default {\"link\":\"zH52sA\"};","import type { ReactNode } from 'react';\n\nimport type {\n Link,\n LinkProps,\n NavLink,\n NavLinkProps,\n} from 'react-router';\n\nimport './style.scss';\n\ntype LinkT = typeof Link;\ntype NavLinkT = typeof NavLink;\n\ntype ToT = Parameters<typeof Link>[0]['to'];\n\nexport type PropsT = {\n children?: ReactNode;\n className?: string;\n disabled?: boolean;\n enforceA?: boolean;\n keepScrollPosition?: boolean;\n onClick?: React.MouseEventHandler<HTMLAnchorElement>;\n onMouseDown?: React.MouseEventHandler<HTMLAnchorElement>;\n openNewTab?: boolean;\n replace?: boolean;\n routerLinkType: LinkT | NavLinkT;\n to: ToT;\n};\n\n/**\n * The `<Link>` component, and almost identical `<NavLink>` component, are\n * auxiliary wrappers around\n * [React Router](https://github.com/ReactTraining/react-router)'s\n * `<Link>` and `<NavLink>` components; they help to handle external and\n * internal links in uniform manner.\n *\n * @param [props] Component properties.\n * @param [props.className] CSS classes to apply to the link.\n * @param [props.disabled] Disables the link.\n * @param [props.enforceA] `true` enforces rendering of the link as\n * a simple `<a>` element.\n * @param [props.keepScrollPosition] If `true`, and the link is\n * rendered as a React Router's component, it won't reset the viewport scrolling\n * position to the origin when clicked.\n * @param [props.onClick] Event handler to trigger upon click.\n * @param [props.onMouseDown] Event handler to trigger on MouseDown\n * event.\n * @param [props.openNewTab] If `true` the link opens in a new tab.\n * @param [props.replace] When `true`, the link will replace current\n * entry in the history stack instead of adding a new one.\n * @param [props.to] Link URL.\n * @param [props.activeClassName] **`<NavLink>`** only: CSS class(es)\n * to apply to rendered link when it is active.\n * @param [props.activeStyle] **`<NavLink>`** only: CSS styles\n * to apply to the rendered link when it is active.\n * @param [props.exact] **`<NavLink>`** only: if `true`, the active\n * class/style will only be applied if the location is matched exactly.\n * @param [props.isActive] **`<NavLink>`** only: Add extra\n * logic for determining whether the link is active. This should be used if you\n * want to do more than verify that the link’s pathname matches the current URL\n * pathname.\n * @param [props.location] **`<NavLink>`** only: `isActive` compares\n * current history location (usually the current browser URL). To compare to\n * a different location, a custom `location` can be passed.\n * @param [props.strict] **`<NavLink>`** only: . When `true`, trailing\n * slash on a location’s pathname will be taken into consideration when\n * determining if the location matches the current URL. See the `<Route strict>`\n * documentation for more information.\n */\nconst GenericLink = ({\n children,\n className,\n disabled,\n enforceA,\n keepScrollPosition,\n onClick,\n onMouseDown,\n openNewTab,\n replace,\n routerLinkType,\n to,\n ...rest\n}: (LinkProps | NavLinkProps) & PropsT): ReactNode => {\n /* Renders Link as <a> element if:\n * - It is opted explicitely by `enforceA` prop;\n * - It should be opened in a new tab;\n * - It is an absolte URL (starts with http:// or https://);\n * - It is anchor link (starts with #). */\n if (disabled || enforceA || openNewTab\n || (to as string).match(/^(#|(https?|mailto):)/)) {\n return (\n <a\n className={className}\n // TODO: This requires a fix: disabled is not really an attribute of <a>\n // tag, thus for disabled option we rather should render a plain text\n // styled as a link.\n // disabled={disabled}\n href={to as string}\n onClick={disabled ? (e) => {\n e.preventDefault();\n } : onClick}\n onMouseDown={disabled ? (e) => {\n e.preventDefault();\n } : onMouseDown}\n rel=\"noopener noreferrer\"\n styleName=\"link\"\n target={openNewTab ? '_blank' : ''}\n >\n {children}\n </a>\n );\n }\n\n const L = routerLinkType;\n\n return (\n <L\n className={className}\n discover=\"none\"\n // disabled\n onClick={(e: React.MouseEvent<HTMLAnchorElement>) => {\n // Executes the user-provided event handler, if any.\n if (onClick) onClick(e);\n\n // By default, clicking the link scrolls the page to beginning.\n if (!keepScrollPosition) window.scroll(0, 0);\n }}\n onMouseDown={onMouseDown}\n replace={replace}\n to={to}\n // TODO: Refactor it later.\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...rest}\n >\n {children}\n </L>\n );\n};\n\nexport default GenericLink;\n","/**\n * The Link wraps around React Router's Link component, to automatically replace\n * it by the regular <a> element when:\n * - The target reference points to another domain;\n * - User opts to open the reference in a new tab;\n * - User explicitely opts to use <a>.\n */\n\nimport { type LinkProps, Link as RrLink } from 'react-router';\n\nimport GenericLink, { type PropsT as GenericLinkPropsT } from './GenericLink';\n\ntype PropsT = Omit<GenericLinkPropsT, 'routerLinkType'> & LinkProps;\n\nconst Link: React.FunctionComponent<PropsT>\n = (props) => (\n <GenericLink\n // TODO: Avoid the spreading later.\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...props}\n routerLinkType={RrLink}\n />\n );\n\nexport default Link;\n","// extracted by mini-css-extract-plugin\nexport default {\"button\":\"E1FNQT\",\"context\":\"KM0v4f\",\"ad\":\"_3jm1-Q\",\"hoc\":\"_0plpDL\",\"active\":\"MAe9O6\",\"disabled\":\"Br9IWV\"};","// The <Button> component implements a standard button / button-like link.\n\nimport type {\n FunctionComponent,\n KeyboardEventHandler,\n MouseEventHandler,\n PointerEventHandler,\n ReactNode,\n} from 'react';\n\nimport themed, { type Theme } from '@dr.pogodin/react-themes';\n\nimport Link from 'components/Link';\n\nimport defaultTheme from './style.scss';\n\ntype PropsT = {\n active?: boolean;\n children?: ReactNode;\n disabled?: boolean;\n enforceA?: boolean;\n keepScrollPosition?: boolean;\n onClick?: MouseEventHandler & KeyboardEventHandler;\n onKeyDown?: KeyboardEventHandler;\n onKeyUp?: KeyboardEventHandler;\n onMouseDown?: MouseEventHandler;\n onMouseUp?: MouseEventHandler;\n onPointerDown?: PointerEventHandler;\n onPointerUp?: PointerEventHandler;\n openNewTab?: boolean;\n replace?: boolean;\n testId?: string;\n theme: Theme<'active' | 'button' | 'disabled'>;\n // TODO: It needs a more precise typing of the object option.\n to?: object | string;\n};\n\nexport const BaseButton: FunctionComponent<PropsT> = ({\n active,\n children,\n disabled,\n enforceA,\n keepScrollPosition,\n onClick,\n onKeyDown: onKeyDownProp,\n onKeyUp,\n onMouseDown,\n onMouseUp,\n onPointerDown,\n onPointerUp,\n openNewTab,\n replace,\n testId,\n theme,\n to,\n}) => {\n let className = theme.button;\n if (active && theme.active) className += ` ${theme.active}`;\n if (disabled) {\n if (theme.disabled) className += ` ${theme.disabled}`;\n return (\n <div\n className={className}\n data-testid={process.env.NODE_ENV === 'production' ? undefined : testId}\n >\n {children}\n </div>\n );\n }\n\n let onKeyDown = onKeyDownProp;\n if (!onKeyDown && onClick) {\n onKeyDown = (e) => {\n if (e.key === 'Enter') onClick(e);\n };\n }\n\n if (to) {\n return (\n <Link\n className={className}\n data-testid={process.env.NODE_ENV === 'production' ? undefined : testId}\n enforceA={enforceA}\n\n // TODO: This was exposed as a hotifx... however, I guess we better want\n // to check if the `to` URL contains an anchor (#), and if it does we should\n // automatically opt to keep the position here; and enforce <a> (as\n // react-router link does not seem to respect the hash tag either,\n // at least not without some additional settings).\n keepScrollPosition={keepScrollPosition}\n\n onClick={onClick}\n\n // TODO: For now, the `onKeyDown` handler is not passed to the <Link>,\n // as <Link> component does not call it anyway, presumably due to\n // the inner implementation details. We should look into supporting it:\n // https://github.com/birdofpreyru/react-utils/issues/444\n // onKeyDown={onKeyDown}\n\n onKeyUp={onKeyUp}\n onMouseDown={onMouseDown}\n onMouseUp={onMouseUp}\n onPointerDown={onPointerDown}\n onPointerUp={onPointerUp}\n openNewTab={openNewTab}\n replace={replace}\n to={to}\n >\n {children}\n </Link>\n );\n }\n\n return (\n <div\n className={className}\n data-testid={process.env.NODE_ENV === 'production' ? undefined : testId}\n onClick={onClick}\n onKeyDown={onKeyDown}\n onKeyUp={onKeyUp}\n onMouseDown={onMouseDown}\n onMouseUp={onMouseUp}\n onPointerDown={onPointerDown}\n onPointerUp={onPointerUp}\n role=\"button\"\n tabIndex={0}\n >\n {children}\n </div>\n );\n};\n\n/**\n * Button component theme: a map of CSS\n * class names to append to button elements:\n * @prop {string} [active] to the root element of active button.\n * @prop {string} [button] to the root element of any button.\n * @prop {string} [disabled] to the root element of disabled button.\n */\nexport default themed(BaseButton, 'Button', defaultTheme);\n","// extracted by mini-css-extract-plugin\nexport default {\"checkbox\":\"A-f8qJ\",\"context\":\"dNQcC6\",\"ad\":\"earXxa\",\"hoc\":\"qAPfQ6\",\"indeterminate\":\"N9bCb8\",\"container\":\"Kr0g3M\",\"label\":\"_3dML-O\",\"disabled\":\"EzQra1\"};","import themed, { type Theme } from '@dr.pogodin/react-themes';\n\nimport defaultTheme from './theme.scss';\n\ntype PropT<ValueT> = {\n checked?: ValueT;\n disabled?: boolean;\n label?: React.ReactNode;\n onChange?: React.ChangeEventHandler<HTMLInputElement>;\n testId?: string;\n theme: Theme<\n | 'checkbox'\n | 'container'\n | 'disabled'\n | 'indeterminate'\n | 'label'\n >;\n};\n\nconst Checkbox = <ValueT extends boolean | 'indeterminate' = boolean>({\n checked,\n disabled,\n label,\n onChange,\n testId,\n theme,\n}: PropT<ValueT>) => {\n let containerClassName = theme.container;\n if (disabled) containerClassName += ` ${theme.disabled}`;\n\n let checkboxClassName = theme.checkbox;\n if (checked === 'indeterminate') checkboxClassName += ` ${theme.indeterminate}`;\n\n return (\n <div className={containerClassName}>\n { label === undefined\n ? null : <div className={theme.label}>{label}</div> }\n <input\n checked={checked === undefined ? undefined : checked === true}\n className={checkboxClassName}\n data-testid={process.env.NODE_ENV === 'production' ? undefined : testId}\n disabled={disabled}\n onChange={onChange}\n onClick={(e) => {\n e.stopPropagation();\n }}\n type=\"checkbox\"\n />\n </div>\n );\n};\n\nexport default themed(Checkbox, 'Checkbox', defaultTheme);\n","// extracted by mini-css-extract-plugin\nexport default {\"container\":\"Cxx397\",\"context\":\"X5WszA\",\"ad\":\"_8s7GCr\",\"hoc\":\"TVlBYc\",\"children\":\"m4FpDO\",\"input\":\"M07d4s\",\"label\":\"gfbdq-\",\"error\":\"p2idHY\",\"errorMessage\":\"Q9uslG\"};","import {\n type FunctionComponent,\n type ReactNode,\n type Ref,\n useRef,\n useState,\n} from 'react';\n\nimport themed, { type Theme } from '@dr.pogodin/react-themes';\n\nimport defaultTheme from './theme.scss';\n\ntype ThemeKeyT = 'children' | 'container' | 'empty' | 'error' | 'errorMessage'\n | 'focused' | 'input' | 'label';\n\ntype PropsT = React.InputHTMLAttributes<HTMLInputElement> & {\n children?: ReactNode;\n error?: ReactNode;\n label?: React.ReactNode;\n ref?: Ref<HTMLInputElement>;\n testId?: string;\n theme: Theme<ThemeKeyT>;\n};\n\n/**\n * Themeable input field, based on the standard HTML `<input>` element.\n * @param [props.label] Input label.\n * @param [props.theme] _Ad hoc_ theme.\n * @param [props...] [Other theming properties](https://www.npmjs.com/package/@dr.pogodin/react-themes#themed-component-properties)\n * @param [props...] Any other properties are passed to the underlying\n * `<input>` element.\n */\nconst Input: FunctionComponent<PropsT> = ({\n children,\n error,\n label,\n ref,\n testId,\n theme,\n ...rest\n}) => {\n // NOTE: As of now, it is only updated when \"theme.focused\" is defined,\n // as otherwise its value is not used.\n const [focused, setFocused] = useState(false);\n\n const localRef = useRef<HTMLInputElement>(null);\n\n let containerClassName = theme.container;\n\n // NOTE: As of now, \"focused\" can be true only when \"theme.focused\"\n // is provided.\n if (focused /* && theme.focused */) containerClassName += ` ${theme.focused}`;\n\n if (!rest.value && theme.empty) containerClassName += ` ${theme.empty}`;\n\n if (error) containerClassName += ` ${theme.error}`;\n\n return (\n <div\n className={containerClassName}\n onFocus={() => {\n // TODO: It does not really work if a callback-style `ref` is passed in,\n // we need a more complex logic to cover that case, but for now this serves\n // the case we need it for.\n if (typeof ref === 'object') ref?.current?.focus();\n else localRef.current?.focus();\n }}\n >\n {label === undefined ? null : <div className={theme.label}>{label}</div>}\n <input\n className={theme.input}\n data-testid={process.env.NODE_ENV === 'production' ? undefined : testId}\n ref={ref ?? localRef}\n\n // TODO: Avoid the spreading later.\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...rest}\n\n onBlur={theme.focused ? (e) => {\n setFocused(false);\n rest.onBlur?.(e);\n } : rest.onBlur}\n onFocus={theme.focused ? (e) => {\n setFocused(true);\n rest.onFocus?.(e);\n } : rest.onFocus}\n />\n {error && error !== true\n ? <div className={theme.errorMessage}>{error}</div>\n : null}\n {children ? <div className={theme.children}>{children}</div> : null}\n </div>\n );\n};\n\nexport default themed(Input, 'Input', defaultTheme);\n","// extracted by mini-css-extract-plugin\nexport default {\"container\":\"T3cuHB\",\"context\":\"m4mL-M\",\"ad\":\"m3-mdC\",\"hoc\":\"J15Z4H\",\"mainPanel\":\"pPlQO2\",\"sidePanel\":\"lqNh4h\"};","import type { ReactNode } from 'react';\n\nimport themed, { type Theme } from '@dr.pogodin/react-themes';\n\nimport baseTheme from './base-theme.scss';\n\ntype ThemeKeyT = 'container' | 'leftSidePanel' | 'mainPanel' | 'rightSidePanel'\n | 'sidePanel';\n\ntype PropsT = {\n children?: ReactNode;\n leftSidePanelContent?: ReactNode;\n rightSidePanelContent?: ReactNode;\n theme: Theme<ThemeKeyT>;\n};\n\n/**\n * Simple and themeable page layout. It keeps the main content centered in\n * a column of limited width, which fills entire viewport on small screens\n * (under `$screen-md = 1024px` size). At larger screens the column keeps\n * `$screen-md` size, and it is centered at the page, surrounded by side\n * panels, where additional content can be displayed.\n *\n * **Children:** Component children are rendered as the content of main panel.\n * @param {object} [props] Component properties.\n * @param {Node} [props.leftSidePanelContent] The content for left side panel.\n * @param {Node} [props.rightSidePanelContent] The content for right side panel.\n * @param {PageLayoutTheme} [props.theme] _Ad hoc_ theme.\n * @param {...any} [props....]\n * [Other theming properties](https://www.npmjs.com/package/@dr.pogodin/react-themes#themed-component-properties)\n */\nconst PageLayout: React.FunctionComponent<PropsT> = ({\n children,\n leftSidePanelContent,\n rightSidePanelContent,\n theme,\n}) => (\n <div className={theme.container}>\n <div className={[theme.sidePanel, theme.leftSidePanel].join(' ')}>\n {leftSidePanelContent}\n </div>\n <div className={theme.mainPanel}>\n {children}\n </div>\n <div className={[theme.sidePanel, theme.rightSidePanel].join(' ')}>\n {rightSidePanelContent}\n </div>\n </div>\n);\n\nexport default themed(PageLayout, 'PageLayout', baseTheme);\n","import { type NavLinkProps, NavLink as RrNavLink } from 'react-router';\n\nimport GenericLink, { type PropsT as GenericLinkPropsT } from './GenericLink';\n\ntype PropsT = Omit<GenericLinkPropsT, 'routerLinkType'> & NavLinkProps;\n\nconst NavLink: React.FunctionComponent<PropsT>\n = (props) => (\n <GenericLink\n // TODO: I guess, we better re-write it to avoid the props spreading,\n // but no need to spend time on it right now.\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...props}\n routerLinkType={RrNavLink}\n />\n );\n\nexport default NavLink;\n","// extracted by mini-css-extract-plugin\nexport default {\"container\":\"_7zdld4\",\"context\":\"uIObt7\",\"ad\":\"XIxe9o\",\"hoc\":\"YOyORH\",\"circle\":\"dBrB4g\",\"bouncing\":\"TJe-6j\"};","import themed, { type Theme } from '@dr.pogodin/react-themes';\n\nimport defaultTheme from './theme.scss';\n\ntype ThemeKeyT = 'bouncing' | 'circle' | 'container';\n\ntype PropsT = {\n theme: Theme<ThemeKeyT>;\n};\n\n/**\n * Throbber is an \"action in progress\" indicator, which renders\n * three bouncing circles as a simple pending activity indicator,\n * and can be further themed to a certain degree.\n * @param {object} [props] Component properties.\n * @param {ThrobberTheme} [props.theme] _Ad hoc_ theme.\n * @param {...any} [props....]\n * [Other theming properties](https://www.npmjs.com/package/@dr.pogodin/react-themes#themed-component-properties)\n */\nconst Throbber: React.FunctionComponent<PropsT> = ({ theme }) => (\n <span className={theme.container}>\n <span className={theme.circle} />\n <span className={theme.circle} />\n <span className={theme.circle} />\n </span>\n);\n\nexport default themed(Throbber, 'Throbber', defaultTheme);\n","/**\n * The actual tooltip component. It is rendered outside the regular document\n * hierarchy, and with sub-components managed without React to achieve the best\n * performance during animation.\n */\n\nimport {\n type FunctionComponent,\n type ReactNode,\n type RefObject,\n useImperativeHandle,\n useRef,\n} from 'react';\n\nimport { createPortal } from 'react-dom';\n\nimport type { Theme } from '@dr.pogodin/react-themes';\n\n/**\n * Valid placements of the rendered tooltip. They will be overriden when\n * necessary to fit the tooltip within the viewport.\n */\nexport enum PLACEMENTS {\n ABOVE_CURSOR = 'ABOVE_CURSOR',\n ABOVE_ELEMENT = 'ABOVE_ELEMENT',\n BELOW_CURSOR = 'BELOW_CURSOR',\n BELOW_ELEMENT = 'BELOW_ELEMENT',\n}\n\nconst ARROW_STYLE_DOWN = [\n 'border-bottom-color:transparent',\n 'border-left-color:transparent',\n 'border-right-color:transparent',\n].join(';');\n\nconst ARROW_STYLE_UP = [\n 'border-top-color:transparent',\n 'border-left-color:transparent',\n 'border-right-color:transparent',\n].join(';');\n\ntype ComponentsT = {\n container: HTMLDivElement;\n arrow: HTMLDivElement;\n content: HTMLDivElement;\n};\n\nexport type ThemeKeysT = 'appearance' | 'arrow' | 'content' | 'container';\n\ntype TooltipThemeT = Theme<ThemeKeysT>;\n\ntype TooltipRectsT = {\n arrow: DOMRect;\n container: DOMRect;\n};\n\n/**\n * Generates bounding client rectangles for tooltip components.\n * @ignore\n * @param tooltip DOM references to the tooltip components.\n * @param tooltip.arrow\n * @param tooltip.container\n * @return Object holding tooltip rectangles in\n * two fields.\n */\nfunction calcTooltipRects(tooltip: ComponentsT): TooltipRectsT {\n return {\n arrow: tooltip.arrow.getBoundingClientRect(),\n container: tooltip.container.getBoundingClientRect(),\n };\n}\n\n/**\n * Calculates the document viewport size.\n * @ignore\n * @return {{x, y, width, height}}\n */\nfunction calcViewportRect() {\n const { scrollX, scrollY } = window;\n const { documentElement: { clientHeight, clientWidth } } = document;\n return {\n bottom: scrollY + clientHeight,\n left: scrollX,\n right: scrollX + clientWidth,\n top: scrollY,\n };\n}\n\n/**\n * Calculates tooltip and arrow positions for the placement just above\n * the cursor.\n * @ignore\n * @param {number} x Cursor page-x position.\n * @param {number} y Cursor page-y position.\n * @param {object} tooltipRects Bounding client rectangles of tooltip parts.\n * @param {object} tooltipRects.arrow\n * @param {object} tooltipRects.container\n * @return {object} Contains the following fields:\n * - {number} arrowX\n * - {number} arrowY\n * - {number} containerX\n * - {number} containerY\n * - {string} baseArrowStyle\n */\nfunction calcPositionAboveXY(\n x: number,\n y: number,\n tooltipRects: TooltipRectsT,\n) {\n const { arrow, container } = tooltipRects;\n return {\n arrowX: 0.5 * (container.width - arrow.width),\n arrowY: container.height,\n containerX: x - container.width / 2,\n containerY: y - container.height - arrow.height / 1.5,\n\n // TODO: Instead of already setting the base style here, we should\n // introduce a set of constants for arrow directions, which will help\n // to do checks dependant on the arrow direction.\n baseArrowStyle: ARROW_STYLE_DOWN,\n };\n}\n\n// const HIT = {\n// NONE: false,\n// LEFT: 'LEFT',\n// RIGHT: 'RIGHT',\n// TOP: 'TOP',\n// BOTTOM: 'BOTTOM',\n// };\n\n/**\n * Checks whether\n * @param {object} pos\n * @param {object} tooltipRects\n * @param {object} viewportRect\n * @return {HIT}\n */\n// function checkViewportFit(pos, tooltipRects, viewportRect) {\n// const { containerX, containerY } = pos;\n// if (containerX < viewportRect.left + 6) return HIT.LEFT;\n// if (containerX > viewportRect.right - 6) return HIT.RIGHT;\n// return HIT.NONE;\n// }\n\n/**\n * Shifts tooltip horizontally to fit into the viewport, while keeping\n * the arrow pointed to the XY point.\n * @param {number} x\n * @param {number} y\n * @param {object} pos\n * @param {number} pageXOffset\n * @param {number} pageXWidth\n */\n// function xPageFitCorrection(x, y, pos, pageXOffset, pageXWidth) {\n// if (pos.containerX < pageXOffset + 6) {\n// pos.containerX = pageXOffset + 6;\n// pos.arrowX = Math.max(6, pageX - containerX - arrowRect.width / 2);\n// } else {\n// const maxX = pageXOffset + docRect.width - containerRect.width - 6;\n// if (containerX > maxX) {\n// containerX = maxX;\n// arrowX = Math.min(\n// containerRect.width - 6,\n// pageX - containerX - arrowRect.width / 2,\n// );\n// }\n// }\n// }\n\n/**\n * Sets positions of tooltip components to point the tooltip to the specified\n * page point.\n * @ignore\n * @param pageX\n * @param pageY\n * @param placement\n * @param element DOM reference to the element wrapped by the tooltip.\n * @param tooltip\n * @param tooltip.arrow DOM reference to the tooltip arrow.\n * @param tooltip.container DOM reference to the tooltip container.\n */\nfunction setComponentPositions(\n pageX: number,\n pageY: number,\n placement: PLACEMENTS | undefined,\n element: HTMLElement | undefined,\n tooltip: ComponentsT,\n) {\n const tooltipRects = calcTooltipRects(tooltip);\n const viewportRect = calcViewportRect();\n\n /* Default container coords: tooltip at the top. */\n const pos = calcPositionAboveXY(pageX, pageY, tooltipRects);\n\n if (pos.containerX < viewportRect.left + 6) {\n pos.containerX = viewportRect.left + 6;\n pos.arrowX = Math.max(\n 6,\n pageX - pos.containerX - tooltipRects.arrow.width / 2,\n );\n } else {\n const maxX = viewportRect.right - 6 - tooltipRects.container.width;\n if (pos.containerX > maxX) {\n pos.containerX = maxX;\n pos.arrowX = Math.min(\n tooltipRects.container.width - 6,\n pageX - pos.containerX - tooltipRects.arrow.width / 2,\n );\n }\n }\n\n /* If tooltip has not enough space on top - make it bottom tooltip. */\n if (pos.containerY < viewportRect.top + 6) {\n pos.containerY += tooltipRects.container.height\n + 2 * tooltipRects.arrow.height;\n pos.arrowY -= tooltipRects.container.height\n + tooltipRects.arrow.height;\n pos.baseArrowStyle = ARROW_STYLE_UP;\n }\n\n const containerStyle = `left:${pos.containerX}px;top:${pos.containerY}px`;\n tooltip.container.setAttribute('style', containerStyle);\n\n const arrowStyle = `${pos.baseArrowStyle};left:${pos.arrowX}px;top:${pos.arrowY}px`;\n tooltip.arrow.setAttribute('style', arrowStyle);\n}\n\n/* The Tooltip component itself. */\nconst Tooltip: FunctionComponent<{\n children?: ReactNode;\n ref?: RefObject<unknown>;\n theme: TooltipThemeT;\n}> = ({ children, ref, theme }) => {\n // NOTE: The way it has to be implemented, for clean mounting and unmounting\n // at the client side, the <Tooltip> is fully mounted into DOM in the next\n // rendering cycles, and only then it can be correctly measured and positioned.\n // Thus, when we create the <Tooltip> we have to record its target positioning\n // details, and then apply them when it is created.\n\n const arrowRef = useRef<HTMLDivElement>(null);\n const containerRef = useRef<HTMLDivElement>(null);\n const contentRef = useRef<HTMLDivElement>(null);\n\n const pointTo = (\n pageX: number,\n pageY: number,\n placement: PLACEMENTS,\n element: HTMLElement,\n ) => {\n if (!arrowRef.current || !containerRef.current || !contentRef.current) {\n throw Error('Internal error');\n }\n\n setComponentPositions(pageX, pageY, placement, element, {\n arrow: arrowRef.current,\n container: containerRef.current,\n content: contentRef.current,\n });\n };\n useImperativeHandle(ref, () => ({ pointTo }));\n\n return createPortal(\n (\n <div className={theme.container} ref={containerRef}>\n <div className={theme.arrow} ref={arrowRef} />\n <div className={theme.content} ref={contentRef}>{children}</div>\n </div>\n ),\n document.body,\n );\n};\n\nexport default Tooltip;\n","// extracted by mini-css-extract-plugin\nexport default {\"arrow\":\"M9gywF\",\"ad\":\"_4xT7zE\",\"hoc\":\"zd-vnH\",\"context\":\"GdZucr\",\"container\":\"f9gY8K\",\"appearance\":\"L4ubm-\",\"wrapper\":\"_4qDBRM\"};","/* global window */\n\nimport {\n type FunctionComponent,\n type ReactNode,\n useEffect,\n useRef,\n useState,\n} from 'react';\n\nimport themed, { type Theme } from '@dr.pogodin/react-themes';\n\nimport Tooltip, {\n type ThemeKeysT as TooltipThemeKeysT,\n PLACEMENTS,\n} from './Tooltip';\n\nimport defaultTheme from './default-theme.scss';\n\ntype PropsT = {\n children?: ReactNode;\n placement?: PLACEMENTS;\n tip?: ReactNode;\n theme: Theme<'wrapper' | TooltipThemeKeysT>;\n};\n\ntype TooltipRefT = {\n pointTo: (\n x: number,\n y: number,\n placement: PLACEMENTS,\n wrapperRef: HTMLDivElement,\n ) => void;\n};\n\ntype HeapT = {\n lastCursorX: number;\n lastCursorY: number;\n triggeredByTouch: boolean;\n timerId?: NodeJS.Timeout;\n};\n\n/**\n * Implements a simple to use and themeable tooltip component, _e.g._\n * ```js\n * <WithTooltip tip=\"This is example tooltip.\">\n * <p>Hover to see the tooltip.</p>\n * </WithTooltip>\n * ```\n * **Children:** Children are rendered in the place of `<WithTooltip>`,\n * and when hovered the tooltip is shown. By default the wrapper itself is\n * `<div>` block with `display: inline-block`.\n * @param tip – Anything React is able to render,\n * _e.g._ a tooltip text. This will be the tooltip content.\n * @param {WithTooltipTheme} props.theme _Ad hoc_ theme.\n */\nconst Wrapper: FunctionComponent<PropsT> = ({\n children,\n placement = PLACEMENTS.ABOVE_CURSOR,\n tip,\n theme,\n}) => {\n const { current: heap } = useRef<HeapT>({\n lastCursorX: 0,\n lastCursorY: 0,\n timerId: undefined,\n triggeredByTouch: false,\n });\n const tooltipRef = useRef<TooltipRefT>(null);\n const wrapperRef = useRef<HTMLDivElement>(null);\n const [showTooltip, setShowTooltip] = useState(false);\n\n const updatePortalPosition = (cursorX: number, cursorY: number) => {\n if (showTooltip) {\n const wrapperRect = wrapperRef.current!.getBoundingClientRect();\n if (\n cursorX < wrapperRect.left\n || cursorX > wrapperRect.right\n || cursorY < wrapperRect.top\n || cursorY > wrapperRect.bottom\n ) {\n setShowTooltip(false);\n } else if (tooltipRef.current) {\n tooltipRef.current.pointTo(\n cursorX + window.scrollX,\n cursorY + window.scrollY,\n placement,\n wrapperRef.current!,\n );\n }\n } else {\n heap.lastCursorX = cursorX;\n heap.lastCursorY = cursorY;\n\n // If tooltip was triggered by a touch, we delay its opening by a bit,\n // to ensure it was not a touch-click - in the case of touch click we\n // want to do the click, rather than show the tooltip, and the delay\n // gives click handler a chance to abort the tooltip openning.\n if (heap.triggeredByTouch) {\n heap.timerId ??= setTimeout(() => {\n heap.triggeredByTouch = false;\n heap.timerId = undefined;\n setShowTooltip(true);\n }, 300);\n\n // Otherwise we can just open the tooltip right away.\n } else setShowTooltip(true);\n }\n };\n\n useEffect(() => {\n if (showTooltip && tip !== null) {\n // This is necessary to ensure that even when a single mouse event\n // arrives to a tool-tipped component, the tooltip is correctly positioned\n // once opened (because similar call above does not have effect until\n // the tooltip is fully mounted, and that is delayed to future rendering\n // cycle due to the implementation).\n if (tooltipRef.current) {\n tooltipRef.current.pointTo(\n heap.lastCursorX + window.scrollX,\n heap.lastCursorY + window.scrollY,\n placement,\n wrapperRef.current!,\n );\n }\n\n const listener = () => {\n setShowTooltip(false);\n };\n window.addEventListener('scroll', listener);\n return () => {\n window.removeEventListener('scroll', listener);\n };\n }\n return undefined;\n }, [\n heap.lastCursorX,\n heap.lastCursorY,\n placement,\n showTooltip,\n tip,\n ]);\n\n return (\n <div\n className={theme.wrapper}\n onClick={() => {\n if (heap.timerId) {\n clearTimeout(heap.timerId);\n heap.timerId = undefined;\n heap.triggeredByTouch = false;\n }\n }}\n onMouseLeave={() => {\n setShowTooltip(false);\n }}\n onMouseMove={(e) => {\n updatePortalPosition(e.clientX, e.clientY);\n }}\n onTouchStart={() => {\n heap.triggeredByTouch = true;\n }}\n ref={wrapperRef}\n role=\"presentation\"\n >\n {\n showTooltip && tip !== null\n ? <Tooltip ref={tooltipRef} theme={theme}>{tip}</Tooltip>\n : null\n }\n {children}\n </div>\n );\n};\n\nconst ThemedWrapper = themed(Wrapper, 'WithTooltip', defaultTheme);\n\ntype ExportT = typeof ThemedWrapper & {\n PLACEMENTS: typeof PLACEMENTS;\n};\n\nconst e: ExportT = ThemedWrapper as ExportT;\n\ne.PLACEMENTS = PLACEMENTS;\n\nexport default e;\n","// extracted by mini-css-extract-plugin\nexport default {\"container\":\"sXHM81\",\"context\":\"veKyYi\",\"ad\":\"r3ABzd\",\"hoc\":\"YKcPnR\",\"video\":\"SlV2zw\"};","// extracted by mini-css-extract-plugin\nexport default {\"container\":\"jTxmOX\",\"context\":\"dzIcLh\",\"ad\":\"_5a9XX1\",\"hoc\":\"_7sH52O\"};","import qs from 'qs';\n\nimport themed, { type Theme } from '@dr.pogodin/react-themes';\n\nimport Throbber from 'components/Throbber';\n\nimport baseTheme from './base.scss';\nimport throbberTheme from './throbber.scss';\n\ntype ComponentThemeT = Theme<'container' | 'video'>;\n\ntype PropsT = {\n autoplay?: boolean;\n src: string;\n theme: ComponentThemeT;\n title?: string;\n};\n\n/**\n * A component for embeding a YouTube video.\n * @param [props] Component properties.\n * @param [props.autoplay] If `true` the video will start to play\n * automatically once loaded.\n * @param [props.src] URL of the video to play. Can be in any of\n * the following formats, and keeps any additional query parameters understood\n * by the YouTube IFrame player:\n * - `https://www.youtube.com/watch?v=NdF6Rmt6Ado`\n * - `https://youtu.be/NdF6Rmt6Ado`\n * - `https://www.youtube.com/embed/NdF6Rmt6Ado`\n * @param [props.theme] _Ad hoc_ theme.\n * @param [props.title] The `title` attribute to add to the player\n * IFrame.\n */\nconst YouTubeVideo: React.FunctionComponent<PropsT> = ({\n autoplay,\n src,\n theme,\n title,\n}) => {\n const srcParts = src.split('?');\n let [url] = srcParts;\n const [, queryString] = srcParts;\n const query = queryString ? qs.parse(queryString) : {};\n\n const videoId = query.v ?? url?.match(/\\/([a-zA-Z0-9-_]*)$/)?.[1];\n url = `https://www.youtube.com/embed/${videoId as string}`;\n\n delete query.v;\n query.autoplay = autoplay ? '1' : '0';\n url += `?${qs.stringify(query)}`;\n\n // TODO: https://developers.google.com/youtube/player_parameters\n // More query parameters can be exposed via the component props.\n\n return (\n <div className={theme.container}>\n <Throbber theme={throbberTheme} />\n {/* TODO: I guess, we better add the sanbox, but right now I don't have\n time to carefully explore which restrictions should be lifted to allow\n embed YouTube player to work... sometime later we'll take care of it */\n }\n <iframe // eslint-disable-line react/iframe-missing-sandbox\n allow=\"autoplay\"\n allowFullScreen\n className={theme.video}\n src={url}\n title={title}\n />\n </div>\n );\n};\n\nexport default themed(YouTubeVideo, 'YouTubeVideo', baseTheme);\n","// extracted by mini-css-extract-plugin\nexport default {\"container\":\"dzMVIB\",\"context\":\"KVPc7g\",\"ad\":\"z2GQ0Z\",\"hoc\":\"_8R1Qdj\",\"label\":\"Vw9EKL\",\"textarea\":\"zd-OFg\",\"error\":\"K2JcEY\",\"errorMessage\":\"nWsJDB\",\"hidden\":\"GiHBXI\"};","import {\n type ChangeEventHandler,\n type FocusEventHandler,\n type FunctionComponent,\n type KeyboardEventHandler,\n type ReactNode,\n useEffect,\n useLayoutEffect,\n useRef,\n useState,\n} from 'react';\n\nimport themed, { type Theme } from '@dr.pogodin/react-themes';\n\nimport defaultTheme from './style.scss';\n\ntype ThemeKeyT = 'container' | 'error' | 'errorMessage' | 'hidden' | 'label'\n | 'textarea';\n\ntype Props = {\n disabled?: boolean;\n error?: ReactNode;\n label?: string;\n onBlur?: FocusEventHandler<HTMLTextAreaElement>;\n onChange?: ChangeEventHandler<HTMLTextAreaElement>;\n onKeyDown?: KeyboardEventHandler<HTMLTextAreaElement>;\n placeholder?: string;\n testId?: string;\n theme: Theme<ThemeKeyT>;\n value?: string;\n};\n\nconst TextArea: FunctionComponent<Props> = ({\n disabled,\n error,\n label,\n onBlur,\n onChange,\n onKeyDown,\n placeholder,\n testId,\n theme,\n value,\n}) => {\n const hiddenAreaRef = useRef<HTMLTextAreaElement>(null);\n const [height, setHeight] = useState<number | undefined>();\n\n const textAreaRef = useRef<HTMLTextAreaElement>(null);\n\n const [localValue, setLocalValue] = useState(value ?? '');\n if (value !== undefined && localValue !== value) setLocalValue(value);\n\n // This resizes text area's height when its width is changed for any reason.\n useEffect(() => {\n const el = hiddenAreaRef.current;\n if (!el) return undefined;\n\n const cb = () => {\n setHeight(el.scrollHeight);\n };\n const observer = new ResizeObserver(cb);\n observer.observe(el);\n\n return () => {\n observer.disconnect();\n };\n }, []);\n\n // Resizes the text area when its content is modified.\n //\n // NOTE: useLayoutEffect() instead of useEffect() makes difference here,\n // as it helps to avoid visible \"content/height\" jumps (i.e. with just\n // useEffect() it becomes visible how the content is modified first,\n // and then input height is incremented, if necessary).\n // See: https://github.com/birdofpreyru/react-utils/issues/313\n useLayoutEffect(() => {\n const el = hiddenAreaRef.current;\n if (el) setHeight(el.scrollHeight);\n }, [localValue]);\n\n let containerClassName = theme.container;\n if (error) containerClassName += ` ${theme.error}`;\n\n return (\n <div\n className={containerClassName}\n onFocus={() => {\n textAreaRef.current?.focus();\n }}\n >\n {label === undefined ? null : <div className={theme.label}>{label}</div>}\n <textarea\n className={`${theme.textarea} ${theme.hidden}`}\n\n // This text area is hidden underneath the primary one below,\n // and it is used for text measurements, to implement auto-scaling\n // of the primary textarea's height.\n readOnly\n ref={hiddenAreaRef}\n\n // The \"-1\" value of \"tabIndex\" removes this hidden text area from\n // the tab-focus-chain.\n tabIndex={-1}\n\n // NOTE: With empty string value (\"\") the scrolling height of this text\n // area is zero, thus collapsing <TextArea> height below the single line\n // input height. To avoid it we fallback to whitespace (\" \") character\n // here.\n value={localValue || ' '}\n />\n <textarea\n className={theme.textarea}\n data-testid={process.env.NODE_ENV === 'production' ? undefined : testId}\n disabled={disabled}\n onBlur={onBlur}\n\n // When value is \"undefined\" the text area is not-managed, and we should\n // manage it internally for the measurement / resizing functionality\n // to work.\n onChange={\n value === undefined\n ? (e) => {\n setLocalValue(e.target.value);\n } : onChange\n }\n onKeyDown={onKeyDown}\n placeholder={placeholder}\n ref={textAreaRef}\n style={{ height }}\n value={localValue}\n />\n {error && error !== true\n ? <div className={theme.errorMessage}>{error}</div>\n : null}\n </div>\n );\n};\n\nexport default themed(TextArea, 'TextArea', defaultTheme);\n","import 'styles/global.scss';\n\nimport { webpack } from 'utils';\n\nimport type * as ClientM from './client';\nimport type * as ServerFactoryM from './server';\n\n// It is a safeguard against multiple instances / versions of the library\n// being loaded into environment by mistake (e.g. because of different\n// packages pinning down different exact versions of the lib, thus preventing\n// a proper dedupe and using a single common library version).\nif (global.REACT_UTILS_LIBRARY_LOADED) {\n throw Error('React utils library is already loaded');\n} else global.REACT_UTILS_LIBRARY_LOADED = true;\n\nconst server = webpack.requireWeak<typeof ServerFactoryM>('./server', __dirname);\n\nconst client = server\n ? undefined\n\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n : (require('./client') as typeof ClientM).default;\n\nexport {\n type AsyncCollectionT,\n type AsyncCollectionLoaderT,\n type AsyncDataEnvelopeT,\n type AsyncDataLoaderT,\n type ForceT,\n type UseAsyncDataOptionsT,\n type UseAsyncDataResT,\n type UseGlobalStateResT,\n type ValueOrInitializerT,\n getGlobalState,\n GlobalStateProvider,\n newAsyncDataEnvelope,\n useAsyncCollection,\n useAsyncData,\n useGlobalState,\n withGlobalStateType,\n} from '@dr.pogodin/react-global-state';\n\nexport * from 'components';\n\nexport {\n type BeforeRenderResT,\n type BeforeRenderT,\n type ConfigT,\n type ServerSsrContext,\n type ServerT,\n} from './server';\n\nexport {\n assertEmptyObject,\n config,\n Barrier,\n Cached,\n Emitter,\n isomorphy,\n getSsrContext,\n type Listener,\n type ObjectKey,\n Semaphore,\n splitComponent,\n type Theme,\n themed,\n ThemeProvider,\n time,\n webpack,\n withRetries,\n} from 'utils';\n\nexport { client, server };\n"],"names":["root","factory","exports","module","require","define","amd","self","this","__WEBPACK_EXTERNAL_MODULE__864__","__WEBPACK_EXTERNAL_MODULE__126__","__WEBPACK_EXTERNAL_MODULE__264__","__WEBPACK_EXTERNAL_MODULE__859__","__WEBPACK_EXTERNAL_MODULE__462__","__WEBPACK_EXTERNAL_MODULE__185__","__WEBPACK_EXTERNAL_MODULE__958__","__WEBPACK_EXTERNAL_MODULE__814__","__WEBPACK_EXTERNAL_MODULE__360__","__WEBPACK_EXTERNAL_MODULE__155__","__WEBPACK_EXTERNAL_MODULE__514__","__WEBPACK_EXTERNAL_MODULE__236__","__WEBPACK_EXTERNAL_MODULE__707__","IS_CLIENT_SIDE","process","versions","node","global","REACT_UTILS_FORCE_CLIENT_SIDE","IS_SERVER_SIDE","requireWeak","modulePath","basePathOrOptions","basePath","ops","req","eval","resolve","path","default","def","named","res","Object","entries","forEach","name","value","assigned","Error","resolveWeak","REACT_ELEMENT_TYPE","Symbol","for","REACT_FRAGMENT_TYPE","jsxProd","type","config","maybeKey","key","propName","ref","$$typeof","props","Fragment","jsx","jsxs","buildInfo","getBuildInfo","undefined","BUILD_INFO","inj","metaElement","document","querySelector","remove","data","forge","decode64","content","d","createDecipher","start","iv","slice","length","update","createBuffer","finish","decodeUtf8","output","window","REACT_UTILS_INJECTION","getInj","isDevBuild","getMode","isProdBuild","buildTimestamp","timestamp","Launch","Application","options","container","getElementById","scene","_jsx","GlobalStateProvider","initialState","ISTATE","children","BrowserRouter","HelmetProvider","dontHydrate","createRoot","render","hydrateRoot","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","n","getter","__esModule","a","definition","o","defineProperty","enumerable","get","g","globalThis","Function","e","obj","prop","prototype","hasOwnProperty","call","r","toStringTag","CONFIG","cookie","CSRF","parse","csrfToken","getSsrContext","withGlobalStateType","useCurrent","autorefresh","globalStatePath","precision","SEC_MS","now","setter","useGlobalState","Date","useEffect","timerId","old","neu","Math","abs","setTimeout","clearTimeout","useTimezoneOffset","cookieName","ssrContext","offset","setOffset","cookies","parseInt","getTimezoneOffset","serialize","toString","time","DAY_MS","HOUR_MS","MIN_MS","YEAR_MS","timer","assign","dayjs","clientChunkGroups","CHUNK_GROUPS","refCounts","getPublicPath","publicPath","bookStyleSheet","loadedSheets","refCount","fullPath","location","origin","has","link","createElement","setAttribute","head","appendChild","Barrier","addEventListener","current","getLoadedStyleSheets","Set","styleSheets","href","add","assertChunkName","chunkName","chunkGroups","async","bookStyleSheets","promises","assets","Promise","asset","endsWith","promise","push","allSettled","then","freeStyleSheets","pathRefCount","usedChunkNames","splitComponent","getComponent","placeholder","LazyComponent","lazy","resolved","Component","Wrapper","rest","chunks","includes","useInsertionEffect","CodeSplit","Suspense","fallback","themed","themedImpl","COMPOSE","PRIORITY","isValue","x","optionValueName","option","BaseModal","cancelOnScrolling","containerStyle","dontDisableScrolling","onCancel","overlayStyle","style","testId","testIdForOverlay","theme","containerRef","useRef","overlayRef","removeEventListener","body","classList","S","scrollingDisabledByModal","focusLast","useMemo","onFocus","elems","querySelectorAll","i","focus","activeElement","tabIndex","ReactDom","_jsxs","className","overlay","onClick","stopPropagation","onKeyDown","role","onWheel","event","baseTheme","areEqual","b","left","top","width","Options","containerClass","filter","onChange","optionClass","opsRef","useImperativeHandle","measure","parentElement","rect","getBoundingClientRect","getComputedStyle","mBottom","parseFloat","marginBottom","mTop","marginTop","height","optionNodes","iValue","iName","ad","context","hoc","BaseCustomDropdown","label","active","setActive","useState","dropdownRef","opsPos","setOpsPos","upward","setUpward","id","cb","anchor","opsRect","fitsDown","bottom","visualViewport","fitsUp","up","pos","requestAnimationFrame","cancelAnimationFrame","openList","view","selected","_Fragment","containerClassName","opsContainerClass","select","dropdown","arrow","newValue","defaultTheme","Dropdown","isValidValue","optionElements","hiddenOption","disabled","selectClassName","invalid","BaseSwitch","onPress","GenericLink","enforceA","keepScrollPosition","onMouseDown","openNewTab","replace","routerLinkType","to","match","preventDefault","rel","target","L","discover","scroll","Link","RrLink","BaseButton","onKeyDownProp","onKeyUp","onMouseUp","onPointerDown","onPointerUp","button","Checkbox","checked","checkboxClassName","checkbox","indeterminate","Input","error","focused","setFocused","localRef","empty","input","onBlur","errorMessage","PageLayout","leftSidePanelContent","rightSidePanelContent","sidePanel","leftSidePanel","join","mainPanel","rightSidePanel","NavLink","RrNavLink","Throbber","circle","PLACEMENTS","ARROW_STYLE_DOWN","ARROW_STYLE_UP","calcTooltipRects","tooltip","calcViewportRect","scrollX","scrollY","documentElement","clientHeight","clientWidth","right","calcPositionAboveXY","y","tooltipRects","arrowX","arrowY","containerX","containerY","baseArrowStyle","setComponentPositions","pageX","pageY","placement","element","viewportRect","max","maxX","min","arrowStyle","Tooltip","arrowRef","contentRef","pointTo","createPortal","ABOVE_CURSOR","tip","heap","lastCursorX","lastCursorY","triggeredByTouch","tooltipRef","wrapperRef","showTooltip","setShowTooltip","listener","wrapper","onMouseLeave","onMouseMove","updatePortalPosition","cursorX","cursorY","wrapperRect","clientX","clientY","onTouchStart","ThemedWrapper","YouTubeVideo","autoplay","src","title","srcParts","split","url","queryString","query","qs","videoId","v","throbberTheme","allow","allowFullScreen","video","TextArea","hiddenAreaRef","setHeight","textAreaRef","localValue","setLocalValue","el","observer","ResizeObserver","scrollHeight","observe","disconnect","useLayoutEffect","textarea","hidden","readOnly","REACT_UTILS_LIBRARY_LOADED","server","webpack","__dirname","client"],"sourceRoot":""}
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.46.
|
|
2
|
+
"version": "1.46.3",
|
|
3
3
|
"bin": {
|
|
4
4
|
"react-utils-build": "bin/build.js",
|
|
5
5
|
"react-utils-setup": "bin/setup.js"
|
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
"@babel/runtime": "^7.28.4",
|
|
12
12
|
"@dr.pogodin/babel-plugin-react-css-modules": "^6.13.8",
|
|
13
13
|
"@dr.pogodin/csurf": "^1.16.6",
|
|
14
|
-
"@dr.pogodin/js-utils": "^0.1.
|
|
15
|
-
"@dr.pogodin/react-global-state": "^0.20.
|
|
14
|
+
"@dr.pogodin/js-utils": "^0.1.4",
|
|
15
|
+
"@dr.pogodin/react-global-state": "^0.20.1",
|
|
16
16
|
"@dr.pogodin/react-helmet": "^3.0.4",
|
|
17
17
|
"@dr.pogodin/react-themes": "^1.9.3",
|
|
18
18
|
"@jest/environment": "^30.2.0",
|
|
19
19
|
"axios": "^1.12.2",
|
|
20
|
-
"commander": "^14.0.
|
|
20
|
+
"commander": "^14.0.2",
|
|
21
21
|
"compression": "^1.8.1",
|
|
22
22
|
"config": "^4.1.1",
|
|
23
23
|
"cookie": "^1.0.2",
|
|
@@ -46,16 +46,16 @@
|
|
|
46
46
|
"description": "Collection of generic ReactJS components and utils",
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@babel/cli": "^7.28.3",
|
|
49
|
-
"@babel/core": "^7.28.
|
|
49
|
+
"@babel/core": "^7.28.5",
|
|
50
50
|
"@babel/node": "^7.28.0",
|
|
51
|
-
"@babel/plugin-transform-runtime": "^7.28.
|
|
52
|
-
"@babel/preset-env": "^7.28.
|
|
53
|
-
"@babel/preset-react": "^7.
|
|
54
|
-
"@babel/preset-typescript": "^7.
|
|
51
|
+
"@babel/plugin-transform-runtime": "^7.28.5",
|
|
52
|
+
"@babel/preset-env": "^7.28.5",
|
|
53
|
+
"@babel/preset-react": "^7.28.5",
|
|
54
|
+
"@babel/preset-typescript": "^7.28.5",
|
|
55
55
|
"@babel/register": "^7.28.3",
|
|
56
56
|
"@dr.pogodin/babel-plugin-transform-assets": "^1.2.5",
|
|
57
57
|
"@dr.pogodin/babel-preset-svgr": "^1.9.2",
|
|
58
|
-
"@dr.pogodin/eslint-configs": "^0.1.
|
|
58
|
+
"@dr.pogodin/eslint-configs": "^0.1.1",
|
|
59
59
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.6.1",
|
|
60
60
|
"@standard-schema/spec": "^1.0.0",
|
|
61
61
|
"@testing-library/dom": "^10.4.1",
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
"@types/compression": "^1.8.1",
|
|
66
66
|
"@types/config": "^3.3.5",
|
|
67
67
|
"@types/cookie": "^0.6.0",
|
|
68
|
-
"@types/cookie-parser": "^1.4.
|
|
69
|
-
"@types/express": "^5.0.
|
|
68
|
+
"@types/cookie-parser": "^1.4.10",
|
|
69
|
+
"@types/express": "^5.0.4",
|
|
70
70
|
"@types/jest": "^30.0.0",
|
|
71
71
|
"@types/lodash": "^4.17.20",
|
|
72
72
|
"@types/morgan": "^1.9.10",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"@types/serve-favicon": "^2.5.7",
|
|
80
80
|
"@types/supertest": "^6.0.3",
|
|
81
81
|
"@types/webpack": "^5.28.5",
|
|
82
|
-
"@types/webpack-hot-middleware": "^2.25.
|
|
82
|
+
"@types/webpack-hot-middleware": "^2.25.12",
|
|
83
83
|
"autoprefixer": "^10.4.21",
|
|
84
84
|
"babel-jest": "^30.2.0",
|
|
85
85
|
"babel-loader": "^10.0.0",
|
|
@@ -102,14 +102,14 @@
|
|
|
102
102
|
"regenerator-runtime": "^0.14.1",
|
|
103
103
|
"resolve-url-loader": "^5.0.0",
|
|
104
104
|
"sass": "^1.93.2",
|
|
105
|
-
"sass-loader": "^16.0.
|
|
105
|
+
"sass-loader": "^16.0.6",
|
|
106
106
|
"sitemap": "^8.0.1",
|
|
107
107
|
"source-map-loader": "^5.0.0",
|
|
108
108
|
"stylelint": "^16.25.0",
|
|
109
109
|
"stylelint-config-standard-scss": "^16.0.0",
|
|
110
110
|
"supertest": "^7.1.4",
|
|
111
111
|
"tsc-alias": "1.8.16",
|
|
112
|
-
"tstyche": "^
|
|
112
|
+
"tstyche": "^5.0.0",
|
|
113
113
|
"typed-scss-modules": "^8.1.1",
|
|
114
114
|
"typescript": "^5.9.3",
|
|
115
115
|
"webpack": "^5.102.1",
|
|
@@ -19,6 +19,7 @@ type PropsT = {
|
|
|
19
19
|
children?: ReactNode;
|
|
20
20
|
disabled?: boolean;
|
|
21
21
|
enforceA?: boolean;
|
|
22
|
+
keepScrollPosition?: boolean;
|
|
22
23
|
onClick?: MouseEventHandler & KeyboardEventHandler;
|
|
23
24
|
onKeyDown?: KeyboardEventHandler;
|
|
24
25
|
onKeyUp?: KeyboardEventHandler;
|
|
@@ -39,6 +40,7 @@ export const BaseButton: FunctionComponent<PropsT> = ({
|
|
|
39
40
|
children,
|
|
40
41
|
disabled,
|
|
41
42
|
enforceA,
|
|
43
|
+
keepScrollPosition,
|
|
42
44
|
onClick,
|
|
43
45
|
onKeyDown: onKeyDownProp,
|
|
44
46
|
onKeyUp,
|
|
@@ -79,6 +81,14 @@ export const BaseButton: FunctionComponent<PropsT> = ({
|
|
|
79
81
|
className={className}
|
|
80
82
|
data-testid={process.env.NODE_ENV === 'production' ? undefined : testId}
|
|
81
83
|
enforceA={enforceA}
|
|
84
|
+
|
|
85
|
+
// TODO: This was exposed as a hotifx... however, I guess we better want
|
|
86
|
+
// to check if the `to` URL contains an anchor (#), and if it does we should
|
|
87
|
+
// automatically opt to keep the position here; and enforce <a> (as
|
|
88
|
+
// react-router link does not seem to respect the hash tag either,
|
|
89
|
+
// at least not without some additional settings).
|
|
90
|
+
keepScrollPosition={keepScrollPosition}
|
|
91
|
+
|
|
82
92
|
onClick={onClick}
|
|
83
93
|
|
|
84
94
|
// TODO: For now, the `onKeyDown` handler is not passed to the <Link>,
|