@dr.pogodin/react-utils 1.35.2 → 1.35.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/build.js CHANGED
@@ -55,20 +55,21 @@ async function exec(command, options = {}) {
55
55
  /* Command-line config. */
56
56
  program
57
57
  .description('Library build script')
58
- .option('--lib', 'library build', false)
59
- .option('-i, --in-dir <path>', 'input folder for the build', 'src')
60
- .option('-o, --out-dir <path>', 'output folder for the build', 'build')
61
58
  .option(
62
59
  '-t, --build-type <type>',
63
60
  `build type: ${VALID_BUILD_TYPES.join(', ')}`,
64
61
  )
62
+ .option('-c, --copy-files <regex>', 'copy files matching the pattern into the build folder')
63
+ .option('-i, --in-dir <path>', 'input folder for the build', 'src')
64
+ .option('--lib', 'library build', false)
65
+ .option('--no-babel', 'opts out the Babel (server-side code) build')
66
+ .option('-o, --out-dir <path>', 'output folder for the build', 'build')
65
67
  .option('-w, --watch', 'build, watch, and rebuild on source changes')
66
68
  .option(
67
69
  '--webpack-config <path>',
68
70
  'path to the webpack config',
69
71
  'webpack.config.js',
70
- )
71
- .option('-c, --copy-files <regex>', 'copy files matching the pattern into the build folder');
72
+ );
72
73
 
73
74
  program.parse(process.argv);
74
75
  const cmdLineArgs = program.opts();
@@ -203,7 +204,7 @@ async function babelBuild() {
203
204
  await exec(BABEL_CMD_SVG, BABEL_EXEC_OPTIONS);
204
205
  }
205
206
 
206
- babelBuild();
207
+ if (cmdLineArgs.babel) babelBuild();
207
208
 
208
209
  // If opted, copy files matching the pattern into the build folder.
209
210
 
@@ -34,6 +34,9 @@ if (metaElement) {
34
34
  d.finish();
35
35
  data = _forge.default.util.decodeUtf8(d.output.data);
36
36
  inj = eval(`(${data})`); // eslint-disable-line no-eval
37
+ } else if (typeof window !== 'undefined' && window.REACT_UTILS_INJECTION) {
38
+ inj = window.REACT_UTILS_INJECTION;
39
+ delete window.REACT_UTILS_INJECTION;
37
40
  } else {
38
41
  // Otherwise, a bunch of dependent stuff will easily fail in non-standard
39
42
  // environments, where no client-side initialization is performed. Like tests,
@@ -1 +1 @@
1
- {"version":3,"file":"getInj.js","names":["_forge","_interopRequireDefault","require","_buildInfo","inj","metaElement","document","querySelector","remove","data","forge","util","decode64","content","key","getBuildInfo","d","cipher","createDecipher","start","iv","slice","length","update","createBuffer","finish","decodeUtf8","output","eval","getInj"],"sources":["../../../src/client/getInj.ts"],"sourcesContent":["// Encapsulates retrieval of server-side data injection into HTML template.\n\n/* global document */\n\n// Note: this way, only required part of \"node-forge\": AES, and some utils,\n// is bundled into client-side code.\nimport forge from 'node-forge/lib/forge';\nimport 'node-forge/lib/aes';\n\nimport type { InjT } from 'utils/globalState';\n\nimport { getBuildInfo } from 'utils/isomorphy/buildInfo';\n\n// Safeguard is needed here, because the server-side version of Docusaurus docs\n// is compiled (at least now) with settings suggesting it is a client-side\n// environment, but there is no document.\nlet inj: InjT = {};\n\nconst metaElement: HTMLMetaElement | null = typeof document !== 'undefined'\n ? document.querySelector('meta[itemprop=\"drpruinj\"]') : null;\n\nif (metaElement) {\n metaElement.remove();\n let data = forge.util.decode64(metaElement.content);\n\n const { key } = getBuildInfo();\n const d = forge.cipher.createDecipher('AES-CBC', key);\n d.start({ iv: data.slice(0, key.length) });\n d.update(forge.util.createBuffer(data.slice(key.length)));\n d.finish();\n\n data = forge.util.decodeUtf8(d.output.data);\n inj = eval(`(${data})`); // eslint-disable-line no-eval\n} else {\n // Otherwise, a bunch of dependent stuff will easily fail in non-standard\n // environments, where no client-side initialization is performed. Like tests,\n // Docusaurus examples, etc.\n inj = {};\n}\n\nexport default function getInj(): InjT {\n return inj;\n}\n"],"mappings":";;;;;;;AAMA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACAA,OAAA;AAIA,IAAAC,UAAA,GAAAD,OAAA;AAXA;;AAEA;;AAEA;AACA;;AAQA;AACA;AACA;AACA,IAAIE,GAAS,GAAG,CAAC,CAAC;AAElB,MAAMC,WAAmC,GAAG,OAAOC,QAAQ,KAAK,WAAW,GACvEA,QAAQ,CAACC,aAAa,CAAC,2BAA2B,CAAC,GAAG,IAAI;AAE9D,IAAIF,WAAW,EAAE;EACfA,WAAW,CAACG,MAAM,CAAC,CAAC;EACpB,IAAIC,IAAI,GAAGC,cAAK,CAACC,IAAI,CAACC,QAAQ,CAACP,WAAW,CAACQ,OAAO,CAAC;EAEnD,MAAM;IAAEC;EAAI,CAAC,GAAG,IAAAC,uBAAY,EAAC,CAAC;EAC9B,MAAMC,CAAC,GAAGN,cAAK,CAACO,MAAM,CAACC,cAAc,CAAC,SAAS,EAAEJ,GAAG,CAAC;EACrDE,CAAC,CAACG,KAAK,CAAC;IAAEC,EAAE,EAAEX,IAAI,CAACY,KAAK,CAAC,CAAC,EAAEP,GAAG,CAACQ,MAAM;EAAE,CAAC,CAAC;EAC1CN,CAAC,CAACO,MAAM,CAACb,cAAK,CAACC,IAAI,CAACa,YAAY,CAACf,IAAI,CAACY,KAAK,CAACP,GAAG,CAACQ,MAAM,CAAC,CAAC,CAAC;EACzDN,CAAC,CAACS,MAAM,CAAC,CAAC;EAEVhB,IAAI,GAAGC,cAAK,CAACC,IAAI,CAACe,UAAU,CAACV,CAAC,CAACW,MAAM,CAAClB,IAAI,CAAC;EAC3CL,GAAG,GAAGwB,IAAI,CAAC,IAAInB,IAAI,GAAG,CAAC,CAAC,CAAC;AAC3B,CAAC,MAAM;EACL;EACA;EACA;EACAL,GAAG,GAAG,CAAC,CAAC;AACV;AAEe,SAASyB,MAAMA,CAAA,EAAS;EACrC,OAAOzB,GAAG;AACZ","ignoreList":[]}
1
+ {"version":3,"file":"getInj.js","names":["_forge","_interopRequireDefault","require","_buildInfo","inj","metaElement","document","querySelector","remove","data","forge","util","decode64","content","key","getBuildInfo","d","cipher","createDecipher","start","iv","slice","length","update","createBuffer","finish","decodeUtf8","output","eval","window","REACT_UTILS_INJECTION","getInj"],"sources":["../../../src/client/getInj.ts"],"sourcesContent":["// Encapsulates retrieval of server-side data injection into HTML template.\n\n/* global document */\n\n// Note: this way, only required part of \"node-forge\": AES, and some utils,\n// is bundled into client-side code.\nimport forge from 'node-forge/lib/forge';\nimport 'node-forge/lib/aes';\n\nimport type { InjT } from 'utils/globalState';\n\nimport { getBuildInfo } from 'utils/isomorphy/buildInfo';\n\n// Safeguard is needed here, because the server-side version of Docusaurus docs\n// is compiled (at least now) with settings suggesting it is a client-side\n// environment, but there is no document.\nlet inj: InjT = {};\n\nconst metaElement: HTMLMetaElement | null = typeof document !== 'undefined'\n ? document.querySelector('meta[itemprop=\"drpruinj\"]') : null;\n\nif (metaElement) {\n metaElement.remove();\n let data = forge.util.decode64(metaElement.content);\n\n const { key } = getBuildInfo();\n const d = forge.cipher.createDecipher('AES-CBC', key);\n d.start({ iv: data.slice(0, key.length) });\n d.update(forge.util.createBuffer(data.slice(key.length)));\n d.finish();\n\n data = forge.util.decodeUtf8(d.output.data);\n inj = eval(`(${data})`); // eslint-disable-line no-eval\n} else if (typeof window !== 'undefined' && window.REACT_UTILS_INJECTION) {\n inj = window.REACT_UTILS_INJECTION;\n delete window.REACT_UTILS_INJECTION;\n} else {\n // Otherwise, a bunch of dependent stuff will easily fail in non-standard\n // environments, where no client-side initialization is performed. Like tests,\n // Docusaurus examples, etc.\n inj = {};\n}\n\nexport default function getInj(): InjT {\n return inj;\n}\n"],"mappings":";;;;;;;AAMA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACAA,OAAA;AAIA,IAAAC,UAAA,GAAAD,OAAA;AAXA;;AAEA;;AAEA;AACA;;AAQA;AACA;AACA;AACA,IAAIE,GAAS,GAAG,CAAC,CAAC;AAElB,MAAMC,WAAmC,GAAG,OAAOC,QAAQ,KAAK,WAAW,GACvEA,QAAQ,CAACC,aAAa,CAAC,2BAA2B,CAAC,GAAG,IAAI;AAE9D,IAAIF,WAAW,EAAE;EACfA,WAAW,CAACG,MAAM,CAAC,CAAC;EACpB,IAAIC,IAAI,GAAGC,cAAK,CAACC,IAAI,CAACC,QAAQ,CAACP,WAAW,CAACQ,OAAO,CAAC;EAEnD,MAAM;IAAEC;EAAI,CAAC,GAAG,IAAAC,uBAAY,EAAC,CAAC;EAC9B,MAAMC,CAAC,GAAGN,cAAK,CAACO,MAAM,CAACC,cAAc,CAAC,SAAS,EAAEJ,GAAG,CAAC;EACrDE,CAAC,CAACG,KAAK,CAAC;IAAEC,EAAE,EAAEX,IAAI,CAACY,KAAK,CAAC,CAAC,EAAEP,GAAG,CAACQ,MAAM;EAAE,CAAC,CAAC;EAC1CN,CAAC,CAACO,MAAM,CAACb,cAAK,CAACC,IAAI,CAACa,YAAY,CAACf,IAAI,CAACY,KAAK,CAACP,GAAG,CAACQ,MAAM,CAAC,CAAC,CAAC;EACzDN,CAAC,CAACS,MAAM,CAAC,CAAC;EAEVhB,IAAI,GAAGC,cAAK,CAACC,IAAI,CAACe,UAAU,CAACV,CAAC,CAACW,MAAM,CAAClB,IAAI,CAAC;EAC3CL,GAAG,GAAGwB,IAAI,CAAC,IAAInB,IAAI,GAAG,CAAC,CAAC,CAAC;AAC3B,CAAC,MAAM,IAAI,OAAOoB,MAAM,KAAK,WAAW,IAAIA,MAAM,CAACC,qBAAqB,EAAE;EACxE1B,GAAG,GAAGyB,MAAM,CAACC,qBAAqB;EAClC,OAAOD,MAAM,CAACC,qBAAqB;AACrC,CAAC,MAAM;EACL;EACA;EACA;EACA1B,GAAG,GAAG,CAAC,CAAC;AACV;AAEe,SAAS2B,MAAMA,CAAA,EAAS;EACrC,OAAO3B,GAAG;AACZ","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"common.js","names":["_propTypes","_interopRequireDefault","require","validThemeKeys","exports","valueValidator","PT","oneOfType","number","isRequired","string","optionValidator","shape","name","node","value","optionsValidator","arrayOf","stringOptionValidator","stringOptionsValidator","isValue","x","type","optionValueName","option"],"sources":["../../../../../src/shared/components/selectors/common.ts"],"sourcesContent":["// The stuff common between different dropdown implementations.\n\nimport PT from 'prop-types';\n\nimport type { Theme } from '@dr.pogodin/react-themes';\n\nexport const validThemeKeys = [\n 'active',\n 'arrow',\n 'container',\n 'dropdown',\n 'hiddenOption',\n 'label',\n 'option',\n 'select',\n\n // TODO: This is only valid for <CustomDropdown>, thus we need to re-factor it\n // into a separate theme spec for that component.\n 'upward',\n] as const;\n\nexport type ValueT = number | string;\n\nexport const valueValidator: PT.Requireable<ValueT> = PT.oneOfType([\n PT.number.isRequired,\n PT.string.isRequired,\n]);\n\nexport type OptionT<NameT> = {\n name?: NameT | null;\n value: ValueT;\n};\n\nexport type OptionsT<NameT> = Array<OptionT<NameT> | ValueT>;\n\nexport type PropsT<\n NameT,\n OnChangeT = React.ChangeEventHandler<HTMLSelectElement>,\n> = {\n filter?: (item: OptionT<NameT> | ValueT) => boolean;\n label?: React.ReactNode;\n onChange?: OnChangeT;\n options?: OptionsT<NameT>;\n theme: Theme<typeof validThemeKeys>;\n value?: ValueT;\n};\n\nexport const optionValidator:\nPT.Requireable<OptionT<React.ReactNode> | ValueT> = PT.oneOfType([\n PT.shape({\n name: PT.node,\n value: valueValidator.isRequired,\n }).isRequired,\n PT.number.isRequired,\n PT.string.isRequired,\n]);\n\nexport const optionsValidator = PT.arrayOf(optionValidator.isRequired);\n\nexport const stringOptionValidator:\nPT.Requireable<OptionT<string> | ValueT> = PT.oneOfType([\n PT.shape({\n name: PT.string,\n value: valueValidator.isRequired,\n }).isRequired,\n PT.number.isRequired,\n PT.string.isRequired,\n]);\n\nexport const stringOptionsValidator = PT.arrayOf(stringOptionValidator.isRequired);\n\nfunction isValue<T>(x: OptionT<T> | ValueT): x is ValueT {\n const type = typeof x;\n return type === 'number' || type === 'string';\n}\n\n/** Returns option value and name as a tuple. */\nexport function optionValueName<NameT>(\n option: OptionT<NameT> | ValueT,\n): [ValueT, NameT | ValueT] {\n return isValue(option)\n ? [option, option]\n : [option.value, option.name ?? option.value];\n}\n"],"mappings":";;;;;;;;;AAEA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AAFA;;AAMO,MAAMC,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG,CAC5B,QAAQ,EACR,OAAO,EACP,WAAW,EACX,UAAU,EACV,cAAc,EACd,OAAO,EACP,QAAQ,EACR,QAAQ;AAER;AACA;AACA,QAAQ,CACA;AAIH,MAAME,cAAsC,GAAAD,OAAA,CAAAC,cAAA,GAAGC,kBAAE,CAACC,SAAS,CAAC,CACjED,kBAAE,CAACE,MAAM,CAACC,UAAU,EACpBH,kBAAE,CAACI,MAAM,CAACD,UAAU,CACrB,CAAC;AAqBK,MAAME,eACoC,GAAAP,OAAA,CAAAO,eAAA,GAAGL,kBAAE,CAACC,SAAS,CAAC,CAC/DD,kBAAE,CAACM,KAAK,CAAC;EACPC,IAAI,EAAEP,kBAAE,CAACQ,IAAI;EACbC,KAAK,EAAEV,cAAc,CAACI;AACxB,CAAC,CAAC,CAACA,UAAU,EACbH,kBAAE,CAACE,MAAM,CAACC,UAAU,EACpBH,kBAAE,CAACI,MAAM,CAACD,UAAU,CACrB,CAAC;AAEK,MAAMO,gBAAgB,GAAAZ,OAAA,CAAAY,gBAAA,GAAGV,kBAAE,CAACW,OAAO,CAACN,eAAe,CAACF,UAAU,CAAC;AAE/D,MAAMS,qBAC2B,GAAAd,OAAA,CAAAc,qBAAA,GAAGZ,kBAAE,CAACC,SAAS,CAAC,CACtDD,kBAAE,CAACM,KAAK,CAAC;EACPC,IAAI,EAAEP,kBAAE,CAACI,MAAM;EACfK,KAAK,EAAEV,cAAc,CAACI;AACxB,CAAC,CAAC,CAACA,UAAU,EACbH,kBAAE,CAACE,MAAM,CAACC,UAAU,EACpBH,kBAAE,CAACI,MAAM,CAACD,UAAU,CACrB,CAAC;AAEK,MAAMU,sBAAsB,GAAAf,OAAA,CAAAe,sBAAA,GAAGb,kBAAE,CAACW,OAAO,CAACC,qBAAqB,CAACT,UAAU,CAAC;AAElF,SAASW,OAAOA,CAAIC,CAAsB,EAAe;EACvD,MAAMC,IAAI,GAAG,OAAOD,CAAC;EACrB,OAAOC,IAAI,KAAK,QAAQ,IAAIA,IAAI,KAAK,QAAQ;AAC/C;;AAEA;AACO,SAASC,eAAeA,CAC7BC,MAA+B,EACL;EAC1B,OAAOJ,OAAO,CAACI,MAAM,CAAC,GAClB,CAACA,MAAM,EAAEA,MAAM,CAAC,GAChB,CAACA,MAAM,CAACT,KAAK,EAAES,MAAM,CAACX,IAAI,IAAIW,MAAM,CAACT,KAAK,CAAC;AACjD","ignoreList":[]}
1
+ {"version":3,"file":"common.js","names":["_propTypes","_interopRequireDefault","require","validThemeKeys","exports","valueValidator","PT","oneOfType","number","isRequired","string","optionValidator","shape","name","node","value","optionsValidator","arrayOf","stringOptionValidator","stringOptionsValidator","isValue","x","type","optionValueName","option"],"sources":["../../../../../src/shared/components/selectors/common.ts"],"sourcesContent":["// The stuff common between different dropdown implementations.\n\nimport PT from 'prop-types';\n\nimport type { Theme } from '@dr.pogodin/react-themes';\n\nexport const validThemeKeys = [\n 'active',\n 'arrow',\n 'container',\n 'dropdown',\n 'hiddenOption',\n 'label',\n 'option',\n 'select',\n\n // TODO: This is only valid for <CustomDropdown>, thus we need to re-factor it\n // into a separate theme spec for that component.\n 'upward',\n] as const;\n\nexport type ValueT = number | string;\n\nexport const valueValidator: PT.Requireable<ValueT> = PT.oneOfType([\n PT.number.isRequired,\n PT.string.isRequired,\n]);\n\nexport type OptionT<NameT> = {\n name?: NameT | null;\n value: ValueT;\n};\n\nexport type OptionsT<NameT> = Readonly<Array<OptionT<NameT> | ValueT>>;\n\nexport type PropsT<\n NameT,\n OnChangeT = React.ChangeEventHandler<HTMLSelectElement>,\n> = {\n filter?: (item: OptionT<NameT> | ValueT) => boolean;\n label?: React.ReactNode;\n onChange?: OnChangeT;\n options?: OptionsT<NameT>;\n theme: Theme<typeof validThemeKeys>;\n value?: ValueT;\n};\n\nexport const optionValidator:\nPT.Requireable<OptionT<React.ReactNode> | ValueT> = PT.oneOfType([\n PT.shape({\n name: PT.node,\n value: valueValidator.isRequired,\n }).isRequired,\n PT.number.isRequired,\n PT.string.isRequired,\n]);\n\nexport const optionsValidator = PT.arrayOf(optionValidator.isRequired);\n\nexport const stringOptionValidator:\nPT.Requireable<OptionT<string> | ValueT> = PT.oneOfType([\n PT.shape({\n name: PT.string,\n value: valueValidator.isRequired,\n }).isRequired,\n PT.number.isRequired,\n PT.string.isRequired,\n]);\n\nexport const stringOptionsValidator = PT.arrayOf(stringOptionValidator.isRequired);\n\nfunction isValue<T>(x: OptionT<T> | ValueT): x is ValueT {\n const type = typeof x;\n return type === 'number' || type === 'string';\n}\n\n/** Returns option value and name as a tuple. */\nexport function optionValueName<NameT>(\n option: OptionT<NameT> | ValueT,\n): [ValueT, NameT | ValueT] {\n return isValue(option)\n ? [option, option]\n : [option.value, option.name ?? option.value];\n}\n"],"mappings":";;;;;;;;;AAEA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AAFA;;AAMO,MAAMC,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG,CAC5B,QAAQ,EACR,OAAO,EACP,WAAW,EACX,UAAU,EACV,cAAc,EACd,OAAO,EACP,QAAQ,EACR,QAAQ;AAER;AACA;AACA,QAAQ,CACA;AAIH,MAAME,cAAsC,GAAAD,OAAA,CAAAC,cAAA,GAAGC,kBAAE,CAACC,SAAS,CAAC,CACjED,kBAAE,CAACE,MAAM,CAACC,UAAU,EACpBH,kBAAE,CAACI,MAAM,CAACD,UAAU,CACrB,CAAC;AAqBK,MAAME,eACoC,GAAAP,OAAA,CAAAO,eAAA,GAAGL,kBAAE,CAACC,SAAS,CAAC,CAC/DD,kBAAE,CAACM,KAAK,CAAC;EACPC,IAAI,EAAEP,kBAAE,CAACQ,IAAI;EACbC,KAAK,EAAEV,cAAc,CAACI;AACxB,CAAC,CAAC,CAACA,UAAU,EACbH,kBAAE,CAACE,MAAM,CAACC,UAAU,EACpBH,kBAAE,CAACI,MAAM,CAACD,UAAU,CACrB,CAAC;AAEK,MAAMO,gBAAgB,GAAAZ,OAAA,CAAAY,gBAAA,GAAGV,kBAAE,CAACW,OAAO,CAACN,eAAe,CAACF,UAAU,CAAC;AAE/D,MAAMS,qBAC2B,GAAAd,OAAA,CAAAc,qBAAA,GAAGZ,kBAAE,CAACC,SAAS,CAAC,CACtDD,kBAAE,CAACM,KAAK,CAAC;EACPC,IAAI,EAAEP,kBAAE,CAACI,MAAM;EACfK,KAAK,EAAEV,cAAc,CAACI;AACxB,CAAC,CAAC,CAACA,UAAU,EACbH,kBAAE,CAACE,MAAM,CAACC,UAAU,EACpBH,kBAAE,CAACI,MAAM,CAACD,UAAU,CACrB,CAAC;AAEK,MAAMU,sBAAsB,GAAAf,OAAA,CAAAe,sBAAA,GAAGb,kBAAE,CAACW,OAAO,CAACC,qBAAqB,CAACT,UAAU,CAAC;AAElF,SAASW,OAAOA,CAAIC,CAAsB,EAAe;EACvD,MAAMC,IAAI,GAAG,OAAOD,CAAC;EACrB,OAAOC,IAAI,KAAK,QAAQ,IAAIA,IAAI,KAAK,QAAQ;AAC/C;;AAEA;AACO,SAASC,eAAeA,CAC7BC,MAA+B,EACL;EAC1B,OAAOJ,OAAO,CAACI,MAAM,CAAC,GAClB,CAACA,MAAM,EAAEA,MAAM,CAAC,GAChB,CAACA,MAAM,CAACT,KAAK,EAAES,MAAM,CAACX,IAAI,IAAIW,MAAM,CAACT,KAAK,CAAC;AACjD","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"globalState.js","names":["_reactGlobalState","require","getSsrContext","withGlobalStateType","exports"],"sources":["../../../../src/shared/utils/globalState.ts"],"sourcesContent":["import type { Request } from 'express';\n\nimport { type SsrContext, withGlobalStateType } from '@dr.pogodin/react-global-state';\n\nexport type ChunkGroupsT = {\n [chunkName: string]: string[];\n};\n\n// The type of data object injected by server into generated markup.\nexport type InjT = {\n CHUNK_GROUPS?: ChunkGroupsT;\n CONFIG?: { [key: string]: any },\n ISTATE?: unknown;\n};\n\nexport interface SsrContextT<StateT> extends SsrContext<StateT> {\n chunkGroups: ChunkGroupsT;\n chunks: string[];\n req: Request,\n status: number;\n}\n\nconst {\n getSsrContext,\n} = withGlobalStateType<unknown, SsrContextT<unknown>>();\n\nexport {\n getSsrContext,\n};\n"],"mappings":";;;;;;AAEA,IAAAA,iBAAA,GAAAC,OAAA;AAMA;;AAcA,MAAM;EACJC;AACF,CAAC,GAAG,IAAAC,qCAAmB,EAAgC,CAAC;AAACC,OAAA,CAAAF,aAAA,GAAAA,aAAA","ignoreList":[]}
1
+ {"version":3,"file":"globalState.js","names":["_reactGlobalState","require","getSsrContext","withGlobalStateType","exports"],"sources":["../../../../src/shared/utils/globalState.ts"],"sourcesContent":["import type { Request } from 'express';\n\nimport { type SsrContext, withGlobalStateType } from '@dr.pogodin/react-global-state';\n\nexport type ChunkGroupsT = {\n [chunkName: string]: string[];\n};\n\n// The type of data object injected by server into generated markup.\nexport type InjT = {\n CHUNK_GROUPS?: ChunkGroupsT;\n CONFIG?: { [key: string]: any },\n ISTATE?: unknown;\n};\n\ndeclare global {\n interface Window {\n REACT_UTILS_INJECTION?: InjT;\n }\n}\n\nexport interface SsrContextT<StateT> extends SsrContext<StateT> {\n chunkGroups: ChunkGroupsT;\n chunks: string[];\n req: Request,\n status: number;\n}\n\nconst {\n getSsrContext,\n} = withGlobalStateType<unknown, SsrContextT<unknown>>();\n\nexport {\n getSsrContext,\n};\n"],"mappings":";;;;;;AAEA,IAAAA,iBAAA,GAAAC,OAAA;AAMA;;AAoBA,MAAM;EACJC;AACF,CAAC,GAAG,IAAAC,qCAAmB,EAAgC,CAAC;AAACC,OAAA,CAAAF,aAAA,GAAAA,aAAA","ignoreList":[]}
@@ -26,7 +26,7 @@ return /******/ (function() { // webpackBootstrap
26
26
  \******************************/
27
27
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
28
28
 
29
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ getInj; }\n/* harmony export */ });\n/* harmony import */ var node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! node-forge/lib/forge */ \"node-forge/lib/forge\");\n/* harmony import */ var node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var node_forge_lib_aes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! node-forge/lib/aes */ \"node-forge/lib/aes\");\n/* harmony import */ var node_forge_lib_aes__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(node_forge_lib_aes__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _shared_utils_isomorphy_buildInfo__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../shared/utils/isomorphy/buildInfo */ \"./src/shared/utils/isomorphy/buildInfo.ts\");\n// Encapsulates retrieval of server-side data injection into HTML template.\n\n/* global document */\n\n// Note: this way, only required part of \"node-forge\": AES, and some utils,\n// is bundled into client-side code.\n\n\n\n\n// Safeguard is needed here, because the server-side version of Docusaurus docs\n// is compiled (at least now) with settings suggesting it is a client-side\n// environment, but there is no document.\nlet inj = {};\nconst metaElement = typeof document !== 'undefined' ? document.querySelector('meta[itemprop=\"drpruinj\"]') : null;\nif (metaElement) {\n metaElement.remove();\n let data = node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0___default().util.decode64(metaElement.content);\n const {\n key\n } = (0,_shared_utils_isomorphy_buildInfo__WEBPACK_IMPORTED_MODULE_2__.getBuildInfo)();\n const d = node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0___default().cipher.createDecipher('AES-CBC', key);\n d.start({\n iv: data.slice(0, key.length)\n });\n d.update(node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0___default().util.createBuffer(data.slice(key.length)));\n d.finish();\n data = node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0___default().util.decodeUtf8(d.output.data);\n inj = eval(`(${data})`); // eslint-disable-line no-eval\n} else {\n // Otherwise, a bunch of dependent stuff will easily fail in non-standard\n // environments, where no client-side initialization is performed. Like tests,\n // Docusaurus examples, etc.\n inj = {};\n}\nfunction getInj() {\n return inj;\n}\n\n//# sourceURL=webpack://@dr.pogodin/react-utils/./src/client/getInj.ts?");
29
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ getInj; }\n/* harmony export */ });\n/* harmony import */ var node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! node-forge/lib/forge */ \"node-forge/lib/forge\");\n/* harmony import */ var node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var node_forge_lib_aes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! node-forge/lib/aes */ \"node-forge/lib/aes\");\n/* harmony import */ var node_forge_lib_aes__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(node_forge_lib_aes__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _shared_utils_isomorphy_buildInfo__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../shared/utils/isomorphy/buildInfo */ \"./src/shared/utils/isomorphy/buildInfo.ts\");\n// Encapsulates retrieval of server-side data injection into HTML template.\n\n/* global document */\n\n// Note: this way, only required part of \"node-forge\": AES, and some utils,\n// is bundled into client-side code.\n\n\n\n\n// Safeguard is needed here, because the server-side version of Docusaurus docs\n// is compiled (at least now) with settings suggesting it is a client-side\n// environment, but there is no document.\nlet inj = {};\nconst metaElement = typeof document !== 'undefined' ? document.querySelector('meta[itemprop=\"drpruinj\"]') : null;\nif (metaElement) {\n metaElement.remove();\n let data = node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0___default().util.decode64(metaElement.content);\n const {\n key\n } = (0,_shared_utils_isomorphy_buildInfo__WEBPACK_IMPORTED_MODULE_2__.getBuildInfo)();\n const d = node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0___default().cipher.createDecipher('AES-CBC', key);\n d.start({\n iv: data.slice(0, key.length)\n });\n d.update(node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0___default().util.createBuffer(data.slice(key.length)));\n d.finish();\n data = node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0___default().util.decodeUtf8(d.output.data);\n inj = eval(`(${data})`); // eslint-disable-line no-eval\n} else if (typeof window !== 'undefined' && window.REACT_UTILS_INJECTION) {\n inj = window.REACT_UTILS_INJECTION;\n delete window.REACT_UTILS_INJECTION;\n} else {\n // Otherwise, a bunch of dependent stuff will easily fail in non-standard\n // environments, where no client-side initialization is performed. Like tests,\n // Docusaurus examples, etc.\n inj = {};\n}\nfunction getInj() {\n return inj;\n}\n\n//# sourceURL=webpack://@dr.pogodin/react-utils/./src/client/getInj.ts?");
30
30
 
