@dr.pogodin/react-utils 1.20.0 → 1.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -78,7 +78,7 @@ if (window.INJ) {
78
78
  decipher.update(_forge.default.util.createBuffer(data.slice(32)));
79
79
  decipher.finish();
80
80
  data = _forge.default.util.decodeUtf8(decipher.output.data);
81
- data = eval("(".concat(data, ")")); // eslint-disable-line no-eval
81
+ data = eval(`(${data})`); // eslint-disable-line no-eval
82
82
 
83
83
  window.CHUNK_GROUPS = data.CHUNK_GROUPS;
84
84
  window.CONFIG = data.CONFIG;
@@ -1 +1 @@
1
- {"version":3,"file":"init.js","names":["BUILD_INFO","window","TRU_BUILD_INFO","TRU_KEEP_INJ_SCRIPT","block","document","querySelector","getElementsByTagName","removeChild","useServiceWorker","navigator","addEventListener","reg","serviceWorker","register","console","log","err","INJ","key","data","forge","util","decode64","decipher","cipher","createDecipher","start","iv","slice","update","createBuffer","finish","decodeUtf8","output","eval","CHUNK_GROUPS","CONFIG","ISTATE","CSRF","cookie","parse","csrfToken"],"sources":["../../../src/client/init.js"],"sourcesContent":["/**\n * Initialization of client-side environment.\n */\n\n/* global BUILD_INFO, document, window */\n\nimport cookie from 'cookie';\n\n// Note: this way, only required part of \"node-forge\": AES, and some utils,\n// is bundled into client-side code.\nimport forge from 'node-forge/lib/forge';\nimport 'node-forge/lib/aes';\n\n/* `BUILD_INFO` is always injected by Webpack build, but this check is needed\n * to adopt the code for usage in tests. */\nif (typeof BUILD_INFO !== 'undefined') {\n window.TRU_BUILD_INFO = BUILD_INFO;\n}\n\n/* Removes data injection script out of the document.\n * The if block is here for test purposes. */\nif (!window.TRU_KEEP_INJ_SCRIPT) {\n const block = document.querySelector('script[id=\"inj\"]');\n if (block) document.getElementsByTagName('body')[0].removeChild(block);\n}\n\n/* TODO: A proper logger should be moved to `@dr.pogodin/react-utils`. */\n/* eslint-disable no-console */\nconst { useServiceWorker } = window.TRU_BUILD_INFO;\nif (useServiceWorker) {\n const { navigator } = window;\n if ('serviceWorker' in navigator) {\n window.addEventListener('load', async () => {\n try {\n // Note: no matter the \"publicPath\", we want to serve the service worker\n // from the web app root, to allow it control any and all pages of the\n // web app (otherwise, it will be restricted to the scope of its path).\n // The server takes it into account.\n const reg = await navigator\n .serviceWorker.register('/__service-worker.js');\n console.log('SW registered:', reg);\n } catch (err) {\n console.log('SW registration failed:', err);\n }\n });\n }\n}\n/* eslint-enable no-console */\n\n/* Decodes data injected at the server side. */\nif (window.INJ) {\n const { key } = window.TRU_BUILD_INFO;\n let data = forge.util.decode64(window.INJ);\n const decipher = forge.cipher.createDecipher('AES-CBC', key);\n decipher.start({ iv: data.slice(0, 32) });\n decipher.update(forge.util.createBuffer(data.slice(32)));\n decipher.finish();\n\n data = forge.util.decodeUtf8(decipher.output.data);\n data = eval(`(${data})`); // eslint-disable-line no-eval\n\n window.CHUNK_GROUPS = data.CHUNK_GROUPS;\n window.CONFIG = data.CONFIG;\n window.ISTATE = data.ISTATE;\n} else {\n // This is possible when the client-side bundle is launched as a stand-alone\n // precompiled website, rather than served by react-utils' based server.\n window.CHUNK_GROUPS = {};\n window.CONFIG = {};\n}\n\nwindow.CONFIG.CSRF = cookie.parse(document.cookie).csrfToken;\n"],"mappings":";;;;AAMA;;AAIA;;AACA;;AAXA;AACA;AACA;;AAEA;AAIA;AACA;;AAIA;AACA;AACA,IAAI,OAAOA,UAAP,KAAsB,WAA1B,EAAuC;EACrCC,MAAM,CAACC,cAAP,GAAwBF,UAAxB;AACD;AAED;AACA;;;AACA,IAAI,CAACC,MAAM,CAACE,mBAAZ,EAAiC;EAC/B,MAAMC,KAAK,GAAGC,QAAQ,CAACC,aAAT,CAAuB,kBAAvB,CAAd;EACA,IAAIF,KAAJ,EAAWC,QAAQ,CAACE,oBAAT,CAA8B,MAA9B,EAAsC,CAAtC,EAAyCC,WAAzC,CAAqDJ,KAArD;AACZ;AAED;;AACA;;;AACA,MAAM;EAAEK;AA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gB,YAA3B;EACAnC,MAAM,CAACoC,MAAP,GAAgBjB,IAAI,CAACiB,MAArB;EACApC,MAAM,CAACqC,MAAP,GAAgBlB,IAAI,CAACkB,MAArB;AACD,CAdD,MAcO;EACL;EACA;EACArC,MAAM,CAACmC,YAAP,GAAsB,EAAtB;EACAnC,MAAM,CAACoC,MAAP,GAAgB,EAAhB;AACD;;AAEDpC,MAAM,CAACoC,MAAP,CAAcE,IAAd,GAAqBC,eAAA,CAAOC,KAAP,CAAapC,QAAQ,CAACmC,MAAtB,EAA8BE,SAAnD"}
1
+ {"version":3,"file":"init.js","names":["BUILD_INFO","window","TRU_BUILD_INFO","TRU_KEEP_INJ_SCRIPT","block","document","querySelector","getElementsByTagName","removeChild","useServiceWorker","navigator","addEventListener","reg","serviceWorker","register","console","log","err","INJ","key","data","forge","util","decode64","decipher","cipher","createDecipher","start","iv","slice","update","createBuffer","finish","decodeUtf8","output","eval","CHUNK_GROUPS","CONFIG","ISTATE","CSRF","cookie","parse","csrfToken"],"sources":["../../../src/client/init.js"],"sourcesContent":["/**\n * Initialization of client-side environment.\n */\n\n/* global BUILD_INFO, document, window */\n\nimport cookie from 'cookie';\n\n// Note: this way, only required part of \"node-forge\": AES, and some utils,\n// is bundled into client-side code.\nimport forge from 'node-forge/lib/forge';\nimport 'node-forge/lib/aes';\n\n/* `BUILD_INFO` is always injected by Webpack build, but this check is needed\n * to adopt the code for usage in tests. */\nif (typeof BUILD_INFO !== 'undefined') {\n window.TRU_BUILD_INFO = BUILD_INFO;\n}\n\n/* Removes data injection script out of the document.\n * The if block is here for test purposes. */\nif (!window.TRU_KEEP_INJ_SCRIPT) {\n const block = document.querySelector('script[id=\"inj\"]');\n if (block) document.getElementsByTagName('body')[0].removeChild(block);\n}\n\n/* TODO: A proper logger should be moved to `@dr.pogodin/react-utils`. */\n/* eslint-disable no-console */\nconst { useServiceWorker } = window.TRU_BUILD_INFO;\nif (useServiceWorker) {\n const { navigator } = window;\n if ('serviceWorker' in navigator) {\n window.addEventListener('load', async () => {\n try {\n // Note: no matter the \"publicPath\", we want to serve the service worker\n // from the web app root, to allow it control any and all pages of the\n // web app (otherwise, it will be restricted to the scope of its path).\n // The server takes it into account.\n const reg = await navigator\n .serviceWorker.register('/__service-worker.js');\n console.log('SW registered:', reg);\n } catch (err) {\n console.log('SW registration failed:', err);\n }\n });\n }\n}\n/* eslint-enable no-console */\n\n/* Decodes data injected at the server side. */\nif (window.INJ) {\n const { key } = window.TRU_BUILD_INFO;\n let data = forge.util.decode64(window.INJ);\n const decipher = forge.cipher.createDecipher('AES-CBC', key);\n decipher.start({ iv: data.slice(0, 32) });\n decipher.update(forge.util.createBuffer(data.slice(32)));\n decipher.finish();\n\n data = forge.util.decodeUtf8(decipher.output.data);\n data = eval(`(${data})`); // eslint-disable-line no-eval\n\n window.CHUNK_GROUPS = data.CHUNK_GROUPS;\n window.CONFIG = data.CONFIG;\n window.ISTATE = data.ISTATE;\n} else {\n // This is possible when the client-side bundle is launched as a stand-alone\n // precompiled website, rather than served by react-utils' based server.\n window.CHUNK_GROUPS = {};\n window.CONFIG = {};\n}\n\nwindow.CONFIG.CSRF = cookie.parse(document.cookie).csrfToken;\n"],"mappings":";;;;AAMA;;AAIA;;AACA;;AAXA;AACA;AACA;;AAEA;AAIA;AACA;;AAIA;AACA;AACA,IAAI,OAAOA,UAAP,KAAsB,WAA1B,EAAuC;EACrCC,MAAM,CAACC,cAAP,GAAwBF,UAAxB;AACD;AAED;AACA;;;AACA,IAAI,CAACC,MAAM,CAACE,mBAAZ,EAAiC;EAC/B,MAAMC,KAAK,GAAGC,QAAQ,CAACC,aAAT,CAAuB,kBAAvB,CAAd;EACA,IAAIF,KAAJ,EAAWC,QAAQ,CAACE,oBAAT,CAA8B,MAA9B,EAAsC,CAAtC,EAAyCC,WAAzC,CAAqDJ,KAArD;AACZ;AAED;;AACA;;;AACA,MAAM;EAAEK;AAAF,IAAuBR,MAAM,CAACC,cAApC;;AACA,IAAIO,gBAAJ,EAAsB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,IAAI,CAACiB,MAArB;EACApC,MAAM,CAACqC,MAAP,GAAgBlB,IAAI,CAACkB,MAArB;AACD,CAdD,MAcO;EACL;EACA;EACArC,MAAM,CAACmC,YAAP,GAAsB,EAAtB;EACAnC,MAAM,CAACoC,MAAP,GAAgB,EAAhB;AACD;;AAEDpC,MAAM,CAACoC,MAAP,CAAcE,IAAd,GAAqBC,eAAA,CAAOC,KAAP,CAAapC,QAAQ,CAACmC,MAAtB,EAA8BE,SAAnD"}
@@ -34,13 +34,13 @@ const defaultTheme = {
34
34
  function Throbber({
35
35
  theme
36
36
  }) {
37
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
37
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
38
38
  className: (theme.container ? theme.container + " " : "") + "-dr-pogodin-react-utils___src-shared-components-Throbber-theme___container___7zdld4",
39
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
39
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
40
40
  className: (theme.circle ? theme.circle + " " : "") + "-dr-pogodin-react-utils___src-shared-components-Throbber-theme___circle___dBrB4g"
41
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
41
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
42
42
  className: (theme.circle ? theme.circle + " " : "") + "-dr-pogodin-react-utils___src-shared-components-Throbber-theme___circle___dBrB4g"
43
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
43
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
44
44
  className: (theme.circle ? theme.circle + " " : "") + "-dr-pogodin-react-utils___src-shared-components-Throbber-theme___circle___dBrB4g"
45
45
  })]
