@dr.pogodin/react-utils 1.14.4 → 1.15.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/bin/release.sh +1 -0
  2. package/build/development/shared/components/Button/index.js +1 -1
  3. package/build/development/shared/components/Checkbox/index.js +1 -1
  4. package/build/development/shared/components/CodeSplit/ClientSide.js +5 -4
  5. package/build/development/shared/components/CodeSplit/ClientSide.js.map +1 -1
  6. package/build/development/shared/components/Dropdown/index.js +1 -1
  7. package/build/development/shared/components/Input/index.js +1 -1
  8. package/build/development/shared/components/Modal/index.js +1 -1
  9. package/build/development/shared/components/PageLayout/index.js +1 -1
  10. package/build/development/shared/components/Throbber/index.js +1 -1
  11. package/build/development/shared/components/WithTooltip/index.js +1 -1
  12. package/build/development/shared/components/YouTubeVideo/index.js +2 -2
  13. package/build/development/web.bundle.js +5 -5
  14. package/build/production/shared/components/Button/index.js +1 -1
  15. package/build/production/shared/components/Button/index.js.map +1 -1
  16. package/build/production/shared/components/Checkbox/index.js +1 -1
  17. package/build/production/shared/components/Checkbox/index.js.map +1 -1
  18. package/build/production/shared/components/CodeSplit/ClientSide.js +2 -2
  19. package/build/production/shared/components/CodeSplit/ClientSide.js.map +1 -1
  20. package/build/production/shared/components/Dropdown/index.js +1 -1
  21. package/build/production/shared/components/Dropdown/index.js.map +1 -1
  22. package/build/production/shared/components/Input/index.js +1 -1
  23. package/build/production/shared/components/Input/index.js.map +1 -1
  24. package/build/production/shared/components/Modal/index.js +1 -1
  25. package/build/production/shared/components/Modal/index.js.map +1 -1
  26. package/build/production/shared/components/PageLayout/index.js +1 -1
  27. package/build/production/shared/components/PageLayout/index.js.map +1 -1
  28. package/build/production/shared/components/Throbber/index.js +1 -1
  29. package/build/production/shared/components/Throbber/index.js.map +1 -1
  30. package/build/production/shared/components/WithTooltip/index.js +1 -1
  31. package/build/production/shared/components/WithTooltip/index.js.map +1 -1
  32. package/build/production/shared/components/YouTubeVideo/index.js +1 -1
  33. package/build/production/shared/components/YouTubeVideo/index.js.map +1 -1
  34. package/build/production/web.bundle.js +1 -1
  35. package/build/production/web.bundle.js.map +1 -1
  36. package/config/babel/node-ssr.js +5 -67
  37. package/config/babel/webpack.js +10 -53
  38. package/dev-styles.js +0 -7
  39. package/node-entry.js +5 -0
  40. package/null.js +0 -0
  41. package/package.json +43 -19
  42. package/prod-styles.js +0 -7
  43. package/config/shared/utils.js +0 -20
  44. package/index.js +0 -32
  45. package/mixins.scss +0 -1
package/bin/release.sh CHANGED
@@ -14,6 +14,7 @@ sudo apt-get update && sudo apt-get install google-cloud-sdk
14
14
  # Releases documentation.
15
15
  echo $GCLOUD_KEY > ${HOME}/gcloud-key.json
16
16
  gcloud auth activate-service-account --key-file ${HOME}/gcloud-key.json
17
+ gcloud config set disable_prompts true
17
18
  gcloud config set project dr-pogodin-studio-website
18
19
  gsutil rsync -d -r docs/build gs://docs.pogodin.studio/react-utils
19
20
 
@@ -16,7 +16,7 @@ var _utils = require("../../utils");
16
16
  var _jsxRuntime = require("react/jsx-runtime");
17
17
 
18
18
  // The <Button> component implements a standard button / button-like link.