31
31
  /***/ }),
32
32
 
@@ -5,7 +5,7 @@
5
5
  // is compiled (at least now) with settings suggesting it is a client-side
6
6
  // environment, but there is no document.
7
7
  let inj={};const metaElement=typeof document!=="undefined"?document.querySelector("meta[itemprop=\"drpruinj\"]"):null;if(metaElement){metaElement.remove();let data=_forge.default.util.decode64(metaElement.content);const{key}=(0,_buildInfo.getBuildInfo)();const d=_forge.default.cipher.createDecipher("AES-CBC",key);d.start({iv:data.slice(0,key.length)});d.update(_forge.default.util.createBuffer(data.slice(key.length)));d.finish();data=_forge.default.util.decodeUtf8(d.output.data);inj=eval(`(${data})`);// eslint-disable-line no-eval
8
- }else{// Otherwise, a bunch of dependent stuff will easily fail in non-standard
8
+ }else if(typeof window!=="undefined"&&window.REACT_UTILS_INJECTION){inj=window.REACT_UTILS_INJECTION;delete window.REACT_UTILS_INJECTION}else{// Otherwise, a bunch of dependent stuff will easily fail in non-standard
9
9
  // environments, where no client-side initialization is performed. Like tests,
10
10
  // Docusaurus examples, etc.
11
11
  inj={}}function getInj(){return inj}
