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Af,EAAGhP,mBAAqB,KACxBjiB,OAAO6gB,aAAe,CAAC,EACvB7gB,OAAOiyB,oBAAsBhB,0BE7P7BiB,EAAOC,QAAUxqB","sources":["webpack://WebComponents/./runestone/common/js/bookfuncs.js","webpack://WebComponents/./runestone/common/js/jquery.idle-timer.js","webpack://WebComponents/./runestone/common/js/jquery_i18n/jquery.i18n.emitter.bidi.js","webpack://WebComponents/./runestone/common/js/jquery_i18n/jquery.i18n.emitter.js","webpack://WebComponents/./runestone/common/js/jquery_i18n/jquery.i18n.fallbacks.js","webpack://WebComponents/./runestone/common/js/jquery_i18n/jquery.i18n.js","webpack://WebComponents/./runestone/common/js/jquery_i18n/jquery.i18n.language.js","webpack://WebComponents/./runestone/common/js/jquery_i18n/jquery.i18n.messagestore.js","webpack://WebComponents/./runestone/common/js/jquery_i18n/jquery.i18n.parser.js","webpack://WebComponents/./runestone/common/js/presenter_mode.js","webpack://WebComponents/./runestone/common/js/renderComponent.js","webpack://WebComponents/./runestone/common/js/runestonebase.js","webpack://WebComponents/./runestone/common/project_template/_templates/plugin_layouts/sphinx_bootstrap/static/bootstrap-sphinx.js","webpack://WebComponents/./runestone/common/js/user-highlights.js","webpack://WebComponents/./runestone/common/js/pretext.js","webpack://WebComponents/./webpack.index.js","webpack://WebComponents/./runestone/common/js/theme.js","webpack://WebComponents/external var \"jQuery\""],"sourcesContent":["/**\n *\n * User: bmiller\n * Original: 2011-04-20\n * Date: 2019-06-14\n * Time: 2:01 PM\n * This change marks the beginning of version 4.0 of the runestone components\n * Login/logout is no longer handled through javascript but rather server side.\n * Many of the components depend on the runestone:login event so we will keep that\n * for now to keep the churn fairly minimal.\n */\n\n/*\n\n Copyright (C) 2011 Brad Miller bonelake@gmail.com\n\n This program 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 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 General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with this program. If not, see .\n\n */\n\n//\n// Page decoration functions\n//\n\nfunction addReadingList() {\n if (eBookConfig.readings) {\n var l, nxt, path_parts, nxt_link;\n let cur_path_parts = window.location.pathname.split(\"/\");\n let name =\n cur_path_parts[cur_path_parts.length - 2] +\n \"/\" +\n cur_path_parts[cur_path_parts.length - 1];\n let position = eBookConfig.readings.indexOf(name);\n let num_readings = eBookConfig.readings.length;\n if (position == eBookConfig.readings.length - 1) {\n // no more readings\n l = $(\"
\", {\n text: `Finished reading assignment. Page ${num_readings} of ${num_readings}.`,\n });\n } else if (position >= 0) {\n // get next name\n nxt = eBookConfig.readings[position + 1];\n path_parts = cur_path_parts.slice(0, cur_path_parts.length - 2);\n path_parts.push(nxt);\n nxt_link = path_parts.join(\"/\");\n l = $(\"\", {\n name: \"link\",\n class: \"btn btn-lg ' + 'buttonConfirmCompletion'\",\n href: nxt_link,\n text: `Continue to page ${\n position + 2\n } of ${num_readings} in the reading assignment.`,\n });\n } else {\n l = $(\"
\", {\n text: \"This page is not part of the last reading assignment you visited.\",\n });\n }\n $(\"#main-content\").append(l);\n }\n}\n\nfunction timedRefresh() {\n var timeoutPeriod = 900000; // 75 minutes\n $(document).on(\"idle.idleTimer\", function () {\n // After timeout period send the user back to the index. This will force a login\n // if needed when they want to go to a particular page. This may not be perfect\n // but its an easy way to make sure laptop users are properly logged in when they\n // take quizzes and save stuff.\n if (location.href.indexOf(\"index.html\") < 0) {\n console.log(\"Idle timer - \" + location.pathname);\n location.href =\n eBookConfig.app +\n \"/default/user/login?_next=\" +\n location.pathname +\n location.search;\n }\n });\n $.idleTimer(timeoutPeriod);\n}\n\nclass PageProgressBar {\n constructor(actDict) {\n this.possible = 0;\n this.total = 1;\n if (actDict && Object.keys(actDict).length > 0) {\n this.activities = actDict;\n } else {\n let activities = { page: 0 };\n $(\".runestone\").each(function (idx, e) {\n activities[e.firstElementChild.id] = 0;\n });\n this.activities = activities;\n }\n this.calculateProgress();\n // Hide the progress bar on the index page.\n if (\n window.location.pathname.match(\n /.*\\/(index.html|toctree.html|Exercises.html|search.html)$/i\n )\n ) {\n $(\"#scprogresscontainer\").hide();\n }\n this.renderProgress();\n }\n\n calculateProgress() {\n for (let k in this.activities) {\n if (k !== undefined) {\n this.possible++;\n if (this.activities[k] > 0) {\n this.total++;\n }\n }\n }\n }\n\n renderProgress() {\n let value = 0;\n $(\"#scprogresstotal\").text(this.total);\n $(\"#scprogressposs\").text(this.possible);\n try {\n value = (100 * this.total) / this.possible;\n } catch (e) {\n value = 0;\n }\n $(\"#subchapterprogress\").progressbar({\n value: value,\n });\n if (!eBookConfig.isLoggedIn) {\n $(\"#subchapterprogress>div\").addClass(\"loggedout\");\n }\n }\n\n updateProgress(div_id) {\n this.activities[div_id]++;\n // Only update the progress bar on the first interaction with an object.\n if (this.activities[div_id] === 1) {\n this.total++;\n let val = (100 * this.total) / this.possible;\n $(\"#scprogresstotal\").text(this.total);\n $(\"#scprogressposs\").text(this.possible);\n $(\"#subchapterprogress\").progressbar(\"option\", \"value\", val);\n if (\n val == 100.0 &&\n $(\"#completionButton\").text().toLowerCase() ===\n \"mark as completed\"\n ) {\n $(\"#completionButton\").click();\n }\n }\n }\n}\n\nexport var pageProgressTracker = {};\n\nasync function handlePageSetup() {\n var mess;\n if (eBookConfig.useRunestoneServices) {\n let headers = new Headers({\n \"Content-type\": \"application/json; charset=utf-8\",\n Accept: \"application/json\",\n });\n let data = { timezoneoffset: new Date().getTimezoneOffset() / 60 };\n let request = new Request(\n `${eBookConfig.new_server_prefix}/logger/set_tz_offset`,\n {\n method: \"POST\",\n body: JSON.stringify(data),\n headers: headers,\n }\n );\n try {\n let response = await fetch(request);\n if (!response.ok) {\n console.error(`Failed to set timezone! ${response.statusText}`);\n }\n data = await response.json();\n } catch (e) {\n console.error(`Error setting timezone ${e}`);\n }\n }\n console.log(`This page served by ${eBookConfig.served_by}`);\n if (eBookConfig.isLoggedIn) {\n mess = `username: ${eBookConfig.username}`;\n if (!eBookConfig.isInstructor) {\n $(\"#ip_dropdown_link\").remove();\n $(\"#inst_peer_link\").remove();\n }\n $(document).trigger(\"runestone:login\");\n addReadingList();\n // Avoid the timedRefresh on the grading page.\n if (\n window.location.pathname.indexOf(\"/admin/grading\") == -1 &&\n window.location.pathname.indexOf(\"/peer/\") == -1\n ) {\n timedRefresh();\n }\n } else {\n mess = \"Not logged in\";\n $(document).trigger(\"runestone:logout\");\n let bw = document.getElementById(\"browsing_warning\");\n if (bw) {\n bw.innerHTML =\n \"\";\n }\n let aw = document.getElementById(\"ad_warning\");\n if (aw) {\n aw.innerHTML =\n \"\";\n }\n }\n $(\".loggedinuser\").html(mess);\n\n pageProgressTracker = new PageProgressBar(eBookConfig.activities);\n notifyRunestoneComponents();\n}\n\nfunction setupNavbarLoggedIn() {\n $(\"#profilelink\").show();\n $(\"#passwordlink\").show();\n $(\"#registerlink\").hide();\n $(\"li.loginout\").html(\n 'Log Out'\n );\n}\n$(document).on(\"runestone:login\", setupNavbarLoggedIn);\n\nfunction setupNavbarLoggedOut() {\n if (eBookConfig.useRunestoneServices) {\n console.log(\"setup navbar for logged out\");\n $(\"#registerlink\").show();\n $(\"#profilelink\").hide();\n $(\"#passwordlink\").hide();\n $(\"#ip_dropdown_link\").hide();\n $(\"#inst_peer_link\").hide();\n $(\"li.loginout\").html(\n 'Login'\n );\n $(\".footer\").html(\"user not logged in\");\n }\n}\n$(document).on(\"runestone:logout\", setupNavbarLoggedOut);\n\nfunction notifyRunestoneComponents() {\n // Runestone components wait until login process is over to load components because of storage issues. This triggers the `dynamic import machinery`, which then sends the login complete signal when this and all dynamic imports are finished.\n console.log(\"triggering runestone:pre-login-complete\");\n document.dispatchEvent(new Event(\"runestone:pre-login-complete\"));\n}\n\nfunction placeAdCopy() {\n if (typeof showAd !== \"undefined\" && showAd) {\n let adNum = Math.floor(Math.random() * 2) + 1;\n let adBlock = document.getElementById(`adcopy_${adNum}`);\n let rsElements = document.querySelectorAll(\".runestone\");\n if (rsElements.length > 0) {\n let randomIndex = Math.floor(Math.random() * rsElements.length);\n rsElements[randomIndex].after(adBlock);\n adBlock.style.display = \"block\";\n }\n }\n}\n\n// initialize stuff\n$(function () {\n if (eBookConfig) {\n handlePageSetup();\n placeAdCopy();\n } else {\n if (typeof eBookConfig === \"undefined\") {\n console.log(\n \"eBookConfig is not defined. This page must not be set up for Runestone\"\n );\n }\n }\n});\n\n// misc stuff\n// todo: This could be further distributed but making a video.js file just for one function seems dumb.\nwindow.addEventListener(\"load\", function () {\n // add the video play button overlay image\n $(\".video-play-overlay\").each(function () {\n $(this).css(\n \"background-image\",\n \"url('{{pathto('_static/play_overlay_icon.png', 1)}}')\"\n );\n });\n\n // This function is needed to allow the dropdown search bar to work;\n // The default behaviour is that the dropdown menu closes when something in\n // it (like the search bar) is clicked\n $(function () {\n // Fix input element click problem\n $(\".dropdown input, .dropdown label\").click(function (e) {\n e.stopPropagation();\n });\n });\n\n // re-write some urls\n // This is tricker than it looks and you have to obey the rules for # anchors\n // The #anchors must come after the query string as the server basically ignores any part\n // of a url that comes after # - like a comment...\n if (location.href.includes(\"mode=browsing\")) {\n let queryString = \"?mode=browsing\";\n document.querySelectorAll(\"a\").forEach((link) => {\n let anchorText = \"\";\n if (\n link.href.includes(\"books/published\") &&\n !link.href.includes(\"?mode=browsing\")\n ) {\n if (link.href.includes(\"#\")) {\n let aPoint = link.href.indexOf(\"#\");\n anchorText = link.href.substring(aPoint);\n link.href = link.href.substring(0, aPoint);\n }\n link.href = link.href.includes(\"?\")\n ? link.href + queryString.replace(\"?\", \"&\") + anchorText\n : link.href + queryString + anchorText;\n }\n });\n }\n});\n","/*!\n * jQuery idleTimer plugin\n * version 0.9.100511\n * by Paul Irish.\n * http://github.com/paulirish/yui-misc/tree/\n * MIT license\n\n * adapted from YUI idle timer by nzakas:\n * http://github.com/nzakas/yui-misc/\n*/\n/*\n * Copyright (c) 2009 Nicholas C. Zakas\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/* updated to fix Chrome setTimeout issue by Zaid Zawaideh */\n\n // API available in <= v0.8\n /*******************************\n\n // idleTimer() takes an optional argument that defines the idle timeout\n // timeout is in milliseconds; defaults to 30000\n $.idleTimer(10000);\n\n\n $(document).bind(\"idle.idleTimer\", function(){\n // function you want to fire when the user goes idle\n });\n\n\n $(document).bind(\"active.idleTimer\", function(){\n // function you want to fire when the user becomes active again\n });\n\n // pass the string 'destroy' to stop the timer\n $.idleTimer('destroy');\n\n // you can query if the user is idle or not with data()\n $.data(document,'idleTimer'); // 'idle' or 'active'\n\n // you can get time elapsed since user when idle/active\n $.idleTimer('getElapsedTime'); // time since state change in ms\n\n ********/\n\n\n\n // API available in >= v0.9\n /*************************\n\n // bind to specific elements, allows for multiple timer instances\n $(elem).idleTimer(timeout|'destroy'|'getElapsedTime');\n $.data(elem,'idleTimer'); // 'idle' or 'active'\n\n // if you're using the old $.idleTimer api, you should not do $(document).idleTimer(...)\n\n // element bound timers will only watch for events inside of them.\n // you may just want page-level activity, in which case you may set up\n // your timers on document, document.documentElement, and document.body\n\n // You can optionally provide a second argument to override certain options.\n // Here are the defaults, so you can omit any or all of them.\n $(elem).idleTimer(timeout, {\n startImmediately: true, //starts a timeout as soon as the timer is set up; otherwise it waits for the first event.\n idle: false, //indicates if the user is idle\n enabled: true, //indicates if the idle timer is enabled\n events: 'mousemove keydown DOMMouseScroll mousewheel mousedown touchstart touchmove' // activity is one of these events\n });\n\n ********/\n\n(function($){\n\n$.idleTimer = function(newTimeout, elem, opts){\n\n // defaults that are to be stored as instance props on the elem\n\n\topts = $.extend({\n\t\tstartImmediately: true, //starts a timeout as soon as the timer is set up\n\t\tidle: false, //indicates if the user is idle\n\t\tenabled: true, //indicates if the idle timer is enabled\n\t\ttimeout: 30000, //the amount of time (ms) before the user is considered idle\n\t\tevents: 'mousemove keydown DOMMouseScroll mousewheel mousedown touchstart touchmove' // activity is one of these events\n\t}, opts);\n\n\n elem = elem || document;\n\n /* (intentionally not documented)\n * Toggles the idle state and fires an appropriate event.\n * @return {void}\n */\n var toggleIdleState = function(myelem){\n\n // curse you, mozilla setTimeout lateness bug!\n if (typeof myelem === 'number'){\n myelem = undefined;\n }\n\n var obj = $.data(myelem || elem,'idleTimerObj');\n\n //toggle the state\n obj.idle = !obj.idle;\n\n // reset timeout \n var elapsed = (+new Date()) - obj.olddate;\n obj.olddate = +new Date();\n\n // handle Chrome always triggering idle after js alert or comfirm popup\n if (obj.idle && (elapsed < opts.timeout)) {\n obj.idle = false;\n clearTimeout($.idleTimer.tId);\n if (opts.enabled)\n $.idleTimer.tId = setTimeout(toggleIdleState, opts.timeout);\n return;\n }\n \n //fire appropriate event\n\n // create a custom event, but first, store the new state on the element\n // and then append that string to a namespace\n var event = jQuery.Event( $.data(elem,'idleTimer', obj.idle ? \"idle\" : \"active\" ) + '.idleTimer' );\n\n // we do want this to bubble, at least as a temporary fix for jQuery 1.7\n // event.stopPropagation();\n $(elem).trigger(event);\n },\n\n /**\n * Stops the idle timer. This removes appropriate event handlers\n * and cancels any pending timeouts.\n * @return {void}\n * @method stop\n * @static\n */\n stop = function(elem){\n\n var obj = $.data(elem,'idleTimerObj') || {};\n\n //set to disabled\n obj.enabled = false;\n\n //clear any pending timeouts\n clearTimeout(obj.tId);\n\n //detach the event handlers\n $(elem).off('.idleTimer');\n },\n\n\n /* (intentionally not documented)\n * Handles a user event indicating that the user isn't idle.\n * @param {Event} event A DOM2-normalized event object.\n * @return {void}\n */\n handleUserEvent = function(){\n\n var obj = $.data(this,'idleTimerObj');\n\n //clear any existing timeout\n clearTimeout(obj.tId);\n\n\n\n //if the idle timer is enabled\n if (obj.enabled){\n\n\n //if it's idle, that means the user is no longer idle\n if (obj.idle){\n toggleIdleState(this);\n }\n\n //set a new timeout\n obj.tId = setTimeout(toggleIdleState, obj.timeout);\n\n }\n };\n\n\n /**\n * Starts the idle timer. This adds appropriate event handlers\n * and starts the first timeout.\n * @param {int} newTimeout (Optional) A new value for the timeout period in ms.\n * @return {void}\n * @method $.idleTimer\n * @static\n */\n\n\n var obj = $.data(elem,'idleTimerObj') || {};\n\n obj.olddate = obj.olddate || +new Date();\n\n //assign a new timeout if necessary\n if (typeof newTimeout === \"number\"){\n opts.timeout = newTimeout;\n } else if (newTimeout === 'destroy') {\n stop(elem);\n return this;\n } else if (newTimeout === 'getElapsedTime'){\n return (+new Date()) - obj.olddate;\n }\n\n //assign appropriate event handlers\n $(elem).on($.trim((opts.events+' ').split(' ').join('.idleTimer ')),handleUserEvent);\n\n\n obj.idle = opts.idle;\n obj.enabled = opts.enabled;\n obj.timeout = opts.timeout;\n\n\n //set a timeout to toggle state. May wish to omit this in some situations\n\tif (opts.startImmediately) {\n\t obj.tId = setTimeout(toggleIdleState, obj.timeout);\n\t}\n\n // assume the user is active for the first x seconds.\n $.data(elem,'idleTimer',\"active\");\n\n // store our instance on the object\n $.data(elem,'idleTimerObj',obj);\n\n\n\n}; // end of $.idleTimer()\n\n\n// v0.9 API for defining multiple timers.\n$.fn.idleTimer = function(newTimeout,opts){\n\t// Allow omission of opts for backward compatibility\n\tif (!opts) {\n\t\topts = {};\n\t}\n\n if(this[0]){\n $.idleTimer(newTimeout,this[0],opts);\n }\n\n return this;\n};\n\n\n})(jQuery);\n","/*!\n * BIDI embedding support for jQuery.i18n\n *\n * Copyright (C) 2015, David Chan\n *\n * This code is dual licensed GPLv2 or later and MIT. You don't have to do\n * anything special to choose one license or the other and you don't have to\n * notify anyone which license you are using. You are free to use this code\n * in commercial projects as long as the copyright header is left intact.\n * See files GPL-LICENSE and MIT-LICENSE for details.\n *\n * @licence GNU General Public Licence 2.0 or later\n * @licence MIT License\n */\n\n( function ( $ ) {\n\t'use strict';\n\tvar strongDirRegExp;\n\n\t/**\n\t * Matches the first strong directionality codepoint:\n\t * - in group 1 if it is LTR\n\t * - in group 2 if it is RTL\n\t * Does not match if there is no strong directionality codepoint.\n\t *\n\t * Generated by UnicodeJS (see tools/strongDir) from the UCD; see\n\t * https://phabricator.wikimedia.org/diffusion/GUJS/ .\n\t */\n\tstrongDirRegExp = new RegExp(\n\t\t'(?:' +\n\t\t\t'(' +\n\t\t\t\t'[\\u0041-\\u005a\\u0061-\\u007a\\u00aa\\u00b5\\u00ba\\u00c0-\\u00d6\\u00d8-\\u00f6\\u00f8-\\u02b8\\u02bb-\\u02c1\\u02d0\\u02d1\\u02e0-\\u02e4\\u02ee\\u0370-\\u0373\\u0376\\u0377\\u037a-\\u037d\\u037f\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0482\\u048a-\\u052f\\u0531-\\u0556\\u0559-\\u055f\\u0561-\\u0587\\u0589\\u0903-\\u0939\\u093b\\u093d-\\u0940\\u0949-\\u094c\\u094e-\\u0950\\u0958-\\u0961\\u0964-\\u0980\\u0982\\u0983\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\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u0cb5-\\u0cb9\\u0cbd-\\u0cc4\\u0cc6-\\u0cc8\\u0cca\\u0ccb\\u0cd5\\u0cd6\\u0cde\\u0ce0\\u0ce1\\u0ce6-\\u0cef\\u0cf1\\u0cf2\\u0d02\\u0d03\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d-\\u0d40\\u0d46-\\u0d48\\u0d4a-\\u0d4c\\u0d4e\\u0d57\\u0d5f-\\u0d61\\u0d66-\\u0d75\\u0d79-\\u0d7f\\u0d82\\u0d83\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0dcf-\\u0dd1\\u0dd8-\\u0ddf\\u0de6-\\u0def\\u0df2-\\u0df4\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e4f-\\u0e5b\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0ed0-\\u0ed9\\u0edc-\\u0edf\\u0f00-\\u0f17\\u0f1a-\\u0f34\\u0f36\\u0f38\\u0f3e-\\u0f47\\u0f49-\\u0f6c\\u0f7f\\u0f85\\u0f88-\\u0f8c\\u0fbe-\\u0fc5\\u0fc7-\\u0fcc\\u0fce-\\u0fda\\u1000-\\u102c\\u1031\\u1038\\u103b\\u103c\\u103f-\\u1057\\u105a-\\u105d\\u1061-\\u1070\\u1075-\\u1081\\u1083\\u1084\\u1087-\\u108c\\u108e-\\u109c\\u109e-\\u10c5\\u10c7\\u10cd\\u10d0-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1360-\\u137c\\u1380-\\u138f\\u13a0-\\u13f5\\u13f8-\\u13fd\\u1401-\\u167f\\u1681-\\u169a\\u16a0-\\u16f8\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1735\\u1736\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17b6\\u17be-\\u17c5\\u17c7\\u17c8\\u17d4-\\u17da\\u17dc\\u17e0-\\u17e9\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191e\\u1923-\\u1926\\u1929-\\u192b\\u1930\\u1931\\u1933-\\u1938\\u1946-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19b0-\\u19c9\\u19d0-\\u19da\\u1a00-\\u1a16\\u1a19\\u1a1a\\u1a1e-\\u1a55\\u1a57\\u1a61\\u1a63\\u1a64\\u1a6d-\\u1a72\\u1a80-\\u1a89\\u1a90-\\u1a99\\u1aa0-\\u1aad\\u1b04-\\u1b33\\u1b35\\u1b3b\\u1b3d-\\u1b41\\u1b43-\\u1b4b\\u1b50-\\u1b6a\\u1b74-\\u1b7c\\u1b82-\\u1ba1\\u1ba6\\u1ba7\\u1baa\\u1bae-\\u1be5\\u1be7\\u1bea-\\u1bec\\u1bee\\u1bf2\\u1bf3\\u1bfc-\\u1c2b\\u1c34\\u1c35\\u1c3b-\\u1c49\\u1c4d-\\u1c7f\\u1cc0-\\u1cc7\\u1cd3\\u1ce1\\u1ce9-\\u1cec\\u1cee-\\u1cf3\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u200e\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u214f\\u2160-\\u2188\\u2336-\\u237a\\u2395\\u249c-\\u24e9\\u26ac\\u2800-\\u28ff\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d70\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u3005-\\u3007\\u3021-\\u3029\\u302e\\u302f\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u3190-\\u31ba\\u31f0-\\u321c\\u3220-\\u324f\\u3260-\\u327b\\u327f-\\u32b0\\u32c0-\\u32cb\\u32d0-\\u32fe\\u3300-\\u3376\\u337b-\\u33dd\\u33e0-\\u33fe\\u3400-\\u4db5\\u4e00-\\u9fd5\\ua000-\\ua48c\\ua4d0-\\ua60c\\ua610-\\ua62b\\ua640-\\ua66e\\ua680-\\ua69d\\ua6a0-\\ua6ef\\ua6f2-\\ua6f7\\ua722-\\ua787\\ua789-\\ua7ad\\ua7b0-\\ua7b7\\ua7f7-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua824\\ua827\\ua830-\\ua837\\ua840-\\ua873\\ua880-\\ua8c3\\ua8ce-\\ua8d9\\ua8f2-\\ua8fd\\ua900-\\ua925\\ua92e-\\ua946\\ua952\\ua953\\ua95f-\\ua97c\\ua983-\\ua9b2\\ua9b4\\ua9b5\\ua9ba\\ua9bb\\ua9bd-\\ua9cd\\ua9cf-\\ua9d9\\ua9de-\\ua9e4\\ua9e6-\\ua9fe\\uaa00-\\uaa28\\uaa2f\\uaa30\\uaa33\\uaa34\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa4d\\uaa50-\\uaa59\\uaa5c-\\uaa7b\\uaa7d-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaaeb\\uaaee-\\uaaf5\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uab30-\\uab65\\uab70-\\uabe4\\uabe6\\uabe7\\uabe9-\\uabec\\uabf0-\\uabf9\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\ue000-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc]|\\ud800[\\udc00-\\udc0b]|\\ud800[\\udc0d-\\udc26]|\\ud800[\\udc28-\\udc3a]|\\ud800\\udc3c|\\ud800\\udc3d|\\ud800[\\udc3f-\\udc4d]|\\ud800[\\udc50-\\udc5d]|\\ud800[\\udc80-\\udcfa]|\\ud800\\udd00|\\ud800\\udd02|\\ud800[\\udd07-\\udd33]|\\ud800[\\udd37-\\udd3f]|\\ud800[\\uddd0-\\uddfc]|\\ud800[\\ude80-\\ude9c]|\\ud800[\\udea0-\\uded0]|\\ud800[\\udf00-\\udf23]|\\ud800[\\udf30-\\udf4a]|\\ud800[\\udf50-\\udf75]|\\ud800[\\udf80-\\udf9d]|\\ud800[\\udf9f-\\udfc3]|\\ud800[\\udfc8-\\udfd5]|\\ud801[\\udc00-\\udc9d]|\\ud801[\\udca0-\\udca9]|\\ud801[\\udd00-\\udd27]|\\ud801[\\udd30-\\udd63]|\\ud801\\udd6f|\\ud801[\\ude00-\\udf36]|\\ud801[\\udf40-\\udf55]|\\ud801[\\udf60-\\udf67]|\\ud804\\udc00|\\ud804[\\udc02-\\udc37]|\\ud804[\\udc47-\\udc4d]|\\ud804[\\udc66-\\udc6f]|\\ud804[\\udc82-\\udcb2]|\\ud804\\udcb7|\\ud804\\udcb8|\\ud804[\\udcbb-\\udcc1]|\\ud804[\\udcd0-\\udce8]|\\ud804[\\udcf0-\\udcf9]|\\ud804[\\udd03-\\udd26]|\\ud804\\udd2c|\\ud804[\\udd36-\\udd43]|\\ud804[\\udd50-\\udd72]|\\ud804[\\udd74-\\udd76]|\\ud804[\\udd82-\\uddb5]|\\ud804[\\uddbf-\\uddc9]|\\ud804\\uddcd|\\ud804[\\uddd0-\\udddf]|\\ud804[\\udde1-\\uddf4]|\\ud804[\\ude00-\\ude11]|\\ud804[\\ude13-\\ude2e]|\\ud804\\ude32|\\ud804\\ude33|\\ud804\\ude35|\\ud804[\\ude38-\\ude3d]|\\ud804[\\ude80-\\ude86]|\\ud804\\ude88|\\ud804[\\ude8a-\\ude8d]|\\ud804[\\ude8f-\\ude9d]|\\ud804[\\ude9f-\\udea9]|\\ud804[\\udeb0-\\udede]|\\ud804[\\udee0-\\udee2]|\\ud804[\\udef0-\\udef9]|\\ud804\\udf02|\\ud804\\udf03|\\ud804[\\udf05-\\udf0c]|\\ud804\\udf0f|\\ud804\\udf10|\\ud804[\\udf13-\\udf28]|\\ud804[\\udf2a-\\udf30]|\\ud804\\udf32|\\ud804\\udf33|\\ud804[\\udf35-\\udf39]|\\ud804[\\udf3d-\\udf3f]|\\ud804[\\udf41-\\udf44]|\\ud804\\udf47|\\ud804\\udf48|\\ud804[\\udf4b-\\udf4d]|\\ud804\\udf50|\\ud804\\udf57|\\ud804[\\udf5d-\\udf63]|\\ud805[\\udc80-\\udcb2]|\\ud805\\udcb9|\\ud805[\\udcbb-\\udcbe]|\\ud805\\udcc1|\\ud805[\\udcc4-\\udcc7]|\\ud805[\\udcd0-\\udcd9]|\\ud805[\\udd80-\\uddb1]|\\ud805[\\uddb8-\\uddbb]|\\ud805\\uddbe|\\ud805[\\uddc1-\\udddb]|\\ud805[\\ude00-\\ude32]|\\ud805\\ude3b|\\ud805\\ude3c|\\ud805\\ude3e|\\ud805[\\ude41-\\ude44]|\\ud805[\\ude50-\\ude59]|\\ud805[\\ude80-\\udeaa]|\\ud805\\udeac|\\ud805\\udeae|\\ud805\\udeaf|\\ud805\\udeb6|\\ud805[\\udec0-\\udec9]|\\ud805[\\udf00-\\udf19]|\\ud805\\udf20|\\ud805\\udf21|\\ud805\\udf26|\\ud805[\\udf30-\\udf3f]|\\ud806[\\udca0-\\udcf2]|\\ud806\\udcff|\\ud806[\\udec0-\\udef8]|\\ud808[\\udc00-\\udf99]|\\ud809[\\udc00-\\udc6e]|\\ud809[\\udc70-\\udc74]|\\ud809[\\udc80-\\udd43]|\\ud80c[\\udc00-\\udfff]|\\ud80d[\\udc00-\\udc2e]|\\ud811[\\udc00-\\ude46]|\\ud81a[\\udc00-\\ude38]|\\ud81a[\\ude40-\\ude5e]|\\ud81a[\\ude60-\\ude69]|\\ud81a\\ude6e|\\ud81a\\ude6f|\\ud81a[\\uded0-\\udeed]|\\ud81a\\udef5|\\ud81a[\\udf00-\\udf2f]|\\ud81a[\\udf37-\\udf45]|\\ud81a[\\udf50-\\udf59]|\\ud81a[\\udf5b-\\udf61]|\\ud81a[\\udf63-\\udf77]|\\ud81a[\\udf7d-\\udf8f]|\\ud81b[\\udf00-\\udf44]|\\ud81b[\\udf50-\\udf7e]|\\ud81b[\\udf93-\\udf9f]|\\ud82c\\udc00|\\ud82c\\udc01|\\ud82f[\\udc00-\\udc6a]|\\ud82f[\\udc70-\\udc7c]|\\ud82f[\\udc80-\\udc88]|\\ud82f[\\udc90-\\udc99]|\\ud82f\\udc9c|\\ud82f\\udc9f|\\ud834[\\udc00-\\udcf5]|\\ud834[\\udd00-\\udd26]|\\ud834[\\udd29-\\udd66]|\\ud834[\\udd6a-\\udd72]|\\ud834\\udd83|\\ud834\\udd84|\\ud834[\\udd8c-\\udda9]|\\ud834[\\uddae-\\udde8]|\\ud834[\\udf60-\\udf71]|\\ud835[\\udc00-\\udc54]|\\ud835[\\udc56-\\udc9c]|\\ud835\\udc9e|\\ud835\\udc9f|\\ud835\\udca2|\\ud835\\udca5|\\ud835\\udca6|\\ud835[\\udca9-\\udcac]|\\ud835[\\udcae-\\udcb9]|\\ud835\\udcbb|\\ud835[\\udcbd-\\udcc3]|\\ud835[\\udcc5-\\udd05]|\\ud835[\\udd07-\\udd0a]|\\ud835[\\udd0d-\\udd14]|\\ud835[\\udd16-\\udd1c]|\\ud835[\\udd1e-\\udd39]|\\ud835[\\udd3b-\\udd3e]|\\ud835[\\udd40-\\udd44]|\\ud835\\udd46|\\ud835[\\udd4a-\\udd50]|\\ud835[\\udd52-\\udea5]|\\ud835[\\udea8-\\udeda]|\\ud835[\\udedc-\\udf14]|\\ud835[\\udf16-\\udf4e]|\\ud835[\\udf50-\\udf88]|\\ud835[\\udf8a-\\udfc2]|\\ud835[\\udfc4-\\udfcb]|\\ud836[\\udc00-\\uddff]|\\ud836[\\ude37-\\ude3a]|\\ud836[\\ude6d-\\ude74]|\\ud836[\\ude76-\\ude83]|\\ud836[\\ude85-\\ude8b]|\\ud83c[\\udd10-\\udd2e]|\\ud83c[\\udd30-\\udd69]|\\ud83c[\\udd70-\\udd9a]|\\ud83c[\\udde6-\\ude02]|\\ud83c[\\ude10-\\ude3a]|\\ud83c[\\ude40-\\ude48]|\\ud83c\\ude50|\\ud83c\\ude51|[\\ud840-\\ud868][\\udc00-\\udfff]|\\ud869[\\udc00-\\uded6]|\\ud869[\\udf00-\\udfff]|[\\ud86a-\\ud86c][\\udc00-\\udfff]|\\ud86d[\\udc00-\\udf34]|\\ud86d[\\udf40-\\udfff]|\\ud86e[\\udc00-\\udc1d]|\\ud86e[\\udc20-\\udfff]|[\\ud86f-\\ud872][\\udc00-\\udfff]|\\ud873[\\udc00-\\udea1]|\\ud87e[\\udc00-\\ude1d]|[\\udb80-\\udbbe][\\udc00-\\udfff]|\\udbbf[\\udc00-\\udffd]|[\\udbc0-\\udbfe][\\udc00-\\udfff]|\\udbff[\\udc00-\\udffd]' +\n\t\t\t')|(' +\n\t\t\t\t'[\\u0590\\u05be\\u05c0\\u05c3\\u05c6\\u05c8-\\u05ff\\u07c0-\\u07ea\\u07f4\\u07f5\\u07fa-\\u0815\\u081a\\u0824\\u0828\\u082e-\\u0858\\u085c-\\u089f\\u200f\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb4f\\u0608\\u060b\\u060d\\u061b-\\u064a\\u066d-\\u066f\\u0671-\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u0710\\u0712-\\u072f\\u074b-\\u07a5\\u07b1-\\u07bf\\u08a0-\\u08e2\\ufb50-\\ufd3d\\ufd40-\\ufdcf\\ufdf0-\\ufdfc\\ufdfe\\ufdff\\ufe70-\\ufefe]|\\ud802[\\udc00-\\udd1e]|\\ud802[\\udd20-\\ude00]|\\ud802\\ude04|\\ud802[\\ude07-\\ude0b]|\\ud802[\\ude10-\\ude37]|\\ud802[\\ude3b-\\ude3e]|\\ud802[\\ude40-\\udee4]|\\ud802[\\udee7-\\udf38]|\\ud802[\\udf40-\\udfff]|\\ud803[\\udc00-\\ude5f]|\\ud803[\\ude7f-\\udfff]|\\ud83a[\\udc00-\\udccf]|\\ud83a[\\udcd7-\\udfff]|\\ud83b[\\udc00-\\uddff]|\\ud83b[\\udf00-\\udfff]|\\ud83b[\\udf00-\\udfff]|\\ud83b[\\udf00-\\udfff]|\\ud83b[\\udf00-\\udfff]|\\ud83b[\\udf00-\\udfff]|\\ud83b[\\udf00-\\udfff]|\\ud83b[\\udf00-\\udfff]|\\ud83b[\\udf00-\\udfff]|\\ud83b[\\udf00-\\udfff]|\\ud83b[\\udf00-\\udfff]|\\ud83b[\\udf00-\\udfff]|\\ud83b[\\udf00-\\udfff]|\\ud83b[\\udf00-\\udfff]|\\ud83b[\\ude00-\\udeef]|\\ud83b[\\udef2-\\udeff]' +\n\t\t\t')' +\n\t\t')'\n\t);\n\n\t/**\n\t * Gets directionality of the first strongly directional codepoint\n\t *\n\t * This is the rule the BIDI algorithm uses to determine the directionality of\n\t * paragraphs ( http://unicode.org/reports/tr9/#The_Paragraph_Level ) and\n\t * FSI isolates ( http://unicode.org/reports/tr9/#Explicit_Directional_Isolates ).\n\t *\n\t * TODO: Does not handle BIDI control characters inside the text.\n\t * TODO: Does not handle unallocated characters.\n\t *\n\t * @param {string} text The text from which to extract initial directionality.\n\t * @return {string} Directionality (either 'ltr' or 'rtl')\n\t */\n\tfunction strongDirFromContent( text ) {\n\t\tvar m = text.match( strongDirRegExp );\n\t\tif ( !m ) {\n\t\t\treturn null;\n\t\t}\n\t\tif ( m[ 2 ] === undefined ) {\n\t\t\treturn 'ltr';\n\t\t}\n\t\treturn 'rtl';\n\t}\n\n\t$.extend( $.i18n.parser.emitter, {\n\t\t/**\n\t\t * Wraps argument with unicode control characters for directionality safety\n\t\t *\n\t\t * This solves the problem where directionality-neutral characters at the edge of\n\t\t * the argument string get interpreted with the wrong directionality from the\n\t\t * enclosing context, giving renderings that look corrupted like \"(Ben_(WMF\".\n\t\t *\n\t\t * The wrapping is LRE...PDF or RLE...PDF, depending on the detected\n\t\t * directionality of the argument string, using the BIDI algorithm's own \"First\n\t\t * strong directional codepoint\" rule. Essentially, this works round the fact that\n\t\t * there is no embedding equivalent of U+2068 FSI (isolation with heuristic\n\t\t * direction inference). The latter is cleaner but still not widely supported.\n\t\t *\n\t\t * @param {string[]} nodes The text nodes from which to take the first item.\n\t\t * @return {string} Wrapped String of content as needed.\n\t\t */\n\t\tbidi: function ( nodes ) {\n\t\t\tvar dir = strongDirFromContent( nodes[ 0 ] );\n\t\t\tif ( dir === 'ltr' ) {\n\t\t\t\t// Wrap in LEFT-TO-RIGHT EMBEDDING ... POP DIRECTIONAL FORMATTING\n\t\t\t\treturn '\\u202A' + nodes[ 0 ] + '\\u202C';\n\t\t\t}\n\t\t\tif ( dir === 'rtl' ) {\n\t\t\t\t// Wrap in RIGHT-TO-LEFT EMBEDDING ... POP DIRECTIONAL FORMATTING\n\t\t\t\treturn '\\u202B' + nodes[ 0 ] + '\\u202C';\n\t\t\t}\n\t\t\t// No strong directionality: do not wrap\n\t\t\treturn nodes[ 0 ];\n\t\t}\n\t} );\n}( jQuery ) );\n","/*!\n * jQuery Internationalization library\n *\n * Copyright (C) 2011-2013 Santhosh Thottingal, Neil Kandalgaonkar\n *\n * jquery.i18n is dual licensed GPLv2 or later and MIT. You don't have to do\n * anything special to choose one license or the other and you don't have to\n * notify anyone which license you are using. You are free to use\n * UniversalLanguageSelector in commercial projects as long as the copyright\n * header is left intact. See files GPL-LICENSE and MIT-LICENSE for details.\n *\n * @licence GNU General Public Licence 2.0 or later\n * @licence MIT License\n */\n\n( function ( $ ) {\n\t'use strict';\n\n\tvar MessageParserEmitter = function () {\n\t\tthis.language = $.i18n.languages[ String.locale ] || $.i18n.languages[ 'default' ];\n\t};\n\n\tMessageParserEmitter.prototype = {\n\t\tconstructor: MessageParserEmitter,\n\n\t\t/**\n\t\t * (We put this method definition here, and not in prototype, to make\n\t\t * sure it's not overwritten by any magic.) Walk entire node structure,\n\t\t * applying replacements and template functions when appropriate\n\t\t *\n\t\t * @param {Mixed} node abstract syntax tree (top node or subnode)\n\t\t * @param {Array} replacements for $1, $2, ... $n\n\t\t * @return {Mixed} single-string node or array of nodes suitable for\n\t\t * jQuery appending.\n\t\t */\n\t\temit: function ( node, replacements ) {\n\t\t\tvar ret, subnodes, operation,\n\t\t\t\tmessageParserEmitter = this;\n\n\t\t\tswitch ( typeof node ) {\n\t\t\t\tcase 'string':\n\t\t\t\tcase 'number':\n\t\t\t\t\tret = node;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'object':\n\t\t\t\t// node is an array of nodes\n\t\t\t\t\tsubnodes = $.map( node.slice( 1 ), function ( n ) {\n\t\t\t\t\t\treturn messageParserEmitter.emit( n, replacements );\n\t\t\t\t\t} );\n\n\t\t\t\t\toperation = node[ 0 ].toLowerCase();\n\n\t\t\t\t\tif ( typeof messageParserEmitter[ operation ] === 'function' ) {\n\t\t\t\t\t\tret = messageParserEmitter[ operation ]( subnodes, replacements );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new Error( 'unknown operation \"' + operation + '\"' );\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'undefined':\n\t\t\t\t// Parsing the empty string (as an entire expression, or as a\n\t\t\t\t// paramExpression in a template) results in undefined\n\t\t\t\t// Perhaps a more clever parser can detect this, and return the\n\t\t\t\t// empty string? Or is that useful information?\n\t\t\t\t// The logical thing is probably to return the empty string here\n\t\t\t\t// when we encounter undefined.\n\t\t\t\t\tret = '';\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error( 'unexpected type in AST: ' + typeof node );\n\t\t\t}\n\n\t\t\treturn ret;\n\t\t},\n\n\t\t/**\n\t\t * Parsing has been applied depth-first we can assume that all nodes\n\t\t * here are single nodes Must return a single node to parents -- a\n\t\t * jQuery with synthetic span However, unwrap any other synthetic spans\n\t\t * in our children and pass them upwards\n\t\t *\n\t\t * @param {Array} nodes Mixed, some single nodes, some arrays of nodes.\n\t\t * @return {string}\n\t\t */\n\t\tconcat: function ( nodes ) {\n\t\t\tvar result = '';\n\n\t\t\t$.each( nodes, function ( i, node ) {\n\t\t\t\t// strings, integers, anything else\n\t\t\t\tresult += node;\n\t\t\t} );\n\n\t\t\treturn result;\n\t\t},\n\n\t\t/**\n\t\t * Return escaped replacement of correct index, or string if\n\t\t * unavailable. Note that we expect the parsed parameter to be\n\t\t * zero-based. i.e. $1 should have become [ 0 ]. if the specified\n\t\t * parameter is not found return the same string (e.g. \"$99\" ->\n\t\t * parameter 98 -> not found -> return \"$99\" ) TODO throw error if\n\t\t * nodes.length > 1 ?\n\t\t *\n\t\t * @param {Array} nodes One element, integer, n >= 0\n\t\t * @param {Array} replacements for $1, $2, ... $n\n\t\t * @return {string} replacement\n\t\t */\n\t\treplace: function ( nodes, replacements ) {\n\t\t\tvar index = parseInt( nodes[ 0 ], 10 );\n\n\t\t\tif ( index < replacements.length ) {\n\t\t\t\t// replacement is not a string, don't touch!\n\t\t\t\treturn replacements[ index ];\n\t\t\t} else {\n\t\t\t\t// index not found, fallback to displaying variable\n\t\t\t\treturn '$' + ( index + 1 );\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Transform parsed structure into pluralization n.b. The first node may\n\t\t * be a non-integer (for instance, a string representing an Arabic\n\t\t * number). So convert it back with the current language's\n\t\t * convertNumber.\n\t\t *\n\t\t * @param {Array} nodes List [ {String|Number}, {String}, {String} ... ]\n\t\t * @return {string} selected pluralized form according to current\n\t\t * language.\n\t\t */\n\t\tplural: function ( nodes ) {\n\t\t\tvar count = parseFloat( this.language.convertNumber( nodes[ 0 ], 10 ) ),\n\t\t\t\tforms = nodes.slice( 1 );\n\n\t\t\treturn forms.length ? this.language.convertPlural( count, forms ) : '';\n\t\t},\n\n\t\t/**\n\t\t * Transform parsed structure into gender Usage\n\t\t * {{gender:gender|masculine|feminine|neutral}}.\n\t\t *\n\t\t * @param {Array} nodes List [ {String}, {String}, {String} , {String} ]\n\t\t * @return {string} selected gender form according to current language\n\t\t */\n\t\tgender: function ( nodes ) {\n\t\t\tvar gender = nodes[ 0 ],\n\t\t\t\tforms = nodes.slice( 1 );\n\n\t\t\treturn this.language.gender( gender, forms );\n\t\t},\n\n\t\t/**\n\t\t * Transform parsed structure into grammar conversion. Invoked by\n\t\t * putting {{grammar:form|word}} in a message\n\t\t *\n\t\t * @param {Array} nodes List [{Grammar case eg: genitive}, {String word}]\n\t\t * @return {string} selected grammatical form according to current\n\t\t * language.\n\t\t */\n\t\tgrammar: function ( nodes ) {\n\t\t\tvar form = nodes[ 0 ],\n\t\t\t\tword = nodes[ 1 ];\n\n\t\t\treturn word && form && this.language.convertGrammar( word, form );\n\t\t}\n\t};\n\n\t$.extend( $.i18n.parser.emitter, new MessageParserEmitter() );\n}( jQuery ) );\n","/*!\n * jQuery Internationalization library\n *\n * Copyright (C) 2012 Santhosh Thottingal\n *\n * jquery.i18n is dual licensed GPLv2 or later and MIT. You don't have to do anything special to\n * choose one license or the other and you don't have to notify anyone which license you are using.\n * You are free to use UniversalLanguageSelector in commercial projects as long as the copyright\n * header is left intact. See files GPL-LICENSE and MIT-LICENSE for details.\n *\n * @licence GNU General Public Licence 2.0 or later\n * @licence MIT License\n */\n( function ( $ ) {\n\t'use strict';\n\n\t$.i18n = $.i18n || {};\n\t$.extend( $.i18n.fallbacks, {\n\t\tab: [ 'ru' ],\n\t\tace: [ 'id' ],\n\t\taln: [ 'sq' ],\n\t\t// Not so standard - als is supposed to be Tosk Albanian,\n\t\t// but in Wikipedia it's used for a Germanic language.\n\t\tals: [ 'gsw', 'de' ],\n\t\tan: [ 'es' ],\n\t\tanp: [ 'hi' ],\n\t\tarn: [ 'es' ],\n\t\tarz: [ 'ar' ],\n\t\tav: [ 'ru' ],\n\t\tay: [ 'es' ],\n\t\tba: [ 'ru' ],\n\t\tbar: [ 'de' ],\n\t\t'bat-smg': [ 'sgs', 'lt' ],\n\t\tbcc: [ 'fa' ],\n\t\t'be-x-old': [ 'be-tarask' ],\n\t\tbh: [ 'bho' ],\n\t\tbjn: [ 'id' ],\n\t\tbm: [ 'fr' ],\n\t\tbpy: [ 'bn' ],\n\t\tbqi: [ 'fa' ],\n\t\tbug: [ 'id' ],\n\t\t'cbk-zam': [ 'es' ],\n\t\tce: [ 'ru' ],\n\t\tcrh: [ 'crh-latn' ],\n\t\t'crh-cyrl': [ 'ru' ],\n\t\tcsb: [ 'pl' ],\n\t\tcv: [ 'ru' ],\n\t\t'de-at': [ 'de' ],\n\t\t'de-ch': [ 'de' ],\n\t\t'de-formal': [ 'de' ],\n\t\tdsb: [ 'de' ],\n\t\tdtp: [ 'ms' ],\n\t\tegl: [ 'it' ],\n\t\teml: [ 'it' ],\n\t\tff: [ 'fr' ],\n\t\tfit: [ 'fi' ],\n\t\t'fiu-vro': [ 'vro', 'et' ],\n\t\tfrc: [ 'fr' ],\n\t\tfrp: [ 'fr' ],\n\t\tfrr: [ 'de' ],\n\t\tfur: [ 'it' ],\n\t\tgag: [ 'tr' ],\n\t\tgan: [ 'gan-hant', 'zh-hant', 'zh-hans' ],\n\t\t'gan-hans': [ 'zh-hans' ],\n\t\t'gan-hant': [ 'zh-hant', 'zh-hans' ],\n\t\tgl: [ 'pt' ],\n\t\tglk: [ 'fa' ],\n\t\tgn: [ 'es' ],\n\t\tgsw: [ 'de' ],\n\t\thif: [ 'hif-latn' ],\n\t\thsb: [ 'de' ],\n\t\tht: [ 'fr' ],\n\t\tii: [ 'zh-cn', 'zh-hans' ],\n\t\tinh: [ 'ru' ],\n\t\tiu: [ 'ike-cans' ],\n\t\tjut: [ 'da' ],\n\t\tjv: [ 'id' ],\n\t\tkaa: [ 'kk-latn', 'kk-cyrl' ],\n\t\tkbd: [ 'kbd-cyrl' ],\n\t\tkhw: [ 'ur' ],\n\t\tkiu: [ 'tr' ],\n\t\tkk: [ 'kk-cyrl' ],\n\t\t'kk-arab': [ 'kk-cyrl' ],\n\t\t'kk-latn': [ 'kk-cyrl' ],\n\t\t'kk-cn': [ 'kk-arab', 'kk-cyrl' ],\n\t\t'kk-kz': [ 'kk-cyrl' ],\n\t\t'kk-tr': [ 'kk-latn', 'kk-cyrl' ],\n\t\tkl: [ 'da' ],\n\t\t'ko-kp': [ 'ko' ],\n\t\tkoi: [ 'ru' ],\n\t\tkrc: [ 'ru' ],\n\t\tks: [ 'ks-arab' ],\n\t\tksh: [ 'de' ],\n\t\tku: [ 'ku-latn' ],\n\t\t'ku-arab': [ 'ckb' ],\n\t\tkv: [ 'ru' ],\n\t\tlad: [ 'es' ],\n\t\tlb: [ 'de' ],\n\t\tlbe: [ 'ru' ],\n\t\tlez: [ 'ru' ],\n\t\tli: [ 'nl' ],\n\t\tlij: [ 'it' ],\n\t\tliv: [ 'et' ],\n\t\tlmo: [ 'it' ],\n\t\tln: [ 'fr' ],\n\t\tltg: [ 'lv' ],\n\t\tlzz: [ 'tr' ],\n\t\tmai: [ 'hi' ],\n\t\t'map-bms': [ 'jv', 'id' ],\n\t\tmg: [ 'fr' ],\n\t\tmhr: [ 'ru' ],\n\t\tmin: [ 'id' ],\n\t\tmo: [ 'ro' ],\n\t\tmrj: [ 'ru' ],\n\t\tmwl: [ 'pt' ],\n\t\tmyv: [ 'ru' ],\n\t\tmzn: [ 'fa' ],\n\t\tnah: [ 'es' ],\n\t\tnap: [ 'it' ],\n\t\tnds: [ 'de' ],\n\t\t'nds-nl': [ 'nl' ],\n\t\t'nl-informal': [ 'nl' ],\n\t\tno: [ 'nb' ],\n\t\tos: [ 'ru' ],\n\t\tpcd: [ 'fr' ],\n\t\tpdc: [ 'de' ],\n\t\tpdt: [ 'de' ],\n\t\tpfl: [ 'de' ],\n\t\tpms: [ 'it' ],\n\t\tpt: [ 'pt-br' ],\n\t\t'pt-br': [ 'pt' ],\n\t\tqu: [ 'es' ],\n\t\tqug: [ 'qu', 'es' ],\n\t\trgn: [ 'it' ],\n\t\trmy: [ 'ro' ],\n\t\t'roa-rup': [ 'rup' ],\n\t\true: [ 'uk', 'ru' ],\n\t\truq: [ 'ruq-latn', 'ro' ],\n\t\t'ruq-cyrl': [ 'mk' ],\n\t\t'ruq-latn': [ 'ro' ],\n\t\tsa: [ 'hi' ],\n\t\tsah: [ 'ru' ],\n\t\tscn: [ 'it' ],\n\t\tsg: [ 'fr' ],\n\t\tsgs: [ 'lt' ],\n\t\tsli: [ 'de' ],\n\t\tsr: [ 'sr-ec' ],\n\t\tsrn: [ 'nl' ],\n\t\tstq: [ 'de' ],\n\t\tsu: [ 'id' ],\n\t\tszl: [ 'pl' ],\n\t\ttcy: [ 'kn' ],\n\t\ttg: [ 'tg-cyrl' ],\n\t\ttt: [ 'tt-cyrl', 'ru' ],\n\t\t'tt-cyrl': [ 'ru' ],\n\t\tty: [ 'fr' ],\n\t\tudm: [ 'ru' ],\n\t\tug: [ 'ug-arab' ],\n\t\tuk: [ 'ru' ],\n\t\tvec: [ 'it' ],\n\t\tvep: [ 'et' ],\n\t\tvls: [ 'nl' ],\n\t\tvmf: [ 'de' ],\n\t\tvot: [ 'fi' ],\n\t\tvro: [ 'et' ],\n\t\twa: [ 'fr' ],\n\t\two: [ 'fr' ],\n\t\twuu: [ 'zh-hans' ],\n\t\txal: [ 'ru' ],\n\t\txmf: [ 'ka' ],\n\t\tyi: [ 'he' ],\n\t\tza: [ 'zh-hans' ],\n\t\tzea: [ 'nl' ],\n\t\tzh: [ 'zh-hans' ],\n\t\t'zh-classical': [ 'lzh' ],\n\t\t'zh-cn': [ 'zh-hans' ],\n\t\t'zh-hant': [ 'zh-hans' ],\n\t\t'zh-hk': [ 'zh-hant', 'zh-hans' ],\n\t\t'zh-min-nan': [ 'nan' ],\n\t\t'zh-mo': [ 'zh-hk', 'zh-hant', 'zh-hans' ],\n\t\t'zh-my': [ 'zh-sg', 'zh-hans' ],\n\t\t'zh-sg': [ 'zh-hans' ],\n\t\t'zh-tw': [ 'zh-hant', 'zh-hans' ],\n\t\t'zh-yue': [ 'yue' ]\n\t} );\n}( jQuery ) );\n","/*!\n * jQuery Internationalization library\n *\n * Copyright (C) 2012 Santhosh Thottingal\n *\n * jquery.i18n is dual licensed GPLv2 or later and MIT. You don't have to do\n * anything special to choose one license or the other and you don't have to\n * notify anyone which license you are using. You are free to use\n * UniversalLanguageSelector in commercial projects as long as the copyright\n * header is left intact. See files GPL-LICENSE and MIT-LICENSE for details.\n *\n * @licence GNU General Public Licence 2.0 or later\n * @licence MIT License\n */\n\n( function ( $ ) {\n\t'use strict';\n\n\tvar I18N,\n\t\tslice = Array.prototype.slice;\n\t/**\n\t * @constructor\n\t * @param {Object} options\n\t */\n\tI18N = function ( options ) {\n\t\t// Load defaults\n\t\tthis.options = $.extend( {}, I18N.defaults, options );\n\n\t\tthis.parser = this.options.parser;\n\t\tthis.locale = this.options.locale;\n\t\tthis.messageStore = this.options.messageStore;\n\t\tthis.languages = {};\n\t};\n\n\tI18N.prototype = {\n\t\t/**\n\t\t * Localize a given messageKey to a locale.\n\t\t * @param {String} messageKey\n\t\t * @return {String} Localized message\n\t\t */\n\t\tlocalize: function ( messageKey ) {\n\t\t\tvar localeParts, localePartIndex, locale, fallbackIndex,\n\t\t\t\ttryingLocale, message;\n\n\t\t\tlocale = this.locale;\n\t\t\tfallbackIndex = 0;\n\n\t\t\twhile ( locale ) {\n\t\t\t\t// Iterate through locales starting at most-specific until\n\t\t\t\t// localization is found. As in fi-Latn-FI, fi-Latn and fi.\n\t\t\t\tlocaleParts = locale.split( '-' );\n\t\t\t\tlocalePartIndex = localeParts.length;\n\n\t\t\t\tdo {\n\t\t\t\t\ttryingLocale = localeParts.slice( 0, localePartIndex ).join( '-' );\n\t\t\t\t\tmessage = this.messageStore.get( tryingLocale, messageKey );\n\n\t\t\t\t\tif ( message ) {\n\t\t\t\t\t\treturn message;\n\t\t\t\t\t}\n\n\t\t\t\t\tlocalePartIndex--;\n\t\t\t\t} while ( localePartIndex );\n\n\t\t\t\tif ( locale === 'en' ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tlocale = ( $.i18n.fallbacks[ this.locale ] &&\n\t\t\t\t\t\t$.i18n.fallbacks[ this.locale ][ fallbackIndex ] ) ||\n\t\t\t\t\t\tthis.options.fallbackLocale;\n\t\t\t\t$.i18n.log( 'Trying fallback locale for ' + this.locale + ': ' + locale + ' (' + messageKey + ')' );\n\n\t\t\t\tfallbackIndex++;\n\t\t\t}\n\n\t\t\t// key not found\n\t\t\treturn '';\n\t\t},\n\n\t\t/*\n\t\t * Destroy the i18n instance.\n\t\t */\n\t\tdestroy: function () {\n\t\t\t$.removeData( document, 'i18n' );\n\t\t},\n\n\t\t/**\n\t\t * General message loading API This can take a URL string for\n\t\t * the json formatted messages. Example:\n\t\t * load('path/to/all_localizations.json');\n\t\t *\n\t\t * To load a localization file for a locale:\n\t\t * \n\t\t * load('path/to/de-messages.json', 'de' );\n\t\t * \n\t\t *\n\t\t * To load a localization file from a directory:\n\t\t * \n\t\t * load('path/to/i18n/directory', 'de' );\n\t\t * \n\t\t * The above method has the advantage of fallback resolution.\n\t\t * ie, it will automatically load the fallback locales for de.\n\t\t * For most usecases, this is the recommended method.\n\t\t * It is optional to have trailing slash at end.\n\t\t *\n\t\t * A data object containing message key- message translation mappings\n\t\t * can also be passed. Example:\n\t\t * \n\t\t * load( { 'hello' : 'Hello' }, optionalLocale );\n\t\t * \n\t\t *\n\t\t * A source map containing key-value pair of languagename and locations\n\t\t * can also be passed. Example:\n\t\t * \n\t\t * load( {\n\t\t * bn: 'i18n/bn.json',\n\t\t * he: 'i18n/he.json',\n\t\t * en: 'i18n/en.json'\n\t\t * } )\n\t\t * \n\t\t *\n\t\t * If the data argument is null/undefined/false,\n\t\t * all cached messages for the i18n instance will get reset.\n\t\t *\n\t\t * @param {string|Object} source\n\t\t * @param {string} locale Language tag\n\t\t * @return {jQuery.Promise}\n\t\t */\n\t\tload: function ( source, locale ) {\n\t\t\tvar fallbackLocales, locIndex, fallbackLocale, sourceMap = {};\n\t\t\tif ( !source && !locale ) {\n\t\t\t\tsource = 'i18n/' + $.i18n().locale + '.json';\n\t\t\t\tlocale = $.i18n().locale;\n\t\t\t}\n\t\t\tif ( typeof source === 'string' &&\n\t\t\t\t// source extension should be json, but can have query params after that.\n\t\t\t\tsource.split( '?' )[ 0 ].split( '.' ).pop() !== 'json'\n\t\t\t) {\n\t\t\t\t// Load specified locale then check for fallbacks when directory is\n\t\t\t\t// specified in load()\n\t\t\t\tsourceMap[ locale ] = source + '/' + locale + '.json';\n\t\t\t\tfallbackLocales = ( $.i18n.fallbacks[ locale ] || [] )\n\t\t\t\t\t.concat( this.options.fallbackLocale );\n\t\t\t\tfor ( locIndex = 0; locIndex < fallbackLocales.length; locIndex++ ) {\n\t\t\t\t\tfallbackLocale = fallbackLocales[ locIndex ];\n\t\t\t\t\tsourceMap[ fallbackLocale ] = source + '/' + fallbackLocale + '.json';\n\t\t\t\t}\n\t\t\t\treturn this.load( sourceMap );\n\t\t\t} else {\n\t\t\t\treturn this.messageStore.load( source, locale );\n\t\t\t}\n\n\t\t},\n\n\t\t/**\n\t\t * Does parameter and magic word substitution.\n\t\t *\n\t\t * @param {string} key Message key\n\t\t * @param {Array} parameters Message parameters\n\t\t * @return {string}\n\t\t */\n\t\tparse: function ( key, parameters ) {\n\t\t\tvar message = this.localize( key );\n\t\t\t// FIXME: This changes the state of the I18N object,\n\t\t\t// should probably not change the 'this.parser' but just\n\t\t\t// pass it to the parser.\n\t\t\tthis.parser.language = $.i18n.languages[ $.i18n().locale ] || $.i18n.languages[ 'default' ];\n\t\t\tif ( message === '' ) {\n\t\t\t\tmessage = key;\n\t\t\t}\n\t\t\treturn this.parser.parse( message, parameters );\n\t\t}\n\t};\n\n\t/**\n\t * Process a message from the $.I18N instance\n\t * for the current document, stored in jQuery.data(document).\n\t *\n\t * @param {string} key Key of the message.\n\t * @param {string} param1 [param...] Variadic list of parameters for {key}.\n\t * @return {string|$.I18N} Parsed message, or if no key was given\n\t * the instance of $.I18N is returned.\n\t */\n\t$.i18n = function ( key, param1 ) {\n\t\tvar parameters,\n\t\t\ti18n = $.data( document, 'i18n' ),\n\t\t\toptions = typeof key === 'object' && key;\n\n\t\t// If the locale option for this call is different then the setup so far,\n\t\t// update it automatically. This doesn't just change the context for this\n\t\t// call but for all future call as well.\n\t\t// If there is no i18n setup yet, don't do this. It will be taken care of\n\t\t// by the `new I18N` construction below.\n\t\t// NOTE: It should only change language for this one call.\n\t\t// Then cache instances of I18N somewhere.\n\t\tif ( options && options.locale && i18n && i18n.locale !== options.locale ) {\n\t\t\ti18n.locale = options.locale;\n\t\t}\n\n\t\tif ( !i18n ) {\n\t\t\ti18n = new I18N( options );\n\t\t\t$.data( document, 'i18n', i18n );\n\t\t}\n\n\t\tif ( typeof key === 'string' ) {\n\t\t\tif ( param1 !== undefined ) {\n\t\t\t\tparameters = slice.call( arguments, 1 );\n\t\t\t} else {\n\t\t\t\tparameters = [];\n\t\t\t}\n\n\t\t\treturn i18n.parse( key, parameters );\n\t\t} else {\n\t\t\t// FIXME: remove this feature/bug.\n\t\t\treturn i18n;\n\t\t}\n\t};\n\n\t$.fn.i18n = function () {\n\t\tvar i18n = $.data( document, 'i18n' );\n\n\t\tif ( !i18n ) {\n\t\t\ti18n = new I18N();\n\t\t\t$.data( document, 'i18n', i18n );\n\t\t}\n\n\t\treturn this.each( function () {\n\t\t\tvar $this = $( this ),\n\t\t\t\tmessageKey = $this.data( 'i18n' ),\n\t\t\t\tlBracket, rBracket, type, key;\n\n\t\t\tif ( messageKey ) {\n\t\t\t\tlBracket = messageKey.indexOf( '[' );\n\t\t\t\trBracket = messageKey.indexOf( ']' );\n\t\t\t\tif ( lBracket !== -1 && rBracket !== -1 && lBracket < rBracket ) {\n\t\t\t\t\ttype = messageKey.slice( lBracket + 1, rBracket );\n\t\t\t\t\tkey = messageKey.slice( rBracket + 1 );\n\t\t\t\t\tif ( type === 'html' ) {\n\t\t\t\t\t\t$this.html( i18n.parse( key ) );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this.attr( type, i18n.parse( key ) );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$this.text( i18n.parse( messageKey ) );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this.find( '[data-i18n]' ).i18n();\n\t\t\t}\n\t\t} );\n\t};\n\n\tfunction getDefaultLocale() {\n\t\tvar nav, locale = $( 'html' ).attr( 'lang' );\n\n\t\tif ( !locale ) {\n\t\t\tif ( typeof window.navigator !== undefined ) {\n\t\t\t\tnav = window.navigator;\n\t\t\t\tlocale = nav.language || nav.userLanguage || '';\n\t\t\t} else {\n\t\t\t\tlocale = '';\n\t\t\t}\n\t\t}\n\t\treturn locale;\n\t}\n\n\t$.i18n.languages = {};\n\t$.i18n.messageStore = $.i18n.messageStore || {};\n\t$.i18n.parser = {\n\t\t// The default parser only handles variable substitution\n\t\tparse: function ( message, parameters ) {\n\t\t\treturn message.replace( /\\$(\\d+)/g, function ( str, match ) {\n\t\t\t\tvar index = parseInt( match, 10 ) - 1;\n\t\t\t\treturn parameters[ index ] !== undefined ? parameters[ index ] : '$' + match;\n\t\t\t} );\n\t\t},\n\t\temitter: {}\n\t};\n\t$.i18n.fallbacks = {};\n\t$.i18n.debug = false;\n\t$.i18n.log = function ( /* arguments */ ) {\n\t\tif ( window.console && $.i18n.debug ) {\n\t\t\twindow.console.log.apply( window.console, arguments );\n\t\t}\n\t};\n\t/* Static members */\n\tI18N.defaults = {\n\t\tlocale: getDefaultLocale(),\n\t\tfallbackLocale: 'en',\n\t\tparser: $.i18n.parser,\n\t\tmessageStore: $.i18n.messageStore\n\t};\n\n\t// Expose constructor\n\t$.i18n.constructor = I18N;\n}( jQuery ) );","/* global pluralRuleParser */\n( function ( $ ) {\n\t'use strict';\n\n\t// jscs:disable\n\tvar language = {\n\t\t// CLDR plural rules generated using\n\t\t// libs/CLDRPluralRuleParser/tools/PluralXML2JSON.html\n\t\tpluralRules: {\n\t\t\tak: {\n\t\t\t\tone: 'n = 0..1'\n\t\t\t},\n\t\t\tam: {\n\t\t\t\tone: 'i = 0 or n = 1'\n\t\t\t},\n\t\t\tar: {\n\t\t\t\tzero: 'n = 0',\n\t\t\t\tone: 'n = 1',\n\t\t\t\ttwo: 'n = 2',\n\t\t\t\tfew: 'n % 100 = 3..10',\n\t\t\t\tmany: 'n % 100 = 11..99'\n\t\t\t},\n\t\t\tars: {\n\t\t\t\tzero: 'n = 0',\n\t\t\t\tone: 'n = 1',\n\t\t\t\ttwo: 'n = 2',\n\t\t\t\tfew: 'n % 100 = 3..10',\n\t\t\t\tmany: 'n % 100 = 11..99'\n\t\t\t},\n\t\t\tas: {\n\t\t\t\tone: 'i = 0 or n = 1'\n\t\t\t},\n\t\t\tbe: {\n\t\t\t\tone: 'n % 10 = 1 and n % 100 != 11',\n\t\t\t\tfew: 'n % 10 = 2..4 and n % 100 != 12..14',\n\t\t\t\tmany: 'n % 10 = 0 or n % 10 = 5..9 or n % 100 = 11..14'\n\t\t\t},\n\t\t\tbh: {\n\t\t\t\tone: 'n = 0..1'\n\t\t\t},\n\t\t\tbn: {\n\t\t\t\tone: 'i = 0 or n = 1'\n\t\t\t},\n\t\t\tbr: {\n\t\t\t\tone: 'n % 10 = 1 and n % 100 != 11,71,91',\n\t\t\t\ttwo: 'n % 10 = 2 and n % 100 != 12,72,92',\n\t\t\t\tfew: 'n % 10 = 3..4,9 and n % 100 != 10..19,70..79,90..99',\n\t\t\t\tmany: 'n != 0 and n % 1000000 = 0'\n\t\t\t},\n\t\t\tbs: {\n\t\t\t\tone: 'v = 0 and i % 10 = 1 and i % 100 != 11 or f % 10 = 1 and f % 100 != 11',\n\t\t\t\tfew: 'v = 0 and i % 10 = 2..4 and i % 100 != 12..14 or f % 10 = 2..4 and f % 100 != 12..14'\n\t\t\t},\n\t\t\tcs: {\n\t\t\t\tone: 'i = 1 and v = 0',\n\t\t\t\tfew: 'i = 2..4 and v = 0',\n\t\t\t\tmany: 'v != 0'\n\t\t\t},\n\t\t\tcy: {\n\t\t\t\tzero: 'n = 0',\n\t\t\t\tone: 'n = 1',\n\t\t\t\ttwo: 'n = 2',\n\t\t\t\tfew: 'n = 3',\n\t\t\t\tmany: 'n = 6'\n\t\t\t},\n\t\t\tda: {\n\t\t\t\tone: 'n = 1 or t != 0 and i = 0,1'\n\t\t\t},\n\t\t\tdsb: {\n\t\t\t\tone: 'v = 0 and i % 100 = 1 or f % 100 = 1',\n\t\t\t\ttwo: 'v = 0 and i % 100 = 2 or f % 100 = 2',\n\t\t\t\tfew: 'v = 0 and i % 100 = 3..4 or f % 100 = 3..4'\n\t\t\t},\n\t\t\tfa: {\n\t\t\t\tone: 'i = 0 or n = 1'\n\t\t\t},\n\t\t\tff: {\n\t\t\t\tone: 'i = 0,1'\n\t\t\t},\n\t\t\tfil: {\n\t\t\t\tone: 'v = 0 and i = 1,2,3 or v = 0 and i % 10 != 4,6,9 or v != 0 and f % 10 != 4,6,9'\n\t\t\t},\n\t\t\tfr: {\n\t\t\t\tone: 'i = 0,1'\n\t\t\t},\n\t\t\tga: {\n\t\t\t\tone: 'n = 1',\n\t\t\t\ttwo: 'n = 2',\n\t\t\t\tfew: 'n = 3..6',\n\t\t\t\tmany: 'n = 7..10'\n\t\t\t},\n\t\t\tgd: {\n\t\t\t\tone: 'n = 1,11',\n\t\t\t\ttwo: 'n = 2,12',\n\t\t\t\tfew: 'n = 3..10,13..19'\n\t\t\t},\n\t\t\tgu: {\n\t\t\t\tone: 'i = 0 or n = 1'\n\t\t\t},\n\t\t\tguw: {\n\t\t\t\tone: 'n = 0..1'\n\t\t\t},\n\t\t\tgv: {\n\t\t\t\tone: 'v = 0 and i % 10 = 1',\n\t\t\t\ttwo: 'v = 0 and i % 10 = 2',\n\t\t\t\tfew: 'v = 0 and i % 100 = 0,20,40,60,80',\n\t\t\t\tmany: 'v != 0'\n\t\t\t},\n\t\t\the: {\n\t\t\t\tone: 'i = 1 and v = 0',\n\t\t\t\ttwo: 'i = 2 and v = 0',\n\t\t\t\tmany: 'v = 0 and n != 0..10 and n % 10 = 0'\n\t\t\t},\n\t\t\thi: {\n\t\t\t\tone: 'i = 0 or n = 1'\n\t\t\t},\n\t\t\thr: {\n\t\t\t\tone: 'v = 0 and i % 10 = 1 and i % 100 != 11 or f % 10 = 1 and f % 100 != 11',\n\t\t\t\tfew: 'v = 0 and i % 10 = 2..4 and i % 100 != 12..14 or f % 10 = 2..4 and f % 100 != 12..14'\n\t\t\t},\n\t\t\thsb: {\n\t\t\t\tone: 'v = 0 and i % 100 = 1 or f % 100 = 1',\n\t\t\t\ttwo: 'v = 0 and i % 100 = 2 or f % 100 = 2',\n\t\t\t\tfew: 'v = 0 and i % 100 = 3..4 or f % 100 = 3..4'\n\t\t\t},\n\t\t\thy: {\n\t\t\t\tone: 'i = 0,1'\n\t\t\t},\n\t\t\tis: {\n\t\t\t\tone: 't = 0 and i % 10 = 1 and i % 100 != 11 or t != 0'\n\t\t\t},\n\t\t\tiu: {\n\t\t\t\tone: 'n = 1',\n\t\t\t\ttwo: 'n = 2'\n\t\t\t},\n\t\t\tiw: {\n\t\t\t\tone: 'i = 1 and v = 0',\n\t\t\t\ttwo: 'i = 2 and v = 0',\n\t\t\t\tmany: 'v = 0 and n != 0..10 and n % 10 = 0'\n\t\t\t},\n\t\t\tkab: {\n\t\t\t\tone: 'i = 0,1'\n\t\t\t},\n\t\t\tkn: {\n\t\t\t\tone: 'i = 0 or n = 1'\n\t\t\t},\n\t\t\tkw: {\n\t\t\t\tone: 'n = 1',\n\t\t\t\ttwo: 'n = 2'\n\t\t\t},\n\t\t\tlag: {\n\t\t\t\tzero: 'n = 0',\n\t\t\t\tone: 'i = 0,1 and n != 0'\n\t\t\t},\n\t\t\tln: {\n\t\t\t\tone: 'n = 0..1'\n\t\t\t},\n\t\t\tlt: {\n\t\t\t\tone: 'n % 10 = 1 and n % 100 != 11..19',\n\t\t\t\tfew: 'n % 10 = 2..9 and n % 100 != 11..19',\n\t\t\t\tmany: 'f != 0'\n\t\t\t},\n\t\t\tlv: {\n\t\t\t\tzero: 'n % 10 = 0 or n % 100 = 11..19 or v = 2 and f % 100 = 11..19',\n\t\t\t\tone: 'n % 10 = 1 and n % 100 != 11 or v = 2 and f % 10 = 1 and f % 100 != 11 or v != 2 and f % 10 = 1'\n\t\t\t},\n\t\t\tmg: {\n\t\t\t\tone: 'n = 0..1'\n\t\t\t},\n\t\t\tmk: {\n\t\t\t\tone: 'v = 0 and i % 10 = 1 or f % 10 = 1'\n\t\t\t},\n\t\t\tmo: {\n\t\t\t\tone: 'i = 1 and v = 0',\n\t\t\t\tfew: 'v != 0 or n = 0 or n != 1 and n % 100 = 1..19'\n\t\t\t},\n\t\t\tmr: {\n\t\t\t\tone: 'i = 0 or n = 1'\n\t\t\t},\n\t\t\tmt: {\n\t\t\t\tone: 'n = 1',\n\t\t\t\tfew: 'n = 0 or n % 100 = 2..10',\n\t\t\t\tmany: 'n % 100 = 11..19'\n\t\t\t},\n\t\t\tnaq: {\n\t\t\t\tone: 'n = 1',\n\t\t\t\ttwo: 'n = 2'\n\t\t\t},\n\t\t\tnso: {\n\t\t\t\tone: 'n = 0..1'\n\t\t\t},\n\t\t\tpa: {\n\t\t\t\tone: 'n = 0..1'\n\t\t\t},\n\t\t\tpl: {\n\t\t\t\tone: 'i = 1 and v = 0',\n\t\t\t\tfew: 'v = 0 and i % 10 = 2..4 and i % 100 != 12..14',\n\t\t\t\tmany: 'v = 0 and i != 1 and i % 10 = 0..1 or v = 0 and i % 10 = 5..9 or v = 0 and i % 100 = 12..14'\n\t\t\t},\n\t\t\tprg: {\n\t\t\t\tzero: 'n % 10 = 0 or n % 100 = 11..19 or v = 2 and f % 100 = 11..19',\n\t\t\t\tone: 'n % 10 = 1 and n % 100 != 11 or v = 2 and f % 10 = 1 and f % 100 != 11 or v != 2 and f % 10 = 1'\n\t\t\t},\n\t\t\tpt: {\n\t\t\t\tone: 'i = 0..1'\n\t\t\t},\n\t\t\tro: {\n\t\t\t\tone: 'i = 1 and v = 0',\n\t\t\t\tfew: 'v != 0 or n = 0 or n != 1 and n % 100 = 1..19'\n\t\t\t},\n\t\t\tru: {\n\t\t\t\tone: 'v = 0 and i % 10 = 1 and i % 100 != 11',\n\t\t\t\tfew: 'v = 0 and i % 10 = 2..4 and i % 100 != 12..14',\n\t\t\t\tmany: 'v = 0 and i % 10 = 0 or v = 0 and i % 10 = 5..9 or v = 0 and i % 100 = 11..14'\n\t\t\t},\n\t\t\tse: {\n\t\t\t\tone: 'n = 1',\n\t\t\t\ttwo: 'n = 2'\n\t\t\t},\n\t\t\tsh: {\n\t\t\t\tone: 'v = 0 and i % 10 = 1 and i % 100 != 11 or f % 10 = 1 and f % 100 != 11',\n\t\t\t\tfew: 'v = 0 and i % 10 = 2..4 and i % 100 != 12..14 or f % 10 = 2..4 and f % 100 != 12..14'\n\t\t\t},\n\t\t\tshi: {\n\t\t\t\tone: 'i = 0 or n = 1',\n\t\t\t\tfew: 'n = 2..10'\n\t\t\t},\n\t\t\tsi: {\n\t\t\t\tone: 'n = 0,1 or i = 0 and f = 1'\n\t\t\t},\n\t\t\tsk: {\n\t\t\t\tone: 'i = 1 and v = 0',\n\t\t\t\tfew: 'i = 2..4 and v = 0',\n\t\t\t\tmany: 'v != 0'\n\t\t\t},\n\t\t\tsl: {\n\t\t\t\tone: 'v = 0 and i % 100 = 1',\n\t\t\t\ttwo: 'v = 0 and i % 100 = 2',\n\t\t\t\tfew: 'v = 0 and i % 100 = 3..4 or v != 0'\n\t\t\t},\n\t\t\tsma: {\n\t\t\t\tone: 'n = 1',\n\t\t\t\ttwo: 'n = 2'\n\t\t\t},\n\t\t\tsmi: {\n\t\t\t\tone: 'n = 1',\n\t\t\t\ttwo: 'n = 2'\n\t\t\t},\n\t\t\tsmj: {\n\t\t\t\tone: 'n = 1',\n\t\t\t\ttwo: 'n = 2'\n\t\t\t},\n\t\t\tsmn: {\n\t\t\t\tone: 'n = 1',\n\t\t\t\ttwo: 'n = 2'\n\t\t\t},\n\t\t\tsms: {\n\t\t\t\tone: 'n = 1',\n\t\t\t\ttwo: 'n = 2'\n\t\t\t},\n\t\t\tsr: {\n\t\t\t\tone: 'v = 0 and i % 10 = 1 and i % 100 != 11 or f % 10 = 1 and f % 100 != 11',\n\t\t\t\tfew: 'v = 0 and i % 10 = 2..4 and i % 100 != 12..14 or f % 10 = 2..4 and f % 100 != 12..14'\n\t\t\t},\n\t\t\tti: {\n\t\t\t\tone: 'n = 0..1'\n\t\t\t},\n\t\t\ttl: {\n\t\t\t\tone: 'v = 0 and i = 1,2,3 or v = 0 and i % 10 != 4,6,9 or v != 0 and f % 10 != 4,6,9'\n\t\t\t},\n\t\t\ttzm: {\n\t\t\t\tone: 'n = 0..1 or n = 11..99'\n\t\t\t},\n\t\t\tuk: {\n\t\t\t\tone: 'v = 0 and i % 10 = 1 and i % 100 != 11',\n\t\t\t\tfew: 'v = 0 and i % 10 = 2..4 and i % 100 != 12..14',\n\t\t\t\tmany: 'v = 0 and i % 10 = 0 or v = 0 and i % 10 = 5..9 or v = 0 and i % 100 = 11..14'\n\t\t\t},\n\t\t\twa: {\n\t\t\t\tone: 'n = 0..1'\n\t\t\t},\n\t\t\tzu: {\n\t\t\t\tone: 'i = 0 or n = 1'\n\t\t\t}\n\t\t},\n\t\t// jscs:enable\n\n\t\t/**\n\t\t * Plural form transformations, needed for some languages.\n\t\t *\n\t\t * @param {integer} count\n\t\t * Non-localized quantifier\n\t\t * @param {Array} forms\n\t\t * List of plural forms\n\t\t * @return {string} Correct form for quantifier in this language\n\t\t */\n\t\tconvertPlural: function ( count, forms ) {\n\t\t\tvar pluralRules,\n\t\t\t\tpluralFormIndex,\n\t\t\t\tindex,\n\t\t\t\texplicitPluralPattern = new RegExp( '\\\\d+=', 'i' ),\n\t\t\t\tformCount,\n\t\t\t\tform;\n\n\t\t\tif ( !forms || forms.length === 0 ) {\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\t// Handle for Explicit 0= & 1= values\n\t\t\tfor ( index = 0; index < forms.length; index++ ) {\n\t\t\t\tform = forms[ index ];\n\t\t\t\tif ( explicitPluralPattern.test( form ) ) {\n\t\t\t\t\tformCount = parseInt( form.slice( 0, form.indexOf( '=' ) ), 10 );\n\t\t\t\t\tif ( formCount === count ) {\n\t\t\t\t\t\treturn ( form.slice( form.indexOf( '=' ) + 1 ) );\n\t\t\t\t\t}\n\t\t\t\t\tforms[ index ] = undefined;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tforms = $.map( forms, function ( form ) {\n\t\t\t\tif ( form !== undefined ) {\n\t\t\t\t\treturn form;\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tpluralRules = this.pluralRules[ $.i18n().locale ];\n\n\t\t\tif ( !pluralRules ) {\n\t\t\t\t// default fallback.\n\t\t\t\treturn ( count === 1 ) ? forms[ 0 ] : forms[ 1 ];\n\t\t\t}\n\n\t\t\tpluralFormIndex = this.getPluralForm( count, pluralRules );\n\t\t\tpluralFormIndex = Math.min( pluralFormIndex, forms.length - 1 );\n\n\t\t\treturn forms[ pluralFormIndex ];\n\t\t},\n\n\t\t/**\n\t\t * For the number, get the plural for index\n\t\t *\n\t\t * @param {integer} number\n\t\t * @param {Object} pluralRules\n\t\t * @return {integer} plural form index\n\t\t */\n\t\tgetPluralForm: function ( number, pluralRules ) {\n\t\t\tvar i,\n\t\t\t\tpluralForms = [ 'zero', 'one', 'two', 'few', 'many', 'other' ],\n\t\t\t\tpluralFormIndex = 0;\n\n\t\t\tfor ( i = 0; i < pluralForms.length; i++ ) {\n\t\t\t\tif ( pluralRules[ pluralForms[ i ] ] ) {\n\t\t\t\t\tif ( pluralRuleParser( pluralRules[ pluralForms[ i ] ], number ) ) {\n\t\t\t\t\t\treturn pluralFormIndex;\n\t\t\t\t\t}\n\n\t\t\t\t\tpluralFormIndex++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn pluralFormIndex;\n\t\t},\n\n\t\t/**\n\t\t * Converts a number using digitTransformTable.\n\t\t *\n\t\t * @param {number} num Value to be converted\n\t\t * @param {boolean} integer Convert the return value to an integer\n\t\t * @return {string} The number converted into a String.\n\t\t */\n\t\tconvertNumber: function ( num, integer ) {\n\t\t\tvar tmp, item, i,\n\t\t\t\ttransformTable, numberString, convertedNumber;\n\n\t\t\t// Set the target Transform table:\n\t\t\ttransformTable = this.digitTransformTable( $.i18n().locale );\n\t\t\tnumberString = String( num );\n\t\t\tconvertedNumber = '';\n\n\t\t\tif ( !transformTable ) {\n\t\t\t\treturn num;\n\t\t\t}\n\n\t\t\t// Check if the restore to Latin number flag is set:\n\t\t\tif ( integer ) {\n\t\t\t\tif ( parseFloat( num, 10 ) === num ) {\n\t\t\t\t\treturn num;\n\t\t\t\t}\n\n\t\t\t\ttmp = [];\n\n\t\t\t\tfor ( item in transformTable ) {\n\t\t\t\t\ttmp[ transformTable[ item ] ] = item;\n\t\t\t\t}\n\n\t\t\t\ttransformTable = tmp;\n\t\t\t}\n\n\t\t\tfor ( i = 0; i < numberString.length; i++ ) {\n\t\t\t\tif ( transformTable[ numberString[ i ] ] ) {\n\t\t\t\t\tconvertedNumber += transformTable[ numberString[ i ] ];\n\t\t\t\t} else {\n\t\t\t\t\tconvertedNumber += numberString[ i ];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn integer ? parseFloat( convertedNumber, 10 ) : convertedNumber;\n\t\t},\n\n\t\t/**\n\t\t * Grammatical transformations, needed for inflected languages.\n\t\t * Invoked by putting {{grammar:form|word}} in a message.\n\t\t * Override this method for languages that need special grammar rules\n\t\t * applied dynamically.\n\t\t *\n\t\t * @param {string} word\n\t\t * @param {string} form\n\t\t * @return {string}\n\t\t */\n\t\t// eslint-disable-next-line no-unused-vars\n\t\tconvertGrammar: function ( word, form ) {\n\t\t\treturn word;\n\t\t},\n\n\t\t/**\n\t\t * Provides an alternative text depending on specified gender. Usage\n\t\t * {{gender:[gender|user object]|masculine|feminine|neutral}}. If second\n\t\t * or third parameter are not specified, masculine is used.\n\t\t *\n\t\t * These details may be overriden per language.\n\t\t *\n\t\t * @param {string} gender\n\t\t * male, female, or anything else for neutral.\n\t\t * @param {Array} forms\n\t\t * List of gender forms\n\t\t *\n\t\t * @return {string}\n\t\t */\n\t\tgender: function ( gender, forms ) {\n\t\t\tif ( !forms || forms.length === 0 ) {\n\t\t\t\treturn '';\n\t\t\t}\n\n\t\t\twhile ( forms.length < 2 ) {\n\t\t\t\tforms.push( forms[ forms.length - 1 ] );\n\t\t\t}\n\n\t\t\tif ( gender === 'male' ) {\n\t\t\t\treturn forms[ 0 ];\n\t\t\t}\n\n\t\t\tif ( gender === 'female' ) {\n\t\t\t\treturn forms[ 1 ];\n\t\t\t}\n\n\t\t\treturn ( forms.length === 3 ) ? forms[ 2 ] : forms[ 0 ];\n\t\t},\n\n\t\t/**\n\t\t * Get the digit transform table for the given language\n\t\t * See http://cldr.unicode.org/translation/numbering-systems\n\t\t *\n\t\t * @param {string} language\n\t\t * @return {Array|boolean} List of digits in the passed language or false\n\t\t * representation, or boolean false if there is no information.\n\t\t */\n\t\tdigitTransformTable: function ( language ) {\n\t\t\tvar tables = {\n\t\t\t\tar: '٠١٢٣٤٥٦٧٨٩',\n\t\t\t\tfa: '۰۱۲۳۴۵۶۷۸۹',\n\t\t\t\tml: '൦൧൨൩൪൫൬൭൮൯',\n\t\t\t\tkn: '೦೧೨೩೪೫೬೭೮೯',\n\t\t\t\tlo: '໐໑໒໓໔໕໖໗໘໙',\n\t\t\t\tor: '୦୧୨୩୪୫୬୭୮୯',\n\t\t\t\tkh: '០១២៣៤៥៦៧៨៩',\n\t\t\t\tpa: '੦੧੨੩੪੫੬੭੮੯',\n\t\t\t\tgu: '૦૧૨૩૪૫૬૭૮૯',\n\t\t\t\thi: '०१२३४५६७८९',\n\t\t\t\tmy: '၀၁၂၃၄၅၆၇၈၉',\n\t\t\t\tta: '௦௧௨௩௪௫௬௭௮௯',\n\t\t\t\tte: '౦౧౨౩౪౫౬౭౮౯',\n\t\t\t\tth: '๐๑๒๓๔๕๖๗๘๙', // FIXME use iso 639 codes\n\t\t\t\tbo: '༠༡༢༣༤༥༦༧༨༩' // FIXME use iso 639 codes\n\t\t\t};\n\n\t\t\tif ( !tables[ language ] ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn tables[ language ].split( '' );\n\t\t}\n\t};\n\n\t$.extend( $.i18n.languages, {\n\t\t'default': language\n\t} );\n}( jQuery ) );\n","/*!\n * jQuery Internationalization library - Message Store\n *\n * Copyright (C) 2012 Santhosh Thottingal\n *\n * jquery.i18n is dual licensed GPLv2 or later and MIT. You don't have to do anything special to\n * choose one license or the other and you don't have to notify anyone which license you are using.\n * You are free to use UniversalLanguageSelector in commercial projects as long as the copyright\n * header is left intact. See files GPL-LICENSE and MIT-LICENSE for details.\n *\n * @licence GNU General Public Licence 2.0 or later\n * @licence MIT License\n */\n\n( function ( $ ) {\n\t'use strict';\n\n\tvar MessageStore = function () {\n\t\tthis.messages = {};\n\t\tthis.sources = {};\n\t};\n\n\tfunction jsonMessageLoader( url ) {\n\t\tvar deferred = $.Deferred();\n\n\t\t$.getJSON( url )\n\t\t\t.done( deferred.resolve )\n\t\t\t.fail( function ( jqxhr, settings, exception ) {\n\t\t\t\t$.i18n.log( 'Error in loading messages from ' + url + ' Exception: ' + exception );\n\t\t\t\t// Ignore 404 exception, because we are handling fallabacks explicitly\n\t\t\t\tdeferred.resolve();\n\t\t\t} );\n\n\t\treturn deferred.promise();\n\t}\n\n\t/**\n\t * See https://github.com/wikimedia/jquery.i18n/wiki/Specification#wiki-Message_File_Loading\n\t */\n\tMessageStore.prototype = {\n\n\t\t/**\n\t\t * General message loading API This can take a URL string for\n\t\t * the json formatted messages.\n\t\t * load('path/to/all_localizations.json');\n\t\t *\n\t\t * This can also load a localization file for a locale \n\t\t * load( 'path/to/de-messages.json', 'de' );\n\t\t * \n\t\t * A data object containing message key- message translation mappings\n\t\t * can also be passed Eg:\n\t\t * \n\t\t * load( { 'hello' : 'Hello' }, optionalLocale );\n\t\t * If the data argument is\n\t\t * null/undefined/false,\n\t\t * all cached messages for the i18n instance will get reset.\n\t\t *\n\t\t * @param {string|Object} source\n\t\t * @param {string} locale Language tag\n\t\t * @return {jQuery.Promise}\n\t\t */\n\t\tload: function ( source, locale ) {\n\t\t\tvar key = null,\n\t\t\t\tdeferred = null,\n\t\t\t\tdeferreds = [],\n\t\t\t\tmessageStore = this;\n\n\t\t\tif ( typeof source === 'string' ) {\n\t\t\t\t// This is a URL to the messages file.\n\t\t\t\t$.i18n.log( 'Loading messages from: ' + source );\n\t\t\t\tdeferred = jsonMessageLoader( source )\n\t\t\t\t\t.done( function ( localization ) {\n\t\t\t\t\t\tmessageStore.set( locale, localization );\n\t\t\t\t\t} );\n\n\t\t\t\treturn deferred.promise();\n\t\t\t}\n\n\t\t\tif ( locale ) {\n\t\t\t\t// source is an key-value pair of messages for given locale\n\t\t\t\tmessageStore.set( locale, source );\n\n\t\t\t\treturn $.Deferred().resolve();\n\t\t\t} else {\n\t\t\t\t// source is a key-value pair of locales and their source\n\t\t\t\tfor ( key in source ) {\n\t\t\t\t\tif ( Object.prototype.hasOwnProperty.call( source, key ) ) {\n\t\t\t\t\t\tlocale = key;\n\t\t\t\t\t\t// No {locale} given, assume data is a group of languages,\n\t\t\t\t\t\t// call this function again for each language.\n\t\t\t\t\t\tdeferreds.push( messageStore.load( source[ key ], locale ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn $.when.apply( $, deferreds );\n\t\t\t}\n\n\t\t},\n\n\t\t/**\n\t\t * Set messages to the given locale.\n\t\t * If locale exists, add messages to the locale.\n\t\t *\n\t\t * @param {string} locale\n\t\t * @param {Object} messages\n\t\t */\n\t\tset: function ( locale, messages ) {\n\t\t\tif ( !this.messages[ locale ] ) {\n\t\t\t\tthis.messages[ locale ] = messages;\n\t\t\t} else {\n\t\t\t\tthis.messages[ locale ] = $.extend( this.messages[ locale ], messages );\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t *\n\t\t * @param {string} locale\n\t\t * @param {string} messageKey\n\t\t * @return {boolean}\n\t\t */\n\t\tget: function ( locale, messageKey ) {\n\t\t\treturn this.messages[ locale ] && this.messages[ locale ][ messageKey ];\n\t\t}\n\t};\n\n\t$.extend( $.i18n.messageStore, new MessageStore() );\n}( jQuery ) );\n","/*!\n * jQuery Internationalization library\n *\n * Copyright (C) 2011-2013 Santhosh Thottingal, Neil Kandalgaonkar\n *\n * jquery.i18n is dual licensed GPLv2 or later and MIT. You don't have to do\n * anything special to choose one license or the other and you don't have to\n * notify anyone which license you are using. You are free to use\n * UniversalLanguageSelector in commercial projects as long as the copyright\n * header is left intact. See files GPL-LICENSE and MIT-LICENSE for details.\n *\n * @licence GNU General Public Licence 2.0 or later\n * @licence MIT License\n */\n\n( function ( $ ) {\n\t'use strict';\n\n\tvar MessageParser = function ( options ) {\n\t\tthis.options = $.extend( {}, $.i18n.parser.defaults, options );\n\t\tthis.language = $.i18n.languages[ String.locale ] || $.i18n.languages[ 'default' ];\n\t\tthis.emitter = $.i18n.parser.emitter;\n\t};\n\n\tMessageParser.prototype = {\n\n\t\tconstructor: MessageParser,\n\n\t\tsimpleParse: function ( message, parameters ) {\n\t\t\treturn message.replace( /\\$(\\d+)/g, function ( str, match ) {\n\t\t\t\tvar index = parseInt( match, 10 ) - 1;\n\n\t\t\t\treturn parameters[ index ] !== undefined ? parameters[ index ] : '$' + match;\n\t\t\t} );\n\t\t},\n\n\t\tparse: function ( message, replacements ) {\n\t\t\tif ( message.indexOf( '{{' ) < 0 ) {\n\t\t\t\treturn this.simpleParse( message, replacements );\n\t\t\t}\n\n\t\t\tthis.emitter.language = $.i18n.languages[ $.i18n().locale ] ||\n\t\t\t\t$.i18n.languages[ 'default' ];\n\n\t\t\treturn this.emitter.emit( this.ast( message ), replacements );\n\t\t},\n\n\t\tast: function ( message ) {\n\t\t\tvar pipe, colon, backslash, anyCharacter, dollar, digits, regularLiteral,\n\t\t\t\tregularLiteralWithoutBar, regularLiteralWithoutSpace, escapedOrLiteralWithoutBar,\n\t\t\t\tescapedOrRegularLiteral, templateContents, templateName, openTemplate,\n\t\t\t\tcloseTemplate, expression, paramExpression, result,\n\t\t\t\tpos = 0;\n\n\t\t\t// Try parsers until one works, if none work return null\n\t\t\tfunction choice( parserSyntax ) {\n\t\t\t\treturn function () {\n\t\t\t\t\tvar i, result;\n\n\t\t\t\t\tfor ( i = 0; i < parserSyntax.length; i++ ) {\n\t\t\t\t\t\tresult = parserSyntax[ i ]();\n\n\t\t\t\t\t\tif ( result !== null ) {\n\t\t\t\t\t\t\treturn result;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn null;\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// Try several parserSyntax-es in a row.\n\t\t\t// All must succeed; otherwise, return null.\n\t\t\t// This is the only eager one.\n\t\t\tfunction sequence( parserSyntax ) {\n\t\t\t\tvar i, res,\n\t\t\t\t\toriginalPos = pos,\n\t\t\t\t\tresult = [];\n\n\t\t\t\tfor ( i = 0; i < parserSyntax.length; i++ ) {\n\t\t\t\t\tres = parserSyntax[ i ]();\n\n\t\t\t\t\tif ( res === null ) {\n\t\t\t\t\t\tpos = originalPos;\n\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\n\t\t\t\t\tresult.push( res );\n\t\t\t\t}\n\n\t\t\t\treturn result;\n\t\t\t}\n\n\t\t\t// Run the same parser over and over until it fails.\n\t\t\t// Must succeed a minimum of n times; otherwise, return null.\n\t\t\tfunction nOrMore( n, p ) {\n\t\t\t\treturn function () {\n\t\t\t\t\tvar originalPos = pos,\n\t\t\t\t\t\tresult = [],\n\t\t\t\t\t\tparsed = p();\n\n\t\t\t\t\twhile ( parsed !== null ) {\n\t\t\t\t\t\tresult.push( parsed );\n\t\t\t\t\t\tparsed = p();\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( result.length < n ) {\n\t\t\t\t\t\tpos = originalPos;\n\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn result;\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// Helpers -- just make parserSyntax out of simpler JS builtin types\n\n\t\t\tfunction makeStringParser( s ) {\n\t\t\t\tvar len = s.length;\n\n\t\t\t\treturn function () {\n\t\t\t\t\tvar result = null;\n\n\t\t\t\t\tif ( message.slice( pos, pos + len ) === s ) {\n\t\t\t\t\t\tresult = s;\n\t\t\t\t\t\tpos += len;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn result;\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tfunction makeRegexParser( regex ) {\n\t\t\t\treturn function () {\n\t\t\t\t\tvar matches = message.slice( pos ).match( regex );\n\n\t\t\t\t\tif ( matches === null ) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\n\t\t\t\t\tpos += matches[ 0 ].length;\n\n\t\t\t\t\treturn matches[ 0 ];\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tpipe = makeStringParser( '|' );\n\t\t\tcolon = makeStringParser( ':' );\n\t\t\tbackslash = makeStringParser( '\\\\' );\n\t\t\tanyCharacter = makeRegexParser( /^./ );\n\t\t\tdollar = makeStringParser( '$' );\n\t\t\tdigits = makeRegexParser( /^\\d+/ );\n\t\t\tregularLiteral = makeRegexParser( /^[^{}[\\]$\\\\]/ );\n\t\t\tregularLiteralWithoutBar = makeRegexParser( /^[^{}[\\]$\\\\|]/ );\n\t\t\tregularLiteralWithoutSpace = makeRegexParser( /^[^{}[\\]$\\s]/ );\n\n\t\t\t// There is a general pattern:\n\t\t\t// parse a thing;\n\t\t\t// if it worked, apply transform,\n\t\t\t// otherwise return null.\n\t\t\t// But using this as a combinator seems to cause problems\n\t\t\t// when combined with nOrMore().\n\t\t\t// May be some scoping issue.\n\t\t\tfunction transform( p, fn ) {\n\t\t\t\treturn function () {\n\t\t\t\t\tvar result = p();\n\n\t\t\t\t\treturn result === null ? null : fn( result );\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// Used to define \"literals\" within template parameters. The pipe\n\t\t\t// character is the parameter delimeter, so by default\n\t\t\t// it is not a literal in the parameter\n\t\t\tfunction literalWithoutBar() {\n\t\t\t\tvar result = nOrMore( 1, escapedOrLiteralWithoutBar )();\n\n\t\t\t\treturn result === null ? null : result.join( '' );\n\t\t\t}\n\n\t\t\tfunction literal() {\n\t\t\t\tvar result = nOrMore( 1, escapedOrRegularLiteral )();\n\n\t\t\t\treturn result === null ? null : result.join( '' );\n\t\t\t}\n\n\t\t\tfunction escapedLiteral() {\n\t\t\t\tvar result = sequence( [ backslash, anyCharacter ] );\n\n\t\t\t\treturn result === null ? null : result[ 1 ];\n\t\t\t}\n\n\t\t\tchoice( [ escapedLiteral, regularLiteralWithoutSpace ] );\n\t\t\tescapedOrLiteralWithoutBar = choice( [ escapedLiteral, regularLiteralWithoutBar ] );\n\t\t\tescapedOrRegularLiteral = choice( [ escapedLiteral, regularLiteral ] );\n\n\t\t\tfunction replacement() {\n\t\t\t\tvar result = sequence( [ dollar, digits ] );\n\n\t\t\t\tif ( result === null ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\treturn [ 'REPLACE', parseInt( result[ 1 ], 10 ) - 1 ];\n\t\t\t}\n\n\t\t\ttemplateName = transform(\n\t\t\t\t// see $wgLegalTitleChars\n\t\t\t\t// not allowing : due to the need to catch \"PLURAL:$1\"\n\t\t\t\tmakeRegexParser( /^[ !\"$&'()*,./0-9;=?@A-Z^_`a-z~\\x80-\\xFF+-]+/ ),\n\n\t\t\t\tfunction ( result ) {\n\t\t\t\t\treturn result.toString();\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tfunction templateParam() {\n\t\t\t\tvar expr,\n\t\t\t\t\tresult = sequence( [ pipe, nOrMore( 0, paramExpression ) ] );\n\n\t\t\t\tif ( result === null ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\texpr = result[ 1 ];\n\n\t\t\t\t// use a \"CONCAT\" operator if there are multiple nodes,\n\t\t\t\t// otherwise return the first node, raw.\n\t\t\t\treturn expr.length > 1 ? [ 'CONCAT' ].concat( expr ) : expr[ 0 ];\n\t\t\t}\n\n\t\t\tfunction templateWithReplacement() {\n\t\t\t\tvar result = sequence( [ templateName, colon, replacement ] );\n\n\t\t\t\treturn result === null ? null : [ result[ 0 ], result[ 2 ] ];\n\t\t\t}\n\n\t\t\tfunction templateWithOutReplacement() {\n\t\t\t\tvar result = sequence( [ templateName, colon, paramExpression ] );\n\n\t\t\t\treturn result === null ? null : [ result[ 0 ], result[ 2 ] ];\n\t\t\t}\n\n\t\t\ttemplateContents = choice( [\n\t\t\t\tfunction () {\n\t\t\t\t\tvar res = sequence( [\n\t\t\t\t\t\t// templates can have placeholders for dynamic\n\t\t\t\t\t\t// replacement eg: {{PLURAL:$1|one car|$1 cars}}\n\t\t\t\t\t\t// or no placeholders eg:\n\t\t\t\t\t\t// {{GRAMMAR:genitive|{{SITENAME}}}\n\t\t\t\t\t\tchoice( [ templateWithReplacement, templateWithOutReplacement ] ),\n\t\t\t\t\t\tnOrMore( 0, templateParam )\n\t\t\t\t\t] );\n\n\t\t\t\t\treturn res === null ? null : res[ 0 ].concat( res[ 1 ] );\n\t\t\t\t},\n\t\t\t\tfunction () {\n\t\t\t\t\tvar res = sequence( [ templateName, nOrMore( 0, templateParam ) ] );\n\n\t\t\t\t\tif ( res === null ) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn [ res[ 0 ] ].concat( res[ 1 ] );\n\t\t\t\t}\n\t\t\t] );\n\n\t\t\topenTemplate = makeStringParser( '{{' );\n\t\t\tcloseTemplate = makeStringParser( '}}' );\n\n\t\t\tfunction template() {\n\t\t\t\tvar result = sequence( [ openTemplate, templateContents, closeTemplate ] );\n\n\t\t\t\treturn result === null ? null : result[ 1 ];\n\t\t\t}\n\n\t\t\texpression = choice( [ template, replacement, literal ] );\n\t\t\tparamExpression = choice( [ template, replacement, literalWithoutBar ] );\n\n\t\t\tfunction start() {\n\t\t\t\tvar result = nOrMore( 0, expression )();\n\n\t\t\t\tif ( result === null ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\treturn [ 'CONCAT' ].concat( result );\n\t\t\t}\n\n\t\t\tresult = start();\n\n\t\t\t/*\n\t\t\t * For success, the pos must have gotten to the end of the input\n\t\t\t * and returned a non-null.\n\t\t\t * n.b. This is part of language infrastructure, so we do not throw an\n\t\t\t * internationalizable message.\n\t\t\t */\n\t\t\tif ( result === null || pos !== message.length ) {\n\t\t\t\tthrow new Error( 'Parse error at position ' + pos.toString() + ' in input: ' + message );\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}\n\n\t};\n\n\t$.extend( $.i18n.parser, new MessageParser() );\n}( jQuery ) );","var codeExercises;\nvar presenterCssLink;\nvar presentModeInitialized = false;\n\nfunction presentToggle() {\n if (!presentModeInitialized) {\n presentModeSetup();\n presentModeInitialized = true;\n }\n let bod = $(\"body\");\n let presentClass = \"present\";\n let fullHeightClass = \"full-height\";\n let bottomClass = \"bottom\";\n if (bod.hasClass(presentClass)) {\n $(\"section *\")\n .not(\n \"h1, .presentation-title, .btn-presenter, .runestone, .runestone *, section, .pre, code\"\n )\n .removeClass(\"hidden\"); //show everything\n $(\"#completionButton\").removeClass(\"hidden\");\n bod.removeClass(presentClass);\n $(\".\" + fullHeightClass).removeClass(fullHeightClass);\n $(\".\" + bottomClass).removeClass(bottomClass);\n localStorage.setItem(\"presentMode\", \"text\");\n codeExercises.removeClass(\"hidden\");\n presenterCssLink.disabled = true; // disable present_mode.css\n } else {\n $(\"section *\")\n .not(\n \"h1, .presentation-title, .btn-presenter, .runestone, .runestone *, section, .pre, code\"\n )\n .addClass(\"hidden\"); // hide extraneous stuff\n $(\"#completionButton\").addClass(\"hidden\");\n bod.addClass(presentClass);\n bod.addClass(fullHeightClass);\n $(\"html\").addClass(fullHeightClass);\n $(\"section .runestone\").addClass(fullHeightClass);\n $(\".ac-caption\").addClass(bottomClass);\n localStorage.setItem(\"presentMode\", presentClass);\n // presenter_mode.css is loaded by webpack\n //loadPresenterCss(); // present_mode.css should only apply when in presenter mode.\n activateExercise();\n }\n}\n\nfunction loadPresenterCss() {\n presenterCssLink = document.createElement(\"link\");\n presenterCssLink.type = \"text/css\";\n presenterCssLink.href = \"../_static/presenter_mode.css\";\n presenterCssLink.rel = \"stylesheet\";\n document.getElementsByTagName(\"head\")[0].appendChild(presenterCssLink);\n}\n\nfunction presentModeSetup() {\n // moved this out of configure\n let dataComponent = $(\"[data-childcomponent]\");\n\n // this still leaves some things semi-messed up when you exit presenter mode.\n // but instructors will probably just learn to refresh the page.\n dataComponent.addClass(\"runestone\");\n dataComponent.parent().closest(\"div\").not(\"section\").addClass(\"runestone\");\n dataComponent.parent().closest(\"div\").css(\"max-width\", \"none\");\n\n dataComponent.each(function (index) {\n let me = $(this);\n $(this)\n .find(\".ac_code_div, .ac_output\")\n .wrapAll(\"
\");\n });\n\n codelensListener(500);\n $(\"section img\").wrap('
');\n codeExercises = $(\".runestone\").not(\".runestone .runestone\");\n // codeExercises.each(function(){\n $(\"h1\").before(\n \"
\\\n \\\n \\\n
\"\n );\n}\nfunction getActiveExercise() {\n return (active = codeExercises.filter(\".active\"));\n}\n\nfunction activateExercise(index) {\n if (typeof index == \"undefined\") {\n index = 0;\n }\n\n let active = getActiveExercise();\n\n if (codeExercises.length) {\n active.removeClass(\"active\");\n active = $(codeExercises[index]).addClass(\"active\");\n active.removeClass(\"hidden\");\n codeExercises.not(codeExercises.filter(\".active\")).addClass(\"hidden\");\n }\n}\n\nwindow.nextExercise = function() {\n let active = getActiveExercise();\n let nextIndex = codeExercises.index(active) + 1;\n if (nextIndex < codeExercises.length) {\n activateExercise(nextIndex);\n }\n}\n\nwindow.prevExercise = function() {\n let active = getActiveExercise();\n let prevIndex = codeExercises.index(active) - 1;\n if (prevIndex >= 0) {\n activateExercise(prevIndex);\n }\n}\n\nfunction configure() {\n let rightNav = $(\".navbar-right\");\n rightNav.prepend(\n \"\"\n );\n\n let modeSelect = $(\".mode-select\").change(presentToggle);\n}\n\nfunction codelensListener(duration) {\n // $(\".ExecutionVisualizer\").length ? configureCodelens() : setTimeout(codelensListener, duration);\n // configureCodelens();\n}\n\nfunction configureCodelens() {\n let acCodeTitle = document.createElement(\"h4\");\n acCodeTitle.textContent = \"Active Code Window\";\n let acCode = $(\".ac_code_div\");\n $(\".ac_code_div\").addClass(\"col-md-6\");\n acCode.prepend(acCodeTitle);\n\n acOutTitle = document.createElement(\"h4\");\n acOutTitle.textContent = \"Output Window\";\n let acOut = $(\".ac_output\").addClass(\"col-md-6\");\n $(\".ac_output\").prepend(acOutTitle);\n\n let sketchpadTitle = document.createElement(\"h4\");\n sketchpadTitle.textContent = \"Sketchpad\";\n let sketchpad = document.createElement(\"span\");\n $(sketchpad).addClass(\"sketchpad\");\n let sketchpadContainer = document.createElement(\"div\");\n $(sketchpadContainer).addClass(\"sketchpad-container\");\n sketchpadContainer.appendChild(sketchpadTitle);\n sketchpadContainer.appendChild(sketchpad);\n //$('.ac_output').append(sketchpadContainer);\n\n let visualizers = $(\".ExecutionVisualizer\");\n\n console.log(\"Econtainer: \", this.eContainer);\n\n $(\"[data-childcomponent]\").on(\"click\", \"button.row-mode\", function () {\n $(this).closest(\"[data-childcomponent]\").removeClass(\"card-mode\");\n $(this).closest(\"[data-childcomponent]\").addClass(\"row-mode\");\n $(this).next(\".card-mode\").removeClass(\"active-layout\");\n $(this).addClass(\"active-layout\");\n });\n\n $(\"[data-childcomponent]\").on(\"click\", \"button.card-mode\", function () {\n $(this).closest(\"[data-childcomponent]\").removeClass(\"row-mode\");\n $(this).closest(\"[data-childcomponent]\").addClass(\"card-mode\");\n $(this).prev(\".row-mode\").removeClass(\"active-layout\");\n $(this).addClass(\"active-layout\");\n });\n\n $(\"[data-childcomponent] .ac_section\").each(function () {\n $(this).prepend(\n '
'\n );\n });\n\n visualizers.each(function (index) {\n let me = $(this);\n let col1 = me.find(\"#vizLayoutTdFirst\");\n let col2 = me.find(\"#vizLayoutTdSecond\");\n let dataVis = me.find(\"#dataViz\");\n let stackHeapTable = me.find(\"#stackHeapTable\");\n let output = me.find(\"#progOutputs\");\n output.css(\"display\", \"block\");\n me.parent().prepend(\n \"
Example \" +\n (Number(index) + 1) +\n \"
\"\n );\n });\n\n acCode.each(function () {\n let section = $(this).closest(\".ac-block\").parent();\n console.log(section, section.length);\n section.append(sketchpadContainer);\n });\n\n $(\"button.card-mode\").click();\n\n let modeSelect = $(\".mode-select\");\n let mode = localStorage.getItem(\"presentMode\");\n if (mode == \"present\") {\n modeSelect.val(\"present\");\n modeSelect.change();\n }\n}\n\n$(document).on(\"runestone:login-complete\", function () {\n // if user is instructor, enable presenter mode\n if (eBookConfig.isInstructor) {\n configure();\n }\n});\n","import { runestone_import } from \"../../../webpack.index.js\";\n\nexport async function renderRunestoneComponent(\n componentSrc,\n whereDiv,\n moreOpts\n) {\n /**\n * The easy part is adding the componentSrc to the existing div.\n * The tedious part is calling the right functions to turn the\n * source into the actual component.\n */\n if (!componentSrc) {\n jQuery(`#${whereDiv}`).html(\n `

