{"version":3,"file":"login_render-lazy.min.js","sources":["https:\/\/e-learning.fra.europa.eu\/theme\/snap\/amd\/src\/login_render-lazy.js"],"sourcesContent":["\/**\n * This file is part of Moodle - http:\/\/moodle.org\/\n *\n * Moodle is free software: you can redistribute it and\/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * Moodle 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 General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with Moodle. If not, see .\n *\n * @package\n * @copyright Copyright (c) 2020 Open LMS (https:\/\/www.openlms.net)\n * @license http:\/\/www.gnu.org\/copyleft\/gpl.html GNU GPL v3 or later\n *\/\n\n\/**\n * Login option rendering validation function.\n *\/\ndefine(['jquery'],\n function($) {\n\n 'use strict';\n\n var self = {};\n self.enabledLoginOptions = [];\n self.enabledLoginOptions['ENABLED_LOGIN_BOTH'] = '0';\n self.enabledLoginOptions['ENABLED_LOGIN_MOODLE'] = '1';\n self.enabledLoginOptions['ENABLED_LOGIN_ALTERNATIVE'] = '2';\n\n self.enabledLoginOrder = [];\n self.enabledLoginOrder['ORDER_LOGIN_MOODLE_FIRST'] = '0';\n self.enabledLoginOrder['ORDER_LOGIN_ALTERNATIVE_FIRST'] = '1';\n\n \/**\n * AMD return object.\n *\/\n return {\n \/**\n * Snap login option render\n * @param {int} loginrender\n * @param {int} loginorder\n *\/\n loginRender : function (loginrender, loginorder) {\n var show = function (render, order, cb) {\n switch (render) {\n case self.enabledLoginOptions['ENABLED_LOGIN_MOODLE']:\n $('.snap-login-option').show();\n $('#snap-alt-login').hide();\n cb();\n break;\n\n case self.enabledLoginOptions['ENABLED_LOGIN_ALTERNATIVE']:\n $('.snap-login-option').show();\n $('#login').hide();\n $('#snap_alt_login_hr_first').hide();\n cb();\n break;\n\n default:\n $('.snap-login-option').show();\n if (order == self.enabledLoginOrder['ORDER_LOGIN_ALTERNATIVE_FIRST']){\n $('#login').remove().insertAfter($('#snap-alt-login'));\n $('#snap_alt_login_hr_first').hide();\n $('#login_hr_first').show();\n }\n cb();\n }\n };\n show(loginrender, loginorder, function () {\n $('.snap-log-in-more').hide();\n $('.snap-log-in-more').css('visibility','hidden');\n });\n }\n };\n }\n);\n"],"names":["define","$","self","enabledLoginOptions","enabledLoginOrder","loginRender","loginrender","loginorder","render","order","cb","show","hide","remove","insertAfter","css"],"mappings":";;;;;;;;;;;;;;;;;;;;AAwBAA,sCAAO,CAAC,WACJ,SAASC,OAIDC,KAAO,CACXA,oBAA2B,WAC3BA,KAAKC,oBAAL,mBAAwD,IACxDD,KAAKC,oBAAL,qBAAwD,IACxDD,KAAKC,oBAAL,0BAAwD,IAExDD,KAAKE,kBAAoB,GACzBF,KAAKE,kBAAL,yBAA0D,IAC1DF,KAAKE,kBAAL,8BAA0D,IAKnD,CAMHC,YAAc,SAAUC,YAAaC,aACtB,SAAUC,OAAQC,MAAOC,WACxBF,aACCN,KAAKC,oBAAL,qBACDF,EAAE,sBAAsBU,OACxBV,EAAE,mBAAmBW,OACrBF,gBAGCR,KAAKC,oBAAL,0BACDF,EAAE,sBAAsBU,OACxBV,EAAE,UAAUW,OACZX,EAAE,4BAA4BW,OAC9BF,mBAIAT,EAAE,sBAAsBU,OACpBF,OAASP,KAAKE,kBAAL,gCACTH,EAAE,UAAUY,SAASC,YAAYb,EAAE,oBACnCA,EAAE,4BAA4BW,OAC9BX,EAAE,mBAAmBU,QAEzBD,MAGZC,CAAKL,YAAaC,YAAY,WAC1BN,EAAE,qBAAqBW,OACvBX,EAAE,qBAAqBc,IAAI,aAAa"}