@@ -1 +1 @@
1
- {"version":3,"file":"getInj.js","names":["_forge","_interopRequireDefault","require","_buildInfo","inj","metaElement","document","querySelector","remove","data","forge","util","decode64","content","key","getBuildInfo","d","cipher","createDecipher","start","iv","slice","length","update","createBuffer","finish","decodeUtf8","output","eval","getInj"],"sources":["../../../src/client/getInj.ts"],"sourcesContent":["// Encapsulates retrieval of server-side data injection into HTML template.\n\n/* global document */\n\n// Note: this way, only required part of \"node-forge\": AES, and some utils,\n// is bundled into client-side code.\nimport forge from 'node-forge/lib/forge';\nimport 'node-forge/lib/aes';\n\nimport type { InjT } from 'utils/globalState';\n\nimport { getBuildInfo } from 'utils/isomorphy/buildInfo';\n\n// Safeguard is needed here, because the server-side version of Docusaurus docs\n// is compiled (at least now) with settings suggesting it is a client-side\n// environment, but there is no document.\nlet inj: InjT = {};\n\nconst metaElement: HTMLMetaElement | null = typeof document !== 'undefined'\n ? document.querySelector('meta[itemprop=\"drpruinj\"]') : null;\n\nif (metaElement) {\n metaElement.remove();\n let data = forge.util.decode64(metaElement.content);\n\n const { key } = getBuildInfo();\n const d = forge.cipher.createDecipher('AES-CBC', key);\n d.start({ iv: data.slice(0, key.length) });\n d.update(forge.util.createBuffer(data.slice(key.length)));\n d.finish();\n\n data = forge.util.decodeUtf8(d.output.data);\n inj = eval(`(${data})`); // eslint-disable-line no-eval\n} else {\n // Otherwise, a bunch of dependent stuff will easily fail in non-standard\n // environments, where no client-side initialization is performed. Like tests,\n // Docusaurus examples, etc.\n inj = {};\n}\n\nexport default function getInj(): InjT {\n return inj;\n}\n"],"mappings":"gLAMA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,0BACAA,OAAA,uBAIA,IAAAC,UAAA,CAAAD,OAAA,wCAXA;AAEA,sBAEA;AACA;AAQA;AACA;AACA;AACA,GAAI,CAAAE,GAAS,CAAG,CAAC,CAAC,CAElB,KAAM,CAAAC,WAAmC,CAAG,MAAO,CAAAC,QAAQ,GAAK,WAAW,CACvEA,QAAQ,CAACC,aAAa,CAAC,6BAA2B,CAAC,CAAG,IAAI,CAE9D,GAAIF,WAAW,CAAE,CACfA,WAAW,CAACG,MAAM,CAAC,CAAC,CACpB,GAAI,CAAAC,IAAI,CAAGC,cAAK,CAACC,IAAI,CAACC,QAAQ,CAACP,WAAW,CAACQ,OAAO,CAAC,CAEnD,KAAM,CAAEC,GAAI,CAAC,CAAG,GAAAC,uBAAY,EAAC,CAAC,CAC9B,KAAM,CAAAC,CAAC,CAAGN,cAAK,CAACO,MAAM,CAACC,cAAc,CAAC,SAAS,CAAEJ,GAAG,CAAC,CACrDE,CAAC,CAACG,KAAK,CAAC,CAAEC,EAAE,CAAEX,IAAI,CAACY,KAAK,CAAC,CAAC,CAAEP,GAAG,CAACQ,MAAM,CAAE,CAAC,CAAC,CAC1CN,CAAC,CAACO,MAAM,CAACb,cAAK,CAACC,IAAI,CAACa,YAAY,CAACf,IAAI,CAACY,KAAK,CAACP,GAAG,CAACQ,MAAM,CAAC,CAAC,CAAC,CACzDN,CAAC,CAACS,MAAM,CAAC,CAAC,CAEVhB,IAAI,CAAGC,cAAK,CAACC,IAAI,CAACe,UAAU,CAACV,CAAC,CAACW,MAAM,CAAClB,IAAI,CAAC,CAC3CL,GAAG,CAAGwB,IAAI,CAAC,IAAInB,IAAI,GAAG,CAAC,CAAE;AAC3B,CAAC,IAAM,CACL;AACA;AACA;AACAL,GAAG,CAAG,CAAC,CACT,CAEe,QAAS,CAAAyB,MAAMA,CAAA,CAAS,CACrC,MAAO,CAAAzB,GACT","ignoreList":[]}
1
+ {"version":3,"file":"getInj.js","names":["_forge","_interopRequireDefault","require","_buildInfo","inj","metaElement","document","querySelector","remove","data","forge","util","decode64","content","key","getBuildInfo","d","cipher","createDecipher","start","iv","slice","length","update","createBuffer","finish","decodeUtf8","output","eval","window","REACT_UTILS_INJECTION","getInj"],"sources":["../../../src/client/getInj.ts"],"sourcesContent":["// Encapsulates retrieval of server-side data injection into HTML template.\n\n/* global document */\n\n// Note: this way, only required part of \"node-forge\": AES, and some utils,\n// is bundled into client-side code.\nimport forge from 'node-forge/lib/forge';\nimport 'node-forge/lib/aes';\n\nimport type { InjT } from 'utils/globalState';\n\nimport { getBuildInfo } from 'utils/isomorphy/buildInfo';\n\n// Safeguard is needed here, because the server-side version of Docusaurus docs\n// is compiled (at least now) with settings suggesting it is a client-side\n// environment, but there is no document.\nlet inj: InjT = {};\n\nconst metaElement: HTMLMetaElement | null = typeof document !== 'undefined'\n ? document.querySelector('meta[itemprop=\"drpruinj\"]') : null;\n\nif (metaElement) {\n metaElement.remove();\n let data = forge.util.decode64(metaElement.content);\n\n const { key } = getBuildInfo();\n const d = forge.cipher.createDecipher('AES-CBC', key);\n d.start({ iv: data.slice(0, key.length) });\n d.update(forge.util.createBuffer(data.slice(key.length)));\n d.finish();\n\n data = forge.util.decodeUtf8(d.output.data);\n inj = eval(`(${data})`); // eslint-disable-line no-eval\n} else if (typeof window !== 'undefined' && window.REACT_UTILS_INJECTION) {\n inj = window.REACT_UTILS_INJECTION;\n delete window.REACT_UTILS_INJECTION;\n} else {\n // Otherwise, a bunch of dependent stuff will easily fail in non-standard\n // environments, where no client-side initialization is performed. Like tests,\n // Docusaurus examples, etc.\n inj = {};\n}\n\nexport default function getInj(): InjT {\n return inj;\n}\n"],"mappings":"gLAMA,IAAAA,MAAA,CAAAC,sBAAA,CAAAC,OAAA,0BACAA,OAAA,uBAIA,IAAAC,UAAA,CAAAD,OAAA,wCAXA;AAEA,sBAEA;AACA;AAQA;AACA;AACA;AACA,GAAI,CAAAE,GAAS,CAAG,CAAC,CAAC,CAElB,KAAM,CAAAC,WAAmC,CAAG,MAAO,CAAAC,QAAQ,GAAK,WAAW,CACvEA,QAAQ,CAACC,aAAa,CAAC,6BAA2B,CAAC,CAAG,IAAI,CAE9D,GAAIF,WAAW,CAAE,CACfA,WAAW,CAACG,MAAM,CAAC,CAAC,CACpB,GAAI,CAAAC,IAAI,CAAGC,cAAK,CAACC,IAAI,CAACC,QAAQ,CAACP,WAAW,CAACQ,OAAO,CAAC,CAEnD,KAAM,CAAEC,GAAI,CAAC,CAAG,GAAAC,uBAAY,EAAC,CAAC,CAC9B,KAAM,CAAAC,CAAC,CAAGN,cAAK,CAACO,MAAM,CAACC,cAAc,CAAC,SAAS,CAAEJ,GAAG,CAAC,CACrDE,CAAC,CAACG,KAAK,CAAC,CAAEC,EAAE,CAAEX,IAAI,CAACY,KAAK,CAAC,CAAC,CAAEP,GAAG,CAACQ,MAAM,CAAE,CAAC,CAAC,CAC1CN,CAAC,CAACO,MAAM,CAACb,cAAK,CAACC,IAAI,CAACa,YAAY,CAACf,IAAI,CAACY,KAAK,CAACP,GAAG,CAACQ,MAAM,CAAC,CAAC,CAAC,CACzDN,CAAC,CAACS,MAAM,CAAC,CAAC,CAEVhB,IAAI,CAAGC,cAAK,CAACC,IAAI,CAACe,UAAU,CAACV,CAAC,CAACW,MAAM,CAAClB,IAAI,CAAC,CAC3CL,GAAG,CAAGwB,IAAI,CAAC,IAAInB,IAAI,GAAG,CAAC,CAAE;AAC3B,CAAC,IAAM,IAAI,MAAO,CAAAoB,MAAM,GAAK,WAAW,EAAIA,MAAM,CAACC,qBAAqB,CAAE,CACxE1B,GAAG,CAAGyB,MAAM,CAACC,qBAAqB,CAClC,MAAO,CAAAD,MAAM,CAACC,qBAChB,CAAC,IAAM,CACL;AACA;AACA;AACA1B,GAAG,CAAG,CAAC,CACT,CAEe,QAAS,CAAA2B,MAAMA,CAAA,CAAS,CACrC,MAAO,CAAA3B,GACT","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"common.js","names":["_propTypes","_interopRequireDefault","require","validThemeKeys","exports","valueValidator","PT","oneOfType","number","isRequired","string","optionValidator","shape","name","node","value","optionsValidator","arrayOf","stringOptionValidator","stringOptionsValidator","isValue","x","type","optionValueName","option"],"sources":["../../../../../src/shared/components/selectors/common.ts"],"sourcesContent":["// The stuff common between different dropdown implementations.\n\nimport PT from 'prop-types';\n\nimport type { Theme } from '@dr.pogodin/react-themes';\n\nexport const validThemeKeys = [\n 'active',\n 'arrow',\n 'container',\n 'dropdown',\n 'hiddenOption',\n 'label',\n 'option',\n 'select',\n\n // TODO: This is only valid for <CustomDropdown>, thus we need to re-factor it\n // into a separate theme spec for that component.\n 'upward',\n] as const;\n\nexport type ValueT = number | string;\n\nexport const valueValidator: PT.Requireable<ValueT> = PT.oneOfType([\n PT.number.isRequired,\n PT.string.isRequired,\n]);\n\nexport type OptionT<NameT> = {\n name?: NameT | null;\n value: ValueT;\n};\n\nexport type OptionsT<NameT> = Array<OptionT<NameT> | ValueT>;\n\nexport type PropsT<\n NameT,\n OnChangeT = React.ChangeEventHandler<HTMLSelectElement>,\n> = {\n filter?: (item: OptionT<NameT> | ValueT) => boolean;\n label?: React.ReactNode;\n onChange?: OnChangeT;\n options?: OptionsT<NameT>;\n theme: Theme<typeof validThemeKeys>;\n value?: ValueT;\n};\n\nexport const optionValidator:\nPT.Requireable<OptionT<React.ReactNode> | ValueT> = PT.oneOfType([\n PT.shape({\n name: PT.node,\n value: valueValidator.isRequired,\n }).isRequired,\n PT.number.isRequired,\n PT.string.isRequired,\n]);\n\nexport const optionsValidator = PT.arrayOf(optionValidator.isRequired);\n\nexport const stringOptionValidator:\nPT.Requireable<OptionT<string> | ValueT> = PT.oneOfType([\n PT.shape({\n name: PT.string,\n value: valueValidator.isRequired,\n }).isRequired,\n PT.number.isRequired,\n PT.string.isRequired,\n]);\n\nexport const stringOptionsValidator = PT.arrayOf(stringOptionValidator.isRequired);\n\nfunction isValue<T>(x: OptionT<T> | ValueT): x is ValueT {\n const type = typeof x;\n return type === 'number' || type === 'string';\n}\n\n/** Returns option value and name as a tuple. */\nexport function optionValueName<NameT>(\n option: OptionT<NameT> | ValueT,\n): [ValueT, NameT | ValueT] {\n return isValue(option)\n ? [option, option]\n : [option.value, option.name ?? option.value];\n}\n"],"mappings":"2WAEA,IAAAA,UAAA,CAAAC,sBAAA,CAAAC,OAAA,gBAFA;AAMO,KAAM,CAAAC,cAAc,CAAAC,OAAA,CAAAD,cAAA,CAAG,CAC5B,QAAQ,CACR,OAAO,CACP,WAAW,CACX,UAAU,CACV,cAAc,CACd,OAAO,CACP,QAAQ,CACR,QAAQ,CAER;AACA;AACA,QAAQ,CACA,CAIH,KAAM,CAAAE,cAAsC,CAAAD,OAAA,CAAAC,cAAA,CAAGC,kBAAE,CAACC,SAAS,CAAC,CACjED,kBAAE,CAACE,MAAM,CAACC,UAAU,CACpBH,kBAAE,CAACI,MAAM,CAACD,UAAU,CACrB,CAAC,CAqBK,KAAM,CAAAE,eACoC,CAAAP,OAAA,CAAAO,eAAA,CAAGL,kBAAE,CAACC,SAAS,CAAC,CAC/DD,kBAAE,CAACM,KAAK,CAAC,CACPC,IAAI,CAAEP,kBAAE,CAACQ,IAAI,CACbC,KAAK,CAAEV,cAAc,CAACI,UACxB,CAAC,CAAC,CAACA,UAAU,CACbH,kBAAE,CAACE,MAAM,CAACC,UAAU,CACpBH,kBAAE,CAACI,MAAM,CAACD,UAAU,CACrB,CAAC,CAEK,KAAM,CAAAO,gBAAgB,CAAAZ,OAAA,CAAAY,gBAAA,CAAGV,kBAAE,CAACW,OAAO,CAACN,eAAe,CAACF,UAAU,CAAC,CAE/D,KAAM,CAAAS,qBAC2B,CAAAd,OAAA,CAAAc,qBAAA,CAAGZ,kBAAE,CAACC,SAAS,CAAC,CACtDD,kBAAE,CAACM,KAAK,CAAC,CACPC,IAAI,CAAEP,kBAAE,CAACI,MAAM,CACfK,KAAK,CAAEV,cAAc,CAACI,UACxB,CAAC,CAAC,CAACA,UAAU,CACbH,kBAAE,CAACE,MAAM,CAACC,UAAU,CACpBH,kBAAE,CAACI,MAAM,CAACD,UAAU,CACrB,CAAC,CAEK,KAAM,CAAAU,sBAAsB,CAAAf,OAAA,CAAAe,sBAAA,CAAGb,kBAAE,CAACW,OAAO,CAACC,qBAAqB,CAACT,UAAU,CAAC,CAElF,QAAS,CAAAW,OAAOA,CAAIC,CAAsB,CAAe,CACvD,KAAM,CAAAC,IAAI,CAAG,MAAO,CAAAD,CAAC,CACrB,MAAO,CAAAC,IAAI,GAAK,QAAQ,EAAIA,IAAI,GAAK,QACvC,CAEA,gDACO,QAAS,CAAAC,eAAeA,CAC7BC,MAA+B,CACL,CAC1B,MAAO,CAAAJ,OAAO,CAACI,MAAM,CAAC,CAClB,CAACA,MAAM,CAAEA,MAAM,CAAC,CAChB,CAACA,MAAM,CAACT,KAAK,CAAES,MAAM,CAACX,IAAI,EAAIW,MAAM,CAACT,KAAK,CAChD","ignoreList":[]}
1
+ {"version":3,"file":"common.js","names":["_propTypes","_interopRequireDefault","require","validThemeKeys","exports","valueValidator","PT","oneOfType","number","isRequired","string","optionValidator","shape","name","node","value","optionsValidator","arrayOf","stringOptionValidator","stringOptionsValidator","isValue","x","type","optionValueName","option"],"sources":["../../../../../src/shared/components/selectors/common.ts"],"sourcesContent":["// The stuff common between different dropdown implementations.\n\nimport PT from 'prop-types';\n\nimport type { Theme } from '@dr.pogodin/react-themes';\n\nexport const validThemeKeys = [\n 'active',\n 'arrow',\n 'container',\n 'dropdown',\n 'hiddenOption',\n 'label',\n 'option',\n 'select',\n\n // TODO: This is only valid for <CustomDropdown>, thus we need to re-factor it\n // into a separate theme spec for that component.\n 'upward',\n] as const;\n\nexport type ValueT = number | string;\n\nexport const valueValidator: PT.Requireable<ValueT> = PT.oneOfType([\n PT.number.isRequired,\n PT.string.isRequired,\n]);\n\nexport type OptionT<NameT> = {\n name?: NameT | null;\n value: ValueT;\n};\n\nexport type OptionsT<NameT> = Readonly<Array<OptionT<NameT> | ValueT>>;\n\nexport type PropsT<\n NameT,\n OnChangeT = React.ChangeEventHandler<HTMLSelectElement>,\n> = {\n filter?: (item: OptionT<NameT> | ValueT) => boolean;\n label?: React.ReactNode;\n onChange?: OnChangeT;\n options?: OptionsT<NameT>;\n theme: Theme<typeof validThemeKeys>;\n value?: ValueT;\n};\n\nexport const optionValidator:\nPT.Requireable<OptionT<React.ReactNode> | ValueT> = PT.oneOfType([\n PT.shape({\n name: PT.node,\n value: valueValidator.isRequired,\n }).isRequired,\n PT.number.isRequired,\n PT.string.isRequired,\n]);\n\nexport const optionsValidator = PT.arrayOf(optionValidator.isRequired);\n\nexport const stringOptionValidator:\nPT.Requireable<OptionT<string> | ValueT> = PT.oneOfType([\n PT.shape({\n name: PT.string,\n value: valueValidator.isRequired,\n }).isRequired,\n PT.number.isRequired,\n PT.string.isRequired,\n]);\n\nexport const stringOptionsValidator = PT.arrayOf(stringOptionValidator.isRequired);\n\nfunction isValue<T>(x: OptionT<T> | ValueT): x is ValueT {\n const type = typeof x;\n return type === 'number' || type === 'string';\n}\n\n/** Returns option value and name as a tuple. */\nexport function optionValueName<NameT>(\n option: OptionT<NameT> | ValueT,\n): [ValueT, NameT | ValueT] {\n return isValue(option)\n ? [option, option]\n : [option.value, option.name ?? option.value];\n}\n"],"mappings":"2WAEA,IAAAA,UAAA,CAAAC,sBAAA,CAAAC,OAAA,gBAFA;AAMO,KAAM,CAAAC,cAAc,CAAAC,OAAA,CAAAD,cAAA,CAAG,CAC5B,QAAQ,CACR,OAAO,CACP,WAAW,CACX,UAAU,CACV,cAAc,CACd,OAAO,CACP,QAAQ,CACR,QAAQ,CAER;AACA;AACA,QAAQ,CACA,CAIH,KAAM,CAAAE,cAAsC,CAAAD,OAAA,CAAAC,cAAA,CAAGC,kBAAE,CAACC,SAAS,CAAC,CACjED,kBAAE,CAACE,MAAM,CAACC,UAAU,CACpBH,kBAAE,CAACI,MAAM,CAACD,UAAU,CACrB,CAAC,CAqBK,KAAM,CAAAE,eACoC,CAAAP,OAAA,CAAAO,eAAA,CAAGL,kBAAE,CAACC,SAAS,CAAC,CAC/DD,kBAAE,CAACM,KAAK,CAAC,CACPC,IAAI,CAAEP,kBAAE,CAACQ,IAAI,CACbC,KAAK,CAAEV,cAAc,CAACI,UACxB,CAAC,CAAC,CAACA,UAAU,CACbH,kBAAE,CAACE,MAAM,CAACC,UAAU,CACpBH,kBAAE,CAACI,MAAM,CAACD,UAAU,CACrB,CAAC,CAEK,KAAM,CAAAO,gBAAgB,CAAAZ,OAAA,CAAAY,gBAAA,CAAGV,kBAAE,CAACW,OAAO,CAACN,eAAe,CAACF,UAAU,CAAC,CAE/D,KAAM,CAAAS,qBAC2B,CAAAd,OAAA,CAAAc,qBAAA,CAAGZ,kBAAE,CAACC,SAAS,CAAC,CACtDD,kBAAE,CAACM,KAAK,CAAC,CACPC,IAAI,CAAEP,kBAAE,CAACI,MAAM,CACfK,KAAK,CAAEV,cAAc,CAACI,UACxB,CAAC,CAAC,CAACA,UAAU,CACbH,kBAAE,CAACE,MAAM,CAACC,UAAU,CACpBH,kBAAE,CAACI,MAAM,CAACD,UAAU,CACrB,CAAC,CAEK,KAAM,CAAAU,sBAAsB,CAAAf,OAAA,CAAAe,sBAAA,CAAGb,kBAAE,CAACW,OAAO,CAACC,qBAAqB,CAACT,UAAU,CAAC,CAElF,QAAS,CAAAW,OAAOA,CAAIC,CAAsB,CAAe,CACvD,KAAM,CAAAC,IAAI,CAAG,MAAO,CAAAD,CAAC,CACrB,MAAO,CAAAC,IAAI,GAAK,QAAQ,EAAIA,IAAI,GAAK,QACvC,CAEA,gDACO,QAAS,CAAAC,eAAeA,CAC7BC,MAA+B,CACL,CAC1B,MAAO,CAAAJ,OAAO,CAACI,MAAM,CAAC,CAClB,CAACA,MAAM,CAAEA,MAAM,CAAC,CAChB,CAACA,MAAM,CAACT,KAAK,CAAES,MAAM,CAACX,IAAI,EAAIW,MAAM,CAACT,KAAK,CAChD","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"globalState.js","names":["_reactGlobalState","require","getSsrContext","withGlobalStateType","exports"],"sources":["../../../../src/shared/utils/globalState.ts"],"sourcesContent":["import type { Request } from 'express';\n\nimport { type SsrContext, withGlobalStateType } from '@dr.pogodin/react-global-state';\n\nexport type ChunkGroupsT = {\n [chunkName: string]: string[];\n};\n\n// The type of data object injected by server into generated markup.\nexport type InjT = {\n CHUNK_GROUPS?: ChunkGroupsT;\n CONFIG?: { [key: string]: any },\n ISTATE?: unknown;\n};\n\nexport interface SsrContextT<StateT> extends SsrContext<StateT> {\n chunkGroups: ChunkGroupsT;\n chunks: string[];\n req: Request,\n status: number;\n}\n\nconst {\n getSsrContext,\n} = withGlobalStateType<unknown, SsrContextT<unknown>>();\n\nexport {\n getSsrContext,\n};\n"],"mappings":"mGAEA,IAAAA,iBAAA,CAAAC,OAAA,mCAMA;AAcA,KAAM,CACJC,aACF,CAAC,CAAG,GAAAC,qCAAmB,EAAgC,CAAC,CAACC,OAAA,CAAAF,aAAA,CAAAA,aAAA","ignoreList":[]}
1
+ {"version":3,"file":"globalState.js","names":["_reactGlobalState","require","getSsrContext","withGlobalStateType","exports"],"sources":["../../../../src/shared/utils/globalState.ts"],"sourcesContent":["import type { Request } from 'express';\n\nimport { type SsrContext, withGlobalStateType } from '@dr.pogodin/react-global-state';\n\nexport type ChunkGroupsT = {\n [chunkName: string]: string[];\n};\n\n// The type of data object injected by server into generated markup.\nexport type InjT = {\n CHUNK_GROUPS?: ChunkGroupsT;\n CONFIG?: { [key: string]: any },\n ISTATE?: unknown;\n};\n\ndeclare global {\n interface Window {\n REACT_UTILS_INJECTION?: InjT;\n }\n}\n\nexport interface SsrContextT<StateT> extends SsrContext<StateT> {\n chunkGroups: ChunkGroupsT;\n chunks: string[];\n req: Request,\n status: number;\n}\n\nconst {\n getSsrContext,\n} = withGlobalStateType<unknown, SsrContextT<unknown>>();\n\nexport {\n getSsrContext,\n};\n"],"mappings":"mGAEA,IAAAA,iBAAA,CAAAC,OAAA,mCAMA;AAoBA,KAAM,CACJC,aACF,CAAC,CAAG,GAAAC,qCAAmB,EAAgC,CAAC,CAACC,OAAA,CAAAF,aAAA,CAAAA,aAAA","ignoreList":[]}
@@ -1,3 +1,3 @@
1
1
  /*! For license information please see web.bundle.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@dr.pogodin/js-utils"),require("@dr.pogodin/react-global-state"),require("@dr.pogodin/react-themes"),require("axios"),require("dayjs"),require("node-forge/lib/aes"),require("node-forge/lib/forge"),require("prop-types"),require("qs"),require("react"),require("react-dom"),require("react-dom/client"),require("react-helmet"),require("react-router-dom")):"function"==typeof define&&define.amd?define(["@dr.pogodin/js-utils","@dr.pogodin/react-global-state","@dr.pogodin/react-themes","axios","dayjs","node-forge/lib/aes","node-forge/lib/forge","prop-types","qs","react","react-dom","react-dom/client","react-helmet","react-router-dom"],t):"object"==typeof exports?exports["@dr.pogodin/react-utils"]=t(require("@dr.pogodin/js-utils"),require("@dr.pogodin/react-global-state"),require("@dr.pogodin/react-themes"),require("axios"),require("dayjs"),require("node-forge/lib/aes"),require("node-forge/lib/forge"),require("prop-types"),require("qs"),require("react"),require("react-dom"),require("react-dom/client"),require("react-helmet"),require("react-router-dom")):e["@dr.pogodin/react-utils"]=t(e["@dr.pogodin/js-utils"],e["@dr.pogodin/react-global-state"],e["@dr.pogodin/react-themes"],e.axios,e.dayjs,e["node-forge/lib/aes"],e["node-forge/lib/forge"],e["prop-types"],e.qs,e.react,e["react-dom"],e["react-dom/client"],e["react-helmet"],e["react-router-dom"])}("undefined"!=typeof self?self:this,(function(__WEBPACK_EXTERNAL_MODULE__864__,__WEBPACK_EXTERNAL_MODULE__126__,__WEBPACK_EXTERNAL_MODULE__859__,__WEBPACK_EXTERNAL_MODULE__742__,__WEBPACK_EXTERNAL_MODULE__185__,__WEBPACK_EXTERNAL_MODULE__958__,__WEBPACK_EXTERNAL_MODULE__814__,__WEBPACK_EXTERNAL_MODULE__949__,__WEBPACK_EXTERNAL_MODULE__360__,__WEBPACK_EXTERNAL_MODULE__155__,__WEBPACK_EXTERNAL_MODULE__514__,__WEBPACK_EXTERNAL_MODULE__236__,__WEBPACK_EXTERNAL_MODULE__883__,__WEBPACK_EXTERNAL_MODULE__442__){return function(){"use strict";var __webpack_modules__={227:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{A:function(){return getInj}});var node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(814),node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0__),node_forge_lib_aes__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(958),node_forge_lib_aes__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(node_forge_lib_aes__WEBPACK_IMPORTED_MODULE_1__),_shared_utils_isomorphy_buildInfo__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(445);let inj={};const metaElement="undefined"!=typeof document?document.querySelector('meta[itemprop="drpruinj"]'):null;if(metaElement){metaElement.remove();let data=node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0___default().util.decode64(metaElement.content);const{key:key}=(0,_shared_utils_isomorphy_buildInfo__WEBPACK_IMPORTED_MODULE_2__.F)(),d=node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0___default().cipher.createDecipher("AES-CBC",key);d.start({iv:data.slice(0,key.length)}),d.update(node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0___default().util.createBuffer(data.slice(key.length))),d.finish(),data=node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0___default().util.decodeUtf8(d.output.data),inj=eval(`(${data})`)}else inj={};function getInj(){return inj}},662:function(e,t,n){n.d(t,{A:function(){return l}}),n(155);var r=n(126),o=n(236),i=n(442),a=n(227),c=n(848);function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=document.getElementById("react-view");if(!n)throw Error("Failed to find container for React app");const l=(0,c.jsx)(r.GlobalStateProvider,{initialState:(0,a.A)().ISTATE||t.initialState,children:(0,c.jsx)(i.BrowserRouter,{future:{v7_relativeSplatPath:!0},children:(0,c.jsx)(e,{})})});t.dontHydrate?(0,o.createRoot)(n).render(l):(0,o.hydrateRoot)(n,l)}},445:function(e,t,n){let r;function o(){if(void 0===r)throw Error('"Build Info" has not been initialized yet');return r}n.d(t,{F:function(){return o}}),"undefined"!=typeof BUILD_INFO&&(r=BUILD_INFO)},965:function(e,t,n){n.d(t,{B:function(){return r},p:function(){return o}});const r="object"!=typeof process||!process.versions||!process.versions.node||!!n.g.REACT_UTILS_FORCE_CLIENT_SIDE,o=!r},333:function(e,t,n){n.r(t),n.d(t,{IS_CLIENT_SIDE:function(){return o.B},IS_SERVER_SIDE:function(){return o.p},buildTimestamp:function(){return c},getBuildInfo:function(){return r.F},isDevBuild:function(){return i},isProdBuild:function(){return a}});var r=n(445),o=n(965);function i(){return!1}function a(){return!0}function c(){return(0,r.F)().timestamp}},969:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{requireWeak:function(){return requireWeak},resolveWeak:function(){return resolveWeak}});var _isomorphy__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(333);function requireWeak(modulePath,basePath){if(_isomorphy__WEBPACK_IMPORTED_MODULE_0__.IS_CLIENT_SIDE)return null;try{const{resolve:resolve}=eval("require")("path"),path=basePath?resolve(basePath,modulePath):modulePath,{default:def,...named}=eval("require")(path);return def?(Object.entries(named).forEach((e=>{let[t,n]=e;if(def[t]){if(def[t]!==n)throw Error("Conflict between default and named exports")}else def[t]=n})),def):named}catch{return null}}function resolveWeak(e){return e}},427:function(e,t){t.parse=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var n={},r=(t||{}).decode||o,i=0;i<e.length;){var c=e.indexOf("=",i);if(-1===c)break;var l=e.indexOf(";",i);if(-1===l)l=e.length;else if(l<c){i=e.lastIndexOf(";",c-1)+1;continue}var s=e.slice(i,c).trim();if(void 0===n[s]){var u=e.slice(c+1,l).trim();34===u.charCodeAt(0)&&(u=u.slice(1,-1)),n[s]=a(u,r)}i=l+1}return n},t.serialize=function(e,t,o){var a=o||{},c=a.encode||i;if("function"!=typeof c)throw new TypeError("option encode is invalid");if(!r.test(e))throw new TypeError("argument name is invalid");var l=c(t);if(l&&!r.test(l))throw new TypeError("argument val is invalid");var s=e+"="+l;if(null!=a.maxAge){var u=a.maxAge-0;if(isNaN(u)||!isFinite(u))throw new TypeError("option maxAge is invalid");s+="; Max-Age="+Math.floor(u)}if(a.domain){if(!r.test(a.domain))throw new TypeError("option domain is invalid");s+="; Domain="+a.domain}if(a.path){if(!r.test(a.path))throw new TypeError("option path is invalid");s+="; Path="+a.path}if(a.expires){var _=a.expires;if(!function(e){return"[object Date]"===n.call(e)||e instanceof Date}(_)||isNaN(_.valueOf()))throw new TypeError("option expires is invalid");s+="; Expires="+_.toUTCString()}if(a.httpOnly&&(s+="; HttpOnly"),a.secure&&(s+="; Secure"),a.partitioned&&(s+="; Partitioned"),a.priority)switch("string"==typeof a.priority?a.priority.toLowerCase():a.priority){case"low":s+="; Priority=Low";break;case"medium":s+="; Priority=Medium";break;case"high":s+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}if(a.sameSite)switch("string"==typeof a.sameSite?a.sameSite.toLowerCase():a.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return s};var n=Object.prototype.toString,r=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function o(e){return-1!==e.indexOf("%")?decodeURIComponent(e):e}function i(e){return encodeURIComponent(e)}function a(e,t){try{return t(e)}catch(t){return e}}},20:function(e,t,n){var r=n(155),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,c=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,n){var r,i={},s=null,u=null;for(r in void 0!==n&&(s=""+n),void 0!==t.key&&(s=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,r)&&!l.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:s,ref:u,props:i,_owner:c.current}}t.Fragment=i,t.jsx=s,t.jsxs=s},848:function(e,t,n){e.exports=n(20)},864:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__864__},126:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__126__},859:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__859__},742:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__742__},185:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__185__},958:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__958__},814:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__814__},949:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__949__},360:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__360__},155:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__155__},514:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__514__},236:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__236__},883:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__883__},442:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__442__}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](n,n.exports,__webpack_require__),n.exports}__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=function(e,t){for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};return function(){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Barrier:function(){return _.Barrier},BaseButton:function(){return oe},BaseModal:function(){return L},Button:function(){return ae},Checkbox:function(){return se},CustomDropdown:function(){return z},Dropdown:function(){return V},Emitter:function(){return _.Emitter},GlobalStateProvider:function(){return d.GlobalStateProvider},Input:function(){return de},Link:function(){return re},MetaTags:function(){return we},Modal:function(){return N},NavLink:function(){return ve},PT:function(){return m},PageLayout:function(){return he},Semaphore:function(){return _.Semaphore},Switch:function(){return J},TextArea:function(){return Ke},ThemeProvider:function(){return e.ThemeProvider},Throbber:function(){return xe},WithTooltip:function(){return Le},YouTubeVideo:function(){return Ie},api:function(){return S()},client:function(){return Ye},config:function(){return i},getGlobalState:function(){return d.getGlobalState},getSsrContext:function(){return p},isomorphy:function(){return a},newAsyncDataEnvelope:function(){return d.newAsyncDataEnvelope},optionValidator:function(){return B},optionsValidator:function(){return I},server:function(){return Xe},splitComponent:function(){return k},themed:function(){return R},time:function(){return h},useAsyncCollection:function(){return d.useAsyncCollection},useAsyncData:function(){return d.useAsyncData},useGlobalState:function(){return d.useGlobalState},webpack:function(){return r},withGlobalStateType:function(){return d.withGlobalStateType},withRetries:function(){return _.withRetries}});var e=__webpack_require__(859),t=__webpack_require__.n(e),n=__webpack_require__(965),r=__webpack_require__(969);const o=(n.B?__webpack_require__(227).A().CONFIG:(0,r.requireWeak)("config"))||{};if(n.B&&"undefined"!=typeof document){const e=__webpack_require__(427);o.CSRF=e.parse(document.cookie).csrfToken}var i=o,a=__webpack_require__(333),c=__webpack_require__(427),l=__webpack_require__(185),s=__webpack_require__.n(l),u=__webpack_require__(155),_=__webpack_require__(864),d=__webpack_require__(126);const{getSsrContext:p}=(0,d.withGlobalStateType)(),f={DAY_MS:_.DAY_MS,HOUR_MS:_.HOUR_MS,MIN_MS:_.MIN_MS,SEC_MS:_.SEC_MS,YEAR_MS:_.YEAR_MS,now:Date.now,timer:_.timer,useCurrent:function(){let{autorefresh:e=!1,globalStatePath:t="currentTime",precision:n=5*_.SEC_MS}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[r,o]=(0,d.useGlobalState)(t,Date.now);return(0,u.useEffect)((()=>{let t;const r=()=>{o((e=>{const t=Date.now();return Math.abs(t-e)>n?t:e})),e&&(t=setTimeout(r,n))};return r(),()=>{t&&clearTimeout(t)}}),[e,n,o]),r},useTimezoneOffset:function(){let{cookieName:e="timezoneOffset",globalStatePath:t="timezoneOffset"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=p(!1),[r,o]=(0,d.useGlobalState)(t,(()=>{var t;const r=e&&(null==n||null===(t=n.req)||void 0===t||null===(t=t.cookies)||void 0===t?void 0:t[e]);return r?parseInt(r,10):0}));return(0,u.useEffect)((()=>{const t=(new Date).getTimezoneOffset();o(t),e&&(document.cookie=c.serialize(e,t.toString(),{path:"/"}))}),[e,o]),r}};var h=Object.assign(s(),f),m=__webpack_require__(949),b=__webpack_require__.n(m),E=__webpack_require__(848);let w;a.IS_CLIENT_SIDE&&(w=__webpack_require__(227).A().CHUNK_GROUPS||{});const v={};function g(){return(0,a.getBuildInfo)().publicPath}function y(e,t,n){let r;const o=`${g()}/${e}`,i=`${document.location.origin}${o}`;if(!t.has(i)){let e=document.querySelector(`link[href="${o}"]`);e||(e=document.createElement("link"),e.setAttribute("rel","stylesheet"),e.setAttribute("href",o),document.head.appendChild(e)),r=new _.Barrier,e.addEventListener("load",(()=>r.resolve())),e.addEventListener("error",(()=>r.resolve()))}if(n){const e=v[o]||0;v[o]=1+e}return r}function x(e,t){if(!t[e])throw Error(`Unknown chunk name "${e}"`)}function T(e,t,n){const r=[],o=t[e],i=function(){const e=new Set,{styleSheets:t}=document;for(let n=0;n<t.length;++n){const{href:r}=t[n];r&&e.add(r)}return e}();for(let e=0;e<o.length;++e){const t=o[e];if(t.endsWith(".css")){const e=y(t,i,n);e&&r.push(e)}}return r.length?Promise.allSettled(r).then():Promise.resolve()}const C=new Set;function k(e){let{chunkName:t,getComponent:n,placeholder:r}=e;if(a.IS_CLIENT_SIDE&&x(t,w),C.has(t))throw Error(`Repeated splitComponent() call for the chunk "${t}"`);C.add(t);const o=(0,u.lazy)((async()=>{const e=await n(),r="default"in e?e.default:e;a.IS_CLIENT_SIDE&&await T(t,w,!1);const o=(0,u.forwardRef)(((e,n)=>{let{children:o,...i}=e;if(a.IS_SERVER_SIDE){const{chunkGroups:e,chunks:n}=p();x(t,e),n.includes(t)||n.push(t)}return(0,u.useInsertionEffect)((()=>(T(t,w,!0),()=>function(e,t){const n=t[e];for(let e=0;e<n.length;++e){const t=n[e];if(t.endsWith(".css")){const e=`${g()}/${t}`;--v[e]<=0&&document.head.querySelector(`link[href="${e}"]`).remove()}}}(t,w))),[]),(0,E.jsx)(r,{ref:n,...i,children:o})}));return{default:o}})),i=e=>{let{children:t,...n}=e;return(0,E.jsx)(u.Suspense,{fallback:r,children:(0,E.jsx)(o,{...n,children:t})})};return i.propTypes={children:b().node},i}const R=t();R.COMPOSE=e.COMPOSE,R.PRIORITY=e.PRIORITY;var P=__webpack_require__(742),S=__webpack_require__.n(P),O=__webpack_require__(514),q=__webpack_require__.n(O),A="_5fRFtF";const L=e=>{let{cancelOnScrolling:t,children:n,containerStyle:r,dontDisableScrolling:o,onCancel:i,theme:a}=e;const c=(0,u.useRef)(null),l=(0,u.useRef)(null),[s,_]=(0,u.useState)();(0,u.useEffect)((()=>{const e=document.createElement("div");return document.body.appendChild(e),_(e),()=>{document.body.removeChild(e)}}),[]),(0,u.useEffect)((()=>(t&&i&&(window.addEventListener("scroll",i),window.addEventListener("wheel",i)),()=>{t&&i&&(window.removeEventListener("scroll",i),window.removeEventListener("wheel",i))})),[t,i]),(0,u.useEffect)((()=>(o||document.body.classList.add(A),()=>{o||document.body.classList.remove(A)})),[o]);const d=(0,u.useMemo)((()=>(0,E.jsx)("div",{onFocus:()=>{var e,t;const n=null===(e=c.current)||void 0===e?void 0:e.querySelectorAll("*");for(let e=n.length-1;e>=0;--e)if(n[e].focus(),document.activeElement===n[e])return;null===(t=l.current)||void 0===t||t.focus()},tabIndex:0})),[]);return s?q().createPortal((0,E.jsxs)(E.Fragment,{children:[d,(0,E.jsx)("div",{"aria-label":"Cancel",className:a.overlay,onClick:e=>{i&&(i(),e.stopPropagation())},onKeyDown:e=>{"Escape"===e.key&&i&&(i(),e.stopPropagation())},ref:e=>{e&&e!==l.current&&(l.current=e,e.focus())},role:"button",tabIndex:0}),(0,E.jsx)("div",{"aria-modal":"true",className:a.container,onClick:e=>e.stopPropagation(),onWheel:e=>e.stopPropagation(),ref:c,role:"dialog",style:r,children:n}),(0,E.jsx)("div",{onFocus:()=>{var e;null===(e=l.current)||void 0===e||e.focus()},tabIndex:0}),d]}),s):null},j=t()(L,"Modal",["container","overlay"],{overlay:"ye2BZo",context:"Szmbbz",ad:"Ah-Nsc",hoc:"Wki41G",container:"gyZ4rc"});L.propTypes={cancelOnScrolling:b().bool,children:b().node,containerStyle:b().shape({}),dontDisableScrolling:b().bool,onCancel:b().func,theme:j.themeType.isRequired};var N=j;const D=["active","arrow","container","dropdown","hiddenOption","label","option","select","upward"],M=b().oneOfType([b().number.isRequired,b().string.isRequired]),B=b().oneOfType([b().shape({name:b().node,value:M.isRequired}).isRequired,b().number.isRequired,b().string.isRequired]),I=b().arrayOf(B.isRequired),U=b().oneOfType([b().shape({name:b().string,value:M.isRequired}).isRequired,b().number.isRequired,b().string.isRequired]),W=b().arrayOf(U.isRequired);function K(e){var t;return function(e){const t=typeof e;return"number"===t||"string"===t}(e)?[e,e]:[e.value,null!==(t=e.name)&&void 0!==t?t:e.value]}const X=(0,u.forwardRef)(((e,t)=>{let{containerClass:n,containerStyle:r,filter:o,onCancel:i,onChange:a,optionClass:c,options:l}=e;const s=(0,u.useRef)(null);(0,u.useImperativeHandle)(t,(()=>({measure:()=>{var e,t;const n=null===(e=s.current)||void 0===e?void 0:e.parentElement;if(!n)return;const r=null===(t=s.current)||void 0===t?void 0:t.getBoundingClientRect(),o=window.getComputedStyle(n),i=parseFloat(o.marginBottom),a=parseFloat(o.marginTop);return r.height+=i+a,r}})),[]);const _=[];for(let e=0;e<l.length;++e){const t=l[e];if(!o||o(t)){const[e,n]=K(t);_.push((0,E.jsx)("div",{className:c,onClick:t=>{a(e),t.stopPropagation()},onKeyDown:t=>{"Enter"===t.key&&(a(e),t.stopPropagation())},role:"button",tabIndex:0,children:n},e))}}return(0,E.jsx)(L,{cancelOnScrolling:!0,containerStyle:r,dontDisableScrolling:!0,onCancel:i,theme:{ad:"",hoc:"",container:n,context:"",overlay:"jKsMKG"},children:(0,E.jsx)("div",{ref:s,children:_})})}));X.propTypes={containerClass:b().string.isRequired,containerStyle:b().shape({left:b().number.isRequired,top:b().number.isRequired,width:b().number.isRequired}),filter:b().func,onCancel:b().func.isRequired,onChange:b().func.isRequired,optionClass:b().string.isRequired,options:I.isRequired};var Y=X;const F=e=>{let{filter:t,label:n,onChange:r,options:o,theme:i,value:a}=e;if(!o)throw Error("Internal error");const[c,l]=(0,u.useState)(!1),s=(0,u.useRef)(null),_=(0,u.useRef)(null),[d,p]=(0,u.useState)(),[f,h]=(0,u.useState)(!1);(0,u.useEffect)((()=>{if(!c)return;let e;const t=()=>{var n,r;const o=null===(n=s.current)||void 0===n?void 0:n.getBoundingClientRect(),i=null===(r=_.current)||void 0===r?void 0:r.measure();if(o&&i){var a,c;const e=o.bottom+i.height<(null!==(a=null===(c=window.visualViewport)||void 0===c?void 0:c.height)&&void 0!==a?a:0),t=o.top-i.height>0,n=!e&&t;h(n);const r=n?{top:o.top-i.height-1,left:o.left,width:o.width}:{left:o.left,top:o.bottom,width:o.width};p((e=>{return n=r,(null==(t=e)?void 0:t.left)===(null==n?void 0:n.left)&&(null==t?void 0:t.top)===(null==n?void 0:n.top)&&(null==t?void 0:t.width)===(null==n?void 0:n.width)?e:r;var t,n}))}e=requestAnimationFrame(t)};return requestAnimationFrame(t),()=>{cancelAnimationFrame(e)}}),[c]);const m=e=>{const t=window.visualViewport,n=s.current.getBoundingClientRect();l(!0),p({left:(null==t?void 0:t.width)||0,top:(null==t?void 0:t.height)||0,width:n.width}),e.stopPropagation()};let b=(0,E.jsx)(E.Fragment,{children:"‌"});for(let e=0;e<o.length;++e){const n=o[e];if(!t||t(n)){const[e,t]=K(n);if(e===a){b=t;break}}}let w=i.container;c&&(w+=` ${i.active}`);let v=i.select||"";return f&&(w+=` ${i.upward}`,v+=` ${i.upward}`),(0,E.jsxs)("div",{className:w,children:[void 0===n?null:(0,E.jsx)("div",{className:i.label,children:n}),(0,E.jsxs)("div",{className:i.dropdown,onClick:m,onKeyDown:e=>{"Enter"===e.key&&m(e)},ref:s,role:"listbox",tabIndex:0,children:[b,(0,E.jsx)("div",{className:i.arrow})]}),c?(0,E.jsx)(Y,{containerClass:v,containerStyle:d,onCancel:()=>{l(!1)},onChange:e=>{l(!1),r&&r(e)},optionClass:i.option||"",options:o,ref:_}):null]})},$=t()(F,"CustomDropdown",D,{container:"oQKv0Y",context:"_9Tod5r",ad:"R58zIg",hoc:"O-Tp1i",label:"YUPUNs",dropdown:"pNEyAA",option:"LD2Kzy",select:"LP5azC",arrow:"-wscve",active:"k2UDsV",upward:"HWRvu4"});F.propTypes={filter:b().func,label:b().node,onChange:b().func,options:b().arrayOf(B.isRequired),theme:$.themeType.isRequired,value:M};var z=$;const H=e=>{let{filter:t,label:n,onChange:r,options:o,theme:i,value:a}=e;if(!o)throw Error("Internal error");let c=!1;const l=[];for(let e=0;e<o.length;++e){const n=o[e];if(!t||t(n)){const[e,t]=K(n);c||(c=e===a),l.push((0,E.jsx)("option",{className:i.option,value:e,children:t},e))}}const s=c?null:(0,E.jsx)("option",{disabled:!0,className:i.hiddenOption,value:a,children:a},"__reactUtilsHiddenOption");return(0,E.jsxs)("div",{className:i.container,children:[void 0===n?null:(0,E.jsx)("div",{className:i.label,children:n}),(0,E.jsxs)("div",{className:i.dropdown,children:[(0,E.jsxs)("select",{className:i.select,onChange:r,value:a,children:[s,l]}),(0,E.jsx)("div",{className:i.arrow})]})]})},G=t()(H,"Dropdown",D,{dropdown:"kI9A9U",context:"xHyZo4",ad:"ADu59e",hoc:"FTP2bb",arrow:"DubGkT",container:"WtSZPd",active:"ayMn7O",label:"K7JYKw",hiddenOption:"clAKFJ",select:"N0Fc14"});H.propTypes={filter:b().func,label:b().node,onChange:b().func,options:W,theme:G.themeType.isRequired,value:M};var V=G;const Z=e=>{let{label:t,onChange:n,options:r,theme:o,value:i}=e;if(!r||!o.option)throw Error("Internal error");const a=[];for(let e=0;e<(null==r?void 0:r.length);++e){const[t,c]=K(r[e]);let l,s=o.option;t===i?s+=` ${o.selected}`:n&&(l=()=>n(t)),a.push(l?(0,E.jsx)("div",{className:s,onClick:l,onKeyDown:e=>{l&&"Enter"===e.key&&l()},role:"button",tabIndex:0,children:c},t):(0,E.jsx)("div",{className:s,children:c},t))}return(0,E.jsxs)("div",{className:o.container,children:[t?(0,E.jsx)("div",{className:o.label,children:t}):null,(0,E.jsx)("div",{className:o.options,children:a})]})},Q=t()(Z,"Switch",["container","label","option","options","selected"],{container:"AWNvRj",context:"VMHfnP",ad:"HNliRC",hoc:"_2Ue-db",option:"fUfIAd",selected:"Wco-qk",options:"CZYtcC"});Z.propTypes={label:b().node,onChange:b().func,options:I,theme:Q.themeType.isRequired,value:M};var J=Q,ee=__webpack_require__(442);const te=e=>{let{children:t,className:n,disabled:r,enforceA:o,keepScrollPosition:i,onClick:a,onMouseDown:c,openNewTab:l,replace:s,routerLinkType:u,to:_,...d}=e;if(r||o||l||null!=_&&_.match(/^(#|(https?|mailto):)/))return(0,E.jsx)("a",{className:(n?n+" ":"")+"zH52sA",href:_,onClick:r?e=>e.preventDefault():a,onMouseDown:r?e=>e.preventDefault():c,rel:"noopener noreferrer",target:l?"_blank":"",children:t});const p=u;return(0,E.jsx)(p,{className:n,onMouseDown:c,replace:s,to:_,onClick:e=>{a&&a(e),i||window.scroll(0,0)},...d,children:t})};te.propTypes={children:b().node,className:b().string,disabled:b().bool,enforceA:b().bool,keepScrollPosition:b().bool,onClick:b().func,onMouseDown:b().func,openNewTab:b().bool,replace:b().bool,routerLinkType:b().elementType.isRequired,to:b().oneOfType([b().object,b().string])};var ne=te,re=e=>(0,E.jsx)(ne,{...e,routerLinkType:ee.Link});const oe=e=>{let{active:t,children:n,disabled:r,enforceA:o,onClick:i,onMouseDown:a,openNewTab:c,replace:l,theme:s,to:u}=e,_=s.button;return t&&s.active&&(_+=` ${s.active}`),r?(s.disabled&&(_+=` ${s.disabled}`),(0,E.jsx)("div",{className:_,children:n})):u?(0,E.jsx)(re,{className:_,enforceA:o,onClick:i,onMouseDown:a,openNewTab:c,replace:l,to:u,children:n}):(0,E.jsx)("div",{className:_,onClick:i,onKeyDown:i&&(e=>{"Enter"===e.key&&i(e)}),onMouseDown:a,role:"button",tabIndex:0,children:n})},ie=t()(oe,"Button",["active","button","disabled"],{button:"E1FNQT",context:"KM0v4f",ad:"_3jm1-Q",hoc:"_0plpDL",active:"MAe9O6",disabled:"Br9IWV"});oe.propTypes={active:b().bool,children:b().node,disabled:b().bool,enforceA:b().bool,onClick:b().func,onMouseDown:b().func,openNewTab:b().bool,replace:b().bool,theme:ie.themeType.isRequired,to:b().oneOfType([b().object,b().string])};var ae=ie;const ce=e=>{let{checked:t,label:n,onChange:r,theme:o}=e;return(0,E.jsxs)("div",{className:o.container,children:[void 0===n?null:(0,E.jsx)("div",{className:o.label,children:n}),(0,E.jsx)("input",{checked:t,className:o.checkbox,onChange:r,onClick:e=>e.stopPropagation(),type:"checkbox"})]})},le=t()(ce,"Checkbox",["checkbox","container","label"],{checkbox:"A-f8qJ",context:"dNQcC6",ad:"earXxa",hoc:"qAPfQ6",container:"Kr0g3M",label:"_3dML-O"});ce.propTypes={checked:b().bool,label:b().node,onChange:b().func,theme:le.themeType.isRequired};var se=le;const ue=(0,u.forwardRef)(((e,t)=>{let{label:n,theme:r,...o}=e;return(0,E.jsxs)("span",{className:r.container,children:[void 0===n?null:(0,E.jsx)("div",{className:r.label,children:n}),(0,E.jsx)("input",{className:r.input,ref:t,...o})]})})),_e=t()(ue,"Input",["container","input","label"],{container:"Cxx397",context:"X5WszA",ad:"_8s7GCr",hoc:"TVlBYc",input:"M07d4s",label:"gfbdq-"});ue.propTypes={label:b().node,theme:_e.themeType.isRequired};var de=_e;const pe=e=>{let{children:t,leftSidePanelContent:n,rightSidePanelContent:r,theme:o}=e;return(0,E.jsxs)("div",{className:o.container,children:[(0,E.jsx)("div",{className:[o.sidePanel,o.leftSidePanel].join(" "),children:n}),(0,E.jsx)("div",{className:o.mainPanel,children:t}),(0,E.jsx)("div",{className:[o.sidePanel,o.rightSidePanel].join(" "),children:r})]})},fe=t()(pe,"PageLayout",["container","leftSidePanel","mainPanel","rightSidePanel","sidePanel"],{container:"T3cuHB",context:"m4mL-M",ad:"m3-mdC",hoc:"J15Z4H",mainPanel:"pPlQO2",sidePanel:"lqNh4h"});pe.propTypes={children:b().node,leftSidePanelContent:b().node,rightSidePanelContent:b().node,theme:fe.themeType.isRequired};var he=fe,me=__webpack_require__(883);const be=(0,u.createContext)({description:"",title:""}),Ee=e=>{let{children:t,description:n,image:r,siteName:o,socialDescription:i,socialTitle:a,title:c,url:l}=e;const s=a||c,_=i||n,d=(0,u.useMemo)((()=>({description:n,image:r,siteName:o,socialDescription:i,socialTitle:a,title:c,url:l})),[n,r,o,i,a,c,l]);return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(me.Helmet,{children:[(0,E.jsx)("title",{children:c}),(0,E.jsx)("meta",{name:"description",content:n}),(0,E.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,E.jsx)("meta",{name:"twitter:title",content:s}),(0,E.jsx)("meta",{name:"twitter:description",content:_}),r?(0,E.jsx)("meta",{name:"twitter:image",content:r}):null,o?(0,E.jsx)("meta",{name:"twitter:site",content:`@${o}`}):null,(0,E.jsx)("meta",{name:"og:title",content:s}),r?(0,E.jsx)("meta",{name:"og:image",content:r}):null,r?(0,E.jsx)("meta",{name:"og:image:alt",content:s}):null,(0,E.jsx)("meta",{name:"og:description",content:_}),o?(0,E.jsx)("meta",{name:"og:sitename",content:o}):null,l?(0,E.jsx)("meta",{name:"og:url",content:l}):null]}),t?(0,E.jsx)(be.Provider,{value:d,children:t}):null]})};Ee.Context=be,Ee.propTypes={children:b().node,description:b().string.isRequired,image:b().string,siteName:b().string,socialDescription:b().string,socialTitle:b().string,title:b().string.isRequired,url:b().string};var we=Ee,ve=e=>(0,E.jsx)(ne,{...e,routerLinkType:ee.NavLink});const ge=e=>{let{theme:t}=e;return(0,E.jsxs)("span",{className:t.container,children:[(0,E.jsx)("span",{className:t.circle}),(0,E.jsx)("span",{className:t.circle}),(0,E.jsx)("span",{className:t.circle})]})},ye=t()(ge,"Throbber",["bouncing","circle","container"],{container:"_7zdld4",context:"uIObt7",ad:"XIxe9o",hoc:"YOyORH",circle:"dBrB4g",bouncing:"TJe-6j"});ge.propTypes={theme:ye.themeType.isRequired};var xe=ye;let Te=function(e){return e.ABOVE_CURSOR="ABOVE_CURSOR",e.ABOVE_ELEMENT="ABOVE_ELEMENT",e.BELOW_CURSOR="BELOW_CURSOR",e.BELOW_ELEMENT="BELOW_ELEMENT",e}({});const Ce=["border-bottom-color:transparent","border-left-color:transparent","border-right-color:transparent"].join(";"),ke=["border-top-color:transparent","border-left-color:transparent","border-right-color:transparent"].join(";");function Re(e,t,n,r,o){const i=function(e){return{arrow:e.arrow.getBoundingClientRect(),container:e.container.getBoundingClientRect()}}(o),a=function(){const{scrollX:e,scrollY:t}=window,{documentElement:{clientHeight:n,clientWidth:r}}=document;return{left:e,right:e+r,top:t,bottom:t+n}}(),c=function(e,t,n){const{arrow:r,container:o}=n;return{arrowX:.5*(o.width-r.width),arrowY:o.height,containerX:e-o.width/2,containerY:t-o.height-r.height/1.5,baseArrowStyle:Ce}}(e,t,i);if(c.containerX<a.left+6)c.containerX=a.left+6,c.arrowX=Math.max(6,e-c.containerX-i.arrow.width/2);else{const t=a.right-6-i.container.width;c.containerX>t&&(c.containerX=t,c.arrowX=Math.min(i.container.width-6,e-c.containerX-i.arrow.width/2))}c.containerY<a.top+6&&(c.containerY+=i.container.height+2*i.arrow.height,c.arrowY-=i.container.height+i.arrow.height,c.baseArrowStyle=ke);const l=`left:${c.containerX}px;top:${c.containerY}px`;o.container.setAttribute("style",l);const s=`${c.baseArrowStyle};left:${c.arrowX}px;top:${c.arrowY}px`;o.arrow.setAttribute("style",s)}const Pe=(0,u.forwardRef)(((e,t)=>{let{children:n,theme:r}=e;const{current:o}=(0,u.useRef)({lastElement:void 0,lastPageX:0,lastPageY:0,lastPlacement:void 0}),[i,a]=(0,u.useState)(null),c=(e,t,n,r)=>{o.lastElement=r,o.lastPageX=e,o.lastPageY=t,o.lastPlacement=n,i&&Re(e,t,0,0,i)};return(0,u.useImperativeHandle)(t,(()=>({pointTo:c}))),(0,u.useEffect)((()=>{const e=function(e){const t=document.createElement("div");e.arrow&&t.setAttribute("class",e.arrow);const n=document.createElement("div");e.content&&n.setAttribute("class",e.content);const r=document.createElement("div");return e.container&&r.setAttribute("class",e.container),r.appendChild(t),r.appendChild(n),document.body.appendChild(r),{container:r,arrow:t,content:n}}(r);return a(e),()=>{document.body.removeChild(e.container),a(null)}}),[r]),(0,u.useEffect)((()=>{i&&Re(o.lastPageX,o.lastPageY,o.lastPlacement,o.lastElement,i)}),[i,o.lastPageX,o.lastPageY,o.lastPlacement,o.lastElement]),i?(0,O.createPortal)(n,i.content):null}));Pe.propTypes={children:b().node,theme:b().shape({}).isRequired};var Se=Pe;const Oe=e=>{let{children:t,placement:n=Te.ABOVE_CURSOR,tip:r,theme:o}=e;const{current:i}=(0,u.useRef)({lastCursorX:0,lastCursorY:0,triggeredByTouch:!1,timerId:void 0}),a=(0,u.useRef)(),c=(0,u.useRef)(null),[l,s]=(0,u.useState)(!1);return(0,u.useEffect)((()=>{if(l&&null!==r){a.current&&a.current.pointTo(i.lastCursorX+window.scrollX,i.lastCursorY+window.scrollY,n,c.current);const e=()=>s(!1);return window.addEventListener("scroll",e),()=>window.removeEventListener("scroll",e)}}),[i.lastCursorX,i.lastCursorY,n,l,r]),(0,E.jsxs)("div",{className:o.wrapper,onMouseLeave:()=>s(!1),onMouseMove:e=>((e,t)=>{if(l){const r=c.current.getBoundingClientRect();e<r.left||e>r.right||t<r.top||t>r.bottom?s(!1):a.current&&a.current.pointTo(e+window.scrollX,t+window.scrollY,n,c.current)}else i.lastCursorX=e,i.lastCursorY=t,i.triggeredByTouch?i.timerId||(i.timerId=setTimeout((()=>{i.triggeredByTouch=!1,i.timerId=void 0,s(!0)}),300)):s(!0)})(e.clientX,e.clientY),onClick:()=>{i.timerId&&(clearTimeout(i.timerId),i.timerId=void 0,i.triggeredByTouch=!1)},onTouchStart:()=>{i.triggeredByTouch=!0},ref:c,role:"presentation",children:[l&&null!==r?(0,E.jsx)(Se,{ref:a,theme:o,children:r}):null,t]})},qe=t()(Oe,"WithTooltip",["appearance","arrow","container","content","wrapper"],{arrow:"M9gywF",ad:"_4xT7zE",hoc:"zd-vnH",context:"GdZucr",container:"f9gY8K",appearance:"L4ubm-",wrapper:"_4qDBRM"}),Ae=qe;Ae.PLACEMENTS=Te,Oe.propTypes={children:b().node,placement:b().oneOf(Object.values(Te)),theme:qe.themeType.isRequired,tip:b().node};var Le=Ae,je=__webpack_require__(360),Ne=__webpack_require__.n(je),De={container:"jTxmOX",context:"dzIcLh",ad:"_5a9XX1",hoc:"_7sH52O"};const Me=e=>{var t;let{autoplay:n,src:r,theme:o,title:i}=e;const a=r.split("?");let c=a[0];const l=a[1],s=l?Ne().parse(l):{},u=s.v||(null===(t=c.match(/\/([a-zA-Z0-9-_]*)$/))||void 0===t?void 0:t[1]);return c=`https://www.youtube.com/embed/${u}`,delete s.v,s.autoplay=n?"1":"0",c+=`?${Ne().stringify(s)}`,(0,E.jsxs)("div",{className:o.container,children:[(0,E.jsx)(xe,{theme:De}),(0,E.jsx)("iframe",{allow:"autoplay",allowFullScreen:!0,className:o.video,src:c,title:i})]})},Be=t()(Me,"YouTubeVideo",["container","video"],{container:"sXHM81",context:"veKyYi",ad:"r3ABzd",hoc:"YKcPnR",video:"SlV2zw"});Me.propTypes={autoplay:b().bool,src:b().string.isRequired,theme:Be.themeType.isRequired,title:b().string};var Ie=Be;const Ue=e=>{let{disabled:t,onChange:n,onKeyDown:r,placeholder:o,theme:i,value:a}=e;const c=(0,u.useRef)(null),[l,s]=(0,u.useState)(),[_,d]=(0,u.useState)(a||"");return void 0!==a&&_!==a&&d(a),(0,u.useEffect)((()=>{const e=c.current;if(!e)return;const t=new ResizeObserver((()=>{s(e.scrollHeight)}));return t.observe(e),()=>{t.disconnect()}}),[]),(0,u.useEffect)((()=>{const e=c.current;e&&s(e.scrollHeight)}),[_]),(0,E.jsxs)("div",{className:i.container,children:[(0,E.jsx)("textarea",{readOnly:!0,ref:c,className:`${i.textarea} ${i.hidden}`,value:_}),(0,E.jsx)("textarea",{disabled:t,onChange:void 0===a?e=>{d(e.target.value)}:n,onKeyDown:r,placeholder:o,style:{height:l},className:i.textarea,value:_})]})},We=t()(Ue,"TextArea",["container","hidden","textarea"],{container:"dzMVIB",context:"KVPc7g",ad:"z2GQ0Z",hoc:"_8R1Qdj",textarea:"zd-OFg",hidden:"GiHBXI"});Ue.propTypes={disabled:b().bool,onChange:b().func,onKeyDown:b().func,placeholder:b().string,theme:We.themeType.isRequired,value:b().string};var Ke=We;const Xe=r.requireWeak("./server","/"),Ye=Xe?void 0:__webpack_require__(662).A}(),__webpack_exports__}()}));
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@dr.pogodin/js-utils"),require("@dr.pogodin/react-global-state"),require("@dr.pogodin/react-themes"),require("axios"),require("dayjs"),require("node-forge/lib/aes"),require("node-forge/lib/forge"),require("prop-types"),require("qs"),require("react"),require("react-dom"),require("react-dom/client"),require("react-helmet"),require("react-router-dom")):"function"==typeof define&&define.amd?define(["@dr.pogodin/js-utils","@dr.pogodin/react-global-state","@dr.pogodin/react-themes","axios","dayjs","node-forge/lib/aes","node-forge/lib/forge","prop-types","qs","react","react-dom","react-dom/client","react-helmet","react-router-dom"],t):"object"==typeof exports?exports["@dr.pogodin/react-utils"]=t(require("@dr.pogodin/js-utils"),require("@dr.pogodin/react-global-state"),require("@dr.pogodin/react-themes"),require("axios"),require("dayjs"),require("node-forge/lib/aes"),require("node-forge/lib/forge"),require("prop-types"),require("qs"),require("react"),require("react-dom"),require("react-dom/client"),require("react-helmet"),require("react-router-dom")):e["@dr.pogodin/react-utils"]=t(e["@dr.pogodin/js-utils"],e["@dr.pogodin/react-global-state"],e["@dr.pogodin/react-themes"],e.axios,e.dayjs,e["node-forge/lib/aes"],e["node-forge/lib/forge"],e["prop-types"],e.qs,e.react,e["react-dom"],e["react-dom/client"],e["react-helmet"],e["react-router-dom"])}("undefined"!=typeof self?self:this,(function(__WEBPACK_EXTERNAL_MODULE__864__,__WEBPACK_EXTERNAL_MODULE__126__,__WEBPACK_EXTERNAL_MODULE__859__,__WEBPACK_EXTERNAL_MODULE__742__,__WEBPACK_EXTERNAL_MODULE__185__,__WEBPACK_EXTERNAL_MODULE__958__,__WEBPACK_EXTERNAL_MODULE__814__,__WEBPACK_EXTERNAL_MODULE__949__,__WEBPACK_EXTERNAL_MODULE__360__,__WEBPACK_EXTERNAL_MODULE__155__,__WEBPACK_EXTERNAL_MODULE__514__,__WEBPACK_EXTERNAL_MODULE__236__,__WEBPACK_EXTERNAL_MODULE__883__,__WEBPACK_EXTERNAL_MODULE__442__){return function(){"use strict";var __webpack_modules__={227:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{A:function(){return getInj}});var node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(814),node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0__),node_forge_lib_aes__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(958),node_forge_lib_aes__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(node_forge_lib_aes__WEBPACK_IMPORTED_MODULE_1__),_shared_utils_isomorphy_buildInfo__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(445);let inj={};const metaElement="undefined"!=typeof document?document.querySelector('meta[itemprop="drpruinj"]'):null;if(metaElement){metaElement.remove();let data=node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0___default().util.decode64(metaElement.content);const{key:key}=(0,_shared_utils_isomorphy_buildInfo__WEBPACK_IMPORTED_MODULE_2__.F)(),d=node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0___default().cipher.createDecipher("AES-CBC",key);d.start({iv:data.slice(0,key.length)}),d.update(node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0___default().util.createBuffer(data.slice(key.length))),d.finish(),data=node_forge_lib_forge__WEBPACK_IMPORTED_MODULE_0___default().util.decodeUtf8(d.output.data),inj=eval(`(${data})`)}else"undefined"!=typeof window&&window.REACT_UTILS_INJECTION?(inj=window.REACT_UTILS_INJECTION,delete window.REACT_UTILS_INJECTION):inj={};function getInj(){return inj}},662:function(e,t,n){n.d(t,{A:function(){return l}}),n(155);var r=n(126),o=n(236),i=n(442),a=n(227),c=n(848);function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=document.getElementById("react-view");if(!n)throw Error("Failed to find container for React app");const l=(0,c.jsx)(r.GlobalStateProvider,{initialState:(0,a.A)().ISTATE||t.initialState,children:(0,c.jsx)(i.BrowserRouter,{future:{v7_relativeSplatPath:!0},children:(0,c.jsx)(e,{})})});t.dontHydrate?(0,o.createRoot)(n).render(l):(0,o.hydrateRoot)(n,l)}},445:function(e,t,n){let r;function o(){if(void 0===r)throw Error('"Build Info" has not been initialized yet');return r}n.d(t,{F:function(){return o}}),"undefined"!=typeof BUILD_INFO&&(r=BUILD_INFO)},965:function(e,t,n){n.d(t,{B:function(){return r},p:function(){return o}});const r="object"!=typeof process||!process.versions||!process.versions.node||!!n.g.REACT_UTILS_FORCE_CLIENT_SIDE,o=!r},333:function(e,t,n){n.r(t),n.d(t,{IS_CLIENT_SIDE:function(){return o.B},IS_SERVER_SIDE:function(){return o.p},buildTimestamp:function(){return c},getBuildInfo:function(){return r.F},isDevBuild:function(){return i},isProdBuild:function(){return a}});var r=n(445),o=n(965);function i(){return!1}function a(){return!0}function c(){return(0,r.F)().timestamp}},969:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{requireWeak:function(){return requireWeak},resolveWeak:function(){return resolveWeak}});var _isomorphy__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(333);function requireWeak(modulePath,basePath){if(_isomorphy__WEBPACK_IMPORTED_MODULE_0__.IS_CLIENT_SIDE)return null;try{const{resolve:resolve}=eval("require")("path"),path=basePath?resolve(basePath,modulePath):modulePath,{default:def,...named}=eval("require")(path);return def?(Object.entries(named).forEach((e=>{let[t,n]=e;if(def[t]){if(def[t]!==n)throw Error("Conflict between default and named exports")}else def[t]=n})),def):named}catch{return null}}function resolveWeak(e){return e}},427:function(e,t){t.parse=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var n={},r=(t||{}).decode||o,i=0;i<e.length;){var c=e.indexOf("=",i);if(-1===c)break;var l=e.indexOf(";",i);if(-1===l)l=e.length;else if(l<c){i=e.lastIndexOf(";",c-1)+1;continue}var s=e.slice(i,c).trim();if(void 0===n[s]){var u=e.slice(c+1,l).trim();34===u.charCodeAt(0)&&(u=u.slice(1,-1)),n[s]=a(u,r)}i=l+1}return n},t.serialize=function(e,t,o){var a=o||{},c=a.encode||i;if("function"!=typeof c)throw new TypeError("option encode is invalid");if(!r.test(e))throw new TypeError("argument name is invalid");var l=c(t);if(l&&!r.test(l))throw new TypeError("argument val is invalid");var s=e+"="+l;if(null!=a.maxAge){var u=a.maxAge-0;if(isNaN(u)||!isFinite(u))throw new TypeError("option maxAge is invalid");s+="; Max-Age="+Math.floor(u)}if(a.domain){if(!r.test(a.domain))throw new TypeError("option domain is invalid");s+="; Domain="+a.domain}if(a.path){if(!r.test(a.path))throw new TypeError("option path is invalid");s+="; Path="+a.path}if(a.expires){var _=a.expires;if(!function(e){return"[object Date]"===n.call(e)||e instanceof Date}(_)||isNaN(_.valueOf()))throw new TypeError("option expires is invalid");s+="; Expires="+_.toUTCString()}if(a.httpOnly&&(s+="; HttpOnly"),a.secure&&(s+="; Secure"),a.partitioned&&(s+="; Partitioned"),a.priority)switch("string"==typeof a.priority?a.priority.toLowerCase():a.priority){case"low":s+="; Priority=Low";break;case"medium":s+="; Priority=Medium";break;case"high":s+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}if(a.sameSite)switch("string"==typeof a.sameSite?a.sameSite.toLowerCase():a.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return s};var n=Object.prototype.toString,r=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function o(e){return-1!==e.indexOf("%")?decodeURIComponent(e):e}function i(e){return encodeURIComponent(e)}function a(e,t){try{return t(e)}catch(t){return e}}},20:function(e,t,n){var r=n(155),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,c=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,n){var r,i={},s=null,u=null;for(r in void 0!==n&&(s=""+n),void 0!==t.key&&(s=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,r)&&!l.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:s,ref:u,props:i,_owner:c.current}}t.Fragment=i,t.jsx=s,t.jsxs=s},848:function(e,t,n){e.exports=n(20)},864:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__864__},126:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__126__},859:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__859__},742:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__742__},185:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__185__},958:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__958__},814:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__814__},949:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__949__},360:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__360__},155:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__155__},514:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__514__},236:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__236__},883:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__883__},442:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__442__}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](n,n.exports,__webpack_require__),n.exports}__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=function(e,t){for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};return function(){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Barrier:function(){return _.Barrier},BaseButton:function(){return oe},BaseModal:function(){return L},Button:function(){return ae},Checkbox:function(){return se},CustomDropdown:function(){return z},Dropdown:function(){return V},Emitter:function(){return _.Emitter},GlobalStateProvider:function(){return d.GlobalStateProvider},Input:function(){return de},Link:function(){return re},MetaTags:function(){return we},Modal:function(){return j},NavLink:function(){return ve},PT:function(){return m},PageLayout:function(){return he},Semaphore:function(){return _.Semaphore},Switch:function(){return Q},TextArea:function(){return Ke},ThemeProvider:function(){return e.ThemeProvider},Throbber:function(){return xe},WithTooltip:function(){return Le},YouTubeVideo:function(){return Be},api:function(){return P()},client:function(){return Ye},config:function(){return i},getGlobalState:function(){return d.getGlobalState},getSsrContext:function(){return p},isomorphy:function(){return a},newAsyncDataEnvelope:function(){return d.newAsyncDataEnvelope},optionValidator:function(){return I},optionsValidator:function(){return B},server:function(){return Xe},splitComponent:function(){return R},themed:function(){return k},time:function(){return h},useAsyncCollection:function(){return d.useAsyncCollection},useAsyncData:function(){return d.useAsyncData},useGlobalState:function(){return d.useGlobalState},webpack:function(){return r},withGlobalStateType:function(){return d.withGlobalStateType},withRetries:function(){return _.withRetries}});var e=__webpack_require__(859),t=__webpack_require__.n(e),n=__webpack_require__(965),r=__webpack_require__(969);const o=(n.B?__webpack_require__(227).A().CONFIG:(0,r.requireWeak)("config"))||{};if(n.B&&"undefined"!=typeof document){const e=__webpack_require__(427);o.CSRF=e.parse(document.cookie).csrfToken}var i=o,a=__webpack_require__(333),c=__webpack_require__(427),l=__webpack_require__(185),s=__webpack_require__.n(l),u=__webpack_require__(155),_=__webpack_require__(864),d=__webpack_require__(126);const{getSsrContext:p}=(0,d.withGlobalStateType)(),f={DAY_MS:_.DAY_MS,HOUR_MS:_.HOUR_MS,MIN_MS:_.MIN_MS,SEC_MS:_.SEC_MS,YEAR_MS:_.YEAR_MS,now:Date.now,timer:_.timer,useCurrent:function(){let{autorefresh:e=!1,globalStatePath:t="currentTime",precision:n=5*_.SEC_MS}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[r,o]=(0,d.useGlobalState)(t,Date.now);return(0,u.useEffect)((()=>{let t;const r=()=>{o((e=>{const t=Date.now();return Math.abs(t-e)>n?t:e})),e&&(t=setTimeout(r,n))};return r(),()=>{t&&clearTimeout(t)}}),[e,n,o]),r},useTimezoneOffset:function(){let{cookieName:e="timezoneOffset",globalStatePath:t="timezoneOffset"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=p(!1),[r,o]=(0,d.useGlobalState)(t,(()=>{var t;const r=e&&(null==n||null===(t=n.req)||void 0===t||null===(t=t.cookies)||void 0===t?void 0:t[e]);return r?parseInt(r,10):0}));return(0,u.useEffect)((()=>{const t=(new Date).getTimezoneOffset();o(t),e&&(document.cookie=c.serialize(e,t.toString(),{path:"/"}))}),[e,o]),r}};var h=Object.assign(s(),f),m=__webpack_require__(949),E=__webpack_require__.n(m),b=__webpack_require__(848);let w;a.IS_CLIENT_SIDE&&(w=__webpack_require__(227).A().CHUNK_GROUPS||{});const v={};function g(){return(0,a.getBuildInfo)().publicPath}function y(e,t,n){let r;const o=`${g()}/${e}`,i=`${document.location.origin}${o}`;if(!t.has(i)){let e=document.querySelector(`link[href="${o}"]`);e||(e=document.createElement("link"),e.setAttribute("rel","stylesheet"),e.setAttribute("href",o),document.head.appendChild(e)),r=new _.Barrier,e.addEventListener("load",(()=>r.resolve())),e.addEventListener("error",(()=>r.resolve()))}if(n){const e=v[o]||0;v[o]=1+e}return r}function x(e,t){if(!t[e])throw Error(`Unknown chunk name "${e}"`)}function T(e,t,n){const r=[],o=t[e],i=function(){const e=new Set,{styleSheets:t}=document;for(let n=0;n<t.length;++n){const{href:r}=t[n];r&&e.add(r)}return e}();for(let e=0;e<o.length;++e){const t=o[e];if(t.endsWith(".css")){const e=y(t,i,n);e&&r.push(e)}}return r.length?Promise.allSettled(r).then():Promise.resolve()}const C=new Set;function R(e){let{chunkName:t,getComponent:n,placeholder:r}=e;if(a.IS_CLIENT_SIDE&&x(t,w),C.has(t))throw Error(`Repeated splitComponent() call for the chunk "${t}"`);C.add(t);const o=(0,u.lazy)((async()=>{const e=await n(),r="default"in e?e.default:e;a.IS_CLIENT_SIDE&&await T(t,w,!1);const o=(0,u.forwardRef)(((e,n)=>{let{children:o,...i}=e;if(a.IS_SERVER_SIDE){const{chunkGroups:e,chunks:n}=p();x(t,e),n.includes(t)||n.push(t)}return(0,u.useInsertionEffect)((()=>(T(t,w,!0),()=>function(e,t){const n=t[e];for(let e=0;e<n.length;++e){const t=n[e];if(t.endsWith(".css")){const e=`${g()}/${t}`;--v[e]<=0&&document.head.querySelector(`link[href="${e}"]`).remove()}}}(t,w))),[]),(0,b.jsx)(r,{ref:n,...i,children:o})}));return{default:o}})),i=e=>{let{children:t,...n}=e;return(0,b.jsx)(u.Suspense,{fallback:r,children:(0,b.jsx)(o,{...n,children:t})})};return i.propTypes={children:E().node},i}const k=t();k.COMPOSE=e.COMPOSE,k.PRIORITY=e.PRIORITY;var S=__webpack_require__(742),P=__webpack_require__.n(S),O=__webpack_require__(514),A=__webpack_require__.n(O),q="_5fRFtF";const L=e=>{let{cancelOnScrolling:t,children:n,containerStyle:r,dontDisableScrolling:o,onCancel:i,theme:a}=e;const c=(0,u.useRef)(null),l=(0,u.useRef)(null),[s,_]=(0,u.useState)();(0,u.useEffect)((()=>{const e=document.createElement("div");return document.body.appendChild(e),_(e),()=>{document.body.removeChild(e)}}),[]),(0,u.useEffect)((()=>(t&&i&&(window.addEventListener("scroll",i),window.addEventListener("wheel",i)),()=>{t&&i&&(window.removeEventListener("scroll",i),window.removeEventListener("wheel",i))})),[t,i]),(0,u.useEffect)((()=>(o||document.body.classList.add(q),()=>{o||document.body.classList.remove(q)})),[o]);const d=(0,u.useMemo)((()=>(0,b.jsx)("div",{onFocus:()=>{var e,t;const n=null===(e=c.current)||void 0===e?void 0:e.querySelectorAll("*");for(let e=n.length-1;e>=0;--e)if(n[e].focus(),document.activeElement===n[e])return;null===(t=l.current)||void 0===t||t.focus()},tabIndex:0})),[]);return s?A().createPortal((0,b.jsxs)(b.Fragment,{children:[d,(0,b.jsx)("div",{"aria-label":"Cancel",className:a.overlay,onClick:e=>{i&&(i(),e.stopPropagation())},onKeyDown:e=>{"Escape"===e.key&&i&&(i(),e.stopPropagation())},ref:e=>{e&&e!==l.current&&(l.current=e,e.focus())},role:"button",tabIndex:0}),(0,b.jsx)("div",{"aria-modal":"true",className:a.container,onClick:e=>e.stopPropagation(),onWheel:e=>e.stopPropagation(),ref:c,role:"dialog",style:r,children:n}),(0,b.jsx)("div",{onFocus:()=>{var e;null===(e=l.current)||void 0===e||e.focus()},tabIndex:0}),d]}),s):null},N=t()(L,"Modal",["container","overlay"],{overlay:"ye2BZo",context:"Szmbbz",ad:"Ah-Nsc",hoc:"Wki41G",container:"gyZ4rc"});L.propTypes={cancelOnScrolling:E().bool,children:E().node,containerStyle:E().shape({}),dontDisableScrolling:E().bool,onCancel:E().func,theme:N.themeType.isRequired};var j=N;const D=["active","arrow","container","dropdown","hiddenOption","label","option","select","upward"],M=E().oneOfType([E().number.isRequired,E().string.isRequired]),I=E().oneOfType([E().shape({name:E().node,value:M.isRequired}).isRequired,E().number.isRequired,E().string.isRequired]),B=E().arrayOf(I.isRequired),U=E().oneOfType([E().shape({name:E().string,value:M.isRequired}).isRequired,E().number.isRequired,E().string.isRequired]),W=E().arrayOf(U.isRequired);function K(e){var t;return function(e){const t=typeof e;return"number"===t||"string"===t}(e)?[e,e]:[e.value,null!==(t=e.name)&&void 0!==t?t:e.value]}const X=(0,u.forwardRef)(((e,t)=>{let{containerClass:n,containerStyle:r,filter:o,onCancel:i,onChange:a,optionClass:c,options:l}=e;const s=(0,u.useRef)(null);(0,u.useImperativeHandle)(t,(()=>({measure:()=>{var e,t;const n=null===(e=s.current)||void 0===e?void 0:e.parentElement;if(!n)return;const r=null===(t=s.current)||void 0===t?void 0:t.getBoundingClientRect(),o=window.getComputedStyle(n),i=parseFloat(o.marginBottom),a=parseFloat(o.marginTop);return r.height+=i+a,r}})),[]);const _=[];for(let e=0;e<l.length;++e){const t=l[e];if(!o||o(t)){const[e,n]=K(t);_.push((0,b.jsx)("div",{className:c,onClick:t=>{a(e),t.stopPropagation()},onKeyDown:t=>{"Enter"===t.key&&(a(e),t.stopPropagation())},role:"button",tabIndex:0,children:n},e))}}return(0,b.jsx)(L,{cancelOnScrolling:!0,containerStyle:r,dontDisableScrolling:!0,onCancel:i,theme:{ad:"",hoc:"",container:n,context:"",overlay:"jKsMKG"},children:(0,b.jsx)("div",{ref:s,children:_})})}));X.propTypes={containerClass:E().string.isRequired,containerStyle:E().shape({left:E().number.isRequired,top:E().number.isRequired,width:E().number.isRequired}),filter:E().func,onCancel:E().func.isRequired,onChange:E().func.isRequired,optionClass:E().string.isRequired,options:B.isRequired};var Y=X;const F=e=>{let{filter:t,label:n,onChange:r,options:o,theme:i,value:a}=e;if(!o)throw Error("Internal error");const[c,l]=(0,u.useState)(!1),s=(0,u.useRef)(null),_=(0,u.useRef)(null),[d,p]=(0,u.useState)(),[f,h]=(0,u.useState)(!1);(0,u.useEffect)((()=>{if(!c)return;let e;const t=()=>{var n,r;const o=null===(n=s.current)||void 0===n?void 0:n.getBoundingClientRect(),i=null===(r=_.current)||void 0===r?void 0:r.measure();if(o&&i){var a,c;const e=o.bottom+i.height<(null!==(a=null===(c=window.visualViewport)||void 0===c?void 0:c.height)&&void 0!==a?a:0),t=o.top-i.height>0,n=!e&&t;h(n);const r=n?{top:o.top-i.height-1,left:o.left,width:o.width}:{left:o.left,top:o.bottom,width:o.width};p((e=>{return n=r,(null==(t=e)?void 0:t.left)===(null==n?void 0:n.left)&&(null==t?void 0:t.top)===(null==n?void 0:n.top)&&(null==t?void 0:t.width)===(null==n?void 0:n.width)?e:r;var t,n}))}e=requestAnimationFrame(t)};return requestAnimationFrame(t),()=>{cancelAnimationFrame(e)}}),[c]);const m=e=>{const t=window.visualViewport,n=s.current.getBoundingClientRect();l(!0),p({left:(null==t?void 0:t.width)||0,top:(null==t?void 0:t.height)||0,width:n.width}),e.stopPropagation()};let E=(0,b.jsx)(b.Fragment,{children:"‌"});for(let e=0;e<o.length;++e){const n=o[e];if(!t||t(n)){const[e,t]=K(n);if(e===a){E=t;break}}}let w=i.container;c&&(w+=` ${i.active}`);let v=i.select||"";return f&&(w+=` ${i.upward}`,v+=` ${i.upward}`),(0,b.jsxs)("div",{className:w,children:[void 0===n?null:(0,b.jsx)("div",{className:i.label,children:n}),(0,b.jsxs)("div",{className:i.dropdown,onClick:m,onKeyDown:e=>{"Enter"===e.key&&m(e)},ref:s,role:"listbox",tabIndex:0,children:[E,(0,b.jsx)("div",{className:i.arrow})]}),c?(0,b.jsx)(Y,{containerClass:v,containerStyle:d,onCancel:()=>{l(!1)},onChange:e=>{l(!1),r&&r(e)},optionClass:i.option||"",options:o,ref:_}):null]})},$=t()(F,"CustomDropdown",D,{container:"oQKv0Y",context:"_9Tod5r",ad:"R58zIg",hoc:"O-Tp1i",label:"YUPUNs",dropdown:"pNEyAA",option:"LD2Kzy",select:"LP5azC",arrow:"-wscve",active:"k2UDsV",upward:"HWRvu4"});F.propTypes={filter:E().func,label:E().node,onChange:E().func,options:E().arrayOf(I.isRequired),theme:$.themeType.isRequired,value:M};var z=$;const H=e=>{let{filter:t,label:n,onChange:r,options:o,theme:i,value:a}=e;if(!o)throw Error("Internal error");let c=!1;const l=[];for(let e=0;e<o.length;++e){const n=o[e];if(!t||t(n)){const[e,t]=K(n);c||(c=e===a),l.push((0,b.jsx)("option",{className:i.option,value:e,children:t},e))}}const s=c?null:(0,b.jsx)("option",{disabled:!0,className:i.hiddenOption,value:a,children:a},"__reactUtilsHiddenOption");return(0,b.jsxs)("div",{className:i.container,children:[void 0===n?null:(0,b.jsx)("div",{className:i.label,children:n}),(0,b.jsxs)("div",{className:i.dropdown,children:[(0,b.jsxs)("select",{className:i.select,onChange:r,value:a,children:[s,l]}),(0,b.jsx)("div",{className:i.arrow})]})]})},G=t()(H,"Dropdown",D,{dropdown:"kI9A9U",context:"xHyZo4",ad:"ADu59e",hoc:"FTP2bb",arrow:"DubGkT",container:"WtSZPd",active:"ayMn7O",label:"K7JYKw",hiddenOption:"clAKFJ",select:"N0Fc14"});H.propTypes={filter:E().func,label:E().node,onChange:E().func,options:W,theme:G.themeType.isRequired,value:M};var V=G;const Z=e=>{let{label:t,onChange:n,options:r,theme:o,value:i}=e;if(!r||!o.option)throw Error("Internal error");const a=[];for(let e=0;e<(null==r?void 0:r.length);++e){const[t,c]=K(r[e]);let l,s=o.option;t===i?s+=` ${o.selected}`:n&&(l=()=>n(t)),a.push(l?(0,b.jsx)("div",{className:s,onClick:l,onKeyDown:e=>{l&&"Enter"===e.key&&l()},role:"button",tabIndex:0,children:c},t):(0,b.jsx)("div",{className:s,children:c},t))}return(0,b.jsxs)("div",{className:o.container,children:[t?(0,b.jsx)("div",{className:o.label,children:t}):null,(0,b.jsx)("div",{className:o.options,children:a})]})},J=t()(Z,"Switch",["container","label","option","options","selected"],{container:"AWNvRj",context:"VMHfnP",ad:"HNliRC",hoc:"_2Ue-db",option:"fUfIAd",selected:"Wco-qk",options:"CZYtcC"});Z.propTypes={label:E().node,onChange:E().func,options:B,theme:J.themeType.isRequired,value:M};var Q=J,ee=__webpack_require__(442);const te=e=>{let{children:t,className:n,disabled:r,enforceA:o,keepScrollPosition:i,onClick:a,onMouseDown:c,openNewTab:l,replace:s,routerLinkType:u,to:_,...d}=e;if(r||o||l||null!=_&&_.match(/^(#|(https?|mailto):)/))return(0,b.jsx)("a",{className:(n?n+" ":"")+"zH52sA",href:_,onClick:r?e=>e.preventDefault():a,onMouseDown:r?e=>e.preventDefault():c,rel:"noopener noreferrer",target:l?"_blank":"",children:t});const p=u;return(0,b.jsx)(p,{className:n,onMouseDown:c,replace:s,to:_,onClick:e=>{a&&a(e),i||window.scroll(0,0)},...d,children:t})};te.propTypes={children:E().node,className:E().string,disabled:E().bool,enforceA:E().bool,keepScrollPosition:E().bool,onClick:E().func,onMouseDown:E().func,openNewTab:E().bool,replace:E().bool,routerLinkType:E().elementType.isRequired,to:E().oneOfType([E().object,E().string])};var ne=te,re=e=>(0,b.jsx)(ne,{...e,routerLinkType:ee.Link});const oe=e=>{let{active:t,children:n,disabled:r,enforceA:o,onClick:i,onMouseDown:a,openNewTab:c,replace:l,theme:s,to:u}=e,_=s.button;return t&&s.active&&(_+=` ${s.active}`),r?(s.disabled&&(_+=` ${s.disabled}`),(0,b.jsx)("div",{className:_,children:n})):u?(0,b.jsx)(re,{className:_,enforceA:o,onClick:i,onMouseDown:a,openNewTab:c,replace:l,to:u,children:n}):(0,b.jsx)("div",{className:_,onClick:i,onKeyDown:i&&(e=>{"Enter"===e.key&&i(e)}),onMouseDown:a,role:"button",tabIndex:0,children:n})},ie=t()(oe,"Button",["active","button","disabled"],{button:"E1FNQT",context:"KM0v4f",ad:"_3jm1-Q",hoc:"_0plpDL",active:"MAe9O6",disabled:"Br9IWV"});oe.propTypes={active:E().bool,children:E().node,disabled:E().bool,enforceA:E().bool,onClick:E().func,onMouseDown:E().func,openNewTab:E().bool,replace:E().bool,theme:ie.themeType.isRequired,to:E().oneOfType([E().object,E().string])};var ae=ie;const ce=e=>{let{checked:t,label:n,onChange:r,theme:o}=e;return(0,b.jsxs)("div",{className:o.container,children:[void 0===n?null:(0,b.jsx)("div",{className:o.label,children:n}),(0,b.jsx)("input",{checked:t,className:o.checkbox,onChange:r,onClick:e=>e.stopPropagation(),type:"checkbox"})]})},le=t()(ce,"Checkbox",["checkbox","container","label"],{checkbox:"A-f8qJ",context:"dNQcC6",ad:"earXxa",hoc:"qAPfQ6",container:"Kr0g3M",label:"_3dML-O"});ce.propTypes={checked:E().bool,label:E().node,onChange:E().func,theme:le.themeType.isRequired};var se=le;const ue=(0,u.forwardRef)(((e,t)=>{let{label:n,theme:r,...o}=e;return(0,b.jsxs)("span",{className:r.container,children:[void 0===n?null:(0,b.jsx)("div",{className:r.label,children:n}),(0,b.jsx)("input",{className:r.input,ref:t,...o})]})})),_e=t()(ue,"Input",["container","input","label"],{container:"Cxx397",context:"X5WszA",ad:"_8s7GCr",hoc:"TVlBYc",input:"M07d4s",label:"gfbdq-"});ue.propTypes={label:E().node,theme:_e.themeType.isRequired};var de=_e;const pe=e=>{let{children:t,leftSidePanelContent:n,rightSidePanelContent:r,theme:o}=e;return(0,b.jsxs)("div",{className:o.container,children:[(0,b.jsx)("div",{className:[o.sidePanel,o.leftSidePanel].join(" "),children:n}),(0,b.jsx)("div",{className:o.mainPanel,children:t}),(0,b.jsx)("div",{className:[o.sidePanel,o.rightSidePanel].join(" "),children:r})]})},fe=t()(pe,"PageLayout",["container","leftSidePanel","mainPanel","rightSidePanel","sidePanel"],{container:"T3cuHB",context:"m4mL-M",ad:"m3-mdC",hoc:"J15Z4H",mainPanel:"pPlQO2",sidePanel:"lqNh4h"});pe.propTypes={children:E().node,leftSidePanelContent:E().node,rightSidePanelContent:E().node,theme:fe.themeType.isRequired};var he=fe,me=__webpack_require__(883);const Ee=(0,u.createContext)({description:"",title:""}),be=e=>{let{children:t,description:n,image:r,siteName:o,socialDescription:i,socialTitle:a,title:c,url:l}=e;const s=a||c,_=i||n,d=(0,u.useMemo)((()=>({description:n,image:r,siteName:o,socialDescription:i,socialTitle:a,title:c,url:l})),[n,r,o,i,a,c,l]);return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(me.Helmet,{children:[(0,b.jsx)("title",{children:c}),(0,b.jsx)("meta",{name:"description",content:n}),(0,b.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,b.jsx)("meta",{name:"twitter:title",content:s}),(0,b.jsx)("meta",{name:"twitter:description",content:_}),r?(0,b.jsx)("meta",{name:"twitter:image",content:r}):null,o?(0,b.jsx)("meta",{name:"twitter:site",content:`@${o}`}):null,(0,b.jsx)("meta",{name:"og:title",content:s}),r?(0,b.jsx)("meta",{name:"og:image",content:r}):null,r?(0,b.jsx)("meta",{name:"og:image:alt",content:s}):null,(0,b.jsx)("meta",{name:"og:description",content:_}),o?(0,b.jsx)("meta",{name:"og:sitename",content:o}):null,l?(0,b.jsx)("meta",{name:"og:url",content:l}):null]}),t?(0,b.jsx)(Ee.Provider,{value:d,children:t}):null]})};be.Context=Ee,be.propTypes={children:E().node,description:E().string.isRequired,image:E().string,siteName:E().string,socialDescription:E().string,socialTitle:E().string,title:E().string.isRequired,url:E().string};var we=be,ve=e=>(0,b.jsx)(ne,{...e,routerLinkType:ee.NavLink});const ge=e=>{let{theme:t}=e;return(0,b.jsxs)("span",{className:t.container,children:[(0,b.jsx)("span",{className:t.circle}),(0,b.jsx)("span",{className:t.circle}),(0,b.jsx)("span",{className:t.circle})]})},ye=t()(ge,"Throbber",["bouncing","circle","container"],{container:"_7zdld4",context:"uIObt7",ad:"XIxe9o",hoc:"YOyORH",circle:"dBrB4g",bouncing:"TJe-6j"});ge.propTypes={theme:ye.themeType.isRequired};var xe=ye;let Te=function(e){return e.ABOVE_CURSOR="ABOVE_CURSOR",e.ABOVE_ELEMENT="ABOVE_ELEMENT",e.BELOW_CURSOR="BELOW_CURSOR",e.BELOW_ELEMENT="BELOW_ELEMENT",e}({});const Ce=["border-bottom-color:transparent","border-left-color:transparent","border-right-color:transparent"].join(";"),Re=["border-top-color:transparent","border-left-color:transparent","border-right-color:transparent"].join(";");function ke(e,t,n,r,o){const i=function(e){return{arrow:e.arrow.getBoundingClientRect(),container:e.container.getBoundingClientRect()}}(o),a=function(){const{scrollX:e,scrollY:t}=window,{documentElement:{clientHeight:n,clientWidth:r}}=document;return{left:e,right:e+r,top:t,bottom:t+n}}(),c=function(e,t,n){const{arrow:r,container:o}=n;return{arrowX:.5*(o.width-r.width),arrowY:o.height,containerX:e-o.width/2,containerY:t-o.height-r.height/1.5,baseArrowStyle:Ce}}(e,t,i);if(c.containerX<a.left+6)c.containerX=a.left+6,c.arrowX=Math.max(6,e-c.containerX-i.arrow.width/2);else{const t=a.right-6-i.container.width;c.containerX>t&&(c.containerX=t,c.arrowX=Math.min(i.container.width-6,e-c.containerX-i.arrow.width/2))}c.containerY<a.top+6&&(c.containerY+=i.container.height+2*i.arrow.height,c.arrowY-=i.container.height+i.arrow.height,c.baseArrowStyle=Re);const l=`left:${c.containerX}px;top:${c.containerY}px`;o.container.setAttribute("style",l);const s=`${c.baseArrowStyle};left:${c.arrowX}px;top:${c.arrowY}px`;o.arrow.setAttribute("style",s)}const Se=(0,u.forwardRef)(((e,t)=>{let{children:n,theme:r}=e;const{current:o}=(0,u.useRef)({lastElement:void 0,lastPageX:0,lastPageY:0,lastPlacement:void 0}),[i,a]=(0,u.useState)(null),c=(e,t,n,r)=>{o.lastElement=r,o.lastPageX=e,o.lastPageY=t,o.lastPlacement=n,i&&ke(e,t,0,0,i)};return(0,u.useImperativeHandle)(t,(()=>({pointTo:c}))),(0,u.useEffect)((()=>{const e=function(e){const t=document.createElement("div");e.arrow&&t.setAttribute("class",e.arrow);const n=document.createElement("div");e.content&&n.setAttribute("class",e.content);const r=document.createElement("div");return e.container&&r.setAttribute("class",e.container),r.appendChild(t),r.appendChild(n),document.body.appendChild(r),{container:r,arrow:t,content:n}}(r);return a(e),()=>{document.body.removeChild(e.container),a(null)}}),[r]),(0,u.useEffect)((()=>{i&&ke(o.lastPageX,o.lastPageY,o.lastPlacement,o.lastElement,i)}),[i,o.lastPageX,o.lastPageY,o.lastPlacement,o.lastElement]),i?(0,O.createPortal)(n,i.content):null}));Se.propTypes={children:E().node,theme:E().shape({}).isRequired};var Pe=Se;const Oe=e=>{let{children:t,placement:n=Te.ABOVE_CURSOR,tip:r,theme:o}=e;const{current:i}=(0,u.useRef)({lastCursorX:0,lastCursorY:0,triggeredByTouch:!1,timerId:void 0}),a=(0,u.useRef)(),c=(0,u.useRef)(null),[l,s]=(0,u.useState)(!1);return(0,u.useEffect)((()=>{if(l&&null!==r){a.current&&a.current.pointTo(i.lastCursorX+window.scrollX,i.lastCursorY+window.scrollY,n,c.current);const e=()=>s(!1);return window.addEventListener("scroll",e),()=>window.removeEventListener("scroll",e)}}),[i.lastCursorX,i.lastCursorY,n,l,r]),(0,b.jsxs)("div",{className:o.wrapper,onMouseLeave:()=>s(!1),onMouseMove:e=>((e,t)=>{if(l){const r=c.current.getBoundingClientRect();e<r.left||e>r.right||t<r.top||t>r.bottom?s(!1):a.current&&a.current.pointTo(e+window.scrollX,t+window.scrollY,n,c.current)}else i.lastCursorX=e,i.lastCursorY=t,i.triggeredByTouch?i.timerId||(i.timerId=setTimeout((()=>{i.triggeredByTouch=!1,i.timerId=void 0,s(!0)}),300)):s(!0)})(e.clientX,e.clientY),onClick:()=>{i.timerId&&(clearTimeout(i.timerId),i.timerId=void 0,i.triggeredByTouch=!1)},onTouchStart:()=>{i.triggeredByTouch=!0},ref:c,role:"presentation",children:[l&&null!==r?(0,b.jsx)(Pe,{ref:a,theme:o,children:r}):null,t]})},Ae=t()(Oe,"WithTooltip",["appearance","arrow","container","content","wrapper"],{arrow:"M9gywF",ad:"_4xT7zE",hoc:"zd-vnH",context:"GdZucr",container:"f9gY8K",appearance:"L4ubm-",wrapper:"_4qDBRM"}),qe=Ae;qe.PLACEMENTS=Te,Oe.propTypes={children:E().node,placement:E().oneOf(Object.values(Te)),theme:Ae.themeType.isRequired,tip:E().node};var Le=qe,Ne=__webpack_require__(360),je=__webpack_require__.n(Ne),De={container:"jTxmOX",context:"dzIcLh",ad:"_5a9XX1",hoc:"_7sH52O"};const Me=e=>{var t;let{autoplay:n,src:r,theme:o,title:i}=e;const a=r.split("?");let c=a[0];const l=a[1],s=l?je().parse(l):{},u=s.v||(null===(t=c.match(/\/([a-zA-Z0-9-_]*)$/))||void 0===t?void 0:t[1]);return c=`https://www.youtube.com/embed/${u}`,delete s.v,s.autoplay=n?"1":"0",c+=`?${je().stringify(s)}`,(0,b.jsxs)("div",{className:o.container,children:[(0,b.jsx)(xe,{theme:De}),(0,b.jsx)("iframe",{allow:"autoplay",allowFullScreen:!0,className:o.video,src:c,title:i})]})},Ie=t()(Me,"YouTubeVideo",["container","video"],{container:"sXHM81",context:"veKyYi",ad:"r3ABzd",hoc:"YKcPnR",video:"SlV2zw"});Me.propTypes={autoplay:E().bool,src:E().string.isRequired,theme:Ie.themeType.isRequired,title:E().string};var Be=Ie;const Ue=e=>{let{disabled:t,onChange:n,onKeyDown:r,placeholder:o,theme:i,value:a}=e;const c=(0,u.useRef)(null),[l,s]=(0,u.useState)(),[_,d]=(0,u.useState)(a||"");return void 0!==a&&_!==a&&d(a),(0,u.useEffect)((()=>{const e=c.current;if(!e)return;const t=new ResizeObserver((()=>{s(e.scrollHeight)}));return t.observe(e),()=>{t.disconnect()}}),[]),(0,u.useEffect)((()=>{const e=c.current;e&&s(e.scrollHeight)}),[_]),(0,b.jsxs)("div",{className:i.container,children:[(0,b.jsx)("textarea",{readOnly:!0,ref:c,className:`${i.textarea} ${i.hidden}`,value:_}),(0,b.jsx)("textarea",{disabled:t,onChange:void 0===a?e=>{d(e.target.value)}:n,onKeyDown:r,placeholder:o,style:{height:l},className:i.textarea,value:_})]})},We=t()(Ue,"TextArea",["container","hidden","textarea"],{container:"dzMVIB",context:"KVPc7g",ad:"z2GQ0Z",hoc:"_8R1Qdj",textarea:"zd-OFg",hidden:"GiHBXI"});Ue.propTypes={disabled:E().bool,onChange:E().func,onKeyDown:E().func,placeholder:E().string,theme:We.themeType.isRequired,value:E().string};var Ke=We;const Xe=r.requireWeak("./server","/"),Ye=Xe?void 0:__webpack_require__(662).A}(),__webpack_exports__}()}));
3
3
  //# sourceMappingURL=web.bundle.js.map