Sorry, no source is available for preview.

`\n );\n return;\n }\n let patt = /..\\/_images/g;\n componentSrc = componentSrc.replace(\n patt,\n `${eBookConfig.app}/books/published/${eBookConfig.basecourse}/_images`\n );\n jQuery(`#${whereDiv}`).html(componentSrc);\n\n if (typeof window.componentMap === \"undefined\") {\n window.componentMap = {};\n }\n\n let componentKind = $($(`#${whereDiv} [data-component]`)[0]).data(\n \"component\"\n );\n // Import the JavaScript for this component before proceeding.\n await runestone_import(componentKind);\n let opt = {};\n opt.orig = jQuery(`#${whereDiv} [data-component]`)[0];\n if (opt.orig) {\n opt.lang = $(opt.orig).data(\"lang\");\n opt.useRunestoneServices = true;\n opt.graderactive = false;\n opt.python3 = true;\n if (typeof moreOpts !== \"undefined\") {\n for (let key in moreOpts) {\n opt[key] = moreOpts[key];\n }\n }\n }\n\n if (typeof component_factory === \"undefined\") {\n alert(\"Error: Missing the component factory!\");\n } else {\n if (\n !window.component_factory[componentKind] &&\n !jQuery(`#${whereDiv}`).html()\n ) {\n jQuery(`#${whereDiv}`).html(\n `

