@beinformed/react 1.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/LICENSE.md +1 -0
- package/dist/ErrorBoundaryFallback-D6YQem9P.d.cts +13 -0
- package/dist/ErrorBoundaryFallback-D6YQem9P.d.ts +13 -0
- package/dist/beforeRenderHooks-CNvsMmi8.d.cts +18 -0
- package/dist/beforeRenderHooks-Gb0tcmCY.d.ts +18 -0
- package/dist/chunk-347XDLN7.js +1 -0
- package/dist/chunk-347XDLN7.js.map +1 -0
- package/dist/chunk-3OP2KQ56.js +2 -0
- package/dist/chunk-3OP2KQ56.js.map +1 -0
- package/dist/chunk-4AC7YQ5Q.js +2 -0
- package/dist/chunk-4AC7YQ5Q.js.map +1 -0
- package/dist/chunk-6E5DAS6G.js +1 -0
- package/dist/chunk-6E5DAS6G.js.map +1 -0
- package/dist/chunk-6KRECIRI.js +2 -0
- package/dist/chunk-6KRECIRI.js.map +1 -0
- package/dist/chunk-A4USB53Q.js +2 -0
- package/dist/chunk-A4USB53Q.js.map +1 -0
- package/dist/chunk-AMFWIR2R.js +2 -0
- package/dist/chunk-AMFWIR2R.js.map +1 -0
- package/dist/chunk-B7PQLTVC.js +2 -0
- package/dist/chunk-B7PQLTVC.js.map +1 -0
- package/dist/chunk-DI7VM62A.js +2 -0
- package/dist/chunk-DI7VM62A.js.map +1 -0
- package/dist/chunk-FW4363Y4.js +2 -0
- package/dist/chunk-FW4363Y4.js.map +1 -0
- package/dist/chunk-HDOILTJ2.js +2 -0
- package/dist/chunk-HDOILTJ2.js.map +1 -0
- package/dist/chunk-JYAETKRB.js +2 -0
- package/dist/chunk-JYAETKRB.js.map +1 -0
- package/dist/chunk-K3DTH6XN.js +2 -0
- package/dist/chunk-K3DTH6XN.js.map +1 -0
- package/dist/chunk-KNEDBCHP.js +2 -0
- package/dist/chunk-KNEDBCHP.js.map +1 -0
- package/dist/chunk-MT7D3AJU.js +12 -0
- package/dist/chunk-MT7D3AJU.js.map +1 -0
- package/dist/chunk-RKGGCIUD.js +2 -0
- package/dist/chunk-RKGGCIUD.js.map +1 -0
- package/dist/chunk-UZIZDEU6.js +2 -0
- package/dist/chunk-UZIZDEU6.js.map +1 -0
- package/dist/chunk-VFLYA5WJ.js +2 -0
- package/dist/chunk-VFLYA5WJ.js.map +1 -0
- package/dist/chunk-VG3QU524.js +22 -0
- package/dist/chunk-VG3QU524.js.map +1 -0
- package/dist/chunk-WBPDMDW4.js +2 -0
- package/dist/chunk-WBPDMDW4.js.map +1 -0
- package/dist/chunk-X2C7CKOK.js +2 -0
- package/dist/chunk-X2C7CKOK.js.map +1 -0
- package/dist/chunk-X3N2NQVZ.js +2 -0
- package/dist/chunk-X3N2NQVZ.js.map +1 -0
- package/dist/chunk-Y7ESITVO.js +2 -0
- package/dist/chunk-Y7ESITVO.js.map +1 -0
- package/dist/chunk-YG7XDCNV.js +2 -0
- package/dist/chunk-YG7XDCNV.js.map +1 -0
- package/dist/chunk-YJNJVQFW.js +2 -0
- package/dist/chunk-YJNJVQFW.js.map +1 -0
- package/dist/chunk-Z2Y3OPVI.js +2 -0
- package/dist/chunk-Z2Y3OPVI.js.map +1 -0
- package/dist/client/index.cjs +12 -0
- package/dist/client/index.cjs.map +1 -0
- package/dist/client/index.d.cts +84 -0
- package/dist/client/index.d.ts +84 -0
- package/dist/client/index.js +2 -0
- package/dist/client/index.js.map +1 -0
- package/dist/components/index.cjs +12 -0
- package/dist/components/index.cjs.map +1 -0
- package/dist/components/index.d.cts +28 -0
- package/dist/components/index.d.ts +28 -0
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +1 -0
- package/dist/hooks/index.cjs +2 -0
- package/dist/hooks/index.cjs.map +1 -0
- package/dist/hooks/index.d.cts +353 -0
- package/dist/hooks/index.d.ts +353 -0
- package/dist/hooks/index.js +2 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/i18n/index.cjs +2 -0
- package/dist/i18n/index.cjs.map +1 -0
- package/dist/i18n/index.d.cts +26 -0
- package/dist/i18n/index.d.ts +26 -0
- package/dist/i18n/index.js +2 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/index.cjs +32 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +27 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/redux/index.cjs +2 -0
- package/dist/redux/index.cjs.map +1 -0
- package/dist/redux/index.d.cts +458 -0
- package/dist/redux/index.d.ts +458 -0
- package/dist/redux/index.js +2 -0
- package/dist/redux/index.js.map +1 -0
- package/dist/server/index.cjs +22 -0
- package/dist/server/index.cjs.map +1 -0
- package/dist/server/index.d.cts +78 -0
- package/dist/server/index.d.ts +78 -0
- package/dist/server/index.js +2 -0
- package/dist/server/index.js.map +1 -0
- package/dist/styled-components.d-CrkOxzv5.d.cts +346 -0
- package/dist/styled-components.d-CrkOxzv5.d.ts +346 -0
- package/dist/theme/index.cjs +2 -0
- package/dist/theme/index.cjs.map +1 -0
- package/dist/theme/index.d.cts +112 -0
- package/dist/theme/index.d.ts +112 -0
- package/dist/theme/index.js +2 -0
- package/dist/theme/index.js.map +1 -0
- package/dist/types-CGXygEPz.d.cts +8 -0
- package/dist/types-CGXygEPz.d.ts +8 -0
- package/dist/useForm-CG_DMYfZ.d.cts +178 -0
- package/dist/useForm-DW-a5mcV.d.ts +178 -0
- package/dist/utils/index.cjs +2 -0
- package/dist/utils/index.cjs.map +1 -0
- package/dist/utils/index.d.cts +6 -0
- package/dist/utils/index.d.ts +6 -0
- package/dist/utils/index.js +2 -0
- package/dist/utils/index.js.map +1 -0
- package/package.json +125 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseHas.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArray.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_freeGlobal.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_root.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Symbol.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getRawTag.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_objectToString.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGetTag.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObjectLike.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isSymbol.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isKey.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObject.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isFunction.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_coreJsData.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isMasked.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_toSource.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsNative.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getValue.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getNative.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nativeCreate.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashClear.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashDelete.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashGet.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashHas.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashSet.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Hash.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheClear.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/eq.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_assocIndexOf.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheDelete.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheGet.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheHas.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheSet.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_ListCache.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Map.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheClear.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isKeyable.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getMapData.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheDelete.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheGet.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheHas.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheSet.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_MapCache.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/memoize.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_memoizeCapped.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stringToPath.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayMap.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseToString.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toString.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_castPath.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsArguments.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArguments.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isIndex.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isLength.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_toKey.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hasPath.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/has.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_overArg.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getPrototype.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isPlainObject.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayPush.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isFlattenable.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseFlatten.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/flattenDeep.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/now.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_trimmedEndIndex.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseTrim.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toNumber.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/debounce.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGet.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_defineProperty.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseAssignValue.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_assignValue.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseSet.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_basePickBy.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseHasIn.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/hasIn.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_basePick.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/flatten.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_apply.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_overRest.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/constant.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/identity.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseSetToString.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_shortOut.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_setToString.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_flatRest.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/pick.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/get.js","../src/index.ts","../src/client/client.tsx","../src/redux/auth/authReducer.ts","../src/redux/beforeRenderHooks.ts","../src/redux/dataFromServer.ts","../src/client/rehydrate.ts","../src/i18n/Locales.ts","../src/i18n/Locale.ts","../src/i18n/languages.ts","../src/i18n/translations/beinformed_error_messages_en.nl.json","../src/i18n/translations/beinformed_error_messages_nl.nl.json","../src/redux/modelcatalog/modelCatalogReducer.ts","../src/redux/notifications/notificationActions.ts","../src/redux/progressindicator/progressIndicatorActions.ts","../src/redux/notifications/notificationReducer.ts","../src/redux/preferences/preferencesActions.ts","../src/redux/preferences/preferencesReducer.ts","../src/redux/router/browserHistory.ts","../src/redux/router/routerActions.ts","../src/redux/router/routerReducer.ts","../src/redux/store.ts","../src/redux/error/errorReducer.ts","../src/redux/i18n/i18nReducer.ts","../src/redux/modals/modalsReducer.ts","../src/redux/modularui/modularuiReducer.ts","../src/redux/modularui/constants.ts","../src/redux/modularui/fetchModel.ts","../src/redux/error/errorActions.ts","../src/redux/auth/unauthorizedActions.ts","../src/redux/application/applicationActions.ts","../src/redux/i18n/i18nSelectors.ts","../src/redux/modularui/modelActions.ts","../src/redux/shared/selectors.ts","../src/redux/application/applicationSelectors.ts","../src/redux/shared/actions.ts","../src/redux/modularui/utils.ts","../src/redux/progressindicator/progressIndicatorReducer.ts","../src/redux/router/routerMiddleware.ts","../src/theme/createTheme.ts","../src/client/Init.tsx","../src/components/ErrorBoundary.tsx","../src/components/ErrorBoundaryFallback.tsx","../src/theme/utils/spacers.ts","../src/theme/ThemeProvider.tsx","../src/redux/hooks.ts","../src/client/contextPath.ts","../src/hooks/useAllFormsOnModel.ts","../src/hooks/useModularUIRequest.ts","../src/hooks/useAuthentication.ts","../src/redux/auth/signinActions.ts","../src/redux/auth/signoutActions.ts","../src/hooks/useContent.ts","../src/hooks/useI18n.ts","../src/hooks/useProgressIndicator.ts","../src/hooks/useDeepCompareEffect.ts","../src/hooks/useForm.ts","../src/redux/form/attributeActions.ts","../src/redux/form/autosaveActions.ts","../src/redux/form/autosubmitActions.ts","../src/redux/form/autoupdateActions.ts","../src/redux/form/validateActions.ts","../src/redux/form/formActions.ts","../src/redux/form/formAttributesetRepeatable.ts","../src/hooks/useModularUI.ts","../src/hooks/useModal.ts","../src/hooks/useModelCatalog.ts","../src/redux/modelcatalog/modelCatalogSelectors.ts","../src/hooks/useModularUIBasic.ts","../src/hooks/useRouter.ts","../src/hooks/useModels.ts","../src/redux/modularui/reloadModel.ts","../src/hooks/useModularUIModel.ts","../src/hooks/useNotification.ts","../src/hooks/usePreference.ts","../src/i18n/react/Message.tsx","../src/i18n/serverI18n.ts","../src/server/requestInformation.ts","../src/server/application.ts","../src/server/contextPath.ts","../src/server/htmlpage.ts","../src/server/renderSSRMinimal.tsx","../src/server/serverState.ts","../src/server/serverNoSSR.ts","../src/theme/serverTheme.ts","../src/server/serverPreferences.ts","../src/styled-components.d.ts","../src/theme/useTheme.ts","../src/theme/utils/themeProps.ts","../src/theme/utils/background.ts","../src/theme/utils/colors.ts","../src/theme/utils/contrast.ts","../src/theme/utils/corners.ts","../src/utils/utils.ts"],"sourcesContent":["/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.has` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHas(object, key) {\n return object != null && hasOwnProperty.call(object, key);\n}\n\nmodule.exports = baseHas;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\nmodule.exports = isKey;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var MapCache = require('./_MapCache');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = MapCache;\n\nmodule.exports = memoize;\n","var memoize = require('./memoize');\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n}\n\nmodule.exports = memoizeCapped;\n","var memoizeCapped = require('./_memoizeCapped');\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\nmodule.exports = stringToPath;\n","/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nmodule.exports = arrayMap;\n","var Symbol = require('./_Symbol'),\n arrayMap = require('./_arrayMap'),\n isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = baseToString;\n","var baseToString = require('./_baseToString');\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nmodule.exports = toString;\n","var isArray = require('./isArray'),\n isKey = require('./_isKey'),\n stringToPath = require('./_stringToPath'),\n toString = require('./toString');\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nmodule.exports = castPath;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = toKey;\n","var castPath = require('./_castPath'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isIndex = require('./_isIndex'),\n isLength = require('./isLength'),\n toKey = require('./_toKey');\n\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\nfunction hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n}\n\nmodule.exports = hasPath;\n","var baseHas = require('./_baseHas'),\n hasPath = require('./_hasPath');\n\n/**\n * Checks if `path` is a direct property of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = { 'a': { 'b': 2 } };\n * var other = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.has(object, 'a');\n * // => true\n *\n * _.has(object, 'a.b');\n * // => true\n *\n * _.has(object, ['a', 'b']);\n * // => true\n *\n * _.has(other, 'a');\n * // => false\n */\nfunction has(object, path) {\n return object != null && hasPath(object, path, baseHas);\n}\n\nmodule.exports = has;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var baseGetTag = require('./_baseGetTag'),\n getPrototype = require('./_getPrototype'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\nmodule.exports = isPlainObject;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","var Symbol = require('./_Symbol'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray');\n\n/** Built-in value references. */\nvar spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;\n\n/**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\nfunction isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n}\n\nmodule.exports = isFlattenable;\n","var arrayPush = require('./_arrayPush'),\n isFlattenable = require('./_isFlattenable');\n\n/**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\nfunction baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n}\n\nmodule.exports = baseFlatten;\n","var baseFlatten = require('./_baseFlatten');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Recursively flattens `array`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flattenDeep([1, [2, [3, [4]], 5]]);\n * // => [1, 2, 3, 4, 5]\n */\nfunction flattenDeep(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, INFINITY) : [];\n}\n\nmodule.exports = flattenDeep;\n","var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n","var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\n","var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\n","var castPath = require('./_castPath'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\nmodule.exports = baseGet;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var assignValue = require('./_assignValue'),\n castPath = require('./_castPath'),\n isIndex = require('./_isIndex'),\n isObject = require('./isObject'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\nfunction baseSet(object, path, value, customizer) {\n if (!isObject(object)) {\n return object;\n }\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = toKey(path[index]),\n newValue = value;\n\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return object;\n }\n\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject(objValue)\n ? objValue\n : (isIndex(path[index + 1]) ? [] : {});\n }\n }\n assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n}\n\nmodule.exports = baseSet;\n","var baseGet = require('./_baseGet'),\n baseSet = require('./_baseSet'),\n castPath = require('./_castPath');\n\n/**\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @param {Function} predicate The function invoked per property.\n * @returns {Object} Returns the new object.\n */\nfunction basePickBy(object, paths, predicate) {\n var index = -1,\n length = paths.length,\n result = {};\n\n while (++index < length) {\n var path = paths[index],\n value = baseGet(object, path);\n\n if (predicate(value, path)) {\n baseSet(result, castPath(path, object), value);\n }\n }\n return result;\n}\n\nmodule.exports = basePickBy;\n","/**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHasIn(object, key) {\n return object != null && key in Object(object);\n}\n\nmodule.exports = baseHasIn;\n","var baseHasIn = require('./_baseHasIn'),\n hasPath = require('./_hasPath');\n\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\nfunction hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n}\n\nmodule.exports = hasIn;\n","var basePickBy = require('./_basePickBy'),\n hasIn = require('./hasIn');\n\n/**\n * The base implementation of `_.pick` without support for individual\n * property identifiers.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @returns {Object} Returns the new object.\n */\nfunction basePick(object, paths) {\n return basePickBy(object, paths, function(value, path) {\n return hasIn(object, path);\n });\n}\n\nmodule.exports = basePick;\n","var baseFlatten = require('./_baseFlatten');\n\n/**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */\nfunction flatten(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, 1) : [];\n}\n\nmodule.exports = flatten;\n","/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\nmodule.exports = apply;\n","var apply = require('./_apply');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nmodule.exports = overRest;\n","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nmodule.exports = constant;\n","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n","var constant = require('./constant'),\n defineProperty = require('./_defineProperty'),\n identity = require('./identity');\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\nmodule.exports = baseSetToString;\n","/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\nmodule.exports = shortOut;\n","var baseSetToString = require('./_baseSetToString'),\n shortOut = require('./_shortOut');\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nmodule.exports = setToString;\n","var flatten = require('./flatten'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\n\n/**\n * A specialized version of `baseRest` which flattens the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\nfunction flatRest(func) {\n return setToString(overRest(func, undefined, flatten), func + '');\n}\n\nmodule.exports = flatRest;\n","var basePick = require('./_basePick'),\n flatRest = require('./_flatRest');\n\n/**\n * Creates an object composed of the picked `object` properties.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pick(object, ['a', 'c']);\n * // => { 'a': 1, 'c': 3 }\n */\nvar pick = flatRest(function(object, paths) {\n return object == null ? {} : basePick(object, paths);\n});\n\nmodule.exports = pick;\n","var baseGet = require('./_baseGet');\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nmodule.exports = get;\n","// Generated by createIndex.js - Do not edit manually!\n// This file is automatically updated when the script runs.\n\nexport * from \"./client\";\nexport * from \"./components\";\nexport * from \"./hooks\";\nexport * from \"./i18n\";\nexport * from \"./redux\";\nexport * from \"./server\";\nexport * from \"./styled-components.d\";\nexport * from \"./theme\";\nexport * from \"./utils\";\n","import {\n getContextPathModularUI,\n getStringSetting,\n setSetting,\n setSettings,\n} from \"@beinformed/ui/settings\";\nimport { Cache, xhr } from \"@beinformed/ui/utils\";\nimport { createRoot, hydrateRoot } from \"react-dom/client\";\n\nimport { loginSuccess } from \"../redux/auth/authReducer\";\nimport { handleBeforeRenderHooks } from \"../redux/beforeRenderHooks\";\nimport { getDataFromServer } from \"../redux/dataFromServer\";\nimport { updateEntryDate } from \"../redux/modelcatalog/modelCatalogReducer\";\nimport { showXHRErrorNotification } from \"../redux/notifications/notificationActions\";\nimport {\n setAllContentInDataSetting,\n setDateTimeSettings,\n setLoginPreferences,\n} from \"../redux/preferences/preferencesActions\";\nimport { getBrowserHistory } from \"../redux/router/browserHistory\";\nimport { replace } from \"../redux/router/routerActions\";\nimport { locationChange } from \"../redux/router/routerReducer\";\nimport { setupStore } from \"../redux/store\";\nimport { createTheme } from \"../theme/createTheme\";\nimport { Init } from \"./Init\";\n\nimport type { Setting } from \"@beinformed/ui/settings\";\nimport type { Reducer } from \"@reduxjs/toolkit\";\nimport type { ComponentType, ElementType, ReactElement } from \"react\";\nimport type { ErrorBoundaryFallbackProps } from \"../components/ErrorBoundaryFallback\";\nimport type { BeforeRenderHook } from \"../redux/beforeRenderHooks\";\nimport type { RouterLocation } from \"../redux/router/routerReducer\";\nimport type { BEIStore, RootState } from \"../redux/store\";\nimport type { Theme } from \"../theme/types\";\nimport type { WindowWithContext } from \"./types\";\n\ntype RenderFunction = () => ReactElement<ElementType>;\ntype MountFunction = (\n applicationNode: Element,\n element: ReactElement<ElementType>,\n) => void;\n\ninterface Props {\n customReducers?: Record<string, Reducer>;\n theme?: Theme | Theme[];\n settings?: Record<string, Setting>;\n render: RenderFunction;\n mount: MountFunction;\n beforeRenderHooks?: BeforeRenderHook[];\n ErrorFallbackComponent?: ComponentType<ErrorBoundaryFallbackProps>;\n}\n\nexport const setUnhandledRejectionEvent = (store: BEIStore) => {\n window.onunhandledrejection = (event: PromiseRejectionEvent) => {\n if (event.reason) {\n return setImmediate(() => {\n const errorMessage =\n event.reason.message.toString() || String(event.reason);\n\n store.dispatch(showXHRErrorNotification(errorMessage));\n throw event.reason;\n });\n }\n\n return event;\n };\n};\n\nconst initThemeSettings = (state: RootState, theme?: Theme | Theme[]) => {\n const storedTheme = state.preferences.theme;\n createTheme(storedTheme, theme); // on theme creation, the settings are set\n};\n\n/**\n * The redirectURI querystring parameter is available when the server is redirecting an unauthorized deep link\n * @param store\n */\nconst handleRedirectURI = (store: BEIStore) => {\n const urlParams = new URLSearchParams(window.location.search);\n const redirectURI = urlParams.get(\"redirectURI\");\n if (redirectURI) {\n xhr({ url: `${getContextPathModularUI()}${redirectURI}` }).catch((e) => {\n if (\n e.id === \"UnauthorizedException\" ||\n e.id === \"Error.NotAuthorized\" ||\n e.id === \"Error.Authentication.Required\" ||\n e.id === \"Error.Authentication.InvalidCredentials\"\n ) {\n const LOGIN_PATH = getStringSetting(\"LOGIN_PATH\", \"/signin\");\n store.dispatch(\n replace(LOGIN_PATH, {\n from: { pathname: redirectURI },\n modal: false,\n }),\n );\n }\n });\n }\n};\n\nexport const setModelCatalogEntryDate = (store: BEIStore) => {\n if (typeof window !== \"undefined\") {\n const entryDateFromUrl = new URLSearchParams(window.location?.search).get(\n \"entryDate\",\n );\n if (entryDateFromUrl) {\n store.dispatch(updateEntryDate(entryDateFromUrl));\n } else if (Cache.hasItem(\"ModelCatalogEntryDate\")) {\n const entryDate = Cache.getItem(\"ModelCatalogEntryDate\") as string;\n store.dispatch(updateEntryDate(entryDate));\n }\n }\n};\n\nexport const setupClient = (\n customReducers?: Record<string, Reducer>,\n beforeRenderHooks?: BeforeRenderHook[],\n theme?: Theme | Theme[],\n settings?: Record<string, Setting>,\n) => {\n const contextPath = (window as WindowWithContext).contextPath;\n\n if (typeof contextPath !== \"undefined\") {\n setSetting(\"CONTEXT_PATH\", contextPath);\n } else {\n throw new Error(\"Missing contextPath on window object\");\n }\n\n if (settings) {\n setSettings(settings);\n }\n\n // remove all resources from cache\n Cache.clear(\"^res:\");\n\n const reduxStore = setupStore(getDataFromServer(), customReducers);\n\n initThemeSettings(reduxStore.getState(), theme);\n\n handleRedirectURI(reduxStore);\n setModelCatalogEntryDate(reduxStore);\n\n setAllContentInDataSetting(reduxStore.getState());\n setLoginPreferences(reduxStore.getState());\n setDateTimeSettings(reduxStore.getState());\n\n // load existing cache from other browser tabs\n Cache.loadOtherBrowserTabs(() => {\n if (Cache.getItem(\"auth\")) {\n reduxStore.dispatch(loginSuccess());\n }\n });\n\n if (Cache.getItem(\"auth\")) {\n reduxStore.dispatch(loginSuccess());\n }\n\n // listen to history change and update the redux router store\n getBrowserHistory().listen((location, action) => {\n reduxStore.dispatch(locationChange(location as RouterLocation, action));\n });\n\n setUnhandledRejectionEvent(reduxStore);\n\n if (document.body) {\n document.body.className = \"js\";\n }\n\n if (beforeRenderHooks) {\n handleBeforeRenderHooks(beforeRenderHooks, { store: reduxStore });\n }\n\n return { store: reduxStore };\n};\n\nexport const addContentLoadedEvent = (\n store: BEIStore,\n render: RenderFunction,\n mount: MountFunction,\n theme?: Theme | Theme[],\n ErrorFallbackComponent?: ComponentType<ErrorBoundaryFallbackProps>,\n) => {\n window.addEventListener(\"DOMContentLoaded\", () => {\n const applicationNode = document.querySelector(\"#application\");\n if (!applicationNode) {\n throw new Error(\n \"No DOM element with id application found to attach client to\",\n );\n }\n\n mount(\n applicationNode,\n <Init\n store={store}\n routerHistory={getBrowserHistory()}\n theme={theme}\n ErrorFallbackComponent={ErrorFallbackComponent}\n >\n {render()}\n </Init>,\n );\n });\n};\n\nconst mountClient = (\n applicationNode: Element,\n element: ReactElement<ElementType>,\n) => {\n const isSSR = applicationNode.querySelector(\".application\");\n if (isSSR) {\n hydrateRoot(applicationNode, element);\n } else {\n const root = createRoot(applicationNode);\n root.render(element);\n }\n};\n\n/**\n * Mount the webapplication to the DOM, setup redux store and caches, add unhandledRejectionEvent, used client side when JavaScript is enabled.\n */\nexport const client = ({\n customReducers,\n theme,\n settings,\n render,\n beforeRenderHooks,\n ErrorFallbackComponent,\n mount,\n}: Props) => {\n const { store } = setupClient(customReducers, beforeRenderHooks, settings);\n\n addContentLoadedEvent(\n store,\n render,\n mount ?? mountClient,\n theme,\n ErrorFallbackComponent,\n );\n};\n","import { createAction, createReducer } from \"@reduxjs/toolkit\";\n\nexport interface AuthState {\n authenticated: boolean;\n mustChangePassword: boolean;\n error: string | null;\n}\n\nconst initalState: AuthState = {\n authenticated: false,\n mustChangePassword: false,\n error: null,\n};\n\nexport const loginSuccess = createAction(\"AUTHENTICATION_SUCCESS\");\n\nexport const logoutSuccess = createAction(\"AUTHENTICATION_LOGOUT\");\n\nexport const sendAuthenticationError = createAction(\n \"AUTHENTICATION_ERROR\",\n (errorMessage: string) => {\n return {\n payload: errorMessage,\n };\n },\n);\n\nexport const resetAuthErrors = createAction(\"AUTHENTICATION_RESET_ERRORS\");\n\nexport const saveChangePassword = createAction(\"CHANGE_PASSWORD\");\n\nexport const authReducer = createReducer(initalState, (builder) => {\n builder\n .addCase(loginSuccess, (state) => {\n state.authenticated = true;\n state.error = null;\n state.mustChangePassword = false;\n })\n .addCase(sendAuthenticationError, (state, action) => {\n state.authenticated = false;\n state.error = action.payload;\n state.mustChangePassword = false;\n })\n .addCase(resetAuthErrors, (state) => {\n state.error = null;\n })\n .addCase(logoutSuccess, (state) => {\n state.authenticated = false;\n state.error = null;\n state.mustChangePassword = false;\n })\n .addCase(saveChangePassword, (state) => {\n state.authenticated = true;\n state.error = null;\n state.mustChangePassword = true;\n });\n});\n","import type { HttpServletRequestJava } from \"../server/types\";\nimport type { BEIStore } from \"./store\";\n\nexport interface BeforeRenderHookProps {\n store: BEIStore;\n request?: HttpServletRequestJava;\n}\nexport type BeforeRenderHook = (props: BeforeRenderHookProps) => void;\n\n/**\n * Process handlers that need to be run before the react application starts,\n * for example to start a third party service<br>\n * An object with the store is available to make it possible to read state available in the redux store,\n * for example server preferences, and the request is available to retrieve request information\n *\n */\nexport const handleBeforeRenderHooks = (\n beforeRenderHooks: BeforeRenderHook[] = [],\n props: BeforeRenderHookProps,\n) => {\n if (beforeRenderHooks.length > 0) {\n for (const beforeRenderHook of beforeRenderHooks) {\n beforeRenderHook(props);\n }\n }\n};\n","import { JsonParseException } from \"@beinformed/ui/exceptions\";\n\nimport { rehydrate } from \"../client/rehydrate\";\n\nexport const getDataFromServer = () => {\n const dataElement = document.querySelector(\n 'script[type=\"application/json\"][data-app-state=\"app-json\"]',\n );\n\n if (!dataElement) {\n throw new Error(\"Error loading state, json not found\");\n } else if (dataElement?.textContent?.trim() === \"\") {\n return {};\n }\n\n const data = dataElement.textContent || \"\";\n try {\n const json = JSON.parse(data);\n return rehydrate(json);\n } catch (_error) {\n throw new JsonParseException(`Error parsing content ${data}`);\n }\n};\n","import { resolveModel } from \"@beinformed/ui/models\";\nimport { ModularUIResponse } from \"@beinformed/ui/modularui\";\nimport has from \"lodash/has\";\n\nimport { Locales } from \"../i18n/Locales\";\n\nimport type { Contributions, Data } from \"@beinformed/ui/types\";\n\ninterface RehydrateData {\n key: string;\n locale: string;\n data: Data;\n contributions: Contributions;\n origin?: string;\n contextPath?: string;\n childModels?: RehydrateData[];\n}\n\n/**\n * Recreate a model from dehydrated data obtained after a server render.\n */\nconst recreateModel = (data: RehydrateData) => {\n const modelData = ModularUIResponse.rehydrate(data);\n\n const Model = resolveModel(modelData);\n\n if (Model) {\n const model = new Model(modelData);\n\n //Todo\n // model.rehydrate(data);\n\n if (data.childModels) {\n const childModels = data.childModels\n .map((childModel: RehydrateData) => recreateModel(childModel))\n .filter((d) => d != null);\n\n model.addChildModels(childModels);\n }\n\n return model;\n }\n\n return undefined;\n};\n\nconst isModularUIModelData = (data: unknown) =>\n data != null &&\n typeof data === \"object\" &&\n has(data, \"data\") &&\n has(data, \"contributions\") &&\n has(data, \"key\") &&\n typeof data.key === \"string\" &&\n has(data, \"locale\") &&\n typeof data.locale === \"string\";\n\nconst rehydratedValue = (stateKey: string, stateValue: unknown) => {\n if (Array.isArray(stateValue)) {\n return stateValue.map((stateItem) => rehydrate(stateItem));\n }\n\n if (isModularUIModelData(stateValue)) {\n return recreateModel(stateValue as RehydrateData);\n }\n\n if (\n stateKey === \"i18n\" &&\n has(stateValue, \"locales\") &&\n has(stateValue, \"locale\")\n ) {\n return {\n locales: Locales.rehydrate(stateValue.locales),\n locale: stateValue?.locale,\n };\n }\n\n const noFurtherRehydration = [\n \"preferences\",\n \"router\",\n \"progressindicator\",\n \"modelcatalog\",\n ];\n if (noFurtherRehydration.includes(stateKey)) {\n return stateValue;\n }\n\n if (stateValue !== null && typeof stateValue === \"object\") {\n return rehydrate(stateValue as Record<string, unknown>);\n }\n\n return stateValue;\n};\n\n/**\n * Maps dehydrated state to models that can be used to rehydrated the application.\n */\nexport const rehydrate = (state: Record<string, unknown>) => {\n const mappedState: Record<string, unknown> = {};\n\n Object.keys(state).forEach((stateKey) => {\n const stateValue = state[stateKey];\n mappedState[stateKey] = rehydratedValue(stateKey, stateValue);\n });\n\n return mappedState;\n};\n","import { IllegalArgumentException } from \"@beinformed/ui/exceptions\";\nimport { BaseCollection } from \"@beinformed/ui/models\";\n\nimport { Locale } from \"./Locale\";\nimport englishErrors from \"./translations/beinformed_error_messages_en.nl.json\";\nimport dutchErrors from \"./translations/beinformed_error_messages_nl.nl.json\";\n\nimport type { LocaleConfiguration } from \"./types\";\n\ntype ErrorMessageObject = Record<string, Record<string, string>>;\n\ninterface HydratedLocales {\n collection: {\n code: string;\n messages: Record<string, string>;\n errors: Record<string, string>;\n }[];\n}\n\n/**\n * Array of available locales\n * Order of locales is the preferred order of locales.\n * When user has an accept language header that does not correspond to the locales array,\n * the first one is used as the preferred language\n */\nexport const availableLocales: LocaleConfiguration[] = [\n {\n code: \"en\",\n messages: {},\n errors: englishErrors,\n },\n {\n code: \"nl\",\n messages: {},\n errors: dutchErrors,\n },\n];\n\n/**\n * Merge an object with custom error messages (exported and translated from be informed for example) and merge them with the existing translations.\n */\nexport const createLocalesWithConfiguredErrors = (\n configuredErrors: ErrorMessageObject,\n) =>\n availableLocales.map((availableLocale) => {\n if (configuredErrors[availableLocale.code]) {\n return {\n ...availableLocale,\n errors: {\n ...availableLocale.errors,\n ...configuredErrors[availableLocale.code],\n },\n };\n }\n\n return availableLocale;\n });\n\n/**\n * Locales, collection of Locale\n */\nexport class Locales extends BaseCollection<Locale> {\n constructor(locales: LocaleConfiguration[] = availableLocales) {\n super(locales.map((locale) => new Locale(locale)));\n }\n\n /**\n * rehydrate\n */\n static rehydrate(hydatedLocales: HydratedLocales): Locales {\n if (hydatedLocales && hydatedLocales.collection) {\n return new Locales(\n hydatedLocales.collection.map((locale) => ({\n code: locale.code,\n messages: locale.messages,\n errors: locale.errors,\n })),\n );\n }\n\n return new Locales([]);\n }\n\n /**\n * Check if locale with localeCode exists\n */\n hasLocale(localeCode: string) {\n return this.some((item) => localeCode.startsWith(item.code));\n }\n\n /**\n * Retrieve locales by localeCode from Locales collection\n */\n getLocale(localeCode: string) {\n if (this.hasLocale(localeCode)) {\n const locale = this.find((item) => localeCode.startsWith(item.code));\n if (locale) {\n return locale;\n }\n }\n throw new IllegalArgumentException(\n `Locale configuration for locale ${localeCode} not found`,\n );\n }\n\n /**\n * Retrieve all available locale codes\n */\n get availableLocaleCodes() {\n return this.map((locale) => locale.code);\n }\n\n /**\n * Retrieve preferred locale based on the accept header of a browser\n */\n getPreferredLocale(acceptLanguageHeader: string | null) {\n if (acceptLanguageHeader != null) {\n const acceptLanguages =\n acceptLanguageHeader.match(/[-A-Za-z]{2,10}/gu) || [];\n\n const preferredLocales = acceptLanguages\n .filter((locale) =>\n this.availableLocaleCodes.some((availableLocale) =>\n locale.startsWith(availableLocale),\n ),\n )\n .map((locale) =>\n this.availableLocaleCodes.find((availableLocale) =>\n locale.startsWith(availableLocale),\n ),\n );\n\n if (preferredLocales.length > 0) {\n return preferredLocales[0];\n }\n }\n\n return this.availableLocaleCodes[0];\n }\n\n /**\n * Add or change messages and errors for the given locale.<br>\n * It is not possible to remove messages.\n */\n update(\n locale: string,\n messages: Record<string, string> = {},\n errors: Record<string, string> = {},\n ) {\n if (this.hasLocale(locale)) {\n this.getLocale(locale).update(messages, errors);\n } else {\n this.add(\n new Locale({\n code: locale,\n messages,\n errors,\n }),\n );\n }\n }\n}\n","import { IllegalStateException } from \"@beinformed/ui/exceptions\";\nimport { getBooleanSetting } from \"@beinformed/ui/settings\";\nimport formatMessage from \"format-message\";\nimport { immerable } from \"immer\";\n\nimport { languages } from \"./languages\";\n\nimport type { MessageParameters } from \"@beinformed/ui/types\";\nimport type { LocaleConfiguration } from \"./types\";\n\n/**\n * Create a locale\n */\nexport class Locale {\n [immerable] = true;\n\n #code: string;\n #messages: Record<string, string>;\n #errors: Record<string, string>;\n #nativeName: string | undefined;\n\n constructor(locale: LocaleConfiguration) {\n this.#code = locale.code;\n\n this.#messages = this.fixPlaceHoldersInObject(locale.messages);\n this.#errors = this.fixPlaceHoldersInObject(locale.errors);\n\n this.#nativeName = locale.nativeName;\n\n formatMessage.setup({\n missingTranslation: \"ignore\",\n });\n }\n\n /**\n * Retrieve locale code\n */\n get code() {\n return this.#code;\n }\n\n /**\n * Retrieve nativeName\n */\n get nativeName() {\n if (this.#nativeName) {\n return this.#nativeName;\n }\n\n const locale = this.code.split(\"-\");\n\n if (locale.length > 0) {\n const languageCode = locale[0];\n if (languageCode) {\n const language = languages.lang[languageCode];\n\n if (language) {\n return (\n language[1] + (locale[1] ? ` (${locale[1].toUpperCase()})` : \"\")\n );\n }\n }\n }\n\n throw new IllegalStateException(\n `Can not find language name based on locale: ${this.code}`,\n );\n }\n\n /**\n * Exported messages from Be Informed have placeholders in the syntax ${placeholder_name}\n * where the ICU messageformat module uses {placeholder_name}.\n * This method converts the ${} to {}\n */\n fixPlaceHolders(message: string | undefined) {\n if (typeof message === \"string\") {\n return message\n .replace(/'\\$\\{(?<key>.*?)}'/g, \"''{$<key>}''\")\n .replace(/\\$\\{(?<key>.*?)}/g, \"{$<key>}\");\n }\n\n return null;\n }\n\n /**\n * Exported messages from Be Informed have placeholders in the syntax ${placeholder_name}\n * where the ICU messageformat module uses {placeholder_name}.\n * This method converts the ${} to {}\n */\n private fixPlaceHoldersInObject(messages: Record<string, string> = {}) {\n return JSON.parse(\n JSON.stringify(messages)\n .replace(/'\\$\\{(?<key>.*?)}'/g, \"''{$<key>}''\")\n .replace(/\\$\\{(?<key>.*?)}/g, \"{$<key>}\"),\n );\n }\n\n /**\n * Retrieve message by id\n */\n getBaseMessage(id: string, defaultMessage?: string) {\n if (!id && !defaultMessage) {\n return \"[message: id or defaultMessage missing]\";\n }\n\n const messageFromLocale = this.#messages[id] || this.#errors[id];\n\n if (\n (typeof process === \"undefined\" ||\n process.env.NODE_ENV !== \"production\") &&\n !messageFromLocale &&\n id &&\n getBooleanSetting(\"DEBUG_I18N_MESSAGE_NOT_FOUND\")\n ) {\n console.debug(\n `Message with id ${id} not found for locale ${this.code} in layout translations`,\n );\n }\n return messageFromLocale || this.fixPlaceHolders(defaultMessage) || id;\n }\n\n /**\n * Format message using formatMessage library\n */\n formatMessage(message: string, parameters?: MessageParameters) {\n if (parameters) {\n return formatMessage(message, parameters);\n }\n\n return message;\n }\n\n /**\n * Retrieve a messages with replaced parameters\n */\n getMessage(\n id: string,\n defaultMessage?: string,\n parameters?: MessageParameters,\n ): string {\n const message = this.getBaseMessage(id, defaultMessage);\n return this.formatMessage(message, parameters);\n }\n\n /**\n * Add or change messages for this locale. It is not possible to remove messages.\n */\n update(\n messages: Record<string, string> = {},\n errors: Record<string, string> = {},\n ) {\n this.#messages = {\n ...this.#messages,\n ...this.fixPlaceHoldersInObject(messages),\n };\n\n this.#errors = {\n ...this.#errors,\n ...this.fixPlaceHoldersInObject(errors),\n };\n }\n}\n","interface LanguagesObject {\n attribute: { name: number; nativeName: number };\n rtl: Record<string, number>;\n lang: Record<string, string[]>;\n}\n\nexport const languages: LanguagesObject = {\n attribute: {\n name: 0,\n nativeName: 1,\n },\n rtl: {\n ar: 1,\n dv: 1,\n fa: 1,\n ha: 1,\n he: 1,\n ks: 1,\n ku: 1,\n ps: 1,\n ur: 1,\n yi: 1,\n },\n lang: {\n aa: [\"Afar\", \"Afar\"],\n ab: [\"Abkhazian\", \"Аҧсуа\"],\n af: [\"Afrikaans\", \"Afrikaans\"],\n ak: [\"Akan\", \"Akana\"],\n am: [\"Amharic\", \"አማርኛ\"],\n an: [\"Aragonese\", \"Aragonés\"],\n ar: [\"Arabic\", \"العربية\"],\n as: [\"Assamese\", \"অসমীয়া\"],\n av: [\"Avar\", \"Авар\"],\n ay: [\"Aymara\", \"Aymar\"],\n az: [\"Azerbaijani\", \"Azərbaycanca / آذربايجان\"],\n ba: [\"Bashkir\", \"Башҡорт\"],\n be: [\"Belarusian\", \"Беларуская\"],\n bg: [\"Bulgarian\", \"Български\"],\n bh: [\"Bihari\", \"भोजपुरी\"],\n bi: [\"Bislama\", \"Bislama\"],\n bm: [\"Bambara\", \"Bamanankan\"],\n bn: [\"Bengali\", \"বাংলা\"],\n bo: [\"Tibetan\", \"བོད་ཡིག / Bod skad\"],\n br: [\"Breton\", \"Brezhoneg\"],\n bs: [\"Bosnian\", \"Bosanski\"],\n ca: [\"Catalan\", \"Català\"],\n ce: [\"Chechen\", \"Нохчийн\"],\n ch: [\"Chamorro\", \"Chamoru\"],\n co: [\"Corsican\", \"Corsu\"],\n cr: [\"Cree\", \"Nehiyaw\"],\n cs: [\"Czech\", \"Česky\"],\n cu: [\"Old Church Slavonic / Old Bulgarian\", \"словѣньскъ / slověnĭskŭ\"],\n cv: [\"Chuvash\", \"Чăваш\"],\n cy: [\"Welsh\", \"Cymraeg\"],\n da: [\"Danish\", \"Dansk\"],\n de: [\"German\", \"Deutsch\"],\n dv: [\"Divehi\", \"ދިވެހިބަސް\"],\n dz: [\"Dzongkha\", \"ཇོང་ཁ\"],\n ee: [\"Ewe\", \"Ɛʋɛ\"],\n el: [\"Greek\", \"Ελληνικά\"],\n en: [\"English\", \"English\"],\n eo: [\"Esperanto\", \"Esperanto\"],\n es: [\"Spanish\", \"Español\"],\n et: [\"Estonian\", \"Eesti\"],\n eu: [\"Basque\", \"Euskara\"],\n fa: [\"Persian\", \"فارسی\"],\n ff: [\"Peul\", \"Fulfulde\"],\n fi: [\"Finnish\", \"Suomi\"],\n fj: [\"Fijian\", \"Na Vosa Vakaviti\"],\n fo: [\"Faroese\", \"Føroyskt\"],\n fr: [\"French\", \"Français\"],\n fy: [\"West Frisian\", \"Frysk\"],\n ga: [\"Irish\", \"Gaeilge\"],\n gd: [\"Scottish Gaelic\", \"Gàidhlig\"],\n gl: [\"Galician\", \"Galego\"],\n gn: [\"Guarani\", \"Avañe'ẽ\"],\n gu: [\"Gujarati\", \"ગુજરાતી\"],\n gv: [\"Manx\", \"Gaelg\"],\n ha: [\"Hausa\", \"هَوُسَ\"],\n he: [\"Hebrew\", \"עברית\"],\n hi: [\"Hindi\", \"हिन्दी\"],\n ho: [\"Hiri Motu\", \"Hiri Motu\"],\n hr: [\"Croatian\", \"Hrvatski\"],\n ht: [\"Haitian\", \"Krèyol ayisyen\"],\n hu: [\"Hungarian\", \"Magyar\"],\n hy: [\"Armenian\", \"Հայերեն\"],\n hz: [\"Herero\", \"Otsiherero\"],\n ia: [\"Interlingua\", \"Interlingua\"],\n id: [\"Indonesian\", \"Bahasa Indonesia\"],\n ie: [\"Interlingue\", \"Interlingue\"],\n ig: [\"Igbo\", \"Igbo\"],\n ii: [\"Sichuan Yi\", \"ꆇꉙ / 四川彝语\"],\n ik: [\"Inupiak\", \"Iñupiak\"],\n io: [\"Ido\", \"Ido\"],\n is: [\"Icelandic\", \"Íslenska\"],\n it: [\"Italian\", \"Italiano\"],\n iu: [\"Inuktitut\", \"ᐃᓄᒃᑎᑐᑦ\"],\n ja: [\"Japanese\", \"日本語\"],\n jv: [\"Javanese\", \"Basa Jawa\"],\n ka: [\"Georgian\", \"ქართული\"],\n kg: [\"Kongo\", \"KiKongo\"],\n ki: [\"Kikuyu\", \"Gĩkũyũ\"],\n kj: [\"Kuanyama\", \"Kuanyama\"],\n kk: [\"Kazakh\", \"Қазақша\"],\n kl: [\"Greenlandic\", \"Kalaallisut\"],\n km: [\"Cambodian\", \"ភាសាខ្មែរ\"],\n kn: [\"Kannada\", \"ಕನ್ನಡ\"],\n ko: [\"Korean\", \"한국어\"],\n kr: [\"Kanuri\", \"Kanuri\"],\n ks: [\"Kashmiri\", \"कश्मीरी / كشميري\"],\n ku: [\"Kurdish\", \"Kurdî / كوردی\"],\n kv: [\"Komi\", \"Коми\"],\n kw: [\"Cornish\", \"Kernewek\"],\n ky: [\"Kirghiz\", \"Kırgızca / Кыргызча\"],\n la: [\"Latin\", \"Latina\"],\n lb: [\"Luxembourgish\", \"Lëtzebuergesch\"],\n lg: [\"Ganda\", \"Luganda\"],\n li: [\"Limburgian\", \"Limburgs\"],\n ln: [\"Lingala\", \"Lingála\"],\n lo: [\"Laotian\", \"ລາວ / Pha xa lao\"],\n lt: [\"Lithuanian\", \"Lietuvių\"],\n lv: [\"Latvian\", \"Latviešu\"],\n mg: [\"Malagasy\", \"Malagasy\"],\n mh: [\"Marshallese\", \"Kajin Majel / Ebon\"],\n mi: [\"Maori\", \"Māori\"],\n mk: [\"Macedonian\", \"Македонски\"],\n ml: [\"Malayalam\", \"മലയാളം\"],\n mn: [\"Mongolian\", \"Монгол\"],\n mo: [\"Moldovan\", \"Moldovenească\"],\n mr: [\"Marathi\", \"मराठी\"],\n ms: [\"Malay\", \"Bahasa Melayu\"],\n mt: [\"Maltese\", \"bil-Malti\"],\n my: [\"Burmese\", \"Myanmasa\"],\n na: [\"Nauruan\", \"Dorerin Naoero\"],\n nd: [\"North Ndebele\", \"Sindebele\"],\n ne: [\"Nepali\", \"नेपाली\"],\n ng: [\"Ndonga\", \"Oshiwambo\"],\n nl: [\"Dutch\", \"Nederlands\"],\n nn: [\"Norwegian Nynorsk\", \"Norsk (nynorsk)\"],\n no: [\"Norwegian\", \"Norsk (bokmål / riksmål)\"],\n nr: [\"South Ndebele\", \"isiNdebele\"],\n nv: [\"Navajo\", \"Diné bizaad\"],\n ny: [\"Chichewa\", \"Chi-Chewa\"],\n oc: [\"Occitan\", \"Occitan\"],\n oj: [\"Ojibwa\", \"ᐊᓂᔑᓈᐯᒧᐎᓐ / Anishinaabemowin\"],\n om: [\"Oromo\", \"Oromoo\"],\n or: [\"Oriya\", \"ଓଡ଼ିଆ\"],\n os: [\"Ossetian / Ossetic\", \"Иронау\"],\n pa: [\"Panjabi / Punjabi\", \"ਪੰਜਾਬੀ / पंजाबी / پنجابي\"],\n pi: [\"Pali\", \"Pāli / पाऴि\"],\n pl: [\"Polish\", \"Polski\"],\n ps: [\"Pashto\", \"پښتو\"],\n pt: [\"Portuguese\", \"Português\"],\n qu: [\"Quechua\", \"Runa Simi\"],\n rm: [\"Raeto Romance\", \"Rumantsch\"],\n rn: [\"Kirundi\", \"Kirundi\"],\n ro: [\"Romanian\", \"Română\"],\n ru: [\"Russian\", \"Русский\"],\n rw: [\"Rwandi\", \"Kinyarwandi\"],\n sa: [\"Sanskrit\", \"संस्कृतम्\"],\n sc: [\"Sardinian\", \"Sardu\"],\n sd: [\"Sindhi\", \"सिनधि\"],\n se: [\"Northern Sami\", \"Sámegiella\"],\n sg: [\"Sango\", \"Sängö\"],\n sh: [\"Serbo-Croatian\", \"Srpskohrvatski / Српскохрватски\"],\n si: [\"Sinhalese\", \"සිංහල\"],\n sk: [\"Slovak\", \"Slovenčina\"],\n sl: [\"Slovenian\", \"Slovenščina\"],\n sm: [\"Samoan\", \"Gagana Samoa\"],\n sn: [\"Shona\", \"chiShona\"],\n so: [\"Somalia\", \"Soomaaliga\"],\n sq: [\"Albanian\", \"Shqip\"],\n sr: [\"Serbian\", \"Српски\"],\n ss: [\"Swati\", \"SiSwati\"],\n st: [\"Southern Sotho\", \"Sesotho\"],\n su: [\"Sundanese\", \"Basa Sunda\"],\n sv: [\"Swedish\", \"Svenska\"],\n sw: [\"Swahili\", \"Kiswahili\"],\n ta: [\"Tamil\", \"தமிழ்\"],\n te: [\"Telugu\", \"తెలుగు\"],\n tg: [\"Tajik\", \"Тоҷикӣ\"],\n th: [\"Thai\", \"ไทย / Phasa Thai\"],\n ti: [\"Tigrinya\", \"ትግርኛ\"],\n tk: [\"Turkmen\", \"Туркмен / تركمن\"],\n tl: [\"Tagalog / Filipino\", \"Tagalog\"],\n tn: [\"Tswana\", \"Setswana\"],\n to: [\"Tonga\", \"Lea Faka-Tonga\"],\n tr: [\"Turkish\", \"Türkçe\"],\n ts: [\"Tsonga\", \"Xitsonga\"],\n tt: [\"Tatar\", \"Tatarça\"],\n tw: [\"Twi\", \"Twi\"],\n ty: [\"Tahitian\", \"Reo Mā`ohi\"],\n ug: [\"Uyghur\", \"Uyƣurqə / ئۇيغۇرچە\"],\n uk: [\"Ukrainian\", \"Українська\"],\n ur: [\"Urdu\", \"اردو\"],\n uz: [\"Uzbek\", \"Ўзбек\"],\n ve: [\"Venda\", \"Tshivenḓa\"],\n vi: [\"Vietnamese\", \"Tiếng Việt\"],\n vo: [\"Volapük\", \"Volapük\"],\n wa: [\"Walloon\", \"Walon\"],\n wo: [\"Wolof\", \"Wollof\"],\n xh: [\"Xhosa\", \"isiXhosa\"],\n yi: [\"Yiddish\", \"ייִדיש\"],\n yo: [\"Yoruba\", \"Yorùbá\"],\n za: [\"Zhuang\", \"Cuengh / Tôô / 壮语\"],\n zh: [\"Chinese\", \"中文\"],\n zu: [\"Zulu\", \"isiZulu\"],\n pap: [\"Papiamento\", \"Papiamento\"],\n },\n};\n","{\n \"Constraint.Attribute.IncorrectValue\": \"Incorrect value\",\n \"Constraint.Boolean.InvalidValue\": \"Invalid boolean value, only values 'true' or 'false' are valid\",\n \"Constraint.BSN.InvalidFormat\": \"Must be a valid BSN\",\n \"Constraint.Captcha.InvalidToken\": \"The captcha is invalid\",\n \"Constraint.Choice.ConflictingAnswer\": \"Cannot select '${answer-option-key}' because this is not a relevant option, given the other answers\",\n \"Constraint.Choice.ConflictingOptions\": \"Cannot select '${answer-option-key1}' and '${answer-option-key2}' at the same time\",\n \"Constraint.Choice.InvalidOption\": \"Allowed options are: ${options}\",\n \"Constraint.Choice.InvalidOption.General\": \"Value '${value}' is not allowed\",\n \"Constraint.Choice.MultipleNotAllowed\": \"Selecting multiple options is not allowed\",\n \"Constraint.ConfirmCurrentPassword.Invalid\": \"Must match the current password\",\n \"Constraint.Date.AboveMaximum\": \"Must be on or before ${max-date}\",\n \"Constraint.Date.BelowMinimum\": \"Must be on or after ${min-date}\",\n \"Constraint.Date.InvalidFormat\": \"Must be entered in the format ${format}\",\n \"Constraint.Date.NotOnDate\": \"Must be on ${date}\",\n \"Constraint.Date.OutOfRange\": \"Must be between ${min-date} and ${max-date}\",\n \"Constraint.DateRange.InvalidRange\": \"Start date must be before end date\",\n \"Constraint.DateRange.Mandatory\": \"Field is mandatory: must contain at least a start or end date\",\n \"Constraint.DateTime.AboveMaximum\": \"Must be before ${max-date-time}\",\n \"Constraint.DateTime.BelowMinimum\": \"Must be at ${min-date-time} or after\",\n \"Constraint.DateTime.InvalidFormat\": \"Must be entered in the format ${format}\",\n \"Constraint.DateTime.OutOfRange\": \"Must be between ${min-date-time} and ${max-date-time}\",\n \"Constraint.DateTimeRange.InvalidRange\": \"Start date-time must be before end date-time\",\n \"Constraint.DateTimeRange.Mandatory\": \"Field is mandatory: must contain at least a start or end date-time\",\n \"Constraint.Document.MimeTypeNotAllowed\": \"The document mime type is not valid for the selected document type\",\n \"Constraint.Email.InvalidFormat\": \"Must be a valid e-mail address\",\n \"Constraint.File.DataEmpty\": \"File does not exist or has no content\",\n \"Constraint.File.InvalidExtension\": \"Allowed extensions are: ${extensions}\",\n \"Constraint.File.InvalidFormat\": \"Must meet the requirements of the file name\",\n \"Constraint.File.InvalidMimeType\": \"Allowed mime types are: ${mime-types}\",\n \"Constraint.File.MaxFileSizeExceeded\": \"Maximum file upload size is ${max-filesize}\",\n \"Constraint.File.OnlyAllowsOneFile\": \"Only one file is allowed\",\n \"Constraint.IBAN.InvalidFormat\": \"Must be a valid IBAN number\",\n \"Constraint.InvalidLengthBetween\": \"Length must be between ${min-length} and ${max-length} characters\",\n \"Constraint.InvalidLengthExact\": \"Length must be precisely ${length} characters\",\n \"Constraint.InvalidLengthTooLong\": \"Length must not be larger than ${max-length} characters\",\n \"Constraint.InvalidLengthTooShort\": \"Length must be at least ${min-length} characters\",\n \"Constraint.InvalidRegularExpression\": \"The value is not according the given regular expression ${regexp}\",\n \"Constraint.Mandatory\": \"Field is mandatory\",\n \"Constraint.Missing\": \"Field is mandatory\",\n \"Constraint.Number.AboveMaximum\": \"Must be at most ${max-number}\",\n \"Constraint.Number.BelowMinimum\": \"Must be at least ${min-number}\",\n \"Constraint.Number.InvalidDecimal\": \"Must be a number with up to ${max-digits} decimal places\",\n \"Constraint.Number.InvalidInteger\": \"Must be a whole number\",\n \"Constraint.Number.InvalidLong\": \"Must be a whole number\",\n \"Constraint.Number.OutOfRange\": \"Must be between ${min-number} and ${max-number}\",\n \"Constraint.NumberRange.BothFieldsMandatory\": \"Must contain start and end value\",\n \"Constraint.NumberRange.InvalidRange\": \"Start value must be less than the end value\",\n \"Constraint.NumberRange.Mandatory\": \"Field is mandatory: must contain at least a start or end value\",\n \"Constraint.Password.AlreadyUsed\": \"Must not have been used before\",\n \"Constraint.Password.LowerAndUpperCaseMandatory\": \"Must contain both upper and lowercase characters\",\n \"Constraint.Password.MinNumericCharactersMandatory\": \"Must contain ${min-numeric} or more numerical characters\",\n \"Constraint.Password.MinSpecialCharactersMandatory\": \"Must contain ${min-special} or more special characters\",\n \"Constraint.Password.ThreeConsecutiveCharactersNotAllowed\": \"Must not contain any character more than twice consecutively\",\n \"Constraint.Password.Unchanged\": \"Must not be the same as the old password\",\n \"Constraint.Password.UserNameSubstringNotAllowed\": \"Must not have 5 consecutive characters from username\",\n \"Constraint.SortParameter.InvalidValue\": \"Invalid sort parameter. Allowed values: field+[asc|desc]\",\n \"Constraint.Time.InvalidFormat\": \"Must be entered in the format ${format}\",\n \"Constraint.TimeRange.InvalidRange\": \"Start time must be before end time\",\n \"Constraint.TimeRange.Mandatory\": \"Field is mandatory: must contain at least a start or end time\",\n \"Constraint.TimeStamp.AboveMaximum\": \"Must be on or before ${max-date}\",\n \"Constraint.TimeStamp.BelowMinimum\": \"Must be on or after ${min-date}\",\n \"Constraint.Timestamp.InvalidFormat\": \"Must be entered in the format ${format}\",\n \"Constraint.TimeStampRange.InvalidRange\": \"Start value must be before end value\",\n \"Constraint.TimeStampRange.Mandatory\": \"Field is mandatory: must contain at least a start or end value\",\n \"Constraint.XML.InvalidFormat\": \"Must be well-formed XML\",\n \"Constraint.ZipCode.InvalidFormat\": \"Must be a valid Dutch ZIP code, e.g. 1234AB\",\n \"Error.AcceptHeaderRequired\": \"The 'Accept' request-header field must be provided\",\n \"Error.Authentication.BlockedUser\": \"You have been logged out, because your account has been blocked\",\n \"Error.Authentication.ConcurrentUser\": \"You have been logged out, since your username has been used at a different location.\",\n \"Error.Authentication.InvalidCredentials\": \"Authentication failed\",\n \"Error.Authentication.InvalidUsername\": \"You have been logged out, because your username is not valid anymore\",\n \"Error.Authentication.Required\": \"Authentication is required\",\n \"Error.Case.ConcurrentModification\": \"Another user has updated a case used in this task. As a result, this task can not be completed.\",\n \"Error.ChangePasswordRequired\": \"User password is initial or expired, and must be changed \",\n \"Error.CodemapLookup.InvalidToken\": \"Token for codemap lookup is not valid\",\n \"Error.DataStore.ConcurrentModification\": \"Another user has updated a record used in this task\",\n \"Error.DataStore.RecordAlreadyExists\": \"\",\n \"Error.DataStore.RowCannotBeLocked\": \"Another user has already locked a record used in this task\",\n \"Error.Form.DataNotAvailableForId\": \"Service can not be completed, data not available for mandatory element ${elementid}\",\n \"Error.Form.ObjectNotAllowed\": \"Object '${objectid}' is not allowed\",\n \"Error.Form.ReadOnlyElementId\": \"Element '${elementid}' is read only\",\n \"Error.Form.TooManyObjects\": \"Too many objects '${objectid}' provided\",\n \"Error.Form.UndefinedElementId\": \"Undefined element '${elementid}'\",\n \"Error.Form.UndefinedObject\": \"Undefined object(s) '${objectid}'\",\n \"Error.GeneralError\": \"An unexpected error occurred\",\n \"Error.MethodNotAllowed\": \"The given HTTP method is not allowed for this resource\",\n \"Error.Parameter.InvalidValue\": \"The parameter contains characters that are not allowed\",\n \"Error.Parameter.Mandatory\": \"Parameter ${parameter} is mandatory\",\n \"Error.Parameter.NotAllowed\": \"Parameter '${parameter}' is not allowed\",\n \"Error.ResourceNotFound\": \"The requested resource cannot be found\",\n \"Validation.StandardCreateAndUpdateUserTask.PasswordsDoNotMatch\": \"Password and password confirmation do not match.\",\n \"Validation.StandardCreateAndUpdateUserTask.UserEmailAlreadyExists\": \"A user with email address '${Email}' already exists\",\n \"Validation.StandardCreateAndUpdateUserTask.UserNameAlreadyExists\": \"A user with username '${Username}' already exists\",\n \"Validation.StandardCreateOrganizationTask.OrganizationAlreadyExists\": \"An organization with id '${ID}' already exists\"\n}\n","{\n \"Constraint.Attribute.IncorrectValue\": \"Ongeldige waarde\",\n \"Constraint.Boolean.InvalidValue\": \"Waarde voldoet niet aan het boolean formaat, alleen waarden 'true' en 'false' zijn toegestaan\",\n \"Constraint.BSN.InvalidFormat\": \"Moet een geldig BSN zijn\",\n \"Constraint.Captcha.InvalidToken\": \"Captcha is niet correct\",\n \"Constraint.Choice.ConflictingAnswer\": \"'${answer-option-key}' kan niet worden gekozen omdat dit geen relevante optie is, gegeven de andere antwoorden\",\n \"Constraint.Choice.ConflictingOptions\": \"'${answer-option-key1}' and '${answer-option-key2}' kunnen niet tegelijkertijd worden gekozen\",\n \"Constraint.Choice.InvalidOption\": \"Toegestane waarden zijn: ${options}\",\n \"Constraint.Choice.InvalidOption.General\": \"Waarde '${value}' is niet toegestaan\",\n \"Constraint.Choice.MultipleNotAllowed\": \"Meerdere opties selecteren is niet toegestaan\",\n \"Constraint.ConfirmCurrentPassword.Invalid\": \"Moet overeenkomen met het huidige wachtwoord\",\n \"Constraint.Date.AboveMaximum\": \"Moet op of voor ${max-date} liggen\",\n \"Constraint.Date.BelowMinimum\": \"Moet op of na ${min-date} liggen\",\n \"Constraint.Date.InvalidFormat\": \"Moet worden opgegeven in het formaat ${format}\",\n \"Constraint.Date.NotOnDate\": \"Moet op ${date} liggen\",\n \"Constraint.Date.OutOfRange\": \"Moet tussen ${min-date} en ${max-date} liggen\",\n \"Constraint.DateRange.InvalidRange\": \"De begindatum dient voor de einddatum te liggen\",\n \"Constraint.DateRange.Mandatory\": \"Veld is verplicht: moet tenminste begin- of einddatum bevatten\",\n \"Constraint.DateTime.AboveMaximum\": \"Moet voor ${max-date-time} liggen\",\n \"Constraint.DateTime.BelowMinimum\": \"Moet op ${min-date-time} of later liggen\",\n \"Constraint.DateTime.InvalidFormat\": \"Moet worden opgegeven in het formaat ${format}\",\n \"Constraint.DateTime.OutOfRange\": \"Moet tussen ${min-date-time} en ${max-date-time} liggen\",\n \"Constraint.DateTimeRange.InvalidRange\": \"De begindatumtijd dient voor de einddatumtijd te liggen\",\n \"Constraint.DateTimeRange.Mandatory\": \"Veld is verplicht: moet tenminste begin- of einddatumtijd bevatten\",\n \"Constraint.Document.MimeTypeNotAllowed\": \"Het document mime type voldoet niet aan het document type\",\n \"Constraint.Email.InvalidFormat\": \"Moet een geldig emailadres zijn\",\n \"Constraint.File.DataEmpty\": \"Bestand bestaat niet of heeft geen inhoud\",\n \"Constraint.File.InvalidExtension\": \"Toegestane extensies zijn: ${extensions}\",\n \"Constraint.File.InvalidFormat\": \"Voldoet niet aan de voorwaarden van een bestandsnaam\",\n \"Constraint.File.InvalidMimeType\": \"Toegestane mime-types zijn: ${mime-types}\",\n \"Constraint.File.MaxFileSizeExceeded\": \"De maximum file grootte voor upload is ${max-filesize}\",\n \"Constraint.File.OnlyAllowsOneFile\": \"Er is slechts één bestand toegestaan\",\n \"Constraint.IBAN.InvalidFormat\": \"Moet een geldig IBAN nummer zijn\",\n \"Constraint.InvalidLengthBetween\": \"Lengte moet tussen ${min-length} en ${max-length} karakters liggen\",\n \"Constraint.InvalidLengthExact\": \"Lengte moet precies ${length} karakters zijn\",\n \"Constraint.InvalidLengthTooLong\": \"Lengte mag niet langer dan ${max-length} karakters zijn\",\n \"Constraint.InvalidLengthTooShort\": \"Lengte moet tenminste ${min-length} karakters zijn\",\n \"Constraint.InvalidRegularExpression\": \"De waarde voldoet niet aan de reguliere expressie ${regexp}\",\n \"Constraint.Mandatory\": \"Veld is verplicht\",\n \"Constraint.Missing\": \"Veld is verplicht\",\n \"Constraint.Number.AboveMaximum\": \"Mag niet groter dan ${max-number} zijn\",\n \"Constraint.Number.BelowMinimum\": \"Moet minstens ${min-number} zijn\",\n \"Constraint.Number.InvalidDecimal\": \"Moet een getal zijn met maximaal ${max-digits} decimalen\",\n \"Constraint.Number.InvalidInteger\": \"Moet een geheel getal zijn\",\n \"Constraint.Number.InvalidLong\": \"Moet een geheel getal zijn\",\n \"Constraint.Number.OutOfRange\": \"Moet tussen ${min-number} en ${max-number} liggen\",\n \"Constraint.NumberRange.BothFieldsMandatory\": \"Moet zowel een begin- als een eindwaarde bevatten\",\n \"Constraint.NumberRange.InvalidRange\": \"De beginwaarde dient kleiner te zijn dan de eindwaarde\",\n \"Constraint.NumberRange.Mandatory\": \"Veld is verplicht: moet tenminste begin- of eindwaarde bevatten\",\n \"Constraint.Password.AlreadyUsed\": \"Mag niet eerder zijn gebruikt\",\n \"Constraint.Password.LowerAndUpperCaseMandatory\": \"Moet zowel hoofdletters als kleine letters bevatten\",\n \"Constraint.Password.MinNumericCharactersMandatory\": \"Moet ${min-numeric} of meer numerieke karakters bevatten\",\n \"Constraint.Password.MinSpecialCharactersMandatory\": \"Moet ${min-special} of meer speciale karakters bevatten\",\n \"Constraint.Password.ThreeConsecutiveCharactersNotAllowed\": \"Mag niet meer dan twee dezelfde karakters achter elkaar bevatten\",\n \"Constraint.Password.Unchanged\": \"Mag niet hetzelfde zijn als het oude wachtwoord\",\n \"Constraint.Password.UserNameSubstringNotAllowed\": \"Mag niet vijf opeenvolgende karakters van de gebruikersnaam bevatten\",\n \"Constraint.SortParameter.InvalidValue\": \"Ongeldige sorteerparameter. Toegestane waardes: veld+[asc|desc]\",\n \"Constraint.Time.InvalidFormat\": \"Moet worden opgegeven in het formaat ${format}\",\n \"Constraint.TimeRange.InvalidRange\": \"De begintijd dient voor de eindtijd te liggen\",\n \"Constraint.TimeRange.Mandatory\": \"Veld is verplicht: moet tenminste begin- of eindtijd bevatten\",\n \"Constraint.TimeStamp.AboveMaximum\": \"Moet op of voor ${max-date} liggen\",\n \"Constraint.TimeStamp.BelowMinimum\": \"Moet op of na ${min-date} liggen\",\n \"Constraint.Timestamp.InvalidFormat\": \"Moet worden opgegeven in het formaat ${format}\",\n \"Constraint.TimeStampRange.InvalidRange\": \"De beginwaarde dient voor de eindwaarde te liggen\",\n \"Constraint.TimeStampRange.Mandatory\": \"Veld is verplicht: moet tenminste begin- of eindwaarde bevatten\",\n \"Constraint.XML.InvalidFormat\": \"Moet geldige XML zijn\",\n \"Constraint.ZipCode.InvalidFormat\": \"Moet een geldige postcode zijn, bijvoorbeeld 1234AB\",\n \"Error.AcceptHeaderRequired\": \"De 'Accept' request-header moet worden meegegeven\",\n \"Error.Authentication.BlockedUser\": \"U bent uitgelogd omdat uw account geblokkeerd is\",\n \"Error.Authentication.ConcurrentUser\": \"U bent uitgelogd omdat uw gebruikersnaam op een andere locatie is gebruikt om in te loggen.\",\n \"Error.Authentication.InvalidCredentials\": \"Inloggen is mislukt\",\n \"Error.Authentication.InvalidUsername\": \"U bent uitgelogd omdat uw gebruikersnaam niet meer geldig is\",\n \"Error.Authentication.Required\": \"Autorisatie is vereist\",\n \"Error.Case.ConcurrentModification\": \"Een andere gebruiker heeft het dossier aangepast waardoor deze taak nu niet meer is toegestaan\",\n \"Error.ChangePasswordRequired\": \"Gebruikerswachtwoord is initieel of verlopen, en moet worden aangepast\",\n \"Error.CodemapLookup.InvalidToken\": \"Token voor keuzelijst lookup is niet valide\",\n \"Error.DataStore.ConcurrentModification\": \"Een andere gebruiker heeft de rij in de datastore reeds aangepast\",\n \"Error.DataStore.RecordAlreadyExists\": \"\",\n \"Error.DataStore.RowCannotBeLocked\": \"Een andere gebruiker heeft de rij in bewerking en daarom kan deze taak niet worden volbracht.\",\n \"Error.Form.DataNotAvailableForId\": \"Service kan niet worden afgrond, data voor verplicht element ${elementid} is niet beschikbaar\",\n \"Error.Form.ObjectNotAllowed\": \"Object '${objectid}' is niet toegestaan\",\n \"Error.Form.ReadOnlyElementId\": \"Element '${elementid}' is alleen lezen\",\n \"Error.Form.TooManyObjects\": \"Te veel objecten '${objectid}' aangeleverd\",\n \"Error.Form.UndefinedElementId\": \"Element '${elementid}' is ongedefinieerd\",\n \"Error.Form.UndefinedObject\": \"Object(en) '${objectid}' ongedefinieerd\",\n \"Error.GeneralError\": \"Er is een onverwachte fout opgetreden\",\n \"Error.MethodNotAllowed\": \"De opgegeven HTTP methode is niet toegestaan op deze resource\",\n \"Error.Parameter.InvalidValue\": \"De parameter bevat karakters die niet zijn toegestaan\",\n \"Error.Parameter.Mandatory\": \"De parameter ${parameter} is verplicht\",\n \"Error.Parameter.NotAllowed\": \"Parameter '${parameter}' is niet toegestaan\",\n \"Error.ResourceNotFound\": \"De opgevraagde resource kan niet worden gevonden\",\n \"Validation.StandardCreateAndUpdateUserTask.PasswordsDoNotMatch\": \"Het wachtwoord en de wachtwoordbevestiging komen niet overeen\",\n \"Validation.StandardCreateAndUpdateUserTask.UserEmailAlreadyExists\": \"Een gebruiker met e-mailadres '${Email}' bestaat al\",\n \"Validation.StandardCreateAndUpdateUserTask.UserNameAlreadyExists\": \"Een gebruiker met gebruikersnaam '${Username}' bestaat al\",\n \"Validation.StandardCreateOrganizationTask.OrganizationAlreadyExists\": \"Een organisatie met id '${ID}' bestaat al\"\n}\n","import { Cache } from \"@beinformed/ui/utils\";\nimport { createAction, createReducer } from \"@reduxjs/toolkit\";\n\nexport interface ModelCatalogState {\n entryDate: string | undefined;\n}\n\nexport const updateEntryDate = createAction(\n \"UPDATE_ENTRYDATE\",\n (entryDate: string) => {\n return {\n payload: entryDate,\n };\n },\n);\n\nconst initialState: ModelCatalogState = {\n entryDate: new Date().toISOString().split(\"T\")[0],\n};\n\n/**\n * Keep track of the entry date for the modelcatalog\n */\nexport const modelCatalogReducer = createReducer<ModelCatalogState>(\n initialState,\n (builder) => {\n builder.addCase(updateEntryDate, (state, action) => {\n Cache.addItem(\"ModelCatalogEntryDate\", action.payload);\n\n state.entryDate = action.payload;\n });\n },\n);\n","import { getNumberSetting } from \"@beinformed/ui/settings\";\nimport { createAsyncThunk } from \"@reduxjs/toolkit\";\n\nimport {\n finishProgress,\n startProgress,\n} from \"../progressindicator/progressIndicatorActions\";\nimport {\n dismissNotification,\n NOTIFICATION_TYPES,\n showNotification,\n} from \"./notificationReducer\";\n\nimport type { ErrorResponse, FormModel } from \"@beinformed/ui/models\";\n\nconst getNotificationMessageId = (form: FormModel) => {\n if (form.actiontype === \"create\") {\n return \"Notification.Msg.Create\";\n }\n\n if (form.actiontype === \"update\") {\n return \"Notification.Msg.Update\";\n }\n\n if (form.actiontype === \"delete\") {\n return \"Notification.Msg.Delete\";\n }\n\n return \"Notification.Msg.Generic\";\n};\n\n/**\n * Show form notification\n */\nexport const showFormNotification = createAsyncThunk(\n \"notification/show_form\",\n async (form: FormModel, { dispatch }) => {\n dispatch(startProgress());\n\n dispatch(\n showNotification({\n type: NOTIFICATION_TYPES.SUCCESS,\n message: {\n id: getNotificationMessageId(form),\n },\n }),\n );\n\n setTimeout(() => {\n dispatch(dismissNotification());\n }, getNumberSetting(\"HIDE_NOTIFICATION_TIMEOUT\"));\n\n return dispatch(finishProgress());\n },\n);\n\n/**\n * Show error notification\n */\nexport const showXHRErrorNotification = (error: ErrorResponse) => {\n return showNotification({\n type: NOTIFICATION_TYPES.ERROR,\n message: {\n id: error.id,\n defaultMessage: error.message,\n parameters: error.properties,\n },\n error,\n });\n};\n","import { createAction } from \"@reduxjs/toolkit\";\n\nexport const startProgress = createAction(\"START_PROGRESS\");\nexport const finishProgress = createAction(\"FINISH_PROGRESS\");\nexport const resetProgress = createAction(\"RESET_PROGRESS\");\nexport const updateProgress = createAction(\n \"UPDATE_PROGRESS\",\n (percentComplete: number) => ({\n payload: {\n percentComplete,\n },\n }),\n);\n","import {\n createAction,\n createAsyncThunk,\n createReducer,\n} from \"@reduxjs/toolkit\";\n\nimport type { ErrorResponse } from \"@beinformed/ui/models\";\nimport type { MessageObject } from \"../../i18n/types\";\n\nexport interface NotificationState {\n render: boolean;\n messageType: string | undefined;\n message: MessageObject | undefined;\n error: ErrorResponse | undefined;\n}\n\nexport interface ShowNotificationArguments {\n type: NOTIFICATION_TYPES | undefined;\n message: MessageObject | undefined;\n error?: ErrorResponse | undefined;\n timeout?: number;\n}\n\nexport enum NOTIFICATION_TYPES {\n SUCCESS = \"SUCCESS\",\n INFO = \"INFO\",\n WARNING = \"WARNING\",\n ERROR = \"ERROR\",\n}\n\nconst saveNotification = createAction(\n \"SHOW_NOTIFICATION\",\n (\n type: NOTIFICATION_TYPES | undefined,\n message: MessageObject | undefined,\n error?: ErrorResponse | undefined,\n ) => {\n return {\n payload: {\n type,\n message,\n error,\n },\n };\n },\n);\n\nexport const showNotification = createAsyncThunk(\n \"notifications/show\",\n (\n { type, message, error, timeout }: ShowNotificationArguments,\n { dispatch },\n ) => {\n if (timeout) {\n setTimeout(() => {\n dispatch(dismissNotification());\n }, timeout);\n }\n\n dispatch(saveNotification(type, message, error));\n },\n);\n\nexport const dismissNotification = createAction(\"DISMISS_NOTIFICATION\");\n\nconst initialState: NotificationState = {\n render: false,\n messageType: undefined,\n message: undefined,\n error: undefined,\n};\n\nexport const notificationReducer = createReducer<NotificationState>(\n initialState,\n (builder) => {\n builder\n .addCase(saveNotification, (state, action) => {\n return {\n ...state,\n render: true,\n messageType: action.payload.type,\n message: action.payload.message,\n error: action.payload.error,\n };\n })\n .addCase(dismissNotification, (state) => {\n return {\n ...state,\n render: false,\n messageType: undefined,\n message: undefined,\n error: undefined,\n };\n });\n },\n);\n","import {\n LOGIN_PASSWORD_SETTING,\n LOGIN_PATH_SETTING,\n LOGIN_TYPE,\n LOGIN_USERNAME_SETTING,\n LOGOUT_PATH_SETTING,\n} from \"@beinformed/ui/constants\";\nimport { JsonParseException } from \"@beinformed/ui/exceptions\";\nimport {\n ALL_CONTENT_IN_DATA_SETTING,\n INCLUDE_TIME_OFFSET,\n setSetting,\n setSettings,\n} from \"@beinformed/ui/settings\";\nimport isPlainObject from \"lodash/isPlainObject\";\n\nimport { setPreference, setPreferences } from \"./preferencesReducer\";\n\nimport type { RootState } from \"../store\";\nimport type { PreferenceValue } from \"./types\";\n\nconst getServerPreferenceValue = (\n preferenceName: string,\n defaultValue: PreferenceValue,\n type?: string,\n) => {\n let value;\n if (typeof preferencesProvider !== \"undefined\") {\n value = preferencesProvider.getPreferenceByName(preferenceName);\n }\n\n if (!value) {\n value = defaultValue;\n }\n\n if (typeof value === \"string\" && type !== \"string\" && value.includes(\",\")) {\n value = value.split(\",\").map((val) => val.trim());\n }\n\n return value as PreferenceValue;\n};\n\nexport const setServerPreference = (\n propertyName: string,\n defaultValue: PreferenceValue,\n type?: string,\n) => {\n const value = getServerPreferenceValue(propertyName, defaultValue, type);\n return setPreference(propertyName, value);\n};\n\nexport const setThemePreference = (configTheme: string) => {\n let themeData;\n\n try {\n themeData = configTheme ? JSON.parse(configTheme) : null;\n } catch (error) {\n throw new JsonParseException(`Theme file contains invalid JSON: ${error}`);\n }\n\n if (themeData && isPlainObject(themeData)) {\n setSettings(themeData.settings);\n }\n\n return setPreference(\"theme\", themeData);\n};\n\n/**\n * Make modular-ui-content-in-data preference available client side\n */\nexport const setAllContentInDataSetting = (state?: RootState) => {\n let allContentInDataSetting = false;\n\n if (\n typeof preferencesProvider !== \"undefined\" &&\n typeof preferencesProvider.getModularUIContentInData !== \"undefined\"\n ) {\n allContentInDataSetting = preferencesProvider.getModularUIContentInData();\n } else if (typeof state !== \"undefined\") {\n allContentInDataSetting = state.preferences[\n ALL_CONTENT_IN_DATA_SETTING\n ] as boolean;\n }\n\n setSetting(ALL_CONTENT_IN_DATA_SETTING, !!allContentInDataSetting);\n return setPreference(ALL_CONTENT_IN_DATA_SETTING, allContentInDataSetting);\n};\n\n/**\n * Retrieve settings for date time conversion\n */\nexport const setDateTimeSettings = (state?: RootState) => {\n let isIncludeTimeOffsetInDateTimes = false;\n if (\n typeof preferencesProvider !== \"undefined\" &&\n typeof preferencesProvider.isIncludeTimeOffsetInDateTimes !== \"undefined\"\n ) {\n isIncludeTimeOffsetInDateTimes =\n preferencesProvider.isIncludeTimeOffsetInDateTimes();\n } else if (typeof state !== \"undefined\") {\n isIncludeTimeOffsetInDateTimes = state.preferences[\n INCLUDE_TIME_OFFSET\n ] as boolean;\n }\n\n setSetting(INCLUDE_TIME_OFFSET, !!isIncludeTimeOffsetInDateTimes);\n return setPreference(INCLUDE_TIME_OFFSET, isIncludeTimeOffsetInDateTimes);\n};\n\n/**\n * Retrieves login settings from runtime preferences and sets them as setting in the preference reducer\n */\nexport const setLoginPreferences = (state?: RootState) => {\n const loginSettings = {\n [LOGIN_TYPE]: getServerPreferenceValue(\n LOGIN_TYPE,\n state?.preferences[LOGIN_TYPE] || \"\",\n ) as string,\n [LOGIN_PATH_SETTING]: getServerPreferenceValue(\n LOGIN_PATH_SETTING,\n state?.preferences[LOGIN_PATH_SETTING] ||\n `/callback?client_name=FormClient`,\n ) as string,\n [LOGIN_USERNAME_SETTING]: getServerPreferenceValue(\n LOGIN_USERNAME_SETTING,\n state?.preferences[LOGIN_USERNAME_SETTING] || \"j_username\",\n ) as string,\n [LOGIN_PASSWORD_SETTING]: getServerPreferenceValue(\n LOGIN_PASSWORD_SETTING,\n state?.preferences[LOGIN_PASSWORD_SETTING] || \"j_password\",\n ) as string,\n [LOGOUT_PATH_SETTING]: getServerPreferenceValue(\n LOGOUT_PATH_SETTING,\n state?.preferences[LOGOUT_PATH_SETTING] || `/logout`,\n ) as string,\n };\n\n setSettings(loginSettings);\n return setPreferences(loginSettings);\n};\n","import { createAction, createReducer } from \"@reduxjs/toolkit\";\n\nimport type { Theme } from \"../../theme/types\";\nimport type { PreferenceValue } from \"./types\";\n\nexport type PreferencesState = Record<string, PreferenceValue> & {\n theme?: Theme;\n};\n\nexport const setPreference = createAction(\n \"SET_PREFERENCE\",\n (propertyName: string, propertyValue: PreferenceValue) => {\n return {\n payload: {\n key: propertyName,\n value: propertyValue,\n },\n };\n },\n);\n\nexport const setPreferences = createAction(\n \"SET_PREFERENCES\",\n (preferences: Record<string, PreferenceValue>) => {\n return {\n payload: {\n ...preferences,\n },\n };\n },\n);\n\nconst initialState = {};\n\nexport const preferencesReducer = createReducer<PreferencesState>(\n initialState,\n (builder) => {\n builder\n .addCase(setPreference, (state, action) => {\n const { key, value } = action.payload;\n state[key] = value;\n })\n .addCase(setPreferences, (state, action) => {\n for (const key of Object.keys(action.payload)) {\n state[key] = action.payload[key];\n }\n });\n },\n);\n","// Assuming this utility is available\nimport { getContextPathServer } from \"@beinformed/ui/settings\";\nimport { createBrowserHistory } from \"history\";\n\nimport type { History as RouterHistory } from \"history\";\n\nlet browserHistoryInstance: RouterHistory | null = null; // Private variable to hold the instance\nlet historyContextPath: string | null = null;\n/**\n * Returns a singleton instance of the browser history.\n * Creates the instance on the first call.\n * This pattern is suitable for client-side applications.\n */\nexport function getBrowserHistory(): RouterHistory {\n if (typeof window === \"undefined\") {\n throw new Error(\n \"getBrowserHistory can only be used in a browser environment.\",\n );\n }\n\n const contextPathServer = getContextPathServer();\n if (!browserHistoryInstance || contextPathServer !== historyContextPath) {\n browserHistoryInstance = createBrowserHistory({\n basename: contextPathServer,\n });\n historyContextPath = contextPathServer;\n }\n return browserHistoryInstance;\n}\n","import { createAction } from \"@reduxjs/toolkit\";\n\nimport type { LocationState } from \"history\";\nimport type { RouterLocation } from \"./routerReducer\";\n\nexport const push = createAction(\n \"ROUTER/PUSH\",\n (location: RouterLocation | string, state?: LocationState) => {\n return {\n payload: { location, state },\n };\n },\n);\n\nexport const replace = createAction(\n \"ROUTER/REPLACE\",\n (location: RouterLocation | string, state?: LocationState) => {\n return {\n payload: { location, state },\n };\n },\n);\n\nexport const go = createAction(\"ROUTER/GO\", (delta: number) => {\n return {\n payload: { delta },\n };\n});\n\nexport const goBack = createAction(\"ROUTER/GOBACK\");\n\nexport const goForward = createAction(\"ROUTER/GOFORWARD\");\n","import { createAction, createReducer } from \"@reduxjs/toolkit\";\n\nimport type { Action, Location } from \"history\";\n\nexport type RouterLocation = Location<{ from?: string; modal?: boolean }>;\n\nexport interface RouterState {\n location: RouterLocation | undefined;\n action: Action | undefined;\n}\n\nconst initialState = { location: undefined, action: undefined };\n\nexport const locationChange = createAction(\n \"ROUTER/LOCATION_CHANGE\",\n (location: RouterLocation, action: Action) => {\n return {\n payload: {\n location,\n action,\n },\n };\n },\n);\n\nexport const routerReducer = createReducer<RouterState>(\n initialState,\n (builder) => {\n builder.addCase(locationChange, (state, action) => {\n state.location = action.payload.location;\n state.action = action.payload.action;\n });\n },\n);\n","import { combineReducers, configureStore } from \"@reduxjs/toolkit\";\n\nimport { authReducer } from \"./auth/authReducer\";\nimport { errorReducer } from \"./error/errorReducer\";\nimport { i18nReducer } from \"./i18n/i18nReducer\";\nimport { modalsReducer } from \"./modals/modalsReducer\";\nimport { modelCatalogReducer } from \"./modelcatalog/modelCatalogReducer\";\nimport { modularUIReducer } from \"./modularui/modularuiReducer\";\nimport { notificationReducer } from \"./notifications/notificationReducer\";\nimport { preferencesReducer } from \"./preferences/preferencesReducer\";\nimport { progressIndicatorReducer } from \"./progressindicator/progressIndicatorReducer\";\nimport { getBrowserHistory } from \"./router/browserHistory\";\nimport { routerMiddleware } from \"./router/routerMiddleware\";\nimport { routerReducer } from \"./router/routerReducer\";\n\nimport type { Reducer } from \"@reduxjs/toolkit\";\n\nconst reducers = {\n router: routerReducer,\n preferences: preferencesReducer,\n modularui: modularUIReducer,\n i18n: i18nReducer,\n auth: authReducer,\n error: errorReducer,\n modals: modalsReducer,\n modelcatalog: modelCatalogReducer,\n notification: notificationReducer,\n progressindicator: progressIndicatorReducer,\n};\nconst rootReducers = combineReducers(reducers);\n\nexport const setupStore = (\n preloadedState?: Partial<RootState>,\n customReducers?: Record<string, Reducer> | null,\n history = getBrowserHistory(),\n) => {\n const reducer = customReducers\n ? combineReducers({ ...reducers, ...customReducers })\n : rootReducers;\n\n return configureStore({\n reducer,\n middleware: (getDefaultMiddleware) =>\n getDefaultMiddleware({\n serializableCheck: false,\n }).concat(routerMiddleware(history)),\n preloadedState,\n });\n};\n\nexport type BEIStore = ReturnType<typeof setupStore>;\nexport type RootState = ReturnType<typeof rootReducers>;\nexport type BEIDispatch = BEIStore[\"dispatch\"];\n","import { createAction, createReducer } from \"@reduxjs/toolkit\";\n\nimport type { ErrorResponse } from \"@beinformed/ui/models\";\n\nexport type ErrorState = null | ErrorResponse;\n\nexport const saveError = createAction(\"SAVE_ERROR\", (error: ErrorResponse) => {\n return {\n payload: error,\n };\n});\n\nconst initialState = null;\n\nexport const errorReducer = createReducer<ErrorState>(\n initialState,\n (builder) => {\n builder.addCase(saveError, (_state, action) => {\n return action.payload;\n });\n },\n);\n","import { Cache, clearCookie, setCookie } from \"@beinformed/ui/utils\";\nimport { createAction, createReducer } from \"@reduxjs/toolkit\";\n\nimport { Locales } from \"../../i18n/Locales\";\n\nexport interface I18nState {\n locales: Locales;\n locale: string;\n}\n\nexport const receiveLocale = (locale: string) => updateLocale(locale);\n\nexport const updateLocale = createAction(\"UPDATE_LOCALE\", (locale: string) => {\n return { payload: locale };\n});\n\nexport const setLocales = createAction(\n \"SET_LOCALES\",\n (locales: Locales, locale: string) => {\n return { payload: { locales, locale } };\n },\n);\n\nconst getDefaultLocale = () => {\n if (typeof navigator !== \"undefined\" && navigator?.language) {\n return navigator?.language.split(\"-\")[0] || \"en\";\n }\n return \"en\";\n};\n\nconst initialState = {\n locales: new Locales(),\n locale: getDefaultLocale(),\n};\n\nexport const i18nReducer = createReducer<I18nState>(initialState, (builder) => {\n builder\n .addCase(updateLocale, (state, action) => {\n if (state.locales?.length > 1) {\n setCookie(\"locale\", action.payload);\n } else {\n clearCookie(\"locale\");\n }\n\n // clear cache because of cached contributions\n Cache.clear();\n\n state.locale = action.payload;\n })\n .addCase(setLocales, (state, action) => {\n const { locale, locales } = action.payload;\n\n if (state.locales.length > 1) {\n setCookie(\"locale\", locale);\n } else {\n clearCookie(\"locale\");\n }\n\n state.locales = locales;\n if (locale) {\n state.locale = locale;\n }\n });\n});\n","import { createAction, createReducer } from \"@reduxjs/toolkit\";\n\nexport interface ModalState {\n key: string;\n visible: boolean;\n size?: string;\n}\n\nexport interface ModalsState {\n modals: ModalState[];\n}\n\nexport const showModal = createAction(\"SHOW_MODAL\", (key: string) => {\n return {\n payload: key,\n };\n});\n\nexport const closeModal = createAction(\"CLOSE_MODAL\", (key: string) => {\n return {\n payload: key,\n };\n});\n\nconst initialState: ModalsState = {\n modals: [],\n};\n\nexport const modalsReducer = createReducer(initialState, (builder) => {\n builder\n .addCase(showModal, (state, action) => {\n const key = action.payload;\n\n // Hide all modals\n state.modals.forEach((modal) => {\n modal.visible = false;\n });\n\n // Find existing modal\n const existing = state.modals.find((modal) => modal.key === key);\n\n if (existing) {\n existing.visible = true;\n } else {\n state.modals.push({ key, visible: true });\n }\n })\n .addCase(closeModal, (state, action) => {\n const key = action.payload;\n\n // Remove the modal\n state.modals = state.modals.filter((modal) => modal.key !== key);\n\n // Show the last modal (if any)\n const last = state.modals[state.modals.length - 1];\n if (last) {\n last.visible = true;\n }\n });\n});\n","import { ApplicationModel } from \"@beinformed/ui/models\";\nimport { createReducer } from \"@reduxjs/toolkit\";\n\nimport { MODULARUI_STATUS } from \"./constants\";\nimport { fetchModel } from \"./fetchModel\";\nimport {\n initModels,\n removeModelByKey,\n resetModularUI,\n setModel,\n updateErrorStatus,\n updateForm,\n updateModel,\n} from \"./modelActions\";\n\nimport type { WritableDraft } from \"immer\";\nimport type { ModelEntry } from \"./types\";\n\nexport type ModularUIState = Record<string, ModelEntry>;\n\ntype IntermediateState = WritableDraft<ModularUIState>;\n\nconst initialState: ModularUIState = {};\n\nconst handleUpdateErrorStatus = (\n state: IntermediateState,\n action: ReturnType<typeof updateErrorStatus>,\n) => {\n const { key, error } = action.payload;\n\n if (!state[key]) {\n state[key] = {\n model: undefined,\n status: MODULARUI_STATUS.ERROR,\n lastModification: Date.now(),\n };\n } else {\n state[key].status = MODULARUI_STATUS.ERROR;\n state[key].lastModification = Date.now();\n }\n // @ts-expect-error deep problem\n state[key].error = error;\n};\n\nconst handleSetModel = (\n state: IntermediateState,\n action: ReturnType<typeof setModel>,\n) => {\n const { key, model } = action.payload;\n // If model is null/undefined, this sets up an empty entry,\n // otherwise, it sets the model and marks as finished.\n state[key] = {\n model: model || undefined,\n lastModification: Date.now(),\n status: model ? MODULARUI_STATUS.FINISHED : MODULARUI_STATUS.IDLE,\n };\n};\n\nconst handleInitModel = (\n state: IntermediateState,\n action: ReturnType<typeof initModels>,\n) => {\n const { payload } = action;\n for (const { key, model } of payload) {\n state[key] = {\n status: MODULARUI_STATUS.FINISHED,\n lastModification: Date.now(),\n model,\n };\n }\n};\n\nconst handleUpdateModel = (\n state: IntermediateState,\n action: ReturnType<typeof updateModel | typeof updateForm>,\n) => {\n const model = action.payload;\n const modelKey = Object.keys(state).find(\n (key) => state[key]?.model?.connectKey === model.connectKey,\n );\n\n if (modelKey && state[modelKey]) {\n state[modelKey].model = model;\n state[modelKey].lastModification = Date.now();\n state[modelKey].status = MODULARUI_STATUS.FINISHED;\n state[modelKey].error = undefined; // Clear error on successful update\n } else {\n console.debug(\n `ModularUIReducer: Cannot update model with key ${model.connectKey} - model not found in state.`,\n );\n }\n};\n\nconst handleRemoveModelByKey = (\n state: IntermediateState,\n action: ReturnType<typeof removeModelByKey>,\n) => {\n delete state[action.payload];\n};\n\nconst handleResetModularUI = (state: IntermediateState) => {\n for (const key in state) {\n if (!(state[key]?.model instanceof ApplicationModel)) {\n delete state[key];\n }\n }\n};\n\nconst handleFetchModelPending = (\n state: IntermediateState,\n action: ReturnType<typeof fetchModel.pending>,\n) => {\n const { key } = action.meta.arg; // Access original thunk arguments\n if (!state[key]) {\n state[key] = {\n model: undefined,\n status: MODULARUI_STATUS.LOADING,\n lastModification: Date.now(),\n error: undefined, // Clear error when starting new load\n };\n } else {\n state[key].status = MODULARUI_STATUS.LOADING;\n state[key].lastModification = Date.now();\n state[key].error = undefined; // Clear error when starting new load\n }\n};\n\nconst handleFetchModelFulfilled = (\n state: IntermediateState,\n action: ReturnType<typeof fetchModel.fulfilled>,\n) => {\n const { key, model, updateHandler } = action.payload;\n let finalModel = model;\n\n if (updateHandler) {\n // Apply update handler if provided\n finalModel = updateHandler(model);\n }\n\n state[key] = {\n model: finalModel,\n lastModification: Date.now(),\n status: MODULARUI_STATUS.FINISHED,\n error: undefined, // Clear error on success\n };\n};\n\nconst handleFetchModelRejected = (\n state: IntermediateState,\n action: ReturnType<typeof fetchModel.rejected>,\n) => {\n const { key } = action.meta.arg;\n const error = action.payload;\n\n if (!state[key]) {\n state[key] = {\n model: undefined,\n status: MODULARUI_STATUS.ERROR,\n lastModification: Date.now(),\n error: error,\n };\n } else {\n state[key].status = MODULARUI_STATUS.ERROR;\n state[key].lastModification = Date.now();\n state[key].error = error;\n }\n};\n\nexport const modularUIReducer = createReducer<ModularUIState>(\n initialState,\n (builder) => {\n builder\n .addCase(updateErrorStatus, handleUpdateErrorStatus)\n .addCase(setModel, handleSetModel)\n .addCase(initModels, handleInitModel)\n .addCase(updateModel, handleUpdateModel)\n .addCase(updateForm, handleUpdateModel)\n .addCase(removeModelByKey, handleRemoveModelByKey)\n .addCase(resetModularUI, handleResetModularUI)\n .addCase(fetchModel.pending, handleFetchModelPending)\n .addCase(fetchModel.fulfilled, handleFetchModelFulfilled)\n .addCase(fetchModel.rejected, handleFetchModelRejected);\n },\n);\n","export enum MODULARUI_STATUS {\n IDLE = \"IDLE\",\n LOADING = \"LOADING\",\n FINISHED = \"FINISHED\",\n ERROR = \"ERROR\",\n}\n","import { HTTP_METHODS } from \"@beinformed/ui/constants\";\nimport { ErrorResponse, Href } from \"@beinformed/ui/models\";\nimport { ModularUIRequest } from \"@beinformed/ui/modularui\";\nimport { createAsyncThunk } from \"@reduxjs/toolkit\";\n\nimport { handleError } from \"../error/errorActions\";\nimport { MODULARUI_STATUS } from \"./constants\";\nimport { removeModelByKey, updateErrorStatus } from \"./modelActions\";\nimport { getRequestLocale } from \"./utils\";\n\nimport type { BEIDispatch, RootState } from \"../store\";\nimport type { FetchModelPayload, FetchModelResult } from \"./types\";\n\nconst executeRequest = async (\n { key, href, options }: FetchModelPayload,\n {\n dispatch,\n getState,\n rejectWithValue,\n }: {\n dispatch: BEIDispatch;\n getState: () => RootState;\n rejectWithValue: (value: ErrorResponse) => unknown;\n },\n): Promise<FetchModelResult> => {\n try {\n const locale = getRequestLocale(options?.locale, getState().i18n.locale);\n\n const requestHref =\n href instanceof Href\n ? href\n : new Href(href, \"\", {\n origin: options?.origin,\n contextPath: options?.contextPath,\n });\n\n const modularuiRequest = new ModularUIRequest(requestHref, {\n method: options?.method || HTTP_METHODS.GET,\n params: options?.params || \"\",\n data: options?.data || null,\n locale: locale,\n childmodels: options?.childmodels ?? true,\n isReload: options?.isReload,\n cache: options?.cache,\n headers: options?.headers,\n events: options?.events,\n onProgress: options?.onProgress,\n origin: options?.origin,\n contextPath: options?.contextPath,\n targetModel: options?.targetModel,\n forceTargetModel: options?.forceTargetModel ?? false,\n timeout: options?.timeout,\n });\n\n const model = await modularuiRequest.fetch();\n\n if (model) {\n model.connectKey = key;\n }\n\n // Return data for the fulfilled action\n return {\n key,\n model,\n updateHandler: options?.updateHandler,\n };\n } catch (error: unknown) {\n const errorResponse = new ErrorResponse(error as Error, key, {\n origin: options?.origin,\n contextPath: options?.contextPath,\n });\n\n // Specific error handling for removing model on certain errors\n if (\n errorResponse.isChangePassword ||\n errorResponse.isResourceNotFoundAfterReload\n ) {\n dispatch(removeModelByKey(key));\n } else {\n dispatch(updateErrorStatus(key, errorResponse));\n }\n\n // Dispatch the global error handler\n dispatch(handleError(error));\n\n throw rejectWithValue(errorResponse);\n }\n};\n\nexport const fetchModel = createAsyncThunk<\n FetchModelResult, // Return type of the fulfilled action payload\n FetchModelPayload, // First argument to the thunk\n {\n dispatch: BEIDispatch;\n state: RootState;\n rejectValue: ErrorResponse; // Type of the error payload in case of rejection\n }\n>(\"modularui/fetchModel\", executeRequest, {\n condition: ({ key }, { getState }) => {\n if (getState().modularui[key]?.status === MODULARUI_STATUS.LOADING) {\n return false;\n }\n },\n});\n","import { IS_SERVER } from \"@beinformed/ui/constants\";\nimport { ErrorResponse } from \"@beinformed/ui/models\";\nimport { logoutPath } from \"@beinformed/ui/settings\";\n\nimport { saveChangePassword } from \"../auth/authReducer\";\nimport { handleUnauthorized } from \"../auth/unauthorizedActions\";\nimport { showXHRErrorNotification } from \"../notifications/notificationActions\";\nimport { push } from \"../router/routerActions\";\nimport { noAction } from \"../shared/actions\";\nimport { saveError } from \"./errorReducer\";\n\nimport type { BEIDispatch } from \"../store\";\n\ntype DefaultHandler = typeof defaultErrorResponseHandler;\n\n// Default handler\nconst defaultErrorResponseHandler =\n (error: ErrorResponse) => (dispatch: BEIDispatch) => {\n if (error.isResourceNotFoundAfterReload || error.isRemoteServiceException) {\n return dispatch(noAction());\n }\n\n if (error.isUnauthorized) {\n return dispatch(handleUnauthorized(error));\n }\n\n if (error.isBlocked || error.isConcurrentUser || error.isInvalidUsername) {\n dispatch(push(logoutPath()));\n return;\n }\n\n if (error.isChangePassword) {\n return dispatch(saveChangePassword());\n }\n\n if (IS_SERVER) {\n return dispatch(saveError(error));\n }\n\n // This setTimeout might hide errors from Sentry/monitoring tools\n setTimeout(() => {\n throw error.error || error;\n });\n\n return dispatch(showXHRErrorNotification(error));\n };\n\ntype CustomErrorResponseHandler = (\n error: ErrorResponse,\n defaultHandler: DefaultHandler,\n) => (dispatch: BEIDispatch) => void;\n\nlet customErrorResponseHandler: CustomErrorResponseHandler =\n (error, defaultHandler) => (dispatch) =>\n dispatch(defaultHandler(error));\n\nexport const setCustomErrorResponseHandler = (\n handler: CustomErrorResponseHandler,\n) => {\n customErrorResponseHandler = handler;\n};\n\nexport const handleError = (error: unknown) => {\n // Ensure the error is an ErrorResponse if possible, otherwise create one.\n const errorResponse =\n error instanceof ErrorResponse ? error : new ErrorResponse(error as Error);\n\n // Dispatch the default handler or custom handler\n return customErrorResponseHandler(errorResponse, defaultErrorResponseHandler);\n};\n","import { getBooleanSetting, getStringSetting } from \"@beinformed/ui/settings\";\nimport { Cache } from \"@beinformed/ui/utils\";\nimport { createAsyncThunk } from \"@reduxjs/toolkit\";\n\nimport { reloadApplication } from \"../application/applicationActions\";\nimport { getApplication } from \"../application/applicationSelectors\";\nimport { removeModelByKey } from \"../modularui/modelActions\";\nimport { replace } from \"../router/routerActions\";\nimport { logoutSuccess, sendAuthenticationError } from \"./authReducer\";\n\nimport type { ErrorResponse } from \"@beinformed/ui/models\";\nimport type { BEIDispatch, RootState } from \"../store\";\n\nexport const handleUnauthorized = createAsyncThunk<\n void,\n ErrorResponse,\n { state: RootState; dispatch: BEIDispatch }\n>(\"auth/unauthorized\", (errorResponse, { dispatch, getState }) => {\n if (errorResponse.connectKey) {\n dispatch(removeModelByKey(errorResponse.connectKey));\n }\n\n if (\n getBooleanSetting(\"PAGE_RELOAD_ON_UNAUTHORIZED_ERROR\", false) &&\n errorResponse.response\n ) {\n window.location.reload();\n return;\n }\n\n // reload application when flag auth is set or isLogged\n const application = getApplication(getState());\n if (Cache.getItem(\"auth\") || application?.isLoggedIn) {\n dispatch(reloadApplication());\n }\n\n // set logged out\n dispatch(logoutSuccess());\n\n Cache.removeItem(\"auth\");\n\n if (errorResponse.isInvalidUsername) {\n dispatch(sendAuthenticationError(errorResponse.message || \"\"));\n }\n\n // add current location as from location before redirect\n const location = getState().router.location;\n const LOGIN_PATH = getStringSetting(\"LOGIN_PATH\", \"/signin\");\n if (location?.pathname !== LOGIN_PATH) {\n const locationFrom = location?.state?.from;\n dispatch(\n replace(LOGIN_PATH, {\n from: locationFrom ? locationFrom : getState().router.location,\n // cannot open login in a modal, because of previous locations that might be secure\n modal: false,\n }),\n );\n }\n});\n","import { ApplicationModel, Href } from \"@beinformed/ui/models\";\nimport { createAsyncThunk } from \"@reduxjs/toolkit\";\n\nimport { getLocale } from \"../i18n/i18nSelectors\";\nimport { fetchModel } from \"../modularui/fetchModel\";\nimport { removeModelByKey } from \"../modularui/modelActions\";\nimport { allKeysByHref } from \"../shared/selectors\";\nimport { getApplication } from \"./applicationSelectors\";\n\nimport type { BEIDispatch, RootState } from \"../store\";\n\nexport const reloadApplication = createAsyncThunk<\n void,\n void,\n { dispatch: BEIDispatch; state: RootState; extra: unknown }\n>(\"application/reload\", async (_, { dispatch, getState }) => {\n const state = getState();\n\n const applicationHref = new Href(\"/\", \"Application\");\n\n const application = getApplication(state);\n if (application) {\n if (application.contextPath) {\n applicationHref.contextPath = application.contextPath;\n }\n if (application.origin) {\n applicationHref.origin = application.origin;\n }\n }\n\n const allKeys = allKeysByHref(state, applicationHref);\n for (const key of allKeys) {\n dispatch(removeModelByKey(key));\n }\n\n const locale = getLocale(state);\n const modelKey = `application(/)(${locale}`;\n\n await dispatch(\n fetchModel({\n key: modelKey,\n href: applicationHref,\n options: {\n targetModel: ApplicationModel,\n },\n }),\n );\n});\n","import type { Locales } from \"../../i18n/Locales\";\nimport type { RootState } from \"../store\";\n\n/**\n * Retrieve the locale from state\n */\nexport const getLocale = (state: RootState) => {\n return state.i18n?.locale ?? \"en\";\n};\n\n/**\n * Retrieve all available locales in the store\n */\nexport const getLocales = (state: RootState): Locales => state.i18n.locales;\n","import { createAction } from \"@reduxjs/toolkit\";\n\nimport type { ErrorResponse, ModularUIModel } from \"@beinformed/ui/models\";\n\nexport const updateErrorStatus = createAction(\n \"MODULARUI/ERROR_STATUS\",\n (key: string, error: ErrorResponse) => {\n return {\n payload: {\n key,\n error,\n },\n };\n },\n);\n\nexport const setModel = createAction(\n \"MODULARUI/SET\",\n (key: string, model: ModularUIModel) => {\n model.connectKey = key;\n return {\n payload: {\n key,\n model,\n },\n };\n },\n);\n\nexport const initModels = createAction(\n \"MODULARUI/INIT\",\n (models: { key: string; model: ModularUIModel }[]) => {\n return {\n payload: models,\n };\n },\n);\n\nexport const updateModel = createAction(\n \"MODULARUI/UPDATE\",\n (model: ModularUIModel) => {\n return {\n payload: model,\n };\n },\n);\n\nexport const updateForm = createAction(\n \"MODULARUI/UPDATE_FORM\",\n (model: ModularUIModel) => {\n return {\n payload: model,\n };\n },\n);\n\nexport const removeModelByKey = createAction(\n \"MODULARUI/REMOVE_KEY\",\n (key: string) => {\n return {\n payload: key,\n };\n },\n);\n\n/**\n * Removes all models except the application model from the modular ui reducer\n */\nexport const resetModularUI = createAction(\"MODULARUI/RESET\");\n","import { Href } from \"@beinformed/ui/models\";\n\nimport type { RootState } from \"../store\";\n\nexport const getFirstModelByInstance = <\n T extends new (...args: unknown[]) => unknown,\n>(\n state: RootState,\n instance: T,\n): InstanceType<T> | undefined => {\n const locale = state.i18n.locale || \"en\";\n const modularui = state.modularui;\n\n if (modularui) {\n const key = Object.keys(modularui).find((key) => {\n const modelEntry = modularui[key];\n if (!modelEntry?.model) {\n return false;\n }\n return (\n modelEntry.model instanceof instance &&\n modelEntry.model.locale === locale\n );\n });\n\n if (key) {\n const modelEntry = modularui[key];\n if (modelEntry?.model instanceof instance) {\n return modelEntry.model as InstanceType<T>;\n }\n }\n }\n\n return undefined;\n};\n\n/**\n * Returns all model keys found in the store, restrict on href\n */\nexport const allKeysByHref = (state: RootState, href: Href | string) => {\n if (state && state.modularui) {\n const findHref = href instanceof Href ? href : new Href(href);\n\n return Object.keys(state.modularui).filter((key) => {\n const modelEntry = state.modularui[key];\n if (modelEntry) {\n return modelEntry.model?.selfhref?.equals(findHref);\n }\n });\n }\n\n return [];\n};\n","import { ApplicationModel } from \"@beinformed/ui/models\";\n\nimport type { RootState } from \"../store\";\n\n/**\n * Get the application model, which is the model with selfhref '/'\n */\nexport const getApplication = (state: RootState) => {\n const locale = state.i18n.locale || \"en\";\n const modularui = state.modularui;\n\n if (modularui) {\n const key = Object.keys(modularui).find((key) => {\n const modelEntry = modularui[key];\n if (!modelEntry?.model) {\n return false;\n }\n return (\n modelEntry.model instanceof ApplicationModel &&\n modelEntry.model.locale === locale\n );\n });\n\n if (key) {\n return modularui[key] as unknown as ApplicationModel;\n }\n }\n\n return undefined;\n};\n","import { createAction } from \"@reduxjs/toolkit\";\n\nexport const noAction = createAction(\"NO_ACTION\");\n","/**\n * Retrieve the preferred language for this request, falls back to the browser language or english\n */\nexport const getRequestLocale = (\n optionLocale: string | undefined,\n currentStateLocale: string,\n) => {\n if (optionLocale) {\n return optionLocale;\n }\n\n if (typeof navigator !== \"undefined\" && navigator?.language) {\n return navigator.language.split(\"-\")[0] || currentStateLocale;\n }\n\n return currentStateLocale;\n};\n","import { createReducer } from \"@reduxjs/toolkit\";\n\nimport { fetchModel } from \"../modularui/fetchModel\";\nimport {\n finishProgress,\n resetProgress,\n startProgress,\n updateProgress,\n} from \"./progressIndicatorActions\";\n\nimport type { WritableDraft } from \"immer\";\n\nexport interface ProgressIndicatorState {\n count: number;\n timestamp: number;\n percentComplete: number;\n}\n\ntype IntermediateState = WritableDraft<ProgressIndicatorState>;\n\nconst initialState = {\n count: 0,\n timestamp: 0,\n percentComplete: 0,\n};\n\nconst handleStartProgress = (state: IntermediateState) => {\n return {\n ...state,\n count: state.count + 1,\n };\n};\n\nconst handleEndProgress = (state: IntermediateState) => {\n const isFinalFinish = state.count - 1 === 0;\n return {\n ...state,\n count: state.count <= 0 ? 0 : state.count - 1,\n timestamp: isFinalFinish ? Date.now() : state.timestamp,\n percentComplete: isFinalFinish ? 0 : state.percentComplete,\n };\n};\n\nconst handleRejectedProgress = (state: IntermediateState) => {\n return {\n ...state,\n count: 0,\n timestamp: Date.now(),\n percentComplete: 0,\n };\n};\n\nexport const progressIndicatorReducer = createReducer<ProgressIndicatorState>(\n initialState,\n (builder) => {\n builder\n .addCase(startProgress, handleStartProgress)\n .addCase(finishProgress, handleEndProgress)\n .addCase(resetProgress, (state) => {\n return {\n ...state,\n count: 0,\n };\n })\n .addCase(updateProgress, (state, action) => {\n return {\n ...state,\n percentComplete: action.payload?.percentComplete,\n };\n })\n .addCase(fetchModel.pending, handleStartProgress)\n .addCase(fetchModel.fulfilled, handleEndProgress)\n .addCase(fetchModel.rejected, handleRejectedProgress);\n },\n);\n","// routerMiddleware.ts (updated based on your routerActions.ts)\n\nimport { go, goBack, goForward, push, replace } from \"./routerActions\"; // Correct path to routerActions.ts\n\nimport type { Middleware } from \"@reduxjs/toolkit\";\nimport type { History } from \"history\";\nimport type { RootState } from \"../store\";\n\nexport const routerMiddleware = (\n history: History,\n // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n): Middleware<{}, RootState> => {\n return (_storeApi) => (next) => (action: unknown) => {\n if (push.match(action)) {\n const { location, state } = action.payload; // TypeScript now knows 'action' is PushAction\n history.push(location, state);\n } else if (replace.match(action)) {\n const { location, state } = action.payload;\n history.replace(location, state);\n } else if (go.match(action)) {\n const { delta } = action.payload;\n history.go(delta);\n } else if (goBack.match(action)) {\n history.goBack();\n } else if (goForward.match(action)) {\n history.goForward();\n }\n\n return next(action);\n };\n};\n","import { setSettings } from \"@beinformed/ui/settings\";\nimport flattenDeep from \"lodash/flattenDeep\";\nimport isPlainObject from \"lodash/isPlainObject\";\n\nimport type { DefaultTheme } from \"styled-components\";\n\nconst replacePlaceholders = (inputTheme: DefaultTheme): DefaultTheme => {\n const possibleKeys = Object.keys(inputTheme)\n .map((key) => `\\\\b${key}\\\\b`)\n .join(\"|\");\n\n const re = new RegExp(`\\\\$(${possibleKeys})`, \"g\");\n Object.entries(inputTheme).forEach(([key, value]) => {\n if (key !== \"settings\" && typeof value === \"string\") {\n inputTheme[key] = value.replace(re, (match, capture) => {\n const replacement = inputTheme[capture];\n return typeof replacement === \"string\" ? replacement : match;\n });\n }\n });\n\n return inputTheme;\n};\n\nconst generateTheme = (\n storedTheme: DefaultTheme | null | undefined,\n ...themeElements: (DefaultTheme | ((theme: DefaultTheme) => DefaultTheme))[]\n): DefaultTheme => {\n const storedSettings = storedTheme?.settings ?? {};\n\n let generatedTheme: DefaultTheme = { settings: {} };\n\n for (const element of themeElements) {\n if (typeof element === \"function\") {\n generatedTheme = element(replacePlaceholders(generatedTheme));\n } else if (isPlainObject(element)) {\n const generatedSettings = generatedTheme.settings ?? {};\n\n // Type assertion is less critical here if DefaultTheme is well-defined\n generatedTheme = {\n ...generatedTheme,\n ...(element as DefaultTheme),\n ...(storedTheme as DefaultTheme),\n };\n\n if (\"settings\" in element && typeof element.settings === \"object\") {\n generatedTheme.settings = {\n ...generatedSettings,\n ...(element.settings as Record<string, string>), // Adjusted to Record<string, string> based on your DefaultTheme\n ...storedSettings,\n };\n }\n }\n }\n\n return replacePlaceholders(generatedTheme);\n};\n\n/**\n * Create a theme from multiple theme configuration objects.\n * Properties are overwritten by iterating the configuration objects from left to right.\n *\n * The first argument represents a stored theme part, this is optional. The stored theme part will overwrite every part in the collection of theme parts.\n * Thus a stored configuration is leading as it can be configured by a modeller through the repository.\n *\n * Placeholders can be used, they are replaced before calling a function theme part or at the end of the theme creation.\n *\n * Both objects and function can be used, where a function receives the previous objects as input arguments.\n * For example using the method createTheme(ThemeObject, ThemeObject2, ThemeFunction, ThemeFunction2), will be handled as:\n *\n * ThemeFunction2(ThemeFunction1({ ...ThemeObject, ...ThemeObject2 }))\n *\n * @example\n * Example where the primary color of the default theme is overwritten with a primary color of the custom theme,\n * but the button bg still uses the yiq function of the default theme:\n *\n * const DefaultTheme = {\n * PRIMARY_COLOR: \"#0000ff\",\n * SECONDARY_COLOR: \"#00ff00\",\n * BUTTON_COLOR: \"$PRIMARY_COLOR\"\n * }\n *\n * const createDefaultTheme = (input) => ({\n * ...input,\n * BUTTON_BG: getContrastYIQ(input.BUTTON_COLOR)\n * })\n *\n * const CustomTheme = {\n * PRIMARY_COLOR: \"#ff0000\"\n * }\n *\n * createTheme(null, DefaultTheme, CustomTheme, createDefaultTheme);\n *\n * // Result:\n * {\n * PRIMARY_COLOR: \"#ff0000\",\n * BUTTON_COLOR: \"#ff0000\",\n * BUTTON_BG: \"#fff\",\n * SECONDARY_COLOR: \"#00ff00\",\n * }\n */\nexport const createTheme = (\n storedTheme: DefaultTheme | null | undefined,\n ...themeConfigs: (\n | DefaultTheme\n | (DefaultTheme | ((theme: DefaultTheme) => DefaultTheme))[]\n | ((theme: DefaultTheme) => DefaultTheme)\n | undefined\n )[]\n): DefaultTheme => {\n const flattenConfig = flattenDeep<\n | DefaultTheme\n | DefaultTheme[]\n | ((theme: DefaultTheme) => DefaultTheme)\n | undefined\n >(themeConfigs).filter((el) => el != null);\n\n const customTheme = generateTheme(storedTheme, ...flattenConfig);\n\n if (customTheme?.settings) {\n setSettings(customTheme.settings);\n }\n\n return customTheme;\n};\n","import { HelmetProvider } from \"@dr.pogodin/react-helmet\";\nimport { Provider } from \"react-redux\";\nimport { Router } from \"react-router\";\n\nimport { ErrorBoundary } from \"../components/ErrorBoundary\";\nimport { ThemeProvider } from \"../theme/ThemeProvider\";\n\nimport type { History as RouterHistory } from \"history\";\nimport type { ComponentType, ReactNode } from \"react\";\nimport type { ErrorBoundaryFallbackProps } from \"../components/ErrorBoundaryFallback\";\nimport type { BEIStore } from \"../redux/store\";\nimport type { Theme } from \"../theme/types\";\n\ninterface Props {\n store: BEIStore;\n routerHistory: RouterHistory;\n theme?: Theme | Theme[];\n children: ReactNode;\n ErrorFallbackComponent?: ComponentType<ErrorBoundaryFallbackProps>;\n}\n\nexport const Init = ({\n store,\n routerHistory,\n theme,\n children,\n ErrorFallbackComponent,\n}: Props): ReactNode => (\n <Provider store={store}>\n <ThemeProvider theme={theme}>\n <HelmetProvider>\n <ErrorBoundary FallbackComponent={ErrorFallbackComponent}>\n <Router history={routerHistory}>{children}</Router>\n </ErrorBoundary>\n </HelmetProvider>\n </ThemeProvider>\n </Provider>\n);\n\nInit.displayName = \"BEI.Init\";\n","import { Component } from \"react\";\n\nimport { ErrorBoundaryFallback } from \"./ErrorBoundaryFallback\";\n\nimport type { ComponentType, ReactNode } from \"react\";\nimport type { ErrorBoundaryFallbackProps } from \"./ErrorBoundaryFallback\";\n\nexport interface ErrorBoundaryProps {\n children: ReactNode;\n FallbackComponent: ComponentType<ErrorBoundaryFallbackProps>;\n}\n\ninterface ErrorInfo {\n componentStack: string;\n}\n\ninterface State {\n error: Error | null;\n errorInfo: ErrorInfo | null;\n}\n\nexport class ErrorBoundary extends Component<ErrorBoundaryProps, State> {\n static displayName = \"\";\n static defaultProps: {\n FallbackComponent: ComponentType<ErrorBoundaryFallbackProps>;\n } = {\n FallbackComponent: ErrorBoundaryFallback,\n };\n\n override state: State = {\n error: null,\n errorInfo: null,\n };\n\n override componentDidCatch(error: Error, errorInfo: ErrorInfo): void {\n this.setState({ error, errorInfo });\n }\n\n override render() {\n const { children, FallbackComponent } = this.props; // NOSONAR\n const { error, errorInfo } = this.state;\n\n if (error != null) {\n return (\n <FallbackComponent\n componentStack={errorInfo ? errorInfo.componentStack : \"\"}\n error={error}\n />\n );\n }\n\n return children ?? null;\n }\n}\nErrorBoundary.displayName = \"BI.ErrorBoundary\";\n","import styled from \"styled-components\";\n\nimport { spacer, spacers } from \"../theme/utils/spacers\";\n\nimport type { ReactNode } from \"react\";\n\nexport interface ErrorBoundaryFallbackProps {\n className?: string;\n componentStack: string;\n error: Error;\n}\n\nconst StyledBoundary = styled.div`\n padding: ${spacers(2, 1)};\n margin-bottom: ${spacer(2)};\n background-color: #e9ecef;\n border-radius: 0.3em;\n`;\n\nconst StyledStack = styled.pre`\n display: block;\n font-size: 87.5%;\n color: #212529;\n font-style: italic;\n`;\n\nexport const ErrorBoundaryFallback = ({\n className,\n componentStack,\n error,\n}: ErrorBoundaryFallbackProps): ReactNode => (\n <StyledBoundary className={className}>\n <h2>{error.toString()}</h2>\n <StyledStack className=\"debug\">{componentStack}</StyledStack>\n </StyledBoundary>\n);\n\nErrorBoundaryFallback.displayName = \"BI.ErrorBoundaryFallback\";\n","import Big from \"big.js\";\n\nimport type { Theme, UtilThemeProps } from \"../types\";\n\nconst getSize = (\n theme: Theme,\n ratio: number | string = 1,\n path = \"SPACER\",\n unit = \"rem\",\n) => {\n if (typeof ratio === \"string\") {\n return ratio;\n }\n\n if (typeof ratio === \"number\") {\n if (typeof theme[path] === \"number\") {\n const size = Big(ratio).times(theme[path] as number);\n return `${size}${unit}`;\n }\n throw new Error(`Size ${path} must be a number`);\n }\n\n throw new Error(`Ratio ${JSON.stringify(ratio)} must be a string or number`);\n};\n\n/*\n * Render spacers based on the given ratio * theme SPACER\n */\nconst spacer =\n (ratio: number | string = 1) =>\n ({ theme }: { theme: Theme }) =>\n getSize(theme, ratio);\n\n/*\n * Render spacers based on the given ratio * theme SPACER\n * Ratio's can be given clockwise with shorthand,\n * spacers(0.5, 1) with a spacer of 0.8 will give \"0.4rem 1rem\";\n */\nconst spacers =\n (...ratios: (number | \"auto\")[]) =>\n ({ theme }: { theme: Theme }) =>\n ratios.map((ratio) => getSize(theme, ratio)).join(\" \");\n\n/*\n * Render a gutter based on GUTTER property\n */\nconst gutter =\n (ratio: number | string = 1): ((arg0: UtilThemeProps) => string) =>\n ({ theme }: { theme: Theme }) =>\n getSize(theme, ratio, \"GRID_GUTTER\", \"px\");\n\nexport { spacer, spacers, gutter };\n","import { ThemeProvider as SCThemeProvider } from \"styled-components\";\n\nimport { useBEISelector } from \"../redux/hooks\";\nimport { createTheme } from \"./createTheme\";\n\nimport type { ReactNode } from \"react\";\nimport type { RootState } from \"../redux/store\";\nimport type { Theme } from \"./types\";\n\nexport interface Props {\n theme?: Theme | Theme[];\n children: ReactNode;\n}\n\nexport const ThemeProvider = ({ theme, children }: Props): ReactNode => {\n const storedTheme = useBEISelector<RootState, Theme | undefined>(\n (state) => state.preferences.theme,\n );\n const finalTheme = createTheme(storedTheme, theme);\n\n return <SCThemeProvider theme={finalTheme}>{children}</SCThemeProvider>;\n};\nThemeProvider.displayName = \"BI.ThemeProvider\";\n","// eslint-disable-next-line no-restricted-imports\nimport { useDispatch, useSelector, useStore } from \"react-redux\";\n\nimport type { BEIDispatch, BEIStore, RootState } from \"./store\";\n\n// Use throughout the library instead of plain `useDispatch` and `useSelector`\nexport const useBEIDispatch = useDispatch.withTypes<BEIDispatch>();\nexport const useBEISelector = useSelector.withTypes<RootState>();\nexport const useBEIStore = useStore.withTypes<BEIStore>();\n","import type { WindowWithContext } from \"./types\";\n\ndeclare let __webpack_public_path__: string;\ndeclare let __webpack_nonce__: string;\n\n(function x() {\n const dataElement = document.querySelector(\n 'script[type=\"application/json\"][data-app-state=\"app-json\"]',\n );\n if (!dataElement) {\n throw new Error(\n \"Error finding script with attribute app-json to retrieve context path in html\",\n );\n }\n\n const contextPath = dataElement.getAttribute(\"data-app-contextpath\");\n if (contextPath) {\n (window as WindowWithContext).contextPath = contextPath;\n }\n\n if (typeof __webpack_public_path__ !== \"undefined\") {\n const filePath = dataElement.getAttribute(\"data-app-filepath\");\n if (filePath && filePath !== \"{FILEPATH}\") {\n __webpack_public_path__ = `${filePath}/`; // NOSONAR\n } else if (contextPath) {\n __webpack_public_path__ = `${contextPath}/`; // NOSONAR\n }\n }\n\n const nonce = dataElement.getAttribute(\"data-app-nonce\");\n if (nonce) {\n __webpack_nonce__ = nonce; // NOSONAR\n }\n})();\n\nexport {};\n","import { useEffect, useState } from \"react\";\n\nimport { HTTP_METHODS } from \"@beinformed/ui/constants\";\nimport { FormModel, ListModel } from \"@beinformed/ui/models\";\n\nimport { useModularUIRequest } from \"./useModularUIRequest\";\n\nimport type { ActionModel, DetailModel, TabModel } from \"@beinformed/ui/models\";\n\nexport const useRetrieveFormsOnModel = (\n model: ListModel | DetailModel | TabModel,\n) => {\n const modularui = useModularUIRequest();\n\n const [forms, setForms] = useState(null);\n const [requestCount, setRequestCount] = useState(0);\n const [responseCount, setResponseCount] = useState(0);\n\n useEffect(() => {\n const requests = getActions(model).map((action) => {\n const href = action.selfhref.addParameter(\"commit\", \"false\");\n\n return modularui(href, { method: HTTP_METHODS.POST })\n .fetch()\n .then((form) => {\n if (form instanceof FormModel) {\n form.tokens = [];\n }\n return { [action.name]: form };\n });\n });\n\n setRequestCount(requests.length);\n\n Promise.all(requests).then((responses) => {\n // put response array in object\n const actionForms = Object.assign({}, ...responses);\n setForms(actionForms);\n setResponseCount(responses.length);\n });\n }, [model, modularui]);\n\n if (responseCount === requestCount) {\n return forms;\n }\n\n return null;\n};\n\nconst getActions = (model: ListModel | DetailModel | TabModel) => {\n if (!model.actionCollection) {\n return [];\n }\n\n const createActions = model.actionCollection\n .getActionsByType(\"create\")\n .filter((action) => !action.isDisabled);\n\n const allActions = [...createActions];\n\n if (model instanceof ListModel) {\n model.listItemCollection.forEach((listItem) => {\n const updateActions = listItem.actionCollection\n .getActionsByType(\"update\")\n .filter((action) => !action.isDisabled);\n\n allActions.push(...updateActions);\n });\n }\n\n const actions: ActionModel[] = [];\n const unique: string[] = [];\n allActions.forEach((action) => {\n if (!unique.includes(action.name)) {\n unique.push(action.name);\n actions.push(action);\n }\n });\n\n return actions;\n};\n","import { ModularUIRequest } from \"@beinformed/ui/modularui\";\nimport { createSelector } from \"reselect\";\n\nimport { useBEISelector } from \"../redux/hooks\";\nimport { getLocale } from \"../redux/i18n/i18nSelectors\";\n\nimport type { Href } from \"@beinformed/ui/models\";\nimport type { ModularUIRequestOptions } from \"@beinformed/ui/utils\";\n\nconst getModularUIRequest = createSelector([getLocale], (localeCode) => {\n return (href: Href, options?: ModularUIRequestOptions) => {\n const request = new ModularUIRequest(href, options);\n request.locale = localeCode;\n return request;\n };\n});\n\n/**\n * Creates a ModularUIRequest with the locale as available in the redux store\n */\nexport const useModularUIRequest = (): ((\n href: Href,\n options?: ModularUIRequestOptions,\n) => ModularUIRequest) => useBEISelector(getModularUIRequest);\n","import { DEFAULT_AUTHENTICATION_TYPE } from \"@beinformed/ui/constants\";\nimport { IllegalStateException } from \"@beinformed/ui/exceptions\";\nimport { getContextPathServer, logoutPath } from \"@beinformed/ui/settings\";\nimport { Cache } from \"@beinformed/ui/utils\";\n\nimport { getApplication } from \"../redux/application/applicationSelectors\";\nimport { resetAuthErrors } from \"../redux/auth/authReducer\";\nimport { login } from \"../redux/auth/signinActions\";\nimport { logout } from \"../redux/auth/signoutActions\";\nimport { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\n\nimport type { AuthenticationType } from \"@beinformed/ui/modularui\";\nimport type { RootState } from \"../redux/store\";\n\n/**\n * Provides access to authentication state and actions.\n * Includes functionality for standard username/password login and redirect-based login.\n * @returns An object containing authentication status, available authentication types, error messages, and login/logout functions.\n */\nexport const useLogin = () => {\n Cache.setItem(\"isRedirectLogin\", false);\n\n const dispatch = useBEIDispatch();\n\n const application = useBEISelector(getApplication);\n const auth = useBEISelector((state: RootState) => state.auth);\n\n const isAuthenticated = application?.isLoggedIn ?? false;\n\n return {\n /**\n * Indicates whether the user is currently authenticated.\n */\n isAuthenticated,\n\n /**\n * An array of available authentication types supported by the application.\n * Defaults to an array containing the `DEFAULT_AUTHENTICATION_TYPE` if no types are available in the application state.\n */\n authenticationTypes: application?.authenticationTypes ?? [\n DEFAULT_AUTHENTICATION_TYPE,\n ],\n\n /**\n * The current authentication error message, if any.\n */\n errorMessage: auth.error,\n\n /**\n * Resets the authentication error message in the Redux store.\n */\n resetErrors: () => dispatch(resetAuthErrors()),\n\n /**\n * Attempts to log in the user with the provided username and password.\n * Dispatches the `login` action to the Redux store.\n * @param username The username for authentication.\n * @param password The password for authentication.\n */\n login: (username: string, password: string) =>\n dispatch(login({ username, password })),\n\n /**\n * Initiates a redirect-based login flow for a specific authentication type.\n * If a redirect login is already in progress, it throws an `IllegalStateException` to prevent infinite loops.\n * If the user is not currently authenticated, it sets a flag in the cache and redirects the browser to the authentication provider's redirect URI.\n * @param authenticationType The authentication type to initiate the redirect for.\n * @throws {IllegalStateException} If a redirect login is already in progress for a different authentication type.\n */\n redirectLogin: (authenticationType: AuthenticationType) => {\n if (Cache.getItem(\"isRedirectLogin\")) {\n // prevent endless loop in redirects when authentication type can't be redirected\n throw new IllegalStateException(\n `Could not redirect to '${\n authenticationType.authentication\n }' using url: '${authenticationType.redirectUri ?? \"\"}'`,\n );\n }\n\n if (!isAuthenticated) {\n Cache.setItem(\"isRedirectLogin\", true);\n window.location.assign(\n `${getContextPathServer()}${authenticationType.redirectUri ?? \"\"}`,\n );\n }\n },\n };\n};\n\n/**\n * Provides access to logout functionality.\n * Handles both standard logout and redirect-based logout scenarios.\n * @returns An object containing the authentication status, available authentication types, and the logout function.\n */\nexport const useLogout = () => {\n const dispatch = useBEIDispatch();\n const application = useBEISelector(getApplication);\n\n const LOGOUT_PATH = logoutPath();\n const BASE_PATH = getContextPathServer();\n\n const isAuthenticated = application?.isLoggedIn ?? false;\n return {\n /**\n * Indicates whether the user is currently authenticated.\n */\n isAuthenticated,\n\n /**\n * An array of available authentication types supported by the application.\n * Defaults to an array containing the `DEFAULT_AUTHENTICATION_TYPE` if no types are available in the application state.\n */\n authenticationTypes: application?.authenticationTypes ?? [\n DEFAULT_AUTHENTICATION_TYPE,\n ],\n\n /**\n * Initiates the logout process.\n * If a redirect login was in progress, it redirects the user to the server's logout endpoint with a return URL to the current origin.\n * Otherwise, it dispatches the `logout` action to the Redux store.\n */\n logout: () => {\n if (Cache.getItem(\"isRedirectLogin\")) {\n const origin = window.location.origin;\n const url = `${origin}${BASE_PATH}/logout?url=${origin}${BASE_PATH}${LOGOUT_PATH}`;\n Cache.setItem(\"isRedirectLogin\", false);\n window.location.assign(url);\n } else {\n return dispatch(logout());\n }\n },\n };\n};\n","import { CHANGEPASSWORD_PATH } from \"@beinformed/ui/constants\";\nimport { Authenticate } from \"@beinformed/ui/modularui\";\nimport { Cache } from \"@beinformed/ui/utils\";\nimport { createAsyncThunk } from \"@reduxjs/toolkit\";\n\nimport { reloadApplication } from \"../application/applicationActions\";\nimport { getApplication } from \"../application/applicationSelectors\";\nimport {\n finishProgress,\n startProgress,\n} from \"../progressindicator/progressIndicatorActions\";\nimport { push } from \"../router/routerActions\";\nimport { loginSuccess, sendAuthenticationError } from \"./authReducer\";\n\nimport type { PayloadAction } from \"@reduxjs/toolkit\";\nimport type { LocationState } from \"history\";\nimport type { RouterLocation } from \"../router/routerReducer\";\nimport type { BEIDispatch, RootState } from \"../store\";\n\nexport const loginFailed = (errorMessage: string) =>\n sendAuthenticationError(errorMessage);\n\nexport const changePassword = createAsyncThunk<\n PayloadAction<{ location: string | RouterLocation; state: LocationState }>,\n void,\n { state: RootState }\n>(\"auth/change_pass\", (_, { getState }) => {\n const isModal = getState().router.location?.state?.modal;\n const locationFrom = getState().router.location?.state?.from;\n return push(CHANGEPASSWORD_PATH, {\n from: locationFrom ? locationFrom : getState().router.location,\n modal: isModal,\n });\n});\n\nexport const login = createAsyncThunk<\n void,\n { username: string; password: string },\n { state: RootState; dispatch: BEIDispatch }\n>(\"auth/login\", async ({ username, password }, { dispatch, getState }) => {\n dispatch(startProgress());\n\n try {\n await new Authenticate().login(username, password);\n await dispatch(reloadApplication());\n\n Cache.addItem(\"auth\", true);\n const application = getApplication(getState());\n if (application?.userMustChangePassword) {\n dispatch(changePassword());\n } else {\n dispatch(loginSuccess());\n }\n dispatch(finishProgress());\n } catch (error) {\n if (\n typeof error === \"object\" &&\n error != null &&\n \"id\" in error &&\n typeof error.id === \"string\"\n ) {\n if (error.id === \"Error.ChangePasswordRequired\") {\n Cache.addItem(\"auth\", true);\n await dispatch(reloadApplication());\n dispatch(changePassword());\n } else {\n dispatch(loginFailed(error.id));\n }\n } else if (error instanceof Error) {\n dispatch(loginFailed(error.message));\n }\n\n dispatch(finishProgress());\n }\n});\n","import { Authenticate } from \"@beinformed/ui/modularui\";\nimport { createAsyncThunk } from \"@reduxjs/toolkit\";\n\nimport { reloadApplication } from \"../application/applicationActions\";\nimport { resetModularUI } from \"../modularui/modelActions\";\nimport {\n finishProgress,\n startProgress,\n} from \"../progressindicator/progressIndicatorActions\";\nimport { logoutSuccess } from \"./authReducer\";\n\nimport type { BEIDispatch } from \"../store\";\n\nexport const logout = createAsyncThunk<void, void, { dispatch: BEIDispatch }>(\n \"auth/logout\",\n async (_, { dispatch }) => {\n dispatch(startProgress());\n\n await new Authenticate().logout();\n\n dispatch(resetModularUI());\n dispatch(reloadApplication());\n\n dispatch(logoutSuccess());\n dispatch(finishProgress());\n },\n);\n","import { useEffect, useState } from \"react\";\n\nimport { ModularUIRequest } from \"@beinformed/ui/modularui\";\n\nimport { useLocale } from \"../hooks/useI18n\";\nimport { useProgressIndicator } from \"../hooks/useProgressIndicator\";\n\nimport type {\n ContentModel,\n Href,\n SourceReferenceCollection,\n} from \"@beinformed/ui/models\";\n\n/**\n * Hook to retrieve multiple source references at once\n */\nexport const useContentFromSourceReferences = (\n sourceReferences: SourceReferenceCollection,\n renderChildSections: boolean,\n): ContentModel[] => {\n const [content, setContent] = useState<ContentModel[]>([]);\n const localeCode = useLocale();\n\n const { start, finish } = useProgressIndicator();\n\n const hrefs = sourceReferences\n .map((sourceReference) => sourceReference.link?.selfhref.href)\n .filter((href, index, self) => self.indexOf(href) === index)\n .map((href) => href?.toString());\n\n const allHrefs = JSON.stringify(hrefs);\n useEffect(() => {\n const requests = JSON.parse(allHrefs).map((href: Href) => {\n const modularuiRequest = new ModularUIRequest(href);\n modularuiRequest.locale = localeCode;\n return modularuiRequest.fetchContent(renderChildSections);\n });\n\n start();\n Promise.all(requests).then((responseContent) => {\n setContent(responseContent);\n finish();\n });\n\n // start and finish don't change\n }, [allHrefs, localeCode, renderChildSections]);\n\n return content;\n};\n","import memoize from \"lodash/memoize\";\nimport { createSelector } from \"reselect\";\n\nimport { useBEISelector } from \"../redux/hooks\";\nimport { getLocale, getLocales } from \"../redux/i18n/i18nSelectors\";\n\nimport type { MessageParameters } from \"@beinformed/ui/types\";\nimport type { RootState } from \"../redux/store\";\n\nconst getMessage = createSelector(\n [getLocales, getLocale],\n (locales, localeCode) =>\n memoize(\n (\n id: string,\n defaultMessage?: string,\n placeholders?: MessageParameters | undefined,\n ) =>\n locales\n .getLocale(localeCode)\n .getMessage(id, defaultMessage, placeholders),\n (...args) => JSON.stringify(args),\n ),\n);\n\nexport const useMessage = (\n id: string,\n defaultMessage?: string,\n placeholders?: MessageParameters | undefined,\n) => useBEISelector(getMessage)(id, defaultMessage, placeholders);\n\nexport const useTranslate = () => useBEISelector(getMessage);\n\nexport const useLocale = (): string => useBEISelector(getLocale);\n\nconst getLocaleCodes = createSelector(\n (state: RootState) => state.i18n.locales,\n (locales) => locales.map((locale: { code: string }) => locale.code),\n);\n\n/**\n * Retrieve all available locale codes\n */\nexport const useLocaleCodes = (): string[] => useBEISelector(getLocaleCodes);\n","import { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\nimport {\n finishProgress,\n resetProgress,\n startProgress,\n updateProgress,\n} from \"../redux/progressindicator/progressIndicatorActions\";\n\nimport type { RootState } from \"../redux/store\";\n\nexport const useProgressIndicator = () => {\n const dispatch = useBEIDispatch();\n const progress = useBEISelector(\n (state: RootState) => state.progressindicator,\n );\n\n return {\n ...progress,\n start: () => dispatch(startProgress()),\n finish: () => dispatch(finishProgress()),\n reset: () => dispatch(resetProgress()),\n update: (percentComplete: number) =>\n dispatch(updateProgress(percentComplete)),\n };\n};\n","import { useEffect, useRef } from \"react\";\n\nimport { dequal as deepEqual } from \"dequal/lite\";\n\ntype Callback = () => void | (() => void);\ntype DependencyList = unknown[];\n\n/**\n * As copied from https://github.com/kentcdodds/use-deep-compare-effect/\n * Need to copy this, because the dependency on dequal breaks in ie11\n */\nconst useDeepCompareMemoize = (value: DependencyList) => {\n const ref = useRef<DependencyList | null>(null);\n const signalRef = useRef<number>(0);\n\n if (!deepEqual(value, ref.current)) {\n ref.current = value;\n signalRef.current += 1;\n }\n\n return [signalRef.current];\n};\n\nexport function useDeepCompareEffect(\n callback: Callback,\n dependencies: DependencyList,\n): void {\n return useEffect(callback, useDeepCompareMemoize(dependencies));\n}\n","import { HTTP_METHODS } from \"@beinformed/ui/constants\";\nimport { FormModel, Href } from \"@beinformed/ui/models\";\nimport { getSetting } from \"@beinformed/ui/settings\";\nimport { produce } from \"immer\";\n\nimport { updateFormAttribute } from \"../redux/form/attributeActions\";\nimport { cancelForm, previousObject } from \"../redux/form/formActions\";\nimport {\n addRepeatableAttributeSet,\n cancelRepeatableAttributeSet,\n removeRepeatableAttributeSet,\n} from \"../redux/form/formAttributesetRepeatable\";\nimport { useBEIDispatch } from \"../redux/hooks\";\nimport { fetchModel } from \"../redux/modularui/fetchModel\";\nimport { removeModelByKey } from \"../redux/modularui/modelActions\";\nimport { showFormNotification } from \"../redux/notifications/notificationActions\";\nimport { useModularUI } from \"./useModularUI\";\n\nimport type {\n AttributeModel,\n FormObjectModel,\n ModularUIModel,\n} from \"@beinformed/ui/models\";\n\nexport interface UpdateFormOptions {\n autosubmit: boolean;\n autosave: boolean;\n autoupdate: boolean;\n forceUpdate?: boolean;\n /** Default true: Activate/deactivate the form object validate by an update */\n validate?: boolean;\n}\n\n/**\n * Load a form by href\n */\nexport const useForm = (\n href: string | Href,\n data?: Record<string, unknown>,\n) => {\n const formHref = new Href(href);\n\n if (!getSetting(\"ALWAYS_COMMIT_FORM\")) {\n formHref.addParameter(\"commit\", \"false\");\n }\n\n const form = useModularUI(\"form\", formHref, {\n method: HTTP_METHODS.POST,\n targetModel: FormModel,\n removeOnUnmount: true,\n data: data ? JSON.stringify(data) : undefined,\n origin: formHref.origin,\n contextPath: formHref.contextPath,\n });\n\n if (form?.model) {\n return form.model;\n }\n\n return;\n};\n\n/**\n * Form navigation methods\n */\nexport const useFormNavigation = () => {\n const dispatch = useBEIDispatch();\n\n const previous = (form: FormModel) => dispatch(previousObject(form));\n\n const cancel = (form: FormModel) => dispatch(cancelForm(form));\n\n const submit = (form: FormModel) =>\n dispatch(\n fetchModel({\n key: form.connectKey || form.key,\n href: form.selfhref,\n options: {\n method: HTTP_METHODS.POST,\n data: form.formdata,\n updateHandler: (newModel: ModularUIModel): ModularUIModel => {\n if (newModel instanceof FormModel) {\n return produce(newModel, (draft) => {\n draft.update(newModel);\n });\n }\n return newModel;\n },\n targetModel: FormModel,\n },\n }),\n );\n\n const remove = (form: FormModel) =>\n dispatch(removeModelByKey(form.connectKey || \"\"));\n\n const showFormNotificationAction = (form: FormModel) =>\n dispatch(showFormNotification(form));\n\n return {\n previous,\n cancel,\n submit,\n remove,\n showFormNotification: showFormNotificationAction,\n };\n};\n\n/**\n * Hook that returns a function to update attributes of a form object.\n * <br >\n * The returned function accepts the following options:\n *\n * - autosubmit: Automatically submit the form after a change\n * - autosav: Automatically save the form (in the background) after a change\n * - autoupdate: Automatically update the current form object after a change\n * - forceUpdate: Force the update even if conditions are not met.\n * - validate: Activate/deactivate the form object validation by an update.\n */\nexport const useAttributeUpdate = (\n form: FormModel,\n formObject: FormObjectModel,\n) => {\n const dispatch = useBEIDispatch();\n\n return (\n attribute: AttributeModel,\n inputvalue: string,\n options?: UpdateFormOptions,\n ) =>\n dispatch(\n updateFormAttribute({ form, formObject, attribute, inputvalue, options }),\n );\n};\n\n/**\n * Repeatable attributeset actions\n */\nexport const useRepeatableAttributeSet = (form: FormModel) => {\n const dispatch = useBEIDispatch();\n\n return {\n save: () => dispatch(addRepeatableAttributeSet(form)),\n cancel: (object: FormObjectModel) =>\n dispatch(cancelRepeatableAttributeSet(form, object)),\n remove: (object: FormObjectModel) =>\n dispatch(removeRepeatableAttributeSet(form, object)),\n };\n};\n","import { getBooleanSetting } from \"@beinformed/ui/settings\";\nimport { createAsyncThunk } from \"@reduxjs/toolkit\";\nimport { produce } from \"immer\";\n\nimport { updateForm } from \"../modularui/modelActions\";\nimport { autosaveFormObject } from \"./autosaveActions\";\nimport { autosubmitFormObject } from \"./autosubmitActions\";\nimport { autoupdateFormObject } from \"./autoupdateActions\";\nimport { validateFormObject } from \"./validateActions\";\n\nimport type {\n AttributeModel,\n FormModel,\n FormObjectModel,\n} from \"@beinformed/ui/models\";\nimport type { UpdateFormOptions } from \"../../hooks/useForm\";\nimport type { BEIDispatch } from \"../store\";\n\nexport const updateFormAttribute = createAsyncThunk<\n void,\n {\n form: FormModel;\n formObject: FormObjectModel;\n attribute: AttributeModel;\n inputvalue: string;\n options?: UpdateFormOptions;\n },\n { dispatch: BEIDispatch }\n>(\n \"form/attribute\",\n async (\n {\n form,\n formObject,\n attribute,\n inputvalue,\n options = {\n autosubmit: false,\n autosave: false, // autosave commits the form in the background\n autoupdate: false, // autoupdate does not commit and updates the form with for example a new dynamicschema (work-around for form-tree iq)\n forceUpdate: false,\n validate: true,\n },\n },\n { dispatch },\n ) => {\n if (options.validate === undefined) {\n options.validate = true;\n }\n\n const newForm = produce(form, (draft) => {\n if (draft.currentFormObject?.equals(formObject)) {\n draft.currentFormObject.updateAttribute(attribute, inputvalue);\n } else {\n draft.completedFormObjects.forEach((completeObject) => {\n if (completeObject.equals(formObject)) {\n completeObject.updateAttribute(attribute, inputvalue);\n }\n });\n }\n });\n\n if (options.autosubmit && newForm.isValid) {\n const autosubmitAction = autosubmitFormObject(\n newForm,\n attribute,\n options.forceUpdate,\n );\n if (autosubmitAction) {\n dispatch(autosubmitAction);\n return;\n }\n }\n\n if (options.autoupdate && newForm.isValid) {\n const autoupdateAction = autoupdateFormObject(newForm, attribute);\n if (autoupdateAction) {\n dispatch(autoupdateAction);\n return;\n }\n }\n\n handleAutoSave(dispatch, newForm, options);\n\n handleValidate(dispatch, newForm, options);\n\n dispatch(updateForm(newForm));\n },\n);\n\nconst handleAutoSave = (\n dispatch: BEIDispatch,\n newForm: FormModel,\n options: UpdateFormOptions,\n) => {\n if (options.autosave && newForm.isValid && newForm.isChanged()) {\n dispatch(autosaveFormObject(newForm));\n }\n};\n\nconst handleValidate = (\n dispatch: BEIDispatch,\n newForm: FormModel,\n options: UpdateFormOptions,\n) => {\n if (\n options.validate &&\n newForm.currentFormObject?.hasDynamicValidations &&\n getBooleanSetting(\"USE_INSTANT_SERVER_VALIDATION\", false)\n ) {\n // server form validations happens async, don't wait for the form to return\n dispatch(validateFormObject(newForm));\n }\n};\n","import { HTTP_METHODS } from \"@beinformed/ui/constants\";\nimport { FormModel } from \"@beinformed/ui/models\";\nimport { ModularUIRequest } from \"@beinformed/ui/modularui\";\nimport { getNumberSetting } from \"@beinformed/ui/settings\";\nimport debounce from \"lodash/debounce\";\n\nimport { updateForm } from \"../modularui/modelActions\";\n\nimport type { BEIDispatch } from \"../store\";\n\n/**\n * POSSIBLE AUTOSAVE STATUSSES\n * @type {{START: string, FINISHED: string}}\n */\nexport enum AUTOSAVE_STATUS {\n START,\n FINISHED,\n}\n\n/**\n * Update validations of the form currently in the reducer\n * because of the debounce timeout there might have been an update on the form during validation\n */\nconst updateAutosave = (status: AUTOSAVE_STATUS, model: FormModel) => ({\n type: \"UPDATE_AUTOSAVE_STATUS\",\n payload: {\n status,\n model,\n },\n});\n\n/**\n */\nconst autosave = (dispatch: BEIDispatch, form: FormModel) => {\n dispatch(updateAutosave(AUTOSAVE_STATUS.START, form));\n\n const formdata = form.getFormData(true, false);\n\n new ModularUIRequest(form.selfhref.setParameter(\"commit\", \"true\"), {\n method: HTTP_METHODS.POST,\n data: formdata,\n childmodels: false,\n locale: form.locale,\n })\n .fetch()\n .then((savedForm) => {\n if (savedForm instanceof FormModel) {\n // update last server update to indicate an update has happened\n // send the existing form to prevent updates in the ui based on autosave results\n form.lastServerUpdate = savedForm.lastServerUpdate;\n\n dispatch(updateForm(form));\n dispatch(updateAutosave(AUTOSAVE_STATUS.FINISHED, savedForm));\n }\n });\n};\n\n/**\n * Validates form objects debounced to prevent overloading the (form) service\n * When a form with new errors (or complete) arrives, we send the validations\n * to the current form model where the errors are processed\n * A new form with the new constraints is send to the store\n */\nconst debouncedAutosave = debounce(\n (dispatch, form) => {\n autosave(dispatch, form);\n },\n getNumberSetting(\"VALIDATE_DEBOUNCE_TIMEOUT\", 500),\n);\n\nexport const autosaveFormObject =\n (form: FormModel) => (dispatch: BEIDispatch) =>\n debouncedAutosave(dispatch, form);\n","import { HTTP_METHODS } from \"@beinformed/ui/constants\";\nimport { FormModel } from \"@beinformed/ui/models\";\nimport { produce } from \"immer\";\n\nimport { fetchModel } from \"../modularui/fetchModel\";\n\nimport type { AttributeModel } from \"@beinformed/ui/models\";\n\nexport const autosubmitFormObject = (\n form: FormModel,\n attribute: AttributeModel,\n forceUpdate = false,\n) => {\n // As long as we have form objects,\n // and the current attribute is not found in the current form object, go back.\n // When a form has a result, the current form object is null\n while (\n form.allObjects.length > 0 &&\n (!form.currentFormObject ||\n !form.currentFormObject.hasAttributeByKey(attribute.key))\n ) {\n form.setPreviousObject();\n }\n\n if (form.isChanged() || forceUpdate) {\n return fetchModel({\n key: form.connectKey || form.key,\n href: form.selfhref,\n options: {\n method: HTTP_METHODS.POST,\n data: form.formdata,\n updateHandler: (newModel) => {\n if (newModel instanceof FormModel) {\n return produce(form, (draft) => {\n draft.update(newModel);\n });\n }\n return newModel;\n },\n },\n });\n }\n\n return null;\n};\n","import { HTTP_METHODS } from \"@beinformed/ui/constants\";\nimport { FormModel } from \"@beinformed/ui/models\";\nimport { produce } from \"immer\";\n\nimport { fetchModel } from \"../modularui/fetchModel\";\n\nimport type { AttributeModel } from \"@beinformed/ui/models\";\n\nexport const autoupdateFormObject = (\n form: FormModel,\n attribute: AttributeModel,\n) => {\n // As long as we have form objects,\n // and the current attribute is not found in the current form object, go back.\n // When a form has a result, the current form object is null\n while (\n form.allObjects.length > 0 &&\n (!form.currentFormObject ||\n !form.currentFormObject.hasAttributeByKey(attribute.key))\n ) {\n form.setPreviousObject();\n }\n\n if (form.isChanged()) {\n return fetchModel({\n key: form.connectKey || form.key,\n href: form.selfhref.setParameter(\"commit\", \"false\"),\n options: {\n method: HTTP_METHODS.POST,\n data: form.formdata,\n updateHandler: (newModel) => {\n if (newModel instanceof FormModel) {\n return produce(form, (draft) => {\n draft.updateCurrentFormObject(newModel);\n });\n }\n return newModel;\n },\n },\n });\n }\n\n return null;\n};\n","import { HTTP_METHODS } from \"@beinformed/ui/constants\";\nimport { FormModel } from \"@beinformed/ui/models\";\nimport { ModularUIRequest } from \"@beinformed/ui/modularui\";\nimport { getNumberSetting } from \"@beinformed/ui/settings\";\nimport { createAsyncThunk } from \"@reduxjs/toolkit\";\nimport { produce } from \"immer\";\nimport debounce from \"lodash/debounce\";\n\nimport { updateForm } from \"../modularui/modelActions\";\n\nimport type { BEIDispatch, RootState } from \"../store\";\n\n/**\n * Update validations of the form currently in the reducer\n * because of the debounce timeout there might have been an update on the form during validation\n */\nconst updateValidations = createAsyncThunk<\n void,\n { form: FormModel; formWithValidations: FormModel },\n { dispatch: BEIDispatch; state: RootState }\n>(\"\", ({ form, formWithValidations }, { dispatch, getState }) => {\n if (form.connectKey) {\n const currentFormEntry = getState().modularui[form.connectKey];\n\n if (currentFormEntry) {\n const currentForm = currentFormEntry.model;\n if (currentForm instanceof FormModel) {\n const validatedForm = produce(currentForm, (draft) => {\n draft.updateValidations(formWithValidations.data);\n });\n dispatch(updateForm(validatedForm));\n }\n }\n }\n});\n\n/**\n * Validates form objects debounced to prevent overloading the (form) service\n * When a form with new errors (or complete) arrives, we send the validations\n * to the current form model where the errors are processed\n * A new form with the new constraints is send to the store\n */\nconst debouncedValidateFormObject = debounce<\n (dispatch: BEIDispatch, form: FormModel) => void\n>(\n (dispatch, form: FormModel) => {\n new ModularUIRequest(form.selfhref.setParameter(\"commit\", \"false\"), {\n method: HTTP_METHODS.POST,\n data: form.validationData,\n childmodels: false,\n isValidationRequest: true,\n locale: form.locale,\n })\n .fetch()\n .then((formWithValidations) => {\n if (formWithValidations instanceof FormModel) {\n dispatch(updateValidations({ form, formWithValidations }));\n }\n });\n },\n getNumberSetting(\"VALIDATE_DEBOUNCE_TIMEOUT\", 500),\n {\n leading: true,\n trailing: true,\n },\n);\n\nexport const validateFormObject =\n (form: FormModel) => (dispatch: BEIDispatch) =>\n debouncedValidateFormObject(dispatch, form);\n","import { Authenticate } from \"@beinformed/ui/modularui\";\nimport { createAsyncThunk } from \"@reduxjs/toolkit\";\nimport { produce } from \"immer\";\n\nimport { reloadApplication } from \"../application/applicationActions\";\nimport { logoutSuccess } from \"../auth/authReducer\";\nimport { updateForm } from \"../modularui/modelActions\";\nimport {\n finishProgress,\n startProgress,\n} from \"../progressindicator/progressIndicatorActions\";\nimport { goBack } from \"../router/routerActions\";\n\nimport type { FormModel } from \"@beinformed/ui/models\";\nimport type { PayloadAction } from \"@reduxjs/toolkit\";\nimport type { BEIDispatch, RootState } from \"../store\";\n\nexport const previousObject = (form: FormModel) => {\n const newForm = produce(form, (draft) => {\n draft.setPreviousObject();\n });\n\n return updateForm(newForm);\n};\n\nexport const cancelForm = createAsyncThunk<\n PayloadAction<undefined, string>,\n FormModel,\n { dispatch: BEIDispatch; state: RootState }\n>(\"form/cancel\", async (form, { dispatch, getState }) => {\n if (form.key === \"ChangePassword\" && getState().auth.mustChangePassword) {\n dispatch(startProgress());\n\n await new Authenticate().logout();\n\n dispatch(logoutSuccess());\n dispatch(reloadApplication());\n dispatch(finishProgress());\n }\n\n return goBack();\n});\n","import { produce } from \"immer\";\n\nimport { updateForm } from \"../modularui/modelActions\";\n\nimport type { FormModel, FormObjectModel } from \"@beinformed/ui/models\";\n\nexport const addRepeatableAttributeSet = (form: FormModel) => {\n const newForm = produce(form, (draft) => {\n draft.addEmptyFormObject();\n });\n return updateForm(newForm);\n};\n\nexport const cancelRepeatableAttributeSet = (\n form: FormModel,\n formObject: FormObjectModel,\n) => {\n const newForm = produce(form, (draft) => {\n draft.addEmptyFormObject();\n draft.removeFormObject(formObject);\n });\n return updateForm(newForm);\n};\n\nexport const removeRepeatableAttributeSet = (\n form: FormModel,\n formObject: FormObjectModel,\n) => {\n const newForm = produce(form, (draft) => {\n draft.removeFormObject(formObject);\n });\n return updateForm(newForm);\n};\n","import { useEffect, useMemo, useRef } from \"react\";\n\nimport { HTTP_METHODS } from \"@beinformed/ui/constants\";\nimport { Href } from \"@beinformed/ui/models\";\nimport { useLocation } from \"react-router\";\n\nimport { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\nimport { fetchModel } from \"../redux/modularui/fetchModel\";\nimport { removeModelByKey } from \"../redux/modularui/modelActions\";\nimport { useDeepCompareEffect } from \"./useDeepCompareEffect\";\nimport { useLocale } from \"./useI18n\";\n\nimport type { ModularUIRequestOptions } from \"@beinformed/ui/utils\";\nimport type { RootState } from \"../redux/store\";\n\nconst useKeyForHook = (modelKey: string, url: string) => {\n const locale = useLocale();\n return useMemo(\n () => `${modelKey}(${url.split(\"?\")[0]})(${locale})`,\n [modelKey, url, locale],\n );\n};\n\n/**\n * Use redux action and selector to retrieve the correct modular ui service model\n */\nexport const useModularUI = (\n modelKey: string,\n url: string | Href,\n options: ModularUIRequestOptions = {\n method: HTTP_METHODS.GET,\n removeOnUnmount: false,\n },\n) => {\n const dispatch = useBEIDispatch();\n const href = useMemo(() => url?.toString() || \"\", [url]);\n const key = useKeyForHook(modelKey, href);\n\n const modelSelector = useMemo(\n () => (state: RootState) => state.modularui[key],\n [key],\n );\n const model = useBEISelector(modelSelector);\n\n if (url instanceof Href) {\n options.origin = options.origin ?? url.origin;\n options.contextPath = options.contextPath ?? url.contextPath;\n }\n\n const location = useLocation();\n const redirectLocation =\n location !== null &&\n typeof location === \"object\" &&\n location.state !== null &&\n typeof location.state === \"object\" &&\n \"redirectLocation\" in location.state\n ? location.state.redirectLocation\n : undefined;\n const forceLoad =\n model == null ||\n (redirectLocation instanceof Href ? redirectLocation?.equals(href) : false);\n\n const prevOptions = useRef(options);\n const prevHref = useRef(href);\n const prevForceLoad = useRef(forceLoad);\n\n useDeepCompareEffect(() => {\n // prevent reloads when previous option had the isReload, but the new options not\n const isOldReload =\n prevHref.current === href &&\n prevOptions.current.isReload &&\n !options.isReload;\n\n const doForceLoad = forceLoad && !prevForceLoad.current;\n\n if (href !== \"\" && (doForceLoad || !isOldReload)) {\n dispatch(fetchModel({ key, href, options }));\n }\n\n prevOptions.current = options;\n prevHref.current = href;\n prevForceLoad.current = forceLoad;\n }, [key, href, options, forceLoad]);\n\n useEffect(() => {\n if (options.removeOnUnmount) {\n return () => {\n dispatch(removeModelByKey(key));\n };\n }\n return;\n }, [dispatch, key, options.removeOnUnmount]);\n\n return model;\n};\n","import { useCallback } from \"react\";\n\nimport { IllegalArgumentException } from \"@beinformed/ui/exceptions\";\n\nimport { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\nimport { closeModal, showModal } from \"../redux/modals/modalsReducer\";\n\nimport type { RootState } from \"../redux/store\";\n\ntype ModalHook = (modalId: string) => {\n key: string | null;\n size?: string | null;\n visible: boolean;\n show: () => void;\n close: () => void;\n};\n\n/**\n * Manage modals\n */\nexport const useModal: ModalHook = (modalId: string) => {\n if (!modalId) {\n throw new IllegalArgumentException(\n \"Missing modalId argument for useModal hook\",\n );\n }\n\n const dispatch = useBEIDispatch();\n const modal = useBEISelector((state: RootState) =>\n state.modals.modals.find((m) => m.key === modalId),\n );\n\n const show = useCallback(() => {\n dispatch(showModal(modalId));\n }, [dispatch, modalId]);\n\n const close = useCallback(() => {\n dispatch(closeModal(modalId));\n }, [dispatch, modalId]);\n\n return {\n key: modal ? modal.key : null,\n size: modal ? modal.size : null,\n visible: modal ? modal.visible : false,\n show,\n close,\n };\n};\n","import {\n ConceptIndexModel,\n ContentIndexModel,\n ContentTOCModel,\n ContentTypeModel,\n Href,\n ModelCatalogModel,\n} from \"@beinformed/ui/models\";\nimport { createHref, filterParameters } from \"@beinformed/ui/utils\";\n\nimport { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\nimport { updateEntryDate } from \"../redux/modelcatalog/modelCatalogReducer\";\nimport { getEntryDate } from \"../redux/modelcatalog/modelCatalogSelectors\";\nimport { useModularUIBasic } from \"./useModularUIBasic\";\nimport { useLocation } from \"./useRouter\";\n\nimport type { ConceptDetailModel, ContentModel } from \"@beinformed/ui/models\";\nimport type { ISO_DATE } from \"@beinformed/ui/types\";\nimport type { UseModularUIBasicOptions } from \"./useModularUIBasic\";\n\nexport interface SearchFilter {\n index?: string;\n label?: string;\n type?: string | string[];\n modelCategory?: string | string[];\n entryDate?: string;\n}\n\nexport const useModelCatalog = (\n options?: UseModularUIBasicOptions<ModelCatalogModel>,\n) =>\n useModularUIBasic(\"modelcatalog\", \"/modelcatalog\", {\n expectedModels: [\"ModelCatalog\"],\n targetModel: ModelCatalogModel,\n ...options,\n });\n\nexport const useConceptIndex = (\n href: string | Href,\n key = \"conceptindex\",\n options?: UseModularUIBasicOptions<ConceptIndexModel>,\n) => {\n const { entryDate } = useEntryDate();\n const url = filterParameters(href, [\n \"index\",\n \"label\",\n \"modelcategory\",\n \"type\",\n ]);\n url.setParameter(\"entryDate\", entryDate);\n\n return useModularUIBasic(key, url, {\n expectedModels: [\"ConceptIndex\"],\n targetModel: ConceptIndexModel,\n ...options,\n });\n};\n\nexport const useConceptDetail = (\n concept: string | Href,\n key = \"conceptdetail\",\n options?: UseModularUIBasicOptions<ConceptDetailModel>,\n) => {\n const { entryDate } = useEntryDate();\n const location = useLocation();\n\n const href = createHref(\"concepts\", concept, entryDate, location, []);\n\n return useModularUIBasic(key, href, {\n expectedModels: [\"ConceptDetail\", \"BusinessScenario\"],\n ...options,\n });\n};\n\nexport const useContentIndex = (\n href: string | Href,\n key = \"contentindex\",\n options?: UseModularUIBasicOptions<ContentIndexModel>,\n) => {\n const url = filterParameters(href, [\"index\", \"label\", \"type\"]);\n return useModularUIBasic(key, url, {\n expectedModels: [\"ContentIndex\"],\n targetModel: ContentIndexModel,\n ...options,\n });\n};\n\nexport const useContentTOC = (\n content: string | Href,\n key = \"contenttoc\",\n options?: UseModularUIBasicOptions<ContentTOCModel>,\n) => {\n const { entryDate } = useEntryDate();\n const location = useLocation();\n\n const href = createHref(\"content\", content, entryDate, location, [\n \"complete\",\n ]);\n\n return useModularUIBasic(key, href, {\n expectedModels: [\"ContentTOC\"],\n targetModel: ContentTOCModel,\n ...options,\n });\n};\n\nexport const useContent = (\n content: string | Href,\n key = \"content\",\n options?: UseModularUIBasicOptions<ContentModel>,\n) => {\n const { entryDate } = useEntryDate();\n const location = useLocation();\n\n const href = createHref(\"content\", content, entryDate, location, [\n \"complete\",\n ]);\n\n return useModularUIBasic(key, href, {\n expectedModels: [\"Content\", \"ContentTOC\"],\n ...options,\n });\n};\n\nexport const useCompleteSource = (\n content: string | Href,\n key = \"content\",\n options?: UseModularUIBasicOptions<ContentModel | ContentTOCModel>,\n) => {\n const { entryDate } = useEntryDate();\n const location = useLocation();\n\n const contentHref = new Href(content);\n contentHref.removeParameter(\"complete\");\n contentHref.addParameter(\"complete\", \"true\");\n\n const href = createHref(\"content\", contentHref, entryDate, location, [\n \"complete\",\n ]);\n\n return useModularUIBasic(key, href, {\n expectedModels: [\"Content\", \"ContentTOC\"],\n ...options,\n });\n};\n\nexport const useContentType = (\n contentType: string | Href,\n key = \"contenttypes\",\n options?: UseModularUIBasicOptions<ContentTypeModel>,\n) => {\n const href = createHref(\n \"contenttypes\",\n contentType,\n undefined,\n undefined,\n [],\n );\n return useModularUIBasic(key, href, {\n expectedModels: [\"ContentType\"],\n targetModel: ContentTypeModel,\n ...options,\n });\n};\n\nexport const useRelatedConcepts = (\n href: string | Href,\n key = \"relatedconcepts\",\n options?: UseModularUIBasicOptions<ConceptIndexModel>,\n) => {\n const { entryDate } = useEntryDate();\n const url = filterParameters(href, [\"modelcategory\"]);\n url.setParameter(\"entryDate\", entryDate);\n\n return useModularUIBasic(key, url, {\n expectedModels: [\"ConceptIndex\"],\n targetModel: ConceptIndexModel,\n ...options,\n });\n};\n\nconst getSearchHref = (uri: string, filters: SearchFilter) => {\n const filterString = [];\n\n for (const key of Object.keys(filters)) {\n const filterValue = filters[key as keyof SearchFilter];\n if (filterValue) {\n let value: string = Array.isArray(filterValue)\n ? filterValue.join(\",\")\n : filterValue;\n if (key === \"type\") {\n value = value.replace(\"#\", \"%23\"); // handles un-encoded #\n }\n filterString.push(`${key}=${value}`);\n }\n }\n\n return filterString.length ? `${uri}?${filterString.join(\"&\")}` : uri;\n};\n\nexport const useConceptSearch = (\n filters: SearchFilter,\n key: string | \"conceptSearch\",\n options?: UseModularUIBasicOptions<ConceptIndexModel>,\n) => {\n const href = getSearchHref(\"/concepts\", filters);\n return useConceptIndex(href, key, options);\n};\n\nexport const useContentSearch = (\n filters: SearchFilter,\n key: string | \"contentSearch\",\n options?: UseModularUIBasicOptions<ContentIndexModel>,\n) => {\n const href = getSearchHref(\"/content\", filters);\n return useContentIndex(href, key, options);\n};\n\n/**\n * Retrieve and update the entrydate for the modelcatalog\n */\nexport const useEntryDate = () => {\n const dispatch = useBEIDispatch();\n const entryDate = useBEISelector(getEntryDate);\n\n return {\n entryDate,\n setEntryDate: (entryDate: ISO_DATE) => dispatch(updateEntryDate(entryDate)),\n };\n};\n","import type { ISO_DATE } from \"@beinformed/ui/types\";\nimport type { RootState } from \"../store\";\n\n/**\n * Retrieve entrydate for the model catalog\n */\nexport const getEntryDate = (state: RootState): ISO_DATE => {\n if (state.modelcatalog?.entryDate) {\n return state.modelcatalog?.entryDate;\n }\n\n const isoDate = new Date().toISOString();\n return isoDate.split(\"T\")[0] || isoDate;\n};\n","import { useMemo } from \"react\";\n\nimport { useModularUI } from \"./useModularUI\";\nimport { useLocation } from \"./useRouter\";\n\nimport type { Href } from \"@beinformed/ui/models\";\nimport type { ModularUIResponse } from \"@beinformed/ui/modularui\";\n\nexport interface UseModularUIBasicOptions<T> {\n expectedModels?: string[];\n targetModel?: new (modularuiResponse: ModularUIResponse) => T;\n forceTargetModel?: boolean;\n origin?: string;\n contextPath?: string;\n cache?: boolean;\n}\n\n// Helper to create useModularUI options\nconst createUseModularUIOptions = <T>(\n options: UseModularUIBasicOptions<T>,\n href: string,\n location: unknown,\n): Record<string, unknown> => {\n const baseOptions: Record<string, unknown> = {\n targetModel: undefined,\n forceTargetModel: undefined,\n isReload: false,\n origin: undefined,\n contextPath: undefined,\n cache: false,\n };\n\n // Handle targetModel and forceTargetModel\n\n if (options.targetModel) {\n baseOptions.targetModel = options.targetModel;\n baseOptions.forceTargetModel = options.forceTargetModel;\n }\n\n // Handle cache option\n if (options.cache) {\n baseOptions.cache = options.cache;\n }\n\n // Check for reload if location matches href\n if (\n location !== null &&\n typeof location === \"object\" &&\n \"state\" in location &&\n location.state !== null &&\n typeof location.state === \"object\" &&\n \"reload\" in location.state &&\n \"pathname\" in location &&\n typeof location.pathname === \"string\" &&\n location.pathname.startsWith(href)\n ) {\n baseOptions.isReload = true;\n }\n\n // Handle origin and contextPath options\n baseOptions.origin = options.origin ?? baseOptions.origin;\n baseOptions.contextPath = options.contextPath ?? baseOptions.contextPath;\n\n return baseOptions;\n};\n\n// Helper to validate the model against expectedModels\nconst validateModel = (model: unknown, expectedModels: string[]) => {\n if (expectedModels.length > 0) {\n const isCorrectModel = expectedModels.some((expectedModel) => {\n if (model !== null && typeof model === \"object\" && \"type\" in model) {\n return model.type === expectedModel;\n }\n return;\n });\n if (!isCorrectModel) {\n console.warn(model, \"is not of instance\", expectedModels);\n }\n }\n};\n\n/**\n * useModularUIBasic Hook\n */\nexport const useModularUIBasic = <T>(\n key: string,\n href: string | Href,\n options: UseModularUIBasicOptions<T> = {\n expectedModels: [],\n targetModel: undefined,\n forceTargetModel: false,\n origin: undefined,\n contextPath: undefined,\n },\n): T | undefined => {\n const location = useLocation();\n const memoizedHref = useMemo(() => href.toString(), [href]);\n const useModularUIOptions = useMemo(\n () => createUseModularUIOptions(options, memoizedHref, location),\n [options, memoizedHref, location],\n );\n\n const modularUI = useModularUI(key, href, useModularUIOptions);\n const expectedModels = useMemo(\n () => options.expectedModels ?? [],\n [options.expectedModels],\n );\n\n return useMemo((): T | undefined => {\n if (modularUI?.model) {\n validateModel(modularUI.model, expectedModels);\n return modularUI.model as T;\n }\n return undefined;\n }, [expectedModels, modularUI]);\n};\n","import { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\nimport {\n go,\n goBack,\n goForward,\n push,\n replace,\n} from \"../redux/router/routerActions\";\n\nimport type { RouterLocation } from \"../redux/router/routerReducer\";\nimport type { RootState } from \"../redux/store\";\n\nexport const useLocation = () =>\n useBEISelector((state: RootState) => state.router.location);\n\nexport const useLocationKey = () => useLocation()?.key ?? \"\";\n\nexport const useQuerystring = () => useLocation()?.search;\n\nexport const usePathname = () => useLocation()?.pathname;\n\nexport const useNavigation = () => {\n const dispatch = useBEIDispatch();\n\n return {\n push: (location: RouterLocation | string, state?: RootState) =>\n dispatch(push(location, state)),\n replace: (location: RouterLocation | string, state?: RootState) =>\n dispatch(replace(location, state)),\n go: (delta: number) => dispatch(go(delta)),\n goBack: () => dispatch(goBack()),\n goForward: () => dispatch(goForward()),\n };\n};\n","import { createSelector } from \"reselect\";\n\nimport { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\nimport { MODULARUI_STATUS } from \"../redux/modularui/constants\";\nimport { reloadModel } from \"../redux/modularui/reloadModel\";\n\nimport type { ModularUIModel } from \"@beinformed/ui/models\";\nimport type { ModularUIRequestOptions } from \"@beinformed/ui/utils\";\nimport type { RootState } from \"../redux/store\";\n\ntype ReloadCallback = (model: ModularUIModel | undefined) => boolean;\n\ntype UseModels = () => {\n reload: (model: ModularUIModel, options?: Record<string, unknown>) => void;\n reloadWithFilter: (\n callbackFn: ReloadCallback,\n options?: Record<string, unknown>,\n ) => void;\n};\n\n/**\n * Hook that contains the reload property that can be used to reload a model\n */\nexport const useModels: UseModels = () => {\n const dispatch = useBEIDispatch();\n\n const selectModularUI = (state: RootState) => state.modularui;\n const selector = createSelector([selectModularUI], (modularui) => {\n const models = [];\n const keys = Object.keys(modularui);\n for (const key of keys) {\n const model = modularui[key];\n if (model?.status === MODULARUI_STATUS.FINISHED) {\n models.push(model.model);\n }\n }\n return models;\n });\n\n const modularuiModels = useBEISelector(selector);\n\n return {\n reload: (model: ModularUIModel, options?: ModularUIRequestOptions) => {\n dispatch(reloadModel(model, options));\n },\n reloadWithFilter: (\n callbackFn: ReloadCallback,\n options?: Record<string, unknown>,\n ) => {\n const modelsToReload = modularuiModels.filter(callbackFn);\n for (const modelToReload of modelsToReload) {\n if (modelToReload) {\n dispatch(reloadModel(modelToReload, options));\n }\n }\n },\n };\n};\n","import { fetchModel } from \"./fetchModel\";\n\nimport type { ModularUIModel } from \"@beinformed/ui/models\";\nimport type { ModularUIRequestOptions } from \"@beinformed/ui/utils\";\n\nexport const reloadModel = (\n model: ModularUIModel,\n options?: ModularUIRequestOptions,\n) =>\n fetchModel({\n key: model.connectKey || \"\",\n href: model.selfhref || \"\",\n options: {\n ...options,\n isReload: true,\n },\n });\n","import {\n ApplicationModel,\n CaseSearchModel,\n CaseViewModel,\n DetailModel,\n GroupingPanelModel,\n ListDetailModel,\n ListModel,\n TabModel,\n UserProfileModel,\n} from \"@beinformed/ui/models\";\n\nimport { useModularUIBasic } from \"./useModularUIBasic\";\n\nimport type { Href } from \"@beinformed/ui/models\";\n\ninterface HookOptions {\n origin?: string;\n contextPath?: string;\n}\n\n/**\n * Load application\n */\nexport const useApplication = (options?: HookOptions) =>\n useModularUIBasic(\"application\", \"/\", {\n expectedModels: [\"Application\"],\n targetModel: ApplicationModel,\n ...options,\n });\n\n/**\n * Load a tab by href\n */\nexport const useTab = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"tab\", href, {\n expectedModels: [\"Tab\"],\n targetModel: TabModel,\n ...options,\n });\n\n/**\n * Load caseview by href\n */\nexport const useCaseView = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"caseview\", href, {\n expectedModels: [\"CaseView\"],\n targetModel: CaseViewModel,\n ...options,\n });\n\nexport const usePanel = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic<ListModel | GroupingPanelModel | DetailModel>(\n \"panel\",\n href,\n {\n expectedModels: [\"List\", \"GroupingPanel\", \"Detail\"],\n ...options,\n },\n );\n\nexport const useList = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"list\", href, {\n expectedModels: [\"List\"],\n targetModel: ListModel,\n ...options,\n });\n\nexport const useListOrDetail = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic<ListModel | DetailModel>(\"list\", href, {\n expectedModels: [\"List\", \"Detail\"],\n // @ts-expect-error Need to improve typing for array\n targetModel: [ListModel, DetailModel],\n ...options,\n });\n\nexport const useListDetail = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"listdetail\", href, {\n expectedModels: [\"ListDetail\"],\n targetModel: ListDetailModel,\n forceTargetModel: true,\n ...options,\n });\n\nexport const useGroupingPanel = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"groupingpanel\", href, {\n expectedModels: [\"GroupingPanel\"],\n targetModel: GroupingPanelModel,\n ...options,\n });\n\nexport const useDetailPanel = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"detailpanel\", href, {\n expectedModels: [\"Detail\"],\n targetModel: DetailModel,\n ...options,\n });\n\nexport const useQuicksearch = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"quicksearch\", href, {\n expectedModels: [\"CaseSearch\"],\n targetModel: CaseSearchModel,\n ...options,\n });\n\nexport const useSearch = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"search\", href, {\n expectedModels: [\"CaseSearch\"],\n targetModel: CaseSearchModel,\n ...options,\n });\n\nexport const useUserProfile = (href: string | Href, options?: HookOptions) =>\n useModularUIBasic(\"userprofile\", href, {\n expectedModels: [\"UserProfile\"],\n targetModel: UserProfileModel,\n ...options,\n });\n","import { useBEIDispatch, useBEISelector } from \"../redux/hooks\";\nimport {\n dismissNotification,\n NOTIFICATION_TYPES,\n showNotification,\n} from \"../redux/notifications/notificationReducer\";\n\nimport type { ErrorResponse } from \"@beinformed/ui/models\";\nimport type { MessageObject } from \"../i18n/types\";\nimport type { RootState } from \"../redux/store\";\n\nexport const useNotification = () => {\n const dispatch = useBEIDispatch();\n const { render, messageType, message, error } = useBEISelector(\n (state: RootState) => state.notification,\n );\n\n return {\n render,\n messageType,\n message,\n error,\n dismiss: () => dispatch(dismissNotification()),\n };\n};\n\nexport const useErrorNotification = () => {\n const dispatch = useBEIDispatch();\n return (message: MessageObject, error?: ErrorResponse) => {\n return dispatch(\n showNotification({ type: NOTIFICATION_TYPES.ERROR, message, error }),\n );\n };\n};\n","import { useMemo } from \"react\";\n\nimport pick from \"lodash/pick\";\nimport { createSelector } from \"reselect\";\n\nimport { useBEISelector } from \"../redux/hooks\";\n\nimport type { RootState } from \"../redux/store\";\n\nconst getPreferences = (state: RootState) => state.preferences;\n\nconst makeSelectPreference = (preferenceNames: string | string[]) => {\n const names = Array.isArray(preferenceNames)\n ? preferenceNames\n : [preferenceNames];\n\n return createSelector([getPreferences], (preferences) =>\n pick(preferences, names),\n );\n};\n\nexport const usePreference = (preferenceNames: string | string[]) => {\n const selectPreference = useMemo(\n () => makeSelectPreference(preferenceNames),\n [\n Array.isArray(preferenceNames)\n ? preferenceNames.join(\",\")\n : preferenceNames,\n ],\n );\n\n return useBEISelector(selectPreference);\n};\n","import { hideVisually } from \"polished\";\n\nimport { useMessage } from \"../../hooks/useI18n\";\n\nimport type { MessageParameters } from \"@beinformed/ui/types\";\n\ninterface Props {\n className?: string;\n id: string;\n defaultMessage?: string | null;\n children?: string;\n data?: MessageParameters | undefined;\n screenreaderOnly?: boolean;\n allowHTML?: boolean;\n}\n\n/**\n * Message React component\n */\nconst Message = ({\n className,\n id,\n defaultMessage,\n children,\n data,\n screenreaderOnly = false,\n allowHTML = false,\n}: Props) => {\n const translatedMessage = useMessage(id, defaultMessage || children, data);\n\n if (screenreaderOnly) {\n const styles = {\n ...hideVisually(),\n };\n\n return (\n <span className={className} style={styles}>\n {translatedMessage}\n </span>\n );\n }\n\n if (allowHTML) {\n return (\n <span\n className={className}\n dangerouslySetInnerHTML={{\n __html: translatedMessage,\n }}\n />\n );\n }\n\n return <span className={className}>{translatedMessage}</span>;\n};\n\nMessage.displayName = \"BI.Message\";\n\nexport default Message;\n","import { IllegalArgumentException } from \"@beinformed/ui/exceptions\";\nimport { getEnabledLocales } from \"@beinformed/ui/settings\";\nimport deepmerge from \"deepmerge\";\n\nimport { setLocales } from \"../redux/i18n/i18nReducer\";\nimport { getPreferredLocale } from \"../server/requestInformation\";\nimport { availableLocales, Locales } from \"./Locales\";\n\nimport type { BEIStore } from \"../redux/store\";\nimport type { HttpServletRequestJava } from \"../server/types\";\nimport type { LocaleConfiguration } from \"./types\";\n\nexport const setI18n = (\n store: BEIStore,\n locales: LocaleConfiguration[] = [],\n request: HttpServletRequestJava,\n) => {\n if (!Array.isArray(locales)) {\n throw new IllegalArgumentException(\"locales must be an array of objects\");\n }\n if (!request) {\n throw new IllegalArgumentException(\"missing request argument\");\n }\n\n const mergedLocales = availableLocales.map((locale) => {\n const code = locale.code;\n const customLocale = locales.find((custLocale) => custLocale.code === code);\n\n if (customLocale) {\n return deepmerge(locale, customLocale);\n }\n\n return locale;\n });\n\n locales.forEach((customLocale) => {\n if (!mergedLocales.some((locale) => locale.code === customLocale.code)) {\n mergedLocales.push(customLocale);\n }\n });\n\n const enabledLocales = mergedLocales.filter((locale: LocaleConfiguration) =>\n getEnabledLocales().includes(locale.code),\n );\n\n const localesInstance = new Locales(enabledLocales);\n const preferredLocale = getPreferredLocale(request, localesInstance);\n store.dispatch(setLocales(localesInstance, preferredLocale ?? \"en\"));\n};\n","import type { Locales } from \"../i18n/Locales\";\nimport type { RouterLocation } from \"../redux/router/routerReducer\";\nimport type { HttpServletRequestJava } from \"./types\";\n\nconst encodeQueryString = (queryString: string) => {\n if (!queryString) return \"\";\n\n const params: string[] = [];\n queryString.split(\"&\").forEach((part) => {\n const [key, value] = part.split(\"=\");\n if (key && value) {\n params.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`);\n } else if (key) {\n params.push(encodeURIComponent(key));\n }\n });\n return params.join(\"&\");\n};\n\nexport const getFullRequestUrl = (request: HttpServletRequestJava): string => {\n let pathInfo = request.getPathInfo() || \"/\";\n const queryString = request.getQueryString();\n\n pathInfo = pathInfo\n .split(\"/\")\n .map((segment) => encodeURIComponent(segment))\n .join(\"/\");\n\n if (queryString) {\n return `${pathInfo}?${encodeQueryString(queryString)}`;\n }\n\n return pathInfo;\n};\n\nexport const getFullRequestLocation = (\n request: HttpServletRequestJava,\n): RouterLocation => {\n return {\n pathname: request.getPathInfo() || \"/\",\n search: request.getQueryString() || \"\",\n state: {},\n hash: \"\",\n };\n};\n\nexport const getCookieFromRequest = (\n request: HttpServletRequestJava,\n cookieName: string,\n): null | string => {\n return request.getCookieByName(cookieName);\n};\n\nexport const getPreferredLocale = (\n request: HttpServletRequestJava,\n locales: Locales,\n): void | string => {\n const languageFromCookie = getCookieFromRequest(request, \"locale\");\n const acceptLanguageHeader =\n languageFromCookie || request.getHeader(\"Accept-Language\");\n\n // when no accept language header or cookie present, get first locale code\n if (acceptLanguageHeader === null) {\n return locales.availableLocaleCodes[0];\n }\n\n return locales.getPreferredLocale(acceptLanguageHeader);\n};\n","import { ModularUIRequest } from \"@beinformed/ui/modularui\";\n\nimport { getLocale } from \"../redux/i18n/i18nSelectors\";\nimport { initModels } from \"../redux/modularui/modelActions\";\n\nimport type { BEIStore } from \"../redux/store\";\n\nexport const setApplication = (store: BEIStore) => {\n try {\n const locale = getLocale(store.getState());\n const application = new ModularUIRequest(\"/\", {\n locale: locale,\n }).fetchSync();\n\n application.connectKey = `application(/)(${locale})`;\n\n store.dispatch(\n initModels([\n {\n key: `application(/)(${locale})`,\n model: application,\n },\n ]),\n );\n } catch (_e) {\n // swallow error, in this case we just don't pre-cache the webapplication,\n // which has not much difference for the end user\n }\n};\n","import { getContextPath } from \"@beinformed/ui/settings\";\n\ndeclare let __webpack_public_path__: string;\n\n(function x() {\n if (typeof __webpack_public_path__ !== \"undefined\") {\n __webpack_public_path__ = `${getContextPath()}/`; // NOSONAR\n }\n})();\n\nexport {};\n","export interface TemplateProps {\n contextPath: string;\n html: string;\n head: Record<string, unknown>;\n state: string;\n UUID: string;\n}\n\nexport const htmlpage = (props?: Partial<TemplateProps>): string => {\n if (props?.contextPath === undefined) {\n throw new Error(\"Missing contextPath argument\");\n }\n if (props.html === undefined) {\n throw new Error(\"Missing html for server\");\n }\n\n const { head = {} } = props;\n\n const template = `\n <!doctype html>\n <html ${head.htmlAttributes ? head.htmlAttributes.toString() : \"\"}>\n <head>\n <meta charset=\"utf-8\" />\n ${Object.keys(head)\n .filter((key) => key !== \"htmlAttributes\")\n .map((key) => String(head[key]))\n .join(\"\")}\n {CSSASSETS:<link rel=\"stylesheet\" type=\"text/css\" href=\"{CONTEXT_PATH}/{FILE}\" />:CSSASSETS}\n </head>\n <body class=\"nojs\">\n <div id=\"application\">${props.html}</div>\n <div id=\"portal\"></div>\n <script\n type=\"application/json\"\n data-app-state=\"app-json\"\n data-app-contextpath=\"{CONTEXT_PATH}\"\n data-app-filepath=\"{FILEPATH}\"\n data-app-nonce=\"${props.UUID ?? \"\"}\">${props.state ?? \"\"}</script>\n {JSASSETS:<script src=\"{CONTEXT_PATH}/{FILE}\"></script>:JSASSETS}\n </body>\n </html>\n`;\n\n // It is important to replace the context afterwards,\n // the JSASSESTS and CSSASSETS parts act as a small template for all generated javascript and css files\n // these templates must be pure strings to make it possible to add the context path in all situations\n return template.replace(/{CONTEXT_PATH}/g, props.contextPath).trim();\n};\n","import React from \"react\";\n\nimport { getContextPathServer } from \"@beinformed/ui/settings\";\nimport { renderToString } from \"react-dom/server\";\nimport { Provider } from \"react-redux\";\nimport { ServerStyleSheet, StyleSheetManager } from \"styled-components\";\n\nimport { ThemeProvider } from \"../theme/ThemeProvider\";\nimport { htmlpage } from \"./htmlpage\";\nimport { dehydrate } from \"./serverState\";\n\nimport type { BEIStore } from \"../redux/store\";\nimport type { Theme } from \"../theme/types\";\nimport type { TemplateProps } from \"./htmlpage\";\n\ninterface Props {\n store: BEIStore;\n theme?: Theme | Theme[];\n UUID: string;\n render: () => React.ReactNode;\n template?: (arg0: TemplateProps) => string;\n}\n\nexport const renderSSRMinimal = ({\n store,\n theme,\n UUID = \"\",\n render,\n template = htmlpage,\n}: Props): string => {\n const sheet = new ServerStyleSheet();\n\n const appHTML = renderToString(\n <Provider store={store}>\n <StyleSheetManager sheet={sheet.instance}>\n <ThemeProvider theme={theme}>{render()}</ThemeProvider>\n </StyleSheetManager>\n </Provider>,\n );\n\n const head = createHead(sheet);\n return template({\n contextPath: getContextPathServer(),\n html: appHTML,\n head,\n state: dehydrate(store),\n UUID,\n });\n};\n\nexport const createHead = (\n sheet: ServerStyleSheet,\n helmetContext?: Record<string, unknown>,\n): Record<string, unknown> => {\n const style = sheet.getStyleTags();\n const helmet = helmetContext?.helmet as {\n meta: Record<string, unknown>[];\n };\n const meta = helmetContext ? [...helmet.meta] : [];\n\n if (helmetContext) {\n return {\n ...helmet,\n style,\n meta,\n };\n }\n\n return {\n style,\n meta,\n };\n};\n","import type { ModularUIModel } from \"@beinformed/ui/models\";\nimport type { BEIStore } from \"../redux/store\";\n\nexport const dehydrate = (store: BEIStore): string => {\n const state = store.getState();\n\n const modularui: Record<\n string,\n {\n status: string;\n lastModification: number;\n model: ModularUIModel | undefined;\n }\n > = {};\n\n for (const key in state.modularui) {\n const modelEntry = state.modularui[key];\n if (modelEntry) {\n const { status, model, lastModification } = modelEntry;\n\n if (model) {\n modularui[key] = {\n status,\n lastModification,\n model,\n };\n } else {\n modularui[key] = {\n status,\n lastModification,\n model: undefined,\n };\n }\n }\n }\n\n const filteredState = {\n ...state,\n modularui,\n };\n\n return JSON.stringify(filteredState).replace(/</g, \"\\\\u003c\");\n};\n","import \"./contextPath\";\n\nimport { createUUID } from \"@beinformed/ui/utils\";\nimport has from \"lodash/has\";\n\nimport { setI18n } from \"../i18n/serverI18n\";\nimport { handleBeforeRenderHooks } from \"../redux/beforeRenderHooks\";\nimport { setupStore } from \"../redux/store\";\nimport { createTheme } from \"../theme/createTheme\";\nimport { setConfigurationTheme } from \"../theme/serverTheme\";\nimport { setApplication } from \"./application\";\nimport { renderSSRMinimal } from \"./renderSSRMinimal\";\nimport { getFullRequestLocation } from \"./requestInformation\";\nimport { setServerPreferences } from \"./serverPreferences\";\n\nimport type { Reducer } from \"@reduxjs/toolkit\";\nimport type React from \"react\";\nimport type { LocaleConfiguration } from \"../i18n/types\";\nimport type { BeforeRenderHook } from \"../redux/beforeRenderHooks\";\nimport type { BEIStore } from \"../redux/store\";\nimport type { Theme } from \"../theme/types\";\nimport type { TemplateProps } from \"./htmlpage\";\nimport type { ServerPreferenceValue } from \"./serverPreferences\";\nimport type { HttpServletRequestJava } from \"./types\";\n\ndeclare let __webpack_nonce__: string;\n\ninterface serverProps {\n request: HttpServletRequestJava;\n locales?: LocaleConfiguration[];\n customReducers?: Record<string, Reducer>;\n theme?: Theme | Theme[];\n serverPreferences?: (string | ServerPreferenceValue)[];\n render: () => React.ReactNode;\n template?: (arg0: TemplateProps) => string;\n beforeRenderHooks?: BeforeRenderHook[];\n preloadApplication?: boolean;\n}\n\nconst handleErrors = (s: BEIStore) => {\n const state = s.getState();\n\n if (\n state.error &&\n (state.error.shouldThrowOnServer ||\n !has(state.error, \"shouldThrowOnServer\"))\n ) {\n throw state.error;\n }\n};\n\nexport const serverNoSSR = ({\n request,\n locales,\n customReducers,\n serverPreferences = [],\n theme,\n render,\n template,\n beforeRenderHooks,\n preloadApplication = true,\n}: serverProps): string => {\n const isPreviewCheck = request.getHeader(\"X-BI-Preview-Available\");\n if (isPreviewCheck) {\n return \"<h1>Preview Available</h1>\";\n }\n\n const UUID = createUUID();\n __webpack_nonce__ = UUID; // NOSONAR\n\n const location = getFullRequestLocation(request);\n const reduxStore = setupStore(\n { router: { location, action: undefined } },\n customReducers,\n );\n\n setServerPreferences(reduxStore, serverPreferences);\n setConfigurationTheme(reduxStore);\n\n if (theme) {\n const storedTheme = reduxStore.getState()?.preferences\n ?.theme as unknown as Theme;\n createTheme(storedTheme, theme);\n }\n\n setI18n(reduxStore, locales, request);\n\n if (preloadApplication) {\n setApplication(reduxStore);\n }\n\n handleErrors(reduxStore);\n\n handleBeforeRenderHooks(beforeRenderHooks, { store: reduxStore, request });\n\n return renderSSRMinimal({ store: reduxStore, theme, UUID, render, template });\n};\n","import { setThemePreference } from \"../redux/preferences/preferencesActions\";\n\nimport type { BEIStore } from \"../redux/store\";\n\nexport const setConfigurationTheme = (store: BEIStore) => {\n let configTheme = null;\n\n const configFileLocation = preferencesProvider.getLayoutConfigFileLocation();\n if (typeof configFileLocation === \"string\") {\n const configFilePath = configFileLocation.startsWith(\"/\")\n ? `/resource${configFileLocation}`\n : `/resource/${configFileLocation}`;\n\n configTheme = dataFetcher.fetch(configFilePath);\n\n if (configTheme) {\n store.dispatch(setThemePreference(configTheme));\n } else {\n throw new Error(\n `Could not read theme configuration file from: ${configFilePath}`,\n );\n }\n }\n};\n","import {\n setAllContentInDataSetting,\n setDateTimeSettings,\n setLoginPreferences,\n setServerPreference,\n} from \"../redux/preferences/preferencesActions\";\nimport { setPreference } from \"../redux/preferences/preferencesReducer\";\n\nimport type { BEIStore } from \"../redux/store\";\n\nexport interface ServerPreferenceValue {\n name: string;\n defaultValue?: string | null;\n type?: string;\n}\n\nexport const setServerPreferencesFromArray = (\n store: BEIStore,\n serverPreferences: (string | ServerPreferenceValue)[],\n) => {\n serverPreferences.forEach((serverPreference) => {\n if (typeof serverPreference === \"object\") {\n const { name, defaultValue, type } = serverPreference;\n if (defaultValue) {\n store.dispatch(setServerPreference(name, defaultValue, type));\n }\n } else {\n store.dispatch(setServerPreference(serverPreference, null));\n }\n });\n};\n\n/**\n * Server preferences can be suplied by an array of preference names,\n * or an array of objects which has the name, an optional default value and an optional type.<br>\n * When the type is set to string, a comma separated value is not converted to an array:\n *\n * @example\n * // value becomes an array [default1, default2]\n * { name: \"prefName\", defaultValue: \"default1, default2\" }\n * // value remains a string \"default1, default2\"\n * { name: \"prefName\", defaultValue: \"default1, default2\", type: \"string\" }\n *\n * @param store\n * @param serverPreferences\n */\nexport const setServerPreferences = (\n store: BEIStore,\n serverPreferences: (string | ServerPreferenceValue)[],\n) => {\n if (Array.isArray(serverPreferences)) {\n setServerPreferencesFromArray(store, serverPreferences);\n }\n\n store.dispatch(setAllContentInDataSetting());\n store.dispatch(setLoginPreferences());\n store.dispatch(setDateTimeSettings());\n\n if (\n preferencesProvider &&\n preferencesProvider.isStudioContext &&\n preferencesProvider.isStudioContext()\n ) {\n store.dispatch(setPreference(\"isStudioContext\", true));\n }\n};\n","import \"styled-components\";\n\nimport type { ThemePropValue } from \"./theme/types\";\n\ndeclare module \"styled-components\" {\n export interface DefaultTheme {\n [key: string]: ThemePropValue;\n settings?: Record<string, Setting>;\n }\n}\n","import { useContext } from \"react\";\n\nimport { ThemeContext } from \"styled-components\";\n\nimport type { Theme } from \"./types\";\n\nconst useTheme = (): Theme | undefined => {\n return useContext(ThemeContext) as Theme | undefined;\n};\n\nexport { useTheme };\n","import get from \"lodash/get\";\n\nimport type { Theme, ThemePropValue } from \"../types\";\n\nexport const getProp = (\n theme: Partial<Theme> = {},\n path = \"\",\n defaultValue: ThemePropValue = \"\",\n) => {\n if (path === \"\") {\n return defaultValue;\n }\n const value = get(theme, path, defaultValue);\n if (!value) {\n return defaultValue;\n }\n return value;\n};\n\nexport const getThemeProp = (\n theme: Partial<Theme> = {},\n path = \"\",\n defaultValue: ThemePropValue = \"\",\n) => {\n const value = getProp(theme, path, defaultValue);\n\n if (\n value != null &&\n (typeof value === \"string\" ||\n typeof value === \"number\" ||\n typeof value === \"object\")\n ) {\n return value;\n }\n\n throw new Error(\n `${path} is not a string, number or plain object, but: ${value === null ? \"nuLl\" : typeof value}`,\n );\n};\n\nexport const getThemeStringProp = (\n theme: Partial<Theme> = {},\n path = \"\",\n defaultValue = \"\",\n) => {\n const value = getProp(theme, path, defaultValue);\n\n if (typeof value === \"string\") {\n return value;\n } else if (typeof value === \"number\") {\n return value.toString();\n }\n\n throw new Error(`${path} is not a string, but: ${typeof value}`);\n};\n\nexport const getThemeNumberProp = (\n theme: Partial<Theme> = {},\n path = \"\",\n defaultValue = 0,\n) => {\n const value = getProp(theme, path, defaultValue);\n\n if (typeof value === \"number\") {\n return value;\n }\n\n throw new Error(`${path} is not a number, but: ${typeof value}`);\n};\n\n/*\n * Retrieve property value from theme property of styled component\n */\nexport const themeProp =\n <T extends Theme>(\n path: string,\n defaultValue?: ThemePropValue,\n ): ((props: { theme: T }) => ThemePropValue) =>\n ({ theme }: { theme: T }) =>\n getThemeProp(theme, path, defaultValue);\n","import { getThemeProp } from \"./themeProps\";\n\nimport type { ThemePropValue, UtilThemeProps } from \"../types\";\n\nconst renderBackground =\n (\n path?: string,\n defaultValue?: string,\n ): ((arg0: UtilThemeProps) => ThemePropValue) =>\n ({ theme }: UtilThemeProps) => {\n const value = getThemeProp(theme, path, defaultValue);\n\n if (typeof value === \"string\") {\n return `background: ${value}`;\n }\n\n return value;\n };\n\nexport { renderBackground };\n","import { darken, hsl, lighten, parseToHsl } from \"polished\";\n\nimport { getThemeProp } from \"./themeProps\";\n\nimport type { ThemePropValue, UtilThemeProps } from \"../types\";\n\n/*\n * Themed color x amount darkened\n */\nconst darkenColor =\n (\n amount: number | string = \"\",\n path?: string,\n defaultValue?: ThemePropValue,\n ): ((arg0: UtilThemeProps) => string) =>\n ({ theme }: UtilThemeProps) =>\n darken(amount, String(getThemeProp(theme, path, defaultValue)));\n\n/*\n * Themed color x amount lightened\n */\nconst lightenColor =\n (\n amount: number | string = \"\",\n path?: string,\n defaultValue?: ThemePropValue,\n ): ((arg0: UtilThemeProps) => string) =>\n ({ theme }: UtilThemeProps) =>\n lighten(amount, String(getThemeProp(theme, path, defaultValue)));\n\n/*\n * Make a color lighter or darker in the same color family\n */\nconst changeHSL = (\n color: string,\n saturation?: number,\n lightness?: number,\n hueAdjustment = 0,\n): string => hsl(parseToHsl(color).hue + hueAdjustment, saturation, lightness);\n\nexport { darkenColor, lightenColor, changeHSL };\n","import { getLuminance, parseToRgb } from \"polished\";\n\nimport { getProp, getThemeStringProp } from \"./themeProps\";\n\nimport type { Theme, ThemePropValue, UtilThemeProps } from \"../types\";\n\n/**\n * calculate the contrast ratio of two colors\n */\nconst getColorContrast = (color1: string, color2: string) => {\n const luminance1 = getLuminance(color1);\n const luminance2 = getLuminance(color2);\n return parseFloat(\n (luminance1 > luminance2\n ? (luminance1 + 0.05) / (luminance2 + 0.05)\n : (luminance2 + 0.05) / (luminance1 + 0.05)\n ).toFixed(2),\n );\n};\n\n/*\n * The YIQ equation converts the RGB color (0 to 255) into a YIQ color space.\n * YIQ is the standard formula for calculating the perceived brightness of a color,\n * and is recommended by the World Wide Web Consortium (W3C).\n */\nconst getYIQ = (color: string): number => {\n const rgb = parseToRgb(color);\n\n return (rgb.red * 299 + rgb.green * 587 + rgb.blue * 114) / 1000;\n};\n\n/**\n * Get dark or light color, depending on the given color\n * When the contrast between the color and the light or dark color is too low,\n * the preferred color is returned\n */\nconst getContrastYIQ = (\n color: ThemePropValue,\n dark = \"#212529\",\n light = \"#fff\",\n preferredColor?: string,\n): string => {\n if (typeof color !== \"string\") {\n throw new Error(\n \"ContrastYIQ needs a string to retrieve color, received: \" + color,\n );\n }\n const yiqColor = getYIQ(color);\n\n if (preferredColor && getColorContrast(color, preferredColor) >= 4.5) {\n return preferredColor;\n }\n\n const darkColor = getYIQ(dark) < 127.5 ? dark : \"#212529\";\n const lightColor = getYIQ(light) > 127.5 ? light : \"#fff\";\n\n if (yiqColor > 127.5) {\n if (getColorContrast(color, darkColor) < 3) {\n return \"#212529\";\n }\n\n return darkColor;\n }\n\n if (getColorContrast(color, lightColor) < 3) {\n return \"#fff\";\n }\n return lightColor;\n};\n\nconst getBackgroundColor = (\n theme: Theme,\n bgColorProperty: string,\n defaultValue: string,\n) => {\n const bgColor = getProp(theme, bgColorProperty, defaultValue);\n\n if (\n typeof bgColor === \"object\" &&\n bgColor != null &&\n \"backgroundColor\" in bgColor\n ) {\n const { backgroundColor } = bgColor;\n if (typeof backgroundColor === \"string\") {\n return backgroundColor;\n }\n }\n\n if (typeof bgColor === \"string\") {\n return bgColor;\n }\n\n return defaultValue;\n};\n\n/**\n * Retrieve the contrast color for the given background property,\n * based on theme properties\n */\nconst renderContrastColor =\n (\n bgColorProperty = \"\",\n preferredColorProperty?: string,\n standardDarkProperty = \"YIQ_DARK_COLOR\",\n standardLightProperty = \"YIQ_LIGHT_COLOR\",\n ): ((arg0: UtilThemeProps) => string) =>\n ({ theme }: UtilThemeProps) => {\n const bgColor = getBackgroundColor(theme, bgColorProperty, \"#ffffff\");\n const preferredColor = getThemeStringProp(theme, preferredColorProperty);\n const darkColor = getThemeStringProp(\n theme,\n standardDarkProperty,\n \"#212529\",\n );\n const lightColor = getThemeStringProp(theme, standardLightProperty, \"#fff\");\n\n return getContrastYIQ(bgColor, darkColor, lightColor, preferredColor);\n };\n\nexport { getColorContrast, getYIQ, getContrastYIQ, renderContrastColor };\n","import { getThemeStringProp } from \"./themeProps\";\n\nimport type { UtilThemeProps } from \"../types\";\n\nconst DEFAULT_CORNER_PROPERTY = \"border-radius\";\n\n/*\n * Border radius based on the theme setting for rounded corners\n * When ROUNDED_CORNERS is not true in the theme, no rounded corners are returned\n */\nconst roundedCorners =\n (\n property: string = DEFAULT_CORNER_PROPERTY,\n path = \"BORDER_RADIUS\",\n defaultValue = \"0.25rem\",\n ): ((arg0: UtilThemeProps) => string) =>\n ({ theme }: UtilThemeProps) => {\n if (theme.ROUNDED_CORNERS) {\n const propertyName =\n property && property !== DEFAULT_CORNER_PROPERTY\n ? `border-${property}-radius`\n : DEFAULT_CORNER_PROPERTY;\n\n return `${propertyName}: ${getThemeStringProp(\n theme,\n path,\n defaultValue,\n )}`;\n }\n\n return \"\";\n };\n\nexport { roundedCorners };\n","import type { ComponentType, Ref } from \"react\";\n\nexport const getDisplayName = (\n WrappedComponent: ComponentType<never>,\n defaultName = \"Component\",\n contextId?: string,\n) => {\n const componentName =\n WrappedComponent.displayName || WrappedComponent.name || defaultName;\n\n if (contextId) {\n return `${componentName}[${contextId}]`;\n }\n\n return componentName;\n};\n\nexport const mergeRefs =\n <T>(refs: Ref<T>[]): Ref<T> =>\n (value) => {\n refs.forEach((ref) => {\n if (typeof ref === \"function\") {\n ref(value);\n } else if (ref != null && typeof ref === \"object\") {\n (ref as { current: T | null }).current = value;\n }\n });\n };\n"],"mappings":"woBAAA,IAAAA,GAAAC,EAAA,CAAAC,GAAAC,KAAA,cACA,IAAIC,GAAc,OAAO,UAGrBC,GAAiBD,GAAY,eAUjC,SAASE,GAAQC,EAAQC,EAAK,CAC5B,OAAOD,GAAU,MAAQF,GAAe,KAAKE,EAAQC,CAAG,CAC1D,CAEAL,GAAO,QAAUG,KClBjB,IAAAG,GAAAC,EAAA,CAAAC,GAAAC,KAAA,cAuBA,IAAIC,GAAU,MAAM,QAEpBD,GAAO,QAAUC,KCzBjB,IAAAC,GAAAC,EAAA,CAAAC,GAAAC,KAAA,cACA,IAAIC,GAAa,OAAO,QAAU,UAAY,QAAU,OAAO,SAAW,QAAU,OAEpFD,GAAO,QAAUC,KCHjB,IAAAC,GAAAC,EAAA,CAAAC,GAAAC,KAAA,kBAAIC,GAAa,KAGbC,G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IACG,CACH,IAAMC,EACJH,EAAiB,aAAeA,EAAiB,MAAQC,EAE3D,OAAIC,EACK,GAAGC,CAAa,IAAID,CAAS,IAG/BC,CACT,EAEaC,GACPC,GACHC,GAAU,CACTD,EAAK,QAASE,GAAQ,CAChB,OAAOA,GAAQ,WACjBA,EAAID,CAAK,EACAC,GAAO,MAAQ,OAAOA,GAAQ,WACtCA,EAA8B,QAAUD,EAE7C,CAAC,CACH","names":["require_baseHas","__commonJSMin","exports","module","objectProto","hasOwnProperty","baseHas","object","key","require_isArray","__commonJSMin","exports","module","isArray","require_freeGlobal","__commonJSMin","exports","module","freeGlobal","require_root","__commonJSMin","exports","module","freeGlobal","freeSelf","root","require_Symbol","__commonJSMin","exports","module","root","Symbol","require_getRawTag","__commonJSMin","exports","module","Symbol","objectProto","hasOwnProperty","nativeObjectToString","symToStringTag","getRawTag","value","isOwn","tag","unmasked","result","require_objectToString","__commonJSMin","exports","module","objectProto","nativeObjectToString","objectToString","value","require_baseGetTag","__commonJSMin","exports","module","Symbol","getRawTag","objectToString","nullTag","undefinedTag","symToStringTag","baseGetTag","value","require_isObjectLike","__commonJSMin","exports","module","isObjectLike","value","require_isSymbol","__commonJSMin","exports","module","baseGetTag","isObjectLike","symbolTag","isSymbol","value","require_isKey","__commonJSMin","exports","module","isArray","isSymbol","reIsDeepProp","reIsPlainProp","isKey","value","object","type","require_isObject","__commonJSMin","exports","module","isObject","value","type","require_isFunction","__commonJSMin","exports","module","baseGetTag","isObject","asyncTag","funcTag","genTag","proxyTag","isFunction","value","tag","require_coreJsData","__commonJSMin","exports","module","root","coreJsData","require_isMasked","__commonJSMin","exports","module","coreJsData","maskSrcKey","uid","isMasked","func","require_toSource","__commonJSMin","exports","module","funcProto","funcToString","toSource","func","require_baseIsNative","__commonJSMin","exports","module","isFunction","isMasked","isObject","toSource","reRegExpChar","reIsHostCtor","funcProto","objectProto","funcToString","hasOwnProperty","reIsNative","baseIsNative","value","pattern","require_getValue","__commonJSMin","exports","module","getValue","object","key","require_getNative","__commonJSMin","exports","module","baseIsNative","getValue","getNative","object","key","value","require_nativeCreate","__commonJSMin","exports","module","getNative","nativeCreate","require_hashClear","__commonJSMin","exports","module","nativeCreate","hashClear","require_hashDelete","__commonJSMin","exports","module","hashDelete","key","result","require_hashGet","__commonJSMin","exports","module","nativeCreate","HASH_UNDEFINED","objectProto","hasOwnProperty","hashGet","key","data","result","require_hashHas","__commonJSMin","exports","module","nativeCreate","objectProto","hasOwnProperty","hashHas","key","data","require_hashSet","__commonJSMin","exports","module","nativeCreate","HASH_UNDEFINED","hashSet","key","value","data","require_Hash","__commonJSMin","exports","module","hashClear","hashDelete","hashGet","hashHas","hashSet","Hash","entries","index","length","entry","require_listCacheClear","__commonJSMin","exports","module","listCacheClear","require_eq","__commonJSMin","exports","module","eq","value","other","require_assocIndexOf","__commonJSMin","exports","module","eq","assocIndexOf","array","key","length","require_listCacheDelete","__commonJSMin","exports","module","assocIndexOf","arrayProto","splice","listCacheDelete","key","data","index","lastIndex","require_listCacheGet","__commonJSMin","exports","module","assocIndexOf","listCacheGet","key","data","index","require_listCacheHas","__commonJSMin","exports","module","assocIndexOf","listCacheHas","key","require_listCacheSet","__commonJSMin","exports","module","assocIndexOf","listCacheSet","key","value","data","index","require_ListCache","__commonJSMin","exports","module","listCacheClear","listCacheDelete","listCacheGet","listCacheHas","listCacheSet","ListCache","entries","index","length","entry","require_Map","__commonJSMin","exports","module","getNative","root","Map","require_mapCacheClear","__commonJSMin","exports","module","Hash","ListCache","Map","mapCacheClear","require_isKeyable","__commonJSMin","exports","module","isKeyable","value","type","require_getMapData","__commonJSMin","exports","module","isKeyable","getMapData","map","key","data","require_mapCacheDelete","__commonJSMin","exports","module","getMapData","mapCacheDelete","key","result","require_mapCacheGet","__commonJSMin","exports","module","getMapData","mapCacheGet","key","require_mapCacheHas","__commonJSMin","exports","module","getMapData","mapCacheHas","key","require_mapCacheSet","__commonJSMin","exports","module","getMapData","mapCacheSet","key","value","data","size","require_MapCache","__commonJSMin","exports","module","mapCacheClear","mapCacheDelete","mapCacheGet","mapCacheHas","mapCacheSet","MapCache","entries","index","length","entry","require_memoize","__commonJSMin","exports","module","MapCache","FUNC_ERROR_TEXT","memoize","func","resolver","memoized","args","key","cache","result","require_memoizeCapped","__commonJSMin","exports","module","memoize","MAX_MEMOIZE_SIZE","memoizeCapped","func","result","key","cache","require_stringToPath","__commonJSMin","exports","module","memoizeCapped","rePropName","reEscapeChar","stringToPath","string","result","match","number","quote","subString","require_arrayMap","__commonJSMin","exports","module","arrayMap","array","iteratee","index","length","result","require_baseToString","__commonJSMin","exports","module","Symbol","arrayMap","isArray","isSymbol","INFINITY","symbolProto","symbolToString","baseToString","value","result","require_toString","__commonJSMin","exports","module","baseToString","toString","value","require_castPath","__commonJSMin","exports","module","isArray","isKey","stringToPath","toString","castPath","value","object","require_baseIsArguments","__commonJSMin","exports","module","baseGetTag","isObjectLike","argsTag","baseIsArguments","value","require_isArguments","__commonJSMin","exports","module","baseIsArguments","isObjectLike","objectProto","hasOwnProperty","propertyIsEnumerable","isArguments","value","require_isIndex","__commonJSMin","exports","module","MAX_SAFE_INTEGER","reIsUint","isIndex","value","length","type","require_isLength","__commonJSMin","exports","module","MAX_SAFE_INTEGER","isLength","value","require_toKey","__commonJSMin","exports","module","isSymbol","INFINITY","toKey","value","result","require_hasPath","__commonJSMin","exports","module","castPath","isArguments","isArray","isIndex","isLength","toKey","hasPath","object","path","hasFunc","index","length","result","key","require_has","__commonJSMin","exports","module","baseHas","hasPath","has","object","path","require_overArg","__commonJSMin","exports","module","overArg","func","transform","arg","require_getPrototype","__commonJSMin","exports","module","overArg","getPrototype","require_isPlainObject","__commonJSMin","exports","module","baseGetTag","getPrototype","isObjectLike","objectTag","funcProto","objectProto","funcToString","hasOwnProperty","objectCtorString","isPlainObject","value","proto","Ctor","require_arrayPush","__commonJSMin","exports","module","arrayPush","array","values","index","length","offset","require_isFlattenable","__commonJSMin","exports","module","Symbol","isArguments","isArray","spreadableSymbol","isFlattenable","value","require_baseFlatten","__commonJSMin","exports","module","arrayPush","isFlattenable","baseFlatten","array","depth","predicate","isStrict","result","index","length","value","require_flattenDeep","__commonJSMin","exports","module","baseFlatten","INFINITY","flattenDeep","array","length","require_now","__commonJSMin","exports","module","root","now","require_trimmedEndIndex","__commonJSMin","exports","module","reWhitespace","trimmedEndIndex","string","index","require_baseTrim","__commonJSMin","exports","module","trimmedEndIndex","reTrimStart","baseTrim","string","require_toNumber","__commonJSMin","exports","module","baseTrim","isObject","isSymbol","NAN","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","toNumber","value","other","isBinary","require_debounce","__commonJSMin","exports","module","isObject","now","toNumber","FUNC_ERROR_TEXT","nativeMax","nativeMin","debounce","func","wait","options","lastArgs","lastThis","maxWait","result","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","invokeFunc","time","args","thisArg","leadingEdge","timerExpired","remainingWait","timeSinceLastCall","timeSinceLastInvoke","timeWaiting","shouldInvoke","trailingEdge","cancel","flush","debounced","isInvoking","require_baseGet","__commonJSMin","exports","module","castPath","toKey","baseGet","object","path","index","length","require_defineProperty","__commonJSMin","exports","module","getNative","defineProperty","func","require_baseAssignValue","__commonJSMin","exports","module","defineProperty","baseAssignValue","object","key","value","require_assignValue","__commonJSMin","exports","module","baseAssignValue","eq","objectProto","hasOwnProperty","assignValue","object","key","value","objValue","require_baseSet","__commonJSMin","exports","module","assignValue","castPath","isIndex","isObject","toKey","baseSet","object","path","value","customizer","index","length","lastIndex","nested","key","newValue","objValue","require_basePickBy","__commonJSMin","exports","module","baseGet","baseSet","castPath","basePickBy","object","paths","predicate","index","length","result","path","value","require_baseHasIn","__commonJSMin","exports","module","baseHasIn","object","key","require_hasIn","__commonJSMin","exports","module","baseHasIn","hasPath","hasIn","object","path","require_basePick","__commonJSMin","exports","module","basePickBy","hasIn","basePick","object","paths","value","path","require_flatten","__commonJSMin","exports","module","baseFlatten","flatten","array","length","require_apply","__commonJSMin","exports","module","apply","func","thisArg","args","require_overRest","__commonJSMin","exports","module","apply","nativeMax","overRest","func","start","transform","args","index","length","array","otherArgs","require_constant","__commonJSMin","exports","module","constant","value","require_identity","__commonJSMin","exports","module","identity","value","require_baseSetToString","__commonJSMin","exports","module","constant","defineProperty","identity","baseSetToString","func","string","require_shortOut","__commonJSMin","exports","module","HOT_COUNT","HOT_SPAN","nativeNow","shortOut","func","count","lastCalled","stamp","remaining","require_setToString","__commonJSMin","exports","module","baseSetToString","shortOut","setToString","require_flatRest","__commonJSMin","exports","module","flatten","overRest","setToString","flatRest","func","require_pick","__commonJSMin","exports","module","basePick","flatRest","pick","object","paths","require_get","__commonJSMin","exports","module","baseGet","get","object","path","defaultValue","result","src_exports","__export","AUTOSAVE_STATUS","ErrorBoundary","ErrorBoundaryFallback","Init","Locale","Locales","MODULARUI_STATUS","NOTIFICATION_TYPES","ThemeProvider","addContentLoadedEvent","addRepeatableAttributeSet","allKeysByHref","authReducer","autosaveFormObject","autosubmitFormObject","autoupdateFormObject","availableLocales","cancelForm","cancelRepeatableAttributeSet","changeHSL","changePassword","client","closeModal","createHead","createLocalesWithConfiguredErrors","createTheme","darkenColor","dehydrate","dismissNotification","errorReducer","fetchModel","getApplication","getBrowserHistory","getColorContrast","getContrastYIQ","getCookieFromRequest","getDataFromServer","getDisplayName","getEntryDate","getFirstModelByInstance","getFullRequestLocation","getFullRequestUrl","getLocale","getLocales","getPreferredLocale","getProp","getRequestLocale","getThemeNumberProp","getThemeProp","getThemeStringProp","getYIQ","go","goBack","goForward","gutter","handleBeforeRenderHooks","handleError","handleUnauthorized","htmlpage","i18nReducer","initModels","languages","lightenColor","locationChange","login","loginFailed","loginSuccess","logout","logoutSuccess","mergeRefs","modalsReducer","modelCatalogReducer","modularUIReducer","noAction","notificationReducer","preferencesReducer","previousObject","progressIndicatorReducer","push","receiveLocale","rehydrate","reloadApplication","reloadModel","removeModelByKey","removeRepeatableAttributeSet","renderBackground","renderContrastColor","renderSSRMinimal","replace","resetAuthErrors","resetModularUI","roundedCorners","routerMiddleware","routerReducer","saveChangePassword","saveError","sendAuthenticationError","serverNoSSR","setAllContentInDataSetting","setApplication","setConfigurationTheme","setCustomErrorResponseHandler","setDateTimeSettings","setI18n","setLocales","setLoginPreferences","setModel","setModelCatalogEntryDate","setPreference","setPreferences","setServerPreference","setServerPreferences","setServerPreferencesFromArray","setThemePreference","setUnhandledRejectionEvent","setupClient","setupStore","showFormNotification","showModal","showNotification","showXHRErrorNotification","spacer","spacers","themeProp","updateEntryDate","updateErrorStatus","updateForm","updateFormAttribute","updateLocale","updateModel","useApplication","useAttributeUpdate","useBEIDispatch","useBEISelector","useBEIStore","useCaseView","useCompleteSource","useConceptDetail","useConceptIndex","useConceptSearch","useContent","useContentFromSourceReferences","useContentIndex","useContentSearch","useContentTOC","useContentType","useDeepCompareEffect","useDetailPanel","useEntryDate","useErrorNotification","useForm","useFormNavigation","useGroupingPanel","useList","useListDetail","useListOrDetail","useLocale","useLocaleCodes","useLocation","useLocationKey","useLogin","useLogout","useMessage","useModal","useModelCatalog","useModels","useModularUI","useModularUIBasic","useModularUIRequest","useNavigation","useNotification","usePanel","usePathname","usePreference","useProgressIndicator","useQuerystring","useQuicksearch","useRelatedConcepts","useRepeatableAttributeSet","useRetrieveFormsOnModel","useSearch","useTab","useTheme","useTranslate","useUserProfile","validateFormObject","__toCommonJS","import_settings","import_utils","import_client","import_toolkit","initalState","loginSuccess","logoutSuccess","sendAuthenticationError","errorMessage","resetAuthErrors","saveChangePassword","authReducer","builder","state","action","handleBeforeRenderHooks","beforeRenderHooks","props","beforeRenderHook","import_exceptions","import_models","import_modularui","import_has","import_exceptions","import_models","import_exceptions","import_settings","import_format_message","import_immer","languages","Locale","#code","#messages","#errors","#nativeName","locale","formatMessage","languageCode","language","languages","message","messages","id","defaultMessage","messageFromLocale","parameters","errors","beinformed_error_messages_en_nl_default","beinformed_error_messages_nl_nl_default","availableLocales","beinformed_error_messages_en_nl_default","beinformed_error_messages_nl_nl_default","createLocalesWithConfiguredErrors","configuredErrors","availableLocale","Locales","_Locales","locales","locale","Locale","hydatedLocales","localeCode","item","acceptLanguageHeader","preferredLocales","messages","errors","recreateModel","data","modelData","Model","model","childModels","childModel","d","isModularUIModelData","has","rehydratedValue","stateKey","stateValue","stateItem","rehydrate","Locales","state","mappedState","getDataFromServer","dataElement","data","json","rehydrate","import_utils","import_toolkit","updateEntryDate","entryDate","initialState","modelCatalogReducer","builder","state","action","import_settings","import_toolkit","import_toolkit","startProgress","finishProgress","resetProgress","updateProgress","percentComplete","import_toolkit","NOTIFICATION_TYPES","saveNotification","type","message","error","showNotification","timeout","dispatch","dismissNotification","initialState","notificationReducer","builder","state","action","getNotificationMessageId","form","showFormNotification","dispatch","startProgress","showNotification","dismissNotification","finishProgress","showXHRErrorNotification","error","import_constants","import_exceptions","import_settings","import_isPlainObject","import_toolkit","setPreference","propertyName","propertyValue","setPreferences","preferences","initialState","preferencesReducer","builder","state","action","key","value","getServerPreferenceValue","preferenceName","defaultValue","type","value","val","setServerPreference","propertyName","setPreference","setThemePreference","configTheme","themeData","error","isPlainObject","setAllContentInDataSetting","state","allContentInDataSetting","setDateTimeSettings","isIncludeTimeOffsetInDateTimes","setLoginPreferences","loginSettings","setPreferences","import_settings","import_history","browserHistoryInstance","historyContextPath","getBrowserHistory","contextPathServer","import_toolkit","push","location","state","replace","go","delta","goBack","goForward","import_toolkit","initialState","locationChange","location","action","routerReducer","builder","state","import_toolkit","import_toolkit","saveError","error","initialState","errorReducer","builder","_state","action","import_utils","import_toolkit","receiveLocale","locale","updateLocale","setLocales","locales","getDefaultLocale","initialState","Locales","i18nReducer","builder","state","action","import_toolkit","showModal","key","closeModal","initialState","modalsReducer","builder","state","action","modal","existing","last","import_models","import_toolkit","MODULARUI_STATUS","import_constants","import_models","import_modularui","import_toolkit","import_constants","import_models","import_settings","import_settings","import_utils","import_toolkit","import_models","import_toolkit","getLocale","state","getLocales","import_toolkit","updateErrorStatus","key","error","setModel","model","initModels","models","updateModel","updateForm","removeModelByKey","resetModularUI","import_models","getFirstModelByInstance","state","instance","locale","modularui","key","modelEntry","allKeysByHref","href","findHref","import_models","getApplication","state","locale","modularui","key","modelEntry","reloadApplication","_","dispatch","getState","state","applicationHref","application","getApplication","allKeys","allKeysByHref","key","removeModelByKey","modelKey","getLocale","fetchModel","handleUnauthorized","errorResponse","dispatch","getState","removeModelByKey","application","getApplication","reloadApplication","logoutSuccess","sendAuthenticationError","location","LOGIN_PATH","locationFrom","replace","import_toolkit","noAction","defaultErrorResponseHandler","error","dispatch","noAction","handleUnauthorized","push","saveChangePassword","saveError","showXHRErrorNotification","customErrorResponseHandler","defaultHandler","setCustomErrorResponseHandler","handler","handleError","errorResponse","getRequestLocale","optionLocale","currentStateLocale","executeRequest","key","href","options","dispatch","getState","rejectWithValue","locale","getRequestLocale","requestHref","model","error","errorResponse","removeModelByKey","updateErrorStatus","handleError","fetchModel","initialState","handleUpdateErrorStatus","state","action","key","error","handleSetModel","model","handleInitModel","payload","handleUpdateModel","modelKey","handleRemoveModelByKey","handleResetModularUI","handleFetchModelPending","handleFetchModelFulfilled","updateHandler","finalModel","handleFetchModelRejected","modularUIReducer","builder","updateErrorStatus","setModel","initModels","updateModel","updateForm","removeModelByKey","resetModularUI","fetchModel","import_toolkit","initialState","handleStartProgress","state","handleEndProgress","isFinalFinish","handleRejectedProgress","progressIndicatorReducer","builder","startProgress","finishProgress","resetProgress","updateProgress","action","fetchModel","routerMiddleware","history","_storeApi","next","action","push","location","state","replace","go","delta","goBack","goForward","reducers","routerReducer","preferencesReducer","modularUIReducer","i18nReducer","authReducer","errorReducer","modalsReducer","modelCatalogReducer","notificationReducer","progressIndicatorReducer","rootReducers","setupStore","preloadedState","customReducers","history","getBrowserHistory","reducer","getDefaultMiddleware","routerMiddleware","import_settings","import_flattenDeep","import_isPlainObject","replacePlaceholders","inputTheme","possibleKeys","key","re","value","match","capture","replacement","generateTheme","storedTheme","themeElements","storedSettings","generatedTheme","element","isPlainObject","generatedSettings","createTheme","themeConfigs","flattenConfig","flattenDeep","el","customTheme","import_react_helmet","import_react_redux","import_react_router","import_react","import_styled_components","import_big","getSize","theme","ratio","path","unit","Big","spacer","spacers","ratios","gutter","import_jsx_runtime","StyledBoundary","styled","spacers","spacer","StyledStack","ErrorBoundaryFallback","className","componentStack","error","import_jsx_runtime","ErrorBoundary","ErrorBoundaryFallback","error","errorInfo","children","FallbackComponent","import_styled_components","import_react_redux","useBEIDispatch","useBEISelector","useBEIStore","import_jsx_runtime","ThemeProvider","theme","children","storedTheme","useBEISelector","state","finalTheme","createTheme","SCThemeProvider","import_jsx_runtime","Init","store","routerHistory","theme","children","ErrorFallbackComponent","ThemeProvider","ErrorBoundary","import_jsx_runtime","setUnhandledRejectionEvent","store","event","errorMessage","showXHRErrorNotification","initThemeSettings","state","theme","storedTheme","createTheme","handleRedirectURI","redirectURI","e","LOGIN_PATH","replace","setModelCatalogEntryDate","entryDateFromUrl","updateEntryDate","entryDate","setupClient","customReducers","beforeRenderHooks","settings","contextPath","reduxStore","setupStore","getDataFromServer","setAllContentInDataSetting","setLoginPreferences","setDateTimeSettings","loginSuccess","getBrowserHistory","location","action","locationChange","handleBeforeRenderHooks","addContentLoadedEvent","render","mount","ErrorFallbackComponent","applicationNode","Init","mountClient","element","client","dataElement","contextPath","filePath","nonce","import_react","import_constants","import_models","import_modularui","import_reselect","getModularUIRequest","getLocale","localeCode","href","options","request","useModularUIRequest","useBEISelector","useRetrieveFormsOnModel","model","modularui","useModularUIRequest","forms","setForms","requestCount","setRequestCount","responseCount","setResponseCount","requests","getActions","action","href","form","responses","actionForms","allActions","listItem","updateActions","actions","unique","import_constants","import_exceptions","import_settings","import_utils","import_constants","import_modularui","import_utils","import_toolkit","loginFailed","errorMessage","sendAuthenticationError","changePassword","_","getState","isModal","locationFrom","push","login","username","password","dispatch","startProgress","reloadApplication","getApplication","loginSuccess","finishProgress","error","import_modularui","import_toolkit","logout","_","dispatch","startProgress","resetModularUI","reloadApplication","logoutSuccess","finishProgress","useLogin","dispatch","useBEIDispatch","application","useBEISelector","getApplication","auth","state","isAuthenticated","resetAuthErrors","username","password","login","authenticationType","useLogout","LOGOUT_PATH","BASE_PATH","origin","url","logout","import_react","import_modularui","import_memoize","import_reselect","getMessage","getLocales","getLocale","locales","localeCode","memoize","id","defaultMessage","placeholders","args","useMessage","useBEISelector","useTranslate","useLocale","getLocaleCodes","state","locale","useLocaleCodes","useProgressIndicator","dispatch","useBEIDispatch","useBEISelector","state","startProgress","finishProgress","resetProgress","percentComplete","updateProgress","useContentFromSourceReferences","sourceReferences","renderChildSections","content","setContent","localeCode","useLocale","start","finish","useProgressIndicator","hrefs","sourceReference","href","index","self","allHrefs","requests","modularuiRequest","responseContent","import_react","import_lite","useDeepCompareMemoize","value","ref","signalRef","deepEqual","useDeepCompareEffect","callback","dependencies","import_constants","import_models","import_settings","import_immer","import_settings","import_toolkit","import_immer","import_constants","import_models","import_modularui","import_settings","import_debounce","AUTOSAVE_STATUS","updateAutosave","status","model","autosave","dispatch","form","formdata","savedForm","updateForm","debouncedAutosave","debounce","autosaveFormObject","import_constants","import_models","import_immer","autosubmitFormObject","form","attribute","forceUpdate","fetchModel","newModel","draft","import_constants","import_models","import_immer","autoupdateFormObject","form","attribute","fetchModel","newModel","draft","import_constants","import_models","import_modularui","import_settings","import_toolkit","import_immer","import_debounce","updateValidations","form","formWithValidations","dispatch","getState","currentFormEntry","currentForm","validatedForm","draft","updateForm","debouncedValidateFormObject","debounce","validateFormObject","updateFormAttribute","form","formObject","attribute","inputvalue","options","dispatch","newForm","draft","completeObject","autosubmitAction","autosubmitFormObject","autoupdateAction","autoupdateFormObject","handleAutoSave","handleValidate","updateForm","autosaveFormObject","validateFormObject","import_modularui","import_toolkit","import_immer","previousObject","form","newForm","draft","updateForm","cancelForm","dispatch","getState","startProgress","logoutSuccess","reloadApplication","finishProgress","goBack","import_immer","addRepeatableAttributeSet","form","newForm","draft","updateForm","cancelRepeatableAttributeSet","formObject","removeRepeatableAttributeSet","import_react","import_constants","import_models","import_react_router","useKeyForHook","modelKey","url","locale","useLocale","useModularUI","options","dispatch","useBEIDispatch","href","key","modelSelector","state","model","useBEISelector","location","redirectLocation","forceLoad","prevOptions","prevHref","prevForceLoad","useDeepCompareEffect","isOldReload","doForceLoad","fetchModel","removeModelByKey","useForm","href","data","formHref","form","useModularUI","useFormNavigation","dispatch","useBEIDispatch","previousObject","cancelForm","fetchModel","newModel","draft","removeModelByKey","showFormNotification","useAttributeUpdate","formObject","attribute","inputvalue","options","updateFormAttribute","useRepeatableAttributeSet","addRepeatableAttributeSet","object","cancelRepeatableAttributeSet","removeRepeatableAttributeSet","import_react","import_exceptions","useModal","modalId","dispatch","useBEIDispatch","modal","useBEISelector","state","m","show","showModal","close","closeModal","import_models","import_utils","getEntryDate","state","isoDate","import_react","useLocation","useBEISelector","state","useLocationKey","useQuerystring","usePathname","useNavigation","dispatch","useBEIDispatch","location","push","replace","delta","go","goBack","goForward","createUseModularUIOptions","options","href","location","baseOptions","validateModel","model","expectedModels","expectedModel","useModularUIBasic","key","useLocation","memoizedHref","useModularUIOptions","modularUI","useModularUI","useModelCatalog","options","useModularUIBasic","useConceptIndex","href","key","entryDate","useEntryDate","url","useConceptDetail","concept","location","useLocation","useContentIndex","useContentTOC","content","useContent","useCompleteSource","contentHref","useContentType","contentType","useRelatedConcepts","getSearchHref","uri","filters","filterString","filterValue","value","useConceptSearch","useContentSearch","dispatch","useBEIDispatch","useBEISelector","getEntryDate","updateEntryDate","import_reselect","reloadModel","model","options","fetchModel","useModels","dispatch","useBEIDispatch","selector","state","modularui","models","keys","key","model","modularuiModels","useBEISelector","options","reloadModel","callbackFn","modelsToReload","modelToReload","import_models","useApplication","options","useModularUIBasic","useTab","href","useCaseView","usePanel","useList","useListOrDetail","useListDetail","useGroupingPanel","useDetailPanel","useQuicksearch","useSearch","useUserProfile","useNotification","dispatch","useBEIDispatch","render","messageType","message","error","useBEISelector","state","dismissNotification","useErrorNotification","showNotification","import_react","import_pick","import_reselect","getPreferences","state","makeSelectPreference","preferenceNames","names","preferences","pick","usePreference","selectPreference","useBEISelector","import_polished","import_jsx_runtime","Message","className","id","defaultMessage","children","data","screenreaderOnly","allowHTML","translatedMessage","useMessage","styles","import_exceptions","import_settings","import_deepmerge","encodeQueryString","queryString","params","part","key","value","getFullRequestUrl","request","pathInfo","segment","getFullRequestLocation","getCookieFromRequest","cookieName","getPreferredLocale","locales","acceptLanguageHeader","setI18n","store","locales","request","mergedLocales","availableLocales","locale","code","customLocale","custLocale","deepmerge","enabledLocales","localesInstance","Locales","preferredLocale","getPreferredLocale","setLocales","import_modularui","setApplication","store","locale","getLocale","application","initModels","import_settings","htmlpage","props","head","key","import_settings","import_server","import_react_redux","import_styled_components","dehydrate","store","state","modularui","key","modelEntry","status","model","lastModification","filteredState","import_jsx_runtime","renderSSRMinimal","store","theme","UUID","render","template","htmlpage","sheet","appHTML","ThemeProvider","head","createHead","dehydrate","helmetContext","style","helmet","meta","import_utils","import_has","setConfigurationTheme","store","configTheme","configFileLocation","configFilePath","setThemePreference","setServerPreferencesFromArray","store","serverPreferences","serverPreference","name","defaultValue","type","setServerPreference","setServerPreferences","setAllContentInDataSetting","setLoginPreferences","setDateTimeSettings","setPreference","handleErrors","s","state","has","serverNoSSR","request","locales","customReducers","serverPreferences","theme","render","template","beforeRenderHooks","preloadApplication","UUID","location","getFullRequestLocation","reduxStore","setupStore","setServerPreferences","setConfigurationTheme","storedTheme","createTheme","setI18n","setApplication","handleBeforeRenderHooks","renderSSRMinimal","import_styled_components","import_react","import_styled_components","useTheme","import_get","getProp","theme","path","defaultValue","value","get","getThemeProp","getThemeStringProp","getThemeNumberProp","themeProp","renderBackground","path","defaultValue","theme","value","getThemeProp","import_polished","darkenColor","amount","path","defaultValue","theme","getThemeProp","lightenColor","changeHSL","color","saturation","lightness","hueAdjustment","import_polished","getColorContrast","color1","color2","luminance1","luminance2","getYIQ","color","rgb","getContrastYIQ","dark","light","preferredColor","yiqColor","darkColor","lightColor","getBackgroundColor","theme","bgColorProperty","defaultValue","bgColor","getProp","backgroundColor","renderContrastColor","preferredColorProperty","standardDarkProperty","standardLightProperty","getThemeStringProp","DEFAULT_CORNER_PROPERTY","roundedCorners","property","path","defaultValue","theme","getThemeStringProp","getDisplayName","WrappedComponent","defaultName","contextId","componentName","mergeRefs","refs","value","ref"]}
|