46
46
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["Throbber","theme","container","circle","defaultProps","propTypes","PT","shape","string","themed","defaultTheme"],"sources":["../../../../../src/shared/components/Throbber/index.jsx"],"sourcesContent":["import PT from 'prop-types';\nimport themed from '@dr.pogodin/react-themes';\n\nimport defaultTheme from './theme.scss';\n\n/**\n * Throbber is an \"action in progress\" indicator, which renders\n * three bouncing circles as a simple pending activity indicator,\n * and can be further themed to a certain degree.\n * @param {object} [props] Component properties.\n * @param {ThrobberTheme} [props.theme] _Ad hoc_ theme.\n * @param {...any} [props....]\n * [Other theming properties](https://www.npmjs.com/package/@dr.pogodin/react-themes#themed-component-properties)\n */\nfunction Throbber({\n theme,\n}) {\n return (\n <div className={theme.container} styleName=\"container\">\n <div className={theme.circle} styleName=\"circle\" />\n <div className={theme.circle} styleName=\"circle\" />\n <div className={theme.circle} styleName=\"circle\" />\n </div>\n );\n}\n\nThrobber.defaultProps = {\n theme: {},\n};\n\nThrobber.propTypes = {\n theme: PT.shape({\n container: PT.string,\n circle: PT.string,\n }),\n};\n\nexport default themed('Throbber', [\n 'circle',\n 'container',\n], defaultTheme)(Throbber);\n"],"mappings":";;;;;;;;;AAAA;;AACA;;;;;;;;;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASA,QAAT,CAAkB;EAChBC;AADgB,CAAlB,EAEG;EACD,oBACE;IAAK,SAAS,GAAEA,KAAK,CAACC,SAAR,GAAED,KAAK,CAACC,SAAR,oGAAd;IAAA,wBACE;MAAK,SAAS,GAAED,KAAK,CAACE,MAAR,GAAEF,KAAK,CAACE,MAAR;IAAd,EADF,eAEE;MAAK,SAAS,GAAEF,KAAK,CAACE,MAAR,GAAEF,KAAK,CAACE,MAAR;IAAd,EAFF,eAGE;MAAK,SAAS,GAAEF,KAAK,CAACE,MAAR,GAAEF,KAAK,CAACE,MAAR;IAAd,EAHF;EAAA,EADF;AAOD;;AAEDH,QAAQ,CAACI,YAAT,GAAwB;EACtBH,KAAK,EAAE;AADe,CAAxB;AAIAD,QAAQ,CAACK,SAAT,GAAqB;EACnBJ,KAAK,EAAEK,kBAAA,CAAGC,KAAH,CAAS;IACdL,SAAS,EAAEI,kBAAA,CAAGE,MADA;IAEdL,MAAM,EAAEG,kBAAA,CAAGE;EAFG,CAAT;AADY,CAArB;;eAOe,IAAAC,oBAAA,EAAO,UAAP,EAAmB,CAChC,QADgC,EAEhC,WAFgC,CAAnB,EAGZC,YAHY,EAGEV,QAHF,C"}
1
+ {"version":3,"file":"index.js","names":["Throbber","theme","container","circle","defaultProps","propTypes","PT","shape","string","themed","defaultTheme"],"sources":["../../../../../src/shared/components/Throbber/index.jsx"],"sourcesContent":["import PT from 'prop-types';\nimport themed from '@dr.pogodin/react-themes';\n\nimport defaultTheme from './theme.scss';\n\n/**\n * Throbber is an \"action in progress\" indicator, which renders\n * three bouncing circles as a simple pending activity indicator,\n * and can be further themed to a certain degree.\n * @param {object} [props] Component properties.\n * @param {ThrobberTheme} [props.theme] _Ad hoc_ theme.\n * @param {...any} [props....]\n * [Other theming properties](https://www.npmjs.com/package/@dr.pogodin/react-themes#themed-component-properties)\n */\nfunction Throbber({\n theme,\n}) {\n return (\n <span className={theme.container} styleName=\"container\">\n <span className={theme.circle} styleName=\"circle\" />\n <span className={theme.circle} styleName=\"circle\" />\n <span className={theme.circle} styleName=\"circle\" />\n </span>\n );\n}\n\nThrobber.defaultProps = {\n theme: {},\n};\n\nThrobber.propTypes = {\n theme: PT.shape({\n container: PT.string,\n circle: PT.string,\n }),\n};\n\nexport default themed('Throbber', [\n 'circle',\n 'container',\n], defaultTheme)(Throbber);\n"],"mappings":";;;;;;;;;AAAA;;AACA;;;;;;;;;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASA,QAAT,CAAkB;EAChBC;AADgB,CAAlB,EAEG;EACD,oBACE;IAAM,SAAS,GAAEA,KAAK,CAACC,SAAR,GAAED,KAAK,CAACC,SAAR,oGAAf;IAAA,wBACE;MAAM,SAAS,GAAED,KAAK,CAACE,MAAR,GAAEF,KAAK,CAACE,MAAR;IAAf,EADF,eAEE;MAAM,SAAS,GAAEF,KAAK,CAACE,MAAR,GAAEF,KAAK,CAACE,MAAR;IAAf,EAFF,eAGE;MAAM,SAAS,GAAEF,KAAK,CAACE,MAAR,GAAEF,KAAK,CAACE,MAAR;IAAf,EAHF;EAAA,EADF;AAOD;;AAEDH,QAAQ,CAACI,YAAT,GAAwB;EACtBH,KAAK,EAAE;AADe,CAAxB;AAIAD,QAAQ,CAACK,SAAT,GAAqB;EACnBJ,KAAK,EAAEK,kBAAA,CAAGC,KAAH,CAAS;IACdL,SAAS,EAAEI,kBAAA,CAAGE,MADA;IAEdL,MAAM,EAAEG,kBAAA,CAAGE;EAFG,CAAT;AADY,CAArB;;eAOe,IAAAC,oBAAA,EAAO,UAAP,EAAmB,CAChC,QADgC,EAEhC,WAFgC,CAAnB,EAGZC,YAHY,EAGEV,QAHF,C"}
@@ -79,6 +79,12 @@ class E2eSsrEnv extends _jestEnvironmentJsdom.default {
79
79
  return new Promise((done, fail) => {
80
80
  compiler.run((err, stats) => {
81
81
  if (err) fail(err);
82
+
83
+ if (stats.hasErrors()) {
84
+ console.error(stats.toJson().errors);
85
+ fail(Error('Webpack compilation failed'));
86
+ }
87
+
82
88
  this.global.webpackStats = stats.toJson(); // Keeps reference to the raw Webpack stats object, which should be
83
89
  // explicitly passed to the server-side renderer alongside the request,
84
90
  // so that it can to pick up asset paths for different named chunks.
@@ -1 +1 @@
1
- {"version":3,"file":"E2eSsrEnv.js","names":["E2eSsrEnv","JsdomEnv","loadWebpackConfig","options","pragmas","JSON","parse","defaults","context","testFolder","fs","global","webpackOutputFs","factory","require","path","resolve","rootDir","webpackConfig","buildInfo","existsSync","readFileSync","runWebpack","compiler","webpack","outputFileSystem","Promise","done","fail","run","err","stats","webpackStats","toJson","runSsr","logger","undefined","debug","noop","info","log","warn","root","process","cwd","register","envName","babelEnv","extensions","entry","p","Application","entryExportName","renderer","ssrFactory","status","markup","ssrRequest","cookie","send","set","value","locals","devMiddleware","error","ssrMarkup","ssrOptions","ssrStatus","constructor","config","docblockPragmas","request","url","csrfToken","projectConfig","dom","createFsFromVolume","Volume","dirname","testPath","withSsr","setup","REACT_UTILS_FORCE_CLIENT_SIDE","teardown","Object","keys","cache","forEach","key","revert"],"sources":["../../../../../src/shared/utils/jest/E2eSsrEnv.js"],"sourcesContent":["/**\n * Jest environment for end-to-end SSR and client-side testing. It relies on\n * the standard react-utils mechanics to execute SSR of given scene, and also\n * Webpack build of the code for client-side execution, it further exposes\n * Jsdom environment for the client-side testing of the outcomes.\n */\n/* eslint-disable global-require, import/no-dynamic-require */\n\n// BEWARE: The module is not imported into the JU module / the main assembly of\n// the library, because doing so easily breaks stuff:\n// 1) This module depends on Node-specific modules, which would make JU\n// incompatible with JsDom if included into JU.\n// 2) If this module is weakly imported from somewhere else in the lib,\n// it seems to randomly break tests using it for a different reason,\n// probably some sort of a require-loop, or some issues with weak\n// require in that scenario.\n\nimport path from 'path';\nimport ssrFactory from 'server/renderer';\n\nimport { defaults, noop, set } from 'lodash';\n\n// As this environment is a part of the Jest testing utils,\n// we assume development dependencies are available when it is used.\n/* eslint-disable import/no-extraneous-dependencies */\nimport register from '@babel/register';\nimport JsdomEnv from 'jest-environment-jsdom';\nimport { createFsFromVolume, Volume } from 'memfs';\nimport webpack from 'webpack';\n/* eslint-enable import/no-extraneous-dependencies */\n\nexport default class E2eSsrEnv extends JsdomEnv {\n /**\n * Loads Webpack config, and exposes it to the environment via global\n * webpackConfig object.\n */\n loadWebpackConfig() {\n let options = this.pragmas['webpack-config-options'];\n options = options ? JSON.parse(options) : {};\n defaults(options, {\n context: this.testFolder,\n fs: this.global.webpackOutputFs,\n });\n\n let factory = this.pragmas['webpack-config-factory'] || '';\n factory = require(path.resolve(this.rootDir, factory));\n this.global.webpackConfig = factory(options);\n\n const fs = this.global.webpackOutputFs;\n let buildInfo = `${options.context}/.build-info`;\n if (fs.existsSync(buildInfo)) {\n buildInfo = fs.readFileSync(buildInfo, 'utf8');\n this.global.buildInfo = JSON.parse(buildInfo);\n }\n }\n\n /**\n * Executes Webpack build.\n * @return {Promise}\n */\n async runWebpack() {\n this.loadWebpackConfig();\n\n const compiler = webpack(this.global.webpackConfig);\n compiler.outputFileSystem = this.global.webpackOutputFs;\n return new Promise((done, fail) => {\n compiler.run((err, stats) => {\n if (err) fail(err);\n\n this.global.webpackStats = stats.toJson();\n\n // Keeps reference to the raw Webpack stats object, which should be\n // explicitly passed to the server-side renderer alongside the request,\n // so that it can to pick up asset paths for different named chunks.\n this.webpackStats = stats;\n\n done();\n });\n });\n }\n\n async runSsr() {\n let options = this.pragmas['ssr-options'];\n options = options ? JSON.parse(options) : {};\n\n // TODO: This is temporary to shortcut the logging added to SSR.\n if (options.logger === undefined) {\n options.logger = {\n debug: noop,\n info: noop,\n log: noop,\n warn: noop,\n };\n }\n\n let root;\n switch (options.root) {\n case 'TEST': root = this.testFolder; break;\n default: root = process.cwd();\n }\n\n // Note: This enables Babel transformation for the code dynamically loaded\n // below, as the usual Jest Babel setup does not seem to apply to\n // the environment code, and imports from it.\n register({\n envName: options.babelEnv,\n extensions: ['.js', '.jsx', '.svg'],\n root,\n });\n\n if (!options.buildInfo) options.buildInfo = this.global.buildInfo;\n\n if (options.entry) {\n const p = path.resolve(this.testFolder, options.entry);\n options.Application = require(p)[options.entryExportName || 'default'];\n }\n\n const renderer = ssrFactory(this.global.webpackConfig, options);\n let status = 200; // OK\n const markup = await new Promise((done, fail) => {\n renderer(\n this.ssrRequest,\n\n // TODO: This will do for now, with the current implementation of\n // the renderer, but it will require a rework once the renderer is\n // updated to do streaming.\n {\n cookie: noop,\n send: done,\n set: noop,\n status: (value) => {\n status = value;\n },\n\n // This is how up-to-date Webpack stats are passed to the server in\n // development mode, and we use this here always, instead of having\n // to pass some information via filesystem.\n locals: {\n webpack: {\n devMiddleware: {\n stats: this.webpackStats,\n },\n },\n },\n },\n\n (error) => {\n if (error) fail(error);\n else done('');\n },\n );\n });\n\n this.global.ssrMarkup = markup;\n this.global.ssrOptions = options;\n this.global.ssrStatus = status;\n }\n\n constructor(config, context) {\n const pragmas = context.docblockPragmas;\n let request = pragmas['ssr-request'];\n request = request ? JSON.parse(request) : {};\n if (!request.url) request.url = '/';\n request.csrfToken = noop;\n\n // This ensures the initial JsDom URL matches the value we use for SSR.\n set(\n config.projectConfig,\n 'testEnvironmentOptions.url',\n `http://localhost${request.url}`,\n );\n\n super(config, context);\n\n this.global.dom = this.dom;\n this.global.webpackOutputFs = createFsFromVolume(new Volume());\n\n // Extracts necessary settings from config and context.\n const { projectConfig } = config;\n this.rootDir = projectConfig.rootDir;\n this.testFolder = path.dirname(context.testPath);\n this.withSsr = !pragmas['no-ssr'];\n this.ssrRequest = request;\n this.pragmas = pragmas;\n }\n\n async setup() {\n await super.setup();\n await this.runWebpack();\n if (this.withSsr) await this.runSsr();\n this.global.REACT_UTILS_FORCE_CLIENT_SIDE = true;\n }\n\n async teardown() {\n delete this.global.REACT_UTILS_FORCE_CLIENT_SIDE;\n\n // Resets module cache and @babel/register. Effectively this ensures that\n // the next time an instance of this environment is set up, all modules are\n // transformed by Babel from scratch, thus taking into account the latest\n // Babel config (which may change between different environment instances,\n // which does not seem to be taken into account by Babel / Node caches\n // automatically).\n Object.keys(require.cache).forEach((key) => {\n delete require.cache[key];\n });\n register.revert();\n super.teardown();\n }\n}\n"],"mappings":";;;;;;;;;AAiBA;;AACA;;AAEA;;AAKA;;AACA;;AACA;;AACA;;AA5BA;AACA;AACA;AACA;AACA;AACA;;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAOA;AACA;;AACA;;AAKA;AAEe,MAAMA,SAAN,SAAwBC,6BAAxB,CAAiC;EAC9C;AACF;AACA;AACA;EACEC,iBAAiB,GAAG;IAClB,IAAIC,OAAO,GAAG,KAAKC,OAAL,CAAa,wBAAb,CAAd;IACAD,OAAO,GAAGA,OAAO,GAAGE,IAAI,CAACC,KAAL,CAAWH,OAAX,CAAH,GAAyB,EAA1C;IACA,IAAAI,gBAAA,EAASJ,OAAT,EAAkB;MAChBK,OAAO,EAAE,KAAKC,UADE;MAEhBC,EAAE,EAAE,KAAKC,MAAL,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KhE,MAAL,CAAYC,eAAZ,GAA8B,IAAAgE,yBAAA,EAAmB,IAAIC,aAAJ,EAAnB,CAA9B,CAjB2B,CAmB3B;;IACA,MAAM;MAAEH;IAAF,IAAoBL,MAA1B;IACA,KAAKpD,OAAL,GAAeyD,aAAa,CAACzD,OAA7B;IACA,KAAKR,UAAL,GAAkBM,aAAA,CAAK+D,OAAL,CAAatE,OAAO,CAACuE,QAArB,CAAlB;IACA,KAAKC,OAAL,GAAe,CAAC5E,OAAO,CAAC,QAAD,CAAvB;IACA,KAAKqD,UAAL,GAAkBc,OAAlB;IACA,KAAKnE,OAAL,GAAeA,OAAf;EACD;;EAEU,MAAL6E,KAAK,GAAG;IACZ,MAAM,MAAMA,KAAN,EAAN;IACA,MAAM,KAAK3D,UAAL,EAAN;IACA,IAAI,KAAK0D,OAAT,EAAkB,MAAM,KAAK9C,MAAL,EAAN;IAClB,KAAKvB,MAAL,CAAYuE,6BAAZ,GAA4C,IAA5C;EACD;;EAEa,MAARC,QAAQ,GAAG;IACf,OAAO,KAAKxE,MAAL,CAAYuE,6BAAnB,CADe,CAGf;IACA;IACA;IACA;IACA;IACA;;IACAE,MAAM,CAACC,IAAP,CAAYvE,OAAO,CAACwE,KAApB,EAA2BC,OAA3B,CAAoCC,GAAD,IAAS;MAC1C,OAAO1E,OAAO,CAACwE,KAAR,CAAcE,GAAd,CAAP;IACD,CAFD;;IAGA3C,iBAAA,CAAS4C,MAAT;;IACA,MAAMN,QAAN;EACD;;AAhL6C"}
1
+ {"version":3,"file":"E2eSsrEnv.js","names":["E2eSsrEnv","JsdomEnv","loadWebpackConfig","options","pragmas","JSON","parse","defaults","context","testFolder","fs","global","webpackOutputFs","factory","require","path","resolve","rootDir","webpackConfig","buildInfo","existsSync","readFileSync","runWebpack","compiler","webpack","outputFileSystem","Promise","done","fail","run","err","stats","hasErrors","console","error","toJson","errors","Error","webpackStats","runSsr","logger","undefined","debug","noop","info","log","warn","root","process","cwd","register","envName","babelEnv","extensions","entry","p","Application","entryExportName","renderer","ssrFactory","status","markup","ssrRequest","cookie","send","set","value","locals","devMiddleware","ssrMarkup","ssrOptions","ssrStatus","constructor","config","docblockPragmas","request","url","csrfToken","projectConfig","dom","createFsFromVolume","Volume","dirname","testPath","withSsr","setup","REACT_UTILS_FORCE_CLIENT_SIDE","teardown","Object","keys","cache","forEach","key","revert"],"sources":["../../../../../src/shared/utils/jest/E2eSsrEnv.js"],"sourcesContent":["/**\n * Jest environment for end-to-end SSR and client-side testing. It relies on\n * the standard react-utils mechanics to execute SSR of given scene, and also\n * Webpack build of the code for client-side execution, it further exposes\n * Jsdom environment for the client-side testing of the outcomes.\n */\n/* eslint-disable global-require, import/no-dynamic-require */\n\n// BEWARE: The module is not imported into the JU module / the main assembly of\n// the library, because doing so easily breaks stuff:\n// 1) This module depends on Node-specific modules, which would make JU\n// incompatible with JsDom if included into JU.\n// 2) If this module is weakly imported from somewhere else in the lib,\n// it seems to randomly break tests using it for a different reason,\n// probably some sort of a require-loop, or some issues with weak\n// require in that scenario.\n\nimport path from 'path';\nimport ssrFactory from 'server/renderer';\n\nimport { defaults, noop, set } from 'lodash';\n\n// As this environment is a part of the Jest testing utils,\n// we assume development dependencies are available when it is used.\n/* eslint-disable import/no-extraneous-dependencies */\nimport register from '@babel/register';\nimport JsdomEnv from 'jest-environment-jsdom';\nimport { createFsFromVolume, Volume } from 'memfs';\nimport webpack from 'webpack';\n/* eslint-enable import/no-extraneous-dependencies */\n\nexport default class E2eSsrEnv extends JsdomEnv {\n /**\n * Loads Webpack config, and exposes it to the environment via global\n * webpackConfig object.\n */\n loadWebpackConfig() {\n let options = this.pragmas['webpack-config-options'];\n options = options ? JSON.parse(options) : {};\n defaults(options, {\n context: this.testFolder,\n fs: this.global.webpackOutputFs,\n });\n\n let factory = this.pragmas['webpack-config-factory'] || '';\n factory = require(path.resolve(this.rootDir, factory));\n this.global.webpackConfig = factory(options);\n\n const fs = this.global.webpackOutputFs;\n let buildInfo = `${options.context}/.build-info`;\n if (fs.existsSync(buildInfo)) {\n buildInfo = fs.readFileSync(buildInfo, 'utf8');\n this.global.buildInfo = JSON.parse(buildInfo);\n }\n }\n\n /**\n * Executes Webpack build.\n * @return {Promise}\n */\n async runWebpack() {\n this.loadWebpackConfig();\n\n const compiler = webpack(this.global.webpackConfig);\n compiler.outputFileSystem = this.global.webpackOutputFs;\n return new Promise((done, fail) => {\n compiler.run((err, stats) => {\n if (err) fail(err);\n if (stats.hasErrors()) {\n console.error(stats.toJson().errors);\n fail(Error('Webpack compilation failed'));\n }\n\n this.global.webpackStats = stats.toJson();\n\n // Keeps reference to the raw Webpack stats object, which should be\n // explicitly passed to the server-side renderer alongside the request,\n // so that it can to pick up asset paths for different named chunks.\n this.webpackStats = stats;\n\n done();\n });\n });\n }\n\n async runSsr() {\n let options = this.pragmas['ssr-options'];\n options = options ? JSON.parse(options) : {};\n\n // TODO: This is temporary to shortcut the logging added to SSR.\n if (options.logger === undefined) {\n options.logger = {\n debug: noop,\n info: noop,\n log: noop,\n warn: noop,\n };\n }\n\n let root;\n switch (options.root) {\n case 'TEST': root = this.testFolder; break;\n default: root = process.cwd();\n }\n\n // Note: This enables Babel transformation for the code dynamically loaded\n // below, as the usual Jest Babel setup does not seem to apply to\n // the environment code, and imports from it.\n register({\n envName: options.babelEnv,\n extensions: ['.js', '.jsx', '.svg'],\n root,\n });\n\n if (!options.buildInfo) options.buildInfo = this.global.buildInfo;\n\n if (options.entry) {\n const p = path.resolve(this.testFolder, options.entry);\n options.Application = require(p)[options.entryExportName || 'default'];\n }\n\n const renderer = ssrFactory(this.global.webpackConfig, options);\n let status = 200; // OK\n const markup = await new Promise((done, fail) => {\n renderer(\n this.ssrRequest,\n\n // TODO: This will do for now, with the current implementation of\n // the renderer, but it will require a rework once the renderer is\n // updated to do streaming.\n {\n cookie: noop,\n send: done,\n set: noop,\n status: (value) => {\n status = value;\n },\n\n // This is how up-to-date Webpack stats are passed to the server in\n // development mode, and we use this here always, instead of having\n // to pass some information via filesystem.\n locals: {\n webpack: {\n devMiddleware: {\n stats: this.webpackStats,\n },\n },\n },\n },\n\n (error) => {\n if (error) fail(error);\n else done('');\n },\n );\n });\n\n this.global.ssrMarkup = markup;\n this.global.ssrOptions = options;\n this.global.ssrStatus = status;\n }\n\n constructor(config, context) {\n const pragmas = context.docblockPragmas;\n let request = pragmas['ssr-request'];\n request = request ? JSON.parse(request) : {};\n if (!request.url) request.url = '/';\n request.csrfToken = noop;\n\n // This ensures the initial JsDom URL matches the value we use for SSR.\n set(\n config.projectConfig,\n 'testEnvironmentOptions.url',\n `http://localhost${request.url}`,\n );\n\n super(config, context);\n\n this.global.dom = this.dom;\n this.global.webpackOutputFs = createFsFromVolume(new Volume());\n\n // Extracts necessary settings from config and context.\n const { projectConfig } = config;\n this.rootDir = projectConfig.rootDir;\n this.testFolder = path.dirname(context.testPath);\n this.withSsr = !pragmas['no-ssr'];\n this.ssrRequest = request;\n this.pragmas = pragmas;\n }\n\n async setup() {\n await super.setup();\n await this.runWebpack();\n if (this.withSsr) await this.runSsr();\n this.global.REACT_UTILS_FORCE_CLIENT_SIDE = true;\n }\n\n async teardown() {\n delete this.global.REACT_UTILS_FORCE_CLIENT_SIDE;\n\n // Resets module cache and @babel/register. Effectively this ensures that\n // the next time an instance of this environment is set up, all modules are\n // transformed by Babel from scratch, thus taking into account the latest\n // Babel config (which may change between different environment instances,\n // which does not seem to be taken into account by Babel / Node caches\n // automatically).\n Object.keys(require.cache).forEach((key) => {\n delete require.cache[key];\n });\n register.revert();\n super.teardown();\n }\n}\n"],"mappings":";;;;;;;;;AAiBA;;AACA;;AAEA;;AAKA;;AACA;;AACA;;AACA;;AA5BA;AACA;AACA;AACA;AACA;AACA;;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAOA;AACA;;AACA;;AAKA;AAEe,MAAMA,SAAN,SAAwBC,6BAAxB,CAAiC;EAC9C;AACF;AACA;AACA;EACEC,iBAAiB,GAAG;IAClB,IAAIC,OAAO,GA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,GAAd,CAAP;IACD,CAFD;;IAGA1C,iBAAA,CAAS2C,MAAT;;IACA,MAAMN,QAAN;EACD;;AApL6C"}
@@ -369,7 +369,6 @@ body {
369
369
  *.-dr-pogodin-react-utils___src-shared-components-PageLayout-base-theme___container___T3cuHB,
370
370
  .-dr-pogodin-react-utils___src-shared-components-PageLayout-base-theme___context___m4mL-M.-dr-pogodin-react-utils___src-shared-components-PageLayout-base-theme___container___T3cuHB,
371
371
  .-dr-pogodin-react-utils___src-shared-components-PageLayout-base-theme___ad___m3-mdC.-dr-pogodin-react-utils___src-shared-components-PageLayout-base-theme___hoc___J15Z4H.-dr-pogodin-react-utils___src-shared-components-PageLayout-base-theme___container___T3cuHB {
372
- align-items: stretch;
373
372
  display: flex;
374
373
  min-height: 100vh;
375
374
  overflow: hidden;
@@ -385,8 +384,8 @@ body {
385
384
  *.-dr-pogodin-react-utils___src-shared-components-PageLayout-base-theme___sidePanel___lqNh4h,
386
385
  .-dr-pogodin-react-utils___src-shared-components-PageLayout-base-theme___context___m4mL-M.-dr-pogodin-react-utils___src-shared-components-PageLayout-base-theme___sidePanel___lqNh4h,
387
386
  .-dr-pogodin-react-utils___src-shared-components-PageLayout-base-theme___ad___m3-mdC.-dr-pogodin-react-utils___src-shared-components-PageLayout-base-theme___hoc___J15Z4H.-dr-pogodin-react-utils___src-shared-components-PageLayout-base-theme___sidePanel___lqNh4h {
387
+ flex: 1;
388
388
  overflow: hidden;
389
- width: calc((100% - 1024px) / 2);
390
389
  }
391
390
  /*!***************************************************************************************************************************************************************************************************************************************************************************************************************!*\
392
391
  !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[2].use[2]!./node_modules/resolve-url-loader/index.js!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[2].use[4]!./src/shared/components/Modal/base-theme.scss ***!
@@ -548,8 +547,7 @@ body.scrolling-disabled-by-modal {
548
547
  to {
549
548
  opacity: 1;
550
549
  }
551
- }
552
- @keyframes -dr-pogodin-react-utils___src-shared-components-WithTooltip-default-theme___appearance___L4ubm- {
550
+ }@keyframes -dr-pogodin-react-utils___src-shared-components-WithTooltip-default-theme___appearance___L4ubm- {
553
551
  from {
554
552
  opacity: 0;
555
553
  }
@@ -46,7 +46,7 @@ eval("var __dirname = \"/\";\n__webpack_require__.r(__webpack_exports__);\n/* ha
46
46
  \************************************************/
47
47
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
48
48
 
49
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ \"prop-types\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Link__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Link */ \"./src/shared/components/Link.jsx\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils */ \"./src/shared/utils/index.js\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./style.scss */ \"./src/shared/components/Button/style.scss\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__ = __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\n\nfunction BaseButton(_ref) {\n let {\n active,\n children,\n disabled,\n enforceA,\n onClick,\n onMouseDown,\n openNewTab,\n replace,\n theme,\n to\n } = _ref;\n let className = theme.button;\n if (active && theme.active) className += \" \".concat(theme.active);\n\n if (disabled) {\n if (theme.disabled) className += \" \".concat(theme.disabled);\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"div\", {\n className: className,\n children: children\n });\n }\n\n if (to) {\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_Link__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n className: className,\n enforceA: enforceA,\n onClick: onClick,\n onMouseDown: onMouseDown,\n openNewTab: openNewTab,\n replace: replace,\n to: to,\n children: children\n });\n }\n\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"div\", {\n className: className,\n onClick: onClick,\n onKeyPress: onClick,\n onMouseDown: onMouseDown,\n role: \"button\",\n tabIndex: 0,\n children: children\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\n\nconst ThemedButton = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.themed)('Button', ['active', 'button', 'disabled'], _style_scss__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(BaseButton);\n/**\n * Implements themeable buttons, and button-line links (elements which look\n * like buttons, but behave as links) in the same uniform manner.\n * @param {object} [props] Component props.\n * @param {boolean} [props.active] Set `true` to render the button as\n * active, even if it is not active otherwise.\n * @param {boolean} [props.disabled] Set `true` to disable the button.\n * @param {boolean} [props.enforceA] When the button is rendered as `<Link>`\n * component, this prop enforces it to be rendered as a simple `<a>` element\n * (external link), rather than the React router's internal link.\n * See `<Link>` documentation to learn when links are rendered as `<a>`\n * by default.\n * @param {function} [props.onClick] Click event handler.\n * @param {function} [props.onMouseDown] Mouse down event handler.\n * @param {boolean} [props.openNewTab] Set `true` to open link in the new tab.\n * @param {boolean} [props.replace] When the button is rendered as\n * `<Link>`, and the target URL is internal, this property tells that\n * the new route should replace the last record in the browser's history,\n * rather than to be pushed as a new entry into the history stack.\n * @param {ButtonTheme} [props.theme] _Ad hoc_ button theme.\n * @param {object|string} [props.to] If specified, the button will be rendered\n * as `<Link>` (if not disabled), and it will point to the specified location\n * or URL.\n * @param {...any} [props....]\n * [Other properties of themeable components](https://www.npmjs.com/package/@dr.pogodin/react-themes#themed-component-properties)\n */\n\nBaseButton.defaultProps = {\n active: false,\n children: undefined,\n disabled: false,\n enforceA: false,\n onClick: undefined,\n onMouseDown: undefined,\n openNewTab: false,\n replace: false,\n to: undefined\n};\nBaseButton.propTypes = {\n active: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),\n children: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),\n disabled: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),\n enforceA: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),\n onClick: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func),\n onMouseDown: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func),\n openNewTab: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),\n replace: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),\n theme: ThemedButton.themeType.isRequired,\n to: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().object), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)])\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (ThemedButton);\n\n//# sourceURL=webpack://@dr.pogodin/react-utils/./src/shared/components/Button/index.jsx?");
49
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ \"prop-types\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Link__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Link */ \"./src/shared/components/Link.jsx\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils */ \"./src/shared/utils/index.js\");\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./style.scss */ \"./src/shared/components/Button/style.scss\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__ = __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\n\nfunction BaseButton(_ref) {\n let {\n active,\n children,\n disabled,\n enforceA,\n onClick,\n onMouseDown,\n openNewTab,\n replace,\n theme,\n to\n } = _ref;\n let className = theme.button;\n if (active && theme.active) className += ` ${theme.active}`;\n\n if (disabled) {\n if (theme.disabled) className += ` ${theme.disabled}`;\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"div\", {\n className: className,\n children: children\n });\n }\n\n if (to) {\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_Link__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n className: className,\n enforceA: enforceA,\n onClick: onClick,\n onMouseDown: onMouseDown,\n openNewTab: openNewTab,\n replace: replace,\n to: to,\n children: children\n });\n }\n\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(\"div\", {\n className: className,\n onClick: onClick,\n onKeyPress: onClick,\n onMouseDown: onMouseDown,\n role: \"button\",\n tabIndex: 0,\n children: children\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\n\nconst ThemedButton = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.themed)('Button', ['active', 'button', 'disabled'], _style_scss__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(BaseButton);\n/**\n * Implements themeable buttons, and button-line links (elements which look\n * like buttons, but behave as links) in the same uniform manner.\n * @param {object} [props] Component props.\n * @param {boolean} [props.active] Set `true` to render the button as\n * active, even if it is not active otherwise.\n * @param {boolean} [props.disabled] Set `true` to disable the button.\n * @param {boolean} [props.enforceA] When the button is rendered as `<Link>`\n * component, this prop enforces it to be rendered as a simple `<a>` element\n * (external link), rather than the React router's internal link.\n * See `<Link>` documentation to learn when links are rendered as `<a>`\n * by default.\n * @param {function} [props.onClick] Click event handler.\n * @param {function} [props.onMouseDown] Mouse down event handler.\n * @param {boolean} [props.openNewTab] Set `true` to open link in the new tab.\n * @param {boolean} [props.replace] When the button is rendered as\n * `<Link>`, and the target URL is internal, this property tells that\n * the new route should replace the last record in the browser's history,\n * rather than to be pushed as a new entry into the history stack.\n * @param {ButtonTheme} [props.theme] _Ad hoc_ button theme.\n * @param {object|string} [props.to] If specified, the button will be rendered\n * as `<Link>` (if not disabled), and it will point to the specified location\n * or URL.\n * @param {...any} [props....]\n * [Other properties of themeable components](https://www.npmjs.com/package/@dr.pogodin/react-themes#themed-component-properties)\n */\n\nBaseButton.defaultProps = {\n active: false,\n children: undefined,\n disabled: false,\n enforceA: false,\n onClick: undefined,\n onMouseDown: undefined,\n openNewTab: false,\n replace: false,\n to: undefined\n};\nBaseButton.propTypes = {\n active: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),\n children: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),\n disabled: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),\n enforceA: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),\n onClick: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func),\n onMouseDown: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func),\n openNewTab: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),\n replace: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),\n theme: ThemedButton.themeType.isRequired,\n to: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().object), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)])\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (ThemedButton);\n\n//# sourceURL=webpack://@dr.pogodin/react-utils/./src/shared/components/Button/index.jsx?");
50
50
 
51
51
  /***/ }),
52
52
 
@@ -66,7 +66,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var prop
66
66
  \***************************************************/
67
67
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
68
68
 
69
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ CodeSplit; }\n/* harmony export */ });\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ \"prop-types\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @dr.pogodin/react-global-state */ \"@dr.pogodin/react-global-state\");\n/* harmony import */ var _dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _utils_Barrier__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/Barrier */ \"./src/shared/utils/Barrier.js\");\n/* harmony import */ var _utils_isomorphy__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/isomorphy */ \"./src/shared/utils/isomorphy.js\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n/* eslint-disable react/jsx-props-no-spreading */\n\n/* global document, window */\n\n\n\n\n\n\nfunction CodeSplit(_ref) {\n let {\n children,\n chunkName,\n getComponent,\n placeholder,\n ...props\n } = _ref;\n const {\n current: heap\n } = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)({\n mounted: false,\n pendingStyles: []\n });\n const {\n publicPath\n } = (0,_utils_isomorphy__WEBPACK_IMPORTED_MODULE_4__.getBuildInfo)(); // TODO: Not sure whether it is fine for the inner React.lazy() mechanics\n // if we dynamically create the lazy component inside a render of another\n // component, or does it expect we only create it once on outside of any\n // component.\n\n const LazyComponent = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.lazy)(async () => {\n const res = await getComponent();\n if (heap.pendingStyles.length) await Promise.all(heap.pendingStyles);\n return res.default ? res : {\n default: res\n };\n });\n\n if (_utils_isomorphy__WEBPACK_IMPORTED_MODULE_4__.IS_SERVER_SIDE) {\n const {\n chunks\n } = (0,_dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_2__.getGlobalState)().ssrContext;\n\n if (chunks.includes(chunkName)) {\n throw Error(\"Chunk name clash for \\\"\".concat(chunkName, \"\\\"\"));\n } else chunks.push(chunkName);\n } else if (!heap.mounted) {\n heap.mounted = true;\n window.CHUNK_GROUPS[chunkName].forEach(asset => {\n var _window, _window$STYLESHEET_US;\n\n if (!asset.endsWith('.css')) return;\n const path = \"\".concat(publicPath, \"/\").concat(asset);\n let link = document.querySelector(\"link[href=\\\"\".concat(path, \"\\\"]\"));\n\n if (!link) {\n link = document.createElement('link');\n link.setAttribute('href', path);\n link.setAttribute('rel', 'stylesheet');\n const barrier = (0,_utils_Barrier__WEBPACK_IMPORTED_MODULE_3__.newBarrier)();\n link.onload = barrier.resolve; // Even if the style load failed, still allow to mount the component,\n // abeit with broken styling.\n\n link.onerror = barrier.resolve;\n heap.pendingStyles.push(barrier);\n const head = document.querySelector('head');\n head.appendChild(link);\n }\n\n (_window = window).STYLESHEET_USAGE_COUNTERS || (_window.STYLESHEET_USAGE_COUNTERS = {});\n (_window$STYLESHEET_US = window.STYLESHEET_USAGE_COUNTERS)[path] || (_window$STYLESHEET_US[path] = 0);\n ++window.STYLESHEET_USAGE_COUNTERS[path];\n });\n } // This effectively fires only once, just before the component unmounts.\n\n\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => () => {\n heap.mounted = false;\n window.CHUNK_GROUPS[chunkName].forEach(item => {\n if (!item.endsWith('.css')) return;\n const path = \"\".concat(publicPath, \"/\").concat(item);\n\n if (--window.STYLESHEET_USAGE_COUNTERS[path] <= 0) {\n const link = document.querySelector(\"link[href=\\\"\".concat(path, \"\\\"]\"));\n const head = document.querySelector('head');\n head.removeChild(link);\n }\n });\n }, [chunkName, heap, publicPath]);\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Suspense, {\n fallback: placeholder,\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(LazyComponent, { ...props,\n children: children\n })\n });\n}\nCodeSplit.propTypes = {\n children: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),\n chunkName: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string.isRequired),\n getComponent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func.isRequired),\n placeholder: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node)\n};\nCodeSplit.defaultProps = {\n children: undefined,\n placeholder: undefined\n};\n\n//# sourceURL=webpack://@dr.pogodin/react-utils/./src/shared/components/CodeSplit/index.jsx?");
69
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ CodeSplit; }\n/* harmony export */ });\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ \"prop-types\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @dr.pogodin/react-global-state */ \"@dr.pogodin/react-global-state\");\n/* harmony import */ var _dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _utils_Barrier__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/Barrier */ \"./src/shared/utils/Barrier.js\");\n/* harmony import */ var _utils_isomorphy__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/isomorphy */ \"./src/shared/utils/isomorphy.js\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n/* eslint-disable react/jsx-props-no-spreading */\n\n/* global document, window */\n\n\n\n\n\n\nfunction CodeSplit(_ref) {\n let {\n children,\n chunkName,\n getComponent,\n placeholder,\n ...props\n } = _ref;\n const {\n current: heap\n } = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)({\n mounted: false,\n pendingStyles: []\n });\n const {\n publicPath\n } = (0,_utils_isomorphy__WEBPACK_IMPORTED_MODULE_4__.getBuildInfo)(); // TODO: Not sure whether it is fine for the inner React.lazy() mechanics\n // if we dynamically create the lazy component inside a render of another\n // component, or does it expect we only create it once on outside of any\n // component.\n\n const LazyComponent = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.lazy)(async () => {\n const res = await getComponent();\n if (heap.pendingStyles.length) await Promise.all(heap.pendingStyles);\n return res.default ? res : {\n default: res\n };\n });\n\n if (_utils_isomorphy__WEBPACK_IMPORTED_MODULE_4__.IS_SERVER_SIDE) {\n const {\n chunks\n } = (0,_dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_2__.getGlobalState)().ssrContext;\n\n if (chunks.includes(chunkName)) {\n throw Error(`Chunk name clash for \"${chunkName}\"`);\n } else chunks.push(chunkName);\n } else if (!heap.mounted) {\n heap.mounted = true;\n window.CHUNK_GROUPS[chunkName].forEach(asset => {\n if (!asset.endsWith('.css')) return;\n const path = `${publicPath}/${asset}`;\n let link = document.querySelector(`link[href=\"${path}\"]`);\n\n if (!link) {\n link = document.createElement('link');\n link.setAttribute('href', path);\n link.setAttribute('rel', 'stylesheet');\n const barrier = (0,_utils_Barrier__WEBPACK_IMPORTED_MODULE_3__.newBarrier)();\n link.onload = barrier.resolve; // Even if the style load failed, still allow to mount the component,\n // abeit with broken styling.\n\n link.onerror = barrier.resolve;\n heap.pendingStyles.push(barrier);\n const head = document.querySelector('head');\n head.appendChild(link);\n }\n\n window.STYLESHEET_USAGE_COUNTERS ||= {};\n window.STYLESHEET_USAGE_COUNTERS[path] ||= 0;\n ++window.STYLESHEET_USAGE_COUNTERS[path];\n });\n } // This effectively fires only once, just before the component unmounts.\n\n\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => () => {\n heap.mounted = false;\n window.CHUNK_GROUPS[chunkName].forEach(item => {\n if (!item.endsWith('.css')) return;\n const path = `${publicPath}/${item}`;\n\n if (--window.STYLESHEET_USAGE_COUNTERS[path] <= 0) {\n const link = document.querySelector(`link[href=\"${path}\"]`);\n const head = document.querySelector('head');\n head.removeChild(link);\n }\n });\n }, [chunkName, heap, publicPath]);\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Suspense, {\n fallback: placeholder,\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(LazyComponent, { ...props,\n children: children\n })\n });\n}\nCodeSplit.propTypes = {\n children: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),\n chunkName: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string.isRequired),\n getComponent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func.isRequired),\n placeholder: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node)\n};\nCodeSplit.defaultProps = {\n children: undefined,\n placeholder: undefined\n};\n\n//# sourceURL=webpack://@dr.pogodin/react-utils/./src/shared/components/CodeSplit/index.jsx?");
70
70
 