Preview not available for ${componentKind}

`\n );\n } else {\n let res = window.component_factory[componentKind](opt);\n if (componentKind === \"activecode\") {\n if (moreOpts.multiGrader) {\n window.componentMap[\n `${moreOpts.gradingContainer} ${res.divid}`\n ] = res;\n } else {\n window.componentMap[res.divid] = res;\n }\n }\n }\n }\n}\n\nexport function createTimedComponent(componentSrc, moreOpts) {\n /* The important distinction is that the component does not really need to be rendered\n into the page, in fact, due to the async nature of getting the source the list of questions\n is made and the original html is replaced by the look of the exam.\n */\n\n let patt = /..\\/_images/g;\n componentSrc = componentSrc.replace(\n patt,\n `${eBookConfig.app}/books/published/${eBookConfig.basecourse}/_images`\n );\n\n let componentKind = $($(componentSrc).find(\"[data-component]\")[0]).data(\n \"component\"\n );\n\n let origId = $(componentSrc).find(\"[data-component]\").first().attr(\"id\");\n\n // Double check -- if the component source is not in the DOM, then briefly add it\n // and call the constructor.\n let hdiv;\n if (!document.getElementById(origId)) {\n hdiv = $(\"
\", {\n css: { display: \"none\" },\n }).appendTo(\"body\");\n hdiv.html(componentSrc);\n }\n // at this point hdiv is a jquery object\n\n let ret;\n let opts = {\n orig: document.getElementById(origId),\n timed: true,\n };\n if (typeof moreOpts !== \"undefined\") {\n for (let key in moreOpts) {\n opts[key] = moreOpts[key];\n }\n }\n\n if (componentKind in window.component_factory) {\n ret = window.component_factory[componentKind](opts);\n }\n\n let rdict = {};\n rdict.question = ret;\n return rdict;\n}\n\n// For integration with the React overhault of Pretext\n// 1. Disable the automatic instantiation at the end of each component.js\n// 2. react will search for all \".runestone\" and will call this function for each of them.\nexport async function renderOneComponent(rsDiv) {\n // Find the actual component inside the runestone component.\n let component = rsDiv.querySelector(\"[data-component]\");\n if (component == null) {\n console.log(\"Render was called for a component, but now [data-component] attribute is present. This may mean the component has already been rendered.\")\n return;\n }\n let componentKind = component.dataset.component;\n await runestone_import(componentKind);\n if ($(this).closest(\"[data-component=timedAssessment]\").length == 0) {\n // If this element exists within a timed component, don't render it here\n try {\n let divid = component.id;\n window.componentMap[divid] = window.component_factory[\n componentKind\n ]({\n orig: component,\n useRunestoneServices: eBookConfig.useRunestoneServices,\n });\n } catch (err) {\n console.log(`Error rendering ${componentKind} Problem ${this.id}\n Details: ${err}`);\n }\n }\n}\n","/* ********************************\n * |docname| - Runestone Base Class\n * ********************************\n * All runestone components should inherit from RunestoneBase. In addition all runestone components should do the following things:\n *\n * 1. Ensure that they are wrapped in a div with the class runestone\n * 2. Write their source AND their generated html to the database if the database is configured\n * 3. Properly save and restore their answers using the checkServer mechanism in this base class. Each component must provide an implementation of:\n *\n * - checkLocalStorage\n * - setLocalStorage\n * - restoreAnswers\n * - disableInteraction\n *\n * 4. provide a Selenium based unit test\n */\n\nimport { pageProgressTracker } from \"./bookfuncs.js\";\n//import \"./../styles/runestone-custom-sphinx-bootstrap.css\";\n\nexport default class RunestoneBase {\n constructor(opts) {\n this.component_ready_promise = new Promise(\n (resolve) => (this._component_ready_resolve_fn = resolve)\n );\n this.optional = false;\n if (typeof window.allComponents === \"undefined\") {\n window.allComponents = [];\n }\n window.allComponents.push(this);\n if (opts) {\n this.sid = opts.sid;\n this.graderactive = opts.graderactive;\n this.showfeedback = true;\n if (opts.timed) {\n this.isTimed = true;\n }\n if (opts.enforceDeadline) {\n this.deadline = opts.deadline;\n }\n if ($(opts.orig).data(\"optional\")) {\n this.optional = true;\n } else {\n this.optional = false;\n }\n if (opts.selector_id) {\n this.selector_id = opts.selector_id;\n }\n if (typeof opts.assessmentTaken !== \"undefined\") {\n this.assessmentTaken = opts.assessmentTaken;\n } else {\n // default to true as this opt is only provided from a timedAssessment\n this.assessmentTaken = true;\n }\n // This is for the selectquestion points\n // If a selectquestion is part of a timed exam it will get\n // the timedWrapper options.\n if (typeof opts.timedWrapper !== \"undefined\") {\n this.timedWrapper = opts.timedWrapper;\n } else {\n // However sometimes selectquestions\n // are used in regular assignments. The hacky way to detect this\n // is to look for doAssignment in the URL and then grab\n // the assignment name from the heading.\n if (location.href.indexOf(\"doAssignment\") >= 0) {\n this.timedWrapper = $(\"h1#assignment_name\").text();\n } else {\n this.timedWrapper = null;\n }\n }\n if ($(opts.orig).data(\"question_label\")) {\n this.question_label = $(opts.orig).data(\"question_label\");\n }\n this.is_toggle = true ? opts.is_toggle : false;\n this.is_select = true ? opts.is_select : false;\n }\n this.mjelements = [];\n let self = this;\n this.mjReady = new Promise(function (resolve, reject) {\n self.mjresolver = resolve;\n });\n this.aQueue = new AutoQueue();\n this.jsonHeaders = new Headers({\n \"Content-type\": \"application/json; charset=utf-8\",\n Accept: \"application/json\",\n });\n }\n\n // _`logBookEvent`\n //----------------\n // This function sends the provided ``eventInfo`` to the `hsblog endpoint` of the server. Awaiting this function returns either ``undefined`` (if Runestone services are not available) or the data returned by the server as a JavaScript object (already JSON-decoded).\n async logBookEvent(eventInfo) {\n if (this.graderactive) {\n return;\n }\n let post_return;\n eventInfo.course_name = eBookConfig.course;\n eventInfo.clientLoginStatus = eBookConfig.isLoggedIn;\n eventInfo.timezoneoffset = new Date().getTimezoneOffset() / 60;\n if (typeof this.percent === \"number\") {\n eventInfo.percent = this.percent;\n }\n if (\n eBookConfig.isLoggedIn &&\n eBookConfig.useRunestoneServices &&\n eBookConfig.logLevel > 0\n ) {\n post_return = this.postLogMessage(eventInfo);\n }\n if (!this.isTimed || eBookConfig.debug) {\n let prefix = eBookConfig.isLoggedIn ? \"Save\" : \"Not\";\n console.log(`${prefix} logging event ` + JSON.stringify(eventInfo));\n }\n // When selectquestions are part of an assignment especially toggle questions\n // we need to count using the selector_id of the select question.\n // We also need to log an event for that selector so that we will know\n // that interaction has taken place. This is **independent** of how the\n // autograder will ultimately grade the question!\n if (this.selector_id) {\n eventInfo.div_id = this.selector_id.replace(\n \"-toggleSelectedQuestion\",\n \"\"\n );\n eventInfo.event = \"selectquestion\";\n eventInfo.act = \"interaction\";\n this.postLogMessage(eventInfo);\n }\n if (\n typeof pageProgressTracker.updateProgress === \"function\" &&\n eventInfo.act != \"edit\" &&\n this.optional == false\n ) {\n pageProgressTracker.updateProgress(eventInfo.div_id);\n }\n return post_return;\n }\n\n async postLogMessage(eventInfo) {\n var post_return;\n let request = new Request(\n `${eBookConfig.new_server_prefix}/logger/bookevent`,\n {\n method: \"POST\",\n headers: this.jsonHeaders,\n body: JSON.stringify(eventInfo),\n }\n );\n try {\n var response = await fetch(request);\n if (!response.ok) {\n if (response.status === 422) {\n // Get details about why this is unprocesable.\n post_return = await response.json();\n console.log(JSON.stringify(post_return.detail, null, 4));\n throw new Error(\"Unprocessable Request\");\n } else if (response.status == 401) {\n post_return = await response.json();\n console.log(\n `Missing authentication token ${post_return.detail}`\n );\n throw new Error(\"Missing authentication token\");\n }\n throw new Error(`Failed to save the log entry\n Status: ${response.status}`);\n }\n post_return = await response.json();\n } catch (e) {\n let detail = \"none\";\n if (post_return && post_return.detail) {\n detail = post_return.detail;\n }\n if (eBookConfig.useRunestoneServices) {\n alert(`Error: Your action was not saved!\n The error was ${e}\n Status Code: ${response.status}\n Detail: ${JSON.stringify(detail, null, 4)}.\n Please report this error!`);\n }\n // send a request to save this error\n console.log(\n `Error: ${e} Detail: ${detail} Status Code: ${response.status}`\n );\n }\n return post_return;\n }\n // .. _logRunEvent:\n //\n // logRunEvent\n // -----------\n // This function sends the provided ``eventInfo`` to the `runlog endpoint`. When awaited, this function returns the data (decoded from JSON) the server sent back.\n async logRunEvent(eventInfo) {\n let post_promise = \"done\";\n if (this.graderactive) {\n return;\n }\n eventInfo.course = eBookConfig.course;\n eventInfo.clientLoginStatus = eBookConfig.isLoggedIn;\n eventInfo.timezoneoffset = new Date().getTimezoneOffset() / 60;\n if (this.forceSave || \"to_save\" in eventInfo === false) {\n eventInfo.save_code = \"True\";\n }\n if (typeof eventInfo.errinfo !== \"undefined\") {\n eventInfo.errinfo = eventInfo.errinfo.toString();\n }\n if (\n eBookConfig.isLoggedIn &&\n eBookConfig.useRunestoneServices &&\n eBookConfig.logLevel > 0\n ) {\n let request = new Request(\n `${eBookConfig.new_server_prefix}/logger/runlog`,\n {\n method: \"POST\",\n headers: this.jsonHeaders,\n body: JSON.stringify(eventInfo),\n }\n );\n let response = await fetch(request);\n if (!response.ok) {\n post_promise = await response.json();\n if (eBookConfig.useRunestoneServices) {\n alert(`Failed to save your code\n Status is ${response.status}\n Detail: ${JSON.stringify(\n post_promise.detail,\n null,\n 4\n )}`);\n } else {\n console.log(\n `Did not save the code.\n Status: ${response.status}\n Detail: ${JSON.stringify(\n post_promise.detail,\n null,\n 4\n )}`\n );\n }\n } else {\n post_promise = await response.json();\n }\n }\n if (!this.isTimed || eBookConfig.debug) {\n console.log(\"running \" + JSON.stringify(eventInfo));\n }\n if (\n typeof pageProgressTracker.updateProgress === \"function\" &&\n this.optional == false\n ) {\n pageProgressTracker.updateProgress(eventInfo.div_id);\n }\n return post_promise;\n }\n /* Checking/loading from storage\n **WARNING:** DO NOT `await` this function!\n This function, although async, does not explicitly resolve its promise by returning a value. The reason for this is because it is called by the constructor for nearly every component. In Javascript constructors cannot be async!\n\n One of the recommended ways to handle the async requirements from within a constructor is to use an attribute as a promise and resolve that attribute at the appropriate time.\n */\n async checkServer(\n // A string specifying the event name to use for querying the :ref:`getAssessResults` endpoint.\n eventInfo,\n // If true, this function will invoke ``indicate_component_ready()`` just before it returns. This is provided since most components are ready after this function completes its work.\n //\n // TODO: This defaults to false, to avoid causing problems with any components that haven't been updated and tested. After all Runestone components have been updated, default this to true and remove the extra parameter from most calls to this function.\n will_be_ready = false\n ) {\n // Check if the server has stored answer\n let self = this;\n this.checkServerComplete = new Promise(function (resolve, reject) {\n self.csresolver = resolve;\n });\n if (\n eBookConfig.isLoggedIn &&\n (this.useRunestoneServices || this.graderactive)\n ) {\n let data = {};\n data.div_id = this.divid;\n data.course = eBookConfig.course;\n data.event = eventInfo;\n if (this.graderactive && this.deadline) {\n data.deadline = this.deadline;\n data.rawdeadline = this.rawdeadline;\n data.tzoff = this.tzoff;\n }\n if (this.sid) {\n data.sid = this.sid;\n }\n if (!(data.div_id && data.course && data.event)) {\n console.log(\n `A required field is missing data ${data.div_id}:${data.course}:${data.event}`\n );\n }\n // If we are NOT in practice mode and we are not in a peer exercise\n // and assessmentTaken is true\n if (\n !eBookConfig.practice_mode &&\n !eBookConfig.peer &&\n this.assessmentTaken\n ) {\n let request = new Request(\n `${eBookConfig.new_server_prefix}/assessment/results`,\n {\n method: \"POST\",\n body: JSON.stringify(data),\n headers: this.jsonHeaders,\n }\n );\n try {\n let response = await fetch(request);\n if (response.ok) {\n data = await response.json();\n data = data.detail;\n this.repopulateFromStorage(data);\n this.attempted = true;\n if (typeof data.correct !== \"undefined\") {\n this.correct = data.correct;\n } else {\n this.correct = null;\n }\n this.csresolver(\"server\");\n } else {\n console.log(\n `HTTP Error getting results: ${response.statusText}`\n );\n this.checkLocalStorage(); // just go right to local storage\n this.csresolver(\"local\");\n }\n } catch (err) {\n console.log(`Error getting results: ${err}`);\n try {\n this.checkLocalStorage();\n } catch (err) {\n console.log(err);\n }\n }\n } else {\n this.loadData({});\n this.csresolver(\"not taken\");\n }\n } else {\n this.checkLocalStorage(); // just go right to local storage\n this.csresolver(\"local\");\n }\n\n if (will_be_ready) {\n this.indicate_component_ready();\n }\n }\n\n // This method assumes that ``this.componentDiv`` refers to the ``div`` containing the component, and that this component's ID is set.\n indicate_component_ready() {\n // Add a class to indicate the component is now ready.\n this.containerDiv.classList.add(\"runestone-component-ready\");\n // Resolve the ``this.component_ready_promise``.\n this._component_ready_resolve_fn();\n }\n\n loadData(data) {\n // for most classes, loadData doesn't do anything. But for Parsons, and perhaps others in the future,\n // initialization can happen even when there's no history to be loaded\n return null;\n }\n\n /**\n * repopulateFromStorage is called after a successful API call is made to ``getAssessResults`` in\n * the checkServer method in this class\n *\n * ``restoreAnswers,`` ``setLocalStorage`` and ``checkLocalStorage`` are defined in the child classes.\n *\n * @param {*} data - a JSON object representing the data needed to restore a previous answer for a component\n * @param {*} status - the http status\n * @param {*} whatever - ignored\n */\n repopulateFromStorage(data) {\n // decide whether to use the server's answer (if there is one) or to load from storage\n if (data !== null && data !== \"no data\" && this.shouldUseServer(data)) {\n this.restoreAnswers(data);\n this.setLocalStorage(data);\n } else {\n this.checkLocalStorage();\n }\n }\n shouldUseServer(data) {\n // returns true if server data is more recent than local storage or if server storage is correct\n if (\n data.correct === \"T\" ||\n data.correct === true ||\n localStorage.length === 0 ||\n this.graderactive === true ||\n this.isTimed\n ) {\n return true;\n }\n let ex = localStorage.getItem(this.localStorageKey());\n if (ex === null) {\n return true;\n }\n let storedData;\n try {\n storedData = JSON.parse(ex);\n } catch (err) {\n // error while parsing; likely due to bad value stored in storage\n console.log(err.message);\n localStorage.removeItem(this.localStorageKey());\n // definitely don't want to use local storage here\n return true;\n }\n if (data.answer == storedData.answer) return true;\n let storageDate = new Date(storedData.timestamp);\n let serverDate = new Date(data.timestamp);\n return serverDate >= storageDate;\n }\n // Return the key which to be used when accessing local storage.\n localStorageKey() {\n return (\n eBookConfig.email +\n \":\" +\n eBookConfig.course +\n \":\" +\n this.divid +\n \"-given\"\n );\n }\n addCaption(elType) {\n //someElement.parentNode.insertBefore(newElement, someElement.nextSibling);\n if (!this.isTimed) {\n var capDiv = document.createElement(\"p\");\n if (this.question_label) {\n // Display caption based on whether Runestone services have been detected\n this.caption = eBookConfig.useRunestoneServices\n ? `Activity: ${this.question_label} ${this.caption} (${this.divid})`\n : `Activity: ${this.question_label} ${this.caption}`; // Without runestone\n $(capDiv).html(this.caption);\n $(capDiv).addClass(`${elType}_caption`);\n } else {\n // Display caption based on whether Runestone services have been detected\n $(capDiv).html(\n eBookConfig.useRunestoneServices\n ? this.caption + \" (\" + this.divid + \")\"\n : this.caption\n ); // Without runestone\n $(capDiv).addClass(`${elType}_caption`);\n $(capDiv).addClass(`${elType}_caption_text`);\n }\n this.capDiv = capDiv;\n //this.outerDiv.parentNode.insertBefore(capDiv, this.outerDiv.nextSibling);\n this.containerDiv.appendChild(capDiv);\n }\n }\n\n hasUserActivity() {\n return this.isAnswered;\n }\n\n checkCurrentAnswer() {\n console.log(\n \"Each component should provide an implementation of checkCurrentAnswer\"\n );\n }\n\n async logCurrentAnswer() {\n console.log(\n \"Each component should provide an implementation of logCurrentAnswer\"\n );\n }\n renderFeedback() {\n console.log(\n \"Each component should provide an implementation of renderFeedback\"\n );\n }\n disableInteraction() {\n console.log(\n \"Each component should provide an implementation of disableInteraction\"\n );\n }\n\n toString() {\n return `${this.constructor.name}: ${this.divid}`;\n }\n\n queueMathJax(component) {\n if (typeof MathJax === \"undefined\") {\n console.log(\"Error -- MathJax is not loaded\");\n return Promise.resolve(null);\n } else {\n // See - https://docs.mathjax.org/en/latest/advanced/typeset.html\n // Per the above we should keep track of the promises and only call this\n // a second time if all previous promises have resolved.\n // Create a queue of components\n // should wait until defaultPageReady is defined\n // If defaultPageReady is not defined then just enqueue the components.\n // Once defaultPageReady is defined\n // the window.runestoneMathReady promise will be fulfilled when the\n // initial typesetting is complete.\n if (MathJax.typesetPromise) {\n if (typeof window.runestoneMathReady !== \"undefined\") {\n return window.runestoneMathReady.then(() =>\n this.mjresolver(this.aQueue.enqueue(component))\n );\n } else {\n return this.mjresolver(this.aQueue.enqueue(component));\n }\n } else {\n console.log(`Waiting on MathJax!! ${MathJax.typesetPromise}`);\n setTimeout(() => this.queueMathJax(component), 200);\n console.log(`Returning mjready promise: ${this.mjReady}`);\n return this.mjReady;\n }\n }\n }\n\n decorateStatus() {\n let rsDiv = $(this.containerDiv).closest(\"div.runestone\")[0];\n if (this.correct) {\n rsDiv.classList.add(\"isCorrect\");\n } else {\n if (this.correct === null) {\n rsDiv.classList.add(\"notAnswered\");\n } else {\n rsDiv.classList.add(\"isInCorrect\");\n }\n }\n }\n}\n\n// Inspiration and lots of code for this solution come from\n// https://stackoverflow.com/questions/53540348/js-async-await-tasks-queue\n// The idea here is that until MathJax is ready we can just enqueue things\n// once mathjax becomes ready then we can drain the queue and continue as usual.\n\nclass Queue {\n constructor() {\n this._items = [];\n }\n enqueue(item) {\n this._items.push(item);\n }\n dequeue() {\n return this._items.shift();\n }\n get size() {\n return this._items.length;\n }\n}\n\nclass AutoQueue extends Queue {\n constructor() {\n super();\n this._pendingPromise = false;\n }\n\n enqueue(component) {\n return new Promise((resolve, reject) => {\n super.enqueue({ component, resolve, reject });\n this.dequeue();\n });\n }\n\n async dequeue() {\n if (this._pendingPromise) return false;\n\n let item = super.dequeue();\n\n if (!item) return false;\n\n try {\n this._pendingPromise = true;\n\n let payload = await window.runestoneMathReady\n .then(async function () {\n console.log(\n `MathJax Ready -- dequeing a typesetting run for ${item.component.id}`\n );\n return await MathJax.typesetPromise([item.component]);\n });\n\n this._pendingPromise = false;\n item.resolve(payload);\n } catch (e) {\n this._pendingPromise = false;\n item.reject(e);\n } finally {\n this.dequeue();\n }\n\n return true;\n }\n}\n\nwindow.RunestoneBase = RunestoneBase;\n","(function ($) {\n /**\n * Patch TOC list.\n *\n * Will mutate the underlying span to have a correct ul for nav.\n *\n * @param $span: Span containing nested UL's to mutate.\n * @param minLevel: Starting level for nested lists. (1: global, 2: local).\n */\n var patchToc = function ($ul, minLevel) {\n var findA,\n patchTables,\n $localLi;\n\n // Find all a \"internal\" tags, traversing recursively.\n findA = function ($elem, level) {\n level = level || 0;\n var $items = $elem.find(\"> li > a.internal, > ul, > li > ul\");\n\n // Iterate everything in order.\n $items.each(function (index, item) {\n var $item = $(item),\n tag = item.tagName.toLowerCase(),\n $childrenLi = $item.children('li'),\n $parentLi = $($item.parent('li'), $item.parent().parent('li'));\n\n // Add dropdowns if more children and above minimum level.\n if (tag === 'ul' && level >= minLevel && $childrenLi.length > 0) {\n $parentLi\n .addClass('dropdown-submenu')\n .children('a').first().attr('tabindex', -1);\n\n $item.addClass('dropdown-menu');\n }\n\n findA($item, level + 1);\n });\n };\n\n findA($ul);\n };\n\n /**\n * Patch all tables to remove ``docutils`` class and add Bootstrap base\n * ``table`` class.\n */\n patchTables = function () {\n $(\"table.docutils\")\n .removeClass(\"docutils\")\n .addClass(\"table\")\n .attr(\"border\", 0);\n };\n\n$(function () {\n\n /*\n * Scroll the window to avoid the topnav bar\n * https://github.com/twitter/bootstrap/issues/1768\n */\n if ($(\"#navbar.navbar-fixed-top\").length > 0) {\n var navHeight = $(\"#navbar\").height(),\n shiftWindow = function() { scrollBy(0, -navHeight - 10); };\n\n if (location.hash) {\n shiftWindow();\n }\n\n window.addEventListener(\"hashchange\", shiftWindow);\n }\n\n // Add styling, structure to TOC's.\n $(\".dropdown-menu\").each(function () {\n $(this).find(\"ul\").each(function (index, item){\n var $item = $(item);\n $item.addClass('unstyled');\n });\n });\n\n // Global TOC.\n if ($(\"ul.globaltoc li\").length) {\n patchToc($(\"ul.globaltoc\"), 1);\n } else {\n // Remove Global TOC.\n $(\".globaltoc-container\").remove();\n }\n\n // Local TOC.\n patchToc($(\"ul.localtoc\"), 2);\n\n // Mutate sub-lists (for bs-2.3.0).\n $(\".dropdown-menu ul\").not(\".dropdown-menu\").each(function () {\n var $ul = $(this),\n $parent = $ul.parent(),\n tag = $parent[0].tagName.toLowerCase(),\n $kids = $ul.children().detach();\n\n // Replace list with items if submenu header.\n if (tag === \"ul\") {\n $ul.replaceWith($kids);\n } else if (tag === \"li\") {\n // Insert into previous list.\n $parent.after($kids);\n $ul.remove();\n }\n });\n\n // Add divider in page TOC.\n $localLi = $(\"ul.localtoc li\");\n if ($localLi.length > 2) {\n $localLi.first().after('
  • ');\n }\n\n // Enable dropdown.\n $('.dropdown-toggle').dropdown();\n\n // Patch tables.\n patchTables();\n\n // Add Note, Warning styles.\n $('div.note').addClass('alert').addClass('alert-info');\n $('div.warning').addClass('alert').addClass('alert-warning');\n\n // Inline code styles to Bootstrap style.\n $('tt.docutils.literal').not(\".xref\").each(function (i, e) {\n // ignore references\n if (!$(e).parent().hasClass(\"reference\")) {\n $(e).replaceWith(function () {\n return $(\"\").text($(this).text());\n });\n }});\n });\n}(window.jQuery));\n","/*global variable declarations*/\n\n\"use strict\";\n\nimport \"../css/user-highlights.css\";\n\nfunction getCompletions() {\n // Get the completion status\n if (\n window.location.href.match(\n /(index.html|toctree.html|genindex.html|navhelp.html|toc.html|assignments.html|Exercises.html)/\n )\n ) {\n return;\n }\n\n var currentPathname = window.location.pathname;\n if (currentPathname.indexOf(\"?\") !== -1) {\n currentPathname = currentPathname.substring(\n 0,\n currentPathname.lastIndexOf(\"?\")\n );\n }\n var data = {\n lastPageUrl: currentPathname,\n isPtxBook: isPreTeXt(),\n };\n jQuery\n .ajax({\n url: `${eBookConfig.new_server_prefix}/logger/getCompletionStatus`,\n data: data,\n async: false,\n })\n .done(function (data) {\n if (data != \"None\") {\n var completionData = data.detail;\n var completionClass, completionMsg;\n if (completionData[0].completionStatus == 1) {\n completionClass = \"buttonConfirmCompletion\";\n completionMsg =\n \" Completed. Well Done!\";\n } else {\n completionClass = \"buttonAskCompletion\";\n completionMsg = \"Mark as Completed\";\n }\n let scp = document.querySelector(\"#scprogresscontainer\");\n if (scp) {\n scp.classList.add(\"ptx-runestone-container\");\n }\n $(\"#scprogresscontainer\").append(\n '
    \"\n );\n }\n });\n}\n\nfunction showLastPositionBanner() {\n var lastPositionVal = $.getUrlVar(\"lastPosition\");\n if (typeof lastPositionVal !== \"undefined\") {\n $(\"body\").append(\n ''\n );\n $(\"html, body\").animate({ scrollTop: parseInt(lastPositionVal) }, 1000);\n }\n}\n\nfunction addNavigationAndCompletionButtons() {\n if (\n window.location.href.match(\n /(index.html|genindex.html|navhelp.html|toc.html|assignments.html|Exercises.html|toctree.html)/\n )\n ) {\n return;\n }\n var navLinkBgRightHiddenPosition = -$(\"#navLinkBgRight\").outerWidth() - 5;\n var navLinkBgRightHalfOpen;\n var navLinkBgRightFullOpen = 0;\n\n if ($(\"#completionButton\").hasClass(\"buttonAskCompletion\")) {\n navLinkBgRightHalfOpen = navLinkBgRightHiddenPosition + 70;\n } else if ($(\"#completionButton\").hasClass(\"buttonConfirmCompletion\")) {\n navLinkBgRightHalfOpen = 0;\n }\n var relationsNextIconInitialPosition = $(\"#relations-next\").css(\"right\");\n var relationsNextIconNewPosition = -(navLinkBgRightHiddenPosition + 35);\n\n $(\"#navLinkBgRight\").css(\"right\", navLinkBgRightHiddenPosition).show();\n var navBgShown = false;\n $(window).scroll(function () {\n if (\n $(window).scrollTop() + $(window).height() ==\n $(document).height()\n ) {\n $(\"#navLinkBgRight\").animate(\n { right: navLinkBgRightHalfOpen },\n 200\n );\n $(\"#navLinkBgLeft\").animate({ left: \"0px\" }, 200);\n if ($(\"#completionButton\").hasClass(\"buttonConfirmCompletion\")) {\n $(\"#relations-next\").animate(\n { right: relationsNextIconNewPosition },\n 200\n );\n }\n navBgShown = true;\n } else if (navBgShown) {\n $(\"#navLinkBgRight\").animate(\n { right: navLinkBgRightHiddenPosition },\n 200\n );\n $(\"#navLinkBgLeft\").animate({ left: \"-65px\" }, 200);\n $(\"#relations-next\").animate({\n right: relationsNextIconInitialPosition,\n });\n navBgShown = false;\n }\n });\n\n var completionFlag = 0;\n if ($(\"#completionButton\").hasClass(\"buttonAskCompletion\")) {\n completionFlag = 0;\n } else {\n completionFlag = 1;\n }\n // Make sure we mark this page as visited regardless of how flakey\n // the onunload handlers become.\n processPageState(completionFlag, true, false, false);\n $(\"#completionButton\").on(\"click\", function () {\n var markingComplete = false;\n var markingIncomplete = false;\n if ($(this).hasClass(\"buttonAskCompletion\")) {\n $(this)\n .removeClass(\"buttonAskCompletion\")\n .addClass(\"buttonConfirmCompletion\")\n .html(\n \" Completed. Well Done!\"\n );\n $(\"#navLinkBgRight\").animate({ right: navLinkBgRightFullOpen });\n $(\"#relations-next\").animate({\n right: relationsNextIconNewPosition,\n });\n navLinkBgRightHalfOpen = 0;\n completionFlag = 1;\n markingComplete = true;\n } else if ($(this).hasClass(\"buttonConfirmCompletion\")) {\n $(this)\n .removeClass(\"buttonConfirmCompletion\")\n .addClass(\"buttonAskCompletion\")\n .html(\"Mark as Completed\");\n navLinkBgRightHalfOpen = navLinkBgRightHiddenPosition + 70;\n $(\"#navLinkBgRight\").animate({ right: navLinkBgRightHalfOpen });\n $(\"#relations-next\").animate({\n right: relationsNextIconInitialPosition,\n });\n completionFlag = 0;\n markingIncomplete = true;\n }\n processPageState(\n completionFlag,\n false,\n markingComplete,\n markingIncomplete\n );\n });\n\n // we cannot afford to do this at both load and unload especially as users\n // go from page to page. This just doubles the load. So, try without this one.\n // $(window).on(\"beforeunload\", function (e) {\n // if (completionFlag == 0) {\n // processPageState(completionFlag, false, false, false);\n // }\n // });\n}\n\n// _ decorateTableOfContents\n// -------------------------\nfunction decorateTableOfContents() {\n if (\n window.location.href.toLowerCase().indexOf(\"toc.html\") != -1 ||\n window.location.href.toLowerCase().indexOf(\"index.html\") != -1 ||\n window.location.href.toLowerCase().indexOf(\"frontmatter\") != -1\n ) {\n if (!isPreTeXt()) {\n jQuery.get(\n `${eBookConfig.new_server_prefix}/logger/getAllCompletionStatus`,\n function (data) {\n var subChapterList;\n if (data != \"None\") {\n subChapterList = data.detail;\n\n var allSubChapterURLs = $(\"#main-content div li a\");\n $.each(subChapterList, function (index, item) {\n for (var s = 0; s < allSubChapterURLs.length; s++) {\n if (\n allSubChapterURLs[s].href.indexOf(\n item.chapterName +\n \"/\" +\n item.subChapterName\n ) != -1\n ) {\n if (item.completionStatus == 1) {\n $(allSubChapterURLs[s].parentElement)\n .addClass(\"completed\")\n .append(\n '- Completed this topic on ' +\n item.endDate +\n \"\"\n )\n .children()\n .first()\n .hover(\n function () {\n $(this)\n .next(\n \".infoTextCompleted\"\n )\n .show();\n },\n function () {\n $(this)\n .next(\n \".infoTextCompleted\"\n )\n .hide();\n }\n );\n } else if (item.completionStatus == 0) {\n $(allSubChapterURLs[s].parentElement)\n .addClass(\"active\")\n .append(\n 'Last read this topic on ' +\n item.endDate +\n \"\"\n )\n .children()\n .first()\n .hover(\n function () {\n $(this)\n .next(\".infoTextActive\")\n .show();\n },\n function () {\n $(this)\n .next(\".infoTextActive\")\n .hide();\n }\n );\n }\n }\n }\n });\n }\n }\n );\n }\n var data = { course: eBookConfig.course };\n jQuery.get(\n `${eBookConfig.new_server_prefix}/logger/getlastpage`,\n data,\n function (data) {\n var lastPageData;\n if (data != \"None\") {\n lastPageData = data.detail;\n if (lastPageData.lastPageChapter != null) {\n $(\"#continue-reading\")\n .show()\n .html(\n '
    You were Last Reading: ' +\n lastPageData.lastPageChapter +\n (lastPageData.lastPageSubchapter\n ? \" > \" +\n lastPageData.lastPageSubchapter\n : \"\") +\n ' Continue Reading
    '\n );\n }\n }\n }\n );\n }\n}\n\nfunction enableCompletions() {\n getCompletions();\n showLastPositionBanner();\n addNavigationAndCompletionButtons();\n decorateTableOfContents();\n}\n\n// call enable user highlights after login\n$(document).on(\"runestone:login\", enableCompletions);\n\nfunction isPreTeXt() {\n let ptxMarker = document.querySelector(\"body.pretext\");\n if (ptxMarker) {\n return true;\n } else {\n return false;\n }\n}\n// _ processPageState\n// -------------------------\nfunction processPageState(\n completionFlag,\n pageLoad,\n markingComplete,\n markingIncomplete\n) {\n /*Log last page visited*/\n var currentPathname = window.location.pathname;\n if (currentPathname.indexOf(\"?\") !== -1) {\n currentPathname = currentPathname.substring(\n 0,\n currentPathname.lastIndexOf(\"?\")\n );\n }\n // Is this a ptx book?\n let isPtxBook = isPreTeXt();\n var data = {\n lastPageUrl: currentPathname,\n lastPageScrollLocation: Math.round($(window).scrollTop()),\n completionFlag: completionFlag,\n pageLoad: pageLoad,\n markingComplete: markingComplete,\n markingIncomplete: markingIncomplete,\n course: eBookConfig.course,\n isPtxBook: isPtxBook,\n };\n $(document).ajaxError(function (e, jqhxr, settings, exception) {\n console.log(\"Request Failed for \" + settings.url);\n console.log(e);\n });\n jQuery.ajax({\n url: `${eBookConfig.new_server_prefix}/logger/updatelastpage`,\n contentType: \"application/json; charset=utf-8\",\n dataType: \"json\",\n data: JSON.stringify(data),\n method: \"POST\",\n async: true,\n });\n}\n\n$.extend({\n getUrlVars: function () {\n var vars = [],\n hash;\n var hashes = window.location.search\n .slice(window.location.search.indexOf(\"?\") + 1)\n .split(\"&\");\n for (var i = 0; i < hashes.length; i++) {\n hash = hashes[i].split(\"=\");\n vars.push(hash[0]);\n vars[hash[0]] = hash[1];\n }\n return vars;\n },\n getUrlVar: function (name) {\n return $.getUrlVars()[name];\n },\n});\n","/*\n Support functions for PreTeXt books running on Runestone\n\n*/\n\nimport RunestoneBase from \"./runestonebase.js\";\n\nfunction setupPTXEvents() {\n let rb = new RunestoneBase();\n // log an event when a knowl is opened.\n $(\"[data-knowl]\").on(\"click\", function () {\n let div_id = $(this).data(\"knowl\");\n rb.logBookEvent({ event: \"knowl\", act: \"click\", div_id: div_id });\n });\n // log an event when a sage cell is evaluated\n $(\".sagecell_evalButton\").on(\"click\", function () {\n // find parents\n let container = $(this).closest(\".sagecell-sage\");\n let code = $(container[0]).find(\".sagecell_input\")[0].textContent;\n rb.logBookEvent({ event: \"sage\", act: \"run\", div_id: container[0].id });\n });\n if (!eBookConfig.isInstructor) {\n $(\".commentary\").hide();\n }\n}\n\nwindow.addEventListener(\"load\", function () {\n console.log(\"setting up pretext\");\n setupPTXEvents();\n let wrap = document.getElementById(\"primary-navbar-sticky-wrapper\");\n if (wrap) {\n wrap.style.overflow = \"visible\";\n }\n});\n","// ***********************************************************************************\n// |docname| - A framework allowing a Runestone component to load only the JS it needs\n// ***********************************************************************************\n// The JavaScript required by all Runestone components is quite large and results in slow page loads. This approach enables a Runestone component to load only the JavaScript it needs, rather than loading JavaScript for all the components regardless of which are actually used.\n//\n// To accomplish this, webpack's split-chunks ability analyzes all JS, starting from this file. The dynamic imports below are transformed by webpack into the dynamic fetches of just the JS required by each file and all its dependencies. (If using static imports, webpack will assume that all files are already statically loaded via script tags, defeating the purpose of this framework.)\n//\n// However, this approach leads to complexity:\n//\n// - The ``data-component`` attribute of each component must be kept in sync with the keys of the ``module_map`` below.\n// - The values in the ``module_map`` must be kept in sync with the JavaScript files which implement each of the components.\n\n// Static imports\n// ==============\n// These imports are (we assume) needed by all pages. However, it would be much better to load these in the modules that actually use them.\n//\n// These are static imports; code in `dynamically loaded components`_ deals with dynamic imports.\n//\n// jQuery-related imports.\nimport \"jquery-ui/jquery-ui.js\";\nimport \"jquery-ui/themes/base/jquery.ui.all.css\";\nimport \"./runestone/common/js/jquery.idle-timer.js\";\nimport \"./runestone/common/js/jquery_i18n/jquery.i18n.js\";\nimport \"./runestone/common/js/jquery_i18n/jquery.i18n.emitter.bidi.js\";\nimport \"./runestone/common/js/jquery_i18n/jquery.i18n.emitter.js\";\nimport \"./runestone/common/js/jquery_i18n/jquery.i18n.fallbacks.js\";\nimport \"./runestone/common/js/jquery_i18n/jquery.i18n.messagestore.js\";\nimport \"./runestone/common/js/jquery_i18n/jquery.i18n.parser.js\";\nimport \"./runestone/common/js/jquery_i18n/jquery.i18n.language.js\";\n\n// Bootstrap\nimport \"bootstrap/dist/js/bootstrap.js\";\n// comment out for overhaul\n//import \"bootstrap/dist/css/bootstrap.css\";\nimport \"./ptxrs-bootstrap.less\";\nimport \"./runestone/common/project_template/_templates/plugin_layouts/sphinx_bootstrap/static/bootstrap-sphinx.js\";\n\n// Misc\nimport \"./runestone/common/js/bookfuncs.js\";\nimport \"./runestone/common/js/user-highlights.js\";\nimport \"./runestone/common/js/pretext.js\";\n\n// These belong in dynamic imports for the obvious component; however, these components don't include a ``data-component`` attribute.\nimport \"./runestone/matrixeq/css/matrixeq.css\";\nimport \"./runestone/webgldemo/css/webglinteractive.css\";\n\n// These are only needed for the Runestone book, but not in a library mode (such as pretext). I would prefer to dynamically load them. However, these scripts are so small I haven't bothered to do so.\nimport { getSwitch, switchTheme } from \"./runestone/common/js/theme.js\";\nimport \"./runestone/common/js/presenter_mode.js\";\nimport \"./runestone/common/css/presenter_mode.css\";\nimport { renderOneComponent } from \"./runestone/common/js/renderComponent.js\";\n\n// Dynamically loaded components\n// =============================\n// This provides a list of modules that components can dynamically import. Webpack will create a list of imports for each based on its analysis.\nconst module_map = {\n // Wrap each import in a function, so that it won't occur until the function is called. While something cleaner would be nice, webpack can't analyze things like ``import(expression)``.\n //\n // The keys must match the value of each component's ``data-component`` attribute -- the ``runestone_import`` and ``runestone_auto_import`` functions assume this.\n activecode: () => import(\"./runestone/activecode/js/acfactory.js\"),\n ble: () => import(\"./runestone/cellbotics/js/ble.js\"),\n // Always import the timed version of a component if available, since the timed components also define the component's factory and include the component as well. Note that ``acfactory`` imports the timed components of ActiveCode, so it follows this pattern.\n clickablearea: () =>\n import(\"./runestone/clickableArea/js/timedclickable.js\"),\n codelens: () => import(\"./runestone/codelens/js/codelens.js\"),\n datafile: () => import(\"./runestone/datafile/js/datafile.js\"),\n dragndrop: () => import(\"./runestone/dragndrop/js/timeddnd.js\"),\n fillintheblank: () => import(\"./runestone/fitb/js/timedfitb.js\"),\n groupsub: () => import(\"./runestone/groupsub/js/groupsub.js\"),\n khanex: () => import(\"./runestone/khanex/js/khanex.js\"),\n lp_build: () => import(\"./runestone/lp/js/lp.js\"),\n multiplechoice: () => import(\"./runestone/mchoice/js/timedmc.js\"),\n hparsons: () => import(\"./runestone/hparsons/js/hparsons.js\"),\n parsons: () => import(\"./runestone/parsons/js/timedparsons.js\"),\n poll: () => import(\"./runestone/poll/js/poll.js\"),\n quizly: () => import(\"./runestone/quizly/js/quizly.js\"),\n reveal: () => import(\"./runestone/reveal/js/reveal.js\"),\n selectquestion: () => import(\"./runestone/selectquestion/js/selectone.js\"),\n shortanswer: () =>\n import(\"./runestone/shortanswer/js/timed_shortanswer.js\"),\n showeval: () => import(\"./runestone/showeval/js/showEval.js\"),\n simple_sensor: () => import(\"./runestone/cellbotics/js/simple_sensor.js\"),\n spreadsheet: () => import(\"./runestone/spreadsheet/js/spreadsheet.js\"),\n tabbedStuff: () => import(\"./runestone/tabbedStuff/js/tabbedstuff.js\"),\n timedAssessment: () => import(\"./runestone/timed/js/timed.js\"),\n wavedrom: () => import(\"./runestone/wavedrom/js/wavedrom.js\"),\n // TODO: since this isn't in a ``data-component``, need to trigger an import of this code manually.\n webwork: () => import(\"./runestone/webwork/js/webwork.js\"),\n youtube: () => import(\"./runestone/video/js/runestonevideo.js\"),\n};\n\nconst module_map_cache = {};\nconst QUEUE_FLUSH_TIME_MS = 10;\nconst queue = [];\nlet queueLastFlush = 0;\n/**\n * Queue imports that are requested within `QUEUE_FLUSH_TIME_MS` of each other.\n * All such imports are imported at once, and then a promise is fired after all\n * the imports in the queue window have completed.\n */\nfunction queueImport(component_name) {\n let resolve = null;\n let reject = null;\n const retPromise = new Promise((r, rej) => {\n resolve = r;\n reject = rej;\n });\n const item = { component_name, resolve, reject };\n queue.push(item);\n window.setTimeout(flushQueue, QUEUE_FLUSH_TIME_MS + 1);\n\n return retPromise;\n}\nasync function flushQueue() {\n if (queue.length === 0) {\n return;\n }\n if (Date.now() - queueLastFlush < QUEUE_FLUSH_TIME_MS) {\n window.setTimeout(flushQueue, QUEUE_FLUSH_TIME_MS + 1);\n return;\n }\n // If we made it here, it has been at least QUEUE_FLUSH_TIME_MS since\n // the last time we flushed the queue. Therefore, we should start flushing.\n // We copy everything we flush and empty the array first.\n queueLastFlush = Date.now();\n const toFlush = [...queue];\n queue.length = 0;\n console.log(\n \"Webpack is starting the loading process for the following Runestone modules\",\n toFlush.map((item) => item.component_name)\n );\n const flushedPromise = toFlush.map(async (item) => {\n try {\n await module_map[item.component_name]();\n return item;\n } catch (e) {\n item.reject(e);\n }\n });\n const flushed = await Promise.all(flushedPromise);\n flushed.forEach((item) => item.resolve());\n}\n\n// .. _dynamic import machinery:\n//\n// Dynamic import machinery\n// ========================\n// Fulfill a promise when the Runestone pre-login complete event occurs.\nlet pre_login_complete_promise = new Promise((resolve) =>\n $(document).on(\"runestone:pre-login-complete\", resolve)\n);\nlet loadedComponents;\n// Provide a simple function to import the JS for all components on the page.\nexport function runestone_auto_import() {\n // Create a set of ``data-component`` values, to avoid duplication.\n const s = new Set(\n // All Runestone components have a ``data-component`` attribute.\n $(\"[data-component]\")\n .map(\n // Extract the value of the data-component attribute.\n (index, element) => $(element).attr(\"data-component\")\n // Switch from a jQuery object back to an array, passing that to the Set constructor.\n )\n .get()\n );\n // webwork questions are not wrapped in div with a data-component so we have to check a different way\n if (document.querySelector(\".webwork-button\")) {\n s.add(\"webwork\");\n }\n\n // Load JS for each of the components found.\n const a = [...s].map((value) =>\n // If there's no JS for this component, return an empty Promise.\n (module_map[value] || (() => Promise.resolve()))()\n );\n\n // Send the Runestone login complete event when all JS is loaded and the pre-login is also complete.\n Promise.all([pre_login_complete_promise, ...a]).then(function () {\n if (!document.body.dataset.reactInUse) {\n $(document).trigger(\"runestone:login-complete\");\n }\n });\n}\n\npre_login_complete_promise.then(() => {\n console.log(\"Runestone pre-login complete\");\n});\n\n// Load component JS when the document is ready.\n$(document).ready(runestone_auto_import);\n\n// Provide a function to import one specific `Runestone` component.\n// the import function inside module_map is async -- runestone_import\n// should be awaited when necessary to ensure the import completes\nexport async function runestone_import(component_name) {\n if (module_map_cache[component_name]) {\n return module_map_cache[component_name];\n }\n const promise = queueImport(component_name);\n module_map_cache[component_name] = promise;\n return promise;\n}\n\nasync function popupScratchAC() {\n // load the activecode bundle\n await runestone_import(\"activecode\");\n // scratchDiv will be defined if we have already created a scratch\n // activecode. If its not defined then we need to get it ready to toggle\n if (!eBookConfig.scratchDiv) {\n window.ACFactory.createScratchActivecode();\n let divid = eBookConfig.scratchDiv;\n window.componentMap[divid] = ACFactory.createActiveCode(\n $(`#${divid}`)[0],\n eBookConfig.acDefaultLanguage\n );\n if (eBookConfig.isLoggedIn) {\n window.componentMap[divid].enableSaveLoad();\n }\n }\n window.ACFactory.toggleScratchActivecode();\n}\n\n// Set the directory containing this script as the `path `_ for all webpacked scripts.\nconst script_src = document.currentScript.src;\n__webpack_public_path__ = script_src.substring(\n 0,\n script_src.lastIndexOf(\"/\") + 1\n);\n\n// SPLICE Events\nwindow.addEventListener(\"message\", (event) => {\n if (event.data.subject == \"SPLICE.reportScoreAndState\") {\n console.log(event.data.score);\n console.log(event.data.state);\n } else if (event.data.subject == \"SPLICE.sendEvent\") {\n console.log(event.data.location);\n console.log(event.data.name);\n console.log(event.data.data);\n }\n});\n\n// Manual exports\n// ==============\n// Webpack's ``output.library`` setting doesn't seem to work with the split chunks plugin; do all exports manually through the ``window`` object instead.\n\nconst rc = {};\nrc.runestone_import = runestone_import;\nrc.runestone_auto_import = runestone_auto_import;\nrc.getSwitch = getSwitch;\nrc.switchTheme = switchTheme;\nrc.popupScratchAC = popupScratchAC;\nrc.renderOneComponent = renderOneComponent;\nwindow.componentMap = {};\nwindow.runestoneComponents = rc;\n","export function getSwitch() {\n const toggleSwitch = document.querySelector('.theme-switch input[type=\"checkbox\"]');\n const currentTheme = localStorage.getItem('theme') ? localStorage.getItem('theme') : null;\n\n if (currentTheme) {\n document.documentElement.setAttribute('data-theme', currentTheme);\n\n if (currentTheme === 'dark') {\n toggleSwitch.checked = true;\n }\n }\n}\n\nexport function switchTheme() {\n\n\tvar checkBox = document.getElementById(\"checkbox\");\n if (checkBox.checked == true) {\n document.documentElement.setAttribute('data-theme', 'dark');\n localStorage.setItem('theme', 'dark'); //add this\n }\n else {\n document.documentElement.setAttribute('data-theme', 'light');\n localStorage.setItem('theme', 'light'); //add this\n }\n}\n","module.exports = jQuery;"],"names":["PageProgressBar","constructor","actDict","this","possible","total","Object","keys","length","activities","page","$","each","idx","e","firstElementChild","id","calculateProgress","window","location","pathname","match","hide","renderProgress","k","undefined","value","text","progressbar","eBookConfig","isLoggedIn","addClass","updateProgress","div_id","val","toLowerCase","click","pageProgressTracker","document","on","show","html","app","useRunestoneServices","console","log","async","mess","headers","Headers","Accept","data","timezoneoffset","Date","getTimezoneOffset","request","Request","new_server_prefix","method","body","JSON","stringify","response","fetch","ok","error","statusText","json","served_by","username","isInstructor","remove","trigger","readings","l","nxt","path_parts","nxt_link","cur_path_parts","split","name","position","indexOf","num_readings","slice","push","join","class","href","append","addReadingList","search","idleTimer","bw","getElementById","innerHTML","aw","dispatchEvent","Event","handlePageSetup","showAd","adNum","Math","floor","random","adBlock","rsElements","querySelectorAll","after","style","display","placeAdCopy","addEventListener","css","stopPropagation","includes","queryString","forEach","link","anchorText","aPoint","substring","replace","newTimeout","elem","opts","extend","startImmediately","idle","enabled","timeout","events","toggleIdleState","myelem","obj","elapsed","olddate","clearTimeout","tId","setTimeout","event","jQuery","off","stop","trim","fn","strongDirRegExp","RegExp","i18n","parser","emitter","bidi","nodes","m","dir","MessageParserEmitter","language","languages","String","locale","prototype","emit","node","replacements","ret","subnodes","operation","messageParserEmitter","map","n","Error","concat","result","i","index","parseInt","plural","count","parseFloat","convertNumber","forms","convertPlural","gender","grammar","form","word","convertGrammar","fallbacks","ab","ace","aln","als","an","anp","arn","arz","av","ay","ba","bar","bcc","bh","bjn","bm","bpy","bqi","bug","ce","crh","csb","cv","dsb","dtp","egl","eml","ff","fit","frc","frp","frr","fur","gag","gan","gl","glk","gn","gsw","hif","hsb","ht","ii","inh","iu","jut","jv","kaa","kbd","khw","kiu","kk","kl","koi","krc","ks","ksh","ku","kv","lad","lb","lbe","lez","li","lij","liv","lmo","ln","ltg","lzz","mai","mg","mhr","min","mo","mrj","mwl","myv","mzn","nah","nap","nds","no","os","pcd","pdc","pdt","pfl","pms","pt","qu","qug","rgn","rmy","rue","ruq","sa","sah","scn","sg","sgs","sli","sr","srn","stq","su","szl","tcy","tg","tt","ty","udm","ug","uk","vec","vep","vls","vmf","vot","vro","wa","wo","wuu","xal","xmf","yi","za","zea","zh","I18N","nav","Array","options","defaults","messageStore","localize","messageKey","localeParts","localePartIndex","fallbackIndex","tryingLocale","message","get","fallbackLocale","destroy","removeData","load","source","fallbackLocales","locIndex","sourceMap","pop","parse","key","parameters","param1","call","arguments","lBracket","rBracket","type","$this","attr","find","str","debug","apply","navigator","userLanguage","pluralRules","ak","one","am","ar","zero","two","few","many","ars","as","be","bn","br","bs","cs","cy","da","fa","fil","fr","ga","gd","gu","guw","gv","he","hi","hr","hy","is","iw","kab","kn","kw","lag","lt","lv","mk","mr","mt","naq","nso","pa","pl","prg","ro","ru","se","sh","shi","si","sk","sl","sma","smi","smj","smn","sms","ti","tl","tzm","zu","pluralFormIndex","explicitPluralPattern","test","getPluralForm","number","pluralForms","pluralRuleParser","num","integer","tmp","item","transformTable","numberString","convertedNumber","digitTransformTable","tables","ml","lo","or","kh","my","ta","te","th","bo","MessageStore","messages","sources","url","deferred","deferreds","Deferred","getJSON","done","resolve","fail","jqxhr","settings","exception","promise","localization","set","hasOwnProperty","when","MessageParser","simpleParse","ast","pipe","colon","backslash","anyCharacter","dollar","digits","regularLiteral","regularLiteralWithoutBar","escapedOrLiteralWithoutBar","escapedOrRegularLiteral","templateContents","templateName","openTemplate","closeTemplate","expression","paramExpression","p","pos","choice","parserSyntax","sequence","res","originalPos","nOrMore","parsed","makeStringParser","s","len","makeRegexParser","regex","matches","escapedLiteral","replacement","templateParam","expr","templateWithReplacement","templateWithOutReplacement","template","toString","start","codeExercises","presentModeInitialized","presentToggle","dataComponent","parent","closest","not","wrapAll","wrap","before","presentModeSetup","bod","presentClass","fullHeightClass","bottomClass","hasClass","removeClass","localStorage","setItem","presenterCssLink","disabled","activateExercise","getActiveExercise","active","filter","nextExercise","nextIndex","prevExercise","prevIndex","prepend","change","renderRunestoneComponent","componentSrc","whereDiv","moreOpts","basecourse","componentMap","componentKind","opt","orig","lang","graderactive","python3","component_factory","alert","multiGrader","gradingContainer","divid","createTimedComponent","hdiv","origId","first","appendTo","timed","rdict","question","renderOneComponent","rsDiv","component","querySelector","dataset","err","RunestoneBase","component_ready_promise","Promise","_component_ready_resolve_fn","optional","allComponents","sid","showfeedback","isTimed","enforceDeadline","deadline","selector_id","assessmentTaken","timedWrapper","question_label","is_toggle","is_select","mjelements","self","mjReady","reject","mjresolver","aQueue","AutoQueue","jsonHeaders","logBookEvent","eventInfo","post_return","course_name","course","clientLoginStatus","percent","logLevel","postLogMessage","prefix","act","status","detail","logRunEvent","post_promise","forceSave","save_code","errinfo","checkServer","will_be_ready","checkServerComplete","csresolver","rawdeadline","tzoff","practice_mode","peer","loadData","repopulateFromStorage","attempted","correct","checkLocalStorage","indicate_component_ready","containerDiv","classList","add","shouldUseServer","restoreAnswers","setLocalStorage","storedData","ex","getItem","localStorageKey","removeItem","answer","storageDate","timestamp","email","addCaption","elType","capDiv","createElement","caption","appendChild","hasUserActivity","isAnswered","checkCurrentAnswer","logCurrentAnswer","renderFeedback","disableInteraction","queueMathJax","MathJax","typesetPromise","runestoneMathReady","then","enqueue","decorateStatus","Queue","_items","dequeue","shift","size","super","_pendingPromise","payload","patchToc","$ul","minLevel","findA","$elem","level","$item","tag","tagName","$childrenLi","children","$parentLi","patchTables","navHeight","height","shiftWindow","scrollBy","hash","$parent","$kids","detach","replaceWith","$localLi","dropdown","isPreTeXt","processPageState","completionFlag","pageLoad","markingComplete","markingIncomplete","currentPathname","lastIndexOf","isPtxBook","lastPageUrl","lastPageScrollLocation","round","scrollTop","ajaxError","jqhxr","ajax","contentType","dataType","lastPositionVal","completionClass","completionMsg","completionStatus","scp","getCompletions","getUrlVar","animate","navLinkBgRightHalfOpen","navLinkBgRightHiddenPosition","outerWidth","relationsNextIconInitialPosition","relationsNextIconNewPosition","navBgShown","scroll","right","left","addNavigationAndCompletionButtons","subChapterList","allSubChapterURLs","chapterName","subChapterName","parentElement","endDate","hover","next","lastPageData","lastPageChapter","lastPageSubchapter","decorateTableOfContents","getUrlVars","vars","hashes","rb","container","textContent","setupPTXEvents","overflow","module_map","activecode","ble","clickablearea","codelens","datafile","dragndrop","fillintheblank","groupsub","khanex","lp_build","multiplechoice","hparsons","parsons","poll","quizly","reveal","selectquestion","shortanswer","showeval","simple_sensor","spreadsheet","tabbedStuff","timedAssessment","wavedrom","webwork","youtube","module_map_cache","QUEUE_FLUSH_TIME_MS","queue","queueLastFlush","flushQueue","now","toFlush","component_name","flushedPromise","all","pre_login_complete_promise","runestone_auto_import","Set","element","a","reactInUse","runestone_import","retPromise","r","rej","queueImport","ready","script_src","currentScript","src","subject","score","state","rc","getSwitch","toggleSwitch","currentTheme","documentElement","setAttribute","checked","switchTheme","popupScratchAC","scratchDiv","ACFactory","createScratchActivecode","createActiveCode","acDefaultLanguage","enableSaveLoad","toggleScratchActivecode","runestoneComponents","module","exports"],"sourceRoot":""}