芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/moodledata/localcache/requirejs/41fa6241e9fcb0422686fea574c22df6b70d70c1
define('core/icon_system', ["jquery"],function(a){var b=function(){};return b.prototype.init=function(){return a.when(this)},b.prototype.renderIcon=function(a,b,c,d){throw new Error("Abstract function not implemented.")},b.prototype.getTemplateName=function(){throw new Error("Abstract function not implemented.")},b}); define('core/backoff_timer', function(){var a=function(a,b){this.callback=a,this.backOffFunction=b};return a.prototype.callback=null,a.prototype.backOffFunction=null,a.prototype.time=null,a.prototype.timeout=null,a.prototype.generateNextTime=function(){var a=this.backOffFunction(this.time);return this.time=a,a},a.prototype.reset=function(){return this.time=null,this.stop(),this},a.prototype.stop=function(){return this.timeout&&(window.clearTimeout(this.timeout),this.timeout=null),this},a.prototype.start=function(){if(!this.timeout){var a=this.generateNextTime();this.timeout=window.setTimeout(function(){this.callback(),this.stop(),this.start()}.bind(this),a)}return this},a.prototype.restart=function(){return this.reset().start()},a.getIncrementalCallback=function(a,b,c,d){return function(e){return e?e+b>c?d:e+b:a}},a}); define('core/modal_registry', ["core/notification"],function(a){var b={},c=function(a){return b[a]},d=function(d,e,f){c(d)&&a.exception({message:"Modal of type '"+d+"' is already registered"}),e&&"function"==typeof e||a.exception({message:"You must provide a modal module"}),f||a.exception({message:"You must provide a modal template"}),b[d]={module:e,template:f}};return{register:d,get:c}}); define('core/showhidesettings', ["jquery"],function(a){function b(a){return a.is("input[type=hidden]")&&a.siblings('input[type=checkbox][name="'+a.attr("name")+'"]').length}function c(a,b){return a.is("input[type=radio]")&&a.attr("value")!==b}function d(a,d){return!b(a)&&!c(a,d)}function e(a){return a.is("input[type=radio]")&&!a.prop("checked")}function f(a){return a.is("input[type=checkbox]")&&!a.prop("checked")}function g(a){return a.is("select")&&a.prop("multiple")}function h(a,b){var c=a.val()||[];if(!b.length)return!1;if(c.length!==b.length)return!1;for(var d in c)if(c.hasOwnProperty(d)&&b.indexOf(c[d])===-1)return!1;return!0}function i(b){return a('[name="'+b+'"],[name="'+b+'[]"]')}function j(b){return a(b).attr("name").replace(/\[]/,"")}function k(b,c,d){return a.isFunction(p[c])?p[c](b,d):p.defaultCondition(b,d)}function l(b,c){c=c||j(b.currentTarget);var d=i(c);if(o.hasOwnProperty(c)){var e={};a.each(o[c],function(b,c){a.each(c,function(c,f){var g=k(d,b,c);a.each(f,function(a,b){e.hasOwnProperty(b)?e[b]=e[b]||g:e[b]=g})})}),a.each(e,function(b,c){i(b).each(function(b,d){var e=a(d).closest(".form-item");e.length&&(c?e.hide():e.show())})})}}function m(){a.each(o,function(a){var b=i(a);b.length&&(b.on("change",l),l(null,a))})}function n(){a(".form-dependenton").hide()}var o,p={notchecked:function(b,c){var e=!1;return c=String(c),b.each(function(b,f){var g=a(f);d(g,c)&&(e=e||!g.prop("checked"))}),e},checked:function(b,c){var e=!1;return c=String(c),b.each(function(b,f){var g=a(f);d(g,c)&&(e=e||g.prop("checked"))}),e},noitemselected:function(b){var c=!1;return b.each(function(b,d){var e=a(d);c=c||e.prop("selectedIndex")===-1}),c},eq:function(c,d){var i=!1,j=!1;return d=String(d),c.each(function(c,k){var l=a(k);if(!e(l)){if(b(l))return void(j=l.val()===d);if(f(l))return void(i=i||j);if(g(l)){var m=d.split("|");return void(i=h(l,m))}i=i||l.val()===d}}),i},"in":function(c,d){var i=!1,j=!1,k=d.split("|");return c.each(function(c,d){var l=a(d);if(!e(l))return b(l)?void(j=k.indexOf(l.val())>-1):f(l)?void(i=i||j):g(l)?void(i=h(l,k)):void(i=i||k.indexOf(l.val())>-1)}),i},defaultCondition:function(c,d){var i=!1,j=!1;return d=String(d),c.each(function(c,k){var l=a(k);if(!e(l)){if(b(l))return void(j=l.val()!==d);if(f(l))return void(i=i||j);if(g(l)){var m=d.split("|");return void(i=!h(l,m))}i=i||l.val()!==d}}),i}};return{init:function(a){o=a.dependencies,m(),n()}}}); define('core/key_codes', function(){return{tab:9,enter:13,shift:16,ctrl:17,alt:18,escape:27,space:32,end:35,home:36,arrowLeft:37,arrowUp:38,arrowRight:39,arrowDown:40,8:56,asterix:106,pageUp:33,pageDown:34}}); define('core/sortable_list', ["jquery","core/log","core/autoscroll","core/str","core/modal_factory","core/modal_events","core/notification"],function(a,b,c,d,e,f,g){var h={targetListSelector:null,moveHandlerSelector:"[data-drag-type=move]",isHorizontal:!1,autoScroll:!0},i={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"},j=function(){var a,b=!1,c="testpassiveeventoptions";try{a=Object.defineProperty({},"passive",{get:function(){b=!0}}),document.addEventListener(c,a,a),document.removeEventListener(c,a,a)}catch(d){b=!1}return b},k=function(a){return{setup:function(b,c,d){return!!c.includes("notPassive")&&(this.addEventListener(a,d,{passive:!1}),!0)}}};j&&(a.event.special.touchstart=k("touchstart"),a.event.special.touchmove=k("touchmove"),a.event.special.touchend=k("touchend"));var l=function(b,c){this.info=null,this.proxy=null,this.proxyDelta=null,this.dragCounter=0,this.lastEvent=null,this.config=a.extend({},h,c||{}),this.config.listSelector=b,this.config.targetListSelector||(this.config.targetListSelector=b),"object"==typeof this.config.listSelector?a(this.config.listSelector).on("mousedown touchstart.notPassive",a.proxy(this.dragStartHandler,this)):a("body").on("mousedown touchstart.notPassive",this.config.listSelector,a.proxy(this.dragStartHandler,this)),null!==this.config.moveHandlerSelector&&a("body").on("click keypress",this.config.moveHandlerSelector,a.proxy(this.clickHandler,this))};return l.EVENTS={DRAGSTART:"sortablelist-dragstart",DRAG:"sortablelist-drag",DROP:"sortablelist-drop",DRAGEND:"sortablelist-dragend"},l.prototype.resetDraggedClasses=function(){var b=[i.isDraggedClass,i.currentPositionClass,i.overElementClass,i.targetListClass];for(var c in b)a("."+b[c]).removeClass(b[c]);this.proxy&&(this.proxy.remove(),this.proxy=a())},l.prototype.calculatePositionOnPage=function(b){if(b.originalEvent&&b.originalEvent.touches&&void 0!==b.originalEvent.touches[0]){var c=b.originalEvent.touches[0];b.pageX=c.pageX,b.pageY=c.pageY}void 0===b.pageX?(b.pageX=this.lastEvent.pageX,b.pageY=this.lastEvent.pageY):this.lastEvent=b,void 0===b.clientX&&(b.clientX=Math.round(b.pageX-a(window).scrollLeft()),b.clientY=Math.round(b.pageY-a(window).scrollTop()))},l.prototype.dragStartHandler=function(b){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"!==b.type||1===b.which){this.calculatePositionOnPage(b);var d=a(b.target).closest(a(b.currentTarget).children());if(d.length&&(null===this.config.moveHandlerSelector||a(b.target).closest(this.config.moveHandlerSelector,d).length)){b.stopPropagation(),b.preventDefault(),this.dragCounter++,this.info={element:d,sourceNextElement:d.next(),sourceList:d.parent(),targetNextElement:d.next(),targetList:d.parent(),type:b.type,dropped:!1,startX:b.pageX,startY:b.pageY,startTime:(new Date).getTime()},a(this.config.targetListSelector).addClass(i.targetListClass);var e=d.offset();d.addClass(i.currentPositionClass),this.proxyDelta={x:e.left-b.pageX,y:e.top-b.pageY},this.proxy=a();var f=this.dragCounter;setTimeout(a.proxy(function(){null!==this.info&&"click"!==this.info.type&&"keypress"!==this.info.type&&this.dragCounter===f&&this.createProxy()},this),500),a(window).on("mousemove touchmove.notPassive mouseup touchend.notPassive",a.proxy(this.dragHandler,this)),a(window).on("keypress",a.proxy(this.dragcancelHandler,this)),this.config.autoScroll&&c.start(function(){a(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(i.currentPositionClass).addClass(i.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(b){if(("keypress"!==b.type||13===b.originalEvent.keyCode||32===b.originalEvent.keyCode)&&null===this.info){var c=a(b.target).closest(this.config.moveHandlerSelector),d=c.closest(this.config.listSelector),e=c.closest(d.children());e.length&&(b.preventDefault(),b.stopPropagation(),this.dragCounter++,this.info={element:e,sourceNextElement:e.next(),sourceList:d,targetNextElement:e.next(),targetList:d,dropped:!1,type:b.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=0,f=d.getBoundingClientRect(),g=b-(f.top+window.scrollY),h=a-(f.left+window.scrollX);return h>=-e&&h<=f.width+e&&g>=-e&&g<=f.height+e?{x:h,y:g,xRatio:f.width?h/f.width:0,yRatio:f.height?g/f.height:0}:null},l.prototype.isListHorizontal=function(a){var b=this.config.isHorizontal;return b===!0||b===!1?b:b(a)},l.prototype.dragHandler=function(b){b.preventDefault(),b.stopPropagation(),this.calculatePositionOnPage(b),this.proxy.offset({top:-1e3,left:-1e3});var c=a(document.elementFromPoint(b.clientX,b.clientY)),d=this.info.element[0],e=function(){return this!==d},f=c.closest("."+i.targetListClass+" > :not(."+i.isDraggedClass+")").filter(e),g=c.closest("."+i.targetListClass),h=this.proxy,j=function(){return!h||!h.length||this!==h[0]};if(a("."+i.overElementClass).removeClass(i.overElementClass),f.addClass(i.overElementClass),this.proxy.offset({top:this.proxyDelta.y+b.pageY,left:this.proxyDelta.x+b.pageX}),g.length&&!g.children().filter(j).length)this.moveElement(g,a());else if(1===f.length&&!this.info.element.find(f[0]).length){var k=this.getPositionInNode(b.pageX,b.pageY,f);if(k){var m=f.parent(),n=this.isListHorizontal(m)?k.xRatio:k.yRatio,o=f.find("."+i.targetListClass),p=!o.children().filter(j).filter(e).length;o.length&&p&&n>.2&&n<.8?this.moveElement(o,a()):n>.5?this.moveElement(m,f.next().filter(j)):this.moveElement(m,f)}}if("mouseup"===b.type||"touchend"===b.type){this.info.endX=b.pageX,this.info.endY=b.pageY,this.info.endTime=(new Date).getTime(),this.info.dropped=!0,this.info.positionChanged=this.hasPositionChanged(this.info);var q=this.info;this.executeCallback(l.EVENTS.DROP),this.finishDragging(),"touchend"===b.type&&null!==this.config.moveHandlerSelector&&q.endTime-q.startTime<500&&!q.positionChanged&&this.clickHandler(b)}},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;b.length&&b[0]===c[0]||a[0]===this.info.targetList[0]&&b.length===this.info.targetNextElement.length&&b[0]===this.info.targetNextElement[0]||(b.length?a[0].insertBefore(c[0],b[0]):this.proxy&&this.proxy.parent().length&&this.proxy.parent()[0]===a[0]?a[0].insertBefore(c[0],this.proxy[0]):a[0].appendChild(c[0]),this.info.targetList=a,this.info.targetNextElement=b,this.executeCallback(l.EVENTS.DRAG))},l.prototype.finishDragging=function(){this.resetDraggedClasses(),this.config.autoScroll&&c.stop(),a(window).off("mousemove touchmove.notPassive mouseup touchend.notPassive",a.proxy(this.dragHandler,this)),a(window).off("keypress",a.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){"keypress"===a.type&&27===a.originalEvent.keyCode&&(this.moveElement(this.info.sourceList,this.info.sourceNextElement),this.finishDragging())},l.prototype.getElementName=function(b){return a.Deferred().resolve(b.text())},l.prototype.getDestinationName=function(a,b){return b.length?this.getElementName(b).then(function(a){return d.get_string("movecontentafter","moodle",a)}):d.get_string("movecontenttothetop","moodle")},l.prototype.getMoveDialogueTitle=function(b,c){return c.attr("title")?a.Deferred().resolve(c.attr("title")):this.getElementName(b).then(function(a){return d.get_string("movecontent","moodle",a)})},l.prototype.getDestinationsList=function(){var b=[],c=a(this.config.targetListSelector),d=a("
").addClass(i.keyboardDragClass),e=a.when().then(function(){return d}),f=a.proxy(function(b,c,f){c.is(this.info.element)||f.is(this.info.element)||a.contains(this.info.element[0],b[0])||(e=e.then(a.proxy(function(){return this.getDestinationName(b,f)},this)).then(function(e){var f=a("
").appendTo(d),g=a('
').attr("data-core_sortable_list-quickmove",1).appendTo(f);return g.data("parent-element",b).data("before-element",c).text(e),d}))},this),g=function(){if(a.inArray(this,b)===-1){b.push(this);var d=a(this),e=d.children();e.each(function(){var b=a(this);f(d,b,b.prev()),b.find(c).each(g)}),f(d,a(),e.last())}};return c.each(g),e},l.prototype.displayMoveDialogue=function(b){e.create({type:e.types.CANCEL,title:this.getMoveDialogueTitle(this.info.element,b),body:this.getDestinationsList()}).then(a.proxy(function(c){var d=a.proxy(function(d){d.preventDefault(),d.stopPropagation(),this.moveElement(a(d.currentTarget).data("parent-element"),a(d.currentTarget).data("before-element")),this.info.endTime=(new Date).getTime(),this.info.positionChanged=this.hasPositionChanged(this.info),this.info.dropped=!0,b.focus(),this.executeCallback(l.EVENTS.DROP),c.hide()},this);return c.getRoot().on("click","[data-core_sortable_list-quickmove]",d),c.getRoot().on(f.hidden,a.proxy(function(){c.getRoot().off("click","[data-core_sortable_list-quickmove]",d),c.destroy(),this.finishDragging()},this)),c.setLarge(),c.show(),c},this))["catch"](g.exception)},l}); 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()};return 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");a!==b&&(b&&(b.attr("tabindex","-1"),b.attr("aria-selected","false")),a.attr("tabindex","0"),a.attr("aria-selected","true"),this.treeRoot.data("activeItem",a),"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]");return b.length>c.length?b: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;b.addClass("loading"),require([d],function(a){a.load(b).done(function(){b.attr("data-loaded",!0),e.initialiseNodes(b),e.finishExpandingGroup(b),b.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.attr("aria-hidden","false"),a.attr("aria-expanded","true"),this.refreshVisibleItemsCache()},c.prototype.collapseGroup=function(a){if(this.isGroupCollapsible(a)&&!this.isGroupCollapsed(a)){var b=this.getGroupFromItem(a);b.attr("aria-hidden","true"),a.attr("aria-expanded","false"),this.refreshVisibleItemsCache()}},c.prototype.toggleGroup=function(a){"true"===a.attr("aria-expanded")?this.collapseGroup(a):this.expandGroup(a)},c.prototype.handleKeyDown=function(c,d){var e=this.getVisibleItems().index(c);if(d.altKey||d.ctrlKey||d.metaKey||d.shiftKey&&d.keyCode!=this.keys.tab)return!0;switch(d.keyCode){case this.keys.home:return this.getVisibleItems().first().focus(),d.stopPropagation(),!1;case this.keys.end:return this.getVisibleItems().last().focus(),d.stopPropagation(),!1;case this.keys.enter:var f=c.children("a").length?c.children("a"):c.children().not(b.GROUP).find("a");return f.length?"function"==typeof this.enterCallback?this.enterCallback(c):window.location.href=f.first().attr("href"):this.isGroupItem(c)&&this.toggleGroup(c,!0),d.stopPropagation(),!1;case this.keys.space:return this.isGroupItem(c)&&this.toggleGroup(c,!0),d.stopPropagation(),!1;case this.keys.left:var g=function(b){b.getVisibleItems().filter(function(){return b.getGroupFromItem(a(this)).has(c).length}).focus()};return this.isGroupItem(c)?this.isGroupCollapsed(c)?g(this):this.collapseGroup(c):g(this),d.stopPropagation(),!1;case this.keys.right:return this.isGroupItem(c)&&(this.isGroupCollapsed(c)?this.expandGroup(c):this.getGroupFromItem(c).find(b.ITEM).first().focus()),d.stopPropagation(),!1;case this.keys.up:if(e>0){var h=this.getVisibleItems().eq(e-1);h.focus()}return d.stopPropagation(),!1;case this.keys.down:if(e
0&&(e=c(d.shift().trim(),a)),d.length>0&&(f=c(d.shift().trim(),a)),d.length>0&&(g=c(d.join(",").trim(),a));var h=t.getTemplateName(),i=this.currentThemeName+"/"+h,j=q[i];return e=e.replace(///gi,"/"),t.renderIcon(e,f,g,j)},z.prototype.jsHelper=function(a,b,c){return this.requiredJS.push(c(b,a)),""},z.prototype.stringHelper=function(a,b,c){var d=b.split(","),e="",f="",g="";d.length>0&&(e=d.shift().trim()),d.length>0&&(f=d.shift().trim()),d.length>0&&(g=d.join(",").trim()),""!==g&&(g=c(g,a)),0===g.indexOf("{")&&0!==g.indexOf("{{")&&(g=JSON.parse(g));var h=this.requiredStrings.length;return this.requiredStrings.push({key:e,component:f,param:g}),"[[_s"+h+"]]"},z.prototype.quoteHelper=function(a,b,c){var d=c(b.trim(),a);return d=d.replace(/"/g,'\\"').replace(/([\{\}]{2,3})/g,"{{=<% %>=}}$1<%={{ }}=%>").replace(/(\r\n|\r|\n)/g," "),'"'+d+'"'},z.prototype.shortenTextHelper=function(a,b,c){var d=/(.*?),(.*)/,e=b.match(d),f=e[1].trim(),g=e[2].trim(),h=c(g,a);return m.truncate(h,{length:f,words:!0,ellipsis:"..."})},z.prototype.userDateHelper=function(a,b,c){var d=/(.*?),(.*)/,e=b.match(d),f=c(e[1].trim(),a),g=c(e[2].trim(),a),h=this.requiredDates.length;return this.requiredDates.push({timestamp:f,format:g}),"[[_t_"+h+"]]"},z.prototype.addHelperFunction=function(a,b){return function(){return function(c,d){var e=w.reduce(function(a,c){return b.hasOwnProperty(c)&&(a[c]=b[c]),a},{});w.forEach(function(a){b[a]=function(){return""}});var f=a.apply(this,[b,c,d]);for(var g in e)b[g]=e[g];return f}.bind(this)}.bind(this)},z.prototype.addHelpers=function(a,b){this.currentThemeName=b,this.requiredStrings=[],this.requiredJS=[],a.uniqid=p++,a.str=this.addHelperFunction(this.stringHelper,a),a.pix=this.addHelperFunction(this.pixHelper,a),a.js=this.addHelperFunction(this.jsHelper,a),a.quote=this.addHelperFunction(this.quoteHelper,a),a.shortentext=this.addHelperFunction(this.shortenTextHelper,a),a.userdate=this.addHelperFunction(this.userDateHelper,a),a.globals={config:g},a.currentTheme=b},z.prototype.getJS=function(){var a="";return this.requiredJS.length>0&&(a=this.requiredJS.join(";\n")),a},z.prototype.treatStringsInContent=function(a,b){var c,d,e,f,g,h,i=/\[\[_s\d+\]\]/;do{for(c="",d=a.search(i);d>-1;){c+=a.substring(0,d),a=a.substr(d),e="",f=4,g=a.substr(f,1);do e+=g,f++,g=a.substr(f,1);while("]"!=g);h=b[parseInt(e,10)],"undefined"==typeof h&&(l.debug("Could not find string for pattern [[_s"+e+"]]."),h=""),c+=h,a=a.substr(6+e.length),d=a.search(i)}a=c+a,d=a.search(i)}while(d>-1);return a},z.prototype.treatDatesInContent=function(a,b){return b.forEach(function(b,c){var d="\\[\\[_t_"+c+"\\]\\]",e=new RegExp(d,"g");a=a.replace(e,b)}),a},z.prototype.doRender=function(c,e,f){this.currentThemeName=f;var g=t.getTemplateName(),h=new o("core/templates:doRender");return this.getTemplate(g).then(function(){this.addHelpers(e,f);var d=a.render(c,e,this.partialHelper.bind(this));return b.Deferred().resolve(d.trim(),this.getJS()).promise()}.bind(this)).then(function(a,c){return this.requiredStrings.length>0?d.get_strings(this.requiredStrings).then(function(d){return this.requiredDates=this.requiredDates.map(function(a){return{timestamp:this.treatStringsInContent(a.timestamp,d),format:this.treatStringsInContent(a.format,d)}}.bind(this)),a=this.treatStringsInContent(a,d),c=this.treatStringsInContent(c,d),b.Deferred().resolve(a,c).promise()}.bind(this)):b.Deferred().resolve(a,c).promise()}.bind(this)).then(function(a,c){return this.requiredDates.length>0?n.get(this.requiredDates).then(function(d){return a=this.treatDatesInContent(a,d),c=this.treatDatesInContent(c,d),b.Deferred().resolve(a,c).promise()}.bind(this)):b.Deferred().resolve(a,c).promise()}.bind(this)).then(function(a,c){return h.resolve(),b.Deferred().resolve(a,c).promise()})};var A=function(a){if(""!==a.trim()){var c=b("