71
71
  /***/ }),
72
72
 
@@ -116,7 +116,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
116
116
  \********************************************/
117
117
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
118
118
 
119
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ MetaTags; }\n/* harmony export */ });\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ \"prop-types\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var react_helmet__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-helmet */ \"react-helmet\");\n/* harmony import */ var react_helmet__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_helmet__WEBPACK_IMPORTED_MODULE_2__);\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\nconst Context = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.createContext)();\n/**\n * The `<MetaTags>` component is an auxiliary wrapper around `react-helmet`,\n * which helps to inject meta tags (page title, a brief content description,\n * and social media thumbnails) into generated pages.\n *\n * When `<MetaTags>` are nested within the app's component tree, meta tags\n * content injected by components encountered down the tree overrides tags\n * injected by previously encountered `<MetaTags>` components.\n *\n * **Children:** `<MetaTags>` children, if any, are rendered at the component's\n * location. The context passes down all meta tag properties of parent\n * `<MetaTag>` instances. These properties can fetched within children\n * hierarchy in the following way, thus facilitating tags modification by\n * children:\n * ```jsx\n * import { useContext } from 'react';\n * import { MetaTags } from '@dr.pogodin/react-utils';\n * export default function SampleComponent() {\n * const { title, description, ...rest } = useContext(MetaTags.Context);\n * // Do something with these props here, e.g. prefix the page title with\n * // the component name:\n * return (\n * <MetaTags title={`Sample component - ${title}`} />\n * );\n * }\n * ```\n * @param {object} [props]\n * @param {string} [props.description] Page description to use in\n * the `description` meta tag, and as a default description of Open Graph Tags.\n * @param {string} [props.image] The absolute URL of thumbnail image to use\n * in Open Graph Tags (`twitter:image`, and `og:image`). By default these tags\n * are not injected.\n *\n * **BEWARE:** It must be a complete, absolute URL, including the correct\n * website domain and HTTP schema.\n *\n * @param {string} [props.siteName]: The site name to use in `twitter:site`,\n * and `og:sitename` tags. By default these tags are not injected.\n *\n * @param {string} [props.socialDescription] The site description to use in\n * `twitter:description` and `og:description` meta tags. By default the value of\n * `description` prop is used.\n * @param {string} [props.socialTitle] The page title to use in\n * `twitter:title`, `og:title`, and `og:image:alt` tags. By default the value of\n * `title` prop is used. Also the `og:image:alt` tag is only injected if `image`\n * prop is present.\n *\n * @param {string} props.title: The page name to use in the `<title>` tag.\n * It is also used as the default value of `socialTitle` prop.\n *\n * @param {string} [props.url] The page URL to use in `og:url` tag.\n * By default the tag is not injected.\n */\n\nfunction MetaTags(_ref) {\n let {\n children,\n description,\n image,\n siteName,\n socialDescription,\n socialTitle,\n title,\n url\n } = _ref;\n const socTitle = socialTitle || title;\n const socDesc = socialDescription || description;\n const context = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(() => ({\n description,\n image,\n siteName,\n socialDescription,\n socialTitle,\n title,\n url\n }), [description, image, siteName, socialDescription, socialTitle, title, url]);\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.Fragment, {\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)(react_helmet__WEBPACK_IMPORTED_MODULE_2__.Helmet, {\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"title\", {\n children: title\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"meta\", {\n name: \"description\",\n content: description\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"meta\", {\n name: \"twitter:card\",\n content: \"summary_large_image\"\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"meta\", {\n name: \"twitter:title\",\n content: socTitle\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"meta\", {\n name: \"twitter:description\",\n content: socDesc\n }), image ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"meta\", {\n name: \"twitter:image\",\n content: image\n }) : null, siteName ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"meta\", {\n name: \"twitter:site\",\n content: \"@\".concat(siteName)\n }) : null, /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"meta\", {\n name: \"og:title\",\n content: socTitle\n }), image ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"meta\", {\n name: \"og:image\",\n content: image\n }) : null, image ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"meta\", {\n name: \"og:image:alt\",\n content: socTitle\n }) : null, /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"meta\", {\n name: \"og:description\",\n content: socDesc\n }), siteName ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"meta\", {\n name: \"og:sitename\",\n content: siteName\n }) : null, url ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"meta\", {\n name: \"og:url\",\n content: url\n }) : null]\n }), children ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(Context.Provider, {\n value: context,\n children: children\n }) : null]\n });\n}\nMetaTags.Context = Context;\nMetaTags.defaultProps = {\n children: null,\n image: null,\n siteName: null,\n socialDescription: null,\n socialTitle: null,\n url: null\n};\nMetaTags.propTypes = {\n children: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),\n description: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string.isRequired),\n image: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),\n siteName: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),\n socialDescription: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),\n socialTitle: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),\n title: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string.isRequired),\n url: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)\n};\n\n//# sourceURL=webpack://@dr.pogodin/react-utils/./src/shared/components/MetaTags.jsx?");
119
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ MetaTags; }\n/* harmony export */ });\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ \"prop-types\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var react_helmet__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-helmet */ \"react-helmet\");\n/* harmony import */ var react_helmet__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_helmet__WEBPACK_IMPORTED_MODULE_2__);\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\nconst Context = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.createContext)();\n/**\n * The `<MetaTags>` component is an auxiliary wrapper around `react-helmet`,\n * which helps to inject meta tags (page title, a brief content description,\n * and social media thumbnails) into generated pages.\n *\n * When `<MetaTags>` are nested within the app's component tree, meta tags\n * content injected by components encountered down the tree overrides tags\n * injected by previously encountered `<MetaTags>` components.\n *\n * **Children:** `<MetaTags>` children, if any, are rendered at the component's\n * location. The context passes down all meta tag properties of parent\n * `<MetaTag>` instances. These properties can fetched within children\n * hierarchy in the following way, thus facilitating tags modification by\n * children:\n * ```jsx\n * import { useContext } from 'react';\n * import { MetaTags } from '@dr.pogodin/react-utils';\n * export default function SampleComponent() {\n * const { title, description, ...rest } = useContext(MetaTags.Context);\n * // Do something with these props here, e.g. prefix the page title with\n * // the component name:\n * return (\n * <MetaTags title={`Sample component - ${title}`} />\n * );\n * }\n * ```\n * @param {object} [props]\n * @param {string} [props.description] Page description to use in\n * the `description` meta tag, and as a default description of Open Graph Tags.\n * @param {string} [props.image] The absolute URL of thumbnail image to use\n * in Open Graph Tags (`twitter:image`, and `og:image`). By default these tags\n * are not injected.\n *\n * **BEWARE:** It must be a complete, absolute URL, including the correct\n * website domain and HTTP schema.\n *\n * @param {string} [props.siteName]: The site name to use in `twitter:site`,\n * and `og:sitename` tags. By default these tags are not injected.\n *\n * @param {string} [props.socialDescription] The site description to use in\n * `twitter:description` and `og:description` meta tags. By default the value of\n * `description` prop is used.\n * @param {string} [props.socialTitle] The page title to use in\n * `twitter:title`, `og:title`, and `og:image:alt` tags. By default the value of\n * `title` prop is used. Also the `og:image:alt` tag is only injected if `image`\n * prop is present.\n *\n * @param {string} props.title: The page name to use in the `<title>` tag.\n * It is also used as the default value of `socialTitle` prop.\n *\n * @param {string} [props.url] The page URL to use in `og:url` tag.\n * By default the tag is not injected.\n */\n\nfunction MetaTags(_ref) {\n let {\n children,\n description,\n image,\n siteName,\n socialDescription,\n socialTitle,\n title,\n url\n } = _ref;\n const socTitle = socialTitle || title;\n const socDesc = socialDescription || description;\n const context = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(() => ({\n description,\n image,\n siteName,\n socialDescription,\n socialTitle,\n title,\n url\n }), [description, image, siteName, socialDescription, socialTitle, title, url]);\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.Fragment, {\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)(react_helmet__WEBPACK_IMPORTED_MODULE_2__.Helmet, {\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"title\", {\n children: title\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"meta\", {\n name: \"description\",\n content: description\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"meta\", {\n name: \"twitter:card\",\n content: \"summary_large_image\"\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"meta\", {\n name: \"twitter:title\",\n content: socTitle\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"meta\", {\n name: \"twitter:description\",\n content: socDesc\n }), image ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"meta\", {\n name: \"twitter:image\",\n content: image\n }) : null, siteName ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"meta\", {\n name: \"twitter:site\",\n content: `@${siteName}`\n }) : null, /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"meta\", {\n name: \"og:title\",\n content: socTitle\n }), image ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"meta\", {\n name: \"og:image\",\n content: image\n }) : null, image ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"meta\", {\n name: \"og:image:alt\",\n content: socTitle\n }) : null, /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"meta\", {\n name: \"og:description\",\n content: socDesc\n }), siteName ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"meta\", {\n name: \"og:sitename\",\n content: siteName\n }) : null, url ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"meta\", {\n name: \"og:url\",\n content: url\n }) : null]\n }), children ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(Context.Provider, {\n value: context,\n children: children\n }) : null]\n });\n}\nMetaTags.Context = Context;\nMetaTags.defaultProps = {\n children: null,\n image: null,\n siteName: null,\n socialDescription: null,\n socialTitle: null,\n url: null\n};\nMetaTags.propTypes = {\n children: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),\n description: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string.isRequired),\n image: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),\n siteName: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),\n socialDescription: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),\n socialTitle: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),\n title: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string.isRequired),\n url: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)\n};\n\n//# sourceURL=webpack://@dr.pogodin/react-utils/./src/shared/components/MetaTags.jsx?");
120
120
 
