Notice: Undefined offset: 2 in /home/melodiaorg/public_html/educa.ccmelodia.org/lib/requirejs.php on line 53

Warning: Cannot modify header information - headers already sent by (output started at /home/melodiaorg/public_html/educa.ccmelodia.org/lib/requirejs.php:53) in /home/melodiaorg/public_html/educa.ccmelodia.org/lib/jslib.php on line 40

Warning: Cannot modify header information - headers already sent by (output started at /home/melodiaorg/public_html/educa.ccmelodia.org/lib/requirejs.php:53) in /home/melodiaorg/public_html/educa.ccmelodia.org/lib/jslib.php on line 41

Warning: Cannot modify header information - headers already sent by (output started at /home/melodiaorg/public_html/educa.ccmelodia.org/lib/requirejs.php:53) in /home/melodiaorg/public_html/educa.ccmelodia.org/lib/jslib.php on line 42

Warning: Cannot modify header information - headers already sent by (output started at /home/melodiaorg/public_html/educa.ccmelodia.org/lib/requirejs.php:53) in /home/melodiaorg/public_html/educa.ccmelodia.org/lib/jslib.php on line 43

Warning: Cannot modify header information - headers already sent by (output started at /home/melodiaorg/public_html/educa.ccmelodia.org/lib/requirejs.php:53) in /home/melodiaorg/public_html/educa.ccmelodia.org/lib/jslib.php on line 44

Warning: Cannot modify header information - headers already sent by (output started at /home/melodiaorg/public_html/educa.ccmelodia.org/lib/requirejs.php:53) in /home/melodiaorg/public_html/educa.ccmelodia.org/lib/jslib.php on line 45

Warning: Cannot modify header information - headers already sent by (output started at /home/melodiaorg/public_html/educa.ccmelodia.org/lib/requirejs.php:53) in /home/melodiaorg/public_html/educa.ccmelodia.org/lib/jslib.php on line 46

Warning: Cannot modify header information - headers already sent by (output started at /home/melodiaorg/public_html/educa.ccmelodia.org/lib/requirejs.php:53) in /home/melodiaorg/public_html/educa.ccmelodia.org/lib/jslib.php on line 47