19
- var defaultTheme = {
19
+ const defaultTheme = {
20
20
  "context": "-dr-pogodin-react-utils___src-shared-components-Button-style___context___KM0v4f",
21
21
  "ad": "-dr-pogodin-react-utils___src-shared-components-Button-style___ad___3jm1-Q",
22
22
  "hoc": "-dr-pogodin-react-utils___src-shared-components-Button-style___hoc___0plpDL",
@@ -13,7 +13,7 @@ var _utils = require("../../utils");
13
13
 
14
14
  var _jsxRuntime = require("react/jsx-runtime");
15
15
 
16
- var defaultTheme = {
16
+ const defaultTheme = {
17
17
  "context": "-dr-pogodin-react-utils___src-shared-components-Checkbox-theme___context___dNQcC6",
18
18
  "ad": "-dr-pogodin-react-utils___src-shared-components-Checkbox-theme___ad___earXxa",
19
19
  "hoc": "-dr-pogodin-react-utils___src-shared-components-Checkbox-theme___hoc___qAPfQ6",
@@ -72,7 +72,9 @@ function ClientSide({
72
72
  head.appendChild(link);
73
73
  }
74
74
 
75
- if (!link.dependants) link.dependants = new Set([chunkName]);else link.dependants.add(chunkName);
75
+ window.STYLESHEET_USAGE_COUNTERS ||= {};
76
+ window.STYLESHEET_USAGE_COUNTERS[path] ||= 0;
77
+ ++window.STYLESHEET_USAGE_COUNTERS[path];
76
78
  });
77
79
  } // Async loading of React component necessary to render the chunk.
78
80
 
@@ -140,10 +142,9 @@ function ClientSide({
140
142
  window.CHUNK_GROUPS[chunkName].forEach(item => {
141
143
  if (!item.endsWith('.css')) return;
142
144
  const path = `${publicPath}/${item}`;
143
- const link = document.querySelector(`link[href="${path}"]`);
144
- link.dependants.delete(chunkName);
145
145
 
146
- if (!link.dependants.size) {
146
+ if (--window.STYLESHEET_USAGE_COUNTERS[path] <= 0) {
147
+ const link = document.querySelector(`link[href="${path}"]`);
147
148
  const head = document.querySelector('head');
148
149
  head.removeChild(link);
149
150
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/shared/components/CodeSplit/ClientSide.jsx"],"names":["ClientSide","chunkName","children","getClientSide","placeholder","serverSide","rest","current","heap","mounted","pendingStyles","renderInitialized","publicPath","window","CHUNK_GROUPS","forEach","asset","endsWith","path","link","document","querySelector","createElement","setAttribute","barrier","onload","resolve","onerror","push","head","appendChild","dependants","Set","add","data","maxage","time","YEAR_MS","createRender","Scene","default","render","setRender","length","node","__html","innerHTML","Promise","all","then","item","delete","size","removeChild"],"mappings":";;;;;;;;;AAMA;;AAEA;;AAEA;;AACA;;AACA;;;;AAZA;AACA;AACA;;AACA;;AACA;AAUe,SAASA,UAAT,CAAoB;AACjCC,EAAAA,SADiC;AAEjCC,EAAAA,QAFiC;AAGjCC,EAAAA,aAHiC;AAIjCC,EAAAA,WAJiC;AAMjC;AACAC,EAAAA,UAPiC;AASjC,KAAGC;AAT8B,CAApB,EAUZ;AACD,QAAM;AAAEC,IAAAA,OAAO,EAAEC;AAAX,MAAoB,mBAAO;AAC/BC,IAAA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AAqC;AACnCH,IAAAA,IAAI,CAACG,iBAAL,GAAyB,IAAzB;AACAoC,IAAAA,OAAO,CAACC,GAAR,CAAYxC,IAAI,CAACE,aAAjB,EAAgCuC,IAAhC,CAAqC,MAAM;AACzC,UAAIzC,IAAI,CAACC,OAAT,EAAkBiC,SAAS,CAACJ,YAAY,EAAb,CAAT;AACnB,KAFD;AAGD,GA9FA,CAgGD;;;AACA,wBAAU,MAAM,MAAM;AACpB9B,IAAAA,IAAI,CAACC,OAAL,GAAe,KAAf;AACAI,IAAAA,MAAM,CAACC,YAAP,CAAoBb,SAApB,EAA+Bc,OAA/B,CAAwCmC,IAAD,IAAU;AAC/C,UAAI,CAACA,IAAI,CAACjC,QAAL,CAAc,MAAd,CAAL,EAA4B;AAC5B,YAAMC,IAAI,GAAI,GAAEN,UAAW,IAAGsC,IAAK,EAAnC;AACA,YAAM/B,IAAI,GAAGC,QAAQ,CAACC,aAAT,CAAwB,cAAaH,IAAK,IAA1C,CAAb;AACAC,MAAAA,IAAI,CAACY,UAAL,CAAgBoB,MAAhB,CAAuBlD,SAAvB;;AACA,UAAI,CAACkB,IAAI,CAACY,UAAL,CAAgBqB,IAArB,EAA2B;AACzB,cAAMvB,IAAI,GAAGT,QAAQ,CAACC,aAAT,CAAuB,MAAvB,CAAb;AACAQ,QAAAA,IAAI,CAACwB,WAAL,CAAiBlC,IAAjB;AACD;AACF,KATD;AAUD,GAZD,EAYG,CAAClB,SAAD,EAAYO,IAAZ,EAAkBI,UAAlB,CAZH;AAcA,SAAO6B,MAAP;AACD","sourcesContent":["/**\n * Client-side implementation of a split code chunk.\n */\n/* global document, window */\n/* eslint-disable react/jsx-props-no-spreading */\n\nimport { useEffect, useRef, useState } from 'react';\n\nimport { useAsyncData } from '@dr.pogodin/react-global-state';\n\nimport { newBarrier } from 'utils/Barrier';\nimport { getBuildInfo } from 'utils/isomorphy';\nimport time from 'utils/time';\n\nexport default function ClientSide({\n chunkName,\n children,\n getClientSide,\n placeholder,\n\n // Not used in <ClientSide>, but should not go into \"...rest\" either.\n serverSide,\n\n ...rest\n}) {\n const { current: heap } = useRef({\n mounted: false,\n pendingStyles: [],\n renderInitialized: false,\n });\n\n // publicPath from buildInfo does not have a trailing slash at the end.\n const { publicPath } = getBuildInfo();\n\n // This code block initiates style loading as soon as possible, even prior to\n // the component loading, and it collects all style load / failure promises\n // into heap.pendingStyles array, allowing us to wait and thus avoid flash of\n // unstyled content issue (that's why we don't rely on mini-css-extract-plugin\n // to handle CSS chunk mounting and unmounting, which it is able to do).\n 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 if (!link) {\n link = document.createElement('link');\n link.setAttribute('href', path);\n link.setAttribute('rel', 'stylesheet');\n\n const barrier = newBarrier();\n link.onload = barrier.resolve;\n\n // Even if the style load failed, still allow to mount the component,\n // abeit with broken styling.\n link.onerror = barrier.resolve;\n\n heap.pendingStyles.push(barrier);\n\n const head = document.querySelector('head');\n head.appendChild(link);\n }\n if (!link.dependants) link.dependants = new Set([chunkName]);\n else link.dependants.add(chunkName);\n });\n }\n\n // Async loading of React component necessary to render the chunk.\n const { data } = useAsyncData(\n `dr_pogodin_react_utils___split_components.${chunkName}`,\n getClientSide,\n { maxage: time.YEAR_MS },\n );\n\n const createRender = () => {\n const Scene = data.default || data;\n return (\n <div data-chunk-name={chunkName}>\n <Scene {...rest}>\n {children}\n </Scene>\n </div>\n );\n };\n\n const [render, setRender] = useState(() => {\n // No need to await anything, we can render the final component right away.\n if (data && !heap.pendingStyles.length) {\n heap.renderInitialized = true;\n return createRender();\n }\n\n // Try to reuse the markup rendered during SSR.\n const node = document.querySelector(`[data-chunk-name=${chunkName}]`);\n if (node) {\n return (\n <div\n /* eslint-disable react/no-danger */\n dangerouslySetInnerHTML={{ __html: node.innerHTML || '' }}\n /* eslint-disable react/no-danger */\n data-chunk-name={chunkName}\n />\n );\n }\n\n // Else render placeholder, or empty div.\n const Scene = placeholder || (() => null);\n return <div><Scene {...rest}>{children}</Scene></div>;\n });\n\n // At this point, if we have data, the absense of heap.renderInitialized flag\n // means we have to await styles loading; once it is done, and if we are still\n // mounted, we can set the final render.\n if (data && !heap.renderInitialized) {\n heap.renderInitialized = true;\n Promise.all(heap.pendingStyles).then(() => {\n if (heap.mounted) setRender(createRender());\n });\n }\n\n // This effectively fires only once, just before the component unmounts.\n useEffect(() => () => {\n heap.mounted = false;\n window.CHUNK_GROUPS[chunkName].forEach((item) => {\n if (!item.endsWith('.css')) return;\n const path = `${publicPath}/${item}`;\n const link = document.querySelector(`link[href=\"${path}\"]`);\n link.dependants.delete(chunkName);\n if (!link.dependants.size) {\n const head = document.querySelector('head');\n head.removeChild(link);\n }\n });\n }, [chunkName, heap, publicPath]);\n\n return render;\n}\n"],"file":"ClientSide.js"}
1
+ {"version":3,"sources":["../../../../../src/shared/components/CodeSplit/ClientSide.jsx"],"names":["ClientSide","chunkName","children","getClientSide","placeholder","serverSide","rest","current","heap","mounted","pendingStyles","renderInitialized","publicPath","window","CHUNK_GROUPS","forEach","asset","endsWith","path","link","document","querySelector","createElement","setAttribute","barrier","onload","resolve","onerror","push","head","appendChild","STYLESHEET_USAGE_COUNTERS","data","maxage","time","YEAR_MS","createRender","Scene","default","render","setRender","length","node","__html","innerHTML","Promise","all","then","item","removeChild"],"mappings":";;;;;;;;;AAMA;;AAEA;;AAEA;;AACA;;AACA;;;;AAZA;AACA;AACA;;AACA;;AACA;AAUe,SAASA,UAAT,CAAoB;AACjCC,EAAAA,SADiC;AAEjCC,EAAAA,QAFiC;AAGjCC,EAAAA,aAHiC;AAIjCC,EAAAA,WAJiC;AAMjC;AACAC,EAAAA,UAPiC;AASjC,KAAGC;AAT8B,CAApB,EAUZ;AACD,QAAM;AAAEC,IAAAA,OAAO,EAAEC;AAAX,MAAoB,mBAAO;AAC/BC,IAAAA,OAAO,EAAE,KAD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L,GAAyB,IAAzB;AACAkC,IAAAA,OAAO,CAACC,GAAR,CAAYtC,IAAI,CAACE,aAAjB,EAAgCqC,IAAhC,CAAqC,MAAM;AACzC,UAAIvC,IAAI,CAACC,OAAT,EAAkB+B,SAAS,CAACJ,YAAY,EAAb,CAAT;AACnB,KAFD;AAGD,GA/FA,CAiGD;;;AACA,wBAAU,MAAM,MAAM;AACpB5B,IAAAA,IAAI,CAACC,OAAL,GAAe,KAAf;AACAI,IAAAA,MAAM,CAACC,YAAP,CAAoBb,SAApB,EAA+Bc,OAA/B,CAAwCiC,IAAD,IAAU;AAC/C,UAAI,CAACA,IAAI,CAAC/B,QAAL,CAAc,MAAd,CAAL,EAA4B;AAC5B,YAAMC,IAAI,GAAI,GAAEN,UAAW,IAAGoC,IAAK,EAAnC;;AACA,UAAI,EAAEnC,MAAM,CAACkB,yBAAP,CAAiCb,IAAjC,CAAF,IAA4C,CAAhD,EAAmD;AACjD,cAAMC,IAAI,GAAGC,QAAQ,CAACC,aAAT,CAAwB,cAAaH,IAAK,IAA1C,CAAb;AACA,cAAMW,IAAI,GAAGT,QAAQ,CAACC,aAAT,CAAuB,MAAvB,CAAb;AACAQ,QAAAA,IAAI,CAACoB,WAAL,CAAiB9B,IAAjB;AACD;AACF,KARD;AASD,GAXD,EAWG,CAAClB,SAAD,EAAYO,IAAZ,EAAkBI,UAAlB,CAXH;AAaA,SAAO2B,MAAP;AACD","sourcesContent":["/**\n * Client-side implementation of a split code chunk.\n */\n/* global document, window */\n/* eslint-disable react/jsx-props-no-spreading */\n\nimport { useEffect, useRef, useState } from 'react';\n\nimport { useAsyncData } from '@dr.pogodin/react-global-state';\n\nimport { newBarrier } from 'utils/Barrier';\nimport { getBuildInfo } from 'utils/isomorphy';\nimport time from 'utils/time';\n\nexport default function ClientSide({\n chunkName,\n children,\n getClientSide,\n placeholder,\n\n // Not used in <ClientSide>, but should not go into \"...rest\" either.\n serverSide,\n\n ...rest\n}) {\n const { current: heap } = useRef({\n mounted: false,\n pendingStyles: [],\n renderInitialized: false,\n });\n\n // publicPath from buildInfo does not have a trailing slash at the end.\n const { publicPath } = getBuildInfo();\n\n // This code block initiates style loading as soon as possible, even prior to\n // the component loading, and it collects all style load / failure promises\n // into heap.pendingStyles array, allowing us to wait and thus avoid flash of\n // unstyled content issue (that's why we don't rely on mini-css-extract-plugin\n // to handle CSS chunk mounting and unmounting, which it is able to do).\n 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 if (!link) {\n link = document.createElement('link');\n link.setAttribute('href', path);\n link.setAttribute('rel', 'stylesheet');\n\n const barrier = newBarrier();\n link.onload = barrier.resolve;\n\n // Even if the style load failed, still allow to mount the component,\n // abeit with broken styling.\n link.onerror = barrier.resolve;\n\n heap.pendingStyles.push(barrier);\n\n const head = document.querySelector('head');\n head.appendChild(link);\n }\n window.STYLESHEET_USAGE_COUNTERS ||= {};\n window.STYLESHEET_USAGE_COUNTERS[path] ||= 0;\n ++window.STYLESHEET_USAGE_COUNTERS[path];\n });\n }\n\n // Async loading of React component necessary to render the chunk.\n const { data } = useAsyncData(\n `dr_pogodin_react_utils___split_components.${chunkName}`,\n getClientSide,\n { maxage: time.YEAR_MS },\n );\n\n const createRender = () => {\n const Scene = data.default || data;\n return (\n <div data-chunk-name={chunkName}>\n <Scene {...rest}>\n {children}\n </Scene>\n </div>\n );\n };\n\n const [render, setRender] = useState(() => {\n // No need to await anything, we can render the final component right away.\n if (data && !heap.pendingStyles.length) {\n heap.renderInitialized = true;\n return createRender();\n }\n\n // Try to reuse the markup rendered during SSR.\n const node = document.querySelector(`[data-chunk-name=${chunkName}]`);\n if (node) {\n return (\n <div\n /* eslint-disable react/no-danger */\n dangerouslySetInnerHTML={{ __html: node.innerHTML || '' }}\n /* eslint-disable react/no-danger */\n data-chunk-name={chunkName}\n />\n );\n }\n\n // Else render placeholder, or empty div.\n const Scene = placeholder || (() => null);\n return <div><Scene {...rest}>{children}</Scene></div>;\n });\n\n // At this point, if we have data, the absense of heap.renderInitialized flag\n // means we have to await styles loading; once it is done, and if we are still\n // mounted, we can set the final render.\n if (data && !heap.renderInitialized) {\n heap.renderInitialized = true;\n Promise.all(heap.pendingStyles).then(() => {\n if (heap.mounted) setRender(createRender());\n });\n }\n\n // This effectively fires only once, just before the component unmounts.\n useEffect(() => () => {\n heap.mounted = false;\n window.CHUNK_GROUPS[chunkName].forEach((item) => {\n if (!item.endsWith('.css')) return;\n const path = `${publicPath}/${item}`;\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\n return render;\n}\n"],"file":"ClientSide.js"}
@@ -15,7 +15,7 @@ var _utils = require("../../utils");
15
15
 
16
16
  var _jsxRuntime = require("react/jsx-runtime");
17
17
 
18
- var defaultTheme = {
18
+ const defaultTheme = {
19
19
  "context": "-dr-pogodin-react-utils___src-shared-components-Dropdown-theme___context___haRIry",
20
20
  "ad": "-dr-pogodin-react-utils___src-shared-components-Dropdown-theme___ad___D4XHG2",
21
21
  "hoc": "-dr-pogodin-react-utils___src-shared-components-Dropdown-theme___hoc___N3nd34",
@@ -13,7 +13,7 @@ var _utils = require("../../utils");
13
13
 
14
14
  var _jsxRuntime = require("react/jsx-runtime");
15
15
 
16
- var defaultTheme = {
16
+ const defaultTheme = {
17
17
  "context": "-dr-pogodin-react-utils___src-shared-components-Input-theme___context___X5WszA",
18
18
  "ad": "-dr-pogodin-react-utils___src-shared-components-Input-theme___ad___8s7GCr",
19
19
  "hoc": "-dr-pogodin-react-utils___src-shared-components-Input-theme___hoc___TVlBYc",
@@ -21,7 +21,7 @@ var _reactThemes = _interopRequireDefault(require("@dr.pogodin/react-themes"));
21
21
  var _jsxRuntime = require("react/jsx-runtime");
22
22
 
23
23
  /* global document */
24
- var baseTheme = {
24
+ const baseTheme = {
25
25
  "context": "-dr-pogodin-react-utils___src-shared-components-Modal-base-theme___context___Szmbbz",
26
26
  "ad": "-dr-pogodin-react-utils___src-shared-components-Modal-base-theme___ad___Ah-Nsc",
27
27
  "hoc": "-dr-pogodin-react-utils___src-shared-components-Modal-base-theme___hoc___Wki41G",
@@ -13,7 +13,7 @@ var _utils = require("../../utils");
13
13
 
14
14
  var _jsxRuntime = require("react/jsx-runtime");
15
15
 
16
- var baseTheme = {
16
+ const baseTheme = {
17
17
  "context": "-dr-pogodin-react-utils___src-shared-components-PageLayout-base-theme___context___m4mL-M",
18
18
  "ad": "-dr-pogodin-react-utils___src-shared-components-PageLayout-base-theme___ad___m3-mdC",
19
19
  "hoc": "-dr-pogodin-react-utils___src-shared-components-PageLayout-base-theme___hoc___J15Z4H",
@@ -13,7 +13,7 @@ var _reactThemes = _interopRequireDefault(require("@dr.pogodin/react-themes"));
13
13
 
14
14
  var _jsxRuntime = require("react/jsx-runtime");
15
15
 
16
- var defaultTheme = {
16
+ const defaultTheme = {
17
17
  "context": "-dr-pogodin-react-utils___src-shared-components-Throbber-theme___context___uIObt7",
18
18
  "ad": "-dr-pogodin-react-utils___src-shared-components-Throbber-theme___ad___XIxe9o",
19
19
  "hoc": "-dr-pogodin-react-utils___src-shared-components-Throbber-theme___hoc___YOyORH",
@@ -22,7 +22,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
22
22
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
23
23
 
24
24
  /* global window */
25
- var defaultTheme = {
25
+ const defaultTheme = {
26
26
  "ad": "-dr-pogodin-react-utils___src-shared-components-WithTooltip-default-theme___ad___4xT7zE",
27
27
  "hoc": "-dr-pogodin-react-utils___src-shared-components-WithTooltip-default-theme___hoc___zd-vnH",
28
28
  "context": "-dr-pogodin-react-utils___src-shared-components-WithTooltip-default-theme___context___GdZucr",
@@ -19,14 +19,14 @@ var _Throbber = _interopRequireDefault(require("../Throbber"));
19
19
 
20
20
  var _jsxRuntime = require("react/jsx-runtime");
21
21
 
22
- var baseTheme = {
22
+ const baseTheme = {
23
23
  "context": "-dr-pogodin-react-utils___src-shared-components-YouTubeVideo-base___context___veKyYi",
24
24
  "ad": "-dr-pogodin-react-utils___src-shared-components-YouTubeVideo-base___ad___r3ABzd",
25
25
  "hoc": "-dr-pogodin-react-utils___src-shared-components-YouTubeVideo-base___hoc___YKcPnR",
26
26
  "container": "-dr-pogodin-react-utils___src-shared-components-YouTubeVideo-base___container___sXHM81",
27
27
  "video": "-dr-pogodin-react-utils___src-shared-components-YouTubeVideo-base___video___SlV2zw"
28
28
  };
29
- var throbberTheme = {
29
+ const throbberTheme = {
30
30
  "context": "-dr-pogodin-react-utils___src-shared-components-YouTubeVideo-throbber___context___dzIcLh",
31
31
  "ad": "-dr-pogodin-react-utils___src-shared-components-YouTubeVideo-throbber___ad___5a9XX1",
32
32
  "hoc": "-dr-pogodin-react-utils___src-shared-components-YouTubeVideo-throbber___hoc___7sH52O",
@@ -36,7 +36,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
36
36
  \**********************/
37
37
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
38
38
 
39
- eval("var __dirname = \"/\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"api\": function() { return /* reexport default from dynamic */ axios__WEBPACK_IMPORTED_MODULE_2___default.a; },\n/* harmony export */ \"PT\": function() { return /* reexport module object */ prop_types__WEBPACK_IMPORTED_MODULE_3__; },\n/* harmony export */ \"getGlobalState\": function() { return /* reexport safe */ _dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_4__.getGlobalState; },\n/* harmony export */ \"GlobalStateProvider\": function() { return /* reexport safe */ _dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_4__.GlobalStateProvider; },\n/* harmony export */ \"useAsyncCollection\": function() { return /* reexport safe */ _dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_4__.useAsyncCollection; },\n/* harmony export */ \"useAsyncData\": function() { return /* reexport safe */ _dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_4__.useAsyncData; },\n/* harmony export */ \"useGlobalState\": function() { return /* reexport safe */ _dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_4__.useGlobalState; },\n/* harmony export */ \"BaseModal\": function() { return /* reexport safe */ _shared_components__WEBPACK_IMPORTED_MODULE_5__.BaseModal; },\n/* harmony export */ \"Button\": function() { return /* reexport safe */ _shared_components__WEBPACK_IMPORTED_MODULE_5__.Button; },\n/* harmony export */ \"Checkbox\": function() { return /* reexport safe */ _shared_components__WEBPACK_IMPORTED_MODULE_5__.Checkbox; },\n/* harmony export */ \"Dropdown\": function() { return /* reexport safe */ _shared_components__WEBPACK_IMPORTED_MODULE_5__.Dropdown; },\n/* harmony export */ \"Input\": function() { return /* reexport safe */ _shared_components__WEBPACK_IMPORTED_MODULE_5__.Input; },\n/* harmony export */ \"Link\": function() { return /* reexport safe */ _shared_components__WEBPACK_IMPORTED_MODULE_5__.Link; },\n/* harmony export */ \"MetaTags\": function() { return /* reexport safe */ _shared_components__WEBPACK_IMPORTED_MODULE_5__.MetaTags; },\n/* harmony export */ \"Modal\": function() { return /* reexport safe */ _shared_components__WEBPACK_IMPORTED_MODULE_5__.Modal; },\n/* harmony export */ \"NavLink\": function() { return /* reexport safe */ _shared_components__WEBPACK_IMPORTED_MODULE_5__.NavLink; },\n/* harmony export */ \"PageLayout\": function() { return /* reexport safe */ _shared_components__WEBPACK_IMPORTED_MODULE_5__.PageLayout; },\n/* harmony export */ \"ScalableRect\": function() { return /* reexport safe */ _shared_components__WEBPACK_IMPORTED_MODULE_5__.ScalableRect; },\n/* harmony export */ \"Throbber\": function() { return /* reexport safe */ _shared_components__WEBPACK_IMPORTED_MODULE_5__.Throbber; },\n/* harmony export */ \"WithTooltip\": function() { return /* reexport safe */ _shared_components__WEBPACK_IMPORTED_MODULE_5__.WithTooltip; },\n/* harmony export */ \"YouTubeVideo\": function() { return /* reexport safe */ _shared_components__WEBPACK_IMPORTED_MODULE_5__.YouTubeVideo; },\n/* harmony export */ \"client\": function() { return /* reexport safe */ _shared_components__WEBPACK_IMPORTED_MODULE_5__.client; },\n/* harmony export */ \"Barrier\": function() { return /* reexport safe */ _shared_utils__WEBPACK_IMPORTED_MODULE_1__.Barrier; },\n/* harmony export */ \"Emitter\": function() { return /* reexport safe */ _shared_utils__WEBPACK_IMPORTED_MODULE_1__.Emitter; },\n/* harmony export */ \"JU\": function() { return /* reexport safe */ _shared_utils__WEBPACK_IMPORTED_MODULE_1__.JU; },\n/* harmony export */ \"Semaphore\": function() { return /* reexport safe */ _shared_utils__WEBPACK_IMPORTED_MODULE_1__.Semaphore; },\n/* harmony export */ \"ThemeProvider\": function() { return /* reexport safe */ _shared_utils__WEBPACK_IMPORTED_MODULE_1__.ThemeProvider; },\n/* harmony export */ \"config\": function() { return /* reexport safe */ _shared_utils__WEBPACK_IMPORTED_MODULE_1__.config; },\n/* harmony export */ \"isomorphy\": function() { return /* reexport safe */ _shared_utils__WEBPACK_IMPORTED_MODULE_1__.isomorphy; },\n/* harmony export */ \"newBarrier\": function() { return /* reexport safe */ _shared_utils__WEBPACK_IMPORTED_MODULE_1__.newBarrier; },\n/* harmony export */ \"splitComponent\": function() { return /* reexport safe */ _shared_utils__WEBPACK_IMPORTED_MODULE_1__.splitComponent; },\n/* harmony export */ \"themed\": function() { return /* reexport safe */ _shared_utils__WEBPACK_IMPORTED_MODULE_1__.themed; },\n/* harmony export */ \"time\": function() { return /* reexport safe */ _shared_utils__WEBPACK_IMPORTED_MODULE_1__.time; },\n/* harmony export */ \"webpack\": function() { return /* reexport safe */ _shared_utils__WEBPACK_IMPORTED_MODULE_1__.webpack; },\n/* harmony export */ \"withRetries\": function() { return /* reexport safe */ _shared_utils__WEBPACK_IMPORTED_MODULE_1__.withRetries; },\n/* harmony export */ \"server\": function() { return /* binding */ server; }\n/* harmony export */ });\n/* harmony import */ var _styles_global_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./styles/global.scss */ \"./src/styles/global.scss\");\n/* harmony import */ var _shared_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./shared/utils */ \"./src/shared/utils/index.js\");\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! axios */ \"axios\");\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"prop-types\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @dr.pogodin/react-global-state */ \"@dr.pogodin/react-global-state\");\n/* harmony import */ var _dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _shared_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./shared/components */ \"./src/shared/components/index.js\");\n\n\nvar server = _shared_utils__WEBPACK_IMPORTED_MODULE_1__.webpack.requireWeak('./server', __dirname);\n\n\n\n\n\n\n\n\n//# sourceURL=webpack://@dr.pogodin/react-utils/./src/index.js?");
39
+ eval("var __dirname = \"/\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Barrier\": function() { return /* reexport safe */ _shared_utils__WEBPACK_IMPORTED_MODULE_1__.Barrier; },\n/* harmony export */ \"BaseModal\": function() { return /* reexport safe */ _shared_components__WEBPACK_IMPORTED_MODULE_5__.BaseModal; },\n/* harmony export */ \"Button\": function() { return /* reexport safe */ _shared_components__WEBPACK_IMPORTED_MODULE_5__.Button; },\n/* harmony export */ \"Checkbox\": function() { return /* reexport safe */ _shared_components__WEBPACK_IMPORTED_MODULE_5__.Checkbox; },\n/* harmony export */ \"Dropdown\": function() { return /* reexport safe */ _shared_components__WEBPACK_IMPORTED_MODULE_5__.Dropdown; },\n/* harmony export */ \"Emitter\": function() { return /* reexport safe */ _shared_utils__WEBPACK_IMPORTED_MODULE_1__.Emitter; },\n/* harmony export */ \"GlobalStateProvider\": function() { return /* reexport safe */ _dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_4__.GlobalStateProvider; },\n/* harmony export */ \"Input\": function() { return /* reexport safe */ _shared_components__WEBPACK_IMPORTED_MODULE_5__.Input; },\n/* harmony export */ \"JU\": function() { return /* reexport safe */ _shared_utils__WEBPACK_IMPORTED_MODULE_1__.JU; },\n/* harmony export */ \"Link\": function() { return /* reexport safe */ _shared_components__WEBPACK_IMPORTED_MODULE_5__.Link; },\n/* harmony export */ \"MetaTags\": function() { return /* reexport safe */ _shared_components__WEBPACK_IMPORTED_MODULE_5__.MetaTags; },\n/* harmony export */ \"Modal\": function() { return /* reexport safe */ _shared_components__WEBPACK_IMPORTED_MODULE_5__.Modal; },\n/* harmony export */ \"NavLink\": function() { return /* reexport safe */ _shared_components__WEBPACK_IMPORTED_MODULE_5__.NavLink; },\n/* harmony export */ \"PT\": function() { return /* reexport module object */ prop_types__WEBPACK_IMPORTED_MODULE_3__; },\n/* harmony export */ \"PageLayout\": function() { return /* reexport safe */ _shared_components__WEBPACK_IMPORTED_MODULE_5__.PageLayout; },\n/* harmony export */ \"ScalableRect\": function() { return /* reexport safe */ _shared_components__WEBPACK_IMPORTED_MODULE_5__.ScalableRect; },\n/* harmony export */ \"Semaphore\": function() { return /* reexport safe */ _shared_utils__WEBPACK_IMPORTED_MODULE_1__.Semaphore; },\n/* harmony export */ \"ThemeProvider\": function() { return /* reexport safe */ _shared_utils__WEBPACK_IMPORTED_MODULE_1__.ThemeProvider; },\n/* harmony export */ \"Throbber\": function() { return /* reexport safe */ _shared_components__WEBPACK_IMPORTED_MODULE_5__.Throbber; },\n/* harmony export */ \"WithTooltip\": function() { return /* reexport safe */ _shared_components__WEBPACK_IMPORTED_MODULE_5__.WithTooltip; },\n/* harmony export */ \"YouTubeVideo\": function() { return /* reexport safe */ _shared_components__WEBPACK_IMPORTED_MODULE_5__.YouTubeVideo; },\n/* harmony export */ \"api\": function() { return /* reexport default from dynamic */ axios__WEBPACK_IMPORTED_MODULE_2___default.a; },\n/* harmony export */ \"client\": function() { return /* reexport safe */ _shared_components__WEBPACK_IMPORTED_MODULE_5__.client; },\n/* harmony export */ \"config\": function() { return /* reexport safe */ _shared_utils__WEBPACK_IMPORTED_MODULE_1__.config; },\n/* harmony export */ \"getGlobalState\": function() { return /* reexport safe */ _dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_4__.getGlobalState; },\n/* harmony export */ \"isomorphy\": function() { return /* reexport safe */ _shared_utils__WEBPACK_IMPORTED_MODULE_1__.isomorphy; },\n/* harmony export */ \"newBarrier\": function() { return /* reexport safe */ _shared_utils__WEBPACK_IMPORTED_MODULE_1__.newBarrier; },\n/* harmony export */ \"server\": function() { return /* binding */ server; },\n/* harmony export */ \"splitComponent\": function() { return /* reexport safe */ _shared_utils__WEBPACK_IMPORTED_MODULE_1__.splitComponent; },\n/* harmony export */ \"themed\": function() { return /* reexport safe */ _shared_utils__WEBPACK_IMPORTED_MODULE_1__.themed; },\n/* harmony export */ \"time\": function() { return /* reexport safe */ _shared_utils__WEBPACK_IMPORTED_MODULE_1__.time; },\n/* harmony export */ \"useAsyncCollection\": function() { return /* reexport safe */ _dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_4__.useAsyncCollection; },\n/* harmony export */ \"useAsyncData\": function() { return /* reexport safe */ _dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_4__.useAsyncData; },\n/* harmony export */ \"useGlobalState\": function() { return /* reexport safe */ _dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_4__.useGlobalState; },\n/* harmony export */ \"webpack\": function() { return /* reexport safe */ _shared_utils__WEBPACK_IMPORTED_MODULE_1__.webpack; },\n/* harmony export */ \"withRetries\": function() { return /* reexport safe */ _shared_utils__WEBPACK_IMPORTED_MODULE_1__.withRetries; }\n/* harmony export */ });\n/* harmony import */ var _styles_global_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./styles/global.scss */ \"./src/styles/global.scss\");\n/* harmony import */ var _shared_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./shared/utils */ \"./src/shared/utils/index.js\");\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! axios */ \"axios\");\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"prop-types\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @dr.pogodin/react-global-state */ \"@dr.pogodin/react-global-state\");\n/* harmony import */ var _dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _shared_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./shared/components */ \"./src/shared/components/index.js\");\n\n\nvar server = _shared_utils__WEBPACK_IMPORTED_MODULE_1__.webpack.requireWeak('./server', __dirname);\n\n\n\n\n\n\n\n\n//# sourceURL=webpack://@dr.pogodin/react-utils/./src/index.js?");
40
40
 
41
41
  /***/ }),
42
42
 
@@ -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 */ ClientSide; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"@babel/runtime/helpers/slicedToArray\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"@babel/runtime/helpers/defineProperty\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ \"@babel/runtime/helpers/objectWithoutProperties\");\n/* harmony import */ var _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @dr.pogodin/react-global-state */ \"@dr.pogodin/react-global-state\");\n/* harmony import */ var _dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _utils_Barrier__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/Barrier */ \"./src/shared/utils/Barrier.js\");\n/* harmony import */ var _utils_isomorphy__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/isomorphy */ \"./src/shared/utils/isomorphy.js\");\n/* harmony import */ var _utils_time__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../utils/time */ \"./src/shared/utils/time.js\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n\n\n\nvar _excluded = [\"chunkName\", \"children\", \"getClientSide\", \"placeholder\", \"serverSide\"];\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\n/**\n * Client-side implementation of a split code chunk.\n */\n\n/* global document, window */\n\n/* eslint-disable react/jsx-props-no-spreading */\n\n\n\n\n\n\nfunction ClientSide(_ref) {\n var chunkName = _ref.chunkName,\n children = _ref.children,\n getClientSide = _ref.getClientSide,\n placeholder = _ref.placeholder,\n serverSide = _ref.serverSide,\n rest = _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2___default()(_ref, _excluded);\n\n var _useRef = (0,react__WEBPACK_IMPORTED_MODULE_3__.useRef)({\n mounted: false,\n pendingStyles: [],\n renderInitialized: false\n }),\n heap = _useRef.current; // publicPath from buildInfo does not have a trailing slash at the end.\n\n\n var _getBuildInfo = (0,_utils_isomorphy__WEBPACK_IMPORTED_MODULE_6__.getBuildInfo)(),\n publicPath = _getBuildInfo.publicPath; // This code block initiates style loading as soon as possible, even prior to\n // the component loading, and it collects all style load / failure promises\n // into heap.pendingStyles array, allowing us to wait and thus avoid flash of\n // unstyled content issue (that's why we don't rely on mini-css-extract-plugin\n // to handle CSS chunk mounting and unmounting, which it is able to do).\n\n\n if (!heap.mounted) {\n heap.mounted = true;\n window.CHUNK_GROUPS[chunkName].forEach(function (asset) {\n if (!asset.endsWith('.css')) return;\n var path = \"\".concat(publicPath, \"/\").concat(asset);\n var 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 var barrier = (0,_utils_Barrier__WEBPACK_IMPORTED_MODULE_5__.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 var head = document.querySelector('head');\n head.appendChild(link);\n }\n\n if (!link.dependants) link.dependants = new Set([chunkName]);else link.dependants.add(chunkName);\n });\n } // Async loading of React component necessary to render the chunk.\n\n\n var _useAsyncData = (0,_dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_4__.useAsyncData)(\"dr_pogodin_react_utils___split_components.\".concat(chunkName), getClientSide, {\n maxage: _utils_time__WEBPACK_IMPORTED_MODULE_7__[\"default\"].YEAR_MS\n }),\n data = _useAsyncData.data;\n\n var createRender = function createRender() {\n var Scene = data.default || data;\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(\"div\", {\n \"data-chunk-name\": chunkName,\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(Scene, _objectSpread(_objectSpread({}, rest), {}, {\n children: children\n }))\n });\n };\n\n var _useState = (0,react__WEBPACK_IMPORTED_MODULE_3__.useState)(function () {\n // No need to await anything, we can render the final component right away.\n if (data && !heap.pendingStyles.length) {\n heap.renderInitialized = true;\n return createRender();\n } // Try to reuse the markup rendered during SSR.\n\n\n // Try to reuse the markup rendered during SSR.\n var node = document.querySelector(\"[data-chunk-name=\".concat(chunkName, \"]\"));\n\n if (node) {\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(\"div\", {\n /* eslint-disable react/no-danger */\n dangerouslySetInnerHTML: {\n __html: node.innerHTML || ''\n }\n /* eslint-disable react/no-danger */\n ,\n\n /* eslint-disable react/no-danger */\n \"data-chunk-name\": chunkName\n });\n } // Else render placeholder, or empty div.\n\n\n // Else render placeholder, or empty div.\n var Scene = placeholder || function () {\n return null;\n };\n\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(\"div\", {\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(Scene, _objectSpread(_objectSpread({}, rest), {}, {\n children: children\n }))\n });\n }),\n _useState2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_useState, 2),\n render = _useState2[0],\n setRender = _useState2[1]; // At this point, if we have data, the absense of heap.renderInitialized flag\n // means we have to await styles loading; once it is done, and if we are still\n // mounted, we can set the final render.\n\n\n if (data && !heap.renderInitialized) {\n heap.renderInitialized = true;\n Promise.all(heap.pendingStyles).then(function () {\n if (heap.mounted) setRender(createRender());\n });\n } // This effectively fires only once, just before the component unmounts.\n\n\n (0,react__WEBPACK_IMPORTED_MODULE_3__.useEffect)(function () {\n return function () {\n heap.mounted = false;\n window.CHUNK_GROUPS[chunkName].forEach(function (item) {\n if (!item.endsWith('.css')) return;\n var path = \"\".concat(publicPath, \"/\").concat(item);\n var link = document.querySelector(\"link[href=\\\"\".concat(path, \"\\\"]\"));\n link.dependants.delete(chunkName);\n\n if (!link.dependants.size) {\n var head = document.querySelector('head');\n head.removeChild(link);\n }\n });\n };\n }, [chunkName, heap, publicPath]);\n return render;\n}\n\n//# sourceURL=webpack://@dr.pogodin/react-utils/./src/shared/components/CodeSplit/ClientSide.jsx?");
69
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ ClientSide; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"@babel/runtime/helpers/slicedToArray\");\n/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"@babel/runtime/helpers/defineProperty\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ \"@babel/runtime/helpers/objectWithoutProperties\");\n/* harmony import */ var _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @dr.pogodin/react-global-state */ \"@dr.pogodin/react-global-state\");\n/* harmony import */ var _dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _utils_Barrier__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/Barrier */ \"./src/shared/utils/Barrier.js\");\n/* harmony import */ var _utils_isomorphy__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/isomorphy */ \"./src/shared/utils/isomorphy.js\");\n/* harmony import */ var _utils_time__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../utils/time */ \"./src/shared/utils/time.js\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n\n\n\nvar _excluded = [\"chunkName\", \"children\", \"getClientSide\", \"placeholder\", \"serverSide\"];\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\n/**\n * Client-side implementation of a split code chunk.\n */\n\n/* global document, window */\n\n/* eslint-disable react/jsx-props-no-spreading */\n\n\n\n\n\n\nfunction ClientSide(_ref) {\n var chunkName = _ref.chunkName,\n children = _ref.children,\n getClientSide = _ref.getClientSide,\n placeholder = _ref.placeholder,\n serverSide = _ref.serverSide,\n rest = _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2___default()(_ref, _excluded);\n\n var _useRef = (0,react__WEBPACK_IMPORTED_MODULE_3__.useRef)({\n mounted: false,\n pendingStyles: [],\n renderInitialized: false\n }),\n heap = _useRef.current; // publicPath from buildInfo does not have a trailing slash at the end.\n\n\n var _getBuildInfo = (0,_utils_isomorphy__WEBPACK_IMPORTED_MODULE_6__.getBuildInfo)(),\n publicPath = _getBuildInfo.publicPath; // This code block initiates style loading as soon as possible, even prior to\n // the component loading, and it collects all style load / failure promises\n // into heap.pendingStyles array, allowing us to wait and thus avoid flash of\n // unstyled content issue (that's why we don't rely on mini-css-extract-plugin\n // to handle CSS chunk mounting and unmounting, which it is able to do).\n\n\n if (!heap.mounted) {\n heap.mounted = true;\n window.CHUNK_GROUPS[chunkName].forEach(function (asset) {\n var _window, _window$STYLESHEET_US;\n\n if (!asset.endsWith('.css')) return;\n var path = \"\".concat(publicPath, \"/\").concat(asset);\n var 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 var barrier = (0,_utils_Barrier__WEBPACK_IMPORTED_MODULE_5__.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 var 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 } // Async loading of React component necessary to render the chunk.\n\n\n var _useAsyncData = (0,_dr_pogodin_react_global_state__WEBPACK_IMPORTED_MODULE_4__.useAsyncData)(\"dr_pogodin_react_utils___split_components.\".concat(chunkName), getClientSide, {\n maxage: _utils_time__WEBPACK_IMPORTED_MODULE_7__[\"default\"].YEAR_MS\n }),\n data = _useAsyncData.data;\n\n var createRender = function createRender() {\n var Scene = data.default || data;\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(\"div\", {\n \"data-chunk-name\": chunkName,\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(Scene, _objectSpread(_objectSpread({}, rest), {}, {\n children: children\n }))\n });\n };\n\n var _useState = (0,react__WEBPACK_IMPORTED_MODULE_3__.useState)(function () {\n // No need to await anything, we can render the final component right away.\n if (data && !heap.pendingStyles.length) {\n heap.renderInitialized = true;\n return createRender();\n } // Try to reuse the markup rendered during SSR.\n\n\n // Try to reuse the markup rendered during SSR.\n var node = document.querySelector(\"[data-chunk-name=\".concat(chunkName, \"]\"));\n\n if (node) {\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(\"div\", {\n /* eslint-disable react/no-danger */\n dangerouslySetInnerHTML: {\n __html: node.innerHTML || ''\n }\n /* eslint-disable react/no-danger */\n ,\n\n /* eslint-disable react/no-danger */\n \"data-chunk-name\": chunkName\n });\n } // Else render placeholder, or empty div.\n\n\n // Else render placeholder, or empty div.\n var Scene = placeholder || function () {\n return null;\n };\n\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(\"div\", {\n children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(Scene, _objectSpread(_objectSpread({}, rest), {}, {\n children: children\n }))\n });\n }),\n _useState2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_useState, 2),\n render = _useState2[0],\n setRender = _useState2[1]; // At this point, if we have data, the absense of heap.renderInitialized flag\n // means we have to await styles loading; once it is done, and if we are still\n // mounted, we can set the final render.\n\n\n if (data && !heap.renderInitialized) {\n heap.renderInitialized = true;\n Promise.all(heap.pendingStyles).then(function () {\n if (heap.mounted) setRender(createRender());\n });\n } // This effectively fires only once, just before the component unmounts.\n\n\n (0,react__WEBPACK_IMPORTED_MODULE_3__.useEffect)(function () {\n return function () {\n heap.mounted = false;\n window.CHUNK_GROUPS[chunkName].forEach(function (item) {\n if (!item.endsWith('.css')) return;\n var path = \"\".concat(publicPath, \"/\").concat(item);\n\n if (--window.STYLESHEET_USAGE_COUNTERS[path] <= 0) {\n var link = document.querySelector(\"link[href=\\\"\".concat(path, \"\\\"]\"));\n var head = document.querySelector('head');\n head.removeChild(link);\n }\n });\n };\n }, [chunkName, heap, publicPath]);\n return render;\n}\n\n//# sourceURL=webpack://@dr.pogodin/react-utils/./src/shared/components/CodeSplit/ClientSide.jsx?");
70
70
 
71
71
  /***/ }),
72
72
 
@@ -216,7 +216,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _bab
216
216
  \****************************************/
217
217
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
218
218
 
219
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Button\": function() { return /* reexport safe */ _Button__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; },\n/* harmony export */ \"Checkbox\": function() { return /* reexport safe */ _Checkbox__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; },\n/* harmony export */ \"client\": function() { return /* reexport safe */ _client__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; },\n/* harmony export */ \"Dropdown\": function() { return /* reexport safe */ _Dropdown__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; },\n/* harmony export */ \"Input\": function() { return /* reexport safe */ _Input__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; },\n/* harmony export */ \"Link\": function() { return /* reexport safe */ _Link__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; },\n/* harmony export */ \"PageLayout\": function() { return /* reexport safe */ _PageLayout__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; },\n/* harmony export */ \"MetaTags\": function() { return /* reexport safe */ _MetaTags__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; },\n/* harmony export */ \"Modal\": function() { return /* reexport safe */ _Modal__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; },\n/* harmony export */ \"BaseModal\": function() { return /* reexport safe */ _Modal__WEBPACK_IMPORTED_MODULE_8__.BaseModal; },\n/* harmony export */ \"NavLink\": function() { return /* reexport safe */ _NavLink__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; },\n/* harmony export */ \"ScalableRect\": function() { return /* reexport safe */ _ScalableRect__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; },\n/* harmony export */ \"Throbber\": function() { return /* reexport safe */ _Throbber__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; },\n/* harmony export */ \"WithTooltip\": function() { return /* reexport safe */ _WithTooltip__WEBPACK_IMPORTED_MODULE_12__[\"default\"]; },\n/* harmony export */ \"YouTubeVideo\": function() { return /* reexport safe */ _YouTubeVideo__WEBPACK_IMPORTED_MODULE_13__[\"default\"]; }\n/* harmony export */ });\n/* harmony import */ var _Button__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Button */ \"./src/shared/components/Button/index.jsx\");\n/* harmony import */ var _Checkbox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Checkbox */ \"./src/shared/components/Checkbox/index.jsx\");\n/* harmony import */ var _client__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../client */ \"./src/client/index.jsx\");\n/* harmony import */ var _Dropdown__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Dropdown */ \"./src/shared/components/Dropdown/index.jsx\");\n/* harmony import */ var _Input__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Input */ \"./src/shared/components/Input/index.jsx\");\n/* harmony import */ var _Link__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Link */ \"./src/shared/components/Link.jsx\");\n/* harmony import */ var _PageLayout__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./PageLayout */ \"./src/shared/components/PageLayout/index.jsx\");\n/* harmony import */ var _MetaTags__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./MetaTags */ \"./src/shared/components/MetaTags.jsx\");\n/* harmony import */ var _Modal__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Modal */ \"./src/shared/components/Modal/index.jsx\");\n/* harmony import */ var _NavLink__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./NavLink */ \"./src/shared/components/NavLink.jsx\");\n/* harmony import */ var _ScalableRect__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./ScalableRect */ \"./src/shared/components/ScalableRect/index.jsx\");\n/* harmony import */ var _Throbber__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Throbber */ \"./src/shared/components/Throbber/index.jsx\");\n/* harmony import */ var _WithTooltip__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./WithTooltip */ \"./src/shared/components/WithTooltip/index.jsx\");\n/* harmony import */ var _YouTubeVideo__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./YouTubeVideo */ \"./src/shared/components/YouTubeVideo/index.jsx\");\n/**\n * Just an aggregation of all exported components into a single module.\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack://@dr.pogodin/react-utils/./src/shared/components/index.js?");
219
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"BaseModal\": function() { return /* reexport safe */ _Modal__WEBPACK_IMPORTED_MODULE_8__.BaseModal; },\n/* harmony export */ \"Button\": function() { return /* reexport safe */ _Button__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; },\n/* harmony export */ \"Checkbox\": function() { return /* reexport safe */ _Checkbox__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; },\n/* harmony export */ \"Dropdown\": function() { return /* reexport safe */ _Dropdown__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; },\n/* harmony export */ \"Input\": function() { return /* reexport safe */ _Input__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; },\n/* harmony export */ \"Link\": function() { return /* reexport safe */ _Link__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; },\n/* harmony export */ \"MetaTags\": function() { return /* reexport safe */ _MetaTags__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; },\n/* harmony export */ \"Modal\": function() { return /* reexport safe */ _Modal__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; },\n/* harmony export */ \"NavLink\": function() { return /* reexport safe */ _NavLink__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; },\n/* harmony export */ \"PageLayout\": function() { return /* reexport safe */ _PageLayout__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; },\n/* harmony export */ \"ScalableRect\": function() { return /* reexport safe */ _ScalableRect__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; },\n/* harmony export */ \"Throbber\": function() { return /* reexport safe */ _Throbber__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; },\n/* harmony export */ \"WithTooltip\": function() { return /* reexport safe */ _WithTooltip__WEBPACK_IMPORTED_MODULE_12__[\"default\"]; },\n/* harmony export */ \"YouTubeVideo\": function() { return /* reexport safe */ _YouTubeVideo__WEBPACK_IMPORTED_MODULE_13__[\"default\"]; },\n/* harmony export */ \"client\": function() { return /* reexport safe */ _client__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; }\n/* harmony export */ });\n/* harmony import */ var _Button__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Button */ \"./src/shared/components/Button/index.jsx\");\n/* harmony import */ var _Checkbox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Checkbox */ \"./src/shared/components/Checkbox/index.jsx\");\n/* harmony import */ var _client__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../client */ \"./src/client/index.jsx\");\n/* harmony import */ var _Dropdown__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Dropdown */ \"./src/shared/components/Dropdown/index.jsx\");\n/* harmony import */ var _Input__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Input */ \"./src/shared/components/Input/index.jsx\");\n/* harmony import */ var _Link__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Link */ \"./src/shared/components/Link.jsx\");\n/* harmony import */ var _PageLayout__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./PageLayout */ \"./src/shared/components/PageLayout/index.jsx\");\n/* harmony import */ var _MetaTags__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./MetaTags */ \"./src/shared/components/MetaTags.jsx\");\n/* harmony import */ var _Modal__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Modal */ \"./src/shared/components/Modal/index.jsx\");\n/* harmony import */ var _NavLink__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./NavLink */ \"./src/shared/components/NavLink.jsx\");\n/* harmony import */ var _ScalableRect__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./ScalableRect */ \"./src/shared/components/ScalableRect/index.jsx\");\n/* harmony import */ var _Throbber__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Throbber */ \"./src/shared/components/Throbber/index.jsx\");\n/* harmony import */ var _WithTooltip__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./WithTooltip */ \"./src/shared/components/WithTooltip/index.jsx\");\n/* harmony import */ var _YouTubeVideo__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./YouTubeVideo */ \"./src/shared/components/YouTubeVideo/index.jsx\");\n/**\n * Just an aggregation of all exported components into a single module.\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack://@dr.pogodin/react-utils/./src/shared/components/index.js?");
220
220
 
221
221
  /***/ }),
222
222
 
@@ -266,7 +266,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _web
266
266
  \***********************************/
267
267
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
268
268
 
269
- eval("var __dirname = \"/\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Barrier\": function() { return /* reexport safe */ _Barrier__WEBPACK_IMPORTED_MODULE_7__.Barrier; },\n/* harmony export */ \"newBarrier\": function() { return /* reexport safe */ _Barrier__WEBPACK_IMPORTED_MODULE_7__.newBarrier; },\n/* harmony export */ \"Emitter\": function() { return /* reexport safe */ _Emitter__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; },\n/* harmony export */ \"Semaphore\": function() { return /* reexport safe */ _Semaphore__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; },\n/* harmony export */ \"splitComponent\": function() { return /* reexport safe */ _splitComponent__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; },\n/* harmony export */ \"withRetries\": function() { return /* binding */ withRetries; },\n/* harmony export */ \"config\": function() { return /* reexport safe */ _config__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; },\n/* harmony export */ \"isomorphy\": function() { return /* reexport module object */ _isomorphy__WEBPACK_IMPORTED_MODULE_4__; },\n/* harmony export */ \"JU\": function() { return /* binding */ JU; },\n/* harmony export */ \"themed\": function() { return /* reexport default from dynamic */ _dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_2___default.a; },\n/* harmony export */ \"ThemeProvider\": function() { return /* reexport safe */ _dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_2__.ThemeProvider; },\n/* harmony export */ \"time\": function() { return /* reexport safe */ _time__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; },\n/* harmony export */ \"webpack\": function() { return /* reexport module object */ _webpack__WEBPACK_IMPORTED_MODULE_6__; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"@babel/runtime/helpers/asyncToGenerator\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"@babel/runtime/regenerator\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @dr.pogodin/react-themes */ \"@dr.pogodin/react-themes\");\n/* harmony import */ var _dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./config */ \"./src/shared/utils/config.js\");\n/* harmony import */ var _isomorphy__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./isomorphy */ \"./src/shared/utils/isomorphy.js\");\n/* harmony import */ var _time__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./time */ \"./src/shared/utils/time.js\");\n/* harmony import */ var _webpack__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./webpack */ \"./src/shared/utils/webpack.js\");\n/* harmony import */ var _Barrier__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Barrier */ \"./src/shared/utils/Barrier.js\");\n/* harmony import */ var _Emitter__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Emitter */ \"./src/shared/utils/Emitter.js\");\n/* harmony import */ var _Semaphore__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Semaphore */ \"./src/shared/utils/Semaphore.js\");\n/* harmony import */ var _splitComponent__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./splitComponent */ \"./src/shared/utils/splitComponent.js\");\n\n\n\n\n\n\n\n\n\n\n\n(_dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_2___default().COMPOSE) = _dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_2__.COMPOSE;\n(_dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_2___default().PRIORITY) = _dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_2__.PRIORITY; // Note: it should be done this way, as in some environments\n// \"process\" might not exist, and process.env.NODE_CONFIG_ENV\n// not injected by Webpack.\n\nvar NODE_CONFIG_ENV;\n\ntry {\n NODE_CONFIG_ENV = process.env.NODE_CONFIG_ENV;\n} catch (_unused) {\n /* noop */\n}\n\nvar env = NODE_CONFIG_ENV || \"development\";\nvar JU = env !== 'production' && _webpack__WEBPACK_IMPORTED_MODULE_6__.requireWeak('./jest', __dirname);\n/**\n * @category Utilities\n * @global\n * @func withRetries\n * @desc\n * ```js\n * import { withRetries } from '@dr.pogodin/react-utils';\n * ```\n * Attempts to perform given asynchronous `action` up to `maxRetries` times,\n * with the given `interval` between attempts. If any attempt is successful,\n * the result is returned immediately, with no further attempts done;\n * otherwise, if all attempts fail, the result Promise rejects after the last\n * attempt.\n * @param {function} action\n * @param {number} [maxRetries=5] Optional. Maximum number of retries. Defaults\n * to 5 attempts.\n * @param {number} [interval=1000] Optional. Interval between retries [ms].\n * Defaults to 1 second.\n * @return {Promise} Resolves to the result of successful operation, or\n * rejects with the error from the latst failed attempt.\n * @example\n * import { withRetries } from '@dr.pogodin/react-utils';\n *\n * let firstCall = true;\n *\n * function sampleAction() {\n * if (!firstCall) return 'success';\n * firstCall = false;\n * throw Error('The first call to this method fails');\n * }\n *\n * withRetries(sampleAction).then(console.log);\n * // It will print 'success' after one second, once the second attempt\n * // is performed.\n */\n\nfunction withRetries(_x) {\n return _withRetries.apply(this, arguments);\n}\n\nfunction _withRetries() {\n _withRetries = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().mark(function _callee(action) {\n var maxRetries,\n interval,\n n,\n _args = arguments;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n maxRetries = _args.length > 1 && _args[1] !== undefined ? _args[1] : 5;\n interval = _args.length > 2 && _args[2] !== undefined ? _args[2] : 1000;\n n = 1;\n\n case 3:\n _context.prev = 3;\n _context.next = 6;\n return action();\n\n case 6:\n return _context.abrupt(\"return\", _context.sent);\n\n case 9:\n _context.prev = 9;\n _context.t0 = _context[\"catch\"](3);\n\n if (!(n < maxRetries)) {\n _context.next = 16;\n break;\n }\n\n _context.next = 14;\n return _time__WEBPACK_IMPORTED_MODULE_5__[\"default\"].timer(interval);\n\n case 14:\n _context.next = 17;\n break;\n\n case 16:\n throw _context.t0;\n\n case 17:\n ++n;\n _context.next = 3;\n break;\n\n case 20:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, null, [[3, 9]]);\n }));\n return _withRetries.apply(this, arguments);\n}\n\n\n\n//# sourceURL=webpack://@dr.pogodin/react-utils/./src/shared/utils/index.js?");
269
+ eval("var __dirname = \"/\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Barrier\": function() { return /* reexport safe */ _Barrier__WEBPACK_IMPORTED_MODULE_7__.Barrier; },\n/* harmony export */ \"Emitter\": function() { return /* reexport safe */ _Emitter__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; },\n/* harmony export */ \"JU\": function() { return /* binding */ JU; },\n/* harmony export */ \"Semaphore\": function() { return /* reexport safe */ _Semaphore__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; },\n/* harmony export */ \"ThemeProvider\": function() { return /* reexport safe */ _dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_2__.ThemeProvider; },\n/* harmony export */ \"config\": function() { return /* reexport safe */ _config__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; },\n/* harmony export */ \"isomorphy\": function() { return /* reexport module object */ _isomorphy__WEBPACK_IMPORTED_MODULE_4__; },\n/* harmony export */ \"newBarrier\": function() { return /* reexport safe */ _Barrier__WEBPACK_IMPORTED_MODULE_7__.newBarrier; },\n/* harmony export */ \"splitComponent\": function() { return /* reexport safe */ _splitComponent__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; },\n/* harmony export */ \"themed\": function() { return /* reexport default from dynamic */ _dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_2___default.a; },\n/* harmony export */ \"time\": function() { return /* reexport safe */ _time__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; },\n/* harmony export */ \"webpack\": function() { return /* reexport module object */ _webpack__WEBPACK_IMPORTED_MODULE_6__; },\n/* harmony export */ \"withRetries\": function() { return /* binding */ withRetries; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ \"@babel/runtime/helpers/asyncToGenerator\");\n/* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/regenerator */ \"@babel/runtime/regenerator\");\n/* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @dr.pogodin/react-themes */ \"@dr.pogodin/react-themes\");\n/* harmony import */ var _dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./config */ \"./src/shared/utils/config.js\");\n/* harmony import */ var _isomorphy__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./isomorphy */ \"./src/shared/utils/isomorphy.js\");\n/* harmony import */ var _time__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./time */ \"./src/shared/utils/time.js\");\n/* harmony import */ var _webpack__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./webpack */ \"./src/shared/utils/webpack.js\");\n/* harmony import */ var _Barrier__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Barrier */ \"./src/shared/utils/Barrier.js\");\n/* harmony import */ var _Emitter__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Emitter */ \"./src/shared/utils/Emitter.js\");\n/* harmony import */ var _Semaphore__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Semaphore */ \"./src/shared/utils/Semaphore.js\");\n/* harmony import */ var _splitComponent__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./splitComponent */ \"./src/shared/utils/splitComponent.js\");\n\n\n\n\n\n\n\n\n\n\n\n(_dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_2___default().COMPOSE) = _dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_2__.COMPOSE;\n(_dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_2___default().PRIORITY) = _dr_pogodin_react_themes__WEBPACK_IMPORTED_MODULE_2__.PRIORITY; // Note: it should be done this way, as in some environments\n// \"process\" might not exist, and process.env.NODE_CONFIG_ENV\n// not injected by Webpack.\n\nvar NODE_CONFIG_ENV;\n\ntry {\n NODE_CONFIG_ENV = process.env.NODE_CONFIG_ENV;\n} catch (_unused) {\n /* noop */\n}\n\nvar env = NODE_CONFIG_ENV || \"development\";\nvar JU = env !== 'production' && _webpack__WEBPACK_IMPORTED_MODULE_6__.requireWeak('./jest', __dirname);\n/**\n * @category Utilities\n * @global\n * @func withRetries\n * @desc\n * ```js\n * import { withRetries } from '@dr.pogodin/react-utils';\n * ```\n * Attempts to perform given asynchronous `action` up to `maxRetries` times,\n * with the given `interval` between attempts. If any attempt is successful,\n * the result is returned immediately, with no further attempts done;\n * otherwise, if all attempts fail, the result Promise rejects after the last\n * attempt.\n * @param {function} action\n * @param {number} [maxRetries=5] Optional. Maximum number of retries. Defaults\n * to 5 attempts.\n * @param {number} [interval=1000] Optional. Interval between retries [ms].\n * Defaults to 1 second.\n * @return {Promise} Resolves to the result of successful operation, or\n * rejects with the error from the latst failed attempt.\n * @example\n * import { withRetries } from '@dr.pogodin/react-utils';\n *\n * let firstCall = true;\n *\n * function sampleAction() {\n * if (!firstCall) return 'success';\n * firstCall = false;\n * throw Error('The first call to this method fails');\n * }\n *\n * withRetries(sampleAction).then(console.log);\n * // It will print 'success' after one second, once the second attempt\n * // is performed.\n */\n\nfunction withRetries(_x) {\n return _withRetries.apply(this, arguments);\n}\n\nfunction _withRetries() {\n _withRetries = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().mark(function _callee(action) {\n var maxRetries,\n interval,\n n,\n _args = arguments;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default().wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n maxRetries = _args.length > 1 && _args[1] !== undefined ? _args[1] : 5;\n interval = _args.length > 2 && _args[2] !== undefined ? _args[2] : 1000;\n n = 1;\n\n case 3:\n _context.prev = 3;\n _context.next = 6;\n return action();\n\n case 6:\n return _context.abrupt(\"return\", _context.sent);\n\n case 9:\n _context.prev = 9;\n _context.t0 = _context[\"catch\"](3);\n\n if (!(n < maxRetries)) {\n _context.next = 16;\n break;\n }\n\n _context.next = 14;\n return _time__WEBPACK_IMPORTED_MODULE_5__[\"default\"].timer(interval);\n\n case 14:\n _context.next = 17;\n break;\n\n case 16:\n throw _context.t0;\n\n case 17:\n ++n;\n _context.next = 3;\n break;\n\n case 20:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, null, [[3, 9]]);\n }));\n return _withRetries.apply(this, arguments);\n}\n\n\n\n//# sourceURL=webpack://@dr.pogodin/react-utils/./src/shared/utils/index.js?");
270
270
 
271
271
  /***/ }),
272
272
 
@@ -276,7 +276,7 @@ eval("var __dirname = \"/\";\n__webpack_require__.r(__webpack_exports__);\n/* ha
276
276
  \***************************************/
277
277
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
278
278
 
279
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"IS_CLIENT_SIDE\": function() { return /* binding */ IS_CLIENT_SIDE; },\n/* harmony export */ \"IS_SERVER_SIDE\": function() { return /* binding */ IS_SERVER_SIDE; },\n/* harmony export */ \"isDevBuild\": function() { return /* binding */ isDevBuild; },\n/* harmony export */ \"isProdBuild\": function() { return /* binding */ isProdBuild; },\n/* harmony export */ \"getBuildInfo\": function() { return /* binding */ getBuildInfo; },\n/* harmony export */ \"buildTimestamp\": function() { return /* binding */ buildTimestamp; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/typeof */ \"@babel/runtime/helpers/typeof\");\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__);\n\n\n/* global window */\n\n/**\n * `true` within client-side environment (browser), `false` at server-side.\n */\nvar IS_CLIENT_SIDE = (typeof process === \"undefined\" ? \"undefined\" : _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(process)) !== 'object' || !process.versions || !process.versions.node;\n/**\n * `true` within the server-side environment (node), `false` at client-side.\n */\n\nvar IS_SERVER_SIDE = !IS_CLIENT_SIDE;\n/**\n * @ignore\n * @return {string} Code mode: \"development\" or \"production\".\n */\n\nfunction getMode() {\n return \"development\";\n}\n/**\n * Returns `true` if development version of the code is running;\n * `false` otherwise.\n * @return {boolean}\n */\n\n\nfunction isDevBuild() {\n return getMode() === 'development';\n}\n/**\n * Returns `true` if production build of the code is running;\n * `false` otherwise.\n * @return {boolean}\n */\n\nfunction isProdBuild() {\n return getMode() === 'production';\n}\n/**\n * Returns build info object.\n * @returns {object}\n */\n\nfunction getBuildInfo() {\n return (IS_CLIENT_SIDE ? window : __webpack_require__.g).TRU_BUILD_INFO;\n}\n/**\n * Returns build timestamp of the front-end JS bundle.\n * @return {string} ISO date/time string.\n */\n\nfunction buildTimestamp() {\n return getBuildInfo().timestamp;\n}\n\n//# sourceURL=webpack://@dr.pogodin/react-utils/./src/shared/utils/isomorphy.js?");
279
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"IS_CLIENT_SIDE\": function() { return /* binding */ IS_CLIENT_SIDE; },\n/* harmony export */ \"IS_SERVER_SIDE\": function() { return /* binding */ IS_SERVER_SIDE; },\n/* harmony export */ \"buildTimestamp\": function() { return /* binding */ buildTimestamp; },\n/* harmony export */ \"getBuildInfo\": function() { return /* binding */ getBuildInfo; },\n/* harmony export */ \"isDevBuild\": function() { return /* binding */ isDevBuild; },\n/* harmony export */ \"isProdBuild\": function() { return /* binding */ isProdBuild; }\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/typeof */ \"@babel/runtime/helpers/typeof\");\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__);\n\n\n/* global window */\n\n/**\n * `true` within client-side environment (browser), `false` at server-side.\n */\nvar IS_CLIENT_SIDE = (typeof process === \"undefined\" ? \"undefined\" : _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(process)) !== 'object' || !process.versions || !process.versions.node;\n/**\n * `true` within the server-side environment (node), `false` at client-side.\n */\n\nvar IS_SERVER_SIDE = !IS_CLIENT_SIDE;\n/**\n * @ignore\n * @return {string} Code mode: \"development\" or \"production\".\n */\n\nfunction getMode() {\n return \"development\";\n}\n/**\n * Returns `true` if development version of the code is running;\n * `false` otherwise.\n * @return {boolean}\n */\n\n\nfunction isDevBuild() {\n return getMode() === 'development';\n}\n/**\n * Returns `true` if production build of the code is running;\n * `false` otherwise.\n * @return {boolean}\n */\n\nfunction isProdBuild() {\n return getMode() === 'production';\n}\n/**\n * Returns build info object.\n * @returns {object}\n */\n\nfunction getBuildInfo() {\n return (IS_CLIENT_SIDE ? window : __webpack_require__.g).TRU_BUILD_INFO;\n}\n/**\n * Returns build timestamp of the front-end JS bundle.\n * @return {string} ISO date/time string.\n */\n\nfunction buildTimestamp() {\n return getBuildInfo().timestamp;\n}\n\n//# sourceURL=webpack://@dr.pogodin/react-utils/./src/shared/utils/isomorphy.js?");
280
280
 
281
281
  /***/ }),
282
282
 
@@ -1,5 +1,5 @@
1
1
  "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _propTypes=_interopRequireDefault(require("prop-types"));var _Link=_interopRequireDefault(require("../Link"));var _utils=require("../../utils");var _jsxRuntime=require("react/jsx-runtime");// The <Button> component implements a standard button / button-like link.
2
- var defaultTheme={"context":"KM0v4f","ad":"_3jm1-Q","hoc":"_0plpDL","button":"E1FNQT","active":"MAe9O6","disabled":"Br9IWV"};function BaseButton({active,children,disabled,enforceA,onClick,onMouseDown,openNewTab,replace,theme,to}){let className=theme.button;if(active&&theme.active)className+=` ${theme.active}`;if(disabled){if(theme.disabled)className+=` ${theme.disabled}`;return/*#__PURE__*/(0,_jsxRuntime.jsx)("div",{className:className,children:children})}if(to){return/*#__PURE__*/(0,_jsxRuntime.jsx)(_Link.default,{className:className,enforceA:enforceA,onClick:onClick,onMouseDown:onMouseDown,openNewTab:openNewTab,replace:replace,to:to,children:children})}return/*#__PURE__*/(0,_jsxRuntime.jsx)("div",{className:className,onClick:onClick,onKeyPress:onClick,onMouseDown:onMouseDown,role:"button",tabIndex:0,children:children})}/**
2
+ const defaultTheme={"context":"KM0v4f","ad":"_3jm1-Q","hoc":"_0plpDL","button":"E1FNQT","active":"MAe9O6","disabled":"Br9IWV"};function BaseButton({active,children,disabled,enforceA,onClick,onMouseDown,openNewTab,replace,theme,to}){let className=theme.button;if(active&&theme.active)className+=` ${theme.active}`;if(disabled){if(theme.disabled)className+=` ${theme.disabled}`;return/*#__PURE__*/(0,_jsxRuntime.jsx)("div",{className:className,children:children})}if(to){return/*#__PURE__*/(0,_jsxRuntime.jsx)(_Link.default,{className:className,enforceA:enforceA,onClick:onClick,onMouseDown:onMouseDown,openNewTab:openNewTab,replace:replace,to:to,children:children})}return/*#__PURE__*/(0,_jsxRuntime.jsx)("div",{className:className,onClick:onClick,onKeyPress:onClick,onMouseDown:onMouseDown,role:"button",tabIndex:0,children:children})}/**
3
3
  * Button component theme: a map of CSS
4
4
  * class names to append to button elements:
5
5
  * @prop {string} [active] to the root element of active button.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/shared/components/Button/index.jsx"],"names":["BaseButton","active","children","disabled","enforceA","onClick","onMouseDown","openNewTab","replace","theme","to","className","button","ThemedButton","defaultTheme","defaultProps","undefined","propTypes","PT","bool","node","func","themeType","isRequired","oneOfType","object","string"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ACA;AACA;AACA;AACA;AACA;AACA;AACA,GACAA,UAAU,CAACe,YAAX,CAA0B,CACxBd,MAAM,CAAE,KADgB,CAExBC,QAAQ,CAAEc,SAFc,CAGxBb,QAAQ,CAAE,KAHc,CAIxBC,QAAQ,CAAE,KAJc,CAKxBC,OAAO,CAAEW,SALe,CAMxBV,WAAW,CAAEU,SANW,CAOxBT,UAAU,CAAE,KAPY,CAQxBC,OAAO,CAAE,KARe,CASxBE,EAAE,CAAEM,SAToB,CAA1B,CAYAhB,UAAU,CAACiB,SAAX,CAAuB,CACrBhB,MAAM,CAAEiB,mBAAGC,IADU,CAErBjB,QAAQ,CAAEgB,mBAAGE,IAFQ,CAGrBjB,QAAQ,CAAEe,mBAAGC,IAHQ,CAIrBf,QAAQ,CAAEc,mBAAGC,IAJQ,CAKrBd,OAAO,CAAEa,mBAAGG,IALS,CAMrBf,WAAW,CAAEY,mBAAGG,IANK,CAOrBd,UAAU,CAAEW,mBAAGC,IAPM,CAQrBX,OAAO,CAAEU,mBAAGC,IARS,CASrBV,KAAK,CAAEI,YAAY,CAACS,SAAb,CAAuBC,UATT,CAUrBb,EAAE,CAAEQ,mBAAGM,SAAH,CAAa,CAACN,mBAAGO,MAAJ,CAAYP,mBAAGQ,MAAf,CAAb,CAViB,CAAvB,C,aAaeb,Y","sourcesContent":["// The <Button> component implements a standard button / button-like link.\n\nimport PT from 'prop-types';\n\nimport Link from 'components/Link';\n\nimport { themed } from 'utils';\n\nimport defaultTheme from './style.scss';\n\nfunction BaseButton({\n active,\n children,\n disabled,\n enforceA,\n onClick,\n onMouseDown,\n openNewTab,\n replace,\n theme,\n to,\n}) {\n let className = theme.button;\n if (active && theme.active) className += ` ${theme.active}`;\n if (disabled) {\n if (theme.disabled) className += ` ${theme.disabled}`;\n return (\n <div className={className}>\n {children}\n </div>\n );\n }\n if (to) {\n return (\n <Link\n className={className}\n enforceA={enforceA}\n onClick={onClick}\n onMouseDown={onMouseDown}\n openNewTab={openNewTab}\n replace={replace}\n to={to}\n >\n {children}\n </Link>\n );\n }\n return (\n <div\n className={className}\n onClick={onClick}\n onKeyPress={onClick}\n onMouseDown={onMouseDown}\n role=\"button\"\n tabIndex={0}\n >\n {children}\n </div>\n );\n}\n\n/**\n * Button component theme: a map of CSS\n * class names to append to button elements:\n * @prop {string} [active] to the root element of active button.\n * @prop {string} [button] to the root element of any button.\n * @prop {string} [disabled] to the root element of disabled button.\n */\nconst ThemedButton = themed('Button', [\n 'active',\n 'button',\n 'disabled',\n], defaultTheme)(BaseButton);\n\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 */\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};\n\nBaseButton.propTypes = {\n active: PT.bool,\n children: PT.node,\n disabled: PT.bool,\n enforceA: PT.bool,\n onClick: PT.func,\n onMouseDown: PT.func,\n openNewTab: PT.bool,\n replace: PT.bool,\n theme: ThemedButton.themeType.isRequired,\n to: PT.oneOfType([PT.object, PT.string]),\n};\n\nexport default ThemedButton;\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../../../src/shared/components/Button/index.jsx"],"names":["BaseButton","active","children","disabled","enforceA","onClick","onMouseDown","openNewTab","replace","theme","to","className","button","ThemedButton","defaultTheme","defaultProps","undefined","propTypes","PT","bool","node","func","themeType","isRequired","oneOfType","object","string"],"mappings":"gLAEA,6DAEA,qDAEA,kC,6CANA;+HAUA,QAASA,CAAAA,UAAT,CAAoB,CAClBC,MADkB,CAElBC,QAFkB,CAGlBC,QAHkB,CAIlBC,QAJkB,CAKlBC,OALkB,CAMlBC,WANkB,CAOlBC,UAPkB,CAQlBC,OARkB,CASlBC,KATkB,CAUlBC,EAVkB,CAApB,CAWG,CACD,GAAIC,CAAAA,SAAS,CAAGF,KAAK,CAACG,MAAtB,CACA,GAAIX,MAAM,EAAIQ,KAAK,CAACR,MAApB,CAA4BU,SAAS,EAAK,IAAGF,KAAK,CAACR,MAAO,EAA9B,CAC5B,GAAIE,QAAJ,CAAc,CACZ,GAAIM,KAAK,CAACN,QAAV,CAAoBQ,SAAS,EAAK,IAAGF,KAAK,CAACN,QAAS,EAAhC,CACpB,mBACE,2BAAK,SAAS,CAAEQ,SAAhB,UACGT,QADH,EAIH,CACD,GAAIQ,EAAJ,CAAQ,CACN,mBACE,oBAAC,aAAD,EACE,SAAS,CAAEC,SADb,CAEE,QAAQ,CAAEP,QAFZ,CAGE,OAAO,CAAEC,OAHX,CAIE,WAAW,CAAEC,WAJf,CAKE,UAAU,CAAEC,UALd,CAME,OAAO,CAAEC,OANX,CAOE,EAAE,CAAEE,EAPN,UASGR,QATH,EAYH,CACD,mBACE,2BACE,SAAS,CAAES,SADb,CAEE,OAAO,CAAEN,OAFX,CAGE,UAAU,CAAEA,OAHd,CAIE,WAAW,CAAEC,WAJf,CAKE,IAAI,CAAC,QALP,CAME,QAAQ,CAAE,CANZ,UAQGJ,QARH,EAWH,CAED;AACA;AACA;AACA;AACA;AACA;AACA,GACA,KAAMW,CAAAA,YAAY,CAAG,kBAAO,QAAP,CAAiB,CACpC,QADoC,CAEpC,QAFoC,CAGpC,UAHoC,CAAjB,CAIlBC,YAJkB,EAIJd,UAJI,CAArB,CAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACAA,UAAU,CAACe,YAAX,CAA0B,CACxBd,MAAM,CAAE,KADgB,CAExBC,QAAQ,CAAEc,SAFc,CAGxBb,QAAQ,CAAE,KAHc,CAIxBC,QAAQ,CAAE,KAJc,CAKxBC,OAAO,CAAEW,SALe,CAMxBV,WAAW,CAAEU,SANW,CAOxBT,UAAU,CAAE,KAPY,CAQxBC,OAAO,CAAE,KARe,CASxBE,EAAE,CAAEM,SAToB,CAA1B,CAYAhB,UAAU,CAACiB,SAAX,CAAuB,CACrBhB,MAAM,CAAEiB,mBAAGC,IADU,CAErBjB,QAAQ,CAAEgB,mBAAGE,IAFQ,CAGrBjB,QAAQ,CAAEe,mBAAGC,IAHQ,CAIrBf,QAAQ,CAAEc,mBAAGC,IAJQ,CAKrBd,OAAO,CAAEa,mBAAGG,IALS,CAMrBf,WAAW,CAAEY,mBAAGG,IANK,CAOrBd,UAAU,CAAEW,mBAAGC,IAPM,CAQrBX,OAAO,CAAEU,mBAAGC,IARS,CASrBV,KAAK,CAAEI,YAAY,CAACS,SAAb,CAAuBC,UATT,CAUrBb,EAAE,CAAEQ,mBAAGM,SAAH,CAAa,CAACN,mBAAGO,MAAJ,CAAYP,mBAAGQ,MAAf,CAAb,CAViB,CAAvB,C,aAaeb,Y","sourcesContent":["// The <Button> component implements a standard button / button-like link.\n\nimport PT from 'prop-types';\n\nimport Link from 'components/Link';\n\nimport { themed } from 'utils';\n\nimport defaultTheme from './style.scss';\n\nfunction BaseButton({\n active,\n children,\n disabled,\n enforceA,\n onClick,\n onMouseDown,\n openNewTab,\n replace,\n theme,\n to,\n}) {\n let className = theme.button;\n if (active && theme.active) className += ` ${theme.active}`;\n if (disabled) {\n if (theme.disabled) className += ` ${theme.disabled}`;\n return (\n <div className={className}>\n {children}\n </div>\n );\n }\n if (to) {\n return (\n <Link\n className={className}\n enforceA={enforceA}\n onClick={onClick}\n onMouseDown={onMouseDown}\n openNewTab={openNewTab}\n replace={replace}\n to={to}\n >\n {children}\n </Link>\n );\n }\n return (\n <div\n className={className}\n onClick={onClick}\n onKeyPress={onClick}\n onMouseDown={onMouseDown}\n role=\"button\"\n tabIndex={0}\n >\n {children}\n </div>\n );\n}\n\n/**\n * Button component theme: a map of CSS\n * class names to append to button elements:\n * @prop {string} [active] to the root element of active button.\n * @prop {string} [button] to the root element of any button.\n * @prop {string} [disabled] to the root element of disabled button.\n */\nconst ThemedButton = themed('Button', [\n 'active',\n 'button',\n 'disabled',\n], defaultTheme)(BaseButton);\n\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 */\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};\n\nBaseButton.propTypes = {\n active: PT.bool,\n children: PT.node,\n disabled: PT.bool,\n enforceA: PT.bool,\n onClick: PT.func,\n onMouseDown: PT.func,\n openNewTab: PT.bool,\n replace: PT.bool,\n theme: ThemedButton.themeType.isRequired,\n to: PT.oneOfType([PT.object, PT.string]),\n};\n\nexport default ThemedButton;\n"],"file":"index.js"}
@@ -1,4 +1,4 @@
1
- "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _propTypes=_interopRequireDefault(require("prop-types"));var _utils=require("../../utils");var _jsxRuntime=require("react/jsx-runtime");var defaultTheme={"context":"dNQcC6","ad":"earXxa","hoc":"qAPfQ6","checkbox":"A-f8qJ","container":"Kr0g3M","label":"_3dML-O"};function Checkbox({checked,label,onChange,theme}){return/*#__PURE__*/(0,_jsxRuntime.jsxs)("div",{className:theme.container,children:[label===undefined?null:/*#__PURE__*/(0,_jsxRuntime.jsx)("p",{className:theme.label,children:label}),/*#__PURE__*/(0,_jsxRuntime.jsx)("input",{checked:checked,className:theme.checkbox,onChange:onChange,type:"checkbox"})]})}/**
1
+ "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _propTypes=_interopRequireDefault(require("prop-types"));var _utils=require("../../utils");var _jsxRuntime=require("react/jsx-runtime");const defaultTheme={"context":"dNQcC6","ad":"earXxa","hoc":"qAPfQ6","checkbox":"A-f8qJ","container":"Kr0g3M","label":"_3dML-O"};function Checkbox({checked,label,onChange,theme}){return/*#__PURE__*/(0,_jsxRuntime.jsxs)("div",{className:theme.container,children:[label===undefined?null:/*#__PURE__*/(0,_jsxRuntime.jsx)("p",{className:theme.label,children:label}),/*#__PURE__*/(0,_jsxRuntime.jsx)("input",{checked:checked,className:theme.checkbox,onChange:onChange,type:"checkbox"})]})}/**
2
2
  * Checkbox component theme: a map of
3
3
  * CSS classes to append to its elements:
4
4
  * @prop {string} [checkbox] to the underlying checkbox `<input>` element.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/shared/components/Checkbox/index.jsx"],"names":["Checkbox","checked","label","onChange","theme","container","undefined","checkbox","ThemedCheckbox","defaultTheme","propTypes","PT","bool","string","func","themeType","isRequired","defaultProps"],"mappings":"gLAAA,6DAEA,kC,2KAIA,QAASA,CAAAA,QAAT,CAAkB,CAChBC,OADgB,CAEhBC,KAFgB,CAGhBC,QAHgB,CAIhBC,KAJgB,CAAlB,CAKG,CACD,mBACE,4BAAK,SAAS,CAAEA,KAAK,CAACC,SAAtB,WACIH,KAAK,GAAKI,SAAV,CAAsB,IAAtB,cAA6B,yBAAG,SAAS,CAAEF,KAAK,CAACF,KAApB,UAA4BA,KAA5B,EADjC,cAEE,6BACE,OAAO,CAAED,OADX,CAEE,SAAS,CAAEG,KAAK,CAACG,QAFnB,CAGE,QAAQ,CAAEJ,QAHZ,CAIE,IAAI,CAAC,UAJP,EAFF,GAUH,CAED;AACA;AACA;AACA;AACA;AACA;AACA,GACA,KAAMK,CAAAA,cAAc,CAAG,kBAAO,UAAP,CAAmB,CACxC,UADwC,CAExC,WAFwC,CAGxC,OAHwC,CAAnB,CAIpBC,YAJoB,EAINT,QAJM,CAAvB,CAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACAA,QAAQ,CAACU,SAAT,CAAqB,CACnBT,OAAO,CAAEU,mBAAGC,IADO,CAEnBV,KAAK,CAAES,mBAAGE,MAFS,CAGnBV,QAAQ,CAAEQ,mBAAGG,IAHM,CAInBV,KAAK,CAAEI,cAAc,CAACO,SAAf,CAAyBC,UAJb,CAArB,CAOAhB,QAAQ,CAACiB,YAAT,CAAwB,CACtBhB,OAAO,CAAEK,SADa,CAEtBJ,KAAK,CAAEI,SAFe,CAGtBH,QAAQ,CAAEG,SAHY,CAAxB,C,aAMeE,c","sourcesContent":["import PT from 'prop-types';\n\nimport { themed } from 'utils';\n\nimport defaultTheme from './theme.scss';\n\nfunction Checkbox({\n checked,\n label,\n onChange,\n theme,\n}) {\n return (\n <div className={theme.container}>\n { label === undefined ? null : <p className={theme.label}>{label}</p> }\n <input\n checked={checked}\n className={theme.checkbox}\n onChange={onChange}\n type=\"checkbox\"\n />\n </div>\n );\n}\n\n/**\n * Checkbox component theme: a map of\n * CSS classes to append to its elements:\n * @prop {string} [checkbox] to the underlying checkbox `<input>` element.\n * @prop {string} [container] to the root checkbox element.\n * @prop {string} [label] to the checkbox label element.\n */\nconst ThemedCheckbox = themed('Checkbox', [\n 'checkbox',\n 'container',\n 'label',\n], defaultTheme)(Checkbox);\n\n/**\n * The `<Checkbox>` component implements themeable checkboxes.\n * @param {object} [props] Component properties.\n * @param {boolean} [props.checked] Checkbox value.\n * @param {string} [props.label] Checkbox label.\n * @param {function} [props.onChange] State change handler.\n * @param {CheckboxTheme} [props.theme] _Ad hoc_ theme.\n * @param {...any} [props....]\n * [Other properties of themeable components](https://www.npmjs.com/package/@dr.pogodin/react-themes#themed-component-properties).\n */\nCheckbox.propTypes = {\n checked: PT.bool,\n label: PT.string,\n onChange: PT.func,\n theme: ThemedCheckbox.themeType.isRequired,\n};\n\nCheckbox.defaultProps = {\n checked: undefined,\n label: undefined,\n onChange: undefined,\n};\n\nexport default ThemedCheckbox;\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../../../src/shared/components/Checkbox/index.jsx"],"names":["Checkbox","checked","label","onChange","theme","container","undefined","checkbox","ThemedCheckbox","defaultTheme","propTypes","PT","bool","string","func","themeType","isRequired","defaultProps"],"mappings":"gLAAA,6DAEA,kC,6KAIA,QAASA,CAAAA,QAAT,CAAkB,CAChBC,OADgB,CAEhBC,KAFgB,CAGhBC,QAHgB,CAIhBC,KAJgB,CAAlB,CAKG,CACD,mBACE,4BAAK,SAAS,CAAEA,KAAK,CAACC,SAAtB,WACIH,KAAK,GAAKI,SAAV,CAAsB,IAAtB,cAA6B,yBAAG,SAAS,CAAEF,KAAK,CAACF,KAApB,UAA4BA,KAA5B,EADjC,cAEE,6BACE,OAAO,CAAED,OADX,CAEE,SAAS,CAAEG,KAAK,CAACG,QAFnB,CAGE,QAAQ,CAAEJ,QAHZ,CAIE,IAAI,CAAC,UAJP,EAFF,GAUH,CAED;AACA;AACA;AACA;AACA;AACA;AACA,GACA,KAAMK,CAAAA,cAAc,CAAG,kBAAO,UAAP,CAAmB,CACxC,UADwC,CAExC,WAFwC,CAGxC,OAHwC,CAAnB,CAIpBC,YAJoB,EAINT,QAJM,CAAvB,CAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACAA,QAAQ,CAACU,SAAT,CAAqB,CACnBT,OAAO,CAAEU,mBAAGC,IADO,CAEnBV,KAAK,CAAES,mBAAGE,MAFS,CAGnBV,QAAQ,CAAEQ,mBAAGG,IAHM,CAInBV,KAAK,CAAEI,cAAc,CAACO,SAAf,CAAyBC,UAJb,CAArB,CAOAhB,QAAQ,CAACiB,YAAT,CAAwB,CACtBhB,OAAO,CAAEK,SADa,CAEtBJ,KAAK,CAAEI,SAFe,CAGtBH,QAAQ,CAAEG,SAHY,CAAxB,C,aAMeE,c","sourcesContent":["import PT from 'prop-types';\n\nimport { themed } from 'utils';\n\nimport defaultTheme from './theme.scss';\n\nfunction Checkbox({\n checked,\n label,\n onChange,\n theme,\n}) {\n return (\n <div className={theme.container}>\n { label === undefined ? null : <p className={theme.label}>{label}</p> }\n <input\n checked={checked}\n className={theme.checkbox}\n onChange={onChange}\n type=\"checkbox\"\n />\n </div>\n );\n}\n\n/**\n * Checkbox component theme: a map of\n * CSS classes to append to its elements:\n * @prop {string} [checkbox] to the underlying checkbox `<input>` element.\n * @prop {string} [container] to the root checkbox element.\n * @prop {string} [label] to the checkbox label element.\n */\nconst ThemedCheckbox = themed('Checkbox', [\n 'checkbox',\n 'container',\n 'label',\n], defaultTheme)(Checkbox);\n\n/**\n * The `<Checkbox>` component implements themeable checkboxes.\n * @param {object} [props] Component properties.\n * @param {boolean} [props.checked] Checkbox value.\n * @param {string} [props.label] Checkbox label.\n * @param {function} [props.onChange] State change handler.\n * @param {CheckboxTheme} [props.theme] _Ad hoc_ theme.\n * @param {...any} [props....]\n * [Other properties of themeable components](https://www.npmjs.com/package/@dr.pogodin/react-themes#themed-component-properties).\n */\nCheckbox.propTypes = {\n checked: PT.bool,\n label: PT.string,\n onChange: PT.func,\n theme: ThemedCheckbox.themeType.isRequired,\n};\n\nCheckbox.defaultProps = {\n checked: undefined,\n label: undefined,\n onChange: undefined,\n};\n\nexport default ThemedCheckbox;\n"],"file":"index.js"}
@@ -9,7 +9,7 @@ const{publicPath}=(0,_isomorphy.getBuildInfo)();// This code block initiates sty
9
9
  // to handle CSS chunk mounting and unmounting, which it is able to do).
10
10
  if(!heap.mounted){heap.mounted=true;window.CHUNK_GROUPS[chunkName].forEach(asset=>{if(!asset.endsWith(".css"))return;const path=`${publicPath}/${asset}`;let link=document.querySelector(`link[href="${path}"]`);if(!link){link=document.createElement("link");link.setAttribute("href",path);link.setAttribute("rel","stylesheet");const barrier=(0,_Barrier.newBarrier)();link.onload=barrier.resolve;// Even if the style load failed, still allow to mount the component,
11
11
  // abeit with broken styling.
12
- link.onerror=barrier.resolve;heap.pendingStyles.push(barrier);const head=document.querySelector("head");head.appendChild(link)}if(!link.dependants)link.dependants=new Set([chunkName]);else link.dependants.add(chunkName)})}// Async loading of React component necessary to render the chunk.
12
+ link.onerror=barrier.resolve;heap.pendingStyles.push(barrier);const head=document.querySelector("head");head.appendChild(link)}window.STYLESHEET_USAGE_COUNTERS||={};window.STYLESHEET_USAGE_COUNTERS[path]||=0;++window.STYLESHEET_USAGE_COUNTERS[path]})}// Async loading of React component necessary to render the chunk.
13
13
  const{data}=(0,_reactGlobalState.useAsyncData)(`dr_pogodin_react_utils___split_components.${chunkName}`,getClientSide,{maxage:_time.default.YEAR_MS});const createRender=()=>{const Scene=data.default||data;return/*#__PURE__*/(0,_jsxRuntime.jsx)("div",{"data-chunk-name":chunkName,children:/*#__PURE__*/(0,_jsxRuntime.jsx)(Scene,{...rest,children:children})})};const[render,setRender]=(0,_react.useState)(()=>{// No need to await anything, we can render the final component right away.
14
14
  if(data&&!heap.pendingStyles.length){heap.renderInitialized=true;return createRender()}// Try to reuse the markup rendered during SSR.
15
15
  const node=document.querySelector(`[data-chunk-name=${chunkName}]`);if(node){return/*#__PURE__*/(0,_jsxRuntime.jsx)("div",{/* eslint-disable react/no-danger */dangerouslySetInnerHTML:{__html:node.innerHTML||""}/* eslint-disable react/no-danger */,"data-chunk-name":chunkName})}// Else render placeholder, or empty div.
@@ -17,5 +17,5 @@ const Scene=placeholder||(()=>null);return/*#__PURE__*/(0,_jsxRuntime.jsx)("div"
17
17
  // means we have to await styles loading; once it is done, and if we are still
18
18
  // mounted, we can set the final render.
19
19
  if(data&&!heap.renderInitialized){heap.renderInitialized=true;Promise.all(heap.pendingStyles).then(()=>{if(heap.mounted)setRender(createRender())})}// This effectively fires only once, just before the component unmounts.
20
- (0,_react.useEffect)(()=>()=>{heap.mounted=false;window.CHUNK_GROUPS[chunkName].forEach(item=>{if(!item.endsWith(".css"))return;const path=`${publicPath}/${item}`;const link=document.querySelector(`link[href="${path}"]`);link.dependants.delete(chunkName);if(!link.dependants.size){const head=document.querySelector("head");head.removeChild(link)}})},[chunkName,heap,publicPath]);return render}
20
+ (0,_react.useEffect)(()=>()=>{heap.mounted=false;window.CHUNK_GROUPS[chunkName].forEach(item=>{if(!item.endsWith(".css"))return;const path=`${publicPath}/${item}`;if(--window.STYLESHEET_USAGE_COUNTERS[path]<=0){const link=document.querySelector(`link[href="${path}"]`);const head=document.querySelector("head");head.removeChild(link)}})},[chunkName,heap,publicPath]);return render}
21
21
  //# sourceMappingURL=ClientSide.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/shared/components/CodeSplit/ClientSide.jsx"],"names":["ClientSide","chunkName","children","getClientSide","placeholder","serverSide","rest","current","heap","mounted","pendingStyles","renderInitialized","publicPath","window","CHUNK_GROUPS","forEach","asset","endsWith","path","link","document","querySelector","createElement","setAttribute","barrier","onload","resolve","onerror","push","head","appendChild","dependants","Set","add","data","maxage","time","YEAR_MS","createRender","Scene","default","render","setRender","length","node","__html","innerHTML","Promise","all","then","item","delete","size","removeChild"],"mappings":"oLAMA,4BAEA,gEAEA,4CACA,gDACA,8D,6CAZA;AACA;AACA,G,CACA,6B,CACA,iDAUe,QAASA,CAAAA,UAAT,CAAoB,CACjCC,SADiC,CAEjCC,QAFiC,CAGjCC,aAHiC,CAIjCC,WAJiC,CAMjC;AACAC,UAPiC,CASjC,GAAGC,IAT8B,CAApB,CAUZ,CACD,KAAM,CAAEC,OAAO,CAAEC,IAAX,EAAoB,kBAAO,CAC/BC,OAAO,CAAE,KADsB,CAE/BC,aAAa,CAAE,EAFgB,CAG/BC,iBAAiB,CAAE,KAHY,CAAP,CAA1B,CAMA;AACA,KAAM,CAAEC,UAAF,EAAiB,6BAAvB,CAEA;AACA;AACA;AACA;AACA;AACA,GAAI,CAACJ,IAAI,CAACC,OAAV,CAAmB,CACjBD,IAAI,CAACC,OAAL,CAAe,IAAf,CACAI,MAAM,CAACC,YAAP,CAAoBb,SAApB,EAA+Bc,OAA/B,CAAwCC,KAAD,EAAW,CAChD,GAAI,CAACA,KAAK,CAACC,QAAN,CAAe,MAAf,CAAL,CAA6B,OAC7B,KAAMC,CAAAA,IAAI,CAAI,GAAEN,UAAW,IAAGI,KAAM,EAApC,CACA,GAAIG,CAAAA,IAAI,CAAGC,QAAQ,CAACC,aAAT,CAAwB,cAAaH,IAAK,IAA1C,CAAX,CACA,GAAI,CAACC,IAAL,CAAW,CACTA,IAAI,CAAGC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AQ,CAACC,aAAT,CAAuB,MAAvB,CAAb,CACAQ,IAAI,CAACwB,WAAL,CAAiBlC,IAAjB,CACD,CACF,CATD,CAUD,CAZD,CAYG,CAAClB,SAAD,CAAYO,IAAZ,CAAkBI,UAAlB,CAZH,EAcA,MAAO6B,CAAAA,MACR","sourcesContent":["/**\n * Client-side implementation of a split code chunk.\n */\n/* global document, window */\n/* eslint-disable react/jsx-props-no-spreading */\n\nimport { useEffect, useRef, useState } from 'react';\n\nimport { useAsyncData } from '@dr.pogodin/react-global-state';\n\nimport { newBarrier } from 'utils/Barrier';\nimport { getBuildInfo } from 'utils/isomorphy';\nimport time from 'utils/time';\n\nexport default function ClientSide({\n chunkName,\n children,\n getClientSide,\n placeholder,\n\n // Not used in <ClientSide>, but should not go into \"...rest\" either.\n serverSide,\n\n ...rest\n}) {\n const { current: heap } = useRef({\n mounted: false,\n pendingStyles: [],\n renderInitialized: false,\n });\n\n // publicPath from buildInfo does not have a trailing slash at the end.\n const { publicPath } = getBuildInfo();\n\n // This code block initiates style loading as soon as possible, even prior to\n // the component loading, and it collects all style load / failure promises\n // into heap.pendingStyles array, allowing us to wait and thus avoid flash of\n // unstyled content issue (that's why we don't rely on mini-css-extract-plugin\n // to handle CSS chunk mounting and unmounting, which it is able to do).\n 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 if (!link) {\n link = document.createElement('link');\n link.setAttribute('href', path);\n link.setAttribute('rel', 'stylesheet');\n\n const barrier = newBarrier();\n link.onload = barrier.resolve;\n\n // Even if the style load failed, still allow to mount the component,\n // abeit with broken styling.\n link.onerror = barrier.resolve;\n\n heap.pendingStyles.push(barrier);\n\n const head = document.querySelector('head');\n head.appendChild(link);\n }\n if (!link.dependants) link.dependants = new Set([chunkName]);\n else link.dependants.add(chunkName);\n });\n }\n\n // Async loading of React component necessary to render the chunk.\n const { data } = useAsyncData(\n `dr_pogodin_react_utils___split_components.${chunkName}`,\n getClientSide,\n { maxage: time.YEAR_MS },\n );\n\n const createRender = () => {\n const Scene = data.default || data;\n return (\n <div data-chunk-name={chunkName}>\n <Scene {...rest}>\n {children}\n </Scene>\n </div>\n );\n };\n\n const [render, setRender] = useState(() => {\n // No need to await anything, we can render the final component right away.\n if (data && !heap.pendingStyles.length) {\n heap.renderInitialized = true;\n return createRender();\n }\n\n // Try to reuse the markup rendered during SSR.\n const node = document.querySelector(`[data-chunk-name=${chunkName}]`);\n if (node) {\n return (\n <div\n /* eslint-disable react/no-danger */\n dangerouslySetInnerHTML={{ __html: node.innerHTML || '' }}\n /* eslint-disable react/no-danger */\n data-chunk-name={chunkName}\n />\n );\n }\n\n // Else render placeholder, or empty div.\n const Scene = placeholder || (() => null);\n return <div><Scene {...rest}>{children}</Scene></div>;\n });\n\n // At this point, if we have data, the absense of heap.renderInitialized flag\n // means we have to await styles loading; once it is done, and if we are still\n // mounted, we can set the final render.\n if (data && !heap.renderInitialized) {\n heap.renderInitialized = true;\n Promise.all(heap.pendingStyles).then(() => {\n if (heap.mounted) setRender(createRender());\n });\n }\n\n // This effectively fires only once, just before the component unmounts.\n useEffect(() => () => {\n heap.mounted = false;\n window.CHUNK_GROUPS[chunkName].forEach((item) => {\n if (!item.endsWith('.css')) return;\n const path = `${publicPath}/${item}`;\n const link = document.querySelector(`link[href=\"${path}\"]`);\n link.dependants.delete(chunkName);\n if (!link.dependants.size) {\n const head = document.querySelector('head');\n head.removeChild(link);\n }\n });\n }, [chunkName, heap, publicPath]);\n\n return render;\n}\n"],"file":"ClientSide.js"}
1
+ {"version":3,"sources":["../../../../../src/shared/components/CodeSplit/ClientSide.jsx"],"names":["ClientSide","chunkName","children","getClientSide","placeholder","serverSide","rest","current","heap","mounted","pendingStyles","renderInitialized","publicPath","window","CHUNK_GROUPS","forEach","asset","endsWith","path","link","document","querySelector","createElement","setAttribute","barrier","onload","resolve","onerror","push","head","appendChild","STYLESHEET_USAGE_COUNTERS","data","maxage","time","YEAR_MS","createRender","Scene","default","render","setRender","length","node","__html","innerHTML","Promise","all","then","item","removeChild"],"mappings":"oLAMA,4BAEA,gEAEA,4CACA,gDACA,8D,6CAZA;AACA;AACA,G,CACA,6B,CACA,iDAUe,QAASA,CAAAA,UAAT,CAAoB,CACjCC,SADiC,CAEjCC,QAFiC,CAGjCC,aAHiC,CAIjCC,WAJiC,CAMjC;AACAC,UAPiC,CASjC,GAAGC,IAT8B,CAApB,CAUZ,CACD,KAAM,CAAEC,OAAO,CAAEC,IAAX,EAAoB,kBAAO,CAC/BC,OAAO,CAAE,KADsB,CAE/BC,aAAa,CAAE,EAFgB,CAG/BC,iBAAiB,CAAE,KAHY,CAAP,CAA1B,CAMA;AACA,KAAM,CAAEC,UAAF,EAAiB,6BAAvB,CAEA;AACA;AACA;AACA;AACA;AACA,GAAI,CAACJ,IAAI,CAACC,OAAV,CAAmB,CACjBD,IAAI,CAACC,OAAL,CAAe,IAAf,CACAI,MAAM,CAACC,YAAP,CAAoBb,SAApB,EAA+Bc,OAA/B,CAAwCC,KAAD,EAAW,CAChD,GAAI,CAACA,KAAK,CAACC,QAAN,CAAe,MAAf,CAAL,CAA6B,OAC7B,KAAMC,CAAAA,IAAI,CAAI,GAAEN,UAAW,IAAGI,KAAM,EAApC,CACA,GAAIG,CAAAA,IAAI,CAAGC,QAAQ,CAACC,aAAT,CAAwB,cAAaH,IAAK,IAA1C,CAAX,CACA,GAAI,CAACC,IAAL,CAAW,CACTA,IAAI,CAAGC,QAAQ,CAACE,aAAT,CAAuB,MAAvB,CAAP,CACAH,IAAI,CAACI,YAAL,CAAkB,MAAlB,CAA0BL,IAA1B,EACAC,IAAI,CAACI,YAAL,CAAkB,KAAlB,CAAyB,YAAzB,EAEA,KAAMC,CAAAA,OAAO,CAAG,yBAAhB,CACAL,IAAI,CAACM,MAAL,CAAcD,OAAO,CAACE,OAAtB,CAEA;AACA;AACAP,I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GAAK,IAAM,IAAX,CAAzB,CACA,mBAAO,iDAAK,oBAAC,KAAD,KAAWE,IAAX,UAAkBJ,QAAlB,EAAL,EACR,CAvB2B,CAA5B,CAyBA;AACA;AACA;AACA,GAAI8B,IAAI,EAAI,CAACxB,IAAI,CAACG,iBAAlB,CAAqC,CACnCH,IAAI,CAACG,iBAAL,CAAyB,IAAzB,CACAkC,OAAO,CAACC,GAAR,CAAYtC,IAAI,CAACE,aAAjB,EAAgCqC,IAAhC,CAAqC,IAAM,CACzC,GAAIvC,IAAI,CAACC,OAAT,CAAkB+B,SAAS,CAACJ,YAAY,EAAb,CAC5B,CAFD,CAGD,CAED;AACA,qBAAU,IAAM,IAAM,CACpB5B,IAAI,CAACC,OAAL,CAAe,KAAf,CACAI,MAAM,CAACC,YAAP,CAAoBb,SAApB,EAA+Bc,OAA/B,CAAwCiC,IAAD,EAAU,CAC/C,GAAI,CAACA,IAAI,CAAC/B,QAAL,CAAc,MAAd,CAAL,CAA4B,OAC5B,KAAMC,CAAAA,IAAI,CAAI,GAAEN,UAAW,IAAGoC,IAAK,EAAnC,CACA,GAAI,EAAEnC,MAAM,CAACkB,yBAAP,CAAiCb,IAAjC,CAAF,EAA4C,CAAhD,CAAmD,CACjD,KAAMC,CAAAA,IAAI,CAAGC,QAAQ,CAACC,aAAT,CAAwB,cAAaH,IAAK,IAA1C,CAAb,CACA,KAAMW,CAAAA,IAAI,CAAGT,QAAQ,CAACC,aAAT,CAAuB,MAAvB,CAAb,CACAQ,IAAI,CAACoB,WAAL,CAAiB9B,IAAjB,CACD,CACF,CARD,CASD,CAXD,CAWG,CAAClB,SAAD,CAAYO,IAAZ,CAAkBI,UAAlB,CAXH,EAaA,MAAO2B,CAAAA,MACR","sourcesContent":["/**\n * Client-side implementation of a split code chunk.\n */\n/* global document, window */\n/* eslint-disable react/jsx-props-no-spreading */\n\nimport { useEffect, useRef, useState } from 'react';\n\nimport { useAsyncData } from '@dr.pogodin/react-global-state';\n\nimport { newBarrier } from 'utils/Barrier';\nimport { getBuildInfo } from 'utils/isomorphy';\nimport time from 'utils/time';\n\nexport default function ClientSide({\n chunkName,\n children,\n getClientSide,\n placeholder,\n\n // Not used in <ClientSide>, but should not go into \"...rest\" either.\n serverSide,\n\n ...rest\n}) {\n const { current: heap } = useRef({\n mounted: false,\n pendingStyles: [],\n renderInitialized: false,\n });\n\n // publicPath from buildInfo does not have a trailing slash at the end.\n const { publicPath } = getBuildInfo();\n\n // This code block initiates style loading as soon as possible, even prior to\n // the component loading, and it collects all style load / failure promises\n // into heap.pendingStyles array, allowing us to wait and thus avoid flash of\n // unstyled content issue (that's why we don't rely on mini-css-extract-plugin\n // to handle CSS chunk mounting and unmounting, which it is able to do).\n 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 if (!link) {\n link = document.createElement('link');\n link.setAttribute('href', path);\n link.setAttribute('rel', 'stylesheet');\n\n const barrier = newBarrier();\n link.onload = barrier.resolve;\n\n // Even if the style load failed, still allow to mount the component,\n // abeit with broken styling.\n link.onerror = barrier.resolve;\n\n heap.pendingStyles.push(barrier);\n\n const head = document.querySelector('head');\n head.appendChild(link);\n }\n window.STYLESHEET_USAGE_COUNTERS ||= {};\n window.STYLESHEET_USAGE_COUNTERS[path] ||= 0;\n ++window.STYLESHEET_USAGE_COUNTERS[path];\n });\n }\n\n // Async loading of React component necessary to render the chunk.\n const { data } = useAsyncData(\n `dr_pogodin_react_utils___split_components.${chunkName}`,\n getClientSide,\n { maxage: time.YEAR_MS },\n );\n\n const createRender = () => {\n const Scene = data.default || data;\n return (\n <div data-chunk-name={chunkName}>\n <Scene {...rest}>\n {children}\n </Scene>\n </div>\n );\n };\n\n const [render, setRender] = useState(() => {\n // No need to await anything, we can render the final component right away.\n if (data && !heap.pendingStyles.length) {\n heap.renderInitialized = true;\n return createRender();\n }\n\n // Try to reuse the markup rendered during SSR.\n const node = document.querySelector(`[data-chunk-name=${chunkName}]`);\n if (node) {\n return (\n <div\n /* eslint-disable react/no-danger */\n dangerouslySetInnerHTML={{ __html: node.innerHTML || '' }}\n /* eslint-disable react/no-danger */\n data-chunk-name={chunkName}\n />\n );\n }\n\n // Else render placeholder, or empty div.\n const Scene = placeholder || (() => null);\n return <div><Scene {...rest}>{children}</Scene></div>;\n });\n\n // At this point, if we have data, the absense of heap.renderInitialized flag\n // means we have to await styles loading; once it is done, and if we are still\n // mounted, we can set the final render.\n if (data && !heap.renderInitialized) {\n heap.renderInitialized = true;\n Promise.all(heap.pendingStyles).then(() => {\n if (heap.mounted) setRender(createRender());\n });\n }\n\n // This effectively fires only once, just before the component unmounts.\n useEffect(() => () => {\n heap.mounted = false;\n window.CHUNK_GROUPS[chunkName].forEach((item) => {\n if (!item.endsWith('.css')) return;\n const path = `${publicPath}/${item}`;\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\n return render;\n}\n"],"file":"ClientSide.js"}
@@ -1,4 +1,4 @@
1
- "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _lodash=require("lodash");var _propTypes=_interopRequireDefault(require("prop-types"));var _utils=require("../../utils");var _jsxRuntime=require("react/jsx-runtime");var defaultTheme={"context":"haRIry","ad":"D4XHG2","hoc":"N3nd34","arrow":"-zPK7Y","container":"_9CQpeA","label":"Gv0kyu","option":"xmsujA","hiddenOption":"RdW3yR","select":"JXK1uw"};/**
1
+ "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _lodash=require("lodash");var _propTypes=_interopRequireDefault(require("prop-types"));var _utils=require("../../utils");var _jsxRuntime=require("react/jsx-runtime");const defaultTheme={"context":"haRIry","ad":"D4XHG2","hoc":"N3nd34","arrow":"-zPK7Y","container":"_9CQpeA","label":"Gv0kyu","option":"xmsujA","hiddenOption":"RdW3yR","select":"JXK1uw"};/**
2
2
  * Implements a themeable dropdown list. Internally it is rendered with help of
3
3
  * the standard HTML `<select>` element, thus the styling support is somewhat
4
4
  * limited.