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AS7D,MAAMtN,GAAgC,IAAxBwS,EAAgBxS,KAAa,CACtD,IAAI8Q,KAAY8B,EACZ/B,EAAoBsB,EAAES,EAAa9B,KACrCD,EAAoBI,EAAEH,GAAY8B,EAAY9B,IAGhD,GAAG+B,EAAS,IAAI5E,EAAS4E,EAAQhC,GAGlC,IADG8B,GAA4BA,EAA2BnL,GACrDgK,EAAIL,EAAS5M,OAAQiN,IACzBiB,EAAUtB,EAASK,GAChBX,EAAoBsB,EAAEK,EAAiBC,IAAYD,EAAgBC,IACrED,EAAgBC,GAAS,KAE1BD,EAAgBrB,EAASK,IAAM,EAEhC,OAAOX,EAAoBK,EAAEjD,IAG1B6E,EAAqB/O,KAAmB,aAAIA,KAAmB,cAAK,GACxE+O,EAAmBC,QAAQL,EAAqBM,KAAK,KAAM,IAC3DF,EAAmBzN,KAAOqN,EAAqBM,KAAK,KAAMF,EAAmBzN,KAAK2N,KAAKF,K,GC7CvF,IAAIG,EAAsBpC,EAAoBK,OAAEnR,EAAW,CAAC,MAAM,IAAO8Q,EAAoB,OAC7FoC,EAAsBpC,EAAoBK,EAAE+B,I","sources":["webpack:///webpack/runtime/chunk loaded","webpack:///./ko/ko.bindingHandlers.validationContainer.js","webpack:///./AdditioinaAuthMethodPageViewModel-exposed.ts","webpack:///./TwoFactorAuth/AuthenticationMethodWizardViewModel-exposed.ts","webpack:///./GeneralLogonViewModel-exposed.ts","webpack:///./ResetPasswordViewModel-exposed.ts","webpack:///./ServerSettingsViewModel-exposed.ts","webpack:///./TwoFactorAuth/TwoFactorAuthSettingsViewModel-exposed.ts","webpack:///./AdditioinaAuthMethodPageViewModel.ts","webpack:///./ClientModel.ts","webpack:///./ConfirmDialog.ts","webpack:///./GeneralLogonViewModel.ts","webpack:///./KeyGeneratorService.ts","webpack:///./NotificationService.ts","webpack:///./ResetPasswordViewModel.ts","webpack:///./ServerSettingsModel.ts","webpack:///./ServerSettingsViewModel.ts","webpack:///./TokenValidationMode.ts","webpack:///./TwoFactorAuth/AuthenticationMethodWizardViewModel.ts","webpack:///./TwoFactorAuth/TwoFactorAuthMethodType.ts","webpack:///./TwoFactorAuth/TwoFactorAuthSettingsModel.ts","webpack:///./TwoFactorAuth/TwoFactorAuthSettingsViewModel.ts","webpack:///./TwoFactorAuth/WizardViewMode.ts","webpack:///./UserInactivityWatcher.ts","webpack:///./ValidationConfigurator.ts","webpack:///./bundles/main.ts","webpack:///./startup/bootstrap-notify-settings.ts","webpack:///./startup/bootstrap.ts","webpack:///webpack/bootstrap","webpack:///webpack/runtime/global","webpack:///webpack/runtime/hasOwnProperty shorthand","webpack:///webpack/runtime/jsonp chunk loading","webpack:///webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","// This binding is designed to be used with `knockout.validation` library only\r\nko.bindingHandlers.validationContainer = {\r\n update: function (element, valueAccessor, allBindingsAccessor) {\r\n var obs = valueAccessor();\r\n\r\n if (obs === null || typeof obs === 'undefined')\r\n return;\r\n\r\n var isModified = obs.isModified && obs.isModified();\r\n var isValid = obs.isValid && obs.isValid() && isModified;\r\n var isInvalid = obs.isValid && (obs.isValid() === false) && isModified;\r\n\r\n if (isValid)\r\n $(element).addClass(\"has-success\");\r\n else\r\n $(element).removeClass(\"has-success\");\r\n\r\n if (isInvalid)\r\n $(element).addClass(\"has-error\");\r\n else\r\n $(element).removeClass(\"has-error\");\r\n }\r\n};","var ___EXPOSE_LOADER_IMPORT___ = require(\"-!../node_modules/.pnpm/ts-loader@6.2.1_typescript@4.2.4/node_modules/ts-loader/index.js!./AdditioinaAuthMethodPageViewModel.ts\");\nvar ___EXPOSE_LOADER_GET_GLOBAL_THIS___ = require(\"../node_modules/.pnpm/expose-loader@3.1.0_webpack@5.65.0/node_modules/expose-loader/dist/runtime/getGlobalThis.js\");\nvar ___EXPOSE_LOADER_GLOBAL_THIS___ = ___EXPOSE_LOADER_GET_GLOBAL_THIS___;\nif (typeof ___EXPOSE_LOADER_GLOBAL_THIS___[\"AdditioinaAuthMethodPage\"] === 'undefined') ___EXPOSE_LOADER_GLOBAL_THIS___[\"AdditioinaAuthMethodPage\"] = ___EXPOSE_LOADER_IMPORT___;\nmodule.exports = ___EXPOSE_LOADER_IMPORT___;\n","var ___EXPOSE_LOADER_IMPORT___ = require(\"-!../../node_modules/.pnpm/ts-loader@6.2.1_typescript@4.2.4/node_modules/ts-loader/index.js!./AuthenticationMethodWizardViewModel.ts\");\nvar ___EXPOSE_LOADER_GET_GLOBAL_THIS___ = require(\"../../node_modules/.pnpm/expose-loader@3.1.0_webpack@5.65.0/node_modules/expose-loader/dist/runtime/getGlobalThis.js\");\nvar ___EXPOSE_LOADER_GLOBAL_THIS___ = ___EXPOSE_LOADER_GET_GLOBAL_THIS___;\nif (typeof ___EXPOSE_LOADER_GLOBAL_THIS___[\"AuthenticationMethodWizard\"] === 'undefined') ___EXPOSE_LOADER_GLOBAL_THIS___[\"AuthenticationMethodWizard\"] = ___EXPOSE_LOADER_IMPORT___;\nmodule.exports = ___EXPOSE_LOADER_IMPORT___;\n","var ___EXPOSE_LOADER_IMPORT___ = require(\"-!../node_modules/.pnpm/ts-loader@6.2.1_typescript@4.2.4/node_modules/ts-loader/index.js!./GeneralLogonViewModel.ts\");\nvar ___EXPOSE_LOADER_GET_GLOBAL_THIS___ = require(\"../node_modules/.pnpm/expose-loader@3.1.0_webpack@5.65.0/node_modules/expose-loader/dist/runtime/getGlobalThis.js\");\nvar ___EXPOSE_LOADER_GLOBAL_THIS___ = ___EXPOSE_LOADER_GET_GLOBAL_THIS___;\nif (typeof ___EXPOSE_LOADER_GLOBAL_THIS___[\"GeneralLogon\"] === 'undefined') ___EXPOSE_LOADER_GLOBAL_THIS___[\"GeneralLogon\"] = ___EXPOSE_LOADER_IMPORT___;\nmodule.exports = ___EXPOSE_LOADER_IMPORT___;\n","var ___EXPOSE_LOADER_IMPORT___ = require(\"-!../node_modules/.pnpm/ts-loader@6.2.1_typescript@4.2.4/node_modules/ts-loader/index.js!./ResetPasswordViewModel.ts\");\nvar ___EXPOSE_LOADER_GET_GLOBAL_THIS___ = require(\"../node_modules/.pnpm/expose-loader@3.1.0_webpack@5.65.0/node_modules/expose-loader/dist/runtime/getGlobalThis.js\");\nvar ___EXPOSE_LOADER_GLOBAL_THIS___ = ___EXPOSE_LOADER_GET_GLOBAL_THIS___;\nif (typeof ___EXPOSE_LOADER_GLOBAL_THIS___[\"ResetPassword\"] === 'undefined') ___EXPOSE_LOADER_GLOBAL_THIS___[\"ResetPassword\"] = ___EXPOSE_LOADER_IMPORT___;\nmodule.exports = ___EXPOSE_LOADER_IMPORT___;\n","var ___EXPOSE_LOADER_IMPORT___ = require(\"-!../node_modules/.pnpm/ts-loader@6.2.1_typescript@4.2.4/node_modules/ts-loader/index.js!./ServerSettingsViewModel.ts\");\nvar ___EXPOSE_LOADER_GET_GLOBAL_THIS___ = require(\"../node_modules/.pnpm/expose-loader@3.1.0_webpack@5.65.0/node_modules/expose-loader/dist/runtime/getGlobalThis.js\");\nvar ___EXPOSE_LOADER_GLOBAL_THIS___ = ___EXPOSE_LOADER_GET_GLOBAL_THIS___;\nif (typeof ___EXPOSE_LOADER_GLOBAL_THIS___[\"ServerSettings\"] === 'undefined') ___EXPOSE_LOADER_GLOBAL_THIS___[\"ServerSettings\"] = ___EXPOSE_LOADER_IMPORT___;\nmodule.exports = ___EXPOSE_LOADER_IMPORT___;\n","var ___EXPOSE_LOADER_IMPORT___ = require(\"-!../../node_modules/.pnpm/ts-loader@6.2.1_typescript@4.2.4/node_modules/ts-loader/index.js!./TwoFactorAuthSettingsViewModel.ts\");\nvar ___EXPOSE_LOADER_GET_GLOBAL_THIS___ = require(\"../../node_modules/.pnpm/expose-loader@3.1.0_webpack@5.65.0/node_modules/expose-loader/dist/runtime/getGlobalThis.js\");\nvar ___EXPOSE_LOADER_GLOBAL_THIS___ = ___EXPOSE_LOADER_GET_GLOBAL_THIS___;\nif (typeof ___EXPOSE_LOADER_GLOBAL_THIS___[\"TwoFactorAuthSettings\"] === 'undefined') ___EXPOSE_LOADER_GLOBAL_THIS___[\"TwoFactorAuthSettings\"] = ___EXPOSE_LOADER_IMPORT___;\nmodule.exports = ___EXPOSE_LOADER_IMPORT___;\n","export class AdditioinaAuthMethodPageViewModel {\r\n constructor(options) {\r\n this.form$ = options.form$;\r\n\r\n this.methodId = ko.observable(options.defaultMethodId).extend({ required: true });\r\n this.pin = ko.observable().extend({ required: true, minLength: 6 });\r\n this.canShowOtherMethods = ko.observable(options.canShowOtherMethods);\r\n\r\n this.canSubmit = ko.pureComputed({\r\n read: () => !!this.methodId() && !!this.pin(),\r\n deferEvaluation: true\r\n });\r\n\r\n if (!options.defaultMethodId) {\r\n this.showOtherMethod(true);\r\n }\r\n }\r\n\r\n readonly form$: JQuery;\r\n readonly canSubmit: KnockoutComputed;\r\n\r\n methodId: KnockoutObservable;\r\n pin: KnockoutObservable;\r\n showOtherMethod = ko.observable(false);\r\n canShowOtherMethods: KnockoutObservable;\r\n\r\n init() {\r\n ko.applyBindings(this);\r\n }\r\n\r\n onSubmit() {\r\n if (this.canSubmit()) {\r\n this.form$.submit();\r\n }\r\n }\r\n\r\n onMethodIdChange(methodId) {\r\n this.methodId(methodId);\r\n }\r\n\r\n onShowOtherMethod() {\r\n this.methodId(undefined);\r\n this.showOtherMethod(true);\r\n }\r\n}\r\n","export class ClientModel {\r\n id: KnockoutObservable = ko.observable(null);\r\n name: KnockoutObservable = ko.observable(null);\r\n installed: KnockoutObservable = ko.observable(false);\r\n \r\n url: KnockoutObservable = ko.observable(null).extend({ \r\n required: {\r\n onlyIf: () => this.installed() === true\r\n },\r\n pattern: {\r\n onlyIf: () => PRODUCTION === true,\r\n message: 'Url must start from \"https\\:\\/\\/',\r\n params: '^https\\:\\/\\/\\/*'\r\n }\r\n });\r\n \r\n secret: KnockoutObservable = ko.observable(null).extend({\r\n required: {\r\n onlyIf: () => this.installed() === true\r\n }, \r\n minLength: {\r\n params: 50,\r\n onlyIf: () => this.installed() === true\r\n } \r\n });\r\n}","export const ConfirmDialogType = Object.freeze({ YesNo: 0, OKCancel: 1, YesNoCancel: 2 });\r\n\r\nexport function ConfirmDialog(options) {\r\n if (!options) {\r\n throw \"options is required\";\r\n }\r\n\r\n if (!options.callback) {\r\n throw \"options.callback is required\";\r\n }\r\n\r\n if (!options.message) {\r\n throw \"options.message is required\";\r\n }\r\n\r\n const bootboxOptions = {\r\n animate: false,\r\n callback: options.callback,\r\n message: options.message,\r\n title: undefined,\r\n size: undefined,\r\n buttons: undefined\r\n };\r\n\r\n if (options.title) {\r\n bootboxOptions.title = options.title;\r\n }\r\n\r\n if (options.size) {\r\n bootboxOptions.size = options.size;\r\n }\r\n\r\n const customDialogTypes = [ConfirmDialogType.YesNoCancel];\r\n const isCustomDialogType = (dialogType: any): boolean => customDialogTypes.includes(dialogType);\r\n\r\n const dialogType = options.dialogType || ConfirmDialogType.YesNo;\r\n if (isCustomDialogType(dialogType)) {\r\n\r\n if (dialogType === ConfirmDialogType.YesNoCancel) {\r\n const execCallback = (arg?: boolean): boolean => {\r\n if (options.callback) {\r\n return options.callback.call(this, arg);\r\n }\r\n return true;\r\n };\r\n\r\n bootboxOptions.buttons = {\r\n yes: { label: \"Yes\", callback: (res) => execCallback(true), className: \"btn-primary\" },\r\n no: { label: \"No\", callback: (res) => execCallback(false) },\r\n cancel: { label: \"Cancel\", callback: (res) => execCallback(null) }\r\n };\r\n }\r\n\r\n bootbox.dialog(bootboxOptions);\r\n return;\r\n }\r\n\r\n switch (dialogType) {\r\n case ConfirmDialogType.OKCancel:\r\n bootboxOptions.buttons = { \"confirm\": { label: \"OK\" }, \"cancel\": { label: \"Cancel\" } };\r\n break;\r\n default:\r\n bootboxOptions.buttons = { \"confirm\": { label: \"Yes\" }, \"cancel\": { label: \"No\" } };\r\n break;\r\n }\r\n\r\n bootbox.confirm(bootboxOptions);\r\n};\r\n","export class GeneralLogonViewModel {\r\n constructor(options) {\r\n this.form$ = options.form$;\r\n this.requireTermsOfUseAgreement = !!options.requireTermsOfUseAgreement;\r\n this.login = ko.observable(options.login).extend({ required: true });\r\n this.password = ko.observable(null).extend({ required: true });\r\n this.termsOfUseAgreement = ko.observable(options.termsOfUseAgreement);\r\n\r\n this.canSubmit = ko.pureComputed({\r\n read: () => this.termsOfUseAgreement() || !this.requireTermsOfUseAgreement,\r\n deferEvaluation: true\r\n });\r\n }\r\n\r\n readonly form$: JQuery;\r\n readonly requireTermsOfUseAgreement: boolean;\r\n readonly canSubmit: KnockoutComputed;\r\n \r\n login: KnockoutObservable;\r\n password: KnockoutObservable;\r\n termsOfUseAgreement: KnockoutObservable;\r\n\r\n init() {\r\n ko.applyBindings(this);\r\n }\r\n\r\n onSubmit() {\r\n this.login.isModified(true);\r\n this.password.isModified(true);\r\n\r\n if (this.isModelValid()) {\r\n this.form$.submit();\r\n }\r\n }\r\n\r\n isModelValid() {\r\n return this.login.isValid() && this.password.isValid();\r\n }\r\n}\r\n","export class KeyGeneratorService {\r\n private readonly url: string;\r\n \r\n constructor(url: string) {\r\n this.url = url;\r\n }\r\n \r\n getNewKey(): Promise {\r\n return new Promise((resolve, reject) => {\r\n $.ajax({ url: this.url, type: \"GET\" })\r\n .done(resolve)\r\n .fail(reject);\r\n });\r\n }\r\n}\r\n","export class NotificationService {\r\n\r\n showInfo(message: string | string[]) {\r\n NotificationService.showMessageInternal(\"Info\", message, \"info\");\r\n }\r\n\r\n showError(message: string | string []) {\r\n NotificationService.showMessageInternal(\"Error\", message, \"danger\");\r\n }\r\n\r\n private static showMessageInternal(title: string, message: string | string[], type: string) {\r\n $.notify({\r\n title: title,\r\n message: Array.isArray(message) ? message.join(\"
\") : message\r\n }, {\r\n type: type,\r\n delay: 5000,\r\n placement: {\r\n from: \"top\",\r\n align: \"center\"\r\n },\r\n });\r\n }\r\n}","\r\nexport function ResetPasswordViewModel(options) {\r\n var self = this;\r\n\r\n var form$ = options.form$;\r\n var newPasswordTooltip$ = options.newPasswordTooltip$;\r\n var login = options.userLogin;\r\n\r\n var commonPwdRules = {\r\n required: true,\r\n validation: [\r\n {\r\n validator: function (val) { return val !== null && val.match(/^ *$/) === null }\r\n , message: 'Password should not be empty.'\r\n }, {\r\n validator: function (val) { return val !== null && val.length >= 8 }\r\n , message: 'Password should contain at least 8 symbols.'\r\n }, {\r\n validator: function (val) { return val !== null && val.match(/.*[A-Z]{1}.*/) !== null }\r\n , message: 'Password must contain at least one uppercase character (A-Z).'\r\n }, {\r\n validator: function (val) { return val !== null && val.match(/.*[a-z]{1}.*/) !== null }\r\n , message: 'Password must contain at least one lowercase character (a-z).'\r\n }, {\r\n validator: function (val) { return val !== null && val.match(/.*[0-9]{1}.*/) !== null }\r\n , message: 'Password must contain at least one Base-10 digit (0-9).'\r\n }, {\r\n validator: function (val) { return val !== null && val.match(/.*[!$#%]{1}.*/) !== null }\r\n , message: 'Password must have a non-alphanumeric character (!, $, #, or %).'\r\n }, {\r\n validator: function (val) { return val !== null && val !== self.login() }\r\n , message: 'Password should not be equal to user name.'\r\n }\r\n ],\r\n };\r\n\r\n var reenterPwdRules = {\r\n validation: [\r\n {\r\n validator: function (val) { return val !== null && val === self.newPassword() }\r\n , message: 'This field must match new password.'\r\n }\r\n ],\r\n };\r\n self.login = ko.observable(login).extend({ required: true });\r\n self.oldPassword = ko.observable(null).extend({ required: true });\r\n self.newPassword = ko.observable(null).extend(commonPwdRules);\r\n self.reenteredNewPassword = ko.observable(null).extend(reenterPwdRules);\r\n self.passwordValidationRules = ko.observableArray();\r\n\r\n self.init = function () {\r\n ko.applyBindings(self);\r\n }\r\n\r\n self.selectedNewPassword = function () {\r\n self.fillPasswordValidationRules(self.newPassword());\r\n\r\n newPasswordTooltip$.tooltip('show');\r\n }\r\n\r\n self.blurNewPassword = function () {\r\n newPasswordTooltip$.tooltip('hide');\r\n }\r\n\r\n self.fillPasswordValidationRules = function (password) {\r\n const selectedItems = [];\r\n\r\n for (let rule of commonPwdRules.validation) {\r\n const item = {\r\n isValid: rule.validator(password),\r\n message: rule.message\r\n };\r\n\r\n selectedItems.push(item);\r\n }\r\n\r\n self.passwordValidationRules(selectedItems);\r\n self.passwordValidationRules.valueHasMutated(); \r\n }\r\n\r\n self.changePassword = function (item: any, event: any) {\r\n var currentValue = event.target.value;\r\n\r\n self.fillPasswordValidationRules(currentValue);\r\n\r\n newPasswordTooltip$.tooltip('show');\r\n\r\n return true;\r\n }\r\n\r\n self.onSubmit = function () {\r\n self.login.isModified(true);\r\n self.oldPassword.isModified(true);\r\n self.newPassword.isModified(true);\r\n self.reenteredNewPassword.isModified(true);\r\n\r\n if (isModelValid())\r\n form$.submit();\r\n }\r\n\r\n var isModelValid = function () {\r\n\r\n return self.login.isValid() &&\r\n (!self.isValidateOldPassword || self.oldPassword.isValid()) &&\r\n self.newPassword.isValid() &&\r\n self.reenteredNewPassword.isValid();\r\n }\r\n}","import { ClientModel } from \"./ClientModel\";\r\nimport { TokenValidationMode } from \"./TokenValidationMode\";\r\n\r\nexport class ServerSettingsModel {\r\n serverUrl: KnockoutObservable = ko.observable(null).extend({\r\n required: true,\r\n pattern: {\r\n onlyIf: () => PRODUCTION === true,\r\n message: 'Url must start from \"https\\:\\/\\/',\r\n params: '^https\\:\\/\\/\\/*'\r\n }\r\n });\r\n apiSecret: KnockoutObservable = ko.observable(null).extend({required: true});\r\n domainAutoLoginEnabled: KnockoutObservable = ko.observable(false);\r\n applyHostAsOrigin: KnockoutObservable = ko.observable(false);\r\n hideArmsLoginUI: KnockoutObservable = ko.observable(false);\r\n supportIISWindowsAuthenticationEnabled: KnockoutObservable = ko.observable(false);\r\n isTwoFactorAuthEnabled: KnockoutObservable = ko.observable(false);\r\n twoFactorAuthConfigDelay: KnockoutObservable = ko.observable(null).extend({ required: true, min: 1, max: 14 });\r\n\r\n _tokenValidationMode: KnockoutObservable = ko.observable(TokenValidationMode.Local);\r\n tokenValidationMode: KnockoutComputed = ko.pureComputed({\r\n read: () => this._tokenValidationMode().toString(),\r\n write: (value: string) => this._tokenValidationMode(+value)\r\n });\r\n\r\n clients: KnockoutObservableArray = ko.observableArray([]);\r\n}\r\n","import { ClientModel } from \"./ClientModel\";\r\nimport { KeyGeneratorService } from \"./KeyGeneratorService\";\r\nimport { ServerSettingsModel } from \"./ServerSettingsModel\";\r\nimport { NotificationService } from \"./NotificationService\";\r\n\r\nexport class ServerSettingsViewModel {\r\n settingsModel: ServerSettingsModel = null;\r\n \r\n private readonly loadUrl: string;\r\n private readonly saveUrl: string;\r\n private readonly keyGeneratorService: KeyGeneratorService;\r\n private readonly notificationService: NotificationService;\r\n private currentUrl: string;\r\n\r\n constructor(options) {\r\n this.loadUrl = options.loadUrl;\r\n this.saveUrl = options.saveUrl;\r\n this.keyGeneratorService = new KeyGeneratorService(options.newKeyUrl);\r\n this.notificationService = new NotificationService();\r\n \r\n this.settingsModel = new ServerSettingsModel();\r\n }\r\n\r\n init() {\r\n ko.applyBindings(this);\r\n this.load();\r\n };\r\n\r\n load() {\r\n $.ajax({\r\n url: this.loadUrl,\r\n success: (data: any) => {\r\n if (data.success) {\r\n const settings = data.settings;\r\n\r\n\r\n this.settingsModel.serverUrl(settings.serverUrl);\r\n this.settingsModel.apiSecret(settings.apiSecret);\r\n this.settingsModel.domainAutoLoginEnabled(settings.domainAutoLoginEnabled);\r\n this.settingsModel.applyHostAsOrigin(settings.applyHostAsOrigin);\r\n this.settingsModel.hideArmsLoginUI(settings.hideArmsLoginUI);\r\n this.settingsModel.supportIISWindowsAuthenticationEnabled(settings.supportIISWindowsAuthenticationEnabled);\r\n this.settingsModel.isTwoFactorAuthEnabled(settings.isTwoFactorAuthEnabled);\r\n this.settingsModel.twoFactorAuthConfigDelay(settings.twoFactorAuthConfigDelay);\r\n this.settingsModel.tokenValidationMode(settings.tokenValidationMode);\r\n this.currentUrl = settings.defaultServerUrl;\r\n\r\n this.settingsModel.clients(settings.clients.map(x => {\r\n const vm = new ClientModel();\r\n\r\n vm.id(x.id);\r\n vm.url(x.url);\r\n vm.name(x.name);\r\n vm.secret(x.secret);\r\n vm.installed(x.installed);\r\n\r\n return vm;\r\n }));\r\n }\r\n }\r\n })\r\n }\r\n\r\n refresh() {\r\n this.load();\r\n }\r\n\r\n applyCurrentUrl() {\r\n this.settingsModel.serverUrl(this.currentUrl);\r\n }\r\n\r\n private async generateKey() {\r\n const keyResult = await this.keyGeneratorService.getNewKey();\r\n if (keyResult.success) {\r\n return keyResult.key;\r\n }\r\n }\r\n\r\n async generateKeyForServer() {\r\n const key = await this.generateKey();\r\n this.settingsModel.apiSecret(key);\r\n }\r\n\r\n async generateKeyForClient(client: ClientModel) {\r\n const key = await this.generateKey();\r\n client.secret(key);\r\n }\r\n\r\n onSubmit() {\r\n if (!this.validate()){\r\n this.notificationService.showError(\"Settings are not valid\");\r\n return;\r\n }\r\n \r\n $.ajax({\r\n url: this.saveUrl,\r\n type: \"POST\",\r\n data: ko.toJS(this.settingsModel),\r\n success: data => {\r\n if (data.success) {\r\n this.notificationService.showInfo([\"Settings Saved\", \"Don't forget to restart IIS to apply updated settings\"]);\r\n } else {\r\n this.notificationService.showError(data.message);\r\n } \r\n }\r\n });\r\n }\r\n\r\n validate() {\r\n const errors = ko.validation.group(this, {\r\n deep: true,\r\n observable: true,\r\n });\r\n errors.showAllMessages();\r\n return errors().length === 0;\r\n }\r\n}\r\n\r\n","export enum TokenValidationMode {\r\n Local = 0,\r\n Remote = 1\r\n}","import { NotificationService } from \"../NotificationService\";\r\nimport { WizardViewMode } from \"./WizardViewMode\";\r\n\r\nexport class AuthenticationMethodWizardViewModel {\r\n constructor(options) {\r\n this.createMfaAppAuthenticationMethodUrl = options.createMfaAppAuthenticationMethodUrl;\r\n this.confirmMfaAppAuthenticationMethodUrl = options.confirmMfaAppAuthenticationMethodUrl;\r\n\r\n this.rootElement = options.$rootElement;\r\n\r\n this.notificationService = new NotificationService();\r\n\r\n this.appCode.subscribe(() => {\r\n this.isInvalidCode(false);\r\n });\r\n\r\n this.methodName.subscribe(() => this.qrCodeImageUrl(null));\r\n }\r\n\r\n wizardViewMode: KnockoutObservable = ko.observable(WizardViewMode.EnterMethodName);\r\n rootElement: JQuery;\r\n onSaveComplete: (data: any) => void;\r\n\r\n createMfaAppAuthenticationMethodUrl: string;\r\n confirmMfaAppAuthenticationMethodUrl: string;\r\n\r\n methodName = ko.observable(null).extend({ required: true });\r\n accountName = ko.observable(null);\r\n secretKey = ko.observable(null);\r\n methodConfirmationId = ko.observable(null);\r\n qrCodeImageUrl = ko.observable(null);\r\n showContainerCodes = ko.observable(false);\r\n isInvalidCode = ko.observable(false);\r\n isInputSelected = ko.observable(true);\r\n\r\n appCode = ko.observable(null)\r\n .extend({\r\n required: true,\r\n minLength: 6,\r\n maxLength: 6,\r\n validation: [\r\n {\r\n validator: () => this.isInvalidCode() === false,\r\n message: \"Invalid Code.\"\r\n }\r\n ]\r\n });\r\n\r\n canViewAddMethodName: KnockoutComputed = ko.pureComputed({\r\n read: () => this.wizardViewMode() === WizardViewMode.EnterMethodName,\r\n deferEvaluation: true\r\n });\r\n\r\n canViewinformation: KnockoutComputed = ko.pureComputed({\r\n read: () => this.wizardViewMode() === WizardViewMode.Information,\r\n deferEvaluation: true\r\n });\r\n\r\n canViewScanCode: KnockoutComputed = ko.pureComputed({\r\n read: () => this.wizardViewMode() === WizardViewMode.ScanCode,\r\n deferEvaluation: true\r\n });\r\n\r\n canViewEnterCode: KnockoutComputed = ko.pureComputed({\r\n read: () => this.wizardViewMode() === WizardViewMode.EnterCode,\r\n deferEvaluation: true\r\n });\r\n\r\n showClipboardAccountName: KnockoutComputed = ko.pureComputed({\r\n read: () => this.accountName(),\r\n deferEvaluation: true\r\n });\r\n\r\n showClipboardSecretKey: KnockoutComputed = ko.pureComputed({\r\n read: () => this.secretKey(),\r\n deferEvaluation: true\r\n });\r\n\r\n backButtonView: KnockoutComputed = ko.pureComputed({\r\n read: () => {\r\n switch (this.wizardViewMode()) {\r\n case WizardViewMode.Information:\r\n case WizardViewMode.ScanCode:\r\n case WizardViewMode.EnterCode:\r\n return true;\r\n default: return false;\r\n }\r\n },\r\n deferEvaluation: true\r\n });\r\n\r\n nextButtonView: KnockoutComputed = ko.pureComputed({\r\n read: () => {\r\n switch (this.wizardViewMode()) {\r\n case WizardViewMode.EnterMethodName:\r\n case WizardViewMode.Information:\r\n case WizardViewMode.ScanCode:\r\n return true;\r\n default: return false;\r\n }\r\n },\r\n deferEvaluation: true\r\n });\r\n\r\n disableFinish: KnockoutComputed = ko.pureComputed({\r\n read: () => !this.validate(),\r\n deferEvaluation: true\r\n });\r\n\r\n disableGotoNext: KnockoutComputed = ko.pureComputed({\r\n read: () => {\r\n switch (this.wizardViewMode()) {\r\n case WizardViewMode.EnterMethodName:\r\n return !this.methodName.isValid();\r\n default: return false;\r\n }\r\n },\r\n deferEvaluation: true\r\n });\r\n\r\n private readonly notificationService: NotificationService;\r\n\r\n clear() {\r\n this.wizardViewMode(WizardViewMode.EnterMethodName);\r\n this.methodName(null);\r\n this.accountName(null);\r\n this.secretKey(null);\r\n this.appCode(null);\r\n this.qrCodeImageUrl(null);\r\n this.showContainerCodes(false);\r\n\r\n this.clearValidation();\r\n }\r\n\r\n gotoBack() {\r\n switch (this.wizardViewMode()) {\r\n case WizardViewMode.Information:\r\n this.wizardViewMode(WizardViewMode.EnterMethodName);\r\n break;\r\n case WizardViewMode.ScanCode:\r\n this.wizardViewMode(WizardViewMode.Information);\r\n break;\r\n case WizardViewMode.EnterCode:\r\n this.wizardViewMode(WizardViewMode.ScanCode);\r\n break;\r\n }\r\n this.isInputSelected(true);\r\n }\r\n\r\n gotoNext() {\r\n switch (this.wizardViewMode()) {\r\n case WizardViewMode.EnterMethodName:\r\n this.wizardViewMode(WizardViewMode.Information);\r\n break;\r\n case WizardViewMode.Information:\r\n const switchPage = () => this.wizardViewMode(WizardViewMode.ScanCode);\r\n\r\n if (!this.qrCodeImageUrl()) {\r\n this.generateKey(switchPage);\r\n } else {\r\n switchPage();\r\n }\r\n break;\r\n case WizardViewMode.ScanCode:\r\n this.wizardViewMode(WizardViewMode.EnterCode);\r\n break;\r\n }\r\n this.isInputSelected(true);\r\n }\r\n\r\n addMethod(callback: any) {\r\n this.clear();\r\n this.onSaveComplete = callback;\r\n (this.rootElement as any).appendTo(\"body\").modal('show');\r\n this.isInputSelected(true);\r\n }\r\n\r\n confirmMethod() {\r\n $.ajax({\r\n url: this.confirmMfaAppAuthenticationMethodUrl,\r\n type: \"GET\",\r\n data: { id: this.methodConfirmationId(), code: this.appCode() },\r\n error: err => this.notificationService.showError(JSON.parse(err.responseText).message),\r\n success: data => {\r\n this.isInvalidCode(!data)\r\n\r\n if (data) {\r\n this.onSaveComplete({ success: true });\r\n this.onCloseModal();\r\n }\r\n }\r\n });\r\n }\r\n\r\n generateKey(callback: () => void) {\r\n $.ajax({\r\n url: this.createMfaAppAuthenticationMethodUrl,\r\n type: \"GET\",\r\n data: { nameMethod: this.methodName },\r\n error: err => this.notificationService.showError(JSON.parse(err.responseText).message),\r\n success: data => {\r\n this.accountName(data.account);\r\n this.secretKey(data.manualEntryKey);\r\n this.methodConfirmationId(data.methodConfirmationId);\r\n this.qrCodeImageUrl(data.qrCodeImageUrl);\r\n callback();\r\n }\r\n });\r\n }\r\n\r\n init() {\r\n ko.applyBindings(this, this.rootElement.get(0));\r\n }\r\n\r\n onCloseModal() {\r\n (this.rootElement as any).modal('hide');\r\n }\r\n\r\n clearValidation() {\r\n const errors = ko.validation.group(this);\r\n errors.showAllMessages(false);\r\n }\r\n\r\n validate() {\r\n const errors = ko.validation.group(this, {\r\n deep: true,\r\n observable: true,\r\n });\r\n return errors().length === 0;\r\n }\r\n\r\n collapseContainerCodes() {\r\n this.showContainerCodes(true);\r\n }\r\n\r\n copyAccountName() {\r\n navigator.clipboard.writeText(this.accountName());\r\n this.notifyCopied(\"Account name\");\r\n }\r\n\r\n copySecretKey() {\r\n navigator.clipboard.writeText(this.secretKey());\r\n this.notifyCopied(\"Secret key\");\r\n }\r\n\r\n private notifyCopied(what: string) {\r\n this.notificationService.showInfo(`${what} copied successfully`);\r\n }\r\n}\r\n\r\n","export enum TwoFactorAuthMethodType\r\n{\r\n AuthenticatorApplication = 0\r\n}","import { TwoFactorAuthMethodType } from \"./TwoFactorAuthMethodType\";\r\n\r\nexport class TwoFactorAuthSettingsModel {\r\n methods: KnockoutObservableArray = ko.observableArray([]);\r\n}\r\n\r\nexport class TwoFactorAuthSettingsMethod {\r\n id: number;\r\n methodType: TwoFactorAuthMethodType;\r\n methodTypeDescription: string;\r\n name: string;\r\n isDefault: boolean;\r\n\r\n isDefaultDesc = ko.pureComputed(() => {\r\n return this.isDefault ? \"YES\" : \"NO\";\r\n }, this);\r\n\r\n methodTypeCssClass = ko.pureComputed(() => {\r\n switch (this.methodType) {\r\n case TwoFactorAuthMethodType.AuthenticatorApplication:\r\n return \"fa fa-mobile\";\r\n\r\n default:\r\n return \"test\";\r\n }\r\n }, this);\r\n}\r\n","import { TwoFactorAuthSettingsMethod, TwoFactorAuthSettingsModel } from \"./TwoFactorAuthSettingsModel\";\r\nimport { AuthenticationMethodWizardViewModel } from \"./AuthenticationMethodWizardViewModel\";\r\nimport { NotificationService } from \"../NotificationService\";\r\nimport { ConfirmDialog } from \"../ConfirmDialog\";\r\n\r\nexport class TwoFactorAuthSettingsViewModel {\r\n constructor(options) {\r\n this.loadUrl = options.loadUrl;\r\n this.deleteUrl = options.deleteUrl;\r\n this.setMethodAsDefaultUrl = options.setMethodAsDefaultUrl;\r\n\r\n this.notificationService = new NotificationService();\r\n\r\n this.rootElement = options.$rootElement.get(0);\r\n this.wizardViewModel = options.wizardViewModel;\r\n }\r\n\r\n twoFactorAuthSettingsModel = new TwoFactorAuthSettingsModel();\r\n\r\n dataLoaded = ko.observable();\r\n\r\n hasAnyMethod = ko.computed({\r\n read: () => {\r\n return this.dataLoaded() && this.twoFactorAuthSettingsModel.methods().length > 0;\r\n }\r\n });\r\n\r\n hasDefaultMethod = ko.computed({\r\n read: () => {\r\n return this.dataLoaded() && this.twoFactorAuthSettingsModel.methods().some(x => x.isDefault);\r\n }\r\n });\r\n\r\n private readonly loadUrl: string;\r\n private readonly deleteUrl: string;\r\n private readonly setMethodAsDefaultUrl: string;\r\n\r\n private readonly rootElement: JQuery;\r\n private readonly notificationService: NotificationService;\r\n private readonly wizardViewModel: AuthenticationMethodWizardViewModel;\r\n\r\n init() {\r\n this.wizardViewModel.init();\r\n\r\n ko.applyBindings(this, this.rootElement);\r\n this.load();\r\n };\r\n\r\n load() {\r\n $.ajax({\r\n url: this.loadUrl,\r\n success: (data: any) => {\r\n if (data.success) {\r\n const userMfaSettings = data.userMfaSettings;\r\n\r\n this.twoFactorAuthSettingsModel.methods(\r\n userMfaSettings.methods.map(x => {\r\n const vm = new TwoFactorAuthSettingsMethod();\r\n vm.id = x.id;\r\n vm.methodType = x.methodType;\r\n vm.methodTypeDescription = x.methodTypeDescription;\r\n vm.name = x.name;\r\n vm.isDefault = x.isDefault;\r\n return vm;\r\n })\r\n );\r\n\r\n this.dataLoaded(true);\r\n }\r\n }\r\n })\r\n }\r\n\r\n refresh() {\r\n this.load();\r\n }\r\n\r\n addNewMethod() {\r\n const callback = (data: any) => {\r\n if (data.success) {\r\n this.notificationService.showInfo([\"New method successfully added\"]);\r\n } else {\r\n this.notificationService.showError(data.message);\r\n }\r\n\r\n this.refresh();\r\n };\r\n\r\n this.wizardViewModel.addMethod(callback);\r\n }\r\n\r\n deleteMethod(method: TwoFactorAuthSettingsMethod) {\r\n if (method.isDefault) {\r\n this.notificationService.showError(\"Default method cannot be deleted\");\r\n return;\r\n }\r\n\r\n ConfirmDialog({\r\n message: `Are you sure to delete method ${method.name}?`,\r\n title: 'Delete',\r\n callback: (result) => {\r\n if (result) {\r\n $.ajax({\r\n url: this.deleteUrl,\r\n type: \"POST\",\r\n data: { methodId: method.id },\r\n success: (data: any) => {\r\n if (data.success) {\r\n this.notificationService.showInfo([\"Method successfully deleted\"]);\r\n } else {\r\n this.notificationService.showError(data.message);\r\n }\r\n\r\n this.refresh();\r\n }\r\n });\r\n }\r\n }\r\n });\r\n }\r\n\r\n setAsDefault(method: TwoFactorAuthSettingsMethod) {\r\n $.ajax({\r\n url: this.setMethodAsDefaultUrl,\r\n type: \"POST\",\r\n data: { methodId: method.id },\r\n success: (data: any) => {\r\n if (data.success) {\r\n this.notificationService.showInfo([\"Method successfully set to default\"]);\r\n } else {\r\n this.notificationService.showError(data.message);\r\n }\r\n\r\n this.refresh();\r\n }\r\n });\r\n }\r\n}\r\n","export enum WizardViewMode {\r\n EnterMethodName = 0,\r\n Information = 1,\r\n ScanCode = 2,\r\n EnterCode = 3\r\n}","const tokenName = \"ARMS.LastBrowserActivityDate\";\r\nconst refreshInterval = 5 * 1000;\r\nconst webAppUrl = window[\"WEB_APP_ROOT\"];\r\nconst getTimeoutUrl = `${webAppUrl}/Settings/GetBrowserInactivityTimeout`;\r\nconst quiteLogOffUrl = `${webAppUrl}/Account/QuietLogout`;\r\n\r\nwindow.addEventListener(\"load\", () => {\r\n if (window[\"IS_USER_AUTHENTICATED\"]) {\r\n const xhr = new XMLHttpRequest();\r\n xhr.open(\"get\", getTimeoutUrl);\r\n xhr.onload = () => {\r\n if (xhr.response && xhr.response > 0) {\r\n const userInactivityTimeout = xhr.response * 1000;\r\n\r\n const token = localStorage.getItem(tokenName);\r\n if (token) {\r\n if ((new Date().getTime() - new Date(token).getTime()) > userInactivityTimeout) {\r\n localStorage.removeItem(tokenName);\r\n window.location.href = quiteLogOffUrl;\r\n return;\r\n }\r\n }\r\n\r\n (function run() {\r\n localStorage.setItem(tokenName, new Date().toISOString());\r\n setTimeout(run, refreshInterval);\r\n })();\r\n } else {\r\n localStorage.removeItem(tokenName);\r\n }\r\n };\r\n xhr.send();\r\n } else {\r\n localStorage.removeItem(tokenName);\r\n }\r\n});\r\n","export class ValidationConfigurator {\r\n \r\n static disableErrorMessages() {\r\n const options = ValidationConfigurator.getDefaultValidationOptions();\r\n options.insertMessages = false;\r\n ValidationConfigurator.init(options);\r\n }\r\n\r\n static enableErrorMessages() {\r\n ValidationConfigurator.init();\r\n }\r\n\r\n static init(options = ValidationConfigurator.getDefaultValidationOptions()) {\r\n ko.validation.init(options, true);\r\n }\r\n\r\n static getDefaultValidationOptions() {\r\n return {\r\n registerExtenders: true,\r\n messagesOnModified: true,\r\n insertMessages: true,\r\n parseInputAttributes: true,\r\n messageTemplate: null,\r\n decorateElementOnModified: true,\r\n decorateInputElement: true,\r\n errorElementClass: \"has-error\",\r\n errorMessageClass: \"field-validation-error\"\r\n } as KnockoutValidationConfiguration;\r\n }\r\n}","import \"ko/ko.bindingHandlers.validationContainer\";\r\nimport \"../startup/bootstrap\";\r\nimport \"UserInactivityWatcher\";\r\n\r\nimport \"expose-loader?exposes=GeneralLogon!GeneralLogonViewModel\";\r\nimport \"expose-loader?exposes=ResetPassword!ResetPasswordViewModel\";\r\nimport \"expose-loader?exposes=ServerSettings!ServerSettingsViewModel\";\r\nimport \"expose-loader?exposes=TwoFactorAuthSettings!TwoFactorAuth/TwoFactorAuthSettingsViewModel\";\r\nimport \"expose-loader?exposes=AdditioinaAuthMethodPage!AdditioinaAuthMethodPageViewModel\";\r\nimport \"expose-loader?exposes=AuthenticationMethodWizard!TwoFactorAuth/AuthenticationMethodWizardViewModel\";","const template = `\r\n
\r\n \r\n \r\n

