@dr.pogodin/react-utils 1.43.31 → 1.43.33
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/build/development/shared/components/Button/index.js +20 -4
- package/build/development/shared/components/Button/index.js.map +1 -1
- package/build/development/shared/components/Input/index.js +3 -1
- package/build/development/shared/components/Input/index.js.map +1 -1
- package/build/development/web.bundle.js +2 -2
- package/build/production/shared/components/Button/index.js +6 -1
- package/build/production/shared/components/Button/index.js.map +1 -1
- package/build/production/shared/components/Input/index.js +1 -1
- package/build/production/shared/components/Input/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 +2 -0
- package/build/types-code/shared/components/Input/index.d.ts +1 -1
- package/package.json +10 -10
- package/src/shared/components/Button/index.tsx +22 -3
- package/src/shared/components/Input/index.tsx +6 -2
|
@@ -23,6 +23,8 @@ const BaseButton = ({
|
|
|
23
23
|
disabled,
|
|
24
24
|
enforceA,
|
|
25
25
|
onClick,
|
|
26
|
+
onKeyDown: onKeyDownProp,
|
|
27
|
+
onKeyUp,
|
|
26
28
|
onMouseDown,
|
|
27
29
|
onMouseUp,
|
|
28
30
|
onPointerDown,
|
|
@@ -43,12 +45,27 @@ const BaseButton = ({
|
|
|
43
45
|
children: children
|
|
44
46
|
});
|
|
45
47
|
}
|
|
48
|
+
let onKeyDown = onKeyDownProp;
|
|
49
|
+
if (!onKeyDown && onClick) {
|
|
50
|
+
onKeyDown = e => {
|
|
51
|
+
if (e.key === 'Enter') onClick(e);
|
|
52
|
+
};
|
|
53
|
+
}
|
|
46
54
|
if (to) {
|
|
47
55
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Link.default, {
|
|
48
56
|
className: className,
|
|
49
57
|
"data-testid": process.env.NODE_ENV === 'production' ? undefined : testId,
|
|
50
58
|
enforceA: enforceA,
|
|
51
|
-
onClick: onClick
|
|
59
|
+
onClick: onClick
|
|
60
|
+
|
|
61
|
+
// TODO: For now, the `onKeyDown` handler is not passed to the <Link>,
|
|
62
|
+
// as <Link> component does not call it anyway, presumably due to
|
|
63
|
+
// the inner implementation details. We should look into supporting it:
|
|
64
|
+
// https://github.com/birdofpreyru/react-utils/issues/444
|
|
65
|
+
// onKeyDown={onKeyDown}
|
|
66
|
+
,
|
|
67
|
+
|
|
68
|
+
onKeyUp: onKeyUp,
|
|
52
69
|
onMouseDown: onMouseDown,
|
|
53
70
|
onMouseUp: onMouseUp,
|
|
54
71
|
onPointerDown: onPointerDown,
|
|
@@ -63,9 +80,8 @@ const BaseButton = ({
|
|
|
63
80
|
className: className,
|
|
64
81
|
"data-testid": process.env.NODE_ENV === 'production' ? undefined : testId,
|
|
65
82
|
onClick: onClick,
|
|
66
|
-
onKeyDown:
|
|
67
|
-
|
|
68
|
-
} : undefined,
|
|
83
|
+
onKeyDown: onKeyDown,
|
|
84
|
+
onKeyUp: onKeyUp,
|
|
69
85
|
onMouseDown: onMouseDown,
|
|
70
86
|
onMouseUp: onMouseUp,
|
|
71
87
|
onPointerDown: onPointerDown,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_reactThemes","_interopRequireDefault","require","_Link","_jsxRuntime","defaultTheme","BaseButton","active","children","disabled","enforceA","onClick","onMouseDown","onMouseUp","onPointerDown","onPointerUp","openNewTab","replace","testId","theme","to","className","button","jsx","process","env","NODE_ENV","undefined","
|
|
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;AAoCO,MAAMC,UAAqC,GAAGA,CAAC;EACpDC,MAAM;EACNC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,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,IAAIlB,MAAM,IAAIe,KAAK,CAACf,MAAM,EAAEiB,SAAS,IAAI,IAAIF,KAAK,CAACf,MAAM,EAAE;EAC3D,IAAIE,QAAQ,EAAE;IACZ,IAAIa,KAAK,CAACb,QAAQ,EAAEe,SAAS,IAAI,IAAIF,KAAK,CAACb,QAAQ,EAAE;IACrD,oBACE,IAAAL,WAAA,CAAAsB,GAAA;MACEF,SAAS,EAAEA,SAAU;MACrB,eAAaG,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,GAAGC,SAAS,GAAGT,MAAO;MAAAb,QAAA,EAEvEA;IAAQ,CACN,CAAC;EAEV;EAEA,IAAII,SAAS,GAAGC,aAAa;EAC7B,IAAI,CAACD,SAAS,IAAID,OAAO,EAAE;IACzBC,SAAS,GAAImB,CAAC,IAAK;MACjB,IAAIA,CAAC,CAACC,GAAG,KAAK,OAAO,EAAErB,OAAO,CAACoB,CAAC,CAAC;IACnC,CAAC;EACH;EAEA,IAAIR,EAAE,EAAE;IACN,oBACE,IAAAnB,WAAA,CAAAsB,GAAA,EAACvB,KAAA,CAAA8B,OAAI;MACHT,SAAS,EAAEA,SAAU;MACrB,eAAaG,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,GAAGC,SAAS,GAAGT,MAAO;MACxEX,QAAQ,EAAEA,QAAS;MACnBC,OAAO,EAAEA;;MAET;MACA;MACA;MACA;MACA;MAAA;;MAEAG,OAAO,EAAEA,OAAQ;MACjBC,WAAW,EAAEA,WAAY;MACzBC,SAAS,EAAEA,SAAU;MACrBC,aAAa,EAAEA,aAAc;MAC7BC,WAAW,EAAEA,WAAY;MACzBC,UAAU,EAAEA,UAAW;MACvBC,OAAO,EAAEA,OAAQ;MACjBG,EAAE,EAAEA,EAAG;MAAAf,QAAA,EAENA;IAAQ,CACL,CAAC;EAEX;EAEA,oBACE,IAAAJ,WAAA,CAAAsB,GAAA;IACEF,SAAS,EAAEA,SAAU;IACrB,eAAaG,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,GAAGC,SAAS,GAAGT,MAAO;IACxEV,OAAO,EAAEA,OAAQ;IACjBC,SAAS,EAAEA,SAAU;IACrBE,OAAO,EAAEA,OAAQ;IACjBC,WAAW,EAAEA,WAAY;IACzBC,SAAS,EAAEA,SAAU;IACrBC,aAAa,EAAEA,aAAc;IAC7BC,WAAW,EAAEA,WAAY;IACzBgB,IAAI,EAAC,QAAQ;IACbC,QAAQ,EAAE,CAAE;IAAA3B,QAAA,EAEXA;EAAQ,CACN,CAAC;AAEV,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AANA4B,OAAA,CAAA9B,UAAA,GAAAA,UAAA;AAAA,IAAA+B,QAAA,GAAAD,OAAA,CAAAH,OAAA,GAOe,IAAAK,oBAAM,EAAChC,UAAU,EAAE,QAAQ,EAAED,YAAY,CAAC","ignoreList":[]}
|
|
@@ -32,8 +32,10 @@ const Input = ({
|
|
|
32
32
|
...rest
|
|
33
33
|
}) => {
|
|
34
34
|
const localRef = (0, _react.useRef)(null);
|
|
35
|
+
let containerClassName = theme.container;
|
|
36
|
+
if (!rest.value && theme.empty) containerClassName += ` ${theme.empty}`;
|
|
35
37
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
36
|
-
className:
|
|
38
|
+
className: containerClassName,
|
|
37
39
|
onFocus: () => {
|
|
38
40
|
// TODO: It does not really work if a callback-style `ref` is passed in,
|
|
39
41
|
// we need a more complex logic to cover that case, but for now this serves
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_react","require","_reactThemes","_interopRequireDefault","_jsxRuntime","defaultTheme","Input","label","ref","testId","theme","rest","localRef","useRef","
|
|
1
|
+
{"version":3,"file":"index.js","names":["_react","require","_reactThemes","_interopRequireDefault","_jsxRuntime","defaultTheme","Input","label","ref","testId","theme","rest","localRef","useRef","containerClassName","container","value","empty","jsxs","className","onFocus","current","focus","children","undefined","jsx","input","process","env","NODE_ENV","_default","exports","default","themed"],"sources":["../../../../../src/shared/components/Input/index.tsx"],"sourcesContent":["import { type FunctionComponent, type Ref, useRef } from 'react';\n\nimport themed, { type Theme } from '@dr.pogodin/react-themes';\n\nimport defaultTheme from './theme.scss';\n\ntype ThemeKeyT = 'container' | 'empty' | 'input' | 'label';\n\ntype PropsT = React.InputHTMLAttributes<HTMLInputElement> & {\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 label,\n ref,\n testId,\n theme,\n ...rest\n}) => {\n const localRef = useRef<HTMLInputElement>(null);\n\n let containerClassName = theme.container;\n if (!rest.value && theme.empty) containerClassName += ` ${theme.empty}`;\n\n return (\n <span\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 </span>\n );\n};\n\nexport default themed(Input, 'Input', defaultTheme);\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAC,sBAAA,CAAAF,OAAA;AAA8D,IAAAG,WAAA,GAAAH,OAAA;AAAA,MAAAI,YAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAa9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,KAAgC,GAAGA,CAAC;EACxCC,KAAK;EACLC,GAAG;EACHC,MAAM;EACNC,KAAK;EACL,GAAGC;AACL,CAAC,KAAK;EACJ,MAAMC,QAAQ,GAAG,IAAAC,aAAM,EAAmB,IAAI,CAAC;EAE/C,IAAIC,kBAAkB,GAAGJ,KAAK,CAACK,SAAS;EACxC,IAAI,CAACJ,IAAI,CAACK,KAAK,IAAIN,KAAK,CAACO,KAAK,EAAEH,kBAAkB,IAAI,IAAIJ,KAAK,CAACO,KAAK,EAAE;EAEvE,oBACE,IAAAb,WAAA,CAAAc,IAAA;IACEC,SAAS,EAAEL,kBAAmB;IAC9BM,OAAO,EAAEA,CAAA,KAAM;MACb;MACA;MACA;MACA,IAAI,OAAOZ,GAAG,KAAK,QAAQ,EAAEA,GAAG,EAAEa,OAAO,EAAEC,KAAK,CAAC,CAAC,CAAC,KAC9CV,QAAQ,CAACS,OAAO,EAAEC,KAAK,CAAC,CAAC;IAChC,CAAE;IAAAC,QAAA,GAEDhB,KAAK,KAAKiB,SAAS,GAAG,IAAI,gBAAG,IAAApB,WAAA,CAAAqB,GAAA;MAAKN,SAAS,EAAET,KAAK,CAACH,KAAM;MAAAgB,QAAA,EAAEhB;IAAK,CAAM,CAAC,eACxE,IAAAH,WAAA,CAAAqB,GAAA;MACEN,SAAS,EAAET,KAAK,CAACgB,KAAM;MACvB,eAAaC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,GAAGL,SAAS,GAAGf,MAAO;MACxED,GAAG,EAAEA,GAAG,IAAII;;MAEZ;MACA;MAAA;MAAA,GACID;IAAI,CACT,CAAC;EAAA,CACE,CAAC;AAEX,CAAC;AAAC,IAAAmB,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEa,IAAAC,oBAAM,EAAC3B,KAAK,EAAE,OAAO,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 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 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 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:
|
|
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}");
|
|
80
80
|
|
|
81
81
|
/***/ }),
|
|
82
82
|
|
|
@@ -136,7 +136,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-ext
|
|
|
136
136
|
\***********************************************/
|
|
137
137
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
138
138
|
|
|
139
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @dr.pogodin/react-themes */ \"@dr.pogodin/react-themes\");\n/* harmony import */ var _dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _theme_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./theme.scss */ \"./src/shared/components/Input/theme.scss\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n\n\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 = ({\n label,\n ref,\n testId,\n theme,\n ...rest\n}) => {\n const localRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)(\"span\", {\n className:
|
|
139
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @dr.pogodin/react-themes */ \"@dr.pogodin/react-themes\");\n/* harmony import */ var _dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _theme_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./theme.scss */ \"./src/shared/components/Input/theme.scss\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n\n\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 = ({\n label,\n ref,\n testId,\n theme,\n ...rest\n}) => {\n const localRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);\n let containerClassName = theme.container;\n if (!rest.value && theme.empty) containerClassName += ` ${theme.empty}`;\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)(\"span\", {\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();else localRef.current?.focus();\n },\n children: [label === undefined ? null : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"div\", {\n className: theme.label,\n children: label\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"input\", {\n className: theme.input,\n \"data-testid\": false ? 0 : testId,\n ref: ref ?? localRef\n\n // TODO: Avoid the spreading later.\n // eslint-disable-next-line react/jsx-props-no-spreading\n ,\n ...rest\n })]\n });\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (_dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_1___default()(Input, 'Input', _theme_scss__WEBPACK_IMPORTED_MODULE_2__[\"default\"]));\n\n//# sourceURL=webpack://@dr.pogodin/react-utils/./src/shared/components/Input/index.tsx?\n}");
|
|
140
140
|
|
|
141
141
|
/***/ }),
|
|
142
142
|
|
|
@@ -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,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})}if(to){return/*#__PURE__*/(0,_jsxRuntime.jsx)(_Link.default,{className:className,"data-testid":process.env.NODE_ENV==="production"?undefined:testId,enforceA:enforceA,onClick:onClick
|
|
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,onClick:onClick// TODO: For now, the `onKeyDown` handler is not passed to the <Link>,
|
|
3
|
+
// as <Link> component does not call it anyway, presumably due to
|
|
4
|
+
// the inner implementation details. We should look into supporting it:
|
|
5
|
+
// https://github.com/birdofpreyru/react-utils/issues/444
|
|
6
|
+
// onKeyDown={onKeyDown}
|
|
7
|
+
,onKeyUp:onKeyUp,onMouseDown:onMouseDown,onMouseUp:onMouseUp,onPointerDown:onPointerDown,onPointerUp:onPointerUp,openNewTab:openNewTab,replace:replace,to:to,children:children})}return/*#__PURE__*/(0,_jsxRuntime.jsx)("div",{className:className,"data-testid":process.env.NODE_ENV==="production"?undefined:testId,onClick:onClick,onKeyDown:onKeyDown,onKeyUp:onKeyUp,onMouseDown:onMouseDown,onMouseUp:onMouseUp,onPointerDown:onPointerDown,onPointerUp:onPointerUp,role:"button",tabIndex:0,children:children})};/**
|
|
3
8
|
* Button component theme: a map of CSS
|
|
4
9
|
* class names to append to button elements:
|
|
5
10
|
* @prop {string} [active] to the root element of active button.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_reactThemes","_interopRequireDefault","require","_Link","_jsxRuntime","defaultTheme","BaseButton","active","children","disabled","enforceA","onClick","onMouseDown","onMouseUp","onPointerDown","onPointerUp","openNewTab","replace","testId","theme","to","className","button","jsx","process","env","NODE_ENV","undefined","
|
|
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,6GAoCO,KAAM,CAAAC,UAAqC,CAAGA,CAAC,CACpDC,MAAM,CACNC,QAAQ,CACRC,QAAQ,CACRC,QAAQ,CACRC,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,GAAIlB,MAAM,EAAIe,KAAK,CAACf,MAAM,CAAEiB,SAAS,EAAI,IAAIF,KAAK,CAACf,MAAM,EAAE,CAC3D,GAAIE,QAAQ,CAAE,CACZ,GAAIa,KAAK,CAACb,QAAQ,CAAEe,SAAS,EAAI,IAAIF,KAAK,CAACb,QAAQ,EAAE,CACrD,mBACE,GAAAL,WAAA,CAAAsB,GAAA,SACEF,SAAS,CAAEA,SAAU,CACrB,cAAaG,OAAO,CAACC,GAAG,CAACC,QAAQ,GAAK,YAAY,CAAGC,SAAS,CAAGT,MAAO,CAAAb,QAAA,CAEvEA,QAAQ,CACN,CAET,CAEA,GAAI,CAAAI,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,GAAAnB,WAAA,CAAAsB,GAAA,EAACvB,KAAA,CAAA8B,OAAI,EACHT,SAAS,CAAEA,SAAU,CACrB,cAAaG,OAAO,CAACC,GAAG,CAACC,QAAQ,GAAK,YAAY,CAAGC,SAAS,CAAGT,MAAO,CACxEX,QAAQ,CAAEA,QAAS,CACnBC,OAAO,CAAEA,OAET;AACA;AACA;AACA;AACA;AAAA,CAEAG,OAAO,CAAEA,OAAQ,CACjBC,WAAW,CAAEA,WAAY,CACzBC,SAAS,CAAEA,SAAU,CACrBC,aAAa,CAAEA,aAAc,CAC7BC,WAAW,CAAEA,WAAY,CACzBC,UAAU,CAAEA,UAAW,CACvBC,OAAO,CAAEA,OAAQ,CACjBG,EAAE,CAAEA,EAAG,CAAAf,QAAA,CAENA,QAAQ,CACL,CAEV,CAEA,mBACE,GAAAJ,WAAA,CAAAsB,GAAA,SACEF,SAAS,CAAEA,SAAU,CACrB,cAAaG,OAAO,CAACC,GAAG,CAACC,QAAQ,GAAK,YAAY,CAAGC,SAAS,CAAGT,MAAO,CACxEV,OAAO,CAAEA,OAAQ,CACjBC,SAAS,CAAEA,SAAU,CACrBE,OAAO,CAAEA,OAAQ,CACjBC,WAAW,CAAEA,WAAY,CACzBC,SAAS,CAAEA,SAAU,CACrBC,aAAa,CAAEA,aAAc,CAC7BC,WAAW,CAAEA,WAAY,CACzBgB,IAAI,CAAC,QAAQ,CACbC,QAAQ,CAAE,CAAE,CAAA3B,QAAA,CAEXA,QAAQ,CACN,CAET,CAAC,CAED;AACA;AACA;AACA;AACA;AACA;AACA,GANA4B,OAAA,CAAA9B,UAAA,CAAAA,UAAA,KAAA+B,QAAA,CAAAD,OAAA,CAAAH,OAAA,CAOe,GAAAK,oBAAM,EAAChC,UAAU,CAAE,QAAQ,CAAED,YAAY,CAAC","ignoreList":[]}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @param [props...] [Other theming properties](https://www.npmjs.com/package/@dr.pogodin/react-themes#themed-component-properties)
|
|
6
6
|
* @param [props...] Any other properties are passed to the underlying
|
|
7
7
|
* `<input>` element.
|
|
8
|
-
*/const Input=({label,ref,testId,theme,...rest})=>{const localRef=(0,_react.useRef)(null);return/*#__PURE__*/(0,_jsxRuntime.jsxs)("span",{className:
|
|
8
|
+
*/const Input=({label,ref,testId,theme,...rest})=>{const localRef=(0,_react.useRef)(null);let containerClassName=theme.container;if(!rest.value&&theme.empty)containerClassName+=` ${theme.empty}`;return/*#__PURE__*/(0,_jsxRuntime.jsxs)("span",{className:containerClassName,onFocus:()=>{// TODO: It does not really work if a callback-style `ref` is passed in,
|
|
9
9
|
// we need a more complex logic to cover that case, but for now this serves
|
|
10
10
|
// the case we need it for.
|
|
11
11
|
if(typeof ref==="object")ref?.current?.focus();else localRef.current?.focus()},children:[label===undefined?null:/*#__PURE__*/(0,_jsxRuntime.jsx)("div",{className:theme.label,children:label}),/*#__PURE__*/(0,_jsxRuntime.jsx)("input",{className:theme.input,"data-testid":process.env.NODE_ENV==="production"?undefined:testId,ref:ref??localRef// TODO: Avoid the spreading later.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_react","require","_reactThemes","_interopRequireDefault","_jsxRuntime","defaultTheme","Input","label","ref","testId","theme","rest","localRef","useRef","
|
|
1
|
+
{"version":3,"file":"index.js","names":["_react","require","_reactThemes","_interopRequireDefault","_jsxRuntime","defaultTheme","Input","label","ref","testId","theme","rest","localRef","useRef","containerClassName","container","value","empty","jsxs","className","onFocus","current","focus","children","undefined","jsx","input","process","env","NODE_ENV","_default","exports","default","themed"],"sources":["../../../../../src/shared/components/Input/index.tsx"],"sourcesContent":["import { type FunctionComponent, type Ref, useRef } from 'react';\n\nimport themed, { type Theme } from '@dr.pogodin/react-themes';\n\nimport defaultTheme from './theme.scss';\n\ntype ThemeKeyT = 'container' | 'empty' | 'input' | 'label';\n\ntype PropsT = React.InputHTMLAttributes<HTMLInputElement> & {\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 label,\n ref,\n testId,\n theme,\n ...rest\n}) => {\n const localRef = useRef<HTMLInputElement>(null);\n\n let containerClassName = theme.container;\n if (!rest.value && theme.empty) containerClassName += ` ${theme.empty}`;\n\n return (\n <span\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 </span>\n );\n};\n\nexport default themed(Input, 'Input', defaultTheme);\n"],"mappings":"gLAAA,IAAAA,MAAA,CAAAC,OAAA,UAEA,IAAAC,YAAA,CAAAC,sBAAA,CAAAF,OAAA,8BAA8D,IAAAG,WAAA,CAAAH,OAAA,4BAAAI,YAAA,2GAa9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACA,KAAM,CAAAC,KAAgC,CAAGA,CAAC,CACxCC,KAAK,CACLC,GAAG,CACHC,MAAM,CACNC,KAAK,CACL,GAAGC,IACL,CAAC,GAAK,CACJ,KAAM,CAAAC,QAAQ,CAAG,GAAAC,aAAM,EAAmB,IAAI,CAAC,CAE/C,GAAI,CAAAC,kBAAkB,CAAGJ,KAAK,CAACK,SAAS,CACxC,GAAI,CAACJ,IAAI,CAACK,KAAK,EAAIN,KAAK,CAACO,KAAK,CAAEH,kBAAkB,EAAI,IAAIJ,KAAK,CAACO,KAAK,EAAE,CAEvE,mBACE,GAAAb,WAAA,CAAAc,IAAA,UACEC,SAAS,CAAEL,kBAAmB,CAC9BM,OAAO,CAAEA,CAAA,GAAM,CACb;AACA;AACA;AACA,GAAI,MAAO,CAAAZ,GAAG,GAAK,QAAQ,CAAEA,GAAG,EAAEa,OAAO,EAAEC,KAAK,CAAC,CAAC,CAAC,IAC9C,CAAAV,QAAQ,CAACS,OAAO,EAAEC,KAAK,CAAC,CAC/B,CAAE,CAAAC,QAAA,EAEDhB,KAAK,GAAKiB,SAAS,CAAG,IAAI,cAAG,GAAApB,WAAA,CAAAqB,GAAA,SAAKN,SAAS,CAAET,KAAK,CAACH,KAAM,CAAAgB,QAAA,CAAEhB,KAAK,CAAM,CAAC,cACxE,GAAAH,WAAA,CAAAqB,GAAA,WACEN,SAAS,CAAET,KAAK,CAACgB,KAAM,CACvB,cAAaC,OAAO,CAACC,GAAG,CAACC,QAAQ,GAAK,YAAY,CAAGL,SAAS,CAAGf,MAAO,CACxED,GAAG,CAAEA,GAAG,EAAII,QAEZ;AACA;AAAA,IACID,IAAI,CACT,CAAC,EACE,CAEV,CAAC,CAAC,IAAAmB,QAAA,CAAAC,OAAA,CAAAC,OAAA,CAEa,GAAAC,oBAAM,EAAC3B,KAAK,CAAE,OAAO,CAAED,YAAY,CAAC","ignoreList":[]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! For license information please see web.bundle.js.LICENSE.txt */
|
|
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,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,basePath){if(_isomorphy__WEBPACK_IMPORTED_MODULE_0__.IS_CLIENT_SIDE)return null;try{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}catch{return null}}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 i},getBuildInfo:function(){return n.F},isDevBuild:function(){return a},isProdBuild:function(){return _}});var n=r(540),o=r(48);function a(){return!1}function _(){return!0}function i(){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),_=r(126),i=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)(_.GlobalStateProvider,{initialState:(0,i.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:_,testId:i,testIdForOverlay:s,theme:c})=>{const l=(0,external_react_.useRef)(null),u=(0,external_react_.useRef)(null),[d,m]=(0,external_react_.useState)();(0,external_react_.useEffect)(()=>{const e=document.createElement("div");return document.body.appendChild(e),m(e),()=>{document.body.removeChild(e)}},[]),(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 p=(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 d?external_react_dom_default().createPortal((0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[p,(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:_??r,children:t}),(0,jsx_runtime.jsx)("div",{onFocus:()=>{u.current?.focus()},tabIndex:0}),p]}),d):null};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:_,ref:i})=>{const s=(0,external_react_.useRef)(null);(0,external_react_.useImperativeHandle)(i,()=>({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 _)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,m]=(0,external_react_.useState)(!1);(0,external_react_.useEffect)(()=>{if(!_)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;m(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)}},[_]);const p=e=>{const t=window.visualViewport,r=s.current.getBoundingClientRect();i(!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;_&&(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:p,onKeyDown:e=>{"Enter"===e.key&&p(e)},ref:s,role:"listbox",tabIndex:0,children:[f,(0,jsx_runtime.jsx)("div",{className:o.arrow})]}),_?(0,jsx_runtime.jsx)(CustomDropdown_Options,{containerClass:b,containerStyle:l,onCancel:()=>{i(!1)},onChange:e=>{i(!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:_})=>{let i=!1;const s=[];for(const t of n)if(!e||e(t)){const[e,r]=optionValueName(t);i||=e===_,s.push((0,jsx_runtime.jsx)("option",{className:a.option,value:e,children:r},e))}const c=i?null:(0,jsx_runtime.jsx)("option",{className:a.hiddenOption,disabled:!0,value:_,children:_},"__reactUtilsHiddenOption");let l=a.select;return i||(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:_,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,_]=optionValueName(e);let i,s=n.option;r===o?s+=` ${n.selected}`:t&&(i=()=>{t(r)}),a.push(i?(0,jsx_runtime.jsx)("div",{className:s,onClick:i,onKeyDown:e=>{"Enter"===e.key&&i()},role:"button",tabIndex:0,children:_},r):(0,jsx_runtime.jsx)("div",{className:s,children:_},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:_,openNewTab:i,replace:s,routerLinkType:c,to:l,...u})=>{if(r||n||i||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()}:_,rel:"noopener noreferrer",target:i?"_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:_,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,onMouseDown:a,onMouseUp:_,onPointerDown:i,onPointerUp:s,openNewTab:c,replace:l,testId:u,theme:d,to:m})=>{let p=d.button;return e&&d.active&&(p+=` ${d.active}`),r?(d.disabled&&(p+=` ${d.disabled}`),(0,jsx_runtime.jsx)("div",{className:p,"data-testid":void 0,children:t})):m?(0,jsx_runtime.jsx)(components_Link,{className:p,"data-testid":void 0,enforceA:n,onClick:o,onMouseDown:a,onMouseUp:_,onPointerDown:i,onPointerUp:s,openNewTab:c,replace:l,to:m,children:t}):(0,jsx_runtime.jsx)("div",{className:p,"data-testid":void 0,onClick:o,onKeyDown:o?e=>{"Enter"===e.key&&o(e)}:void 0,onMouseDown:a,onMouseUp:_,onPointerDown:i,onPointerUp:s,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 _=a.container;t&&(_+=` ${a.disabled}`);let i=a.checkbox;return"indeterminate"===e&&(i+=` ${a.indeterminate}`),(0,jsx_runtime.jsxs)("div",{className:_,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:i,"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",input:"M07d4s",label:"gfbdq-"};const Input=({label:e,ref:t,testId:r,theme:n,...o})=>{const a=(0,external_react_.useRef)(null);return(0,jsx_runtime.jsxs)("span",{className:n.container,onFocus:()=>{"object"==typeof t?t?.current?.focus():a.current?.focus()},children:[void 0===e?null:(0,jsx_runtime.jsx)("div",{className:n.label,children:e}),(0,jsx_runtime.jsx)("input",{className:n.input,"data-testid":void 0,ref:t??a,...o})]})};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 createTooltipComponents(e){const t=document.createElement("div");e.arrow&&t.setAttribute("class",e.arrow);const r=document.createElement("div");e.content&&r.setAttribute("class",e.content);const n=document.createElement("div");return e.container&&n.setAttribute("class",e.container),n.appendChild(t),n.appendChild(r),document.body.appendChild(n),{arrow:t,container:n,content:r}}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),_=calcViewportRect(),i=calcPositionAboveXY(e,t,a);if(i.containerX<_.left+6)i.containerX=_.left+6,i.arrowX=Math.max(6,e-i.containerX-a.arrow.width/2);else{const t=_.right-6-a.container.width;i.containerX>t&&(i.containerX=t,i.arrowX=Math.min(a.container.width-6,e-i.containerX-a.arrow.width/2))}i.containerY<_.top+6&&(i.containerY+=a.container.height+2*a.arrow.height,i.arrowY-=a.container.height+a.arrow.height,i.baseArrowStyle=ARROW_STYLE_UP);const s=`left:${i.containerX}px;top:${i.containerY}px`;o.container.setAttribute("style",s);const c=`${i.baseArrowStyle};left:${i.arrowX}px;top:${i.arrowY}px`;o.arrow.setAttribute("style",c)}const Tooltip=({children:e,ref:t,theme:r})=>{const{current:n}=(0,external_react_.useRef)({lastElement:void 0,lastPageX:0,lastPageY:0,lastPlacement:void 0}),[o,a]=(0,external_react_.useState)(null),_=(e,t,r,a)=>{n.lastElement=a,n.lastPageX=e,n.lastPageY=t,n.lastPlacement=r,o&&setComponentPositions(e,t,r,a,o)};return(0,external_react_.useImperativeHandle)(t,()=>({pointTo:_})),(0,external_react_.useEffect)(()=>{const e=createTooltipComponents(r);return a(e),()=>{document.body.removeChild(e.container),a(null)}},[r]),(0,external_react_.useEffect)(()=>{o&&setComponentPositions(n.lastPageX,n.lastPageY,n.lastPlacement,n.lastElement,o)},[o,n.lastPageX,n.lastPageY,n.lastPlacement,n.lastElement]),o?(0,external_react_dom_.createPortal)(e,o.content):null};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),_=(0,external_react_.useRef)(null),[i,s]=(0,external_react_.useState)(!1);return(0,external_react_.useEffect)(()=>{if(i&&null!==r){a.current&&a.current.pointTo(o.lastCursorX+window.scrollX,o.lastCursorY+window.scrollY,t,_.current);const e=()=>{s(!1)};return window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}}},[o.lastCursorX,o.lastCursorY,t,i,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(i){const n=_.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,_.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:_,role:"presentation",children:[i&&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[,_]=o,i=_?external_qs_default().parse(_):{},s=i.v??a?.match(/\/([a-zA-Z0-9-_]*)$/)?.[1];return a=`https://www.youtube.com/embed/${s}`,delete i.v,i.autoplay=e?"1":"0",a+=`?${external_qs_default().stringify(i)}`,(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",hidden:"GiHBXI"};const TextArea=({disabled:e,label:t,onBlur:r,onChange:n,onKeyDown:o,placeholder:a,testId:_,theme:i,value:s})=>{const c=(0,external_react_.useRef)(null),[l,u]=(0,external_react_.useState)(),d=(0,external_react_.useRef)(null),[m,p]=(0,external_react_.useState)(s??"");return void 0!==s&&m!==s&&p(s),(0,external_react_.useEffect)(()=>{const e=c.current;if(!e)return;const t=new ResizeObserver(()=>{u(e.scrollHeight)});return t.observe(e),()=>{t.disconnect()}},[]),(0,external_react_.useLayoutEffect)(()=>{const e=c.current;e&&u(e.scrollHeight)},[m]),(0,jsx_runtime.jsxs)("div",{className:i.container,onFocus:()=>{d.current?.focus()},children:[void 0===t?null:(0,jsx_runtime.jsx)("div",{className:i.label,children:t}),(0,jsx_runtime.jsx)("textarea",{className:`${i.textarea} ${i.hidden}`,readOnly:!0,ref:c,tabIndex:-1,value:m||" "}),(0,jsx_runtime.jsx)("textarea",{className:i.textarea,"data-testid":void 0,disabled:e,onBlur:r,onChange:void 0===s?e=>{p(e.target.value)}:n,onKeyDown:o,placeholder:a,ref:d,style:{height:l},value:m})]})};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,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,basePath){if(_isomorphy__WEBPACK_IMPORTED_MODULE_0__.IS_CLIENT_SIDE)return null;try{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}catch{return null}}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 i},getBuildInfo:function(){return n.F},isDevBuild:function(){return a},isProdBuild:function(){return _}});var n=r(540),o=r(48);function a(){return!1}function _(){return!0}function i(){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),_=r(126),i=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)(_.GlobalStateProvider,{initialState:(0,i.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:_,testId:i,testIdForOverlay:s,theme:c})=>{const l=(0,external_react_.useRef)(null),u=(0,external_react_.useRef)(null),[d,p]=(0,external_react_.useState)();(0,external_react_.useEffect)(()=>{const e=document.createElement("div");return document.body.appendChild(e),p(e),()=>{document.body.removeChild(e)}},[]),(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 m=(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 d?external_react_dom_default().createPortal((0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[m,(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:_??r,children:t}),(0,jsx_runtime.jsx)("div",{onFocus:()=>{u.current?.focus()},tabIndex:0}),m]}),d):null};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:_,ref:i})=>{const s=(0,external_react_.useRef)(null);(0,external_react_.useImperativeHandle)(i,()=>({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 _)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(!_)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)}},[_]);const m=e=>{const t=window.visualViewport,r=s.current.getBoundingClientRect();i(!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;_&&(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})]}),_?(0,jsx_runtime.jsx)(CustomDropdown_Options,{containerClass:b,containerStyle:l,onCancel:()=>{i(!1)},onChange:e=>{i(!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:_})=>{let i=!1;const s=[];for(const t of n)if(!e||e(t)){const[e,r]=optionValueName(t);i||=e===_,s.push((0,jsx_runtime.jsx)("option",{className:a.option,value:e,children:r},e))}const c=i?null:(0,jsx_runtime.jsx)("option",{className:a.hiddenOption,disabled:!0,value:_,children:_},"__reactUtilsHiddenOption");let l=a.select;return i||(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:_,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,_]=optionValueName(e);let i,s=n.option;r===o?s+=` ${n.selected}`:t&&(i=()=>{t(r)}),a.push(i?(0,jsx_runtime.jsx)("div",{className:s,onClick:i,onKeyDown:e=>{"Enter"===e.key&&i()},role:"button",tabIndex:0,children:_},r):(0,jsx_runtime.jsx)("div",{className:s,children:_},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:_,openNewTab:i,replace:s,routerLinkType:c,to:l,...u})=>{if(r||n||i||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()}:_,rel:"noopener noreferrer",target:i?"_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:_,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:_,onMouseDown:i,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:_,onMouseDown:i,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:_,onMouseDown:i,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 _=a.container;t&&(_+=` ${a.disabled}`);let i=a.checkbox;return"indeterminate"===e&&(i+=` ${a.indeterminate}`),(0,jsx_runtime.jsxs)("div",{className:_,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:i,"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",input:"M07d4s",label:"gfbdq-"};const Input=({label:e,ref:t,testId:r,theme:n,...o})=>{const a=(0,external_react_.useRef)(null);let _=n.container;return!o.value&&n.empty&&(_+=` ${n.empty}`),(0,jsx_runtime.jsxs)("span",{className:_,onFocus:()=>{"object"==typeof t?t?.current?.focus():a.current?.focus()},children:[void 0===e?null:(0,jsx_runtime.jsx)("div",{className:n.label,children:e}),(0,jsx_runtime.jsx)("input",{className:n.input,"data-testid":void 0,ref:t??a,...o})]})};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 createTooltipComponents(e){const t=document.createElement("div");e.arrow&&t.setAttribute("class",e.arrow);const r=document.createElement("div");e.content&&r.setAttribute("class",e.content);const n=document.createElement("div");return e.container&&n.setAttribute("class",e.container),n.appendChild(t),n.appendChild(r),document.body.appendChild(n),{arrow:t,container:n,content:r}}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),_=calcViewportRect(),i=calcPositionAboveXY(e,t,a);if(i.containerX<_.left+6)i.containerX=_.left+6,i.arrowX=Math.max(6,e-i.containerX-a.arrow.width/2);else{const t=_.right-6-a.container.width;i.containerX>t&&(i.containerX=t,i.arrowX=Math.min(a.container.width-6,e-i.containerX-a.arrow.width/2))}i.containerY<_.top+6&&(i.containerY+=a.container.height+2*a.arrow.height,i.arrowY-=a.container.height+a.arrow.height,i.baseArrowStyle=ARROW_STYLE_UP);const s=`left:${i.containerX}px;top:${i.containerY}px`;o.container.setAttribute("style",s);const c=`${i.baseArrowStyle};left:${i.arrowX}px;top:${i.arrowY}px`;o.arrow.setAttribute("style",c)}const Tooltip=({children:e,ref:t,theme:r})=>{const{current:n}=(0,external_react_.useRef)({lastElement:void 0,lastPageX:0,lastPageY:0,lastPlacement:void 0}),[o,a]=(0,external_react_.useState)(null),_=(e,t,r,a)=>{n.lastElement=a,n.lastPageX=e,n.lastPageY=t,n.lastPlacement=r,o&&setComponentPositions(e,t,r,a,o)};return(0,external_react_.useImperativeHandle)(t,()=>({pointTo:_})),(0,external_react_.useEffect)(()=>{const e=createTooltipComponents(r);return a(e),()=>{document.body.removeChild(e.container),a(null)}},[r]),(0,external_react_.useEffect)(()=>{o&&setComponentPositions(n.lastPageX,n.lastPageY,n.lastPlacement,n.lastElement,o)},[o,n.lastPageX,n.lastPageY,n.lastPlacement,n.lastElement]),o?(0,external_react_dom_.createPortal)(e,o.content):null};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),_=(0,external_react_.useRef)(null),[i,s]=(0,external_react_.useState)(!1);return(0,external_react_.useEffect)(()=>{if(i&&null!==r){a.current&&a.current.pointTo(o.lastCursorX+window.scrollX,o.lastCursorY+window.scrollY,t,_.current);const e=()=>{s(!1)};return window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}}},[o.lastCursorX,o.lastCursorY,t,i,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(i){const n=_.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,_.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:_,role:"presentation",children:[i&&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[,_]=o,i=_?external_qs_default().parse(_):{},s=i.v??a?.match(/\/([a-zA-Z0-9-_]*)$/)?.[1];return a=`https://www.youtube.com/embed/${s}`,delete i.v,i.autoplay=e?"1":"0",a+=`?${external_qs_default().stringify(i)}`,(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",hidden:"GiHBXI"};const TextArea=({disabled:e,label:t,onBlur:r,onChange:n,onKeyDown:o,placeholder:a,testId:_,theme:i,value:s})=>{const c=(0,external_react_.useRef)(null),[l,u]=(0,external_react_.useState)(),d=(0,external_react_.useRef)(null),[p,m]=(0,external_react_.useState)(s??"");return void 0!==s&&p!==s&&m(s),(0,external_react_.useEffect)(()=>{const e=c.current;if(!e)return;const t=new ResizeObserver(()=>{u(e.scrollHeight)});return t.observe(e),()=>{t.disconnect()}},[]),(0,external_react_.useLayoutEffect)(()=>{const e=c.current;e&&u(e.scrollHeight)},[p]),(0,jsx_runtime.jsxs)("div",{className:i.container,onFocus:()=>{d.current?.focus()},children:[void 0===t?null:(0,jsx_runtime.jsx)("div",{className:i.label,children:t}),(0,jsx_runtime.jsx)("textarea",{className:`${i.textarea} ${i.hidden}`,readOnly:!0,ref:c,tabIndex:-1,value:p||" "}),(0,jsx_runtime.jsx)("textarea",{className:i.textarea,"data-testid":void 0,disabled:e,onBlur:r,onChange:void 0===s?e=>{m(e.target.value)}:n,onKeyDown:o,placeholder:a,ref:d,style:{height:l},value:p})]})};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
|
//# sourceMappingURL=web.bundle.js.map
|