121
121
  /***/ }),
122
122
 
@@ -156,7 +156,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var prop
156
156
  \******************************************************/
157
157
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
158
158
 
159
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ ScalableRect; }\n/* harmony export */ });\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ \"prop-types\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./style.scss */ \"./src/shared/components/ScalableRect/style.scss\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n\n\n/**\n * The `<ScalableRect>` component implements container keeping given aspect\n * ratio, while its width is altered.\n *\n * **Children:** Component children are rendered as the component's content.\n * @param {object} props\n * @param {string} [props.className] CSS class for component container.\n * @param {string} [props.ratio=1:1] Ratio of the rendered rectangle sides,\n * in `W:H` form.\n */\n\n\nfunction ScalableRect(_ref) {\n let {\n children,\n className,\n ratio\n } = _ref;\n const aux = ratio.split(':');\n const paddingBottom = \"\".concat(100 * aux[1] / aux[0], \"%\");\n /* NOTE: In case the following code looks strange to you, mind that we want to\n * allow the user to set custom styles on this component. If user passes in a\n * \"className\" prop (possibly \"styleName\", but that one is converted to\n * \"className\" by Babel just before being passed into this component), it\n * should not interfere with the sizing behavior, thus we need an extra <div>\n * level in this component; however, if user does not need a custom styling,\n * we can save one level of HTML code, so we do it. */\n\n const rect = /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(\"div\", {\n style: {\n paddingBottom\n },\n className: \"-dr-pogodin-react-utils___src-shared-components-ScalableRect-style___container___EznFz3\",\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(\"div\", {\n className: \"-dr-pogodin-react-utils___src-shared-components-ScalableRect-style___wrapper___0vb7tq\",\n children: children\n })\n });\n\n return className ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(\"div\", {\n className: className,\n children: rect\n }) : rect;\n}\nScalableRect.defaultProps = {\n children: null,\n className: null,\n ratio: '1:1'\n};\nScalableRect.propTypes = {\n children: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),\n className: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),\n ratio: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)\n};\n\n//# sourceURL=webpack://@dr.pogodin/react-utils/./src/shared/components/ScalableRect/index.jsx?");
159
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ ScalableRect; }\n/* harmony export */ });\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ \"prop-types\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./style.scss */ \"./src/shared/components/ScalableRect/style.scss\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n\n\n/**\n * The `<ScalableRect>` component implements container keeping given aspect\n * ratio, while its width is altered.\n *\n * **Children:** Component children are rendered as the component's content.\n * @param {object} props\n * @param {string} [props.className] CSS class for component container.\n * @param {string} [props.ratio=1:1] Ratio of the rendered rectangle sides,\n * in `W:H` form.\n */\n\n\nfunction ScalableRect(_ref) {\n let {\n children,\n className,\n ratio\n } = _ref;\n const aux = ratio.split(':');\n const paddingBottom = `${100 * aux[1] / aux[0]}%`;\n /* NOTE: In case the following code looks strange to you, mind that we want to\n * allow the user to set custom styles on this component. If user passes in a\n * \"className\" prop (possibly \"styleName\", but that one is converted to\n * \"className\" by Babel just before being passed into this component), it\n * should not interfere with the sizing behavior, thus we need an extra <div>\n * level in this component; however, if user does not need a custom styling,\n * we can save one level of HTML code, so we do it. */\n\n const rect = /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(\"div\", {\n style: {\n paddingBottom\n },\n className: \"-dr-pogodin-react-utils___src-shared-components-ScalableRect-style___container___EznFz3\",\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(\"div\", {\n className: \"-dr-pogodin-react-utils___src-shared-components-ScalableRect-style___wrapper___0vb7tq\",\n children: children\n })\n });\n\n return className ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(\"div\", {\n className: className,\n children: rect\n }) : rect;\n}\nScalableRect.defaultProps = {\n children: null,\n className: null,\n ratio: '1:1'\n};\nScalableRect.propTypes = {\n children: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),\n className: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),\n ratio: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)\n};\n\n//# sourceURL=webpack://@dr.pogodin/react-utils/./src/shared/components/ScalableRect/index.jsx?");
160
160
 