Warning: Cannot modify header information - headers already sent by (output started at /home/melodiaorg/public_html/educa.ccmelodia.org/lib/requirejs.php:53) in /home/melodiaorg/public_html/educa.ccmelodia.org/lib/jslib.php on line 54
define ("core/chart_bar",["core/chart_base"],function(a){function b(){a.prototype.constructor.apply(this,arguments)}b.prototype=Object.create(a.prototype);b.prototype._horizontal=!1;b.prototype._stacked=!1;b.prototype.TYPE="bar";b.prototype.create=function(b,c){var d=a.prototype.create.apply(this,arguments);d.setHorizontal(c.horizontal);d.setStacked(c.stacked);return d};b.prototype._setDefaults=function(){a.prototype._setDefaults.apply(this,arguments);var b=this.getYAxis(0,!0);b.setMin(0)};b.prototype.getHorizontal=function(){return this._horizontal};b.prototype.getStacked=function(){return this._stacked};b.prototype.setHorizontal=function(a){var b=this.getXAxis(0,!0);if(null===b.getMin()){b.setMin(0)}this._horizontal=!!a};b.prototype.setStacked=function(a){this._stacked=!!a};return b}); define ("core/icon_system",["jquery"],function(a){var b=function(){};b.prototype.init=function(){return a.when(this)};b.prototype.renderIcon=function(){throw new Error("Abstract function not implemented.")};b.prototype.getTemplateName=function(){throw new Error("Abstract function not implemented.")};return b}); define ("core/auto_rows",["jquery"],function(a){var b={ELEMENT:"[data-auto-rows]"},c={ROW_CHANGE:"autorows:rowchange"},d=function(a){var b=a.attr("rows"),c=a.data("min-rows"),d=a.attr("data-max-rows"),e=a.height(),f=a.innerHeight(),g=a[0].scrollHeight,h=(g-(f-e))/(e/b);a.css("height","");if(h=d){return d}else{return h}},e=function(b){var e=a(b.target),f=e.data("min-rows"),g=e.attr("rows");if("undefined"==typeof f){e.data("min-rows",g)}e.attr("rows",1);var h=d(e);e.attr("rows",h);if(h!=g){e.trigger(c.ROW_CHANGE)}};return{init:function init(c){if(a(c).data("auto-rows")){a(c).on("input propertychange",e.bind(this))}else{a(c).on("input propertychange",b.ELEMENT,e.bind(this))}},events:c}}); define ("core/chartjs",["core/chartjs-lazy"],function(a){return a}); function _typeof(a){"@babel/helpers - typeof";if("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator){_typeof=function(a){return typeof a}}else{_typeof=function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a}}return _typeof(a)}define ("core/modal",["jquery","core/templates","core/notification","core/key_codes","core/custom_interaction_events","core/modal_backdrop","core/event","core/modal_events","core/local/aria/focuslock","core/pending","core/aria","core/fullscreen"],function(a,b,c,d,e,f,g,h,i,j,k,l){var m={CONTAINER:"[data-region=\"modal-container\"]",MODAL:"[data-region=\"modal\"]",HEADER:"[data-region=\"header\"]",TITLE:"[data-region=\"title\"]",BODY:"[data-region=\"body\"]",FOOTER:"[data-region=\"footer\"]",HIDE:"[data-action=\"hide\"]",DIALOG:"[role=dialog]",FORM:"form",MENU_BAR:"[role=menubar]",HAS_Z_INDEX:".moodle-has-zindex",CAN_RECEIVE_FOCUS:"input:not([type=\"hidden\"]), a[href], button, textarea, select, [tabindex]"},n={LOADING:"core/loading",BACKDROP:"core/modal_backdrop"},o,p=0,q=function(b){this.root=a(b);this.modal=this.root.find(m.MODAL);this.header=this.modal.find(m.HEADER);this.headerPromise=a.Deferred();this.title=this.header.find(m.TITLE);this.titlePromise=a.Deferred();this.body=this.modal.find(m.BODY);this.bodyPromise=a.Deferred();this.footer=this.modal.find(m.FOOTER);this.footerPromise=a.Deferred();this.hiddenSiblings=[];this.isAttached=!1;this.bodyJS=null;this.footerJS=null;this.modalCount=p++;this.attachmentPoint=document.createElement("div");document.body.append(this.attachmentPoint);if(!this.root.is(m.CONTAINER)){c.exception({message:"Element is not a modal container"})}if(!this.modal.length){c.exception({message:"Container does not contain a modal"})}if(!this.header.length){c.exception({message:"Modal is missing a header region"})}if(!this.title.length){c.exception({message:"Modal header is missing a title region"})}if(!this.body.length){c.exception({message:"Modal is missing a body region"})}if(!this.footer.length){c.exception({message:"Modal is missing a footer region"})}this.registerEventListeners()};q.prototype.attachToDOM=function(){this.getAttachmentPoint().append(this.root);if(this.isAttached){return}i.trapFocus(this.root[0]);if(this.bodyJS){b.runTemplateJS(this.bodyJS);this.bodyJS=null}if(this.footerJS){b.runTemplateJS(this.footerJS);this.footerJS=null}this.isAttached=!0};q.prototype.countOtherVisibleModals=function(){var b=0;a("body").find(m.CONTAINER).each(function(c,d){d=a(d);if(!this.root.is(d)&&d.hasClass("show")){b++}}.bind(this));return b};q.prototype.getBackdrop=function(){if(!o){o=b.render(n.BACKDROP,{}).then(function(b){var c=a(b);return new f(c)}).fail(c.exception)}return o};q.prototype.getRoot=function(){return this.root};q.prototype.getModal=function(){return this.modal};q.prototype.getTitle=function(){return this.title};q.prototype.getBody=function(){return this.body};q.prototype.getFooter=function(){return this.footer};q.prototype.getTitlePromise=function(){return this.titlePromise};q.prototype.getBodyPromise=function(){return this.bodyPromise};q.prototype.getFooterPromise=function(){return this.footerPromise};q.prototype.getModalCount=function(){return this.modalCount};q.prototype.setTitle=function(b){var d=this.getTitle();this.titlePromise=a.Deferred();this.asyncSet(b,d.html.bind(d)).then(function(){this.titlePromise.resolve(d)}.bind(this)).catch(c.exception)};q.prototype.setBody=function(d){this.bodyPromise=a.Deferred();var e=this.getBody();if("string"==typeof d){e.html(d);g.notifyFilterContentUpdated(e);this.getRoot().trigger(h.bodyRendered,this);this.bodyPromise.resolve(e)}else{var f="amd-modal-js-pending-id-"+this.getModalCount();M.util.js_pending(f);var i=null;e.css("overflow","hidden");d=a.when(d);if("pending"==d.state()){var j=e.innerHeight();if(100>j){j=100}e.animate({height:j+"px"},150);e.html("");i=b.render(n.LOADING,{}).then(function(b){var c=a(b).hide();e.html(c);c.fadeIn(150);return a.when(c.promise(),d)}).then(function(a){return a.fadeOut(100).promise()}).then(function(){return d})}else{i=d}i.then(function(a,c){var d=null;if(this.isVisible()){e.css("opacity",0);var f=e.innerHeight();e.html(a);e.css("height","");var g=e.innerHeight();e.css("height",f+"px");d=e.animate({height:g+"px",opacity:1},{duration:150,queue:!1}).promise()}else{e.html(a)}if(c){if(this.isAttached){b.runTemplateJS(c)}else{this.bodyJS=c}}return d}.bind(this)).then(function(a){g.notifyFilterContentUpdated(e);this.getRoot().trigger(h.bodyRendered,this);return a}.bind(this)).then(function(){this.bodyPromise.resolve(e)}.bind(this)).fail(c.exception).always(function(){e.css("height","");e.css("overflow","");e.css("opacity","");M.util.js_complete(f)}).fail(c.exception)}};q.prototype.setFooter=function(d){this.showFooter();this.footerPromise=a.Deferred();var e=this.getFooter();if("string"==typeof d){e.html(d);this.footerPromise.resolve(e)}else{b.render(n.LOADING,{}).then(function(a){e.html(a);return d}).then(function(a,c){e.html(a);if(c){if(this.isAttached){b.runTemplateJS(c)}else{this.footerJS=c}}return e}.bind(this)).then(function(a){this.footerPromise.resolve(a)}.bind(this)).catch(c.exception)}};q.prototype.hasFooterContent=function(){return this.getFooter().children().length?!0:!1};q.prototype.hideFooter=function(){this.getFooter().addClass("hidden")};q.prototype.showFooter=function(){this.getFooter().removeClass("hidden")};q.prototype.setLarge=function(){if(this.isLarge()){return}this.getModal().addClass("modal-lg")};q.prototype.isLarge=function(){return this.getModal().hasClass("modal-lg")};q.prototype.setSmall=function(){if(this.isSmall()){return}this.getModal().removeClass("modal-lg")};q.prototype.isSmall=function(){return!this.getModal().hasClass("modal-lg")};q.prototype.setScrollable=function(a){if(!a){this.getModal()[0].classList.remove("modal-dialog-scrollable");return}this.getModal()[0].classList.add("modal-dialog-scrollable")};q.prototype.calculateZIndex=function(){var b=a(m.DIALOG+", "+m.MENU_BAR+", "+m.HAS_Z_INDEX),c=parseInt(this.root.css("z-index"));b.each(function(b,d){d=a(d);var e=d.css("z-index")?parseInt(d.css("z-index")):0;if(e>c){c=e}});return c};q.prototype.isVisible=function(){return this.root.hasClass("show")};q.prototype.hasFocus=function(){var b=a(document.activeElement);return this.root.is(b)||this.root.has(b).length};q.prototype.hasTransitions=function(){return this.getRoot().hasClass("fade")};q.prototype.getAttachmentPoint=function(){return a(l.getElement()||this.attachmentPoint)};q.prototype.show=function(){if(this.isVisible()){return a.Deferred().resolve()}var b=new j("core/modal:show");if(this.hasFooterContent()){this.showFooter()}else{this.hideFooter()}this.attachToDOM();return this.getBackdrop().then(function(b){var c=this.calculateZIndex(),d=c+2;this.root.css("z-index",d);b.setZIndex(d-1);b.show();this.root.removeClass("hide").addClass("show");this.accessibilityShow();this.getModal().focus();a("body").addClass("modal-open");this.root.trigger(h.shown,this)}.bind(this)).then(b.resolve)};q.prototype.hideIfNotForm=function(){var a=this.modal.find(m.FORM);if(0==a.length){this.hide()}};q.prototype.hide=function(){this.getBackdrop().done(function(b){i.untrapFocus();if(!this.countOtherVisibleModals()){b.hide();a("body").removeClass("modal-open")}var c=parseInt(this.root.css("z-index"));this.root.css("z-index","");b.setZIndex(c-3);this.accessibilityHide();if(this.hasTransitions()){this.getRoot().one("transitionend webkitTransitionEnd oTransitionEnd",function(){this.getRoot().removeClass("show").addClass("hide")}.bind(this))}else{this.getRoot().removeClass("show").addClass("hide")}if(a(document.body).find(this.getRoot()).length){a(document.body).append(this.getRoot())}this.root.trigger(h.hidden,this)}.bind(this))};q.prototype.destroy=function(){this.hide();this.root.remove();this.root.trigger(h.destroyed,this);this.attachmentPoint.remove()};q.prototype.accessibilityShow=function(){k.unhide(this.root.get());k.hideSiblings(this.root.get()[0])};q.prototype.accessibilityHide=function(){k.unhideSiblings(this.root.get()[0]);k.hide(this.root.get())};q.prototype.registerEventListeners=function(){this.getRoot().on("keydown",function(a){if(!this.isVisible()){return}if(a.keyCode==d.escape){if(this.removeOnClose){this.destroy()}else{this.hide()}}}.bind(this));this.getRoot().click(function(b){if(!a(b.target).closest(m.MODAL).length){if(a(b.target).closest(m.CONTAINER).length){var c=a.Event(h.outsideClick);this.getRoot().trigger(c,this);if(!c.isDefaultPrevented()){this.hideIfNotForm()}}}}.bind(this));e.define(this.getModal(),[e.events.activate]);this.getModal().on(e.events.activate,m.HIDE,function(a,b){this.hide();b.originalEvent.preventDefault()}.bind(this))};q.prototype.registerCloseOnCancel=function(){this.getModal().on(e.events.activate,this.getActionSelector("cancel"),function(b,c){var d=a.Event(h.cancel);this.getRoot().trigger(d,this);if(!d.isDefaultPrevented()){c.originalEvent.preventDefault();if(this.removeOnClose){this.destroy()}else{this.hide()}}}.bind(this))};q.prototype.registerCloseOnSave=function(){this.getModal().on(e.events.activate,this.getActionSelector("save"),function(b,c){var d=a.Event(h.save);this.getRoot().trigger(d,this);if(!d.isDefaultPrevented()){c.originalEvent.preventDefault();if(this.removeOnClose){this.destroy()}else{this.hide()}}}.bind(this))};q.prototype.asyncSet=function(b,d){var e=b;if("object"!==_typeof(b)||!b.hasOwnProperty("then")){e=a.Deferred();e.resolve(b)}e.then(function(a){d(a)}).fail(c.exception);return e};q.prototype.setButtonText=function(a,b){var c=this.getFooter().find(this.getActionSelector(a));if(!c){throw new Error("Unable to find the '"+a+"' button")}return this.asyncSet(b,c.text.bind(c))};q.prototype.getActionSelector=function(a){return"[data-action='"+a+"']"};q.prototype.setRemoveOnClose=function(a){this.removeOnClose=a};return q}); define ("core/paged_content_paging_bar",["jquery","core/custom_interaction_events","core/paged_content_events","core/str","core/pubsub","core/pending"],function(a,b,c,d,e,f){var g={ROOT:"[data-region=\"paging-bar\"]",PAGE:"[data-page]",PAGE_ITEM:"[data-region=\"page-item\"]",PAGE_LINK:"[data-region=\"page-link\"]",FIRST_BUTTON:"[data-control=\"first\"]",LAST_BUTTON:"[data-control=\"last\"]",NEXT_BUTTON:"[data-control=\"next\"]",PREVIOUS_BUTTON:"[data-control=\"previous\"]",DOTS_BUTTONS:"[data-dots]",BEGINNING_DOTS_BUTTON:"[data-dots=\"beginning\"]",ENDING_DOTS_BUTTON:"[data-dots=\"ending\"]"},h=function(a,b){return a.find(g.PAGE_ITEM+"[data-page-number=\""+b+"\"]")},i=function(a){return a.find(g.NEXT_BUTTON)},j=function(a,b){a.attr("data-last-page-number",b)},k=function(a){return parseInt(a.attr("data-last-page-number"),10)},l=function(a){return parseInt(a.attr("data-active-page-number"),10)},m=function(a,b){a.attr("data-active-page-number",b)},n=function(a){var b=l(a);return!isNaN(b)&&0!=b},o=function(a,b){if(b.attr("data-page")!=void 0){return parseInt(b.attr("data-page-number"),10)}var c=1,d=null;switch(b.attr("data-control")){case"first":c=1;break;case"last":c=k(a);break;case"next":d=l(a);var e=k(a);if(!e){c=d+1}else if(d&&dj){var m=Math.max(c-Math.round(j/2),1),n=m+j-1;if(n>=d){n=d;m=n-j+1}if(1=m&&b+1<=n){r(c)}})}else{s(e)}},x=function(a){var b=a.find(g.PREVIOUS_BUTTON),c=a.find(g.FIRST_BUTTON);b.removeClass("disabled");b.removeAttr("aria-disabled");c.removeClass("disabled");c.removeAttr("aria-disabled")},y=function(a){var b=a.attr("data-aria-label-components-pagination-item"),c=b.split(",").map(function(a){return a.trim()});return c},z=function(a){var b=a.attr("data-aria-label-components-pagination-active-item"),c=b.split(",").map(function(a){return a.trim()});return c},A=function(b,c){var d=0;m(b,0);c.each(function(c,e){var f=c+1;e=a(e);e.attr("data-page-number",f);d++;if(e.hasClass("active")){m(b,f)}});j(b,d)},B=function(b){var c=y(b),e=z(b),f=l(b),h=b.find(g.PAGE_ITEM),i=h.map(function(d,g){g=a(g);var h=o(b,g);if(h===f){return{key:e[0],component:e[1],param:h}}else{return{key:c[0],component:c[1],param:h}}});d.get_strings(i).then(function(b){h.each(function(c,d){d=a(d);var e=b[c];d.attr("aria-label",e);d.find(g.PAGE_LINK).attr("aria-label",e)});return b}).catch(function(){})},C=function(a,b,d){var i=new f("core/paged_content_paging_bar:showPage"),j=k(a),n=b==l(a),o=p(a);if(!n){a.find(g.PAGE_ITEM).removeClass("active").removeAttr("aria-current");var q=h(a,b);q.addClass("active");q.attr("aria-current",!0);m(a,b);w(a)}if(j&&b>=j){t(a)}else{u(a)}if(1=l){l=null}else if(!l){l=null}}if("undefined"==typeof j){j=!1}for(n=0;n=p.length){q=p.sort().join()}else{q=p.length+"-method-calls"}m=JSON.stringify(m);var s={type:"POST",context:c,dataType:"json",processData:!1,async:d,contentType:"application/json",timeout:k},t="service.php",u=b.wwwroot+"/lib/ajax/";if(!h){t="service-nologin.php";u+=t+"?info="+q;if(l){u+="&cachekey="+l;s.type="GET"}}else{u+=t+"?sesskey="+b.sesskey+"&info="+q}if(j){u+="&nosessionupdate=true"}if("POST"===s.type){s.data=m}else{var v=u+"&args="+encodeURIComponent(m);if(v.length>2e3){s.type="POST";s.data=m}else{u=v}}if(d){a.ajax(u,s).done(f).fail(g)}else{s.success=f;s.error=g;a.ajax(u,s)}return o}}}); define ("core/userfeedback",["exports","core/ajax","core/notification"],function(a,b,c){"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.registerEventListeners=void 0;b=d(b);c=d(c);function d(a){return a&&a.__esModule?a:{default:a}}var f={regions:{root:"[data-region=\"core/userfeedback\"]"},actions:{}};f.actions.give="".concat(f.regions.root," [data-action=\"give\"]");f.actions.remind="".concat(f.regions.root," [data-action=\"remind\"]");a.registerEventListeners=function registerEventListeners(){document.addEventListener("click",function(a){var b=a.target.closest(f.actions.give);if(b){a.preventDefault();if(!window.open(b.href)){throw new Error("Unable to open popup")}Promise.resolve(b).then(h).then(g).catch(c.default.exception)}var d=a.target.closest(f.actions.remind);if(d){a.preventDefault();Promise.resolve(d).then(h).then(g).catch(c.default.exception)}})};var g=function(a){if(a.dataset.record){return b.default.call([{methodname:"core_create_userfeedback_action_record",args:{action:a.dataset.action,contextid:M.cfg.contextid}}])[0]}return Promise.resolve()},h=function(a){if(a.dataset.hide){a.closest(f.regions.root).remove()}return a}}); define ("core/tree",["jquery"],function(a){var b={ITEM:"[role=treeitem]",GROUP:"[role=treeitem]:has([role=group]), [role=treeitem][aria-owns], [role=treeitem][data-requires-ajax=true]",CLOSED_GROUP:"[role=treeitem]:has([role=group])[aria-expanded=false], [role=treeitem][aria-owns][aria-expanded=false], [role=treeitem][data-requires-ajax=true][aria-expanded=false]",FIRST_ITEM:"[role=treeitem]:first",VISIBLE_ITEM:"[role=treeitem]:visible",UNLOADED_AJAX_ITEM:"[role=treeitem][data-requires-ajax=true][data-loaded=false][aria-expanded=true]"},c=function(c,d){this.treeRoot=a(c);this.treeRoot.data("activeItem",null);this.selectCallback=d;this.keys={tab:9,enter:13,space:32,pageup:33,pagedown:34,end:35,home:36,left:37,up:38,right:39,down:40,asterisk:106};this.initialiseNodes(this.treeRoot);this.setActiveItem(this.treeRoot.find(b.FIRST_ITEM));this.refreshVisibleItemsCache();this.bindEventHandlers()};c.prototype.registerEnterCallback=function(a){this.enterCallback=a};c.prototype.refreshVisibleItemsCache=function(){this.treeRoot.data("visibleItems",this.treeRoot.find(b.VISIBLE_ITEM))};c.prototype.getVisibleItems=function(){return this.treeRoot.data("visibleItems")};c.prototype.setActiveItem=function(a){var b=this.treeRoot.data("activeItem");if(a===b){return}if(b){b.attr("tabindex","-1");b.attr("aria-selected","false")}a.attr("tabindex","0");a.attr("aria-selected","true");this.treeRoot.data("activeItem",a);if("function"==typeof this.selectCallback){this.selectCallback(a)}};c.prototype.isGroupItem=function(a){return a.is(b.GROUP)};c.prototype.getGroupFromItem=function(a){var b=this.treeRoot.find("#"+a.attr("aria-owns")),c=a.children("[role=group]");if(b.length>c.length){return b}else{return c}};c.prototype.isGroupCollapsed=function(a){return"false"===a.attr("aria-expanded")};c.prototype.isGroupCollapsible=function(a){return"false"!==a.attr("data-collapsible")};c.prototype.initialiseNodes=function(c){this.removeAllFromTabOrder(c);this.setAriaSelectedFalseOnItems(c);var d=this;c.find(b.UNLOADED_AJAX_ITEM).each(function(){var b=a(this);d.collapseGroup(b);d.expandGroup(b)})};c.prototype.removeAllFromTabOrder=function(b){b.find("*").attr("tabindex","-1");this.getGroupFromItem(a(b)).find("*").attr("tabindex","-1")};c.prototype.setAriaSelectedFalseOnItems=function(a){a.find(b.ITEM).attr("aria-selected","false")};c.prototype.expandAllGroups=function(){var c=this;this.treeRoot.find(b.CLOSED_GROUP).each(function(){var b=a(this);c.expandGroup(a(this)).done(function(){c.expandAllChildGroups(b)})})};c.prototype.expandAllChildGroups=function(c){var d=this;this.getGroupFromItem(c).find(b.CLOSED_GROUP).each(function(){var b=a(this);d.expandGroup(a(this)).done(function(){d.expandAllChildGroups(b)})})};c.prototype.expandGroup=function(b){var c=a.Deferred();if("false"!==b.attr("data-expandable")&&this.isGroupCollapsed(b)){if("true"===b.attr("data-requires-ajax")&&"true"!==b.attr("data-loaded")){b.attr("data-loaded",!1);var d=b.closest("[data-ajax-loader]").attr("data-ajax-loader"),e=this,f=b.find("p");f.addClass("loading");require([d],function(a){a.load(b).done(function(){b.attr("data-loaded",!0);e.initialiseNodes(b);e.finishExpandingGroup(b);f.removeClass("loading");c.resolve()})})}else{this.finishExpandingGroup(b);c.resolve()}}else{c.resolve()}return c};c.prototype.finishExpandingGroup=function(a){var b=this.getGroupFromItem(a);b.removeAttr("aria-hidden");a.attr("aria-expanded","true");this.refreshVisibleItemsCache()};c.prototype.collapseGroup=function(a){if(!this.isGroupCollapsible(a)||this.isGroupCollapsed(a)){return}var b=this.getGroupFromItem(a);b.attr("aria-hidden","true");a.attr("aria-expanded","false");this.refreshVisibleItemsCache()};c.prototype.toggleGroup=function(a){if("true"===a.attr("aria-expanded")){this.collapseGroup(a)}else{this.expandGroup(a)}};c.prototype.handleKeyDown=function(c){var d=a(c.target),e=this.getVisibleItems().index(d);if(c.altKey||c.ctrlKey||c.metaKey||c.shiftKey&&c.keyCode!=this.keys.tab){return}switch(c.keyCode){case this.keys.home:{this.getVisibleItems().first().focus();c.preventDefault();return}case this.keys.end:{this.getVisibleItems().last().focus();c.preventDefault();return}case this.keys.enter:{var f=d.children("a").length?d.children("a"):d.children().not(b.GROUP).find("a");if(f.length){if(f.first().data("overrides-tree-activation-key-handler")){f.first().triggerHandler(c)}else if("function"==typeof this.enterCallback){this.enterCallback(d)}else{window.location.href=f.first().attr("href")}}else if(this.isGroupItem(d)){this.toggleGroup(d,!0)}c.preventDefault();return}case this.keys.space:{if(this.isGroupItem(d)){this.toggleGroup(d,!0)}else if(d.children("a").length){var g=d.children("a").first();if(g.data("overrides-tree-activation-key-handler")){g.triggerHandler(c)}}c.preventDefault();return}case this.keys.left:{var h=function(b){b.getVisibleItems().filter(function(){return b.getGroupFromItem(a(this)).has(d).length}).focus()};if(this.isGroupItem(d)){if(this.isGroupCollapsed(d)){h(this)}else{this.collapseGroup(d)}}else{h(this)}c.preventDefault();return}case this.keys.right:{if(this.isGroupItem(d)){if(this.isGroupCollapsed(d)){this.expandGroup(d)}else{this.getGroupFromItem(d).find(b.ITEM).first().focus()}}c.preventDefault();return}case this.keys.up:{if(0"),d=this._chart,c,e,f=d.getLabels(),g=0").text(d.getTitle()))}c=a("");if(g){c.append(a(""))}h.forEach(function(b){c.append(a("").text(b.getLabel()).attr("scope","col"))});b.append(c);for(var k=0;k");if(0").text(f[k]).attr("scope","row"))}for(var l=0;l").text(e))}b.append(c)}return b};c.prototype.update=function(){this._build()};return c}); function _typeof(a){"@babel/helpers - typeof";if("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator){_typeof=function(a){return typeof a}}else{_typeof=function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a}}return _typeof(a)}define ("core/sortable_list",["jquery","core/log","core/autoscroll","core/str","core/modal_factory","core/modal_events","core/notification"],function(b,a,c,d,e,f,g){var h={targetListSelector:null,moveHandlerSelector:"[data-drag-type=move]",isHorizontal:!1,autoScroll:!0},j={keyboardDragClass:"dragdrop-keyboard-drag",isDraggedClass:"sortable-list-is-dragged",currentPositionClass:"sortable-list-current-position",sourceListClass:"sortable-list-source",targetListClass:"sortable-list-target",overElementClass:"sortable-list-over-element"},k=function(a){return{setup:function setup(b,c,d){if(c.includes("notPassive")){this.addEventListener(a,d,{passive:!1});return!0}else{return!1}}}};if(function eventListenerOptionsSupported(){var a=!1,b;try{b=Object.defineProperty({},"passive",{get:function get(){a=!0}});document.addEventListener("testpassiveeventoptions",b,b);document.removeEventListener("testpassiveeventoptions",b,b)}catch(b){a=!1}return a}){b.event.special.touchstart=k("touchstart");b.event.special.touchmove=k("touchmove");b.event.special.touchend=k("touchend")}var l=function(a,c){this.info=null;this.proxy=null;this.proxyDelta=null;this.dragCounter=0;this.lastEvent=null;this.config=b.extend({},h,c||{});this.config.listSelector=a;if(!this.config.targetListSelector){this.config.targetListSelector=a}if("object"===_typeof(this.config.listSelector)){b(this.config.listSelector).on("mousedown touchstart.notPassive",b.proxy(this.dragStartHandler,this))}else{b("body").on("mousedown touchstart.notPassive",this.config.listSelector,b.proxy(this.dragStartHandler,this))}if(null!==this.config.moveHandlerSelector){b("body").on("click keypress",this.config.moveHandlerSelector,b.proxy(this.clickHandler,this))}};l.EVENTS={DRAGSTART:"sortablelist-dragstart",DRAG:"sortablelist-drag",DROP:"sortablelist-drop",DRAGEND:"sortablelist-dragend"};l.prototype.resetDraggedClasses=function(){var a=[j.isDraggedClass,j.currentPositionClass,j.overElementClass,j.targetListClass];for(var c in a){b("."+a[c]).removeClass(a[c])}if(this.proxy){this.proxy.remove();this.proxy=b()}};l.prototype.calculatePositionOnPage=function(a){if(a.originalEvent&&a.originalEvent.touches&&a.originalEvent.touches[0]!==void 0){var c=a.originalEvent.touches[0];a.pageX=c.pageX;a.pageY=c.pageY}if(a.pageX===void 0){a.pageX=this.lastEvent.pageX;a.pageY=this.lastEvent.pageY}else{this.lastEvent=a}if(a.clientX===void 0){a.clientX=Math.round(a.pageX-b(window).scrollLeft());a.clientY=Math.round(a.pageY-b(window).scrollTop())}};l.prototype.dragStartHandler=function(a){if(null!==this.info){if("click"===this.info.type||"touchend"===this.info.type){return}this.moveElement(this.info.sourceList,this.info.sourceNextElement);this.finishDragging()}if("mousedown"===a.type&&1!==a.which){return}this.calculatePositionOnPage(a);var d=b(a.target).closest(b(a.currentTarget).children());if(!d.length){return}if(null!==this.config.moveHandlerSelector){if(!b(a.target).closest(this.config.moveHandlerSelector,d).length){return}}a.stopPropagation();a.preventDefault();this.dragCounter++;this.info={element:d,sourceNextElement:d.next(),sourceList:d.parent(),targetNextElement:d.next(),targetList:d.parent(),type:a.type,dropped:!1,startX:a.pageX,startY:a.pageY,startTime:new Date().getTime()};b(this.config.targetListSelector).addClass(j.targetListClass);var e=d.offset();d.addClass(j.currentPositionClass);this.proxyDelta={x:e.left-a.pageX,y:e.top-a.pageY};this.proxy=b();var f=this.dragCounter;setTimeout(b.proxy(function(){if(null===this.info||"click"===this.info.type||"keypress"===this.info.type||this.dragCounter!==f){return}this.createProxy()},this),500);b(window).on("mousemove touchmove.notPassive mouseup touchend.notPassive",b.proxy(this.dragHandler,this));b(window).on("keypress",b.proxy(this.dragcancelHandler,this));if(this.config.autoScroll){c.start(function(){b(window).trigger("mousemove")})}this.executeCallback(l.EVENTS.DRAGSTART)};l.prototype.createProxy=function(){this.proxy=this.info.element.clone();this.info.sourceList.append(this.proxy);this.proxy.removeAttr("id").removeClass(j.currentPositionClass).addClass(j.isDraggedClass).css({position:"fixed"});this.proxy.offset({top:this.proxyDelta.y+this.lastEvent.pageY,left:this.proxyDelta.x+this.lastEvent.pageX})};l.prototype.clickHandler=function(a){if("keypress"===a.type&&13!==a.originalEvent.keyCode&&32!==a.originalEvent.keyCode){return}if(null!==this.info){return}var c=b(a.target).closest(this.config.moveHandlerSelector),d=c.closest(this.config.listSelector),e=c.closest(d.children());if(!e.length){return}a.preventDefault();a.stopPropagation();this.dragCounter++;this.info={element:e,sourceNextElement:e.next(),sourceList:d,targetNextElement:e.next(),targetList:d,dropped:!1,type:a.type,startTime:new Date().getTime()};this.executeCallback(l.EVENTS.DRAGSTART);this.displayMoveDialogue(c)};l.prototype.getPositionInNode=function(a,b,c){if(!c.length){return null}var d=c[0],e=d.getBoundingClientRect(),f=b-(e.top+window.scrollY),g=a-(e.left+window.scrollX);if(g>=-0&&g<=e.width+0&&f>=-0&&f<=e.height+0){return{x:g,y:f,xRatio:e.width?g/e.width:0,yRatio:e.height?f/e.height:0}}return null};l.prototype.isListHorizontal=function(a){var b=this.config.isHorizontal;if(!0===b||!1===b){return b}return b(a)};l.prototype.dragHandler=function(a){a.preventDefault();a.stopPropagation();this.calculatePositionOnPage(a);this.proxy.offset({top:-1e3,left:-1e3});var c=b(document.elementFromPoint(a.clientX,a.clientY)),d=this.info.element[0],e=function(){return this!==d},f=c.closest("."+j.targetListClass+" > :not(."+j.isDraggedClass+")").filter(e),g=c.closest("."+j.targetListClass),h=this.proxy,i=function(){return!h||!h.length||this!==h[0]};b("."+j.overElementClass).removeClass(j.overElementClass);f.addClass(j.overElementClass);this.proxy.offset({top:this.proxyDelta.y+a.pageY,left:this.proxyDelta.x+a.pageX});if(g.length&&!g.children().filter(i).length){this.moveElement(g,b())}else if(1===f.length&&!this.info.element.find(f[0]).length){var k=this.getPositionInNode(a.pageX,a.pageY,f);if(k){var m=f.parent(),n=this.isListHorizontal(m)?k.xRatio:k.yRatio,o=f.find("."+j.targetListClass),p=!o.children().filter(i).filter(e).length;if(o.length&&p&&.2n){this.moveElement(o,b())}else if(.5q.endTime-q.startTime&&!q.positionChanged){this.clickHandler(a)}}};l.prototype.hasPositionChanged=function(a){return a.sourceList[0]!==a.targetList[0]||a.sourceNextElement.length!==a.targetNextElement.length||a.sourceNextElement.length&&a.sourceNextElement[0]!==a.targetNextElement[0]};l.prototype.moveElement=function(a,b){var c=this.info.element;if(b.length&&b[0]===c[0]){return}if(a[0]===this.info.targetList[0]&&b.length===this.info.targetNextElement.length&&b[0]===this.info.targetNextElement[0]){return}if(b.length){a[0].insertBefore(c[0],b[0])}else if(this.proxy&&this.proxy.parent().length&&this.proxy.parent()[0]===a[0]){a[0].insertBefore(c[0],this.proxy[0])}else{a[0].appendChild(c[0])}this.info.targetList=a;this.info.targetNextElement=b;this.executeCallback(l.EVENTS.DRAG)};l.prototype.finishDragging=function(){this.resetDraggedClasses();if(this.config.autoScroll){c.stop()}b(window).off("mousemove touchmove.notPassive mouseup touchend.notPassive",b.proxy(this.dragHandler,this));b(window).off("keypress",b.proxy(this.dragcancelHandler,this));this.executeCallback(l.EVENTS.DRAGEND);this.info=null};l.prototype.executeCallback=function(a){this.info.element.trigger(a,this.info)};l.prototype.dragcancelHandler=function(a){if("keypress"!==a.type||27!==a.originalEvent.keyCode){return}this.moveElement(this.info.sourceList,this.info.sourceNextElement);this.finishDragging()};l.prototype.getElementName=function(a){return b.Deferred().resolve(a.text())};l.prototype.getDestinationName=function(a,b){if(!b.length){return d.get_string("movecontenttothetop","moodle")}else{return this.getElementName(b).then(function(a){return d.get_string("movecontentafter","moodle",a)})}};l.prototype.getMoveDialogueTitle=function(a,c){if(c.attr("title")){return b.Deferred().resolve(c.attr("title"))}return this.getElementName(a).then(function(a){return d.get_string("movecontent","moodle",a)})};l.prototype.getDestinationsList=function(){var a=[],c=b(this.config.targetListSelector),d=b("");j.attr("role","group");e.hide(j);a.each(i,function(e,h){if("object"!==_typeof(h)){return}var i=a("
  • "),k=a("

    "),l=h.id||h.key+"_tree_item",m=null,n=h.expandable||h.haschildren?!0:!1;i.attr("role","treeitem");k.addClass("tree_item");k.attr("id",l);k.attr("tabindex","-1");if(h.requiresajaxloading){i.attr("data-requires-ajax",!0);i.attr("data-node-id",h.id);i.attr("data-node-key",h.key);i.attr("data-node-type",h.type)}if(n){i.addClass("collapsed contains_branch");i.attr("aria-expanded",!1);k.addClass("branch")}var o=null;if(h.link){var p=a("");o=p;p.append(""+h.name+"");if(h.hidden){p.addClass("dimmed")}k.append(p)}else{var q=a("");o=q;q.append(""+h.name+"");if(h.hidden){q.addClass("dimmed")}k.append(q)}if(h.icon&&(!n||h.type===g.ACTIVITY||h.type===g.RESOURCE)){i.addClass("item_with_icon");k.addClass("hasicon");if(h.type===g.ACTIVITY||h.type===g.RESOURCE){m=a("");m.attr("alt",h.icon.alt);m.attr("title",h.icon.title);m.attr("src",d.imageUrl(h.icon.pix,h.icon.component));a.each(h.icon.classes,function(a,b){m.addClass(b)});o.prepend(m)}else{if("moodle"==h.icon.component){h.icon.component="core"}b.renderPix(h.icon.pix,h.icon.component,h.icon.title).then(function(a){o.prepend(a)}).catch(c.exception)}}i.append(k);j.append(i);if(h.children&&h.children.length){f(i,h.children)}else if(n&&!h.requiresajaxloading){i.removeClass("contains_branch");k.addClass("emptybranch")}});h.append(j);var k=h.attr("id")+"_group";j.attr("id",k);h.attr("aria-owns",k);h.attr("role","treeitem")}return{render:function render(a,b){if(b.children&&b.children.length){f(a,b.children);var c=a.children("[role='treeitem']").first(),d=a.find("#"+c.attr("aria-owns"));c.attr("aria-expanded",!0);e.unhide(d)}else{if(a.hasClass("contains_branch")){a.removeClass("contains_branch");a.addClass("emptybranch")}}}}}); define ("block_navigation/navblock",["jquery","core/tree"],function(a,b){return{init:function init(a){var c=new b(".block_navigation .block_tree");c.finishExpandingGroup=function(c){b.prototype.finishExpandingGroup.call(this,c);Y.use("moodle-core-event",function(){Y.Global.fire(M.core.globalEvents.BLOCK_CONTENT_UPDATED,{instanceid:a})})};c.collapseGroup=function(c){b.prototype.collapseGroup.call(this,c);Y.use("moodle-core-event",function(){Y.Global.fire(M.core.globalEvents.BLOCK_CONTENT_UPDATED,{instanceid:a})})}}}}); define ("block_online_users/change_user_visibility",["jquery","core/ajax","core/str","core/notification"],function(a,b,c,d){var e={CHANGE_VISIBILITY_LINK:"#change-user-visibility",CHANGE_VISIBILITY_ICON:"#change-user-visibility .icon"},f=function(a,c){var e="show"==a?1:0;b.call([{methodname:"core_user_set_user_preferences",args:{preferences:[{name:"block_online_users_uservisibility",value:e,userid:c}]}}])[0].then(function(b){if(b.saved){var c=g(a);h(c);i(c)}}).catch(d.exception)},g=function(a){return"show"==a?"hide":"show"},h=function(b){k(b).then(function(c){a(e.CHANGE_VISIBILITY_LINK).attr({"data-action":b,title:c})}).catch(d.exception)},i=function(b){var c=a(e.CHANGE_VISIBILITY_ICON);k(b).then(function(d){a(c).attr({title:d,"aria-label":d});if(c.is("img")){a(c).attr({src:M.util.image_url("t/"+b),alt:d})}else{a(c).addClass(j(b));a(c).removeClass(j(g(b)))}}).catch(d.exception)},j=function(a){return"show"==a?"fa-eye-slash":"fa-eye"},k=function(a){return c.get_string("online_status:"+a,"block_online_users")};return{init:function init(){a(e.CHANGE_VISIBILITY_LINK).on("click",function(b){b.preventDefault();var c=a(this).attr("data-action"),d=a(this).attr("data-userid");f(c,d)})}}}); define ("block_recentlyaccessedcourses/main",["jquery","core/custom_interaction_events","core/notification","core/pubsub","core/paged_content_paging_bar","core/templates","core_course/events","core_course/repository","core/aria"],function(a,b,c,d,e,f,g,h,i){var j={BLOCK_CONTAINER:"[data-region=\"recentlyaccessedcourses\"]",CARD_CONTAINER:"[data-region=\"card-deck\"]",COURSE_IS_FAVOURITE:"[data-region=\"is-favourite\"]",CONTENT:"[data-region=\"view-content\"]",EMPTY_MESSAGE:"[data-region=\"empty-message\"]",LOADING_PLACEHOLDER:"[data-region=\"loading-placeholder\"]",PAGING_BAR:"[data-region=\"paging-bar\"]",PAGING_BAR_NEXT:"[data-control=\"next\"]",PAGING_BAR_PREVIOUS:"[data-control=\"previous\"]"},k=!1,l=[],m=null,n=null,o=0,p=1,q=function(a){a.find(j.EMPTY_MESSAGE).removeClass("hidden");a.find(j.LOADING_PLACEHOLDER).addClass("hidden");a.find(j.CONTENT).addClass("hidden")},r=function(a){a.find(j.CONTENT).removeClass("hidden");a.find(j.EMPTY_MESSAGE).addClass("hidden");a.find(j.LOADING_PLACEHOLDER).addClass("hidden")},s=function(a){var b=a.find(j.PAGING_BAR);b.css("opacity",1);b.css("visibility","visible");i.unhide(b)},t=function(a){var b=a.find(j.PAGING_BAR);b.css("opacity",0);b.css("visibility","hidden");i.hide(b)},u=function(a,b){l.forEach(function(a){if(a.attr("data-course-id")==b){a.find(j.COURSE_IS_FAVOURITE).removeClass("hidden")}})},v=function(a,b){l.forEach(function(a){if(a.attr("data-course-id")==b){a.find(j.COURSE_IS_FAVOURITE).addClass("hidden")}})},w=function(b){var d=a(j.BLOCK_CONTAINER).data("displaycoursecategory"),e=b.map(function(a){a.showcoursecategory=d;return f.render("block_recentlyaccessedcourses/course-card",a)});return a.when.apply(null,e).then(function(){var b=[];e.forEach(function(d){d.then(function(c){b.push(a(c))}).catch(c.exception)});return b})},x=function(a){return h.getLastAccessedCourses(a,10).then(function(a){return w(a)})},y=function(a){var b=a.find(j.CONTENT).find(j.CARD_CONTAINER),c=parseFloat(a.css("width")),d=l.length,f=0;if(!n){b.html(l[0]);n=l[0].outerWidth(!0)}p=Math.floor(c/n);if(o+ph.length){b.addClass("justify-content-center");b.removeClass("justify-content-start")}else{b.removeClass("justify-content-center");b.addClass("justify-content-start")}if(m!=i){var k=a.find(e.rootSelector);b.html(h);m=i;if(p>=l.length){t(a)}else{s(a);if(0===o){e.disablePreviousControlButtons(k)}else{e.enablePreviousControlButtons(k)}if(o+p>=l.length){e.disableNextControlButtons(k)}else{e.enableNextControlButtons(k)}}}},z=function(c){var e=null,f=!1;d.subscribe(g.favourited,function(a){u(c,a)});d.subscribe(g.unfavorited,function(a){v(c,a)});d.subscribe("nav-drawer-toggle-start",function(){if(!k||!l.length||f){return}f=!0;var a=0,b=function(){setTimeout(function(){y(c);a++;if(5>a&&f){b()}},100)};b(c)});d.subscribe("nav-drawer-toggle-end",function(){f=!1});a(window).on("resize",function(){if(!k||!l.length){return}if(!e){e=setTimeout(function(){e=null;y(c)},66)}});b.define(c,[b.events.activate]);c.on(b.events.activate,j.PAGING_BAR_NEXT,function(b,d){var e=a(b.target).closest(j.PAGING_BAR_NEXT);if(!e.hasClass("disabled")){o=o+p;y(c)}d.originalEvent.preventDefault()});c.on(b.events.activate,j.PAGING_BAR_PREVIOUS,function(b,d){var e=a(b.target).closest(j.PAGING_BAR_PREVIOUS);if(!e.hasClass("disabled")){o=o-p;o=0>o?0:o;y(c)}d.originalEvent.preventDefault()})};return{init:function init(b,d){d=a(d);z(d);x(b).then(function(a){l=a;k=!0;if(l.length){r(d);y(d)}else{q(d)}}).catch(c.exception)}}}); define ("block_recentlyaccesseditems/main",["jquery","block_recentlyaccesseditems/repository","core/templates","core/notification"],function(a,b,c,d){var e={CARDDECK_CONTAINER:"[data-region=\"recentlyaccesseditems-view\"]",CARDDECK:"[data-region=\"recentlyaccesseditems-view-content\"]"},f=function(a){return b.getRecentItems(a)},g=function(a,b){if(0"+f.html()+"")}d.finishExpandingGroup=function(c){b.prototype.finishExpandingGroup.call(this,c);Y.use("moodle-core-event",function(){Y.Global.fire(M.core.globalEvents.BLOCK_CONTENT_UPDATED,{instanceid:a})})};d.collapseGroup=function(c){b.prototype.collapseGroup.call(this,c);Y.use("moodle-core-event",function(){Y.Global.fire(M.core.globalEvents.BLOCK_CONTENT_UPDATED,{instanceid:a})})}}}}); define ("block_starredcourses/main",["jquery","core/notification","block_starredcourses/repository","core/pubsub","core/templates","core_course/events"],function(a,b,c,d,e,f){var g={BLOCK_CONTAINER:"[data-region=\"starred-courses\"]",STARRED_COURSES_REGION_VIEW:"[data-region=\"starred-courses-view\"]",STARRED_COURSES_REGION:"[data-region=\"starred-courses-view-content\"]"},h=function(a,b){if(0b},G=function(a,b,c){var d=a.map(function(a){return a.id});return C(d,b,k+1,c)},H=function(a,b,c,d,f,g){return e.render(j.COURSE_ITEMS,{courses:a,midnight:c,hasdaysoffset:!0,hasdayslimit:f!=void 0,daysoffset:d,dayslimit:f,nodayslimit:f==void 0,urls:{noevents:g}}).then(function(a){m(b);if(a){s(b,a)}else{if(!t(b)){r(b)}}return a}).then(function(c){if(a.length<2){n(b)}else{o(b)}return c}).catch(function(){m(b)})},I=function(c){var e=u(c),h=w(c);return g.getEnrolledCoursesByTimelineClassification("inprogress",h,e,"fullname asc").then(function(b){var e=Date.now(),g=b.courses,h=b.nextoffset,i=x(c),j=y(c),l=z(c),m=A(c),n=B(c),o=c.attr("data-no-events-url");v(c,h);var p=G(g,m,n),q=H(g,c,l,i,j,o);return a.when(p,q).then(function(b){if(F(c,e)){return b}g.forEach(function(e){var g=e.id,h=[],i=c.find("[data-region=\"course-events-container\"][data-course-id=\""+g+"\"]"),j=i.find(f.rootSelector),l=b.groupedbycourse.filter(function(a){return a.courseid==g});if(l.length){h=l[0].events}var m=a.Deferred().resolve({events:h}).promise();d.get_string("ariaeventlistpaginationnavcourses","block_timeline",e.fullnamedisplay).then(function(a){f.init(j,k,{1:m},a);return a}).catch(function(){f.init(j,k,{1:m})})});return b})}).catch(b.exception)},J=function(c){var e=Date.now(),g=A(c),h=B(c),j=c.find(i.COURSE_EVENTS_CONTAINER),l=j.map(function(){return a(this).attr("data-course-id")}).get();E(c,e);return C(l,g,k+1,h).then(function(b){if(F(c,e)){return b}j.each(function(c,e){e=a(e);var g=e.attr("data-course-id"),h=e.find(i.COURSE_NAME).text(),j=e.find(f.rootSelector),l=a.Deferred(),m=[],n=b.groupedbycourse.filter(function(a){return a.courseid==g});if(n.length){m=n[0].events}l.resolve({events:m});d.get_string("ariaeventlistpaginationnavcourses","block_timeline",h).then(function(a){f.init(j,k,{1:l.promise()},a);return a}).catch(function(){f.init(j,k,{1:l.promise()})})});return b}).catch(b.exception)},K=function(a){c.define(a,[c.events.activate]);a.on(c.events.activate,i.MORE_COURSES_BUTTON,function(b,c){p(a);I(a).then(function(){q(a)}).catch(function(){q(a)});if(c){c.originalEvent.preventDefault();c.originalEvent.stopPropagation()}b.stopPropagation()})},L=function(a){if(!a.attr("data-seen")){if(t(a)){J(a)}else{I(a)}a.attr("data-seen",!0)}};return{init:function init(b){b=a(b);E(b,Date.now());if(b.hasClass("active")){I(b);b.attr("data-seen",!0)}K(b)},reset:function reset(a){a.removeAttr("data-seen");if(a.hasClass("active")){L(a)}},shown:L}}); define ("block_timeline/event_list",["jquery","core/notification","core/templates","core/paged_content_factory","core/str","core/user_date","block_timeline/calendar_events_repository"],function(a,b,c,d,e,f,g){var h={EMPTY_MESSAGE:"[data-region=\"empty-message\"]",ROOT:"[data-region=\"event-list-container\"]",EVENT_LIST_CONTENT:"[data-region=\"event-list-content\"]",EVENT_LIST_LOADING_PLACEHOLDER:"[data-region=\"event-list-loading-placeholder\"]"},i={EVENT_LIST_CONTENT:"block_timeline/event-list-content"},j={ignoreControlWhileLoading:!0,controlPlacementBottom:!0,ariaLabels:{itemsperpagecomponents:"ariaeventlistpagelimit, block_timeline"}},k=function(a){a.find(h.EVENT_LIST_CONTENT).addClass("hidden");a.find(h.EMPTY_MESSAGE).removeClass("hidden")},l=function(a){a.find(h.EVENT_LIST_CONTENT).removeClass("hidden");a.find(h.EMPTY_MESSAGE).addClass("hidden")},m=function(a){a.find(h.EVENT_LIST_CONTENT).empty()},n=function(a,b){var c={},d={eventsbyday:[]};a.forEach(function(a){var b=a.timeusermidnight;if(c[b]){c[b].push(a)}else{c[b]=[a]}});Object.keys(c).forEach(function(a){var e=c[a];d.eventsbyday.push({past:ac}return!0}),e=d.length<=k;if(e){b.allItemsLoaded(j)}else{d.pop()}return d})},r=function(c,f,g,h,i,k,l,m,n){var p={1:0},r=!1,s=a.extend({},j,n);return e.get_string("ariaeventlistpagelimit","block_timeline",a.isArray(c)?c[0].value:c).then(function(a){s.ariaLabels.itemsperpage=a;s.ariaLabels.paginationnav=m;return a}).then(function(){return d.createWithLimit(c,function(c,d){var e=[];c.forEach(function(a){var c=a.pageNumber,h=q(a,d,g,p,f,i,k,l).then(function(a){if(a.length){r=!0;var b=a[a.length-1].id;p[c+1]=b;return o(a,g)}else{return a}}).catch(b.exception);e.push(h)});a.when.apply(a,e).then(function(){h.resolve(r)}).catch(function(){h.resolve(r)});return e},s)})};return{init:function init(d,e,f,g,i){d=a(d);var j=a.Deferred(),n=d.find(h.EVENT_LIST_CONTENT),o=d.find(h.EVENT_LIST_LOADING_PLACEHOLDER),p=d.attr("data-course-id"),q=parseInt(d.attr("data-days-offset"),10),s=d.attr("data-days-limit"),t=parseInt(d.attr("data-midnight"),10);m(d);l(d);o.removeClass("hidden");if(s!=void 0){s=parseInt(s,10)}return r(e,f,t,j,p,q,s,g,i).then(function(b,e){b=a(b);b.addClass("hidden");c.replaceNodeContents(n,b,e);j.then(function(a){b.removeClass("hidden");o.addClass("hidden");if(!a){k(d)}return a}).catch(function(){return!1});return b}).catch(b.exception)},rootSelector:h.ROOT}}); define ("block_timeline/view_dates",["jquery","core/str","block_timeline/event_list","core/pubsub","core/paged_content_events"],function(a,b,c,d,e){var f={EVENT_LIST_CONTAINER:"[data-region=\"event-list-container\"]"},g=[5,10,25],h=function(a){var b=parseInt(a.data("limit"),10),c=!1,d=g.map(function(a){if(b==a){c=!0}return{value:a,active:b==a}});if(!c){d[0].active=!0}return d},i=function(b,c){var f=c+e.SET_ITEMS_PER_PAGE_LIMIT;d.subscribe(f,function(c){a(b).data("limit",c)})},j=function(d){var e=d.find(f.EVENT_LIST_CONTAINER),g=a(e).attr("id")+"user_block_timeline"+Math.random();i(d,g);var j=h(d),k={persistentLimitKey:"block_timeline_user_limit_preference",eventNamespace:g};b.get_string("ariaeventlistpaginationnavdates","block_timeline").then(function(a){c.init(e,j,{},a,k);return a}).catch(function(){c.init(e,j,{},"",k)})};return{init:function init(b){b=a(b);if(b.hasClass("active")){j(b);b.data("seen",!0)}},reset:function reset(a){a.removeAttr("data-seen");if(a.hasClass("active")){j(a);a.data("seen",!0)}},shown:function shown(a){if(!a.data("seen")){j(a);a.data("seen",!0)}}}}); define ("block_timeline/view_nav",["jquery","core/custom_interaction_events","block_timeline/view","core/ajax","core/notification"],function(a,b,c,d,e){var f={TIMELINE_DAY_FILTER:"[data-region=\"day-filter\"]",TIMELINE_DAY_FILTER_OPTION:"[data-from]",TIMELINE_VIEW_SELECTOR:"[data-region=\"view-selector\"]",DATA_DAYS_OFFSET:"[data-days-offset]",DATA_DAYS_LIMIT:"[data-days-limit]"},g=function(a,b){d.call([{methodname:"core_user_update_user_preferences",args:{preferences:[{type:a,value:b}]}}])[0].fail(e.exception)},h=function(d,h){var i=d.find(f.TIMELINE_DAY_FILTER);b.define(i,[b.events.activate]);i.on(b.events.activate,f.TIMELINE_DAY_FILTER_OPTION,function(b,e){var i=a(b.currentTarget).data("filtername");g("block_timeline_user_filter_preference",i);var j=a(b.target).closest(f.TIMELINE_DAY_FILTER_OPTION);if("true"==j.attr("aria-current")){return}var k=j.attr("data-from"),l=j.attr("data-to"),m=d.find(f.DATA_DAYS_OFFSET);m.attr("data-days-offset",k);if(l!=void 0){m.attr("data-days-limit",l)}else{m.removeAttr("data-days-limit")}c.reset(h);e.originalEvent.preventDefault()})},i=function(d,h){var i=d.find(f.TIMELINE_VIEW_SELECTOR);i.on("shown shown.bs.tab",function(b){c.shown(h);a(b.target).removeClass("active")});b.define(i,[b.events.activate]);i.on(b.events.activate,"[data-toggle='tab']",function(b){var c=a(b.currentTarget).data("filtername");g("block_timeline_user_sort_preference",c)})};return{init:function init(b,c){b=a(b);h(b,c);i(b,c)}}}); define ("block_timeline/calendar_events_repository",["jquery","core/ajax","core/notification"],function(a,b,c){return{queryByTime:function queryByTime(a){if(!a.hasOwnProperty("limit")){a.limit=20}a.limitnum=a.limit;delete a.limit;if(a.hasOwnProperty("starttime")){a.timesortfrom=a.starttime;delete a.starttime}if(a.hasOwnProperty("endtime")){a.timesortto=a.endtime;delete a.endtime}a.limittononsuspendedevents=!0;var d=b.call([{methodname:"core_calendar_get_action_events_by_timesort",args:a}])[0];d.fail(c.exception);return d},queryByCourse:function queryByCourse(a){if(!a.hasOwnProperty("limit")){a.limit=20}a.limitnum=a.limit;delete a.limit;if(a.hasOwnProperty("starttime")){a.timesortfrom=a.starttime;delete a.starttime}if(a.hasOwnProperty("endtime")){a.timesortto=a.endtime;delete a.endtime}var d=b.call([{methodname:"core_calendar_get_action_events_by_course",args:a}])[0];d.fail(c.exception);return d},queryByCourses:function queryByCourses(a){if(!a.hasOwnProperty("limit")){a.limit=10}a.limitnum=a.limit;delete a.limit;if(a.hasOwnProperty("starttime")){a.timesortfrom=a.starttime;delete a.starttime}if(a.hasOwnProperty("endtime")){a.timesortto=a.endtime;delete a.endtime}var d=b.call([{methodname:"core_calendar_get_action_events_by_courses",args:a}])[0];d.fail(c.exception);return d}}}); define ("block_timeline/view",["jquery","block_timeline/view_dates","block_timeline/view_courses"],function(a,b,c){var d={TIMELINE_DATES_VIEW:"[data-region=\"view-dates\"]",TIMELINE_COURSES_VIEW:"[data-region=\"view-courses\"]"};return{init:function init(e){e=a(e);var f=e.find(d.TIMELINE_DATES_VIEW),g=e.find(d.TIMELINE_COURSES_VIEW);b.init(f);c.init(g)},reset:function reset(a){var e=a.find(d.TIMELINE_DATES_VIEW),f=a.find(d.TIMELINE_COURSES_VIEW);b.reset(e);c.reset(f)},shown:function shown(a){var e=a.find(d.TIMELINE_DATES_VIEW),f=a.find(d.TIMELINE_COURSES_VIEW);if(e.hasClass("active")){b.shown(e)}else{c.shown(f)}}}}); define ("media_videojs/document",[],function(){return document}); define ("media_videojs/window",[],function(){return window}); define ("media_videojs/loader",["exports","core/config","core/event","jquery","core/ajax","core/localstorage","core/notification"],function(a,b,c,d,e,f,g){"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.setUp=void 0;b=h(b);c=h(c);d=h(d);e=h(e);f=h(f);g=h(g);var o="undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:{};function h(a){return a&&a.__esModule?a:{default:a}}function i(a,b){return n(a)||m(a,b)||k(a,b)||j()}function j(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function k(a,b){if(!a)return;if("string"==typeof a)return l(a,b);var c=Object.prototype.toString.call(a).slice(8,-1);if("Object"===c&&a.constructor)c=a.constructor.name;if("Map"===c||"Set"===c)return Array.from(c);if("Arguments"===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return l(a,b)}function l(a,b){if(null==b||b>a.length)b=a.length;for(var c=0,d=Array(b);c
    ',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},p.prototype.init=function(t,e,i){if(this.enabled=!0,this.type=t,this.$element=l(e),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&l(l.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var o=this.options.trigger.split(" "),n=o.length;n--;){var s,r=o[n];"click"==r?this.$element.on("click."+this.type,this.options.selector,l.proxy(this.toggle,this)):"manual"!=r&&(s="hover"==r?"mouseleave":"focusout",this.$element.on(("hover"==r?"mouseenter":"focusin")+"."+this.type,this.options.selector,l.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,l.proxy(this.leave,this)))}this.options.selector?this._options=l.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},p.prototype.getDefaults=function(){return p.DEFAULTS},p.prototype.getOptions=function(t){return(t=l.extend({},this.getDefaults(),this.$element.data(),t)).delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t},p.prototype.getDelegateOptions=function(){var i={},o=this.getDefaults();return this._options&&l.each(this._options,function(t,e){o[t]!=e&&(i[t]=e)}),i},p.prototype.enter=function(t){var e=t instanceof this.constructor?t:l(t.currentTarget).data("bs."+this.type);if(e||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),l(t.currentTarget).data("bs."+this.type,e)),t instanceof l.Event&&(e.inState["focusin"==t.type?"focus":"hover"]=!0),e.tip().hasClass("in")||"in"==e.hoverState)e.hoverState="in";else{if(clearTimeout(e.timeout),e.hoverState="in",!e.options.delay||!e.options.delay.show)return e.show();e.timeout=setTimeout(function(){"in"==e.hoverState&&e.show()},e.options.delay.show)}},p.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},p.prototype.leave=function(t){var e=t instanceof this.constructor?t:l(t.currentTarget).data("bs."+this.type);if(e||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),l(t.currentTarget).data("bs."+this.type,e)),t instanceof l.Event&&(e.inState["focusout"==t.type?"focus":"hover"]=!1),!e.isInStateTrue()){if(clearTimeout(e.timeout),e.hoverState="out",!e.options.delay||!e.options.delay.hide)return e.hide();e.timeout=setTimeout(function(){"out"==e.hoverState&&e.hide()},e.options.delay.hide)}},p.prototype.show=function(){var e,t,i,o,n,s,r,a=l.Event("show.bs."+this.type);this.hasContent()&&this.enabled&&(this.$element.trigger(a),i=l.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]),!a.isDefaultPrevented()&&i&&(t=(e=this).tip(),s=this.getUID(this.type),this.setContent(),t.attr("id",s),this.$element.attr("aria-describedby",s),this.options.animation&&t.addClass("fade"),r="function"==typeof this.options.placement?this.options.placement.call(this,t[0],this.$element[0]):this.options.placement,(n=(o=/\s?auto?\s?/i).test(r))&&(r=r.replace(o,"")||"top"),t.detach().css({top:0,left:0,display:"block"}).addClass(r).data("bs."+this.type,this),this.options.container?t.appendTo(this.options.container):t.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type),a=this.getPosition(),i=t[0].offsetWidth,s=t[0].offsetHeight,n&&(o=r,n=this.getPosition(this.$viewport),r="bottom"==r&&a.bottom+s>n.bottom?"top":"top"==r&&a.top-sn.width?"left":"left"==r&&a.left-ia.top+a.height&&(n.top=a.top+a.height-s)):(s=e.left-r,i=e.left+r+i,sa.right&&(n.left=a.left+a.width-i)),n},p.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr("data-original-title")||("function"==typeof e.title?e.title.call(t[0]):e.title)},p.prototype.getUID=function(t){for(;t+=~~(1e6*Math.random()),document.getElementById(t););return t},p.prototype.tip=function(){if(!this.$tip&&(this.$tip=l(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},p.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},p.prototype.enable=function(){this.enabled=!0},p.prototype.disable=function(){this.enabled=!1},p.prototype.toggleEnabled=function(){this.enabled=!this.enabled},p.prototype.toggle=function(t){var e=this;t&&((e=l(t.currentTarget).data("bs."+this.type))||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),l(t.currentTarget).data("bs."+this.type,e))),t?(e.inState.click=!e.inState.click,e.isInStateTrue()?e.enter(e):e.leave(e)):e.tip().hasClass("in")?e.leave(e):e.enter(e)},p.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null})};var e=l.fn.gridtooltip;return l.fn.gridtooltip=function(o){return this.each(function(){var t=l(this),e=t.data("bs.gridtooltip"),i="object"==typeof o&&o;!e&&/destroy|hide/.test(o)||(e||t.data("bs.gridtooltip",e=new p(this,i)),"string"==typeof o&&e[o]())})},l.fn.gridtooltip.Constructor=p,l.fn.gridtooltip.noConflict=function(){return l.fn.gridtooltip=e,this},t.debug("Grid Format AMD"),{init:function(){l(document).ready(function(t){t("[data-toggle=gridtooltip]").gridtooltip()}),t.debug("Grid Format AMD init")}}}); function _typeof(a){"@babel/helpers - typeof";if("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator){_typeof=function(a){return typeof a}}else{_typeof=function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a}}return _typeof(a)}define ("format_onetopic/main",["exports","format_onetopic/oneline"],function(a,b){"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.init=void 0;b=d(b);function c(){if("function"!=typeof WeakMap)return null;var a=new WeakMap;c=function(){return a};return a}function d(a){if(a&&a.__esModule){return a}if(null===a||"object"!==_typeof(a)&&"function"!=typeof a){return{default:a}}var b=c();if(b&&b.has(a)){return b.get(a)}var d={},e=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in a){if(Object.prototype.hasOwnProperty.call(a,f)){var g=e?Object.getOwnPropertyDescriptor(a,f):null;if(g&&(g.get||g.set)){Object.defineProperty(d,f,g)}else{d[f]=a[f]}}}d.default=a;if(b){b.set(a,d)}return d}var e=function(a,c){if(2==a){b.load(c)}};a.init=e}); define ("format_onetopic/oneline",["exports","jquery"],function(a,b){"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.load=void 0;b=function(a){return a&&a.__esModule?a:{default:a}}(b);var c=function(a){(0,b.default)(".onetopic .tabs-wrapper").each(function(){var c=(0,b.default)(this),d=c.find("> ul.nav.nav-tabs"),e=d.find("> li.nav-item").length,f=d.find("> li.nav-item").outerWidth(!0),g=300,h=20,i=(0,b.default)(""),j=(0,b.default)("");c.append(i);c.append(j);var k=function(){return e*f},l=function(){return d.scrollLeft()},m=function(){return c.width()},n=function(){return d.get(0).scrollWidth>d.get(0).clientWidth},o=function(){return s-l()-q},p=function(){return d.get(0).scrollWidth-d.get(0).clientWidth};if(n()){c.addClass("hasscroll")}var q=m(),r=function getMenuWrapperPadding(){return c.outerWidth()-c.width()}(),s=k(),t=o();(0,b.default)(window).on("resize",function(){q=m();s=k();u()});var u=function(){var a=l();t=o();var b=p(),d=t-h;if(!n()){i.addClass("hidden");j.addClass("hidden");c.removeClass("hasscroll")}else{c.addClass("hasscroll");if(a<=h){i.addClass("hidden");j.removeClass("hidden")}else if(a=d){i.removeClass("hidden");j.addClass("hidden")}}};d.on("scroll",function(){u()});j.on("click",function(a){a.preventDefault();var b=l()+.8*q;d.animate({scrollLeft:b},g)});i.on("click",function(a){a.preventDefault();var b=l()-.8*q;d.animate({scrollLeft:b},g)});var v=c.find(".nav-link.active");if(0a){let e=a;a=n,n=e}let r,c,l,u;for(let d=n;d<=a;d++){let n=e.Node.create(""+o.sectiontitles[d]+"");t.item(d).all("."+s).setHTML(n),l=(c=(r=t.item(d).one(i)).getAttribute("alt")).lastIndexOf(" "),u=c.substr(0,l+1)+d,r.setAttribute("alt",u),r.setAttribute("title",u)}}},e(".section-file").on("change",function(o){let n=o.target.dataset.sectionid,a=o.target.dataset.courseid;if(console.log(a),a){let s=o.target.files[0],i=null;if(!s.type.match("image.*"))return;let r=this,c=new FileReader;c.onload=(s=s,function(o){i=o.target.result,e(r).parent().parent().css("background-image","url("+i+")"),e(r).parent().parent().addClass("not-empty");let c=i.split("base64,")[1],l=s.name;t.call([{methodname:"format_softcourse_update_section_image",args:{courseid:a,sectionid:n,imagedata:c,filename:l},fail:function(e){window.console.error(e)}}],!0,!0)}),c.readAsDataURL(s)}var s}),e(".section-delete-file").on("click",function(o){o.preventDefault(),o.stopPropagation();let n=o.target.dataset.sectionid,a=o.target.dataset.courseid;e(this).parent().parent().css("background-image","none"),e(this).parent().parent().removeClass("not-empty"),t.call([{methodname:"format_softcourse_delete_section_image",args:{courseid:a,sectionid:n},fail:function(e){window.console.error(e)}}],!0,!0)}),e('[data-toggle="tooltip"]').tooltip()}}}); define ("format_tiles/browser_storage",["jquery","format_tiles/browser_storage_set_up"],function(a,b){"use strict";var c,d,e={prefix:"mdl-tiles-",course:"mdl-tiles-course-",lastSection:"-lastSecId",content:"-content",lastUpdated:"-lastUpdated",collapseSecZero:"-collapsesec0",user:"-user-",section:"-sec-",userChoicePrefix:"mdl-tiles-userPrefStorage-"},f=function(){return e.course+c+e.user+d+e.lastSection},g=function(){return e.course+c+e.user+d+e.collapseSecZero},h=function setLastVisitedSection(a){if(a&&b.Enabled.local){localStorage.setItem(f(),a.toString())}else{localStorage.removeItem(f())}};return{init:function init(e,f,g,i,j){c=e.toString();d=j.toString();b.init(d,i);a(document).ready(function(){if(f){h(g)}})},storageEnabledSession:function storageEnabledSession(){return b.Enabled.session},storageEnabledLocal:function storageEnabledLocal(){return b.Enabled.local},getLastVisitedSection:function getLastVisitedSection(){return b.Enabled.local&&localStorage.getItem(f())},setSecZeroCollapseStatus:function setSecZeroCollapseStatus(a){if(b.Enabled.local&&b.storageAllowed()){if("collapsed"===a){localStorage.removeItem(g())}else{localStorage.setItem(g(),"1")}}},getSecZeroCollapseStatus:function getSecZeroCollapseStatus(){return!!localStorage.getItem(g())},setLastVisitedSection:function setLastVisitedSection(a){if(b.storageAllowed()){h(a)}}}}); define ("format_tiles/edit_course",["jquery","core/config","core/str","core/ajax","format_tiles/edit_browser_storage"],function(a,b,c,d,e){"use strict";var f={EDITING_COLLAPSE_SECID:"#collapse",EDITING_COLLAPSE_SEC:".collapse-section",EDITING_EXPAND_SEC:".expand-section",EDITING_EXPAND_SECID:"#expand",ACTIVITY:"li.activity",SECTION_ID:"#section-",TILE_TITLE:"li.section.main .tile_bar_text .inplaceeditable a:not(.quickeditlink)",TILE_BAR_TEXT:".tile_bar_text",SECTION:"ul.section",SECTION_MAIN:"li.section.main",DNDUPLOAD_HIDDEN:"dndupload-hidden",ACTIVITYACTION:"a.cm-edit-action",ACTIONAREA:".actions",EXPAND_ALL_BTNS:".expand-collapse-all-btns a",EXPAND_COLLAPSE_SEC:".expand-collapse-sec ",EDIT_TITLE_PENCIL:".quickeditlink",ICON_PICKER_BTN:".tileiconcontainer",TILE_BAR:".tile_bar",SECTIONACTIONMENU:".section_action_menu",MENU_ACTION:".menu-action"},g={ESCAPE:27,TAB:9,RETURN:13},h={CLICK:"click",KEYDOWN:"keydown",SCROLL:"scroll"},i={SECTION:"data-section",ORIG_TITLE:"data-original-title"},j,k=function(b){var c=a(f.SECTION_ID+b);a(f.SECTION_ID+b+"-content").animate({opacity:0},300);c.find(f.ACTIVITY).slideUp(500);c.find(".section-modchooser").slideUp(500);c.addClass("collapsed").removeClass("expanded");c.find(".mod-chooser-outer").fadeOut(500);e.setSectionStatus(b,!1)};return{init:function init(c,d,l,m,n,o,p,q,r,s,t,u,v,w,x){j=c;o="1"===o;require(["format_tiles/edit_icon_picker"],function(a){a.init(j,t,u,x)});if(v){require(["format_tiles/edit_course_mod"],function(a){a.init(j,m,w)})}a(document).ready(function(){a(f.TILE_BAR_TEXT).on(h.KEYDOWN,function(c){if(c.keyCode===g.RETURN&&!a(c.target).hasClass("form-control")){window.location=b.wwwroot+"/course/view.php?id="+j+"§ion="+a(c.currentTarget).parent().attr(i.SECTION)}});if(d&&!l){var c=-1!==window.location.search.indexOf("expanded=-1"),m=a(f.SECTION_MAIN).last().attr("data-section");e.init(q,j,o,m,c)}if(!l){var n=a("[data-toggle=tooltip]");if(0!==n.length&&"function"==typeof n.tooltip){try{n.tooltip()}catch(a){require(["core/log"],function(b){b.debug(a)})}}}a("body").on("click keypress",f.SECTION_MAIN+" "+f.SECTIONACTIONMENU+"[data-true-sectionid] a[data-action]",function(b){var c=a(b.target).closest(f.MENU_ACTION),d=c.closest(f.SECTION_MAIN);if("hide"===c.attr("data-action")||"show"===c.attr("data-action")){k(d.attr("data-section"));d.find(f.SECTION).find(f.ACTIVITY).slideUp(300).remove()}})})}}}); define ("format_tiles/edit_course_mod",["jquery","core/ajax","core/templates","core/notification","core/str","core/url","core/config"],function(a,b,c,d,e,f,g){"use strict";var h={},i=a("html,body"),j=a("#page"),k={MENU_ACTION:".menu-action-text",SUBTILE:".subtile",SPACER:".spacer",AVAIL_INFO:".availabilityinfo",ACTIVITY_INSTANCE:".subtile-activityinstance",INSTANCE_NAME:".instancename",SECTION_CM_EDIT_ACTIONS:".section-cm-edit-actions",EDITING_MOVE:".editing_move",LABEL_CONVERT:".editing_labelconvert",CM_EDIT_ACTION:".cm-edit-action",ACTIVITY_ICON:".activityicon",EDITING_DELETE:".editing_delete",SECTION_MAIN:".section.main",STEALTH_UNAVAIL_LINK:".editing_makeunavailable"},l={SHOW:"show",HIDE:"hide",FA_EYE_SLASH:"fa-eye-slash",FA_EYE:"fa-eye",DIMMED:"dimmed",EDITING:"editing_",ACTIVITY:"activity",LABEL:"label",SECTION_DRAGGABLE:"sectiondraggable"},m={CLICK:"click",MODULE_ADDED:"filter-content-updated",MOUSEDOWN:"mousedown"},n=function(c){var d=a(c.currentTarget),e;if("tiles-hide"===d.attr("data-action")){e={changeTo:l.HIDE,old:l.SHOW};a(k.STEALTH_UNAVAIL_LINK).hide()}else if("tiles-show"===d.attr("data-action")){e={changeTo:l.SHOW,old:l.HIDE}}if(e){c.preventDefault();d.attr("data-action","tiles-"+e.old);var f=b.call([{methodname:"core_course_edit_module",args:{id:d.attr("data-cmid"),action:e.changeTo}}],!0);f[0].done(function(b){d.removeClass(l.EDITING+e.old).addClass(l.EDITING+e.changeTo);d.attr("href",d.attr("href").replace("&"+e.old+"=","&"+e.changeTo+"="));var c=d.find(k.MENU_ACTION),f=d.closest(k.SUBTILE);if(e.changeTo===l.SHOW){c.html(c.html().replace(h.show,h.hide));d.find("i").removeClass(l.FA_EYE_SLASH).addClass(l.FA_EYE);f.removeClass(l.DIMMED)}else if(e.changeTo===l.HIDE){c.html(c.html().replace(h.hide,h.show));d.find("i").removeClass(l.FA_EYE).addClass(l.FA_EYE_SLASH);f.addClass(l.DIMMED)}var g=a(b).find(k.AVAIL_INFO),i=f.find(k.AVAIL_INFO);if(g){if(i.length){i.replaceWith(g)}else{g.appendTo(f.find(k.ACTIVITY_INSTANCE))}}else{i.hide()}});f[0].fail(function(){window.location.replace(d.attr("href"))})}},o=function(a){return{powerpoint:"ppt",document:"doc",spreadsheet:"xls",archive:"zip",pdf:"pdf",mp3:"mp3",mpeg:"mp4",jpeg:"jpeg",text:"txt",html:"html"}[a.split("/").slice(-1)[0].split("-")[0]]},p=function(b,c,d){if(d===void 0||""===d){d=h.other}b.find("a.cm-edit-action").each(function(b,c){a(c).attr("data-action","")});b.find("a.editing_moveright").remove();var e={cmid:b.attr("id").split("-").slice(-1)[0],modtitle:b.find(k.INSTANCE_NAME).html().split("<")[0],cmeditmenu:b.find(k.SECTION_CM_EDIT_ACTIONS)[0].outerHTML.replace(/\n/g,""),cmmove:b.find(k.EDITING_MOVE)[0].outerHTML,modname:"resource",modResourceType:c,modnameDisplay:d,useSubtiles:1,isEmbeddedResource:0,clickable:1,isediting:1,visible:1};e.isPdf="pdf"===e.modResourceType;return e},q=function(b,d,j,n){if(j.hasClass(l.SECTION_DRAGGABLE)&&-1===window.location.href.indexOf("expand=")){window.location=g.wwwroot+"/course/view.php?id="+b+"&expand="+j.attr("data-section")+"#section-"+j.attr("data-section")}else if(d.hasClass(l.LABEL)&&d.closest("ul").hasClass("subtiles")){window.location.reload()}else if(d.hasClass(l.ACTIVITY)&&d.closest("ul").hasClass("subtiles")){d.children().hide();d.append(a("").attr("src",f.imageUrl("loading","format_tiles")).addClass("loading-subtile").attr("title",h.loading));var q=d.prevAll(k.SUBTILE).not(k.SPACER).first();d.prevUntil(q,k.SPACER).hide();var r=o(d.find(k.ACTIVITY_ICON).attr("src"));if(r===void 0){window.location.reload()}var s="displaytitle_mod_"+r;if(h[s]===void 0){e.get_string(s,"format_tiles").done(function(b){if("[["!==b.substring(0,2)){h[s]=b}else{b=""}var e=p(d,r,b);c.render("format_tiles/course_module",e).done(function(b){d.replaceWith(b);var c=a("#"+a(n).attr("id"));i.animate({scrollTop:c.offset().top-130},"fast");for(var f=0;3>f;f++){c.fadeOut(300).fadeIn(300)}a("#module-"+e.cmid).find(".editing_move").attr("data-action","").on(m.MOUSEDOWN,function(){window.location.reload()})})})}else{var t=p(d,r,h[s]);c.render("format_tiles/course_module",t).done(function(b){d.replaceWith(b);a("#module-"+t.cmid).find(".editing_move").attr("data-action","").on(m.MOUSEDOWN,function(){window.location.reload()})})}}else{d.find("div.mod-indent-outer").css("position","absolute").css("top","0").css("width","100%").css("padding-left","0")}};return{init:function init(b,c,f){a(document).ready(function(){Y.use("moodle-course-coursebase",function(){if("undefined"!=typeof M.course){setTimeout(function(){M.course.coursebase.registermodules=[]},500)}});a(k.LABEL_CONVERT).on(m.CLICK,function(b){b.preventDefault();d.confirm(h.areyousure,h.converttopage_confirm,h.yes,h.no,function(){window.location=a(b.currentTarget).attr("href")},null)});if(0!==f){var c=a("#module-"+f);i.animate({scrollTop:c.offset().top-130},"fast");for(var g=0;3>g;g++){c.fadeOut(300).fadeIn(300)}}j.on("click",k.CM_EDIT_ACTION,function(a){n(a)});a(document).on(m.MODULE_ADDED,function(c,d){var e=a("#"+a(d).attr("id")),f=e.closest(k.SECTION_MAIN);if(1<=f.length){q(b,e,f,d)}});j.on(m.CLICK,k.EDITING_DELETE,function(b){var c=a(b.currentTarget).closest("li"+l.ACTIVITY),d=c.prevAll(k.SUBTILE).not(k.SPACER).first();if(c.hasClass(l.LABEL)){c.prevUntil(d,k.SPACER).hide()}});e.get_strings([{key:"yes"},{key:"no"},{key:"show"},{key:"hide"},{key:"converttopage_confirm",component:"format_tiles"},{key:"areyousure"},{key:"complete",component:"format_tiles"},{key:"fileaddedtobottom",component:"format_tiles"},{key:"loading",component:"format_tiles"}]).done(function(a){h={yes:a[0],no:a[1],show:a[2],hide:a[3],converttopage_confirm:a[4],areyousure:a[5],complete:a[6],fileaddedtobottom:a[7],loading:a[8]}})})}}}); define ("format_tiles/edit_actions",["jquery","core/str","core/notification"],function(a,b,c){"use strict";var d={ACTIONAREA:".actions"},e={EDITINPROGRESS:"editinprogress"},f=function getModuleName(a){var b="";Y.use("moodle-course-util",function(c){b=c.Moodle.core_course.util.cm.getName(c.Node(a.get(0)))});return b},g=function confirmDeleteModule(a,d){var e=a.attr("class").match(/modtype_([^\s]*)/)[1],g=f(a);b.get_string("pluginname",e).done(function(a){b.get_strings([{key:"confirm"},{key:null===g?"deletechecktype":"deletechecktypename",param:{type:a,name:g}},{key:"yes"},{key:"no"}]).done(function(a){c.confirm(a[0],a[1],a[2],a[3],d)}).fail(c.exception)})},h=function addActivitySpinner(a){a.addClass(e.EDITINPROGRESS);var b=a.find(d.ACTIONAREA).get(0);if(b){var c=M.util.add_spinner(Y,Y.Node(b));c.show();return c}return null},i=function addSectionLightbox(a){var b=M.util.add_lightbox(Y,Y.Node(a.get(0)));b.show();return b},j=function removeSpinner(a,b,c){window.setTimeout(function(){a.removeClass(e.EDITINPROGRESS);if(b){b.hide()}},c)},k=function removeLightbox(a,b){if(a){window.setTimeout(function(){a.hide()},b)}};return{confirmDeleteModule:function confirmDeleteModule(a,b){g(a,b)},removeLightbox:function removeLightbox(a,b){k(a,b)},removeSpinner:function removeSpinner(a,b,c){j(a,b,c)},getModuleName:function getModuleName(a){f(a)},addSectionLightbox:function addSectionLightbox(a){i(a)},addActivitySpinner:function addActivitySpinner(a){h(a)}}}); define ("format_tiles/edit_upload_image_helper",["jquery"],function(a){"use strict";return{init:function init(){a(document).ready(function(){a(".fp-btn-choose").click(function(){a("#id_headertag").addClass("collapsed");a("#id_guidance").addClass("collapsed")})})}}}); define ("format_tiles/registration",["jquery","core/notification","core/config","core/str"],function(a,b,c,d){"use strict";return{attemptRegistration:function attemptRegistration(e,f,g){g.useragent=navigator.userAgent;g.browserlanguages=navigator.languages;a(document).ready(function(){a.ajax({url:f,type:"POST",crossDomain:!0,contentType:"application/json",data:JSON.stringify(g),dataType:"json",success:function success(a){if(a.status){d.get_strings([{key:"registration",component:"admin"},{key:"registeredthanks",component:"format_tiles"},{key:"registerclicktocomplete",component:"format_tiles"},{key:"ok",component:"format_tiles"},{key:"cancel"}]).done(function(d){b.confirm(d[0],d[1]+" "+d[2],d[3],d[4],function(){window.location.href=c.wwwroot+"/course/format/tiles/register.php?key="+a.key+"&sesskey="+e},function(){window.location.href=c.wwwroot+"/admin/settings.php?section=formatsettingtiles"})})}},error:b.exception})})}}}); define ("format_tiles/edit_browser_storage",["jquery","format_tiles/browser_storage_set_up"],function(a,b){"use strict";var c={PAGE:"#page",EDITING_COLLAPSE_SECID:"#collapse",EDITING_COLLAPSE_SEC:".collapse-section",EDITING_EXPAND_SEC:".expand-section",EDITING_EXPAND_SECID:"#expand",SECTION_CONTENT:"li.section.main .content",SECTION_MAIN:"li.section.main",SECTION_ID:"#section-"},d,e,f={COURSE_VISIT:"mdl-tiles-editing-last-visit-course-",EDITING_COURSE:"mdl-tiles-editing-course-",SECTION:"-section-",COURSE:"mdl-tiles-course-",LAST_SECTION:"-lastSecId",USER:"-user-",PREFIX:"mdl-tiles-",USER_CHOICE_PREFIX:"mdl-tiles-userPrefStorage-",CONTENT_SUFFIX:"-content",LAST_UPDATED_SUFFIX:"-lastUpdated"},g={OPEN:"1",CLOSED:"0"},h,i=function(a){return f.EDITING_COURSE+d+f.SECTION+a+f.USER+e},j=function getOpenSections(a){if(!a||50e.width()-70){e.animate({"max-width":Math.max(f+70,o())},"fast");b.find(l.modal).animate({"max-width":Math.max(f+70,o())},"fast")}var g=Math.min(a(d).height(),j.height()),h=b.find(l.modalBody);if(g>h.height()-70){h.animate({"min-height":Math.min(g+70,j.height())+1},"fast")}p(b)})},t=function(a,b,c){var d=3d+10){s(a)}if(0"+c.attr("data-url")+"";require(["core/str","core/notification"],function(a,c){a.get_strings([{key:"sectionerrortitle",component:"format_tiles"},{key:"blockedpopup",component:"format_tiles"},{key:"cancel"}]).done(function(a){c.alert(a[0],a[1]+b,a[2])})})}}).fail(f.exception)}};return{init:function init(b,c){k=b;a(document).ready(function(){var b=Object.keys(n).map(function(a){return"[data-action=\""+n[a]+"\"]"}).join(", "),e=a(l.pageContent);if(0===e.length){e=a(l.regionMain)}e.on("click",b,function(b){b.preventDefault();var c=a(b.currentTarget),d=c.closest("li.activity"),e=h[d.attr("data-cmid")];if("object"===_typeof(e)){e.show()}else{switch(c.attr("data-action")){case n.launchModuleModal:u(d);break;case n.launchResourceModal:q(d);break;case n.launchUrlModal:r(d);break;default:throw new Error("Unknown modal type "+c.attr("data-action"));}g.call([{methodname:"format_tiles_log_mod_view",args:{courseid:k,cmid:d.attr("data-cmid")}}])[0].fail(f.exception)}if(0!==d.find(l.completionAuto).length){require(["format_tiles/completion"],function(a){a.triggerCompletionChangedEvent(d.closest(l.sectionMain).attr("data-section"))})}});d.render("format_tiles/loading",{}).catch(f.exception).done(function(a){i=a}).fail(f.exception);if(!c){e.on("click",l.URLACTIVITYPOPUPLINK,function(a){v(a)})}})}}}); define ("format_tiles/browser_storage_set_up",["jquery"],function(a){"use strict";var b={GIVEN:"yes",DENIED:"no"},c={userPrefStorage:"mdl-tiles-userPrefStorage",user:"-user-"},d={local:"local",session:"session"},e={local:!1,session:!1},f,g=null,h=function(){return c.userPrefStorage+c.user+f},i=function storageAllowed(){if(null!==g){return g}else{var a=localStorage.getItem(h());if(a){g=a===b.GIVEN;return g}else{return null}}},j=function setAllowed(a){if(a){g=!0;localStorage.setItem(h(),b.GIVEN)}else{g=!1;localStorage.setItem(h(),b.DENIED)}},k=function(){require(["core/str","core/notification"],function(a,b){a.get_strings([{key:"datapref",component:"format_tiles"},{key:"dataprefquestion",component:"format_tiles"},{key:"yes"},{key:"cancel"}]).done(function(a){b.confirm(a[0],a[1],a[2],a[3],function(){j(!0)},function(){j(!1)})})})},l=function(a){var b;try{if(a===d.local){b=localStorage}else if(a===d.session){b=sessionStorage}if("undefined"==typeof b){return!1}b.setItem("testItem","testValue");if("testValue"===b.getItem("testItem")){b.removeItem("testItem");return!0}return!1}catch(a){require(["core/log"],function(b){b.debug(a)});return!1}};return{setAllowed:function setAllowed(a){j(a)},storageAllowed:function storageAllowed(){return i()},getStorageKey:function getStorageKey(){return h()},Enabled:e,init:function init(b,c){f=b;a(document).ready(function(){e.local=l(d.local);e.session=l(d.session);if(c){g=!0}else if(null===i()&&e.local){setTimeout(function(){k()},3e3)}a("a[href*=\"datapref\"]").click(function(a){a.preventDefault();k()})})}}}); function _typeof(a){"@babel/helpers - typeof";if("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator){_typeof=function(a){return typeof a}}else{_typeof=function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a}}return _typeof(a)}define ("format_tiles/edit_icon_picker",["jquery","core/templates","core/ajax","core/str","core/notification","core/config"],function(a,b,c,d,e,f){"use strict";var g,h={pickAnIcon:""},i=[],j=[],k=function(b,d){var e=c.call([{methodname:"format_tiles_get_icon_set",args:{courseid:b}}]);e[0].done(function(b){if(b.photos){j=JSON.parse(b.photos)}var c=JSON.parse(b.icons);Object.keys(c).forEach(function(a){i.push({filename:a,displayname:c[a]})});if(0>=i.length){require(["core/log"],function(a){a.error("Error empty icon set");a.debug(b)})}if("function"==typeof d){d()}var e=j.map(function(a){return a.filename});a("#iconpickerphotos").find(".photo").each(function(b,c){c=a(c);if(-1===e.indexOf(c.attr("data-filename"))){c.fadeOut(500)}});if(!0!==b.status){require(["core/log"],function(a){a.error("Non true status response when getting icon set");a.debug(b)})}});e[0].fail(function(a){require(["core/log"],function(b){b.error("Fail when getting icon set");b.debug(a)})})},l=function(a,b){return f.wwwroot+"/course/format/tiles/editimage.php?courseid="+a+"§ionid="+b},m=function(f,g,h,i,j,m,n,o,p){var q=a("#selectedicon"),r=function(c,d,e){var i="",n={tileicon:h,tileid:g,secid:f,isediting:1};switch(e){case"tileicon":i="tileicon";break;case"tilephoto":i="tilebarphoto";n.phototileurl=d;n.phototileediturl=l(m,f);n.iamgetype=e;c.closest(".tileiconcontainer").addClass("hasphoto");setTimeout(function(){k(m)},3e3);break;case"draftfile":i="tilebarphoto";n.phototileurl=d;n.phototileediturl=l(m,f);n.iamgetype=e;break;default:throw new Error("Invalid image type "+e);}var o="course-view-tiles"===j?c:q;o.animate({opacity:0},500,function(){b.render("format_tiles/"+i,n).done(function(a){o.html(a).animate({opacity:1},500)})});if("course-editsection"===j&&"tilephoto"===e){a("input[name=tilephoto]").val(h)}},s={image:h,courseid:m,sectionid:f,imagetype:n,sourcecontextid:o===void 0?0:o,sourceitemid:p===void 0?0:p},t=c.call([{methodname:"format_tiles_set_image",args:s}]);t[0].done(function(c){if(!0===c.status){if("course-view-tiles"===j){r(a("#tileicon_"+g),c.imageurl,n)}else if("course-edit"===j||"course-editsection"===j){var f=a("#id_defaulttileicon");if("course-editsection"===j){f=a("#id_tileicon")}f.val(h);if("tileicon"===n){b.renderPix("tileicon/"+h,"format_tiles",i).done(function(a){q.html(a);if("course-editsection"===j){d.get_strings([{key:"tip",component:"format_tiles"},{key:"tileselecttip",component:"format_tiles"}]).done(function(a){e.alert(a[0],a[1])})}});if("course-editsection"===j){a("input[name=tilephoto]").val("")}}else if("tilephoto"===n){r(a("#tileicon_"+g),c.imageurl,n)}}}}).fail(function(a){require(["core/log"],function(b){b.error("Fail setting icon");b.debug(a)})})},n=function(c,d,n,o,p,q){var r=function(b,f,g){var h=a("#iconpickerphotos");h.html(b);var i=[];h.find("img").each(function(b,e){e=a(e);if(e.attr("data-filesize")<200000){setTimeout(function(){e.attr("src",e.attr("data-url"))},20*b)}else{i.push(e)}e.click(function(b){var e=a(b.currentTarget);m(f.attr("data-true-sectionid"),f.attr("data-section"),e.attr("data-filename"),e.attr("data-filename"),c,d,e.attr("data-imagetype"),e.attr("data-contextid"),e.attr("data-itemid"));g.hide()})});setTimeout(function(){i.forEach(function(a){a.attr("src",a.attr("data-url"))})},1e3)};if("object"!==_typeof(g)){var s=function(){b.render("format_tiles/icon_picker_modal_body",{icon_picker_icons:i,photosallowed:p,wwwroot:f.wwwroot,documentationurl:q}).done(function(e){require(["core/modal_factory"],function(i){i.create({type:i.types.DEFAULT,title:h.pickAnIcon,body:e}).done(function(h){g=h;h.setLarge();h.show();var i=a(h.root);i.attr("id","icon_picker_modal");i.attr("data-true-sectionid",n);i.attr("data-section",o);i.addClass("icon_picker_modal");i.on("click",".pickericon",function(b){var e=a(b.currentTarget);m(n,o,e.attr("data-icon"),e.attr("title"),c,d,"tileicon",e.attr("data-contextid"),e.attr("data-itemid"));h.hide()});i.on("input","input.iconsearch",function(b){var c=b.currentTarget.value.toLowerCase();i.find(".pickericon").show();if(3<=c.length){i.find(".pickericon").filter(function(b,d){return 0>a(d).attr("data-original-title").toLowerCase().indexOf(c)}).hide()}});try{var q=a(".pickericon");if("function"==typeof q.tooltip){q.tooltip()}}catch(a){require(["core/log"],function(b){b.debug(a)})}if(p){var k=l(d,n);i.find("#phototilebtn").attr("href",k);a("#launch-photo-library").click(function(){if(0!==j.length){b.render("format_tiles/icon_picker_photos",{icon_picker_photos:j,wwwroot:f.wwwroot}).done(function(a){r(a,i,h)})}})}})})})};if(0>=i.length){k(d,s)}else{s()}}else{g.root.attr("data-true-sectionid",n);g.root.attr("data-section",o);g.root.off("click");g.root.on("click",".pickericon",function(b){var e=a(b.currentTarget);m(n,o,e.attr("data-icon"),e.attr("title"),c,d,e.attr("data-imagetype"),e.attr("data-contextid"),e.attr("data-itemid"));g.hide()});if(p){var t=l(d,n);g.root.find("#phototilebtn").attr("href",t)}g.show()}};return{init:function init(b,c,f,g){a(document).ready(function(){var e=f?"picknewiconphoto":"picknewicon";d.get_string(e,"format_tiles").done(function(a){h.pickAnIcon=a});k(b);var i=a("#page-content");if(0===i.length){i=a("#region-main")}i.on("click",".launchiconpicker",function(d){d.preventDefault();var e=a(d.currentTarget);n(c,b,e.attr("data-true-sectionid"),e.attr("data-section"),f,g)})})}}}); define ("format_tiles/tile_fitter",["jquery","core/ajax"],function(a,b){"use strict";var c=!1,d,e={PAGE:"#page",TILE:".tile",TILEID:"#tile-",TILE_COLLAPSED:".tile-collapsed",TILES:".format-tiles.jsenabled ul.tiles",ACTIVITY:".activity",SPACER:".spacer",SECTION_ID:"#section-",OPEN_SECTION:".moveablesection:visible",SECTION_ZERO:"#section-0",CONTENT_SECTIONS:".moveablesection"},f=null,g=function resizeTilesDivWidth(){var c=a(window).width(),g=new a.Deferred,h=a(e.TILES),i={standard:260,min:225,mobileMin:160};try{var j=h.parent().innerWidth(),k=a(h.find(e.TILE)[0]),l=k.width()?k.width():i.standard,m=14;l=l+m;var n="inherit",o=Math.floor(j/i.min),p=a(e.TILE).not(e.SPACER).length;if(j<2*i.mobileMin){g.reject("Too narrow to resize")}else if(3>=p&&j>p*i.mobileMin){n=4*i.standard}else if(j<3*i.min){n=2*(i.standard-m)}else if(4>o){n=i.standard*o}else{var q=function(a,b){var c=[];for(a;a<=b;a+=1){c.push(a)}return c},r=Math.min(Math.floor(j/l),p);if(p<=r&&5=p/r){var s=Math.floor(j/l),t=q(s,r).reverse(),u=t.map(function(a){return p%a});if(-1!==u.indexOf(0)){n=l*t[u.indexOf(0)]}else if(pMath.abs(n-v)){g.resolve()}else{h.css("max-width",c).animate({"max-width":n},500,"swing",function(){setTimeout(function(){g.resolve()},600);a(e.CONTENT_SECTIONS).animate({"max-width":n},500,"swing")})}if(f){clearTimeout(f)}f=setTimeout(function(){b.call([{methodname:"format_tiles_set_session_width",args:{courseid:d,width:Math.floor(n)}}])},3e3)}catch(a){h.css("max-width",c).animate({"max-width":"100%"},500,"swing");b.call([{methodname:"format_tiles_set_session_width",args:{courseid:d,width:0}}]);g.reject("Failed to resize")}return g.promise()},h={getContentSectionPositions:function getContentSectionPositions(){var b=[],c,d,f=a(e.OPEN_SECTION);f.css("display","none");var g=1,h=0,i=a(e.TILES).children(e.TILE).not(e.TILE_COLLAPSED).not(".spacer");if(0===i.length){return[]}i.each(function(b,e){c=a(e).attr("data-section");if(c){if(0===b){h=1}else if(Math.abs(a(e).position().top-a(d).position().top)<=100){h+=1}else{h=0}if(h>g){g=h}d=e}});f.css("display","block");i.each(function(d,e){c=a(e).attr("data-section");if(0===b.length||b[b.length-1].sections.length>=g){if(1<=b.length){b[b.length-1].displayAfterTile=b[b.length-1].sections[b[b.length-1].sections.length-1]}b.push({displayAfterTile:"",sections:[c]})}else{b[b.length-1].sections.push(c)}});b[b.length-1].displayAfterTile=b[b.length-1].sections[b[b.length-1].sections.length-1];return b},moveContentSectionsToPlaces:function moveContentSectionsToPlaces(b,c){b.forEach(function(c){c.sections.forEach(function(d){if(c.displayAfterTile===b[b.length-1].displayAfterTile){a(e.SECTION_ID+d).detach().insertAfter(a("ul.tiles .tile").last())}else{a(e.SECTION_ID+d).detach().insertAfter(a("#tile-"+c.displayAfterTile))}})});c.forEach(function(a){if("function"==typeof a){a()}})},runReOrg:function runReOrg(b){var d=new a.Deferred;if(!0===c){d.reject("Re-org locked")}c=!0;var e=function(){h.moveContentSectionsToPlaces(h.getContentSectionPositions(),[function(){a("body").removeClass("modal-open");d.resolve("Finished organising tiles");c=!1}])};if(!0===b){setTimeout(function(){e();d.resolve("Re-org complete")},1e3)}else{e();d.resolve("Re-org complete")}return d.promise()}},i=function(){a(".block-hider-hide").click(function(){h.runReOrg(!0)});a(".block-hider-show").click(function(){h.runReOrg(!0)});a(".navbar button[data-action=\"toggle-drawer\"]").click(function(){setTimeout(function(){h.runReOrg(!0);g()},600)})},j=function(){a(e.TILES).animate({opacity:1},"fast");a(e.SECTION_ZERO).animate({opacity:1},"fast");a("#page-loading-icon").fadeOut(500).remove()};return{init:function init(b,c,f,k){d=b;a(document).ready(function(){i();if("1"===a(e.TILES).css("opacity")){h.runReOrg().done(function(){if(0!==c){a(e.TILEID+c).click()}})}var b=function(){h.runReOrg().done(function(){if(0!==c&&0===a(e.OPEN_SECTION).length){a(e.TILEID+c).click()}j()})};if(f&&!k){g().done(function(){b()}).fail(function(){b()})}else{b()}})},resizeTilesDivWidth:function resizeTilesDivWidth(){return g()},runReOrg:function runReOrg(a){return h.runReOrg(a)}}}); define ("format_tiles/course",["jquery","core/templates","core/ajax","format_tiles/browser_storage","core/notification","core/str","format_tiles/tile_fitter"],function(a,b,c,d,e,f,g){"use strict";var h=a("body"),i=a("body, html"),j,k,l=[],m,n=!1,o=!1,p=60,q=!1,r=0,s,t=!1,u,v=0,w={PAGE:"#page",TILE:".tile",TILEID:"#tile-",MOVEABLE_SECTION:".moveablesection",FILTER_BUTTON:".filterbutton",TILE_LOADING_ICON:".tile-loading-icon",TILE_LOADING_ICON_ID:"#loading-icon-",TILE_COLLAPSED:".tile-collapsed",TILE_CLICKABLE:".tile-clickable",TILES:"ul.tiles",ACTIVITY:".activity",SPACER:".spacer",SECTION_MOVEABLE:".moveablesection",SECTION_ID:"#section-",SECTION_TITLE:".sectiontitle",SECTION_MAIN:".section.main",SECTION_BUTTONS:".sectionbuttons",CLOSE_SEC_BTN:".closesectionbtn",HIDE_SEC0_BTN:"#buttonhidesec0",SECTION_ZERO:"#section-0",MOODLE_VIDEO:".mediaplugin.mediaplugin_videojs",LAUNCH_STANDARD:"[data-action=\"launch-tiles-standard\"]",TOOLTIP:"[data-toggle=tooltip]",HEADER_BAR:["header.navbar","nav.fixed-top.navbar","#essentialnavbar.moodle-has-zindex","#navwrap","nav.navbar-fixed-top","#adaptable-page-header-wrapper"],MATHJAX_EQUATION:".filter_mathjaxloader_equation"},x={SELECTED:"selected",OPEN:"open",CLOSED:"closed",LAUNCH_CM_MODAL:"launch-tiles-cm-modal",STATE_VISIBLE:"state-visible"},y={CLICK:"click",KEYDOWN:"keydown",SCROLL:"scroll"},z={DISPLAY:"display",Z_INDEX:"z-index",HEIGHT:"height",BG_COLOUR:"background-color"},A={ESCAPE:27,TAB:9,RETURN:13},B=function(b){var c=a(w.SECTION_ID+b);c.find("iframe").each(function(b,c){c=a(c);if(c.attr("src")){c.attr("data-src",c.attr("src"));c.attr("src","")}});var d=c.find(w.MOODLE_VIDEO);if(0e){c.css("top",0)}if(d>b.offset().top+b.outerHeight()-50){if("block"===m.css(z.DISPLAY)){m.fadeOut(300)}c.css("top",0)}else if(b.offset().top>d+a(window).outerHeight()){if("block"===m.css(z.DISPLAY)){m.fadeOut(300)}c.css("top",0)}else if("none"===m.css(z.DISPLAY)){m.fadeIn(300)}c.fadeIn(300,function(){n=!1})},500)}});if(!n&&!o&&m.is(":visible")){m.fadeOut(300)}};b.addClass(x.STATE_VISIBLE);b.slideDown(350,function(){d();e()});v=c},G=function(b,c){var d=new a.Deferred,e=a(".moveablesection:visible"),f=0;if(0"+l.noconnectionerror+"

    ");setTimeout(function(){F(c,a)},500)}require(["core/log"],function(a){a.debug(b)});throw new Error("Not successful retrieving tile content by AJAX for section "+a)},I=function(a,b){return c.call([{methodname:"format_tiles_get_single_section_page_html",args:{courseid:a,sectionid:b,setjsusedsession:!0}}])[0]},J=function(a,c,d,e){var f=0>e?0:255,h=0>e?-1*e:e,i=Math.round((f-a)*h)+a,j=Math.round((f-c)*h)+c,g=Math.round((f-d)*h)+d;return"rgb("+i+","+j+","+g+")"},K=function(b){m.fadeIn(300);r=parseInt(m.css(z.Z_INDEX));var c=a(w.TILEID+b);c.css(z.Z_INDEX,r+1);a(w.SECTION_ID+b).css(z.Z_INDEX,r+1);if(c.css(z.BG_COLOUR)&&"rgba"===c.css(z.BG_COLOUR).substr(0,4)){var d=c.css(z.BG_COLOUR).replace("rgba(","").replace(")","").replace(" ","").split(",");c.css(z.BG_COLOUR,J(parseInt(d[0]),parseInt(d[1]),parseInt(d[2]),.95))}},L=function(b){var c=a(b.currentTarget);if("window-overlay"===c.attr("id")){c.hide();var d=a(document.elementFromPoint(b.clientX,b.clientY));c.show();if("window-overlay"===c.attr("id")){if(d.hasClass("filterbutton")||d.hasClass("list-group-item")){d.click()}else{var e=d.closest(w.TILE);if(e){e.click()}}}else{C(0);d.click()}}},M=function(){var b=a(w.HIDE_SEC0_BTN),c=a(w.SECTION_ZERO);if(d.storageEnabledLocal()){if(!0===d.getSecZeroCollapseStatus()){c.slideUp(0);b.addClass(x.CLOSED).removeClass(x.OPEN)}else{c.slideDown(300);b.addClass(x.OPEN).removeClass(x.CLOSED)}}else{b.addClass(x.OPEN).removeClass(x.CLOSED);c.slideDown(300)}},N=function(b,f,g){K(g);a(w.TILE).removeClass(x.SELECTED);f.addClass(x.SELECTED);v=g;a(w.MOVEABLE_SECTION).each(function(b,c){c=a(c);if(c.is(":visible")){B(c.attr("data-section"));c.slideUp(200).removeClass(x.STATE_VISIBLE)}});c.call([{methodname:"format_tiles_log_tile_click",args:{courseid:b,sectionid:g}}])[0].fail(e.exception);var h=a(w.SECTION_ID+g);if(0").addClass("modal-backdrop fade in").hide().attr("id","window-overlay").appendTo(h);m.click(function(a){C(0);L(a)});e.on(y.CLICK,w.TILE_CLICKABLE,function(b){if(!i){return}b.preventDefault();a(window).off(y.SCROLL);a(w.TILE_LOADING_ICON).fadeOut(300,function(){a(w.TILE_LOADING_ICON).html()});var c=a(b.currentTarget).closest(w.TILE),e=parseInt(c.attr("data-section"));if(c.hasClass(x.SELECTED)){C(e);d.setLastVisitedSection(0)}else{N(s,c,e)}var f=a(w.SECTION_ID+(e+1)),g=1===a(".filters-config[data-filter=\"h5p\"]").length;if(!j&&!g&&f.length&&0c.outerWidth()){b=!1}})}}if(b){n=a(window).outerWidth();G(!0,J)}t=!1},600)});var u=parseInt(m.css(z.Z_INDEX)),B=a(w.HEADER_BAR.find(function(b){return 0");K.attr("src",H.attr("data-url")).attr("type","text/javascript").html(H.attr("data-config"));a("head").append(K);setTimeout(function(){E(a("#multi_section_tiles"))},2e3)}}})}}}); define ("format_tiles/edit_form_helper",["jquery","core/notification","core/str","core/templates"],function(a,b,c,d){"use strict";return{init:function init(e,f,g,h,i,j,k,l){a(document).ready(function(){var j=a("input#id_courseusesubtiles"),m=a("input#id_usesubtilesseczero");if(!j.prop("checked")){m.prop("checked",!1);m.attr("disabled",!0)}j.change(function(){if(!j.prop("checked")){m.prop("checked",!1);m.attr("disabled",!0)}else{a("input#id_courseusebarforheadings").prop("checked",!1);m.attr("disabled",!1)}});a("select#id_courseshowtileprogress").change(function(d){if("0"!==d.currentTarget.value){var e=a("select#id_enablecompletion");if("0"===e.val()){e.val("1");c.get_strings([{key:"completion",component:"completion"},{key:"completionswitchhelp",component:"format_tiles"}]).done(function(a){b.alert(a[0],a[1])})}}});a("select#id_enablecompletion").change(function(b){if("0"===b.currentTarget.value){a("select#id_courseshowtileprogress").val("0")}});var n=a("select#id_basecolour");d.render("format_tiles/colour_picker",{colours:n.find("option").map(function(b,c){var d=a(c),e=d.attr("value");return{colour:e,colourname:d.text(),selected:e===n.val(),id:e.replace("#","")}}).toArray()}).done(function(b){a(b).insertAfter(n);n.hide();var c=a(".colourpickercircle");c.click(function(b){var d=a(b.currentTarget);c.removeClass("selected");d.addClass("selected");n.val(d.attr("data-colour"));a("#colourselectnotify").fadeIn(200).fadeOut(1200)});n.change(function(){c.removeClass("selected");a("#colourpick_"+n.val().replace("#","")).addClass("selected")});var d=a("body");if(!d.hasClass("format-tiles")){d.addClass("format-tiles")}});var o,p;if("course-edit"===e){p=a("#id_defaulttileicon");o=a("#id_defaulttileicon option:selected").text()}else if("course-editsection"===e){p=a("#id_tileicon");o=a("#id_tileicon option:selected").text()}if("course-edit"===e||"course-editsection"===e&&"0"!==i){var q;if(""===p.val()){q=f}else{q=p.val()}d.render("format_tiles/icon_picker_launch_btn",{initialicon:q,initialname:o,sectionId:h,allowphototiles:k}).done(function(b){a(b).insertAfter(p);p.hide();require(["format_tiles/edit_icon_picker"],function(a){a.init(g,e,k,l)})})}else if("course-editsection"===e&&"0"===i){p.closest(".row").hide()}d.render("format_tiles/edit_form_helptext",{documentationurl:l+"teachers"}).done(function(b){a(b).appendTo(a("#id_courseformathdr .fcontainer"))})})}}}); define ("format_tiles/filter_buttons",["jquery"],function(a){"use strict";var b={FILTER_BUTTON:".filterbutton",TILE:".tile",COLLAPSING:".tile-collapsing",COLLAPSED:".tile-collapsed",SPACER:".spacer",PAGE_CONTENT:"#page-content",REGION_MAIN:"#region-main"},c={COLLAPSING:"tile-collapsing",COLLAPSED:"tile-collapsed",SELECTED:"selected"},d={getPressedFilterButton:function getPressedFilterButton(a,b){return b?localStorage.getItem("mdl-course-"+a+"-filter-btn"):null},setPressedFilterButton:function setPressedFilterButton(a,b,c){if(c){if(0===b){localStorage.removeItem("mdl-course-"+a+"-filter-btn")}else{localStorage.setItem("mdl-course-"+a+"-filter-btn",b)}}},unCollapseTiles:function unCollapseTiles(d){d.forEach(function(b,e){a("#tile-"+d[e]).addClass(c.COLLAPSING).removeClass(c.COLLAPSED)});setTimeout(function(){a(b.COLLAPSING).removeClass(c.COLLAPSING)},300)},collapseAllTiles:function collapseAllTiles(){a(b.TILE).not(a(b.COLLAPSED)).not(a(b.SPACER)).addClass(c.COLLAPSING);setTimeout(function(){a(b.COLLAPSING).addClass(c.COLLAPSED).removeClass(c.COLLAPSING)},250)},unCollapseAllTiles:function unCollapseAllTiles(){setTimeout(function(){a(b.COLLAPSED).addClass(c.COLLAPSING).removeClass(c.COLLAPSED);setTimeout(function(){a(b.COLLAPSING).removeClass(c.COLLAPSING)},250)},250)}};return{init:function init(f,g){a(document).ready(function(){var e=d.getPressedFilterButton(f,g);if(e){var h=a("#filterbutton"+e);if(!h){d.setPressedFilterButton(f,e,0)}a(b.FILTER_BUTTON).removeClass(c.SELECTED);h.addClass(c.SELECTED);d.collapseAllTiles();setTimeout(function(){d.unCollapseTiles(JSON.parse(h.attr("data-sections")))},250);d.setPressedFilterButton(f,e,g)}var i=a(b.PAGE_CONTENT);if(0===i.length){i=a(b.REGION_MAIN)}i.on("click",b.FILTER_BUTTON,function(h){var e=a(h.target),i=e.attr("data-buttonid");if("all"===i||d.getPressedFilterButton(f,g)===i){d.collapseAllTiles();setTimeout(function(){d.unCollapseAllTiles()},500);a(b.FILTER_BUTTON).removeClass(c.SELECTED);d.setPressedFilterButton(f,0,g);a("#filterbutton-all").addClass(c.SELECTED)}else{a(b.FILTER_BUTTON).removeClass(c.SELECTED);e.addClass(c.SELECTED);d.collapseAllTiles();setTimeout(function(){d.unCollapseTiles(JSON.parse(e.attr("data-sections")))},250);d.setPressedFilterButton(f,i,g)}})})}}}); define ("format_tiles/completion",["jquery","core/templates","core/config","core/ajax","format_tiles/completion"],function(a,b,c,d){"use strict";var e,f={},g={cmid:"data-cmid",numberComplete:"data-numcomplete",numberOutOf:"data-numoutof",section:"data-section"},h={launchModuleModal:"[data-action=\"launch-tiles-module-modal\"]",launchResourceModal:"[data-action=\"launch-tiles-resource-modal\"]",pageContent:"#page-content",regionMain:"#region-main",resourceModule:".activity.resource",completeonevent:".completeonevent",completeonview:".completeonview",activity:"li.activity",section:"li.section.main",togglecompletion:"[data-action=\"change-completion-status\"]",tileId:"#tile-",progressIndicatorId:"#tileprogress-",tile:".tile",spacer:".spacer",availabilityinfo:".availabilityinfo",sectionId:"#section-"},i={completionYes:"completion-icon-y",completionNo:"completion-icon-n"},j=function(b,c,d,e){var f={tileid:b,numComplete:c,numOutOf:d,showAsPercent:e,percent:0=d){f.isComplete=!0}if(10>f.percent){f.isSingleDigit=!0}return f},k=function(a,c,d){if(0>d||d>c.attr(g.numberOutOf)){return}if(!a){return}b.render("format_tiles/progress",j(a,d,parseInt(c.attr(g.numberOutOf)),c.hasClass("percent"))).done(function(a){c.replaceWith(a)})},l=function(c,d){b.render("format_tiles/progress",j(0,c,d,!0)).done(function(b){a("#tileprogress-0").replaceWith(b).fadeOut(0).animate({opacity:1},500)})},m=function(b,c){d.call([{methodname:"format_tiles_update_activity_completion_status_manually",args:{cmid:b,completed:c}}])[0].done(function(d){if(d.status){var e=a("#module-"+b).closest(h.section).attr("data-section");if(e){o(e)}var f=a(h.togglecompletion+"[data-cmid=\""+b+"\"]");if(f){f.attr("data-state",c?"1":"0");if(c){f.find(".completion_img_"+b).addClass(i.completionYes).removeClass(i.completionNo)}else{f.find(".completion_img_"+b).addClass(i.completionNo).removeClass(i.completionYes)}}}}).fail(function(a){require(["core/log"],function(b){b.debug("Failed to set completion state");b.debug(a)})})},n=function markAsAutoCompleteInUI(b){var c=b.closest(h.section).attr("data-section");if(b.hasClass("completeonview")){var d=b.find(".completion-icon"),e=d.closest(".completioncheckbox");if("0"===e.attr("data-ismanual")&&"0"===e.attr("data-completionstate")){d.addClass(i.completionYes).removeClass(i.completionNo);e.attr("data-completionstate",1);e.attr("data-original-title",f.completeauto);var j=a(h.progressIndicatorId+c),m=Math.min(parseInt(j.attr(g.numberComplete))+1,j.attr(g.numberOutOf));k(c,j,m);var n=a("#tileprogress-0"),o=Math.min(parseInt(n.attr(g.numberComplete))+1,n.attr(g.numberOutOf));l(o,parseInt(n.attr(g.numberOutOf)))}}},o=function triggerCompletionChangedEvent(b){a(document).trigger("format-tiles-completion-changed",{section:parseInt(b)})},p=function updateSectionsInfo(c,d,e){c.forEach(function(c){var f=a(h.tileId+c.sectionnum);if(c.isavailable&&f.hasClass("tile-restricted")){f.removeClass("tile-restricted")}else if(!c.isavailable){f.addClass("tile-restricted")}if(c.isclickable&&!f.hasClass("tile-clickable")){f.addClass("tile-clickable")}else if(!c.isclickable&&f.hasClass("tile-clickable")){f.removeClass("tile-clickable")}var g=a(h.progressIndicatorId+c.sectionnum);k(c.sectionnum,g,c.numcomplete);l(d,e);var i=f.find(h.availabilityinfo);if(0 tr").length){var c={contextid:a.closest("div.insight-container").data("context-id"),modelid:a.closest("div.insight-container").data("model-id")};window.location.assign(e.relativeUrl("report/insights/insights.php",c,!1))}}).catch(d.exception)};a(h+" [data-bulk-actionname]").on("click",function(c){c.preventDefault();var e=a(c.currentTarget),h=e.data("bulk-actionname"),j=e.text().trim(),k=[],l=[];a(".insights-list input[data-togglegroup^=\"insight-bulk-action-\"][data-toggle=\"slave\"]:checked").each(function(){var b=a(this).closest("tr[data-prediction-id]");l.push(b);k.push(b.data("prediction-id"))});if(0===k.length){return this}var m=[];b.get_strings([{key:"confirmbulkaction",component:"report_insights",param:{action:j,nitems:k.length}},{key:"confirm",component:"moodle"}]).then(function(a){m=a;return f.create({type:f.types.SAVE_CANCEL,title:j,body:m[0]})}).then(function(a){a.setSaveButtonText(m[1]);a.show();a.getRoot().on(g.save,function(){return i(k,l,h)});return a}).catch(d.exception);return this})}}}); define ("report_insights/message_users",["jquery","core/str","core/log","core/modal_factory","core/modal_events","core/templates","core/notification","core/ajax"],function(a,b,c,d,e,f,g,h){var i={BULKACTIONSELECT:"#formactionid"},j=function(a,b){this.actionName=b;this.attachEventListeners(a)};j.prototype.actionName=null;j.prototype.modal=null;j.prototype.attachEventListeners=function(b){a(b+" button[data-bulk-sendmessage]").on("click",function(b){b.preventDefault();var d=a(b.currentTarget),e={},f=d.data("prediction-to-user-id");a(".insights-list input[data-togglegroup^=\"insight-bulk-action\"][data-toggle=\"slave\"]:checked").each(function(b,d){var g=a(d).closest("tr[data-prediction-id]").data("prediction-id");if("undefined"==typeof f[g]){c.error("Unknown user for prediction "+g);return}var h=f[g];e[g]=h});if(0===Object.keys(e).length){return this}this.showSendMessage(e);return this}.bind(this))};j.prototype.showSendMessage=function(c){var g=new Set(Object.values(c));if(0==g.length){return a.Deferred().resolve().promise()}var h=null;if(1==g.size){h=b.get_string("sendbulkmessagesingle","core_message")}else{h=b.get_string("sendbulkmessage","core_message",g.size)}return a.when(d.create({type:d.types.SAVE_CANCEL,body:f.render("core_user/send_bulk_message",{})}),h).then(function(b,d){this.modal=b;this.modal.setTitle(d);this.modal.setSaveButtonText(d);this.modal.getRoot().on(e.hidden,function(){a(i.BULKACTIONSELECT).focus();this.modal.getRoot().remove()}.bind(this));this.modal.getRoot().on(e.save,this.submitSendMessage.bind(this,c));this.modal.show();return this.modal}.bind(this))};j.prototype.submitSendMessage=function(a){var c=this.modal.getRoot().find("form textarea").val(),d=[],e=new Set(Object.values(a));e.forEach(function(a){d.push({touserid:a,text:c})});var f=this.actionName,i=null;return h.call([{methodname:"core_message_send_instant_messages",args:{messages:d}}])[0].then(function(a){if(1==a.length){return b.get_string("sendbulkmessagesentsingle","core_message")}else{return b.get_string("sendbulkmessagesent","core_message",a.length)}}).then(function(b){i=b;return h.call([{methodname:"report_insights_action_executed",args:{actionname:f,predictionids:Object.keys(a)}}])[0]}).then(function(){g.addNotification({message:i,type:"success"});return!0}).catch(g.exception)};return{init:function init(a,b){return new j(a,b)}}}); define ("report_participation/participants",["exports","jquery","core/custom_interaction_events","core/modal_events","core/notification","core_user/local/participants/bulkactions"],function(a,b,c,d,e,f){"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.init=void 0;b=g(b);c=g(c);d=g(d);e=g(e);function g(a){return a&&a.__esModule?a:{default:a}}var h={bulkActionSelect:"#formactionid",bulkUserSelectedCheckBoxes:"input[data-togglegroup^='participants-table'][data-toggle='slave']:checked",participantsForm:"#participantsform"};a.init=function init(){var a=document.querySelector(h.participantsForm),g=function(){c.default.define(h.bulkActionSelect,[c.default.events.accessibleChange]);(0,b.default)(h.bulkActionSelect).on(c.default.events.accessibleChange,function(b){var c=b.target.value,g=a.querySelectorAll(h.bulkUserSelectedCheckBoxes);if(-1!==c.indexOf("#")){b.preventDefault();var j=[];g.forEach(function(a){j.push(a.getAttribute("name").replace("user",""))});if("#messageselect"===c){(0,f.showSendMessage)(j).then(function(b){b.getRoot().on(d.default.hidden,function(){var b=a.querySelector(h.bulkActionSelect);i(b);b.focus()});return b}).catch(e.default.exception)}}else if(""!==c&&g.length){b.target.form().submit()}i(b.target)})},i=function(a){a.value=""};g()}}); define ("report_progress/completion_override",["jquery","core/ajax","core/str","core/modal_factory","core/modal_events","core/notification","core/custom_interaction_events","core/templates"],function(a,b,c,d,e,f,g,h){var i,j,k=function(a,b){return 0",g="comment-chooser-"+d+"-cancel",h="",i=new M.core.dialogue({modal:!0,headerContent:e,bodyContent:b,footerContent:h,focusAfterHide:"#"+f,id:"comments-chooser-dialog-"+d});a("#"+g).click(function(){i.hide()});a.each(c,function(b,c){var e="#comment-option-"+d+"-"+c.id;a(e).click(function(){var b=a("#"+f),d=b.val();if(""!==d.trim()){d+="\n"}d+=c.description;b.val(d);i.hide()});a(document).off("keypress",e).on("keypress",e,function(){var b=event.which||event.keyCode;if(13==b||32==b){a(e).click()}})});i.after("visibleChange",function(a){if(a.prevVal&&!a.newVal){this.destroy()}},i);i.show()}function i(){b.render("gradingform_guide/comment_chooser",{criterionId:d,comments:g}).done(function(a){h(a,g)}).fail(c.exception)}a("#"+e).click(function(a){a.preventDefault();i()})}}}); define ("gradingform_guide/grades/grader/gradingpanel",["exports","core/ajax","core_grades/grades/grader/gradingpanel/normalise","core_grades/grades/grader/gradingpanel/comparison","jquery"],function(a,b,c,d,e){"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.storeCurrentGrade=a.fetchCurrentGrade=void 0;e=function(a){return a&&a.__esModule?a:{default:a}}(e);function f(a,b,c,d,e,f,g){try{var h=a[f](g),i=h.value}catch(a){c(a);return}if(h.done){b(i)}else{Promise.resolve(i).then(d,e)}}function g(a){return function(){var b=this,c=arguments;return new Promise(function(d,e){var i=a.apply(b,c);function g(a){f(i,d,e,g,h,"next",a)}function h(a){f(i,d,e,g,h,"throw",a)}g(void 0)})}}a.fetchCurrentGrade=function fetchCurrentGrade(a,c,d,e){return(0,b.call)([{methodname:"gradingform_guide_grader_gradingpanel_fetch",args:{component:a,contextid:c,itemname:d,gradeduserid:e}}])[0]};var h=function(){var a=g(regeneratorRuntime.mark(function a(f,g,h,i,j,k){var l;return regeneratorRuntime.wrap(function(a){while(1){switch(a.prev=a.next){case 0:l=k.querySelector("form");if(!(!0===(0,d.compareData)(l))){a.next=9;break}a.t0=c.normaliseResult;a.next=5;return(0,b.call)([{methodname:"gradingform_guide_grader_gradingpanel_store",args:{component:f,contextid:g,itemname:h,gradeduserid:i,notifyuser:j,formdata:(0,e.default)(l).serialize()}}])[0];case 5:a.t1=a.sent;return a.abrupt("return",(0,a.t0)(a.t1));case 9:return a.abrupt("return","");case 10:case"end":return a.stop();}}},a)}));return function(){return a.apply(this,arguments)}}();a.storeCurrentGrade=h}); define ("gradingform_guide/grades/grader/gradingpanel/comments",["exports","./comments/selectors"],function(a,b){"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.init=void 0;b=function(a){return a&&a.__esModule?a:{default:a}}(b);a.init=function init(a){var c=document.querySelector("#".concat(a));c.addEventListener("click",function(a){if(!a.target.matches(b.default.frequentComment)){return}a.preventDefault();var c=a.target.closest(b.default.frequentComment),d=c.closest(b.default.criterion),e=d.querySelector(b.default.remark);if(!e){return}if(e.value.trim()){e.value+="\n".concat(c.innerHTML)}else{e.value+=c.innerHTML}})}}); define ("gradingform_guide/grades/grader/gradingpanel/comments/selectors",["exports"],function(a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.default=void 0;a.default={frequentComment:"[data-gradingform_guide-role=\"frequent-comment\"]",criterion:"[data-gradingform-guide-role=\"criterion\"]",remark:"[data-gradingform-guide-role=\"remark\"]"};return a.default}); define ("gradingform_rubric/grades/grader/gradingpanel",["exports","core/ajax","core_grades/grades/grader/gradingpanel/normalise","core_grades/grades/grader/gradingpanel/comparison","jquery"],function(a,b,c,d,e){"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.storeCurrentGrade=a.fetchCurrentGrade=void 0;e=function(a){return a&&a.__esModule?a:{default:a}}(e);function f(a,b,c,d,e,f,g){try{var h=a[f](g),i=h.value}catch(a){c(a);return}if(h.done){b(i)}else{Promise.resolve(i).then(d,e)}}function g(a){return function(){var b=this,c=arguments;return new Promise(function(d,e){var i=a.apply(b,c);function g(a){f(i,d,e,g,h,"next",a)}function h(a){f(i,d,e,g,h,"throw",a)}g(void 0)})}}a.fetchCurrentGrade=function fetchCurrentGrade(a,c,d,e){return(0,b.call)([{methodname:"gradingform_rubric_grader_gradingpanel_fetch",args:{component:a,contextid:c,itemname:d,gradeduserid:e}}])[0]};var h=function(){var a=g(regeneratorRuntime.mark(function a(f,g,h,i,j,k){var l;return regeneratorRuntime.wrap(function(a){while(1){switch(a.prev=a.next){case 0:l=k.querySelector("form");if(!(!0===(0,d.compareData)(l))){a.next=9;break}a.t0=c.normaliseResult;a.next=5;return(0,b.call)([{methodname:"gradingform_rubric_grader_gradingpanel_store",args:{component:f,contextid:g,itemname:h,gradeduserid:i,notifyuser:j,formdata:(0,e.default)(l).serialize()}}])[0];case 5:a.t1=a.sent;return a.abrupt("return",(0,a.t0)(a.t1));case 9:return a.abrupt("return","");case 10:case"end":return a.stop();}}},a)}));return function(){return a.apply(this,arguments)}}();a.storeCurrentGrade=h}); define ("tool_analytics/log_info",["jquery","core/str","core/modal_factory","core/notification"],function(a,b,c,d){return{loadInfo:function loadInfo(e,f){var g=a("[data-model-log-id=\""+e+"\"]");b.get_string("loginfo","tool_analytics").then(function(b){var d=a("
      ");f.forEach(function(a){d.append("
    • "+a+"
    • ")});d.append("
    ");return c.create({title:b,body:d.html(),large:!0},g)}).catch(d.exception)}}}); define ("tool_analytics/model",["jquery","core/str","core/log","core/notification","core/modal_factory","core/modal_events","core/templates"],function(b,c,d,e,f,g,h){var i={clear:{title:{key:"clearpredictions",component:"tool_analytics"},body:{key:"clearmodelpredictions",component:"tool_analytics"}},delete:{title:{key:"delete",component:"tool_analytics"},body:{key:"deletemodelconfirmation",component:"tool_analytics"}}},j=function(a){var c=b(a).closest("[data-model-name]");if(c.length){return c.attr("data-model-name")}else{d.error("Unexpected DOM error - unable to obtain the model name");return""}};return{confirmAction:function confirmAction(a,h){b("[data-action-id=\""+a+"\"]").on("click",function(k){k.preventDefault();var l=b(k.currentTarget);if("undefined"==typeof i[h]){d.error("Action \""+h+"\" is not allowed.");return}var a=[i[h].title,i[h].body];a[1].param=j(l);var m=c.get_strings(a),n=f.create({type:f.types.SAVE_CANCEL});b.when(m,n).then(function(a,b){b.setTitle(a[0]);b.setBody(a[1]);b.setSaveButtonText(a[0]);b.getRoot().on(g.save,function(){window.location.href=l.attr("href")});b.show();return b}).fail(e.exception)})},selectEvaluationOptions:function selectEvaluationOptions(a,d){b("[data-action-id=\""+a+"\"]").on("click",function(i){i.preventDefault();var j=b(i.currentTarget),a=b(this).attr("data-timesplitting-methods"),k=c.get_strings([{key:"evaluatemodel",component:"tool_analytics"},{key:"evaluate",component:"tool_analytics"}]),l=f.create({type:f.types.SAVE_CANCEL}),m=h.render("tool_analytics/evaluation_options",{trainedexternally:d,timesplittingmethods:JSON.parse(a)});b.when(k,l).then(function(a,c){c.getRoot().on(g.hidden,c.destroy.bind(c));c.setTitle(a[0]);c.setSaveButtonText(a[1]);c.setBody(m);c.getRoot().on(g.save,function(){var a=b("input[name='evaluationmode']:checked").val();if("trainedmodel"==a){j.attr("href",j.attr("href")+"&mode=trainedmodel")}var c=b("#id-evaluation-timesplitting").val();j.attr("href",j.attr("href")+"×plitting="+c);window.location.href=j.attr("href")});c.show();return c}).fail(e.exception)})},selectExportOptions:function selectExportOptions(a,d){b("[data-action-id=\""+a+"\"]").on("click",function(i){i.preventDefault();var j=b(i.currentTarget);if(!d){j.attr("href",j.attr("href")+"&action=exportmodel&includeweights=0");window.location.href=j.attr("href");return}var a=c.get_strings([{key:"export",component:"tool_analytics"}]),k=f.create({type:f.types.SAVE_CANCEL}),l=h.render("tool_analytics/export_options",{});b.when(a,k).then(function(a,c){c.getRoot().on(g.hidden,c.destroy.bind(c));c.setTitle(a[0]);c.setSaveButtonText(a[0]);c.setBody(l);c.getRoot().on(g.save,function(){var a=b("input[name='exportoption']:checked").val();if("exportdata"==a){j.attr("href",j.attr("href")+"&action=exportdata")}else{j.attr("href",j.attr("href")+"&action=exportmodel");if(b("#id-includeweights").is(":checked")){j.attr("href",j.attr("href")+"&includeweights=1")}else{j.attr("href",j.attr("href")+"&includeweights=0")}}window.location.href=j.attr("href")});c.show();return c}).fail(e.exception)})}}}); define ("tool_analytics/potential-contexts",["jquery","core/ajax"],function(a,b){return{processResults:function processResults(b,c){var d=[];if(a.isArray(c)){a.each(c,function(a,b){d.push({value:b.id,label:b.name})});return d}else{return c}},transport:function transport(c,d,e,f){var g,h=a(c).attr("modelid")||null;g=b.call([{methodname:"tool_analytics_potential_contexts",args:{query:d,modelid:h}}]);g[0].then(e).fail(f)}}}); define ("tool_dataprivacy/expand_contract",["jquery","core/url","core/str"],function(a,b,c){var d=a("\"\""),e=a("\"\""),f={EXPAND:"fa-caret-right",COLLAPSE:"fa-caret-down"};return{expandCollapse:function expandCollapse(a,b){if(a.hasClass("hide")){a.removeClass("hide");a.addClass("visible");a.attr("aria-expanded",!0);b.find(":header i.fa").removeClass(f.EXPAND);b.find(":header i.fa").addClass(f.COLLAPSE);b.find(":header img.icon").attr("src",d.attr("src"))}else{a.removeClass("visible");a.addClass("hide");a.attr("aria-expanded",!1);b.find(":header i.fa").removeClass(f.COLLAPSE);b.find(":header i.fa").addClass(f.EXPAND);b.find(":header img.icon").attr("src",e.attr("src"))}},expandCollapseAll:function expandCollapseAll(b){var g="visible"==b?"hide":"visible",h="visible"==b?!0:!1,i="visible"==b?f.EXPAND:f.COLLAPSE,j="visible"==b?f.COLLAPSE:f.EXPAND,k="visible"==b?d.attr("src"):e.attr("src");a("."+g).each(function(){a(this).removeClass(g);a(this).addClass(b);a(this).attr("aria-expanded",h)});a(".tool_dataprivacy-expand-all").data("visibilityState",g);c.get_string(g,"tool_dataprivacy").then(function(b){a(".tool_dataprivacy-expand-all").html(b)}).catch(Notification.exception);a(":header i.fa").each(function(){a(this).removeClass(i);a(this).addClass(j)});a(":header img.icon").each(function(){a(this).attr("src",k)})}}}); define ("tool_dataprivacy/categoriesactions",["jquery","core/ajax","core/notification","core/str","core/modal_factory","core/modal_events"],function(a,b,c,d,e,f){var g={DELETE:"[data-action=\"deletecategory\"]"},h=function(){this.registerEvents()};h.prototype.registerEvents=function(){a(g.DELETE).click(function(g){g.preventDefault();var h=a(this).data("id"),i=a(this).data("name");d.get_strings([{key:"deletecategory",component:"tool_dataprivacy"},{key:"deletecategorytext",component:"tool_dataprivacy",param:i},{key:"delete"}]).then(function(d){var g=d[0],i=d[1],j=d[2];return e.create({title:g,body:i,type:e.types.SAVE_CANCEL}).then(function(d){d.setSaveButtonText(j);d.getRoot().on(f.save,function(){b.call([{methodname:"tool_dataprivacy_delete_category",args:{id:h}}])[0].done(function(b){if(b.result){a("tr[data-categoryid=\""+h+"\"]").remove()}else{c.addNotification({message:b.warnings[0].message,type:"error"})}}).fail(c.exception)});d.getRoot().on(f.hidden,function(){d.destroy()});return d})}).done(function(a){a.show()}).fail(c.exception)})};return{init:function init(){return new h}}}); define ("tool_dataprivacy/effective_retention_period",["jquery"],function(a){var b={PURPOSE_SELECT:"#id_purposeid",RETENTION_FIELD:"#fitem_id_retention_current [data-fieldtype=static]"},c=function(a){this.purposeRetentionPeriods=a;this.registerEventListeners()},d=function(){a(b.PURPOSE_SELECT).off("change")};c.prototype.purposeRetentionPeriods=[];c.prototype.registerEventListeners=function(){a(b.PURPOSE_SELECT).on("change",function(c){var d=a(c.currentTarget).val(),e=this.purposeRetentionPeriods[d];a(b.RETENTION_FIELD).text(e)}.bind(this))};return{init:function init(a){d();return new c(a)}}}); define ("tool_dataprivacy/add_category",["jquery","core/str","core/ajax","core/notification","core/modal_factory","core/modal_events","core/fragment"],function(a,b,c,d,e,f,g){var h={CATEGORY_LINK:"[data-add-element=\"category\"]"},i=function(a){this.contextId=a;this.strings=b.get_strings([{key:"addcategory",component:"tool_dataprivacy"},{key:"save",component:"admin"}]);this.registerEventListeners()};i.prototype.contextId=0;i.prototype.strings=0;i.prototype.registerEventListeners=function(){var b=a(h.CATEGORY_LINK);b.on("click",function(){return this.strings.then(function(a){e.create({type:e.types.SAVE_CANCEL,title:a[0],body:""},b).done(function(b){this.setupFormModal(b,a[1])}.bind(this))}.bind(this)).fail(d.exception)}.bind(this))};i.prototype.getBody=function(a){var b=null;if("undefined"!=typeof a){b={jsonformdata:JSON.stringify(a)}}return g.loadFragment("tool_dataprivacy","addcategory_form",this.contextId,b)};i.prototype.setupFormModal=function(a,b){a.setLarge();a.setSaveButtonText(b);a.getRoot().on(f.hidden,this.destroy.bind(this));a.setBody(this.getBody());a.getRoot().on(f.save,this.submitForm.bind(this));a.getRoot().on("submit","form",this.submitFormAjax.bind(this));this.modal=a;a.show()};i.prototype.submitForm=function(a){a.preventDefault();this.modal.getRoot().find("form").submit()};i.prototype.submitFormAjax=function(a){a.preventDefault();var b=this.modal.getRoot().find("form").serialize();c.call([{methodname:"tool_dataprivacy_create_category_form",args:{jsonformdata:JSON.stringify(b)},done:function(a){if(a.validationerrors){this.modal.setBody(this.getBody(b))}else{this.close()}}.bind(this),fail:d.exception}])};i.prototype.close=function(){this.destroy();document.location.reload()};i.prototype.destroy=function(){Y.use("moodle-core-formchangechecker",function(){M.core_formchangechecker.reset_form_dirty_state()});this.modal.destroy()};i.prototype.removeListeners=function(){a(h.CATEGORY_LINK).off("click")};return{getInstance:function getInstance(a){return new i(a)}}}); define ("tool_dataprivacy/purposesactions",["jquery","core/ajax","core/notification","core/str","core/modal_factory","core/modal_events"],function(a,b,c,d,e,f){var g={DELETE:"[data-action=\"deletepurpose\"]"},h=function(){this.registerEvents()};h.prototype.registerEvents=function(){a(g.DELETE).click(function(g){g.preventDefault();var h=a(this).data("id"),i=a(this).data("name");d.get_strings([{key:"deletepurpose",component:"tool_dataprivacy"},{key:"deletepurposetext",component:"tool_dataprivacy",param:i},{key:"delete"}]).then(function(d){var g=d[0],i=d[1],j=d[2];return e.create({title:g,body:i,type:e.types.SAVE_CANCEL}).then(function(d){d.setSaveButtonText(j);d.getRoot().on(f.save,function(){b.call([{methodname:"tool_dataprivacy_delete_purpose",args:{id:h}}])[0].done(function(b){if(b.result){a("tr[data-purposeid=\""+h+"\"]").remove()}else{c.addNotification({message:b.warnings[0].message,type:"error"})}}).fail(c.exception)});d.getRoot().on(f.hidden,function(){d.destroy()});return d})}).done(function(a){a.show()}).fail(c.exception)})};return{init:function init(){return new h}}}); define ("tool_dataprivacy/data_deletion",["jquery","core/ajax","core/notification","core/str","core/modal_factory","core/modal_events"],function(a,b,c,d,e,f){var h={MARK_FOR_DELETION:"[data-action=\"markfordeletion\"]",SELECT_ALL:"[data-action=\"selectall\"]"},i={SELECTCONTEXT:".selectcontext"},j=function(){this.registerEvents()};j.prototype.registerEvents=function(){a(h.MARK_FOR_DELETION).click(function(b){b.preventDefault();var c=[];a(i.SELECTCONTEXT).each(function(){var b=a(this);if(b.is(":checked")){c.push(b.val())}});g(c)});a(h.SELECT_ALL).change(function(b){b.preventDefault();var c=a(this);if(c.is(":checked")){a(i.SELECTCONTEXT).attr("checked","checked")}else{a(i.SELECTCONTEXT).removeAttr("checked")}})};function g(a){var g="";d.get_strings([{key:"confirm",component:"moodle"},{key:"confirmcontextdeletion",component:"tool_dataprivacy"}]).then(function(a){g=a[0];var b=a[1];return e.create({title:g,body:b,type:e.types.SAVE_CANCEL})}).then(function(d){d.setSaveButtonText(g);d.getRoot().on(f.save,function(){b.call([{methodname:"tool_dataprivacy_confirm_contexts_for_deletion",args:{ids:a}}])[0].done(function(a){if(a.result){window.location.reload()}else{c.addNotification({message:a.warnings[0].message,type:"error"})}}).fail(c.exception)});d.getRoot().on(f.hidden,function(){d.destroy()});return d}).done(function(a){a.show()}).fail(c.exception)}return j}); define ("tool_dataprivacy/data_request_modal",["jquery","core/notification","core/custom_interaction_events","core/modal","core/modal_registry","tool_dataprivacy/events"],function(a,b,c,d,e,f){var g=!1,h={APPROVE_BUTTON:"[data-action=\"approve\"]",DENY_BUTTON:"[data-action=\"deny\"]",COMPLETE_BUTTON:"[data-action=\"complete\"]"},i=function(a){d.call(this,a)};i.TYPE="tool_dataprivacy-data_request";i.prototype=Object.create(d.prototype);i.prototype.constructor=i;i.prototype.registerEventListeners=function(){d.prototype.registerEventListeners.call(this);this.getModal().on(c.events.activate,h.APPROVE_BUTTON,function(b,c){var d=a.Event(f.approve);this.getRoot().trigger(d,this);if(!d.isDefaultPrevented()){this.hide();c.originalEvent.preventDefault()}}.bind(this));this.getModal().on(c.events.activate,h.DENY_BUTTON,function(b,c){var d=a.Event(f.deny);this.getRoot().trigger(d,this);if(!d.isDefaultPrevented()){this.hide();c.originalEvent.preventDefault()}}.bind(this));this.getModal().on(c.events.activate,h.COMPLETE_BUTTON,function(b,c){var d=a.Event(f.complete);this.getRoot().trigger(d,this);if(!d.isDefaultPrevented()){this.hide();c.originalEvent.preventDefault()}}.bind(this))};if(!g){e.register(i.TYPE,i,"tool_dataprivacy/data_request_modal");g=!0}return i}); define ("tool_dataprivacy/add_purpose",["jquery","core/str","core/ajax","core/notification","core/modal_factory","core/modal_events","core/fragment"],function(a,b,c,d,e,f,g){var h={PURPOSE_LINK:"[data-add-element=\"purpose\"]"},i=function(a){this.contextId=a;this.strings=b.get_strings([{key:"addpurpose",component:"tool_dataprivacy"},{key:"save",component:"admin"}]);this.registerEventListeners()};i.prototype.contextId=0;i.prototype.strings=0;i.prototype.registerEventListeners=function(){var b=a(h.PURPOSE_LINK);b.on("click",function(){return this.strings.then(function(a){e.create({type:e.types.SAVE_CANCEL,title:a[0],body:""},b).done(function(b){this.setupFormModal(b,a[1])}.bind(this))}.bind(this)).fail(d.exception)}.bind(this))};i.prototype.getBody=function(a){var b=null;if("undefined"!=typeof a){b={jsonformdata:JSON.stringify(a)}}return g.loadFragment("tool_dataprivacy","addpurpose_form",this.contextId,b)};i.prototype.setupFormModal=function(a,b){a.setLarge();a.setSaveButtonText(b);a.getRoot().on(f.hidden,this.destroy.bind(this));a.setBody(this.getBody());a.getRoot().on(f.save,this.submitForm.bind(this));a.getRoot().on("submit","form",this.submitFormAjax.bind(this));this.modal=a;a.show()};i.prototype.submitForm=function(a){a.preventDefault();this.modal.getRoot().find("form").submit()};i.prototype.submitFormAjax=function(a){a.preventDefault();var b=this.modal.getRoot().find("form").serialize();c.call([{methodname:"tool_dataprivacy_create_purpose_form",args:{jsonformdata:JSON.stringify(b)},done:function(a){if(a.validationerrors){this.modal.setBody(this.getBody(b))}else{this.close()}}.bind(this),fail:d.exception}])};i.prototype.close=function(){this.destroy();document.location.reload()};i.prototype.destroy=function(){Y.use("moodle-core-formchangechecker",function(){M.core_formchangechecker.reset_form_dirty_state()});this.modal.destroy()};i.prototype.removeListeners=function(){a(h.PURPOSE_LINK).off("click")};return{getInstance:function getInstance(a){return new i(a)}}}); define ("tool_dataprivacy/request_filter",["jquery","core/form-autocomplete","core/str","core/notification"],function(a,b,c,d){var e={REQUEST_FILTERS:"#request-filters"},f=function init(){c.get_strings([{key:"filter",component:"moodle"},{key:"nofiltersapplied",component:"moodle"}]).then(function(a){var c=a[0],d=a[1];return b.enhance(e.REQUEST_FILTERS,!1,"",c,!1,!0,d,!0)}).fail(d.exception);var f=a(e.REQUEST_FILTERS).val();a(e.REQUEST_FILTERS).on("change",function(){var b=a(this).val();if(f.join(",")!==b.join(",")){if(0===b.length){a("#filters-cleared").val(1)}a(this.form).submit()}})};return{init:function init(){f()}}}); define ("tool_dataprivacy/defaultsactions",["jquery","core/ajax","core/notification","core/str","core/modal_factory","core/modal_events","core/templates"],function(a,b,c,d,f,g,h){var k={EDIT_LEVEL_DEFAULTS:"[data-action=\"edit-level-defaults\"]",NEW_ACTIVITY_DEFAULTS:"[data-action=\"new-activity-defaults\"]",EDIT_ACTIVITY_DEFAULTS:"[data-action=\"edit-activity-defaults\"]",DELETE_ACTIVITY_DEFAULTS:"[data-action=\"delete-activity-defaults\"]"},l=-1,m=function(){this.registerEvents()};m.prototype.registerEvents=function(){a(k.EDIT_LEVEL_DEFAULTS).click(function(f){f.preventDefault();var e=a(this),g=e.data("contextlevel"),h=e.data("category"),j=e.data("purpose"),k=b.call([{methodname:"tool_dataprivacy_get_category_options",args:{}},{methodname:"tool_dataprivacy_get_purpose_options",args:{}}]),l=d.get_string("editdefaults","tool_dataprivacy",a("#defaults-header").text());a.when(k[0],k[1],l).then(function(a,b,c){var d=a.options,e=b.options;i(c,g,h,j,null,d,e,null);return!0}).catch(c.exception)});a(k.NEW_ACTIVITY_DEFAULTS).click(function(f){f.preventDefault();var e=a(this),g=e.data("contextlevel"),h=b.call([{methodname:"tool_dataprivacy_get_category_options",args:{}},{methodname:"tool_dataprivacy_get_purpose_options",args:{}},{methodname:"tool_dataprivacy_get_activity_options",args:{nodefaults:!0}}]),j=d.get_string("addnewdefaults","tool_dataprivacy");a.when(h[0],h[1],h[2],j).then(function(a,b,c,d){var e=a.options,f=b.options,h=c.options;i(d,g,null,null,null,e,f,h);return!0}).catch(c.exception)});a(k.EDIT_ACTIVITY_DEFAULTS).click(function(f){f.preventDefault();var e=a(this),g=e.data("contextlevel"),h=e.data("category"),j=e.data("purpose"),k=e.data("activityname"),l=b.call([{methodname:"tool_dataprivacy_get_category_options",args:{}},{methodname:"tool_dataprivacy_get_purpose_options",args:{}},{methodname:"tool_dataprivacy_get_activity_options",args:{}}]),m=d.get_string("editmoduledefaults","tool_dataprivacy");a.when(l[0],l[1],l[2],m).then(function(a,b,c,d){var e=a.options,f=b.options,l=c.options;i(d,g,h,j,k,e,f,l);return!0}).catch(c.exception)});a(k.DELETE_ACTIVITY_DEFAULTS).click(function(b){b.preventDefault();var e=a(this),i=e.data("contextlevel"),k=e.data("activityname"),m=e.data("activitydisplayname");f.create({title:d.get_string("deletedefaults","tool_dataprivacy",m),body:h.render("tool_dataprivacy/delete_activity_defaults",{activityname:m}),type:f.types.SAVE_CANCEL,large:!0}).then(function(a){a.setSaveButtonText(d.get_string("delete"));a.getRoot().on(g.save,function(){j(i,l,l,k,!1)});a.getRoot().on(g.hidden,function(){a.destroy()});a.show();return!0}).catch(c.exception)})};function i(b,d,e,i,k,l,m,n){if(null!==e){l.forEach(function(a){if(a.id===e){a.selected=!0}})}if(null!==i){m.forEach(function(a){if(a.id===i){a.selected=!0}})}var o={contextlevel:d,categoryoptions:l,purposeoptions:m};if(null!==n&&n.length){if(null===k){o.newactivitydefaults=!0}else{n.forEach(function(a){if(k===a.name){a.selected=!0}})}o.modemodule=!0;o.activityoptions=n}f.create({title:b,body:h.render("tool_dataprivacy/category_purpose_form",o),type:f.types.SAVE_CANCEL,large:!0}).then(function(b){b.getRoot().on(g.save,function(){var b=a("#activity"),c="undefined"!=typeof b?b.val():null,d=a("#override"),e="undefined"!=typeof d?d.is(":checked"):!1;j(a("#contextlevel").val(),a("#category").val(),a("#purpose").val(),c,e)});b.getRoot().on(g.hidden,function(){b.destroy()});b.show();return b}).catch(c.exception)}function j(a,c,d,e,f){b.call([{methodname:"tool_dataprivacy_set_context_defaults",args:{contextlevel:a,category:c,purpose:d,override:f,activity:e}}])[0].done(function(a){if(a.result){window.location.reload()}})}return{init:function init(){return new m}}}); define ("tool_dataprivacy/requestactions",["jquery","core/ajax","core/notification","core/str","core/modal_factory","core/modal_events","core/templates","tool_dataprivacy/data_request_modal","tool_dataprivacy/events"],function(a,b,c,d,e,f,g,h,i){var q={APPROVE_REQUEST:"[data-action=\"approve\"]",DENY_REQUEST:"[data-action=\"deny\"]",VIEW_REQUEST:"[data-action=\"view\"]",MARK_COMPLETE:"[data-action=\"complete\"]",CHANGE_BULK_ACTION:"[id=\"bulk-action\"]",CONFIRM_BULK_ACTION:"[id=\"confirm-bulk-action\"]",SELECT_ALL:"[data-action=\"selectall\"]"},r={APPROVE:1,DENY:2},s={SELECT_REQUEST:".selectrequests"},t=function(){this.registerEvents()};t.prototype.registerEvents=function(){a(q.VIEW_REQUEST).click(function(d){d.preventDefault();var k=a(this).data("requestid"),m=b.call([{methodname:"tool_dataprivacy_get_data_request",args:{requestid:k}}]);a.when(m[0]).then(function(a){if(a.result){return a.result}c.addNotification({message:a.warnings[0].message,type:"error"});return!1}).then(function(a){var b=g.render("tool_dataprivacy/request_details",a),c={approvedeny:a.approvedeny,canmarkcomplete:a.canmarkcomplete};return e.create({title:a.typename,body:b,type:h.TYPE,large:!0,templateContext:c})}).then(function(a){a.getRoot().on(i.approve,function(){o(i.approve,j(k))});a.getRoot().on(i.deny,function(){o(i.deny,l(k))});a.getRoot().on(i.complete,function(){p("tool_dataprivacy_mark_complete",{requestid:k})});a.getRoot().on(f.hidden,function(){a.destroy()});a.show()}).catch(c.exception)});a(q.APPROVE_REQUEST).click(function(b){b.preventDefault();var c=a(this).data("requestid");o(i.approve,j(c))});a(q.DENY_REQUEST).click(function(b){b.preventDefault();var c=a(this).data("requestid");o(i.deny,l(c))});a(q.MARK_COMPLETE).click(function(b){b.preventDefault();var c=a(this).data("requestid");o(i.complete,n(c))});a(q.CONFIRM_BULK_ACTION).click(function(){var b=[],e="",f={},g=[{key:"selectbulkaction",component:"tool_dataprivacy"},{key:"selectdatarequests",component:"tool_dataprivacy"},{key:"ok"}],h=parseInt(a("#bulk-action").val());if(h!=r.APPROVE&&h!=r.DENY){d.get_strings(g).done(function(a){c.alert("",a[0],a[2])}).fail(c.exception);return}a(".selectrequests:checked").each(function(){b.push(a(this).val())});if(1>b.length){d.get_strings(g).done(function(a){c.alert("",a[1],a[2])}).fail(c.exception);return}switch(h){case r.APPROVE:e=i.bulkApprove;f=k(b);break;case r.DENY:e=i.bulkDeny;f=m(b);}o(e,f)});a(q.SELECT_ALL).change(function(b){b.preventDefault();var c=a(this).is(":checked");a(s.SELECT_REQUEST).prop("checked",c)})};function j(a){return{wsfunction:"tool_dataprivacy_approve_data_request",wsparams:{requestid:a}}}function k(a){return{wsfunction:"tool_dataprivacy_bulk_approve_data_requests",wsparams:{requestids:a}}}function l(a){return{wsfunction:"tool_dataprivacy_deny_data_request",wsparams:{requestid:a}}}function m(a){return{wsfunction:"tool_dataprivacy_bulk_deny_data_requests",wsparams:{requestids:a}}}function n(a){return{wsfunction:"tool_dataprivacy_mark_complete",wsparams:{requestid:a}}}function o(a,b){var g=[];switch(a){case i.approve:g=[{key:"approverequest",component:"tool_dataprivacy"},{key:"confirmapproval",component:"tool_dataprivacy"}];break;case i.bulkApprove:g=[{key:"bulkapproverequests",component:"tool_dataprivacy"},{key:"confirmbulkapproval",component:"tool_dataprivacy"}];break;case i.deny:g=[{key:"denyrequest",component:"tool_dataprivacy"},{key:"confirmdenial",component:"tool_dataprivacy"}];break;case i.bulkDeny:g=[{key:"bulkdenyrequests",component:"tool_dataprivacy"},{key:"confirmbulkdenial",component:"tool_dataprivacy"}];break;case i.complete:g=[{key:"markcomplete",component:"tool_dataprivacy"},{key:"confirmcompletion",component:"tool_dataprivacy"}];break;}var h="";d.get_strings(g).then(function(a){h=a[0];var b=a[1];return e.create({title:h,body:b,type:e.types.SAVE_CANCEL})}).then(function(a){a.setSaveButtonText(h);a.getRoot().on(f.save,function(){p(b.wsfunction,b.wsparams)});a.getRoot().on(f.hidden,function(){a.destroy()});a.show()}).catch(c.exception)}function p(a,d){b.call([{methodname:a,args:d}])[0].done(function(a){if(a.result){window.location.reload()}else{c.addNotification({message:a.warnings[0].message,type:"error"})}}).fail(c.exception)}return t}); define ("tool_dataprivacy/data_registry",["jquery","core/str","core/ajax","core/notification","core/templates","core/modal_factory","core/modal_events","core/fragment","tool_dataprivacy/add_purpose","tool_dataprivacy/add_category"],function(a,b,c,d,e,f,g,h,i,j){var k={TREE_NODES:"[data-context-tree-node=1]",FORM_CONTAINER:"#context-form-container"},l=function(a,b,c){this.systemContextId=a;this.currentContextLevel=b;this.currentContextId=c;this.init()};l.prototype.systemContextId=0;l.prototype.currentContextLevel=0;l.prototype.currentContextId=0;l.prototype.addpurpose=null;l.prototype.addcategory=null;l.prototype.init=function(){this.addpurpose=i.getInstance(this.systemContextId);this.addcategory=j.getInstance(this.systemContextId);this.strings=b.get_strings([{key:"changessaved",component:"moodle"},{key:"contextpurposecategorysaved",component:"tool_dataprivacy"},{key:"noblockstoload",component:"tool_dataprivacy"},{key:"noactivitiestoload",component:"tool_dataprivacy"},{key:"nocoursestoload",component:"tool_dataprivacy"}]);this.registerEventListeners();if(this.currentContextId){this.loadForm("context_form",[this.currentContextId],this.submitContextFormAjax.bind(this))}else{this.loadForm("contextlevel_form",[this.currentContextLevel],this.submitContextLevelFormAjax.bind(this))}};l.prototype.registerEventListeners=function(){a(k.TREE_NODES).on("click",function(b){b.preventDefault();var c=a(b.currentTarget);a(k.TREE_NODES).removeClass("active");c.addClass("active");var d=c.data("contextlevel"),e=c.data("contextid");if(d){window.history.pushState({},null,"?contextlevel="+d);this.addpurpose.removeListeners();this.addcategory.removeListeners();this.currentContextLevel=d;this.loadForm("contextlevel_form",[this.currentContextLevel],this.submitContextLevelFormAjax.bind(this))}else if(e){window.history.pushState({},null,"?contextid="+e);this.addpurpose.removeListeners();this.addcategory.removeListeners();this.currentContextId=e;this.loadForm("context_form",[this.currentContextId],this.submitContextFormAjax.bind(this))}else{var f=c.data("expandcontextid"),g=c.data("expandelement"),h=c.data("expanded");if(g){if(!h){if(c.data("loaded")||!f||!g){this.expand(c)}else{c.find("> i").removeClass("fa-plus");c.find("> i").addClass("fa-circle-o-notch fa-spin");this.loadExtra(c,f,g)}}else{this.collapse(c)}}}}.bind(this))};l.prototype.removeListeners=function(){a(k.TREE_NODES).off("click")};l.prototype.loadForm=function(b,c,f){this.clearForm();var g=h.loadFragment("tool_dataprivacy",b,this.systemContextId,c);g.done(function(b,c){a(k.FORM_CONTAINER).html(b);e.runTemplateJS(c);this.addpurpose.registerEventListeners();this.addcategory.registerEventListeners();a(k.FORM_CONTAINER).on("submit","form",f)}.bind(this)).fail(d.exception)};l.prototype.clearForm=function(){Y.use("moodle-core-formchangechecker",function(){M.core_formchangechecker.reset_form_dirty_state()});a(k.FORM_CONTAINER).off("submit","form")};l.prototype.submitForm=function(b){b.preventDefault();a(k.FORM_CONTAINER).find("form").submit()};l.prototype.submitContextLevelFormAjax=function(a){this.submitFormAjax(a,"tool_dataprivacy_set_contextlevel_form")};l.prototype.submitContextFormAjax=function(a){this.submitFormAjax(a,"tool_dataprivacy_set_context_form")};l.prototype.submitFormAjax=function(b,e){b.preventDefault();var f=a(k.FORM_CONTAINER).find("form").serialize();return this.strings.then(function(a){c.call([{methodname:e,args:{jsonformdata:JSON.stringify(f)},done:function done(){d.alert(a[0],a[1])},fail:d.exception}])}).catch(d.exception)};l.prototype.loadExtra=function(a,b,f){c.call([{methodname:"tool_dataprivacy_tree_extra_branches",args:{contextid:b,element:f},done:function(b){if(0==b.branches.length){this.noElements(a,f);return}e.render("tool_dataprivacy/context_tree_branches",b).then(function(b){a.after(b);this.removeListeners();this.registerEventListeners();this.expand(a);a.data("loaded",1)}.bind(this)).fail(d.exception)}.bind(this),fail:d.exception}])};l.prototype.noElements=function(a,b){a.data("expandcontextid","");a.data("expandelement","");this.strings.then(function(c){var d=2;if("module"==b){d=3}else if("course"==b){d=4}a.text(c[d])}).fail(d.exception)};l.prototype.collapse=function(a){a.data("expanded",0);a.siblings("nav").addClass("hidden");a.find("> i").removeClass("fa-minus");a.find("> i").addClass("fa-plus")};l.prototype.expand=function(a){a.data("expanded",1);a.siblings("nav").removeClass("hidden");a.find("> i").removeClass("fa-plus");a.find("> i").removeClass("fa-circle-o-notch fa-spin");a.find("> i").addClass("fa-minus")};return{init:function init(a,b,c){return new l(a,b,c)}}}); define ("tool_dataprivacy/form-user-selector",["jquery","core/ajax","core/templates"],function(a,b,c){return{processResults:function processResults(b,c){var d=[];a.each(c,function(a,b){d.push({value:b.id,label:b._label})});return d},transport:function transport(d,e,f,g){var h=b.call([{methodname:"tool_dataprivacy_get_users",args:{query:e}}]);h[0].then(function(b){var d=[],e=0;a.each(b,function(a,b){d.push(c.render("tool_dataprivacy/form-user-selector-suggestion",b))});return a.when.apply(a.when,d).then(function(){var c=arguments;a.each(b,function(a,b){b._label=c[e];e++});f(b)})}).fail(g)}}}); define ("tool_dataprivacy/events",[],function(){return{approve:"tool_dataprivacy-data_request:approve",bulkApprove:"tool_dataprivacy-data_request:bulk_approve",deny:"tool_dataprivacy-data_request:deny",bulkDeny:"tool_dataprivacy-data_request:bulk_deny",complete:"tool_dataprivacy-data_request:complete"}}); define ("tool_dataprivacy/myrequestactions",["jquery","core/ajax","core/notification","core/str","core/modal_factory","core/modal_events","core/templates","core/pending"],function(a,b,c,d,e,f,g,h){var j={CANCEL_REQUEST:"[data-action=\"cancel\"]",CONTACT_DPO:"[data-action=\"contactdpo\"]"},k=function(){this.registerEvents()};k.prototype.registerEvents=function(){a(j.CANCEL_REQUEST).click(function(g){g.preventDefault();var h=a(this).data("requestid");d.get_strings([{key:"cancelrequest",component:"tool_dataprivacy"},{key:"cancelrequestconfirmation",component:"tool_dataprivacy"}]).then(function(a){var d=a[0],g=a[1];return e.create({title:d,body:g,type:e.types.SAVE_CANCEL}).then(function(a){a.setSaveButtonText(d);a.getRoot().on(f.save,function(){b.call([{methodname:"tool_dataprivacy_cancel_data_request",args:{requestid:h}}])[0].done(function(a){if(a.result){window.location.reload()}else{c.addNotification({message:a.warnings[0].message,type:"error"})}}).fail(c.exception)});a.getRoot().on(f.hidden,function(){a.destroy()});return a})}).done(function(a){a.show()}).fail(c.exception)});a(j.CONTACT_DPO).click(function(b){var j=new h("dataprivacy/crud:initModal:contactdpo");b.preventDefault();var k=a(this).data("replytoemail"),l="";d.get_strings([{key:"contactdataprotectionofficer",component:"tool_dataprivacy"},{key:"send",component:"tool_dataprivacy"}]).then(function(a){var b=a[0];l=a[1];return e.create({title:b,body:g.render("tool_dataprivacy/contact_dpo",{replytoemail:k}),type:e.types.SAVE_CANCEL,large:!0})}).then(function(b){b.setSaveButtonText(l);b.show();b.getRoot().on(f.save,function(b){var c=a("#message").val().trim();if(0===c.length){b.preventDefault();a("[data-region=\"messageinput\"]").addClass("has-danger notifyproblem");a("#id_error_message").removeAttr("hidden")}else{i(c)}});b.getRoot().on(f.hidden,function(){b.destroy()})}).then(j.resolve).catch(c.exception)})};function i(a){var e="success";b.call([{methodname:"tool_dataprivacy_contact_dpo",args:{message:a}}])[0].then(function(a){if(a.result){return d.get_string("requestsubmitted","tool_dataprivacy")}e="error";return a.warnings.join("
    ")}).done(function(a){c.addNotification({message:a,type:e})}).fail(c.exception)}return{init:function init(){return new k}}}); define ("tool_licensemanager/delete_license",["jquery","core/modal_factory","core/modal_events","core/url","core/str"],function(a,b,c,d,e){var f=a(".delete-license");b.create({type:b.types.SAVE_CANCEL,title:e.get_string("deletelicense","tool_licensemanager"),body:e.get_string("deletelicenseconfirmmessage","tool_licensemanager"),preShowCallback:function preShowCallback(b,c){b=a(b);var e={action:"delete",license:b.data("license")};c.deleteURL=d.relativeUrl("/admin/tool/licensemanager/index.php",e,!0)},large:!0},f).done(function(a){a.getRoot().on(c.save,function(b){b.preventDefault();window.location.href=a.deleteURL})})}); define ("tool_lp/competency_rule_points",["jquery","core/str","core/templates","tool_lp/competency_rule"],function(a,b,c,d){var e=function(){d.apply(this,arguments)};e.prototype=Object.create(d.prototype);e.prototype._container=null;e.prototype._templateLoaded=!1;e.prototype.getConfig=function(){return JSON.stringify({base:{points:this._getRequiredPoints()},competencies:this._getCompetenciesConfig()})};e.prototype._getCompetenciesConfig=function(){var b=[];this._container.find("[data-competency]").each(function(){var c=a(this),d=c.data("competency"),e=parseInt(c.find("[name=\"points\"]").val(),10),f=c.find("[name=\"required\"]").prop("checked");b.push({id:d,points:e,required:f?1:0})});return b};e.prototype._getRequiredPoints=function(){return parseInt(this._container.find("[name=\"requiredpoints\"]").val()||1,10)};e.prototype.getType=function(){return"core_competency\\competency_rule_points"};e.prototype.injectTemplate=function(b){var d=this,e=this._tree.getChildren(this._competency.id),f,g={base:{points:2},competencies:[]};this._templateLoaded=!1;if(d._competency.ruletype==d.getType()){try{g=JSON.parse(d._competency.ruleconfig)}catch(a){}}f={requiredpoints:g&&g.base?g.base.points:2,competency:d._competency,children:[]};a.each(e,function(b,c){var d={id:c.id,shortname:c.shortname,required:!1,points:0};if(g){a.each(g.competencies,function(a,b){if(b.id==d.id){d.required=b.required?!0:!1;d.points=b.points}})}f.children.push(d)});return c.render("tool_lp/competency_rule_points",f).then(function(a){d._container=b;b.html(a);b.find("input").change(function(){d._triggerChange()});d._templateLoaded=!0;d._triggerChange()})};e.prototype.isValid=function(){if(!this._templateLoaded){return!1}var b=this._getRequiredPoints(),c=0,d=!0;a.each(this._getCompetenciesConfig(),function(a,b){if(0>b.points){d=!1}c+=b.points});d=d&&c>=b;return d};return e}); define ("tool_lp/scaleconfig",["jquery","core/notification","core/templates","core/ajax","tool_lp/dialogue","tool_lp/scalevalues"],function(a,b,c,d,e,f){var g=function(b,c,d){this.selectSelector=b;this.inputSelector=c;this.triggerSelector=d;this.originalscaleid=a(b).val();a(b).on("change",this.scaleChangeHandler.bind(this)).change();a(d).click(this.showConfig.bind(this))};g.prototype.selectSelector=null;g.prototype.inputSelector=null;g.prototype.triggerSelector=null;g.prototype.scalevalues=null;g.prototype.originalscaleid=0;g.prototype.scaleid=0;g.prototype.popup=null;g.prototype.showConfig=function(){var d=this;this.scaleid=a(this.selectSelector).val();if(0>=this.scaleid){return}var f=a(this.selectSelector).find("option:selected").text();this.getScaleValues(this.scaleid).done(function(){var a={scalename:f,scales:d.scalevalues};c.render("tool_lp/scale_configuration_page",a).done(function(a){new e(f,a,d.initScaleConfig.bind(d))}).fail(b.exception)}).fail(b.exception)};g.prototype.retrieveOriginalScaleConfig=function(){var b=a(this.inputSelector).val();if(""!==b){var c=a.parseJSON(b),d=c.shift();if(d.scaleid===this.originalscaleid){return c}}return""};g.prototype.initScaleConfig=function(b){this.popup=b;var c=a(b.getContent());if(this.originalscaleid===this.scaleid){var d=this.retrieveOriginalScaleConfig();if(""!==d){d.forEach(function(a){if(1===a.scaledefault){c.find("[data-field=\"tool_lp_scale_default_"+a.id+"\"]").attr("checked",!0)}if(1===a.proficient){c.find("[data-field=\"tool_lp_scale_proficient_"+a.id+"\"]").attr("checked",!0)}})}}c.on("click","[data-action=\"close\"]",function(){this.setScaleConfig();b.close()}.bind(this));c.on("click","[data-action=\"cancel\"]",function(){b.close()})};g.prototype.setScaleConfig=function(){var b=a(this.popup.getContent()),c=[{scaleid:this.scaleid}];this.scalevalues.forEach(function(a){var d=0,e=0;if(b.find("[data-field=\"tool_lp_scale_default_"+a.id+"\"]").is(":checked")){d=1}if(b.find("[data-field=\"tool_lp_scale_proficient_"+a.id+"\"]").is(":checked")){e=1}if(!d&&!e){return}c.push({id:a.id,scaledefault:d,proficient:e})});var d=JSON.stringify(c);a(this.inputSelector).val(d);this.originalscaleid=this.scaleid};g.prototype.getScaleValues=function(a){return f.get_values(a).then(function(a){this.scalevalues=a;return a}.bind(this))};g.prototype.scaleChangeHandler=function(b){if(0>=a(b.target).val()){a(this.triggerSelector).prop("disabled",!0)}else{a(this.triggerSelector).prop("disabled",!1)}};return{init:function init(a,b,c){return new g(a,b,c)}}}); define ("tool_lp/course_competency_settings",["jquery","core/notification","tool_lp/dialogue","core/str","core/ajax","core/templates","core/pending"],function(a,b,c,d,f,g,h){var i=function(b){a(b).on("click",this.configureSettings.bind(this))};i.prototype._dialogue=null;i.prototype.configureSettings=function(f){var e=new h,i=a(f.target).closest("a").data("courseid"),j=a(f.target).closest("a").data("pushratingstouserplans");f.preventDefault();a.when(d.get_string("configurecoursecompetencysettings","tool_lp"),g.render("tool_lp/course_competency_settings",{courseid:i,settings:{pushratingstouserplans:j}})).then(function(a,b){this._dialogue=new c(a,b[0],this.addListeners.bind(this));return this._dialogue}.bind(this)).then(e.resolve).catch(b.exception)};i.prototype.addListeners=function(){var a=this._find("[data-action=\"save\"]");a.on("click",this.saveSettings.bind(this));var b=this._find("[data-action=\"cancel\"]");b.on("click",this.cancelChanges.bind(this))};i.prototype.cancelChanges=function(a){a.preventDefault();this._dialogue.close()};i.prototype._find=function(b){return a("[data-region=\"coursecompetencysettings\"]").find(b)};i.prototype.saveSettings=function(a){var c=new h;a.preventDefault();var d=this._find("input[name=\"pushratingstouserplans\"]:checked").val(),e=this._find("input[name=\"courseid\"]").val();f.call([{methodname:"core_competency_update_course_competency_settings",args:{courseid:e,settings:{pushratingstouserplans:d}}}])[0].then(function(){return this.refreshCourseCompetenciesPage()}.bind(this)).then(c.resolve).catch(b.exception)};i.prototype.refreshCourseCompetenciesPage=function(){var c=this._find("input[name=\"courseid\"]").val(),d=new h;f.call([{methodname:"tool_lp_data_for_course_competencies_page",args:{courseid:c,moduleid:0}}])[0].then(function(a){return g.render("tool_lp/course_competencies_page",a)}).then(function(b,c){g.replaceNode(a("[data-region=\"coursecompetenciespage\"]"),b,c);this._dialogue.close()}.bind(this)).then(d.resolve).catch(b.exception)};return i}); define ("tool_lp/evidence_delete",["jquery","core/notification","core/ajax","core/str","core/log"],function(a,b,c,d,e){var f={};return{register:function register(g,h){if("undefined"!=typeof f[g]){return}f[g]=a("body").delegate(g,"click",function(f){var g=a(f.currentTarget).parents(h);if(!g.length||1"),e=a("\"\""),f=function(b,c){this.treeRoot=a(b);this.multiSelect="undefined"==typeof c||!0===c;this.items=this.treeRoot.find("li");this.expandAll=20>this.items.length;this.parents=this.treeRoot.find("li:has(ul)");if(c){this.treeRoot.attr("aria-multiselectable","true")}this.items.attr("aria-selected","false");this.visibleItems=null;this.activeItem=null;this.lastActiveItem=null;this.keys={tab:9,enter:13,space:32,pageup:33,pagedown:34,end:35,home:36,left:37,up:38,right:39,down:40,eight:56,asterisk:106};this.init();this.bindEventHandlers()};f.prototype.init=function(){this.parents.attr("aria-expanded","true");this.parents.prepend(d.clone());this.items.attr("role","tree-item");this.items.attr("tabindex","-1");this.parents.attr("role","group");this.treeRoot.attr("role","tree");this.visibleItems=this.treeRoot.find("li");var b=this;if(!this.expandAll){this.parents.each(function(){b.collapseGroup(a(this))});this.expandGroup(this.parents.first())}};f.prototype.expandGroup=function(a){var b=a.children("ul");b.show().attr("aria-hidden","false");a.attr("aria-expanded","true");a.children("img").attr("src",d.attr("src"));this.visibleItems=this.treeRoot.find("li:visible")};f.prototype.collapseGroup=function(a){var b=a.children("ul");b.hide().attr("aria-hidden","true");a.attr("aria-expanded","false");a.children("img").attr("src",e.attr("src"));this.visibleItems=this.treeRoot.find("li:visible")};f.prototype.toggleGroup=function(a){if("true"==a.attr("aria-expanded")){this.collapseGroup(a)}else{this.expandGroup(a)}};f.prototype.triggerChange=function(){var a=this.items.filter("[aria-selected=true]");if(!this.multiSelect){a=a.first()}this.treeRoot.trigger("selectionchanged",{selected:a})};f.prototype.multiSelectItem=function(b){if(!this.multiSelect){this.items.attr("aria-selected","false")}else if(null!==this.lastActiveItem){var c=this.visibleItems.index(this.lastActiveItem),d=this.visibleItems.index(this.activeItem),e=null;while(cd){e=a(this.visibleItems.get(c));e.attr("aria-selected","true");c--}}b.attr("aria-selected","true");this.triggerChange()};f.prototype.selectItem=function(a){var b=a.parent();while("tree"!=b.attr("role")){b=b.parent();if("false"==b.attr("aria-expanded")){this.expandGroup(b)}b=b.parent()}this.items.attr("aria-selected","false");a.attr("aria-selected","true");this.triggerChange()};f.prototype.toggleItem=function(a){if(!this.multiSelect){this.selectItem(a);return}var b=a.attr("aria-selected");if("true"===b){b="false"}else{b="true"}a.attr("aria-selected",b);this.triggerChange()};f.prototype.updateFocus=function(a){this.lastActiveItem=this.activeItem;this.activeItem=a;var b=a.parent();while("tree"!=b.attr("role")){b=b.parent();if("false"==b.attr("aria-expanded")){this.expandGroup(b)}b=b.parent()}this.items.attr("tabindex","-1");a.attr("tabindex",0)};f.prototype.handleKeyDown=function(b,c){var d=this.visibleItems.index(b),e=null,f=c.shiftKey||c.ctrlKey||c.metaKey||c.altKey,g=this;switch(c.keyCode){case this.keys.home:{e=this.parents.first();e.focus();if(c.shiftKey){this.multiSelectItem(e)}else if(!f){this.selectItem(e)}c.stopPropagation();return!1}case this.keys.end:{e=this.visibleItems.last();e.focus();if(c.shiftKey){this.multiSelectItem(e)}else if(!f){this.selectItem(e)}c.stopPropagation();return!1}case this.keys.enter:case this.keys.space:{if(c.shiftKey){this.multiSelectItem(b)}else if(c.metaKey||c.ctrlKey){this.toggleItem(b)}else{this.selectItem(b)}c.stopPropagation();return!1}case this.keys.left:{if(b.has("ul")&&"true"==b.attr("aria-expanded")){this.collapseGroup(b)}else{var h=b.parent(),i=h.parent();if(i.is("li")){i.focus();if(c.shiftKey){this.multiSelectItem(i)}else if(!f){this.selectItem(i)}}}c.stopPropagation();return!1}case this.keys.right:{if(b.has("ul")&&"false"==b.attr("aria-expanded")){this.expandGroup(b)}else{e=b.children("ul").children("li").first();if(0a(window).height()){i=h+d;f.css("margin-top","-"+i+"px")}if(c){if(0>b.left-g){j=g-e;f.css("margin-right","-"+j+"px")}}else{if(b.left+g>a(window).width()){k=g-e;f.css("margin-left","-"+k+"px")}}if(!0){this.menuRoot.addClass("tool-lp-menu-open-left")}else{this.menuRoot.removeClass("tool-lp-menu-open-left")}};e.prototype.handleKeyDown=function(a,b){if(b.altKey||b.ctrlKey){return!0}switch(b.keyCode){case this.keys.tab:{this.menuRoot.find("ul").attr("aria-hidden","true");this.allItems.removeClass("menu-focus");this.activeItem=null;this.isChildOpen=!1;break}case this.keys.esc:{var c=a.parent();if(c.is(".tool-lp-menu")){a.children("ul").first().attr("aria-hidden","true")}else{this.activeItem=c.parent();this.isChildOpen=!1;this.activeItem.focus();c.attr("aria-hidden","true")}b.stopPropagation();return!1}case this.keys.enter:case this.keys.space:{return this.handleClick(a,b)}case this.keys.left:{this.activeItem=this.moveToPrevious(a);this.activeItem.focus();b.stopPropagation();return!1}case this.keys.right:{this.activeItem=this.moveToNext(a);this.activeItem.focus();b.stopPropagation();return!1}case this.keys.up:{this.activeItem=this.moveUp(a);this.activeItem.focus();b.stopPropagation();return!1}case this.keys.down:{this.activeItem=this.moveDown(a);this.activeItem.focus();b.stopPropagation();return!1}}return!0};e.prototype.moveToNext=function(a){var b=a.parent(),c=b.children("li"),d=c.length,e=c.index(a),f=null,g=null;if(b.is(".tool-lp-menu")){if(e");this._ready=a.Deferred();this._tree=b};b.prototype._competency=null;b.prototype._eventNode=null;b.prototype._ready=null;b.prototype._tree=null;b.prototype.canConfig=function(){return this._tree.hasChildren(this._competency.id)};b.prototype.getConfig=function(){return null};b.prototype.getType=function(){throw new Error("Not implemented")};b.prototype.init=function(){return this._load()};b.prototype.injectTemplate=function(){return a.Deferred().reject().promise()};b.prototype.isValid=function(){return!1};b.prototype._load=function(){return a.when()};b.prototype.on=function(a,b){this._eventNode.on(a,b)};b.prototype.setTargetCompetency=function(a){this._competency=a};b.prototype._trigger=function(a,b){this._eventNode.trigger(a,[b])};b.prototype._triggerChange=function(){this._trigger("change",this)};return b}); define ("tool_lp/competencytree",["core/ajax","core/notification","core/templates","tool_lp/tree","tool_lp/competency_outcomes","jquery"],function(a,b,c,d,e,f){var g={},h=0,j="",k="",l="",m=!1,n=function(a,b){var c=0,d=!1;a.haschildren=!1;a.children=[];for(c=0;c");this._tree=b;this._rulesModules=c;this._setUp()};g.prototype._competency=null;g.prototype._eventNode=null;g.prototype._outcomesOption=null;g.prototype._popup=null;g.prototype._ready=null;g.prototype._rules=null;g.prototype._rulesModules=null;g.prototype._tree=null;g.prototype._afterChange=function(){if(!this._isValid()){this._find("[data-action=\"save\"]").prop("disabled",!0)}else{this._find("[data-action=\"save\"]").prop("disabled",!1)}};g.prototype._afterRuleConfigChange=function(a,b){if(b!=this._getRule()){return}this._afterChange()};g.prototype._afterRender=function(){var a=this;a._find("[name=\"outcome\"]").on("change",function(){a._switchedOutcome()}).trigger("change");a._find("[name=\"rule\"]").on("change",function(){a._switchedRule()}).trigger("change");a._find("[data-action=\"save\"]").on("click",function(){a._trigger("save",a._getConfig());a.close()});a._find("[data-action=\"cancel\"]").on("click",function(){a.close()})};g.prototype.canBeConfigured=function(){var b=!1;a.each(this._rules,function(a,c){if(c.canConfig()){b=!0}});return b};g.prototype.close=function(){this._popup.close();this._popup=null};g.prototype.display=function(){var c=this;if(!c._competency){return!1}return a.when(f.get_string("competencyrule","tool_lp"),c._render()).then(function(a,b){c._popup=new d(a,b[0],c._afterRender.bind(c))}).fail(b.exception)};g.prototype._find=function(b){return a(this._popup.getContent()).find(b)};g.prototype._getApplicableOutcomesOptions=function(){var b=this,c=[];a.each(b._outcomesOption,function(a,d){c.push({code:d.code,name:d.name,selected:d.code==b._competency.ruleoutcome?!0:!1})});return c};g.prototype._getApplicableRulesOptions=function(){var b=this,c=[];a.each(b._rules,function(a,d){if(!d.canConfig()){return}c.push({name:b._getRuleName(d.getType()),type:d.getType(),selected:d.getType()==b._competency.ruletype?!0:!1})});return c};g.prototype._getConfig=function(){var a=this._getRule();return{ruletype:a?a.getType():null,ruleconfig:a?a.getConfig():null,ruleoutcome:this._getOutcome()}};g.prototype._getOutcome=function(){return this._find("[name=\"outcome\"]").val()};g.prototype._getRule=function(){var b,c=this._find("[name=\"rule\"]").val();a.each(this._rules,function(a,d){if(d.getType()==c){b=d}});return b};g.prototype._getRuleName=function(b){var c=this,d;a.each(c._rulesModules,function(a,c){if(c.type==b){d=c.name}});return d};g.prototype._initOutcomes=function(){var a=this;return e.getAll().then(function(b){a._outcomesOption=b})};g.prototype._initRules=function(){var b=this,c=[];a.each(b._rules,function(d,e){var f=e.init().then(function(){e.setTargetCompetency(b._competency);e.on("change",b._afterRuleConfigChange.bind(b))},function(){b._rules.splice(d,1);return a.when()});c.push(f)});return a.when.apply(a.when,c)};g.prototype._isValid=function(){var a=this._getOutcome(),b=this._getRule();if(a==e.NONE){return!0}else if(!b){return!1}return b.isValid()};g.prototype.on=function(a,b){this._eventNode.on(a,b)};g.prototype._preRender=function(){return this.ready()};g.prototype.ready=function(){return this._ready.promise()};g.prototype._render=function(){var a=this;return this._preRender().then(function(){var b;if(!a.canBeConfigured()){b=!1}else{b={};b.outcomes=a._getApplicableOutcomesOptions();b.rules=a._getApplicableRulesOptions()}var d={competencyshortname:a._competency.shortname,config:b};return c.render("tool_lp/competency_rule_config",d)})};g.prototype.setTargetCompetencyId=function(b){var c=this;c._competency=c._tree.getCompetency(b);a.each(c._rules,function(a,b){b.setTargetCompetency(c._competency)})};g.prototype._setUp=function(){var b=this,c=[],d=[];b._ready=a.Deferred();b._rules=[];a.each(b._rulesModules,function(a,b){d.push(b.amd)});require(d,function(){a.each(arguments,function(a,c){var d=new c(b._tree);b._rules.push(d)});c.push(b._initRules());c.push(b._initOutcomes());a.when.apply(a.when,c).always(function(){b._ready.resolve()})})};g.prototype._switchedOutcome=function(){var a=this,b=a._getOutcome();if(b==e.NONE){a._find("[data-region=\"rule-type\"]").hide().find("[name=\"rule\"]").val(-1);a._find("[data-region=\"rule-config\"]").empty().hide();a._afterChange();return}a._find("[data-region=\"rule-type\"]").show();a._find("[data-region=\"rule-config\"]").show();a._afterChange()};g.prototype._switchedRule=function(){var a=this,b=a._find("[data-region=\"rule-config\"]"),c=a._getRule();if(!c){b.empty().hide();a._afterChange();return}c.injectTemplate(b).then(function(){b.show()}).always(function(){a._afterChange()}).catch(function(){b.empty().hide()})};g.prototype._trigger=function(a,b){this._eventNode.trigger(a,[b])};return g}); define ("tool_lp/grade_dialogue",["jquery","core/notification","core/templates","tool_lp/dialogue","tool_lp/event_base","core/str"],function(a,b,c,d,e,f){var g=function(a){e.prototype.constructor.apply(this,[]);this._ratingOptions=a};g.prototype=Object.create(e.prototype);g.prototype._popup=null;g.prototype._ratingOptions=null;g.prototype._afterRender=function(){var b=this._find("[data-action=\"rate\"]"),c=this._find("[name=\"rating\"]"),d=this._find("[name=\"comment\"]");this._find("[data-action=\"cancel\"]").click(function(a){a.preventDefault();this._trigger("cancelled");this.close()}.bind(this));c.change(function(){var c=a(this);if(!c.val()){b.prop("disabled",!0)}else{b.prop("disabled",!1)}}).change();b.click(function(a){a.preventDefault();var b=c.val();if(!b){return}this._trigger("rated",{rating:b,note:d.val()});this.close()}.bind(this))};g.prototype.close=function(){this._popup.close();this._popup=null};g.prototype.display=function(){M.util.js_pending("tool_lp/grade_dialogue:display");return a.when(f.get_string("rate","tool_lp"),this._render()).then(function(a,b){this._popup=new d(a,b[0],function(){this._afterRender();M.util.js_complete("tool_lp/grade_dialogue:display")}.bind(this));return this._popup}.bind(this)).catch(b.exception)};g.prototype._find=function(b){return a(this._popup.getContent()).find(b)};g.prototype._render=function(){var a={cangrade:this._canGrade,ratings:this._ratingOptions};return c.render("tool_lp/competency_grader",a)};return g}); define ("tool_lp/frameworks_datasource",["jquery","core/ajax","core/notification"],function(a,b,c){return{list:function list(c,d){var e={context:{contextid:c}};a.extend(e,"undefined"==typeof d?{}:d);return b.call([{methodname:"core_competency_list_competency_frameworks",args:e}])[0]},processResults:function processResults(b,c){var d=[];a.each(c,function(a,b){d.push({value:b.id,label:b.shortname+" "+b.idnumber})});return d},transport:function transport(b,d,e){var f=a(b),g=f.data("contextid"),h=f.data("onlyvisible");if(!g){throw new Error("The attribute data-contextid is required on "+b)}this.list(g,{query:d,onlyvisible:h}).then(e).catch(c.exception)}}}); define ("tool_lp/user_competency_info",["jquery","core/notification","core/ajax","core/templates"],function(a,b,c,d){var e=function(a,b,c,d,e,f){this._rootElement=a;this._competencyId=b;this._userId=c;this._planId=d;this._courseId=e;this._valid=!0;this._displayuser="undefined"!=typeof f?f:!1;if(this._planId){this._methodName="tool_lp_data_for_user_competency_summary_in_plan";this._args={competencyid:this._competencyId,planid:this._planId};this._templateName="tool_lp/user_competency_summary_in_plan"}else if(this._courseId){this._methodName="tool_lp_data_for_user_competency_summary_in_course";this._args={userid:this._userId,competencyid:this._competencyId,courseid:this._courseId};this._templateName="tool_lp/user_competency_summary_in_course"}else{this._methodName="tool_lp_data_for_user_competency_summary";this._args={userid:this._userId,competencyid:this._competencyId};this._templateName="tool_lp/user_competency_summary"}};e.prototype.reload=function(){var a=this,e=[];if(!this._valid){return}e=c.call([{methodname:this._methodName,args:this._args}]);e[0].done(function(c){if(a._displayuser){c.displayuser=!0}d.render(a._templateName,c).done(function(b,c){d.replaceNode(a._rootElement,b,c)}).fail(b.exception)}).fail(b.exception)};e.prototype._rootElement=null;e.prototype._courseId=null;e.prototype._valid=null;e.prototype._planId=null;e.prototype._competencyId=null;e.prototype._userId=null;e.prototype._methodName=null;e.prototype._args=null;e.prototype._templateName=null;e.prototype._displayuser=!1;return e}); define ("tool_lp/grade_user_competency_inline",["jquery","core/notification","core/ajax","core/log","tool_lp/grade_dialogue","tool_lp/event_base","tool_lp/scalevalues"],function(a,b,c,d,e,f,g){var h=function(b,c,d,e,g,h,i){f.prototype.constructor.apply(this,[]);var j=a(b);if(!j.length){throw new Error("Could not find the trigger")}this._scaleId=c;this._competencyId=d;this._userId=e;this._planId=g;this._courseId=h;this._chooseStr=i;this._setUp();j.click(function(a){a.preventDefault();this._dialogue.display()}.bind(this));if(this._planId){this._methodName="core_competency_grade_competency_in_plan";this._args={competencyid:this._competencyId,planid:this._planId}}else if(this._courseId){this._methodName="core_competency_grade_competency_in_course";this._args={competencyid:this._competencyId,courseid:this._courseId,userid:this._userId}}else{this._methodName="core_competency_grade_competency";this._args={userid:this._userId,competencyid:this._competencyId}}};h.prototype=Object.create(f.prototype);h.prototype._setUp=function(){var a=[],d=this;M.util.js_pending("tool_lp/grade_user_competency_inline:_setUp");var f=g.get_values(d._scaleId);f.then(function(b){a.push({value:"",name:d._chooseStr});for(var c=0,e;c");f._frameworks=[];f._reset();f._pageContextId=b;f._pageContextIncludes=d||"children";f._multiSelect="undefined"==typeof e||!0===e;if(c){f._frameworkId=c;f._singleFramework=!0}};i.prototype._competencies=null;i.prototype._disallowedCompetencyIDs=null;i.prototype._eventNode=null;i.prototype._frameworks=null;i.prototype._frameworkId=null;i.prototype._pageContextId=null;i.prototype._pageContextIncludes=null;i.prototype._popup=null;i.prototype._searchText="";i.prototype._selectedCompetencies=null;i.prototype._singleFramework=!1;i.prototype._multiSelect=!0;i.prototype._onlyVisible=!0;i.prototype._afterRender=function(){var c=this,d=new g(c._find("[data-enhance=linktree]"),c._multiSelect);c._find("[data-enhance=linktree]").show();d.on("selectionchanged",function(b,d){var e=d.selected;b.preventDefault();var f=[];a.each(e,function(b,d){var e=a(d).data("id"),g=!0;if("undefined"==typeof e){g=!1}else{a.each(c._disallowedCompetencyIDs,function(a,b){if(b==e){g=!1}})}if(g){f.push(e)}});c._selectedCompetencies=f;if(!c._selectedCompetencies.length){c._find("[data-region=\"competencylinktree\"] [data-action=\"add\"]").attr("disabled","disabled")}else{c._find("[data-region=\"competencylinktree\"] [data-action=\"add\"]").removeAttr("disabled")}});if(!c._singleFramework){c._find("[data-action=\"chooseframework\"]").change(function(d){c._frameworkId=a(d.target).val();c._loadCompetencies().then(c._refresh.bind(c)).catch(b.exception)})}c._find("[data-region=\"filtercompetencies\"] button").click(function(b){b.preventDefault();a(b.target).attr("disabled","disabled");c._searchText=c._find("[data-region=\"filtercompetencies\"] input").val()||"";return c._refresh().always(function(){a(b.target).removeAttr("disabled")})});c._find("[data-region=\"competencylinktree\"] [data-action=\"cancel\"]").click(function(a){a.preventDefault();c.close()});c._find("[data-region=\"competencylinktree\"] [data-action=\"add\"]").click(function(a){a.preventDefault();var b=new h;if(!c._selectedCompetencies.length){return}if(c._multiSelect){c._trigger("save",{competencyIds:c._selectedCompetencies})}else{c._trigger("save",{competencyId:c._selectedCompetencies[0]})}c.close();b.resolve()});var e=c._selectedCompetencies.slice(0);a.each(e,function(a,b){var e=c._find("[data-id="+b+"]");if(e.length){d.toggleItem(e);d.updateFocus(e)}})};i.prototype.close=function(){var a=this;a._popup.close();a._reset()};i.prototype.display=function(){var c=this;return a.when(f.get_string("competencypicker","tool_lp"),c._render()).then(function(a,b){c._popup=new e(a,b[0],c._afterRender.bind(c))}).catch(b.exception)};i.prototype._fetchCompetencies=function(a,d){var e=this;return c.call([{methodname:"core_competency_search_competencies",args:{searchtext:d,competencyframeworkid:a}}])[0].done(function(a){function b(a,c){for(var d=0;d")};b.prototype._eventNode=null;b.prototype.on=function(a,b){this._eventNode.on(a,b)};b.prototype._trigger=function(a,b){this._eventNode.trigger(a,[b])};return b}); define ("tool_lp/planactions",["jquery","core/templates","core/ajax","core/notification","core/str","tool_lp/menubar","tool_lp/dialogue"],function(a,b,c,d,e,f,g){var h=function(a){this._type=a;if("plan"===a){this._region="[data-region=\"plan-page\"]";this._planNode="[data-region=\"plan-page\"]";this._template="tool_lp/plan_page";this._contextMethod="tool_lp_data_for_plan_page"}else if("plans"===a){this._region="[data-region=\"plans\"]";this._planNode="[data-region=\"plan-node\"]";this._template="tool_lp/plans_page";this._contextMethod="tool_lp_data_for_plans_page"}else{throw new TypeError("Unexpected type.")}};h.prototype._contextMethod=null;h.prototype._planNode=null;h.prototype._region=null;h.prototype._template=null;h.prototype._type=null;h.prototype._getContextArgs=function(a){var b=this,c={};if("plan"===b._type){c={planid:a.id}}else if("plans"===b._type){c={userid:a.userid}}return c};h.prototype.refresh=function(b){var c=this._findPlanData(a(b));this._callAndRefresh([],c)};h.prototype._renderView=function(c){var d=this;return b.render(d._template,c).then(function(c,e){a(d._region).replaceWith(c);b.runTemplateJS(e)})};h.prototype._callAndRefresh=function(b,e){var f="tool_lp/planactions:_callAndRefresh-"+Math.floor(Math.random()*Math.floor(1e3));M.util.js_pending(f);var g=this;b.push({methodname:g._contextMethod,args:g._getContextArgs(e)});return a.when.apply(a,c.call(b)).then(function(){return g._renderView(arguments[arguments.length-1])}).fail(d.exception).always(function(){return M.util.js_complete(f)})};h.prototype._doDelete=function(a){var b=this,c=[{methodname:"core_competency_delete_plan",args:{id:a.id}}];b._callAndRefresh(c,a)};h.prototype.deletePlan=function(a){var b=this,f;f=c.call([{methodname:"core_competency_read_plan",args:{id:a.id}}]);f[0].done(function(c){e.get_strings([{key:"confirm",component:"moodle"},{key:"deleteplan",component:"tool_lp",param:c.name},{key:"delete",component:"moodle"},{key:"cancel",component:"moodle"}]).done(function(c){d.confirm(c[0],c[1],c[2],c[3],function(){b._doDelete(a)})}).fail(d.exception)}).fail(d.exception)};h.prototype._doReopenPlan=function(a){var b=this,c=[{methodname:"core_competency_reopen_plan",args:{planid:a.id}}];b._callAndRefresh(c,a)};h.prototype.reopenPlan=function(a){var b=this,f=c.call([{methodname:"core_competency_read_plan",args:{id:a.id}}]);f[0].done(function(c){e.get_strings([{key:"confirm",component:"moodle"},{key:"reopenplanconfirm",component:"tool_lp",param:c.name},{key:"reopenplan",component:"tool_lp"},{key:"cancel",component:"moodle"}]).done(function(c){d.confirm(c[0],c[1],c[2],c[3],function(){b._doReopenPlan(a)})}).fail(d.exception)}).fail(d.exception)};h.prototype._doCompletePlan=function(a){var b=this,c=[{methodname:"core_competency_complete_plan",args:{planid:a.id}}];b._callAndRefresh(c,a)};h.prototype.completePlan=function(a){var b=this,f=c.call([{methodname:"core_competency_read_plan",args:{id:a.id}}]);f[0].done(function(c){e.get_strings([{key:"confirm",component:"moodle"},{key:"completeplanconfirm",component:"tool_lp",param:c.name},{key:"completeplan",component:"tool_lp"},{key:"cancel",component:"moodle"}]).done(function(c){d.confirm(c[0],c[1],c[2],c[3],function(){b._doCompletePlan(a)})}).fail(d.exception)}).fail(d.exception)};h.prototype._doUnlinkPlan=function(a){var b=this,c=[{methodname:"core_competency_unlink_plan_from_template",args:{planid:a.id}}];b._callAndRefresh(c,a)};h.prototype.unlinkPlan=function(a){var b=this,f=c.call([{methodname:"core_competency_read_plan",args:{id:a.id}}]);f[0].done(function(c){e.get_strings([{key:"confirm",component:"moodle"},{key:"unlinkplantemplateconfirm",component:"tool_lp",param:c.name},{key:"unlinkplantemplate",component:"tool_lp"},{key:"cancel",component:"moodle"}]).done(function(c){d.confirm(c[0],c[1],c[2],c[3],function(){b._doUnlinkPlan(a)})}).fail(d.exception)}).fail(d.exception)};h.prototype._doRequestReview=function(a){var b=[{methodname:"core_competency_plan_request_review",args:{id:a.id}}];this._callAndRefresh(b,a)};h.prototype.requestReview=function(a){this._doRequestReview(a)};h.prototype._doCancelReviewRequest=function(a){var b=[{methodname:"core_competency_plan_cancel_review_request",args:{id:a.id}}];this._callAndRefresh(b,a)};h.prototype.cancelReviewRequest=function(a){this._doCancelReviewRequest(a)};h.prototype._doStartReview=function(a){var b=[{methodname:"core_competency_plan_start_review",args:{id:a.id}}];this._callAndRefresh(b,a)};h.prototype.startReview=function(a){this._doStartReview(a)};h.prototype._doStopReview=function(a){var b=[{methodname:"core_competency_plan_stop_review",args:{id:a.id}}];this._callAndRefresh(b,a)};h.prototype.stopReview=function(a){this._doStopReview(a)};h.prototype._doApprove=function(a){var b=[{methodname:"core_competency_approve_plan",args:{id:a.id}}];this._callAndRefresh(b,a)};h.prototype.approve=function(a){this._doApprove(a)};h.prototype._doUnapprove=function(a){var b=[{methodname:"core_competency_unapprove_plan",args:{id:a.id}}];this._callAndRefresh(b,a)};h.prototype.unapprove=function(a){this._doUnapprove(a)};h.prototype._showLinkedCoursesHandler=function(f){f.preventDefault();var h=a(f.target).data("id"),i=c.call([{methodname:"tool_lp_list_courses_using_competency",args:{id:h}}]);i[0].done(function(a){b.render("tool_lp/linked_courses_summary",{courses:a}).done(function(a){e.get_string("linkedcourses","tool_lp").done(function(b){new g(b,a)}).fail(d.exception)}).fail(d.exception)}).fail(d.exception)};h.prototype._eventHandler=function(b,c){c.preventDefault();var d=this._findPlanData(a(c.target));this[b](d)};h.prototype._findPlanData=function(b){var c=b.parentsUntil(a(this._region).parent(),this._planNode),d;if(1!=c.length){throw new Error("The plan node was not located.")}d=c.data();if("undefined"==typeof d||"undefined"==typeof d.id){throw new Error("Plan data could not be found.")}return d};h.prototype.enhanceMenubar=function(a){f.enhance(a,{'[data-action="plan-delete"]':this._eventHandler.bind(this,"deletePlan"),'[data-action="plan-complete"]':this._eventHandler.bind(this,"completePlan"),'[data-action="plan-reopen"]':this._eventHandler.bind(this,"reopenPlan"),'[data-action="plan-unlink"]':this._eventHandler.bind(this,"unlinkPlan"),'[data-action="plan-request-review"]':this._eventHandler.bind(this,"requestReview"),'[data-action="plan-cancel-review-request"]':this._eventHandler.bind(this,"cancelReviewRequest"),'[data-action="plan-start-review"]':this._eventHandler.bind(this,"startReview"),'[data-action="plan-stop-review"]':this._eventHandler.bind(this,"stopReview"),'[data-action="plan-approve"]':this._eventHandler.bind(this,"approve"),'[data-action="plan-unapprove"]':this._eventHandler.bind(this,"unapprove")})};h.prototype.registerEvents=function(){var b=a(this._region);b.find("[data-action=\"plan-delete\"]").click(this._eventHandler.bind(this,"deletePlan"));b.find("[data-action=\"plan-complete\"]").click(this._eventHandler.bind(this,"completePlan"));b.find("[data-action=\"plan-reopen\"]").click(this._eventHandler.bind(this,"reopenPlan"));b.find("[data-action=\"plan-unlink\"]").click(this._eventHandler.bind(this,"unlinkPlan"));b.find("[data-action=\"plan-request-review\"]").click(this._eventHandler.bind(this,"requestReview"));b.find("[data-action=\"plan-cancel-review-request\"]").click(this._eventHandler.bind(this,"cancelReviewRequest"));b.find("[data-action=\"plan-start-review\"]").click(this._eventHandler.bind(this,"startReview"));b.find("[data-action=\"plan-stop-review\"]").click(this._eventHandler.bind(this,"stopReview"));b.find("[data-action=\"plan-approve\"]").click(this._eventHandler.bind(this,"approve"));b.find("[data-action=\"plan-unapprove\"]").click(this._eventHandler.bind(this,"unapprove"));b.find("[data-action=\"find-courses-link\"]").click(this._showLinkedCoursesHandler.bind(this))};return h}); define ("tool_lp/actionselector",["jquery","core/notification","core/ajax","core/templates","tool_lp/dialogue","tool_lp/event_base"],function(a,b,c,d,e,f){var g=function(a,b,c,d,e){var g=this;f.prototype.constructor.apply(this,[]);g._title=a;g._message=b;g._actions=c;g._confirm=d;g._cancel=e;g._selectedValue=null;g._reset()};g.prototype=Object.create(f.prototype);g.prototype._selectedValue=null;g.prototype._popup=null;g.prototype._title=null;g.prototype._message=null;g.prototype._actions=null;g.prototype._confirm=null;g.prototype._cancel=null;g.prototype._afterRender=function(){var b=this;b._find("[data-action=\"action-selector-confirm\"]").attr("disabled","disabled");b._find("[data-region=\"action-selector-radio-buttons\"]").change(function(){b._selectedValue=a("input[type='radio']:checked").val();b._find("[data-action=\"action-selector-confirm\"]").removeAttr("disabled");b._refresh.bind(b)});b._find("[data-action=\"action-selector-cancel\"]").click(function(a){a.preventDefault();b.close()});b._find("[data-action=\"action-selector-confirm\"]").click(function(a){a.preventDefault();if(!b._selectedValue.length){return}b._trigger("save",{action:b._selectedValue});b.close()})};g.prototype.close=function(){var a=this;a._popup.close();a._reset()};g.prototype.display=function(){var a=this;return a._render().then(function(b){a._popup=new e(a._title,b,a._afterRender.bind(a))}).fail(b.exception)};g.prototype._find=function(b){return a(this._popup.getContent()).find(b)};g.prototype._refresh=function(){var a=this;return a._render().then(function(b){a._find("[data-region=\"action-selector\"]").replaceWith(b);a._afterRender()})};g.prototype._render=function(){var a=this,b=[];for(var c in a._actions){b.push(a._actions[c])}var e={message:a._message,choices:b,confirm:a._confirm,cancel:a._cancel};return d.render("tool_lp/action_selector",e)};g.prototype._reset=function(){this._popup=null;this._selectedValue=""};return g}); define ("tool_lp/form-user-selector",["jquery","core/ajax","core/templates"],function(a,b,c){return{processResults:function processResults(b,c){var d=[];a.each(c,function(a,b){d.push({value:b.id,label:b._label})});return d},transport:function transport(d,e,f,g){var h,i=a(d).data("capability");if("undefined"==typeof i){i=""}h=b.call([{methodname:"tool_lp_search_users",args:{query:e,capability:i}}]);h[0].then(function(b){var d=[],e=0;a.each(b.users,function(b,e){var f=e,g=[];a.each(["idnumber","email","phone1","phone2","department","institution"],function(a,b){if("undefined"!=typeof e[b]&&""!==e[b]){f.hasidentity=!0;g.push(e[b])}});f.identity=g.join(", ");d.push(c.render("tool_lp/form-user-selector-suggestion",f))});return a.when.apply(a.when,d).then(function(){var c=arguments;a.each(b.users,function(a,b){b._label=c[e];e++});f(b.users)})}).catch(g)}}}); define ("tool_lp/scalevalues",["jquery","core/ajax"],function(a,b){var c=[];return{get_values:function get_values(d){var e=a.Deferred();if("undefined"==typeof c[d]){b.call([{methodname:"core_competency_get_scale_values",args:{scaleid:d},done:function done(a){c[d]=a;e.resolve(a)},fail:e.reject}])}else{e.resolve(c[d])}return e.promise()}}}); define ("tool_lp/competencies",["jquery","core/notification","core/ajax","core/templates","core/str","tool_lp/competencypicker","tool_lp/dragdrop-reorder","core/pending"],function(a,b,c,d,e,f,g,h){var i=function(b,c,d){this.itemid=b;this.itemtype=c;this.pageContextId=d;this.pickerInstance=null;a("[data-region=\"actions\"] button").prop("disabled",!1);this.registerEvents();this.registerDragDrop()};i.prototype.registerDragDrop=function(){var a=this;e.get_string("movecompetency","tool_lp").done(function(b){g.dragdrop("movecompetency",b,{identifier:"movecompetency",component:"tool_lp"},{identifier:"movecompetencyafter",component:"tool_lp"},"drag-samenode","drag-parentnode","drag-handlecontainer",function(b,c){a.handleDrop(b,c)})}).fail(b.exception)};i.prototype.handleDrop=function(d,e){var f=a(d).data("id"),g=a(e).data("id"),h=this,i=[];if("course"==h.itemtype){i=c.call([{methodname:"core_competency_reorder_course_competency",args:{courseid:h.itemid,competencyidfrom:f,competencyidto:g}}])}else if("template"==h.itemtype){i=c.call([{methodname:"core_competency_reorder_template_competency",args:{templateid:h.itemid,competencyidfrom:f,competencyidto:g}}])}else if("plan"==h.itemtype){i=c.call([{methodname:"core_competency_reorder_plan_competency",args:{planid:h.itemid,competencyidfrom:f,competencyidto:g}}])}else{return}i[0].fail(b.exception)};i.prototype.pickCompetency=function(){var g=this,i,j,k,l;if(!g.pickerInstance){if("template"===g.itemtype||"course"===g.itemtype){l="parents"}g.pickerInstance=new f(g.pageContextId,!1,l);g.pickerInstance.on("save",function(f,e){var l=e.competencyIds,m=new h;if("course"===g.itemtype){i=[];a.each(l,function(a,b){i.push({methodname:"core_competency_add_competency_to_course",args:{courseid:g.itemid,competencyid:b}})});i.push({methodname:"tool_lp_data_for_course_competencies_page",args:{courseid:g.itemid,moduleid:0}});j="tool_lp/course_competencies_page";k="coursecompetenciespage"}else if("template"===g.itemtype){i=[];a.each(l,function(a,b){i.push({methodname:"core_competency_add_competency_to_template",args:{templateid:g.itemid,competencyid:b}})});i.push({methodname:"tool_lp_data_for_template_competencies_page",args:{templateid:g.itemid,pagecontext:{contextid:g.pageContextId}}});j="tool_lp/template_competencies_page";k="templatecompetenciespage"}else if("plan"===g.itemtype){i=[];a.each(l,function(a,b){i.push({methodname:"core_competency_add_competency_to_plan",args:{planid:g.itemid,competencyid:b}})});i.push({methodname:"tool_lp_data_for_plan_page",args:{planid:g.itemid}});j="tool_lp/plan_page";k="plan-page"}c.call(i)[i.length-1].then(function(a){return d.render(j,a)}).then(function(b,c){d.replaceNode(a("[data-region=\""+k+"\"]"),b,c)}).then(m.resolve).catch(b.exception)})}return g.pickerInstance.display()};i.prototype.doDelete=function(e){var f=this,g=[],h="",i="";if("course"==f.itemtype){g=c.call([{methodname:"core_competency_remove_competency_from_course",args:{courseid:f.itemid,competencyid:e}},{methodname:"tool_lp_data_for_course_competencies_page",args:{courseid:f.itemid,moduleid:0}}]);h="tool_lp/course_competencies_page";i="coursecompetenciespage"}else if("template"==f.itemtype){g=c.call([{methodname:"core_competency_remove_competency_from_template",args:{templateid:f.itemid,competencyid:e}},{methodname:"tool_lp_data_for_template_competencies_page",args:{templateid:f.itemid,pagecontext:{contextid:f.pageContextId}}}]);h="tool_lp/template_competencies_page";i="templatecompetenciespage"}else if("plan"==f.itemtype){g=c.call([{methodname:"core_competency_remove_competency_from_plan",args:{planid:f.itemid,competencyid:e}},{methodname:"tool_lp_data_for_plan_page",args:{planid:f.itemid}}]);h="tool_lp/plan_page";i="plan-page"}g[1].done(function(c){d.render(h,c).done(function(b,c){a("[data-region=\""+i+"\"]").replaceWith(b);d.runTemplateJS(c)}).fail(b.exception)}).fail(b.exception)};i.prototype.deleteHandler=function(a){var d=this,f=[],g;if("course"==d.itemtype){g="unlinkcompetencycourse"}else if("template"==d.itemtype){g="unlinkcompetencytemplate"}else if("plan"==d.itemtype){g="unlinkcompetencyplan"}else{return}f=c.call([{methodname:"core_competency_read_competency",args:{id:a}}]);f[0].done(function(c){e.get_strings([{key:"confirm",component:"moodle"},{key:g,component:"tool_lp",param:c.shortname},{key:"confirm",component:"moodle"},{key:"cancel",component:"moodle"}]).done(function(c){b.confirm(c[0],c[1],c[2],c[3],function(){d.doDelete(a)})}).fail(b.exception)}).fail(b.exception)};i.prototype.registerEvents=function(){var f=this;if("course"==f.itemtype){a("[data-region=\"coursecompetenciespage\"]").on("change","select[data-field=\"ruleoutcome\"]",function(g){var e=new h,i=[],j=a(g.target).data("id"),k=a(g.target).val();i=c.call([{methodname:"core_competency_set_course_competency_ruleoutcome",args:{coursecompetencyid:j,ruleoutcome:k}},{methodname:"tool_lp_data_for_course_competencies_page",args:{courseid:f.itemid,moduleid:0}}]);i[1].then(function(a){return d.render("tool_lp/course_competencies_page",a)}).then(function(b,c){return d.replaceNode(a("[data-region=\""+"coursecompetenciespage"+"\"]"),b,c)}).then(e.resolve).catch(b.exception)})}a("[data-region=\"actions\"] button").click(function(a){var b=new h;a.preventDefault();f.pickCompetency().then(b.resolve).catch()});a("[data-action=\"delete-competency-link\"]").click(function(b){b.preventDefault();var c=a(b.target).closest("[data-id]").data("id");f.deleteHandler(c)})};return i}); define ("tool_lp/competencypicker_user_plans",["jquery","core/notification","core/ajax","core/templates","core/str","tool_lp/tree","tool_lp/competencypicker"],function(a,b,c,d,e,f,g){var h=function(a,b,c){g.prototype.constructor.apply(this,[1,!1,"self",c]);this._userId=a;this._plans=[];if(b){this._planId=b;this._singlePlan=!0}};h.prototype=Object.create(g.prototype);h.prototype._plans=null;h.prototype._planId=null;h.prototype._singlePlan=!1;h.prototype._userId=null;h.prototype._afterRender=function(){var c=this;g.prototype._afterRender.apply(c,arguments);if(!c._singlePlan){c._find("[data-action=\"chooseplan\"]").change(function(d){c._planId=a(d.target).val();c._loadCompetencies().then(c._refresh.bind(c)).catch(b.exception)})}};h.prototype._fetchCompetencies=function(a,d){var e=this;return c.call([{methodname:"core_competency_list_plan_competencies",args:{id:a}}])[0].done(function(a){var b,c,f=[];for(b=0;bc.shortname.toLowerCase().indexOf(d.toLowerCase())){continue}c.children=[];c.haschildren=0;f.push(c)}e._competencies=f}).fail(b.exception)};h.prototype._getPlan=function(b){var c;a.each(this._plans,function(a,d){if(d.id==b){c=d}});return c};h.prototype._loadCompetencies=function(){return this._fetchCompetencies(this._planId,this._searchText)};h.prototype._loadPlans=function(){var d,e=this;if(0span",P).on("dragover","li>span",Q).on("dragenter","li>span",R).on("dragleave","li>span",S).on("drop","li>span",T);b.on("selectionchanged",_);t=new m(o,w);t.on("save",M.bind(this))}}}); define ("tool_moodlenet/select_page",["core/ajax","core/templates","tool_moodlenet/selectors","core/notification"],function(a,b,c,d){var e,f=function(a){return b.renderPix("courses","tool_moodlenet").then(function(a){return a}).then(function(a){var c=document.createElement("div");c.innerHTML=a.trim();return b.render("core_course/no-courses",{nocoursesimg:c.firstChild.src})}).then(function(c,d){b.replaceNodeContents(a,c,d);a.classList.add("mx-auto");a.classList.add("w-25")})},g=function(a,c){return b.render("tool_moodlenet/view-cards",{courses:c}).then(function(c,d){b.replaceNodeContents(a,c,d);a.classList.remove("mx-auto");a.classList.remove("w-25")})},h=function(b,h,i){var j=h.querySelector(c.region.searchIcon),k=h.querySelector(c.region.clearIcon);if(""!==b){j.classList.add("d-none");k.parentElement.classList.remove("d-none")}else{j.classList.remove("d-none");k.parentElement.classList.add("d-none")}a.call([{methodname:"tool_moodlenet_search_courses",args:{searchvalue:b}}])[0].then(function(a){if(0===a.courses.length){return f(i)}else{a.courses.forEach(function(a){a.viewurl+="&id="+e});return g(i,a.courses)}}).catch(d.exception)},i=function(a){var b=a.querySelector(c.region.searchInput),d=a.querySelector(c.region.courses),e=a.querySelector(c.region.clearIcon);e.addEventListener("click",function(){b.value="";h("",a,d)});b.addEventListener("input",k(function(){h(b.value,a,d)},300))},j=function(a){var b=a.querySelector(c.region.courses);h("",a,b)},k=function(a,b,c){var d;return function(){var e=this,f=arguments,g=c&&!d;clearTimeout(d);d=setTimeout(function later(){d=null;if(!c){a.apply(e,f)}},b);if(g){a.apply(e,f)}}};return{init:function init(a){e=a;var b=document.querySelector(c.region.selectPage);i(b);j(b)}}}); define ("tool_moodlenet/instance_form",["tool_moodlenet/validator","tool_moodlenet/selectors","core/loadingicon","core/templates","core/notification","jquery"],function(a,b,c,d,e,f){var g=function(d){d.addEventListener("click",function(f){if(f.target.matches(b.action.submit)){var e=d.querySelector("[data-var=\"mnet-link\"]"),g=d.querySelector(b.region.spinner),h=document.querySelector(b.region.validationArea);g.classList.remove("d-none");var i=c.addIconToContainerWithPromise(g);a.validation(e).then(function(a){i.resolve();g.classList.add("d-none");if(a.result){e.classList.remove("is-invalid");e.classList.add("is-valid");h.innerText=a.message;h.classList.remove("text-danger");h.classList.add("text-success");setTimeout(function(){window.location=a.domain},1e3)}else{e.classList.add("is-invalid");h.innerText=a.message;h.classList.add("text-danger")}}).catch()}})},h=function(a,b,h,i){a.innerHTML="";var j=c.addIconToContainer(a),k=null,l=new Promise(function(a){k=a});f.when(j,l).then(function(){d.replaceNodeContents(a,b.customcarouseltemplate,"")}).catch(e.exception);g(a);h.one("slid.bs.carousel",function(){k()});h.carousel(2);i.setFooter(d.render("tool_moodlenet/chooser_footer_close_mnet",{}))},i=function(a,b,c){a.carousel(0);b.setFooter(c.customfootertemplate)};return{footerClickListener:function footerClickListener(a,c,d){if(a.target.matches(b.action.showMoodleNet)||a.target.closest(b.action.showMoodleNet)){a.preventDefault();var e=f(d.getBody()[0].querySelector(b.region.carousel)),g=e.find(b.region.moodleNet)[0];h(g,c,e,d)}if(a.target.matches(b.action.closeOption)){var j=f(d.getBody()[0].querySelector(b.region.carousel));i(j,d,c)}}}}); define ("tool_moodlenet/selectors",[],function(){return{action:{browse:"[data-action=\"browse\"]",submit:"[data-action=\"submit\"]",showMoodleNet:"[data-action=\"show-moodlenet\"]",closeOption:"[data-action=\"close-chooser-option-summary\"]"},region:{clearIcon:"[data-region=\"clear-icon\"]",courses:"[data-region=\"mnet-courses\"]",instancePage:"[data-region=\"moodle-net\"]",searchInput:"[data-region=\"search-input\"]",searchIcon:"[data-region=\"search-icon\"]",selectPage:"[data-region=\"moodle-net-select\"]",spinner:"[data-region=\"spinner\"]",validationArea:"[data-region=\"validation-area\"]",carousel:"[data-region=\"carousel\"]",moodleNet:"[data-region=\"pluginCarousel\"]"}}}); define ("tool_moodlenet/validator",["jquery","core/ajax","core/str","core/notification"],function(a,b,c,d){return{validation:function(e){var f=e.value;if(""===f||!f.includes("@")){a.when(c.get_string("profilevalidationerror","tool_moodlenet")).then(function(a){return Promise.reject().catch(function(){return{result:!1,message:a[0]}})}).fail(d.exception)}return b.call([{methodname:"tool_moodlenet_verify_webfinger",args:{profileurl:f,course:e.dataset.courseid,section:e.dataset.sectionid}}])[0].then(function(a){return a}).catch()}}}); define ("tool_policy/acceptances_filter_datasource",["jquery","core/ajax","core/notification"],function(a,b,c){return{list:function list(b,c){var d=[],e=a(b),f=a(b).data("originaloptionsjson"),g=e.val();a.each(f,function(b,e){if(""!==c.trim()&&-1===e.label.toLocaleLowerCase().indexOf(c.toLocaleLowerCase())){return!0}if(-1
    "+b.params.popupTitle+"
    "+b.params.popupText+"
    x";return a},e=function(c){var e=new Date,d=1e3*(60*(60*(24*b.params.agreementExpiresInDays)));e.setTime(e.getTime()+d);var f="expires="+e.toGMTString();document.cookie=b.vars.COOKIE_NAME+"="+c+"; "+f+";path=/";a(document).trigger("user_cookie_consent_changed",{consent:c})},f=function(){for(var a=!1,d=document.cookie.split(";"),e=0,f;ea){return this.endTour()}var c=this.getStepConfig(a);if(null===c){return this.endTour()}return this._gotoStep(c,b)}},{key:"_gotoStep",value:function _gotoStep(a,b){if(!a){return this.endTour()}if("undefined"!=typeof a.delay&&a.delay&&!a.delayed){a.delayed=!0;window.setTimeout(this._gotoStep.bind(this),a.delay,a,b);return this}else if(!a.orphan&&!this.isStepActuallyVisible(a)){var c=-1==b?"getPreviousStepNumber":"getNextStepNumber";return this.gotoStep(this[c](a.stepNumber),b)}this.hide();this.fireEventHandlers("beforeRender",a);this.renderStep(a);this.fireEventHandlers("afterRender",a);return this}},{key:"getStepConfig",value:function getStepConfig(a){if(null===a||0>a||a>=this.steps.length){return null}var c=this.normalizeStepConfig(this.steps[a]);c=b.default.extend(c,{stepNumber:a});return c}},{key:"normalizeStepConfig",value:function normalizeStepConfig(a){if("undefined"!=typeof a.reflex&&"undefined"==typeof a.moveAfterClick){a.moveAfterClick=a.reflex}if("undefined"!=typeof a.element&&"undefined"==typeof a.target){a.target=a.element}if("undefined"!=typeof a.content&&"undefined"==typeof a.body){a.body=a.content}a=b.default.extend({},this.stepDefaults,a);a=b.default.extend({},{attachTo:a.target,attachPoint:"after"},a);if(a.attachTo){a.attachTo=(0,b.default)(a.attachTo).first()}return a}},{key:"getStepTarget",value:function getStepTarget(a){if(a.target){return(0,b.default)(a.target)}return null}},{key:"fireEventHandlers",value:function fireEventHandlers(a,b){if("undefined"==typeof this.eventHandlers[a]){return this}this.eventHandlers[a].forEach(function(a){a.call(this,b)},this);return this}},{key:"addEventHandler",value:function addEventHandler(a,b){if("undefined"==typeof this.eventHandlers[a]){this.eventHandlers[a]=[]}this.eventHandlers[a].push(b);return this}},{key:"processStepListeners",value:function processStepListeners(a){this.listeners.push({node:this.currentStepNode,args:["click","[data-role=\"next\"]",b.default.proxy(this.next,this)]},{node:this.currentStepNode,args:["click","[data-role=\"previous\"]",b.default.proxy(this.previous,this)]},{node:this.currentStepNode,args:["click","[data-role=\"end\"]",b.default.proxy(this.endTour,this)]},{node:(0,b.default)("[data-flexitour=\"backdrop\"]"),args:["click",b.default.proxy(this.hide,this)]},{node:(0,b.default)("body"),args:["keydown",b.default.proxy(this.handleKeyDown,this)]});if(a.moveOnClick){var c=this.getStepTarget(a);this.listeners.push({node:c,args:["click",b.default.proxy(function(a){if(0===(0,b.default)(a.target).parents("[data-flexitour=\"container\"]").length){window.setTimeout(b.default.proxy(this.next,this),500)}},this)]})}this.listeners.forEach(function(a){a.node.on.apply(a.node,a.args)});return this}},{key:"resetStepListeners",value:function resetStepListeners(){if(this.listeners){this.listeners.forEach(function(a){a.node.off.apply(a.node,a.args)})}this.listeners=[];return this}},{key:"renderStep",value:function renderStep(a){this.currentStepConfig=a;this.setCurrentStepNumber(a.stepNumber);var c=(0,b.default)(this.getTemplateContent());c.find("[data-placeholder=\"title\"]").html(a.title);c.find("[data-placeholder=\"body\"]").html(a.body);if(this.isFirstStep(a.stepNumber)){c.find("[data-role=\"previous\"]").hide()}else{c.find("[data-role=\"previous\"]").prop("disabled",!1)}if(this.isLastStep(a.stepNumber)){c.find("[data-role=\"next\"]").hide();c.find("[data-role=\"end\"]").removeClass("btn-secondary").addClass("btn-primary")}else{c.find("[data-role=\"next\"]").prop("disabled",!1)}c.find("[data-role=\"previous\"]").attr("role","button");c.find("[data-role=\"next\"]").attr("role","button");c.find("[data-role=\"end\"]").attr("role","button");a.template=c;this.addStepToPage(a);this.processStepListeners(a);return this}},{key:"getTemplateContent",value:function getTemplateContent(){return(0,b.default)(this.templateContent).clone()}},{key:"addStepToPage",value:function addStepToPage(a){var c=(0,b.default)("").html(a.template).hide(),e=(0,b.default)("body, html").stop(!0,!0);if(this.isStepActuallyVisible(a)){var f=this.getStepTarget(a);f.data("flexitour","target");var g=this.calculateZIndex(f);if(g){a.zIndex=g+1}if(a.zIndex){c.css("zIndex",a.zIndex+1)}this.positionBackdrop(a);(0,b.default)(document.body).append(c);this.currentStepNode=c;this.currentStepNode.css({top:0,left:0});e.animate({scrollTop:this.calculateScrollTop(a)}).promise().then(function(){this.positionStep(a);this.revealStep(a)}.bind(this)).catch(function(){})}else if(a.orphan){a.isOrphan=!0;a.attachTo=(0,b.default)("body").first();a.attachPoint="append";this.positionBackdrop(a);c.addClass("orphan");(0,b.default)(document.body).append(c);this.currentStepNode=c;this.currentStepNode.offset(this.calculateStepPositionInPage());this.currentStepNode.css("position","fixed");this.currentStepPopper=new d.default((0,b.default)("body"),this.currentStepNode[0],{removeOnDestroy:!0,placement:a.placement+"-start",arrowElement:"[data-role=\"arrow\"]",modifiers:{hide:{enabled:!1},applyStyle:{onLoad:null,enabled:!1}}});this.revealStep(a)}return this}},{key:"revealStep",value:function revealStep(a){this.currentStepNode.fadeIn("",b.default.proxy(function(){this.announceStep(a);this.currentStepNode.focus();window.setTimeout(b.default.proxy(function(){if(this.currentStepNode){this.currentStepNode.focus()}},this),100)},this));return this}},{key:"announceStep",value:function announceStep(a){var b="tour-step-"+this.tourName+"-"+a.stepNumber;this.currentStepNode.attr("id",b);var c=this.currentStepNode.find("[data-placeholder=\"body\"]").first();c.attr("id",b+"-body");c.attr("role","document");var d=this.currentStepNode.find("[data-placeholder=\"title\"]").first();d.attr("id",b+"-title");d.attr("aria-labelledby",b+"-body");this.currentStepNode.attr("role","dialog");this.currentStepNode.attr("tabindex",0);this.currentStepNode.attr("aria-labelledby",b+"-title");this.currentStepNode.attr("aria-describedby",b+"-body");var e=this.getStepTarget(a);if(e){if(!e.attr("tabindex")){e.attr("tabindex",0)}e.data("original-describedby",e.attr("aria-describedby")).attr("aria-describedby",b+"-body")}this.accessibilityShow(a);return this}},{key:"handleKeyDown",value:function handleKeyDown(a){var c="a[href], link[href], [draggable=true], [contenteditable=true], ";c+=":input:enabled, [tabindex], button:enabled";switch(a.keyCode){case 27:this.endTour();break;case 9:(function(){if(!this.currentStepConfig.hasBackdrop){return}var d=(0,b.default)(document.activeElement),e=this.getStepTarget(this.currentStepConfig),f=(0,b.default)(c),g=(0,b.default)("span[data-flexitour=\"container\"]"),h;if(e){f=f.filter(function(a,b){return null!==e&&(e.has(b).length||g.has(b).length||e.is(b)||g.is(b))})}f.each(function(a,b){if(d.is(b)){h=a;return!1}return!0});var i,j,k;if(void 0!=h){var l=1;if(a.shiftKey){l=-1}i=h;do{i+=l;j=(0,b.default)(f[i])}while(j.length&&j.is(":disabled")||j.is(":hidden"));if(j.length){k=j.closest(e).length;k=k||j.closest(this.currentStepNode).length}else{k=!1}}if(k){j.focus()}else{if(a.shiftKey){this.currentStepNode.find(c).last().focus()}else{if(this.currentStepConfig.isOrphan){this.currentStepNode.focus()}else{e.focus()}}}a.preventDefault()}).call(this);break;}}},{key:"startTour",value:function startTour(a){if(this.storage&&"undefined"==typeof a){var b=this.storage.getItem(this.storageKey);if(b){var c=parseInt(b,10);if(c<=this.steps.length){a=c}}}if("undefined"==typeof a){a=this.getCurrentStepNumber()}this.fireEventHandlers("beforeStart",a);this.gotoStep(a);this.fireEventHandlers("afterStart",a);return this}},{key:"restartTour",value:function restartTour(){return this.startTour(0)}},{key:"endTour",value:function endTour(){this.fireEventHandlers("beforeEnd");if(this.currentStepConfig){var a=this.getStepTarget(this.currentStepConfig);if(a){if(!a.attr("tabindex")){a.attr("tabindex","-1")}a.focus()}}this.hide(!0);this.fireEventHandlers("afterEnd");return this}},{key:"hide",value:function hide(a){this.fireEventHandlers("beforeHide");if(this.currentStepNode&&this.currentStepNode.length){this.currentStepNode.hide();if(this.currentStepPopper){this.currentStepPopper.destroy()}}if(this.currentStepConfig){var d=this.getStepTarget(this.currentStepConfig);if(d){if(d.data("original-labelledby")){d.attr("aria-labelledby",d.data("original-labelledby"))}if(d.data("original-describedby")){d.attr("aria-describedby",d.data("original-describedby"))}if(d.data("original-tabindex")){d.attr("tabindex",d.data("tabindex"))}}this.currentStepConfig=null}var c=0;if(a){c=400}(0,b.default)("[data-flexitour=\"step-background\"]").remove();(0,b.default)("[data-flexitour=\"step-backdrop\"]").removeAttr("data-flexitour");(0,b.default)("[data-flexitour=\"backdrop\"]").fadeOut(c,function(){(0,b.default)(this).remove()});if(this.currentStepNode&&this.currentStepNode.length){var e=this.currentStepNode.attr("id");if(e){var f="[aria-describedby=\""+e+"-body\"]";(0,b.default)(f).removeAttr("tabindex");(0,b.default)(f).removeAttr("aria-describedby")}}this.resetStepListeners();this.accessibilityHide();this.fireEventHandlers("afterHide");this.currentStepNode=null;this.currentStepPopper=null;return this}},{key:"show",value:function show(){var a=this.getCurrentStepNumber();return this.gotoStep(a)}},{key:"getStepContainer",value:function getStepContainer(){return(0,b.default)(this.currentStepNode)}},{key:"calculateScrollTop",value:function calculateScrollTop(a){var c=(0,b.default)(window).scrollTop(),d=(0,b.default)(window).height(),e=this.getStepTarget(a);if("top"===a.placement){c=e.offset().top-d/2}else if("bottom"===a.placement){c=e.offset().top+e.height()-d/2}else if(e.height()<=.8*d){c=e.offset().top-(d-e.height())/2}else{c=e.offset().top-.2*d}c=Math.max(0,c);c=Math.min((0,b.default)(document).height()-d,c);return Math.ceil(c)}},{key:"calculateStepPositionInPage",value:function calculateStepPositionInPage(){var a=(0,b.default)(window).height(),c=this.currentStepNode.height(),d=(0,b.default)(window).width(),e=this.currentStepNode.width();return{top:Math.ceil((a-c)/2),left:Math.ceil((d-e)/2)}}},{key:"positionStep",value:function positionStep(a){var c=this.currentStepNode;if(!c||!c.length){return this}a.placement=this.recalculatePlacement(a);var e;switch(a.placement){case"left":e=["left","right","top","bottom"];break;case"right":e=["right","left","top","bottom"];break;case"top":e=["top","bottom","right","left"];break;case"bottom":e=["bottom","top","right","left"];break;default:e="flip";break;}var f=this.getStepTarget(a),g={placement:a.placement+"-start",removeOnDestroy:!0,modifiers:{flip:{behaviour:e},arrow:{element:"[data-role=\"arrow\"]"}},onCreate:function onCreate(a){h(a)},onUpdate:function onUpdate(a){h(a)}},h=function(a){var c=a.placement.split("-")[0],d=-1!==["left","right"].indexOf(c),e=a.instance.popper.querySelector("[data-role=\"arrow\"]"),f=(0,b.default)(a.instance.popper.querySelector("[data-role=\"flexitour-step\"]"));if(d){var g=parseFloat(window.getComputedStyle(e).height),h=parseFloat(window.getComputedStyle(e).top),i=parseFloat(window.getComputedStyle(a.instance.popper).height),j=parseFloat(window.getComputedStyle(a.instance.popper).top),k=parseFloat(f.css("borderTopWidth")),l=2*parseFloat(f.css("borderTopLeftRadius")),m=h+g/2,n=i+j-k-l,o=j+k+l;if(m>=n||m<=o){var y=0;if(m>i/2){y=n-g}else{y=o+g}(0,b.default)(e).css("top",y)}}else{var p=parseFloat(window.getComputedStyle(e).width),q=parseFloat(window.getComputedStyle(e).left),r=parseFloat(window.getComputedStyle(a.instance.popper).width),s=parseFloat(window.getComputedStyle(a.instance.popper).left),t=parseFloat(f.css("borderTopWidth")),u=2*parseFloat(f.css("borderTopLeftRadius")),v=q+p/2,w=r+s-t-u,x=s+t+u;if(v>=w||v<=x){var z=0;if(v>r/2){z=w-p}else{z=x+p}(0,b.default)(e).css("left",z)}}},i=(0,b.default)("[data-flexitour=\"step-background\"]");if(i.length){f=i}this.currentStepPopper=new d.default(f,c[0],g);return this}},{key:"recalculatePlacement",value:function recalculatePlacement(a){var b=this.getStepTarget(a),c=this.currentStepNode.width()+16,d=b.offset().left-10,e=b.offset().left+b.width()+10,f=a.placement;if(-1!==["left","right"].indexOf(f)){if(ddocument.documentElement.clientWidth){f="top"}}return f}},{key:"positionBackdrop",value:function positionBackdrop(a){if(a.backdrop){this.currentStepConfig.hasBackdrop=!0;var g=(0,b.default)("
    ");if(a.zIndex){if("append"===a.attachPoint){a.attachTo.append(g)}else{g.insertAfter(a.attachTo)}}else{(0,b.default)("body").append(g)}if(this.isStepActuallyVisible(a)){var c=(0,b.default)("
    "),d=this.getStepTarget(a),e=10,f=d;if(e){f=(0,b.default)("body")}c.css({width:d.outerWidth()+e+e,height:d.outerHeight()+e+e,left:d.offset().left-e,top:d.offset().top-e,backgroundColor:this.calculateInherittedBackgroundColor(f)});if(d.offset().left").hide();(0,b.default)("body").append(c);var d=c.css("backgroundColor");c.remove();a=(0,b.default)(a);while(a.length&&a[0]!==document){var e=a.css("backgroundColor");if(e!==d){return e}a=a.parent()}return null}},{key:"calculatePosition",value:function calculatePosition(a){a=(0,b.default)(a);while(a.length&&a[0]!==document){var c=a.css("position");if("static"!==c){return c}a=a.parent()}return null}},{key:"accessibilityShow",value:function accessibilityShow(){var a=function(a){var b=a.data("flexitour");if(b){switch(b){case"container":case"target":return;}}var d=a.attr("aria-hidden");if(!d){a.attr("data-has-hidden",!0);c.hide(a)}};this.currentStepNode.siblings().each(function(c,d){a((0,b.default)(d))});this.currentStepNode.parentsUntil("body").siblings().each(function(c,d){a((0,b.default)(d))})}},{key:"accessibilityHide",value:function accessibilityHide(){var a=function(a){var b=a.attr("data-has-hidden");if("undefined"!=typeof b){a.removeAttr("data-has-hidden");c.unhide(a)}};(0,b.default)("[data-has-hidden]").each(function(c,d){a((0,b.default)(d))})}}]);return a}();a.default=l;return a.default}); define ("tool_usertours/managesteps",["jquery","core/str","core/notification"],function(a,b,c){var d={removeStep:function removeStep(d){d.preventDefault();var e=a(d.currentTarget).attr("href");b.get_strings([{key:"confirmstepremovaltitle",component:"tool_usertours"},{key:"confirmstepremovalquestion",component:"tool_usertours"},{key:"yes",component:"moodle"},{key:"no",component:"moodle"}]).then(function(a){c.confirm(a[0],a[1],a[2],a[3],function(){window.location=e})}).catch()},setup:function setup(){a("body").delegate("[data-action=\"delete\"]","click",d.removeStep)}};return{setup:d.setup}}); define ("tool_usertours/filter_cssselector",["exports"],function(a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.filterMatches=void 0;a.filterMatches=function filterMatches(a){var b=a.filtervalues.cssselector;if(b[0]){return!!document.querySelector(b[0])}return!0}}); define ("tool_usertours/managetours",["jquery","core/ajax","core/str","core/notification"],function(a,b,c,d){var e={removeTour:function removeTour(b){b.preventDefault();var e=a(b.currentTarget).attr("href");c.get_strings([{key:"confirmtourremovaltitle",component:"tool_usertours"},{key:"confirmtourremovalquestion",component:"tool_usertours"},{key:"yes",component:"moodle"},{key:"no",component:"moodle"}]).then(function(a){d.confirm(a[0],a[1],a[2],a[3],function(){window.location=e})}).catch()},setup:function setup(){a("body").delegate("[data-action=\"delete\"]","click",e.removeTour)}};return{setup:e.setup}}); define ("tool_usertours/usertours",["core/ajax","tool_usertours/tour","jquery","core/templates","core/str","core/log","core/notification"],function(a,b,c,d,e,f,g){var h={tourId:null,currentTour:null,init:function init(a,b){for(var d=[],e=0;edocument.documentElement.clientHeight;if(!this._isBodyOverflowing&&a){this._element.style.paddingLeft="".concat(this._scrollbarWidth,"px")}if(this._isBodyOverflowing&&!a){this._element.style.paddingRight="".concat(this._scrollbarWidth,"px")}}},{key:"_resetAdjustments",value:function(){this._element.style.paddingLeft="";this._element.style.paddingRight=""}},{key:"_checkScrollbar",value:function(){var a=document.body.getBoundingClientRect();this._isBodyOverflowing=a.left+a.righta(document).width(),h=function(){if(!a(f.TOGGLE_REGION).length){c.debug("Page is missing a drawer region")}if(!a(f.TOGGLE_ACTION).length){c.debug("Page is missing a drawer toggle link")}a(f.TOGGLE_REGION).each(function(b,c){var d=a(c).find(f.TOGGLE_ACTION),e=d.attr("aria-controls"),h=a(document.getElementById(e)),i="false"==d.attr("aria-expanded"),j=d.attr("data-side"),k=a(f.BODY),l=d.attr("data-preference");if(g){M.util.set_user_preference(l,"false")}h.on("mousewheel DOMMouseScroll",this.preventPageScroll);if(!i){k.addClass("drawer-open-"+j);d.attr("aria-expanded","true")}else{d.attr("aria-expanded","false")}}.bind(this));this.registerEventListeners();if(g){this.closeAll()}};h.prototype.closeAll=function(){a(f.TOGGLE_REGION).each(function(b,c){var d=a(c).find(f.TOGGLE_ACTION),h=d.attr("data-side"),i=a(f.BODY),j=d.attr("aria-controls"),k=a(document.getElementById(j)),l=d.attr("data-preference");d.attr("aria-expanded","false");i.removeClass("drawer-open-"+h);e.hide(k.get());k.addClass("closed");if(!g){M.util.set_user_preference(l,"false")}})};h.prototype.toggleDrawer=function(b){var c=a(b.target).closest("[data-action=toggle-drawer]"),h=c.attr("aria-controls"),i=a(document.getElementById(h)),j=a(f.BODY),k=c.attr("data-side"),l=c.attr("data-preference");if(g){M.util.set_user_preference(l,"false")}j.addClass("drawer-ease");var m="true"==c.attr("aria-expanded");if(!m){c.attr("aria-expanded","true");e.unhide(i.get());i.focus();j.addClass("drawer-open-"+k);i.removeClass("closed");if(!g){M.util.set_user_preference(l,"true")}}else{j.removeClass("drawer-open-"+k);c.attr("aria-expanded","false");i.addClass("closed").delay(500).queue(function(){if(a(this).hasClass("closed")){e.hide(this)}a(this).dequeue()});if(!g){M.util.set_user_preference(l,"false")}}d.publish("nav-drawer-toggle-start",m)};h.prototype.preventPageScroll=function(b){var c=b.wheelDelta||b.originalEvent&&b.originalEvent.wheelDelta||-b.originalEvent.detail,d=0<=this.scrollTop+a(this).outerHeight()-this.scrollHeight,e=0>=this.scrollTop;if(0>c&&d||0g){g=0}f[g].focus()}},{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return C}},{key:"DefaultType",get:function(){return D}}]);return a}();(0,l.default)(document).on(y.KEYDOWN_DATA_API,A.DATA_TOGGLE,E._dataApiKeydownHandler).on(y.KEYDOWN_DATA_API,A.MENU,E._dataApiKeydownHandler).on("".concat(y.CLICK_DATA_API," ").concat(y.KEYUP_DATA_API),E._clearMenus).on(y.CLICK_DATA_API,A.DATA_TOGGLE,function(a){a.preventDefault();a.stopPropagation();E._jQueryInterface.call((0,l.default)(this),"toggle")}).on(y.CLICK_DATA_API,A.FORM_CHILD,function(a){a.stopPropagation()});l.default.fn.dropdown=E._jQueryInterface;l.default.fn.dropdown.Constructor=E;l.default.fn.dropdown.noConflict=function(){l.default.fn.dropdown=r;return E._jQueryInterface};a.default=E;return a.default}); "use strict";define ("theme_boost/util",["exports","jquery"],function(a,b){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var f=function(a){return a&&a.__esModule?a:{default:a}}(b);function c(a){return{}.toString.call(a).match(/\s([a-z]+)/i)[1].toLowerCase()}function d(){return{bindType:"transitionend",delegateType:"transitionend",handle:function(a){if((0,f.default)(a.target).is(this)){return a.handleObj.handler.apply(this,arguments)}}}}function e(a){var b=this,c=!1;(0,f.default)(this).one(g.TRANSITION_END,function(){c=!0});setTimeout(function(){if(!c){g.triggerTransitionEnd(b)}},a);return this}var g={TRANSITION_END:"bsTransitionEnd",getUID:function(a){do{a+=~~(Math.random()*1e6)}while(document.getElementById(a));return a},getSelectorFromElement:function(a){var b=a.getAttribute("data-target");if(!b||"#"===b){var c=a.getAttribute("href");b=c&&"#"!==c?c.trim():""}try{return document.querySelector(b)?b:null}catch(a){return null}},getTransitionDurationFromElement:function(a){if(!a){return 0}var b=(0,f.default)(a).css("transition-duration"),c=(0,f.default)(a).css("transition-delay"),d=parseFloat(b),e=parseFloat(c);if(!d&&!e){return 0}b=b.split(",")[0];c=c.split(",")[0];return(parseFloat(b)+parseFloat(c))*1e3},reflow:function(a){return a.offsetHeight},triggerTransitionEnd:function(a){(0,f.default)(a).trigger("transitionend")},supportsTransitionEnd:function(){return!0},isElement:function(a){return(a[0]||a).nodeType},typeCheckConfig:function(a,b,d){for(var e in d){if(Object.prototype.hasOwnProperty.call(d,e)){var f=d[e],h=b[e],i=h&&g.isElement(h)?"element":c(h);if(!new RegExp(f).test(i)){throw new Error("".concat(a.toUpperCase(),": ")+"Option \"".concat(e,"\" provided type \"").concat(i,"\" ")+"but expected type \"".concat(f,"\"."))}}}},findShadowRoot:function(a){if(!document.documentElement.attachShadow){return null}if("function"==typeof a.getRootNode){var b=a.getRootNode();return b instanceof ShadowRoot?b:null}if(a instanceof ShadowRoot){return a}if(!a.parentNode){return null}return g.findShadowRoot(a.parentNode)}};(function(){f.default.fn.emulateTransitionEnd=e;f.default.event.special[g.TRANSITION_END]=d()})();a.default=g;return a.default}); "use strict";define ("theme_boost/tab",["exports","jquery","./util"],function(a,b,c){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var h=d(b),i=d(c);function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b)){throw new TypeError("Cannot call a class as a function")}}function f(a,b){for(var c=0,d;c li > .active",DATA_TOGGLE:"[data-toggle=\"tab\"], [data-toggle=\"pill\"], [data-toggle=\"list\"]",DROPDOWN_TOGGLE:".dropdown-toggle",DROPDOWN_ACTIVE_CHILD:"> .dropdown-menu .active"},p=function(){function a(b){e(this,a);this._element=b}g(a,[{key:"show",value:function(){var a=this;if(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&(0,h.default)(this._element).hasClass(n.ACTIVE)||(0,h.default)(this._element).hasClass(n.DISABLED)){return}var b,c,d=(0,h.default)(this._element).closest(o.NAV_LIST_GROUP)[0],e=i.default.getSelectorFromElement(this._element);if(d){var f="UL"===d.nodeName||"OL"===d.nodeName?o.ACTIVE_UL:o.ACTIVE;c=h.default.makeArray((0,h.default)(d).find(f));c=c[c.length-1]}var g=h.default.Event(m.HIDE,{relatedTarget:this._element}),j=h.default.Event(m.SHOW,{relatedTarget:c});if(c){(0,h.default)(c).trigger(g)}(0,h.default)(this._element).trigger(j);if(j.isDefaultPrevented()||g.isDefaultPrevented()){return}if(e){b=document.querySelector(e)}this._activate(this._element,d);var k=function(){var b=h.default.Event(m.HIDDEN,{relatedTarget:a._element}),d=h.default.Event(m.SHOWN,{relatedTarget:c});(0,h.default)(c).trigger(b);(0,h.default)(a._element).trigger(d)};if(b){this._activate(b,b.parentNode,k)}else{k()}}},{key:"dispose",value:function(){h.default.removeData(this._element,j);this._element=null}},{key:"_activate",value:function(a,b,c){var d=this,e=b&&("UL"===b.nodeName||"OL"===b.nodeName)?(0,h.default)(b).find(o.ACTIVE_UL):(0,h.default)(b).children(o.ACTIVE),f=e[0],g=c&&f&&(0,h.default)(f).hasClass(n.FADE),j=function(){return d._transitionComplete(a,f,c)};if(f&&g){var k=i.default.getTransitionDurationFromElement(f);(0,h.default)(f).removeClass(n.SHOW).one(i.default.TRANSITION_END,j).emulateTransitionEnd(k)}else{j()}}},{key:"_transitionComplete",value:function(a,b,c){if(b){(0,h.default)(b).removeClass(n.ACTIVE);var d=(0,h.default)(b.parentNode).find(o.DROPDOWN_ACTIVE_CHILD)[0];if(d){(0,h.default)(d).removeClass(n.ACTIVE)}if("tab"===b.getAttribute("role")){b.setAttribute("aria-selected",!1)}}(0,h.default)(a).addClass(n.ACTIVE);if("tab"===a.getAttribute("role")){a.setAttribute("aria-selected",!0)}i.default.reflow(a);if(a.classList.contains(n.FADE)){a.classList.add(n.SHOW)}if(a.parentNode&&(0,h.default)(a.parentNode).hasClass(n.DROPDOWN_MENU)){var e=(0,h.default)(a).closest(o.DROPDOWN)[0];if(e){var f=[].slice.call(e.querySelectorAll(o.DROPDOWN_TOGGLE));(0,h.default)(f).addClass(n.ACTIVE)}a.setAttribute("aria-expanded",!0)}if(c){c()}}}],[{key:"_jQueryInterface",value:function(b){return this.each(function(){var c=(0,h.default)(this),d=c.data(j);if(!d){d=new a(this);c.data(j,d)}if("string"==typeof b){if("undefined"==typeof d[b]){throw new TypeError("No method named \"".concat(b,"\""))}d[b]()}})}},{key:"VERSION",get:function(){return"4.3.1"}}]);return a}();(0,h.default)(document).on(m.CLICK_DATA_API,o.DATA_TOGGLE,function(a){a.preventDefault();p._jQueryInterface.call((0,h.default)(this),"show")});h.default.fn.tab=p._jQueryInterface;h.default.fn.tab.Constructor=p;h.default.fn.tab.noConflict=function(){h.default.fn.tab=l;return p._jQueryInterface};a.default=p;return a.default}); "use strict";function _typeof2(a){if("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator){_typeof2=function(a){return typeof a}}else{_typeof2=function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a}}return _typeof2(a)}define ("theme_boost/scrollspy",["exports","jquery","./util"],function(a,b,c){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var k=d(b),l=d(c);function d(a){return a&&a.__esModule?a:{default:a}}function e(a){if("function"==typeof Symbol&&"symbol"===_typeof2(Symbol.iterator)){e=function(a){return _typeof2(a)}}else{e=function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":_typeof2(a)}}return e(a)}function f(a){for(var b=1;b=c){var d=this._targets[this._targets.length-1];if(this._activeTarget!==d){this._activate(d)}return}if(this._activeTarget&&a=this._offsets[f]&&("undefined"==typeof this._offsets[f+1]||aa.length)b=a.length;for(var c=0,d=Array(b);c=arguments.length||arguments[0]===void 0?{}:arguments[0],b=[];Array.prototype.push.apply(b,arguments);b.slice(1).forEach(function(b){if(b){for(var c in b){if({}.hasOwnProperty.call(b,c)){a[c]=b[c]}}}});return a}function i(a,b){if("undefined"!=typeof a.classList){b.split(" ").forEach(function(b){if(b.trim()){a.classList.remove(b)}})}else{var c=new RegExp("(^| )"+b.split(" ").join("|")+"( |$)","gi"),d=l(a).replace(c," ");m(a,d)}}function j(a,b){if("undefined"!=typeof a.classList){b.split(" ").forEach(function(b){if(b.trim()){a.classList.add(b)}})}else{i(a,b);var c=l(a)+(" "+b);m(a,c)}}function k(a,b){if("undefined"!=typeof a.classList){return a.classList.contains(b)}var c=l(a);return new RegExp("(^| )"+b+"( |$)","gi").test(c)}function l(a){if(a.className instanceof a.ownerDocument.defaultView.SVGAnimatedString){return a.className.baseVal}return a.className}function m(a,b){a.setAttribute("class",b)}function n(a,b,c){c.forEach(function(c){if(-1===b.indexOf(c)&&k(a,c)){i(a,c)}});b.forEach(function(b){if(!k(a,b)){j(a,b)}})}var A=[],B=function(a){A.push(a)},C=function(){var a;while(a=A.pop()){a()}},D=function(){function b(){a(this,b)}u(b,[{key:"on",value:function(a,b,c){var d=3>=arguments.length||arguments[3]===void 0?!1:arguments[3];if("undefined"==typeof this.bindings){this.bindings={}}if("undefined"==typeof this.bindings[a]){this.bindings[a]=[]}this.bindings[a].push({handler:b,ctx:c,once:d})}},{key:"once",value:function(a,b,c){this.on(a,b,c,!0)}},{key:"off",value:function(a,b){if("undefined"==typeof this.bindings||"undefined"==typeof this.bindings[a]){return}if("undefined"==typeof b){delete this.bindings[a]}else{var c=0;while(c=arguments.length||arguments[2]===void 0?1:arguments[2];return c+b>=a&&a>=c-b}var H=function(){if("undefined"==typeof document){return""}for(var a=document.createElement("div"),b=["transform","WebkitTransform","OTransform","MozTransform","msTransform"],c=0,d;cq()-a){return}if(null!=c){clearTimeout(c);c=null}a=q();J();b=q()-a};if("undefined"!=typeof window&&"undefined"!=typeof window.addEventListener){["resize","scroll","touchmove"].forEach(function(a){window.addEventListener(a,d)})}})();var K={center:"center",left:"right",right:"left"},L={middle:"middle",top:"bottom",bottom:"top"},M={top:0,left:0,middle:"50%",center:"50%",bottom:"100%",right:"100%"},N=function(a,b){var c=a.left,d=a.top;if("auto"===c){c=K[b.left]}if("auto"===d){d=L[b.top]}return{left:c,top:d}},O=function(a){var b=a.left,c=a.top;if("undefined"!=typeof M[a.left]){b=M[a.left]}if("undefined"!=typeof M[a.top]){c=M[a.top]}return{left:b,top:c}};function r(){for(var a={top:0,left:0},b=arguments.length,c=Array(b),d=0;d=arguments.length||arguments[0]===void 0?"":arguments[0],b=this.options.classes;if("undefined"!=typeof b&&b[a]){return this.options.classes[a]}else if(this.options.classPrefix){return this.options.classPrefix+"-"+a}else{return a}}},{key:"setOptions",value:function(a){var b=this,d=1>=arguments.length||arguments[1]===void 0?!0:arguments[1];this.options=h({offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto",classPrefix:"tether"},a);var e=this.options,f=e.element,g=e.target,i=e.targetModifier;this.element=f;this.target=g;this.targetModifier=i;if("viewport"===this.target){this.target=document.body;this.targetModifier="visible"}else if("scroll-handle"===this.target){this.target=document.body;this.targetModifier="scroll-handle"}["element","target"].forEach(function(a){if("undefined"==typeof b[a]){throw new Error("Tether Error: Both element and target must be defined")}if("undefined"!=typeof b[a].jquery){b[a]=b[a][0]}else if("string"==typeof b[a]){b[a]=document.querySelector(b[a])}});j(this.element,this.getClass("element"));if(!(!1===this.options.addTargetClasses)){j(this.target,this.getClass("target"))}if(!this.options.attachment){throw new Error("Tether Error: You must provide an attachment")}this.targetAttachment=Q(this.options.targetAttachment);this.attachment=Q(this.options.attachment);this.offset=P(this.options.offset);this.targetOffset=P(this.options.targetOffset);if("undefined"!=typeof this.scrollParents){this.disable()}if("scroll-handle"===this.targetModifier){this.scrollParents=[this.target]}else{this.scrollParents=c(this.target)}if(!(!1===this.options.enabled)){this.enable(d)}}},{key:"getTargetBounds",value:function(){if("undefined"!=typeof this.targetModifier){if("visible"===this.targetModifier){if(this.target===document.body){return{top:pageYOffset,left:pageXOffset,height:innerHeight,width:innerWidth}}else{var a=e(this.target),b={height:a.height,width:a.width,top:a.top,left:a.left};b.height=Math.min(b.height,a.height-(pageYOffset-a.top));b.height=Math.min(b.height,a.height-(a.top+a.height-(pageYOffset+innerHeight)));b.height=Math.min(innerHeight,b.height);b.height-=2;b.width=Math.min(b.width,a.width-(pageXOffset-a.left));b.width=Math.min(b.width,a.width-(a.left+a.width-(pageXOffset+innerWidth)));b.width=Math.min(innerWidth,b.width);b.width-=2;if(b.topc.clientWidth||0<=[d.overflow,d.overflowX].indexOf("scroll")||this.target!==document.body,g=0;if(f){g=15}var h=a.height-parseFloat(d.borderTopWidth)-parseFloat(d.borderBottomWidth)-g,b={width:15,height:.975*h*(h/c.scrollHeight),left:a.left+a.width-parseFloat(d.borderLeftWidth)-15},i=0;if(408>h&&this.target===document.body){i=-11e-5*Math.pow(h,2)-.00727*h+22.58}if(this.target!==document.body){b.height=Math.max(b.height,24)}var j=this.target.scrollTop/(c.scrollHeight-h);b.top=j*(h-b.height-i)+a.top+parseFloat(d.borderTopWidth);if(this.target===document.body){b.height=Math.max(b.height,24)}return b}}else{return e(this.target)}}},{key:"clearCache",value:function(){this._cache={}}},{key:"cache",value:function(a,b){if("undefined"==typeof this._cache){this._cache={}}if("undefined"==typeof this._cache[a]){this._cache[a]=b.call(this)}return this._cache[a]}},{key:"enable",value:function(){var a=this,b=0>=arguments.length||arguments[0]===void 0?!0:arguments[0];if(!(!1===this.options.addTargetClasses)){j(this.target,this.getClass("enabled"))}j(this.element,this.getClass("enabled"));this.enabled=!0;this.scrollParents.forEach(function(b){if(b!==a.target.ownerDocument){b.addEventListener("scroll",a.position)}});if(b){this.position()}}},{key:"disable",value:function(){var a=this;i(this.target,this.getClass("enabled"));i(this.element,this.getClass("enabled"));this.enabled=!1;if("undefined"!=typeof this.scrollParents){this.scrollParents.forEach(function(b){b.removeEventListener("scroll",a.position)})}}},{key:"destroy",value:function(){var a=this;this.disable();I.forEach(function(b,c){if(b===a){I.splice(c,1)}});if(0===I.length){d()}}},{key:"updateAttachClasses",value:function(a,b){var c=this;a=a||this.attachment;b=b||this.targetAttachment;if("undefined"!=typeof this._addAttachClasses&&this._addAttachClasses.length){this._addAttachClasses.splice(0,this._addAttachClasses.length)}if("undefined"==typeof this._addAttachClasses){this._addAttachClasses=[]}var d=this._addAttachClasses;if(a.top){d.push(this.getClass("element-attached")+"-"+a.top)}if(a.left){d.push(this.getClass("element-attached")+"-"+a.left)}if(b.top){d.push(this.getClass("target-attached")+"-"+b.top)}if(b.left){d.push(this.getClass("target-attached")+"-"+b.left)}var e=[];["left","top","bottom","right","middle","center"].forEach(function(a){e.push(c.getClass("element-attached")+"-"+a);e.push(c.getClass("target-attached")+"-"+a)});B(function(){if(!("undefined"!=typeof c._addAttachClasses)){return}n(c.element,c._addAttachClasses,e);if(!(!1===c.options.addTargetClasses)){n(c.target,c._addAttachClasses,e)}delete c._addAttachClasses})}},{key:"position",value:function(){var a=this,b=0>=arguments.length||arguments[0]===void 0?!0:arguments[0];if(!this.enabled){return}this.clearCache();var c=N(this.targetAttachment,this.attachment);this.updateAttachClasses(this.attachment,c);var d=this.cache("element-bounds",function(){return e(a.element)}),h=d.width,j=d.height;if(0===h&&0===j&&"undefined"!=typeof this.lastSize){var k=this.lastSize;h=k.width;j=k.height}else{this.lastSize={width:h,height:j}}var l=this.cache("target-bounds",function(){return a.getTargetBounds()}),m=l,n=s(O(this.attachment),{width:h,height:j}),o=s(O(c),m),p=s(this.offset,{width:h,height:j}),q=s(this.targetOffset,m);n=r(n,p);o=r(o,q);for(var t=l.left+o.left-n.left,u=l.top+o.top-n.top,w=0;wB.innerWidth){D=this.cache("scrollbar-size",g);z.viewport.bottom-=D.height}if(A.body.scrollHeight>B.innerHeight){D=this.cache("scrollbar-size",g);z.viewport.right-=D.width}if(-1===["","static"].indexOf(A.body.style.position)||-1===["","static"].indexOf(A.body.parentElement.style.position)){z.page.bottom=A.body.scrollHeight-u-j;z.page.right=A.body.scrollWidth-t-h}if("undefined"!=typeof this.options.optimizations&&!1!==this.options.optimizations.moveElement&&!("undefined"!=typeof this.targetModifier)){(function(){var b=a.cache("target-offsetparent",function(){return f(a.target)}),c=a.cache("target-offsetparent-bounds",function(){return e(b)}),d=getComputedStyle(b),g=c,h={};["Top","Left","Bottom","Right"].forEach(function(a){h[a.toLowerCase()]=parseFloat(d["border"+a+"Width"])});c.right=A.body.scrollWidth-c.left-g.width+h.right;c.bottom=A.body.scrollHeight-c.top-g.height+h.bottom;if(z.page.top>=c.top+h.top&&z.page.bottom>=c.bottom){if(z.page.left>=c.left+h.left&&z.page.right>=c.right){var i=b.scrollTop,j=b.scrollLeft;z.offset={top:z.page.top-c.top+i-h.top,left:z.page.left-c.left+j-h.left}}}})()}this.move(z);this.history.unshift(z);if(3u[3]&&"bottom"===r.top){c-=m;r.top="top"}}if("together"===l){if("top"===r.top){if("bottom"===s.top&&cu[3]&&c-(i-m)>=u[1]){c-=i-m;r.top="bottom";s.top="bottom"}}if("bottom"===r.top){if("top"===s.top&&c+i>u[3]){c-=m;r.top="top";c-=i;s.top="bottom"}else if("bottom"===s.top&&cu[3]&&"top"===s.top){c-=i;s.top="bottom"}else if(cu[2]&&"right"===r.left){d-=o;r.left="left"}}if("together"===k){if(du[2]&&"right"===r.left){if("left"===s.left){d-=o;r.left="left";d-=j;s.left="right"}else if("right"===s.left){d-=o;r.left="left";d+=j;s.left="left"}}else if("center"===r.left){if(d+j>u[2]&&"left"===s.left){d-=j;s.left="right"}else if(du[3]&&"top"===s.top){c-=i;s.top="bottom"}}if("element"===k||"both"===k){if(du[2]){if("left"===s.left){d-=j;s.left="right"}else if("center"===s.left){d-=j/2;s.left="right"}}}if("string"==typeof h){h=h.split(",").map(function(a){return a.trim()})}else if(!0===h){h=["top","left","right","bottom"]}h=h||[];var v=[],w=[];if(cu[3]){if(0<=h.indexOf("bottom")){c=u[3]-i;v.push("bottom")}else{w.push("bottom")}}if(du[2]){if(0<=h.indexOf("right")){d=u[2]-j;v.push("right")}else{w.push("right")}}if(v.length){(function(){var a;if("undefined"!=typeof b.options.pinnedClass){a=b.options.pinnedClass}else{a=b.getClass("pinned")}q.push(a);v.forEach(function(b){q.push(a+"-"+b)})})()}if(w.length){(function(){var a;if("undefined"!=typeof b.options.outOfBoundsClass){a=b.options.outOfBoundsClass}else{a=b.getClass("out-of-bounds")}q.push(a);w.forEach(function(b){q.push(a+"-"+b)})})()}if(0<=v.indexOf("left")||0<=v.indexOf("right")){s.left=r.left=!1}if(0<=v.indexOf("top")||0<=v.indexOf("bottom")){s.top=r.top=!1}if(r.top!==f.top||r.left!==f.left||s.top!==b.attachment.top||s.left!==b.attachment.left){b.updateAttachClasses(s,r);b.trigger("update",{attachment:s,targetAttachment:r})}});B(function(){if(!(!1===b.options.addTargetClasses)){n(b.target,q,p)}n(b.element,q,p)});return{top:c,left:d}}});var G=v.Utils,e=G.getBounds,n=G.updateClasses,B=G.defer;v.modules.push({position:function(a){var b=this,c=a.top,d=a.left,f=this.cache("element-bounds",function(){return e(b.element)}),g=f.height,h=f.width,i=this.getTargetBounds(),j=c+g,k=d+h,l=[];if(c<=i.bottom&&j>=i.top){["left","right"].forEach(function(a){var b=i[a];if(b===d||b===k){l.push(a)}})}if(d<=i.right&&k>=i.left){["top","bottom"].forEach(function(a){var b=i[a];if(b===c||b===j){l.push(a)}})}var m=[],o=[];m.push(this.getClass("abutted"));["left","top","right","bottom"].forEach(function(a){m.push(b.getClass("abutted")+"-"+a)});if(l.length){o.push(this.getClass("abutted"))}l.forEach(function(a){o.push(b.getClass("abutted")+"-"+a)});B(function(){if(!(!1===b.options.addTargetClasses)){n(b.target,o,m)}n(b.element,o,m)});return!0}});var E=function(){function a(a,b){var c=[],d=!0,e=!1,f=void 0;try{for(var g=a[Symbol.iterator](),h;!(d=(h=g.next()).done);d=!0){c.push(h.value);if(b&&c.length===b)break}}catch(a){e=!0;f=a}finally{try{if(!d&&g["return"])g["return"]()}finally{if(e)throw f}}return c}return function(b,c){if(Array.isArray(b)){return b}else if(Symbol.iterator in Object(b)){return a(b,c)}else{throw new TypeError("Invalid attempt to destructure non-iterable instance")}}}();v.modules.push({position:function(a){var b=a.top,c=a.left;if(!this.options.shift){return}var d=this.options.shift;if("function"==typeof this.options.shift){d=this.options.shift.call(this,{top:b,left:c})}var e,f;if("string"==typeof d){d=d.split(" ");d[1]=d[1]||d[0];var g=d,h=E(g,2);e=h[0];f=h[1];e=parseFloat(e,10);f=parseFloat(f,10)}else{e=d.top;f=d.left}b+=e;c+=f;return{top:b,left:c}}});return S}); "use strict";define ("theme_boost/alert",["exports","jquery","./util"],function(a,b,c){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var h=d(b),i=d(c);function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b)){throw new TypeError("Cannot call a class as a function")}}function f(a,b){for(var c=0,d;cthis._items.length-1||0>a){return}if(this._isSliding){(0,k.default)(this._element).one(t.SLID,function(){return b.to(a)});return}if(c===a){this.pause();this.cycle();return}var d=a>c?s.NEXT:s.PREV;this._slide(d,this._items[a])}},{key:"dispose",value:function(){(0,k.default)(this._element).off(n);k.default.removeData(this._element,m);this._items=null;this._config=null;this._element=null;this._interval=null;this._isPaused=null;this._isSliding=null;this._activeElement=null;this._indicatorsElement=null}},{key:"_getConfig",value:function(a){a=f({},q,a);l.default.typeCheckConfig("carousel",a,r);return a}},{key:"_handleSwipe",value:function(){var a=Math.abs(this.touchDeltaX);if(a<=40){return}var b=a/this.touchDeltaX;if(0b){this.next()}}},{key:"_addEventListeners",value:function(){var a=this;if(this._config.keyboard){(0,k.default)(this._element).on(t.KEYDOWN,function(b){return a._keydown(b)})}if("hover"===this._config.pause){(0,k.default)(this._element).on(t.MOUSEENTER,function(b){return a.pause(b)}).on(t.MOUSELEAVE,function(b){return a.cycle(b)})}if(this._config.touch){this._addTouchEventListeners()}}},{key:"_addTouchEventListeners",value:function(){var a=this;if(!this._touchSupported){return}var b=function(b){if(a._pointerEvent&&w[b.originalEvent.pointerType.toUpperCase()]){a.touchStartX=b.originalEvent.clientX}else if(!a._pointerEvent){a.touchStartX=b.originalEvent.touches[0].clientX}},c=function(b){if(b.originalEvent.touches&&1
    ",trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",sanitize:!0,sanitizeFn:null,whiteList:b.DefaultWhitelist},y={SHOW:"show",OUT:"out"},z={HIDE:"hide".concat(q),HIDDEN:"hidden".concat(q),SHOW:"show".concat(q),SHOWN:"shown".concat(q),INSERTED:"inserted".concat(q),CLICK:"click".concat(q),FOCUSIN:"focusin".concat(q),FOCUSOUT:"focusout".concat(q),MOUSEENTER:"mouseenter".concat(q),MOUSELEAVE:"mouseleave".concat(q)},A={FADE:"fade",SHOW:"show"},B={TOOLTIP:".tooltip",TOOLTIP_INNER:".tooltip-inner",ARROW:".arrow"},C={HOVER:"hover",FOCUS:"focus",CLICK:"click",MANUAL:"manual"},D=function(){function a(b,c){j(this,a);if("undefined"==typeof n.default){throw new TypeError("Bootstrap's tooltips require Popper.js (https://popper.js.org/)")}this._isEnabled=!0;this._timeout=0;this._hoverState="";this._activeTrigger={};this._popper=null;this.element=b;this.config=this._getConfig(c);this.tip=null;this._setListeners()}l(a,[{key:"enable",value:function(){this._isEnabled=!0}},{key:"disable",value:function(){this._isEnabled=!1}},{key:"toggleEnabled",value:function(){this._isEnabled=!this._isEnabled}},{key:"toggle",value:function(a){if(!this._isEnabled){return}if(a){var b=this.constructor.DATA_KEY,c=(0,m.default)(a.currentTarget).data(b);if(!c){c=new this.constructor(a.currentTarget,this._getDelegateConfig());(0,m.default)(a.currentTarget).data(b,c)}c._activeTrigger.click=!c._activeTrigger.click;if(c._isWithActiveTrigger()){c._enter(null,c)}else{c._leave(null,c)}}else{if((0,m.default)(this.getTipElement()).hasClass(A.SHOW)){this._leave(null,this);return}this._enter(null,this)}}},{key:"dispose",value:function(){clearTimeout(this._timeout);m.default.removeData(this.element,this.constructor.DATA_KEY);(0,m.default)(this.element).off(this.constructor.EVENT_KEY);(0,m.default)(this.element).closest(".modal").off("hide.bs.modal");if(this.tip){(0,m.default)(this.tip).remove()}this._isEnabled=null;this._timeout=null;this._hoverState=null;this._activeTrigger=null;if(null!==this._popper){this._popper.destroy()}this._popper=null;this.element=null;this.config=null;this.tip=null}},{key:"show",value:function(){var a=this;if("none"===(0,m.default)(this.element).css("display")){throw new Error("Please use show on visible elements")}var b=m.default.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){(0,m.default)(this.element).trigger(b);var c=o.default.findShadowRoot(this.element),d=m.default.contains(null!==c?c:this.element.ownerDocument.documentElement,this.element);if(b.isDefaultPrevented()||!d){return}var e=this.getTipElement(),f=o.default.getUID(this.constructor.NAME);e.setAttribute("id",f);this.element.setAttribute("aria-describedby",f);this.setContent();if(this.config.animation){(0,m.default)(e).addClass(A.FADE)}var g="function"==typeof this.config.placement?this.config.placement.call(this,e,this.element):this.config.placement,h=this._getAttachment(g);this.addAttachmentClass(h);var i=this._getContainer();(0,m.default)(e).data(this.constructor.DATA_KEY,this);if(!m.default.contains(this.element.ownerDocument.documentElement,this.tip)){(0,m.default)(e).appendTo(i)}(0,m.default)(this.element).trigger(this.constructor.Event.INSERTED);this._popper=new n.default(this.element,e,{placement:h,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:B.ARROW},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(b){if(b.originalPlacement!==b.placement){a._handlePopperPlacementChange(b)}},onUpdate:function(b){return a._handlePopperPlacementChange(b)}});(0,m.default)(e).addClass(A.SHOW);if("ontouchstart"in document.documentElement){(0,m.default)(document.body).children().on("mouseover",null,m.default.noop)}var j=function(){if(a.config.animation){a._fixTransition()}var b=a._hoverState;a._hoverState=null;(0,m.default)(a.element).trigger(a.constructor.Event.SHOWN);if(b===y.OUT){a._leave(null,a)}};if((0,m.default)(this.tip).hasClass(A.FADE)){var k=o.default.getTransitionDurationFromElement(this.tip);(0,m.default)(this.tip).one(o.default.TRANSITION_END,j).emulateTransitionEnd(k)}else{j()}}}},{key:"hide",value:function(a){var b=this,c=this.getTipElement(),d=m.default.Event(this.constructor.Event.HIDE),e=function(){if(b._hoverState!==y.SHOW&&c.parentNode){c.parentNode.removeChild(c)}b._cleanTipClass();b.element.removeAttribute("aria-describedby");(0,m.default)(b.element).trigger(b.constructor.Event.HIDDEN);if(null!==b._popper){b._popper.destroy()}if(a){a()}};(0,m.default)(this.element).trigger(d);if(d.isDefaultPrevented()){return}(0,m.default)(c).removeClass(A.SHOW);if("ontouchstart"in document.documentElement){(0,m.default)(document.body).children().off("mouseover",null,m.default.noop)}this._activeTrigger[C.CLICK]=!1;this._activeTrigger[C.FOCUS]=!1;this._activeTrigger[C.HOVER]=!1;if((0,m.default)(this.tip).hasClass(A.FADE)){var f=o.default.getTransitionDurationFromElement(c);(0,m.default)(c).one(o.default.TRANSITION_END,e).emulateTransitionEnd(f)}else{e()}this._hoverState=""}},{key:"update",value:function(){if(null!==this._popper){this._popper.scheduleUpdate()}}},{key:"isWithContent",value:function(){return!!this.getTitle()}},{key:"addAttachmentClass",value:function(a){(0,m.default)(this.getTipElement()).addClass("".concat(s,"-").concat(a))}},{key:"getTipElement",value:function(){this.tip=this.tip||(0,m.default)(this.config.template)[0];return this.tip}},{key:"setContent",value:function(){var a=this.getTipElement();this.setElementContent((0,m.default)(a.querySelectorAll(B.TOOLTIP_INNER)),this.getTitle());(0,m.default)(a).removeClass("".concat(A.FADE," ").concat(A.SHOW))}},{key:"setElementContent",value:function(a,c){if("object"===i(c)&&(c.nodeType||c.jquery)){if(this.config.html){if(!(0,m.default)(c).parent().is(a)){a.empty().append(c)}}else{a.text((0,m.default)(c).text())}return}if(this.config.html){if(this.config.sanitize){c=(0,b.sanitizeHtml)(c,this.config.whiteList,this.config.sanitizeFn)}a.html(c)}else{a.text(c)}}},{key:"getTitle",value:function(){var a=this.element.getAttribute("data-original-title");if(!a){a="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title}return a}},{key:"_getOffset",value:function(){var a=this,b={};if("function"==typeof this.config.offset){b.fn=function(b){b.offsets=g({},b.offsets,a.config.offset(b.offsets,a.element)||{});return b}}else{b.offset=this.config.offset}return b}},{key:"_getContainer",value:function(){if(!1===this.config.container){return document.body}if(o.default.isElement(this.config.container)){return(0,m.default)(this.config.container)}return(0,m.default)(document).find(this.config.container)}},{key:"_getAttachment",value:function(a){return w[a.toUpperCase()]}},{key:"_setListeners",value:function(){var a=this,b=this.config.trigger.split(" ");b.forEach(function(b){if("click"===b){(0,m.default)(a.element).on(a.constructor.Event.CLICK,a.config.selector,function(b){return a.toggle(b)})}else if(b!==C.MANUAL){var c=b===C.HOVER?a.constructor.Event.MOUSEENTER:a.constructor.Event.FOCUSIN,d=b===C.HOVER?a.constructor.Event.MOUSELEAVE:a.constructor.Event.FOCUSOUT;(0,m.default)(a.element).on(c,a.config.selector,function(b){return a._enter(b)}).on(d,a.config.selector,function(b){return a._leave(b)})}});(0,m.default)(this.element).closest(".modal").on("hide.bs.modal",function(){if(a.element){a.hide()}});if(this.config.selector){this.config=g({},this.config,{trigger:"manual",selector:""})}else{this._fixTitle()}}},{key:"_fixTitle",value:function(){var a=i(this.element.getAttribute("data-original-title"));if(this.element.getAttribute("title")||"string"!==a){this.element.setAttribute("data-original-title",this.element.getAttribute("title")||"");this.element.setAttribute("title","")}}},{key:"_enter",value:function(a,b){var c=this.constructor.DATA_KEY;b=b||(0,m.default)(a.currentTarget).data(c);if(!b){b=new this.constructor(a.currentTarget,this._getDelegateConfig());(0,m.default)(a.currentTarget).data(c,b)}if(a){b._activeTrigger["focusin"===a.type?C.FOCUS:C.HOVER]=!0}if((0,m.default)(b.getTipElement()).hasClass(A.SHOW)||b._hoverState===y.SHOW){b._hoverState=y.SHOW;return}clearTimeout(b._timeout);b._hoverState=y.SHOW;if(!b.config.delay||!b.config.delay.show){b.show();return}b._timeout=setTimeout(function(){if(b._hoverState===y.SHOW){b.show()}},b.config.delay.show)}},{key:"_leave",value:function(a,b){var c=this.constructor.DATA_KEY;b=b||(0,m.default)(a.currentTarget).data(c);if(!b){b=new this.constructor(a.currentTarget,this._getDelegateConfig());(0,m.default)(a.currentTarget).data(c,b)}if(a){b._activeTrigger["focusout"===a.type?C.FOCUS:C.HOVER]=!1}if(b._isWithActiveTrigger()){return}clearTimeout(b._timeout);b._hoverState=y.OUT;if(!b.config.delay||!b.config.delay.hide){b.hide();return}b._timeout=setTimeout(function(){if(b._hoverState===y.OUT){b.hide()}},b.config.delay.hide)}},{key:"_isWithActiveTrigger",value:function(){for(var a in this._activeTrigger){if(this._activeTrigger[a]){return!0}}return!1}},{key:"_getConfig",value:function(a){var c=(0,m.default)(this.element).data();Object.keys(c).forEach(function(a){if(-1!==u.indexOf(a)){delete c[a]}});a=g({},this.constructor.Default,c,"object"===i(a)&&a?a:{});if("number"==typeof a.delay){a.delay={show:a.delay,hide:a.delay}}if("number"==typeof a.title){a.title=a.title.toString()}if("number"==typeof a.content){a.content=a.content.toString()}o.default.typeCheckConfig("tooltip",a,this.constructor.DefaultType);if(a.sanitize){a.template=(0,b.sanitizeHtml)(a.template,a.whiteList,a.sanitizeFn)}return a}},{key:"_getDelegateConfig",value:function(){var a={};if(this.config){for(var b in this.config){if(this.constructor.Default[b]!==this.config[b]){a[b]=this.config[b]}}}return a}},{key:"_cleanTipClass",value:function(){var a=(0,m.default)(this.getTipElement()),b=a.attr("class").match(t);if(null!==b&&b.length){a.removeClass(b.join(""))}}},{key:"_handlePopperPlacementChange",value:function(a){var b=a.instance;this.tip=b.popper;this._cleanTipClass();this.addAttachmentClass(this._getAttachment(a.placement))}},{key:"_fixTransition",value:function(){var a=this.getTipElement(),b=this.config.animation;if(null!==a.getAttribute("x-placement")){return}(0,m.default)(a).removeClass(A.FADE);this.config.animation=!1;this.hide();this.show();this.config.animation=b}}],[{key:"_jQueryInterface",value:function(b){return this.each(function(){var c=(0,m.default)(this).data(p),d="object"===i(b)&&b;if(!c&&/dispose|hide/.test(b)){return}if(!c){c=new a(this,d);(0,m.default)(this).data(p,c)}if("string"==typeof b){if("undefined"==typeof c[b]){throw new TypeError("No method named \"".concat(b,"\""))}c[b]()}})}},{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return x}},{key:"NAME",get:function(){return"tooltip"}},{key:"DATA_KEY",get:function(){return p}},{key:"Event",get:function(){return z}},{key:"EVENT_KEY",get:function(){return q}},{key:"DefaultType",get:function(){return v}}]);return a}();m.default.fn.tooltip=D._jQueryInterface;m.default.fn.tooltip.Constructor=D;m.default.fn.tooltip.noConflict=function(){m.default.fn.tooltip=r;return D._jQueryInterface};a.default=D;return a.default}); define ("theme_boost/bootstrap/modal",["exports","jquery","./util"],function(a,b,c){"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.default=void 0;b=d(b);c=d(c);function d(a){return a&&a.__esModule?a:{default:a}}function e(a){"@babel/helpers - typeof";if("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator){e=function(a){return typeof a}}else{e=function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a}}return e(a)}function f(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);if(b)d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable});c.push.apply(c,d)}return c}function g(a){for(var b=1,c;bdocument.documentElement.clientHeight;if(!this._isBodyOverflowing&&a){this._element.style.paddingLeft="".concat(this._scrollbarWidth,"px")}if(this._isBodyOverflowing&&!a){this._element.style.paddingRight="".concat(this._scrollbarWidth,"px")}}},{key:"_resetAdjustments",value:function _resetAdjustments(){this._element.style.paddingLeft="";this._element.style.paddingRight=""}},{key:"_checkScrollbar",value:function _checkScrollbar(){var a=document.body.getBoundingClientRect();this._isBodyOverflowing=Math.round(a.left+a.right)g){g=0}f[g].focus()}},{key:"VERSION",get:function get(){return"4.5.0"}},{key:"Default",get:function get(){return J}},{key:"DefaultType",get:function get(){return K}}]);return a}();(0,b.default)(document).on(C,H,L._dataApiKeydownHandler).on(C,I,L._dataApiKeydownHandler).on("".concat(B," ").concat(D),L._clearMenus).on(B,H,function(a){a.preventDefault();a.stopPropagation();L._jQueryInterface.call((0,b.default)(this),"toggle")}).on(B,".dropdown form",function(a){a.stopPropagation()});b.default.fn.dropdown=L._jQueryInterface;b.default.fn.dropdown.Constructor=L;b.default.fn.dropdown.noConflict=function(){b.default.fn.dropdown=p;return L._jQueryInterface};a.default=L;return a.default}); define ("theme_boost/bootstrap/util",["exports","jquery"],function(a,b){"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.default=void 0;b=function(a){return a&&a.__esModule?a:{default:a}}(b);function c(a){if(null===a||"undefined"==typeof a){return"".concat(a)}return{}.toString.call(a).match(/\s([a-z]+)/i)[1].toLowerCase()}function d(){return{bindType:"transitionend",delegateType:"transitionend",handle:function handle(a){if((0,b.default)(a.target).is(this)){return a.handleObj.handler.apply(this,arguments)}}}}function e(a){var c=this,d=!1;(0,b.default)(this).one(g.TRANSITION_END,function(){d=!0});setTimeout(function(){if(!d){g.triggerTransitionEnd(c)}},a);return this}function f(){b.default.fn.emulateTransitionEnd=e;b.default.event.special[g.TRANSITION_END]=d()}var g={TRANSITION_END:"bsTransitionEnd",getUID:function getUID(a){do{a+=~~(Math.random()*1e6)}while(document.getElementById(a));return a},getSelectorFromElement:function getSelectorFromElement(a){var b=a.getAttribute("data-target");if(!b||"#"===b){var c=a.getAttribute("href");b=c&&"#"!==c?c.trim():""}try{return document.querySelector(b)?b:null}catch(a){return null}},getTransitionDurationFromElement:function getTransitionDurationFromElement(a){if(!a){return 0}var c=(0,b.default)(a).css("transition-duration"),d=(0,b.default)(a).css("transition-delay"),e=parseFloat(c),f=parseFloat(d);if(!e&&!f){return 0}c=c.split(",")[0];d=d.split(",")[0];return(parseFloat(c)+parseFloat(d))*1e3},reflow:function reflow(a){return a.offsetHeight},triggerTransitionEnd:function triggerTransitionEnd(a){(0,b.default)(a).trigger("transitionend")},supportsTransitionEnd:function supportsTransitionEnd(){return!0},isElement:function isElement(a){return(a[0]||a).nodeType},typeCheckConfig:function typeCheckConfig(a,b,d){for(var i in d){if(Object.prototype.hasOwnProperty.call(d,i)){var e=d[i],f=b[i],h=f&&g.isElement(f)?"element":c(f);if(!new RegExp(e).test(h)){throw new Error("".concat(a.toUpperCase(),": ")+"Option \"".concat(i,"\" provided type \"").concat(h,"\" ")+"but expected type \"".concat(e,"\"."))}}}},findShadowRoot:function findShadowRoot(a){if(!document.documentElement.attachShadow){return null}if("function"==typeof a.getRootNode){var b=a.getRootNode();return b instanceof ShadowRoot?b:null}if(a instanceof ShadowRoot){return a}if(!a.parentNode){return null}return g.findShadowRoot(a.parentNode)},jQueryDetection:function jQueryDetection(){if("undefined"==typeof b.default){throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.")}var a=b.default.fn.jquery.split(" ")[0].split("."),c=9;if(a[0]<2&&a[1]=4){throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}}};g.jQueryDetection();f();a.default=g;return a.default}); define ("theme_boost/bootstrap/tab",["exports","jquery","./util"],function(a,b,c){"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.default=void 0;b=d(b);c=d(c);function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b)){throw new TypeError("Cannot call a class as a function")}}function f(a,b){for(var c=0,d;c li > .active",u=function(){function a(b){e(this,a);this._element=b}g(a,[{key:"show",value:function show(){var a=this;if(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&(0,b.default)(this._element).hasClass(p)||(0,b.default)(this._element).hasClass("disabled")){return}var d,e,f=(0,b.default)(this._element).closest(".nav, .list-group")[0],g=c.default.getSelectorFromElement(this._element);if(f){var o="UL"===f.nodeName||"OL"===f.nodeName?t:s;e=b.default.makeArray((0,b.default)(f).find(o));e=e[e.length-1]}var h=b.default.Event(k,{relatedTarget:this._element}),i=b.default.Event(m,{relatedTarget:e});if(e){(0,b.default)(e).trigger(h)}(0,b.default)(this._element).trigger(i);if(i.isDefaultPrevented()||h.isDefaultPrevented()){return}if(g){d=document.querySelector(g)}this._activate(this._element,f);var j=function(){var c=b.default.Event(l,{relatedTarget:a._element}),d=b.default.Event(n,{relatedTarget:e});(0,b.default)(e).trigger(c);(0,b.default)(a._element).trigger(d)};if(d){this._activate(d,d.parentNode,j)}else{j()}}},{key:"dispose",value:function dispose(){b.default.removeData(this._element,h);this._element=null}},{key:"_activate",value:function _activate(a,d,e){var f=this,g=d&&("UL"===d.nodeName||"OL"===d.nodeName)?(0,b.default)(d).find(t):(0,b.default)(d).children(s),h=g[0],i=e&&h&&(0,b.default)(h).hasClass(q),j=function(){return f._transitionComplete(a,h,e)};if(h&&i){var k=c.default.getTransitionDurationFromElement(h);(0,b.default)(h).removeClass(r).one(c.default.TRANSITION_END,j).emulateTransitionEnd(k)}else{j()}}},{key:"_transitionComplete",value:function _transitionComplete(a,d,e){if(d){(0,b.default)(d).removeClass(p);var f=(0,b.default)(d.parentNode).find("> .dropdown-menu .active")[0];if(f){(0,b.default)(f).removeClass(p)}if("tab"===d.getAttribute("role")){d.setAttribute("aria-selected",!1)}}(0,b.default)(a).addClass(p);if("tab"===a.getAttribute("role")){a.setAttribute("aria-selected",!0)}c.default.reflow(a);if(a.classList.contains(q)){a.classList.add(r)}if(a.parentNode&&(0,b.default)(a.parentNode).hasClass("dropdown-menu")){var g=(0,b.default)(a).closest(".dropdown")[0];if(g){var h=[].slice.call(g.querySelectorAll(".dropdown-toggle"));(0,b.default)(h).addClass(p)}a.setAttribute("aria-expanded",!0)}if(e){e()}}}],[{key:"_jQueryInterface",value:function _jQueryInterface(c){return this.each(function(){var d=(0,b.default)(this),e=d.data(h);if(!e){e=new a(this);d.data(h,e)}if("string"==typeof c){if("undefined"==typeof e[c]){throw new TypeError("No method named \"".concat(c,"\""))}e[c]()}})}},{key:"VERSION",get:function get(){return"4.5.0"}}]);return a}();(0,b.default)(document).on(o,"[data-toggle=\"tab\"], [data-toggle=\"pill\"], [data-toggle=\"list\"]",function(a){a.preventDefault();u._jQueryInterface.call((0,b.default)(this),"show")});b.default.fn.tab=u._jQueryInterface;b.default.fn.tab.Constructor=u;b.default.fn.tab.noConflict=function(){b.default.fn.tab=j;return u._jQueryInterface};a.default=u;return a.default}); define ("theme_boost/bootstrap/scrollspy",["exports","jquery","./util"],function(a,b,c){"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.default=void 0;b=d(b);c=d(c);function d(a){return a&&a.__esModule?a:{default:a}}function e(a){"@babel/helpers - typeof";if("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator){e=function(a){return typeof a}}else{e=function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a}}return e(a)}function f(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);if(b)d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable});c.push.apply(c,d)}return c}function g(a){for(var b=1,c;b=c){var d=this._targets[this._targets.length-1];if(this._activeTarget!==d){this._activate(d)}return}if(this._activeTarget&&a=this._offsets[e]&&("undefined"==typeof this._offsets[e+1]||athis._items.length-1||0>a){return}if(this._isSliding){(0,b.default)(this._element).one(u,function(){return c.to(a)});return}if(d===a){this.pause();this.cycle();return}var e=a>d?r:s;this._slide(e,this._items[a])}},{key:"dispose",value:function dispose(){(0,b.default)(this._element).off(m);b.default.removeData(this._element,l);this._items=null;this._config=null;this._element=null;this._interval=null;this._isPaused=null;this._isSliding=null;this._activeElement=null;this._indicatorsElement=null}},{key:"_getConfig",value:function _getConfig(a){a=g({},p,{},a);c.default.typeCheckConfig("carousel",a,q);return a}},{key:"_handleSwipe",value:function _handleSwipe(){var a=Math.abs(this.touchDeltaX);if(a<=40){return}var b=a/this.touchDeltaX;this.touchDeltaX=0;if(0b){this.next()}}},{key:"_addEventListeners",value:function _addEventListeners(){var a=this;if(this._config.keyboard){(0,b.default)(this._element).on(v,function(b){return a._keydown(b)})}if("hover"===this._config.pause){(0,b.default)(this._element).on(w,function(b){return a.pause(b)}).on(x,function(b){return a.cycle(b)})}if(this._config.touch){this._addTouchEventListeners()}}},{key:"_addTouchEventListeners",value:function _addTouchEventListeners(){var a=this;if(!this._touchSupported){return}var c=function(b){if(a._pointerEvent&&I[b.originalEvent.pointerType.toUpperCase()]){a.touchStartX=b.originalEvent.clientX}else if(!a._pointerEvent){a.touchStartX=b.originalEvent.touches[0].clientX}},d=function(b){if(b.originalEvent.touches&&1

    "}),z=r({},c.default.DefaultType,{content:"(string|element|function)"}),A={HIDE:"hide".concat(u),HIDDEN:"hidden".concat(u),SHOW:"show".concat(u),SHOWN:"shown".concat(u),INSERTED:"inserted".concat(u),CLICK:"click".concat(u),FOCUSIN:"focusin".concat(u),FOCUSOUT:"focusout".concat(u),MOUSEENTER:"mouseenter".concat(u),MOUSELEAVE:"mouseleave".concat(u)},B=function(a){i(c,a);var d=k(c);function c(){f(this,c);return d.apply(this,arguments)}h(c,[{key:"isWithContent",value:function isWithContent(){return this.getTitle()||this._getContent()}},{key:"addAttachmentClass",value:function addAttachmentClass(a){(0,b.default)(this.getTipElement()).addClass("".concat(w,"-").concat(a))}},{key:"getTipElement",value:function getTipElement(){this.tip=this.tip||(0,b.default)(this.config.template)[0];return this.tip}},{key:"setContent",value:function setContent(){var a=(0,b.default)(this.getTipElement());this.setElementContent(a.find(".popover-header"),this.getTitle());var c=this._getContent();if("function"==typeof c){c=c.call(this.element)}this.setElementContent(a.find(".popover-body"),c);a.removeClass("".concat("fade"," ").concat("show"))}},{key:"_getContent",value:function _getContent(){return this.element.getAttribute("data-content")||this.config.content}},{key:"_cleanTipClass",value:function _cleanTipClass(){var a=(0,b.default)(this.getTipElement()),c=a.attr("class").match(x);if(null!==c&&0
    ",trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",sanitize:!0,sanitizeFn:null,whiteList:b.DefaultWhitelist,popperConfig:null},w="show",x="out",y={HIDE:"hide".concat(o),HIDDEN:"hidden".concat(o),SHOW:"show".concat(o),SHOWN:"shown".concat(o),INSERTED:"inserted".concat(o),CLICK:"click".concat(o),FOCUSIN:"focusin".concat(o),FOCUSOUT:"focusout".concat(o),MOUSEENTER:"mouseenter".concat(o),MOUSELEAVE:"mouseleave".concat(o)},z="fade",A="show",B="hover",C="focus",D=function(){function a(b,c){k(this,a);if("undefined"==typeof d.default){throw new TypeError("Bootstrap's tooltips require Popper.js (https://popper.js.org/)")}this._isEnabled=!0;this._timeout=0;this._hoverState="";this._activeTrigger={};this._popper=null;this.element=b;this.config=this._getConfig(c);this.tip=null;this._setListeners()}m(a,[{key:"enable",value:function enable(){this._isEnabled=!0}},{key:"disable",value:function disable(){this._isEnabled=!1}},{key:"toggleEnabled",value:function toggleEnabled(){this._isEnabled=!this._isEnabled}},{key:"toggle",value:function toggle(a){if(!this._isEnabled){return}if(a){var b=this.constructor.DATA_KEY,d=(0,c.default)(a.currentTarget).data(b);if(!d){d=new this.constructor(a.currentTarget,this._getDelegateConfig());(0,c.default)(a.currentTarget).data(b,d)}d._activeTrigger.click=!d._activeTrigger.click;if(d._isWithActiveTrigger()){d._enter(null,d)}else{d._leave(null,d)}}else{if((0,c.default)(this.getTipElement()).hasClass(A)){this._leave(null,this);return}this._enter(null,this)}}},{key:"dispose",value:function dispose(){clearTimeout(this._timeout);c.default.removeData(this.element,this.constructor.DATA_KEY);(0,c.default)(this.element).off(this.constructor.EVENT_KEY);(0,c.default)(this.element).closest(".modal").off("hide.bs.modal",this._hideModalHandler);if(this.tip){(0,c.default)(this.tip).remove()}this._isEnabled=null;this._timeout=null;this._hoverState=null;this._activeTrigger=null;if(this._popper){this._popper.destroy()}this._popper=null;this.element=null;this.config=null;this.tip=null}},{key:"show",value:function show(){var a=this;if("none"===(0,c.default)(this.element).css("display")){throw new Error("Please use show on visible elements")}var b=c.default.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){(0,c.default)(this.element).trigger(b);var f=e.default.findShadowRoot(this.element),g=c.default.contains(null!==f?f:this.element.ownerDocument.documentElement,this.element);if(b.isDefaultPrevented()||!g){return}var h=this.getTipElement(),i=e.default.getUID(this.constructor.NAME);h.setAttribute("id",i);this.element.setAttribute("aria-describedby",i);this.setContent();if(this.config.animation){(0,c.default)(h).addClass(z)}var j="function"==typeof this.config.placement?this.config.placement.call(this,h,this.element):this.config.placement,k=this._getAttachment(j);this.addAttachmentClass(k);var l=this._getContainer();(0,c.default)(h).data(this.constructor.DATA_KEY,this);if(!c.default.contains(this.element.ownerDocument.documentElement,this.tip)){(0,c.default)(h).appendTo(l)}(0,c.default)(this.element).trigger(this.constructor.Event.INSERTED);this._popper=new d.default(this.element,h,this._getPopperConfig(k));(0,c.default)(h).addClass(A);if("ontouchstart"in document.documentElement){(0,c.default)(document.body).children().on("mouseover",null,c.default.noop)}var m=function(){if(a.config.animation){a._fixTransition()}var b=a._hoverState;a._hoverState=null;(0,c.default)(a.element).trigger(a.constructor.Event.SHOWN);if(b===x){a._leave(null,a)}};if((0,c.default)(this.tip).hasClass(z)){var n=e.default.getTransitionDurationFromElement(this.tip);(0,c.default)(this.tip).one(e.default.TRANSITION_END,m).emulateTransitionEnd(n)}else{m()}}}},{key:"hide",value:function hide(a){var b=this,d=this.getTipElement(),f=c.default.Event(this.constructor.Event.HIDE),g=function(){if(b._hoverState!==w&&d.parentNode){d.parentNode.removeChild(d)}b._cleanTipClass();b.element.removeAttribute("aria-describedby");(0,c.default)(b.element).trigger(b.constructor.Event.HIDDEN);if(null!==b._popper){b._popper.destroy()}if(a){a()}};(0,c.default)(this.element).trigger(f);if(f.isDefaultPrevented()){return}(0,c.default)(d).removeClass(A);if("ontouchstart"in document.documentElement){(0,c.default)(document.body).children().off("mouseover",null,c.default.noop)}this._activeTrigger["click"]=!1;this._activeTrigger[C]=!1;this._activeTrigger[B]=!1;if((0,c.default)(this.tip).hasClass(z)){var h=e.default.getTransitionDurationFromElement(d);(0,c.default)(d).one(e.default.TRANSITION_END,g).emulateTransitionEnd(h)}else{g()}this._hoverState=""}},{key:"update",value:function update(){if(null!==this._popper){this._popper.scheduleUpdate()}}},{key:"isWithContent",value:function isWithContent(){return!!this.getTitle()}},{key:"addAttachmentClass",value:function addAttachmentClass(a){(0,c.default)(this.getTipElement()).addClass("".concat(q,"-").concat(a))}},{key:"getTipElement",value:function getTipElement(){this.tip=this.tip||(0,c.default)(this.config.template)[0];return this.tip}},{key:"setContent",value:function setContent(){var a=this.getTipElement();this.setElementContent((0,c.default)(a.querySelectorAll(".tooltip-inner")),this.getTitle());(0,c.default)(a).removeClass("".concat(z," ").concat(A))}},{key:"setElementContent",value:function setElementContent(a,d){if("object"===j(d)&&(d.nodeType||d.jquery)){if(this.config.html){if(!(0,c.default)(d).parent().is(a)){a.empty().append(d)}}else{a.text((0,c.default)(d).text())}return}if(this.config.html){if(this.config.sanitize){d=(0,b.sanitizeHtml)(d,this.config.whiteList,this.config.sanitizeFn)}a.html(d)}else{a.text(d)}}},{key:"getTitle",value:function getTitle(){var a=this.element.getAttribute("data-original-title");if(!a){a="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title}return a}},{key:"_getPopperConfig",value:function _getPopperConfig(a){var b=this,c={placement:a,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:".arrow"},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function onCreate(a){if(a.originalPlacement!==a.placement){b._handlePopperPlacementChange(a)}},onUpdate:function onUpdate(a){return b._handlePopperPlacementChange(a)}};return h({},c,{},this.config.popperConfig)}},{key:"_getOffset",value:function _getOffset(){var a=this,b={};if("function"==typeof this.config.offset){b.fn=function(b){b.offsets=h({},b.offsets,{},a.config.offset(b.offsets,a.element)||{});return b}}else{b.offset=this.config.offset}return b}},{key:"_getContainer",value:function _getContainer(){if(!1===this.config.container){return document.body}if(e.default.isElement(this.config.container)){return(0,c.default)(this.config.container)}return(0,c.default)(document).find(this.config.container)}},{key:"_getAttachment",value:function _getAttachment(a){return u[a.toUpperCase()]}},{key:"_setListeners",value:function _setListeners(){var a=this,b=this.config.trigger.split(" ");b.forEach(function(b){if("click"===b){(0,c.default)(a.element).on(a.constructor.Event.CLICK,a.config.selector,function(b){return a.toggle(b)})}else if(b!=="manual"){var d=b===B?a.constructor.Event.MOUSEENTER:a.constructor.Event.FOCUSIN,e=b===B?a.constructor.Event.MOUSELEAVE:a.constructor.Event.FOCUSOUT;(0,c.default)(a.element).on(d,a.config.selector,function(b){return a._enter(b)}).on(e,a.config.selector,function(b){return a._leave(b)})}});this._hideModalHandler=function(){if(a.element){a.hide()}};(0,c.default)(this.element).closest(".modal").on("hide.bs.modal",this._hideModalHandler);if(this.config.selector){this.config=h({},this.config,{trigger:"manual",selector:""})}else{this._fixTitle()}}},{key:"_fixTitle",value:function _fixTitle(){var a=j(this.element.getAttribute("data-original-title"));if(this.element.getAttribute("title")||"string"!==a){this.element.setAttribute("data-original-title",this.element.getAttribute("title")||"");this.element.setAttribute("title","")}}},{key:"_enter",value:function _enter(a,b){var d=this.constructor.DATA_KEY;b=b||(0,c.default)(a.currentTarget).data(d);if(!b){b=new this.constructor(a.currentTarget,this._getDelegateConfig());(0,c.default)(a.currentTarget).data(d,b)}if(a){b._activeTrigger["focusin"===a.type?C:B]=!0}if((0,c.default)(b.getTipElement()).hasClass(A)||b._hoverState===w){b._hoverState=w;return}clearTimeout(b._timeout);b._hoverState=w;if(!b.config.delay||!b.config.delay.show){b.show();return}b._timeout=setTimeout(function(){if(b._hoverState===w){b.show()}},b.config.delay.show)}},{key:"_leave",value:function _leave(a,b){var d=this.constructor.DATA_KEY;b=b||(0,c.default)(a.currentTarget).data(d);if(!b){b=new this.constructor(a.currentTarget,this._getDelegateConfig());(0,c.default)(a.currentTarget).data(d,b)}if(a){b._activeTrigger["focusout"===a.type?C:B]=!1}if(b._isWithActiveTrigger()){return}clearTimeout(b._timeout);b._hoverState=x;if(!b.config.delay||!b.config.delay.hide){b.hide();return}b._timeout=setTimeout(function(){if(b._hoverState===x){b.hide()}},b.config.delay.hide)}},{key:"_isWithActiveTrigger",value:function _isWithActiveTrigger(){for(var a in this._activeTrigger){if(this._activeTrigger[a]){return!0}}return!1}},{key:"_getConfig",value:function _getConfig(a){var d=(0,c.default)(this.element).data();Object.keys(d).forEach(function(a){if(-1!==s.indexOf(a)){delete d[a]}});a=h({},this.constructor.Default,{},d,{},"object"===j(a)&&a?a:{});if("number"==typeof a.delay){a.delay={show:a.delay,hide:a.delay}}if("number"==typeof a.title){a.title=a.title.toString()}if("number"==typeof a.content){a.content=a.content.toString()}e.default.typeCheckConfig("tooltip",a,this.constructor.DefaultType);if(a.sanitize){a.template=(0,b.sanitizeHtml)(a.template,a.whiteList,a.sanitizeFn)}return a}},{key:"_getDelegateConfig",value:function _getDelegateConfig(){var a={};if(this.config){for(var b in this.config){if(this.constructor.Default[b]!==this.config[b]){a[b]=this.config[b]}}}return a}},{key:"_cleanTipClass",value:function _cleanTipClass(){var a=(0,c.default)(this.getTipElement()),b=a.attr("class").match(r);if(null!==b&&b.length){a.removeClass(b.join(""))}}},{key:"_handlePopperPlacementChange",value:function _handlePopperPlacementChange(a){this.tip=a.instance.popper;this._cleanTipClass();this.addAttachmentClass(this._getAttachment(a.placement))}},{key:"_fixTransition",value:function _fixTransition(){var a=this.getTipElement(),b=this.config.animation;if(null!==a.getAttribute("x-placement")){return}(0,c.default)(a).removeClass(z);this.config.animation=!1;this.hide();this.show();this.config.animation=b}}],[{key:"_jQueryInterface",value:function _jQueryInterface(b){return this.each(function(){var d=(0,c.default)(this).data(n),e="object"===j(b)&&b;if(!d&&/dispose|hide/.test(b)){return}if(!d){d=new a(this,e);(0,c.default)(this).data(n,d)}if("string"==typeof b){if("undefined"==typeof d[b]){throw new TypeError("No method named \"".concat(b,"\""))}d[b]()}})}},{key:"VERSION",get:function get(){return"4.5.0"}},{key:"Default",get:function get(){return v}},{key:"NAME",get:function get(){return"tooltip"}},{key:"DATA_KEY",get:function get(){return n}},{key:"Event",get:function get(){return y}},{key:"EVENT_KEY",get:function get(){return o}},{key:"DefaultType",get:function get(){return t}}]);return a}();c.default.fn.tooltip=D._jQueryInterface;c.default.fn.tooltip.Constructor=D;c.default.fn.tooltip.noConflict=function(){c.default.fn.tooltip=p;return D._jQueryInterface};a.default=D;return a.default}); define ("theme_boost/bootstrap/button",["exports","jquery"],function(a,b){"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.default=void 0;b=function(a){return a&&a.__esModule?a:{default:a}}(b);function c(a,b){if(!(a instanceof b)){throw new TypeError("Cannot call a class as a function")}}function d(a,b){for(var c=0,d;c=window.innerHeight){a.classList.add("scrolled")}else{a.classList.remove("scrolled")}}}]);return a}();a.default=e;return a.default}); "use strict";define ("theme_boost/button",["exports","jquery"],function(a,b){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var f=function(a){return a&&a.__esModule?a:{default:a}}(b);function c(a,b){if(!(a instanceof b)){throw new TypeError("Cannot call a class as a function")}}function d(a,b){for(var c=0,d;c=4){throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}})();a.Util=B.default;a.Alert=q.default;a.Button=r.default;a.Carousel=s.default;a.Collapse=t.default;a.Dropdown=u.default;a.Modal=v.default;a.Popover=w.default;a.Scrollspy=x.default;a.Tab=y.default;a.Toast=z.default;a.Tooltip=A.default}); define('theme_lambda/bootstrap', ["jquery"],function(a){function b(b){a(".dropdown-backdrop").remove(),a(k).each(function(){var d=c(a(this));void 0!=b&&0!=d.find(b).length||d.removeClass("open")})}function c(b){var c,d=b.attr("data-target");return d||(d=b.attr("href"),d=d&&/#/.test(d)&&d.replace(/.*(?=#[^\s]*$)/,"")),c=d&&a(d),c&&c.length||(c=b.parent()),c}function d(b,c){var d,e=a.proxy(this.process,this),f=a(a(b).is("body")?window:b);this.options=a.extend({},a.fn.scrollspy.defaults,c),this.$scrollElement=f.on("scroll.scroll-spy.data-api",e),this.selector=(this.options.target||(d=a(b).attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=a("body"),this.refresh(),this.process()}a(".h1").hide(),a(function(){a.support.transition=function(){var a=function(){var a,b=document.createElement("bootstrap"),c={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(a in c)if(void 0!==b.style[a])return c[a]}();return a&&{end:a}}()});var e='[data-dismiss="alert"]',f=function(b){a(b).on("click",e,this.close)};f.prototype.close=function(b){function c(){d.trigger("closed").remove()}var d,e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,"")),d=a(f),b&&b.preventDefault(),d.length||(d=e.hasClass("alert")?e:e.parent()),d.trigger(b=a.Event("close")),b.isDefaultPrevented()||(d.removeClass("in"),a.support.transition&&d.hasClass("fade")?d.on(a.support.transition.end,c):c())};var g=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var c=a(this),d=c.data("alert");d||c.data("alert",d=new f(this)),"string"==typeof b&&d[b].call(c)})},a.fn.alert.Constructor=f,a.fn.alert.noConflict=function(){return a.fn.alert=g,this},a(document).on("click.alert.data-api",e,f.prototype.close);var h=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.button.defaults,c)};h.prototype.setState=function(a){var b="disabled",c=this.$element,d=c.data(),e=c.is("input")?"val":"html";a+="Text",d.resetText||c.data("resetText",c[e]()),c[e](d[a]||this.options[a]),setTimeout(function(){"loadingText"==a?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},h.prototype.toggle=function(){var a=this.$element.closest('[data-toggle="buttons-radio"]');a&&a.find(".active").removeClass("active"),this.$element.toggleClass("active")};var g=a.fn.button;a.fn.button=function(b){return this.each(function(){var c=a(this),d=c.data("button"),e="object"==typeof b&&b;d||c.data("button",d=new h(this,e)),"toggle"==b?d.toggle():b&&d.setState(b)})},a.fn.button.defaults={loadingText:"loading..."},a.fn.button.Constructor=h,a.fn.button.noConflict=function(){return a.fn.button=g,this},a(document).on("click.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle")});var i=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};i.prototype={cycle:function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},getActiveIndex:function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},to:function(b){var c=this.getActiveIndex(),d=this;if(!(b>this.$items.length-1||b<0))return this.sliding?this.$element.one("slid",function(){d.to(b)}):c==b?this.pause().cycle():this.slide(b>c?"next":"prev",a(this.$items[b]))},pause:function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition.end&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),clearInterval(this.interval),this.interval=null,this},next:function(){if(!this.sliding)return this.slide("next")},prev:function(){if(!this.sliding)return this.slide("prev")},slide:function(b,c){var d,e=this.$element.find(".item.active"),f=c||e[b](),g=this.interval,h="next"==b?"left":"right",i="next"==b?"first":"last",j=this;if(this.sliding=!0,g&&this.pause(),f=f.length?f:this.$element.find(".item")[i](),d=a.Event("slide",{relatedTarget:f[0],direction:h}),!f.hasClass("active")){if(this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var b=a(j.$indicators.children()[j.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(d),d.isDefaultPrevented())return;f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),this.$element.one(a.support.transition.end,function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),j.sliding=!1,setTimeout(function(){j.$element.trigger("slid")},0)})}else{if(this.$element.trigger(d),d.isDefaultPrevented())return;e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return g&&this.cycle(),this}}};var g=a.fn.carousel;a.fn.carousel=function(b){return this.each(function(){var c=a(this),d=c.data("carousel"),e=a.extend({},a.fn.carousel.defaults,"object"==typeof b&&b),f="string"==typeof b?b:e.slide;d||c.data("carousel",d=new i(this,e)),"number"==typeof b?d.to(b):f?d[f]():e.interval&&d.pause().cycle()})},a.fn.carousel.defaults={interval:5e3,pause:"hover"},a.fn.carousel.Constructor=i,a.fn.carousel.noConflict=function(){return a.fn.carousel=g,this},a(document).on("click.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d,e=a(this),f=a(e.attr("data-target")||(c=e.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),g=a.extend({},f.data(),e.data());f.carousel(g),(d=e.attr("data-slide-to"))&&f.data("carousel").pause().to(d).cycle(),b.preventDefault()});var j=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.collapse.defaults,c),this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};j.prototype={constructor:j,dimension:function(){var a=this.$element.hasClass("width");return a?"width":"height"},show:function(){var b,c,d,e;if(!this.transitioning&&!this.$element.hasClass("in")){if(b=this.dimension(),c=a.camelCase(["scroll",b].join("-")),d=this.$parent&&this.$parent.find("> .accordion-group > .in"),d&&d.length){if(e=d.data("collapse"),e&&e.transitioning)return;d.collapse("hide"),e||d.data("collapse",null)}this.$element[b](0),this.transition("addClass",a.Event("show"),"shown"),a.support.transition&&this.$element[b](this.$element[0][c])}},hide:function(){var b;!this.transitioning&&this.$element.hasClass("in")&&(b=this.dimension(),this.reset(this.$element[b]()),this.transition("removeClass",a.Event("hide"),"hidden"),this.$element[b](0))},reset:function(a){var b=this.dimension();return this.$element.removeClass("collapse")[b](a||"auto")[0].offsetWidth,this.$element[null!==a?"addClass":"removeClass"]("collapse"),this},transition:function(b,c,d){var e=this,f=function(){"show"==c.type&&e.reset(),e.transitioning=0,e.$element.trigger(d)};this.$element.trigger(c),c.isDefaultPrevented()||(this.transitioning=1,this.$element[b]("in"),a.support.transition&&this.$element.hasClass("collapse")?this.$element.one(a.support.transition.end,f):f())},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};var g=a.fn.collapse;a.fn.collapse=function(b){return this.each(function(){var c=a(this),d=c.data("collapse"),e=a.extend({},a.fn.collapse.defaults,c.data(),"object"==typeof b&&b);d||c.data("collapse",d=new j(this,e)),"string"==typeof b&&d[b]()})},a.fn.collapse.defaults={toggle:!0},a.fn.collapse.Constructor=j,a.fn.collapse.noConflict=function(){return a.fn.collapse=g,this},a(document).on("click.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e).data("collapse")?"toggle":d.data();d[a(e).hasClass("in")?"addClass":"removeClass"]("collapsed"),a(e).collapse(f)});var k="[data-toggle=dropdown]",l=function(b){var c=a(b).on("click.dropdown.data-api",this.toggle);a("html").on("click.dropdown.data-api",function(){c.parent().removeClass("open")})};l.prototype={constructor:l,toggle:function(d){var e,f,g=a(this);if(!g.is(".disabled, :disabled"))return e=c(g),f=e.hasClass("open"),b(g),f||"ontouchstart"in document.documentElement&&a('