{1}

\r\n {2}\r\n
\r\n\t\t
\r\n\t
\r\n\t \r\n
\r\n`;\r\n\r\n$.notifyDefaults({\r\n offset: 50,\r\n mouse_over: \"pause\",\r\n placement: {\r\n from: \"top\",\r\n align: \"center\"\r\n },\r\n template: template,\r\n z_index: 11000\r\n});","import { ValidationConfigurator } from \"./../ValidationConfigurator\";\r\n\r\nimport \"./bootstrap-notify-settings\";\r\nValidationConfigurator.init();\r\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t179: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkIds[i]] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunk\"] = self[\"webpackChunk\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [592], () => (__webpack_require__(489)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","ko","bindingHandlers","validationContainer","update","element","valueAccessor","allBindingsAccessor","obs","isModified","isValid","isInvalid","$","addClass","removeClass","___EXPOSE_LOADER_IMPORT___","___EXPOSE_LOADER_GLOBAL_THIS___","module","exports","constructor","options","showOtherMethod","observable","this","form$","methodId","defaultMethodId","extend","required","pin","minLength","canShowOtherMethods","canSubmit","pureComputed","read","deferEvaluation","init","applyBindings","onSubmit","submit","onMethodIdChange","onShowOtherMethod","undefined","id","name","installed","url","onlyIf","pattern","message","params","secret","ConfirmDialogType","Object","freeze","YesNo","OKCancel","YesNoCancel","callback","bootboxOptions","animate","title","size","buttons","customDialogTypes","dialogType","includes","isCustomDialogType","execCallback","arg","call","yes","label","res","className","no","cancel","bootbox","dialog","confirm","requireTermsOfUseAgreement","login","password","termsOfUseAgreement","isModelValid","getNewKey","Promise","resolve","reject","ajax","type","done","fail","NotificationService","showInfo","showMessageInternal","showError","static","notify","Array","isArray","join","delay","placement","from","align","self","newPasswordTooltip$","userLogin","commonPwdRules","validation","validator","val","match","length","reenterPwdRules","newPassword","oldPassword","reenteredNewPassword","passwordValidationRules","observableArray","selectedNewPassword","fillPasswordValidationRules","tooltip","blurNewPassword","selectedItems","rule","item","push","valueHasMutated","changePassword","event","currentValue","target","value","isValidateOldPassword","serverUrl","apiSecret","domainAutoLoginEnabled","applyHostAsOrigin","hideArmsLoginUI","supportIISWindowsAuthenticationEnabled","isTwoFactorAuthEnabled","twoFactorAuthConfigDelay","min","max","_tokenValidationMode","TokenValidationMode","Local","tokenValidationMode","toString","write","clients","settingsModel","loadUrl","saveUrl","keyGeneratorService","KeyGeneratorService","newKeyUrl","notificationService","ServerSettingsModel","load","success","data","settings","currentUrl","defaultServerUrl","map","x","vm","ClientModel","refresh","applyCurrentUrl","async","keyResult","key","generateKey","client","validate","toJS","errors","group","deep","showAllMessages","wizardViewMode","WizardViewMode","EnterMethodName","methodName","accountName","secretKey","methodConfirmationId","qrCodeImageUrl","showContainerCodes","isInvalidCode","isInputSelected","appCode","maxLength","canViewAddMethodName","canViewinformation","Information","canViewScanCode","ScanCode","canViewEnterCode","EnterCode","showClipboardAccountName","showClipboardSecretKey","backButtonView","nextButtonView","disableFinish","disableGotoNext","createMfaAppAuthenticationMethodUrl","confirmMfaAppAuthenticationMethodUrl","rootElement","$rootElement","subscribe","clear","clearValidation","gotoBack","gotoNext","switchPage","addMethod","onSaveComplete","appendTo","modal","confirmMethod","code","error","err","JSON","parse","responseText","onCloseModal","nameMethod","account","manualEntryKey","get","collapseContainerCodes","copyAccountName","navigator","clipboard","writeText","notifyCopied","copySecretKey","what","TwoFactorAuthMethodType","methods","isDefaultDesc","isDefault","methodTypeCssClass","methodType","AuthenticatorApplication","twoFactorAuthSettingsModel","TwoFactorAuthSettingsModel","dataLoaded","hasAnyMethod","computed","hasDefaultMethod","some","deleteUrl","setMethodAsDefaultUrl","wizardViewModel","userMfaSettings","TwoFactorAuthSettingsMethod","methodTypeDescription","addNewMethod","deleteMethod","method","ConfirmDialog","result","setAsDefault","tokenName","webAppUrl","window","getTimeoutUrl","quiteLogOffUrl","addEventListener","xhr","XMLHttpRequest","open","onload","response","userInactivityTimeout","token","localStorage","getItem","Date","getTime","removeItem","location","href","run","setItem","toISOString","setTimeout","send","ValidationConfigurator","getDefaultValidationOptions","insertMessages","registerExtenders","messagesOnModified","parseInputAttributes","messageTemplate","decorateElementOnModified","decorateInputElement","errorElementClass","errorMessageClass","notifyDefaults","offset","mouse_over","template","z_index","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","m","O","chunkIds","fn","priority","notFulfilled","Infinity","i","fulfilled","j","keys","every","splice","r","g","globalThis","Function","e","o","obj","prop","prototype","hasOwnProperty","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","chunkLoadingGlobal","forEach","bind","__webpack_exports__"],"sourceRoot":""}