161
161
  /***/ }),
162
162
 
@@ -166,7 +166,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
166
166
  \**************************************************/
167
167
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
168
168
 
169
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ \"prop-types\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__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/Throbber/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 * Throbber is an \"action in progress\" indicator, which renders\n * three bouncing circles as a simple pending activity indicator,\n * and can be further themed to a certain degree.\n * @param {object} [props] Component properties.\n * @param {ThrobberTheme} [props.theme] _Ad hoc_ theme.\n * @param {...any} [props....]\n * [Other theming properties](https://www.npmjs.com/package/@dr.pogodin/react-themes#themed-component-properties)\n */\n\n\n\n\nfunction Throbber(_ref) {\n let {\n theme\n } = _ref;\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)(\"div\", {\n className: (theme.container ? theme.container + \" \" : \"\") + \"-dr-pogodin-react-utils___src-shared-components-Throbber-theme___container___7zdld4\",\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"div\", {\n className: (theme.circle ? theme.circle + \" \" : \"\") + \"-dr-pogodin-react-utils___src-shared-components-Throbber-theme___circle___dBrB4g\"\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"div\", {\n className: (theme.circle ? theme.circle + \" \" : \"\") + \"-dr-pogodin-react-utils___src-shared-components-Throbber-theme___circle___dBrB4g\"\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"div\", {\n className: (theme.circle ? theme.circle + \" \" : \"\") + \"-dr-pogodin-react-utils___src-shared-components-Throbber-theme___circle___dBrB4g\"\n })]\n });\n}\n\nThrobber.defaultProps = {\n theme: {}\n};\nThrobber.propTypes = {\n theme: prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({\n container: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),\n circle: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)\n })\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (_dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_1___default()('Throbber', ['circle', 'container'], _theme_scss__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(Throbber));\n\n//# sourceURL=webpack://@dr.pogodin/react-utils/./src/shared/components/Throbber/index.jsx?");
169
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ \"prop-types\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__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/Throbber/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 * Throbber is an \"action in progress\" indicator, which renders\n * three bouncing circles as a simple pending activity indicator,\n * and can be further themed to a certain degree.\n * @param {object} [props] Component properties.\n * @param {ThrobberTheme} [props.theme] _Ad hoc_ theme.\n * @param {...any} [props....]\n * [Other theming properties](https://www.npmjs.com/package/@dr.pogodin/react-themes#themed-component-properties)\n */\n\n\n\n\nfunction Throbber(_ref) {\n let {\n theme\n } = _ref;\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)(\"span\", {\n className: (theme.container ? theme.container + \" \" : \"\") + \"-dr-pogodin-react-utils___src-shared-components-Throbber-theme___container___7zdld4\",\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"span\", {\n className: (theme.circle ? theme.circle + \" \" : \"\") + \"-dr-pogodin-react-utils___src-shared-components-Throbber-theme___circle___dBrB4g\"\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"span\", {\n className: (theme.circle ? theme.circle + \" \" : \"\") + \"-dr-pogodin-react-utils___src-shared-components-Throbber-theme___circle___dBrB4g\"\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(\"span\", {\n className: (theme.circle ? theme.circle + \" \" : \"\") + \"-dr-pogodin-react-utils___src-shared-components-Throbber-theme___circle___dBrB4g\"\n })]\n });\n}\n\nThrobber.defaultProps = {\n theme: {}\n};\nThrobber.propTypes = {\n theme: prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({\n container: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),\n circle: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)\n })\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (_dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_1___default()('Throbber', ['circle', 'container'], _theme_scss__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(Throbber));\n\n//# sourceURL=webpack://@dr.pogodin/react-utils/./src/shared/components/Throbber/index.jsx?");
170
170
 
171
171
  /***/ }),
172
172
 
@@ -176,7 +176,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var prop
176
176
  \*******************************************************/
177
177
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
178
178
 
