{"version":3,"file":"oneline.min.js","sources":["https:\/\/udearroba.udea.edu.co\/externos\/course\/format\/onetopic\/amd\/src\/oneline.js"],"sourcesContent":["\/\/ 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\/*\n * @package format_onetopic\n * @copyright 2021 David Herney Bernal - cirano\n * @license http:\/\/www.gnu.org\/copyleft\/gpl.html GNU GPL v3 or later\n *\/\nimport $ from 'jquery';\n\n\/**\n * Load tabs in a single line, with scroll if it is required.\n *\n * @method load\n * @param {object} icons A list of usable icons: left arrow, right arrow.\n *\/\n export const load = (icons) => {\n\n $('.format-onetopic .onelinetabs .tabs-wrapper').each(function() {\n\n var $container = $(this);\n\n var $menu = $container.find('> ul.nav.nav-tabs');\n\n var itemsLength = $menu.find('> li.nav-item').length;\n var itemSize = $menu.find('> li.nav-item').outerWidth(true);\n\n \/\/ Duration of scroll animation.\n var scrollDuration = 300;\n\n \/\/ Get some relevant size for the paddle triggering point.\n var paddleMargin = 20;\n\n var $leftarrow = $('