{"version":3,"sources":["webpack://jrs-ui/./src/components/components.about.js","webpack://jrs-ui/./src/login/login.const.ts","webpack://jrs-ui/./src/login/loginBox.js","webpack://jrs-ui/../js-sdk/src/common/extension/jQueryjCryptionExtensions.js","webpack://jrs-ui/../js-sdk/src/common/util/encrypter.js","webpack://jrs-ui/./src/login/login.init.js","webpack://jrs-ui/./src/login/login.form.ts","webpack://jrs-ui/./src/login/login.common.js"],"names":["about","initialize","aboutBox","registerListeners","show","dom","jQuery","hasClass","dialogs","closable","_hide","$about","$aboutBoxCloseButton","on","e","preventDefault","stopPropagation","LoginConst","options","_dom","this","_initialize","_initVars","_processTemplate","_initHandlers","_passwordExpiredDays","length","val","_passwordExpirationInDays","_beforeFocus","_focus","_warningMessage","_customError","html","removeClass","_errorSection","text","trim","attr","_warningSection","organizationIdInput","usernameInput","closest","element","_getElementToFocus","trigger","addClass","_showLocaleMessage","showLocaleMessage","_hideLocaleMessage","hideLocaleMessage","_changePasswordMessage","changePasswordMessage","_cancelPasswordMessage","cancelPasswordMessage","_allowUserPasswordChange","allowUserPasswordChange","_showPasswordChange","showPasswordChange","_allowedPasswordPattern","RegExp","allowedPasswordPattern","passwordExpirationInDays","_nonEmptyPasswordMessage","nonEmptyPasswordMessage","_passwordNotMatchMessage","passwordNotMatchMessage","_passwordTooWeakMessage","passwordTooWeakMessage","warningMessage","_showHideLocaleAndTimezone","_localeAndTimeZone","_changePassword","_j_newpassword1","_j_newpassword2","_showHideChangePassword","find","_loginForm","parent","documentationButton","gotoJasperForge","needHelpLink","needHelpDialog","_localeAndTimezoneShowHideHandler","bindAsEventListener","_changePasswordShowHideHandler","_submitValidateHandler","bind","window","webHelpModule","name","open","focus","each","dialog","layoutModule","event","ValidationModule","validators","method","_emptyPasswordValidator","_confirmationPasswordTooWeakValidator","_confirmationPasswordNotMatchValidator","value","isValid","errorMessage","blank","test","toggleClass","$","string","keyPair","callback","i","charCodeAt","encryptObject","j","block","charCounter","encrypted","encrypt","l","chunkSize","setTimeout","encryptChar","BigInt","k","digits","crypt","barrett","powMod","radix","biToHex","biToString","encryptedString","substring","JSEncrypter","encryptData","dataObj","callbackFunc","receivedKey","pubKey","keyArr","push","_encryptDataRecursive","index","encDataObj","reversedDataToEncrypt","encodeURIComponent","split","reverse","join","receivedEncrypted","LoginBox","usernameElement","passwordPseudoElement","organisationElement","extendedWindow","submitLogin","jrsConfigs","paramsToEncrypt","j_password","String","doesAllowUserPasswordChange","newPass1","newPass2","j_newpassword1","j_newpassword2","encData","Object","keys","forEach","removeAttr","el","keyCode","which","initLoginForm","location","hash","localStorage","previousPageHash","aboutDialog","isIPad","$frame","$h2","$copy","$loginForm","onOrientationChange","orientation","css","left","right","hide","addEventListener","initIPad","loginInit"],"mappings":"mJA2BIA,EAAQ,CAIRC,WAAY,WACRD,EAAME,SAASC,sBAMvBH,EAAME,SAAW,CAIbE,KAAM,WACF,IAAIC,EAAMC,IAAO,aACbD,EAAIE,SAAS,WACbC,eAAmBH,EAAI,IAAI,EAAM,CAACI,UAAU,KAGpDC,MAAO,WACH,IAAIL,EAAMC,IAAO,aACZD,EAAIE,SAAS,WACdC,eAAmBH,EAAI,KAI/BF,kBAAoB,WAChB,IAAIQ,EAASL,IAAO,UAChBM,EAAuBN,IAAO,oBAElCK,EAAOE,GAAG,SAAS,SAASC,GACxBA,EAAEC,iBACFf,EAAME,SAASE,UAGnBQ,EAAqBC,GAAG,SAAS,SAASC,GACtCd,EAAME,SAASQ,QACfI,EAAEE,uBAMd,W,qCCxEKC,E,0EAAAA,K,wBAAAA,E,wBAAAA,E,0DAAAA,E,wCAAAA,E,yBAAAA,E,iCAAAA,E,wBAAAA,E,sCAAAA,E,iCAAAA,E,iCAAAA,E,+CAAAA,E,+CAAAA,E,mDAAAA,E,4CAAAA,E,uBAAAA,E,6BAAAA,E,4BAAAA,M,KAoBL,U,sKCoQA,Q,WAzOI,WAAYC,I,4FAAS,cAFrBC,KAAO,KAGHC,KAAKC,YAAYH,G,kDAGrB,SAAYA,GAC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H,EAAWG,IAAI,CACXC,KAAM,QACNC,MAAO,KAEX,MACJ,KAAK,GACL,KAAM,GACFP,EAAIK,IAAI,YAAa,QAAQ/G,SAAS+G,IAAI,QAAS,OACnDJ,EAAMI,IAAI,QAAS,SACnBH,EAAWG,IAAI,CACXC,KAAM,GACNC,MAAO,YAMnBR,EAAOS,OACPL,IACAJ,EAAOnL,OAEPoF,OAAOyG,iBAAiB,oBAAqBN,IAejDO,GEtDJC,CAAU1C","file":"_chunks/chunk.90.js","sourcesContent":["/*\n * Copyright (C) 2005 - 2022 TIBCO Software Inc. All rights reserved.\n * http://www.jaspersoft.com.\n *\n * Unless you have purchased a commercial license agreement from Jaspersoft,\n * the following license terms apply:\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n/**\n * @author: Yuriy Plakosh\n * @version: $Id$\n */\nimport jQuery from 'jquery';\nimport dialogs from './components.dialogs';\n\nvar about = {\n /**\n * Initialize about module.\n */\n initialize: function () {\n about.aboutBox.registerListeners();\n }\n};\n///////////////////////////\n// About box component\n///////////////////////////\nabout.aboutBox = {\n /**\n * Shows about box.\n */\n show: function () {\n var dom = jQuery('#aboutBox');\n if (dom.hasClass('hidden')) {\n dialogs.popup.show(dom[0], true, {closable: true});\n }\n },\n _hide: function () {\n var dom = jQuery('#aboutBox');\n if (!dom.hasClass('hidden')) {\n dialogs.popup.hide(dom[0]);\n }\n },\n\n registerListeners : function() {\n var $about = jQuery(\"#about\"),\n $aboutBoxCloseButton = jQuery(\"#aboutBox button\");\n\n $about.on('click', function(e) {\n e.preventDefault();\n about.aboutBox.show();\n });\n\n $aboutBoxCloseButton.on('click', function(e) {\n about.aboutBox._hide();\n e.stopPropagation();\n });\n\n }\n};\n\nexport default about;","enum LoginConst {\n J_USERNAME = 'j_username',\n ORGANIZATION_ID = 'orgId',\n SHOW_HIDE_LOCALE_AND_TIMEZONE = 'showHideLocaleAndTimezone',\n LOCALE_AND_TIMEZONE = 'localeAndTimeZone',\n USER_LOCALE = 'userLocale',\n CHANGE_PASSWORD = 'changePassword',\n J_PASSWORD = 'j_password',\n J_PASSWORD_PSEUDO = 'j_password_pseudo',\n J_NEW_PASSWORD1 = 'j_newpassword1',\n J_NEW_PASSWORD2 = 'j_newpassword2',\n J_NEW_PASSWORD1_PSEUDO = 'j_newpassword1_pseudo',\n J_NEW_PASSWORD2_PSEUDO = 'j_newpassword2_pseudo',\n SHOW_HIDE_CHANGE_PASSWORD = 'showHideChangePassword',\n PASSWORD_EXPIRED_DAYS = 'passwordExpiredDays',\n LOGIN_FORM = 'loginForm',\n SUBMIT_BUTTON = 'submitButton',\n CUSTOM_ERROR = 'customError',\n}\n\nexport default LoginConst;\n","/*\n * Copyright (C) 2005 - 2020 TIBCO Software Inc. All rights reserved.\n * http://www.jaspersoft.com.\n *\n * Unless you have purchased a commercial license agreement from Jaspersoft,\n * the following license terms apply:\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n\n\n/**\n * @version: $Id$\n */\nimport webHelpModule from '../components/components.webHelp';\nimport dialogs from '../components/components.dialogs';\nimport layoutModule from '../core/core.layout';\nimport {ValidationModule} from \"../util/utils.common\";\nimport jQuery from 'jquery';\nimport LoginConst from './login.const';\n\nconst LOGIN_BOX_TEMPLATE_DOM_ID = \"login\";\nconst DOCUMENTATION_BUTTON_ID = \"documentationButton\";\nconst GOTO_JASPERFORGE_BUTTON_ID = \"gotoJasperForge\";\n// const CONTACT_SALES_BUTTON_ID = \"contactSalesButton\";\n// const CONTACT_SALES_URL = \"http://www.jaspersoft.com/contact-us\";\nconst NEED_HELP_LINK_ID = \"needHelp\";\nconst NEED_HELP_DIALOG_ID = \"helpLoggingIn\";\n\nconst WARNING_SECTION = \"loginWarningSection\";\nconst ERROR_SECTION = \"loginErrorSection\";\n\nclass LoginBox {\n\n _dom = null;\n\n constructor(options) {\n this._initialize(options)\n }\n\n _initialize(options) {\n this._initVars(options);\n this._processTemplate();\n this._initHandlers();\n\n if (this._passwordExpiredDays.length > 0) {\n this._passwordExpiredDays.val(this._passwordExpirationInDays);\n }\n\n this._beforeFocus();\n this._focus();\n }\n\n _beforeFocus() {\n if (this._warningMessage) {\n this._customError.html(this._warningMessage)\n .removeClass(\"hidden\")\n }\n\n if (this._errorSection.text().trim()) {\n this._errorSection.attr('aria-hidden', 'false');\n this._errorSection.attr('role', 'alert');\n this._errorSection.attr('aria-live', 'Assertive');\n }\n\n if (this._warningSection.text().trim()) {\n this._warningSection.attr('aria-hidden', 'false')\n }\n }\n\n _getElementToFocus() {\n if (this._errorSection.attr('aria-hidden') === 'false') {\n const organizationIdInput = jQuery(`#${LoginConst.ORGANIZATION_ID}`);\n const usernameInput = jQuery(`#${LoginConst.J_USERNAME}`);\n return organizationIdInput.length && !(organizationIdInput.closest('label').hasClass('hidden')) ? organizationIdInput : usernameInput;\n }\n }\n\n _focus() {\n const element = this._getElementToFocus();\n if (element) {\n jQuery(element).trigger('focus');\n //to fix intermittent issue of not having \"data-focus-visible-added\" below \"if\" block added\n if(!jQuery(element).hasClass('focus-visible')){\n jQuery(element).addClass('focus-visible');\n jQuery(element).attr('data-focus-visible-added', '');\n }\n }\n }\n\n _initVars(options) {\n this._showLocaleMessage = options.showLocaleMessage;\n this._hideLocaleMessage = options.hideLocaleMessage;\n this._changePasswordMessage = options.changePasswordMessage;\n this._cancelPasswordMessage = options.cancelPasswordMessage;\n\n this._allowUserPasswordChange = options.allowUserPasswordChange;\n this._showPasswordChange = options.showPasswordChange;\n this._allowedPasswordPattern = new RegExp(options.allowedPasswordPattern);\n\n this._passwordExpirationInDays = options.passwordExpirationInDays;\n\n this._nonEmptyPasswordMessage = options.nonEmptyPasswordMessage;\n this._passwordNotMatchMessage = options.passwordNotMatchMessage;\n this._passwordNotMatchMessage = options.passwordNotMatchMessage;\n this._passwordTooWeakMessage = options.passwordTooWeakMessage;\n\n this._warningMessage = options.warningMessage;\n }\n\n _processTemplate() {\n this._dom = jQuery('#' + LOGIN_BOX_TEMPLATE_DOM_ID);\n\n this._showHideLocaleAndTimezone = jQuery(`#${LoginConst.SHOW_HIDE_LOCALE_AND_TIMEZONE}`);\n this._localeAndTimeZone = jQuery(`#${LoginConst.LOCALE_AND_TIMEZONE}`);\n\n this._changePassword = jQuery(`#${LoginConst.CHANGE_PASSWORD}`);\n this._j_newpassword1 = jQuery(`#${LoginConst.J_NEW_PASSWORD1_PSEUDO}`);\n this._j_newpassword2 = jQuery(`#${LoginConst.J_NEW_PASSWORD2_PSEUDO}`);\n this._showHideChangePassword = jQuery(`#${LoginConst.SHOW_HIDE_CHANGE_PASSWORD}`);\n this._passwordExpiredDays = this._dom.find(`input[name=\"${LoginConst.PASSWORD_EXPIRED_DAYS}\"]`);\n\n this._customError = jQuery(`#${LoginConst.CUSTOM_ERROR}`);\n\n this._loginForm = this._dom.parent('form');\n\n this.documentationButton = jQuery('#' + DOCUMENTATION_BUTTON_ID);\n this.gotoJasperForge = jQuery('#' + GOTO_JASPERFORGE_BUTTON_ID);\n this.needHelpLink = jQuery('#' + NEED_HELP_LINK_ID);\n\n this.needHelpDialog = jQuery('#' + NEED_HELP_DIALOG_ID);\n\n this._warningSection = jQuery(`#${WARNING_SECTION}`);\n this._errorSection = jQuery(`#${ERROR_SECTION}`);\n }\n\n _initHandlers() {\n this._showHideLocaleAndTimezone.on('click', this._localeAndTimezoneShowHideHandler.bindAsEventListener(this));\n\n if(this._allowUserPasswordChange) {\n this._showHideChangePassword.on('click', this._changePasswordShowHideHandler.bindAsEventListener(this));\n // use jQuery to work with login.js\n this._loginForm.on('submit', this._submitValidateHandler.bind(this));\n }\n\n if (this._showPasswordChange) {\n this._changePasswordShowHideHandler();\n }\n\n //web help\n if (window.webHelpModule) {\n this.documentationButton.on(\"click\", function(e) {\n webHelpModule.displayWebHelp();\n }.bindAsEventListener(this));\n }\n\n this.gotoJasperForge.on(\"click\", function(e) {\n var url = \"http://jasperforge.org\";\n window.name = \"\";\n var runPopup=window.open(url, \"jasperforge.org\");\n runPopup.focus();\n }.bindAsEventListener(this));\n\n this.needHelpLink.on(\"click\", () => {\n dialogs.popup.show(this.needHelpDialog[0], true, {closable: true});\n });\n\n var loginDialogs = [this.needHelpDialog];\n\n loginDialogs.each(function(dialog) {\n dialog.find(layoutModule.BUTTON_PATTERN).on(\"click\", function(e) {\n dialogs.popup.hide(dialog);\n });\n });\n }\n\n _submitValidateHandler(event) {\n this._customError.addClass(\"hidden\");\n\n if (!this._changePassword.hasClass(\"hidden\")) {\n var isValid = ValidationModule.validate([\n {\n validators: [\n {method: this._emptyPasswordValidator.bind(this)},\n {method: this._confirmationPasswordTooWeakValidator.bind(this)}\n ],\n element: this._j_newpassword1[0]\n },\n {\n validators: [\n {method: this._emptyPasswordValidator.bind(this)},\n {method: this._confirmationPasswordNotMatchValidator.bind(this)}\n ],\n element: this._j_newpassword2[0]\n }\n ]);\n\n if (!isValid) {\n event.preventDefault();\n }\n }\n }\n\n _emptyPasswordValidator(value) {\n var isValid = true;\n var errorMessage = \"\";\n\n if (value.blank()) {\n isValid = false;\n errorMessage = this._nonEmptyPasswordMessage;\n }\n\n return {\n isValid: isValid,\n errorMessage: errorMessage\n };\n }\n\n _confirmationPasswordNotMatchValidator(value) {\n var isValid = true;\n var errorMessage = \"\";\n\n if (value !== this._j_newpassword1.val()) {\n isValid = false;\n errorMessage = this._passwordNotMatchMessage;\n }\n\n return {\n isValid: isValid,\n errorMessage: errorMessage\n };\n }\n\n _confirmationPasswordTooWeakValidator(value) {\n return {\n isValid: this._allowedPasswordPattern.test(value),\n errorMessage: this._passwordTooWeakMessage\n }\n }\n\n _changePasswordShowHideHandler() {\n this._changePassword.toggleClass(\"hidden\");\n\n if (this._changePassword.hasClass(\"hidden\")) {\n this._showHideChangePassword.html(this._changePasswordMessage)\n .attr(\"aria-expanded\", \"false\");\n this._j_newpassword1.val(\"\");\n this._j_newpassword2.val(\"\");\n } else {\n this._showHideChangePassword.html(this._cancelPasswordMessage)\n .attr(\"aria-expanded\", \"true\");\n }\n }\n\n _localeAndTimezoneShowHideHandler() {\n this._localeAndTimeZone.toggleClass(\"hidden\");\n\n if (this._localeAndTimeZone.hasClass(\"hidden\")) {\n this._showHideLocaleAndTimezone\n .html(this._showLocaleMessage)\n .attr(\"aria-expanded\", \"false\");\n } else {\n this._showHideLocaleAndTimezone\n .html(this._hideLocaleMessage)\n .attr(\"aria-expanded\", \"true\");\n }\n }\n}\n\nexport default LoginBox;\n","/*\n * Copyright (C) 2005 - 2022 TIBCO Software Inc. All rights reserved.\n * http://www.jaspersoft.com.\n *\n * Unless you have purchased a commercial license agreement from Jaspersoft,\n * the following license terms apply:\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n\n/*global BigInt, biToHex, biToString */\n\nimport $ from 'jquery';\nimport {BigInt, biToHex, biToString} from 'jCryption';\n\n$.jCryption.encryptKeyWithoutRedundancy = function (string, keyPair, callback) {\n if (string === '') {\n if ($.isFunction(callback)) {\n callback(string);\n return;\n } else {\n return string;\n }\n }\n var charSum = 0;\n for (var i = 0; i < string.length; i++) {\n charSum += string.charCodeAt(i);\n }\n var encrypt = [];\n var l = 0;\n while (l < string.length) {\n encrypt[l] = string.charCodeAt(l);\n l++;\n }\n while (encrypt.length % keyPair.chunkSize !== 0) {\n encrypt[l++] = 0;\n }\n\n function encryption(encryptObject) {\n var charCounter = 0;\n var j, block;\n var encrypted = '';\n\n function encryptChar() {\n block = new BigInt();\n j = 0;\n for (var k = charCounter; k < charCounter + keyPair.chunkSize; ++j) {\n block.digits[j] = encryptObject[k++];\n block.digits[j] += encryptObject[k++] << 8;\n }\n var crypt = keyPair.barrett.powMod(block, keyPair.e);\n var text = keyPair.radix == 16 ? biToHex(crypt) : biToString(crypt, keyPair.radix);\n encrypted += text + ' ';\n charCounter += keyPair.chunkSize;\n if (charCounter < encryptObject.length) {\n setTimeout(encryptChar, 1);\n } else {\n var encryptedString = encrypted.substring(0, encrypted.length - 1);\n if ($.isFunction(callback)) {\n callback(encryptedString);\n } else {\n return encryptedString;\n }\n }\n }\n\n setTimeout(encryptChar, 1);\n }\n\n encryption(encrypt);\n};\nexport default $;","/*\n * Copyright (C) 2005 - 2022 TIBCO Software Inc. All rights reserved.\n * http://www.jaspersoft.com.\n *\n * Unless you have purchased a commercial license agreement from Jaspersoft,\n * the following license terms apply:\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n\nimport $ from '../extension/jQueryjCryptionExtensions';\nvar Base64Coder = {};\nBase64Coder.code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\nBase64Coder.encode16BitString = function (str) {\n var hd1, hd2, bits, h1, h2, h3, h4, h5, d6, e = [], pad = '', c, plain, coded;\n var b64 = Base64Coder.code;\n plain = str;\n c = plain.length % 2;\n if (c > 0) {\n while (c++ < 2) {\n pad += '===';\n plain += '\\0';\n }\n }\n for (c = 0; c < plain.length; c += 2) {\n hd1 = plain.charCodeAt(c);\n hd2 = plain.charCodeAt(c + 1);\n bits = hd1 << 16 | hd2;\n h1 = bits >> 26 & 63;\n h2 = bits >> 20 & 63;\n h3 = bits >> 14 & 63;\n h4 = bits >> 8 & 63;\n h5 = bits >> 2 & 63;\n d6 = bits & 3;\n e[c / 2] = b64.charAt(h1) + b64.charAt(h2) + b64.charAt(h3) + b64.charAt(h4) + b64.charAt(h5) + b64.charAt(d6);\n }\n coded = e.join('');\n coded = coded.slice(0, coded.length - pad.length) + pad;\n return coded;\n};\nBase64Coder.decode16BitString = function (str) {\n var o1, o2, o3, o4, h1, h2, h3, h4, h5, d6, bits, d = [], plain, coded;\n var b64 = Base64Coder.code;\n coded = str;\n for (var c = 0; c < coded.length; c += 6) {\n h1 = b64.indexOf(coded.charAt(c));\n h2 = b64.indexOf(coded.charAt(c + 1));\n h3 = b64.indexOf(coded.charAt(c + 2));\n h4 = b64.indexOf(coded.charAt(c + 3));\n h5 = b64.indexOf(coded.charAt(c + 4));\n d6 = b64.indexOf(coded.charAt(c + 5));\n bits = h1 << 26 | h2 << 20 | h3 << 14 | h4 << 8 | h5 << 2 | d6 & 3;\n o1 = bits >>> 24 & 255;\n o2 = bits >>> 16 & 255;\n o3 = bits >>> 8 & 255;\n o4 = bits & 255;\n d[c / 6] = String.fromCharCode(o1 << 8 | o2, o3 << 8 | o4);\n if (h4 == 64)\n d[c / 6] = d[c / 6] = String.fromCharCode(o1 << 8 | o2);\n }\n plain = d.join('');\n return plain;\n};\nvar JSEncrypter = {\n encryptData: function (dataObj, callbackFunc) {\n if (!dataObj) {\n callbackFunc();\n return;\n }\n $.jCryption.getKeys('GetEncryptionKey', function (receivedKey) {\n var pubKey = receivedKey;\n var keyArr = [];\n for (var i in dataObj)\n keyArr.push(i);\n var encData = {};\n JSEncrypter._encryptDataRecursive(dataObj, keyArr, 0, pubKey, encData, callbackFunc);\n });\n },\n _encryptDataRecursive: function (dataObj, keyArr, index, pubKey, encDataObj, callbackFunc) {\n if (!keyArr || keyArr.length == index)\n return;\n var dataToEncrypt = encodeURIComponent(dataObj[keyArr[index]]);\n var reversedDataToEncrypt = dataToEncrypt.split('').reverse().join('');\n $.jCryption.encryptKeyWithoutRedundancy(reversedDataToEncrypt, pubKey, function (receivedEncrypted) {\n encDataObj[keyArr[index]] = receivedEncrypted;\n if (keyArr.length == index + 1)\n callbackFunc(encDataObj);\n else\n JSEncrypter._encryptDataRecursive(dataObj, keyArr, index + 1, pubKey, encDataObj, callbackFunc);\n });\n }\n};\nexport default JSEncrypter;","/*\n * Copyright (C) 2005 - 2019 TIBCO Software Inc. All rights reserved.\n * http://www.jaspersoft.com.\n *\n * Unless you have purchased a commercial license agreement from Jaspersoft,\n * the following license terms apply:\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n\nimport jQuery from 'jquery';\nimport jrsConfigs from 'js-sdk/src/jrs.configs';\nimport initLoginForm from './login.form';\nimport { isIPad } from '../util/utils.common';\nimport aboutDialog from '../components/components.about'\nimport LoginConst from './login.const'\n\nfunction initIPad() {\n if (isIPad()) {\n const $frame = jQuery('#frame');\n const $h2 = jQuery('h2.textAccent');\n const $copy = jQuery('#copy');\n const $loginForm = jQuery(`#${LoginConst.LOGIN_FORM}`);\n\n const onOrientationChange = () => {\n const { orientation } = window;\n\n switch (orientation) {\n case 0:\n $h2.css('font-size', '14px').parent().css('width', '39%');\n $copy.css('width', '600px');\n $loginForm.css({\n left: '524px',\n right: ''\n });\n break;\n case 90:\n case -90:\n $h2.css('font-size', '16px').parent().css('width', '46%');\n $copy.css('width', '766px');\n $loginForm.css({\n left: '',\n right: '-10px'\n });\n break;\n }\n };\n\n $frame.hide();\n onOrientationChange();\n $frame.show();\n\n window.addEventListener('orientationchange', onOrientationChange);\n }\n}\n\nexport default function loginInit(LoginBox) {\n initLoginForm();\n\n if (window.location.hash) {\n window.localStorage.previousPageHash = window.location.hash;\n }\n\n aboutDialog.initialize();\n\n new LoginBox(jrsConfigs.loginState);\n\n initIPad();\n}\n","/*\n * Copyright (C) 2005 - 2020 TIBCO Software Inc. All rights reserved.\n * http://www.jaspersoft.com.\n *\n * Unless you have purchased a commercial license agreement from Jaspersoft,\n * the following license terms apply:\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n\nimport jQuery from 'jquery';\nimport jrsConfigs from 'js-sdk/src/jrs.configs';\n// @ts-ignore\nimport JSEncrypter from 'js-sdk/src/common/util/encrypter';\n// @ts-ignore\nimport webHelpModule from '../components/components.webHelp';\nimport LoginConst from './login.const'\n\ntype ExtendedWindow = typeof window & {\n doesAllowUserPasswordChange?: boolean | undefined\n}\n\nconst KEY_ENTER = 13;\nconst WEB_HELPER_MODULE_CONTEXT = 'login';\n\ninterface ParamsToEncrypt {\n // eslint-disable-next-line camelcase\n j_password: string,\n // eslint-disable-next-line camelcase\n j_newpassword1?: string,\n // eslint-disable-next-line camelcase\n j_newpassword2?: string,\n}\n\nexport default function loginForm() {\n const usernameElement = jQuery(`#${LoginConst.J_USERNAME}`);\n const passwordPseudoElement = jQuery(`#${LoginConst.J_PASSWORD_PSEUDO}`);\n const organisationElement = jQuery(`#${LoginConst.ORGANIZATION_ID}`);\n const extendedWindow = window as ExtendedWindow;\n\n webHelpModule.setCurrentContext(WEB_HELPER_MODULE_CONTEXT);\n\n const submitLogin = function submitLogin(event: JQuery.Event) {\n if (jrsConfigs.isEncryptionOn) {\n // global property from jsp page, set up in security-config.properties\n const paramsToEncrypt: ParamsToEncrypt = {\n j_password: String(passwordPseudoElement.val() ?? '')\n };\n\n if (extendedWindow.doesAllowUserPasswordChange) {\n const newPass1 = String(jQuery(`#${LoginConst.J_NEW_PASSWORD1_PSEUDO}`).val() ?? '');\n const newPass2 = String(jQuery(`#${LoginConst.J_NEW_PASSWORD2_PSEUDO}`).val() ?? '');\n if (jQuery.trim(newPass1)) {\n paramsToEncrypt.j_newpassword1 = newPass1;\n }\n if (jQuery.trim(newPass2)) {\n paramsToEncrypt.j_newpassword2 = newPass2;\n }\n }\n\n JSEncrypter.encryptData(paramsToEncrypt, (encData: {[key: string]: string}) => {\n Object.keys(encData).forEach((k) => {\n // set hidden fields to encrypted values\n jQuery(`#${k}`).val(encData[k]); // hide pseudo password field contents, so that browser autocomplete\n // is not trigger to remember the encrypted password every time.\n // hide pseudo password field contents, so that browser autocomplete\n // is not trigger to remember the encrypted password every time.\n jQuery(`#${k}_pseudo`).val('');\n })\n jQuery(`#${LoginConst.LOGIN_FORM}`).trigger('submit');\n });\n } else {\n jQuery(`#${LoginConst.J_PASSWORD}`).val(String(passwordPseudoElement.val() ?? ''));\n jQuery(`#${LoginConst.J_NEW_PASSWORD1}`).val(String(jQuery(`#${LoginConst.J_NEW_PASSWORD1_PSEUDO}`).val() ?? ''));\n jQuery(`#${LoginConst.J_NEW_PASSWORD2}`).val(String(jQuery(`#${LoginConst.J_NEW_PASSWORD2_PSEUDO}`).val() ?? ''));\n jQuery(`#${LoginConst.LOGIN_FORM}`).trigger('submit');\n }\n\n event.preventDefault();\n };\n\n jQuery(`#${LoginConst.SUBMIT_BUTTON}`)\n .removeAttr('disabled')\n .on('click', submitLogin);\n\n [usernameElement, passwordPseudoElement, organisationElement].forEach((el) => {\n el.on('keypress', (event: JQuery.KeyPressEvent) => {\n if ((event.keyCode || event.which) !== KEY_ENTER) {\n return;\n }\n submitLogin(event);\n });\n })\n}\n","/*\n * Copyright (C) 2005 - 2019 TIBCO Software Inc. All rights reserved.\n * http://www.jaspersoft.com.\n *\n * Unless you have purchased a commercial license agreement from Jaspersoft,\n * the following license terms apply:\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n\nimport LoginBox from './loginBox';\nimport loginInit from './login.init';\n\nloginInit(LoginBox);"],"sourceRoot":""}