179
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"PLACEMENTS\": function() { return /* binding */ PLACEMENTS; }\n/* harmony export */ });\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 react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ \"react-dom\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ \"prop-types\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);\n/**\n * The actual tooltip component. It is rendered outside the regular document\n * hierarchy, and with sub-components managed without React to achieve the best\n * performance during animation.\n */\n\n/* global document, window */\n\n\n\n/* Valid placements of the rendered tooltip. They will be overriden when\n * necessary to fit the tooltip within the viewport. */\n\nconst PLACEMENTS = {\n ABOVE_CURSOR: 'ABOVE_CURSOR',\n ABOVE_ELEMENT: 'ABOVE_ELEMENT',\n BELOW_CURSOR: 'BELOW_CURSOR',\n BELOW_ELEMENT: 'BELOW_ELEMENT'\n};\nconst ARROW_STYLE_DOWN = ['border-bottom-color:transparent', 'border-left-color:transparent', 'border-right-color:transparent'].join(';');\nconst ARROW_STYLE_UP = ['border-top-color:transparent', 'border-left-color:transparent', 'border-right-color:transparent'].join(';');\n/**\n * Creates tooltip components.\n * @ignore\n * @param {object} theme Themes to use for tooltip container, arrow,\n * and content.\n * @return {object} Object with DOM references to the container components:\n * container, arrow, content.\n */\n\nfunction createTooltipComponents(theme) {\n const arrow = document.createElement('div');\n if (theme.arrow) arrow.setAttribute('class', theme.arrow);\n const content = document.createElement('div');\n if (theme.content) content.setAttribute('class', theme.content);\n const container = document.createElement('div');\n if (theme.container) container.setAttribute('class', theme.container);\n container.appendChild(arrow);\n container.appendChild(content);\n document.body.appendChild(container);\n return {\n container,\n arrow,\n content\n };\n}\n/**\n * Generates bounding client rectangles for tooltip components.\n * @ignore\n * @param {object} tooltip DOM references to the tooltip components.\n * @param {object} tooltip.arrow\n * @param {object} tooltip.container\n * @return {{ arrow: object, container}} Object holding tooltip rectangles in\n * two fields.\n */\n\n\nfunction calcTooltipRects(tooltip) {\n return {\n arrow: tooltip.arrow.getBoundingClientRect(),\n container: tooltip.container.getBoundingClientRect()\n };\n}\n/**\n * Calculates the document viewport size.\n * @ignore\n * @return {{x, y, width, height}}\n */\n\n\nfunction calcViewportRect() {\n const {\n pageXOffset,\n pageYOffset\n } = window;\n const {\n documentElement: {\n clientHeight,\n clientWidth\n }\n } = document;\n return {\n left: pageXOffset,\n right: pageXOffset + clientWidth,\n top: pageYOffset,\n bottom: pageYOffset + clientHeight\n };\n}\n/**\n * Calculates tooltip and arrow positions for the placement just above\n * the cursor.\n * @ignore\n * @param {number} x Cursor page-x position.\n * @param {number} y Cursor page-y position.\n * @param {object} tooltipRects Bounding client rectangles of tooltip parts.\n * @param {object} tooltipRects.arrow\n * @param {object} tooltipRects.container\n * @return {object} Contains the following fields:\n * - {number} arrowX\n * - {number} arrowY\n * - {number} containerX\n * - {number} containerY\n * - {string} baseArrowStyle\n */\n\n\nfunction calcPositionAboveXY(x, y, tooltipRects) {\n const {\n arrow,\n container\n } = tooltipRects;\n return {\n arrowX: 0.5 * (container.width - arrow.width),\n arrowY: container.height,\n containerX: x - container.width / 2,\n containerY: y - container.height - arrow.height / 1.5,\n // TODO: Instead of already setting the base style here, we should\n // introduce a set of constants for arrow directions, which will help\n // to do checks dependant on the arrow direction.\n baseArrowStyle: ARROW_STYLE_DOWN\n };\n}\n/*\nconst HIT = {\n NONE: false,\n LEFT: 'LEFT',\n RIGHT: 'RIGHT',\n TOP: 'TOP',\n BOTTOM: 'BOTTOM',\n};\n*/\n\n/**\n * Checks whether\n * @param {object} pos\n * @param {object} tooltipRects\n * @param {object} viewportRect\n * @return {HIT}\n */\n\n/*\nfunction checkViewportFit(pos, tooltipRects, viewportRect) {\n const { containerX, containerY } = pos;\n if (containerX < viewportRect.left + 6) return HIT.LEFT;\n if (containerX > viewportRect.right - 6) return HIT.RIGHT;\n return HIT.NONE;\n}\n*/\n\n/**\n * Shifts tooltip horizontally to fit into the viewport, while keeping\n * the arrow pointed to the XY point.\n * @param {number} x\n * @param {number} y\n * @param {object} pos\n * @param {number} pageXOffset\n * @param {number} pageXWidth\n */\n\n/*\nfunction xPageFitCorrection(x, y, pos, pageXOffset, pageXWidth) {\n if (pos.containerX < pageXOffset + 6) {\n pos.containerX = pageXOffset + 6;\n pos.arrowX = Math.max(6, pageX - containerX - arrowRect.width / 2);\n } else {\n const maxX = pageXOffset + docRect.width - containerRect.width - 6;\n if (containerX > maxX) {\n containerX = maxX;\n arrowX = Math.min(\n containerRect.width - 6,\n pageX - containerX - arrowRect.width / 2,\n );\n }\n }\n}\n*/\n\n/**\n * Sets positions of tooltip components to point the tooltip to the specified\n * page point.\n * @ignore\n * @param {number} pageX\n * @param {number} pageY\n * @param {PLACEMENTS} placement\n * @param {object} element DOM reference to the element wrapped by the tooltip.\n * @param {object} tooltip\n * @param {object} tooltip.arrow DOM reference to the tooltip arrow.\n * @param {object} tooltip.container DOM reference to the tooltip container.\n */\n\n\nfunction setComponentPositions(pageX, pageY, placement, element, tooltip) {\n const tooltipRects = calcTooltipRects(tooltip);\n const viewportRect = calcViewportRect();\n /* Default container coords: tooltip at the top. */\n\n const pos = calcPositionAboveXY(pageX, pageY, tooltipRects);\n\n if (pos.containerX < viewportRect.left + 6) {\n pos.containerX = viewportRect.left + 6;\n pos.arrowX = Math.max(6, pageX - pos.containerX - tooltipRects.arrow.width / 2);\n } else {\n const maxX = viewportRect.right - 6 - tooltipRects.container.width;\n\n if (pos.containerX > maxX) {\n pos.containerX = maxX;\n pos.arrowX = Math.min(tooltipRects.container.width - 6, pageX - pos.containerX - tooltipRects.arrow.width / 2);\n }\n }\n /* If tooltip has not enough space on top - make it bottom tooltip. */\n\n\n if (pos.containerY < viewportRect.top + 6) {\n pos.containerY += tooltipRects.container.height + 2 * tooltipRects.arrow.height;\n pos.arrowY -= tooltipRects.container.height + tooltipRects.arrow.height;\n pos.baseArrowStyle = ARROW_STYLE_UP;\n }\n\n const containerStyle = \"left:\".concat(pos.containerX, \"px;top:\").concat(pos.containerY, \"px\");\n tooltip.container.setAttribute('style', containerStyle);\n const arrowStyle = \"\".concat(pos.baseArrowStyle, \";left:\").concat(pos.arrowX, \"px;top:\").concat(pos.arrowY, \"px\");\n tooltip.arrow.setAttribute('style', arrowStyle);\n}\n/* The Tooltip component itself. */\n\n\nconst Tooltip = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)((_ref, ref) => {\n let {\n children,\n theme\n } = _ref;\n const [components, setComponents] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null);\n\n const pointTo = (pageX, pageY, placement, element) => components && setComponentPositions(pageX, pageY, placement, element, components);\n\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useImperativeHandle)(ref, () => ({\n pointTo\n }));\n /* Inits and destroys tooltip components. */\n\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {\n const x = createTooltipComponents(theme);\n setComponents(x);\n return () => {\n document.body.removeChild(x.container);\n setComponents(null);\n };\n }, [theme]);\n return components ? /*#__PURE__*/(0,react_dom__WEBPACK_IMPORTED_MODULE_1__.createPortal)(children, components.content) : null;\n});\nTooltip.propTypes = {\n children: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().node),\n theme: prop_types__WEBPACK_IMPORTED_MODULE_2___default().shape().isRequired\n};\nTooltip.defaultProps = {\n children: null\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (Tooltip);\n\n//# sourceURL=webpack://@dr.pogodin/react-utils/./src/shared/components/WithTooltip/Tooltip.jsx?");
179
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"PLACEMENTS\": function() { return /* binding */ PLACEMENTS; }\n/* harmony export */ });\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 react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ \"react-dom\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ \"prop-types\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);\n/**\n * The actual tooltip component. It is rendered outside the regular document\n * hierarchy, and with sub-components managed without React to achieve the best\n * performance during animation.\n */\n\n/* global document, window */\n\n\n\n/* Valid placements of the rendered tooltip. They will be overriden when\n * necessary to fit the tooltip within the viewport. */\n\nconst PLACEMENTS = {\n ABOVE_CURSOR: 'ABOVE_CURSOR',\n ABOVE_ELEMENT: 'ABOVE_ELEMENT',\n BELOW_CURSOR: 'BELOW_CURSOR',\n BELOW_ELEMENT: 'BELOW_ELEMENT'\n};\nconst ARROW_STYLE_DOWN = ['border-bottom-color:transparent', 'border-left-color:transparent', 'border-right-color:transparent'].join(';');\nconst ARROW_STYLE_UP = ['border-top-color:transparent', 'border-left-color:transparent', 'border-right-color:transparent'].join(';');\n/**\n * Creates tooltip components.\n * @ignore\n * @param {object} theme Themes to use for tooltip container, arrow,\n * and content.\n * @return {object} Object with DOM references to the container components:\n * container, arrow, content.\n */\n\nfunction createTooltipComponents(theme) {\n const arrow = document.createElement('div');\n if (theme.arrow) arrow.setAttribute('class', theme.arrow);\n const content = document.createElement('div');\n if (theme.content) content.setAttribute('class', theme.content);\n const container = document.createElement('div');\n if (theme.container) container.setAttribute('class', theme.container);\n container.appendChild(arrow);\n container.appendChild(content);\n document.body.appendChild(container);\n return {\n container,\n arrow,\n content\n };\n}\n/**\n * Generates bounding client rectangles for tooltip components.\n * @ignore\n * @param {object} tooltip DOM references to the tooltip components.\n * @param {object} tooltip.arrow\n * @param {object} tooltip.container\n * @return {{ arrow: object, container}} Object holding tooltip rectangles in\n * two fields.\n */\n\n\nfunction calcTooltipRects(tooltip) {\n return {\n arrow: tooltip.arrow.getBoundingClientRect(),\n container: tooltip.container.getBoundingClientRect()\n };\n}\n/**\n * Calculates the document viewport size.\n * @ignore\n * @return {{x, y, width, height}}\n */\n\n\nfunction calcViewportRect() {\n const {\n pageXOffset,\n pageYOffset\n } = window;\n const {\n documentElement: {\n clientHeight,\n clientWidth\n }\n } = document;\n return {\n left: pageXOffset,\n right: pageXOffset + clientWidth,\n top: pageYOffset,\n bottom: pageYOffset + clientHeight\n };\n}\n/**\n * Calculates tooltip and arrow positions for the placement just above\n * the cursor.\n * @ignore\n * @param {number} x Cursor page-x position.\n * @param {number} y Cursor page-y position.\n * @param {object} tooltipRects Bounding client rectangles of tooltip parts.\n * @param {object} tooltipRects.arrow\n * @param {object} tooltipRects.container\n * @return {object} Contains the following fields:\n * - {number} arrowX\n * - {number} arrowY\n * - {number} containerX\n * - {number} containerY\n * - {string} baseArrowStyle\n */\n\n\nfunction calcPositionAboveXY(x, y, tooltipRects) {\n const {\n arrow,\n container\n } = tooltipRects;\n return {\n arrowX: 0.5 * (container.width - arrow.width),\n arrowY: container.height,\n containerX: x - container.width / 2,\n containerY: y - container.height - arrow.height / 1.5,\n // TODO: Instead of already setting the base style here, we should\n // introduce a set of constants for arrow directions, which will help\n // to do checks dependant on the arrow direction.\n baseArrowStyle: ARROW_STYLE_DOWN\n };\n}\n/*\nconst HIT = {\n NONE: false,\n LEFT: 'LEFT',\n RIGHT: 'RIGHT',\n TOP: 'TOP',\n BOTTOM: 'BOTTOM',\n};\n*/\n\n/**\n * Checks whether\n * @param {object} pos\n * @param {object} tooltipRects\n * @param {object} viewportRect\n * @return {HIT}\n */\n\n/*\nfunction checkViewportFit(pos, tooltipRects, viewportRect) {\n const { containerX, containerY } = pos;\n if (containerX < viewportRect.left + 6) return HIT.LEFT;\n if (containerX > viewportRect.right - 6) return HIT.RIGHT;\n return HIT.NONE;\n}\n*/\n\n/**\n * Shifts tooltip horizontally to fit into the viewport, while keeping\n * the arrow pointed to the XY point.\n * @param {number} x\n * @param {number} y\n * @param {object} pos\n * @param {number} pageXOffset\n * @param {number} pageXWidth\n */\n\n/*\nfunction xPageFitCorrection(x, y, pos, pageXOffset, pageXWidth) {\n if (pos.containerX < pageXOffset + 6) {\n pos.containerX = pageXOffset + 6;\n pos.arrowX = Math.max(6, pageX - containerX - arrowRect.width / 2);\n } else {\n const maxX = pageXOffset + docRect.width - containerRect.width - 6;\n if (containerX > maxX) {\n containerX = maxX;\n arrowX = Math.min(\n containerRect.width - 6,\n pageX - containerX - arrowRect.width / 2,\n );\n }\n }\n}\n*/\n\n/**\n * Sets positions of tooltip components to point the tooltip to the specified\n * page point.\n * @ignore\n * @param {number} pageX\n * @param {number} pageY\n * @param {PLACEMENTS} placement\n * @param {object} element DOM reference to the element wrapped by the tooltip.\n * @param {object} tooltip\n * @param {object} tooltip.arrow DOM reference to the tooltip arrow.\n * @param {object} tooltip.container DOM reference to the tooltip container.\n */\n\n\nfunction setComponentPositions(pageX, pageY, placement, element, tooltip) {\n const tooltipRects = calcTooltipRects(tooltip);\n const viewportRect = calcViewportRect();\n /* Default container coords: tooltip at the top. */\n\n const pos = calcPositionAboveXY(pageX, pageY, tooltipRects);\n\n if (pos.containerX < viewportRect.left + 6) {\n pos.containerX = viewportRect.left + 6;\n pos.arrowX = Math.max(6, pageX - pos.containerX - tooltipRects.arrow.width / 2);\n } else {\n const maxX = viewportRect.right - 6 - tooltipRects.container.width;\n\n if (pos.containerX > maxX) {\n pos.containerX = maxX;\n pos.arrowX = Math.min(tooltipRects.container.width - 6, pageX - pos.containerX - tooltipRects.arrow.width / 2);\n }\n }\n /* If tooltip has not enough space on top - make it bottom tooltip. */\n\n\n if (pos.containerY < viewportRect.top + 6) {\n pos.containerY += tooltipRects.container.height + 2 * tooltipRects.arrow.height;\n pos.arrowY -= tooltipRects.container.height + tooltipRects.arrow.height;\n pos.baseArrowStyle = ARROW_STYLE_UP;\n }\n\n const containerStyle = `left:${pos.containerX}px;top:${pos.containerY}px`;\n tooltip.container.setAttribute('style', containerStyle);\n const arrowStyle = `${pos.baseArrowStyle};left:${pos.arrowX}px;top:${pos.arrowY}px`;\n tooltip.arrow.setAttribute('style', arrowStyle);\n}\n/* The Tooltip component itself. */\n\n\nconst Tooltip = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)((_ref, ref) => {\n let {\n children,\n theme\n } = _ref;\n const [components, setComponents] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null);\n\n const pointTo = (pageX, pageY, placement, element) => components && setComponentPositions(pageX, pageY, placement, element, components);\n\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useImperativeHandle)(ref, () => ({\n pointTo\n }));\n /* Inits and destroys tooltip components. */\n\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {\n const x = createTooltipComponents(theme);\n setComponents(x);\n return () => {\n document.body.removeChild(x.container);\n setComponents(null);\n };\n }, [theme]);\n return components ? /*#__PURE__*/(0,react_dom__WEBPACK_IMPORTED_MODULE_1__.createPortal)(children, components.content) : null;\n});\nTooltip.propTypes = {\n children: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().node),\n theme: prop_types__WEBPACK_IMPORTED_MODULE_2___default().shape().isRequired\n};\nTooltip.defaultProps = {\n children: null\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (Tooltip);\n\n//# sourceURL=webpack://@dr.pogodin/react-utils/./src/shared/components/WithTooltip/Tooltip.jsx?");
180
180
 
