{"version":3,"sources":["node_modules/@ngrx/store-devtools/fesm2022/ngrx-store-devtools.mjs","projects/insight/src/app/state/reducers/company-context.reducer.ts","projects/insight/src/app/state/reducers/configuration.reducer.ts","projects/insight/src/app/state/reducers/navtree.reducer.ts","projects/insight/src/app/state/reducers/organization.reducer.ts","projects/insight/src/app/state/reducers/survey-ui.reducer.ts","projects/insight/src/app/state/reducers/user-info.reducer.ts","projects/insight/src/app/state/reducers/user-state.reducer.ts","projects/insight/src/app/app-routing.module.ts","projects/insight/src/app/app.component.ts","projects/insight/src/app/app.component.html","projects/insight/src/app/prototype/array.ts","projects/insight/src/app/app.module.ts","projects/insight/src/main.ts"],"sourcesContent":["import * as i0 from '@angular/core';\nimport { InjectionToken, inject, NgZone, Injectable, Inject, makeEnvironmentProviders, NgModule } from '@angular/core';\nimport * as i2 from '@ngrx/store';\nimport { ActionsSubject, UPDATE, INIT, INITIAL_STATE, StateObservable, ReducerManagerDispatcher } from '@ngrx/store';\nimport { EMPTY, Observable, of, merge, queueScheduler, ReplaySubject } from 'rxjs';\nimport { share, filter, map, concatMap, timeout, debounceTime, catchError, take, takeUntil, switchMap, skip, observeOn, withLatestFrom, scan } from 'rxjs/operators';\nimport { toSignal } from '@angular/core/rxjs-interop';\nconst PERFORM_ACTION = 'PERFORM_ACTION';\nconst REFRESH = 'REFRESH';\nconst RESET = 'RESET';\nconst ROLLBACK = 'ROLLBACK';\nconst COMMIT = 'COMMIT';\nconst SWEEP = 'SWEEP';\nconst TOGGLE_ACTION = 'TOGGLE_ACTION';\nconst SET_ACTIONS_ACTIVE = 'SET_ACTIONS_ACTIVE';\nconst JUMP_TO_STATE = 'JUMP_TO_STATE';\nconst JUMP_TO_ACTION = 'JUMP_TO_ACTION';\nconst IMPORT_STATE = 'IMPORT_STATE';\nconst LOCK_CHANGES = 'LOCK_CHANGES';\nconst PAUSE_RECORDING = 'PAUSE_RECORDING';\nclass PerformAction {\n constructor(action, timestamp) {\n this.action = action;\n this.timestamp = timestamp;\n this.type = PERFORM_ACTION;\n if (typeof action.type === 'undefined') {\n throw new Error('Actions may not have an undefined \"type\" property. ' + 'Have you misspelled a constant?');\n }\n }\n}\nclass Refresh {\n constructor() {\n this.type = REFRESH;\n }\n}\nclass Reset {\n constructor(timestamp) {\n this.timestamp = timestamp;\n this.type = RESET;\n }\n}\nclass Rollback {\n constructor(timestamp) {\n this.timestamp = timestamp;\n this.type = ROLLBACK;\n }\n}\nclass Commit {\n constructor(timestamp) {\n this.timestamp = timestamp;\n this.type = COMMIT;\n }\n}\nclass Sweep {\n constructor() {\n this.type = SWEEP;\n }\n}\nclass ToggleAction {\n constructor(id) {\n this.id = id;\n this.type = TOGGLE_ACTION;\n }\n}\nclass SetActionsActive {\n constructor(start, end, active = true) {\n this.start = start;\n this.end = end;\n this.active = active;\n this.type = SET_ACTIONS_ACTIVE;\n }\n}\nclass JumpToState {\n constructor(index) {\n this.index = index;\n this.type = JUMP_TO_STATE;\n }\n}\nclass JumpToAction {\n constructor(actionId) {\n this.actionId = actionId;\n this.type = JUMP_TO_ACTION;\n }\n}\nclass ImportState {\n constructor(nextLiftedState) {\n this.nextLiftedState = nextLiftedState;\n this.type = IMPORT_STATE;\n }\n}\nclass LockChanges {\n constructor(status) {\n this.status = status;\n this.type = LOCK_CHANGES;\n }\n}\nclass PauseRecording {\n constructor(status) {\n this.status = status;\n this.type = PAUSE_RECORDING;\n }\n}\n\n/**\n * Chrome extension documentation\n * @see https://github.com/reduxjs/redux-devtools/blob/main/extension/docs/API/Arguments.md\n * Firefox extension documentation\n * @see https://github.com/zalmoxisus/redux-devtools-extension/blob/master/docs/API/Arguments.md\n */\nclass StoreDevtoolsConfig {\n constructor() {\n /**\n * Maximum allowed actions to be stored in the history tree (default: `false`)\n */\n this.maxAge = false;\n }\n}\nconst STORE_DEVTOOLS_CONFIG = new InjectionToken('@ngrx/store-devtools Options');\n/**\n * Used to provide a `StoreDevtoolsConfig` for the store-devtools.\n */\nconst INITIAL_OPTIONS = new InjectionToken('@ngrx/store-devtools Initial Config');\nfunction noMonitor() {\n return null;\n}\nconst DEFAULT_NAME = 'NgRx Store DevTools';\nfunction createConfig(optionsInput) {\n const DEFAULT_OPTIONS = {\n maxAge: false,\n monitor: noMonitor,\n actionSanitizer: undefined,\n stateSanitizer: undefined,\n name: DEFAULT_NAME,\n serialize: false,\n logOnly: false,\n autoPause: false,\n trace: false,\n traceLimit: 75,\n // Add all features explicitly. This prevent buggy behavior for\n // options like \"lock\" which might otherwise not show up.\n features: {\n pause: true,\n // Start/pause recording of dispatched actions\n lock: true,\n // Lock/unlock dispatching actions and side effects\n persist: true,\n // Persist states on page reloading\n export: true,\n // Export history of actions in a file\n import: 'custom',\n // Import history of actions from a file\n jump: true,\n // Jump back and forth (time travelling)\n skip: true,\n // Skip (cancel) actions\n reorder: true,\n // Drag and drop actions in the history list\n dispatch: true,\n // Dispatch custom actions or action creators\n test: true // Generate tests for the selected actions\n },\n connectInZone: false\n };\n const options = typeof optionsInput === 'function' ? optionsInput() : optionsInput;\n const logOnly = options.logOnly ? {\n pause: true,\n export: true,\n test: true\n } : false;\n const features = options.features || logOnly || DEFAULT_OPTIONS.features;\n if (features.import === true) {\n features.import = 'custom';\n }\n const config = Object.assign({}, DEFAULT_OPTIONS, {\n features\n }, options);\n if (config.maxAge && config.maxAge < 2) {\n throw new Error(`Devtools 'maxAge' cannot be less than 2, got ${config.maxAge}`);\n }\n return config;\n}\nfunction difference(first, second) {\n return first.filter(item => second.indexOf(item) < 0);\n}\n/**\n * Provides an app's view into the state of the lifted store.\n */\nfunction unliftState(liftedState) {\n const {\n computedStates,\n currentStateIndex\n } = liftedState;\n // At start up NgRx dispatches init actions,\n // When these init actions are being filtered out by the predicate or safe/block list options\n // we don't have a complete computed states yet.\n // At this point it could happen that we're out of bounds, when this happens we fall back to the last known state\n if (currentStateIndex >= computedStates.length) {\n const {\n state\n } = computedStates[computedStates.length - 1];\n return state;\n }\n const {\n state\n } = computedStates[currentStateIndex];\n return state;\n}\nfunction unliftAction(liftedState) {\n return liftedState.actionsById[liftedState.nextActionId - 1];\n}\n/**\n * Lifts an app's action into an action on the lifted store.\n */\nfunction liftAction(action) {\n return new PerformAction(action, +Date.now());\n}\n/**\n * Sanitizes given actions with given function.\n */\nfunction sanitizeActions(actionSanitizer, actions) {\n return Object.keys(actions).reduce((sanitizedActions, actionIdx) => {\n const idx = Number(actionIdx);\n sanitizedActions[idx] = sanitizeAction(actionSanitizer, actions[idx], idx);\n return sanitizedActions;\n }, {});\n}\n/**\n * Sanitizes given action with given function.\n */\nfunction sanitizeAction(actionSanitizer, action, actionIdx) {\n return {\n ...action,\n action: actionSanitizer(action.action, actionIdx)\n };\n}\n/**\n * Sanitizes given states with given function.\n */\nfunction sanitizeStates(stateSanitizer, states) {\n return states.map((computedState, idx) => ({\n state: sanitizeState(stateSanitizer, computedState.state, idx),\n error: computedState.error\n }));\n}\n/**\n * Sanitizes given state with given function.\n */\nfunction sanitizeState(stateSanitizer, state, stateIdx) {\n return stateSanitizer(state, stateIdx);\n}\n/**\n * Read the config and tell if actions should be filtered\n */\nfunction shouldFilterActions(config) {\n return config.predicate || config.actionsSafelist || config.actionsBlocklist;\n}\n/**\n * Return a full filtered lifted state\n */\nfunction filterLiftedState(liftedState, predicate, safelist, blocklist) {\n const filteredStagedActionIds = [];\n const filteredActionsById = {};\n const filteredComputedStates = [];\n liftedState.stagedActionIds.forEach((id, idx) => {\n const liftedAction = liftedState.actionsById[id];\n if (!liftedAction) return;\n if (idx && isActionFiltered(liftedState.computedStates[idx], liftedAction, predicate, safelist, blocklist)) {\n return;\n }\n filteredActionsById[id] = liftedAction;\n filteredStagedActionIds.push(id);\n filteredComputedStates.push(liftedState.computedStates[idx]);\n });\n return {\n ...liftedState,\n stagedActionIds: filteredStagedActionIds,\n actionsById: filteredActionsById,\n computedStates: filteredComputedStates\n };\n}\n/**\n * Return true is the action should be ignored\n */\nfunction isActionFiltered(state, action, predicate, safelist, blockedlist) {\n const predicateMatch = predicate && !predicate(state, action.action);\n const safelistMatch = safelist && !action.action.type.match(safelist.map(s => escapeRegExp(s)).join('|'));\n const blocklistMatch = blockedlist && action.action.type.match(blockedlist.map(s => escapeRegExp(s)).join('|'));\n return predicateMatch || safelistMatch || blocklistMatch;\n}\n/**\n * Return string with escaped RegExp special characters\n * https://stackoverflow.com/a/6969486/1337347\n */\nfunction escapeRegExp(s) {\n return s.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\nfunction injectZoneConfig(connectInZone) {\n const ngZone = connectInZone ? inject(NgZone) : null;\n return {\n ngZone,\n connectInZone\n };\n}\nlet DevtoolsDispatcher = /*#__PURE__*/(() => {\n class DevtoolsDispatcher extends ActionsSubject {\n /** @nocollapse */static {\n this.ɵfac = /* @__PURE__ */(() => {\n let ɵDevtoolsDispatcher_BaseFactory;\n return function DevtoolsDispatcher_Factory(t) {\n return (ɵDevtoolsDispatcher_BaseFactory || (ɵDevtoolsDispatcher_BaseFactory = i0.ɵɵgetInheritedFactory(DevtoolsDispatcher)))(t || DevtoolsDispatcher);\n };\n })();\n }\n /** @nocollapse */\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: DevtoolsDispatcher,\n factory: DevtoolsDispatcher.ɵfac\n });\n }\n }\n return DevtoolsDispatcher;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst ExtensionActionTypes = {\n START: 'START',\n DISPATCH: 'DISPATCH',\n STOP: 'STOP',\n ACTION: 'ACTION'\n};\nconst REDUX_DEVTOOLS_EXTENSION = new InjectionToken('@ngrx/store-devtools Redux Devtools Extension');\nlet DevtoolsExtension = /*#__PURE__*/(() => {\n class DevtoolsExtension {\n constructor(devtoolsExtension, config, dispatcher) {\n this.config = config;\n this.dispatcher = dispatcher;\n this.zoneConfig = injectZoneConfig(this.config.connectInZone);\n this.devtoolsExtension = devtoolsExtension;\n this.createActionStreams();\n }\n notify(action, state) {\n if (!this.devtoolsExtension) {\n return;\n }\n // Check to see if the action requires a full update of the liftedState.\n // If it is a simple action generated by the user's app and the recording\n // is not locked/paused, only send the action and the current state (fast).\n //\n // A full liftedState update (slow: serializes the entire liftedState) is\n // only required when:\n // a) redux-devtools-extension fires the @@Init action (ignored by\n // @ngrx/store-devtools)\n // b) an action is generated by an @ngrx module (e.g. @ngrx/effects/init\n // or @ngrx/store/update-reducers)\n // c) the state has been recomputed due to time-traveling\n // d) any action that is not a PerformAction to err on the side of\n // caution.\n if (action.type === PERFORM_ACTION) {\n if (state.isLocked || state.isPaused) {\n return;\n }\n const currentState = unliftState(state);\n if (shouldFilterActions(this.config) && isActionFiltered(currentState, action, this.config.predicate, this.config.actionsSafelist, this.config.actionsBlocklist)) {\n return;\n }\n const sanitizedState = this.config.stateSanitizer ? sanitizeState(this.config.stateSanitizer, currentState, state.currentStateIndex) : currentState;\n const sanitizedAction = this.config.actionSanitizer ? sanitizeAction(this.config.actionSanitizer, action, state.nextActionId) : action;\n this.sendToReduxDevtools(() => this.extensionConnection.send(sanitizedAction, sanitizedState));\n } else {\n // Requires full state update\n const sanitizedLiftedState = {\n ...state,\n stagedActionIds: state.stagedActionIds,\n actionsById: this.config.actionSanitizer ? sanitizeActions(this.config.actionSanitizer, state.actionsById) : state.actionsById,\n computedStates: this.config.stateSanitizer ? sanitizeStates(this.config.stateSanitizer, state.computedStates) : state.computedStates\n };\n this.sendToReduxDevtools(() => this.devtoolsExtension.send(null, sanitizedLiftedState, this.getExtensionConfig(this.config)));\n }\n }\n createChangesObservable() {\n if (!this.devtoolsExtension) {\n return EMPTY;\n }\n return new Observable(subscriber => {\n const connection = this.zoneConfig.connectInZone ?\n // To reduce change detection cycles, we need to run the `connect` method\n // outside of the Angular zone. The `connect` method adds a `message`\n // event listener to communicate with an extension using `window.postMessage`\n // and handle message events.\n this.zoneConfig.ngZone.runOutsideAngular(() => this.devtoolsExtension.connect(this.getExtensionConfig(this.config))) : this.devtoolsExtension.connect(this.getExtensionConfig(this.config));\n this.extensionConnection = connection;\n connection.init();\n connection.subscribe(change => subscriber.next(change));\n return connection.unsubscribe;\n });\n }\n createActionStreams() {\n // Listens to all changes\n const changes$ = this.createChangesObservable().pipe(share());\n // Listen for the start action\n const start$ = changes$.pipe(filter(change => change.type === ExtensionActionTypes.START));\n // Listen for the stop action\n const stop$ = changes$.pipe(filter(change => change.type === ExtensionActionTypes.STOP));\n // Listen for lifted actions\n const liftedActions$ = changes$.pipe(filter(change => change.type === ExtensionActionTypes.DISPATCH), map(change => this.unwrapAction(change.payload)), concatMap(action => {\n if (action.type === IMPORT_STATE) {\n // State imports may happen in two situations:\n // 1. Explicitly by user\n // 2. User activated the \"persist state accross reloads\" option\n // and now the state is imported during reload.\n // Because of option 2, we need to give possible\n // lazy loaded reducers time to instantiate.\n // As soon as there is no UPDATE action within 1 second,\n // it is assumed that all reducers are loaded.\n return this.dispatcher.pipe(filter(action => action.type === UPDATE), timeout(1000), debounceTime(1000), map(() => action), catchError(() => of(action)), take(1));\n } else {\n return of(action);\n }\n }));\n // Listen for unlifted actions\n const actions$ = changes$.pipe(filter(change => change.type === ExtensionActionTypes.ACTION), map(change => this.unwrapAction(change.payload)));\n const actionsUntilStop$ = actions$.pipe(takeUntil(stop$));\n const liftedUntilStop$ = liftedActions$.pipe(takeUntil(stop$));\n this.start$ = start$.pipe(takeUntil(stop$));\n // Only take the action sources between the start/stop events\n this.actions$ = this.start$.pipe(switchMap(() => actionsUntilStop$));\n this.liftedActions$ = this.start$.pipe(switchMap(() => liftedUntilStop$));\n }\n unwrapAction(action) {\n // indirect eval according to https://esbuild.github.io/content-types/#direct-eval\n return typeof action === 'string' ? (0, eval)(`(${action})`) : action;\n }\n getExtensionConfig(config) {\n const extensionOptions = {\n name: config.name,\n features: config.features,\n serialize: config.serialize,\n autoPause: config.autoPause ?? false,\n trace: config.trace ?? false,\n traceLimit: config.traceLimit ?? 75\n // The action/state sanitizers are not added to the config\n // because sanitation is done in this class already.\n // It is done before sending it to the devtools extension for consistency:\n // - If we call extensionConnection.send(...),\n // the extension would call the sanitizers.\n // - If we call devtoolsExtension.send(...) (aka full state update),\n // the extension would NOT call the sanitizers, so we have to do it ourselves.\n };\n if (config.maxAge !== false /* support === 0 */) {\n extensionOptions.maxAge = config.maxAge;\n }\n return extensionOptions;\n }\n sendToReduxDevtools(send) {\n try {\n send();\n } catch (err) {\n console.warn('@ngrx/store-devtools: something went wrong inside the redux devtools', err);\n }\n }\n /** @nocollapse */\n static {\n this.ɵfac = function DevtoolsExtension_Factory(t) {\n return new (t || DevtoolsExtension)(i0.ɵɵinject(REDUX_DEVTOOLS_EXTENSION), i0.ɵɵinject(STORE_DEVTOOLS_CONFIG), i0.ɵɵinject(DevtoolsDispatcher));\n };\n }\n /** @nocollapse */\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: DevtoolsExtension,\n factory: DevtoolsExtension.ɵfac\n });\n }\n }\n return DevtoolsExtension;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst INIT_ACTION = {\n type: INIT\n};\nconst RECOMPUTE = '@ngrx/store-devtools/recompute';\nconst RECOMPUTE_ACTION = {\n type: RECOMPUTE\n};\n/**\n * Computes the next entry in the log by applying an action.\n */\nfunction computeNextEntry(reducer, action, state, error, errorHandler) {\n if (error) {\n return {\n state,\n error: 'Interrupted by an error up the chain'\n };\n }\n let nextState = state;\n let nextError;\n try {\n nextState = reducer(state, action);\n } catch (err) {\n nextError = err.toString();\n errorHandler.handleError(err);\n }\n return {\n state: nextState,\n error: nextError\n };\n}\n/**\n * Runs the reducer on invalidated actions to get a fresh computation log.\n */\nfunction recomputeStates(computedStates, minInvalidatedStateIndex, reducer, committedState, actionsById, stagedActionIds, skippedActionIds, errorHandler, isPaused) {\n // Optimization: exit early and return the same reference\n // if we know nothing could have changed.\n if (minInvalidatedStateIndex >= computedStates.length && computedStates.length === stagedActionIds.length) {\n return computedStates;\n }\n const nextComputedStates = computedStates.slice(0, minInvalidatedStateIndex);\n // If the recording is paused, recompute all states up until the pause state,\n // else recompute all states.\n const lastIncludedActionId = stagedActionIds.length - (isPaused ? 1 : 0);\n for (let i = minInvalidatedStateIndex; i < lastIncludedActionId; i++) {\n const actionId = stagedActionIds[i];\n const action = actionsById[actionId].action;\n const previousEntry = nextComputedStates[i - 1];\n const previousState = previousEntry ? previousEntry.state : committedState;\n const previousError = previousEntry ? previousEntry.error : undefined;\n const shouldSkip = skippedActionIds.indexOf(actionId) > -1;\n const entry = shouldSkip ? previousEntry : computeNextEntry(reducer, action, previousState, previousError, errorHandler);\n nextComputedStates.push(entry);\n }\n // If the recording is paused, the last state will not be recomputed,\n // because it's essentially not part of the state history.\n if (isPaused) {\n nextComputedStates.push(computedStates[computedStates.length - 1]);\n }\n return nextComputedStates;\n}\nfunction liftInitialState(initialCommittedState, monitorReducer) {\n return {\n monitorState: monitorReducer(undefined, {}),\n nextActionId: 1,\n actionsById: {\n 0: liftAction(INIT_ACTION)\n },\n stagedActionIds: [0],\n skippedActionIds: [],\n committedState: initialCommittedState,\n currentStateIndex: 0,\n computedStates: [],\n isLocked: false,\n isPaused: false\n };\n}\n/**\n * Creates a history state reducer from an app's reducer.\n */\nfunction liftReducerWith(initialCommittedState, initialLiftedState, errorHandler, monitorReducer, options = {}) {\n /**\n * Manages how the history actions modify the history state.\n */\n return reducer => (liftedState, liftedAction) => {\n let {\n monitorState,\n actionsById,\n nextActionId,\n stagedActionIds,\n skippedActionIds,\n committedState,\n currentStateIndex,\n computedStates,\n isLocked,\n isPaused\n } = liftedState || initialLiftedState;\n if (!liftedState) {\n // Prevent mutating initialLiftedState\n actionsById = Object.create(actionsById);\n }\n function commitExcessActions(n) {\n // Auto-commits n-number of excess actions.\n let excess = n;\n let idsToDelete = stagedActionIds.slice(1, excess + 1);\n for (let i = 0; i < idsToDelete.length; i++) {\n if (computedStates[i + 1].error) {\n // Stop if error is found. Commit actions up to error.\n excess = i;\n idsToDelete = stagedActionIds.slice(1, excess + 1);\n break;\n } else {\n delete actionsById[idsToDelete[i]];\n }\n }\n skippedActionIds = skippedActionIds.filter(id => idsToDelete.indexOf(id) === -1);\n stagedActionIds = [0, ...stagedActionIds.slice(excess + 1)];\n committedState = computedStates[excess].state;\n computedStates = computedStates.slice(excess);\n currentStateIndex = currentStateIndex > excess ? currentStateIndex - excess : 0;\n }\n function commitChanges() {\n // Consider the last committed state the new starting point.\n // Squash any staged actions into a single committed state.\n actionsById = {\n 0: liftAction(INIT_ACTION)\n };\n nextActionId = 1;\n stagedActionIds = [0];\n skippedActionIds = [];\n committedState = computedStates[currentStateIndex].state;\n currentStateIndex = 0;\n computedStates = [];\n }\n // By default, aggressively recompute every state whatever happens.\n // This has O(n) performance, so we'll override this to a sensible\n // value whenever we feel like we don't have to recompute the states.\n let minInvalidatedStateIndex = 0;\n switch (liftedAction.type) {\n case LOCK_CHANGES:\n {\n isLocked = liftedAction.status;\n minInvalidatedStateIndex = Infinity;\n break;\n }\n case PAUSE_RECORDING:\n {\n isPaused = liftedAction.status;\n if (isPaused) {\n // Add a pause action to signal the devtools-user the recording is paused.\n // The corresponding state will be overwritten on each update to always contain\n // the latest state (see Actions.PERFORM_ACTION).\n stagedActionIds = [...stagedActionIds, nextActionId];\n actionsById[nextActionId] = new PerformAction({\n type: '@ngrx/devtools/pause'\n }, +Date.now());\n nextActionId++;\n minInvalidatedStateIndex = stagedActionIds.length - 1;\n computedStates = computedStates.concat(computedStates[computedStates.length - 1]);\n if (currentStateIndex === stagedActionIds.length - 2) {\n currentStateIndex++;\n }\n minInvalidatedStateIndex = Infinity;\n } else {\n commitChanges();\n }\n break;\n }\n case RESET:\n {\n // Get back to the state the store was created with.\n actionsById = {\n 0: liftAction(INIT_ACTION)\n };\n nextActionId = 1;\n stagedActionIds = [0];\n skippedActionIds = [];\n committedState = initialCommittedState;\n currentStateIndex = 0;\n computedStates = [];\n break;\n }\n case COMMIT:\n {\n commitChanges();\n break;\n }\n case ROLLBACK:\n {\n // Forget about any staged actions.\n // Start again from the last committed state.\n actionsById = {\n 0: liftAction(INIT_ACTION)\n };\n nextActionId = 1;\n stagedActionIds = [0];\n skippedActionIds = [];\n currentStateIndex = 0;\n computedStates = [];\n break;\n }\n case TOGGLE_ACTION:\n {\n // Toggle whether an action with given ID is skipped.\n // Being skipped means it is a no-op during the computation.\n const {\n id: actionId\n } = liftedAction;\n const index = skippedActionIds.indexOf(actionId);\n if (index === -1) {\n skippedActionIds = [actionId, ...skippedActionIds];\n } else {\n skippedActionIds = skippedActionIds.filter(id => id !== actionId);\n }\n // Optimization: we know history before this action hasn't changed\n minInvalidatedStateIndex = stagedActionIds.indexOf(actionId);\n break;\n }\n case SET_ACTIONS_ACTIVE:\n {\n // Toggle whether an action with given ID is skipped.\n // Being skipped means it is a no-op during the computation.\n const {\n start,\n end,\n active\n } = liftedAction;\n const actionIds = [];\n for (let i = start; i < end; i++) actionIds.push(i);\n if (active) {\n skippedActionIds = difference(skippedActionIds, actionIds);\n } else {\n skippedActionIds = [...skippedActionIds, ...actionIds];\n }\n // Optimization: we know history before this action hasn't changed\n minInvalidatedStateIndex = stagedActionIds.indexOf(start);\n break;\n }\n case JUMP_TO_STATE:\n {\n // Without recomputing anything, move the pointer that tell us\n // which state is considered the current one. Useful for sliders.\n currentStateIndex = liftedAction.index;\n // Optimization: we know the history has not changed.\n minInvalidatedStateIndex = Infinity;\n break;\n }\n case JUMP_TO_ACTION:\n {\n // Jumps to a corresponding state to a specific action.\n // Useful when filtering actions.\n const index = stagedActionIds.indexOf(liftedAction.actionId);\n if (index !== -1) currentStateIndex = index;\n minInvalidatedStateIndex = Infinity;\n break;\n }\n case SWEEP:\n {\n // Forget any actions that are currently being skipped.\n stagedActionIds = difference(stagedActionIds, skippedActionIds);\n skippedActionIds = [];\n currentStateIndex = Math.min(currentStateIndex, stagedActionIds.length - 1);\n break;\n }\n case PERFORM_ACTION:\n {\n // Ignore action and return state as is if recording is locked\n if (isLocked) {\n return liftedState || initialLiftedState;\n }\n if (isPaused || liftedState && isActionFiltered(liftedState.computedStates[currentStateIndex], liftedAction, options.predicate, options.actionsSafelist, options.actionsBlocklist)) {\n // If recording is paused or if the action should be ignored, overwrite the last state\n // (corresponds to the pause action) and keep everything else as is.\n // This way, the app gets the new current state while the devtools\n // do not record another action.\n const lastState = computedStates[computedStates.length - 1];\n computedStates = [...computedStates.slice(0, -1), computeNextEntry(reducer, liftedAction.action, lastState.state, lastState.error, errorHandler)];\n minInvalidatedStateIndex = Infinity;\n break;\n }\n // Auto-commit as new actions come in.\n if (options.maxAge && stagedActionIds.length === options.maxAge) {\n commitExcessActions(1);\n }\n if (currentStateIndex === stagedActionIds.length - 1) {\n currentStateIndex++;\n }\n const actionId = nextActionId++;\n // Mutation! This is the hottest path, and we optimize on purpose.\n // It is safe because we set a new key in a cache dictionary.\n actionsById[actionId] = liftedAction;\n stagedActionIds = [...stagedActionIds, actionId];\n // Optimization: we know that only the new action needs computing.\n minInvalidatedStateIndex = stagedActionIds.length - 1;\n break;\n }\n case IMPORT_STATE:\n {\n // Completely replace everything.\n ({\n monitorState,\n actionsById,\n nextActionId,\n stagedActionIds,\n skippedActionIds,\n committedState,\n currentStateIndex,\n computedStates,\n isLocked,\n isPaused\n } = liftedAction.nextLiftedState);\n break;\n }\n case INIT:\n {\n // Always recompute states on hot reload and init.\n minInvalidatedStateIndex = 0;\n if (options.maxAge && stagedActionIds.length > options.maxAge) {\n // States must be recomputed before committing excess.\n computedStates = recomputeStates(computedStates, minInvalidatedStateIndex, reducer, committedState, actionsById, stagedActionIds, skippedActionIds, errorHandler, isPaused);\n commitExcessActions(stagedActionIds.length - options.maxAge);\n // Avoid double computation.\n minInvalidatedStateIndex = Infinity;\n }\n break;\n }\n case UPDATE:\n {\n const stateHasErrors = computedStates.filter(state => state.error).length > 0;\n if (stateHasErrors) {\n // Recompute all states\n minInvalidatedStateIndex = 0;\n if (options.maxAge && stagedActionIds.length > options.maxAge) {\n // States must be recomputed before committing excess.\n computedStates = recomputeStates(computedStates, minInvalidatedStateIndex, reducer, committedState, actionsById, stagedActionIds, skippedActionIds, errorHandler, isPaused);\n commitExcessActions(stagedActionIds.length - options.maxAge);\n // Avoid double computation.\n minInvalidatedStateIndex = Infinity;\n }\n } else {\n // If not paused/locked, add a new action to signal devtools-user\n // that there was a reducer update.\n if (!isPaused && !isLocked) {\n if (currentStateIndex === stagedActionIds.length - 1) {\n currentStateIndex++;\n }\n // Add a new action to only recompute state\n const actionId = nextActionId++;\n actionsById[actionId] = new PerformAction(liftedAction, +Date.now());\n stagedActionIds = [...stagedActionIds, actionId];\n minInvalidatedStateIndex = stagedActionIds.length - 1;\n computedStates = recomputeStates(computedStates, minInvalidatedStateIndex, reducer, committedState, actionsById, stagedActionIds, skippedActionIds, errorHandler, isPaused);\n }\n // Recompute state history with latest reducer and update action\n computedStates = computedStates.map(cmp => ({\n ...cmp,\n state: reducer(cmp.state, RECOMPUTE_ACTION)\n }));\n currentStateIndex = stagedActionIds.length - 1;\n if (options.maxAge && stagedActionIds.length > options.maxAge) {\n commitExcessActions(stagedActionIds.length - options.maxAge);\n }\n // Avoid double computation.\n minInvalidatedStateIndex = Infinity;\n }\n break;\n }\n default:\n {\n // If the action is not recognized, it's a monitor action.\n // Optimization: a monitor action can't change history.\n minInvalidatedStateIndex = Infinity;\n break;\n }\n }\n computedStates = recomputeStates(computedStates, minInvalidatedStateIndex, reducer, committedState, actionsById, stagedActionIds, skippedActionIds, errorHandler, isPaused);\n monitorState = monitorReducer(monitorState, liftedAction);\n return {\n monitorState,\n actionsById,\n nextActionId,\n stagedActionIds,\n skippedActionIds,\n committedState,\n currentStateIndex,\n computedStates,\n isLocked,\n isPaused\n };\n };\n}\nlet StoreDevtools = /*#__PURE__*/(() => {\n class StoreDevtools {\n constructor(dispatcher, actions$, reducers$, extension, scannedActions, errorHandler, initialState, config) {\n const liftedInitialState = liftInitialState(initialState, config.monitor);\n const liftReducer = liftReducerWith(initialState, liftedInitialState, errorHandler, config.monitor, config);\n const liftedAction$ = merge(merge(actions$.asObservable().pipe(skip(1)), extension.actions$).pipe(map(liftAction)), dispatcher, extension.liftedActions$).pipe(observeOn(queueScheduler));\n const liftedReducer$ = reducers$.pipe(map(liftReducer));\n const zoneConfig = injectZoneConfig(config.connectInZone);\n const liftedStateSubject = new ReplaySubject(1);\n this.liftedStateSubscription = liftedAction$.pipe(withLatestFrom(liftedReducer$),\n // The extension would post messages back outside of the Angular zone\n // because we call `connect()` wrapped with `runOutsideAngular`. We run change\n // detection only once at the end after all the required asynchronous tasks have\n // been processed (for instance, `setInterval` scheduled by the `timeout` operator).\n // We have to re-enter the Angular zone before the `scan` since it runs the reducer\n // which must be run within the Angular zone.\n emitInZone(zoneConfig), scan(({\n state: liftedState\n }, [action, reducer]) => {\n let reducedLiftedState = reducer(liftedState, action);\n // On full state update\n // If we have actions filters, we must filter completely our lifted state to be sync with the extension\n if (action.type !== PERFORM_ACTION && shouldFilterActions(config)) {\n reducedLiftedState = filterLiftedState(reducedLiftedState, config.predicate, config.actionsSafelist, config.actionsBlocklist);\n }\n // Extension should be sent the sanitized lifted state\n extension.notify(action, reducedLiftedState);\n return {\n state: reducedLiftedState,\n action\n };\n }, {\n state: liftedInitialState,\n action: null\n })).subscribe(({\n state,\n action\n }) => {\n liftedStateSubject.next(state);\n if (action.type === PERFORM_ACTION) {\n const unliftedAction = action.action;\n scannedActions.next(unliftedAction);\n }\n });\n this.extensionStartSubscription = extension.start$.pipe(emitInZone(zoneConfig)).subscribe(() => {\n this.refresh();\n });\n const liftedState$ = liftedStateSubject.asObservable();\n const state$ = liftedState$.pipe(map(unliftState));\n Object.defineProperty(state$, 'state', {\n value: toSignal(state$, {\n manualCleanup: true,\n requireSync: true\n })\n });\n this.dispatcher = dispatcher;\n this.liftedState = liftedState$;\n this.state = state$;\n }\n ngOnDestroy() {\n // Even though the store devtools plugin is recommended to be\n // used only in development mode, it can still cause a memory leak\n // in microfrontend applications that are being created and destroyed\n // multiple times during development. This results in excessive memory\n // consumption, as it prevents entire apps from being garbage collected.\n this.liftedStateSubscription.unsubscribe();\n this.extensionStartSubscription.unsubscribe();\n }\n dispatch(action) {\n this.dispatcher.next(action);\n }\n next(action) {\n this.dispatcher.next(action);\n }\n error(error) {}\n complete() {}\n performAction(action) {\n this.dispatch(new PerformAction(action, +Date.now()));\n }\n refresh() {\n this.dispatch(new Refresh());\n }\n reset() {\n this.dispatch(new Reset(+Date.now()));\n }\n rollback() {\n this.dispatch(new Rollback(+Date.now()));\n }\n commit() {\n this.dispatch(new Commit(+Date.now()));\n }\n sweep() {\n this.dispatch(new Sweep());\n }\n toggleAction(id) {\n this.dispatch(new ToggleAction(id));\n }\n jumpToAction(actionId) {\n this.dispatch(new JumpToAction(actionId));\n }\n jumpToState(index) {\n this.dispatch(new JumpToState(index));\n }\n importState(nextLiftedState) {\n this.dispatch(new ImportState(nextLiftedState));\n }\n lockChanges(status) {\n this.dispatch(new LockChanges(status));\n }\n pauseRecording(status) {\n this.dispatch(new PauseRecording(status));\n }\n /** @nocollapse */\n static {\n this.ɵfac = function StoreDevtools_Factory(t) {\n return new (t || StoreDevtools)(i0.ɵɵinject(DevtoolsDispatcher), i0.ɵɵinject(i2.ActionsSubject), i0.ɵɵinject(i2.ReducerObservable), i0.ɵɵinject(DevtoolsExtension), i0.ɵɵinject(i2.ScannedActionsSubject), i0.ɵɵinject(i0.ErrorHandler), i0.ɵɵinject(INITIAL_STATE), i0.ɵɵinject(STORE_DEVTOOLS_CONFIG));\n };\n }\n /** @nocollapse */\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: StoreDevtools,\n factory: StoreDevtools.ɵfac\n });\n }\n }\n return StoreDevtools;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * If the devtools extension is connected out of the Angular zone,\n * this operator will emit all events within the zone.\n */\nfunction emitInZone({\n ngZone,\n connectInZone\n}) {\n return source => connectInZone ? new Observable(subscriber => source.subscribe({\n next: value => ngZone.run(() => subscriber.next(value)),\n error: error => ngZone.run(() => subscriber.error(error)),\n complete: () => ngZone.run(() => subscriber.complete())\n })) : source;\n}\nconst IS_EXTENSION_OR_MONITOR_PRESENT = new InjectionToken('@ngrx/store-devtools Is Devtools Extension or Monitor Present');\nfunction createIsExtensionOrMonitorPresent(extension, config) {\n return Boolean(extension) || config.monitor !== noMonitor;\n}\nfunction createReduxDevtoolsExtension() {\n const extensionKey = '__REDUX_DEVTOOLS_EXTENSION__';\n if (typeof window === 'object' && typeof window[extensionKey] !== 'undefined') {\n return window[extensionKey];\n } else {\n return null;\n }\n}\n/**\n * Provides developer tools and instrumentation for `Store`.\n *\n * @usageNotes\n *\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [\n * provideStoreDevtools({\n * maxAge: 25,\n * logOnly: !isDevMode(),\n * }),\n * ],\n * });\n * ```\n */\nfunction provideStoreDevtools(options = {}) {\n return makeEnvironmentProviders([DevtoolsExtension, DevtoolsDispatcher, StoreDevtools, {\n provide: INITIAL_OPTIONS,\n useValue: options\n }, {\n provide: IS_EXTENSION_OR_MONITOR_PRESENT,\n deps: [REDUX_DEVTOOLS_EXTENSION, STORE_DEVTOOLS_CONFIG],\n useFactory: createIsExtensionOrMonitorPresent\n }, {\n provide: REDUX_DEVTOOLS_EXTENSION,\n useFactory: createReduxDevtoolsExtension\n }, {\n provide: STORE_DEVTOOLS_CONFIG,\n deps: [INITIAL_OPTIONS],\n useFactory: createConfig\n }, {\n provide: StateObservable,\n deps: [StoreDevtools],\n useFactory: createStateObservable\n }, {\n provide: ReducerManagerDispatcher,\n useExisting: DevtoolsDispatcher\n }]);\n}\nfunction createStateObservable(devtools) {\n return devtools.state;\n}\nlet StoreDevtoolsModule = /*#__PURE__*/(() => {\n class StoreDevtoolsModule {\n static instrument(options = {}) {\n return {\n ngModule: StoreDevtoolsModule,\n providers: [provideStoreDevtools(options)]\n };\n }\n /** @nocollapse */\n static {\n this.ɵfac = function StoreDevtoolsModule_Factory(t) {\n return new (t || StoreDevtoolsModule)();\n };\n }\n /** @nocollapse */\n static {\n this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: StoreDevtoolsModule\n });\n }\n /** @nocollapse */\n static {\n this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n }\n }\n return StoreDevtoolsModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * DO NOT EDIT\n *\n * This file is automatically generated at build\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { INITIAL_OPTIONS, RECOMPUTE, REDUX_DEVTOOLS_EXTENSION, StoreDevtools, StoreDevtoolsConfig, StoreDevtoolsModule, provideStoreDevtools };\n","import { CompanyContext } from 'app/shared/models';\r\nimport { CompanyComment } from 'app/shared/models/company/company-comment-model';\r\nimport {\r\n Actions as CompanyContextActions,\r\n Type as CompanyContextActionType,\r\n} from 'app/state/actions/company-context.actions';\r\n\r\nexport const initialState: CompanyContext = {\r\n id: null,\r\n name: null,\r\n shortName: null,\r\n internalName: null,\r\n branch: null,\r\n detailedBranch: null,\r\n companyLanguages: [],\r\n companyAttributes: [],\r\n companyComments: [],\r\n restrictedActivationCommunication: false,\r\n smsEnabled: false,\r\n pinEnabled: false,\r\n isActive: false,\r\n mySurveysEnabled: false,\r\n userExternalIdIsMandatory: false,\r\n branding: null,\r\n accountName: null,\r\n type: null,\r\n segmentsHierarchyId: null,\r\n hasPurgeSettings: false\r\n};\r\n\r\nexport function reducer(state: CompanyContext = initialState, action: CompanyContextActions): CompanyContext {\r\n\r\n switch (action.type) {\r\n case CompanyContextActionType.SET_COMPANY_CONTEXT_SUCCESS: {\r\n return { ...action.payload };\r\n }\r\n case CompanyContextActionType.UPDATE_COMPANY_COMMENT_CONTEXT:\r\n case CompanyContextActionType.DELETE_COMPANY_COMMENT_CONTEXT:\r\n case CompanyContextActionType.ADD_COMPANY_COMMENT_CONTEXT: {\r\n return {\r\n ...state,\r\n companyComments: commentsReducer(state.companyComments, action)\r\n }\r\n }\r\n case CompanyContextActionType.SAVE_COMPANY_ATTRIBUTES_SUCCESS: {\r\n return {\r\n ...state,\r\n companyAttributes:action.payload\r\n\r\n }\r\n }\r\n default: {\r\n return state;\r\n }\r\n }\r\n}\r\n\r\n\r\nconst initialStateComments: CompanyComment[] = []\r\n\r\nfunction commentsReducer(state = initialStateComments, action: CompanyContextActions) {\r\n switch (action.type) {\r\n case CompanyContextActionType.ADD_COMPANY_COMMENT_CONTEXT: {\r\n return [...state, action.payload]\r\n }\r\n case CompanyContextActionType.UPDATE_COMPANY_COMMENT_CONTEXT: {\r\n return state.map(comment => {\r\n if (comment.id !== action.payload.id) {\r\n return comment;\r\n }\r\n\r\n return {\r\n ...comment,\r\n comment: action.payload.comment\r\n }\r\n });\r\n }\r\n case CompanyContextActionType.DELETE_COMPANY_COMMENT_CONTEXT: {\r\n return [...state].filter(item => item.id !== action.payload);\r\n }\r\n default: {\r\n return state;\r\n }\r\n }\r\n}\r\n","import { Configuration } from 'app/shared/models';\r\nimport { Actions as ConfigurationActions, Type as ConfigurationActionType } from 'app/state/actions/configuration.actions';\r\n\r\nconst initialState: Configuration = {\r\n ApiUrl: null,\r\n AuthUrl: null,\r\n LocalUrl: null,\r\n ChrossApiUrl: null,\r\n BenchmarkApiUrl: null,\r\n ExHelpCenterBaseUrl: null,\r\n CxHelpCenterBaseUrl: null,\r\n ExPendoAPIKey: null,\r\n CxPendoAPIKey: null,\r\n WPApiUrl: null,\r\n InstrumentationKey: null,\r\n BuildVersion: null,\r\n BuildBranch: null,\r\n BuildName: null,\r\n Environment: null,\r\n FeatureFlags: null,\r\n BrilliantHomePageBaseUrl: null\r\n};\r\n\r\nexport function reducer(state: Configuration = null, action: ConfigurationActions) {\r\n switch (action.type) {\r\n case ConfigurationActionType.LOAD_CONFIGURATION_SUCCESS: {\r\n return Object.assign({}, state, {\r\n ApiUrl: action.payload.API_URL,\r\n AuthUrl: action.payload.AUTH_URL,\r\n LocalUrl: action.payload.LOCAL_URL,\r\n ChrossApiUrl: action.payload.CHROSS_API_URL,\r\n BenchmarkApiUrl: action.payload.BENCHMARK_API_URL,\r\n WPApiUrl: action.payload.WP_API_URL,\r\n BrilliantHomePageBaseUrl: action.payload.BRILLIANTFUTURE_HP_BASE_URL,\r\n ExHelpCenterBaseUrl: action.payload.EX_HELPCENTER_BASE_URL,\r\n CxHelpCenterBaseUrl: action.payload.CX_HELPCENTER_BASE_URL,\r\n InstrumentationKey: action.payload.ApplicationInsights?.InstrumentationKey,\r\n ExPendoAPIKey: action.payload.EX_PENDO_API_KEY,\r\n CxPendoAPIKey: action.payload.CX_PENDO_API_KEY,\r\n BuildBranch: action.payload.BUILD_BRANCH,\r\n BuildVersion: action.payload.BUILD_VERSION,\r\n BuildName: action.payload.BUILD_NAME,\r\n Environment: action.payload.Environment,\r\n FeatureFlags: action.payload.FeatureFlags\r\n });\r\n }\r\n default: {\r\n return state;\r\n }\r\n }\r\n}\r\n","import { Condition, DisplayParameter, MenuItem, NavtreeItem, NavtreeState, Operand, ParameterItem, ReportPageRoute } from 'app/shared/models';\r\nimport { Actions as NavtreeAction, Type as NavtreeActionType } from 'app/state/actions/navtree.actions';\r\nimport { cloneDeep } from 'lodash-es';\r\n\r\nconst initialState: NavtreeState = {\r\n items: [],\r\n routes: [],\r\n displayParameters: [],\r\n loading: false,\r\n isHandset: false,\r\n isTablet: false,\r\n toggleSidebar: false\r\n};\r\n\r\nexport function reducer(state: NavtreeState = initialState, action: NavtreeAction): NavtreeState {\r\n\r\n switch (action.type) {\r\n case NavtreeActionType.LOAD_NAVTREE_CANCELED: {\r\n return { ...state, loading: false };\r\n }\r\n case NavtreeActionType.LOAD_NAVTREE_SUCCESS: {\r\n const routes: ReportPageRoute[] = [];\r\n const items = action.payload.find(r => r.type === 'Tab')?.items ?? [];\r\n const pageRoutes = getRoutes(items, routes);\r\n const displayParameters = getDisplayParameters(action.payload);\r\n\r\n return Object.assign({}, state, {\r\n items: action.payload,\r\n routes: pageRoutes,\r\n displayParameters: displayParameters,\r\n loading: false,\r\n });\r\n }\r\n case NavtreeActionType.LOAD_NAVTREE: {\r\n return Object.assign({}, state, {\r\n loading: true\r\n });\r\n }\r\n case NavtreeActionType.UPDATE_MISSING_VISIBILITY: {\r\n return {\r\n ...state,\r\n items: state.items.map(navtreeItem => {\r\n const filteredMenuItems = action.payload.filter(menuItem => menuItem.displayType === navtreeItem.type);\r\n\r\n if (filteredMenuItems.length === 0) {\r\n return navtreeItem;\r\n }\r\n\r\n return {\r\n ...navtreeItem,\r\n items: navtreeItem.items\r\n ? [...navtreeItem.items, ...filteredMenuItems]\r\n : [...filteredMenuItems]\r\n };\r\n })\r\n };\r\n }\r\n case NavtreeActionType.UPDATE_VISIBILITY: {\r\n const items: NavtreeItem[] = cloneDeep(state.items);\r\n const parameters = { ...action.params };\r\n const updatedItems = action.items ? [...action.items] : [];\r\n if (updatedItems) {\r\n updatedItems.forEach(updateItem => {\r\n items.forEach(treeItem => {\r\n const menuItem = treeItem.items.find(i => i.key === updateItem.key);\r\n if (menuItem) {\r\n if (menuItem.visible !== updateItem.visible) {\r\n menuItem.visible = updateItem.visible;\r\n }\r\n }\r\n });\r\n });\r\n } else {\r\n const companyParameters = parameters.companyParameters.find(cp => cp.companyId === parameters.currentCompanyId);\r\n const currentParameters = companyParameters ? companyParameters.parameters : [] as ParameterItem[];\r\n items.forEach(treeItem => {\r\n treeItem.items.forEach(menuItem => {\r\n if (menuItem.condition && menuItem.condition.context === 'Frontend') {\r\n menuItem.visible = evaluate(menuItem.condition, currentParameters);\r\n }\r\n });\r\n });\r\n }\r\n\r\n return Object.assign({}, state, {\r\n items: items\r\n });\r\n }\r\n case NavtreeActionType.UPDATE_ISHANDSET: {\r\n return { ...state, isHandset: action.payload };\r\n }\r\n case NavtreeActionType.UPDATE_ISTABLET: {\r\n return { ...state, isTablet: action.payload };\r\n }\r\n case NavtreeActionType.TOGGLE_SIDEBAR: {\r\n return { ...state, toggleSidebar: action.payload };\r\n }\r\n default: {\r\n return state;\r\n }\r\n }\r\n\r\n}\r\n\r\nfunction getRoutes(pages: MenuItem[], routes: ReportPageRoute[]) {\r\n pages.forEach(page => {\r\n if (page.key) {\r\n const route: ReportPageRoute = { pageKey: page.key, route: page.route };\r\n routes.push(route);\r\n if (page.children.length > 0) {\r\n routes = getRoutes(page.children, routes);\r\n }\r\n }\r\n });\r\n return routes;\r\n}\r\n\r\nfunction getDisplayParameters(navItems: NavtreeItem[]) {\r\n const parameters: DisplayParameter[] = [];\r\n navItems.forEach(i => {\r\n i.items.forEach(p => {\r\n if (p.displayParameters != null && p.displayParameters.length > 0) {\r\n p.displayParameters.forEach(p => { parameters.push(p); });\r\n }\r\n });\r\n });\r\n return parameters;\r\n}\r\n\r\nfunction getValue(operand: Operand, parameters: ParameterItem[]): string {\r\n if (operand.source === 'Parameter') {\r\n const param = parameters.find(p => operand.field === p.name);\r\n return param ? param.value : null;\r\n } else if (operand.source === 'Const') {\r\n return operand.value;\r\n }\r\n\r\n return null;\r\n}\r\n\r\nfunction evaluate(condition: Condition, parameters: ParameterItem[]): boolean {\r\n if (condition.logic) {\r\n const children = condition.conditions.map(c => evaluate(c, parameters));\r\n if (condition.logic === 'And') {\r\n return children.every(c => c);\r\n } else {\r\n return children.some(c => c);\r\n }\r\n } else {\r\n const operand1Value = getValue(condition.operand1, parameters);\r\n const operand2Value = getValue(condition.operand2, parameters);\r\n return evaluateOperands(operand1Value, condition.operator, operand2Value);\r\n }\r\n}\r\n\r\n function evaluateOperands(op1: string, operator: string, op2: string): boolean {\r\n\r\n if (operator === 'Eq') {\r\n if (op1 === null || op2 === null) {\r\n return (op1 === 'null' || op2 === 'null');\r\n }\r\n return op1 === op2;\r\n } else if (operator === 'Neq') {\r\n return op1 !== op2;\r\n } else if (op1 === null || op2 === null) {\r\n return false;\r\n } else if (operator === 'Lt') {\r\n return +op1 < +op2;\r\n } else if (operator === 'Lte') {\r\n return +op1 <= +op2;\r\n } else if (operator === 'Gt') {\r\n return +op1 > +op2;\r\n } else if (operator === 'Gte') {\r\n return +op1 >= +op2;\r\n }\r\n return false;\r\n}\r\n","import { OrganizationState } from 'app/shared/models';\r\nimport { Actions as OrganizationActions, Type } from 'app/state/actions/organization.actions';\r\n\r\n\r\nconst initialState: OrganizationState = {\r\n organizationTableLoading: false,\r\n userTableLoading: false,\r\n deletedGroupsTableLoading: false,\r\n deletedGroupsCount: 0,\r\n orphanGroupsTableLoading: false,\r\n orphanGroupsCount: 0\r\n};\r\n\r\nexport function reducer(state: OrganizationState = initialState, action: OrganizationActions) {\r\n switch (action.type) {\r\n case Type.ORGANIZATION_TREE_TABLE_LOADING:\r\n return { ...state, organizationTableLoading: true };\r\n case Type.ORGANIZATION_TREE_TABLE_LOADING_COMPLETE:\r\n return { ...state, organizationTableLoading: false };\r\n case Type.USER_TABLE_LOADING:\r\n return { ...state, userTableLoading: true };\r\n case Type.USER_TABLE_LOADING_COMPLETE:\r\n return { ...state, userTableLoading: false };\r\n case Type.DELETED_GROUPS_TABLE_LOADING:\r\n return { ...state, deletedGroupsTableLoading: true };\r\n case Type.DELETED_GROUPS_TABLE_LOADING_COMPLETE:\r\n return { ...state, deletedGroupsTableLoading: false };\r\n case Type.SET_DELETED_GROUPS_COUNT:\r\n return { ...state, deletedGroupsCount: action.payload };\r\n case Type.ORPHAN_GROUPS_TABLE_LOADING:\r\n return { ...state, orphanGroupsTableLoading: true };\r\n case Type.ORPHAN_GROUPS_TABLE_LOADING_COMPLETE:\r\n return { ...state, orphanGroupsTableLoading: false };\r\n case Type.SET_ORPHAN_GROUPS_COUNT:\r\n return { ...state, orphanGroupsCount: action.payload };\r\n default: {\r\n return state;\r\n }\r\n }\r\n}\r\n","import {\r\n Answer,\r\n Content,\r\n FieldType, ModulePage,\r\n ModulePageGroup,\r\n ModulePageItem,\r\n Question,\r\n SurveyPage,\r\n SurveyPageGroup,\r\n SurveyUIState,\r\n SurveyUITheme\r\n} from 'app/shared/models';\r\nimport { LayoutType } from 'app/shared/survey-render/models';\r\nimport { SurveyNavigationBookmark } from 'app/shared/survey-render/models/survey-navigation.model';\r\nimport { Actions, Type } from 'app/state/actions/survey-ui.actions';\r\nimport { cloneDeep } from 'lodash-es';\r\n\r\nconst initialState: SurveyUIState = {\r\n sessionId: 0,\r\n languageCode: '',\r\n languageId: 1,\r\n hierarchyId: null,\r\n groupId: null,\r\n languageDir: 'ltr',\r\n loaded: false,\r\n loading: false,\r\n chapterPagesTotalCount: 0,\r\n pageCurrent: 0,\r\n chapterTotalCount: 0,\r\n chapterCurrent: 0,\r\n progressChapterPagesTotalCount: 0,\r\n progressChaptersCount: 0,\r\n progressPageCurrent: 0,\r\n progressChapterCurrent: -1,\r\n page: {},\r\n pageGroups: [],\r\n answers: [],\r\n showFastForwardButton: false,\r\n fastForwardChapter: 0,\r\n fastForwardPage: 0,\r\n previousDisabled: false,\r\n nextDisabled: false,\r\n previewMode: false,\r\n animationDirectionNext: true,\r\n noSurvey: { noSurvey: false, expiredSurvey: false },\r\n rules: [],\r\n ruleDependencies: [],\r\n showSkipModal: false,\r\n singlePageQuestionSkipped: false,\r\n isSubmitted: false,\r\n isSubmitting: false,\r\n submitFailed: false,\r\n moduleId: 0,\r\n modulePageGroups: [],\r\n theme: null\r\n};\r\n\r\nconst resetState = JSON.stringify(initialState);\r\n\r\nexport function reducer(state: SurveyUIState = initialState, action: Actions): SurveyUIState {\r\n\r\n switch (action.type) {\r\n case Type.SAVE_ANSWERS_DATABASE: {\r\n return { ...state };\r\n }\r\n case Type.SAVE_ANSWERS_DATABASE_SUCCESS: {\r\n return { ...state };\r\n }\r\n case Type.SAVE_ANSWERS_DATABASE_FAILURE: {\r\n return { ...state };\r\n }\r\n case Type.LOAD_SURVEY_SURVEY_EXPIRED: {\r\n return {\r\n ...state,\r\n noSurvey: {\r\n noSurvey: false,\r\n expiredSurvey: true\r\n },\r\n loaded: true,\r\n loading: false,\r\n theme: SurveyUITheme.Default\r\n };\r\n }\r\n case Type.LOAD_SURVEY_CONTENT_SUCCESS: {\r\n const survey = action.payload;\r\n if (!survey) {\r\n return {\r\n ...state,\r\n loaded: true,\r\n loading: false,\r\n noSurvey: {\r\n noSurvey: true,\r\n expiredSurvey: false\r\n },\r\n theme: SurveyUITheme.Default\r\n }\r\n }\r\n const items = survey.surveyModule.pageGroups;\r\n const theme = survey.theme\r\n ? SurveyUITheme[survey.theme]\r\n : SurveyUITheme.Default;\r\n\r\n\r\n const newSurvey: SurveyUIState = {\r\n ...state,\r\n sessionId: survey.sessionId,\r\n languageCode: survey.languageCode,\r\n languageId: survey.languageId,\r\n languageDir: survey.isRightToLeft ? 'rtl' : 'ltr',\r\n hierarchyId: survey.hierarchyId,\r\n groupId: survey.groupId,\r\n previewMode: false,\r\n pageGroups: items,\r\n chapterTotalCount: items.length,\r\n progressChaptersCount: items.filter(visibleAndIncluded).length,\r\n chapterPagesTotalCount: items[state.chapterCurrent].pages.length,\r\n progressChapterPagesTotalCount: items[state.chapterCurrent].pages.filter(visibleAndIncluded).length,\r\n loaded: true,\r\n loading: false,\r\n page: items[state.chapterCurrent].pages[state.pageCurrent],\r\n nextDisabled: state.nextDisabled,\r\n rules: survey.rules,\r\n ruleDependencies: survey.ruleDependencies,\r\n noSurvey: { noSurvey: false, expiredSurvey: false },\r\n theme: theme\r\n };\r\n return newSurvey;\r\n }\r\n case Type.LOAD_SURVEY_STATE: {\r\n return action.payload;\r\n }\r\n\r\n case Type.LOAD_ANSWERS_DATABASE_SUCCESS: {\r\n return {\r\n ...state,\r\n answers: action.payload\r\n };\r\n }\r\n\r\n case Type.SUBMIT_SURVEY: {\r\n return {\r\n ...state,\r\n isSubmitted: false,\r\n isSubmitting: true,\r\n submitFailed: false\r\n };\r\n }\r\n\r\n case Type.SUBMIT_SURVEY_FAILURE: {\r\n return {\r\n ...state,\r\n isSubmitted: false,\r\n isSubmitting: false,\r\n submitFailed: true\r\n };\r\n }\r\n\r\n case Type.SUBMIT_SURVEY_SUCCESS: {\r\n return {\r\n ...state,\r\n pageCurrent: state.pageCurrent + 1,\r\n page: state.pageGroups[state.chapterCurrent].pages.find(x => x.key === LayoutType.DonePage),\r\n nextDisabled: true,\r\n previousDisabled: true,\r\n isSubmitted: true,\r\n isSubmitting: false,\r\n submitFailed: false\r\n };\r\n }\r\n\r\n case Type.SET_FAST_FORWARD_PAGE: {\r\n\r\n // Default fast forward is submit page\r\n const fastForwardChapter = [...state.pageGroups].findIndex(pg => pg.pages.find(p => p.key === LayoutType.SubmitPage));\r\n const fastForwardPage = [...state.pageGroups][fastForwardChapter]?.pages.findIndex(p => p.key === LayoutType.SubmitPage);\r\n const surveyState: SurveyUIState = {\r\n ...state,\r\n fastForwardChapter: fastForwardChapter,\r\n fastForwardPage: fastForwardPage\r\n };\r\n\r\n for (let i = 0; i < state.pageGroups.length; i++) {\r\n if (state.pageGroups[i].visible === false) { continue; }\r\n for (let j = 0; j < state.pageGroups[i].pages.length; j++) {\r\n if (state.pageGroups[i].pages[j].visible === false\r\n || state.pageGroups[i].pages[j].key === LayoutType.SkipPage) { continue; }\r\n for (const item of state.pageGroups[i].pages[j].pageItems.filter(pi => pi.question)) {\r\n if (!state.answers.find(a => a.questionId === item.question.questionId)) {\r\n if (item.question.visible !== false) {\r\n surveyState.fastForwardChapter = i;\r\n surveyState.fastForwardPage = j;\r\n return surveyState;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return surveyState;\r\n }\r\n\r\n case Type.GO_TO_PAGE_SUCCESS: {\r\n const bookmark: SurveyNavigationBookmark = { ...action.payload };\r\n\r\n let nextPage: number;\r\n let nextChapter: number;\r\n\r\n const fastForwardChapter = state.fastForwardChapter;\r\n const fastForwardPage = state.fastForwardPage;\r\n\r\n if (!bookmark.chapterIndex) {\r\n bookmark.chapterIndex = state.chapterCurrent;\r\n }\r\n\r\n // Trying to navigate to part of survey, past answered questions\r\n if (bookmark.chapterIndex > fastForwardChapter\r\n || (bookmark.chapterIndex === fastForwardChapter && bookmark.pageIndex > fastForwardPage)) { return state; }\r\n\r\n const numberOfPagesInBookmarkChapter =\r\n state.pageGroups[bookmark.chapterIndex]\r\n ? state.pageGroups[bookmark.chapterIndex].pages\r\n .length\r\n : 0;\r\n\r\n // Is next page out of bounds for this chapter?\r\n if (bookmark.pageIndex >= numberOfPagesInBookmarkChapter) {\r\n\r\n nextChapter = bookmark.chapterIndex + 1;\r\n nextPage = bookmark.pageIndex - numberOfPagesInBookmarkChapter;\r\n\r\n // Are there visible pages in next chapter?\r\n for (let i = nextChapter; i < state.pageGroups.length; i++) {\r\n if (!state.pageGroups[i].visible) {\r\n continue;\r\n }\r\n if (state.pageGroups[i].pages.filter(p => p.visible !== false).length === 0) {\r\n continue;\r\n }\r\n nextChapter = i;\r\n nextPage = bookmark.pageIndex - numberOfPagesInBookmarkChapter;\r\n\r\n for (let j = nextPage; j < state.pageGroups[nextChapter].pages.length - 1; j--) {\r\n if (state.pageGroups[nextChapter].pages[j].visible) {\r\n nextPage = j;\r\n break;\r\n }\r\n }\r\n break;\r\n }\r\n } else if (bookmark.pageIndex < 0) {\r\n nextChapter = bookmark.chapterIndex - 1;\r\n nextPage = state.pageGroups[nextChapter]?.pages.length - 1;\r\n\r\n // Are there visible pages in next chapter?\r\n for (let i = nextChapter; i > 0; i--) {\r\n if (!state.pageGroups[i].visible) {\r\n continue;\r\n }\r\n if (state.pageGroups[i].pages.filter(p => p.visible !== false).length === 0) {\r\n continue;\r\n }\r\n nextChapter = i;\r\n nextPage = state.pageGroups[nextChapter]?.pages.length - 1;\r\n for (let j = nextPage; j >= 0; j--) {\r\n if (state.pageGroups[nextChapter].pages[j].visible) {\r\n nextPage = j;\r\n break;\r\n }\r\n }\r\n\r\n break;\r\n }\r\n\r\n } else {\r\n nextChapter = bookmark.chapterIndex;\r\n nextPage = bookmark.pageIndex;\r\n\r\n if (bookmark.pageIndex > state.pageCurrent) {\r\n // moving forward\r\n outer:\r\n for (let j = bookmark.chapterIndex; j < state.pageGroups.length; j++) {\r\n nextChapter = j;\r\n for (let i = bookmark.pageIndex; i < numberOfPagesInBookmarkChapter; i++) {\r\n if (state.pageGroups[j].pages[i].visible) {\r\n nextPage = i;\r\n break outer;\r\n }\r\n }\r\n bookmark.pageIndex = 0;\r\n\r\n }\r\n } else {\r\n // moving backwards\r\n for (let i = bookmark.pageIndex; i >= 0; i--) {\r\n if (state.pageGroups[bookmark.chapterIndex].pages[i].visible) {\r\n nextPage = i;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n const progressChapter = chapterProgressAtIndex(state, nextChapter);\r\n const progressPage = nextPage;\r\n\r\n const pageItems = state.pageGroups[nextChapter]?.pages[nextPage]?.pageItems;\r\n const contentList = pageItems?.filter(c => c.content && c.question == null && visible(c.content)).map(c => c.content);\r\n const questionList = pageItems?.filter(c => c.question && c.content == null && visible(c.question)).map(c => c.question);\r\n const ids = pageItems?.filter(c => c.question && c.content == null).map(x => x.question.questionId);\r\n const isAnswered = state.answers.filter(o => ids.some(x => x === o.questionId)).length > 0 ? true : false;\r\n\r\n const surveyState = {\r\n ...state,\r\n chapterCurrent: nextChapter,\r\n pageCurrent: nextPage,\r\n chapterPagesTotalCount: state.pageGroups[nextChapter]?.pages?.length ?? 0,\r\n progressChapterPagesTotalCount: state.pageGroups[nextChapter]?.pages?.filter(visibleAndIncluded).length ?? 0,\r\n progressChapterCurrent: progressChapter,\r\n progressPageCurrent: progressPage,\r\n page: state.pageGroups[nextChapter]?.pages[nextPage],\r\n nextDisabled: (questionList?.length > 0 && !isAnswered)\r\n || (state.pageGroups[nextChapter]?.pages[nextPage].key === LayoutType.DonePage\r\n || (state.pageGroups[nextChapter]?.pages[nextPage].key === LayoutType.SubmitPage)),\r\n showFastForwardButton: !(questionList?.length > 0 && !isAnswered) && contentList?.length === 0,\r\n previousDisabled: state.pageGroups[nextChapter]?.pages[nextPage].key === LayoutType.DonePage,\r\n animationDirectionNext: true,\r\n singlePageQuestionSkipped: state.pageGroups[nextChapter]?.pages[nextPage].pageItems[0].question ?\r\n isSkipButtonSelectedForQuestion(state,\r\n state.pageGroups[nextChapter]?.pages[nextPage].pageItems[0].question.questionId) : false\r\n\r\n };\r\n\r\n return surveyState;\r\n }\r\n\r\n case Type.REGISTER_ANSWER: {\r\n const tempAnswers = JSON.parse(JSON.stringify(state.answers)) as Answer[];\r\n const answerPayload = action.payload;\r\n\r\n tempAnswers.removeEvery(x => x.questionId === answerPayload.questionId);\r\n if (answerPayload.dataType === FieldType.MultipleChoice && !answerPayload.skipValue) {\r\n const multipleOptions = answerPayload.value.split(',');\r\n for (const option of multipleOptions) {\r\n tempAnswers.push({ ...answerPayload, value: option, optionValue: +option, hierarchyId: state.hierarchyId, groupId: state.groupId });\r\n }\r\n } else {\r\n tempAnswers.push({ ...answerPayload, hierarchyId: state.hierarchyId, groupId: state.groupId });\r\n }\r\n\r\n let newState: SurveyUIState = null;\r\n if (answerPayload.skipValue) {\r\n newState = cloneDeep(state);\r\n newState.pageGroups[state.chapterCurrent].pages[state.pageCurrent].pageItems[0].question.questionFields[0].answer = null;\r\n }\r\n\r\n return {\r\n ...state,\r\n answers: tempAnswers,\r\n nextDisabled: false,\r\n showSkipModal: false\r\n };\r\n }\r\n case Type.REMOVE_ANSWER: {\r\n const tempAnswers = JSON.parse(JSON.stringify(state.answers)) as Answer[];\r\n const answerPayload = action.payload;\r\n tempAnswers.removeEvery(a => a.questionId === answerPayload.questionId);\r\n return {\r\n ...state,\r\n answers: tempAnswers,\r\n nextDisabled: false,\r\n showSkipModal: false\r\n };\r\n }\r\n case Type.LOAD_PREVIEW: {\r\n return {\r\n ...state,\r\n loading: true,\r\n loaded: false,\r\n moduleId: action.payload.moduleId,\r\n modulePageGroups: action.payload.pageGroups as ModulePageGroup[]\r\n };\r\n }\r\n case Type.LOAD_QUESTION_FIELD_PREVIEW: {\r\n return {\r\n ...state,\r\n loading: true,\r\n loaded: false,\r\n moduleId: action.payload.moduleId,\r\n modulePageGroups: []\r\n };\r\n }\r\n case Type.SET_QUESTION_FIELD: {\r\n const newState = { ...state };\r\n if (action.payload && newState.pageGroups?.length > 0) {\r\n newState.pageGroups[0].pages[0].pageItems[0].question.questionFields[0] = action.payload;\r\n }\r\n return newState\r\n }\r\n\r\n case Type.LOAD_PREVIEW_SUCCESS: {\r\n const items = action.payload.pageGroups;\r\n return {\r\n ...state,\r\n languageCode: action.payload.languageCode,\r\n sessionId: null,\r\n previewMode: true,\r\n pageGroups: items,\r\n chapterTotalCount: items.length,\r\n progressChaptersCount: items.filter(visibleAndIncluded).length,\r\n chapterPagesTotalCount: items[state.chapterCurrent].pages.length,\r\n progressChapterPagesTotalCount: items[state.chapterCurrent].pages.filter(visibleAndIncluded).length,\r\n loaded: true,\r\n loading: false,\r\n nextDisabled: false,\r\n page: items[state.chapterCurrent].pages[state.pageCurrent],\r\n rules: action.payload.rules,\r\n ruleDependencies: action.payload.ruleDependencies\r\n }\r\n }\r\n case Type.SET_QUESTION_VISIBILITY: {\r\n const _pageGroups = cloneDeep(state.pageGroups);\r\n let pages: SurveyPage[] = [];\r\n const pageGroups: SurveyPageGroup[] = [];\r\n for (const pageGroup of _pageGroups) {\r\n pages = [];\r\n for (const page of pageGroup.pages) {\r\n for (const pageItem of page.pageItems\r\n .filter(pi => pi.question != null)) {\r\n for (const question of action.payload) {\r\n\r\n if (pageItem.question.questionId === question.id) {\r\n pageItem.question = { ...pageItem.question, visible: question.visible };\r\n }\r\n }\r\n }\r\n pages.push({\r\n ...page,\r\n visible: page.pageItems.some(pi => (pi.content && visible(pi.content)) || (pi.question && visible(pi.question)))\r\n });\r\n }\r\n pageGroups.push({\r\n ...pageGroup,\r\n pages: [...pages], visible: pages.some(p => p.key !== LayoutType.ChapterPage && visible(p))\r\n });\r\n }\r\n return {\r\n ...state,\r\n pageGroups: pageGroups,\r\n progressChaptersCount: pageGroups.filter(visibleAndIncluded).length,\r\n progressChapterPagesTotalCount: pageGroups[state.chapterCurrent].pages.filter(visibleAndIncluded).length\r\n };\r\n }\r\n case Type.SET_CONTENT_VISIBILITY: {\r\n const _pageGroups = cloneDeep(state.pageGroups);\r\n let pages: SurveyPage[] = [];\r\n const pageGroups: SurveyPageGroup[] = [];\r\n for (const pageGroup of _pageGroups) {\r\n pages = [];\r\n for (const page of pageGroup.pages) {\r\n for (const pageItem of page.pageItems\r\n .filter(pi => pi.content != null && pi.content.id === action.payload.contentId)) {\r\n pageItem.content = { ...pageItem.content, visible: action.payload.visible };\r\n }\r\n pages.push({\r\n ...page,\r\n visible: page.pageItems.some(pi => (pi.content && visible(pi.content)) || (pi.question && visible(pi.question)))\r\n });\r\n }\r\n pageGroups.push({\r\n ...pageGroup,\r\n pages: [...pages], visible: pageGroup.pages.some(p => p.key !== LayoutType.ChapterPage && visible(p))\r\n });\r\n }\r\n return {\r\n ...state,\r\n pageGroups: pageGroups,\r\n progressChaptersCount: pageGroups.filter(visibleAndIncluded).length,\r\n progressChapterPagesTotalCount: pageGroups[state.chapterCurrent].pages.filter(visibleAndIncluded).length\r\n };\r\n }\r\n\r\n case Type.SET_CHAPTER_VISIBILITY: {\r\n const pageGroups = [...state.pageGroups];\r\n const pageGroup = pageGroups.find(pg => pg.key === action.payload.pageGroupKey);\r\n if (pageGroup) {\r\n pageGroup.visible = action.payload.visible;\r\n }\r\n return {\r\n ...state,\r\n pageGroups: pageGroups,\r\n progressChaptersCount: pageGroups.filter(visibleAndIncluded).length,\r\n progressChapterPagesTotalCount: pageGroups[state.chapterCurrent].pages.filter(visibleAndIncluded).length\r\n };\r\n }\r\n\r\n case Type.CLEAR_STATE: {\r\n\r\n // Preserve theme, to prevent flickering in ui\r\n const theme = state.theme;\r\n\r\n const _resetState = JSON.parse(resetState) as SurveyUIState;\r\n _resetState.theme = theme;\r\n return _resetState;\r\n }\r\n\r\n case Type.LOAD_CHAPTER_SUMMARY: {\r\n const chapterOrder = action.payload as number;\r\n let chapterSummaryPage: SurveyPage =\r\n {\r\n order: 0,\r\n pageItems: [],\r\n key: LayoutType.ChapterSummaryPage,\r\n includedInProgress: false,\r\n showPageProgress: false,\r\n showNavigation: false,\r\n showAbout: false,\r\n showChapterProgress: true,\r\n visible: true\r\n };\r\n\r\n chapterSummaryPage = {\r\n ...chapterSummaryPage,\r\n ...state.pageGroups[chapterOrder].pages\r\n .find(x => x.key === LayoutType.ChapterPage)\r\n };\r\n\r\n\r\n chapterSummaryPage.key = LayoutType.ChapterSummaryPage;\r\n return {\r\n ...state,\r\n page: chapterSummaryPage,\r\n pageCurrent: -1,\r\n chapterCurrent: chapterOrder,\r\n progressChapterCurrent: chapterProgressAtIndex(state, chapterOrder),\r\n showFastForwardButton: true,\r\n animationDirectionNext: false\r\n };\r\n }\r\n\r\n case Type.SKIP_PAGE: {\r\n return {\r\n ...state,\r\n showSkipModal: true\r\n };\r\n }\r\n\r\n case Type.CANCEL_SKIP: {\r\n return {\r\n ...state,\r\n showSkipModal: false\r\n };\r\n }\r\n\r\n case Type.PREVIEW_THEME_SELECTED: {\r\n return {\r\n ...state,\r\n theme: action.payload\r\n }\r\n }\r\n\r\n default: {\r\n return state;\r\n }\r\n }\r\n}\r\n\r\nfunction chapterProgressAtIndex(state: SurveyUIState, index: number) {\r\n const notVisibleCount = state.pageGroups.filter((pg, idx) => !visibleAndIncluded(pg) && idx <= index).length;\r\n return index - notVisibleCount;\r\n}\r\n\r\n\r\nfunction isSkipButtonSelectedForQuestion(state: SurveyUIState, questionId: number): boolean {\r\n if (state.answers && state.answers.length > 0\r\n && state.answers.filter(a => a.questionId === questionId && a.skipValue).length > 0) {\r\n return true;\r\n }\r\n return false;\r\n}\r\n\r\nfunction visibleAndIncluded(x: SurveyPage | SurveyPageGroup) {\r\n return x.includedInProgress === true && visible(x);\r\n}\r\n\r\nfunction visible(x: SurveyPage | SurveyPageGroup | Question | Content) {\r\n return x.visible === undefined || x.visible;\r\n}\r\n","import { can, UserInfo } from 'app/shared/models';\r\nimport { Actions as UserInfoActions, Type as UserInfoActionType } from 'app/state/actions/user-info.actions';\r\nimport { cloneDeep } from 'lodash-es';\r\n\r\nconst initialState: UserInfo = {\r\n companyId: null,\r\n companyName: null,\r\n languageCode: null,\r\n languageId: null,\r\n rtl: false,\r\n status: null,\r\n userId: null,\r\n firstName: null,\r\n lastName: null,\r\n userName: null,\r\n userPermission: { isAdmin: false, companyId: null, groupPermissions: null, can: null },\r\n displayLanguageCode: null,\r\n displayLanguageId: null,\r\n availableAccounts: []\r\n};\r\n\r\nexport function reducer(state: UserInfo = initialState, action: UserInfoActions): UserInfo {\r\n\r\n switch (action.type) {\r\n case UserInfoActionType.LOAD_USER_INFO_SUCCESS: {\r\n const userInfoPayload: UserInfo = cloneDeep(action.payload);\r\n userInfoPayload.userPermission.can = can;\r\n return {\r\n ...state,\r\n ...userInfoPayload,\r\n displayLanguageId: userInfoPayload.displayLanguageId ?? state.displayLanguageId ?? state.languageId,\r\n displayLanguageCode: userInfoPayload.languageCode ?? state.displayLanguageCode ?? state.languageCode\r\n };\r\n }\r\n\r\n case UserInfoActionType.SET_USER_CONTEXT_LANGUAGE_SUCCESS: {\r\n return {\r\n ...state,\r\n ...{\r\n displayLanguageCode: action.payload.code ?? state.displayLanguageCode,\r\n displayLanguageId: action.payload.id ?? state.displayLanguageId\r\n }\r\n };\r\n }\r\n\r\n case UserInfoActionType.SET_USER_LANGUAGE_SUCCESS: {\r\n return {\r\n ...state,\r\n ...{\r\n languageId: action.payload?.id ?? state.languageId,\r\n languageCode: action.payload?.code ?? state.languageCode\r\n }\r\n }\r\n }\r\n\r\n default: {\r\n return state;\r\n }\r\n }\r\n}\r\n","import { UserState } from 'app/shared/models';\r\nimport { Actions as UserStateActions, Type as UserStateActionType } from 'app/state/actions/user-state.actions';\r\n\r\nconst initialState: UserState = {\r\n companyParameters: []\r\n};\r\nexport function reducer(state: UserState = initialState, action: UserStateActions) {\r\n switch (action.type) {\r\n case UserStateActionType.LOAD_USER_STATE_SUCCESS: {\r\n return Object.assign({}, action.payload);\r\n }\r\n case UserStateActionType.UPDATE_USER_STATE_SUCCESS: {\r\n return Object.assign({}, action.payload);\r\n }\r\n default: {\r\n return state;\r\n }\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { RouterModule, Routes } from '@angular/router';\r\nimport { environment } from 'environments/environment';\r\n\r\nconst appRoutes: Routes = [\r\n { path: 'survey', loadChildren: () => import('app/survey/survey.module').then(m => m.SurveyModule) },\r\n { path: 'survey-portal', loadChildren: () => import('app/survey-portal/survey-portal.module').then(m => m.SurveyPortalModule) },\r\n { path: 'opt-out', loadChildren: () => import('app/shared/opt-out/opt-out.module').then(m => m.OptOutModule) },\r\n { path: '', loadChildren: () => import('app/layout/layout.module').then(m => m.LayoutModule) },\r\n { path: '', loadChildren: () => import('app/shared/auth/auth.module').then(m => m.AuthModule) },\r\n { path: '', loadChildren: () => import('app/shared/errors/errors.module').then(m => m.ErrorsModule) },\r\n { path: '', pathMatch: 'full', redirectTo: 'admin' }\r\n // { path: '**', redirectTo: 'portal', pathMatch: 'full' }\r\n];\r\n@NgModule({\r\n imports: [\r\n RouterModule.forRoot(\r\n appRoutes,\r\n { enableTracing: environment.production ? false : false } // <-- set right value for debugging purposes only\r\n )\r\n ],\r\n exports: [\r\n RouterModule\r\n ]\r\n})\r\nexport class AppRoutingModule { }\r\n","import { Direction } from '@angular/cdk/bidi';\r\nimport { DOCUMENT } from '@angular/common';\r\nimport { Component, HostListener, Inject, OnInit, Renderer2, ViewChild } from '@angular/core';\r\nimport { Router } from '@angular/router';\r\nimport { IgxOverlayOutletDirective } from '@infragistics/igniteui-angular';\r\nimport { TranslocoService } from '@ngneat/transloco';\r\nimport { Store } from '@ngrx/store';\r\nimport { AuthenticationService, ConfigurationService } from 'app/shared';\r\nimport { NeedsToUnsubscribe } from 'app/shared/core';\r\nimport { LoadUserInfo } from 'app/state/actions/user-info.actions';\r\nimport { AppState } from 'app/state/app.state';\r\nimport { filter, takeUntil } from 'rxjs/operators';\r\nimport { ApplicationInsightService } from './shared/errors/application-insights.service';\r\nimport { IgxGlobalOverlayService } from './shared/services/igx-global-overlay.service';\r\n\r\n@Component({\r\n selector: 'app-root',\r\n templateUrl: './app.component.html',\r\n styleUrls: ['./app.component.scss']\r\n})\r\nexport class AppComponent extends NeedsToUnsubscribe implements OnInit {\r\n private currentUserLanguage: string;\r\n private userInfo$ = this.store.select(state => state.userInfo);\r\n private keysPressed = [];\r\n buildInfo = '';\r\n buildInfoVisible = false;\r\n loadingCurrent = false;\r\n currentThemeIdx = 0;\r\n dir: Direction = 'ltr';\r\n\r\n @HostListener('document:keydown', ['$event']) private handleKeydown(event: KeyboardEvent) {\r\n this.keysPressed.push(event.key);\r\n this.keysPressed = this.keysPressed.slice(-3);\r\n switch (this.keysPressed.join(';')) {\r\n case 'Escape;Escape;Escape':\r\n this.toggleBuildinfo();\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n\r\n @ViewChild(IgxOverlayOutletDirective) set overlay(value: IgxOverlayOutletDirective) {\r\n this.igxGlobalOverlay.register(value);\r\n }\r\n\r\n constructor(\r\n public router: Router,\r\n private configService: ConfigurationService,\r\n private translate: TranslocoService,\r\n private authService: AuthenticationService,\r\n private store: Store,\r\n private renderer: Renderer2,\r\n private igxGlobalOverlay: IgxGlobalOverlayService,\r\n @Inject(DOCUMENT) private _document: Document,\r\n applicationInsights: ApplicationInsightService\r\n ) {\r\n super();\r\n applicationInsights.trackPageView();\r\n }\r\n ngOnInit(): void {\r\n this.translate.setDefaultLang('en');\r\n\r\n this.authService.userLoadededEvent\r\n .pipe(takeUntil(this.unsubscribe$))\r\n .subscribe(_ => {\r\n if (this.authService.loggedIn && this.currentUserLanguage == null && !this.loadingCurrent) {\r\n this.loadingCurrent = true;\r\n this.store.dispatch(new LoadUserInfo());\r\n }\r\n });\r\n\r\n this.userInfo$\r\n .pipe(takeUntil(this.unsubscribe$),\r\n filter(u => u !== null))\r\n .subscribe(user => {\r\n if (user.userId != null) {\r\n this.currentUserLanguage = user.languageCode;\r\n this.setI18NAttributes(user.languageCode, user.rtl ? 'rtl' : 'ltr');\r\n if (user.status === 0) {\r\n this.authService.startSignoutMainWindow();\r\n }\r\n this.loadingCurrent = false;\r\n }\r\n });\r\n\r\n this.store.select(s => s.surveyState)\r\n .subscribe(surveyState => {\r\n this.setI18NAttributes(surveyState.languageCode, surveyState.languageDir);\r\n })\r\n }\r\n\r\n private setI18NAttributes(lang: string, dir: Direction) {\r\n this.renderer.setAttribute(\r\n this._document.documentElement, 'lang', lang\r\n );\r\n this.dir = dir;\r\n this.renderer.setAttribute(\r\n this._document.documentElement, 'dir', this.dir\r\n );\r\n }\r\n\r\n toggleBuildinfo() {\r\n const config = this.configService.configuration;\r\n this.buildInfo = config.BuildName === '!Local'\r\n ? 'Local build'\r\n : `\r\n ${config.BuildName}, Build: ${config.BuildVersion}\r\n source branch [${config.BuildBranch}]\r\n `;\r\n this.buildInfoVisible = !this.buildInfoVisible;\r\n this.keysPressed = [];\r\n }\r\n\r\n}\r\n","
\r\n \r\n
{{buildInfo}}
\r\n
\r\n
\r\n","interface Array {\r\n distinct(): T[];\r\n remove(item: T): boolean;\r\n removeEvery(predicate: (item: T) => boolean): void;\r\n /**\r\n * @deprecated Use `arr.flatMap(predicate)` instead\r\n */\r\n selectMany(predicate: (item: T) => U[]): U[];\r\n groupBy(func: (x: T) => string): Grouping[];\r\n equals(e: T[]): boolean;\r\n}\r\ninterface Grouping {\r\n key: string;\r\n values: T[];\r\n}\r\n(function () {\r\n\r\n if (!Array.prototype.equals) {\r\n Array.prototype.equals = function (this: T[], b: T[]) {\r\n if (this.length !== b.length) { return false; }\r\n const uniqueValues = new Set([...this, ...b]);\r\n for (const v of uniqueValues) {\r\n const aCount = this.filter(e => e === v).length;\r\n const bCount = b.filter(e => e === v).length;\r\n if (aCount !== bCount) { return false; }\r\n }\r\n return true;\r\n };\r\n }\r\n if (!Array.prototype.distinct) {\r\n Array.prototype.distinct = function (this: T[]) {\r\n return this.filter((v, i, a) => a.indexOf(v) === i);\r\n };\r\n }\r\n\r\n if (!Array.prototype.remove) {\r\n Array.prototype.remove = function (this: T[], item: T): boolean {\r\n const index = this.indexOf(item);\r\n if (index >= 0) {\r\n this.splice(index, 1);\r\n return true;\r\n }\r\n return false;\r\n };\r\n }\r\n\r\n if (!Array.prototype.removeEvery) {\r\n Array.prototype.removeEvery = function (this: T[], predicate: (item: T) => boolean) {\r\n const items = this.filter(x => predicate(x));\r\n for (const item of items) {\r\n this.remove(item);\r\n }\r\n };\r\n }\r\n\r\n if (!Array.prototype.selectMany) {\r\n Array.prototype.selectMany = function (this: T[], predicate: (item: T) => U[]) {\r\n return this.map(predicate).reduce((a, b) => a.concat(b), []);\r\n };\r\n }\r\n\r\n if (!Array.prototype.groupBy) {\r\n Array.prototype.groupBy = function (this: T[], keyFunction: (item: T) => string): Grouping[] {\r\n const groups: { [key: string]: T[] } = {};\r\n this.forEach(function (el) {\r\n const key = keyFunction(el);\r\n // eslint-disable-next-line eqeqeq\r\n if (key in groups == false) {\r\n groups[key] = [];\r\n }\r\n groups[key].push(el);\r\n });\r\n return Object.keys(groups).map(key => ({\r\n key: key,\r\n values: groups[key]\r\n }));\r\n };\r\n }\r\n})();\r\n","import { DEFAULT_DIALOG_CONFIG } from '@angular/cdk/dialog';\r\nimport { DatePipe, Location, LocationStrategy, PathLocationStrategy } from '@angular/common';\r\nimport { HttpClientModule } from '@angular/common/http';\r\nimport { APP_INITIALIZER, ErrorHandler, NgModule } from '@angular/core';\r\nimport { MatSnackBarModule } from '@angular/material/snack-bar';\r\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\r\nimport { IgxExcelExporterService, IgxToggleModule } from '@infragistics/igniteui-angular';\r\nimport { EffectsModule } from '@ngrx/effects';\r\nimport { MinimalRouterStateSerializer, RouterState, StoreRouterConnectingModule, routerReducer } from '@ngrx/router-store';\r\nimport { Store, StoreModule } from '@ngrx/store';\r\nimport { StoreDevtoolsModule } from '@ngrx/store-devtools';\r\nimport { ConfigurationService, ErrorsHandler } from 'app/shared';\r\nimport { AuthModule } from 'app/shared/auth/auth.module';\r\nimport { CoreModule } from 'app/shared/core/core.module';\r\nimport { AppState } from 'app/state/app.state';\r\nimport {\r\n CompanyContextEffects, ConfigurationEffects,\r\n FollowupWizardEffects, NavigationEffects, NavtreeEffects,\r\n ProductWizardEffects, ReportEffects, SurveyUIEffects, SurveyWizardEffects,\r\n UserInfoEffects, UserStateEffects\r\n} from 'app/state/effects';\r\nimport * as companyContext from 'app/state/reducers/company-context.reducer';\r\nimport * as configuration from 'app/state/reducers/configuration.reducer';\r\nimport * as followupWizard from 'app/state/reducers/followup-wizard.reducer';\r\nimport * as navtreeState from 'app/state/reducers/navtree.reducer';\r\nimport * as organizationState from 'app/state/reducers/organization.reducer';\r\nimport * as reportState from 'app/state/reducers/report.reducer';\r\nimport * as surveyState from 'app/state/reducers/survey-ui.reducer';\r\nimport * as surveyWizard from 'app/state/reducers/survey-wizard.reducer';\r\nimport * as userInfo from 'app/state/reducers/user-info.reducer';\r\nimport * as userState from 'app/state/reducers/user-state.reducer';\r\nimport { MarkdownModule } from 'ngx-markdown';\r\nimport { lastValueFrom } from 'rxjs';\r\nimport { filter, take } from 'rxjs/operators';\r\nimport { AppRoutingModule } from './app-routing.module';\r\nimport { AppComponent } from './app.component';\r\nimport './prototype/array';\r\nimport { Configuration } from './shared/models';\r\nimport { UIKitDefaultDialogConfig } from './shared/ui-kit/dialog/dialog-config';\r\nimport * as ConfigurationActions from './state/actions/configuration.actions';\r\nimport { customFallbackStrategy } from './transloco/custom-fallback-strategy';\r\nimport { TranslocoRootModule } from './transloco/transloco-root.module';\r\n\r\n@NgModule({\r\n declarations: [\r\n AppComponent\r\n ],\r\n imports: [\r\n HttpClientModule,\r\n BrowserAnimationsModule,\r\n CoreModule,\r\n StoreModule.forRoot({\r\n router: routerReducer,\r\n companyContext: companyContext.reducer,\r\n userInfo: userInfo.reducer,\r\n configuration: configuration.reducer,\r\n userState: userState.reducer,\r\n surveyWizardContext: surveyWizard.reducer,\r\n followupWizardContext: followupWizard.reducer,\r\n surveyState: surveyState.reducer,\r\n navtreeState: navtreeState.reducer,\r\n reportState: reportState.reducer,\r\n organizationState: organizationState.reducer\r\n },\r\n {\r\n runtimeChecks: {\r\n strictStateImmutability: false,\r\n strictActionImmutability: false,\r\n }\r\n }\r\n ),\r\n EffectsModule.forRoot([\r\n UserInfoEffects,\r\n CompanyContextEffects,\r\n NavigationEffects,\r\n ConfigurationEffects,\r\n UserStateEffects,\r\n SurveyWizardEffects,\r\n FollowupWizardEffects,\r\n ProductWizardEffects,\r\n SurveyUIEffects,\r\n NavtreeEffects,\r\n ReportEffects\r\n ]),\r\n AuthModule,\r\n StoreDevtoolsModule.instrument(),\r\n StoreRouterConnectingModule.forRoot({\r\n serializer: MinimalRouterStateSerializer,\r\n routerState: RouterState.Minimal,\r\n }),\r\n MarkdownModule.forRoot(),\r\n TranslocoRootModule,\r\n IgxToggleModule,\r\n AppRoutingModule,\r\n MatSnackBarModule\r\n ],\r\n providers: [\r\n { provide: UIKitDefaultDialogConfig, useClass: UIKitDefaultDialogConfig },\r\n { provide: DEFAULT_DIALOG_CONFIG, useClass: UIKitDefaultDialogConfig },\r\n customFallbackStrategy,\r\n {\r\n provide: APP_INITIALIZER,\r\n multi: true,\r\n deps: [Store, ConfigurationService],\r\n useFactory: getUserConfig\r\n },\r\n DatePipe,\r\n Location,\r\n IgxExcelExporterService,\r\n { provide: LocationStrategy, useClass: PathLocationStrategy },\r\n { provide: ErrorHandler, useClass: ErrorsHandler }\r\n ],\r\n bootstrap: [AppComponent],\r\n})\r\n\r\nexport class AppModule {\r\n\r\n}\r\n\r\nfunction getUserConfig(store: Store): () => Promise {\r\n return function (): Promise {\r\n store.dispatch(new ConfigurationActions.LoadConfiguration());\r\n return lastValueFrom(store.select(x => x.configuration)\r\n .pipe(\r\n filter(c => !!c),\r\n take(1)\r\n )\r\n );\r\n };\r\n}\r\n","import { enableProdMode } from '@angular/core';\r\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\r\n\r\nimport { AppModule } from './app/app.module';\r\nimport { environment } from 'environments/environment';\r\n\r\nif (environment.production) {\r\n enableProdMode();\r\n}\r\n\r\nplatformBrowserDynamic().bootstrapModule(AppModule);\r\n"],"mappings":"2mDAOA,IAAMA,EAAiB,iBACjBC,GAAU,UACVC,GAAQ,QACRC,GAAW,WACXC,GAAS,SACTC,GAAQ,QACRC,GAAgB,gBAChBC,GAAqB,qBACrBC,GAAgB,gBAChBC,GAAiB,iBACjBC,GAAe,eACfC,GAAe,eACfC,GAAkB,kBAClBC,EAAN,KAAoB,CAClB,YAAYC,EAAQC,EAAW,CAI7B,GAHA,KAAK,OAASD,EACd,KAAK,UAAYC,EACjB,KAAK,KAAOf,EACR,OAAOc,EAAO,KAAS,IACzB,MAAM,IAAI,MAAM,oFAAyF,CAE7G,CACF,EACME,GAAN,KAAc,CACZ,aAAc,CACZ,KAAK,KAAOf,EACd,CACF,EACMgB,GAAN,KAAY,CACV,YAAYF,EAAW,CACrB,KAAK,UAAYA,EACjB,KAAK,KAAOb,EACd,CACF,EACMgB,GAAN,KAAe,CACb,YAAYH,EAAW,CACrB,KAAK,UAAYA,EACjB,KAAK,KAAOZ,EACd,CACF,EACMgB,GAAN,KAAa,CACX,YAAYJ,EAAW,CACrB,KAAK,UAAYA,EACjB,KAAK,KAAOX,EACd,CACF,EACMgB,GAAN,KAAY,CACV,aAAc,CACZ,KAAK,KAAOf,EACd,CACF,EACMgB,GAAN,KAAmB,CACjB,YAAYC,EAAI,CACd,KAAK,GAAKA,EACV,KAAK,KAAOhB,EACd,CACF,EASA,IAAMiB,GAAN,KAAkB,CAChB,YAAYC,EAAO,CACjB,KAAK,MAAQA,EACb,KAAK,KAAOC,EACd,CACF,EACMC,GAAN,KAAmB,CACjB,YAAYC,EAAU,CACpB,KAAK,SAAWA,EAChB,KAAK,KAAOC,EACd,CACF,EACMC,GAAN,KAAkB,CAChB,YAAYC,EAAiB,CAC3B,KAAK,gBAAkBA,EACvB,KAAK,KAAOC,EACd,CACF,EACMC,GAAN,KAAkB,CAChB,YAAYC,EAAQ,CACl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,CAAA,CAAA,EAqBf,IAAOnE,EAAPoE,SAAOpE,CAAS,GAAA,EAItB,SAASc,GAAcuD,EAAsB,CAC3C,OAAO,UAAA,CACLA,OAAAA,EAAMC,SAAS,IAAyBC,EAAmB,EACpDC,GAAcH,EAAMI,OAAOC,GAAKA,EAAEzC,aAAa,EACnD0C,KACCC,EAAOC,GAAK,CAAC,CAACA,CAAC,EACfC,EAAK,CAAC,CAAC,CACR,CAEL,CACF,CC3HIC,GAAYC,YACdC,OAGFC,GAAA,EAAyBC,gBAAgBC,EAAS","names":["PERFORM_ACTION","REFRESH","RESET","ROLLBACK","COMMIT","SWEEP","TOGGLE_ACTION","SET_ACTIONS_ACTIVE","JUMP_TO_STATE","JUMP_TO_ACTION","IMPORT_STATE","LOCK_CHANGES","PAUSE_RECORDING","PerformAction","action","timestamp","Refresh","Reset","Rollback","Commit","Sweep","ToggleAction","id","JumpToState","index","JUMP_TO_STATE","JumpToAction","actionId","JUMP_TO_ACTION","ImportState","nextLiftedState","IMPORT_STATE","LockChanges","status","LOCK_CHANGES","PauseRecording","PAUSE_RECORDING","STORE_DEVTOOLS_CONFIG","InjectionToken","INITIAL_OPTIONS","noMonitor","DEFAULT_NAME","createConfig","optionsInput","DEFAULT_OPTIONS","options","logOnly","features","config","difference","first","second","item","unliftState","liftedState","computedStates","currentStateIndex","state","liftAction","action","PerformAction","sanitizeActions","actionSanitizer","actions","sanitizedActions","actionIdx","idx","sanitizeAction","__spreadProps","__spreadValues","sanitizeStates","stateSanitizer","states","computedState","sanitizeState","state","stateIdx","shouldFilterActions","config","filterLiftedState","liftedState","predicate","safelist","blocklist","filteredStagedActionIds","filteredActionsById","filteredComputedStates","id","liftedAction","isActionFiltered","blockedlist","predicateMatch","safelistMatch","s","escapeRegExp","blocklistMatch","injectZoneConfig","connectInZone","inject","NgZone","DevtoolsDispatcher","_DevtoolsDispatcher","ActionsSubject","ɵDevtoolsDispatcher_BaseFactory","t","ɵɵgetInheritedFactory","ɵɵdefineInjectable","ExtensionActionTypes","REDUX_DEVTOOLS_EXTENSION","InjectionToken","DevtoolsExtension","_DevtoolsExtension","devtoolsExtension","dispatcher","PERFORM_ACTION","currentState","unliftState","sanitizedState","sanitizedAction","sanitizedLiftedState","Observable","subscriber","connection","change","EMPTY","changes$","share","start$","filter","stop$","liftedActions$","map","concatMap","IMPORT_STATE","UPDATE","timeout","debounceTime","catchError","of","take","actionsUntilStop$","takeUntil","liftedUntilStop$","switchMap","extensionOptions","send","err","ɵɵinject","STORE_DEVTOOLS_CONFIG","INIT_ACTION","INIT","RECOMPUTE","RECOMPUTE_ACTION","computeNextEntry","reducer","error","errorHandler","nextState","nextError","recomputeStates","computedStates","minInvalidatedStateIndex","committedState","actionsById","stagedActionIds","skippedActionIds","isPaused","nextComputedStates","lastIncludedActionId","i","actionId","previousEntry","previousState","previousError","entry","liftInitialState","initialCommittedState","monitorReducer","liftReducerWith","initialLiftedState","options","monitorState","nextActionId","currentStateIndex","isLocked","commitExcessActions","n","excess","idsToDelete","commitChanges","LOCK_CHANGES","PAUSE_RECORDING","RESET","COMMIT","ROLLBACK","TOGGLE_ACTION","SET_ACTIONS_ACTIVE","start","end","active","actionIds","difference","JUMP_TO_STATE","JUMP_TO_ACTION","index","SWEEP","lastState","cmp","StoreDevtools","_StoreDevtools","actions$","reducers$","extension","scannedActions","initialState","liftedInitialState","liftReducer","liftedAction$","merge","skip","observeOn","queueScheduler","liftedReducer$","zoneConfig","liftedStateSubject","ReplaySubject","withLatestFrom","emitInZone","scan","reducedLiftedState","unliftedAction","liftedState$","state$","toSignal","Refresh","Reset","Rollback","Commit","Sweep","ToggleAction","JumpToAction","JumpToState","nextLiftedState","ImportState","status","LockChanges","PauseRecording","ReducerObservable","ScannedActionsSubject","ErrorHandler","INITIAL_STATE","ngZone","source","value","IS_EXTENSION_OR_MONITOR_PRESENT","createIsExtensionOrMonitorPresent","noMonitor","createReduxDevtoolsExtension","extensionKey","provideStoreDevtools","makeEnvironmentProviders","INITIAL_OPTIONS","createConfig","StateObservable","createStateObservable","ReducerManagerDispatcher","devtools","StoreDevtoolsModule","_StoreDevtoolsModule","ɵɵdefineNgModule","ɵɵdefineInjector","initialState","id","name","shortName","internalName","branch","detailedBranch","companyLanguages","companyAttributes","companyComments","restrictedActivationCommunication","smsEnabled","pinEnabled","isActive","mySurveysEnabled","userExternalIdIsMandatory","branding","accountName","type","segmentsHierarchyId","hasPurgeSettings","reducer","state","action","CompanyContextActionType","SET_COMPANY_CONTEXT_SUCCESS","__spreadValues","payload","UPDATE_COMPANY_COMMENT_CONTEXT","DELETE_COMPANY_COMMENT_CONTEXT","ADD_COMPANY_COMMENT_CONTEXT","__spreadProps","commentsReducer","SAVE_COMPANY_ATTRIBUTES_SUCCESS","initialStateComments","map","comment","filter","item","reducer","state","action","type","ConfigurationActionType","LOAD_CONFIGURATION_SUCCESS","Object","assign","ApiUrl","payload","API_URL","AuthUrl","AUTH_URL","LocalUrl","LOCAL_URL","ChrossApiUrl","CHROSS_API_URL","BenchmarkApiUrl","BENCHMARK_API_URL","WPApiUrl","WP_API_URL","BrilliantHomePageBaseUrl","BRILLIANTFUTURE_HP_BASE_URL","ExHelpCenterBaseUrl","EX_HELPCENTER_BASE_URL","CxHelpCenterBaseUrl","CX_HELPCENTER_BASE_URL","InstrumentationKey","ApplicationInsights","ExPendoAPIKey","EX_PENDO_API_KEY","CxPendoAPIKey","CX_PENDO_API_KEY","BuildBranch","BUILD_BRANCH","BuildVersion","BUILD_VERSION","BuildName","BUILD_NAME","Environment","FeatureFlags","initialState","items","routes","displayParameters","loading","isHandset","isTablet","toggleSidebar","reducer","state","action","type","NavtreeActionType","LOAD_NAVTREE_CANCELED","__spreadProps","__spreadValues","LOAD_NAVTREE_SUCCESS","payload","find","r","pageRoutes","getRoutes","getDisplayParameters","Object","assign","LOAD_NAVTREE","UPDATE_MISSING_VISIBILITY","map","navtreeItem","filteredMenuItems","filter","menuItem","displayType","length","UPDATE_VISIBILITY","cloneDeep","parameters","params","updatedItems","forEach","updateItem","treeItem","i","key","visible","companyParameters","cp","companyId","currentCompanyId","currentParameters","condition","context","evaluate","UPDATE_ISHANDSET","UPDATE_ISTABLET","TOGGLE_SIDEBAR","pages","page","route","pageKey","push","children","navItems","p","getValue","operand","source","param","field","name","value","logic","conditions","c","every","some","operand1Value","operand1","operand2Value","operand2","evaluateOperands","operator","op1","op2","initialState","organizationTableLoading","userTableLoading","deletedGroupsTableLoading","deletedGroupsCount","orphanGroupsTableLoading","orphanGroupsCount","reducer","state","action","type","Type","ORGANIZATION_TREE_TABLE_LOADING","__spreadProps","__spreadValues","ORGANIZATION_TREE_TABLE_LOADING_COMPLETE","USER_TABLE_LOADING","USER_TABLE_LOADING_COMPLETE","DELETED_GROUPS_TABLE_LOADING","DELETED_GROUPS_TABLE_LOADING_COMPLETE","SET_DELETED_GROUPS_COUNT","payload","ORPHAN_GROUPS_TABLE_LOADING","ORPHAN_GROUPS_TABLE_LOADING_COMPLETE","SET_ORPHAN_GROUPS_COUNT","initialState","sessionId","languageCode","languageId","hierarchyId","groupId","languageDir","loaded","loading","chapterPagesTotalCount","pageCurrent","chapterTotalCount","chapterCurrent","progressChapterPagesTotalCount","progressChaptersCount","progressPageCurrent","progressChapterCurrent","page","pageGroups","answers","showFastForwardButton","fastForwardChapter","fastForwardPage","previousDisabled","nextDisabled","previewMode","animationDirectionNext","noSurvey","expiredSurvey","rules","ruleDependencies","showSkipModal","singlePageQuestionSkipped","isSubmitted","isSubmitting","submitFailed","moduleId","modulePageGroups","theme","resetState","JSON","stringify","reducer","state","action","type","Type","SAVE_ANSWERS_DATABASE","__spreadValues","SAVE_ANSWERS_DATABASE_SUCCESS","SAVE_ANSWERS_DATABASE_FAILURE","LOAD_SURVEY_SURVEY_EXPIRED","__spreadProps","SurveyUITheme","Default","LOAD_SURVEY_CONTENT_SUCCESS","survey","payload","items","surveyModule","isRightToLeft","length","filter","visibleAndIncluded","pages","LOAD_SURVEY_STATE","LOAD_ANSWERS_DATABASE_SUCCESS","SUBMIT_SURVEY","SUBMIT_SURVEY_FAILURE","SUBMIT_SURVEY_SUCCESS","find","x","key","LayoutType","DonePage","SET_FAST_FORWARD_PAGE","findIndex","pg","p","SubmitPage","surveyState","i","visible","j","SkipPage","item","pageItems","pi","question","a","questionId","GO_TO_PAGE_SUCCESS","bookmark","nextPage","nextChapter","chapterIndex","pageIndex","numberOfPagesInBookmarkChapter","outer","progressChapter","chapterProgressAtIndex","progressPage","contentList","c","content","map","questionList","ids","isAnswered","o","some","isSkipButtonSelectedForQuestion","REGISTER_ANSWER","tempAnswers","parse","answerPayload","removeEvery","dataType","FieldType","MultipleChoice","skipValue","multipleOptions","value","split","option","push","optionValue","newState","cloneDeep","questionFields","answer","REMOVE_ANSWER","LOAD_PREVIEW","LOAD_QUESTION_FIELD_PREVIEW","SET_QUESTION_FIELD","LOAD_PREVIEW_SUCCESS","SET_QUESTION_VISIBILITY","_pageGroups","pageGroup","pageItem","id","ChapterPage","SET_CONTENT_VISIBILITY","contentId","SET_CHAPTER_VISIBILITY","pageGroupKey","CLEAR_STATE","_resetState","LOAD_CHAPTER_SUMMARY","chapterOrder","chapterSummaryPage","order","ChapterSummaryPage","includedInProgress","showPageProgress","showNavigation","showAbout","showChapterProgress","SKIP_PAGE","CANCEL_SKIP","PREVIEW_THEME_SELECTED","index","notVisibleCount","idx","undefined","initialState","companyId","companyName","languageCode","languageId","rtl","status","userId","firstName","lastName","userName","userPermission","isAdmin","groupPermissions","can","displayLanguageCode","displayLanguageId","availableAccounts","reducer","state","action","type","UserInfoActionType","LOAD_USER_INFO_SUCCESS","userInfoPayload","cloneDeep","payload","__spreadProps","__spreadValues","SET_USER_CONTEXT_LANGUAGE_SUCCESS","code","id","SET_USER_LANGUAGE_SUCCESS","initialState","companyParameters","reducer","state","action","type","UserStateActionType","LOAD_USER_STATE_SUCCESS","Object","assign","payload","UPDATE_USER_STATE_SUCCESS","appRoutes","path","loadChildren","then","m","SurveyModule","SurveyPortalModule","OptOutModule","LayoutModule","AuthModule","ErrorsModule","pathMatch","redirectTo","AppRoutingModule","RouterModule","forRoot","enableTracing","environment","production","_AppRoutingModule","AppComponent","NeedsToUnsubscribe","handleKeydown","event","keysPressed","push","key","slice","join","toggleBuildinfo","overlay","value","igxGlobalOverlay","register","constructor","router","configService","translate","authService","store","renderer","_document","applicationInsights","userInfo$","select","state","userInfo","buildInfo","buildInfoVisible","loadingCurrent","currentThemeIdx","dir","trackPageView","ngOnInit","setDefaultLang","userLoadededEvent","pipe","takeUntil","unsubscribe$","subscribe","_","loggedIn","currentUserLanguage","dispatch","LoadUserInfo","filter","u","user","userId","languageCode","setI18NAttributes","rtl","status","startSignoutMainWindow","s","surveyState","languageDir","lang","setAttribute","documentElement","config","configuration","BuildName","BuildVersion","BuildBranch","ɵɵdirectiveInject","Router","ConfigurationService","TranslocoService","AuthenticationService","Store","Renderer2","IgxGlobalOverlayService","DOCUMENT","ApplicationInsightService","selectors","viewQuery","rf","ctx","IgxOverlayOutletDirective","ɵɵlistener","$event","ɵɵresolveDocument","ɵɵelementStart","ɵɵelement","ɵɵtext","ɵɵelementEnd","ɵɵproperty","ɵɵadvance","ɵɵtextInterpolate","_AppComponent","Array","prototype","equals","b","length","uniqueValues","Set","v","aCount","filter","e","bCount","distinct","i","a","indexOf","remove","item","index","splice","removeEvery","predicate","items","x","selectMany","map","reduce","concat","groupBy","keyFunction","groups","forEach","el","key","push","Object","keys","values","AppModule","bootstrap","AppComponent","provide","UIKitDefaultDialogConfig","useClass","DEFAULT_DIALOG_CONFIG","customFallbackStrategy","APP_INITIALIZER","multi","deps","Store","ConfigurationService","useFactory","getUserConfig","DatePipe","Location","IgxExcelExporterService","LocationStrategy","PathLocationStrategy","ErrorHandler","ErrorsHandler","imports","HttpClientModule","BrowserAnimationsModule","CoreModule","StoreModule","forRoot","router","routerReducer","companyContext","reducer","userInfo","configuration","userState","surveyWizardContext","followupWizardContext","surveyState","navtreeState","reportState","organizationState","runtimeChecks","strictStateImmutability","strictActionImmutability","EffectsModule","UserInfoEffects","CompanyContextEffects","NavigationEffects","ConfigurationEffects","UserStateEffects","SurveyWizardEffects","FollowupWizardEffects","ProductWizardEffects","SurveyUIEffects","NavtreeEffects","ReportEffects","AuthModule","StoreDevtoolsModule","instrument","StoreRouterConnectingModule","serializer","MinimalRouterStateSerializer","routerState","MarkdownModule","TranslocoRootModule","IgxToggleModule","AppRoutingModule","MatSnackBarModule","_AppModule","store","dispatch","LoadConfiguration","lastValueFrom","select","x","pipe","filter","c","take","environment","production","enableProdMode","platformBrowser","bootstrapModule","AppModule"],"x_google_ignoreList":[0]}