(function(f){function a(a){return{isValid:!1,errorCode:a,value:void 0}}function b(a){return{isValid:!0,value:a,errorCode:""}}function d(a){return"function"!=typeof/./&&"object"!=typeof Int8Array&&"function"!=typeof nodelist?"function"==typeof a||!1:Object.prototype.toString.call(a)==="[object "+Function+"]"}function c(a){return"[object String]"===Object.prototype.toString.call(a)}function e(){this.validatedModel={}}function g(a){return function(c,e,i){d(e)&&(i=e,e={});void 0===e&&(e={});var h=function(d,
h){if(i&&!i.call(this,h)){var g=b(void 0);g.validatedFieldName=c;return g}g=a.call(this,d,e);if(!g.isValid){g.fieldName=g.fieldName||[];g.fieldName=[c].concat(g.fieldName)}g.validatedFieldName=c;return g};h.fieldName=c;return h}}var i={validateBoolean:function(a){return"True"===a},validateInteger:function(a){var c={isValid:!1,value:NaN};if(i.isStringEmpty(a))return c;a=parseInt(a,10);if(isNaN(a))return c;c.isValid=!0;c.value=a;return c},validatePositiveInteger:function(a){a=this.validateInteger(a);
return!a.isValid?a:1>a.value?{isValid:!1}:a},validateIntegerInRange:function(a,c,b){a=this.validateInteger(a);if(!a.isValid)return a;b||(b=0);return a.value<b||a.value>c?{isValid:!1}:a},validateFloat:function(a,c){var b={isValid:!1,value:NaN,parsedValue:NaN};if(i.isStringEmpty(a))return b;var e=parseFloat(a);if(isNaN(e))return b;c||(c=2);b.isValid=!0;b.value=e.toFixed(c);b.parsedValue=parseFloat(b.value);return b},validateFloatInRange:function(a,c,b,e){e||(e=2);a=this.validateFloat(a,e);if(!a.isValid)return a;
b||(b=0);b=parseFloat(b.toFixed(e));c=parseFloat(c.toFixed(e));return a.value<b||a.value>c?{isValid:!1}:a},validateOption:function(a,c){for(var b in a)if(Object.prototype.hasOwnProperty.call(a,b)&&b===c)return a[b];return a[a.DEFAULT]},validateJSVariableName:function(a){return null===a.match(/^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/)?{isValid:!1}:{isValid:!0}},validateColor:function(a,c){c||(c="#FFFFFF");if(!a)return{isValid:!1,color:c};var b=a.match(/#[0-9a-fA-F]+/),e;return(e=(e=!b||null===
b||1!=b.length)||7!=b[0].length)?{isValid:!1,color:c}:{isValid:!0,color:a}},isStringEmpty:function(a){return void 0===a||""===a},isHtmlEmpty:function(a){if(void 0===a)return!0;a=String(a);if(-1<a.indexOf("<img"))return!1;var c=document.createElement("div");c.innerHTML=a;a=c.textContent||c.innerText;return void 0===a||""===a.trim()?!0:!1},isStringWithPrefixEmpty:function(a,c){return i.isStringEmpty(a)?!0:a===c},isArrayElementEmpty:function(a){if(!a)return!0;for(var c in a)if(Object.prototype.hasOwnProperty.call(a,
c)&&!i.isStringEmpty(a[c]))return!1;return!0},isArrayEmpty:function(a){return!a?!0:1===a.length&&i.isArrayElementEmpty(a[0])},removeDuplicatesFromArray:function(a){if(0===a.length)return[];for(var c=[],b=0;b<a.length-1;b++)a[b+1]!==a[b]&&c.push(a[b]);c.push(a[a.length-1]);return c}};e.prototype={validate:function(a,c){return this.validateModel(a,c,!0)},validateModel:function(c,b,e){var d={},i;void 0===e&&(e=!1);for(var g=b.length,h=0;h<g;h+=1)if(i=b[h].fieldName,void 0!==c[i]&&null!==c[i]){i=b[h].call(this,
c[i],d);var j=i.validatedFieldName;if(!i.isValid)return i;e&&(this.validatedModel[j]=i.value);d[j]=i.value}else return c=a("UMF01"),c.fieldName=[i],c;return{isValid:!0,value:d,errorCode:""}},generateErrorCode:a,generateValidValue:b,__validatorDecorator__:g};var j={DumbInteger:function(a){return this.generateValidValue(parseInt(a,10))},DumbString:function(a){return this.generateValidValue(a)},Boolean:function(a){return!c(a)?this.generateErrorCode("BL01"):this.generateValidValue("True"===a)},Integer:function(a,
b){if(!c(a))return this.generateErrorCode("INT05");var e=b.minValue,d=b.maxValue,i=b["default"],h=void 0!==b["default"];if(void 0===d||null===d)d=Number.MAX_VALUE;if(void 0===e||null===e)e=-1*Number.MAX_VALUE;a=a.trim();if(h&&""===a)return this.generateValidValue(i);if(""===a)return this.generateErrorCode("INT01");if(!/^[-]?[0-9]+$/.test(a))return this.generateErrorCode("INT02");i=parseInt(a,10);return i>d?this.generateErrorCode("INT03"):i<e?this.generateErrorCode("INT04"):this.generateValidValue(i)},
String:function(a,b){if(!c(a))return this.generateErrorCode("STR02");var e=void 0!==b["default"],d=b["default"],i=a;if(void 0===b.trim||b.trim)i=i.trim();return!e&&""===i?this.generateErrorCode("STR01"):e&&""===i?this.generateValidValue(d):this.generateValidValue(i)},CSSClass:function(a,b){if(!c(a))return this.generateErrorCode("CSS02");a=a.trim();return void 0!==b["default"]&&""===a.trim()?this.generateValidValue(b["default"]):!/^-?[_a-zA-Z]+[_a-zA-Z0-9-]*$/.test(a)?this.generateErrorCode("CSS01"):
this.generateValidValue(a)},List:function(a,c){var b=function(a){return"[object Array]"===Object.prototype.toString.call(a)};if(!(Array.isArray||b)(a))return this.generateErrorCode("ARR01");for(var b=[],e=0;e<a.length;e++){var d=this.validateModel(a[e],c);if(!d.isValid)return d;b.push(d.value)}return this.generateValidValue(b)},Enum:function(a,b){if(!c(a))return this.generateErrorCode("EV02");var e=b.values||[],d=b.useLowerCase||!1,i=b["default"],a=a.trim();d&&(a=a.toLowerCase());if(void 0!==i&&""===
a)return this.generateValidValue(i);for(d=0;d<e.length;d++)if(e[d].trim()===a)return this.generateValidValue(a);return this.generateErrorCode("EV01")},StaticList:function(a,c){var b={},e;for(e in c)if(c.hasOwnProperty(e)){if(void 0===a[e])return this.generateErrorCode("SL01");var d=this.validateModel(a[e],c[e]);if(!d.isValid)return d;b[e]=d.value}return this.generateValidValue(b)},utils:{FieldRename:function(a,b,e){if(!c(a))throw Error("First argument must be a string");if(!c(b))throw Error("New name must be a string");
if(!d(e))throw Error("Next must be a function");var i=function(a,c){var d=e.call(this,a,c);d.validatedFieldName=b;return d};i.fieldName=a;return i}}},h={},k;for(k in j)h[k]=d(j[k])?g(j[k]):j[k];f.ModelValidationUtils=i;f.ModelValidator=e;f.ModelValidators=h})(window);(function(f){f.DOMOperationsUtils={getOuterDimensions:function(a){a=$(a);return{border:{top:parseInt(a.css("border-top-width"),10),bottom:parseInt(a.css("border-bottom-width"),10),left:parseInt(a.css("border-left-width"),10),right:parseInt(a.css("border-right-width"),10)},margin:{top:parseInt(a.css("margin-top"),10),bottom:parseInt(a.css("margin-bottom"),10),left:parseInt(a.css("margin-left"),10),right:parseInt(a.css("margin-right"),10)},padding:{top:parseInt(a.css("padding-top"),10),bottom:parseInt(a.css("padding-bottom"),
10),left:parseInt(a.css("padding-left"),10),right:parseInt(a.css("padding-right"),10)}}},calculateOuterDistances:function(a){var b=a.border.top+a.border.bottom,b=b+(a.margin.top+a.margin.bottom),b=b+(a.padding.top+a.padding.bottom),d=a.border.left+a.border.right,d=d+(a.margin.left+a.margin.right),d=d+(a.padding.left+a.padding.right);return{vertical:b,horizontal:d}},calculateReducedSize:function(a,b){var d=DOMOperationsUtils.getOuterDimensions(b),d=DOMOperationsUtils.calculateOuterDistances(d);return{width:$(a).width()-
d.horizontal,height:$(a).height()-d.vertical}},setReducedSize:function(a,b){var d=DOMOperationsUtils.calculateReducedSize(a,b);$(b).css({width:d.width+"px",height:d.height+"px"});return d},showErrorMessage:function(a,b,d){$(a).html(b[d])},getResourceFullPath:function(a,b){return!a||!b?void 0:a.getStaticFilesPath()+b}}})(window);(function(f){function a(b){this._actualState=a._internal.STATE.START;this.correctCSS=b.correct||"";this.wrongCSS=b.wrong||"";this.showAnswersCSS=b.showAnswers||"";this.blockCSS=b.block||""}a._internal={STATE:{START:0,BLOCK:1,WORK:2,CORRECT:3,WRONG:4,SHOW_ANSWERS:5},changeStateToStart:function(){this._actualState=a._internal.STATE.START},changeStateToBlock:function(){this._actualState=a._internal.STATE.BLOCK},changeStateToWork:function(){this._actualState=a._internal.STATE.WORK},changeStateToCorrect:function(){this._actualState=
a._internal.STATE.CORRECT},changeStateToWrong:function(){this._actualState=a._internal.STATE.WRONG},changeStateToShowAnswers:function(){this._actualState=a._internal.STATE.SHOW_ANSWERS},checkStartState:function(){this.onBlock();this.setCssOnBlock();a._internal.changeStateToBlock.call(this)},showAnswersStartState:function(){this.notifyEdit();a._internal.showAnswersWorkState.call(this)},resetStartState:function(){},uncheckBlockState:function(){this.onUnblock();this.setCssOnUnblock();a._internal.changeStateToStart.call(this)},
resetBlockState:function(){a._internal.uncheckBlockState.call(this)},showAnswersBlockState:function(){a._internal.uncheckBlockState.call(this);a._internal.showAnswersStartState.call(this)},resetWorkState:function(){this.onReset();a._internal.changeStateToStart.call(this)},checkWorkState:function(){this.isCorrect()?(this.setCssOnCorrect(),this.onCorrect(),a._internal.changeStateToCorrect.call(this)):(this.setCssOnWrong(),this.onWrong(),a._internal.changeStateToWrong.call(this))},showAnswersWorkState:function(){this.onShowAnswers();
this.setCssOnShowAnswers();a._internal.changeStateToShowAnswers.call(this)},resetShowAnswersState:function(){a._internal.hideAnswersShowAnswersState.call(this);a._internal.resetWorkState.call(this)},hideAnswersShowAnswersState:function(){this.setCssOnHideAnswers();this.onHideAnswers();a._internal.changeStateToWork.call(this)},checkShowAnswersState:function(){a._internal.hideAnswersShowAnswersState.call(this);a._internal.checkWorkState.call(this)},uncheckCorrectState:function(){this.setCssOnUnCorrect();
this.onUnCorrect();a._internal.changeStateToWork.call(this)},resetCorrectState:function(){a._internal.uncheckCorrectState.call(this);a._internal.resetWorkState.call(this)},showAnswersCorrectState:function(){a._internal.uncheckCorrectState.call(this);a._internal.showAnswersWorkState.call(this)},resetWrongState:function(){a._internal.uncheckWrongState.call(this);a._internal.resetWorkState.call(this)},uncheckWrongState:function(){this.setCssOnUnWrong();this.onUnWrong();a._internal.changeStateToWork.call(this)},
showAnswersWrongState:function(){a._internal.uncheckWrongState.call(this);a._internal.showAnswersWorkState.call(this)}};a.prototype.reset=function(){switch(this._actualState){case a._internal.STATE.START:a._internal.resetStartState.call(this);break;case a._internal.STATE.BLOCK:a._internal.resetBlockState.call(this);break;case a._internal.STATE.WORK:a._internal.resetWorkState.call(this);break;case a._internal.STATE.WRONG:a._internal.resetWrongState.call(this);break;case a._internal.STATE.CORRECT:a._internal.resetCorrectState.call(this);
break;case a._internal.STATE.SHOW_ANSWERS:a._internal.resetShowAnswersState.call(this)}};a.prototype.check=function(){switch(this._actualState){case a._internal.STATE.START:a._internal.checkStartState.call(this);break;case a._internal.STATE.BLOCK:a._internal.uncheckBlockState.call(this);break;case a._internal.STATE.WORK:a._internal.checkWorkState.call(this);break;case a._internal.STATE.WRONG:a._internal.uncheckWrongState.call(this);break;case a._internal.STATE.CORRECT:a._internal.uncheckCorrectState.call(this);
break;case a._internal.STATE.SHOW_ANSWERS:a._internal.checkShowAnswersState.call(this)}};a.prototype.showAnswers=function(){switch(this._actualState){case a._internal.STATE.START:a._internal.showAnswersStartState.call(this);break;case a._internal.STATE.BLOCK:a._internal.showAnswersBlockState.call(this);break;case a._internal.STATE.WORK:a._internal.showAnswersWorkState.call(this);break;case a._internal.STATE.WRONG:a._internal.showAnswersWrongState.call(this);break;case a._internal.STATE.CORRECT:a._internal.showAnswersCorrectState.call(this)}};
a.prototype.hideAnswers=function(){switch(this._actualState){case a._internal.STATE.SHOW_ANSWERS:a._internal.hideAnswersShowAnswersState.call(this)}};a.prototype.notifyEdit=function(){a._internal.changeStateToWork.call(this)};a.prototype.onReset=function(){throw Error("onReset is  abstract method.");};a.prototype.onBlock=function(){throw Error("onBlock is  abstract method.");};a.prototype.onUnblock=function(){throw Error("onUnblock is  abstract method.");};a.prototype.isCorrect=function(){throw Error("isCorrect is  abstract method.");
};a.prototype.onWrong=function(){throw Error("onWrong is  abstract method.");};a.prototype.onUnWrong=function(){throw Error("onUnWrong is  abstract method.");};a.prototype.onCorrect=function(){throw Error("onCorrect is  abstract method.");};a.prototype.onUnCorrect=function(){throw Error("onUnCorrect is  abstract method.");};a.prototype.onShowAnswers=function(){throw Error("onShowAnswers is  abstract method.");};a.prototype.onHideAnswers=function(){throw Error("onHideAnswers is  abstract method.");
};a.prototype.addCssClass=function(){throw Error("addCssClass is  abstract method.");};a.prototype.removeCssClass=function(){throw Error("removeCssClass is  abstract method.");};a.prototype.setCssOnCorrect=function(){this.addCssClass(this.correctCSS)};a.prototype.setCssOnWrong=function(){this.addCssClass(this.wrongCSS)};a.prototype.setCssOnShowAnswers=function(){this.addCssClass(this.showAnswersCSS)};a.prototype.setCssOnHideAnswers=function(){this.removeCssClass(this.showAnswersCSS)};a.prototype.setCssOnUnCorrect=
function(){this.removeCssClass(this.correctCSS)};a.prototype.setCssOnUnWrong=function(){this.removeCssClass(this.wrongCSS)};a.prototype.setCssOnBlock=function(){this.addCssClass(this.blockCSS)};a.prototype.setCssOnUnblock=function(){this.removeCssClass(this.blockCSS)};f.StatefullAddonObject=f.StatefullAddonObject||a})(window);(function(f){function a(a,c){this.message=a;this.name=c}function b(c,b,d,j){if(void 0===c[b])throw new a(d,j);return!0}function d(a,c,b,d){if(typeof a[c]!==d)throw new TypeError(b);return!0}function c(a,b){StatefullAddonObject.call(this,b);c._internal.validateConfiguration(a);this.addonID=a.addonID;this.objectID=a.objectID;this.source=a.source||"";this.value=a.value||"";this.showAnswersValue=a.showAnswersValue||"";this.type=a.type||"string";this._isClickable=!0;this.droppedElement;this.createView=
a.createView||c.prototype.createView;this.connectEvents=a.connectEvents||c._internal.connectEvents;this.setValue=a.setValue||c.prototype.setValue;this.setViewValue=a.setViewValue||c.prototype.setViewValue;this.helper=a.helper||c.prototype.helper;this.makeGapEmpty=a.makeGapEmpty||c.prototype.makeGapEmpty;this.fillGap=a.fillGap||c.prototype.fillGap;this.cursorAt=a.cursorAt||c.prototype.cursorAt;this.getDroppedElement=c.prototype.getDroppedElement;this.eventBus=a.eventBus;this.getSelectedItem=a.getSelectedItem;
this.$view=this.createView.call(this);this.connectEvents(this)}c.prototype=Object.create(StatefullAddonObject.prototype);c.constructor=c;c._internal={validateConfiguration:function(a){b(a,"eventBus","EventBus attribute object is undefined in configuration object","UndefinedEventBusError");d(a,"eventBus","EventBus attribute should be a event bus object","function");b(a,"getSelectedItem","Get Selected Item function is undefined in configuration object","UndefinedGetSelectedItemError");d(a,"getSelectedItem",
"Get Selected Item should be a function","function");b(a,"addonID","AddonID attribute is undefined in configuration object","UndefinedAddonIDError");d(a,"addonID","AddonID attribute should be a string type in configuration object","string");b(a,"objectID","objectID attribute is undefined in configuration object","UndefinedObjectIDError");d(a,"objectID","objectID attribute should be a string type in configuration object","string");void 0!==a.createView&&d(a,"createView","Create view have to be a function",
"function");void 0!==a.setValue&&d(a,"setValue","Set value have to be a function","function");void 0!==a.setViewValue&&d(a,"setViewValue","Set view value have to be a function","function");void 0!==a.makeGapEmpty&&d(a,"makeGapEmpty","Make gap empty have to be a function","function");void 0!==a.connectEvents&&d(a,"connectEvents","Fill gap have to be a function","function");void 0!==a.fillGap&&d(a,"fillGap","Fill gap have to be a function","function")},isSelectedItemEmpty:function(a){return"Empty"===
a.type},getSelectedItemWrapper:function(){return c._internal.validateSelectedItemData(this.getSelectedItem.call(this))},getClickHandler:function(){return function(a){this.stopPropagationAndPreventDefault(a);this.clickDispatcher(a)}.bind(this)},getDropHandler:function(){return function(a,c){this.stopPropagationAndPreventDefault(a);this.dropHandler(a,c);var b=c.helper[0];$(b).addClass("ic_sourceListItem-selected");this.droppedElement=b}.bind(this)},getStartDraggingHandler:function(){return function(a,
c){this.wrapperStartDraggingHandler(a,c)}.bind(this)},getStopDraggingHandler:function(){return function(a,c){this.wrapperStopDraggingHandler(a,c)}.bind(this)},validateSelectedItemData:function(a){if(null===a.value||null===a.item||void 0===a.type||void 0===a.value||void 0===a.item)a.type="Empty";return a},getDraggableEventsData:function(){return{source:this.addonID,item:this.source,value:this.value,type:"string"}},connectEvents:function(){this.bindClickHandler();this.bindDropHandler()}};c.prototype.setValue=
function(a){this.value=a};c.prototype.setViewValue=function(a){this.$view.html(a)};c.prototype.helper=function(){return function(){return $(this.droppedElement)}.bind(this)};c.prototype.makeGapEmpty=function(){this.notifyEdit();this.setValue.call(this,"");this.setViewValue.call(this,"");this.setSource.call(this,"");this.destroyDraggableProperty()};c.prototype.createView=function(){var a=$("<span></span>");a.attr("id",this.objectID);a.addClass("ui-draggable");a.addClass("ui-widget-content");return a};
c.prototype.fillGap=function(a){this.notifyEdit();this.setValue.call(this,a.value);this.setViewValue.call(this,a.value);this.setSource.call(this,a.item);this.sendItemConsumedEvent();this.bindDraggableHandler()};c.prototype.cursorAt=function(){return{}};c.prototype.getValue=function(){return this.value};c.prototype.getView=function(){return this.$view};c.prototype.getAddonID=function(){return this.addonID};c.prototype.getObjectID=function(){return this.objectID};c.prototype.getSource=function(){return this.source};
c.prototype.getDroppedElement=function(){return $("<div>").append($(this.droppedElement).clone()).html()};c.prototype.setDroppedElement=function(a){this.droppedElement=a};c.prototype.setSource=function(a){this.source=a};c.prototype.addCssClass=function(a){this.$view.addClass(a)};c.prototype.removeCssClass=function(a){this.$view.removeClass(a)};c.prototype.bindClickHandler=function(){this.$view.click(c._internal.getClickHandler.call(this))};c.prototype.bindDropHandler=function(){this.$view.droppable({drop:c._internal.getDropHandler.call(this)})};
c.prototype.bindDraggableHandler=function(){this.$view.draggable({revert:!1,helper:this.helper(),cursorAt:this.cursorAt(),start:c._internal.getStartDraggingHandler.call(this),stop:c._internal.getStopDraggingHandler.call(this)})};c.prototype.clickHandler=function(){var a=c._internal.getSelectedItemWrapper.call(this);if(!c._internal.isSelectedItemEmpty(a)){var b=a.item.substr(0,a.item.lastIndexOf("-")),b=$("#_icplayer").find("#"+b).children().filter(function(){return $(this).text()==a.value}),b=$(b[0]);
b.css("display","inline-block");b.addClass("ic_sourceListItem-selected");this.droppedElement=$("<div>").append(b.clone()).html()}this.sendItemReturnedEvent();c._internal.isSelectedItemEmpty(a)?this.makeGapEmpty.call(this):this.fillGap.call(this,a)};c.prototype.clickDispatcher=function(a){this._isClickable?this.clickHandler.call(this,a):this._isClickable=!0};c.prototype.dropHandler=function(a,b){this.setDroppedElement(b.draggable[0]);this.sendItemReturnedEvent();this.fillGap.call(this,c._internal.getSelectedItemWrapper.call(this))};
c.prototype.startDraggingHandler=function(a,c){this.setViewValue.call(this,"");this.sendItemReturnedEvent();this.sendItemDraggedEvent();c.helper.zIndex(100);this.$view.removeClass("gapFilled")};c.prototype.wrapperStartDraggingHandler=function(a,c){this._isClickable=!1;this.startDraggingHandler(a,c)};c.prototype.wrapperStopDraggingHandler=function(a,c){this._isClickable=!0;this.stopDraggingHandler(a,c)};c.prototype.stopDraggingHandler=function(a,c){c.helper[0].remove();this.sendItemStoppedEvent();
this.makeGapEmpty.call(this)};c.prototype.destroyDraggableProperty=function(){this.$view.draggable("destroy")};c.prototype.stopPropagationAndPreventDefault=function(a){a.stopPropagation();a.preventDefault()};c.prototype.sendItemDraggedEvent=function(){this.sendEvent("itemDragged",c._internal.getDraggableEventsData.call(this))};c.prototype.sendItemStoppedEvent=function(){this.sendEvent("itemStopped",c._internal.getDraggableEventsData.call(this))};c.prototype.sendItemReturnedEvent=function(){this.sendEvent("ItemReturned",
c._internal.getDraggableEventsData.call(this))};c.prototype.sendItemConsumedEvent=function(){this.sendEvent("ItemConsumed",c._internal.getDraggableEventsData.call(this))};c.prototype.sendEvent=function(a,c){this.eventBus.sendEvent(a,c)};c.prototype.lock=function(){this.$view.unbind("click");this.$view.draggable("disable");this.$view.droppable("disable")};c.prototype.unlock=function(){this.bindClickHandler();this.$view.draggable("enable");this.$view.droppable("enable")};c.prototype.onReset=function(){this.setValue.call(this,
"");this.setViewValue.call(this,"");this.setSource.call(this,"");this.destroyDraggableProperty()};c.prototype.onBlock=function(){this.lock()};c.prototype.onUnblock=function(){this.unlock()};c.prototype.isCorrect=function(){return this.value===this.showAnswersValue};c.prototype.onWrong=function(){this.lock()};c.prototype.onUnWrong=function(){this.unlock()};c.prototype.onCorrect=function(){this.lock()};c.prototype.onUnCorrect=function(){this.unlock()};c.prototype.onShowAnswers=function(){this.lock();
this.setViewValue(this.showAnswersValue)};c.prototype.onHideAnswers=function(){this.unlock();this.setViewValue(this.value)};c.prototype.setState=function(a,c,b){this.setValue.call(this,a);this.setViewValue.call(this,a);this.setSource.call(this,c);this.droppedElement=b;this.bindDraggableHandler();this.notifyEdit()};f.DraggableDroppableObject=f.DraggableDroppableObject||c})(window);(function(f){f.Serialization={serialize:function(a){if(a){var b="";$.each(a,function(a,c){var e=typeof c;if("object"===e&&$.isArray(c)){var e="array",g="";$.each(c,function(a){g+=this+"-"+typeof c[a]+","});c=g=g.slice(0,-1)}b+="["+a+":"+e+":"+c+"]"});return b}},deserialize:function(a){if(a){var b={};if(a=a.match(/[\w]+:[\w-]+:[\w,.\- ]+/g)){for(var d=0;d<a.length;d++){var c=a[d].split(":");b[c[0]]=this.convert(c[2],c[1])}return b}}},convert:function(a,b){if(a&&b)switch(b){case "string":return a;case "number":return this.isInteger(a)?
parseInt(a):parseFloat(a);case "boolean":return"true"==a;case "array":return this.convertArray(a);default:return"This type of value is unrecognized."}},convertArray:function(a){for(var a=a.split(","),b=[],d=0;d<a.length;d++){var c=a[d].split("-");b.push(this.convert(c[0].trim(),c[1]))}return b},isInteger:function(a){return 0===a%1&&null!=a}}})(window);(function(f){f.Watermark={defaultOptions:{size:100,opacity:1,color:"#000000"},validateOptions:function(a){if(!a)return $.extend({},this.defaultOptions);var b=$.extend({},a);ModelValidationUtils.validatePositiveInteger(a.size).isValid||(b.size=this.defaultOptions.size);ModelValidationUtils.validateFloatInRange(a.opacity,1,0,2).isValid||(b.opacity=this.defaultOptions.opacity);ModelValidationUtils.validateColor(a.color,this.defaultOptions.color).isValid||(b.color=this.defaultOptions.color);return b},
draw:function(a,b){var d=$(a),c=$(document.createElement("canvas"));d.html(c);b=this.validateOptions(b);c.attr({width:b.size,height:b.size});c.rotateCanvas({x:b.size/2,y:b.size/2,angle:90}).drawArc({strokeWidth:1,strokeStyle:b.color,fillStyle:b.color,x:b.size/2,y:b.size/2,radius:b.size/2-1,opacity:b.opacity}).drawLine({strokeWidth:1,strokeStyle:"#FFF",fillStyle:"#FFF",rounded:!0,x1:b.size/2,y1:0.17*b.size,x2:b.size-0.2*b.size,y2:b.size-0.33*b.size,x3:0.2*b.size,y3:b.size-0.33*b.size,x4:b.size/2,y4:0.17*
b.size,opacity:b.opacity})}}})(window);(function(f){f.Helpers={splitLines:function(a){return a.split(/[\n\r]+/)},alertErrorMessage:function(a,b){var d=b+"\n\n";a.name&&(d+="["+a.name+"] ");d+=a.message?a.message:a;alert(d)},uuidv4:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=16*Math.random()|0;return("x"===a?b:b&3|8).toString(16)})}}})(window);
(function(f){if(!f.fn.style){var a=function(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")};CSSStyleDeclaration.prototype.getPropertyValue||(CSSStyleDeclaration.prototype.getPropertyValue=function(a){return this.getAttribute(a)},CSSStyleDeclaration.prototype.setProperty=function(b,d,c){this.setAttribute(b,d);c="undefined"!=typeof c?c:"";if(""!=c){var e=RegExp(a(b)+"\\s*:\\s*"+a(d)+"(\\s*;)?","gmi");this.cssText=this.cssText.replace(e,b+": "+d+" !"+c+";")}},CSSStyleDeclaration.prototype.removeProperty=
function(a){return this.removeAttribute(a)},CSSStyleDeclaration.prototype.getPropertyPriority=function(b){return RegExp(a(b)+"\\s*:\\s*[^\\s]*\\s*!important(\\s*;)?","gmi").test(this.cssText)?"important":""});f.fn.style=function(a,d,c){if(typeof this.get(0)=="undefined")return this;var e=this.get(0).style;if(typeof a!="undefined"){if(typeof d!="undefined"){e.setProperty(a,d,typeof c!="undefined"?c:"");return this}return e.getPropertyValue(a)}return e}}})(jQuery);(function(f){var a={};f.MobileUtils={isMobileUserAgent:function(a){return void 0===a||!a?!1:a.match(/Android/i)||a.match(/BlackBerry/i)||a.match(/iPhone|iPad|iPod/i)||a.match(/IEMobile/i)||a.match(/Opera Mini/i)?!0:!1},isAndroidWebBrowser:function(a){return void 0===a||!a?!1:a.indexOf("Mozilla/5.0">-1&&-1<a.indexOf("Android ")&&-1<a.indexOf("AppleWebKit"))&&!(-1<a.indexOf("Chrome"))},getAndroidVersion:function(a){if(void 0===a||!a)return"";var a=a.toString(),d=a.indexOf("Android")+7;if(-1===d)return"";
var c=a.indexOf(";",d);return a.substring(d,c).trim()},isSafariMobile:function(a){return void 0===a||!a?!1:a.match(/iPhone|iPad|iPod/i)?!0:!1},isWindowsMobile:function(a){return void 0===a||!a?!1:a.msPointerEnabled?!0:!1},getAndroidVersion:function(a){a=a||navigator.userAgent;return(a=a.match(/Android\s([0-9\.]*)/))?a[1]:!1},isEventSupported:function(b){var d={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img",unload:"win",resize:"win",touchstart:"button"},
c=b.replace(/^on/,"");if(a[c])return a[c];var d="win"==d[c]?f:document.createElement(d[c]||"div"),b="on"+c,e=b in d;e||(d.setAttribute(b,"return;"),e="function"==typeof d[b]);return a[c]=e}}})(window);(function(f){function a(a,d){this.isSelectEnabled=!0;this.keyboardNavigationActive=!1;this.keyboardNavigationElements=a;this.columnsCount=d;this.keyboardNavigationElementsLen=a.length;var g={};g[b.TAB]=this.nextElement;g[b.ENTER]=this.enter;g[b.ESCAPE]=this.escape;g[b.SPACE]=this.select;g[b.ARROW_LEFT]=this.previousElement;g[b.ARROW_UP]=this.previousRow;g[b.ARROW_RIGHT]=this.nextElement;g[b.ARROW_DOWN]=this.nextRow;var i={};i[b.TAB]=this.previousElement;i[b.ENTER]=this.exitWCAGMode;this.mapping=g;
this.shiftKeysMapping=i}var b={TAB:9,ENTER:13,ESCAPE:27,SPACE:32,ARROW_LEFT:37,ARROW_UP:38,ARROW_RIGHT:39,ARROW_DOWN:40},d=null;a.prototype.handle=function(a,b,d){b?this.shiftKeysMapping[a]&&this.shiftKeysMapping[a].call(this,d):this.mapping[a]&&this.mapping[a].call(this,d)};a.prototype.setElements=function(a){for(var b=0;b<this.keyboardNavigationElementsLen;b++)this.unmark(this.keyboardNavigationElements[b]);this.keyboardNavigationElements=a;this.keyboardNavigationElementsLen=a.length;this.keyboardNavigationCurrentElementIndex=
0;this.keyboardNavigationActive&&(this.keyboardNavigationCurrentElement=this.keyboardNavigationElements[0],this.mark(this.keyboardNavigationCurrentElement))};a.prototype.getTarget=function(a){return a};a.prototype.mark=function(a){this.getTarget(a,!1).addClass("keyboard_navigation_active_element")};a.prototype.unmark=function(a){this.getTarget(a,!1).removeClass("keyboard_navigation_active_element")};a.prototype.markCurrentElement=function(a){this.keyboardNavigationCurrentElement&&this.unmark(this.keyboardNavigationCurrentElement);
this.keyboardNavigationCurrentElementIndex=a;this.keyboardNavigationCurrentElement=this.keyboardNavigationElements[a];this.mark(this.keyboardNavigationCurrentElement)};a.prototype.switchElement=function(a){a=this.keyboardNavigationCurrentElementIndex+a;a>=this.keyboardNavigationElementsLen?a-=this.keyboardNavigationElementsLen:0>a&&(a=this.keyboardNavigationElementsLen+a);this.markCurrentElement(a)};a.prototype.nextElement=function(a){a&&a.preventDefault();this.switchElement(1)};a.prototype.previousElement=
function(a){a&&a.preventDefault();this.switchElement(-1)};a.prototype.nextRow=function(a){a&&a.preventDefault();this.switchElement(this.columnsCount)};a.prototype.previousRow=function(a){a&&a.preventDefault();this.switchElement(-this.columnsCount)};a.prototype.enter=function(a){a&&a.preventDefault();this.keyboardNavigationActive||(this.keyboardNavigationActive=!0,this.markCurrentElement(0))};a.prototype.escape=function(a){a&&a.preventDefault();this.keyboardNavigationActive&&this.exitWCAGMode()};a.prototype.select=
function(a){a&&a.preventDefault();this.isSelectEnabled&&this.selectAction()};a.prototype.selectAction=function(){this.getTarget(this.keyboardNavigationCurrentElement,!0).click()};a.prototype.reload=function(a,b){this.isSelectEnabled=!0;this.keyboardNavigationElements=a;this.columnsCount=b;this.keyboardNavigationElementsLen=a.length;this.keyboardNavigationActive&&this.enter()};a.prototype.selectEnabled=function(a){this.isSelectEnabled=a};a.prototype.exitWCAGMode=function(){this.keyboardNavigationActive&&
(this.keyboardNavigationActive=!1,this.unmark(this.keyboardNavigationCurrentElement),this.keyboardNavigationCurrentElement=null)};a.prototype.getTextToSpeechOrNull=function(a){d=null;a&&(d=a.getModule("Text_To_Speech1"));return d};f.KeyboardController=a;f.KeyboardControllerKeys=b})(window);(function(f){f.DevicesUtils={isInternetExplorer:function(){return 0<f.navigator.userAgent.indexOf("MSIE ")||navigator.userAgent.match(/Trident.*rv\:11\./)?!0:!1},isFirefox:function(){return"netscape"in f&&/ rv:/.test(navigator.userAgent)},isEdge:function(){return-1!==navigator.userAgent.indexOf("Edge")&&(!!navigator.msSaveOrOpenBlob||!!navigator.msSaveBlob)},getBrowserVersion:function(){var a=navigator.userAgent,b,d=a.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];if(/trident/i.test(d[1]))return b=
/\brv[ :]+(\d+)/g.exec(a)||[],"IE "+(b[1]||"");if("Chrome"===d[1]&&(b=a.match(/\b(OPR|Edge)\/(\d+)/),null!=b))return b.slice(1).join(" ").replace("OPR","Opera");d=d[2]?[d[1],d[2]]:[navigator.appName,navigator.appVersion,"-?"];null!=(b=a.match(/version\/(\d+)/i))&&d.splice(1,1,b[1]);return d.join(" ")}}})(window);(function(f){f.Commands={dispatch:function(a,b,d,c){var e,g;for(g in a)Object.prototype.hasOwnProperty.call(a,g)&&g.toLowerCase()===b&&a[g]&&(e=a[g].call(c,d));return e}};f.CommandsQueueFactory={create:function(a){console.log("CommandsQueueFactory is deprecated and won't be maintained from now. Please use: DeferredSyncQueue");return new f.CommandsQueue(a)}};f.CommandsQueueTask=function(a,b){this.name=a;this.params=b};f.CommandsQueue=function(a){this.module=a;this.queue=[]};f.CommandsQueue.prototype.addTask=
function(a,b){var d=new f.CommandsQueueTask(a,b);this.queue.push(d)};f.CommandsQueue.prototype.getTask=function(){return this.isQueueEmpty()?null:this.queue.splice(0,1)[0]};f.CommandsQueue.prototype.getAllTasks=function(){return this.queue};f.CommandsQueue.prototype.executeTask=function(){var a=this.getTask();a&&this.module.executeCommand(a.name.toLowerCase(),a.params)};f.CommandsQueue.prototype.executeAllTasks=function(){for(;!this.isQueueEmpty();)this.executeTask()};f.CommandsQueue.prototype.getTasksCount=
function(){return this.queue.length};f.CommandsQueue.prototype.isQueueEmpty=function(){return 0===this.queue.length}})(window);(function(f){f.ImageViewer={validateSound:function(a){var b=[];if(a&&$.isArray(a))for(var d=0;d<a.length;d++){var c=ModelValidationUtils.isStringWithPrefixEmpty(a[d]["MP3 sound"],"/file/"),e=ModelValidationUtils.isStringWithPrefixEmpty(a[d]["AAC sound"],"/file/"),g=ModelValidationUtils.isStringWithPrefixEmpty(a[d]["OGG sound"],"/file/");b.push({AAC:e?"":a[d]["AAC sound"],OGG:g?"":a[d]["OGG sound"],MP3:c?"":a[d]["MP3 sound"],isEmpty:c&&e&&g})}return{sounds:b}},loadSounds:function(a,b){var d=[];if(!buzz.isSupported()||
!a||!b)return d;for(var c=0;c<b;c++)c>a.length-1||a[c].isEmpty?d[c]=null:(d[c]=""!==a[c].MP3&&buzz.isMP3Supported()?new buzz.sound(a[c].MP3):""!==a[c].OGG&&buzz.isOGGSupported()?new buzz.sound(a[c].OGG):new buzz.sound(a[c].AAC),d[c].load());return d},convertFramesList:function(a,b,d){if(ModelValidationUtils.isStringEmpty(a))return{isError:!0,errorCode:"FL01"};var c=a.match(/[0-9a-zA-Z,-]+/);if(null===c||a.length!==c[0].length)return{isError:!0,errorCode:"FL02"};for(var c=[],a=a.split(","),e=0;e<a.length;e++){if(ModelValidationUtils.isStringEmpty(a[e]))return{isError:!0,
errorCode:"FL04"};if(-1!==a[e].search("-")){var g=a[e].split("-")[1],i=ModelValidationUtils.validateIntegerInRange(g,d,b);if(!i.isValid)return{isError:!0,errorCode:"FL05"};var j=a[e].split("-")[0],g=ModelValidationUtils.validateIntegerInRange(j,g.value,b);if(!g.isValid||g.value>i.value)return{isError:!0,errorCode:"FL05"};for(g=g.value;g<=i.value;g++)c.push(g)}else{i=ModelValidationUtils.validateIntegerInRange(a[e],d,b);if(!i.isValid)return{isError:!0,errorCode:"FL03"};c.push(i.value)}}c.sort();c=
ModelValidationUtils.removeDuplicatesFromArray(c);return{isError:!1,list:c}}}})(window);(function(f){f.StringUtils={replaceAll:function(a,b,d){b=b.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1");return a.replace(RegExp(b,"g"),d)},startsWith:function(a,b){return a.match("^"+b)==b},endsWith:function(a,b){return-1!==a.indexOf(b,a.length-b.length)},format:function(){if(0!=arguments.length){var a=arguments[0].toString();if(1==arguments.length)return a;for(var b=0,d=1;d<arguments.length;d++)a=a.replace(RegExp("\\{"+b+"\\}","gi"),arguments[d]),b++;return a}}}})(window);(function(f){f.TextParserProxy=function(a){if(null==a)return null;this.parser=a};f.TextParserProxy.prototype.parse=function(a){a=this.parser.parse(a);return StringUtils.replaceAll(a,"href='#'",'href="javascript:void(0)"')};f.TextParserProxy.prototype.parseAltTexts=function(a){return this.parser.parseAltTexts(a)};f.TextParserProxy.prototype.connectLinks=function(a){return this.parser.connectLinks(a)};f.TextParserProxy.prototype.parseGaps=function(a,b){"undefined"==typeof b&&(b={isCaseSensitive:!1});
return this.parser.parseGaps(a,b)}})(window);(function(f){f.TTSUtils={statics:{breakText:"&&break&&",gap:"&&gap&&",dropdown:"&&dropdown&&",correct:"&&correct&&",wrong:"&&wrong&&",empty:"&&empty&&"},getTextVoiceArrayFromElement:function(a,b){for(var d=a.clone(),d=this._prepareAltTexts(d),d=this._prepareImages(d),d=d.text().split(this.statics.breakText),c=[],e=0;e<d.length;e++)c.push(this.getTextVoiceObject(d[e].trim(),b));return c},getTextVoiceArrayFromElementWithGaps:function(a,b,d){var c=$("<div></div>").append(a.clone()),e={gap:"gap",dropdown:"dropdown",
correct:"correct",empty:"empty",wrong:"wrong"};if(d&&(d.gap&&(e.gap=d.gap),d.dropdown&&(e.dropdown=d.dropdown),d.correct&&(e.correct=d.correct),d.wrong&&(e.wrong=d.wrong),d.empty))e.empty=d.empty;a.find("select[id]").each(function(){var a=$(this).attr("id");c.find("#"+a).val($(this).val())});c=this._prepareAltTexts(c);c=this._prepareImages(c);c=this._prepareGaps(c);return this._parseRawText(c.text(),e,b)},getTextVoiceArrayFromGap:function(a,b,d,c){var e=$("<div></div>").append(a.clone()),g={gap:"gap",
dropdown:"dropdown",correct:"correct",empty:"empty",wrong:"wrong"};if(c&&(c.gap&&(g.gap=c.gap),c.dropdown&&(g.dropdown=c.dropdown),c.correct&&(g.correct=c.correct),c.wrong&&(g.wrong=c.wrong),c.empty))g.empty=c.empty;var e=this._prepareAltTexts(e),e=this._prepareImages(e),i=0;b.find("span.ic_gap, input.ic_gap, select.ic_inlineChoice").each(function(c){$(this).is(a)&&(i=c)});a.is("select")&&e.find("select").val(a.val());e=this._prepareGaps(e,i);return this._parseRawText(e.text(),g,d)},getTextVoiceObject:function(a,
b){return{text:a,lang:b}},parsePreviewAltText:function(a){a=a.replace(/\\alt{([^{}|]*?)\|[^{}|]*?}(\[[a-zA-Z0-9_\- ]*?\])*/g,"$1");return a=a.replace(/\\alt{([^|{}]*?)\|[^|{}]*?}/g,"$1")},_prepareAltTexts:function(a){a.find('[aria-hidden="true"]').remove();a.find("[aria-label]").each(function(){var a=$(this).attr("aria-label"),d=$(this).attr("lang");d&&0<d.trim().length&&(a="\\alt{ |"+a+"}[lang "+d+"]");$(this).append(a)});return a},_prepareImages:function(a){var b=this.statics.breakText;a.find("img[alt]").each(function(){var a=
$(this).attr("alt");$("<span>"+b+"</span>").insertBefore($(this));$("<span>"+b+"</span>").insertAfter($(this));$("<span>"+a+"</span>").insertAfter($(this))});return a},_prepareGaps:function(a,b){var d=this.statics.breakText,c=this.statics.gap,e=this.statics.dropdown,g=this.statics.correct,i=this.statics.wrong,j=this.statics.empty;a.find("span.ic_gap, input.ic_gap, select.ic_inlineChoice").each(function(a){b?$(this).attr("index",b+1):$(this).attr("index",a+1)});a.find("span.ic_gap, input.ic_gap, select.ic_inlineChoice").each(function(){var a=
$(this),b=a.attr("index"),f="",f=a.is("select")?d+e+" "+b+d:d+c+" "+b+d,b="",b=a.is("select, input")?a.val():a.text(),b=0==b.length||a.is("select")&&("-"==b||"---"==b)?a.hasClass("ic_gap-empty")?"":j+d:b+d,l="";a.hasClass("ic_gap-correct")?l=g+d:a.hasClass("ic_gap-wrong")?l=i+d:a.hasClass("ic_gap-empty")&&(l=j+d);f=$("<span>"+f+b+l+"</span>");a.replaceWith(f)});return a},_parseRawText:function(a,b,d){for(var c=a.split(this.statics.breakText),e=[],g=0;g<c.length;g++)0!=c[g].trim().length&&(-1!==c[g].trim().indexOf(this.statics.gap)?
(a=c[g].trim().replace(this.statics.gap,b.gap),e.push(this.getTextVoiceObject(a))):-1!==c[g].trim().indexOf(this.statics.dropdown)?(a=c[g].trim().replace(this.statics.dropdown,b.dropdown),e.push(this.getTextVoiceObject(a))):-1!==c[g].trim().indexOf(this.statics.correct)?(a=c[g].trim().replace(this.statics.correct,b.correct),e.push(this.getTextVoiceObject(a))):-1!==c[g].trim().indexOf(this.statics.wrong)?(a=c[g].trim().replace(this.statics.wrong,b.wrong),e.push(this.getTextVoiceObject(a))):-1!==c[g].trim().indexOf(this.statics.empty)?
(a=c[g].trim().replace(this.statics.empty,b.empty),e.push(this.getTextVoiceObject(a))):e.push(this.getTextVoiceObject(c[g].trim(),d)));return e},focusInvisibleElement:function(){$("#input_element_for_focus_to_change_focused_element_by_browser").focus()}}})(window);(function(f){f.Internationalization={EASTERN_ARABIC:"ea",WESTERN_ARABIC:"wa",PERSO_ARABIC:"pa",getNumericals:function(a){var b={};b[f.Internationalization.WESTERN_ARABIC]={"0":"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9"};b[f.Internationalization.EASTERN_ARABIC]={"0":"&#x0660",1:"&#x0661",2:"&#x0662",3:"&#x0663",4:"&#x0664",5:"&#x0665",6:"&#x0666",7:"&#x0667",8:"&#x0668",9:"&#x0669"};b[f.Internationalization.PERSO_ARABIC]={"0":"&#x06F0",1:"&#x06F1",2:"&#x06F2",3:"&#x06F3",4:"&#x06F4",
5:"&#x06F5",6:"&#x06F6",7:"&#x06F7",8:"&#x06F8",9:"&#x06F9"};return a in b?b[a]:b[f.Internationalization.WESTERN_ARABIC]},translate:function(a,b){for(var d=a.toString(),c="",e=f.Internationalization.getNumericals(b),g=0;g<d.length;g++)c+=e[+d.charAt(g)];return c}}})(window);(function(f){f.LoadedPromise=function(a,b){var d=[];$.each(b,function(b){var e=new $.Deferred,g=e.promise();a[b+"LoadedDeferred"]=e;a[b+"Loaded"]=g;d.push(g);a.getLoadedPromise=function(){var a=new $.Deferred,b=function(c,d){d==c.length?a.resolve():$.when(c[d]).then(function(){b(c,d+1)})};b(d,0);return a.promise()}})}})(window);(function(f){var a=function(){};a._internals={};a._internals.clicks=[];a._internals.callbacks=[];a._internals.getUserAgent=function(){return navigator.userAgent};a._internals.getCurrentTime=function(){return(new Date).getTime()};a._internals.getTargetCallbacks=function(b){return a._internals.callbacks.filter(function(a){return a.target==b}).map(function(a){return a.callback})};a._internals.removeTargetCallbacks=function(b){a._internals.callbacks=a._internals.callbacks.filter(function(a){return a.target!=
b})};a._internals.addCallback=function(b,d){a._internals.callbacks.push({target:b,callback:d})};a._internals.getLastTargetClick=function(b){for(var d=a._internals.clicks,c=d.length-1;0<=c;c-=1)if(d[c].target==b)return d[c];return null};a._internals.removeTargetClicks=function(b){a._internals.clicks=a._internals.clicks.filter(function(a){return a.target!=b})};a._internals.addClick=function(b,d){a._internals.removeTargetClicks(b);a._internals.clicks.push({target:b,time:d})};a._internals.doubleTapHandler=
function(b){var d=this,c=a._internals.getCurrentTime(),e=a._internals.getLastTargetClick(b.target);null!==e&&e.time+300>=c?(a._internals.removeTargetClicks(b.target),a._internals.getTargetCallbacks(d).forEach(function(a){a.call(d,b)})):a._internals.addClick(b.target,c)};a._internals.getStartEvent=function(b){var d=b||a._internals.getUserAgent(),b=/chrome/i.exec(d),d=/android/i.exec(d);return"ontouchstart"in f&&(!b||d)?"touchstart":"mousedown"};a.on=function(b,d){var c=b[0],e=a._internals.getStartEvent();
a._internals.addCallback(c,d);b.on(e,a._internals.doubleTapHandler)};a.off=function(b){var d=b[0],c=a._internals.getStartEvent();b.off(c,a._internals.doubleTapHandler);a._internals.removeTargetCallbacks(d);a._internals.removeTargetClicks(d)};f.EventsUtils={};f.EventsUtils.DoubleTap=a})(window);(function(f){function a(){}a.getErrorObject=function(a){return{isValid:!1,isError:!0,errorCode:a}};a.showErrorMessage=function(a,d,c){if("undefined"!=typeof c)for(var e in c)c.hasOwnProperty(e)&&(d=d.replace("%"+e+"%",c[e]));c="<p>"+d+"</p>";a.innerHTML=c};f.ModelErrorUtils=f.ModelErrorUtils||a})(window);(function(f){function a(a){this.buildConfiguration(a);var b,d,e,g,f,r,m,p,o,q,s,u,t,v,w,a=document.createElement("div");a.className="CustomControlsBar-wrapper";b=document.createElement("div");b.className="CustomControlsBar-wrapper-controls-controlsWrapper";a.appendChild(b);d=document.createElement("div");d.className="CustomControlsBar-wrapper-controls-progressBarWrapper";a.appendChild(d);e=document.createElement("div");e.className="CustomControlsBar-wrapper-controls-progressBarWrapper-grayProgressBar";
d.appendChild(e);g=document.createElement("div");g.className="CustomControlsBar-wrapper-controls-progressBarWrapper-redProgressBar";d.appendChild(g);f=document.createElement("div");f.className="CustomControlsBar-wrapper-controls-play";b.appendChild(f);r=document.createElement("div");r.className="CustomControlsBar-wrapper-controls-pause";r.style.display="none";b.appendChild(r);m=document.createElement("div");m.className="CustomControlsBar-wrapper-controls-stop";b.appendChild(m);p=document.createElement("div");
p.className="CustomControlsBar-wrapper-controls-volume";b.appendChild(p);o=document.createElement("div");o.className="CustomControlsBar-wrapper-controls-volumeBarWrapper";b.appendChild(o);q=document.createElement("div");q.className="CustomControlsBar-wrapper-controls-volumeBarWrapper-volumeBackground";q.style.display="none";o.appendChild(q);s=document.createElement("div");s.className="CustomControlsBar-wrapper-controls-volumeBarWrapper-volumeBackgroundSelected";s.style.display="none";o.appendChild(s);
u=document.createElement("div");u.className="CustomControlsBar-wrapper-controls-fullscreen";b.appendChild(u);t=document.createElement("div");t.className="CustomControlsBar-wrapper-controls-closeFullscreen";t.style.display="none";b.appendChild(t);w=document.createElement("div");w.className="CustomControlsBar-wrapper-controls-burgersContainer";b.appendChild(w);v=document.createElement("div");v.className="CustomControlsBar-wrapper-controls-timer";b.appendChild(v);this.elements={mainDiv:c(a),playButton:c(f),
pauseButton:c(r),stopButton:c(m),progressBarWrapper:c(d),volume:c(p),volumeBarWrapper:c(o),timer:c(v),controlsWrapper:c(b),volumeBackground:c(q),fullscreen:c(u),redProgressBar:c(g),grayProgressBar:c(e),closeFullscreen:c(t),volumeBackgroundSelected:c(s),burgersContainer:c(w)};this.progressBarChangedCallbacks=[];this.volumeChangedCallbacks=[];this.ownTimerCallbacks=[];this.addPlayCallback(this.showPauseButton.bind(this));this.addPauseCallback(this.showPlayButton.bind(this));this.addStopCallback(this.showPlayButton.bind(this));
this.addVolumeClickCallback(this.showHideVolumeBar.bind(this));this.addFullscreenCallback(this.showCloseFullscreenButton.bind(this));this.addCloseFullscreenCallback(this.showFullscreenButton.bind(this));this.addProgressBarClickCallback(this.progressBarClicked.bind(this));this.addVolumeBarClickCallback(this.volumeBarClicked.bind(this));this.hideControls=this.hideControls.bind(this);this.showControls=this.showControls.bind(this);this.onWrapperMouseEnter=this.onWrapperMouseEnter.bind(this);this.onWrapperMouseMove=
this.onWrapperMouseMove.bind(this);this.refreshDataIntervalFunction=this.refreshDataIntervalFunction.bind(this);this.actualizeTimer();this.configuration.parentElement&&(this.buildShowAndHideControlsEvents(),this.addCallbackForParentChildren(this.playPauseClick.bind(this)));this.refreshDataIntervalFunction=setInterval(this.refreshDataIntervalFunction,this.configuration.mouseDontMoveRefreshTime)}function b(a){var b;if(null===a||void 0===a)return"--:--";b=parseInt(a/60,10);10>b&&(b="0"+b);a=parseInt(a%
60,10);10>a&&(a="0"+a);return b+":"+a}function d(a){var b=0,c=0;do b+=a.offsetTop||0,c+=a.offsetLeft||0,a=a.offsetParent;while(a);return{top:b,left:c}}function c(a){return{element:a,events:{}}}function e(a,b,c){a.events[c]||(a.events[c]=[]);a.events[c].push({callback:b});a.element.addEventListener(c,b,!1)}function g(a){for(var b in a.events)if(a.events.hasOwnProperty(b))for(var c=0;c<a.events[b].length;c++)a.element.removeEventListener(b,a.events[b][c].callback)}f.CustomControlsBar=a;a.prototype.addProgressChangedCallback=
function(a){this.progressBarChangedCallbacks.push(a)};a.prototype.addVolumeChangedCallback=function(a){this.volumeChangedCallbacks.push(a)};a.prototype.progressBarClicked=function(a){for(var b=100*(a.clientX-d(this.elements.grayProgressBar.element).left)/this.elements.grayProgressBar.element.offsetWidth,c=0;c<this.progressBarChangedCallbacks.length;c++)this.progressBarChangedCallbacks[c](b);a.preventDefault();a.stopPropagation()};a.prototype.volumeBarClicked=function(a){for(var b=100*(a.clientX-d(this.elements.volumeBarWrapper.element).left)/
this.elements.volumeBackground.element.offsetWidth,c=0;c<this.volumeChangedCallbacks.length;c++)this.volumeChangedCallbacks[c](b);this.elements.volumeBackgroundSelected.element.style.width=parseInt(b/100*this.elements.volumeBackground.element.offsetWidth,10)+"px";a.preventDefault();a.stopPropagation()};a.prototype.playPauseClick=function(){"block"===this.elements.playButton.element.style.display?this.elements.playButton.element.click():this.elements.pauseButton.element.click()};a.prototype.buildConfiguration=
function(a){this.configuration={mouseDontMoveClocks:30,mouseDontMoveRefreshTime:100,maxMediaTime:0,actualMediaTime:0,videoObject:null,parentElement:null};if(a)for(var b in this.configuration)this.configuration.hasOwnProperty(b)&&void 0!==a[b]&&(this.configuration[b]=a[b])};a.prototype.actualizeTimer=function(){var a;this.elements.timer.element.innerHTML=b(this.configuration.actualMediaTime)+"/"+b(this.configuration.maxMediaTime);this.configuration.maxMediaTime&&(a=parseInt(100*(this.configuration.actualMediaTime/
this.configuration.maxMediaTime),10),this.elements.redProgressBar.element.style.width=a+"%")};a.prototype.buildShowAndHideControlsEvents=function(){this.actualTime=0;this.configuration.parentElement.addEventListener("mouseleave",this.hideControls,!1);this.configuration.parentElement.addEventListener("mouseenter",this.onWrapperMouseEnter,!1);this.configuration.parentElement.addEventListener("mousemove",this.onWrapperMouseMove,!1)};a.prototype.refreshDataIntervalFunction=function(){this.configuration.parentElement&&
!this.mainDivIsHidden&&(this.actualTime>this.configuration.mouseDontMoveClocks&&this.hideControls(),this.actualTime++);var a=this.configuration.videoObject;null!==a&&(this.setCurrentTime(a.currentTime),3<=a.readyState&&(!1===a.paused?this.showPauseButton():this.showPlayButton()));for(a=0;a<this.ownTimerCallbacks.length;a++)this.ownTimerCallbacks[a].call(this)};a.prototype.checkBurgerMenuSize=function(a){var b=a.element.offsetHeight,c=a.element.offsetWidth,d=a.element.getBoundingClientRect().left-
this.configuration.parentElement.getBoundingClientRect().left,e=this.configuration.parentElement.offsetWidth,g=a.element.style.marginLeft;""===g&&(g="0");g=parseInt(g.replace("px",""),10);a.element.style.marginTop="-"+(b-2)+"px";a.element.style.marginLeft=c+d-g>e?"-"+(c+d-e-g)+"px":"0px"};a.prototype.addCallbackToBuildInTimer=function(a){this.ownTimerCallbacks.push(a)};a.prototype.onWrapperMouseMove=function(){this.actualTime=0;this.showControls()};a.prototype.hideControls=function(){this.elements.mainDiv.element.style.display=
"none";this.mainDivIsHidden=!0};a.prototype.onWrapperMouseEnter=function(){this.showControls();this.actualTime=0};a.prototype.showControls=function(){this.mainDivIsHidden&&(this.elements.mainDiv.element.style.display="block",this.mainDivIsHidden=!1)};a.prototype.addBurgerMenu=function(a,b){function d(a){a.element.style.display="none"}var g=document.createElement("div");g.classList.add("CustomControlsBar-wrapper-controls-burgersContainer-"+a);this.elements.burgersContainer.element.appendChild(g);this.elements[a]=
c(g);var f=document.createElement("div");f.classList.add("CustomControlsBar-wrapper-controls-burgersContainer-container-"+a);var l=c(f);this.elements["BURGER_MENU_"+a+"_container"]=l;g.appendChild(f);b.forEach(function(b,g){var j=document.createElement("div");j.classList.add("CustomControlsBar-wrapper-controls-burgersContainer-"+a+"-element");j.classList.add("number-"+g);j.innerText=b.title;var k=c(j);this.elements["BURGER_MENU_"+a+"_"+g]=k;e.call(this,k,this.wrapBurgerElementClick(d.bind(this,l),
b.callback),"click");f.appendChild(j)},this);e(this.elements[a],function(a){a.element.style.display="block";this.checkBurgerMenuSize(a)}.bind(this,l),"mouseenter");e(this.elements[a],d.bind(this,l),"mouseleave")};a.prototype.wrapBurgerElementClick=function(a,b){return function(){a.apply(this,arguments);b.apply(this,arguments)}};a.prototype.removeBurgerMenu=function(a){this.elements[a]&&(g.call(this,this.elements[a]),this.elements[a].element.parentNode.removeChild(this.elements[a].element),delete this.elements[a]);
for(var b in this.elements)this.elements.hasOwnProperty(b)&&b.startsWith("BURGER_MENU_"+a+"_")&&(g.call(this,this.elements[b]),this.elements[b].element.parentNode.removeChild(this.elements[b].element),delete this.elements[b])};a.prototype.showPauseButton=function(a){this.elements.playButton.element.style.display="none";this.elements.pauseButton.element.style.display="block";void 0!==a&&(a.preventDefault(),a.stopPropagation())};a.prototype.showCloseFullscreenButton=function(a){this.elements.fullscreen.element.style.display=
"none";this.elements.closeFullscreen.element.style.display="block";void 0!==a&&null!==a&&(a.preventDefault(),a.stopPropagation())};a.prototype.showFullscreenButton=function(a){this.elements.closeFullscreen.element.style.display="none";this.elements.fullscreen.element.style.display="block";void 0!==a&&null!==a&&(a.preventDefault(),a.stopPropagation())};a.prototype.showHideVolumeBar=function(a){"none"===this.elements.volumeBackground.element.style.display?(this.elements.volumeBackground.element.style.display=
"block",this.elements.volumeBackgroundSelected.element.style.display="block"):(this.elements.volumeBackground.element.style.display="none",this.elements.volumeBackgroundSelected.element.style.display="none");a.preventDefault();a.stopPropagation()};a.prototype.showPlayButton=function(a){this.elements.playButton.element.style.display="block";this.elements.pauseButton.element.style.display="none";void 0!==a&&(a.preventDefault(),a.stopPropagation())};a.prototype.addVolumeBarClickCallback=function(a){e.call(this,
this.elements.volumeBarWrapper,a,"click")};a.prototype.addPlayCallback=function(a){e.call(this,this.elements.playButton,a,"click")};a.prototype.addProgressBarClickCallback=function(a){e.call(this,this.elements.progressBarWrapper,a,"click")};a.prototype.addCallbackForParentChildren=function(a){for(var b=this.configuration.parentElement.childNodes,d=0;d<b.length;d++)b[d]!==this.elements.mainDiv.element&&(this.elements["PARENT_CHILD_"+d]=c(b[d]),e.call(this,this.elements["PARENT_CHILD_"+d],a,"click"))};
a.prototype.addPauseCallback=function(a){e.call(this,this.elements.pauseButton,a,"click")};a.prototype.addStopCallback=function(a){e.call(this,this.elements.stopButton,a,"click")};a.prototype.addFullscreenCallback=function(a){e.call(this,this.elements.fullscreen,a,"click")};a.prototype.addCloseFullscreenCallback=function(a){e.call(this,this.elements.closeFullscreen,a,"click")};a.prototype.addVolumeClickCallback=function(a){e.call(this,this.elements.volume,a,"click")};a.prototype.getMainElement=function(){return this.elements.mainDiv.element};
a.prototype.destroy=function(){clearInterval(this.refreshDataIntervalFunction);this.configuration.parentElement.removeEventListener("mouseleave",this.hideControls);this.configuration.parentElement.removeEventListener("mouseenter",this.onWrapperMouseEnter);this.configuration.parentElement.removeEventListener("mousemove",this.onWrapperMouseMove);for(var a in this.elements)this.elements.hasOwnProperty(a)&&(g.call(this,this.elements[a]),a.startsWith("PARENT_CHILD_")||(this.elements[a].element.parentNode.removeChild(this.elements[a].element),
this.elements[a]=null))};a.prototype.setMaxDurationTime=function(a){this.configuration.maxMediaTime=a;this.actualizeTimer()};a.prototype.setCurrentTime=function(a){this.configuration.actualMediaTime=a;this.actualizeTimer()}})(window);(function(f){function a(a){var c=new b;c.setIsAvailableCheckFunction(a);return c}function b(){this.queue=[];this.checkFunction={functionToCall:null}}b.prototype.push=function(a,b,e){this.queue.push({functionToCall:b,argumentsToCall:e,self:a})};b.prototype.callIsAvailableCheckFunction=function(){return this.checkFunction.functionToCall.call(this)};b.prototype.decorate=function(a,b){var e=this,g=b||this.callIsAvailableCheckFunction;return function(){if(g.call(e))return a.apply(this,arguments);e.push(this,
a,arguments)}};b.prototype.setIsAvailableCheckFunction=function(a){this.checkFunction.functionToCall=a};b.prototype.resolve=function(){for(var a=this.queue.length,b=0;b<a;b++){var e=this.queue[b];e.functionToCall.apply(e.self,e.argumentsToCall)}this.queue=[]};f.DecoratorUtils=f.DecoratorUtils||{};f.DecoratorUtils.DeferredSyncQueue=f.DecoratorUtils.DeferredSyncQueue||a})(window);(function(f){function a(){}function b(a){try{return""==a.trim()?void 0:a}catch(b){console.log(b)}}var d=!1;a.DEFAULT_LABELS={command_clear:"clear",command_mark:"mark",command_drawLeft:"drawLeft",command_drawRight:"drawRight",command_drawUp:"drawUp",command_drawDown:"drawDown",command_drawLeftFrom:"drawLeftFrom",command_drawRightFrom:"drawRightFrom",command_drawUpFrom:"drawUpFrom",command_drawDownFrom:"drawDownFrom",command_setColor:"setColor",command_setCursor:"setCursor",command_clearMark:"clearMark",
block_mark:"mark",block_x:"x",block_y:"y",block_clear:"clear",block_steps:"steps",block_drawLeft:"drawLeft",block_drawRight:"drawRight",block_drawUp:"drawUp",block_drawDown:"drawDown",block_drawLeftFrom:"drawLeftFrom",block_drawRightFrom:"drawRightFrom",block_drawUpFrom:"drawUpFrom",block_drawDownFrom:"drawDownFrom",block_setColor:"setColor",block_setCursor:"setCursor",block_clearMark:"clearMark"};a.addBlocks=function(c){if(!d){var e=c=void 0===c?a.DEFAULT_LABELS:$.extend({},a.DEFAULT_LABELS,c);Blockly.Blocks.scene_grid_mark=
{init:function(){this.appendDummyInput().appendField(e.block_mark);this.appendValueInput("x").setCheck("Number").setAlign(Blockly.ALIGN_CENTRE).appendField(e.block_x);this.appendValueInput("y").setCheck("Number").setAlign(Blockly.ALIGN_CENTRE).appendField(e.block_y);this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(260);this.setTooltip("");this.setHelpUrl("http://mauthor.com/doc/en/page/Blockly-Code-Editor")}};Blockly.JavaScript.scene_grid_mark=
function(a){var c=Blockly.JavaScript.valueToCode(a,"x",Blockly.JavaScript.ORDER_ATOMIC),a=Blockly.JavaScript.valueToCode(a,"y",Blockly.JavaScript.ORDER_ATOMIC);return StringUtils.format("{0}({1}, {2});\n",e.command_mark,b(c),b(a))};var g=c;Blockly.Blocks.scene_grid_clear={init:function(){this.appendDummyInput().appendField(g.block_clear);this.setColour(0);this.setTooltip("");this.setHelpUrl("http://mauthor.com/doc/en/page/Blockly-Code-Editor")}};Blockly.JavaScript.scene_grid_clear=function(){return StringUtils.format("{0}();\n",
g.command_clear)};var f=c;Blockly.Blocks.scene_grid_drawleftfrom={init:function(){this.appendDummyInput().appendField(f.block_drawLeftFrom);this.appendValueInput("x").setCheck("Number").appendField(f.block_x);this.appendValueInput("y").setCheck("Number").appendField(f.block_y);this.appendValueInput("steps").setCheck("Number").appendField(f.block_steps);this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(195);this.setTooltip("");this.setHelpUrl("http://mauthor.com/doc/en/page/Blockly-Code-Editor")}};
Blockly.JavaScript.scene_grid_drawleftfrom=function(a){var c=Blockly.JavaScript.valueToCode(a,"x",Blockly.JavaScript.ORDER_ATOMIC),d=Blockly.JavaScript.valueToCode(a,"y",Blockly.JavaScript.ORDER_ATOMIC),a=Blockly.JavaScript.valueToCode(a,"steps",Blockly.JavaScript.ORDER_ATOMIC);return StringUtils.format("{0}({1}, {2}, {3});\n",f.command_drawLeftFrom,b(c),b(d),b(a))};var j=c;Blockly.Blocks.scene_grid_drawrightfrom={init:function(){this.appendDummyInput().appendField(j.block_drawRightFrom);this.appendValueInput("x").setCheck("Number").appendField(j.block_x);
this.appendValueInput("y").setCheck("Number").appendField(j.block_y);this.appendValueInput("steps").setCheck("Number").appendField(j.block_steps);this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(270);this.setTooltip("");this.setHelpUrl("http://mauthor.com/doc/en/page/Blockly-Code-Editor")}};Blockly.JavaScript.scene_grid_drawrightfrom=function(a){var c=Blockly.JavaScript.valueToCode(a,"x",Blockly.JavaScript.ORDER_ATOMIC),d=Blockly.JavaScript.valueToCode(a,
"y",Blockly.JavaScript.ORDER_ATOMIC),a=Blockly.JavaScript.valueToCode(a,"steps",Blockly.JavaScript.ORDER_ATOMIC);return StringUtils.format("{0}({1}, {2}, {3});\n",j.command_drawRightFrom,b(c),b(d),b(a))};var h=c;Blockly.Blocks.scene_grid_drawupfrom={init:function(){this.appendDummyInput().appendField(h.block_drawUpFrom);this.appendValueInput("x").setCheck("Number").appendField(h.block_x);this.appendValueInput("y").setCheck("Number").appendField(h.block_y);this.appendValueInput("steps").setCheck("Number").appendField(h.block_steps);
this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(120);this.setTooltip("");this.setHelpUrl("http://mauthor.com/doc/en/page/Blockly-Code-Editor")}};Blockly.JavaScript.scene_grid_drawupfrom=function(a){var c=Blockly.JavaScript.valueToCode(a,"x",Blockly.JavaScript.ORDER_ATOMIC),d=Blockly.JavaScript.valueToCode(a,"y",Blockly.JavaScript.ORDER_ATOMIC),a=Blockly.JavaScript.valueToCode(a,"steps",Blockly.JavaScript.ORDER_ATOMIC);return StringUtils.format("{0}({1}, {2}, {3});\n",
h.command_drawUpFrom,b(c),b(d),b(a))};var k=c;Blockly.Blocks.scene_grid_drawdownfrom={init:function(){this.appendDummyInput().appendField(k.block_drawDownFrom);this.appendValueInput("x").setCheck("Number").appendField(k.block_x);this.appendValueInput("y").setCheck("Number").appendField(k.block_y);this.appendValueInput("steps").setCheck("Number").appendField(k.block_steps);this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(150);this.setTooltip("");
this.setHelpUrl("http://mauthor.com/doc/en/page/Blockly-Code-Editor")}};Blockly.JavaScript.scene_grid_drawdownfrom=function(a){var c=Blockly.JavaScript.valueToCode(a,"x",Blockly.JavaScript.ORDER_ATOMIC),d=Blockly.JavaScript.valueToCode(a,"y",Blockly.JavaScript.ORDER_ATOMIC),a=Blockly.JavaScript.valueToCode(a,"steps",Blockly.JavaScript.ORDER_ATOMIC);return StringUtils.format("{0}({1}, {2}, {3});\n",k.command_drawDownFrom,b(c),b(d),b(a))};var n=c;Blockly.Blocks.scene_grid_drawleft={init:function(){this.appendDummyInput().appendField(n.block_drawLeft);
this.appendValueInput("steps").setCheck("Number").appendField(n.block_steps);this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(195);this.setTooltip("");this.setHelpUrl("http://mauthor.com/doc/en/page/Blockly-Code-Editor")}};Blockly.JavaScript.scene_grid_drawleft=function(a){a=Blockly.JavaScript.valueToCode(a,"steps",Blockly.JavaScript.ORDER_ATOMIC);return StringUtils.format("{0}({1});\n",n.command_drawLeft,b(a))};var l=c;Blockly.Blocks.scene_grid_drawright=
{init:function(){this.appendDummyInput().appendField(l.block_drawRight);this.appendValueInput("steps").setCheck("Number").appendField(l.block_steps);this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(270);this.setTooltip("");this.setHelpUrl("http://mauthor.com/doc/en/page/Blockly-Code-Editor")}};Blockly.JavaScript.scene_grid_drawright=function(a){a=Blockly.JavaScript.valueToCode(a,"steps",Blockly.JavaScript.ORDER_ATOMIC);return StringUtils.format("{0}({1});\n",
l.command_drawRight,b(a))};var r=c;Blockly.Blocks.scene_grid_drawup={init:function(){this.appendDummyInput().appendField(r.block_drawUp);this.appendValueInput("steps").setCheck("Number").appendField(r.block_steps);this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(120);this.setTooltip("");this.setHelpUrl("http://mauthor.com/doc/en/page/Blockly-Code-Editor")}};Blockly.JavaScript.scene_grid_drawup=function(a){a=Blockly.JavaScript.valueToCode(a,
"steps",Blockly.JavaScript.ORDER_ATOMIC);return StringUtils.format("{0}({1});\n",r.command_drawUp,b(a))};var m=c;Blockly.Blocks.scene_grid_drawdown={init:function(){this.appendDummyInput().appendField(m.block_drawDown);this.appendValueInput("steps").setCheck("Number").appendField(m.block_steps);this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(150);this.setTooltip("");this.setHelpUrl("http://mauthor.com/doc/en/page/Blockly-Code-Editor")}};Blockly.JavaScript.scene_grid_drawdown=
function(a){a=Blockly.JavaScript.valueToCode(a,"steps",Blockly.JavaScript.ORDER_ATOMIC);return StringUtils.format("{0}({1});\n",m.command_drawDown,b(a))};var p=c;Blockly.Blocks.scene_grid_setcolor={init:function(){this.appendDummyInput().appendField(p.block_setColor);this.appendValueInput("color").setCheck("String").appendField(p.color);this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(300);this.setTooltip("");this.setHelpUrl("http://mauthor.com/doc/en/page/Blockly-Code-Editor")}};
Blockly.JavaScript.scene_grid_setcolor=function(a){var a=Blockly.JavaScript.valueToCode(a,"color",Blockly.JavaScript.ORDER_ATOMIC),b=StringUtils.format("{0}({1});\n",p.command_setColor,a);return b=StringUtils.format("setColor({0});\n",a)};var o=c;Blockly.Blocks.scene_grid_setcursor={init:function(){this.appendDummyInput().appendField(o.block_setCursor);this.appendValueInput("x").setCheck("Number").appendField(o.block_x);this.appendValueInput("y").setCheck("Number").appendField(o.block_y);this.setInputsInline(!0);
this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(300);this.setTooltip("");this.setHelpUrl("http://mauthor.com/doc/en/page/Blockly-Code-Editor")}};Blockly.JavaScript.scene_grid_setcursor=function(a){var c=Blockly.JavaScript.valueToCode(a,"x",Blockly.JavaScript.ORDER_ATOMIC),a=Blockly.JavaScript.valueToCode(a,"y",Blockly.JavaScript.ORDER_ATOMIC);return StringUtils.format("{0}({1}, {2});\n",o.command_setCursor,b(c),b(a))};var q=c;Blockly.Blocks.scene_grid_clearmark={init:function(){this.appendDummyInput().appendField(q.block_clearMark);
this.appendValueInput("x").setCheck("Number").appendField(q.block_x);this.appendValueInput("y").setCheck("Number").appendField(q.block_y);this.setInputsInline(!0);this.setPreviousStatement(!0,null);this.setNextStatement(!0,null);this.setColour(210);this.setTooltip("");this.setHelpUrl("http://mauthor.com/doc/en/page/Blockly-Code-Editor")}};Blockly.JavaScript.scene_grid_clearmark=function(a){var c=Blockly.JavaScript.valueToCode(a,"x",Blockly.JavaScript.ORDER_ATOMIC),a=Blockly.JavaScript.valueToCode(a,
"y",Blockly.JavaScript.ORDER_ATOMIC);return StringUtils.format("{0}({1}, {2});\n",q.command_clearMark,b(c),b(a))};d=!0}};f.BlocklyCustomBlocks=f.BlocklyCustomBlocks||{};f.BlocklyCustomBlocks.SceneGrid=f.BlocklyCustomBlocks.SceneGrid||a})(window);(function(f){function a(a,b,d,f){Blockly.Blocks[a]={init:function(){this.appendDummyInput().appendField(d);for(var a=0;a<f.length;a++)this.appendDummyInput().appendField(f[a]).appendField(new Blockly.FieldTextInput(""),a+"#"+f[a]);this.setPreviousStatement(!0,"vfc_action");this.setNextStatement(!0,"vfc_action");this.setColour(290);this.setTooltip("");this.setHelpUrl("")}};Blockly.JavaScript[a]=function(a){for(var d=[],e=0;e<f.length;e++){var i=a.getFieldValue(e+"#"+f[e]);null!=i&&0<i.length?isNaN(i)?
d.push("'"+i+"'"):d.push(i):d.push("''")}return b+"("+d.join(",")+")"+c}}function b(a,b,c,d){Blockly.Blocks[a]={init:function(){this.appendDummyInput().appendField(b);for(var a=Object.keys(c),d=0;d<a.length;d++){var e=a[d];this.appendDummyInput().appendField(c[e]).appendField(new Blockly.FieldTextInput(""),e)}this.appendStatementInput("Action").setCheck("vfc_feedback");this.setOutput(!0,"vfc_event");this.setColour(230);this.setTooltip("");this.setHelpUrl("")}};Blockly.JavaScript[a]=function(a){for(var b=
{item:"Item:",value:"Value:",score:"Score:",type:"Type:",word:"Word:"},e=Object.keys(b),f={},g=0;g<e.length;g++){var m=e[g];m in c&&(f[m]=a.getFieldValue(m))}for(var a=Blockly.JavaScript.statementToCode(a,"Action"),p="",g=0;g<e.length;g++)if(m=e[g],m in f&&0<f[m].trim().length||m in d)var o=m in f&&0<f[m].trim().length?f[m]:d[m],p=p+(b[m]+o+"\n");return[p+"SCRIPTSTART\n"+a+"SCRIPTEND\n",Blockly.JavaScript.ORDER_ATOMIC]}}var d=function(){},c="&statementSeperator&";d.DEFAULT_LABELS={Visual_Feedback_Creator_source_module:"Source module",
Visual_Feedback_Creator_id:"ID:",Visual_Feedback_Creator_custom_event:"Custom event",Visual_Feedback_Creator_item:"Item:",Visual_Feedback_Creator_value:"Value:",Visual_Feedback_Creator_score:"Score:",Visual_Feedback_Creator_type:"Type:",Visual_Feedback_Creator_word:"Word:",Visual_Feedback_Creator_feedback_module:"Feedback module",Visual_Feedback_Creator_custom_action:"Custom action",Visual_Feedback_Creator_script:"Script:",Visual_Feedback_Creator_show:"Show module",Visual_Feedback_Creator_hide:"Hide module",
Visual_Feedback_Creator_wrong_answer:"Wrong answer",Visual_Feedback_Creator_correct_answer:"Correct answer",Visual_Feedback_Creator_play:"Play",Visual_Feedback_Creator_stop:"Stop",Visual_Feedback_Creator_seek:"Seek",Visual_Feedback_Creator_time:"Time:",Visual_Feedback_Creator_show_subtitles:"Show subtitles",Visual_Feedback_Creator_hide_subtitles:"Hide subtitles",Visual_Feedback_Creator_next:"Next",Visual_Feedback_Creator_prev:"Previous",Visual_Feedback_Creator_jump_to:"Jump to",Visual_Feedback_Creator_number:"Number:",
Visual_Feedback_Creator_playing:"Playing",Visual_Feedback_Creator_finished_playing:"Finished playing",Visual_Feedback_Creator_pause:"Pause",Visual_Feedback_Creator_paused:"Paused",Visual_Feedback_Creator_set_default:"Set default",Visual_Feedback_Creator_change:"Change",Visual_Feedback_Creator_enable:"Enable",Visual_Feedback_Creator_disable:"Disable",Visual_Feedback_Creator_enable_all:"Enable all",Visual_Feedback_Creator_disable_all:"Disable all",Visual_Feedback_Creator_gap_index:"Gap index:",Visual_Feedback_Creator_mark_as_correct:"Mark as correct",
Visual_Feedback_Creator_mark_as_wrong:"Mark as wrong",Visual_Feedback_Creator_mark_as_empty:"Mark as empty",Visual_Feedback_Creator_set_text:"Set text",Visual_Feedback_Creator_reset:"Reset",Visual_Feedback_Creator_index:"Index:",Visual_Feedback_Creator_original_index:"Original index:",Visual_Feedback_Creator_new_index:"New index:",Visual_Feedback_Creator_row:"Row:",Visual_Feedback_Creator_true_false_event:"True False event",Visual_Feedback_Creator_column:"Column:",Visual_Feedback_Creator_selection:"Selection:",
Visual_Feedback_Creator_selected:"Selected",Visual_Feedback_Creator_deselected:"Deselected",Visual_Feedback_Creator_none:"None",Visual_Feedback_Creator_connection_event:"Connection Event",Visual_Feedback_Creator_true:"True",Visual_Feedback_Creator_false:"False",Visual_Feedback_Creator_connected:"Connected",Visual_Feedback_Creator_first_item_id:"First item id:",Visual_Feedback_Creator_second_item_id:"Second item id:",Visual_Feedback_Creator_text_event:"Text Event",Visual_Feedback_Creator_choice_event:"Choice Event",
Visual_Feedback_Creator_source_event:"Source Event",Visual_Feedback_Creator_check:"Check",Visual_Feedback_Creator_uncheck:"Uncheck",Visual_Feedback_Creator_page_loaded:"Page loaded",Visual_Feedback_Creator_hide_answers:"Hide answers",Visual_Feedback_Creator_show_answers:"Show answers",Visual_Feedback_Creator_changed_value:"Changed value",Visual_Feedback_Creator_event:"Event:"};d.addBlocks=function(d){null==d&&(d=this.DEFAULT_LABELS);var f=d;Blockly.Blocks.vfc_source_module={init:function(){this.appendDummyInput().appendField(f.Visual_Feedback_Creator_source_module);
this.appendValueInput("event").setCheck("vfc_event").appendField(f.Visual_Feedback_Creator_id).appendField(new Blockly.FieldTextInput("module1"),"ID");this.setColour(120);this.setTooltip("");this.setHelpUrl("")}};Blockly.JavaScript.vfc_source_module=function(a){var b=a.getFieldValue("ID"),a=Blockly.JavaScript.valueToCode(a,"event",Blockly.JavaScript.ORDER_ATOMIC);return"\nEVENTSTART\n"+("Source:"+b+"\n")+a+"EVENTEND\n"};var i=d;Blockly.Blocks.vfc_feedback_module={init:function(){this.appendDummyInput().appendField(i.Visual_Feedback_Creator_feedback_module);
this.appendStatementInput("action").setCheck("vfc_action").appendField(i.Visual_Feedback_Creator_id).appendField(new Blockly.FieldTextInput("module2"),"id");this.setPreviousStatement(true,"vfc_feedback");this.setNextStatement(true,"vfc_feedback");this.setColour(20);this.setTooltip("");this.setHelpUrl("")}};Blockly.JavaScript.vfc_feedback_module=function(a){for(var b=a.getFieldValue("id"),a=Blockly.JavaScript.statementToCode(a,"action").split(c),d="",e=0;e<a.length;e++){var f=a[e].trim();f.length!=
0&&(d=d+("presenter.playerController.getModule('"+b+"')."+f+";\n"))}return d};var j=d;Blockly.Blocks.vfc_custom_event={init:function(){this.appendDummyInput().appendField(j.Visual_Feedback_Creator_custom_event);this.appendDummyInput().appendField(j.Visual_Feedback_Creator_event).appendField(new Blockly.FieldDropdown([[j.Visual_Feedback_Creator_changed_value,"ValueChanged"],[j.Visual_Feedback_Creator_page_loaded,"PageLoaded"],[j.Visual_Feedback_Creator_reset,"Reset"],[j.Visual_Feedback_Creator_show_answers,
"ShowAnswers"],[j.Visual_Feedback_Creator_hide_answers,"HideAnswers"],[j.Visual_Feedback_Creator_check,"Check"],[j.Visual_Feedback_Creator_uncheck,"Uncheck"]]),"eventName");this.appendDummyInput().appendField(j.Visual_Feedback_Creator_item).appendField(new Blockly.FieldTextInput(""),"item");this.appendDummyInput().appendField(j.Visual_Feedback_Creator_value).appendField(new Blockly.FieldTextInput(""),"value");this.appendDummyInput().appendField(j.Visual_Feedback_Creator_score).appendField(new Blockly.FieldTextInput(""),
"score");this.appendDummyInput().appendField(j.Visual_Feedback_Creator_type).appendField(new Blockly.FieldTextInput(""),"type");this.appendDummyInput().appendField(j.Visual_Feedback_Creator_word).appendField(new Blockly.FieldTextInput(""),"word");this.appendStatementInput("Action").setCheck("vfc_feedback");this.setOutput(true,"vfc_event");this.setColour(230);this.setTooltip("");this.setHelpUrl("")}};Blockly.JavaScript.vfc_custom_event=function(a){var b=a.getFieldValue("eventName"),c=a.getFieldValue("item"),
d=a.getFieldValue("value"),e=a.getFieldValue("score"),f=a.getFieldValue("type"),g=a.getFieldValue("word"),a=Blockly.JavaScript.statementToCode(a,"Action"),b=""+("Name:"+b+"\n");c.trim().length>0&&(b=b+("Item:"+c+"\n"));d.trim().length>0&&(b=b+("Value:"+d+"\n"));e.trim().length>0&&(b=b+("Score:"+e+"\n"));f.trim().length>0&&(b=b+("Type:"+f+"\n"));g.trim().length>0&&(b=b+("Word:"+g+"\n"));return[b+"SCRIPTSTART\n"+a+"SCRIPTEND\n",Blockly.JavaScript.ORDER_ATOMIC]};Blockly.Blocks.vfc_custom_action={init:function(){this.appendDummyInput().appendField(j.Visual_Feedback_Creator_custom_action);
this.appendDummyInput().appendField(j.Visual_Feedback_Creator_script).appendField(new Blockly.FieldTextInput(""),"script");this.setPreviousStatement(true,"vfc_action");this.setNextStatement(true,"vfc_action");this.setColour(290);this.setTooltip("");this.setHelpUrl("")}};Blockly.JavaScript.vfc_custom_action=function(a){return a.getFieldValue("script")+c};Blockly.Blocks.vfc_source_event={init:function(){this.appendDummyInput().appendField(j.Visual_Feedback_Creator_source_event);this.appendDummyInput().appendField(j.Visual_Feedback_Creator_event).appendField(new Blockly.FieldDropdown([[j.Visual_Feedback_Creator_page_loaded,
"PageLoaded"],[j.Visual_Feedback_Creator_reset,"Reset"],[j.Visual_Feedback_Creator_show_answers,"ShowAnswers"],[j.Visual_Feedback_Creator_hide_answers,"HideAnswers"],[j.Visual_Feedback_Creator_check,"Check"],[j.Visual_Feedback_Creator_uncheck,"Uncheck"]]),"eventName");this.appendStatementInput("action").setCheck("vfc_feedback");this.setColour(230);this.setTooltip("");this.setHelpUrl("")}};Blockly.JavaScript.vfc_source_event=function(a){var b=a.getFieldValue("eventName"),a=Blockly.JavaScript.statementToCode(a,
"action");return"\nEVENTSTART\n"+("Name:"+b+"\n")+"SCRIPTSTART\n"+a+"SCRIPTEND\nEVENTEND\n"};var h=d;a("vfc_show","show",h.Visual_Feedback_Creator_show,[]);a("vfc_hide","hide",h.Visual_Feedback_Creator_hide,[]);a("vfc_play","play",h.Visual_Feedback_Creator_play,[]);a("vfc_stop","stop",h.Visual_Feedback_Creator_stop,[]);a("vfc_next","next",h.Visual_Feedback_Creator_next,[]);a("vfc_prev","previous",h.Visual_Feedback_Creator_prev,[]);a("vfc_seek","seek",h.Visual_Feedback_Creator_seek,[h.Visual_Feedback_Creator_time]);
a("vfc_show_subs","showSubtitles",h.Visual_Feedback_Creator_show_subtitles,[]);a("vfc_hide_subs","hideSubtitles",h.Visual_Feedback_Creator_hide_subtitles,[]);a("vfc_jump_to","jumpTo",h.Visual_Feedback_Creator_jump_to,[h.Visual_Feedback_Creator_number]);a("vfc_jump_to_id","jumpToID",h.Visual_Feedback_Creator_jump_to,[h.Visual_Feedback_Creator_id]);b("vfc_video_ended",h.Visual_Feedback_Creator_finished_playing,{item:h.Visual_Feedback_Creator_number},{value:"ended"});b("vfc_video_playing",h.Visual_Feedback_Creator_playing,
{},{value:"playing"});h=d;a("vfc_pause","pause",h.Visual_Feedback_Creator_pause,[]);b("vfc_audio_ended",h.Visual_Feedback_Creator_finished_playing,{},{item:"end"});b("vfc_audio_paused",h.Visual_Feedback_Creator_paused,{},{value:"pause"});h=d;a("vfc_feedback_set_def","setDefaultResponse",h.Visual_Feedback_Creator_set_default,[]);a("vfc_feedback_change","change",h.Visual_Feedback_Creator_change,[h.Visual_Feedback_Creator_id]);h=d;a("vfc_enable_gap","enableGap",h.Visual_Feedback_Creator_enable,[h.Visual_Feedback_Creator_gap_index]);
a("vfc_enable_gaps","enableAllGaps",h.Visual_Feedback_Creator_enable_all,[]);a("vfc_disable_gap","disableGap",h.Visual_Feedback_Creator_disable,[h.Visual_Feedback_Creator_gap_index]);a("vfc_disable_gaps","disableAllGaps",h.Visual_Feedback_Creator_disable_all,[]);a("vfc_text_mark_correct","markGapAsCorrect",h.Visual_Feedback_Creator_mark_as_correct,[h.Visual_Feedback_Creator_gap_index]);a("vfc_text_mark_wrong","markGapAsWrong",h.Visual_Feedback_Creator_mark_as_wrong,[h.Visual_Feedback_Creator_gap_index]);
a("vfc_text_mark_empty","markGapAsEmpty",h.Visual_Feedback_Creator_mark_as_empty,[h.Visual_Feedback_Creator_gap_index]);a("vfc_text_set_text","setText",h.Visual_Feedback_Creator_set_text,[h.Visual_Feedback_Creator_value]);b("vfc_text_correct_gap",h.Visual_Feedback_Creator_correct_answer,{item:h.Visual_Feedback_Creator_gap_index},{score:1});b("vfc_text_wrong_gap",h.Visual_Feedback_Creator_wrong_answer,{item:h.Visual_Feedback_Creator_gap_index},{score:0});b("vfc_text_event",h.Visual_Feedback_Creator_text_event,
{item:h.Visual_Feedback_Creator_gap_index,value:h.Visual_Feedback_Creator_value,score:h.Visual_Feedback_Creator_score},{});var k=d;a("vfc_disable","disable",k.Visual_Feedback_Creator_disable,[]);a("vfc_enable","enable",k.Visual_Feedback_Creator_enable,[]);a("vfc_reset","reset",k.Visual_Feedback_Creator_reset,[]);a("vfc_choice_mark_correct","markOptionAsCorrect",k.Visual_Feedback_Creator_mark_as_correct,[k.Visual_Feedback_Creator_index]);a("vfc_choice_mark_wrong","markOptionAsWrong",k.Visual_Feedback_Creator_mark_as_wrong,
[k.Visual_Feedback_Creator_index]);a("vfc_choice_mark_empty","markOptionAsEmpty",k.Visual_Feedback_Creator_mark_as_empty,[k.Visual_Feedback_Creator_index]);Blockly.Blocks.vfc_choice_event={init:function(){this.appendDummyInput().appendField(k.Visual_Feedback_Creator_choice_event);this.appendDummyInput().appendField(k.Visual_Feedback_Creator_id).appendField(new Blockly.FieldTextInput(""),"id");this.appendDummyInput().appendField(k.Visual_Feedback_Creator_selection).appendField(new Blockly.FieldDropdown([[k.Visual_Feedback_Creator_none,
"-1"],[k.Visual_Feedback_Creator_selected,"1"],[k.Visual_Feedback_Creator_deselected,"0"]]),"selection");this.appendDummyInput().appendField(k.Visual_Feedback_Creator_score).appendField(new Blockly.FieldDropdown([[k.Visual_Feedback_Creator_none,"-1"],[k.Visual_Feedback_Creator_correct_answer,"1"],[k.Visual_Feedback_Creator_wrong_answer,"0"]]),"score");this.appendStatementInput("action").setCheck("vfc_feedback");this.setOutput(true,"vfc_event");this.setColour(230);this.setTooltip("");this.setHelpUrl("")}};
Blockly.JavaScript.vfc_choice_event=function(a){var b=a.getFieldValue("id"),c=a.getFieldValue("selection"),d=a.getFieldValue("score"),a=Blockly.JavaScript.statementToCode(a,"action"),c=Number(c),d=Number(d),e="";b.length>0&&(e=e+("Item:"+b+"\n"));c>-1&&(e=e+("Value:"+c+"\n"));d>-1&&(e=e+("Score:"+d+"\n"));return[e+"SCRIPTSTART\n"+a+"SCRIPTEND\n",Blockly.JavaScript.ORDER_ATOMIC]};var n=d;b("vfc_connection_new_correct",n.Visual_Feedback_Creator_correct_answer,{},{score:1,value:1});b("vfc_connection_new_wrong",
n.Visual_Feedback_Creator_wrong_answer,{},{score:0,value:1});Blockly.Blocks.vfc_connection_event={init:function(){this.appendDummyInput().appendField(n.Visual_Feedback_Creator_connection_event);this.appendDummyInput().appendField(n.Visual_Feedback_Creator_first_item_id).appendField(new Blockly.FieldTextInput(""),"first");this.appendDummyInput().appendField(n.Visual_Feedback_Creator_second_item_id).appendField(new Blockly.FieldTextInput(""),"second");this.appendDummyInput().appendField(n.Visual_Feedback_Creator_connected).appendField(new Blockly.FieldDropdown([[n.Visual_Feedback_Creator_none,
"-1"],[n.Visual_Feedback_Creator_true,"1"],[n.Visual_Feedback_Creator_false,"0"]]),"connection");this.appendDummyInput().appendField(n.Visual_Feedback_Creator_score).appendField(new Blockly.FieldDropdown([[n.Visual_Feedback_Creator_none,"-1"],[n.Visual_Feedback_Creator_correct_answer,"1"],[n.Visual_Feedback_Creator_wrong_answer,"0"]]),"score");this.appendStatementInput("action").setCheck("vfc_feedback");this.setOutput(true,"vfc_event");this.setColour(230);this.setTooltip("");this.setHelpUrl("")}};
Blockly.JavaScript.vfc_connection_event=function(a){var b=a.getFieldValue("first"),c=a.getFieldValue("second"),d=a.getFieldValue("connection"),e=a.getFieldValue("score"),a=Blockly.JavaScript.statementToCode(a,"action"),d=Number(d),e=Number(e),f="";b.length>0&&c.length>0&&(f=f+("Item:"+b+"-"+c+"\n"));d>-1&&(f=f+("Value:"+d+"\n"));e>-1&&(f=f+("Score:"+e+"\n"));return[f+"SCRIPTSTART\n"+a+"SCRIPTEND\n",Blockly.JavaScript.ORDER_ATOMIC]};b("vfc_ordering_event",d.Visual_Feedback_Creator_correct_answer,{item:d.Visual_Feedback_Creator_original_index,
value:d.Visual_Feedback_Creator_new_index,score:d.Visual_Feedback_Creator_score},{});var l=d;b("vfc_true_false_correct",l.Visual_Feedback_Creator_correct_answer,{},{item:"all"});Blockly.Blocks.vfc_true_false_correct_row={init:function(){this.appendDummyInput().appendField(l.Visual_Feedback_Creator_correct_answer);this.appendDummyInput().appendField(l.Visual_Feedback_Creator_row).appendField(new Blockly.FieldNumber(1),"row");this.appendStatementInput("action").setCheck("vfc_feedback");this.setOutput(true,
"vfc_event");this.setColour(230);this.setTooltip("");this.setHelpUrl("")}};Blockly.JavaScript.vfc_true_false_correct_row=function(a){var b=a.getFieldValue("row"),a=Blockly.JavaScript.statementToCode(a,"action");return["Item:"+b+"-all\nSCRIPTSTART\n"+a+"SCRIPTEND\n",Blockly.JavaScript.ORDER_ATOMIC]};Blockly.Blocks.vfc_true_false_event={init:function(){this.appendDummyInput().appendField(l.Visual_Feedback_Creator_true_false_event);this.appendDummyInput().appendField(l.Visual_Feedback_Creator_row).appendField(new Blockly.FieldNumber(0),
"question");this.appendDummyInput().appendField(l.Visual_Feedback_Creator_column).appendField(new Blockly.FieldNumber(0),"answer");this.appendDummyInput().appendField(l.Visual_Feedback_Creator_selection).appendField(new Blockly.FieldDropdown([[l.Visual_Feedback_Creator_none,"-1"],[l.Visual_Feedback_Creator_selected,"1"],[l.Visual_Feedback_Creator_deselected,"0"]]),"selection");this.appendDummyInput().appendField(l.Visual_Feedback_Creator_score).appendField(new Blockly.FieldDropdown([[l.Visual_Feedback_Creator_none,
"-1"],[l.Visual_Feedback_Creator_correct_answer,"1"],[l.Visual_Feedback_Creator_wrong_answer,"0"]]),"score");this.appendStatementInput("action").setCheck("vfc_feedback");this.setOutput(true,"vfc_event");this.setColour(230);this.setTooltip("");this.setHelpUrl("")}};Blockly.JavaScript.vfc_true_false_event=function(a){var b=a.getFieldValue("question"),c=a.getFieldValue("answer"),d=a.getFieldValue("selection"),e=a.getFieldValue("score"),a=Blockly.JavaScript.statementToCode(a,"action"),d=Number(d),e=Number(e),
f="";b>0&&c>0&&(f=f+("Item:"+b+"-"+c+"\n"));d>-1&&(f=f+("Value:"+d+"\n"));e>-1&&(f=f+("Score:"+e+"\n"));return[f+"SCRIPTSTART\n"+a+"SCRIPTEND\n",Blockly.JavaScript.ORDER_ATOMIC]}};f.BlocklyCustomBlocks=f.BlocklyCustomBlocks||{};f.BlocklyCustomBlocks.AGC=f.BlocklyCustomBlocks.AGC||d})(window);
/**
 * Player Addons Commons library
 * @version 4.2.1
 * Components:
 * - Model Validation Utils
 * - DOM Operations
 * - Statefull Addon Object
 * - Draggable Droppable Object
 * - States Serialization
 * - Watermark
 * - Commands
 * - Image Viewer (partial)
 * - Helpers
 * - Mobile Utils
 * - String Utils
 * - Internationalization
 * - Text Parser Proxy
 * - Loaded Promise
 * - Events Utils
 * - Model Error Utils
 * - Blockly Custom Scene Blocks
 * - Keyboard Navigation Controller
 */