181
181
  /***/ }),
182
182
 
@@ -196,7 +196,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var prop
196
196
  \******************************************************/
197
197
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
198
198
 
199
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ \"prop-types\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! qs */ \"qs\");\n/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(qs__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _ScalableRect__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../ScalableRect */ \"./src/shared/components/ScalableRect/index.jsx\");\n/* harmony import */ var _dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @dr.pogodin/react-themes */ \"@dr.pogodin/react-themes\");\n/* harmony import */ var _dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _Throbber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Throbber */ \"./src/shared/components/Throbber/index.jsx\");\n/* harmony import */ var _base_scss__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./base.scss */ \"./src/shared/components/YouTubeVideo/base.scss\");\n/* harmony import */ var _throbber_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./throbber.scss */ \"./src/shared/components/YouTubeVideo/throbber.scss\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n\n\n\n\n\n\n\n/**\n * A component for embeding a YouTube video.\n * @param {object} [props] Component properties.\n * @param {boolean} [props.autoplay] If `true` the video will start to play\n * automatically once loaded.\n * @param {string} [props.src] URL of the video to play. Can be in any of\n * the following formats, and keeps any additional query parameters understood\n * by the YouTube IFrame player:\n * - `https://www.youtube.com/watch?v=NdF6Rmt6Ado`\n * - `https://youtu.be/NdF6Rmt6Ado`\n * - `https://www.youtube.com/embed/NdF6Rmt6Ado`\n * @param {YouTubeVideoTheme} [props.theme] _Ad hoc_ theme.\n * @param {string} [props.title] The `title` attribute to add to the player\n * IFrame.\n */\n\n\n\n\nfunction YouTubeVideo(_ref) {\n let {\n autoplay,\n src,\n theme,\n title\n } = _ref;\n let [url, query] = src.split('?');\n query = query ? qs__WEBPACK_IMPORTED_MODULE_1___default().parse(query) : {};\n const videoId = query.v || url.match(/\\/([a-zA-Z0-9-_]*)$/)[1];\n url = \"https://www.youtube.com/embed/\".concat(videoId);\n delete query.v;\n query.autoplay = autoplay ? 1 : 0;\n url += \"?\".concat(qs__WEBPACK_IMPORTED_MODULE_1___default().stringify(query)); // TODO: https://developers.google.com/youtube/player_parameters\n // More query parameters can be exposed via the component props.\n\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(_ScalableRect__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n className: theme.container,\n ratio: \"16:9\",\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_Throbber__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n theme: _throbber_scss__WEBPACK_IMPORTED_MODULE_6__[\"default\"]\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(\"iframe\", {\n allow: \"autoplay\",\n allowFullScreen: true,\n className: theme.video,\n src: url,\n title: title\n })]\n });\n}\n\nconst ThemedYouTubeVideo = _dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_3___default()('YouTubeVideo', ['container', 'video'], _base_scss__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(YouTubeVideo);\nYouTubeVideo.propTypes = {\n autoplay: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),\n src: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string.isRequired),\n theme: ThemedYouTubeVideo.themeType.isRequired,\n title: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)\n};\nYouTubeVideo.defaultProps = {\n autoplay: false,\n title: ''\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (ThemedYouTubeVideo);\n\n//# sourceURL=webpack://@dr.pogodin/react-utils/./src/shared/components/YouTubeVideo/index.jsx?");
199
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ \"prop-types\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! qs */ \"qs\");\n/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(qs__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _ScalableRect__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../ScalableRect */ \"./src/shared/components/ScalableRect/index.jsx\");\n/* harmony import */ var _dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @dr.pogodin/react-themes */ \"@dr.pogodin/react-themes\");\n/* harmony import */ var _dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _Throbber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Throbber */ \"./src/shared/components/Throbber/index.jsx\");\n/* harmony import */ var _base_scss__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./base.scss */ \"./src/shared/components/YouTubeVideo/base.scss\");\n/* harmony import */ var _throbber_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./throbber.scss */ \"./src/shared/components/YouTubeVideo/throbber.scss\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n\n\n\n\n\n\n\n/**\n * A component for embeding a YouTube video.\n * @param {object} [props] Component properties.\n * @param {boolean} [props.autoplay] If `true` the video will start to play\n * automatically once loaded.\n * @param {string} [props.src] URL of the video to play. Can be in any of\n * the following formats, and keeps any additional query parameters understood\n * by the YouTube IFrame player:\n * - `https://www.youtube.com/watch?v=NdF6Rmt6Ado`\n * - `https://youtu.be/NdF6Rmt6Ado`\n * - `https://www.youtube.com/embed/NdF6Rmt6Ado`\n * @param {YouTubeVideoTheme} [props.theme] _Ad hoc_ theme.\n * @param {string} [props.title] The `title` attribute to add to the player\n * IFrame.\n */\n\n\n\n\nfunction YouTubeVideo(_ref) {\n let {\n autoplay,\n src,\n theme,\n title\n } = _ref;\n let [url, query] = src.split('?');\n query = query ? qs__WEBPACK_IMPORTED_MODULE_1___default().parse(query) : {};\n const videoId = query.v || url.match(/\\/([a-zA-Z0-9-_]*)$/)[1];\n url = `https://www.youtube.com/embed/${videoId}`;\n delete query.v;\n query.autoplay = autoplay ? 1 : 0;\n url += `?${qs__WEBPACK_IMPORTED_MODULE_1___default().stringify(query)}`; // TODO: https://developers.google.com/youtube/player_parameters\n // More query parameters can be exposed via the component props.\n\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)(_ScalableRect__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n className: theme.container,\n ratio: \"16:9\",\n children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_Throbber__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n theme: _throbber_scss__WEBPACK_IMPORTED_MODULE_6__[\"default\"]\n }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(\"iframe\", {\n allow: \"autoplay\",\n allowFullScreen: true,\n className: theme.video,\n src: url,\n title: title\n })]\n });\n}\n\nconst ThemedYouTubeVideo = _dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_3___default()('YouTubeVideo', ['container', 'video'], _base_scss__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(YouTubeVideo);\nYouTubeVideo.propTypes = {\n autoplay: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),\n src: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string.isRequired),\n theme: ThemedYouTubeVideo.themeType.isRequired,\n title: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)\n};\nYouTubeVideo.defaultProps = {\n autoplay: false,\n title: ''\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (ThemedYouTubeVideo);\n\n//# sourceURL=webpack://@dr.pogodin/react-utils/./src/shared/components/YouTubeVideo/index.jsx?");
200
200
 
201
201
  /***/ }),
202
202
 
@@ -8,7 +8,7 @@
8
8
  // from the web app root, to allow it control any and all pages of the
9
9
  // web app (otherwise, it will be restricted to the scope of its path).
10
10
  // The server takes it into account.
11
- const reg=await navigator.serviceWorker.register("/__service-worker.js");console.log("SW registered:",reg)}catch(err){console.log("SW registration failed:",err)}})}}/* eslint-enable no-console */ /* Decodes data injected at the server side. */if(window.INJ){const{key}=window.TRU_BUILD_INFO;let data=_forge.default.util.decode64(window.INJ);const decipher=_forge.default.cipher.createDecipher("AES-CBC",key);decipher.start({iv:data.slice(0,32)});decipher.update(_forge.default.util.createBuffer(data.slice(32)));decipher.finish();data=_forge.default.util.decodeUtf8(decipher.output.data);data=eval("(".concat(data,")"));// eslint-disable-line no-eval
11
+ const reg=await navigator.serviceWorker.register("/__service-worker.js");console.log("SW registered:",reg)}catch(err){console.log("SW registration failed:",err)}})}}/* eslint-enable no-console */ /* Decodes data injected at the server side. */if(window.INJ){const{key}=window.TRU_BUILD_INFO;let data=_forge.default.util.decode64(window.INJ);const decipher=_forge.default.cipher.createDecipher("AES-CBC",key);decipher.start({iv:data.slice(0,32)});decipher.update(_forge.default.util.createBuffer(data.slice(32)));decipher.finish();data=_forge.default.util.decodeUtf8(decipher.output.data);data=eval(`(${data})`);// eslint-disable-line no-eval
12
12
  window.CHUNK_GROUPS=data.CHUNK_GROUPS;window.CONFIG=data.CONFIG;window.ISTATE=data.ISTATE}else{// This is possible when the client-side bundle is launched as a stand-alone
13
13
  // precompiled website, rather than served by react-utils' based server.
14
14
  window.CHUNK_GROUPS={};window.CONFIG={}}window.CONFIG.CSRF=_cookie.default.parse(document.cookie).csrfToken;
@@ -1 +1 @@
1
- {"version":3,"file":"init.js","names":["BUILD_INFO","window","TRU_BUILD_INFO","TRU_KEEP_INJ_SCRIPT","block","document","querySelector","getElementsByTagName","removeChild","useServiceWorker","navigator","addEventListener","reg","serviceWorker","register","console","log","err","INJ","key","data","forge","util","decode64","decipher","cipher","createDecipher","start","iv","slice","update","createBuffer","finish","decodeUtf8","output","eval","CHUNK_GROUPS","CONFIG","ISTATE","CSRF","cookie","parse","csrfToken"],"sources":["../../../src/client/init.js"],"sourcesContent":["/**\n * Initialization of client-side environment.\n */\n\n/* global BUILD_INFO, document, window */\n\nimport cookie from 'cookie';\n\n// Note: this way, only required part of \"node-forge\": AES, and some utils,\n// is bundled into client-side code.\nimport forge from 'node-forge/lib/forge';\nimport 'node-forge/lib/aes';\n\n/* `BUILD_INFO` is always injected by Webpack build, but this check is needed\n * to adopt the code for usage in tests. */\nif (typeof BUILD_INFO !== 'undefined') {\n window.TRU_BUILD_INFO = BUILD_INFO;\n}\n\n/* Removes data injection script out of the document.\n * The if block is here for test purposes. */\nif (!window.TRU_KEEP_INJ_SCRIPT) {\n const block = document.querySelector('script[id=\"inj\"]');\n if (block) document.getElementsByTagName('body')[0].removeChild(block);\n}\n\n/* TODO: A proper logger should be moved to `@dr.pogodin/react-utils`. */\n/* eslint-disable no-console */\nconst { useServiceWorker } = window.TRU_BUILD_INFO;\nif (useServiceWorker) {\n const { navigator } = window;\n if ('serviceWorker' in navigator) {\n window.addEventListener('load', async () => {\n try {\n // Note: no matter the \"publicPath\", we want to serve the service worker\n // from the web app root, to allow it control any and all pages of the\n // web app (otherwise, it will be restricted to the scope of its path).\n // The server takes it into account.\n const reg = await navigator\n .serviceWorker.register('/__service-worker.js');\n console.log('SW registered:', reg);\n } catch (err) {\n console.log('SW registration failed:', err);\n }\n });\n }\n}\n/* eslint-enable no-console */\n\n/* Decodes data injected at the server side. */\nif (window.INJ) {\n const { key } = window.TRU_BUILD_INFO;\n let data = forge.util.decode64(window.INJ);\n const decipher = forge.cipher.createDecipher('AES-CBC', key);\n decipher.start({ iv: data.slice(0, 32) });\n decipher.update(forge.util.createBuffer(data.slice(32)));\n decipher.finish();\n\n data = forge.util.decodeUtf8(decipher.output.data);\n data = eval(`(${data})`); // eslint-disable-line no-eval\n\n window.CHUNK_GROUPS = data.CHUNK_GROUPS;\n window.CONFIG = data.CONFIG;\n window.ISTATE = data.ISTATE;\n} else {\n // This is possible when the client-side bundle is launched as a stand-alone\n // precompiled website, rather than served by react-utils' based server.\n window.CHUNK_GROUPS = {};\n window.CONFIG = {};\n}\n\nwindow.CONFIG.CSRF = cookie.parse(document.cookie).csrfToken;\n"],"mappings":"gGAMA,sDAIA,mEACA,8BAXA;AACA;AACA,G,CAEA,yC,CAIA;AACA;AAIA;AACA,2CACA,GAAI,MAAOA,WAAP,GAAsB,WAA1B,CAAuC,CACrCC,MAAM,CAACC,cAAP,CAAwBF,UACzB,CAED;AACA,6CACA,GAAI,CAACC,MAAM,CAACE,mBAAZ,CAAiC,CAC/B,KAAMC,MAAK,CAAGC,QAAQ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C,IAAN,CAAWW,UAAX,CAAsBT,QAAQ,CAACU,MAAT,CAAgBd,IAAtC,CAAP,CACAA,IAAI,CAAGe,IAAI,YAAKf,IAAL,MAAX,CAA0B;AAE1BnB,MAAM,CAACmC,YAAP,CAAsBhB,IAAI,CAACgB,YAA3B,CACAnC,MAAM,CAACoC,MAAP,CAAgBjB,IAAI,CAACiB,MAArB,CACApC,MAAM,CAACqC,MAAP,CAAgBlB,IAAI,CAACkB,MACtB,CAdD,IAcO,CACL;AACA;AACArC,MAAM,CAACmC,YAAP,CAAsB,EAAtB,CACAnC,MAAM,CAACoC,MAAP,CAAgB,EACjB,CAEDpC,MAAM,CAACoC,MAAP,CAAcE,IAAd,CAAqBC,eAAA,CAAOC,KAAP,CAAapC,QAAQ,CAACmC,MAAtB,EAA8BE,SAAnD"}
1
+ {"version":3,"file":"init.js","names":["BUILD_INFO","window","TRU_BUILD_INFO","TRU_KEEP_INJ_SCRIPT","block","document","querySelector","getElementsByTagName","removeChild","useServiceWorker","navigator","addEventListener","reg","serviceWorker","register","console","log","err","INJ","key","data","forge","util","decode64","decipher","cipher","createDecipher","start","iv","slice","update","createBuffer","finish","decodeUtf8","output","eval","CHUNK_GROUPS","CONFIG","ISTATE","CSRF","cookie","parse","csrfToken"],"sources":["../../../src/client/init.js"],"sourcesContent":["/**\n * Initialization of client-side environment.\n */\n\n/* global BUILD_INFO, document, window */\n\nimport cookie from 'cookie';\n\n// Note: this way, only required part of \"node-forge\": AES, and some utils,\n// is bundled into client-side code.\nimport forge from 'node-forge/lib/forge';\nimport 'node-forge/lib/aes';\n\n/* `BUILD_INFO` is always injected by Webpack build, but this check is needed\n * to adopt the code for usage in tests. */\nif (typeof BUILD_INFO !== 'undefined') {\n window.TRU_BUILD_INFO = BUILD_INFO;\n}\n\n/* Removes data injection script out of the document.\n * The if block is here for test purposes. */\nif (!window.TRU_KEEP_INJ_SCRIPT) {\n const block = document.querySelector('script[id=\"inj\"]');\n if (block) document.getElementsByTagName('body')[0].removeChild(block);\n}\n\n/* TODO: A proper logger should be moved to `@dr.pogodin/react-utils`. */\n/* eslint-disable no-console */\nconst { useServiceWorker } = window.TRU_BUILD_INFO;\nif (useServiceWorker) {\n const { navigator } = window;\n if ('serviceWorker' in navigator) {\n window.addEventListener('load', async () => {\n try {\n // Note: no matter the \"publicPath\", we want to serve the service worker\n // from the web app root, to allow it control any and all pages of the\n // web app (otherwise, it will be restricted to the scope of its path).\n // The server takes it into account.\n const reg = await navigator\n .serviceWorker.register('/__service-worker.js');\n console.log('SW registered:', reg);\n } catch (err) {\n console.log('SW registration failed:', err);\n }\n });\n }\n}\n/* eslint-enable no-console */\n\n/* Decodes data injected at the server side. */\nif (window.INJ) {\n const { key } = window.TRU_BUILD_INFO;\n let data = forge.util.decode64(window.INJ);\n const decipher = forge.cipher.createDecipher('AES-CBC', key);\n decipher.start({ iv: data.slice(0, 32) });\n decipher.update(forge.util.createBuffer(data.slice(32)));\n decipher.finish();\n\n data = forge.util.decodeUtf8(decipher.output.data);\n data = eval(`(${data})`); // eslint-disable-line no-eval\n\n window.CHUNK_GROUPS = data.CHUNK_GROUPS;\n window.CONFIG = data.CONFIG;\n window.ISTATE = data.ISTATE;\n} else {\n // This is possible when the client-side bundle is launched as a stand-alone\n // precompiled website, rather than served by react-utils' based server.\n window.CHUNK_GROUPS = {};\n window.CONFIG = {};\n}\n\nwindow.CONFIG.CSRF = cookie.parse(document.cookie).csrfToken;\n"],"mappings":"gGAMA,sDAIA,mEACA,8BAXA;AACA;AACA,G,CAEA,yC,CAIA;AACA;AAIA;AACA,2CACA,GAAI,MAAOA,WAAP,GAAsB,WAA1B,CAAuC,CACrCC,MAAM,CAACC,cAAP,CAAwBF,UACzB,CAED;AACA,6CACA,GAAI,CAACC,MAAM,CAACE,mBAAZ,CAAiC,CAC/B,KAAMC,MAAK,CAAGC,QAAQ,CAACC,aAAT,CAAuB,oBAAvB,CAAd,CACA,GAAIF,KAAJ,CAAWC,QAAQ,CAACE,oBAAT,CAA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AGe,IAAI,CAAE,IAAGf,IAAK,GAAV,CAAX,CAA0B;AAE1BnB,MAAM,CAACmC,YAAP,CAAsBhB,IAAI,CAACgB,YAA3B,CACAnC,MAAM,CAACoC,MAAP,CAAgBjB,IAAI,CAACiB,MAArB,CACApC,MAAM,CAACqC,MAAP,CAAgBlB,IAAI,CAACkB,MACtB,CAdD,IAcO,CACL;AACA;AACArC,MAAM,CAACmC,YAAP,CAAsB,EAAtB,CACAnC,MAAM,CAACoC,MAAP,CAAgB,EACjB,CAEDpC,MAAM,CAACoC,MAAP,CAAcE,IAAd,CAAqBC,eAAA,CAAOC,KAAP,CAAapC,QAAQ,CAACmC,MAAtB,EAA8BE,SAAnD"}
@@ -6,5 +6,5 @@
6
6
  * @param {ThrobberTheme} [props.theme] _Ad hoc_ theme.
7
7
  * @param {...any} [props....]
8
8
  * [Other theming properties](https://www.npmjs.com/package/@dr.pogodin/react-themes#themed-component-properties)
9
- */function Throbber({theme}){return/*#__PURE__*/(0,_jsxRuntime.jsxs)("div",{className:(theme.container?theme.container+" ":"")+"_7zdld4",children:[/*#__PURE__*/(0,_jsxRuntime.jsx)("div",{className:(theme.circle?theme.circle+" ":"")+"dBrB4g"}),/*#__PURE__*/(0,_jsxRuntime.jsx)("div",{className:(theme.circle?theme.circle+" ":"")+"dBrB4g"}),/*#__PURE__*/(0,_jsxRuntime.jsx)("div",{className:(theme.circle?theme.circle+" ":"")+"dBrB4g"})]})}Throbber.defaultProps={theme:{}};Throbber.propTypes={theme:_propTypes.default.shape({container:_propTypes.default.string,circle:_propTypes.default.string})};var _default=(0,_reactThemes.default)("Throbber",["circle","container"],defaultTheme)(Throbber);exports.default=_default;
9
+ */function Throbber({theme}){return/*#__PURE__*/(0,_jsxRuntime.jsxs)("span",{className:(theme.container?theme.container+" ":"")+"_7zdld4",children:[/*#__PURE__*/(0,_jsxRuntime.jsx)("span",{className:(theme.circle?theme.circle+" ":"")+"dBrB4g"}),/*#__PURE__*/(0,_jsxRuntime.jsx)("span",{className:(theme.circle?theme.circle+" ":"")+"dBrB4g"}),/*#__PURE__*/(0,_jsxRuntime.jsx)("span",{className:(theme.circle?theme.circle+" ":"")+"dBrB4g"})]})}Throbber.defaultProps={theme:{}};Throbber.propTypes={theme:_propTypes.default.shape({container:_propTypes.default.string,circle:_propTypes.default.string})};var _default=(0,_reactThemes.default)("Throbber",["circle","container"],defaultTheme)(Throbber);exports.default=_default;
10
10
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["Throbber","theme","container","circle","defaultProps","propTypes","PT","shape","string","themed","defaultTheme"],"sources":["../../../../../src/shared/components/Throbber/index.jsx"],"sourcesContent":["import PT from 'prop-types';\nimport themed from '@dr.pogodin/react-themes';\n\nimport defaultTheme from './theme.scss';\n\n/**\n * Throbber is an \"action in progress\" indicator, which renders\n * three bouncing circles as a simple pending activity indicator,\n * and can be further themed to a certain degree.\n * @param {object} [props] Component properties.\n * @param {ThrobberTheme} [props.theme] _Ad hoc_ theme.\n * @param {...any} [props....]\n * [Other theming properties](https://www.npmjs.com/package/@dr.pogodin/react-themes#themed-component-properties)\n */\nfunction Throbber({\n theme,\n}) {\n return (\n <div className={theme.container} styleName=\"container\">\n <div className={theme.circle} styleName=\"circle\" />\n <div className={theme.circle} styleName=\"circle\" />\n <div className={theme.circle} styleName=\"circle\" />\n </div>\n );\n}\n\nThrobber.defaultProps = {\n theme: {},\n};\n\nThrobber.propTypes = {\n theme: PT.shape({\n container: PT.string,\n circle: PT.string,\n }),\n};\n\nexport default themed('Throbber', [\n 'circle',\n 'container',\n], defaultTheme)(Throbber);\n"],"mappings":"gLAAA,6DACA,6E,8KAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACA,QAASA,SAAT,CAAkB,CAChBC,KADgB,CAAlB,CAEG,CACD,mBACE,4BAAK,SAAS,EAAEA,KAAK,CAACC,SAAR,CAAED,KAAK,CAACC,SAAR,kBAAd,wBACE,2BAAK,SAAS,EAAED,KAAK,CAACE,MAAR,CAAEF,KAAK,CAACE,MAAR,iBAAd,EADF,cAEE,2BAAK,SAAS,EAAEF,KAAK,CAACE,MAAR,CAAEF,KAAK,CAACE,MAAR,iBAAd,EAFF,cAGE,2BAAK,SAAS,EAAEF,KAAK,CAACE,MAAR,CAAEF,KAAK,CAACE,MAAR,iBAAd,EAHF,GAMH,CAEDH,QAAQ,CAACI,YAAT,CAAwB,CACtBH,KAAK,CAAE,EADe,CAAxB,CAIAD,QAAQ,CAACK,SAAT,CAAqB,CACnBJ,KAAK,CAAEK,kBAAA,CAAGC,KAAH,CAAS,CACdL,SAAS,CAAEI,kBAAA,CAAGE,MADA,CAEdL,MAAM,CAAEG,kBAAA,CAAGE,MAFG,CAAT,CADY,CAArB,C,aAOe,GAAAC,oBAAA,EAAO,UAAP,CAAmB,CAChC,QADgC,CAEhC,WAFgC,CAAnB,CAGZC,YAHY,EAGEV,QAHF,C"}
1
+ {"version":3,"file":"index.js","names":["Throbber","theme","container","circle","defaultProps","propTypes","PT","shape","string","themed","defaultTheme"],"sources":["../../../../../src/shared/components/Throbber/index.jsx"],"sourcesContent":["import PT from 'prop-types';\nimport themed from '@dr.pogodin/react-themes';\n\nimport defaultTheme from './theme.scss';\n\n/**\n * Throbber is an \"action in progress\" indicator, which renders\n * three bouncing circles as a simple pending activity indicator,\n * and can be further themed to a certain degree.\n * @param {object} [props] Component properties.\n * @param {ThrobberTheme} [props.theme] _Ad hoc_ theme.\n * @param {...any} [props....]\n * [Other theming properties](https://www.npmjs.com/package/@dr.pogodin/react-themes#themed-component-properties)\n */\nfunction Throbber({\n theme,\n}) {\n return (\n <span className={theme.container} styleName=\"container\">\n <span className={theme.circle} styleName=\"circle\" />\n <span className={theme.circle} styleName=\"circle\" />\n <span className={theme.circle} styleName=\"circle\" />\n </span>\n );\n}\n\nThrobber.defaultProps = {\n theme: {},\n};\n\nThrobber.propTypes = {\n theme: PT.shape({\n container: PT.string,\n circle: PT.string,\n }),\n};\n\nexport default themed('Throbber', [\n 'circle',\n 'container',\n], defaultTheme)(Throbber);\n"],"mappings":"gLAAA,6DACA,6E,8KAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACA,QAASA,SAAT,CAAkB,CAChBC,KADgB,CAAlB,CAEG,CACD,mBACE,6BAAM,SAAS,EAAEA,KAAK,CAACC,SAAR,CAAED,KAAK,CAACC,SAAR,kBAAf,wBACE,4BAAM,SAAS,EAAED,KAAK,CAACE,MAAR,CAAEF,KAAK,CAACE,MAAR,iBAAf,EADF,cAEE,4BAAM,SAAS,EAAEF,KAAK,CAACE,MAAR,CAAEF,KAAK,CAACE,MAAR,iBAAf,EAFF,cAGE,4BAAM,SAAS,EAAEF,KAAK,CAACE,MAAR,CAAEF,KAAK,CAACE,MAAR,iBAAf,EAHF,GAMH,CAEDH,QAAQ,CAACI,YAAT,CAAwB,CACtBH,KAAK,CAAE,EADe,CAAxB,CAIAD,QAAQ,CAACK,SAAT,CAAqB,CACnBJ,KAAK,CAAEK,kBAAA,CAAGC,KAAH,CAAS,CACdL,SAAS,CAAEI,kBAAA,CAAGE,MADA,CAEdL,MAAM,CAAEG,kBAAA,CAAGE,MAFG,CAAT,CADY,CAArB,C,aAOe,GAAAC,oBAAA,EAAO,UAAP,CAAmB,CAChC,QADgC,CAEhC,WAFgC,CAAnB,CAGZC,YAHY,EAGEV,QAHF,C"}
@@ -19,7 +19,7 @@
19
19
  */loadWebpackConfig(){let options=this.pragmas["webpack-config-options"];options=options?JSON.parse(options):{};(0,_lodash.defaults)(options,{context:this.testFolder,fs:this.global.webpackOutputFs});let factory=this.pragmas["webpack-config-factory"]||"";factory=require(_path.default.resolve(this.rootDir,factory));this.global.webpackConfig=factory(options);const fs=this.global.webpackOutputFs;let buildInfo=`${options.context}/.build-info`;if(fs.existsSync(buildInfo)){buildInfo=fs.readFileSync(buildInfo,"utf8");this.global.buildInfo=JSON.parse(buildInfo)}}/**
20
20
  * Executes Webpack build.
21
21
  * @return {Promise}
22
- */async runWebpack(){this.loadWebpackConfig();const compiler=(0,_webpack.default)(this.global.webpackConfig);compiler.outputFileSystem=this.global.webpackOutputFs;return new Promise((done,fail)=>{compiler.run((err,stats)=>{if(err)fail(err);this.global.webpackStats=stats.toJson();// Keeps reference to the raw Webpack stats object, which should be
22
+ */async runWebpack(){this.loadWebpackConfig();const compiler=(0,_webpack.default)(this.global.webpackConfig);compiler.outputFileSystem=this.global.webpackOutputFs;return new Promise((done,fail)=>{compiler.run((err,stats)=>{if(err)fail(err);if(stats.hasErrors()){console.error(stats.toJson().errors);fail(Error("Webpack compilation failed"))}this.global.webpackStats=stats.toJson();// Keeps reference to the raw Webpack stats object, which should be
23
23
  // explicitly passed to the server-side renderer alongside the request,
24
24
  // so that it can to pick up asset paths for different named chunks.
25
25
  this.webpackStats=stats;done()})})}async runSsr(){let options=this.pragmas["ssr-options"];options=options?JSON.parse(options):{};// TODO: This is temporary to shortcut the logging added to SSR.