diff --git a/composer.json b/composer.json index e530c52c..6833749c 100644 --- a/composer.json +++ b/composer.json @@ -28,12 +28,12 @@ "minimum-stability": "dev", "require": { "oat-sa/oatbox-extension-installer": "~1.1||dev-master", - "oat-sa/generis" : ">=15.22", - "oat-sa/tao-core" : ">=54.0.0", - "oat-sa/extension-tao-item" : ">=11.11.2", - "oat-sa/extension-tao-itemqti" : ">=28.22.0", - "oat-sa/extension-tao-testqti" : ">=47.3.0", - "oat-sa/extension-tao-test" : ">=15.0.0", + "oat-sa/generis" : ">=15.39.0", + "oat-sa/tao-core" : ">=54.23.0", + "oat-sa/extension-tao-item" : ">=12.4.0", + "oat-sa/extension-tao-itemqti" : ">=30.22.0", + "oat-sa/extension-tao-testqti" : ">=48.14.0", + "oat-sa/extension-tao-test" : ">=16.3.0", "oat-sa/extension-tao-delivery" : ">=15.0.0", "oat-sa/extension-tao-outcome" : ">=13.0.0", "qtism/qtism": "~0" diff --git a/views/js/loader/qtiPreviewer.min.js b/views/js/loader/qtiPreviewer.min.js index 2c9ef77d..ca54fe34 100644 --- a/views/js/loader/qtiPreviewer.min.js +++ b/views/js/loader/qtiPreviewer.min.js @@ -1,2 +1,2 @@ -define("tpl!taoQtiTestPreviewer/previewer/runner",["handlebars"],function(hb){return hb.template(function(Handlebars,depth0,helpers,partials,data){return this.compilerInfo=[4,">= 1.0.0"],helpers=this.merge(helpers,Handlebars.helpers),data=data||{},"
"})}),define("taoQtiTestPreviewer/previewer/runner",["taoTests/runner/runnerComponent","tpl!taoQtiTestPreviewer/previewer/runner"],function(runnerComponentFactory,runnerTpl){"use strict";return function previewerFactory(container){let config=1this.destroy())})}}),define("css!taoQtiTestPreviewer/previewer/provider/item/css/item",[],function(){}),define("taoQtiTestPreviewer/previewer/component/qtiItem",["context","taoQtiTestPreviewer/previewer/runner","css!taoQtiTestPreviewer/previewer/provider/item/css/item"],function(context,previewerFactory){"use strict";return function qtiItemPreviewerFactory(container){let config=1{if(config.itemState&&runner.on("renderitem",()=>runner.itemRunner.setState(config.itemState)),config.itemUri)return runner.loadItem(config.itemUri)})}}),define("taoQtiTestPreviewer/previewer/adapter/item/qtiItem",["lodash","core/logger","taoQtiTestPreviewer/previewer/component/qtiItem","ui/feedback"],function(_,loggerFactory,qtiItemPreviewerFactory,feedback){"use strict";const logger=loggerFactory("taoQtiTest/previewer"),defaultPlugins=[{module:"taoQtiTestPreviewer/previewer/plugins/controls/close",bundle:"taoQtiTestPreviewer/loader/qtiPreviewer.min",category:"controls"},{module:"taoQtiTestPreviewer/previewer/plugins/navigation/submit/submit",bundle:"taoQtiTestPreviewer/loader/qtiPreviewer.min",category:"navigation"},{module:"taoQtiTestPreviewer/previewer/plugins/tools/scale/scale",bundle:"taoQtiTestPreviewer/loader/qtiPreviewer.min",category:"tools"},{module:"taoQtiTest/runner/plugins/tools/itemThemeSwitcher/itemThemeSwitcher",bundle:"taoQtiTest/loader/testPlugins.min",category:"tools"},{module:"taoQtiTestPreviewer/previewer/plugins/content/enhancedReadOnlyMode",bundle:"taoQtiTestPreviewer/loader/qtiPreviewer.min",category:"content"}];return{name:"qtiItem",init(uri,state){let config=2= 1.0.0"],helpers=this.merge(helpers,Handlebars.helpers),data=data||{};var helper,options,buffer="",helperMissing=helpers.helperMissing,escapeExpression=this.escapeExpression;return buffer+="
\n\t
\n\t\t
\n\t\t\n\t
\n\t
\n
",buffer})}),define("tpl!taoQtiTestPreviewer/previewer/component/topBlock/tpl/topBlockData",["handlebars"],function(hb){return hb.template(function(Handlebars,depth0,helpers,partials,data){this.compilerInfo=[4,">= 1.0.0"],helpers=this.merge(helpers,Handlebars.helpers),data=data||{};var stack1,helper,buffer="",functionType="function",escapeExpression=this.escapeExpression;return buffer+="

",(helper=helpers.name)?stack1=helper.call(depth0,{hash:{},data:data}):(helper=depth0&&depth0.name,stack1="function"===typeof helper?helper.call(depth0,{hash:{},data:data}):helper),buffer+=escapeExpression(stack1)+" ",(helper=helpers.title)?stack1=helper.call(depth0,{hash:{},data:data}):(helper=depth0&&depth0.title,stack1="function"===typeof helper?helper.call(depth0,{hash:{},data:data}):helper),buffer+=escapeExpression(stack1)+"

",buffer})}),define("css!taoQtiTestPreviewer/previewer/component/topBlock/css/topBlock",[],function(){}),define("taoQtiTestPreviewer/previewer/component/topBlock/topBlock",["jquery","lodash","i18n","ui/component","tpl!taoQtiTestPreviewer/previewer/component/topBlock/tpl/topBlock","tpl!taoQtiTestPreviewer/previewer/component/topBlock/tpl/topBlockData","css!taoQtiTestPreviewer/previewer/component/topBlock/css/topBlock"],function($,_,__,componentFactory,topBlockTpl,topBlockDataTpl){"use strict";function topBlockFactory(container,config){const topBlock=componentFactory().setTemplate(topBlockTpl).on("init",function(){this.render(container)}).on("render",function(){const $info=$(topBlockDataTpl({name:config.isTest?__("Test Preview:"):__("Item Preview:"),title:config.title})),$element=this.getElement();$element.find(".top-block-preview-info").append($info),$element.find(".close").on("click",config.onClose);const $icon=$element.find(".top-block-preview-collapser .icon");$element.find(".top-block-preview-collapser").on("click",()=>{$icon.toggleClass("icon-up"),$icon.toggleClass("icon-down"),$element.toggleClass("open"),$element.toggleClass("close")}),this.trigger("ready")});return _.defer(function(){topBlock.init(config)}),topBlock}return topBlockFactory}),define("taoQtiTestPreviewer/previewer/config/item",["lodash","util/url","util/config"],function(_,urlUtil,configHelper){"use strict";var _defaults={bootstrap:{serviceController:"Previewer",serviceExtension:"taoQtiTestPreviewer"}},_entries={serviceCallId:!0,bootstrap:!1,timeout:!1};return function itemPreviewerConfigFactory(config){var undef,storage=configHelper.from(config,_entries,_defaults);return storage.timeout?storage.timeout*=1e3:storage.timeout=undef,{getParameters:function getParameters(itemIdentifier){var type=typeof itemIdentifier,parameters={serviceCallId:this.getServiceCallId()};if("string"==type)parameters.itemUri=itemIdentifier;else if("object"===type&&_.isPlainObject(itemIdentifier))_.merge(parameters,itemIdentifier);else if("undefined"!==type)throw new TypeError("Wrong parameter type provided for itemIdentifier: "+type+". Only string or plain object are allowed!");return parameters},getServiceCallId:function getServiceCallId(){return storage.serviceCallId},getServiceController:function getServiceController(){return storage.bootstrap.serviceController||_defaults.bootstrap.serviceController},getServiceExtension:function getServiceExtension(){return storage.bootstrap.serviceExtension||_defaults.bootstrap.serviceExtension},getTestActionUrl:function getTestActionUrl(action){return urlUtil.route(action,this.getServiceController(),this.getServiceExtension(),this.getParameters())},getItemActionUrl:function getItemActionUrl(itemIdentifier,action){return urlUtil.route(action,this.getServiceController(),this.getServiceExtension(),this.getParameters(itemIdentifier))},getTimeout:function getTimeout(){return storage.timeout}}}}),define("json!taoQtiTestPreviewer/previewer/resources/devices.json",function(){return{tablets:{"193986c3715c81838870f908fa98d69a":{label:"Amazon Kindle Fire HDX 7\u2033",width:960,height:600},"4e8eafab11aad1486992d7ee2c8c16ca":{label:"Apple iPad",width:1024,height:768},"5aac2932d9ad00d6d8a1604b8f9e4e8d":{label:"Google Nexus 10, Motorola Xoom, Xyboard",width:1280,height:800},"9805d9753ad08c7630a9ee5418aa6c6c":{label:"Google Nexus 7",width:966,height:604},d4a431cedf4705d6bf2cba6d5788378b:{label:"Samsung Galaxy Tab 7.7, 8.9, 10.1",width:1280,height:800}},phones:{"1b89338531ef0155c8d6abc2ac02c81a":{label:"Apple iPhone 3GS",width:320,height:480,scaleFactor:1,dpWidth:320,dpHeight:480},"3f89da99d84214cde7df87ebe0699a6f":{label:"Apple iPhone 4",width:640,height:960,scaleFactor:2,dpWidth:320,dpHeight:1920},"0d36971a5b98b367f54ced708c9af849":{label:"Apple iPhone 5",width:640,height:1136,scaleFactor:2,dpWidth:320,dpHeight:2272},"026beffcc051af995660ebdede986ace":{label:"BlackBerry Z10",width:768,height:1280,scaleFactor:2,dpWidth:384,dpHeight:2560},fd2dd53e667d6d49e4fa73356fa941dd:{label:"BlackBerry Z30",width:720,height:1280,scaleFactor:2,dpWidth:360,dpHeight:2560},"707584c1ae17d9b5b2cbe8603c91c147":{label:"Google Nexus 4",width:768,height:1280,scaleFactor:2,dpWidth:384,dpHeight:2560},"91823264de952e7f2347e07db5c4058b":{label:"Google Nexus 5",width:1080,height:1920,scaleFactor:3,dpWidth:360,dpHeight:5760},cd69817a6e147e8a4677389e56fcf568:{label:"Google Nexus S",width:480,height:800,scaleFactor:1.5,dpWidth:320,dpHeight:1200},"75994faa6a38e31e99b53fcd75534a33":{label:"HTC Evo, Touch HD, Desire HD, Desire",width:480,height:800,scaleFactor:1.5,dpWidth:320,dpHeight:1200},"0cab4dfccdfc880687cb608cfe4159db":{label:"HTC One X, EVO LTE",width:720,height:1280,scaleFactor:2,dpWidth:360,dpHeight:2560},c4ff41fcba24d74fc21dc3490ca1edc9:{label:"HTC Sensation, Evo 3D",width:540,height:960,scaleFactor:1.5,dpWidth:360,dpHeight:1440},fa969a5e0dd2de53700eeee4ba4ba142:{label:"LG Optimus 2X, Optimus 3D, Optimus Black",width:480,height:800,scaleFactor:1.5,dpWidth:320,dpHeight:1200},"33c4f9364e295ec03531f3a3425819cf":{label:"LG Optimus G",width:768,height:1280,scaleFactor:2,dpWidth:384,dpHeight:2560},bc47f5275f0efd56fee52d43a8082981:{label:"LG Optimus LTE, Optimus 4X HD",width:720,height:1280,scaleFactor:1.7,dpWidth:424,dpHeight:2176},"0732887e6e324fd10777b735520a34cf":{label:"LG Optimus One",width:320,height:480,scaleFactor:1.5,dpWidth:213,dpHeight:720},"2e38a78364f09d0da0e9e1a3a68e7fb0":{label:"Motorola Defy, Droid, Droid X, Milestone",width:480,height:854,scaleFactor:1.5,dpWidth:320,dpHeight:1281},bd4b78dddc7c9625a4141a1b1ddabb87:{label:"Motorola Droid 3, Droid 4, Droid Razr, Atrix 4G, Atrix 2",width:540,height:960,scaleFactor:1,dpWidth:540,dpHeight:960},"3bf1edf21cfa81006183d2b02974c84e":{label:"Motorola Droid Razr HD",width:720,height:1280,scaleFactor:1,dpWidth:720,dpHeight:1280},ab5a352e0e016b97dac986f06c394f55:{label:"Nokia C5, C6, C7, N97, N8, X7",width:360,height:640,scaleFactor:1,dpWidth:360,dpHeight:640},"4826fb7d7257aeaac992ce699df41b3c":{label:"Nokia Lumia 7X0, Lumia 8XX, Lumia 900, N800, N810, N900",width:480,height:800,scaleFactor:1.5,dpWidth:320,dpHeight:1200},"0a691ab20add7c432200f8fa6527b488":{label:"Samsung Galaxy Note",width:800,height:1280,scaleFactor:2,dpWidth:400,dpHeight:2560},"9c23ee31be29960fbac9e9bbfc2fc7b0":{label:"Samsung Galaxy Note 3",width:1080,height:1920,scaleFactor:2,dpWidth:540,dpHeight:3840},"92177c0508c1d73905a58e2338f2a81f":{label:"Samsung Galaxy Note II",width:720,height:1280,scaleFactor:2,dpWidth:360,dpHeight:2560},"5222b8866dc4cc606725e16ffcc0a783":{label:"Samsung Galaxy S III, Galaxy Nexus",width:720,height:1280,scaleFactor:2,dpWidth:360,dpHeight:2560},"37c1541e2bd55cfd0f4073b0ccdf68b3":{label:"Samsung Galaxy S, S II, W",width:480,height:800,scaleFactor:1.5,dpWidth:320,dpHeight:1200},"2f7f64b7dda0144907ff300e83eed465":{label:"Samsung Galaxy S4",width:1080,height:1920,scaleFactor:3,dpWidth:360,dpHeight:5760},"9c24f9057744dad56043702a9703127f":{label:"Sony Xperia S, Ion",width:720,height:1280,scaleFactor:2,dpWidth:360,dpHeight:2560},"0a8b2732a016a9395c3af5f12dd9c0da":{label:"Sony Xperia Sola, U",width:480,height:854,scaleFactor:1,dpWidth:480,dpHeight:854},"5a153d7f53d82dcb0801f041574a6a43":{label:"Sony Xperia Z, Z1",width:1080,height:1920,scaleFactor:3,dpWidth:360,dpHeight:5760}},screens:{"9e523ae15b61dc766f5c818726881ecf":{label:"1920 \xD7 1080",width:1920,height:1080,dpWidth:1920,dpHeight:1080,scaleFactor:1},"07769cd8d0a7d09818b2f0b018042fb7":{label:"1366 \xD7 768",width:1366,height:768,dpWidth:1366,dpHeight:768,scaleFactor:1},"72d5478a24194f98b9378e8e0fd65737":{label:"1280 \xD7 1024",width:1280,height:1024,dpWidth:1280,dpHeight:1024,scaleFactor:1},b7a6dd5900cc72e61f0d3479c7e314ec:{label:"1280 \xD7 800",width:1280,height:800,dpWidth:1280,dpHeight:800,scaleFactor:1},"43193b0ff671a37d8232ab664190a125":{label:"1024 \xD7 768",width:1024,height:768,dpWidth:1024,dpHeight:768,scaleFactor:1},c29e48814af5443ff5688d9e967ce917:{label:"800 \xD7 600",width:800,height:600,dpWidth:800,dpHeight:600,scaleFactor:1}}}}),define("taoQtiTestPreviewer/previewer/helpers/devices",["lodash","json!taoQtiTestPreviewer/previewer/resources/devices.json"],function(_,deviceList){"use strict";var deviceTypeMap={mobile:"tablets",desktop:"screens"},devicesHelper={getDevicesByType:function getDevicesByType(type){var key=deviceTypeMap[type];return _.map(deviceList[key]||[],function mapDeviceData(device,identifier){return{value:identifier,label:device.label,width:device.width,height:device.height}})},getMobileDevices:function getMobileDevices(){return devicesHelper.getDevicesByType("mobile")},getDesktopDevices:function getDesktopDevices(){return devicesHelper.getDevicesByType("desktop")}};return devicesHelper}),define("taoQtiTestPreviewer/previewer/plugins/content/cloneLogoInTestPreview",["jquery","taoTests/runner/plugin"],function($,pluginFactory){"use strict";return pluginFactory({name:"cloneLogoInTestPreview",init(){const testRunner=this.getTestRunner();testRunner.after("ready",()=>{$("#tao-main-logo").clone().appendTo(".previewer-test-component header")})}})}),define("taoQtiTestPreviewer/previewer/plugins/content/enhancedReadOnlyMode",["jquery","lodash","i18n","taoTests/runner/plugin"],function($,_,__,pluginFactory){"use strict";return pluginFactory({name:"EnhancedReadOnlyMode",init(){const testRunner=this.getTestRunner(),isPluginAllowed=()=>{const config=testRunner.getConfig();return config.options.readOnly};testRunner.after("renderitem",()=>{if(isPluginAllowed()){const $contentArea=testRunner.getAreaBroker().getContentArea(),$extendedTextinteractionTextAreas=$contentArea.find(".qti-extendedTextInteraction textarea.text-container"),$ckeEditorsContent=$contentArea.find(".qti-extendedTextInteraction div.cke_contents");$extendedTextinteractionTextAreas.length&&$extendedTextinteractionTextAreas.each(function(){this.style.height=`${this.scrollHeight+20}px`}),$ckeEditorsContent.length&&$ckeEditorsContent.each(function(){const $ckeEditorContent=$(this),$ckeEditorIFrame=$ckeEditorContent.find("iframe.cke_wysiwyg_frame");$ckeEditorIFrame.on("load",()=>{setTimeout(()=>{const ckeEditorBody=$ckeEditorIFrame[0].contentWindow.document.querySelector("body");$ckeEditorContent[0].style.height=`${ckeEditorBody.scrollHeight+20}px`},0)})})}})}})}),define("taoQtiTestPreviewer/previewer/plugins/controls/close",["jquery","lodash","i18n","ui/hider","taoTests/runner/plugin","tpl!taoQtiTest/runner/plugins/templates/button"],function($,_,__,hider,pluginFactory,buttonTpl){"use strict";return pluginFactory({name:"close",init:function init(){function isPluginAllowed(){var config=testRunner.getConfig();return!config.options.hideActionBars}var self=this,testRunner=this.getTestRunner();this.$element=$(buttonTpl({control:"close",title:__("Close the previewer"),icon:"close",text:__("Close"),className:"context-action"})),this.$element.on("click",function(e){e.preventDefault(),!1!==self.getState("enabled")&&(self.disable(),testRunner.trigger("finish"))}),this.disable(),testRunner.on("enablenav",function(){isPluginAllowed()&&self.enable()}).on("disablenav",function(){self.disable()})},render:function render(){var $container=this.getAreaBroker().getArea("context");$container.append(this.$element)},destroy:function destroy(){this.$element.remove()},enable:function enable(){this.$element.prop("disabled",!1).removeClass("disabled")},disable:function disable(){this.$element.prop("disabled",!0).addClass("disabled")},show:function show(){hider.show(this.$element)},hide:function hide(){hider.hide(this.$element)}})}),define("tpl!taoQtiTestPreviewer/previewer/plugins/navigation/submit/preview-console",["handlebars"],function(hb){return hb.template(function(Handlebars,depth0,helpers,partials,data){return this.compilerInfo=[4,">= 1.0.0"],helpers=this.merge(helpers,Handlebars.helpers),data=data||{},"
\n
    \n
    "})}),define("tpl!taoQtiTestPreviewer/previewer/plugins/navigation/submit/preview-console-line",["handlebars"],function(hb){return hb.template(function(Handlebars,depth0,helpers,partials,data){this.compilerInfo=[4,">= 1.0.0"],helpers=this.merge(helpers,Handlebars.helpers),data=data||{};var stack1,helper,buffer="",functionType="function",escapeExpression=this.escapeExpression;return buffer+="
  • ",(helper=helpers.time)?stack1=helper.call(depth0,{hash:{},data:data}):(helper=depth0&&depth0.time,stack1="function"===typeof helper?helper.call(depth0,{hash:{},data:data}):helper),buffer+=escapeExpression(stack1)+"",(helper=helpers.type)?stack1=helper.call(depth0,{hash:{},data:data}):(helper=depth0&&depth0.type,stack1="function"===typeof helper?helper.call(depth0,{hash:{},data:data}):helper),buffer+=escapeExpression(stack1)+"",(helper=helpers.message)?stack1=helper.call(depth0,{hash:{},data:data}):(helper=depth0&&depth0.message,stack1="function"===typeof helper?helper.call(depth0,{hash:{},data:data}):helper),(stack1||0===stack1)&&(buffer+=stack1),buffer+="
  • ",buffer})}),define("tpl!taoQtiTestPreviewer/previewer/plugins/navigation/submit/preview-console-closer",["handlebars"],function(hb){return hb.template(function(Handlebars,depth0,helpers,partials,data){this.compilerInfo=[4,">= 1.0.0"],helpers=this.merge(helpers,Handlebars.helpers),data=data||{};var helper,options,buffer="",helperMissing=helpers.helperMissing,escapeExpression=this.escapeExpression;return buffer+="",buffer})}),define("taoQtiTestPreviewer/previewer/plugins/navigation/submit/submit",["jquery","lodash","i18n","moment","ui/hider","ui/autoscroll","util/strPad","taoTests/runner/plugin","taoQtiItem/qtiCommonRenderer/helpers/PciResponse","taoQtiItem/runner/rendererStrategies","tpl!taoQtiTest/runner/plugins/templates/button","tpl!taoQtiTestPreviewer/previewer/plugins/navigation/submit/preview-console","tpl!taoQtiTestPreviewer/previewer/plugins/navigation/submit/preview-console-line","tpl!taoQtiTestPreviewer/previewer/plugins/navigation/submit/preview-console-closer"],function($,_,__,moment,hider,autoscroll,strPad,pluginFactory,pciResponse,rendererStrategies,buttonTpl,consoleTpl,consoleLineTpl,consoleCloserTpl){"use strict";const defaults={submitTitle:__("Submit and show the result"),submitText:__("Submit"),submitIcon:"forward"};return pluginFactory({name:"submit",init(){const testRunner=this.getTestRunner(),pluginConfig=_.defaults(this.getConfig(),defaults),isPluginAllowed=()=>{const config=testRunner.getConfig();return!config.options.readOnly&&"reviewRenderer"!==rendererStrategies(config.options.view).getName()},showConsole=()=>{hider.show(this.controls.$console),hider.show(this.controls.$consoleBody),hider.show(this.controls.$consoleCloser),autoscroll(this.controls.$consoleBody.children().last(),this.controls.$consoleBody)},hideConsole=()=>{hider.hide(this.controls.$console),hider.hide(this.controls.$consoleCloser)},addConsoleLine=(type,message)=>{const data={time:strPad(moment().format("HH:mm:ss"),12," "),type:strPad(type||"",18," "),message:strPad(message||"",18," ")};this.controls.$consoleBody.append($(consoleLineTpl(data)))},showResponses=(type,responses)=>{_.forEach(responses,(response,identifier)=>{addConsoleLine(type,strPad(`${identifier}: `,15," ")+_.escape(pciResponse.prettyPrint(response)))})};this.controls={$button:$(buttonTpl({control:"submit",title:pluginConfig.submitTitle,icon:pluginConfig.submitIcon,text:pluginConfig.submitText})),$console:$(consoleTpl()),$consoleCloser:$(consoleCloserTpl())},this.controls.$consoleBody=this.controls.$console.find(".preview-console-body"),this.controls.$button.on("click",e=>{e.preventDefault(),!1!==this.getState("enabled")&&(this.disable(),testRunner.trigger("submititem"))}),this.controls.$consoleCloser.on("click",e=>{e.preventDefault(),hideConsole()}),isPluginAllowed()||this.hide(),this.disable(),testRunner.on("render",()=>{isPluginAllowed()?this.show():this.hide()}).on("submitresponse",responses=>{showResponses(__("Submitted data"),responses),showConsole()}).on("scoreitem",responses=>{responses.itemSession&&(showResponses(__("Output data"),responses.itemSession),showConsole())}).on("enablenav",()=>{this.enable()}).on("disablenav",()=>{this.disable()})},render(){const $container=this.getAreaBroker().getContainer(),$navigation=this.getAreaBroker().getNavigationArea();$navigation.append(this.controls.$button),$navigation.append(this.controls.$consoleCloser),$container.append(this.controls.$console)},destroy(){_.forEach(this.controls,$el=>$el.remove()),this.controls=null},enable(){this.controls.$button.prop("disabled",!1).removeClass("disabled")},disable(){this.controls.$button.prop("disabled",!0).addClass("disabled")},show(){hider.show(this.controls.$button)},hide(){_.forEach(this.controls,hider.hide)}})}),define("tpl!taoQtiTestPreviewer/previewer/plugins/tools/scale/component/tpl/devices-previewer",["handlebars"],function(hb){return hb.template(function(Handlebars,depth0,helpers,partials,data){this.compilerInfo=[4,">= 1.0.0"],helpers=this.merge(helpers,Handlebars.helpers),data=data||{};var stack1,helper,buffer="",functionType="function",escapeExpression=this.escapeExpression;return buffer+="
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    ",buffer})}),define("css!taoQtiTestPreviewer/previewer/plugins/tools/scale/component/css/devicesPreviewer",[],function(){}),define("taoQtiTestPreviewer/previewer/plugins/tools/scale/component/devicesPreviewer",["jquery","lodash","i18n","ui/component","ui/transformer","tpl!taoQtiTestPreviewer/previewer/plugins/tools/scale/component/tpl/devices-previewer","css!taoQtiTestPreviewer/previewer/plugins/tools/scale/component/css/devicesPreviewer.css"],function($,_,__,componentFactory,transformer,devicesPreviewerTpl){"use strict";var _Mathmin=Math.min;function devicesPreviewerFactory(container,config){var controls=null,resetScale=function resetScale(){controls&&(controls.$previewContent.removeAttr("style"),controls.$previewContainer.removeAttr("style"))},api={getDeviceWidth:function getDeviceWidth(){return this.getConfig().deviceWidth},setDeviceWidth:function setDeviceWidth(width){var componentConfig=this.getConfig();return componentConfig.deviceWidth=parseInt(width,10)||0,this.trigger("devicewidthchange",componentConfig.deviceWidth),this},getDeviceHeight:function getDeviceHeight(){return this.getConfig().deviceHeight},setDeviceHeight:function setDeviceHeight(height){var componentConfig=this.getConfig();return componentConfig.deviceHeight=parseInt(height,10)||0,this.trigger("deviceheightchange",componentConfig.deviceHeight),this},getDeviceOrientation:function getDeviceOrientation(){return this.getConfig().deviceOrientation},setDeviceOrientation:function setDeviceOrientation(orientation){var componentConfig=this.getConfig();return componentConfig.deviceOrientation=orientation,this.is("rendered")&&this.getElement().attr("data-orientation",componentConfig.deviceOrientation),this.trigger("deviceorientationchange",componentConfig.deviceOrientation),this},isDeviceMode:function isDeviceMode(){return"standard"!==this.getDeviceType()},getDeviceType:function getDeviceType(){return this.getConfig().deviceType},setDeviceType:function setDeviceType(type){var componentConfig=this.getConfig();return componentConfig.deviceType=type,this.is("rendered")&&this.getElement().attr("data-type",componentConfig.deviceType),this.trigger("devicetypechange",componentConfig.deviceType),this},previewDevice:function previewDevice(){var width,height;return this.is("rendered")&&(this.is("disabled")||"standard"===this.getDeviceType()?this.clearScale():("portrait"===this.getDeviceOrientation()?(width=this.getDeviceHeight(),height=this.getDeviceWidth()):(width=this.getDeviceWidth(),height=this.getDeviceHeight()),this.applyScale(width,height)),this.trigger("devicepreview")),this},clearScale:function clearScale(){return this.is("rendered")&&(resetScale(),this.trigger("scaleclear")),this},applyScale:function applyScale(width,height){var frameSize,frameMargins,scaleFactor;return this.is("rendered")&&(resetScale(),frameSize=this.getFrameSize(),frameMargins=this.getFrameMargins(),scaleFactor=this.getScaleFactor(width,height),controls.$previewContent.width(width).height(height),controls.$previewContainer.css("left",(frameSize.width-(width+frameMargins.width)*scaleFactor)/2).width(width+frameMargins.width).height(height+frameMargins.height),transformer.setTransformOrigin(controls.$previewContainer,0,0),transformer.scale(controls.$previewContainer,scaleFactor),this.trigger("scalechange")),this},getFrameMargins:function getFrameMargins(){var margins={width:0,height:0};return this.is("rendered")&&(margins.width=controls.$previewContainer.outerWidth()-controls.$previewContent.width(),margins.height=controls.$previewContainer.outerHeight()-controls.$previewContent.height()),margins},getFrameSize:function getFrameSize(){var size={width:0,height:0};return this.is("rendered")&&(size.width=this.getContainer().innerWidth(),size.height=this.getContainer().innerHeight()),size},getScaleFactor:function getScaleFactor(width,height){var margins,frameSize,scaleFactor={x:1,y:1};return this.is("rendered")&&this.isDeviceMode()&&(frameSize=this.getFrameSize(),margins=this.getFrameMargins(),width+=margins.width,height+=margins.height,width>frameSize.width&&(scaleFactor.x=frameSize.width/width),height>frameSize.height&&(scaleFactor.y=frameSize.height/height)),_Mathmin(scaleFactor.x,scaleFactor.y)},wrap:function wrap(element){return this.is("rendered")&&(this.unwrap(),controls.$wrappedElement=$(element),controls.$wrappedElementContainer=controls.$wrappedElement.parent(),controls.$previewContent.append(controls.$wrappedElement),this.trigger("wrap",controls.$wrappedElement)),this},unwrap:function unwrap(){var $wasWrappedElement;return this.is("rendered")&&controls.$wrappedElement&&($wasWrappedElement=controls.$wrappedElement,controls.$wrappedElementContainer.append(controls.$wrappedElement),controls.$wrappedElement=null,controls.$wrappedElementContainer=null,this.trigger("unwrap",$wasWrappedElement)),this}},devicesPreviewer=componentFactory(api,defaults).setTemplate(devicesPreviewerTpl).on("init",function(){var componentConfig=this.getConfig();this.setDeviceType(componentConfig.deviceType),this.setDeviceWidth(componentConfig.deviceWidth),this.setDeviceHeight(componentConfig.deviceHeight),this.setDeviceOrientation(componentConfig.deviceOrientation),_.defer(function(){devicesPreviewer.render(container)})}).on("render",function(){var $element=this.getElement();controls={$previewContainer:$element.find(".preview-container"),$previewFrame:$element.find(".preview-frame"),$previewContent:$element.find(".preview-content"),$wrappedElement:null,$wrappedElementContainer:null},this.trigger("ready")}).on("disable enable",function(){var self=this;this.is("rendered")&&_.defer(function(){self.previewDevice()})}).on("destroy",function(){this.unwrap(),controls=null});return _.defer(function(){devicesPreviewer.init(config)}),devicesPreviewer}var defaults={deviceType:"standard",deviceWith:0,deviceHeight:0,deviceOrientation:null};return devicesPreviewerFactory}),define("tpl!taoQtiTestPreviewer/previewer/plugins/tools/scale/component/tpl/devices-selector",["handlebars"],function(hb){return hb.template(function(Handlebars,depth0,helpers,partials,data){return this.compilerInfo=[4,">= 1.0.0"],helpers=this.merge(helpers,Handlebars.helpers),data=data||{},"
    \n
    \n
    \n
    \n
    \n
    "})}),define("tpl!taoQtiTestPreviewer/previewer/plugins/tools/scale/component/tpl/selector",["handlebars"],function(hb){return hb.template(function(Handlebars,depth0,helpers,partials,data){function program1(depth0,data){var stack1,helper,buffer="";return buffer+="\n \n ",buffer}function program2(depth0,data){return"selected=\"selected\""}this.compilerInfo=[4,">= 1.0.0"],helpers=this.merge(helpers,Handlebars.helpers),data=data||{};var stack1,helper,buffer="",functionType="function",escapeExpression=this.escapeExpression,self=this;return buffer+="",buffer})}),define("css!taoQtiTestPreviewer/previewer/plugins/tools/scale/component/css/devicesSelector",[],function(){}),define("taoQtiTestPreviewer/previewer/plugins/tools/scale/component/devicesSelector",["jquery","lodash","i18n","ui/component","ui/selecter","taoQtiTestPreviewer/previewer/helpers/devices","tpl!taoQtiTestPreviewer/previewer/plugins/tools/scale/component/tpl/devices-selector","tpl!taoQtiTestPreviewer/previewer/plugins/tools/scale/component/tpl/selector","css!taoQtiTestPreviewer/previewer/plugins/tools/scale/component/css/devicesSelector.css"],function($,_,__,componentFactory,lookupSelecter,devicesHelper,devicesSelectorTpl,selectorTpl){"use strict";function getSelectorData(selected,list){return selected&&_.size(list)?_.find(list,{value:selected})||null:null}function getValidIdentifier(identifier,list){return list&&list.length?_.find(list,{value:identifier})?identifier:_.first(list).value:null}function updateSelect2($selector,value){var current=$selector.val();return current!==value&&($selector.val(value),$selector.trigger("change")),$selector}function removeSelect2($selector){return $selector.hasClass("select2-offscreen")&&$selector.select2("destroy"),$selector}function devicesSelectorFactory(container,config){var selected={type:null,device:null,orientation:null,desktop:null,mobile:null},devicesList=[],typeData=null,controls=null,setControlsProp=function setControlsProp(property,value){_.forEach(controls,function($selector){$selector.prop(property,value)})},api={isDeviceMode:function isDeviceMode(){return"standard"!==selected.type},updateMode:function updateMode(){return this.is("rendered")&&this.getElement().attr("data-type",selected.type),this},getType:function getType(){return selected.type},getOrientation:function getOrientation(){return typeData&&typeData.orientation?selected.orientation:null},getDevice:function getDevice(){return typeData&&typeData.devicesList?selected.device:null},getDeviceData:function getDeviceData(){return getSelectorData(this.getDevice(),devicesList)},setType:function setType(identifier){return identifier=getValidIdentifier(identifier,deviceTypesList),identifier!==selected.type&&(selected.type=identifier,selected.device=null,devicesList=devicesHelper.getDevicesByType(selected.type),typeData=getSelectorData(selected.type,deviceTypesList),this.is("rendered")&&(updateSelect2(controls.$typeSelector,selected.type),this.updateMode()),this.trigger("typechange",selected.type),typeData.devicesList&&this.setDevice(selected[selected.type])),this},setOrientation:function setOrientation(identifier){return identifier=getValidIdentifier(identifier,deviceOrientationsList),identifier!==selected.orientation&&(selected.orientation=identifier,this.is("rendered")&&updateSelect2(controls.$orientationSelector,selected.orientation),this.trigger("orientationchange",selected.orientation)),this},setDevice:function setDevice(identifier){var $selector;return identifier=getValidIdentifier(identifier,devicesList),identifier!==selected.device&&(selected.device=identifier,selected[selected.type]=identifier,this.is("rendered")&&this.isDeviceMode()&&($selector=controls["$"+selected.type+"Selector"],$selector&&updateSelect2($selector,selected.device)),this.trigger("devicechange",selected.device,this.getDeviceData())),this},select:function select(name,value){var setterName=callbackMap[name];return setterName&&_.isFunction(this[setterName])&&this[setterName](value),this},reset:function reset(){var componentConfig=this.getConfig();return this.setType(componentConfig.type),this.setDevice(componentConfig.device),this.setOrientation(componentConfig.orientation),this}},devicesSelector=componentFactory(api,defaults).setTemplate(devicesSelectorTpl).on("init",function(){this.reset(),_.defer(function(){devicesSelector.render(container)})}).on("render",function(){function renderSelector(name,list,selectedValue,category){var $selector=$(selectorTpl({name:name,category:category||name,items:_.map(list,function(item){return{value:item.value,label:item.label,selected:selectedValue===item.value}})}));return self.getElement().find("."+name+"-selector").html($selector),$selector}var self=this;controls={$typeSelector:renderSelector("type",deviceTypesList,selected.type),$desktopSelector:renderSelector("desktop",devicesHelper.getDesktopDevices(),selected.device,"device"),$mobileSelector:renderSelector("mobile",devicesHelper.getMobileDevices(),selected.device,"device"),$orientationSelector:renderSelector("orientation",deviceOrientationsList,selected.orientation)},lookupSelecter(this.getElement()),this.getElement().on("change",".selector",function onSelectorChange(e){var $selector=$(e.target).closest("select");self.select($selector.attr("name"),$selector.val())}),this.updateMode(),this.trigger("ready")}).on("disable",function(){this.is("rendered")&&setControlsProp("disabled",!0)}).on("enable",function(){this.is("rendered")&&setControlsProp("disabled",!1)}).on("destroy",function(){_.forEach(controls,removeSelect2),controls=null,selected=null,typeData=null,devicesList=null});return _.defer(function(){devicesSelector.init(config)}),devicesSelector}var defaults={type:"standard",device:null,orientation:"landscape"},deviceTypesList=[{value:"standard",label:__("Actual size"),devicesList:!1,orientation:!1},{value:"desktop",label:__("Desktop preview"),devicesList:!0,orientation:!1},{value:"mobile",label:__("Mobile preview"),devicesList:!0,orientation:!0}],deviceOrientationsList=[{value:"landscape",label:__("Landscape")},{value:"portrait",label:__("Portrait")}],callbackMap={type:"setType",device:"setDevice",mobile:"setDevice",desktop:"setDevice",orientation:"setOrientation"};return devicesSelectorFactory}),define("taoQtiTestPreviewer/previewer/plugins/tools/scale/scale",["jquery","lodash","lib/uuid","util/namespace","taoTests/runner/plugin","taoQtiTestPreviewer/previewer/plugins/tools/scale/component/devicesPreviewer","taoQtiTestPreviewer/previewer/plugins/tools/scale/component/devicesSelector"],function($,_,uuid,namespaceHelper,pluginFactory,devicesPreviewerFactory,devicesSelectorFactory){"use strict";return pluginFactory({name:"scale",init:function init(){function isPluginAllowed(){var config=testRunner.getConfig();return!config.options.readOnly}var self=this,testRunner=this.getTestRunner();this.nsId=this.getName()+uuid(6),isPluginAllowed()||this.hide(),this.disable(),testRunner.on("render",function(){isPluginAllowed()?self.show():self.hide()}).on("resizeitem",function(size,orientation,type){self.devicesPreviewer&&self.devicesPreviewer.setDeviceType(type).setDeviceOrientation(orientation).setDeviceWidth(size&&size.width).setDeviceHeight(size&&size.height).previewDevice()}).on("enablenav",function(){self.enable()}).on("disablenav",function(){self.disable()})},render:function render(){function resizeItem(){self.devicesSelector&&self.getState("enabled")&&testRunner.trigger("resizeitem",self.devicesSelector.getDeviceData(),self.devicesSelector.getOrientation(),self.devicesSelector.getType())}var self=this,testRunner=this.getTestRunner(),areaBroker=this.getAreaBroker();return $(window).on(namespaceHelper.namespaceAll("resize orientationchange",this.nsId),_.throttle(function(){self.devicesSelector&&self.devicesSelector.isDeviceMode()&&resizeItem()},50)),Promise.all([new Promise(function(resolve){self.devicesSelector=devicesSelectorFactory(areaBroker.getHeaderArea()).on("ready",function(){self.getState("enabled")||this.disable(),this.on("typechange",function(){this.isDeviceMode()||resizeItem()}),this.on("devicechange orientationchange",function(){resizeItem()}),resolve()})}),new Promise(function(resolve){self.devicesPreviewer=devicesPreviewerFactory(areaBroker.getArea("contentWrapper")).on("ready",function(){this.wrap(areaBroker.getContentArea()),resolve()})})])},destroy:function destroy(){this.nsId&&$(window).off("."+this.nsId),this.devicesSelector&&this.devicesSelector.destroy(),this.devicesPreviewer&&this.devicesPreviewer.destroy(),this.devicesSelector=null,this.devicesPreviewer=null},enable:function enable(){this.devicesSelector&&this.devicesSelector.enable()},disable:function disable(){this.devicesSelector&&this.devicesSelector.disable()},show:function show(){this.devicesSelector&&this.devicesSelector.show()},hide:function hide(){this.devicesSelector&&this.devicesSelector.hide()}})}),define("tpl!taoQtiTestPreviewer/previewer/provider/item/tpl/item",["handlebars"],function(hb){return hb.template(function(Handlebars,depth0,helpers,partials,data){return this.compilerInfo=[4,">= 1.0.0"],helpers=this.merge(helpers,Handlebars.helpers),data=data||{},"
    \n
    \n
    \n
    \n
    \n
      \n
      \n
      \n
      \n\n
      \n\n \n\n
      \n
      \n
      \n
      \n\n \n\n
      "})}),define("taoQtiTestPreviewer/previewer/provider/item/item",["jquery","lodash","i18n","ui/feedback","taoTests/runner/areaBroker","taoTests/runner/testStore","taoTests/runner/proxy","taoQtiTest/runner/ui/toolbox/toolbox","taoQtiItem/runner/qtiItemRunner","taoQtiTest/runner/config/assetManager","taoItems/assets/strategies","taoQtiItem/qtiCommonRenderer/helpers/container","tpl!taoQtiTestPreviewer/previewer/provider/item/tpl/item"],function($,_,__,feedback,areaBrokerFactory,testStoreFactory,proxyFactory,toolboxFactory,qtiItemRunner,assetManagerFactory,assetStrategies,containerHelper,layoutTpl){"use strict";function setContext($context){_$previousContext=containerHelper.getContext(),containerHelper.setContext($context)}function restoreContext(){containerHelper.setContext(_$previousContext),_$previousContext=null}const assetManager=assetManagerFactory();assetManager.prependStrategy(assetStrategies.taomedia);let _$previousContext=null;return{name:"qtiItemPreviewer",loadAreaBroker(){const $layout=$(layoutTpl());return areaBrokerFactory($layout,{contentWrapper:$(".content-wrapper",$layout),content:$("#qti-content",$layout),toolbox:$(".bottom-action-bar .tools-box",$layout),navigation:$(".bottom-action-bar .navi-box-list",$layout),control:$(".top-action-bar .control-box",$layout),actionsBar:$(".bottom-action-bar .control-box",$layout),panel:$(".test-sidebar-left",$layout),header:$(".top-action-bar .tools-box",$layout),context:$(".top-action-bar .navi-box-list",$layout)})},loadProxy(){const{proxyProvider,serviceCallId,bootstrap,timeout}=this.getConfig();return proxyFactory(proxyProvider||"qtiItemPreviewerProxy",{serviceCallId,bootstrap,timeout})},loadTestStore(){const config=this.getConfig(),identifier=config.serviceCallId||`test-${Date.now()}`;return testStoreFactory(identifier)},install(){const{plugins}=this.getConfig().options;plugins&&_.forEach(this.getPlugins(),plugin=>{if(_.isPlainObject(plugin)&&_.isFunction(plugin.setConfig)){const config=plugins[plugin.getName()];_.isPlainObject(config)&&plugin.setConfig(config)}})},init(){const dataHolder=this.getDataHolder(),areaBroker=this.getAreaBroker();return areaBroker.setComponent("toolbox",toolboxFactory()),areaBroker.getToolbox().init(),this.on("submititem",()=>{const itemState=this.itemRunner.getState(),itemResponses=this.itemRunner.getResponses();return this.trigger("disabletools disablenav"),this.trigger("submitresponse",itemResponses,itemState),this.getProxy().submitItem(dataHolder.get("itemIdentifier"),itemState,itemResponses).then(response=>{this.trigger("scoreitem",response),this.trigger("enabletools enablenav resumeitem")}).catch(err=>{this.trigger("enabletools enablenav"),200===err.code&&this.trigger("alert.submitError",err.message||__("An error occurred during results submission. Please retry."),()=>this.trigger("resumeitem"))})}).on("ready",()=>{const itemIdentifier=dataHolder.get("itemIdentifier"),itemData=dataHolder.get("itemData");itemIdentifier&&(itemData?this.renderItem(itemIdentifier,itemData):this.loadItem(itemIdentifier))}).on("loaditem",(itemRef,itemData)=>{dataHolder.set("itemIdentifier",itemRef),dataHolder.set("itemData",itemData)}).on("renderitem",()=>{this.trigger("enabletools enablenav")}).on("resumeitem",()=>{this.trigger("enableitem enablenav")}).on("disableitem",()=>{this.trigger("disabletools")}).on("enableitem",()=>{this.trigger("enabletools")}).on("error",()=>{this.trigger("disabletools enablenav")}).on("finish leave",()=>{this.trigger("disablenav disabletools"),this.flush()}).on("flush",()=>{this.destroy()}),this.getProxy().init().then(data=>{dataHolder.set("itemIdentifier",data.itemIdentifier),dataHolder.set("itemData",data.itemData)})},render(){const config=this.getConfig(),areaBroker=this.getAreaBroker();config.renderTo.append(areaBroker.getContainer()),areaBroker.getToolbox().render(areaBroker.getToolboxArea())},loadItem(itemIdentifier){return this.getProxy().getItem(itemIdentifier)},renderItem(itemIdentifier,itemData){const areaBroker=this.getAreaBroker(),options=this.getConfig().options,changeState=()=>{this.setItemState(itemIdentifier,"changed",!0)};return setContext(areaBroker.getContentArea()),new Promise((resolve,reject)=>{itemData.content=itemData.content||{},assetManager.setData("baseUrl",itemData.baseUrl),assetManager.setData("assets",itemData.content.assets),this.itemRunner=qtiItemRunner(itemData.content.type,itemData.content.data,Object.assign({assetManager:assetManager},options)).on("error",err=>{this.trigger("enablenav"),reject(err),feedback().error(__("It seems that there is an error during item preview loading. Please, try again."))}).on("init",function onItemRunnerInit(){const{state,portableElements}=itemData;this.render(areaBroker.getContentArea(),{state,portableElements})}).on("render",function onItemRunnerRender(){this.on("responsechange",changeState),this.on("statechange",changeState),resolve()}).init()})},unloadItem(){return this.trigger("beforeunloaditem disablenav disabletools"),this.itemRunner?new Promise(resolve=>{this.itemRunner.on("clear",resolve).clear()}):Promise.resolve()},destroy(){const areaBroker=this.getAreaBroker();this.itemRunner&&this.itemRunner.on("clear",restoreContext).clear(),this.itemRunner=null,areaBroker&&areaBroker.getToolbox().destroy()}}}),define("taoQtiTestPreviewer/previewer/proxy/itemDataHandlers",["module","context","lodash","core/moduleLoader"],function(module,context,_,moduleLoader){"use strict";const moduleConfig=module.config();let handlers=[];return moduleConfig.handlers&&moduleLoader({},_.isFunction).addList(moduleConfig.handlers).load(context.bundle).then(data=>handlers=data),function itemDataHandlers(itemData){return handlers.length?1===handlers.length?handlers[0](itemData):handlers.reduce(function(prev,cur){return prev.then(updateItemData=>cur(updateItemData)).catch(cur().reject)},handlers[0](itemData)):Promise.resolve(itemData)}}),define("taoQtiTestPreviewer/previewer/proxy/item",["lodash","core/promiseQueue","core/request","taoQtiTestPreviewer/previewer/config/item","taoQtiTestPreviewer/previewer/proxy/itemDataHandlers"],function(_,promiseQueue,coreRequest,configFactory,itemDataHandlers){"use strict";return{name:"qtiItemPreviewerProxy",install(){this.queue=promiseQueue(),this.prepareParams=function prepareParams(actionParams){const stringifyParams=["itemState","itemResponse"];return _.isPlainObject(actionParams)?_.mapValues(actionParams,(value,key)=>_.includes(stringifyParams,key)?JSON.stringify(value):value):actionParams},this.request=function request(url,reqParams,contentType,noToken){return coreRequest({url:url,data:this.prepareParams(reqParams),method:reqParams?"POST":"GET",contentType:contentType,noToken:noToken,background:!1,sequential:!0,timeout:this.configStorage.getTimeout()}).then(response=>(this.setOnline(),response&&response.success?Promise.resolve(response):Promise.reject(response))).catch(error=>(error.data&&this.isConnectivityError(error.data)&&this.setOffline("request"),Promise.reject(error)))}},init(config,params){return this.configStorage=configFactory(config||{}),this.request(this.configStorage.getTestActionUrl("init"),params,void 0,!0)},destroy(){return this.configStorage=null,this.queue=null,Promise.resolve()},callTestAction(action,params){return this.request(this.configStorage.getTestActionUrl(action),params,void 0,!0)},callItemAction(itemIdentifier,action,params){return this.request(this.configStorage.getItemActionUrl(itemIdentifier,action),params,void 0,!0)},getItem(itemIdentifier,params){return this.request(this.configStorage.getItemActionUrl(itemIdentifier,"getItem"),params,void 0,!0).then(itemData=>itemDataHandlers(itemData))},submitItem(itemIdentifier,state,response,params){const body=_.merge({itemState:state,itemResponse:response},params||{});return this.request(this.configStorage.getItemActionUrl(itemIdentifier,"submitItem"),body,void 0,!0)}}}),define("taoQtiTestPreviewer/previewer/proxy/test",["core/promiseQueue","core/request","util/url","taoQtiTest/runner/helpers/map","taoQtiTestPreviewer/previewer/proxy/itemDataHandlers"],function(promiseQueue,request,urlUtil,mapHelper,itemDataHandlers){"use strict";var _Mathmin2=Math.min;function updateTestContextWithItem(testMap,position,testContext,presetMap){const jump=mapHelper.getJump(testMap,position),item=mapHelper.getItemAt(testMap,position);item&&(testContext.testPartId=jump.part,testContext.sectionId=jump.section,testContext.itemIdentifier=jump.identifier,testContext.itemSessionState=itemSessionStates.initial,testContext.options=createContextOptions(item,presetMap),testContext.allowSkipping=item.allowSkipping)}function createContextOptions(item,presetMap){const options={};return presetMap.forEach(category=>{const pluginId=Object.keys(category)[0],categoryId=category[pluginId];item.categories.includes(categoryId)&&(options[pluginId]=!0)}),options}const serviceControllerInit="TestPreviewer",serviceControllerGetItem="Previewer",serviceExtension="taoQtiTestPreviewer",testSessionStates=Object.freeze({initial:0,interacting:1,modalFeedback:2,suspended:3,closed:4}),itemSessionStates=Object.freeze({initial:0,interacting:1,modalFeedback:2,suspended:3,closed:4,solution:5,review:6});return{name:"qtiTestPreviewerProxy",install(){this.queue=promiseQueue()},init(configs){return this.itemStore={},request({url:urlUtil.route("init",serviceControllerInit,serviceExtension),data:{testUri:configs.options.testUri},noToken:!0}).then(response=>{const data=response.data;this.builtTestMap=mapHelper.reindex(data.testMap),this.presetMap=data.presetMap||[],delete data.presetMap;const firstJump=this.builtTestMap.jumps[0]||{},firstItem=mapHelper.getItemAt(this.builtTestMap,0);return data.testContext={itemIdentifier:firstJump.identifier,itemPosition:0,itemSessionState:0,testPartId:firstJump.part,sectionId:firstJump.section,canMoveBackward:!0,state:testSessionStates.interacting,attempt:1,options:createContextOptions(firstItem,this.presetMap),allowSkipping:firstItem.allowSkipping},data})},destroy(){return this.queue=null,this.itemStore&&(this.itemStore=null),Promise.resolve()},getItem(itemIdentifier){if(itemIdentifier in this.itemStore)return Promise.resolve(this.itemStore[itemIdentifier]);else{const{uri}=mapHelper.getItem(this.builtTestMap,itemIdentifier)||{};if(!uri)throw new Error(`There is no item ${itemIdentifier} in the testMap!`);return request({url:urlUtil.route("getItem",serviceControllerGetItem,serviceExtension),data:{serviceCallId:"previewer",itemUri:uri},noToken:!0}).then(data=>(data.itemData=data.content,data.itemIdentifier=data.content.data.identifier,data.itemState={},this.itemStore[itemIdentifier]=data,data)).then(itemData=>itemDataHandlers(itemData))}},callItemAction(itemIdentifier,action){let params=2{var _Mathmax=Math.max;if("next"===params.direction||"skip"===action)if("testPart"===params.scope){const testPartPosition=testMap.parts[testContext.testPartId].position,nextPartsSorted=Object.values(testMap.parts).filter(p=>p.position>testPartPosition).sort((a,b)=>a.position-b.position);0===nextPartsSorted.length?testContext.state=testSessionStates.closed:testContext.itemPosition=_Mathmin2(testMap.stats.total-1,nextPartsSorted[0].position)}else testContext.itemPosition+1>=testMap.stats.total?testContext.state=testSessionStates.closed:testContext.itemPosition=_Mathmin2(testMap.stats.total-1,testContext.itemPosition+1);return"previous"===params.direction&&(testContext.itemPosition=_Mathmax(0,testContext.itemPosition-1)),"jump"===params.direction&&0<=params.ref&&(testContext.itemPosition=params.ref),updateTestContextWithItem(testMap,testContext.itemPosition,testContext,this.presetMap),{testContext,testMap}},flagItem:()=>Promise.resolve()};if(actions.skip=actions.move,params.itemState&&(this.itemStore[itemIdentifier].itemState=params.itemState),"function"==typeof actions[action])return actions[action]()},callTestAction(){return Promise.resolve()}}}),define("tpl!taoQtiTestPreviewer/previewer/component/test/tpl/qtiTest",["handlebars"],function(hb){return hb.template(function(Handlebars,depth0,helpers,partials,data){this.compilerInfo=[4,">= 1.0.0"],helpers=this.merge(helpers,Handlebars.helpers),data=data||{};var helper,options,buffer="",helperMissing=helpers.helperMissing,escapeExpression=this.escapeExpression;return buffer+="",buffer})}),define("css!taoQtiTestPreviewer/previewer/component/test/css/qtiTest",[],function(){}),define("taoQtiTestPreviewer/previewer/component/test/qtiTest",["context","lodash","layout/loading-bar","taoTests/runner/runnerComponent","taoQtiTest/runner/config/assetManager","taoItems/assets/strategies","tpl!taoQtiTestPreviewer/previewer/component/test/tpl/qtiTest","css!taoQtiTestPreviewer/previewer/component/test/css/qtiTest","css!taoQtiTestCss/new-test-runner"],function(context,__,loadingBar,runnerComponentFactory,assetManagerFactory,assetStrategies,runnerTpl){"use strict";return function qtiTestPreviewerFactory(container){let config=1{loadingBar.stop(),this.destroy()})})}}),define("taoQtiTestPreviewer/previewer/adapter/test/qtiTest",["lodash","core/promiseQueue","core/request","util/url","core/logger","taoQtiTestPreviewer/previewer/component/test/qtiTest","ui/feedback","taoQtiTestPreviewer/previewer/component/topBlock/topBlock"],function(_,promiseQueue,request,urlUtil,loggerFactory,qtiTestPreviewerFactory,feedback,topBlockFactory){"use strict";const taoExtension="taoQtiTestPreviewer",testPreviewerController="TestPreviewer",logger=loggerFactory("taoQtiTestPreviewer/previewer"),defaultPlugins=[{module:"taoQtiTestPreviewer/previewer/plugins/content/cloneLogoInTestPreview",bundle:"taoQtiTestPreviewer/loader/qtiPreviewer.min",category:"content"}],transformConfiguration=config=>{const plugins=Array.isArray(config.plugins)?[...defaultPlugins,...config.plugins]:defaultPlugins,{view,readOnly,fullPage,hideActionBars,pluginsOptions}=config,options=_.omit({view,readOnly,fullPage,hideActionBars},_.isUndefined);return request({url:urlUtil.route("configuration",testPreviewerController,taoExtension),noToken:!0}).then(response=>{const configuration=response.data;return configuration.providers.plugins=[...configuration.providers.plugins,...plugins],_.assign(configuration.options,options),pluginsOptions&&(!configuration.options.plugins&&(configuration.options.plugins={}),_.assign(configuration.options.plugins,pluginsOptions)),configuration})};return{name:"qtiTest",install(){this.queue=promiseQueue()},init(testUri){let config=1{testPreviewConfig.options.testUri=testUri;let topBlock=null;const previewComponent=qtiTestPreviewerFactory(window.document.body,testPreviewConfig).on("ready",function(runner){topBlock=topBlockFactory(window.document.body,{isTest:"test"===testPreviewConfig.options.review.scope,title:runner.getTestMap().title,onClose:()=>{runner.trigger("exit")}})}).on("error",function(err){topBlock&&(topBlock.destroy(),topBlock=null),_.isUndefined(err.message)||feedback().error(err.message),logger.error(err)}).on("destroy",()=>{topBlock&&(topBlock.destroy(),topBlock=null)});return previewComponent})},destroy(){return this.queue=null,Promise.resolve()}}}),function(c){var d=document,a="appendChild",i="styleSheet",s=d.createElement("style");s.type="text/css",d.getElementsByTagName("head")[0].appendChild(s),s.styleSheet?s.styleSheet.cssText=c:s.appendChild(d.createTextNode(c))}(".previewer,.previewer-component{position:relative}.item-previewer-scope{position:relative;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;height:calc(100vh - 0px)}.item-previewer-scope .test-runner-sections{-webkit-flex:1 1 0%;-ms-flex:1 1 0%;flex:1 1 0%;overflow:hidden;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}.item-previewer-scope .test-sidebar{background:#f3f1ef;-webkit-flex:0 1 auto;-ms-flex:0 1 auto;flex:0 1 auto;height:calc(100vh - 80px);overflow-y:auto;max-width:350px}.item-previewer-scope .test-sidebar>.qti-panel{max-width:350px;padding:10px}@media only screen and (max-device-width: 800px){.item-previewer-scope .test-sidebar{max-width:200px}.item-previewer-scope .test-sidebar>.qti-panel{max-width:200px}}@media only screen and (min-device-width: 800px)and (max-device-width: 1280px){.item-previewer-scope .test-sidebar{max-width:250px}.item-previewer-scope .test-sidebar>.qti-panel{max-width:250px}}@media only screen and (min-device-width: 1280px)and (max-device-width: 1440px){.item-previewer-scope .test-sidebar{max-width:300px}.item-previewer-scope .test-sidebar>.qti-panel{max-width:300px}}.item-previewer-scope .test-sidebar-left{border-right:1px #ddd solid}.item-previewer-scope .test-sidebar-right{border-left:1px #ddd solid}.item-previewer-scope .content-wrapper{position:relative;-webkit-flex:1 1 0%;-ms-flex:1 1 0%;flex:1 1 0%;overflow:auto;padding:0}.item-previewer-scope .content-wrapper .overlay{position:absolute;left:0;right:0;top:0;bottom:0;width:100%;opacity:.9}.item-previewer-scope .content-wrapper .overlay-full{background-color:#fff;opacity:1}.item-previewer-scope #qti-content{-webkit-overflow-scrolling:touch;max-width:1024px;width:100%;margin:auto}.item-previewer-scope #qti-item{width:100%;min-width:100%;height:auto;overflow:visible}.item-previewer-scope .qti-item{padding:30px}.item-previewer-scope .size-wrapper{max-width:1280px;margin:auto;width:100%;padding-right:40px}.item-previewer-scope #qti-rubrics{margin:auto;max-width:1024px;width:100%}.item-previewer-scope #qti-rubrics .qti-rubricBlock{margin:20px 0}.item-previewer-scope #qti-rubrics .hidden{display:none}.no-controls .item-previewer-scope{height:100vh}.previewer-component{background:inherit}.previewer-component.fullpage{position:absolute;top:0;left:0;right:0;bottom:0;z-index:100000}.previewer-component.fullpage .item-previewer-scope{height:100vh}.previewer-component.readonly .qti-item::before{content:\" \";position:absolute;top:0;left:0;right:0;bottom:0;z-index:100000}.previewer-component.hideactionbars .test-sidebar{height:100%}.previewer-component.hideactionbars .action-bar{display:none}.item-previewer-scope .preview-console-closer{position:absolute;right:10px;top:10px;cursor:pointer;color:rgba(255,255,255,.9);text-shadow:none}.item-previewer-scope .preview-console-closer:hover{color:#fff}.item-previewer-scope .preview-console{background:#2b2b2b;color:#fff;font-family:Consolas,\"Andale Mono WT\",\"Andale Mono\",\"Lucida Console\",\"Lucida Sans Typewriter\",\"DejaVu Sans Mono\",\"Bitstream Vera Sans Mono\",\"Liberation Mono\",\"Nimbus Mono L\",Monaco,\"Courier New\",Courier,monospace;position:relative}.item-previewer-scope .preview-console .preview-console-body{padding:5px;margin:0;height:30vh;overflow:auto}.item-previewer-scope .preview-console .preview-console-body .log-time{color:#999}.item-previewer-scope .preview-console .preview-console-body .log-type{color:#eee}.item-previewer-scope .preview-console .preview-console-body .log-message{color:#69f}.item-previewer-scope .preview-console .preview-console-body pre{margin:0}.item-previewer-scope .action-bar.content-action-bar{padding:2px}.item-previewer-scope .action-bar.content-action-bar li{margin:2px 0 0 10px;border:none}.item-previewer-scope .action-bar.content-action-bar li.btn-info{padding-top:6px;height:33px;margin-top:0;border-bottom:solid 2px rgba(0,0,0,0);border-radius:0}.item-previewer-scope .action-bar.content-action-bar li.btn-info.btn-group{border:none !important;overflow:hidden;padding:0}.item-previewer-scope .action-bar.content-action-bar li.btn-info.btn-group a{float:left;margin:0 2px;padding:0 15px;border:1px solid rgba(255,255,255,.3);border-radius:0px;display:inline-block;height:inherit}.item-previewer-scope .action-bar.content-action-bar li.btn-info.btn-group a:first-of-type{border-top-left-radius:3px;border-bottom-left-radius:3px;margin-left:0}.item-previewer-scope .action-bar.content-action-bar li.btn-info.btn-group a:last-of-type{border-top-right-radius:3px;border-bottom-right-radius:3px;margin-right:0}.item-previewer-scope .action-bar.content-action-bar li.btn-info.btn-group a:hover,.item-previewer-scope .action-bar.content-action-bar li.btn-info.btn-group a.active{border-color:rgba(255,255,255,.8)}.item-previewer-scope .action-bar.content-action-bar li.btn-info.btn-group a .no-label{padding-right:0}.item-previewer-scope .action-bar.content-action-bar li.btn-info:hover,.item-previewer-scope .action-bar.content-action-bar li.btn-info.active{border-bottom-color:rgba(255,255,255,.8)}.item-previewer-scope .action-bar.content-action-bar li.btn-info:active,.item-previewer-scope .action-bar.content-action-bar li.btn-info.active{background:#e7eff4;border-color:rgba(255,255,255,.8)}.item-previewer-scope .action-bar.content-action-bar li.btn-info:active a,.item-previewer-scope .action-bar.content-action-bar li.btn-info.active a{color:#266d9c;text-shadow:none}.item-previewer-scope .action-bar.content-action-bar li.btn-info:active:hover,.item-previewer-scope .action-bar.content-action-bar li.btn-info.active:hover{background:#fff}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar{opacity:1;height:40px}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.top-action-bar>.control-box{height:40px;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-justify-content:space-between;-ms-flex-pack:space-between;justify-content:space-between;padding-left:10px;padding-right:40px}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box{color:rgba(255,255,255,.9);text-shadow:1px 1px 0 #000}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box .lft,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box .rgt{padding-left:20px}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box .lft:first-child,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box .rgt:first-child{padding-left:0}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box .lft:last-child ul,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box .rgt:last-child ul{display:inline-block}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box [class^=btn-],.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box [class*=\" btn-\"]{white-space:nowrap}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box{position:relative;overflow:visible}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .action{position:relative;overflow:visible}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu{color:#222;background:#f3f1ef;border:1px solid #aaa9a7;overflow:auto;list-style:none;min-width:150px;margin:0;padding:0;position:absolute;bottom:36px;left:-3px}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action{display:inline-block;text-align:left;width:100%;white-space:nowrap;overflow:hidden;color:#222;border-bottom:1px solid #c2c1bf;margin:0;-moz-border-radius:0px;-webkit-border-radius:0px;border-radius:0px;height:32px;padding:6px 15px;line-height:1;border-left:solid 3px rgba(0,0,0,0)}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action .icon-checkbox-checked{display:none}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.active{background-color:#dbd9d7;font-weight:bold}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.hover .icon-checkbox,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action:hover .icon-checkbox,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.active .icon-checkbox{display:none}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.hover .icon-checkbox-checked,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action:hover .icon-checkbox-checked,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.active .icon-checkbox-checked{display:inline-block}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.hover,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action:hover{background-color:#0e5d91;color:#fff;border-left-color:#313030 !important}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.hover .label,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.hover .icon,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action:hover .label,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action:hover .icon{color:#fff}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.hover .icon,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action:hover .icon{color:#e7eff4}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action .label,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action .icon{font-size:14px;font-size:1.4rem;text-shadow:none;color:#222}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar{overflow:visible;position:relative}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .action{line-height:1.6}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .icon.no-label{padding-right:0}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .tool-label-collapsed .btn-info .text,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .tool-label-collapsed-hover .btn-info:not(:hover) .text,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .btn-info.no-tool-label .text,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .btn-info.tool-label-collapsed .text,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .btn-info.tool-label-collapsed-over:not(:hover) .text{display:none}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .tool-label-collapsed .btn-info .icon,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .tool-label-collapsed-hover .btn-info:not(:hover) .icon,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .btn-info.no-tool-label .icon,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .btn-info.tool-label-collapsed .icon,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .btn-info.tool-label-collapsed-over:not(:hover) .icon{padding:0}\n\n/*# sourceMappingURL=taoQtiTestPreviewer/previewer/provider/item/css/item.css.map */.top-block-preview{position:fixed;top:0;left:50%;z-index:10000;display:flex;flex-direction:column;align-items:center;justify-content:center}.top-block-preview.open{transform:translate(-50%, 0);transition:transform .5s ease-out}.top-block-preview.close{transform:translate(-50%, calc(30px - 100%));transition:transform .5s ease-out}.top-block-preview-main{display:flex;padding:12px 24px;background-color:#f3f1ef;border:solid 1px #e5e4e4}.top-block-preview-main .btn-info{margin-left:16px;white-space:nowrap}.top-block-preview-main .btn-info .icon{padding-left:9px;padding-right:0}.top-block-preview-info{display:flex;align-items:center;justify-content:center}.top-block-preview-info p{margin-bottom:0}.top-block-preview-collapser{position:relative;width:60px;height:30px;background-color:#f3f1ef;border-bottom-left-radius:30px;border-bottom-right-radius:30px;transform:translateY(-10px);display:flex;align-items:center;justify-content:center;cursor:pointer;border-left:solid 1px #e5e4e4;border-right:solid 1px #e5e4e4}.top-block-preview-collapser::before{content:\" \";width:60px;height:10px;background-color:#f3f1ef;position:absolute;top:-1px}\n\n/*# sourceMappingURL=taoQtiTestPreviewer/previewer/component/topBlock/css/topBlock.css.map */.devices-previewer{width:100%;height:100%}.devices-previewer:not(.disabled)[data-type=desktop],.devices-previewer:not(.disabled)[data-type=mobile]{overflow:hidden}.devices-previewer:not(.disabled)[data-type=desktop] .preview-container,.devices-previewer:not(.disabled)[data-type=mobile] .preview-container{position:relative}.devices-previewer:not(.disabled)[data-type=desktop] .preview-frame,.devices-previewer:not(.disabled)[data-type=mobile] .preview-frame{position:relative;border:3px #aaa ridge;background:#5a5a5a;background:linear-gradient(135deg, rgb(90, 90, 90) 0%, rgb(86, 86, 86) 7%, rgb(68, 68, 68) 15%, rgb(20, 20, 20) 30%);-webkit-box-shadow:5px 5px 10px 0 rgba(0, 0, 0, 0.7);-moz-box-shadow:5px 5px 10px 0 rgba(0, 0, 0, 0.7);-ms-box-shadow:5px 5px 10px 0 rgba(0, 0, 0, 0.7);-o-box-shadow:5px 5px 10px 0 rgba(0, 0, 0, 0.7);box-shadow:5px 5px 10px 0 rgba(0, 0, 0, 0.7)}.devices-previewer:not(.disabled)[data-type=desktop] .preview-content,.devices-previewer:not(.disabled)[data-type=mobile] .preview-content{background:#fff;border-radius:3px;border:2px solid;border-color:#444 #999 #999 #444;overflow:auto}.devices-previewer:not(.disabled)[data-type=mobile] .preview-frame{border-radius:25px;padding:40px}.devices-previewer:not(.disabled)[data-type=desktop] .preview-frame{border-radius:5px;padding:30px}\n\n/*# sourceMappingURL=taoQtiTestPreviewer/previewer/plugins/tools/scale/component/css/devicesPreviewer.css.map */.devices-selector{display:-ms-flex;display:-webkit-flex;display:flex;-ms-flex-direction:row;-webkit-flex-direction:row;flex-direction:row}.devices-selector[data-type=standard] .desktop-selector,.devices-selector[data-type=standard] .mobile-selector,.devices-selector[data-type=standard] .orientation-selector{display:none}.devices-selector[data-type=desktop] .mobile-selector,.devices-selector[data-type=desktop] .orientation-selector{display:none}.devices-selector[data-type=mobile] .desktop-selector{display:none}.devices-selector .selector{display:inline-block;margin-top:.3em}.devices-selector .selector:not(:last-child){margin-right:1rem}.devices-selector .selector select{overflow:visible}.devices-selector .selector .select2-container{text-shadow:none}\n\n/*# sourceMappingURL=taoQtiTestPreviewer/previewer/plugins/tools/scale/component/css/devicesSelector.css.map */.previewer-test-component{background:inherit}.previewer-test-component.fullpage{position:absolute;top:0;left:0;right:0;bottom:64px;z-index:1000}.previewer-test-component.fullpage .item-previewer-scope{height:100vh}.previewer-test-component.readonly .qti-item::before{content:\" \";position:absolute;top:0;left:0;right:0;bottom:0;z-index:100000}.previewer-test-component.hideactionbars .test-sidebar{height:100%}.previewer-test-component.hideactionbars .action-bar{display:none}.previewer-test-component #preview-logo{margin:6px 30px 6px 30px;display:block;max-width:200px;height:52px;background:rgba(0,0,0,0)}.previewer-test-component footer{z-index:10000;position:relative;font-size:11px;padding:10px;border-top:1px #ddd solid}\n\n/*# sourceMappingURL=taoQtiTestPreviewer/previewer/component/test/css/qtiTest.css.map */"),define("taoQtiTestPreviewer/loader/qtiPreviewer.bundle",function(){}),define("taoQtiTestPreviewer/loader/qtiPreviewer.min",["taoItems/loader/taoItemsRunner.min","taoTests/loader/taoTestsRunner.min","taoQtiItem/loader/taoQtiItemRunner.min","taoQtiTest/loader/taoQtiTestRunner.min","taoQtiTest/loader/testPlugins.min"],function(){}); +define("tpl!taoQtiTestPreviewer/previewer/runner",["handlebars"],function(hb){return hb.template(function(Handlebars,depth0,helpers,partials,data){return this.compilerInfo=[4,">= 1.0.0"],helpers=this.merge(helpers,Handlebars.helpers),data=data||{},"
      "})}),define("taoQtiTestPreviewer/previewer/runner",["taoTests/runner/runnerComponent","tpl!taoQtiTestPreviewer/previewer/runner"],function(runnerComponentFactory,runnerTpl){"use strict";return function previewerFactory(container){let config=1this.destroy())})}}),define("css!taoQtiTestPreviewer/previewer/provider/item/css/item",[],function(){}),define("taoQtiTestPreviewer/previewer/component/qtiItem",["context","taoQtiTestPreviewer/previewer/runner","css!taoQtiTestPreviewer/previewer/provider/item/css/item"],function(context,previewerFactory){"use strict";return function qtiItemPreviewerFactory(container){let config=1{if(config.itemState&&runner.on("renderitem",()=>runner.itemRunner.setState(config.itemState)),config.itemUri)return runner.loadItem(config.itemUri)})}}),define("taoQtiTestPreviewer/previewer/adapter/item/qtiItem",["lodash","core/logger","taoQtiTestPreviewer/previewer/component/qtiItem","ui/feedback"],function(_,loggerFactory,qtiItemPreviewerFactory,feedback){"use strict";const logger=loggerFactory("taoQtiTest/previewer"),defaultPlugins=[{module:"taoQtiTestPreviewer/previewer/plugins/controls/close",bundle:"taoQtiTestPreviewer/loader/qtiPreviewer.min",category:"controls"},{module:"taoQtiTestPreviewer/previewer/plugins/navigation/submit/submit",bundle:"taoQtiTestPreviewer/loader/qtiPreviewer.min",category:"navigation"},{module:"taoQtiTestPreviewer/previewer/plugins/tools/scale/scale",bundle:"taoQtiTestPreviewer/loader/qtiPreviewer.min",category:"tools"},{module:"taoQtiTest/runner/plugins/tools/itemThemeSwitcher/itemThemeSwitcher",bundle:"taoQtiTest/loader/testPlugins.min",category:"tools"},{module:"taoQtiTestPreviewer/previewer/plugins/content/enhancedReadOnlyMode",bundle:"taoQtiTestPreviewer/loader/qtiPreviewer.min",category:"content"}];return{name:"qtiItem",init(uri,state){let config=2= 1.0.0"],helpers=this.merge(helpers,Handlebars.helpers),data=data||{};var helper,options,buffer="",helperMissing=helpers.helperMissing,escapeExpression=this.escapeExpression;return buffer+="
      \n\t
      \n\t\t
      \n\t\t\n\t
      \n\t
      \n
      ",buffer})}),define("tpl!taoQtiTestPreviewer/previewer/component/topBlock/tpl/topBlockData",["handlebars"],function(hb){return hb.template(function(Handlebars,depth0,helpers,partials,data){this.compilerInfo=[4,">= 1.0.0"],helpers=this.merge(helpers,Handlebars.helpers),data=data||{};var stack1,helper,buffer="",functionType="function",escapeExpression=this.escapeExpression;return buffer+="

      ",(helper=helpers.name)?stack1=helper.call(depth0,{hash:{},data:data}):(helper=depth0&&depth0.name,stack1="function"===typeof helper?helper.call(depth0,{hash:{},data:data}):helper),buffer+=escapeExpression(stack1)+" ",(helper=helpers.title)?stack1=helper.call(depth0,{hash:{},data:data}):(helper=depth0&&depth0.title,stack1="function"===typeof helper?helper.call(depth0,{hash:{},data:data}):helper),buffer+=escapeExpression(stack1)+"

      ",buffer})}),define("css!taoQtiTestPreviewer/previewer/component/topBlock/css/topBlock",[],function(){}),define("taoQtiTestPreviewer/previewer/component/topBlock/topBlock",["jquery","lodash","i18n","ui/component","tpl!taoQtiTestPreviewer/previewer/component/topBlock/tpl/topBlock","tpl!taoQtiTestPreviewer/previewer/component/topBlock/tpl/topBlockData","css!taoQtiTestPreviewer/previewer/component/topBlock/css/topBlock"],function($,_,__,componentFactory,topBlockTpl,topBlockDataTpl){"use strict";function topBlockFactory(container,config){const topBlock=componentFactory().setTemplate(topBlockTpl).on("init",function(){this.render(container)}).on("render",function(){const $info=$(topBlockDataTpl({name:config.isTest?__("Test Preview:"):__("Item Preview:"),title:config.title})),$element=this.getElement();$element.find(".top-block-preview-info").append($info),$element.find(".close").on("click",config.onClose);const $icon=$element.find(".top-block-preview-collapser .icon");$element.find(".top-block-preview-collapser").on("click",()=>{$icon.toggleClass("icon-up"),$icon.toggleClass("icon-down"),$element.toggleClass("open"),$element.toggleClass("close")}),this.trigger("ready")});return _.defer(function(){topBlock.init(config)}),topBlock}return topBlockFactory}),define("taoQtiTestPreviewer/previewer/config/item",["lodash","util/url","util/config"],function(_,urlUtil,configHelper){"use strict";var _defaults={bootstrap:{serviceController:"Previewer",serviceExtension:"taoQtiTestPreviewer"}},_entries={serviceCallId:!0,bootstrap:!1,timeout:!1};return function itemPreviewerConfigFactory(config){var undef,storage=configHelper.from(config,_entries,_defaults);return storage.timeout?storage.timeout*=1e3:storage.timeout=undef,{getParameters:function getParameters(itemIdentifier){var type=typeof itemIdentifier,parameters={serviceCallId:this.getServiceCallId()};if("string"==type)parameters.itemUri=itemIdentifier;else if("object"===type&&_.isPlainObject(itemIdentifier))_.merge(parameters,itemIdentifier);else if("undefined"!==type)throw new TypeError("Wrong parameter type provided for itemIdentifier: "+type+". Only string or plain object are allowed!");return parameters},getServiceCallId:function getServiceCallId(){return storage.serviceCallId},getServiceController:function getServiceController(){return storage.bootstrap.serviceController||_defaults.bootstrap.serviceController},getServiceExtension:function getServiceExtension(){return storage.bootstrap.serviceExtension||_defaults.bootstrap.serviceExtension},getTestActionUrl:function getTestActionUrl(action){return urlUtil.route(action,this.getServiceController(),this.getServiceExtension(),this.getParameters())},getItemActionUrl:function getItemActionUrl(itemIdentifier,action){return urlUtil.route(action,this.getServiceController(),this.getServiceExtension(),this.getParameters(itemIdentifier))},getTimeout:function getTimeout(){return storage.timeout}}}}),define("json!taoQtiTestPreviewer/previewer/resources/devices.json",function(){return{tablets:{"193986c3715c81838870f908fa98d69a":{label:"Amazon Kindle Fire HDX 7\u2033",width:960,height:600},"4e8eafab11aad1486992d7ee2c8c16ca":{label:"Apple iPad",width:1024,height:768},"5aac2932d9ad00d6d8a1604b8f9e4e8d":{label:"Google Nexus 10, Motorola Xoom, Xyboard",width:1280,height:800},"9805d9753ad08c7630a9ee5418aa6c6c":{label:"Google Nexus 7",width:966,height:604},d4a431cedf4705d6bf2cba6d5788378b:{label:"Samsung Galaxy Tab 7.7, 8.9, 10.1",width:1280,height:800}},phones:{"1b89338531ef0155c8d6abc2ac02c81a":{label:"Apple iPhone 3GS",width:320,height:480,scaleFactor:1,dpWidth:320,dpHeight:480},"3f89da99d84214cde7df87ebe0699a6f":{label:"Apple iPhone 4",width:640,height:960,scaleFactor:2,dpWidth:320,dpHeight:1920},"0d36971a5b98b367f54ced708c9af849":{label:"Apple iPhone 5",width:640,height:1136,scaleFactor:2,dpWidth:320,dpHeight:2272},"026beffcc051af995660ebdede986ace":{label:"BlackBerry Z10",width:768,height:1280,scaleFactor:2,dpWidth:384,dpHeight:2560},fd2dd53e667d6d49e4fa73356fa941dd:{label:"BlackBerry Z30",width:720,height:1280,scaleFactor:2,dpWidth:360,dpHeight:2560},"707584c1ae17d9b5b2cbe8603c91c147":{label:"Google Nexus 4",width:768,height:1280,scaleFactor:2,dpWidth:384,dpHeight:2560},"91823264de952e7f2347e07db5c4058b":{label:"Google Nexus 5",width:1080,height:1920,scaleFactor:3,dpWidth:360,dpHeight:5760},cd69817a6e147e8a4677389e56fcf568:{label:"Google Nexus S",width:480,height:800,scaleFactor:1.5,dpWidth:320,dpHeight:1200},"75994faa6a38e31e99b53fcd75534a33":{label:"HTC Evo, Touch HD, Desire HD, Desire",width:480,height:800,scaleFactor:1.5,dpWidth:320,dpHeight:1200},"0cab4dfccdfc880687cb608cfe4159db":{label:"HTC One X, EVO LTE",width:720,height:1280,scaleFactor:2,dpWidth:360,dpHeight:2560},c4ff41fcba24d74fc21dc3490ca1edc9:{label:"HTC Sensation, Evo 3D",width:540,height:960,scaleFactor:1.5,dpWidth:360,dpHeight:1440},fa969a5e0dd2de53700eeee4ba4ba142:{label:"LG Optimus 2X, Optimus 3D, Optimus Black",width:480,height:800,scaleFactor:1.5,dpWidth:320,dpHeight:1200},"33c4f9364e295ec03531f3a3425819cf":{label:"LG Optimus G",width:768,height:1280,scaleFactor:2,dpWidth:384,dpHeight:2560},bc47f5275f0efd56fee52d43a8082981:{label:"LG Optimus LTE, Optimus 4X HD",width:720,height:1280,scaleFactor:1.7,dpWidth:424,dpHeight:2176},"0732887e6e324fd10777b735520a34cf":{label:"LG Optimus One",width:320,height:480,scaleFactor:1.5,dpWidth:213,dpHeight:720},"2e38a78364f09d0da0e9e1a3a68e7fb0":{label:"Motorola Defy, Droid, Droid X, Milestone",width:480,height:854,scaleFactor:1.5,dpWidth:320,dpHeight:1281},bd4b78dddc7c9625a4141a1b1ddabb87:{label:"Motorola Droid 3, Droid 4, Droid Razr, Atrix 4G, Atrix 2",width:540,height:960,scaleFactor:1,dpWidth:540,dpHeight:960},"3bf1edf21cfa81006183d2b02974c84e":{label:"Motorola Droid Razr HD",width:720,height:1280,scaleFactor:1,dpWidth:720,dpHeight:1280},ab5a352e0e016b97dac986f06c394f55:{label:"Nokia C5, C6, C7, N97, N8, X7",width:360,height:640,scaleFactor:1,dpWidth:360,dpHeight:640},"4826fb7d7257aeaac992ce699df41b3c":{label:"Nokia Lumia 7X0, Lumia 8XX, Lumia 900, N800, N810, N900",width:480,height:800,scaleFactor:1.5,dpWidth:320,dpHeight:1200},"0a691ab20add7c432200f8fa6527b488":{label:"Samsung Galaxy Note",width:800,height:1280,scaleFactor:2,dpWidth:400,dpHeight:2560},"9c23ee31be29960fbac9e9bbfc2fc7b0":{label:"Samsung Galaxy Note 3",width:1080,height:1920,scaleFactor:2,dpWidth:540,dpHeight:3840},"92177c0508c1d73905a58e2338f2a81f":{label:"Samsung Galaxy Note II",width:720,height:1280,scaleFactor:2,dpWidth:360,dpHeight:2560},"5222b8866dc4cc606725e16ffcc0a783":{label:"Samsung Galaxy S III, Galaxy Nexus",width:720,height:1280,scaleFactor:2,dpWidth:360,dpHeight:2560},"37c1541e2bd55cfd0f4073b0ccdf68b3":{label:"Samsung Galaxy S, S II, W",width:480,height:800,scaleFactor:1.5,dpWidth:320,dpHeight:1200},"2f7f64b7dda0144907ff300e83eed465":{label:"Samsung Galaxy S4",width:1080,height:1920,scaleFactor:3,dpWidth:360,dpHeight:5760},"9c24f9057744dad56043702a9703127f":{label:"Sony Xperia S, Ion",width:720,height:1280,scaleFactor:2,dpWidth:360,dpHeight:2560},"0a8b2732a016a9395c3af5f12dd9c0da":{label:"Sony Xperia Sola, U",width:480,height:854,scaleFactor:1,dpWidth:480,dpHeight:854},"5a153d7f53d82dcb0801f041574a6a43":{label:"Sony Xperia Z, Z1",width:1080,height:1920,scaleFactor:3,dpWidth:360,dpHeight:5760}},screens:{"9e523ae15b61dc766f5c818726881ecf":{label:"1920 \xD7 1080",width:1920,height:1080,dpWidth:1920,dpHeight:1080,scaleFactor:1},"07769cd8d0a7d09818b2f0b018042fb7":{label:"1366 \xD7 768",width:1366,height:768,dpWidth:1366,dpHeight:768,scaleFactor:1},"72d5478a24194f98b9378e8e0fd65737":{label:"1280 \xD7 1024",width:1280,height:1024,dpWidth:1280,dpHeight:1024,scaleFactor:1},b7a6dd5900cc72e61f0d3479c7e314ec:{label:"1280 \xD7 800",width:1280,height:800,dpWidth:1280,dpHeight:800,scaleFactor:1},"43193b0ff671a37d8232ab664190a125":{label:"1024 \xD7 768",width:1024,height:768,dpWidth:1024,dpHeight:768,scaleFactor:1},c29e48814af5443ff5688d9e967ce917:{label:"800 \xD7 600",width:800,height:600,dpWidth:800,dpHeight:600,scaleFactor:1}}}}),define("taoQtiTestPreviewer/previewer/helpers/devices",["lodash","json!taoQtiTestPreviewer/previewer/resources/devices.json"],function(_,deviceList){"use strict";var deviceTypeMap={mobile:"tablets",desktop:"screens"},devicesHelper={getDevicesByType:function getDevicesByType(type){var key=deviceTypeMap[type];return _.map(deviceList[key]||[],function mapDeviceData(device,identifier){return{value:identifier,label:device.label,width:device.width,height:device.height}})},getMobileDevices:function getMobileDevices(){return devicesHelper.getDevicesByType("mobile")},getDesktopDevices:function getDesktopDevices(){return devicesHelper.getDevicesByType("desktop")}};return devicesHelper}),define("taoQtiTestPreviewer/previewer/plugins/content/cloneLogoInTestPreview",["jquery","taoTests/runner/plugin"],function($,pluginFactory){"use strict";return pluginFactory({name:"cloneLogoInTestPreview",init(){const testRunner=this.getTestRunner();testRunner.after("ready",()=>{$("#tao-main-logo").clone().appendTo(".previewer-test-component header")})}})}),define("taoQtiTestPreviewer/previewer/plugins/content/enhancedReadOnlyMode",["jquery","lodash","i18n","taoTests/runner/plugin"],function($,_,__,pluginFactory){"use strict";return pluginFactory({name:"EnhancedReadOnlyMode",init(){const testRunner=this.getTestRunner(),isPluginAllowed=()=>{const config=testRunner.getConfig();return config.options.readOnly};testRunner.after("renderitem",()=>{if(isPluginAllowed()){const $contentArea=testRunner.getAreaBroker().getContentArea(),$extendedTextinteractionTextAreas=$contentArea.find(".qti-extendedTextInteraction textarea.text-container"),$ckeEditorsContent=$contentArea.find(".qti-extendedTextInteraction div.cke_contents");$extendedTextinteractionTextAreas.length&&$extendedTextinteractionTextAreas.each(function(){this.style.height=`${this.scrollHeight+20}px`}),$ckeEditorsContent.length&&$ckeEditorsContent.each(function(){const $ckeEditorContent=$(this),$ckeEditorIFrame=$ckeEditorContent.find("iframe.cke_wysiwyg_frame");$ckeEditorIFrame.on("load",()=>{setTimeout(()=>{const ckeEditorBody=$ckeEditorIFrame[0].contentWindow.document.querySelector("body");$ckeEditorContent[0].style.height=`${ckeEditorBody.scrollHeight+20}px`},0)})})}})}})}),define("taoQtiTestPreviewer/previewer/plugins/controls/close",["jquery","lodash","i18n","ui/hider","taoTests/runner/plugin","tpl!taoQtiTest/runner/plugins/templates/button"],function($,_,__,hider,pluginFactory,buttonTpl){"use strict";return pluginFactory({name:"close",init:function init(){function isPluginAllowed(){var config=testRunner.getConfig();return!config.options.hideActionBars}var self=this,testRunner=this.getTestRunner();this.$element=$(buttonTpl({control:"close",title:__("Close the previewer"),icon:"close",text:__("Close"),className:"context-action"})),this.$element.on("click",function(e){e.preventDefault(),!1!==self.getState("enabled")&&(self.disable(),testRunner.trigger("finish"))}),this.disable(),testRunner.on("enablenav",function(){isPluginAllowed()&&self.enable()}).on("disablenav",function(){self.disable()})},render:function render(){var $container=this.getAreaBroker().getArea("context");$container.append(this.$element)},destroy:function destroy(){this.$element.remove()},enable:function enable(){this.$element.prop("disabled",!1).removeClass("disabled")},disable:function disable(){this.$element.prop("disabled",!0).addClass("disabled")},show:function show(){hider.show(this.$element)},hide:function hide(){hider.hide(this.$element)}})}),define("tpl!taoQtiTestPreviewer/previewer/plugins/navigation/submit/preview-console",["handlebars"],function(hb){return hb.template(function(Handlebars,depth0,helpers,partials,data){return this.compilerInfo=[4,">= 1.0.0"],helpers=this.merge(helpers,Handlebars.helpers),data=data||{},"
      \n
        \n
        "})}),define("tpl!taoQtiTestPreviewer/previewer/plugins/navigation/submit/preview-console-line",["handlebars"],function(hb){return hb.template(function(Handlebars,depth0,helpers,partials,data){this.compilerInfo=[4,">= 1.0.0"],helpers=this.merge(helpers,Handlebars.helpers),data=data||{};var stack1,helper,buffer="",functionType="function",escapeExpression=this.escapeExpression;return buffer+="
      • ",(helper=helpers.time)?stack1=helper.call(depth0,{hash:{},data:data}):(helper=depth0&&depth0.time,stack1="function"===typeof helper?helper.call(depth0,{hash:{},data:data}):helper),buffer+=escapeExpression(stack1)+"",(helper=helpers.type)?stack1=helper.call(depth0,{hash:{},data:data}):(helper=depth0&&depth0.type,stack1="function"===typeof helper?helper.call(depth0,{hash:{},data:data}):helper),buffer+=escapeExpression(stack1)+"",(helper=helpers.message)?stack1=helper.call(depth0,{hash:{},data:data}):(helper=depth0&&depth0.message,stack1="function"===typeof helper?helper.call(depth0,{hash:{},data:data}):helper),(stack1||0===stack1)&&(buffer+=stack1),buffer+="
      • ",buffer})}),define("tpl!taoQtiTestPreviewer/previewer/plugins/navigation/submit/preview-console-closer",["handlebars"],function(hb){return hb.template(function(Handlebars,depth0,helpers,partials,data){this.compilerInfo=[4,">= 1.0.0"],helpers=this.merge(helpers,Handlebars.helpers),data=data||{};var helper,options,buffer="",helperMissing=helpers.helperMissing,escapeExpression=this.escapeExpression;return buffer+="",buffer})}),define("taoQtiTestPreviewer/previewer/plugins/navigation/submit/submit",["jquery","lodash","i18n","moment","ui/hider","ui/autoscroll","util/strPad","taoTests/runner/plugin","taoQtiItem/qtiCommonRenderer/helpers/PciResponse","taoQtiItem/runner/rendererStrategies","tpl!taoQtiTest/runner/plugins/templates/button","tpl!taoQtiTestPreviewer/previewer/plugins/navigation/submit/preview-console","tpl!taoQtiTestPreviewer/previewer/plugins/navigation/submit/preview-console-line","tpl!taoQtiTestPreviewer/previewer/plugins/navigation/submit/preview-console-closer"],function($,_,__,moment,hider,autoscroll,strPad,pluginFactory,pciResponse,rendererStrategies,buttonTpl,consoleTpl,consoleLineTpl,consoleCloserTpl){"use strict";const defaults={submitTitle:__("Submit and show the result"),submitText:__("Submit"),submitIcon:"forward"};return pluginFactory({name:"submit",init(){const testRunner=this.getTestRunner(),pluginConfig=_.defaults(this.getConfig(),defaults),isPluginAllowed=()=>{const config=testRunner.getConfig();return!config.options.readOnly&&"reviewRenderer"!==rendererStrategies(config.options.view).getName()},showConsole=()=>{hider.show(this.controls.$console),hider.show(this.controls.$consoleBody),hider.show(this.controls.$consoleCloser),autoscroll(this.controls.$consoleBody.children().last(),this.controls.$consoleBody)},hideConsole=()=>{hider.hide(this.controls.$console),hider.hide(this.controls.$consoleCloser)},addConsoleLine=(type,message)=>{const data={time:strPad(moment().format("HH:mm:ss"),12," "),type:strPad(type||"",18," "),message:strPad(message||"",18," ")};this.controls.$consoleBody.append($(consoleLineTpl(data)))},showResponses=(type,responses)=>{_.forEach(responses,(response,identifier)=>{addConsoleLine(type,strPad(`${identifier}: `,15," ")+_.escape(pciResponse.prettyPrint(response)))})};this.controls={$button:$(buttonTpl({control:"submit",title:pluginConfig.submitTitle,icon:pluginConfig.submitIcon,text:pluginConfig.submitText})),$console:$(consoleTpl()),$consoleCloser:$(consoleCloserTpl())},this.controls.$consoleBody=this.controls.$console.find(".preview-console-body"),this.controls.$button.on("click",e=>{e.preventDefault(),!1!==this.getState("enabled")&&(this.disable(),testRunner.trigger("submititem"))}),this.controls.$consoleCloser.on("click",e=>{e.preventDefault(),hideConsole()}),isPluginAllowed()||this.hide(),this.disable(),testRunner.on("render",()=>{isPluginAllowed()?this.show():this.hide()}).on("submitresponse",responses=>{showResponses(__("Submitted data"),responses),showConsole()}).on("scoreitem",responses=>{responses.itemSession&&(showResponses(__("Output data"),responses.itemSession),showConsole())}).on("enablenav",()=>{this.enable()}).on("disablenav",()=>{this.disable()})},render(){const $container=this.getAreaBroker().getContainer(),$navigation=this.getAreaBroker().getNavigationArea();$navigation.append(this.controls.$button),$navigation.append(this.controls.$consoleCloser),$container.append(this.controls.$console)},destroy(){_.forEach(this.controls,$el=>$el.remove()),this.controls=null},enable(){this.controls.$button.prop("disabled",!1).removeClass("disabled")},disable(){this.controls.$button.prop("disabled",!0).addClass("disabled")},show(){hider.show(this.controls.$button)},hide(){_.forEach(this.controls,hider.hide)}})}),define("tpl!taoQtiTestPreviewer/previewer/plugins/tools/scale/component/tpl/devices-previewer",["handlebars"],function(hb){return hb.template(function(Handlebars,depth0,helpers,partials,data){this.compilerInfo=[4,">= 1.0.0"],helpers=this.merge(helpers,Handlebars.helpers),data=data||{};var stack1,helper,buffer="",functionType="function",escapeExpression=this.escapeExpression;return buffer+="
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        ",buffer})}),define("css!taoQtiTestPreviewer/previewer/plugins/tools/scale/component/css/devicesPreviewer",[],function(){}),define("taoQtiTestPreviewer/previewer/plugins/tools/scale/component/devicesPreviewer",["jquery","lodash","i18n","ui/component","ui/transformer","tpl!taoQtiTestPreviewer/previewer/plugins/tools/scale/component/tpl/devices-previewer","css!taoQtiTestPreviewer/previewer/plugins/tools/scale/component/css/devicesPreviewer.css"],function($,_,__,componentFactory,transformer,devicesPreviewerTpl){"use strict";var _Mathmin=Math.min;function devicesPreviewerFactory(container,config){var controls=null,resetScale=function resetScale(){controls&&(controls.$previewContent.removeAttr("style"),controls.$previewContainer.removeAttr("style"))},api={getDeviceWidth:function getDeviceWidth(){return this.getConfig().deviceWidth},setDeviceWidth:function setDeviceWidth(width){var componentConfig=this.getConfig();return componentConfig.deviceWidth=parseInt(width,10)||0,this.trigger("devicewidthchange",componentConfig.deviceWidth),this},getDeviceHeight:function getDeviceHeight(){return this.getConfig().deviceHeight},setDeviceHeight:function setDeviceHeight(height){var componentConfig=this.getConfig();return componentConfig.deviceHeight=parseInt(height,10)||0,this.trigger("deviceheightchange",componentConfig.deviceHeight),this},getDeviceOrientation:function getDeviceOrientation(){return this.getConfig().deviceOrientation},setDeviceOrientation:function setDeviceOrientation(orientation){var componentConfig=this.getConfig();return componentConfig.deviceOrientation=orientation,this.is("rendered")&&this.getElement().attr("data-orientation",componentConfig.deviceOrientation),this.trigger("deviceorientationchange",componentConfig.deviceOrientation),this},isDeviceMode:function isDeviceMode(){return"standard"!==this.getDeviceType()},getDeviceType:function getDeviceType(){return this.getConfig().deviceType},setDeviceType:function setDeviceType(type){var componentConfig=this.getConfig();return componentConfig.deviceType=type,this.is("rendered")&&this.getElement().attr("data-type",componentConfig.deviceType),this.trigger("devicetypechange",componentConfig.deviceType),this},previewDevice:function previewDevice(){var width,height;return this.is("rendered")&&(this.is("disabled")||"standard"===this.getDeviceType()?this.clearScale():("portrait"===this.getDeviceOrientation()?(width=this.getDeviceHeight(),height=this.getDeviceWidth()):(width=this.getDeviceWidth(),height=this.getDeviceHeight()),this.applyScale(width,height)),this.trigger("devicepreview")),this},clearScale:function clearScale(){return this.is("rendered")&&(resetScale(),this.trigger("scaleclear")),this},applyScale:function applyScale(width,height){var frameSize,frameMargins,scaleFactor;return this.is("rendered")&&(resetScale(),frameSize=this.getFrameSize(),frameMargins=this.getFrameMargins(),scaleFactor=this.getScaleFactor(width,height),controls.$previewContent.width(width).height(height),controls.$previewContainer.css("left",(frameSize.width-(width+frameMargins.width)*scaleFactor)/2).width(width+frameMargins.width).height(height+frameMargins.height),transformer.setTransformOrigin(controls.$previewContainer,0,0),transformer.scale(controls.$previewContainer,scaleFactor),this.trigger("scalechange")),this},getFrameMargins:function getFrameMargins(){var margins={width:0,height:0};return this.is("rendered")&&(margins.width=controls.$previewContainer.outerWidth()-controls.$previewContent.width(),margins.height=controls.$previewContainer.outerHeight()-controls.$previewContent.height()),margins},getFrameSize:function getFrameSize(){var size={width:0,height:0};return this.is("rendered")&&(size.width=this.getContainer().innerWidth(),size.height=this.getContainer().innerHeight()),size},getScaleFactor:function getScaleFactor(width,height){var margins,frameSize,scaleFactor={x:1,y:1};return this.is("rendered")&&this.isDeviceMode()&&(frameSize=this.getFrameSize(),margins=this.getFrameMargins(),width+=margins.width,height+=margins.height,width>frameSize.width&&(scaleFactor.x=frameSize.width/width),height>frameSize.height&&(scaleFactor.y=frameSize.height/height)),_Mathmin(scaleFactor.x,scaleFactor.y)},wrap:function wrap(element){return this.is("rendered")&&(this.unwrap(),controls.$wrappedElement=$(element),controls.$wrappedElementContainer=controls.$wrappedElement.parent(),controls.$previewContent.append(controls.$wrappedElement),this.trigger("wrap",controls.$wrappedElement)),this},unwrap:function unwrap(){var $wasWrappedElement;return this.is("rendered")&&controls.$wrappedElement&&($wasWrappedElement=controls.$wrappedElement,controls.$wrappedElementContainer.append(controls.$wrappedElement),controls.$wrappedElement=null,controls.$wrappedElementContainer=null,this.trigger("unwrap",$wasWrappedElement)),this}},devicesPreviewer=componentFactory(api,defaults).setTemplate(devicesPreviewerTpl).on("init",function(){var componentConfig=this.getConfig();this.setDeviceType(componentConfig.deviceType),this.setDeviceWidth(componentConfig.deviceWidth),this.setDeviceHeight(componentConfig.deviceHeight),this.setDeviceOrientation(componentConfig.deviceOrientation),_.defer(function(){devicesPreviewer.render(container)})}).on("render",function(){var $element=this.getElement();controls={$previewContainer:$element.find(".preview-container"),$previewFrame:$element.find(".preview-frame"),$previewContent:$element.find(".preview-content"),$wrappedElement:null,$wrappedElementContainer:null},this.trigger("ready")}).on("disable enable",function(){var self=this;this.is("rendered")&&_.defer(function(){self.previewDevice()})}).on("destroy",function(){this.unwrap(),controls=null});return _.defer(function(){devicesPreviewer.init(config)}),devicesPreviewer}var defaults={deviceType:"standard",deviceWith:0,deviceHeight:0,deviceOrientation:null};return devicesPreviewerFactory}),define("tpl!taoQtiTestPreviewer/previewer/plugins/tools/scale/component/tpl/devices-selector",["handlebars"],function(hb){return hb.template(function(Handlebars,depth0,helpers,partials,data){return this.compilerInfo=[4,">= 1.0.0"],helpers=this.merge(helpers,Handlebars.helpers),data=data||{},"
        \n
        \n
        \n
        \n
        \n
        "})}),define("tpl!taoQtiTestPreviewer/previewer/plugins/tools/scale/component/tpl/selector",["handlebars"],function(hb){return hb.template(function(Handlebars,depth0,helpers,partials,data){function program1(depth0,data){var stack1,helper,buffer="";return buffer+="\n \n ",buffer}function program2(depth0,data){return"selected=\"selected\""}this.compilerInfo=[4,">= 1.0.0"],helpers=this.merge(helpers,Handlebars.helpers),data=data||{};var stack1,helper,buffer="",functionType="function",escapeExpression=this.escapeExpression,self=this;return buffer+="",buffer})}),define("css!taoQtiTestPreviewer/previewer/plugins/tools/scale/component/css/devicesSelector",[],function(){}),define("taoQtiTestPreviewer/previewer/plugins/tools/scale/component/devicesSelector",["jquery","lodash","i18n","ui/component","ui/selecter","taoQtiTestPreviewer/previewer/helpers/devices","tpl!taoQtiTestPreviewer/previewer/plugins/tools/scale/component/tpl/devices-selector","tpl!taoQtiTestPreviewer/previewer/plugins/tools/scale/component/tpl/selector","css!taoQtiTestPreviewer/previewer/plugins/tools/scale/component/css/devicesSelector.css"],function($,_,__,componentFactory,lookupSelecter,devicesHelper,devicesSelectorTpl,selectorTpl){"use strict";function getSelectorData(selected,list){return selected&&_.size(list)?_.find(list,{value:selected})||null:null}function getValidIdentifier(identifier,list){return list&&list.length?_.find(list,{value:identifier})?identifier:_.first(list).value:null}function updateSelect2($selector,value){var current=$selector.val();return current!==value&&($selector.val(value),$selector.trigger("change")),$selector}function removeSelect2($selector){return $selector.hasClass("select2-offscreen")&&$selector.select2("destroy"),$selector}function devicesSelectorFactory(container,config){var selected={type:null,device:null,orientation:null,desktop:null,mobile:null},devicesList=[],typeData=null,controls=null,setControlsProp=function setControlsProp(property,value){_.forEach(controls,function($selector){$selector.prop(property,value)})},api={isDeviceMode:function isDeviceMode(){return"standard"!==selected.type},updateMode:function updateMode(){return this.is("rendered")&&this.getElement().attr("data-type",selected.type),this},getType:function getType(){return selected.type},getOrientation:function getOrientation(){return typeData&&typeData.orientation?selected.orientation:null},getDevice:function getDevice(){return typeData&&typeData.devicesList?selected.device:null},getDeviceData:function getDeviceData(){return getSelectorData(this.getDevice(),devicesList)},setType:function setType(identifier){return identifier=getValidIdentifier(identifier,deviceTypesList),identifier!==selected.type&&(selected.type=identifier,selected.device=null,devicesList=devicesHelper.getDevicesByType(selected.type),typeData=getSelectorData(selected.type,deviceTypesList),this.is("rendered")&&(updateSelect2(controls.$typeSelector,selected.type),this.updateMode()),this.trigger("typechange",selected.type),typeData.devicesList&&this.setDevice(selected[selected.type])),this},setOrientation:function setOrientation(identifier){return identifier=getValidIdentifier(identifier,deviceOrientationsList),identifier!==selected.orientation&&(selected.orientation=identifier,this.is("rendered")&&updateSelect2(controls.$orientationSelector,selected.orientation),this.trigger("orientationchange",selected.orientation)),this},setDevice:function setDevice(identifier){var $selector;return identifier=getValidIdentifier(identifier,devicesList),identifier!==selected.device&&(selected.device=identifier,selected[selected.type]=identifier,this.is("rendered")&&this.isDeviceMode()&&($selector=controls["$"+selected.type+"Selector"],$selector&&updateSelect2($selector,selected.device)),this.trigger("devicechange",selected.device,this.getDeviceData())),this},select:function select(name,value){var setterName=callbackMap[name];return setterName&&_.isFunction(this[setterName])&&this[setterName](value),this},reset:function reset(){var componentConfig=this.getConfig();return this.setType(componentConfig.type),this.setDevice(componentConfig.device),this.setOrientation(componentConfig.orientation),this}},devicesSelector=componentFactory(api,defaults).setTemplate(devicesSelectorTpl).on("init",function(){this.reset(),_.defer(function(){devicesSelector.render(container)})}).on("render",function(){function renderSelector(name,list,selectedValue,category){var $selector=$(selectorTpl({name:name,category:category||name,items:_.map(list,function(item){return{value:item.value,label:item.label,selected:selectedValue===item.value}})}));return self.getElement().find("."+name+"-selector").html($selector),$selector}var self=this;controls={$typeSelector:renderSelector("type",deviceTypesList,selected.type),$desktopSelector:renderSelector("desktop",devicesHelper.getDesktopDevices(),selected.device,"device"),$mobileSelector:renderSelector("mobile",devicesHelper.getMobileDevices(),selected.device,"device"),$orientationSelector:renderSelector("orientation",deviceOrientationsList,selected.orientation)},lookupSelecter(this.getElement()),this.getElement().on("change",".selector",function onSelectorChange(e){var $selector=$(e.target).closest("select");self.select($selector.attr("name"),$selector.val())}),this.updateMode(),this.trigger("ready")}).on("disable",function(){this.is("rendered")&&setControlsProp("disabled",!0)}).on("enable",function(){this.is("rendered")&&setControlsProp("disabled",!1)}).on("destroy",function(){_.forEach(controls,removeSelect2),controls=null,selected=null,typeData=null,devicesList=null});return _.defer(function(){devicesSelector.init(config)}),devicesSelector}var defaults={type:"standard",device:null,orientation:"landscape"},deviceTypesList=[{value:"standard",label:__("Actual size"),devicesList:!1,orientation:!1},{value:"desktop",label:__("Desktop preview"),devicesList:!0,orientation:!1},{value:"mobile",label:__("Mobile preview"),devicesList:!0,orientation:!0}],deviceOrientationsList=[{value:"landscape",label:__("Landscape")},{value:"portrait",label:__("Portrait")}],callbackMap={type:"setType",device:"setDevice",mobile:"setDevice",desktop:"setDevice",orientation:"setOrientation"};return devicesSelectorFactory}),define("taoQtiTestPreviewer/previewer/plugins/tools/scale/scale",["jquery","lodash","lib/uuid","util/namespace","taoTests/runner/plugin","taoQtiTestPreviewer/previewer/plugins/tools/scale/component/devicesPreviewer","taoQtiTestPreviewer/previewer/plugins/tools/scale/component/devicesSelector"],function($,_,uuid,namespaceHelper,pluginFactory,devicesPreviewerFactory,devicesSelectorFactory){"use strict";return pluginFactory({name:"scale",init:function init(){function isPluginAllowed(){var config=testRunner.getConfig();return!config.options.readOnly}var self=this,testRunner=this.getTestRunner();this.nsId=this.getName()+uuid(6),isPluginAllowed()||this.hide(),this.disable(),testRunner.on("render",function(){isPluginAllowed()?self.show():self.hide()}).on("resizeitem",function(size,orientation,type){self.devicesPreviewer&&self.devicesPreviewer.setDeviceType(type).setDeviceOrientation(orientation).setDeviceWidth(size&&size.width).setDeviceHeight(size&&size.height).previewDevice()}).on("enablenav",function(){self.enable()}).on("disablenav",function(){self.disable()})},render:function render(){function resizeItem(){self.devicesSelector&&self.getState("enabled")&&testRunner.trigger("resizeitem",self.devicesSelector.getDeviceData(),self.devicesSelector.getOrientation(),self.devicesSelector.getType())}var self=this,testRunner=this.getTestRunner(),areaBroker=this.getAreaBroker();return $(window).on(namespaceHelper.namespaceAll("resize orientationchange",this.nsId),_.throttle(function(){self.devicesSelector&&self.devicesSelector.isDeviceMode()&&resizeItem()},50)),Promise.all([new Promise(function(resolve){self.devicesSelector=devicesSelectorFactory(areaBroker.getHeaderArea()).on("ready",function(){self.getState("enabled")||this.disable(),this.on("typechange",function(){this.isDeviceMode()||resizeItem()}),this.on("devicechange orientationchange",function(){resizeItem()}),resolve()})}),new Promise(function(resolve){self.devicesPreviewer=devicesPreviewerFactory(areaBroker.getArea("contentWrapper")).on("ready",function(){this.wrap(areaBroker.getContentArea()),resolve()})})])},destroy:function destroy(){this.nsId&&$(window).off("."+this.nsId),this.devicesSelector&&this.devicesSelector.destroy(),this.devicesPreviewer&&this.devicesPreviewer.destroy(),this.devicesSelector=null,this.devicesPreviewer=null},enable:function enable(){this.devicesSelector&&this.devicesSelector.enable()},disable:function disable(){this.devicesSelector&&this.devicesSelector.disable()},show:function show(){this.devicesSelector&&this.devicesSelector.show()},hide:function hide(){this.devicesSelector&&this.devicesSelector.hide()}})}),define("tpl!taoQtiTestPreviewer/previewer/provider/item/tpl/item",["handlebars"],function(hb){return hb.template(function(Handlebars,depth0,helpers,partials,data){return this.compilerInfo=[4,">= 1.0.0"],helpers=this.merge(helpers,Handlebars.helpers),data=data||{},"
        \n
        \n
        \n
        \n
        \n
          \n
          \n
          \n
          \n\n
          \n\n \n\n
          \n
          \n
          \n
          \n\n \n\n
          "})}),define("taoQtiTestPreviewer/previewer/provider/item/item",["jquery","lodash","i18n","ui/feedback","taoTests/runner/areaBroker","taoTests/runner/testStore","taoTests/runner/proxy","taoQtiTest/runner/ui/toolbox/toolbox","taoQtiItem/runner/qtiItemRunner","taoQtiTest/runner/config/assetManager","taoItems/assets/strategies","taoQtiItem/qtiCommonRenderer/helpers/container","tpl!taoQtiTestPreviewer/previewer/provider/item/tpl/item"],function($,_,__,feedback,areaBrokerFactory,testStoreFactory,proxyFactory,toolboxFactory,qtiItemRunner,assetManagerFactory,assetStrategies,containerHelper,layoutTpl){"use strict";function setContext($context){_$previousContext=containerHelper.getContext(),containerHelper.setContext($context)}function restoreContext(){containerHelper.setContext(_$previousContext),_$previousContext=null}const assetManager=assetManagerFactory();assetManager.prependStrategy(assetStrategies.taomedia);let _$previousContext=null;return{name:"qtiItemPreviewer",loadAreaBroker(){const $layout=$(layoutTpl());return areaBrokerFactory($layout,{contentWrapper:$(".content-wrapper",$layout),content:$("#qti-content",$layout),toolbox:$(".bottom-action-bar .tools-box",$layout),navigation:$(".bottom-action-bar .navi-box-list",$layout),control:$(".top-action-bar .control-box",$layout),actionsBar:$(".bottom-action-bar .control-box",$layout),panel:$(".test-sidebar-left",$layout),header:$(".top-action-bar .tools-box",$layout),context:$(".top-action-bar .navi-box-list",$layout)})},loadProxy(){const{proxyProvider,serviceCallId,bootstrap,timeout}=this.getConfig();return proxyFactory(proxyProvider||"qtiItemPreviewerProxy",{serviceCallId,bootstrap,timeout})},loadTestStore(){const config=this.getConfig(),identifier=config.serviceCallId||`test-${Date.now()}`;return testStoreFactory(identifier)},install(){const{plugins}=this.getConfig().options;plugins&&_.forEach(this.getPlugins(),plugin=>{if(_.isPlainObject(plugin)&&_.isFunction(plugin.setConfig)){const config=plugins[plugin.getName()];_.isPlainObject(config)&&plugin.setConfig(config)}})},init(){const dataHolder=this.getDataHolder(),areaBroker=this.getAreaBroker();return areaBroker.setComponent("toolbox",toolboxFactory()),areaBroker.getToolbox().init(),this.on("submititem",()=>{const itemState=this.itemRunner.getState(),itemResponses=this.itemRunner.getResponses();return this.trigger("disabletools disablenav"),this.trigger("submitresponse",itemResponses,itemState),this.getProxy().submitItem(dataHolder.get("itemIdentifier"),itemState,itemResponses).then(response=>{this.trigger("scoreitem",response),this.trigger("enabletools enablenav resumeitem")}).catch(err=>{this.trigger("enabletools enablenav"),200===err.code&&this.trigger("alert.submitError",err.message||__("An error occurred during results submission. Please retry."),()=>this.trigger("resumeitem"))})}).on("ready",()=>{const itemIdentifier=dataHolder.get("itemIdentifier"),itemData=dataHolder.get("itemData");itemIdentifier&&(itemData?this.renderItem(itemIdentifier,itemData):this.loadItem(itemIdentifier))}).on("loaditem",(itemRef,itemData)=>{dataHolder.set("itemIdentifier",itemRef),dataHolder.set("itemData",itemData)}).on("renderitem",()=>{this.trigger("enabletools enablenav")}).on("resumeitem",()=>{this.trigger("enableitem enablenav")}).on("disableitem",()=>{this.trigger("disabletools")}).on("enableitem",()=>{this.trigger("enabletools")}).on("error",()=>{this.trigger("disabletools enablenav")}).on("finish leave",()=>{this.trigger("disablenav disabletools"),this.flush()}).on("flush",()=>{this.destroy()}),this.getProxy().init().then(data=>{dataHolder.set("itemIdentifier",data.itemIdentifier),dataHolder.set("itemData",data.itemData)})},render(){const config=this.getConfig(),areaBroker=this.getAreaBroker();config.renderTo.append(areaBroker.getContainer()),config.options.view&&areaBroker.getContainer().addClass(`view-${config.options.view}`),areaBroker.getToolbox().render(areaBroker.getToolboxArea())},loadItem(itemIdentifier){return this.getProxy().getItem(itemIdentifier)},renderItem(itemIdentifier,itemData){const areaBroker=this.getAreaBroker(),options=this.getConfig().options,changeState=()=>{this.setItemState(itemIdentifier,"changed",!0)};return setContext(areaBroker.getContentArea()),new Promise((resolve,reject)=>{itemData.content=itemData.content||{},assetManager.setData("baseUrl",itemData.baseUrl),assetManager.setData("assets",itemData.content.assets),this.itemRunner=qtiItemRunner(itemData.content.type,itemData.content.data,Object.assign({assetManager:assetManager},options)).on("error",err=>{this.trigger("enablenav"),reject(err),feedback().error(__("It seems that there is an error during item preview loading. Please, try again."))}).on("init",function onItemRunnerInit(){const{state,portableElements}=itemData;this.render(areaBroker.getContentArea(),{state,portableElements})}).on("render",function onItemRunnerRender(){this.on("responsechange",changeState),this.on("statechange",changeState),resolve()}).init()})},unloadItem(){return this.trigger("beforeunloaditem disablenav disabletools"),this.itemRunner?new Promise(resolve=>{this.itemRunner.on("clear",resolve).clear()}):Promise.resolve()},destroy(){const areaBroker=this.getAreaBroker();this.itemRunner&&this.itemRunner.on("clear",restoreContext).clear(),this.itemRunner=null,areaBroker&&areaBroker.getToolbox().destroy()}}}),define("taoQtiTestPreviewer/previewer/proxy/itemDataHandlers",["module","context","lodash","core/moduleLoader"],function(module,context,_,moduleLoader){"use strict";const moduleConfig=module.config();let handlers=[];return moduleConfig.handlers&&moduleLoader({},_.isFunction).addList(moduleConfig.handlers).load(context.bundle).then(data=>handlers=data),function itemDataHandlers(itemData){return handlers.length?1===handlers.length?handlers[0](itemData):handlers.reduce(function(prev,cur){return prev.then(updateItemData=>cur(updateItemData)).catch(cur().reject)},handlers[0](itemData)):Promise.resolve(itemData)}}),define("taoQtiTestPreviewer/previewer/proxy/item",["lodash","core/promiseQueue","core/request","taoQtiTestPreviewer/previewer/config/item","taoQtiTestPreviewer/previewer/proxy/itemDataHandlers"],function(_,promiseQueue,coreRequest,configFactory,itemDataHandlers){"use strict";return{name:"qtiItemPreviewerProxy",install(){this.queue=promiseQueue(),this.prepareParams=function prepareParams(actionParams){const stringifyParams=["itemState","itemResponse"];return _.isPlainObject(actionParams)?_.mapValues(actionParams,(value,key)=>_.includes(stringifyParams,key)?JSON.stringify(value):value):actionParams},this.request=function request(url,reqParams,contentType,noToken){return coreRequest({url:url,data:this.prepareParams(reqParams),method:reqParams?"POST":"GET",contentType:contentType,noToken:noToken,background:!1,sequential:!0,timeout:this.configStorage.getTimeout()}).then(response=>(this.setOnline(),response&&response.success?Promise.resolve(response):Promise.reject(response))).catch(error=>(error.data&&this.isConnectivityError(error.data)&&this.setOffline("request"),Promise.reject(error)))}},init(config,params){return this.configStorage=configFactory(config||{}),this.request(this.configStorage.getTestActionUrl("init"),params,void 0,!0)},destroy(){return this.configStorage=null,this.queue=null,Promise.resolve()},callTestAction(action,params){return this.request(this.configStorage.getTestActionUrl(action),params,void 0,!0)},callItemAction(itemIdentifier,action,params){return this.request(this.configStorage.getItemActionUrl(itemIdentifier,action),params,void 0,!0)},getItem(itemIdentifier,params){return this.request(this.configStorage.getItemActionUrl(itemIdentifier,"getItem"),params,void 0,!0).then(itemData=>itemDataHandlers(itemData))},submitItem(itemIdentifier,state,response,params){const body=_.merge({itemState:state,itemResponse:response},params||{});return this.request(this.configStorage.getItemActionUrl(itemIdentifier,"submitItem"),body,void 0,!0)}}}),define("taoQtiTestPreviewer/previewer/proxy/test",["core/promiseQueue","core/request","util/url","taoQtiTest/runner/helpers/map","taoQtiTestPreviewer/previewer/proxy/itemDataHandlers"],function(promiseQueue,request,urlUtil,mapHelper,itemDataHandlers){"use strict";var _Mathmin2=Math.min;function updateTestContextWithItem(testMap,position,testContext,presetMap){const jump=mapHelper.getJump(testMap,position),item=mapHelper.getItemAt(testMap,position);item&&(testContext.testPartId=jump.part,testContext.sectionId=jump.section,testContext.itemIdentifier=jump.identifier,testContext.itemSessionState=itemSessionStates.initial,testContext.options=createContextOptions(item,presetMap),testContext.allowSkipping=item.allowSkipping)}function createContextOptions(item,presetMap){const options={};return presetMap.forEach(category=>{const pluginId=Object.keys(category)[0],categoryId=category[pluginId];item.categories.includes(categoryId)&&(options[pluginId]=!0)}),options}const serviceControllerInit="TestPreviewer",serviceControllerGetItem="Previewer",serviceExtension="taoQtiTestPreviewer",testSessionStates=Object.freeze({initial:0,interacting:1,modalFeedback:2,suspended:3,closed:4}),itemSessionStates=Object.freeze({initial:0,interacting:1,modalFeedback:2,suspended:3,closed:4,solution:5,review:6});return{name:"qtiTestPreviewerProxy",install(){this.queue=promiseQueue()},init(configs){return this.itemStore={},request({url:urlUtil.route("init",serviceControllerInit,serviceExtension),data:{testUri:configs.options.testUri},noToken:!0}).then(response=>{const data=response.data;this.builtTestMap=mapHelper.reindex(data.testMap),this.presetMap=data.presetMap||[],delete data.presetMap;const firstJump=this.builtTestMap.jumps[0]||{},firstItem=mapHelper.getItemAt(this.builtTestMap,0);return data.testContext={itemIdentifier:firstJump.identifier,itemPosition:0,itemSessionState:0,testPartId:firstJump.part,sectionId:firstJump.section,canMoveBackward:!0,state:testSessionStates.interacting,attempt:1,options:createContextOptions(firstItem,this.presetMap),allowSkipping:firstItem.allowSkipping},data})},destroy(){return this.queue=null,this.itemStore&&(this.itemStore=null),Promise.resolve()},getItem(itemIdentifier){if(itemIdentifier in this.itemStore)return Promise.resolve(this.itemStore[itemIdentifier]);else{const{uri}=mapHelper.getItem(this.builtTestMap,itemIdentifier)||{};if(!uri)throw new Error(`There is no item ${itemIdentifier} in the testMap!`);return request({url:urlUtil.route("getItem",serviceControllerGetItem,serviceExtension),data:{serviceCallId:"previewer",itemUri:uri},noToken:!0}).then(data=>(data.itemData=data.content,data.itemIdentifier=data.content.data.identifier,data.itemState={},this.itemStore[itemIdentifier]=data,data)).then(itemData=>itemDataHandlers(itemData))}},callItemAction(itemIdentifier,action){let params=2{var _Mathmax=Math.max;if("next"===params.direction||"skip"===action)if("testPart"===params.scope){const testPartPosition=testMap.parts[testContext.testPartId].position,nextPartsSorted=Object.values(testMap.parts).filter(p=>p.position>testPartPosition).sort((a,b)=>a.position-b.position);0===nextPartsSorted.length?testContext.state=testSessionStates.closed:testContext.itemPosition=_Mathmin2(testMap.stats.total-1,nextPartsSorted[0].position)}else testContext.itemPosition+1>=testMap.stats.total?testContext.state=testSessionStates.closed:testContext.itemPosition=_Mathmin2(testMap.stats.total-1,testContext.itemPosition+1);return"previous"===params.direction&&(testContext.itemPosition=_Mathmax(0,testContext.itemPosition-1)),"jump"===params.direction&&0<=params.ref&&(testContext.itemPosition=params.ref),updateTestContextWithItem(testMap,testContext.itemPosition,testContext,this.presetMap),{testContext,testMap}},flagItem:()=>Promise.resolve()};if(actions.skip=actions.move,params.itemState&&(this.itemStore[itemIdentifier].itemState=params.itemState),"function"==typeof actions[action])return actions[action]()},callTestAction(){return Promise.resolve()}}}),define("tpl!taoQtiTestPreviewer/previewer/component/test/tpl/qtiTest",["handlebars"],function(hb){return hb.template(function(Handlebars,depth0,helpers,partials,data){this.compilerInfo=[4,">= 1.0.0"],helpers=this.merge(helpers,Handlebars.helpers),data=data||{};var helper,options,buffer="",helperMissing=helpers.helperMissing,escapeExpression=this.escapeExpression;return buffer+="",buffer})}),define("css!taoQtiTestPreviewer/previewer/component/test/css/qtiTest",[],function(){}),define("taoQtiTestPreviewer/previewer/component/test/qtiTest",["context","lodash","layout/loading-bar","taoTests/runner/runnerComponent","taoQtiTest/runner/config/assetManager","taoItems/assets/strategies","tpl!taoQtiTestPreviewer/previewer/component/test/tpl/qtiTest","css!taoQtiTestPreviewer/previewer/component/test/css/qtiTest","css!taoQtiTestCss/new-test-runner"],function(context,__,loadingBar,runnerComponentFactory,assetManagerFactory,assetStrategies,runnerTpl){"use strict";return function qtiTestPreviewerFactory(container){let config=1{loadingBar.stop(),this.destroy()})})}}),define("taoQtiTestPreviewer/previewer/adapter/test/qtiTest",["lodash","core/promiseQueue","core/request","util/url","core/logger","taoQtiTestPreviewer/previewer/component/test/qtiTest","ui/feedback","taoQtiTestPreviewer/previewer/component/topBlock/topBlock"],function(_,promiseQueue,request,urlUtil,loggerFactory,qtiTestPreviewerFactory,feedback,topBlockFactory){"use strict";const taoExtension="taoQtiTestPreviewer",testPreviewerController="TestPreviewer",logger=loggerFactory("taoQtiTestPreviewer/previewer"),defaultPlugins=[{module:"taoQtiTestPreviewer/previewer/plugins/content/cloneLogoInTestPreview",bundle:"taoQtiTestPreviewer/loader/qtiPreviewer.min",category:"content"}],transformConfiguration=config=>{const plugins=Array.isArray(config.plugins)?[...defaultPlugins,...config.plugins]:defaultPlugins,{view,readOnly,fullPage,hideActionBars,pluginsOptions}=config,options=_.omit({view,readOnly,fullPage,hideActionBars},_.isUndefined);return request({url:urlUtil.route("configuration",testPreviewerController,taoExtension),noToken:!0}).then(response=>{const configuration=response.data;return configuration.providers.plugins=[...configuration.providers.plugins,...plugins],_.assign(configuration.options,options),pluginsOptions&&(!configuration.options.plugins&&(configuration.options.plugins={}),_.assign(configuration.options.plugins,pluginsOptions)),configuration})};return{name:"qtiTest",install(){this.queue=promiseQueue()},init(testUri){let config=1{testPreviewConfig.options.testUri=testUri;let topBlock=null;const previewComponent=qtiTestPreviewerFactory(window.document.body,testPreviewConfig).on("ready",function(runner){topBlock=topBlockFactory(window.document.body,{isTest:"test"===testPreviewConfig.options.review.scope,title:runner.getTestMap().title,onClose:()=>{runner.trigger("exit")}})}).on("error",function(err){topBlock&&(topBlock.destroy(),topBlock=null),_.isUndefined(err.message)||feedback().error(err.message),logger.error(err)}).on("destroy",()=>{topBlock&&(topBlock.destroy(),topBlock=null)});return previewComponent})},destroy(){return this.queue=null,Promise.resolve()}}}),function(c){var d=document,a="appendChild",i="styleSheet",s=d.createElement("style");s.type="text/css",d.getElementsByTagName("head")[0].appendChild(s),s.styleSheet?s.styleSheet.cssText=c:s.appendChild(d.createTextNode(c))}(".previewer,.previewer-component{position:relative}.item-previewer-scope{position:relative;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.item-previewer-scope.view-viewer .action-bar{display:none}.item-previewer-scope:not(.view-viewer){height:calc(100vh - 0px)}.item-previewer-scope:not(.view-viewer) .test-sidebar{height:calc(100vh - 80px)}.item-previewer-scope .test-runner-sections{-webkit-flex:1 1 0%;-ms-flex:1 1 0%;flex:1 1 0%;overflow:hidden;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}.item-previewer-scope .test-sidebar{background:#f3f1ef;-webkit-flex:0 1 auto;-ms-flex:0 1 auto;flex:0 1 auto;overflow-y:auto;max-width:350px}.item-previewer-scope .test-sidebar>.qti-panel{max-width:350px;padding:10px}@media only screen and (max-device-width: 800px){.item-previewer-scope .test-sidebar{max-width:200px}.item-previewer-scope .test-sidebar>.qti-panel{max-width:200px}}@media only screen and (min-device-width: 800px)and (max-device-width: 1280px){.item-previewer-scope .test-sidebar{max-width:250px}.item-previewer-scope .test-sidebar>.qti-panel{max-width:250px}}@media only screen and (min-device-width: 1280px)and (max-device-width: 1440px){.item-previewer-scope .test-sidebar{max-width:300px}.item-previewer-scope .test-sidebar>.qti-panel{max-width:300px}}.item-previewer-scope .test-sidebar-left{border-right:1px #ddd solid}.item-previewer-scope .test-sidebar-right{border-left:1px #ddd solid}.item-previewer-scope .content-wrapper{position:relative;-webkit-flex:1 1 0%;-ms-flex:1 1 0%;flex:1 1 0%;overflow:auto;padding:0}.item-previewer-scope .content-wrapper .overlay{position:absolute;left:0;right:0;top:0;bottom:0;width:100%;opacity:.9}.item-previewer-scope .content-wrapper .overlay-full{background-color:#fff;opacity:1}.item-previewer-scope #qti-content{-webkit-overflow-scrolling:touch;max-width:1024px;width:100%;margin:auto}.item-previewer-scope #qti-item{width:100%;min-width:100%;height:auto;overflow:visible}.item-previewer-scope .qti-item{padding:30px}.item-previewer-scope .size-wrapper{max-width:1280px;margin:auto;width:100%;padding-right:40px}.item-previewer-scope #qti-rubrics{margin:auto;max-width:1024px;width:100%}.item-previewer-scope #qti-rubrics .qti-rubricBlock{margin:20px 0}.item-previewer-scope #qti-rubrics .hidden{display:none}.no-controls .item-previewer-scope{height:100vh}.previewer-component{background:inherit}.previewer-component.fullpage{position:absolute;top:0;left:0;right:0;bottom:0;z-index:100000}.previewer-component.fullpage .item-previewer-scope{height:100vh}.previewer-component.readonly .qti-item::before{content:\" \";position:absolute;top:0;left:0;right:0;bottom:0;z-index:100000}.previewer-component.hideactionbars .test-sidebar{height:100%}.previewer-component.hideactionbars .action-bar{display:none}.item-previewer-scope .preview-console-closer{position:absolute;right:10px;top:10px;cursor:pointer;color:rgba(255,255,255,.9);text-shadow:none}.item-previewer-scope .preview-console-closer:hover{color:#fff}.item-previewer-scope .preview-console{background:#2b2b2b;color:#fff;font-family:Consolas,\"Andale Mono WT\",\"Andale Mono\",\"Lucida Console\",\"Lucida Sans Typewriter\",\"DejaVu Sans Mono\",\"Bitstream Vera Sans Mono\",\"Liberation Mono\",\"Nimbus Mono L\",Monaco,\"Courier New\",Courier,monospace;position:relative}.item-previewer-scope .preview-console .preview-console-body{padding:5px;margin:0;height:30vh;overflow:auto}.item-previewer-scope .preview-console .preview-console-body .log-time{color:#999}.item-previewer-scope .preview-console .preview-console-body .log-type{color:#eee}.item-previewer-scope .preview-console .preview-console-body .log-message{color:#69f}.item-previewer-scope .preview-console .preview-console-body pre{margin:0}.item-previewer-scope .action-bar.content-action-bar{padding:2px}.item-previewer-scope .action-bar.content-action-bar li{margin:2px 0 0 10px;border:none}.item-previewer-scope .action-bar.content-action-bar li.btn-info{padding-top:6px;height:33px;margin-top:0;border-bottom:solid 2px rgba(0,0,0,0);border-radius:0}.item-previewer-scope .action-bar.content-action-bar li.btn-info.btn-group{border:none !important;overflow:hidden;padding:0}.item-previewer-scope .action-bar.content-action-bar li.btn-info.btn-group a{float:left;margin:0 2px;padding:0 15px;border:1px solid rgba(255,255,255,.3);border-radius:0px;display:inline-block;height:inherit}.item-previewer-scope .action-bar.content-action-bar li.btn-info.btn-group a:first-of-type{border-top-left-radius:3px;border-bottom-left-radius:3px;margin-left:0}.item-previewer-scope .action-bar.content-action-bar li.btn-info.btn-group a:last-of-type{border-top-right-radius:3px;border-bottom-right-radius:3px;margin-right:0}.item-previewer-scope .action-bar.content-action-bar li.btn-info.btn-group a:hover,.item-previewer-scope .action-bar.content-action-bar li.btn-info.btn-group a.active{border-color:rgba(255,255,255,.8)}.item-previewer-scope .action-bar.content-action-bar li.btn-info.btn-group a .no-label{padding-right:0}.item-previewer-scope .action-bar.content-action-bar li.btn-info:hover,.item-previewer-scope .action-bar.content-action-bar li.btn-info.active{border-bottom-color:rgba(255,255,255,.8)}.item-previewer-scope .action-bar.content-action-bar li.btn-info:active,.item-previewer-scope .action-bar.content-action-bar li.btn-info.active{background:#e7eff4;border-color:rgba(255,255,255,.8)}.item-previewer-scope .action-bar.content-action-bar li.btn-info:active a,.item-previewer-scope .action-bar.content-action-bar li.btn-info.active a{color:#266d9c;text-shadow:none}.item-previewer-scope .action-bar.content-action-bar li.btn-info:active:hover,.item-previewer-scope .action-bar.content-action-bar li.btn-info.active:hover{background:#fff}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar{opacity:1;height:40px}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.top-action-bar>.control-box{height:40px;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-justify-content:space-between;-ms-flex-pack:space-between;justify-content:space-between;padding-left:10px;padding-right:40px}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box{color:rgba(255,255,255,.9);text-shadow:1px 1px 0 #000}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box .lft,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box .rgt{padding-left:20px}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box .lft:first-child,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box .rgt:first-child{padding-left:0}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box .lft:last-child ul,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box .rgt:last-child ul{display:inline-block}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box [class^=btn-],.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box [class*=\" btn-\"]{white-space:nowrap}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box{position:relative;overflow:visible}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .action{position:relative;overflow:visible}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu{color:#222;background:#f3f1ef;border:1px solid #aaa9a7;overflow:auto;list-style:none;min-width:150px;margin:0;padding:0;position:absolute;bottom:36px;left:-3px}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action{display:inline-block;text-align:left;width:100%;white-space:nowrap;overflow:hidden;color:#222;border-bottom:1px solid #c2c1bf;margin:0;-moz-border-radius:0px;-webkit-border-radius:0px;border-radius:0px;height:32px;padding:6px 15px;line-height:1;border-left:solid 3px rgba(0,0,0,0)}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action .icon-checkbox-checked{display:none}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.active{background-color:#dbd9d7;font-weight:bold}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.hover .icon-checkbox,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action:hover .icon-checkbox,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.active .icon-checkbox{display:none}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.hover .icon-checkbox-checked,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action:hover .icon-checkbox-checked,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.active .icon-checkbox-checked{display:inline-block}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.hover,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action:hover{background-color:#0e5d91;color:#fff;border-left-color:#313030 !important}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.hover .label,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.hover .icon,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action:hover .label,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action:hover .icon{color:#fff}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.hover .icon,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action:hover .icon{color:#e7eff4}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action .label,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action .icon{font-size:14px;font-size:1.4rem;text-shadow:none;color:#222}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar{overflow:visible;position:relative}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .action{line-height:1.6}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .icon.no-label{padding-right:0}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .tool-label-collapsed .btn-info .text,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .tool-label-collapsed-hover .btn-info:not(:hover) .text,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .btn-info.no-tool-label .text,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .btn-info.tool-label-collapsed .text,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .btn-info.tool-label-collapsed-over:not(:hover) .text{display:none}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .tool-label-collapsed .btn-info .icon,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .tool-label-collapsed-hover .btn-info:not(:hover) .icon,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .btn-info.no-tool-label .icon,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .btn-info.tool-label-collapsed .icon,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .btn-info.tool-label-collapsed-over:not(:hover) .icon{padding:0}\n\n/*# sourceMappingURL=taoQtiTestPreviewer/previewer/provider/item/css/item.css.map */.top-block-preview{position:fixed;top:0;left:50%;z-index:10000;display:flex;flex-direction:column;align-items:center;justify-content:center}.top-block-preview.open{transform:translate(-50%, 0);transition:transform .5s ease-out}.top-block-preview.close{transform:translate(-50%, calc(30px - 100%));transition:transform .5s ease-out}.top-block-preview-main{display:flex;padding:12px 24px;background-color:#f3f1ef;border:solid 1px #e5e4e4}.top-block-preview-main .btn-info{margin-left:16px;white-space:nowrap}.top-block-preview-main .btn-info .icon{padding-left:9px;padding-right:0}.top-block-preview-info{display:flex;align-items:center;justify-content:center}.top-block-preview-info p{margin-bottom:0}.top-block-preview-collapser{position:relative;width:60px;height:30px;background-color:#f3f1ef;border-bottom-left-radius:30px;border-bottom-right-radius:30px;transform:translateY(-10px);display:flex;align-items:center;justify-content:center;cursor:pointer;border-left:solid 1px #e5e4e4;border-right:solid 1px #e5e4e4}.top-block-preview-collapser::before{content:\" \";width:60px;height:10px;background-color:#f3f1ef;position:absolute;top:-1px}\n\n/*# sourceMappingURL=taoQtiTestPreviewer/previewer/component/topBlock/css/topBlock.css.map */.devices-previewer{width:100%;height:100%}.devices-previewer:not(.disabled)[data-type=desktop],.devices-previewer:not(.disabled)[data-type=mobile]{overflow:hidden}.devices-previewer:not(.disabled)[data-type=desktop] .preview-container,.devices-previewer:not(.disabled)[data-type=mobile] .preview-container{position:relative}.devices-previewer:not(.disabled)[data-type=desktop] .preview-frame,.devices-previewer:not(.disabled)[data-type=mobile] .preview-frame{position:relative;border:3px #aaa ridge;background:#5a5a5a;background:linear-gradient(135deg, rgb(90, 90, 90) 0%, rgb(86, 86, 86) 7%, rgb(68, 68, 68) 15%, rgb(20, 20, 20) 30%);-webkit-box-shadow:5px 5px 10px 0 rgba(0, 0, 0, 0.7);-moz-box-shadow:5px 5px 10px 0 rgba(0, 0, 0, 0.7);-ms-box-shadow:5px 5px 10px 0 rgba(0, 0, 0, 0.7);-o-box-shadow:5px 5px 10px 0 rgba(0, 0, 0, 0.7);box-shadow:5px 5px 10px 0 rgba(0, 0, 0, 0.7)}.devices-previewer:not(.disabled)[data-type=desktop] .preview-content,.devices-previewer:not(.disabled)[data-type=mobile] .preview-content{background:#fff;border-radius:3px;border:2px solid;border-color:#444 #999 #999 #444;overflow:auto}.devices-previewer:not(.disabled)[data-type=mobile] .preview-frame{border-radius:25px;padding:40px}.devices-previewer:not(.disabled)[data-type=desktop] .preview-frame{border-radius:5px;padding:30px}\n\n/*# sourceMappingURL=taoQtiTestPreviewer/previewer/plugins/tools/scale/component/css/devicesPreviewer.css.map */.devices-selector{display:-ms-flex;display:-webkit-flex;display:flex;-ms-flex-direction:row;-webkit-flex-direction:row;flex-direction:row}.devices-selector[data-type=standard] .desktop-selector,.devices-selector[data-type=standard] .mobile-selector,.devices-selector[data-type=standard] .orientation-selector{display:none}.devices-selector[data-type=desktop] .mobile-selector,.devices-selector[data-type=desktop] .orientation-selector{display:none}.devices-selector[data-type=mobile] .desktop-selector{display:none}.devices-selector .selector{display:inline-block;margin-top:.3em}.devices-selector .selector:not(:last-child){margin-right:1rem}.devices-selector .selector select{overflow:visible}.devices-selector .selector .select2-container{text-shadow:none}\n\n/*# sourceMappingURL=taoQtiTestPreviewer/previewer/plugins/tools/scale/component/css/devicesSelector.css.map */.previewer-test-component{background:inherit}.previewer-test-component.fullpage{position:absolute;top:0;left:0;right:0;bottom:64px;z-index:1000}.previewer-test-component.fullpage .item-previewer-scope{height:100vh}.previewer-test-component.readonly .qti-item::before{content:\" \";position:absolute;top:0;left:0;right:0;bottom:0;z-index:100000}.previewer-test-component.hideactionbars .test-sidebar{height:100%}.previewer-test-component.hideactionbars .action-bar{display:none}.previewer-test-component #preview-logo{margin:6px 30px 6px 30px;display:block;max-width:200px;height:52px;background:rgba(0,0,0,0)}.previewer-test-component footer{z-index:10000;position:relative;font-size:11px;padding:10px;border-top:1px #ddd solid}\n\n/*# sourceMappingURL=taoQtiTestPreviewer/previewer/component/test/css/qtiTest.css.map */"),define("taoQtiTestPreviewer/loader/qtiPreviewer.bundle",function(){}),define("taoQtiTestPreviewer/loader/qtiPreviewer.min",["taoItems/loader/taoItemsRunner.min","taoTests/loader/taoTestsRunner.min","taoQtiItem/loader/taoQtiItemRunner.min","taoQtiTest/loader/taoQtiTestRunner.min","taoQtiTest/loader/testPlugins.min"],function(){}); //# sourceMappingURL=qtiPreviewer.min.js.map \ No newline at end of file diff --git a/views/js/loader/qtiPreviewer.min.js.map b/views/js/loader/qtiPreviewer.min.js.map index 81c986f3..40334b8c 100644 --- a/views/js/loader/qtiPreviewer.min.js.map +++ b/views/js/loader/qtiPreviewer.min.js.map @@ -1 +1 @@ -{"version":3,"names":["define","hb","template","Handlebars","depth0","helpers","partials","data","compilerInfo","merge","runnerComponentFactory","runnerTpl","previewerFactory","container","config","arguments","length","on","fullPage","readOnly","hideActionBars","getConfig","options","setState","runner","destroy","context","qtiItemPreviewerFactory","testRunnerConfig","testDefinition","serviceCallId","providers","id","module","bundle","category","proxy","communicator","Object","keys","previewers","plugins","view","pluginsOptions","loadFromBundle","itemState","itemRunner","itemUri","loadItem","_","loggerFactory","feedback","logger","defaultPlugins","name","init","uri","state","Array","isArray","window","document","body","err","isUndefined","message","error","helper","buffer","helperMissing","escapeExpression","__","hash","call","stack1","functionType","title","$","componentFactory","topBlockTpl","topBlockDataTpl","topBlockFactory","topBlock","setTemplate","render","$info","isTest","$element","getElement","find","append","onClose","$icon","toggleClass","trigger","defer","urlUtil","configHelper","_defaults","bootstrap","serviceController","serviceExtension","_entries","timeout","itemPreviewerConfigFactory","undef","storage","from","getParameters","itemIdentifier","type","parameters","getServiceCallId","isPlainObject","TypeError","getServiceController","getServiceExtension","getTestActionUrl","action","route","getItemActionUrl","getTimeout","tablets","\"193986c3715c81838870f908fa98d69a\"","label","width","height","\"4e8eafab11aad1486992d7ee2c8c16ca\"","\"5aac2932d9ad00d6d8a1604b8f9e4e8d\"","\"9805d9753ad08c7630a9ee5418aa6c6c\"","d4a431cedf4705d6bf2cba6d5788378b","phones","\"1b89338531ef0155c8d6abc2ac02c81a\"","scaleFactor","dpWidth","dpHeight","\"3f89da99d84214cde7df87ebe0699a6f\"","\"0d36971a5b98b367f54ced708c9af849\"","\"026beffcc051af995660ebdede986ace\"","fd2dd53e667d6d49e4fa73356fa941dd","\"707584c1ae17d9b5b2cbe8603c91c147\"","\"91823264de952e7f2347e07db5c4058b\"","cd69817a6e147e8a4677389e56fcf568","\"75994faa6a38e31e99b53fcd75534a33\"","\"0cab4dfccdfc880687cb608cfe4159db\"","c4ff41fcba24d74fc21dc3490ca1edc9","fa969a5e0dd2de53700eeee4ba4ba142","\"33c4f9364e295ec03531f3a3425819cf\"","bc47f5275f0efd56fee52d43a8082981","\"0732887e6e324fd10777b735520a34cf\"","\"2e38a78364f09d0da0e9e1a3a68e7fb0\"","bd4b78dddc7c9625a4141a1b1ddabb87","\"3bf1edf21cfa81006183d2b02974c84e\"","ab5a352e0e016b97dac986f06c394f55","\"4826fb7d7257aeaac992ce699df41b3c\"","\"0a691ab20add7c432200f8fa6527b488\"","\"9c23ee31be29960fbac9e9bbfc2fc7b0\"","\"92177c0508c1d73905a58e2338f2a81f\"","\"5222b8866dc4cc606725e16ffcc0a783\"","\"37c1541e2bd55cfd0f4073b0ccdf68b3\"","\"2f7f64b7dda0144907ff300e83eed465\"","\"9c24f9057744dad56043702a9703127f\"","\"0a8b2732a016a9395c3af5f12dd9c0da\"","\"5a153d7f53d82dcb0801f041574a6a43\"","screens","\"9e523ae15b61dc766f5c818726881ecf\"","\"07769cd8d0a7d09818b2f0b018042fb7\"","\"72d5478a24194f98b9378e8e0fd65737\"","b7a6dd5900cc72e61f0d3479c7e314ec","\"43193b0ff671a37d8232ab664190a125\"","c29e48814af5443ff5688d9e967ce917","deviceList","deviceTypeMap","mobile","desktop","devicesHelper","getDevicesByType","key","map","mapDeviceData","device","identifier","value","getMobileDevices","getDesktopDevices","pluginFactory","testRunner","getTestRunner","after","clone","appendTo","isPluginAllowed","$contentArea","getAreaBroker","getContentArea","$extendedTextinteractionTextAreas","$ckeEditorsContent","each","style","scrollHeight","$ckeEditorContent","$ckeEditorIFrame","setTimeout","ckeEditorBody","contentWindow","querySelector","hider","buttonTpl","self","control","icon","text","className","e","preventDefault","getState","disable","enable","$container","getArea","remove","prop","removeClass","addClass","show","hide","time","moment","autoscroll","strPad","pciResponse","rendererStrategies","consoleTpl","consoleLineTpl","consoleCloserTpl","defaults","submitTitle","submitText","submitIcon","pluginConfig","getName","showConsole","controls","$console","$consoleBody","$consoleCloser","children","last","hideConsole","addConsoleLine","format","showResponses","responses","forEach","response","escape","prettyPrint","$button","itemSession","getContainer","$navigation","getNavigationArea","$el","deviceType","deviceOrientation","transformer","devicesPreviewerTpl","_Mathmin","Math","min","devicesPreviewerFactory","resetScale","$previewContent","removeAttr","$previewContainer","api","getDeviceWidth","deviceWidth","setDeviceWidth","componentConfig","parseInt","getDeviceHeight","deviceHeight","setDeviceHeight","getDeviceOrientation","setDeviceOrientation","orientation","is","attr","isDeviceMode","getDeviceType","setDeviceType","previewDevice","clearScale","applyScale","frameSize","frameMargins","getFrameSize","getFrameMargins","getScaleFactor","css","setTransformOrigin","scale","margins","outerWidth","outerHeight","size","innerWidth","innerHeight","x","y","wrap","element","unwrap","$wrappedElement","$wrappedElementContainer","parent","$wasWrappedElement","devicesPreviewer","$previewFrame","deviceWith","program1","selected","inverse","noop","fn","program","program2","items","lookupSelecter","devicesSelectorTpl","selectorTpl","getSelectorData","list","getValidIdentifier","first","updateSelect2","$selector","current","val","removeSelect2","hasClass","select2","devicesSelectorFactory","devicesList","typeData","setControlsProp","property","updateMode","getType","getOrientation","getDevice","getDeviceData","setType","deviceTypesList","$typeSelector","setDevice","setOrientation","deviceOrientationsList","$orientationSelector","select","setterName","callbackMap","isFunction","reset","devicesSelector","renderSelector","selectedValue","item","html","$desktopSelector","$mobileSelector","onSelectorChange","target","closest","uuid","namespaceHelper","nsId","resizeItem","areaBroker","namespaceAll","throttle","Promise","all","resolve","getHeaderArea","off","areaBrokerFactory","testStoreFactory","proxyFactory","toolboxFactory","qtiItemRunner","assetManagerFactory","assetStrategies","containerHelper","layoutTpl","setContext","$context","_$previousContext","getContext","restoreContext","assetManager","prependStrategy","taomedia","loadAreaBroker","$layout","contentWrapper","content","toolbox","navigation","actionsBar","panel","header","loadProxy","proxyProvider","loadTestStore","Date","now","install","getPlugins","plugin","setConfig","dataHolder","getDataHolder","setComponent","getToolbox","itemResponses","getResponses","getProxy","submitItem","get","then","catch","code","itemData","renderItem","itemRef","set","flush","renderTo","getToolboxArea","getItem","changeState","setItemState","reject","setData","baseUrl","assets","assign","onItemRunnerInit","portableElements","onItemRunnerRender","unloadItem","clear","moduleLoader","moduleConfig","handlers","addList","load","itemDataHandlers","reduce","prev","cur","updateItemData","promiseQueue","coreRequest","configFactory","queue","prepareParams","actionParams","stringifyParams","mapValues","includes","JSON","stringify","request","url","reqParams","contentType","noToken","method","background","sequential","configStorage","setOnline","success","isConnectivityError","setOffline","params","callTestAction","callItemAction","itemResponse","mapHelper","_Mathmin2","updateTestContextWithItem","testMap","position","testContext","presetMap","jump","getJump","getItemAt","testPartId","part","sectionId","section","itemSessionState","itemSessionStates","initial","createContextOptions","allowSkipping","pluginId","categoryId","categories","serviceControllerInit","serviceControllerGetItem","testSessionStates","freeze","interacting","modalFeedback","suspended","closed","solution","review","configs","itemStore","testUri","builtTestMap","reindex","firstJump","jumps","firstItem","itemPosition","canMoveBackward","attempt","Error","actions","move","_Mathmax","max","direction","scope","testPartPosition","parts","nextPartsSorted","values","filter","p","sort","a","b","stats","total","ref","flagItem","skip","loadingBar","qtiTestPreviewerFactory","stop","taoExtension","testPreviewerController","transformConfiguration","omit","configuration","testPreviewConfig","previewComponent","getTestMap","c","d","i","s","createElement","getElementsByTagName","appendChild","styleSheet","cssText","createTextNode"],"sources":["/github/workspace/tao/views/build/config-wrap-start-default.js","../previewer/runner!tpl","../previewer/runner.js","../previewer/provider/item/css/item!css","../previewer/component/qtiItem.js","../previewer/adapter/item/qtiItem.js","../previewer/component/topBlock/tpl/topBlock!tpl","../previewer/component/topBlock/tpl/topBlockData!tpl","../previewer/component/topBlock/css/topBlock!css","../previewer/component/topBlock/topBlock.js","../previewer/config/item.js","../previewer/resources/devices.json!json","../previewer/helpers/devices.js","../previewer/plugins/content/cloneLogoInTestPreview.js","../previewer/plugins/content/enhancedReadOnlyMode.js","../previewer/plugins/controls/close.js","tpl!taoQtiTestPreviewer/previewer/plugins/navigation/submit/preview-console","tpl!taoQtiTestPreviewer/previewer/plugins/navigation/submit/preview-console-line","tpl!taoQtiTestPreviewer/previewer/plugins/navigation/submit/preview-console-closer","../previewer/plugins/navigation/submit/submit.js","tpl!taoQtiTestPreviewer/previewer/plugins/tools/scale/component/tpl/devices-previewer","../previewer/plugins/tools/scale/component/css/devicesPreviewer!css","../previewer/plugins/tools/scale/component/devicesPreviewer.js","tpl!taoQtiTestPreviewer/previewer/plugins/tools/scale/component/tpl/devices-selector","../previewer/plugins/tools/scale/component/tpl/selector!tpl","../previewer/plugins/tools/scale/component/css/devicesSelector!css","../previewer/plugins/tools/scale/component/devicesSelector.js","../previewer/plugins/tools/scale/scale.js","../previewer/provider/item/tpl/item!tpl","../previewer/provider/item/item.js","../previewer/proxy/itemDataHandlers.js","../previewer/proxy/item.js","../previewer/proxy/test.js","../previewer/component/test/tpl/qtiTest!tpl","../previewer/component/test/css/qtiTest!css","../previewer/component/test/qtiTest.js","../previewer/adapter/test/qtiTest.js","onLayerEnd0.js","module-create.js","/github/workspace/tao/views/build/config-wrap-end-default.js"],"sourcesContent":["\n","\ndefine('tpl!taoQtiTestPreviewer/previewer/runner', ['handlebars'], function(hb){ return hb.template(function (Handlebars,depth0,helpers,partials,data) {\n this.compilerInfo = [4,'>= 1.0.0'];\nhelpers = this.merge(helpers, Handlebars.helpers); data = data || {};\n \n\n\n return \"
          \";\n }); });\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2018-2019 (original work) Open Assessment Technologies SA ;\n */\n\n/**\n * Component that embeds the QTI previewer for tests and items\n *\n * @author Jean-Sébastien Conan \n */\ndefine('taoQtiTestPreviewer/previewer/runner',[\n 'taoTests/runner/runnerComponent',\n 'tpl!taoQtiTestPreviewer/previewer/runner'\n], function (runnerComponentFactory, runnerTpl) {\n 'use strict';\n\n /**\n * Builds a test runner to preview test item\n * @param {jQuery|HTMLElement|String} container - The container in which renders the component\n * @param {Object} config - The testRunner options\n * @param {String} [config.provider] - The provider to use\n * @param {Object[]} [config.providers] - A collection of providers to load.\n * @param {Boolean} [config.replace] - When the component is appended to its container, clears the place before\n * @param {Number|String} [config.width] - The width in pixels, or 'auto' to use the container's width\n * @param {Number|String} [config.height] - The height in pixels, or 'auto' to use the container's height\n * @param {Boolean} [config.options.fullPage] - Force the previewer to occupy the full window.\n * @param {Booleanh} [config.options.readOnly] - Do not allow to modify the previewed item.\n * @param {Function} [template] - An optional template for the component\n * @returns {previewer}\n */\n return function previewerFactory(container, config = {}, template = null) {\n\n return runnerComponentFactory(container, config, template || runnerTpl)\n .on('render', function() {\n const { fullPage, readOnly, hideActionBars } = this.getConfig().options;\n this.setState('fullpage', fullPage);\n this.setState('readonly', readOnly);\n this.setState('hideactionbars', hideActionBars);\n })\n .on('ready', function(runner) {\n runner.on('destroy', () => this.destroy() );\n });\n };\n});\n\n","\ndefine('css!taoQtiTestPreviewer/previewer/provider/item/css/item',[],function(){});\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2019 (original work) Open Assessment Technologies SA ;\n */\n/**\n * @author Jean-Sébastien Conan \n */\ndefine('taoQtiTestPreviewer/previewer/component/qtiItem',[\n 'context',\n 'taoQtiTestPreviewer/previewer/runner',\n 'css!taoQtiTestPreviewer/previewer/provider/item/css/item'\n], function (context, previewerFactory) {\n 'use strict';\n\n /**\n * Builds a test runner to preview test item\n * @param {jQuery|HTMLElement|String} container - The container in which renders the component\n * @param {Object} [config] - The testRunner options\n * @param {String} [config.itemUri] - The URI of the item to load\n * @param {Object} [config.itemState] - The state of the item when relevant\n * @param {Object[]} [config.plugins] - Additional plugins to load\n * @param {Object[]} [config.pluginsOptions] - Options for the plugins\n * @param {String} [config.fullPage] - Force the previewer to occupy the full window.\n * @param {String} [config.readOnly] - Do not allow to modify the previewed item.\n * @param {Function} [template] - An optional template for the component\n * @returns {previewer}\n */\n return function qtiItemPreviewerFactory(container, config = {}, template = null) {\n\n const testRunnerConfig = {\n testDefinition: 'test-container',\n serviceCallId: 'previewer',\n providers: {\n runner: {\n id: 'qtiItemPreviewer',\n module: 'taoQtiTestPreviewer/previewer/provider/item/item',\n bundle: 'taoQtiTestPreviewer/loader/qtiPreviewer.min',\n category: 'runner'\n },\n proxy: {\n id: 'qtiItemPreviewerProxy',\n module: 'taoQtiTestPreviewer/previewer/proxy/item',\n bundle: 'taoQtiTestPreviewer/loader/qtiPreviewer.min',\n category: 'proxy'\n },\n communicator: {\n id: 'request',\n module: 'core/communicator/request',\n bundle: Object.keys(config.previewers || {}).length === 1 ? 'loader/vendor.min' : null,\n category: 'communicator'\n },\n plugins: config.plugins || []\n },\n options: {\n view: config.view,\n readOnly: config.readOnly,\n fullPage: config.fullPage,\n plugins: config.pluginsOptions,\n hideActionBars: config.hideActionBars,\n }\n };\n\n //extra context config\n testRunnerConfig.loadFromBundle = !!context.bundle;\n\n return previewerFactory(container, testRunnerConfig, template)\n .on('ready', runner => {\n if (config.itemState) {\n runner.on('renderitem', () => runner.itemRunner.setState(config.itemState));\n }\n if (config.itemUri) {\n return runner.loadItem(config.itemUri);\n }\n });\n };\n});\n\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2019 (original work) Open Assessment Technologies SA ;\n */\n/**\n * @author Jean-Sébastien Conan \n */\ndefine('taoQtiTestPreviewer/previewer/adapter/item/qtiItem',[\n 'lodash',\n 'core/logger',\n 'taoQtiTestPreviewer/previewer/component/qtiItem',\n 'ui/feedback'\n], function (_, loggerFactory, qtiItemPreviewerFactory, feedback) {\n 'use strict';\n\n const logger = loggerFactory('taoQtiTest/previewer');\n\n /**\n * List of required plugins that should be loaded in order to make the previewer work properly\n * @type {Object[]}\n */\n const defaultPlugins = [{\n module: 'taoQtiTestPreviewer/previewer/plugins/controls/close',\n bundle: 'taoQtiTestPreviewer/loader/qtiPreviewer.min',\n category: 'controls'\n }, {\n module: 'taoQtiTestPreviewer/previewer/plugins/navigation/submit/submit',\n bundle: 'taoQtiTestPreviewer/loader/qtiPreviewer.min',\n category: 'navigation'\n }, {\n module: 'taoQtiTestPreviewer/previewer/plugins/tools/scale/scale',\n bundle: 'taoQtiTestPreviewer/loader/qtiPreviewer.min',\n category: 'tools'\n }, {\n module: 'taoQtiTest/runner/plugins/tools/itemThemeSwitcher/itemThemeSwitcher',\n bundle: 'taoQtiTest/loader/testPlugins.min',\n category: 'tools'\n }, {\n module: 'taoQtiTestPreviewer/previewer/plugins/content/enhancedReadOnlyMode',\n bundle: 'taoQtiTestPreviewer/loader/qtiPreviewer.min',\n category: 'content'\n }];\n\n /**\n * Wraps the legacy item previewer in order to be loaded by the taoItems previewer factory\n */\n return {\n name: 'qtiItem',\n\n /**\n * Builds and shows the legacy item previewer\n *\n * @param {String} uri - The URI of the item to load\n * @param {Object} state - The state of the item\n * @param {Object} [config] - Some config entries\n * @param {Object[]} [config.plugins] - Additional plugins to load\n * @param {String} [config.fullPage] - Force the previewer to occupy the full window.\n * @param {String} [config.readOnly] - Do not allow to modify the previewed item.\n * @returns {Object}\n */\n init(uri, state, config = {}) {\n config.itemUri = uri;\n config.itemState = state;\n config.plugins = Array.isArray(config.plugins) ? [...defaultPlugins, ...config.plugins] : defaultPlugins;\n return qtiItemPreviewerFactory(window.document.body, config)\n .on('error', function (err) {\n if (!_.isUndefined(err.message)) {\n feedback().error(err.message);\n } else {\n logger.error(err);\n }\n });\n }\n };\n});\n\n","\ndefine('tpl!taoQtiTestPreviewer/previewer/component/topBlock/tpl/topBlock', ['handlebars'], function(hb){ return hb.template(function (Handlebars,depth0,helpers,partials,data) {\n this.compilerInfo = [4,'>= 1.0.0'];\nhelpers = this.merge(helpers, Handlebars.helpers); data = data || {};\n var buffer = \"\", helper, options, helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;\n\n\n buffer += \"
          \\n\t
          \\n\t\t
          \\n\t\t\\n\t
          \\n\t
          \\n
          \";\n return buffer;\n }); });\n","\ndefine('tpl!taoQtiTestPreviewer/previewer/component/topBlock/tpl/topBlockData', ['handlebars'], function(hb){ return hb.template(function (Handlebars,depth0,helpers,partials,data) {\n this.compilerInfo = [4,'>= 1.0.0'];\nhelpers = this.merge(helpers, Handlebars.helpers); data = data || {};\n var buffer = \"\", stack1, helper, functionType=\"function\", escapeExpression=this.escapeExpression;\n\n\n buffer += \"

          \";\n if (helper = helpers.name) { stack1 = helper.call(depth0, {hash:{},data:data}); }\n else { helper = (depth0 && depth0.name); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }\n buffer += escapeExpression(stack1)\n + \" \";\n if (helper = helpers.title) { stack1 = helper.call(depth0, {hash:{},data:data}); }\n else { helper = (depth0 && depth0.title); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }\n buffer += escapeExpression(stack1)\n + \"

          \";\n return buffer;\n }); });\n","\ndefine('css!taoQtiTestPreviewer/previewer/component/topBlock/css/topBlock',[],function(){});\n","define('taoQtiTestPreviewer/previewer/component/topBlock/topBlock',[\n 'jquery',\n 'lodash',\n 'i18n',\n 'ui/component',\n 'tpl!taoQtiTestPreviewer/previewer/component/topBlock/tpl/topBlock',\n 'tpl!taoQtiTestPreviewer/previewer/component/topBlock/tpl/topBlockData',\n 'css!taoQtiTestPreviewer/previewer/component/topBlock/css/topBlock',\n], function ($, _, __, componentFactory, topBlockTpl, topBlockDataTpl) {\n 'use strict';\n\n /**\n * Builds a topBlock component\n *\n * @param {JQuery} container\n * @param {Object} config\n * @param {String} config.title - the test title\n * @param {Function} config.onClose - the callback function\n * @returns {component}\n * @fires ready - When the component is ready to work\n */\n function topBlockFactory(container, config) {\n const topBlock = componentFactory()\n .setTemplate(topBlockTpl)\n .on('init', function(){\n this.render(container);\n })\n .on('render', function () {\n const $info = $(topBlockDataTpl({\n name: config.isTest ? __('Test Preview:') : __('Item Preview:'),\n title: config.title\n }));\n const $element = this.getElement();\n $element.find('.top-block-preview-info').append($info);\n $element.find('.close').on('click', config.onClose);\n const $icon = $element.find('.top-block-preview-collapser .icon');\n $element.find('.top-block-preview-collapser').on('click', () => {\n $icon.toggleClass('icon-up');\n $icon.toggleClass('icon-down');\n $element.toggleClass('open');\n $element.toggleClass('close');\n });\n /**\n * @event ready\n */\n this.trigger('ready');\n });\n\n // initialize the component with the provided config\n // defer the call to allow to listen to the init event\n _.defer(function() {\n topBlock.init(config);\n });\n\n return topBlock;\n }\n\n return topBlockFactory;\n});\n\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2018 (original work) Open Assessment Technologies SA ;\n */\n\n/**\n * Config manager for the proxy of the QTI item previewer\n *\n * @author Jean-Sébastien Conan \n */\ndefine('taoQtiTestPreviewer/previewer/config/item',[\n 'lodash',\n 'util/url',\n 'util/config'\n], function(_, urlUtil, configHelper) {\n 'use strict';\n\n /**\n * Some default config values\n * @type {Object}\n * @private\n */\n var _defaults = {\n bootstrap : {\n serviceController : 'Previewer',\n serviceExtension : 'taoQtiTestPreviewer'\n }\n };\n\n /**\n * The list of handled config entries. Each required entry is set to true, while optional entries are set to false.\n * @type {Object}\n * @private\n */\n var _entries = {\n serviceCallId : true,\n bootstrap : false,\n timeout : false\n };\n\n /**\n * Creates a config object for the proxy implementation\n * @param {Object} config - Some required and optional config\n * @param {String} config.serviceCallId - An identifier for the service call\n * @param {String} [config.bootstrap.serviceController] - The name of the service controller\n * @param {String} [config.bootstrap.serviceExtension] - The name of the extension containing the service controller\n * @returns {Object}\n */\n return function itemPreviewerConfigFactory(config) {\n // protected storage\n var storage = configHelper.from(config, _entries, _defaults);\n var undef;\n\n // convert some values from seconds to milliseconds\n if (storage.timeout) {\n storage.timeout *= 1000;\n } else {\n storage.timeout = undef;\n }\n\n // returns only a proxy storage object : no direct access to data is provided\n return {\n /**\n * Gets the list of parameters\n * @param {String|Object} [itemIdentifier]\n * @returns {Object}\n */\n getParameters: function getParameters(itemIdentifier) {\n var type = typeof itemIdentifier;\n var parameters = {\n serviceCallId : this.getServiceCallId()\n };\n\n if (type === 'string') {\n // simple item identifier\n parameters.itemUri = itemIdentifier;\n // structured item identifier (a list of parameters)\n } else if (type === 'object' && _.isPlainObject(itemIdentifier)) {\n _.merge(parameters, itemIdentifier);\n } else if (type !== 'undefined') {\n throw new TypeError('Wrong parameter type provided for itemIdentifier: ' + type + '. Only string or plain object are allowed!');\n }\n\n return parameters;\n },\n\n /**\n * Gets the URI of the service call\n * @returns {String}\n */\n getServiceCallId : function getServiceCallId() {\n return storage.serviceCallId;\n },\n\n /**\n * Gets the name of the service controller\n * @returns {String}\n */\n getServiceController : function getServiceController() {\n return storage.bootstrap.serviceController || _defaults.bootstrap.serviceController;\n },\n\n /**\n * Gets the name of the extension containing the service controller\n * @returns {String}\n */\n getServiceExtension : function getServiceExtension() {\n return storage.bootstrap.serviceExtension || _defaults.bootstrap.serviceExtension;\n },\n\n /**\n * Gets an URL of a service action\n * @param {String} action - the name of the action to request\n * @returns {String} - Returns the URL\n */\n getTestActionUrl : function getTestActionUrl(action) {\n return urlUtil.route(action, this.getServiceController(), this.getServiceExtension(), this.getParameters());\n },\n\n /**\n * Gets an URL of a service action related to a particular item\n * @param {String|Object} itemIdentifier - The URI of the item\n * @param {String} action - the name of the action to request\n * @returns {String} - Returns the URL\n */\n getItemActionUrl : function getItemActionUrl(itemIdentifier, action) {\n return urlUtil.route(action, this.getServiceController(), this.getServiceExtension(), this.getParameters(itemIdentifier));\n },\n\n /**\n * Gets the request timeout\n * @returns {Number}\n */\n getTimeout : function getTimeout() {\n return storage.timeout;\n }\n };\n };\n});\n\n","\ndefine(\"json!taoQtiTestPreviewer/previewer/resources/devices.json\", function(){ return {\n \"tablets\": {\n \"193986c3715c81838870f908fa98d69a\": {\n \"label\": \"Amazon Kindle Fire HDX 7\\u2033\",\n \"width\": 960,\n \"height\": 600\n },\n \"4e8eafab11aad1486992d7ee2c8c16ca\": {\n \"label\": \"Apple iPad\",\n \"width\": 1024,\n \"height\": 768\n },\n \"5aac2932d9ad00d6d8a1604b8f9e4e8d\": {\n \"label\": \"Google Nexus 10, Motorola Xoom, Xyboard\",\n \"width\": 1280,\n \"height\": 800\n },\n \"9805d9753ad08c7630a9ee5418aa6c6c\": {\n \"label\": \"Google Nexus 7\",\n \"width\": 966,\n \"height\": 604\n },\n \"d4a431cedf4705d6bf2cba6d5788378b\": {\n \"label\": \"Samsung Galaxy Tab 7.7, 8.9, 10.1\",\n \"width\": 1280,\n \"height\": 800\n }\n },\n \"phones\": {\n \"1b89338531ef0155c8d6abc2ac02c81a\": {\n \"label\": \"Apple iPhone 3GS\",\n \"width\": 320,\n \"height\": 480,\n \"scaleFactor\": 1,\n \"dpWidth\": 320,\n \"dpHeight\": 480\n },\n \"3f89da99d84214cde7df87ebe0699a6f\": {\n \"label\": \"Apple iPhone 4\",\n \"width\": 640,\n \"height\": 960,\n \"scaleFactor\": 2,\n \"dpWidth\": 320,\n \"dpHeight\": 1920\n },\n \"0d36971a5b98b367f54ced708c9af849\": {\n \"label\": \"Apple iPhone 5\",\n \"width\": 640,\n \"height\": 1136,\n \"scaleFactor\": 2,\n \"dpWidth\": 320,\n \"dpHeight\": 2272\n },\n \"026beffcc051af995660ebdede986ace\": {\n \"label\": \"BlackBerry Z10\",\n \"width\": 768,\n \"height\": 1280,\n \"scaleFactor\": 2,\n \"dpWidth\": 384,\n \"dpHeight\": 2560\n },\n \"fd2dd53e667d6d49e4fa73356fa941dd\": {\n \"label\": \"BlackBerry Z30\",\n \"width\": 720,\n \"height\": 1280,\n \"scaleFactor\": 2,\n \"dpWidth\": 360,\n \"dpHeight\": 2560\n },\n \"707584c1ae17d9b5b2cbe8603c91c147\": {\n \"label\": \"Google Nexus 4\",\n \"width\": 768,\n \"height\": 1280,\n \"scaleFactor\": 2,\n \"dpWidth\": 384,\n \"dpHeight\": 2560\n },\n \"91823264de952e7f2347e07db5c4058b\": {\n \"label\": \"Google Nexus 5\",\n \"width\": 1080,\n \"height\": 1920,\n \"scaleFactor\": 3,\n \"dpWidth\": 360,\n \"dpHeight\": 5760\n },\n \"cd69817a6e147e8a4677389e56fcf568\": {\n \"label\": \"Google Nexus S\",\n \"width\": 480,\n \"height\": 800,\n \"scaleFactor\": 1.5,\n \"dpWidth\": 320,\n \"dpHeight\": 1200\n },\n \"75994faa6a38e31e99b53fcd75534a33\": {\n \"label\": \"HTC Evo, Touch HD, Desire HD, Desire\",\n \"width\": 480,\n \"height\": 800,\n \"scaleFactor\": 1.5,\n \"dpWidth\": 320,\n \"dpHeight\": 1200\n },\n \"0cab4dfccdfc880687cb608cfe4159db\": {\n \"label\": \"HTC One X, EVO LTE\",\n \"width\": 720,\n \"height\": 1280,\n \"scaleFactor\": 2,\n \"dpWidth\": 360,\n \"dpHeight\": 2560\n },\n \"c4ff41fcba24d74fc21dc3490ca1edc9\": {\n \"label\": \"HTC Sensation, Evo 3D\",\n \"width\": 540,\n \"height\": 960,\n \"scaleFactor\": 1.5,\n \"dpWidth\": 360,\n \"dpHeight\": 1440\n },\n \"fa969a5e0dd2de53700eeee4ba4ba142\": {\n \"label\": \"LG Optimus 2X, Optimus 3D, Optimus Black\",\n \"width\": 480,\n \"height\": 800,\n \"scaleFactor\": 1.5,\n \"dpWidth\": 320,\n \"dpHeight\": 1200\n },\n \"33c4f9364e295ec03531f3a3425819cf\": {\n \"label\": \"LG Optimus G\",\n \"width\": 768,\n \"height\": 1280,\n \"scaleFactor\": 2,\n \"dpWidth\": 384,\n \"dpHeight\": 2560\n },\n \"bc47f5275f0efd56fee52d43a8082981\": {\n \"label\": \"LG Optimus LTE, Optimus 4X HD\",\n \"width\": 720,\n \"height\": 1280,\n \"scaleFactor\": 1.7,\n \"dpWidth\": 424,\n \"dpHeight\": 2176\n },\n \"0732887e6e324fd10777b735520a34cf\": {\n \"label\": \"LG Optimus One\",\n \"width\": 320,\n \"height\": 480,\n \"scaleFactor\": 1.5,\n \"dpWidth\": 213,\n \"dpHeight\": 720\n },\n \"2e38a78364f09d0da0e9e1a3a68e7fb0\": {\n \"label\": \"Motorola Defy, Droid, Droid X, Milestone\",\n \"width\": 480,\n \"height\": 854,\n \"scaleFactor\": 1.5,\n \"dpWidth\": 320,\n \"dpHeight\": 1281\n },\n \"bd4b78dddc7c9625a4141a1b1ddabb87\": {\n \"label\": \"Motorola Droid 3, Droid 4, Droid Razr, Atrix 4G, Atrix 2\",\n \"width\": 540,\n \"height\": 960,\n \"scaleFactor\": 1,\n \"dpWidth\": 540,\n \"dpHeight\": 960\n },\n \"3bf1edf21cfa81006183d2b02974c84e\": {\n \"label\": \"Motorola Droid Razr HD\",\n \"width\": 720,\n \"height\": 1280,\n \"scaleFactor\": 1,\n \"dpWidth\": 720,\n \"dpHeight\": 1280\n },\n \"ab5a352e0e016b97dac986f06c394f55\": {\n \"label\": \"Nokia C5, C6, C7, N97, N8, X7\",\n \"width\": 360,\n \"height\": 640,\n \"scaleFactor\": 1,\n \"dpWidth\": 360,\n \"dpHeight\": 640\n },\n \"4826fb7d7257aeaac992ce699df41b3c\": {\n \"label\": \"Nokia Lumia 7X0, Lumia 8XX, Lumia 900, N800, N810, N900\",\n \"width\": 480,\n \"height\": 800,\n \"scaleFactor\": 1.5,\n \"dpWidth\": 320,\n \"dpHeight\": 1200\n },\n \"0a691ab20add7c432200f8fa6527b488\": {\n \"label\": \"Samsung Galaxy Note\",\n \"width\": 800,\n \"height\": 1280,\n \"scaleFactor\": 2,\n \"dpWidth\": 400,\n \"dpHeight\": 2560\n },\n \"9c23ee31be29960fbac9e9bbfc2fc7b0\": {\n \"label\": \"Samsung Galaxy Note 3\",\n \"width\": 1080,\n \"height\": 1920,\n \"scaleFactor\": 2,\n \"dpWidth\": 540,\n \"dpHeight\": 3840\n },\n \"92177c0508c1d73905a58e2338f2a81f\": {\n \"label\": \"Samsung Galaxy Note II\",\n \"width\": 720,\n \"height\": 1280,\n \"scaleFactor\": 2,\n \"dpWidth\": 360,\n \"dpHeight\": 2560\n },\n \"5222b8866dc4cc606725e16ffcc0a783\": {\n \"label\": \"Samsung Galaxy S III, Galaxy Nexus\",\n \"width\": 720,\n \"height\": 1280,\n \"scaleFactor\": 2,\n \"dpWidth\": 360,\n \"dpHeight\": 2560\n },\n \"37c1541e2bd55cfd0f4073b0ccdf68b3\": {\n \"label\": \"Samsung Galaxy S, S II, W\",\n \"width\": 480,\n \"height\": 800,\n \"scaleFactor\": 1.5,\n \"dpWidth\": 320,\n \"dpHeight\": 1200\n },\n \"2f7f64b7dda0144907ff300e83eed465\": {\n \"label\": \"Samsung Galaxy S4\",\n \"width\": 1080,\n \"height\": 1920,\n \"scaleFactor\": 3,\n \"dpWidth\": 360,\n \"dpHeight\": 5760\n },\n \"9c24f9057744dad56043702a9703127f\": {\n \"label\": \"Sony Xperia S, Ion\",\n \"width\": 720,\n \"height\": 1280,\n \"scaleFactor\": 2,\n \"dpWidth\": 360,\n \"dpHeight\": 2560\n },\n \"0a8b2732a016a9395c3af5f12dd9c0da\": {\n \"label\": \"Sony Xperia Sola, U\",\n \"width\": 480,\n \"height\": 854,\n \"scaleFactor\": 1,\n \"dpWidth\": 480,\n \"dpHeight\": 854\n },\n \"5a153d7f53d82dcb0801f041574a6a43\": {\n \"label\": \"Sony Xperia Z, Z1\",\n \"width\": 1080,\n \"height\": 1920,\n \"scaleFactor\": 3,\n \"dpWidth\": 360,\n \"dpHeight\": 5760\n }\n },\n \"screens\": {\n \"9e523ae15b61dc766f5c818726881ecf\": {\n \"label\": \"1920 \\u00d7 1080\",\n \"width\": 1920,\n \"height\": 1080,\n \"dpWidth\": 1920,\n \"dpHeight\": 1080,\n \"scaleFactor\": 1\n },\n \"07769cd8d0a7d09818b2f0b018042fb7\": {\n \"label\": \"1366 \\u00d7 768\",\n \"width\": 1366,\n \"height\": 768,\n \"dpWidth\": 1366,\n \"dpHeight\": 768,\n \"scaleFactor\": 1\n },\n \"72d5478a24194f98b9378e8e0fd65737\": {\n \"label\": \"1280 \\u00d7 1024\",\n \"width\": 1280,\n \"height\": 1024,\n \"dpWidth\": 1280,\n \"dpHeight\": 1024,\n \"scaleFactor\": 1\n },\n \"b7a6dd5900cc72e61f0d3479c7e314ec\": {\n \"label\": \"1280 \\u00d7 800\",\n \"width\": 1280,\n \"height\": 800,\n \"dpWidth\": 1280,\n \"dpHeight\": 800,\n \"scaleFactor\": 1\n },\n \"43193b0ff671a37d8232ab664190a125\": {\n \"label\": \"1024 \\u00d7 768\",\n \"width\": 1024,\n \"height\": 768,\n \"dpWidth\": 1024,\n \"dpHeight\": 768,\n \"scaleFactor\": 1\n },\n \"c29e48814af5443ff5688d9e967ce917\": {\n \"label\": \"800 \\u00d7 600\",\n \"width\": 800,\n \"height\": 600,\n \"dpWidth\": 800,\n \"dpHeight\": 600,\n \"scaleFactor\": 1\n }\n }\n};});\n\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2019 Open Assessment Technologies SA;\n */\n/**\n * Helper to work with screen values and mobile devices list\n * for \"select device\" select-box on any test-item preview page\n * for example using scale plugin app/taoQtiTestPreviewer/views/js/previewer/plugins/tools/scale/scale.js\n *\n * @author Dieter Raber \n * @author Pavel Hendelman \n */\ndefine('taoQtiTestPreviewer/previewer/helpers/devices',[\n 'lodash',\n 'json!taoQtiTestPreviewer/previewer/resources/devices.json'\n], function (\n _,\n deviceList\n) {\n 'use strict';\n\n /**\n * @typedef {Object} deviceScreen\n * @property {String} value - The selector's value to use\n * @property {String} label - The label to display in the selector\n * @property {Number} width - The width of the screen\n * @property {Number} height - The height of the screen\n */\n\n /**\n * Translation map to convert a device type to a collection's name in the provided list.\n * @type {Object}\n */\n var deviceTypeMap = {\n 'mobile': 'tablets',\n 'desktop': 'screens'\n };\n\n /**\n * Helpers to get the list of devices\n */\n var devicesHelper = {\n /**\n * Gets the list of devices to test item through. This list is meant to be used by a selector.\n * @param {String} type - The type of device from the list ['mobile', 'desktop']\n * @returns {deviceScreen[]} - The list of devices to test item through, filtered by the provided type\n */\n getDevicesByType : function getDevicesByType(type) {\n /*\n * @todo\n * The device list is currently based on the devices found on the Chrome emulator.\n * This is not ideal and should be changed in the future.\n * I have http://en.wikipedia.org/wiki/List_of_displays_by_pixel_density in mind but we\n * will need to figure what criteria to apply when generating the list.\n */\n var key = deviceTypeMap[type];\n\n return _.map(deviceList[key] || [], function mapDeviceData(device, identifier) {\n return {\n value: identifier,\n label: device.label,\n width: device.width,\n height: device.height\n };\n });\n },\n\n /**\n * Gets the list of mobile devices\n * @returns {deviceScreen[]} - The list of mobile devices to test item through\n */\n getMobileDevices: function getMobileDevices() {\n return devicesHelper.getDevicesByType('mobile');\n },\n\n /**\n * Gets the list of desktop devices\n * @returns {deviceScreen[]} - The list of desktop devices to test item through\n */\n getDesktopDevices: function getDesktopDevices() {\n return devicesHelper.getDevicesByType('desktop');\n }\n };\n\n return devicesHelper;\n});\n\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2020 (original work) Open Assessment Technologies SA ;\n */\n\n/**\n * Test Previewer Content Plugin : cloneLogoInTestPreview\n *\n * This plugin can be used as a hook to clone logo from the header in the back office to the header in the test preview\n *\n * @author Hanna Dzmitryieva \n */\ndefine('taoQtiTestPreviewer/previewer/plugins/content/cloneLogoInTestPreview',['jquery', 'taoTests/runner/plugin'], function ($, pluginFactory) {\n 'use strict';\n\n return pluginFactory({\n name: 'cloneLogoInTestPreview',\n\n /**\n * Initialize the plugin (called during runner's init)\n */\n init() {\n const testRunner = this.getTestRunner();\n\n testRunner.after('ready', () => {\n // clone logo to preview - because logo source + class + styles can be customized by client extension\n $('#tao-main-logo').clone().appendTo('.previewer-test-component header');\n });\n }\n });\n});\n\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2020 (original work) Open Assessment Technologies SA ;\n */\n\n/**\n * Test Previewer Content Plugin : EnhancedReadOnlyMode\n *\n * This plugin can be used as a hook to do modification in the item preview for read only mode\n *\n * @author Ansul Sharma \n */\ndefine('taoQtiTestPreviewer/previewer/plugins/content/enhancedReadOnlyMode',[\n 'jquery',\n 'lodash',\n 'i18n',\n 'taoTests/runner/plugin'\n], function ($, _, __, pluginFactory) {\n 'use strict';\n\n return pluginFactory({\n\n name: 'EnhancedReadOnlyMode',\n\n /**\n * Initialize the plugin (called during runner's init)\n */\n init() {\n const testRunner = this.getTestRunner();\n\n /**\n * Enables the plugin only in readOnly mode\n * @returns {Boolean}\n */\n const isPluginAllowed = () => {\n const config = testRunner.getConfig();\n return config.options.readOnly;\n };\n\n testRunner\n .after('renderitem', () => {\n if (isPluginAllowed()) {\n const $contentArea = testRunner.getAreaBroker().getContentArea();\n const $extendedTextinteractionTextAreas = $contentArea.find('.qti-extendedTextInteraction textarea.text-container');\n const $ckeEditorsContent = $contentArea.find('.qti-extendedTextInteraction div.cke_contents');\n\n /**\n * Updates the height of textarea element of all extended text interactions based on the height of the content\n */\n if($extendedTextinteractionTextAreas.length) {\n $extendedTextinteractionTextAreas.each(function() {\n this.style.height = `${this.scrollHeight + 20}px`;\n });\n }\n\n /**\n * Updates the height of all the ckeEditor container of wysiwyg extended text interaction based on the height of the iFrame\n */\n if($ckeEditorsContent.length) {\n $ckeEditorsContent.each(function() {\n const $ckeEditorContent = $(this);\n const $ckeEditorIFrame = $ckeEditorContent.find('iframe.cke_wysiwyg_frame');\n\n /**\n * Only update the height when the iFrame has finished loading the styles because font-size may change the height\n */\n $ckeEditorIFrame.on('load', () => {\n setTimeout(() => {\n const ckeEditorBody = $ckeEditorIFrame[0].contentWindow.document.querySelector('body');\n $ckeEditorContent[0].style.height = `${ckeEditorBody.scrollHeight + 20}px`;\n }, 0);\n });\n });\n }\n }\n });\n }\n });\n});\n\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2018 (original work) Open Assessment Technologies SA ;\n */\n\n/**\n * Test Previewer Control Plugin : Close\n *\n * @author Jean-Sébastien Conan \n */\ndefine('taoQtiTestPreviewer/previewer/plugins/controls/close',[\n 'jquery',\n 'lodash',\n 'i18n',\n 'ui/hider',\n 'taoTests/runner/plugin',\n 'tpl!taoQtiTest/runner/plugins/templates/button'\n], function ($, _, __, hider, pluginFactory, buttonTpl) {\n 'use strict';\n\n return pluginFactory({\n\n name: 'close',\n\n /**\n * Initialize the plugin (called during runner's init)\n */\n init: function init() {\n var self = this;\n var testRunner = this.getTestRunner();\n\n /**\n * Tells if the component is enabled\n * @returns {Boolean}\n */\n function isPluginAllowed() {\n var config = testRunner.getConfig();\n return !config.options.hideActionBars;\n }\n\n this.$element = $(buttonTpl({\n control: 'close',\n title: __('Close the previewer'),\n icon: 'close',\n text: __('Close'),\n className: 'context-action'\n }));\n\n this.$element.on('click', function (e) {\n e.preventDefault();\n if (self.getState('enabled') !== false) {\n self.disable();\n testRunner.trigger('finish');\n }\n });\n\n this.disable();\n\n testRunner\n .on('enablenav', function () {\n if (isPluginAllowed()) {\n self.enable();\n }\n })\n .on('disablenav', function () {\n self.disable();\n });\n },\n\n /**\n * Called during the runner's render phase\n */\n render: function render() {\n\n //attach the element to the navigation area\n var $container = this.getAreaBroker().getArea('context');\n $container.append(this.$element);\n },\n\n /**\n * Called during the runner's destroy phase\n */\n destroy: function destroy() {\n this.$element.remove();\n },\n\n /**\n * Enable the button\n */\n enable: function enable() {\n this.$element.prop('disabled', false)\n .removeClass('disabled');\n },\n\n /**\n * Disable the button\n */\n disable: function disable() {\n this.$element.prop('disabled', true)\n .addClass('disabled');\n },\n\n /**\n * Show the button\n */\n show: function show() {\n hider.show(this.$element);\n },\n\n /**\n * Hide the button\n */\n hide: function hide() {\n hider.hide(this.$element);\n }\n });\n});\n\n","\ndefine('tpl!taoQtiTestPreviewer/previewer/plugins/navigation/submit/preview-console', ['handlebars'], function(hb){ return hb.template(function (Handlebars,depth0,helpers,partials,data) {\n this.compilerInfo = [4,'>= 1.0.0'];\nhelpers = this.merge(helpers, Handlebars.helpers); data = data || {};\n \n\n\n return \"
          \\n
            \\n
            \";\n }); });\n","\ndefine('tpl!taoQtiTestPreviewer/previewer/plugins/navigation/submit/preview-console-line', ['handlebars'], function(hb){ return hb.template(function (Handlebars,depth0,helpers,partials,data) {\n this.compilerInfo = [4,'>= 1.0.0'];\nhelpers = this.merge(helpers, Handlebars.helpers); data = data || {};\n var buffer = \"\", stack1, helper, functionType=\"function\", escapeExpression=this.escapeExpression;\n\n\n buffer += \"
          • \";\n  if (helper = helpers.time) { stack1 = helper.call(depth0, {hash:{},data:data}); }\n  else { helper = (depth0 && depth0.time); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }\n  buffer += escapeExpression(stack1)\n    + \"\";\n  if (helper = helpers.type) { stack1 = helper.call(depth0, {hash:{},data:data}); }\n  else { helper = (depth0 && depth0.type); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }\n  buffer += escapeExpression(stack1)\n    + \"\";\n  if (helper = helpers.message) { stack1 = helper.call(depth0, {hash:{},data:data}); }\n  else { helper = (depth0 && depth0.message); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }\n  if(stack1 || stack1 === 0) { buffer += stack1; }\n  buffer += \"
          • \";\n return buffer;\n }); });\n","\ndefine('tpl!taoQtiTestPreviewer/previewer/plugins/navigation/submit/preview-console-closer', ['handlebars'], function(hb){ return hb.template(function (Handlebars,depth0,helpers,partials,data) {\n this.compilerInfo = [4,'>= 1.0.0'];\nhelpers = this.merge(helpers, Handlebars.helpers); data = data || {};\n var buffer = \"\", helper, options, helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;\n\n\n buffer += \"\";\n return buffer;\n }); });\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2018-2021 (original work) Open Assessment Technologies SA ;\n */\n\n/**\n * Test Previewer Navigation Plugin : Submit\n *\n * @author Jean-Sébastien Conan \n */\ndefine('taoQtiTestPreviewer/previewer/plugins/navigation/submit/submit',[\n 'jquery',\n 'lodash',\n 'i18n',\n 'moment',\n 'ui/hider',\n 'ui/autoscroll',\n 'util/strPad',\n 'taoTests/runner/plugin',\n 'taoQtiItem/qtiCommonRenderer/helpers/PciResponse',\n 'taoQtiItem/runner/rendererStrategies',\n 'tpl!taoQtiTest/runner/plugins/templates/button',\n 'tpl!taoQtiTestPreviewer/previewer/plugins/navigation/submit/preview-console',\n 'tpl!taoQtiTestPreviewer/previewer/plugins/navigation/submit/preview-console-line',\n 'tpl!taoQtiTestPreviewer/previewer/plugins/navigation/submit/preview-console-closer'\n], function (\n $,\n _,\n __,\n moment,\n hider,\n autoscroll,\n strPad,\n pluginFactory,\n pciResponse,\n rendererStrategies,\n buttonTpl,\n consoleTpl,\n consoleLineTpl,\n consoleCloserTpl\n) {\n 'use strict';\n\n /**\n * Some default config for the plugin\n * @type {Object}\n */\n const defaults = {\n submitTitle: __('Submit and show the result'),\n submitText: __('Submit'),\n submitIcon: 'forward'\n };\n\n return pluginFactory({\n\n name: 'submit',\n\n /**\n * Initialize the plugin (called during runner's init)\n */\n init() {\n const testRunner = this.getTestRunner();\n const pluginConfig = _.defaults(this.getConfig(), defaults);\n\n /**\n * Tells if the component is enabled\n * @returns {Boolean}\n */\n const isPluginAllowed = () => {\n const config = testRunner.getConfig();\n return !config.options.readOnly && rendererStrategies(config.options.view).getName() !== 'reviewRenderer';\n };\n\n // display the console and its related controls, then auto scrolls to the last element\n const showConsole = () => {\n hider.show(this.controls.$console);\n hider.show(this.controls.$consoleBody);\n hider.show(this.controls.$consoleCloser);\n autoscroll(this.controls.$consoleBody.children().last(), this.controls.$consoleBody);\n };\n\n // hide the console and its related controls\n const hideConsole = () => {\n hider.hide(this.controls.$console);\n hider.hide(this.controls.$consoleCloser);\n };\n\n // add a line to the console\n const addConsoleLine = (type, message) => {\n const data = {\n time: strPad(moment().format('HH:mm:ss'), 12, ' '),\n type: strPad(type || '', 18, ' '),\n message: strPad(message || '', 18, ' ')\n };\n this.controls.$consoleBody.append($(consoleLineTpl(data)));\n };\n\n // display responses in the console\n const showResponses = (type, responses) => {\n _.forEach(responses, (response, identifier) => {\n addConsoleLine(type, strPad(`${identifier}: `, 15, ' ') + _.escape(pciResponse.prettyPrint(response)));\n });\n };\n\n this.controls = {\n $button: $(buttonTpl({\n control: 'submit',\n title: pluginConfig.submitTitle,\n icon: pluginConfig.submitIcon,\n text: pluginConfig.submitText\n })),\n $console: $(consoleTpl()),\n $consoleCloser: $(consoleCloserTpl())\n };\n this.controls.$consoleBody = this.controls.$console.find('.preview-console-body');\n\n this.controls.$button.on('click', e => {\n e.preventDefault();\n if (this.getState('enabled') !== false) {\n this.disable();\n testRunner.trigger('submititem');\n }\n });\n\n this.controls.$consoleCloser.on('click', e => {\n e.preventDefault();\n hideConsole();\n });\n\n if (!isPluginAllowed()) {\n this.hide();\n }\n\n this.disable();\n\n testRunner\n .on('render', () => {\n if (isPluginAllowed()) {\n this.show();\n } else {\n this.hide();\n }\n })\n .on('submitresponse', responses => {\n showResponses(__('Submitted data'), responses);\n showConsole();\n })\n .on('scoreitem', responses => {\n if (responses.itemSession) {\n showResponses(__('Output data'), responses.itemSession);\n showConsole();\n }\n })\n .on('enablenav', () => {\n this.enable();\n })\n .on('disablenav', () => {\n this.disable();\n });\n },\n\n /**\n * Called during the runner's render phase\n */\n render() {\n //attach the element to the navigation area\n const $container = this.getAreaBroker().getContainer();\n const $navigation = this.getAreaBroker().getNavigationArea();\n $navigation.append(this.controls.$button);\n $navigation.append(this.controls.$consoleCloser);\n $container.append(this.controls.$console);\n },\n\n /**\n * Called during the runner's destroy phase\n */\n destroy() {\n _.forEach(this.controls, $el => $el.remove());\n this.controls = null;\n },\n\n /**\n * Enable the button\n */\n enable() {\n this.controls.$button\n .prop('disabled', false)\n .removeClass('disabled');\n },\n\n /**\n * Disable the button\n */\n disable() {\n this.controls.$button\n .prop('disabled', true)\n .addClass('disabled');\n },\n\n /**\n * Show the button\n */\n show() {\n hider.show(this.controls.$button);\n },\n\n /**\n * Hide the button\n */\n hide() {\n _.forEach(this.controls, hider.hide);\n }\n });\n});\n\n","\ndefine('tpl!taoQtiTestPreviewer/previewer/plugins/tools/scale/component/tpl/devices-previewer', ['handlebars'], function(hb){ return hb.template(function (Handlebars,depth0,helpers,partials,data) {\n this.compilerInfo = [4,'>= 1.0.0'];\nhelpers = this.merge(helpers, Handlebars.helpers); data = data || {};\n var buffer = \"\", stack1, helper, functionType=\"function\", escapeExpression=this.escapeExpression;\n\n\n buffer += \"
            \\n
            \\n
            \\n
            \\n
            \\n
            \\n
            \\n
            \";\n return buffer;\n }); });\n","\ndefine('css!taoQtiTestPreviewer/previewer/plugins/tools/scale/component/css/devicesPreviewer',[],function(){});\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2019 Open Assessment Technologies SA ;\n */\n/**\n * @author Jean-Sébastien Conan \n */\ndefine('taoQtiTestPreviewer/previewer/plugins/tools/scale/component/devicesPreviewer',[\n 'jquery',\n 'lodash',\n 'i18n',\n 'ui/component',\n 'ui/transformer',\n 'tpl!taoQtiTestPreviewer/previewer/plugins/tools/scale/component/tpl/devices-previewer',\n 'css!taoQtiTestPreviewer/previewer/plugins/tools/scale/component/css/devicesPreviewer.css'\n], function ($, _, __, componentFactory, transformer, devicesPreviewerTpl) {\n 'use strict';\n\n /**\n * @typedef {Object} size\n * @property {Number} width\n * @property {Number} height\n */\n\n /**\n * Some default config\n * @type {Object}\n */\n var defaults = {\n deviceType: 'standard',\n deviceWith: 0,\n deviceHeight: 0,\n deviceOrientation: null\n };\n\n /**\n * Builds a devices previewer component. It will works in two modes:\n * - the standard mode will do nothing special, this is simply a sleeping mode\n * - the device mode will redesign the view to show a content using a device's layout and aspect ratio\n *\n * @example\n * var devicesPreviewer = devicesPreviewerFactory('.previewer .previewer-content);\n * ...\n * // react to changes\n * devicesPreviewer\n * .on('devicewidthchange', function(width) {\n * // the width has changed\n * })\n * .on('deviceheightchange', function(height) {\n * // the height has changed\n * })\n * .on('deviceorientationchange', function(orientation) {\n * // the orientation has changed\n * })\n * .on('devicetypechange', function(type) {\n * // the type has changed\n * })\n * .on('devicepreview', function() {\n * // the device preview mode has been applied\n * });\n * ...\n * // apply changes\n * devicesPreviewer\n * .setDeviceType(type)\n * .setDeviceOrientation(orientation)\n * .setDeviceWidth(width)\n * .setDeviceHeight(height)\n * .previewDevice();\n * ...\n *\n * @param {HTMLElement|String} container\n * @param {Object} config\n * @param {String} [config.deviceType='standard'] - The preview mode to apply\n * @param {Number} [config.deviceWidth=null] - The width of the device to preview\n * @param {Number} [config.deviceHeight=null] - The height of the device to preview\n * @param {String} [config.deviceOrientation='landscape'] - The device orientation\n * @returns {devicesPreviewer}\n * @fires ready - When the component is ready to work\n */\n function devicesPreviewerFactory(container, config) {\n var controls = null;\n\n /**\n * Remove the applied scale\n */\n var resetScale = function resetScale() {\n if (controls) {\n controls.$previewContent.removeAttr('style');\n controls.$previewContainer.removeAttr('style');\n }\n };\n\n // component specific API\n var api = {\n /**\n * Gets the device width.\n * @returns {Number}\n */\n getDeviceWidth: function getDeviceWidth() {\n return this.getConfig().deviceWidth;\n },\n\n /**\n * Sets the device width.\n * @param {String|Number} width\n * @returns {devicesPreviewer}\n * @fires devicewidthchange\n */\n setDeviceWidth: function setDeviceWidth(width) {\n var componentConfig = this.getConfig();\n componentConfig.deviceWidth = parseInt(width, 10) || 0;\n\n /**\n * @event devicewidthchange\n * @param {Number} deviceWidth\n */\n this.trigger('devicewidthchange', componentConfig.deviceWidth);\n\n return this;\n },\n\n /**\n * Gets the device height.\n * @returns {Number}\n */\n getDeviceHeight: function getDeviceHeight() {\n return this.getConfig().deviceHeight;\n },\n\n /**\n * Sets the device height.\n * @param {String|Number} height\n * @returns {devicesPreviewer}\n * @fires deviceheightchange\n */\n setDeviceHeight: function setDeviceHeight(height) {\n var componentConfig = this.getConfig();\n componentConfig.deviceHeight = parseInt(height, 10) || 0;\n\n /**\n * @event deviceheightchange\n * @param {Number} deviceHeight\n */\n this.trigger('deviceheightchange', componentConfig.deviceHeight);\n\n return this;\n },\n\n /**\n * Gets the device orientation.\n * @returns {String}\n */\n getDeviceOrientation: function getDeviceOrientation() {\n return this.getConfig().deviceOrientation;\n },\n\n /**\n * Sets the device orientation.\n * @param {String} orientation\n * @returns {devicesPreviewer}\n * @fires deviceorientationchange\n */\n setDeviceOrientation: function setDeviceOrientation(orientation) {\n var componentConfig = this.getConfig();\n componentConfig.deviceOrientation = orientation;\n\n if (this.is('rendered')) {\n // use .attr() instead of .data() to ensure the DOM will be properly updated\n // this is required as CSS must take the relay to control the display\n this.getElement().attr('data-orientation', componentConfig.deviceOrientation);\n }\n\n /**\n * @event deviceorientationchange\n * @param {String} deviceOrientation\n */\n this.trigger('deviceorientationchange', componentConfig.deviceOrientation);\n\n return this;\n },\n\n /**\n * Tells if the previewer has entered in a device mode or in the standard mode.\n * Standard mode means 'actual size'.\n * @returns {Boolean}\n */\n isDeviceMode: function isDeviceMode() {\n return this.getDeviceType() !== 'standard';\n },\n\n /**\n * Gets the device type.\n * @returns {String}\n */\n getDeviceType: function getDeviceType() {\n return this.getConfig().deviceType;\n },\n\n /**\n * Sets the type of device\n * @param {String} type\n * @returns {devicesPreviewer}\n * @fires devicetypechange\n */\n setDeviceType: function setDeviceType(type) {\n var componentConfig = this.getConfig();\n componentConfig.deviceType = type;\n\n if (this.is('rendered')) {\n // use .attr() instead of .data() to ensure the DOM will be properly updated\n // this is required as CSS must take the relay to control the display\n this.getElement().attr('data-type', componentConfig.deviceType);\n }\n\n /**\n * @event devicetypechange\n * @param {String} deviceType\n */\n this.trigger('devicetypechange', componentConfig.deviceType);\n\n return this;\n },\n\n /**\n * Previews the content using the current device settings\n * @returns {devicesPreviewer}\n * @fires devicepreview after the device has been set on preview\n */\n previewDevice: function previewDevice() {\n var width, height;\n\n if (this.is('rendered')) {\n if (this.is('disabled') || this.getDeviceType() === 'standard') {\n // standard mode and disabled state both should be reflected by a \"no scale\" view\n this.clearScale();\n } else {\n // in device preview mode, we need to apply the device's size with respect to the orientation\n if (this.getDeviceOrientation() === 'portrait') {\n width = this.getDeviceHeight();\n height = this.getDeviceWidth();\n } else {\n width = this.getDeviceWidth();\n height = this.getDeviceHeight();\n }\n this.applyScale(width, height);\n }\n\n /**\n * @event devicepreview\n */\n this.trigger('devicepreview');\n }\n\n return this;\n },\n\n /**\n * Removes the scale settings applied on the devices previewer\n * @returns {devicesPreviewer}\n * @fires scaleclear after the scale settings have been cleared\n */\n clearScale: function clearScale() {\n if (this.is('rendered')) {\n resetScale();\n\n /**\n * @event scaleclear\n */\n this.trigger('scaleclear');\n }\n\n return this;\n },\n\n /**\n * Computes and applies the scale settings on the devices previewer\n * @param {Number} width\n * @param {Number} height\n * @returns {devicesPreviewer}\n * * @fires scalechange after the scale settings have been applied\n */\n applyScale: function applyScale(width, height) {\n var frameSize, frameMargins, scaleFactor;\n\n if (this.is('rendered')) {\n resetScale();\n\n frameSize = this.getFrameSize();\n frameMargins = this.getFrameMargins();\n scaleFactor = this.getScaleFactor(width, height);\n\n controls.$previewContent\n .width(width)\n .height(height);\n\n controls.$previewContainer\n .css('left', (frameSize.width - (width + frameMargins.width) * scaleFactor) / 2)\n .width(width + frameMargins.width)\n .height(height + frameMargins.height);\n\n transformer.setTransformOrigin(controls.$previewContainer, 0, 0);\n transformer.scale(controls.$previewContainer, scaleFactor);\n\n /**\n * @event scalechange\n */\n this.trigger('scalechange');\n }\n\n return this;\n },\n\n /**\n * Computes and gets the margins of the previewer frame\n * @returns {size}\n */\n getFrameMargins: function getFrameMargins() {\n var margins = {\n width: 0,\n height: 0\n };\n if (this.is('rendered')) {\n margins.width = controls.$previewContainer.outerWidth() - controls.$previewContent.width();\n margins.height = controls.$previewContainer.outerHeight() - controls.$previewContent.height();\n }\n return margins;\n },\n\n /**\n * Computes and gets the available size in the previewer frame\n * @returns {size}\n */\n getFrameSize: function getFrameSize() {\n var size = {\n width: 0,\n height: 0\n };\n if (this.is('rendered')) {\n size.width = this.getContainer().innerWidth();\n size.height = this.getContainer().innerHeight();\n }\n return size;\n },\n\n /**\n * Computes and gets the scale factor of the previewer frame\n * @param {Number} width\n * @param {Number} height\n * @returns {Number}\n */\n getScaleFactor: function getScaleFactor(width, height) {\n var margins, frameSize;\n var scaleFactor = {\n x: 1,\n y: 1\n };\n if (this.is('rendered') && this.isDeviceMode()) {\n frameSize = this.getFrameSize();\n margins = this.getFrameMargins();\n width += margins.width;\n height += margins.height;\n\n if (width > frameSize.width) {\n scaleFactor.x = frameSize.width / width;\n }\n\n if (height > frameSize.height) {\n scaleFactor.y = frameSize.height / height;\n }\n }\n return Math.min(scaleFactor.x, scaleFactor.y);\n },\n\n /**\n * Wraps the previewed content into the previewer frame\n * @param {HTMLElement|jQuery} element\n * @returns {devicesPreviewer}\n * @fires wrap after the element has been wrapped\n */\n wrap: function wrap(element) {\n if (this.is('rendered')) {\n // restore current wrapped element to its previous place\n this.unwrap();\n\n // move the element to wrap in the preview container\n controls.$wrappedElement = $(element);\n controls.$wrappedElementContainer = controls.$wrappedElement.parent();\n controls.$previewContent.append(controls.$wrappedElement);\n\n /**\n * @event wrap\n * @param {jQuery} $wrappedElement - The element that has been wrapped\n */\n this.trigger('wrap', controls.$wrappedElement);\n }\n\n return this;\n },\n\n /**\n * Unwraps the previewed content from the previewer frame\n * @returns {devicesPreviewer}\n * @fires unwrap after the element has been unwrapped\n */\n unwrap: function unwrap() {\n var $wasWrappedElement;\n if (this.is('rendered') && controls.$wrappedElement) {\n $wasWrappedElement = controls.$wrappedElement;\n\n // restore current wrapped element to its previous place\n controls.$wrappedElementContainer.append(controls.$wrappedElement);\n controls.$wrappedElement = null;\n controls.$wrappedElementContainer = null;\n\n /**\n * @event unwrap\n * @param {jQuery} $wrappedElement - The element that was wrapped\n */\n this.trigger('unwrap', $wasWrappedElement);\n }\n\n return this;\n }\n };\n\n // build and setup the component\n var devicesPreviewer = componentFactory(api, defaults)\n // set the component's layout\n .setTemplate(devicesPreviewerTpl)\n\n // auto render on init\n .on('init', function () {\n var componentConfig = this.getConfig();\n\n // init the internal state\n this.setDeviceType(componentConfig.deviceType);\n this.setDeviceWidth(componentConfig.deviceWidth);\n this.setDeviceHeight(componentConfig.deviceHeight);\n this.setDeviceOrientation(componentConfig.deviceOrientation);\n\n // auto render on init\n _.defer(function () {\n devicesPreviewer.render(container);\n });\n })\n\n // renders the component\n .on('render', function () {\n var $element = this.getElement();\n controls = {\n // internal elements\n $previewContainer: $element.find('.preview-container'),\n $previewFrame: $element.find('.preview-frame'),\n $previewContent: $element.find('.preview-content'),\n\n // placeholder for the wrapped element\n $wrappedElement: null,\n $wrappedElementContainer: null\n };\n\n /**\n * @event ready\n */\n this.trigger('ready');\n })\n\n // take care of the disable state\n .on('disable enable', function () {\n var self = this;\n if (this.is('rendered')) {\n // need to defer the call as the enable/disable events are emitted before the state is updated\n _.defer(function () {\n self.previewDevice();\n });\n }\n })\n\n // cleanup the place\n .on('destroy', function () {\n this.unwrap();\n controls = null;\n });\n\n // initialize the component with the provided config\n // defer the call to allow to listen to the init event\n _.defer(function () {\n devicesPreviewer.init(config);\n });\n\n return devicesPreviewer;\n }\n\n return devicesPreviewerFactory;\n});\n\n","\ndefine('tpl!taoQtiTestPreviewer/previewer/plugins/tools/scale/component/tpl/devices-selector', ['handlebars'], function(hb){ return hb.template(function (Handlebars,depth0,helpers,partials,data) {\n this.compilerInfo = [4,'>= 1.0.0'];\nhelpers = this.merge(helpers, Handlebars.helpers); data = data || {};\n \n\n\n return \"
            \\n
            \\n
            \\n
            \\n
            \\n
            \";\n }); });\n","\ndefine('tpl!taoQtiTestPreviewer/previewer/plugins/tools/scale/component/tpl/selector', ['handlebars'], function(hb){ return hb.template(function (Handlebars,depth0,helpers,partials,data) {\n this.compilerInfo = [4,'>= 1.0.0'];\nhelpers = this.merge(helpers, Handlebars.helpers); data = data || {};\n var buffer = \"\", stack1, helper, functionType=\"function\", escapeExpression=this.escapeExpression, self=this;\n\nfunction program1(depth0,data) {\n \n var buffer = \"\", stack1, helper;\n buffer += \"\\n \\n \";\n return buffer;\n }\nfunction program2(depth0,data) {\n \n \n return \"selected=\\\"selected\\\"\";\n }\n\n buffer += \"\";\n return buffer;\n }); });\n","\ndefine('css!taoQtiTestPreviewer/previewer/plugins/tools/scale/component/css/devicesSelector',[],function(){});\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2019 Open Assessment Technologies SA ;\n */\n/**\n * @author Jean-Sébastien Conan \n */\ndefine('taoQtiTestPreviewer/previewer/plugins/tools/scale/component/devicesSelector',[\n 'jquery',\n 'lodash',\n 'i18n',\n 'ui/component',\n 'ui/selecter',\n 'taoQtiTestPreviewer/previewer/helpers/devices',\n 'tpl!taoQtiTestPreviewer/previewer/plugins/tools/scale/component/tpl/devices-selector',\n 'tpl!taoQtiTestPreviewer/previewer/plugins/tools/scale/component/tpl/selector',\n 'css!taoQtiTestPreviewer/previewer/plugins/tools/scale/component/css/devicesSelector.css'\n], function ($, _, __, componentFactory, lookupSelecter, devicesHelper, devicesSelectorTpl, selectorTpl) {\n 'use strict';\n\n /**\n * @typedef {Object} selectorEntry\n * @property {String} value - The value that identifies the entry\n * @property {String} label - The text displayed to describe the entry\n */\n\n /**\n * @typedef {selectorEntry} mainSelectorEntry\n * @property {Boolean} devicesList - tells if a list of devices is expected\n * @property {Boolean} orientation - tells if a list of orientations is expected\n */\n\n /**\n * Some default config\n * @type {Object}\n */\n var defaults = {\n type: 'standard',\n device: null,\n orientation: 'landscape'\n };\n\n /**\n * List of available types of devices\n * @type {mainSelectorEntry[]}\n */\n var deviceTypesList = [{\n value: 'standard',\n label: __('Actual size'),\n devicesList: false,\n orientation: false\n }, {\n value: 'desktop',\n label: __('Desktop preview'),\n devicesList: true,\n orientation: false\n }, {\n value: 'mobile',\n label: __('Mobile preview'),\n devicesList: true,\n orientation: true\n }];\n\n /**\n * List of available orientations\n * @type {selectorEntry[]}\n */\n var deviceOrientationsList = [{\n value: 'landscape',\n label: __('Landscape')\n }, {\n value: 'portrait',\n label: __('Portrait')\n }];\n\n /**\n * Map selector's names to setter callbacks.\n * This will be used to call the expected setter when selecting a value.\n * @see devicesSelector.select()\n * @type {Object}\n */\n var callbackMap = {\n type: 'setType',\n device: 'setDevice',\n mobile: 'setDevice',\n desktop: 'setDevice',\n orientation: 'setOrientation'\n };\n\n /**\n * Gets the data for a selected entry\n * @param {String} selected\n * @param {selectorEntry[]|deviceScreen[]} list\n * @returns {selectorEntry|deviceScreen|null}\n */\n function getSelectorData(selected, list) {\n if (selected && _.size(list)) {\n return _.find(list, {value: selected}) || null;\n }\n return null;\n }\n\n /**\n * Ensures an identifier is valid with respect to the provided list, or defaulted to null.\n * @param {String} identifier\n * @param {selectorEntry[]} list\n * @returns {String|null}\n */\n function getValidIdentifier(identifier, list) {\n if (list && list.length) {\n if (_.find(list, {value: identifier})) {\n return identifier;\n } else {\n return _.first(list).value;\n }\n }\n return null;\n }\n\n /**\n * Update a Select2 control\n * @param {jQuery} $selector\n * @param {String} value\n * @returns {jQuery}\n */\n function updateSelect2($selector, value) {\n var current = $selector.val();\n // avoid to stress the setters if the value is already set\n if (current !== value) {\n $selector.val(value);\n $selector.trigger('change');\n }\n return $selector;\n }\n\n /**\n * Uninstalls a Select2 control\n * @param {jQuery} $selector\n * @returns {jQuery}\n */\n function removeSelect2($selector) {\n if ($selector.hasClass(\"select2-offscreen\")) {\n $selector.select2('destroy');\n }\n return $selector;\n }\n\n /**\n * Builds a devices selector component. It will provides 3 selectors in cascade:\n * - the first allows to select the type of device\n * - the second allows to select the device itself, the list being filtered by the value of the first selector\n * - the third allows to select the display orientation, if applicable\n *\n * @example\n * var devicesSelector = devicesSelectorFactory('.previewer .previewer-top-bar);\n * ...\n * // react to type change\n * devicesSelector.on('typechange', function(type) {\n * if (!this.isDeviceMode()) {\n * // reset the type to standard, we can re-apply the default size\n * }\n * });\n *\n * // react to device change\n * devicesSelector.on('devicechange', function(device, data) {\n * // apply the size provided in data\n * });\n *\n * // react to orientation change\n * devicesSelector.on('orientationchange', function(orientation) {\n * // apply the orientation\n * });\n *\n * @param {HTMLElement|String} container\n * @param {Object} config\n * @param {String} [config.type='standard'] - The default selected device type\n * @param {String} [config.device=null] - The default selected device\n * @param {String} [config.orientation='landscape'] - The default selected orientation\n * @returns {devicesSelector}\n * @fires ready - When the component is ready to work\n */\n function devicesSelectorFactory(container, config) {\n // internal state\n var selected = {\n type: null,\n device: null,\n orientation: null,\n desktop: null,\n mobile: null\n };\n var devicesList = [];\n var typeData = null;\n var controls = null;\n\n /**\n * Changes a DOM property on each selector\n * @param {String} property\n * @param {String|Boolean|Number} value\n */\n var setControlsProp = function setControlsProp(property, value) {\n _.forEach(controls, function($selector) {\n $selector.prop(property, value);\n });\n };\n\n // component specific API\n var api = {\n /**\n * Tells if the selector has entered in a device mode or in the standard mode.\n * Standard mode means 'actual size'.\n * @returns {Boolean}\n */\n isDeviceMode: function isDeviceMode() {\n return selected.type !== 'standard';\n },\n\n /**\n * Reflects the mode to the DOM\n * @returns {devicesSelector}\n */\n updateMode: function updateMode() {\n // use .attr() instead of .data() to ensure the DOM will be properly updated\n // this is required as CSS must take the relay to control the display\n if (this.is('rendered')) {\n this.getElement().attr('data-type', selected.type);\n }\n return this;\n },\n\n /**\n * Gets the selected device type.\n * @returns {String} The type of device, from the list `['standard', 'mobile', 'desktop']`\n */\n getType: function getType() {\n return selected.type;\n },\n\n /**\n * Gets the selected device orientation.\n * If the current mode is not a device mode (i.e. actual size), null is returned.\n * @returns {String}\n */\n getOrientation: function getOrientation() {\n if (typeData && typeData.orientation) {\n return selected.orientation;\n }\n return null;\n },\n\n /**\n * Gets the identifier of the selected device.\n * If the current mode is not a device mode (i.e. actual size), null is returned.\n * @returns {String|null}\n */\n getDevice: function getDevice() {\n if (typeData && typeData.devicesList) {\n return selected.device;\n }\n return null;\n },\n\n /**\n * Gets the data for the selected device.\n * If the current mode is not a device mode (i.e. actual size), null is returned.\n * @returns {deviceScreen|null}\n */\n getDeviceData: function getDeviceData() {\n return getSelectorData(this.getDevice(), devicesList);\n },\n\n /**\n * Selects a type of device\n * @param {String} identifier\n * @returns {devicesSelector}\n * @fires typechange event after the type has been changed\n * @fires devicechange event after the device has been updated if a list of devices is expected\n */\n setType: function setType(identifier) {\n // validate the identifier before applying the change\n identifier = getValidIdentifier(identifier, deviceTypesList);\n if (identifier !== selected.type) {\n selected.type = identifier;\n selected.device = null;\n\n // when the type changes, the list of devices must be updated\n devicesList = devicesHelper.getDevicesByType(selected.type);\n typeData = getSelectorData(selected.type, deviceTypesList);\n\n // update the rendered content\n if (this.is('rendered')) {\n updateSelect2(controls.$typeSelector, selected.type);\n this.updateMode();\n }\n\n /**\n * @event typechange\n * @param {String} selectedType\n */\n this.trigger('typechange', selected.type);\n\n // the current device must be adapted if a list of devices is expected\n if (typeData.devicesList) {\n this.setDevice(selected[selected.type]);\n }\n }\n return this;\n },\n\n /**\n * Sets the selected device orientation\n * @param {String} identifier\n * @returns {devicesSelector}\n * @fires orientationchange event after the type has been changed\n */\n setOrientation: function setOrientation(identifier) {\n // validate the identifier before applying the change\n identifier = getValidIdentifier(identifier, deviceOrientationsList);\n if (identifier !== selected.orientation) {\n selected.orientation = identifier;\n\n // update the rendered content\n if (this.is('rendered')) {\n updateSelect2(controls.$orientationSelector, selected.orientation);\n }\n\n /**\n * @event orientationchange\n * @param {String} selectedOrientation\n */\n this.trigger('orientationchange', selected.orientation);\n }\n return this;\n },\n\n /**\n * Selects a device\n * @param {String} identifier\n * @returns {devicesSelector}\n * @fires devicechange event after the device has been changed\n */\n setDevice: function setDevice(identifier) {\n var $selector;\n\n // validate the identifier before applying the change\n identifier = getValidIdentifier(identifier, devicesList);\n if (identifier !== selected.device) {\n selected.device = identifier;\n selected[selected.type] = identifier;\n\n // update the rendered content, depending on the device's category\n if (this.is('rendered') && this.isDeviceMode()) {\n $selector = controls['$' + selected.type + 'Selector'];\n if ($selector) {\n updateSelect2($selector, selected.device);\n }\n }\n\n /**\n * @event devicechange\n * @param {String} selectedDevice\n * @param {deviceScreen} deviceData\n */\n this.trigger('devicechange', selected.device, this.getDeviceData());\n }\n return this;\n },\n\n /**\n * Selects a value in the proper selector\n * @param {String} name - The name of the selector\n * @param {String} value - The value to select\n * @returns {devicesSelector}\n */\n select: function select(name, value) {\n var setterName = callbackMap[name];\n if (setterName && _.isFunction(this[setterName])) {\n this[setterName](value);\n }\n return this;\n },\n\n /**\n * Reset to default values, from the config.\n * @returns {devicesSelector}\n */\n reset: function reset() {\n var componentConfig = this.getConfig();\n this.setType(componentConfig.type);\n this.setDevice(componentConfig.device);\n this.setOrientation(componentConfig.orientation);\n return this;\n }\n };\n\n // build and setup the component\n var devicesSelector = componentFactory(api, defaults)\n // set the component's layout\n .setTemplate(devicesSelectorTpl)\n\n // auto render on init\n .on('init', function () {\n // ensure the initial state is aligned with the config\n this.reset();\n\n // auto render on init\n _.defer(function () {\n devicesSelector.render(container);\n });\n })\n\n // renders the component\n .on('render', function () {\n var self = this;\n\n /**\n * Renders a selector from a list of entries. Takes care of the currently selected value.\n * @param {String} name - The name of the selector\n * @param {selectorEntry[]} list - The list of entries\n * @param {String} selectedValue - The currently selected value\n * @param {String} [category=name] - The category of the selector (type, device, orientation).\n * Defaulted to the name if not provided.\n * @returns {jQuery}\n */\n function renderSelector(name, list, selectedValue, category) {\n var $selector = $(selectorTpl({\n name: name,\n category: category || name,\n items: _.map(list, function(item) {\n return {\n value: item.value,\n label: item.label,\n selected: selectedValue === item.value\n };\n })\n }));\n self.getElement().find('.' + name + '-selector').html($selector);\n return $selector;\n }\n\n // create each selector, and keep access to them\n controls = {\n $typeSelector: renderSelector('type', deviceTypesList, selected.type),\n $desktopSelector: renderSelector('desktop', devicesHelper.getDesktopDevices(), selected.device, 'device'),\n $mobileSelector: renderSelector('mobile', devicesHelper.getMobileDevices(), selected.device, 'device'),\n $orientationSelector: renderSelector('orientation', deviceOrientationsList, selected.orientation)\n };\n lookupSelecter(this.getElement());\n\n // react to any change in selectors and then forward the event to the related entry\n this.getElement().on('change', '.selector', function onSelectorChange(e) {\n var $selector = $(e.target).closest('select');\n self.select($selector.attr('name'), $selector.val());\n });\n\n // initialize the display mode\n this.updateMode();\n\n /**\n * @event ready\n */\n this.trigger('ready');\n })\n\n // take care of the disable state\n .on('disable', function () {\n if (this.is('rendered')) {\n setControlsProp(\"disabled\", true);\n }\n })\n .on('enable', function () {\n if (this.is('rendered')) {\n setControlsProp(\"disabled\", false);\n }\n })\n\n // cleanup the place\n .on('destroy', function () {\n _.forEach(controls, removeSelect2);\n controls = null;\n selected = null;\n typeData = null;\n devicesList = null;\n });\n\n // initialize the component with the provided config\n // defer the call to allow to listen to the init event\n _.defer(function () {\n devicesSelector.init(config);\n });\n\n return devicesSelector;\n }\n\n return devicesSelectorFactory;\n});\n\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2019 (original work) Open Assessment Technologies SA ;\n */\n\n/**\n * Test Previewer Responsive Scale plugin : Scale\n */\ndefine('taoQtiTestPreviewer/previewer/plugins/tools/scale/scale',[\n 'jquery',\n 'lodash',\n 'lib/uuid',\n 'util/namespace',\n 'taoTests/runner/plugin',\n 'taoQtiTestPreviewer/previewer/plugins/tools/scale/component/devicesPreviewer',\n 'taoQtiTestPreviewer/previewer/plugins/tools/scale/component/devicesSelector'\n], function (\n $,\n _,\n uuid,\n namespaceHelper,\n pluginFactory,\n devicesPreviewerFactory,\n devicesSelectorFactory\n) {\n 'use strict';\n\n return pluginFactory({\n\n name: 'scale',\n\n /**\n * Initialize the plugin (called during runner's init)\n */\n init: function init() {\n var self = this;\n var testRunner = this.getTestRunner();\n\n /**\n * Tells if the component is enabled\n * @returns {Boolean}\n */\n function isPluginAllowed() {\n var config = testRunner.getConfig();\n return !config.options.readOnly;\n }\n\n // generate unique id for global events\n this.nsId = this.getName() + uuid(6);\n\n if (!isPluginAllowed()) {\n this.hide();\n }\n\n this.disable();\n\n testRunner\n .on('render', function () {\n if (isPluginAllowed()) {\n self.show();\n } else {\n self.hide();\n }\n })\n .on('resizeitem', function (size, orientation, type) {\n if (self.devicesPreviewer) {\n self.devicesPreviewer\n .setDeviceType(type)\n .setDeviceOrientation(orientation)\n .setDeviceWidth(size && size.width)\n .setDeviceHeight(size && size.height)\n .previewDevice();\n }\n })\n .on('enablenav', function () {\n self.enable();\n })\n .on('disablenav', function () {\n self.disable();\n });\n },\n\n /**\n * Called during the runner's render phase\n * Renders plugins controls on proper place\n */\n render: function render() {\n var self = this;\n var testRunner = this.getTestRunner();\n var areaBroker = this.getAreaBroker();\n\n /**\n * Triggers an item resize based on the current selected device\n */\n function resizeItem() {\n if (self.devicesSelector && self.getState('enabled')) {\n /**\n * @event resizeitem\n * @param {deviceScreen} deviceData - The device data, containing width and height\n * @param {String} orientation - The device orientation\n * @param {String} type - The type of device\n */\n testRunner.trigger(\n 'resizeitem',\n self.devicesSelector.getDeviceData(),\n self.devicesSelector.getOrientation(),\n self.devicesSelector.getType()\n );\n }\n }\n\n /**\n * adjust device frame position and size when browser size change\n */\n $(window).on(namespaceHelper.namespaceAll('resize orientationchange', this.nsId), _.throttle(function () {\n if (self.devicesSelector && self.devicesSelector.isDeviceMode()) {\n resizeItem();\n }\n }, 50));\n\n return Promise.all([\n new Promise(function (resolve) {\n self.devicesSelector = devicesSelectorFactory(areaBroker.getHeaderArea())\n .on('ready', function () {\n if (!self.getState('enabled')) {\n this.disable();\n }\n\n this.on('typechange', function () {\n if (!this.isDeviceMode()) {\n resizeItem();\n }\n });\n\n this.on('devicechange orientationchange', function () {\n resizeItem();\n });\n\n resolve();\n });\n }),\n new Promise(function (resolve) {\n self.devicesPreviewer = devicesPreviewerFactory(areaBroker.getArea('contentWrapper'))\n .on('ready', function () {\n this.wrap(areaBroker.getContentArea());\n resolve();\n });\n })\n ]);\n },\n\n /**\n * Called during the runner's destroy phase\n * clears all controls tied to applications DOM\n * detaches the global events\n */\n destroy: function destroy() {\n if (this.nsId) {\n $(window).off('.' + this.nsId);\n }\n if (this.devicesSelector) {\n this.devicesSelector.destroy();\n }\n if (this.devicesPreviewer) {\n this.devicesPreviewer.destroy();\n }\n this.devicesSelector = null;\n this.devicesPreviewer = null;\n },\n\n /**\n * Enable default controls\n */\n enable: function enable() {\n if (this.devicesSelector) {\n this.devicesSelector.enable();\n }\n },\n\n /**\n * Disable default controls\n */\n disable: function disable() {\n if (this.devicesSelector) {\n this.devicesSelector.disable();\n }\n },\n\n /**\n * Show default controls\n */\n show: function show() {\n if (this.devicesSelector) {\n this.devicesSelector.show();\n }\n },\n\n /**\n * Hide default controls\n */\n hide: function hide() {\n if (this.devicesSelector) {\n this.devicesSelector.hide();\n }\n }\n });\n});\n\n","\ndefine('tpl!taoQtiTestPreviewer/previewer/provider/item/tpl/item', ['handlebars'], function(hb){ return hb.template(function (Handlebars,depth0,helpers,partials,data) {\n this.compilerInfo = [4,'>= 1.0.0'];\nhelpers = this.merge(helpers, Handlebars.helpers); data = data || {};\n \n\n\n return \"
            \\n
            \\n
            \\n
            \\n
            \\n
              \\n
              \\n
              \\n
              \\n\\n
              \\n\\n \\n\\n
              \\n
              \\n
              \\n
              \\n\\n \\n\\n
              \";\n }); });\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2018-2020 (original work) Open Assessment Technologies SA ;\n */\n\n/**\n * Test runner provider for the QTI item previewer\n *\n * @author Jean-Sébastien Conan \n */\ndefine('taoQtiTestPreviewer/previewer/provider/item/item',[\n 'jquery',\n 'lodash',\n 'i18n',\n 'ui/feedback',\n 'taoTests/runner/areaBroker',\n 'taoTests/runner/testStore',\n 'taoTests/runner/proxy',\n 'taoQtiTest/runner/ui/toolbox/toolbox',\n 'taoQtiItem/runner/qtiItemRunner',\n 'taoQtiTest/runner/config/assetManager',\n 'taoItems/assets/strategies',\n 'taoQtiItem/qtiCommonRenderer/helpers/container',\n 'tpl!taoQtiTestPreviewer/previewer/provider/item/tpl/item'\n], function (\n $,\n _,\n __,\n feedback,\n areaBrokerFactory,\n testStoreFactory,\n proxyFactory,\n toolboxFactory,\n qtiItemRunner,\n assetManagerFactory,\n assetStrategies,\n containerHelper,\n layoutTpl\n) {\n 'use strict';\n\n //the asset strategies\n const assetManager = assetManagerFactory();\n assetManager.prependStrategy(assetStrategies.taomedia);\n\n //store the current execution context of the common renderer (preview)\n let _$previousContext = null;\n function setContext($context){\n _$previousContext = containerHelper.getContext();\n containerHelper.setContext($context);\n }\n function restoreContext(){\n containerHelper.setContext(_$previousContext);\n _$previousContext = null;\n }\n /**\n * A Test runner provider to be registered against the runner\n */\n return {\n\n //provider name\n name: 'qtiItemPreviewer',\n\n /**\n * Initialize and load the area broker with a correct mapping\n * @returns {areaBroker}\n */\n loadAreaBroker() {\n const $layout = $(layoutTpl());\n\n return areaBrokerFactory($layout, {\n contentWrapper: $('.content-wrapper', $layout),\n content: $('#qti-content', $layout),\n toolbox: $('.bottom-action-bar .tools-box', $layout),\n navigation: $('.bottom-action-bar .navi-box-list', $layout),\n control: $('.top-action-bar .control-box', $layout),\n actionsBar: $('.bottom-action-bar .control-box', $layout),\n panel: $('.test-sidebar-left', $layout),\n header: $('.top-action-bar .tools-box', $layout),\n context: $('.top-action-bar .navi-box-list', $layout)\n });\n },\n\n /**\n * Initialize and load the test runner proxy\n * @returns {proxy}\n */\n loadProxy() {\n const {proxyProvider, serviceCallId, bootstrap, timeout} = this.getConfig();\n return proxyFactory(proxyProvider || 'qtiItemPreviewerProxy', {serviceCallId, bootstrap, timeout});\n },\n\n /**\n * Initialize and load the test store\n * @returns {testStore}\n */\n loadTestStore() {\n const config = this.getConfig();\n\n //the test run needs to be identified uniquely\n const identifier = config.serviceCallId || `test-${Date.now()}`;\n return testStoreFactory(identifier);\n },\n\n /**\n * Installation of the provider, called during test runner init phase.\n */\n install() {\n const {plugins} = this.getConfig().options;\n if (plugins) {\n _.forEach(this.getPlugins(), plugin => {\n if (_.isPlainObject(plugin) && _.isFunction(plugin.setConfig)) {\n const config = plugins[plugin.getName()];\n if (_.isPlainObject(config)) {\n plugin.setConfig(config);\n }\n }\n });\n }\n },\n\n /**\n * Initialization of the provider, called during test runner init phase.\n *\n * We install behaviors during this phase (ie. even handlers)\n * and we call proxy.init.\n *\n * @this {runner} the runner context, not the provider\n * @returns {Promise} to chain proxy.init\n */\n init() {\n const dataHolder = this.getDataHolder();\n const areaBroker = this.getAreaBroker();\n\n areaBroker.setComponent('toolbox', toolboxFactory());\n areaBroker.getToolbox().init();\n\n /*\n * Install behavior on events\n */\n this\n .on('submititem', () => {\n const itemState = this.itemRunner.getState();\n const itemResponses = this.itemRunner.getResponses();\n\n this.trigger('disabletools disablenav');\n this.trigger('submitresponse', itemResponses, itemState);\n\n return this.getProxy()\n .submitItem(dataHolder.get('itemIdentifier'), itemState, itemResponses)\n .then(response => {\n this.trigger('scoreitem', response);\n this.trigger('enabletools enablenav resumeitem');\n })\n .catch(err => {\n this.trigger('enabletools enablenav');\n\n //some server errors are valid, so we don't fail (prevent empty responses)\n if (err.code === 200) {\n this.trigger('alert.submitError',\n err.message || __('An error occurred during results submission. Please retry.'),\n () => this.trigger('resumeitem')\n );\n }\n });\n })\n .on('ready', () => {\n const itemIdentifier = dataHolder.get('itemIdentifier');\n const itemData = dataHolder.get('itemData');\n\n if (itemIdentifier) {\n if (itemData) {\n this.renderItem(itemIdentifier, itemData);\n } else {\n this.loadItem(itemIdentifier);\n }\n }\n })\n .on('loaditem', (itemRef, itemData) => {\n dataHolder.set('itemIdentifier', itemRef);\n dataHolder.set('itemData', itemData);\n })\n .on('renderitem', () => {\n this.trigger('enabletools enablenav');\n })\n .on('resumeitem', () => {\n this.trigger('enableitem enablenav');\n })\n .on('disableitem', () => {\n this.trigger('disabletools');\n })\n .on('enableitem', () => {\n this.trigger('enabletools');\n })\n .on('error', () => {\n this.trigger('disabletools enablenav');\n })\n .on('finish leave', () => {\n this.trigger('disablenav disabletools');\n this.flush();\n })\n .on('flush', () => {\n this.destroy();\n });\n\n return this.getProxy()\n .init()\n .then(data => {\n dataHolder.set('itemIdentifier', data.itemIdentifier);\n dataHolder.set('itemData', data.itemData);\n });\n },\n\n /**\n * Rendering phase of the test runner\n *\n * Attach the test runner to the DOM\n *\n * @this {runner} the runner context, not the provider\n */\n render() {\n const config = this.getConfig();\n const areaBroker = this.getAreaBroker();\n\n config.renderTo.append(areaBroker.getContainer());\n\n areaBroker.getToolbox().render(areaBroker.getToolboxArea());\n },\n\n /**\n * LoadItem phase of the test runner\n *\n * We call the proxy in order to get the item data\n *\n * @this {runner} the runner context, not the provider\n * @param {String} itemIdentifier - The identifier of the item to update\n * @returns {Promise} that calls in parallel the state and the item data\n */\n loadItem(itemIdentifier) {\n return this.getProxy().getItem(itemIdentifier);\n },\n\n /**\n * RenderItem phase of the test runner\n *\n * Here we initialize the item runner and wrap it's call to the test runner\n *\n * @this {runner} the runner context, not the provider\n * @param {String} itemIdentifier - The identifier of the item to update\n * @param {Object} itemData - The definition data of the item\n * @returns {Promise} resolves when the item is ready\n */\n renderItem(itemIdentifier, itemData) {\n const areaBroker = this.getAreaBroker();\n const options = this.getConfig().options;\n\n const changeState = () => {\n this.setItemState(itemIdentifier, 'changed', true);\n };\n\n setContext(areaBroker.getContentArea());\n\n return new Promise((resolve, reject) => {\n itemData.content = itemData.content || {};\n\n assetManager.setData('baseUrl', itemData.baseUrl);\n assetManager.setData('assets', itemData.content.assets);\n\n this.itemRunner = qtiItemRunner(itemData.content.type, itemData.content.data, Object.assign({\n assetManager: assetManager\n }, options))\n .on('error', err => {\n this.trigger('enablenav');\n reject(err);\n feedback().error(__('It seems that there is an error during item preview loading. Please, try again.'));\n })\n .on('init', function onItemRunnerInit() {\n const {state, portableElements} = itemData;\n this.render(areaBroker.getContentArea(), {state, portableElements});\n })\n .on('render', function onItemRunnerRender() {\n this.on('responsechange', changeState);\n this.on('statechange', changeState);\n resolve();\n })\n .init();\n });\n },\n\n /**\n * UnloadItem phase of the test runner\n *\n * Item clean up\n *\n * @this {runner} the runner context, not the provider\n * @returns {Promise} resolves when the item is cleared\n */\n unloadItem() {\n this.trigger('beforeunloaditem disablenav disabletools');\n\n if (this.itemRunner) {\n return new Promise(resolve => {\n this.itemRunner\n .on('clear', resolve)\n .clear();\n });\n }\n return Promise.resolve();\n },\n\n /**\n * Destroy phase of the test runner\n *\n * Clean up\n *\n * @this {runner} the runner context, not the provider\n */\n destroy() {\n const areaBroker = this.getAreaBroker();\n\n // prevent the item to be displayed while test runner is destroying\n if (this.itemRunner) {\n this.itemRunner\n .on('clear', restoreContext)\n .clear();\n }\n this.itemRunner = null;\n\n if (areaBroker) {\n areaBroker.getToolbox().destroy();\n }\n }\n };\n});\n\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2021 (original work) Open Assessment Technologies SA ;\n */\ndefine('taoQtiTestPreviewer/previewer/proxy/itemDataHandlers',[\n 'module',\n 'context',\n 'lodash',\n 'core/moduleLoader'\n], function (module, context, _, moduleLoader) {\n 'use strict';\n\n const moduleConfig = module.config();\n let handlers = [];\n if (moduleConfig.handlers) {\n /*\n * This loads all the modules from module configuration, which are in the `handlers` array.\n */\n moduleLoader({}, _.isFunction)\n .addList(moduleConfig.handlers)\n .load(context.bundle)\n .then(data => (handlers = data));\n }\n\n return function itemDataHandlers(itemData) {\n if (!handlers.length) {\n return Promise.resolve(itemData);\n } if (handlers.length === 1) {\n return handlers[0](itemData);\n } else {\n return handlers.reduce(function(prev, cur) {\n return prev.then(updateItemData => cur(updateItemData)).catch(cur().reject);\n }, handlers[0](itemData));\n }\n };\n});\n\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2018-2022 (original work) Open Assessment Technologies SA ;\n */\n\n/**\n * Test runner proxy for the QTI item previewer\n *\n * @author Jean-Sébastien Conan \n */\ndefine('taoQtiTestPreviewer/previewer/proxy/item',[\n 'lodash',\n 'core/promiseQueue',\n 'core/request',\n 'taoQtiTestPreviewer/previewer/config/item',\n 'taoQtiTestPreviewer/previewer/proxy/itemDataHandlers'\n], function (_, promiseQueue, coreRequest, configFactory, itemDataHandlers) {\n 'use strict';\n\n /**\n * QTI proxy definition\n * Related to remote services calls\n * @type {Object}\n */\n return {\n name: 'qtiItemPreviewerProxy',\n\n /**\n * Installs the proxy\n */\n install() {\n /**\n * A promise queue to ensure requests run sequentially\n */\n this.queue = promiseQueue();\n\n /**\n * Some parameters needs special handling...\n * @param {Object} actionParams - the input parameters\n * @returns {Object} output parameters\n */\n this.prepareParams = function prepareParams(actionParams) {\n //some parameters need to be JSON.stringified\n const stringifyParams = ['itemState', 'itemResponse'];\n\n if (_.isPlainObject(actionParams)) {\n return _.mapValues(actionParams, (value, key) => {\n if (_.includes(stringifyParams, key)) {\n return JSON.stringify(value);\n }\n return value;\n });\n }\n\n return actionParams;\n };\n\n /**\n * Proxy request function. Returns a promise\n * Applied options: asynchronous call, JSON data, no cache\n * @param {String} url\n * @param {Object} [reqParams]\n * @param {String} [contentType] - to force the content type\n * @param {Boolean} [noToken] - to disable the token\n * @returns {Promise}\n */\n this.request = function request(url, reqParams, contentType, noToken) {\n return coreRequest({\n url: url,\n data: this.prepareParams(reqParams),\n method: reqParams ? 'POST' : 'GET',\n contentType: contentType,\n noToken: noToken,\n background: false,\n sequential: true,\n timeout: this.configStorage.getTimeout()\n })\n .then(response => {\n this.setOnline();\n\n if (response && response.success) {\n return Promise.resolve(response);\n } else {\n return Promise.reject(response);\n }\n })\n .catch(error => {\n if (error.data && this.isConnectivityError(error.data)) {\n this.setOffline('request');\n }\n return Promise.reject(error);\n });\n };\n },\n\n /**\n * Initializes the proxy\n * @param {Object} config - The config provided to the proxy factory\n * @param {String} config.testDefinition - The URI of the test\n * @param {String} config.testCompilation - The URI of the compiled delivery\n * @param {String} config.serviceCallId - The URI of the service call\n * @param {Object} [params] - Some optional parameters to join to the call\n * @returns {Promise} - Returns a promise. The proxy will be fully initialized on resolve.\n * Any error will be provided if rejected.\n */\n init(config, params) {\n // store config in a dedicated configStorage\n this.configStorage = configFactory(config || {});\n\n // request for initialization\n return this.request(this.configStorage.getTestActionUrl('init'), params, void 0, true);\n },\n\n /**\n * Uninstalls the proxy\n * @returns {Promise} - Returns a promise. The proxy will be fully uninstalled on resolve.\n * Any error will be provided if rejected.\n */\n destroy() {\n // no request, just a resources cleaning\n this.configStorage = null;\n this.queue = null;\n\n // the method must return a promise\n return Promise.resolve();\n },\n\n /**\n * Calls an action related to the test\n * @param {String} action - The name of the action to call\n * @param {Object} [params] - Some optional parameters to join to the call\n * @returns {Promise} - Returns a promise. The result of the request will be provided on resolve.\n * Any error will be provided if rejected.\n */\n callTestAction(action, params) {\n return this.request(this.configStorage.getTestActionUrl(action), params, void 0, true);\n },\n\n /**\n * Calls an action related to a particular item\n * @param {String} itemIdentifier - The identifier of the item for which call the action\n * @param {String} action - The name of the action to call\n * @param {Object} [params] - Some optional parameters to join to the call\n * @returns {Promise} - Returns a promise. The result of the request will be provided on resolve.\n * Any error will be provided if rejected.\n */\n callItemAction(itemIdentifier, action, params) {\n return this.request(this.configStorage.getItemActionUrl(itemIdentifier, action), params, void 0, true);\n },\n\n /**\n * Gets an item definition by its identifier, also gets its current state\n * @param {String} itemIdentifier - The identifier of the item to get\n * @param {Object} [params] - additional parameters\n * @returns {Promise} - Returns a promise. The item data will be provided on resolve.\n * Any error will be provided if rejected.\n */\n getItem(itemIdentifier, params) {\n return this.request(\n this.configStorage.getItemActionUrl(itemIdentifier, 'getItem'),\n params,\n void 0,\n true\n ).then(itemData => itemDataHandlers(itemData));\n },\n\n /**\n * Submits the state and the response of a particular item\n * @param {String} itemIdentifier - The identifier of the item to update\n * @param {Object} state - The state to submit\n * @param {Object} response - The response object to submit\n * @param {Object} [params] - Some optional parameters to join to the call\n * @returns {Promise} - Returns a promise. The result of the request will be provided on resolve.\n * Any error will be provided if rejected.\n */\n submitItem(itemIdentifier, state, response, params) {\n const body = _.merge(\n {\n itemState: state,\n itemResponse: response\n },\n params || {}\n );\n\n return this.request(this.configStorage.getItemActionUrl(itemIdentifier, 'submitItem'), body, void 0, true);\n }\n };\n});\n\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2020-2022 (original work) Open Assessment Technologies SA ;\n */\n\n/**\n * Test runner proxy for the QTI test previewer\n *\n * @author Hanna Dzmitryieva \n */\ndefine('taoQtiTestPreviewer/previewer/proxy/test',[\n 'core/promiseQueue',\n 'core/request',\n 'util/url',\n 'taoQtiTest/runner/helpers/map',\n 'taoQtiTestPreviewer/previewer/proxy/itemDataHandlers'\n], function (promiseQueue, request, urlUtil, mapHelper, itemDataHandlers) {\n 'use strict';\n\n const serviceControllerInit = 'TestPreviewer';\n const serviceControllerGetItem = 'Previewer';\n\n const serviceExtension = 'taoQtiTestPreviewer';\n\n /**\n * The possible states of the test session,\n * coming from the test context\n * (this state comes from the backend)\n */\n const testSessionStates = Object.freeze({\n initial: 0,\n interacting: 1,\n modalFeedback: 2,\n suspended: 3,\n closed: 4\n });\n /**\n * The possible states of an item session,\n * coming from the test context\n * (this state comes from the backend)\n */\n const itemSessionStates = Object.freeze({\n initial: 0,\n interacting: 1,\n modalFeedback: 2,\n suspended: 3,\n closed: 4,\n solution: 5,\n review: 6\n });\n\n /**\n * Updates testContext with item data\n * @param {Object} testMap\n * @param {Number} position - item position\n * @param {Object} testContext\n * @param {Array} presetMap\n */\n function updateTestContextWithItem(testMap, position, testContext, presetMap) {\n const jump = mapHelper.getJump(testMap, position);\n const item = mapHelper.getItemAt(testMap, position);\n if (!item) {\n return;\n }\n testContext.testPartId = jump.part;\n testContext.sectionId = jump.section;\n testContext.itemIdentifier = jump.identifier;\n testContext.itemSessionState = itemSessionStates.initial;\n testContext.options = createContextOptions(item, presetMap);\n testContext.allowSkipping = item.allowSkipping;\n }\n\n /**\n * Convert preset categories to context.options\n * @param {Object} item\n * @param {Array} presetMap\n * @returns {Object} options\n */\n function createContextOptions(item, presetMap) {\n const options = {};\n presetMap.forEach(category => {\n const pluginId = Object.keys(category)[0];\n const categoryId = category[pluginId];\n if (item.categories.includes(categoryId)) {\n options[pluginId] = true;\n }\n });\n return options;\n }\n\n /**\n * QTI proxy definition\n * Related to remote services calls\n * @type {Object}\n */\n return {\n name: 'qtiTestPreviewerProxy',\n\n /**\n * Installs the proxy\n */\n install() {\n /**\n * A promise queue to ensure requests run sequentially\n */\n this.queue = promiseQueue();\n },\n /**\n * Initializes the proxy\n * @param {Object} configs - configuration from proxy\n * @param {String} configs.options.testUri - The identifier of the test\n * @returns {Promise} - Returns a promise. The proxy will be fully initialized on resolve.\n * Any error will be provided if rejected.\n */\n init(configs) {\n this.itemStore = {};\n return request({\n url: urlUtil.route('init', serviceControllerInit, serviceExtension),\n data: { testUri: configs.options.testUri },\n noToken: true\n }).then(response => {\n const data = response.data;\n //the received map is not complete and should be \"built\"\n this.builtTestMap = mapHelper.reindex(data.testMap);\n this.presetMap = data.presetMap || [];\n delete data.presetMap;\n const firstJump = this.builtTestMap.jumps[0] || {};\n const firstItem = mapHelper.getItemAt(this.builtTestMap, 0);\n data.testContext = {\n itemIdentifier: firstJump.identifier,\n itemPosition: 0,\n itemSessionState: 0,\n testPartId: firstJump.part,\n sectionId: firstJump.section,\n canMoveBackward: true,\n state: testSessionStates.interacting,\n attempt: 1,\n options: createContextOptions(firstItem, this.presetMap),\n allowSkipping: firstItem.allowSkipping\n };\n return data;\n });\n },\n\n /**\n * Uninstalls the proxy\n * @returns {Promise} - Returns a promise. The proxy will be fully uninstalled on resolve.\n * Any error will be provided if rejected.\n */\n destroy() {\n // no request, just a resources cleaning\n this.queue = null;\n\n if (this.itemStore) {\n this.itemStore = null;\n }\n\n // the method must return a promise\n return Promise.resolve();\n },\n\n /**\n * Gets an item definition by its URI, also gets its current state\n * @param {String} itemIdentifier - The URI of the item to get\n * @returns {Promise} - Returns a promise. The item data will be provided on resolve.\n * Any error will be provided if rejected.\n */\n getItem(itemIdentifier) {\n if (itemIdentifier in this.itemStore) {\n // Load item from store\n return Promise.resolve(this.itemStore[itemIdentifier]);\n } else {\n // Load from server; Store in store\n const { uri } = mapHelper.getItem(this.builtTestMap, itemIdentifier) || {};\n if (!uri) {\n throw new Error(`There is no item ${itemIdentifier} in the testMap!`);\n }\n return request({\n url: urlUtil.route('getItem', serviceControllerGetItem, serviceExtension),\n data: { serviceCallId: 'previewer', itemUri: uri },\n noToken: true\n })\n .then(data => {\n data.itemData = data.content;\n data.itemIdentifier = data.content.data.identifier;\n data.itemState = {};\n this.itemStore[itemIdentifier] = data;\n return data;\n })\n .then(itemData => itemDataHandlers(itemData));\n }\n },\n\n /**\n * Call action on the test\n * @param {string} itemIdentifier - the current item\n * @param {string} action - the action id\n * @param {Object} params\n * @returns {Promise} resolves with the response\n */\n callItemAction(itemIdentifier, action, params = {}) {\n const dataHolder = this.getDataHolder();\n const testContext = dataHolder.get('testContext');\n const testMap = dataHolder.get('testMap');\n const actions = {\n //simulate backend move action\n move: () => {\n if (params.direction === 'next' || action === 'skip') {\n if (params.scope === 'testPart') {\n const testPartPosition = testMap.parts[testContext.testPartId].position;\n const nextPartsSorted = Object.values(testMap.parts)\n .filter(p => p.position > testPartPosition)\n .sort((a, b) => a.position - b.position);\n if (nextPartsSorted.length === 0) {\n testContext.state = testSessionStates.closed;\n } else {\n testContext.itemPosition = Math.min(\n testMap.stats.total - 1,\n nextPartsSorted[0].position\n );\n }\n } else {\n if (testContext.itemPosition + 1 >= testMap.stats.total) {\n testContext.state = testSessionStates.closed;\n } else {\n testContext.itemPosition = Math.min(\n testMap.stats.total - 1,\n testContext.itemPosition + 1\n );\n }\n }\n }\n if (params.direction === 'previous') {\n testContext.itemPosition = Math.max(0, testContext.itemPosition - 1);\n }\n if (params.direction === 'jump' && params.ref >= 0) {\n testContext.itemPosition = params.ref;\n }\n\n updateTestContextWithItem(testMap, testContext.itemPosition, testContext, this.presetMap);\n\n return { testContext, testMap };\n },\n\n flagItem: () => Promise.resolve()\n };\n actions.skip = actions.move;\n\n if (params.itemState) {\n // store itemState in itemStore\n this.itemStore[itemIdentifier].itemState = params.itemState;\n }\n\n if (typeof actions[action] === 'function') {\n return actions[action]();\n }\n },\n\n /**\n * Calls an action related to the test\n * @returns {Promise} - Returns a promise. The result of the request will be provided on resolve.\n * Any error will be provided if rejected.\n */\n callTestAction() {\n // the method must return a promise\n return Promise.resolve();\n }\n };\n});\n\n","\ndefine('tpl!taoQtiTestPreviewer/previewer/component/test/tpl/qtiTest', ['handlebars'], function(hb){ return hb.template(function (Handlebars,depth0,helpers,partials,data) {\n this.compilerInfo = [4,'>= 1.0.0'];\nhelpers = this.merge(helpers, Handlebars.helpers); data = data || {};\n var buffer = \"\", helper, options, helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;\n\n\n buffer += \"\";\n return buffer;\n }); });\n","\ndefine('css!taoQtiTestPreviewer/previewer/component/test/css/qtiTest',[],function(){});\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2020 (original work) Open Assessment Technologies SA ;\n */\n/**\n * @author Hanna Dzmitryieva \n */\ndefine('taoQtiTestPreviewer/previewer/component/test/qtiTest',[\n 'context',\n 'lodash',\n 'layout/loading-bar',\n 'taoTests/runner/runnerComponent',\n 'taoQtiTest/runner/config/assetManager',\n 'taoItems/assets/strategies',\n 'tpl!taoQtiTestPreviewer/previewer/component/test/tpl/qtiTest',\n 'css!taoQtiTestPreviewer/previewer/component/test/css/qtiTest',\n 'css!taoQtiTestCss/new-test-runner'\n], function (context, __, loadingBar, runnerComponentFactory, assetManagerFactory, assetStrategies, runnerTpl) {\n 'use strict';\n\n /**\n * Builds a test runner to preview test\n * @param {jQuery|HTMLElement|String} container - The container in which renders the component\n * @param {Object} [config] - The testRunner options\n *\n * @returns {runner}\n */\n return function qtiTestPreviewerFactory(container, config = {}) {\n const testRunnerConfig = __.defaults(\n {\n testDefinition: 'test-container',\n serviceCallId: 'previewer',\n proxyProvider: 'qtiTestPreviewerProxy',\n loadFromBundle: !!context.bundle,\n },\n config\n );\n\n testRunnerConfig.providers.proxy = [{\n id: 'qtiTestPreviewerProxy',\n module: 'taoQtiTestPreviewer/previewer/proxy/test',\n bundle: 'taoQtiTestPreviewer/loader/qtiPreviewer.min',\n category: 'proxy'\n }];\n\n //the asset manager should support taomedia strategy\n const assetManager = assetManagerFactory(testRunnerConfig.serviceCallId);\n assetManager.prependStrategy(assetStrategies.taomedia);\n\n return runnerComponentFactory(container, testRunnerConfig, runnerTpl)\n .on('render', function() {\n const { fullPage, readOnly, hideActionBars } = this.getConfig().options;\n this.setState('fullpage', fullPage);\n this.setState('readonly', readOnly);\n this.setState('hideactionbars', hideActionBars);\n })\n .on('ready', function(runner) {\n runner.on('destroy', () => {\n // stop loading bar - started in plugin loading\n loadingBar.stop();\n this.destroy();\n });\n });\n };\n});\n\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2020 (original work) Open Assessment Technologies SA ;\n */\n/**\n * @author Hanna Dzmitryieva \n */\ndefine('taoQtiTestPreviewer/previewer/adapter/test/qtiTest',[\n 'lodash',\n 'core/promiseQueue',\n 'core/request',\n 'util/url',\n 'core/logger',\n 'taoQtiTestPreviewer/previewer/component/test/qtiTest',\n 'ui/feedback',\n 'taoQtiTestPreviewer/previewer/component/topBlock/topBlock',\n], function (\n _,\n promiseQueue,\n request,\n urlUtil,\n loggerFactory,\n qtiTestPreviewerFactory,\n feedback,\n topBlockFactory\n) {\n 'use strict';\n\n const taoExtension = 'taoQtiTestPreviewer';\n\n const testPreviewerController = 'TestPreviewer';\n\n const logger = loggerFactory('taoQtiTestPreviewer/previewer');\n\n /**\n * List of required plugins that should be loaded in order to make the previewer work properly\n * @type {Object[]}\n */\n const defaultPlugins = [\n {\n module: 'taoQtiTestPreviewer/previewer/plugins/content/cloneLogoInTestPreview',\n bundle: 'taoQtiTestPreviewer/loader/qtiPreviewer.min',\n category: 'content'\n }\n ];\n\n const transformConfiguration = config => {\n const plugins = Array.isArray(config.plugins) ? [...defaultPlugins, ...config.plugins] : defaultPlugins;\n const { view, readOnly, fullPage, hideActionBars, pluginsOptions } = config;\n const options = _.omit({ view, readOnly, fullPage, hideActionBars }, _.isUndefined);\n\n return request({\n url: urlUtil.route('configuration', testPreviewerController, taoExtension),\n noToken: true\n }).then(response => {\n const configuration = response.data;\n\n configuration.providers.plugins = [...configuration.providers.plugins, ...plugins];\n\n _.assign(configuration.options, options);\n\n if (pluginsOptions) {\n if (!configuration.options.plugins) {\n configuration.options.plugins = {};\n }\n _.assign(configuration.options.plugins, pluginsOptions);\n }\n\n return configuration;\n });\n };\n\n /**\n * Wraps the test previewer in order to be loaded by the taoItems previewer factory\n */\n return {\n name: 'qtiTest',\n\n install() {\n this.queue = promiseQueue();\n },\n\n /**\n * Builds and shows the test previewer\n *\n * @param {String} testUri - The URI of the test to load\n * @param {Object} [config] - Some config entries\n * @param {Object[]} [config.plugins] - Additional plugins to load\n * @param {String} [config.fullPage] - Force the previewer to occupy the full window.\n * @param {String} [config.readOnly] - Do not allow to modify the previewed item.\n * @returns {Object}\n */\n init(testUri, config = {}) {\n return transformConfiguration(config).then(testPreviewConfig => {\n testPreviewConfig.options.testUri = testUri;\n let topBlock = null;\n const previewComponent = qtiTestPreviewerFactory(window.document.body, testPreviewConfig)\n .on('ready', function (runner) {\n topBlock = topBlockFactory(\n window.document.body,\n {\n isTest: testPreviewConfig.options.review.scope === 'test',\n title: runner.getTestMap().title,\n onClose: () => {\n runner.trigger('exit');\n }\n });\n })\n .on('error', function (err) {\n if (topBlock){\n topBlock.destroy();\n topBlock = null;\n }\n if (!_.isUndefined(err.message)) {\n feedback().error(err.message);\n }\n logger.error(err);\n })\n .on('destroy', () => {\n if (topBlock){\n topBlock.destroy();\n topBlock = null;\n }\n });\n return previewComponent;\n });\n },\n\n destroy() {\n this.queue = null;\n\n return Promise.resolve();\n },\n };\n});\n\n","\n(function(c){var d=document,a='appendChild',i='styleSheet',s=d.createElement('style');s.type='text/css';d.getElementsByTagName('head')[0][a](s);s[i]?s[i].cssText=c:s[a](d.createTextNode(c));})\n('.previewer,.previewer-component{position:relative}.item-previewer-scope{position:relative;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;height:calc(100vh - 0px)}.item-previewer-scope .test-runner-sections{-webkit-flex:1 1 0%;-ms-flex:1 1 0%;flex:1 1 0%;overflow:hidden;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}.item-previewer-scope .test-sidebar{background:#f3f1ef;-webkit-flex:0 1 auto;-ms-flex:0 1 auto;flex:0 1 auto;height:calc(100vh - 80px);overflow-y:auto;max-width:350px}.item-previewer-scope .test-sidebar>.qti-panel{max-width:350px;padding:10px}@media only screen and (max-device-width: 800px){.item-previewer-scope .test-sidebar{max-width:200px}.item-previewer-scope .test-sidebar>.qti-panel{max-width:200px}}@media only screen and (min-device-width: 800px)and (max-device-width: 1280px){.item-previewer-scope .test-sidebar{max-width:250px}.item-previewer-scope .test-sidebar>.qti-panel{max-width:250px}}@media only screen and (min-device-width: 1280px)and (max-device-width: 1440px){.item-previewer-scope .test-sidebar{max-width:300px}.item-previewer-scope .test-sidebar>.qti-panel{max-width:300px}}.item-previewer-scope .test-sidebar-left{border-right:1px #ddd solid}.item-previewer-scope .test-sidebar-right{border-left:1px #ddd solid}.item-previewer-scope .content-wrapper{position:relative;-webkit-flex:1 1 0%;-ms-flex:1 1 0%;flex:1 1 0%;overflow:auto;padding:0}.item-previewer-scope .content-wrapper .overlay{position:absolute;left:0;right:0;top:0;bottom:0;width:100%;opacity:.9}.item-previewer-scope .content-wrapper .overlay-full{background-color:#fff;opacity:1}.item-previewer-scope #qti-content{-webkit-overflow-scrolling:touch;max-width:1024px;width:100%;margin:auto}.item-previewer-scope #qti-item{width:100%;min-width:100%;height:auto;overflow:visible}.item-previewer-scope .qti-item{padding:30px}.item-previewer-scope .size-wrapper{max-width:1280px;margin:auto;width:100%;padding-right:40px}.item-previewer-scope #qti-rubrics{margin:auto;max-width:1024px;width:100%}.item-previewer-scope #qti-rubrics .qti-rubricBlock{margin:20px 0}.item-previewer-scope #qti-rubrics .hidden{display:none}.no-controls .item-previewer-scope{height:100vh}.previewer-component{background:inherit}.previewer-component.fullpage{position:absolute;top:0;left:0;right:0;bottom:0;z-index:100000}.previewer-component.fullpage .item-previewer-scope{height:100vh}.previewer-component.readonly .qti-item::before{content:\\\" \\\";position:absolute;top:0;left:0;right:0;bottom:0;z-index:100000}.previewer-component.hideactionbars .test-sidebar{height:100%}.previewer-component.hideactionbars .action-bar{display:none}.item-previewer-scope .preview-console-closer{position:absolute;right:10px;top:10px;cursor:pointer;color:rgba(255,255,255,.9);text-shadow:none}.item-previewer-scope .preview-console-closer:hover{color:#fff}.item-previewer-scope .preview-console{background:#2b2b2b;color:#fff;font-family:Consolas,\\\"Andale Mono WT\\\",\\\"Andale Mono\\\",\\\"Lucida Console\\\",\\\"Lucida Sans Typewriter\\\",\\\"DejaVu Sans Mono\\\",\\\"Bitstream Vera Sans Mono\\\",\\\"Liberation Mono\\\",\\\"Nimbus Mono L\\\",Monaco,\\\"Courier New\\\",Courier,monospace;position:relative}.item-previewer-scope .preview-console .preview-console-body{padding:5px;margin:0;height:30vh;overflow:auto}.item-previewer-scope .preview-console .preview-console-body .log-time{color:#999}.item-previewer-scope .preview-console .preview-console-body .log-type{color:#eee}.item-previewer-scope .preview-console .preview-console-body .log-message{color:#69f}.item-previewer-scope .preview-console .preview-console-body pre{margin:0}.item-previewer-scope .action-bar.content-action-bar{padding:2px}.item-previewer-scope .action-bar.content-action-bar li{margin:2px 0 0 10px;border:none}.item-previewer-scope .action-bar.content-action-bar li.btn-info{padding-top:6px;height:33px;margin-top:0;border-bottom:solid 2px rgba(0,0,0,0);border-radius:0}.item-previewer-scope .action-bar.content-action-bar li.btn-info.btn-group{border:none !important;overflow:hidden;padding:0}.item-previewer-scope .action-bar.content-action-bar li.btn-info.btn-group a{float:left;margin:0 2px;padding:0 15px;border:1px solid rgba(255,255,255,.3);border-radius:0px;display:inline-block;height:inherit}.item-previewer-scope .action-bar.content-action-bar li.btn-info.btn-group a:first-of-type{border-top-left-radius:3px;border-bottom-left-radius:3px;margin-left:0}.item-previewer-scope .action-bar.content-action-bar li.btn-info.btn-group a:last-of-type{border-top-right-radius:3px;border-bottom-right-radius:3px;margin-right:0}.item-previewer-scope .action-bar.content-action-bar li.btn-info.btn-group a:hover,.item-previewer-scope .action-bar.content-action-bar li.btn-info.btn-group a.active{border-color:rgba(255,255,255,.8)}.item-previewer-scope .action-bar.content-action-bar li.btn-info.btn-group a .no-label{padding-right:0}.item-previewer-scope .action-bar.content-action-bar li.btn-info:hover,.item-previewer-scope .action-bar.content-action-bar li.btn-info.active{border-bottom-color:rgba(255,255,255,.8)}.item-previewer-scope .action-bar.content-action-bar li.btn-info:active,.item-previewer-scope .action-bar.content-action-bar li.btn-info.active{background:#e7eff4;border-color:rgba(255,255,255,.8)}.item-previewer-scope .action-bar.content-action-bar li.btn-info:active a,.item-previewer-scope .action-bar.content-action-bar li.btn-info.active a{color:#266d9c;text-shadow:none}.item-previewer-scope .action-bar.content-action-bar li.btn-info:active:hover,.item-previewer-scope .action-bar.content-action-bar li.btn-info.active:hover{background:#fff}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar{opacity:1;height:40px}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.top-action-bar>.control-box{height:40px;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-justify-content:space-between;-ms-flex-pack:space-between;justify-content:space-between;padding-left:10px;padding-right:40px}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box{color:rgba(255,255,255,.9);text-shadow:1px 1px 0 #000}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box .lft,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box .rgt{padding-left:20px}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box .lft:first-child,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box .rgt:first-child{padding-left:0}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box .lft:last-child ul,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box .rgt:last-child ul{display:inline-block}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box [class^=btn-],.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box [class*=\\\" btn-\\\"]{white-space:nowrap}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box{position:relative;overflow:visible}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .action{position:relative;overflow:visible}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu{color:#222;background:#f3f1ef;border:1px solid #aaa9a7;overflow:auto;list-style:none;min-width:150px;margin:0;padding:0;position:absolute;bottom:36px;left:-3px}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action{display:inline-block;text-align:left;width:100%;white-space:nowrap;overflow:hidden;color:#222;border-bottom:1px solid #c2c1bf;margin:0;-moz-border-radius:0px;-webkit-border-radius:0px;border-radius:0px;height:32px;padding:6px 15px;line-height:1;border-left:solid 3px rgba(0,0,0,0)}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action .icon-checkbox-checked{display:none}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.active{background-color:#dbd9d7;font-weight:bold}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.hover .icon-checkbox,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action:hover .icon-checkbox,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.active .icon-checkbox{display:none}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.hover .icon-checkbox-checked,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action:hover .icon-checkbox-checked,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.active .icon-checkbox-checked{display:inline-block}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.hover,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action:hover{background-color:#0e5d91;color:#fff;border-left-color:#313030 !important}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.hover .label,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.hover .icon,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action:hover .label,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action:hover .icon{color:#fff}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.hover .icon,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action:hover .icon{color:#e7eff4}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action .label,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action .icon{font-size:14px;font-size:1.4rem;text-shadow:none;color:#222}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar{overflow:visible;position:relative}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .action{line-height:1.6}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .icon.no-label{padding-right:0}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .tool-label-collapsed .btn-info .text,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .tool-label-collapsed-hover .btn-info:not(:hover) .text,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .btn-info.no-tool-label .text,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .btn-info.tool-label-collapsed .text,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .btn-info.tool-label-collapsed-over:not(:hover) .text{display:none}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .tool-label-collapsed .btn-info .icon,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .tool-label-collapsed-hover .btn-info:not(:hover) .icon,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .btn-info.no-tool-label .icon,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .btn-info.tool-label-collapsed .icon,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .btn-info.tool-label-collapsed-over:not(:hover) .icon{padding:0}\\n\\n/*# sourceMappingURL=taoQtiTestPreviewer/previewer/provider/item/css/item.css.map */.top-block-preview{position:fixed;top:0;left:50%;z-index:10000;display:flex;flex-direction:column;align-items:center;justify-content:center}.top-block-preview.open{transform:translate(-50%, 0);transition:transform .5s ease-out}.top-block-preview.close{transform:translate(-50%, calc(30px - 100%));transition:transform .5s ease-out}.top-block-preview-main{display:flex;padding:12px 24px;background-color:#f3f1ef;border:solid 1px #e5e4e4}.top-block-preview-main .btn-info{margin-left:16px;white-space:nowrap}.top-block-preview-main .btn-info .icon{padding-left:9px;padding-right:0}.top-block-preview-info{display:flex;align-items:center;justify-content:center}.top-block-preview-info p{margin-bottom:0}.top-block-preview-collapser{position:relative;width:60px;height:30px;background-color:#f3f1ef;border-bottom-left-radius:30px;border-bottom-right-radius:30px;transform:translateY(-10px);display:flex;align-items:center;justify-content:center;cursor:pointer;border-left:solid 1px #e5e4e4;border-right:solid 1px #e5e4e4}.top-block-preview-collapser::before{content:\\\" \\\";width:60px;height:10px;background-color:#f3f1ef;position:absolute;top:-1px}\\n\\n/*# sourceMappingURL=taoQtiTestPreviewer/previewer/component/topBlock/css/topBlock.css.map */.devices-previewer{width:100%;height:100%}.devices-previewer:not(.disabled)[data-type=desktop],.devices-previewer:not(.disabled)[data-type=mobile]{overflow:hidden}.devices-previewer:not(.disabled)[data-type=desktop] .preview-container,.devices-previewer:not(.disabled)[data-type=mobile] .preview-container{position:relative}.devices-previewer:not(.disabled)[data-type=desktop] .preview-frame,.devices-previewer:not(.disabled)[data-type=mobile] .preview-frame{position:relative;border:3px #aaa ridge;background:#5a5a5a;background:linear-gradient(135deg, rgb(90, 90, 90) 0%, rgb(86, 86, 86) 7%, rgb(68, 68, 68) 15%, rgb(20, 20, 20) 30%);-webkit-box-shadow:5px 5px 10px 0 rgba(0, 0, 0, 0.7);-moz-box-shadow:5px 5px 10px 0 rgba(0, 0, 0, 0.7);-ms-box-shadow:5px 5px 10px 0 rgba(0, 0, 0, 0.7);-o-box-shadow:5px 5px 10px 0 rgba(0, 0, 0, 0.7);box-shadow:5px 5px 10px 0 rgba(0, 0, 0, 0.7)}.devices-previewer:not(.disabled)[data-type=desktop] .preview-content,.devices-previewer:not(.disabled)[data-type=mobile] .preview-content{background:#fff;border-radius:3px;border:2px solid;border-color:#444 #999 #999 #444;overflow:auto}.devices-previewer:not(.disabled)[data-type=mobile] .preview-frame{border-radius:25px;padding:40px}.devices-previewer:not(.disabled)[data-type=desktop] .preview-frame{border-radius:5px;padding:30px}\\n\\n/*# sourceMappingURL=taoQtiTestPreviewer/previewer/plugins/tools/scale/component/css/devicesPreviewer.css.map */.devices-selector{display:-ms-flex;display:-webkit-flex;display:flex;-ms-flex-direction:row;-webkit-flex-direction:row;flex-direction:row}.devices-selector[data-type=standard] .desktop-selector,.devices-selector[data-type=standard] .mobile-selector,.devices-selector[data-type=standard] .orientation-selector{display:none}.devices-selector[data-type=desktop] .mobile-selector,.devices-selector[data-type=desktop] .orientation-selector{display:none}.devices-selector[data-type=mobile] .desktop-selector{display:none}.devices-selector .selector{display:inline-block;margin-top:.3em}.devices-selector .selector:not(:last-child){margin-right:1rem}.devices-selector .selector select{overflow:visible}.devices-selector .selector .select2-container{text-shadow:none}\\n\\n/*# sourceMappingURL=taoQtiTestPreviewer/previewer/plugins/tools/scale/component/css/devicesSelector.css.map */.previewer-test-component{background:inherit}.previewer-test-component.fullpage{position:absolute;top:0;left:0;right:0;bottom:64px;z-index:1000}.previewer-test-component.fullpage .item-previewer-scope{height:100vh}.previewer-test-component.readonly .qti-item::before{content:\\\" \\\";position:absolute;top:0;left:0;right:0;bottom:0;z-index:100000}.previewer-test-component.hideactionbars .test-sidebar{height:100%}.previewer-test-component.hideactionbars .action-bar{display:none}.previewer-test-component #preview-logo{margin:6px 30px 6px 30px;display:block;max-width:200px;height:52px;background:rgba(0,0,0,0)}.previewer-test-component footer{z-index:10000;position:relative;font-size:11px;padding:10px;border-top:1px #ddd solid}\\n\\n/*# sourceMappingURL=taoQtiTestPreviewer/previewer/component/test/css/qtiTest.css.map */');\n","\ndefine(\"taoQtiTestPreviewer/loader/qtiPreviewer.bundle\", function(){});\n","define(\"taoQtiTestPreviewer/loader/qtiPreviewer.min\", [\"taoItems/loader/taoItemsRunner.min\",\"taoTests/loader/taoTestsRunner.min\",\"taoQtiItem/loader/taoQtiItemRunner.min\",\"taoQtiTest/loader/taoQtiTestRunner.min\",\"taoQtiTest/loader/testPlugins.min\"], function(){});\n"],"mappings":"ACCAA,MAAA,oEAAAC,EAAA,SAAAA,EAAA,CAAAC,QAAA,UAAAC,UAAA,CAAAC,MAAA,CAAAC,OAAA,CAAAC,QAAA,CAAAC,IAAA,EAMA,MALA,MAAAC,YAAA,gBACAH,OAAA,MAAAI,KAAA,CAAAJ,OAAA,CAAAF,UAAA,CAAAE,OAAA,EAAAE,IAAA,CAAAA,IAAA,KAIA,2CACA,KCeAP,MAAA,yCACA,kCACA,2CACA,UAAAU,sBAAA,CAAAC,SAAA,EACA,aAgBA,gBAAAC,iBAA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b,KAAA,kBACAC,KAAA,KACAC,MAAA,MACAO,WAAA,GACAC,OAAA,KACAC,QAAA,KACA,EACAG,kCAAA,EACAd,KAAA,kBACAC,KAAA,KACAC,MAAA,MACAO,WAAA,GACAC,OAAA,KACAC,QAAA,KACA,EACAI,gCAAA,EACAf,KAAA,kBACAC,KAAA,KACAC,MAAA,MACAO,WAAA,GACAC,OAAA,KACAC,QAAA,KACA,EACAK,kCAAA,EACAhB,KAAA,kBACAC,KAAA,KACAC,MAAA,MACAO,WAAA,GACAC,OAAA,KACAC,QAAA,KACA,EACAM,kCAAA,EACAjB,KAAA,kBACAC,KAAA,MACAC,MAAA,MACAO,WAAA,GACAC,OAAA,KACAC,QAAA,KACA,EACAO,gCAAA,EACAlB,KAAA,kBACAC,KAAA,KACAC,MAAA,KACAO,WAAA,KACAC,OAAA,KACAC,QAAA,KACA,EACAQ,kCAAA,EACAnB,KAAA,wCACAC,KAAA,KACAC,MAAA,KACAO,WAAA,KACAC,OAAA,KACAC,QAAA,KACA,EACAS,kCAAA,EACApB,KAAA,sBACAC,KAAA,KACAC,MAAA,MACAO,WAAA,GACAC,OAAA,KACAC,QAAA,KACA,EACAU,gCAAA,EACArB,KAAA,yBACAC,KAAA,KACAC,MAAA,KACAO,WAAA,KACAC,OAAA,KACAC,QAAA,KACA,EACAW,gCAAA,EACAtB,KAAA,4CACAC,KAAA,KACAC,MAAA,KACAO,WAAA,KACAC,OAAA,KACAC,QAAA,KACA,EACAY,kCAAA,EACAvB,KAAA,gBACAC,KAAA,KACAC,MAAA,MACAO,WAAA,GACAC,OAAA,KACAC,QAAA,KACA,EACAa,gCAAA,EACAxB,KAAA,iCACAC,KAAA,KACAC,MAAA,MACAO,WAAA,KACAC,OAAA,KACAC,QAAA,KACA,EACAc,kCAAA,EACAzB,KAAA,kBACAC,KAAA,KACAC,MAAA,KACAO,WAAA,KACAC,OAAA,KACAC,QAAA,IACA,EACAe,kCAAA,EACA1B,KAAA,4CACAC,KAAA,KACAC,MAAA,KACAO,WAAA,KACAC,OAAA,KACAC,QAAA,KACA,EACAgB,gCAAA,EACA3B,KAAA,4DACAC,KAAA,KACAC,MAAA,KACAO,WAAA,GACAC,OAAA,KACAC,QAAA,IACA,EACAiB,kCAAA,EACA5B,KAAA,0BACAC,KAAA,KACAC,MAAA,MACAO,WAAA,GACAC,OAAA,KACAC,QAAA,KACA,EACAkB,gCAAA,EACA7B,KAAA,iCACAC,KAAA,KACAC,MAAA,KACAO,WAAA,GACAC,OAAA,KACAC,QAAA,IACA,EACAmB,kCAAA,EACA9B,KAAA,2DACAC,KAAA,KACAC,MAAA,KACAO,WAAA,KACAC,OAAA,KACAC,QAAA,KACA,EACAoB,kCAAA,EACA/B,KAAA,uBACAC,KAAA,KACAC,MAAA,MACAO,WAAA,GACAC,OAAA,KACAC,QAAA,KACA,EACAqB,kCAAA,EACAhC,KAAA,yBACAC,KAAA,MACAC,MAAA,MACAO,WAAA,GACAC,OAAA,KACAC,QAAA,KACA,EACAsB,kCAAA,EACAjC,KAAA,0BACAC,KAAA,KACAC,MAAA,MACAO,WAAA,GACAC,OAAA,KACAC,QAAA,KACA,EACAuB,kCAAA,EACAlC,KAAA,sCACAC,KAAA,KACAC,MAAA,MACAO,WAAA,GACAC,OAAA,KACAC,QAAA,KACA,EACAwB,kCAAA,EACAnC,KAAA,6BACAC,KAAA,KACAC,MAAA,KACAO,WAAA,KACAC,OAAA,KACAC,QAAA,KACA,EACAyB,kCAAA,EACApC,KAAA,qBACAC,KAAA,MACAC,MAAA,MACAO,WAAA,GACAC,OAAA,KACAC,QAAA,KACA,EACA0B,kCAAA,EACArC,KAAA,sBACAC,KAAA,KACAC,MAAA,MACAO,WAAA,GACAC,OAAA,KACAC,QAAA,KACA,EACA2B,kCAAA,EACAtC,KAAA,uBACAC,KAAA,KACAC,MAAA,KACAO,WAAA,GACAC,OAAA,KACAC,QAAA,IACA,EACA4B,kCAAA,EACAvC,KAAA,qBACAC,KAAA,MACAC,MAAA,MACAO,WAAA,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AAA,kBAAA8C,GAAA,EACAmB,QAAA,GACAA,QAAA,CAAAzD,OAAA,GACAyD,QAAA,OAEAjC,CAAA,CAAAe,WAAA,CAAAD,GAAA,CAAAE,OAAA,GACAd,QAAA,GAAAe,KAAA,CAAAH,GAAA,CAAAE,OAAA,EAEAb,MAAA,CAAAc,KAAA,CAAAH,GAAA,CACA,GACA9C,EAAA,gBACAiE,QAAA,GACAA,QAAA,CAAAzD,OAAA,GACAyD,QAAA,MAEA,GACA,OAAAme,gBACA,EACA,EAEA5hB,QAAA,EAGA,MAFA,MAAA0b,KAAA,MAEArF,OAAA,CAAAE,OAAA,EACA,CACA,CACA,GClJA,SAAAuL,CAAA,MAAAC,CAAA,CAAA3f,QAAA,CAAAwe,CAAA,eAAAoB,CAAA,cAAAC,CAAA,CAAAF,CAAA,CAAAG,aAAA,UAAAD,CAAA,CAAA5c,IAAA,YAAA0c,CAAA,CAAAI,oBAAA,YAAAC,WAAA,CAAAH,CAAA,EAAAA,CAAA,CAAAI,UAAA,CAAAJ,CAAA,CAAAI,UAAA,CAAAC,OAAA,CAAAR,CAAA,CAAAG,CAAA,CAAAG,WAAA,CAAAL,CAAA,CAAAQ,cAAA,CAAAT,CAAA,IACA,0jgBCDAvjB,MAAA,gEACAA,MCFA"} \ No newline at end of file +{"version":3,"names":["define","hb","template","Handlebars","depth0","helpers","partials","data","compilerInfo","merge","runnerComponentFactory","runnerTpl","previewerFactory","container","config","arguments","length","on","fullPage","readOnly","hideActionBars","getConfig","options","setState","runner","destroy","context","qtiItemPreviewerFactory","testRunnerConfig","testDefinition","serviceCallId","providers","id","module","bundle","category","proxy","communicator","Object","keys","previewers","plugins","view","pluginsOptions","loadFromBundle","itemState","itemRunner","itemUri","loadItem","_","loggerFactory","feedback","logger","defaultPlugins","name","init","uri","state","disableDefaultPlugins","Array","isArray","window","document","body","err","isUndefined","message","error","helper","buffer","helperMissing","escapeExpression","__","hash","call","stack1","functionType","title","$","componentFactory","topBlockTpl","topBlockDataTpl","topBlockFactory","topBlock","setTemplate","render","$info","isTest","$element","getElement","find","append","onClose","$icon","toggleClass","trigger","defer","urlUtil","configHelper","_defaults","bootstrap","serviceController","serviceExtension","_entries","timeout","itemPreviewerConfigFactory","undef","storage","from","getParameters","itemIdentifier","type","parameters","getServiceCallId","isPlainObject","TypeError","getServiceController","getServiceExtension","getTestActionUrl","action","route","getItemActionUrl","getTimeout","tablets","\"193986c3715c81838870f908fa98d69a\"","label","width","height","\"4e8eafab11aad1486992d7ee2c8c16ca\"","\"5aac2932d9ad00d6d8a1604b8f9e4e8d\"","\"9805d9753ad08c7630a9ee5418aa6c6c\"","d4a431cedf4705d6bf2cba6d5788378b","phones","\"1b89338531ef0155c8d6abc2ac02c81a\"","scaleFactor","dpWidth","dpHeight","\"3f89da99d84214cde7df87ebe0699a6f\"","\"0d36971a5b98b367f54ced708c9af849\"","\"026beffcc051af995660ebdede986ace\"","fd2dd53e667d6d49e4fa73356fa941dd","\"707584c1ae17d9b5b2cbe8603c91c147\"","\"91823264de952e7f2347e07db5c4058b\"","cd69817a6e147e8a4677389e56fcf568","\"75994faa6a38e31e99b53fcd75534a33\"","\"0cab4dfccdfc880687cb608cfe4159db\"","c4ff41fcba24d74fc21dc3490ca1edc9","fa969a5e0dd2de53700eeee4ba4ba142","\"33c4f9364e295ec03531f3a3425819cf\"","bc47f5275f0efd56fee52d43a8082981","\"0732887e6e324fd10777b735520a34cf\"","\"2e38a78364f09d0da0e9e1a3a68e7fb0\"","bd4b78dddc7c9625a4141a1b1ddabb87","\"3bf1edf21cfa81006183d2b02974c84e\"","ab5a352e0e016b97dac986f06c394f55","\"4826fb7d7257aeaac992ce699df41b3c\"","\"0a691ab20add7c432200f8fa6527b488\"","\"9c23ee31be29960fbac9e9bbfc2fc7b0\"","\"92177c0508c1d73905a58e2338f2a81f\"","\"5222b8866dc4cc606725e16ffcc0a783\"","\"37c1541e2bd55cfd0f4073b0ccdf68b3\"","\"2f7f64b7dda0144907ff300e83eed465\"","\"9c24f9057744dad56043702a9703127f\"","\"0a8b2732a016a9395c3af5f12dd9c0da\"","\"5a153d7f53d82dcb0801f041574a6a43\"","screens","\"9e523ae15b61dc766f5c818726881ecf\"","\"07769cd8d0a7d09818b2f0b018042fb7\"","\"72d5478a24194f98b9378e8e0fd65737\"","b7a6dd5900cc72e61f0d3479c7e314ec","\"43193b0ff671a37d8232ab664190a125\"","c29e48814af5443ff5688d9e967ce917","deviceList","deviceTypeMap","mobile","desktop","devicesHelper","getDevicesByType","key","map","mapDeviceData","device","identifier","value","getMobileDevices","getDesktopDevices","pluginFactory","testRunner","getTestRunner","after","clone","appendTo","isPluginAllowed","$contentArea","getAreaBroker","getContentArea","$extendedTextinteractionTextAreas","$ckeEditorsContent","each","style","scrollHeight","$ckeEditorContent","$ckeEditorIFrame","setTimeout","ckeEditorBody","contentWindow","querySelector","hider","buttonTpl","self","control","icon","text","className","e","preventDefault","getState","disable","enable","$container","getArea","remove","prop","removeClass","addClass","show","hide","time","moment","autoscroll","strPad","pciResponse","rendererStrategies","consoleTpl","consoleLineTpl","consoleCloserTpl","defaults","submitTitle","submitText","submitIcon","pluginConfig","getName","showConsole","controls","$console","$consoleBody","$consoleCloser","children","last","hideConsole","addConsoleLine","format","showResponses","responses","forEach","response","escape","prettyPrint","$button","itemSession","getContainer","$navigation","getNavigationArea","$el","deviceType","deviceOrientation","transformer","devicesPreviewerTpl","_Mathmin","Math","min","devicesPreviewerFactory","resetScale","$previewContent","removeAttr","$previewContainer","api","getDeviceWidth","deviceWidth","setDeviceWidth","componentConfig","parseInt","getDeviceHeight","deviceHeight","setDeviceHeight","getDeviceOrientation","setDeviceOrientation","orientation","is","attr","isDeviceMode","getDeviceType","setDeviceType","previewDevice","clearScale","applyScale","frameSize","frameMargins","getFrameSize","getFrameMargins","getScaleFactor","css","setTransformOrigin","scale","margins","outerWidth","outerHeight","size","innerWidth","innerHeight","x","y","wrap","element","unwrap","$wrappedElement","$wrappedElementContainer","parent","$wasWrappedElement","devicesPreviewer","$previewFrame","deviceWith","program1","selected","inverse","noop","fn","program","program2","items","lookupSelecter","devicesSelectorTpl","selectorTpl","getSelectorData","list","getValidIdentifier","first","updateSelect2","$selector","current","val","removeSelect2","hasClass","select2","devicesSelectorFactory","devicesList","typeData","setControlsProp","property","updateMode","getType","getOrientation","getDevice","getDeviceData","setType","deviceTypesList","$typeSelector","setDevice","setOrientation","deviceOrientationsList","$orientationSelector","select","setterName","callbackMap","isFunction","reset","devicesSelector","renderSelector","selectedValue","item","html","$desktopSelector","$mobileSelector","onSelectorChange","target","closest","uuid","namespaceHelper","nsId","resizeItem","areaBroker","namespaceAll","throttle","Promise","all","resolve","getHeaderArea","off","areaBrokerFactory","testStoreFactory","proxyFactory","toolboxFactory","qtiItemRunner","assetManagerFactory","assetStrategies","containerHelper","layoutTpl","setContext","$context","_$previousContext","getContext","restoreContext","assetManager","prependStrategy","taomedia","loadAreaBroker","$layout","contentWrapper","content","toolbox","navigation","actionsBar","panel","header","loadProxy","proxyProvider","loadTestStore","Date","now","install","getPlugins","plugin","setConfig","dataHolder","getDataHolder","setComponent","getToolbox","itemResponses","getResponses","getProxy","submitItem","get","then","catch","code","itemData","renderItem","itemRef","set","flush","renderTo","getToolboxArea","getItem","changeState","setItemState","reject","setData","baseUrl","assets","assign","onItemRunnerInit","portableElements","onItemRunnerRender","unloadItem","clear","moduleLoader","moduleConfig","handlers","addList","load","itemDataHandlers","reduce","prev","cur","updateItemData","promiseQueue","coreRequest","configFactory","queue","prepareParams","actionParams","stringifyParams","mapValues","includes","JSON","stringify","request","url","reqParams","contentType","noToken","method","background","sequential","configStorage","setOnline","success","isConnectivityError","setOffline","params","callTestAction","callItemAction","itemResponse","mapHelper","_Mathmin2","updateTestContextWithItem","testMap","position","testContext","presetMap","jump","getJump","getItemAt","testPartId","part","sectionId","section","itemSessionState","itemSessionStates","initial","createContextOptions","allowSkipping","pluginId","categoryId","categories","serviceControllerInit","serviceControllerGetItem","testSessionStates","freeze","interacting","modalFeedback","suspended","closed","solution","review","configs","itemStore","testUri","builtTestMap","reindex","firstJump","jumps","firstItem","itemPosition","canMoveBackward","attempt","Error","actions","move","_Mathmax","max","direction","scope","testPartPosition","parts","nextPartsSorted","values","filter","p","sort","a","b","stats","total","ref","flagItem","skip","loadingBar","qtiTestPreviewerFactory","stop","taoExtension","testPreviewerController","transformConfiguration","omit","configuration","testPreviewConfig","previewComponent","getTestMap","c","d","i","s","createElement","getElementsByTagName","appendChild","styleSheet","cssText","createTextNode"],"sources":["/Users/oat/Projects/terre/tr-enterprise/files/delivery/tao/views/build/config-wrap-start-default.js","../previewer/runner!tpl","../previewer/runner.js","../previewer/provider/item/css/item!css","../previewer/component/qtiItem.js","../previewer/adapter/item/qtiItem.js","../previewer/component/topBlock/tpl/topBlock!tpl","../previewer/component/topBlock/tpl/topBlockData!tpl","../previewer/component/topBlock/css/topBlock!css","../previewer/component/topBlock/topBlock.js","../previewer/config/item.js","../previewer/resources/devices.json!json","../previewer/helpers/devices.js","../previewer/plugins/content/cloneLogoInTestPreview.js","../previewer/plugins/content/enhancedReadOnlyMode.js","../previewer/plugins/controls/close.js","tpl!taoQtiTestPreviewer/previewer/plugins/navigation/submit/preview-console","tpl!taoQtiTestPreviewer/previewer/plugins/navigation/submit/preview-console-line","tpl!taoQtiTestPreviewer/previewer/plugins/navigation/submit/preview-console-closer","../previewer/plugins/navigation/submit/submit.js","tpl!taoQtiTestPreviewer/previewer/plugins/tools/scale/component/tpl/devices-previewer","../previewer/plugins/tools/scale/component/css/devicesPreviewer!css","../previewer/plugins/tools/scale/component/devicesPreviewer.js","tpl!taoQtiTestPreviewer/previewer/plugins/tools/scale/component/tpl/devices-selector","../previewer/plugins/tools/scale/component/tpl/selector!tpl","../previewer/plugins/tools/scale/component/css/devicesSelector!css","../previewer/plugins/tools/scale/component/devicesSelector.js","../previewer/plugins/tools/scale/scale.js","../previewer/provider/item/tpl/item!tpl","../previewer/provider/item/item.js","../previewer/proxy/itemDataHandlers.js","../previewer/proxy/item.js","../previewer/proxy/test.js","../previewer/component/test/tpl/qtiTest!tpl","../previewer/component/test/css/qtiTest!css","../previewer/component/test/qtiTest.js","../previewer/adapter/test/qtiTest.js","onLayerEnd0.js","module-create.js","/Users/oat/Projects/terre/tr-enterprise/files/delivery/tao/views/build/config-wrap-end-default.js"],"sourcesContent":["\n","\ndefine('tpl!taoQtiTestPreviewer/previewer/runner', ['handlebars'], function(hb){ return hb.template(function (Handlebars,depth0,helpers,partials,data) {\n this.compilerInfo = [4,'>= 1.0.0'];\nhelpers = this.merge(helpers, Handlebars.helpers); data = data || {};\n \n\n\n return \"
              \";\n }); });\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2018-2019 (original work) Open Assessment Technologies SA ;\n */\n\n/**\n * Component that embeds the QTI previewer for tests and items\n *\n * @author Jean-Sébastien Conan \n */\ndefine('taoQtiTestPreviewer/previewer/runner',[\n 'taoTests/runner/runnerComponent',\n 'tpl!taoQtiTestPreviewer/previewer/runner'\n], function (runnerComponentFactory, runnerTpl) {\n 'use strict';\n\n /**\n * Builds a test runner to preview test item\n * @param {jQuery|HTMLElement|String} container - The container in which renders the component\n * @param {Object} config - The testRunner options\n * @param {String} [config.provider] - The provider to use\n * @param {Object[]} [config.providers] - A collection of providers to load.\n * @param {Boolean} [config.replace] - When the component is appended to its container, clears the place before\n * @param {Number|String} [config.width] - The width in pixels, or 'auto' to use the container's width\n * @param {Number|String} [config.height] - The height in pixels, or 'auto' to use the container's height\n * @param {Boolean} [config.options.fullPage] - Force the previewer to occupy the full window.\n * @param {Booleanh} [config.options.readOnly] - Do not allow to modify the previewed item.\n * @param {Function} [template] - An optional template for the component\n * @returns {previewer}\n */\n return function previewerFactory(container, config = {}, template = null) {\n\n return runnerComponentFactory(container, config, template || runnerTpl)\n .on('render', function() {\n const { fullPage, readOnly, hideActionBars } = this.getConfig().options;\n this.setState('fullpage', fullPage);\n this.setState('readonly', readOnly);\n this.setState('hideactionbars', hideActionBars);\n })\n .on('ready', function(runner) {\n runner.on('destroy', () => this.destroy() );\n });\n };\n});\n\n","\ndefine('css!taoQtiTestPreviewer/previewer/provider/item/css/item',[],function(){});\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2019 (original work) Open Assessment Technologies SA ;\n */\n/**\n * @author Jean-Sébastien Conan \n */\ndefine('taoQtiTestPreviewer/previewer/component/qtiItem',[\n 'context',\n 'taoQtiTestPreviewer/previewer/runner',\n 'css!taoQtiTestPreviewer/previewer/provider/item/css/item'\n], function (context, previewerFactory) {\n 'use strict';\n\n /**\n * Builds a test runner to preview test item\n * @param {jQuery|HTMLElement|String} container - The container in which renders the component\n * @param {Object} [config] - The testRunner options\n * @param {String} [config.itemUri] - The URI of the item to load\n * @param {Object} [config.itemState] - The state of the item when relevant\n * @param {Object[]} [config.plugins] - Additional plugins to load\n * @param {Object[]} [config.pluginsOptions] - Options for the plugins\n * @param {String} [config.fullPage] - Force the previewer to occupy the full window.\n * @param {String} [config.readOnly] - Do not allow to modify the previewed item.\n * @param {Function} [template] - An optional template for the component\n * @returns {previewer}\n */\n return function qtiItemPreviewerFactory(container, config = {}, template = null) {\n\n const testRunnerConfig = {\n testDefinition: 'test-container',\n serviceCallId: 'previewer',\n providers: {\n runner: {\n id: 'qtiItemPreviewer',\n module: 'taoQtiTestPreviewer/previewer/provider/item/item',\n bundle: 'taoQtiTestPreviewer/loader/qtiPreviewer.min',\n category: 'runner'\n },\n proxy: {\n id: 'qtiItemPreviewerProxy',\n module: 'taoQtiTestPreviewer/previewer/proxy/item',\n bundle: 'taoQtiTestPreviewer/loader/qtiPreviewer.min',\n category: 'proxy'\n },\n communicator: {\n id: 'request',\n module: 'core/communicator/request',\n bundle: Object.keys(config.previewers || {}).length === 1 ? 'loader/vendor.min' : null,\n category: 'communicator'\n },\n plugins: config.plugins || []\n },\n options: {\n view: config.view,\n readOnly: config.readOnly,\n fullPage: config.fullPage,\n plugins: config.pluginsOptions,\n hideActionBars: config.hideActionBars,\n }\n };\n\n //extra context config\n testRunnerConfig.loadFromBundle = !!context.bundle;\n\n return previewerFactory(container, testRunnerConfig, template)\n .on('ready', runner => {\n if (config.itemState) {\n runner.on('renderitem', () => runner.itemRunner.setState(config.itemState));\n }\n if (config.itemUri) {\n return runner.loadItem(config.itemUri);\n }\n });\n };\n});\n\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2019-2024 (original work) Open Assessment Technologies SA ;\n */\n/**\n * @author Jean-Sébastien Conan \n */\ndefine('taoQtiTestPreviewer/previewer/adapter/item/qtiItem',['lodash', 'core/logger', 'taoQtiTestPreviewer/previewer/component/qtiItem', 'ui/feedback'], function (\n _,\n loggerFactory,\n qtiItemPreviewerFactory,\n feedback\n) {\n 'use strict';\n\n const logger = loggerFactory('taoQtiTest/previewer');\n\n /**\n * List of required plugins that should be loaded in order to make the previewer work properly\n * @type {Object[]}\n */\n const defaultPlugins = [\n {\n module: 'taoQtiTestPreviewer/previewer/plugins/controls/close',\n bundle: 'taoQtiTestPreviewer/loader/qtiPreviewer.min',\n category: 'controls'\n },\n {\n module: 'taoQtiTestPreviewer/previewer/plugins/navigation/submit/submit',\n bundle: 'taoQtiTestPreviewer/loader/qtiPreviewer.min',\n category: 'navigation'\n },\n {\n module: 'taoQtiTestPreviewer/previewer/plugins/tools/scale/scale',\n bundle: 'taoQtiTestPreviewer/loader/qtiPreviewer.min',\n category: 'tools'\n },\n {\n module: 'taoQtiTest/runner/plugins/tools/itemThemeSwitcher/itemThemeSwitcher',\n bundle: 'taoQtiTest/loader/testPlugins.min',\n category: 'tools'\n },\n {\n module: 'taoQtiTestPreviewer/previewer/plugins/content/enhancedReadOnlyMode',\n bundle: 'taoQtiTestPreviewer/loader/qtiPreviewer.min',\n category: 'content'\n }\n ];\n\n /**\n * Wraps the legacy item previewer in order to be loaded by the taoItems previewer factory\n */\n return {\n name: 'qtiItem',\n\n /**\n * Builds and shows the legacy item previewer\n *\n * @param {String} uri - The URI of the item to load\n * @param {Object} state - The state of the item\n * @param {Object} [config] - Some config entries\n * @param {Object[]} [config.plugins] - Additional plugins to load\n * @param {boolean} [config.fullPage] - Force the previewer to occupy the full window.\n * @param {boolean} [config.readOnly] - Do not allow to modify the previewed item.\n * @param {string} [config.viewer] - Instruct the previewer of the type of usage.\n * @param {boolean} [config.disableDefaultPlugins] - Disable the plugins.\n * @returns {Object}\n */\n init(uri, state, config = {}) {\n config.itemUri = uri;\n config.itemState = state;\n if (!config.disableDefaultPlugins) {\n config.plugins = Array.isArray(config.plugins)\n ? [...defaultPlugins, ...config.plugins]\n : defaultPlugins;\n }\n return qtiItemPreviewerFactory(config.container || window.document.body, config).on(\n 'error',\n function (err) {\n if (!_.isUndefined(err.message)) {\n feedback().error(err.message);\n } else {\n logger.error(err);\n }\n }\n );\n }\n };\n});\n\n","\ndefine('tpl!taoQtiTestPreviewer/previewer/component/topBlock/tpl/topBlock', ['handlebars'], function(hb){ return hb.template(function (Handlebars,depth0,helpers,partials,data) {\n this.compilerInfo = [4,'>= 1.0.0'];\nhelpers = this.merge(helpers, Handlebars.helpers); data = data || {};\n var buffer = \"\", helper, options, helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;\n\n\n buffer += \"
              \\n\t
              \\n\t\t
              \\n\t\t\\n\t
              \\n\t
              \\n
              \";\n return buffer;\n }); });\n","\ndefine('tpl!taoQtiTestPreviewer/previewer/component/topBlock/tpl/topBlockData', ['handlebars'], function(hb){ return hb.template(function (Handlebars,depth0,helpers,partials,data) {\n this.compilerInfo = [4,'>= 1.0.0'];\nhelpers = this.merge(helpers, Handlebars.helpers); data = data || {};\n var buffer = \"\", stack1, helper, functionType=\"function\", escapeExpression=this.escapeExpression;\n\n\n buffer += \"

              \";\n if (helper = helpers.name) { stack1 = helper.call(depth0, {hash:{},data:data}); }\n else { helper = (depth0 && depth0.name); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }\n buffer += escapeExpression(stack1)\n + \" \";\n if (helper = helpers.title) { stack1 = helper.call(depth0, {hash:{},data:data}); }\n else { helper = (depth0 && depth0.title); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }\n buffer += escapeExpression(stack1)\n + \"

              \";\n return buffer;\n }); });\n","\ndefine('css!taoQtiTestPreviewer/previewer/component/topBlock/css/topBlock',[],function(){});\n","define('taoQtiTestPreviewer/previewer/component/topBlock/topBlock',[\n 'jquery',\n 'lodash',\n 'i18n',\n 'ui/component',\n 'tpl!taoQtiTestPreviewer/previewer/component/topBlock/tpl/topBlock',\n 'tpl!taoQtiTestPreviewer/previewer/component/topBlock/tpl/topBlockData',\n 'css!taoQtiTestPreviewer/previewer/component/topBlock/css/topBlock',\n], function ($, _, __, componentFactory, topBlockTpl, topBlockDataTpl) {\n 'use strict';\n\n /**\n * Builds a topBlock component\n *\n * @param {JQuery} container\n * @param {Object} config\n * @param {String} config.title - the test title\n * @param {Function} config.onClose - the callback function\n * @returns {component}\n * @fires ready - When the component is ready to work\n */\n function topBlockFactory(container, config) {\n const topBlock = componentFactory()\n .setTemplate(topBlockTpl)\n .on('init', function(){\n this.render(container);\n })\n .on('render', function () {\n const $info = $(topBlockDataTpl({\n name: config.isTest ? __('Test Preview:') : __('Item Preview:'),\n title: config.title\n }));\n const $element = this.getElement();\n $element.find('.top-block-preview-info').append($info);\n $element.find('.close').on('click', config.onClose);\n const $icon = $element.find('.top-block-preview-collapser .icon');\n $element.find('.top-block-preview-collapser').on('click', () => {\n $icon.toggleClass('icon-up');\n $icon.toggleClass('icon-down');\n $element.toggleClass('open');\n $element.toggleClass('close');\n });\n /**\n * @event ready\n */\n this.trigger('ready');\n });\n\n // initialize the component with the provided config\n // defer the call to allow to listen to the init event\n _.defer(function() {\n topBlock.init(config);\n });\n\n return topBlock;\n }\n\n return topBlockFactory;\n});\n\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2018 (original work) Open Assessment Technologies SA ;\n */\n\n/**\n * Config manager for the proxy of the QTI item previewer\n *\n * @author Jean-Sébastien Conan \n */\ndefine('taoQtiTestPreviewer/previewer/config/item',[\n 'lodash',\n 'util/url',\n 'util/config'\n], function(_, urlUtil, configHelper) {\n 'use strict';\n\n /**\n * Some default config values\n * @type {Object}\n * @private\n */\n var _defaults = {\n bootstrap : {\n serviceController : 'Previewer',\n serviceExtension : 'taoQtiTestPreviewer'\n }\n };\n\n /**\n * The list of handled config entries. Each required entry is set to true, while optional entries are set to false.\n * @type {Object}\n * @private\n */\n var _entries = {\n serviceCallId : true,\n bootstrap : false,\n timeout : false\n };\n\n /**\n * Creates a config object for the proxy implementation\n * @param {Object} config - Some required and optional config\n * @param {String} config.serviceCallId - An identifier for the service call\n * @param {String} [config.bootstrap.serviceController] - The name of the service controller\n * @param {String} [config.bootstrap.serviceExtension] - The name of the extension containing the service controller\n * @returns {Object}\n */\n return function itemPreviewerConfigFactory(config) {\n // protected storage\n var storage = configHelper.from(config, _entries, _defaults);\n var undef;\n\n // convert some values from seconds to milliseconds\n if (storage.timeout) {\n storage.timeout *= 1000;\n } else {\n storage.timeout = undef;\n }\n\n // returns only a proxy storage object : no direct access to data is provided\n return {\n /**\n * Gets the list of parameters\n * @param {String|Object} [itemIdentifier]\n * @returns {Object}\n */\n getParameters: function getParameters(itemIdentifier) {\n var type = typeof itemIdentifier;\n var parameters = {\n serviceCallId : this.getServiceCallId()\n };\n\n if (type === 'string') {\n // simple item identifier\n parameters.itemUri = itemIdentifier;\n // structured item identifier (a list of parameters)\n } else if (type === 'object' && _.isPlainObject(itemIdentifier)) {\n _.merge(parameters, itemIdentifier);\n } else if (type !== 'undefined') {\n throw new TypeError('Wrong parameter type provided for itemIdentifier: ' + type + '. Only string or plain object are allowed!');\n }\n\n return parameters;\n },\n\n /**\n * Gets the URI of the service call\n * @returns {String}\n */\n getServiceCallId : function getServiceCallId() {\n return storage.serviceCallId;\n },\n\n /**\n * Gets the name of the service controller\n * @returns {String}\n */\n getServiceController : function getServiceController() {\n return storage.bootstrap.serviceController || _defaults.bootstrap.serviceController;\n },\n\n /**\n * Gets the name of the extension containing the service controller\n * @returns {String}\n */\n getServiceExtension : function getServiceExtension() {\n return storage.bootstrap.serviceExtension || _defaults.bootstrap.serviceExtension;\n },\n\n /**\n * Gets an URL of a service action\n * @param {String} action - the name of the action to request\n * @returns {String} - Returns the URL\n */\n getTestActionUrl : function getTestActionUrl(action) {\n return urlUtil.route(action, this.getServiceController(), this.getServiceExtension(), this.getParameters());\n },\n\n /**\n * Gets an URL of a service action related to a particular item\n * @param {String|Object} itemIdentifier - The URI of the item\n * @param {String} action - the name of the action to request\n * @returns {String} - Returns the URL\n */\n getItemActionUrl : function getItemActionUrl(itemIdentifier, action) {\n return urlUtil.route(action, this.getServiceController(), this.getServiceExtension(), this.getParameters(itemIdentifier));\n },\n\n /**\n * Gets the request timeout\n * @returns {Number}\n */\n getTimeout : function getTimeout() {\n return storage.timeout;\n }\n };\n };\n});\n\n","\ndefine(\"json!taoQtiTestPreviewer/previewer/resources/devices.json\", function(){ return {\n \"tablets\": {\n \"193986c3715c81838870f908fa98d69a\": {\n \"label\": \"Amazon Kindle Fire HDX 7\\u2033\",\n \"width\": 960,\n \"height\": 600\n },\n \"4e8eafab11aad1486992d7ee2c8c16ca\": {\n \"label\": \"Apple iPad\",\n \"width\": 1024,\n \"height\": 768\n },\n \"5aac2932d9ad00d6d8a1604b8f9e4e8d\": {\n \"label\": \"Google Nexus 10, Motorola Xoom, Xyboard\",\n \"width\": 1280,\n \"height\": 800\n },\n \"9805d9753ad08c7630a9ee5418aa6c6c\": {\n \"label\": \"Google Nexus 7\",\n \"width\": 966,\n \"height\": 604\n },\n \"d4a431cedf4705d6bf2cba6d5788378b\": {\n \"label\": \"Samsung Galaxy Tab 7.7, 8.9, 10.1\",\n \"width\": 1280,\n \"height\": 800\n }\n },\n \"phones\": {\n \"1b89338531ef0155c8d6abc2ac02c81a\": {\n \"label\": \"Apple iPhone 3GS\",\n \"width\": 320,\n \"height\": 480,\n \"scaleFactor\": 1,\n \"dpWidth\": 320,\n \"dpHeight\": 480\n },\n \"3f89da99d84214cde7df87ebe0699a6f\": {\n \"label\": \"Apple iPhone 4\",\n \"width\": 640,\n \"height\": 960,\n \"scaleFactor\": 2,\n \"dpWidth\": 320,\n \"dpHeight\": 1920\n },\n \"0d36971a5b98b367f54ced708c9af849\": {\n \"label\": \"Apple iPhone 5\",\n \"width\": 640,\n \"height\": 1136,\n \"scaleFactor\": 2,\n \"dpWidth\": 320,\n \"dpHeight\": 2272\n },\n \"026beffcc051af995660ebdede986ace\": {\n \"label\": \"BlackBerry Z10\",\n \"width\": 768,\n \"height\": 1280,\n \"scaleFactor\": 2,\n \"dpWidth\": 384,\n \"dpHeight\": 2560\n },\n \"fd2dd53e667d6d49e4fa73356fa941dd\": {\n \"label\": \"BlackBerry Z30\",\n \"width\": 720,\n \"height\": 1280,\n \"scaleFactor\": 2,\n \"dpWidth\": 360,\n \"dpHeight\": 2560\n },\n \"707584c1ae17d9b5b2cbe8603c91c147\": {\n \"label\": \"Google Nexus 4\",\n \"width\": 768,\n \"height\": 1280,\n \"scaleFactor\": 2,\n \"dpWidth\": 384,\n \"dpHeight\": 2560\n },\n \"91823264de952e7f2347e07db5c4058b\": {\n \"label\": \"Google Nexus 5\",\n \"width\": 1080,\n \"height\": 1920,\n \"scaleFactor\": 3,\n \"dpWidth\": 360,\n \"dpHeight\": 5760\n },\n \"cd69817a6e147e8a4677389e56fcf568\": {\n \"label\": \"Google Nexus S\",\n \"width\": 480,\n \"height\": 800,\n \"scaleFactor\": 1.5,\n \"dpWidth\": 320,\n \"dpHeight\": 1200\n },\n \"75994faa6a38e31e99b53fcd75534a33\": {\n \"label\": \"HTC Evo, Touch HD, Desire HD, Desire\",\n \"width\": 480,\n \"height\": 800,\n \"scaleFactor\": 1.5,\n \"dpWidth\": 320,\n \"dpHeight\": 1200\n },\n \"0cab4dfccdfc880687cb608cfe4159db\": {\n \"label\": \"HTC One X, EVO LTE\",\n \"width\": 720,\n \"height\": 1280,\n \"scaleFactor\": 2,\n \"dpWidth\": 360,\n \"dpHeight\": 2560\n },\n \"c4ff41fcba24d74fc21dc3490ca1edc9\": {\n \"label\": \"HTC Sensation, Evo 3D\",\n \"width\": 540,\n \"height\": 960,\n \"scaleFactor\": 1.5,\n \"dpWidth\": 360,\n \"dpHeight\": 1440\n },\n \"fa969a5e0dd2de53700eeee4ba4ba142\": {\n \"label\": \"LG Optimus 2X, Optimus 3D, Optimus Black\",\n \"width\": 480,\n \"height\": 800,\n \"scaleFactor\": 1.5,\n \"dpWidth\": 320,\n \"dpHeight\": 1200\n },\n \"33c4f9364e295ec03531f3a3425819cf\": {\n \"label\": \"LG Optimus G\",\n \"width\": 768,\n \"height\": 1280,\n \"scaleFactor\": 2,\n \"dpWidth\": 384,\n \"dpHeight\": 2560\n },\n \"bc47f5275f0efd56fee52d43a8082981\": {\n \"label\": \"LG Optimus LTE, Optimus 4X HD\",\n \"width\": 720,\n \"height\": 1280,\n \"scaleFactor\": 1.7,\n \"dpWidth\": 424,\n \"dpHeight\": 2176\n },\n \"0732887e6e324fd10777b735520a34cf\": {\n \"label\": \"LG Optimus One\",\n \"width\": 320,\n \"height\": 480,\n \"scaleFactor\": 1.5,\n \"dpWidth\": 213,\n \"dpHeight\": 720\n },\n \"2e38a78364f09d0da0e9e1a3a68e7fb0\": {\n \"label\": \"Motorola Defy, Droid, Droid X, Milestone\",\n \"width\": 480,\n \"height\": 854,\n \"scaleFactor\": 1.5,\n \"dpWidth\": 320,\n \"dpHeight\": 1281\n },\n \"bd4b78dddc7c9625a4141a1b1ddabb87\": {\n \"label\": \"Motorola Droid 3, Droid 4, Droid Razr, Atrix 4G, Atrix 2\",\n \"width\": 540,\n \"height\": 960,\n \"scaleFactor\": 1,\n \"dpWidth\": 540,\n \"dpHeight\": 960\n },\n \"3bf1edf21cfa81006183d2b02974c84e\": {\n \"label\": \"Motorola Droid Razr HD\",\n \"width\": 720,\n \"height\": 1280,\n \"scaleFactor\": 1,\n \"dpWidth\": 720,\n \"dpHeight\": 1280\n },\n \"ab5a352e0e016b97dac986f06c394f55\": {\n \"label\": \"Nokia C5, C6, C7, N97, N8, X7\",\n \"width\": 360,\n \"height\": 640,\n \"scaleFactor\": 1,\n \"dpWidth\": 360,\n \"dpHeight\": 640\n },\n \"4826fb7d7257aeaac992ce699df41b3c\": {\n \"label\": \"Nokia Lumia 7X0, Lumia 8XX, Lumia 900, N800, N810, N900\",\n \"width\": 480,\n \"height\": 800,\n \"scaleFactor\": 1.5,\n \"dpWidth\": 320,\n \"dpHeight\": 1200\n },\n \"0a691ab20add7c432200f8fa6527b488\": {\n \"label\": \"Samsung Galaxy Note\",\n \"width\": 800,\n \"height\": 1280,\n \"scaleFactor\": 2,\n \"dpWidth\": 400,\n \"dpHeight\": 2560\n },\n \"9c23ee31be29960fbac9e9bbfc2fc7b0\": {\n \"label\": \"Samsung Galaxy Note 3\",\n \"width\": 1080,\n \"height\": 1920,\n \"scaleFactor\": 2,\n \"dpWidth\": 540,\n \"dpHeight\": 3840\n },\n \"92177c0508c1d73905a58e2338f2a81f\": {\n \"label\": \"Samsung Galaxy Note II\",\n \"width\": 720,\n \"height\": 1280,\n \"scaleFactor\": 2,\n \"dpWidth\": 360,\n \"dpHeight\": 2560\n },\n \"5222b8866dc4cc606725e16ffcc0a783\": {\n \"label\": \"Samsung Galaxy S III, Galaxy Nexus\",\n \"width\": 720,\n \"height\": 1280,\n \"scaleFactor\": 2,\n \"dpWidth\": 360,\n \"dpHeight\": 2560\n },\n \"37c1541e2bd55cfd0f4073b0ccdf68b3\": {\n \"label\": \"Samsung Galaxy S, S II, W\",\n \"width\": 480,\n \"height\": 800,\n \"scaleFactor\": 1.5,\n \"dpWidth\": 320,\n \"dpHeight\": 1200\n },\n \"2f7f64b7dda0144907ff300e83eed465\": {\n \"label\": \"Samsung Galaxy S4\",\n \"width\": 1080,\n \"height\": 1920,\n \"scaleFactor\": 3,\n \"dpWidth\": 360,\n \"dpHeight\": 5760\n },\n \"9c24f9057744dad56043702a9703127f\": {\n \"label\": \"Sony Xperia S, Ion\",\n \"width\": 720,\n \"height\": 1280,\n \"scaleFactor\": 2,\n \"dpWidth\": 360,\n \"dpHeight\": 2560\n },\n \"0a8b2732a016a9395c3af5f12dd9c0da\": {\n \"label\": \"Sony Xperia Sola, U\",\n \"width\": 480,\n \"height\": 854,\n \"scaleFactor\": 1,\n \"dpWidth\": 480,\n \"dpHeight\": 854\n },\n \"5a153d7f53d82dcb0801f041574a6a43\": {\n \"label\": \"Sony Xperia Z, Z1\",\n \"width\": 1080,\n \"height\": 1920,\n \"scaleFactor\": 3,\n \"dpWidth\": 360,\n \"dpHeight\": 5760\n }\n },\n \"screens\": {\n \"9e523ae15b61dc766f5c818726881ecf\": {\n \"label\": \"1920 \\u00d7 1080\",\n \"width\": 1920,\n \"height\": 1080,\n \"dpWidth\": 1920,\n \"dpHeight\": 1080,\n \"scaleFactor\": 1\n },\n \"07769cd8d0a7d09818b2f0b018042fb7\": {\n \"label\": \"1366 \\u00d7 768\",\n \"width\": 1366,\n \"height\": 768,\n \"dpWidth\": 1366,\n \"dpHeight\": 768,\n \"scaleFactor\": 1\n },\n \"72d5478a24194f98b9378e8e0fd65737\": {\n \"label\": \"1280 \\u00d7 1024\",\n \"width\": 1280,\n \"height\": 1024,\n \"dpWidth\": 1280,\n \"dpHeight\": 1024,\n \"scaleFactor\": 1\n },\n \"b7a6dd5900cc72e61f0d3479c7e314ec\": {\n \"label\": \"1280 \\u00d7 800\",\n \"width\": 1280,\n \"height\": 800,\n \"dpWidth\": 1280,\n \"dpHeight\": 800,\n \"scaleFactor\": 1\n },\n \"43193b0ff671a37d8232ab664190a125\": {\n \"label\": \"1024 \\u00d7 768\",\n \"width\": 1024,\n \"height\": 768,\n \"dpWidth\": 1024,\n \"dpHeight\": 768,\n \"scaleFactor\": 1\n },\n \"c29e48814af5443ff5688d9e967ce917\": {\n \"label\": \"800 \\u00d7 600\",\n \"width\": 800,\n \"height\": 600,\n \"dpWidth\": 800,\n \"dpHeight\": 600,\n \"scaleFactor\": 1\n }\n }\n};});\n\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2019 Open Assessment Technologies SA;\n */\n/**\n * Helper to work with screen values and mobile devices list\n * for \"select device\" select-box on any test-item preview page\n * for example using scale plugin app/taoQtiTestPreviewer/views/js/previewer/plugins/tools/scale/scale.js\n *\n * @author Dieter Raber \n * @author Pavel Hendelman \n */\ndefine('taoQtiTestPreviewer/previewer/helpers/devices',[\n 'lodash',\n 'json!taoQtiTestPreviewer/previewer/resources/devices.json'\n], function (\n _,\n deviceList\n) {\n 'use strict';\n\n /**\n * @typedef {Object} deviceScreen\n * @property {String} value - The selector's value to use\n * @property {String} label - The label to display in the selector\n * @property {Number} width - The width of the screen\n * @property {Number} height - The height of the screen\n */\n\n /**\n * Translation map to convert a device type to a collection's name in the provided list.\n * @type {Object}\n */\n var deviceTypeMap = {\n 'mobile': 'tablets',\n 'desktop': 'screens'\n };\n\n /**\n * Helpers to get the list of devices\n */\n var devicesHelper = {\n /**\n * Gets the list of devices to test item through. This list is meant to be used by a selector.\n * @param {String} type - The type of device from the list ['mobile', 'desktop']\n * @returns {deviceScreen[]} - The list of devices to test item through, filtered by the provided type\n */\n getDevicesByType : function getDevicesByType(type) {\n /*\n * @todo\n * The device list is currently based on the devices found on the Chrome emulator.\n * This is not ideal and should be changed in the future.\n * I have http://en.wikipedia.org/wiki/List_of_displays_by_pixel_density in mind but we\n * will need to figure what criteria to apply when generating the list.\n */\n var key = deviceTypeMap[type];\n\n return _.map(deviceList[key] || [], function mapDeviceData(device, identifier) {\n return {\n value: identifier,\n label: device.label,\n width: device.width,\n height: device.height\n };\n });\n },\n\n /**\n * Gets the list of mobile devices\n * @returns {deviceScreen[]} - The list of mobile devices to test item through\n */\n getMobileDevices: function getMobileDevices() {\n return devicesHelper.getDevicesByType('mobile');\n },\n\n /**\n * Gets the list of desktop devices\n * @returns {deviceScreen[]} - The list of desktop devices to test item through\n */\n getDesktopDevices: function getDesktopDevices() {\n return devicesHelper.getDevicesByType('desktop');\n }\n };\n\n return devicesHelper;\n});\n\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2020 (original work) Open Assessment Technologies SA ;\n */\n\n/**\n * Test Previewer Content Plugin : cloneLogoInTestPreview\n *\n * This plugin can be used as a hook to clone logo from the header in the back office to the header in the test preview\n *\n * @author Hanna Dzmitryieva \n */\ndefine('taoQtiTestPreviewer/previewer/plugins/content/cloneLogoInTestPreview',['jquery', 'taoTests/runner/plugin'], function ($, pluginFactory) {\n 'use strict';\n\n return pluginFactory({\n name: 'cloneLogoInTestPreview',\n\n /**\n * Initialize the plugin (called during runner's init)\n */\n init() {\n const testRunner = this.getTestRunner();\n\n testRunner.after('ready', () => {\n // clone logo to preview - because logo source + class + styles can be customized by client extension\n $('#tao-main-logo').clone().appendTo('.previewer-test-component header');\n });\n }\n });\n});\n\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2020 (original work) Open Assessment Technologies SA ;\n */\n\n/**\n * Test Previewer Content Plugin : EnhancedReadOnlyMode\n *\n * This plugin can be used as a hook to do modification in the item preview for read only mode\n *\n * @author Ansul Sharma \n */\ndefine('taoQtiTestPreviewer/previewer/plugins/content/enhancedReadOnlyMode',[\n 'jquery',\n 'lodash',\n 'i18n',\n 'taoTests/runner/plugin'\n], function ($, _, __, pluginFactory) {\n 'use strict';\n\n return pluginFactory({\n\n name: 'EnhancedReadOnlyMode',\n\n /**\n * Initialize the plugin (called during runner's init)\n */\n init() {\n const testRunner = this.getTestRunner();\n\n /**\n * Enables the plugin only in readOnly mode\n * @returns {Boolean}\n */\n const isPluginAllowed = () => {\n const config = testRunner.getConfig();\n return config.options.readOnly;\n };\n\n testRunner\n .after('renderitem', () => {\n if (isPluginAllowed()) {\n const $contentArea = testRunner.getAreaBroker().getContentArea();\n const $extendedTextinteractionTextAreas = $contentArea.find('.qti-extendedTextInteraction textarea.text-container');\n const $ckeEditorsContent = $contentArea.find('.qti-extendedTextInteraction div.cke_contents');\n\n /**\n * Updates the height of textarea element of all extended text interactions based on the height of the content\n */\n if($extendedTextinteractionTextAreas.length) {\n $extendedTextinteractionTextAreas.each(function() {\n this.style.height = `${this.scrollHeight + 20}px`;\n });\n }\n\n /**\n * Updates the height of all the ckeEditor container of wysiwyg extended text interaction based on the height of the iFrame\n */\n if($ckeEditorsContent.length) {\n $ckeEditorsContent.each(function() {\n const $ckeEditorContent = $(this);\n const $ckeEditorIFrame = $ckeEditorContent.find('iframe.cke_wysiwyg_frame');\n\n /**\n * Only update the height when the iFrame has finished loading the styles because font-size may change the height\n */\n $ckeEditorIFrame.on('load', () => {\n setTimeout(() => {\n const ckeEditorBody = $ckeEditorIFrame[0].contentWindow.document.querySelector('body');\n $ckeEditorContent[0].style.height = `${ckeEditorBody.scrollHeight + 20}px`;\n }, 0);\n });\n });\n }\n }\n });\n }\n });\n});\n\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2018 (original work) Open Assessment Technologies SA ;\n */\n\n/**\n * Test Previewer Control Plugin : Close\n *\n * @author Jean-Sébastien Conan \n */\ndefine('taoQtiTestPreviewer/previewer/plugins/controls/close',[\n 'jquery',\n 'lodash',\n 'i18n',\n 'ui/hider',\n 'taoTests/runner/plugin',\n 'tpl!taoQtiTest/runner/plugins/templates/button'\n], function ($, _, __, hider, pluginFactory, buttonTpl) {\n 'use strict';\n\n return pluginFactory({\n\n name: 'close',\n\n /**\n * Initialize the plugin (called during runner's init)\n */\n init: function init() {\n var self = this;\n var testRunner = this.getTestRunner();\n\n /**\n * Tells if the component is enabled\n * @returns {Boolean}\n */\n function isPluginAllowed() {\n var config = testRunner.getConfig();\n return !config.options.hideActionBars;\n }\n\n this.$element = $(buttonTpl({\n control: 'close',\n title: __('Close the previewer'),\n icon: 'close',\n text: __('Close'),\n className: 'context-action'\n }));\n\n this.$element.on('click', function (e) {\n e.preventDefault();\n if (self.getState('enabled') !== false) {\n self.disable();\n testRunner.trigger('finish');\n }\n });\n\n this.disable();\n\n testRunner\n .on('enablenav', function () {\n if (isPluginAllowed()) {\n self.enable();\n }\n })\n .on('disablenav', function () {\n self.disable();\n });\n },\n\n /**\n * Called during the runner's render phase\n */\n render: function render() {\n\n //attach the element to the navigation area\n var $container = this.getAreaBroker().getArea('context');\n $container.append(this.$element);\n },\n\n /**\n * Called during the runner's destroy phase\n */\n destroy: function destroy() {\n this.$element.remove();\n },\n\n /**\n * Enable the button\n */\n enable: function enable() {\n this.$element.prop('disabled', false)\n .removeClass('disabled');\n },\n\n /**\n * Disable the button\n */\n disable: function disable() {\n this.$element.prop('disabled', true)\n .addClass('disabled');\n },\n\n /**\n * Show the button\n */\n show: function show() {\n hider.show(this.$element);\n },\n\n /**\n * Hide the button\n */\n hide: function hide() {\n hider.hide(this.$element);\n }\n });\n});\n\n","\ndefine('tpl!taoQtiTestPreviewer/previewer/plugins/navigation/submit/preview-console', ['handlebars'], function(hb){ return hb.template(function (Handlebars,depth0,helpers,partials,data) {\n this.compilerInfo = [4,'>= 1.0.0'];\nhelpers = this.merge(helpers, Handlebars.helpers); data = data || {};\n \n\n\n return \"
              \\n
                \\n
                \";\n }); });\n","\ndefine('tpl!taoQtiTestPreviewer/previewer/plugins/navigation/submit/preview-console-line', ['handlebars'], function(hb){ return hb.template(function (Handlebars,depth0,helpers,partials,data) {\n this.compilerInfo = [4,'>= 1.0.0'];\nhelpers = this.merge(helpers, Handlebars.helpers); data = data || {};\n var buffer = \"\", stack1, helper, functionType=\"function\", escapeExpression=this.escapeExpression;\n\n\n buffer += \"
              • \";\n  if (helper = helpers.time) { stack1 = helper.call(depth0, {hash:{},data:data}); }\n  else { helper = (depth0 && depth0.time); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }\n  buffer += escapeExpression(stack1)\n    + \"\";\n  if (helper = helpers.type) { stack1 = helper.call(depth0, {hash:{},data:data}); }\n  else { helper = (depth0 && depth0.type); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }\n  buffer += escapeExpression(stack1)\n    + \"\";\n  if (helper = helpers.message) { stack1 = helper.call(depth0, {hash:{},data:data}); }\n  else { helper = (depth0 && depth0.message); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }\n  if(stack1 || stack1 === 0) { buffer += stack1; }\n  buffer += \"
              • \";\n return buffer;\n }); });\n","\ndefine('tpl!taoQtiTestPreviewer/previewer/plugins/navigation/submit/preview-console-closer', ['handlebars'], function(hb){ return hb.template(function (Handlebars,depth0,helpers,partials,data) {\n this.compilerInfo = [4,'>= 1.0.0'];\nhelpers = this.merge(helpers, Handlebars.helpers); data = data || {};\n var buffer = \"\", helper, options, helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;\n\n\n buffer += \"\";\n return buffer;\n }); });\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2018-2021 (original work) Open Assessment Technologies SA ;\n */\n\n/**\n * Test Previewer Navigation Plugin : Submit\n *\n * @author Jean-Sébastien Conan \n */\ndefine('taoQtiTestPreviewer/previewer/plugins/navigation/submit/submit',[\n 'jquery',\n 'lodash',\n 'i18n',\n 'moment',\n 'ui/hider',\n 'ui/autoscroll',\n 'util/strPad',\n 'taoTests/runner/plugin',\n 'taoQtiItem/qtiCommonRenderer/helpers/PciResponse',\n 'taoQtiItem/runner/rendererStrategies',\n 'tpl!taoQtiTest/runner/plugins/templates/button',\n 'tpl!taoQtiTestPreviewer/previewer/plugins/navigation/submit/preview-console',\n 'tpl!taoQtiTestPreviewer/previewer/plugins/navigation/submit/preview-console-line',\n 'tpl!taoQtiTestPreviewer/previewer/plugins/navigation/submit/preview-console-closer'\n], function (\n $,\n _,\n __,\n moment,\n hider,\n autoscroll,\n strPad,\n pluginFactory,\n pciResponse,\n rendererStrategies,\n buttonTpl,\n consoleTpl,\n consoleLineTpl,\n consoleCloserTpl\n) {\n 'use strict';\n\n /**\n * Some default config for the plugin\n * @type {Object}\n */\n const defaults = {\n submitTitle: __('Submit and show the result'),\n submitText: __('Submit'),\n submitIcon: 'forward'\n };\n\n return pluginFactory({\n\n name: 'submit',\n\n /**\n * Initialize the plugin (called during runner's init)\n */\n init() {\n const testRunner = this.getTestRunner();\n const pluginConfig = _.defaults(this.getConfig(), defaults);\n\n /**\n * Tells if the component is enabled\n * @returns {Boolean}\n */\n const isPluginAllowed = () => {\n const config = testRunner.getConfig();\n return !config.options.readOnly && rendererStrategies(config.options.view).getName() !== 'reviewRenderer';\n };\n\n // display the console and its related controls, then auto scrolls to the last element\n const showConsole = () => {\n hider.show(this.controls.$console);\n hider.show(this.controls.$consoleBody);\n hider.show(this.controls.$consoleCloser);\n autoscroll(this.controls.$consoleBody.children().last(), this.controls.$consoleBody);\n };\n\n // hide the console and its related controls\n const hideConsole = () => {\n hider.hide(this.controls.$console);\n hider.hide(this.controls.$consoleCloser);\n };\n\n // add a line to the console\n const addConsoleLine = (type, message) => {\n const data = {\n time: strPad(moment().format('HH:mm:ss'), 12, ' '),\n type: strPad(type || '', 18, ' '),\n message: strPad(message || '', 18, ' ')\n };\n this.controls.$consoleBody.append($(consoleLineTpl(data)));\n };\n\n // display responses in the console\n const showResponses = (type, responses) => {\n _.forEach(responses, (response, identifier) => {\n addConsoleLine(type, strPad(`${identifier}: `, 15, ' ') + _.escape(pciResponse.prettyPrint(response)));\n });\n };\n\n this.controls = {\n $button: $(buttonTpl({\n control: 'submit',\n title: pluginConfig.submitTitle,\n icon: pluginConfig.submitIcon,\n text: pluginConfig.submitText\n })),\n $console: $(consoleTpl()),\n $consoleCloser: $(consoleCloserTpl())\n };\n this.controls.$consoleBody = this.controls.$console.find('.preview-console-body');\n\n this.controls.$button.on('click', e => {\n e.preventDefault();\n if (this.getState('enabled') !== false) {\n this.disable();\n testRunner.trigger('submititem');\n }\n });\n\n this.controls.$consoleCloser.on('click', e => {\n e.preventDefault();\n hideConsole();\n });\n\n if (!isPluginAllowed()) {\n this.hide();\n }\n\n this.disable();\n\n testRunner\n .on('render', () => {\n if (isPluginAllowed()) {\n this.show();\n } else {\n this.hide();\n }\n })\n .on('submitresponse', responses => {\n showResponses(__('Submitted data'), responses);\n showConsole();\n })\n .on('scoreitem', responses => {\n if (responses.itemSession) {\n showResponses(__('Output data'), responses.itemSession);\n showConsole();\n }\n })\n .on('enablenav', () => {\n this.enable();\n })\n .on('disablenav', () => {\n this.disable();\n });\n },\n\n /**\n * Called during the runner's render phase\n */\n render() {\n //attach the element to the navigation area\n const $container = this.getAreaBroker().getContainer();\n const $navigation = this.getAreaBroker().getNavigationArea();\n $navigation.append(this.controls.$button);\n $navigation.append(this.controls.$consoleCloser);\n $container.append(this.controls.$console);\n },\n\n /**\n * Called during the runner's destroy phase\n */\n destroy() {\n _.forEach(this.controls, $el => $el.remove());\n this.controls = null;\n },\n\n /**\n * Enable the button\n */\n enable() {\n this.controls.$button\n .prop('disabled', false)\n .removeClass('disabled');\n },\n\n /**\n * Disable the button\n */\n disable() {\n this.controls.$button\n .prop('disabled', true)\n .addClass('disabled');\n },\n\n /**\n * Show the button\n */\n show() {\n hider.show(this.controls.$button);\n },\n\n /**\n * Hide the button\n */\n hide() {\n _.forEach(this.controls, hider.hide);\n }\n });\n});\n\n","\ndefine('tpl!taoQtiTestPreviewer/previewer/plugins/tools/scale/component/tpl/devices-previewer', ['handlebars'], function(hb){ return hb.template(function (Handlebars,depth0,helpers,partials,data) {\n this.compilerInfo = [4,'>= 1.0.0'];\nhelpers = this.merge(helpers, Handlebars.helpers); data = data || {};\n var buffer = \"\", stack1, helper, functionType=\"function\", escapeExpression=this.escapeExpression;\n\n\n buffer += \"
                \\n
                \\n
                \\n
                \\n
                \\n
                \\n
                \\n
                \";\n return buffer;\n }); });\n","\ndefine('css!taoQtiTestPreviewer/previewer/plugins/tools/scale/component/css/devicesPreviewer',[],function(){});\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2019 Open Assessment Technologies SA ;\n */\n/**\n * @author Jean-Sébastien Conan \n */\ndefine('taoQtiTestPreviewer/previewer/plugins/tools/scale/component/devicesPreviewer',[\n 'jquery',\n 'lodash',\n 'i18n',\n 'ui/component',\n 'ui/transformer',\n 'tpl!taoQtiTestPreviewer/previewer/plugins/tools/scale/component/tpl/devices-previewer',\n 'css!taoQtiTestPreviewer/previewer/plugins/tools/scale/component/css/devicesPreviewer.css'\n], function ($, _, __, componentFactory, transformer, devicesPreviewerTpl) {\n 'use strict';\n\n /**\n * @typedef {Object} size\n * @property {Number} width\n * @property {Number} height\n */\n\n /**\n * Some default config\n * @type {Object}\n */\n var defaults = {\n deviceType: 'standard',\n deviceWith: 0,\n deviceHeight: 0,\n deviceOrientation: null\n };\n\n /**\n * Builds a devices previewer component. It will works in two modes:\n * - the standard mode will do nothing special, this is simply a sleeping mode\n * - the device mode will redesign the view to show a content using a device's layout and aspect ratio\n *\n * @example\n * var devicesPreviewer = devicesPreviewerFactory('.previewer .previewer-content);\n * ...\n * // react to changes\n * devicesPreviewer\n * .on('devicewidthchange', function(width) {\n * // the width has changed\n * })\n * .on('deviceheightchange', function(height) {\n * // the height has changed\n * })\n * .on('deviceorientationchange', function(orientation) {\n * // the orientation has changed\n * })\n * .on('devicetypechange', function(type) {\n * // the type has changed\n * })\n * .on('devicepreview', function() {\n * // the device preview mode has been applied\n * });\n * ...\n * // apply changes\n * devicesPreviewer\n * .setDeviceType(type)\n * .setDeviceOrientation(orientation)\n * .setDeviceWidth(width)\n * .setDeviceHeight(height)\n * .previewDevice();\n * ...\n *\n * @param {HTMLElement|String} container\n * @param {Object} config\n * @param {String} [config.deviceType='standard'] - The preview mode to apply\n * @param {Number} [config.deviceWidth=null] - The width of the device to preview\n * @param {Number} [config.deviceHeight=null] - The height of the device to preview\n * @param {String} [config.deviceOrientation='landscape'] - The device orientation\n * @returns {devicesPreviewer}\n * @fires ready - When the component is ready to work\n */\n function devicesPreviewerFactory(container, config) {\n var controls = null;\n\n /**\n * Remove the applied scale\n */\n var resetScale = function resetScale() {\n if (controls) {\n controls.$previewContent.removeAttr('style');\n controls.$previewContainer.removeAttr('style');\n }\n };\n\n // component specific API\n var api = {\n /**\n * Gets the device width.\n * @returns {Number}\n */\n getDeviceWidth: function getDeviceWidth() {\n return this.getConfig().deviceWidth;\n },\n\n /**\n * Sets the device width.\n * @param {String|Number} width\n * @returns {devicesPreviewer}\n * @fires devicewidthchange\n */\n setDeviceWidth: function setDeviceWidth(width) {\n var componentConfig = this.getConfig();\n componentConfig.deviceWidth = parseInt(width, 10) || 0;\n\n /**\n * @event devicewidthchange\n * @param {Number} deviceWidth\n */\n this.trigger('devicewidthchange', componentConfig.deviceWidth);\n\n return this;\n },\n\n /**\n * Gets the device height.\n * @returns {Number}\n */\n getDeviceHeight: function getDeviceHeight() {\n return this.getConfig().deviceHeight;\n },\n\n /**\n * Sets the device height.\n * @param {String|Number} height\n * @returns {devicesPreviewer}\n * @fires deviceheightchange\n */\n setDeviceHeight: function setDeviceHeight(height) {\n var componentConfig = this.getConfig();\n componentConfig.deviceHeight = parseInt(height, 10) || 0;\n\n /**\n * @event deviceheightchange\n * @param {Number} deviceHeight\n */\n this.trigger('deviceheightchange', componentConfig.deviceHeight);\n\n return this;\n },\n\n /**\n * Gets the device orientation.\n * @returns {String}\n */\n getDeviceOrientation: function getDeviceOrientation() {\n return this.getConfig().deviceOrientation;\n },\n\n /**\n * Sets the device orientation.\n * @param {String} orientation\n * @returns {devicesPreviewer}\n * @fires deviceorientationchange\n */\n setDeviceOrientation: function setDeviceOrientation(orientation) {\n var componentConfig = this.getConfig();\n componentConfig.deviceOrientation = orientation;\n\n if (this.is('rendered')) {\n // use .attr() instead of .data() to ensure the DOM will be properly updated\n // this is required as CSS must take the relay to control the display\n this.getElement().attr('data-orientation', componentConfig.deviceOrientation);\n }\n\n /**\n * @event deviceorientationchange\n * @param {String} deviceOrientation\n */\n this.trigger('deviceorientationchange', componentConfig.deviceOrientation);\n\n return this;\n },\n\n /**\n * Tells if the previewer has entered in a device mode or in the standard mode.\n * Standard mode means 'actual size'.\n * @returns {Boolean}\n */\n isDeviceMode: function isDeviceMode() {\n return this.getDeviceType() !== 'standard';\n },\n\n /**\n * Gets the device type.\n * @returns {String}\n */\n getDeviceType: function getDeviceType() {\n return this.getConfig().deviceType;\n },\n\n /**\n * Sets the type of device\n * @param {String} type\n * @returns {devicesPreviewer}\n * @fires devicetypechange\n */\n setDeviceType: function setDeviceType(type) {\n var componentConfig = this.getConfig();\n componentConfig.deviceType = type;\n\n if (this.is('rendered')) {\n // use .attr() instead of .data() to ensure the DOM will be properly updated\n // this is required as CSS must take the relay to control the display\n this.getElement().attr('data-type', componentConfig.deviceType);\n }\n\n /**\n * @event devicetypechange\n * @param {String} deviceType\n */\n this.trigger('devicetypechange', componentConfig.deviceType);\n\n return this;\n },\n\n /**\n * Previews the content using the current device settings\n * @returns {devicesPreviewer}\n * @fires devicepreview after the device has been set on preview\n */\n previewDevice: function previewDevice() {\n var width, height;\n\n if (this.is('rendered')) {\n if (this.is('disabled') || this.getDeviceType() === 'standard') {\n // standard mode and disabled state both should be reflected by a \"no scale\" view\n this.clearScale();\n } else {\n // in device preview mode, we need to apply the device's size with respect to the orientation\n if (this.getDeviceOrientation() === 'portrait') {\n width = this.getDeviceHeight();\n height = this.getDeviceWidth();\n } else {\n width = this.getDeviceWidth();\n height = this.getDeviceHeight();\n }\n this.applyScale(width, height);\n }\n\n /**\n * @event devicepreview\n */\n this.trigger('devicepreview');\n }\n\n return this;\n },\n\n /**\n * Removes the scale settings applied on the devices previewer\n * @returns {devicesPreviewer}\n * @fires scaleclear after the scale settings have been cleared\n */\n clearScale: function clearScale() {\n if (this.is('rendered')) {\n resetScale();\n\n /**\n * @event scaleclear\n */\n this.trigger('scaleclear');\n }\n\n return this;\n },\n\n /**\n * Computes and applies the scale settings on the devices previewer\n * @param {Number} width\n * @param {Number} height\n * @returns {devicesPreviewer}\n * * @fires scalechange after the scale settings have been applied\n */\n applyScale: function applyScale(width, height) {\n var frameSize, frameMargins, scaleFactor;\n\n if (this.is('rendered')) {\n resetScale();\n\n frameSize = this.getFrameSize();\n frameMargins = this.getFrameMargins();\n scaleFactor = this.getScaleFactor(width, height);\n\n controls.$previewContent\n .width(width)\n .height(height);\n\n controls.$previewContainer\n .css('left', (frameSize.width - (width + frameMargins.width) * scaleFactor) / 2)\n .width(width + frameMargins.width)\n .height(height + frameMargins.height);\n\n transformer.setTransformOrigin(controls.$previewContainer, 0, 0);\n transformer.scale(controls.$previewContainer, scaleFactor);\n\n /**\n * @event scalechange\n */\n this.trigger('scalechange');\n }\n\n return this;\n },\n\n /**\n * Computes and gets the margins of the previewer frame\n * @returns {size}\n */\n getFrameMargins: function getFrameMargins() {\n var margins = {\n width: 0,\n height: 0\n };\n if (this.is('rendered')) {\n margins.width = controls.$previewContainer.outerWidth() - controls.$previewContent.width();\n margins.height = controls.$previewContainer.outerHeight() - controls.$previewContent.height();\n }\n return margins;\n },\n\n /**\n * Computes and gets the available size in the previewer frame\n * @returns {size}\n */\n getFrameSize: function getFrameSize() {\n var size = {\n width: 0,\n height: 0\n };\n if (this.is('rendered')) {\n size.width = this.getContainer().innerWidth();\n size.height = this.getContainer().innerHeight();\n }\n return size;\n },\n\n /**\n * Computes and gets the scale factor of the previewer frame\n * @param {Number} width\n * @param {Number} height\n * @returns {Number}\n */\n getScaleFactor: function getScaleFactor(width, height) {\n var margins, frameSize;\n var scaleFactor = {\n x: 1,\n y: 1\n };\n if (this.is('rendered') && this.isDeviceMode()) {\n frameSize = this.getFrameSize();\n margins = this.getFrameMargins();\n width += margins.width;\n height += margins.height;\n\n if (width > frameSize.width) {\n scaleFactor.x = frameSize.width / width;\n }\n\n if (height > frameSize.height) {\n scaleFactor.y = frameSize.height / height;\n }\n }\n return Math.min(scaleFactor.x, scaleFactor.y);\n },\n\n /**\n * Wraps the previewed content into the previewer frame\n * @param {HTMLElement|jQuery} element\n * @returns {devicesPreviewer}\n * @fires wrap after the element has been wrapped\n */\n wrap: function wrap(element) {\n if (this.is('rendered')) {\n // restore current wrapped element to its previous place\n this.unwrap();\n\n // move the element to wrap in the preview container\n controls.$wrappedElement = $(element);\n controls.$wrappedElementContainer = controls.$wrappedElement.parent();\n controls.$previewContent.append(controls.$wrappedElement);\n\n /**\n * @event wrap\n * @param {jQuery} $wrappedElement - The element that has been wrapped\n */\n this.trigger('wrap', controls.$wrappedElement);\n }\n\n return this;\n },\n\n /**\n * Unwraps the previewed content from the previewer frame\n * @returns {devicesPreviewer}\n * @fires unwrap after the element has been unwrapped\n */\n unwrap: function unwrap() {\n var $wasWrappedElement;\n if (this.is('rendered') && controls.$wrappedElement) {\n $wasWrappedElement = controls.$wrappedElement;\n\n // restore current wrapped element to its previous place\n controls.$wrappedElementContainer.append(controls.$wrappedElement);\n controls.$wrappedElement = null;\n controls.$wrappedElementContainer = null;\n\n /**\n * @event unwrap\n * @param {jQuery} $wrappedElement - The element that was wrapped\n */\n this.trigger('unwrap', $wasWrappedElement);\n }\n\n return this;\n }\n };\n\n // build and setup the component\n var devicesPreviewer = componentFactory(api, defaults)\n // set the component's layout\n .setTemplate(devicesPreviewerTpl)\n\n // auto render on init\n .on('init', function () {\n var componentConfig = this.getConfig();\n\n // init the internal state\n this.setDeviceType(componentConfig.deviceType);\n this.setDeviceWidth(componentConfig.deviceWidth);\n this.setDeviceHeight(componentConfig.deviceHeight);\n this.setDeviceOrientation(componentConfig.deviceOrientation);\n\n // auto render on init\n _.defer(function () {\n devicesPreviewer.render(container);\n });\n })\n\n // renders the component\n .on('render', function () {\n var $element = this.getElement();\n controls = {\n // internal elements\n $previewContainer: $element.find('.preview-container'),\n $previewFrame: $element.find('.preview-frame'),\n $previewContent: $element.find('.preview-content'),\n\n // placeholder for the wrapped element\n $wrappedElement: null,\n $wrappedElementContainer: null\n };\n\n /**\n * @event ready\n */\n this.trigger('ready');\n })\n\n // take care of the disable state\n .on('disable enable', function () {\n var self = this;\n if (this.is('rendered')) {\n // need to defer the call as the enable/disable events are emitted before the state is updated\n _.defer(function () {\n self.previewDevice();\n });\n }\n })\n\n // cleanup the place\n .on('destroy', function () {\n this.unwrap();\n controls = null;\n });\n\n // initialize the component with the provided config\n // defer the call to allow to listen to the init event\n _.defer(function () {\n devicesPreviewer.init(config);\n });\n\n return devicesPreviewer;\n }\n\n return devicesPreviewerFactory;\n});\n\n","\ndefine('tpl!taoQtiTestPreviewer/previewer/plugins/tools/scale/component/tpl/devices-selector', ['handlebars'], function(hb){ return hb.template(function (Handlebars,depth0,helpers,partials,data) {\n this.compilerInfo = [4,'>= 1.0.0'];\nhelpers = this.merge(helpers, Handlebars.helpers); data = data || {};\n \n\n\n return \"
                \\n
                \\n
                \\n
                \\n
                \\n
                \";\n }); });\n","\ndefine('tpl!taoQtiTestPreviewer/previewer/plugins/tools/scale/component/tpl/selector', ['handlebars'], function(hb){ return hb.template(function (Handlebars,depth0,helpers,partials,data) {\n this.compilerInfo = [4,'>= 1.0.0'];\nhelpers = this.merge(helpers, Handlebars.helpers); data = data || {};\n var buffer = \"\", stack1, helper, functionType=\"function\", escapeExpression=this.escapeExpression, self=this;\n\nfunction program1(depth0,data) {\n \n var buffer = \"\", stack1, helper;\n buffer += \"\\n \\n \";\n return buffer;\n }\nfunction program2(depth0,data) {\n \n \n return \"selected=\\\"selected\\\"\";\n }\n\n buffer += \"\";\n return buffer;\n }); });\n","\ndefine('css!taoQtiTestPreviewer/previewer/plugins/tools/scale/component/css/devicesSelector',[],function(){});\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2019 Open Assessment Technologies SA ;\n */\n/**\n * @author Jean-Sébastien Conan \n */\ndefine('taoQtiTestPreviewer/previewer/plugins/tools/scale/component/devicesSelector',[\n 'jquery',\n 'lodash',\n 'i18n',\n 'ui/component',\n 'ui/selecter',\n 'taoQtiTestPreviewer/previewer/helpers/devices',\n 'tpl!taoQtiTestPreviewer/previewer/plugins/tools/scale/component/tpl/devices-selector',\n 'tpl!taoQtiTestPreviewer/previewer/plugins/tools/scale/component/tpl/selector',\n 'css!taoQtiTestPreviewer/previewer/plugins/tools/scale/component/css/devicesSelector.css'\n], function ($, _, __, componentFactory, lookupSelecter, devicesHelper, devicesSelectorTpl, selectorTpl) {\n 'use strict';\n\n /**\n * @typedef {Object} selectorEntry\n * @property {String} value - The value that identifies the entry\n * @property {String} label - The text displayed to describe the entry\n */\n\n /**\n * @typedef {selectorEntry} mainSelectorEntry\n * @property {Boolean} devicesList - tells if a list of devices is expected\n * @property {Boolean} orientation - tells if a list of orientations is expected\n */\n\n /**\n * Some default config\n * @type {Object}\n */\n var defaults = {\n type: 'standard',\n device: null,\n orientation: 'landscape'\n };\n\n /**\n * List of available types of devices\n * @type {mainSelectorEntry[]}\n */\n var deviceTypesList = [{\n value: 'standard',\n label: __('Actual size'),\n devicesList: false,\n orientation: false\n }, {\n value: 'desktop',\n label: __('Desktop preview'),\n devicesList: true,\n orientation: false\n }, {\n value: 'mobile',\n label: __('Mobile preview'),\n devicesList: true,\n orientation: true\n }];\n\n /**\n * List of available orientations\n * @type {selectorEntry[]}\n */\n var deviceOrientationsList = [{\n value: 'landscape',\n label: __('Landscape')\n }, {\n value: 'portrait',\n label: __('Portrait')\n }];\n\n /**\n * Map selector's names to setter callbacks.\n * This will be used to call the expected setter when selecting a value.\n * @see devicesSelector.select()\n * @type {Object}\n */\n var callbackMap = {\n type: 'setType',\n device: 'setDevice',\n mobile: 'setDevice',\n desktop: 'setDevice',\n orientation: 'setOrientation'\n };\n\n /**\n * Gets the data for a selected entry\n * @param {String} selected\n * @param {selectorEntry[]|deviceScreen[]} list\n * @returns {selectorEntry|deviceScreen|null}\n */\n function getSelectorData(selected, list) {\n if (selected && _.size(list)) {\n return _.find(list, {value: selected}) || null;\n }\n return null;\n }\n\n /**\n * Ensures an identifier is valid with respect to the provided list, or defaulted to null.\n * @param {String} identifier\n * @param {selectorEntry[]} list\n * @returns {String|null}\n */\n function getValidIdentifier(identifier, list) {\n if (list && list.length) {\n if (_.find(list, {value: identifier})) {\n return identifier;\n } else {\n return _.first(list).value;\n }\n }\n return null;\n }\n\n /**\n * Update a Select2 control\n * @param {jQuery} $selector\n * @param {String} value\n * @returns {jQuery}\n */\n function updateSelect2($selector, value) {\n var current = $selector.val();\n // avoid to stress the setters if the value is already set\n if (current !== value) {\n $selector.val(value);\n $selector.trigger('change');\n }\n return $selector;\n }\n\n /**\n * Uninstalls a Select2 control\n * @param {jQuery} $selector\n * @returns {jQuery}\n */\n function removeSelect2($selector) {\n if ($selector.hasClass(\"select2-offscreen\")) {\n $selector.select2('destroy');\n }\n return $selector;\n }\n\n /**\n * Builds a devices selector component. It will provides 3 selectors in cascade:\n * - the first allows to select the type of device\n * - the second allows to select the device itself, the list being filtered by the value of the first selector\n * - the third allows to select the display orientation, if applicable\n *\n * @example\n * var devicesSelector = devicesSelectorFactory('.previewer .previewer-top-bar);\n * ...\n * // react to type change\n * devicesSelector.on('typechange', function(type) {\n * if (!this.isDeviceMode()) {\n * // reset the type to standard, we can re-apply the default size\n * }\n * });\n *\n * // react to device change\n * devicesSelector.on('devicechange', function(device, data) {\n * // apply the size provided in data\n * });\n *\n * // react to orientation change\n * devicesSelector.on('orientationchange', function(orientation) {\n * // apply the orientation\n * });\n *\n * @param {HTMLElement|String} container\n * @param {Object} config\n * @param {String} [config.type='standard'] - The default selected device type\n * @param {String} [config.device=null] - The default selected device\n * @param {String} [config.orientation='landscape'] - The default selected orientation\n * @returns {devicesSelector}\n * @fires ready - When the component is ready to work\n */\n function devicesSelectorFactory(container, config) {\n // internal state\n var selected = {\n type: null,\n device: null,\n orientation: null,\n desktop: null,\n mobile: null\n };\n var devicesList = [];\n var typeData = null;\n var controls = null;\n\n /**\n * Changes a DOM property on each selector\n * @param {String} property\n * @param {String|Boolean|Number} value\n */\n var setControlsProp = function setControlsProp(property, value) {\n _.forEach(controls, function($selector) {\n $selector.prop(property, value);\n });\n };\n\n // component specific API\n var api = {\n /**\n * Tells if the selector has entered in a device mode or in the standard mode.\n * Standard mode means 'actual size'.\n * @returns {Boolean}\n */\n isDeviceMode: function isDeviceMode() {\n return selected.type !== 'standard';\n },\n\n /**\n * Reflects the mode to the DOM\n * @returns {devicesSelector}\n */\n updateMode: function updateMode() {\n // use .attr() instead of .data() to ensure the DOM will be properly updated\n // this is required as CSS must take the relay to control the display\n if (this.is('rendered')) {\n this.getElement().attr('data-type', selected.type);\n }\n return this;\n },\n\n /**\n * Gets the selected device type.\n * @returns {String} The type of device, from the list `['standard', 'mobile', 'desktop']`\n */\n getType: function getType() {\n return selected.type;\n },\n\n /**\n * Gets the selected device orientation.\n * If the current mode is not a device mode (i.e. actual size), null is returned.\n * @returns {String}\n */\n getOrientation: function getOrientation() {\n if (typeData && typeData.orientation) {\n return selected.orientation;\n }\n return null;\n },\n\n /**\n * Gets the identifier of the selected device.\n * If the current mode is not a device mode (i.e. actual size), null is returned.\n * @returns {String|null}\n */\n getDevice: function getDevice() {\n if (typeData && typeData.devicesList) {\n return selected.device;\n }\n return null;\n },\n\n /**\n * Gets the data for the selected device.\n * If the current mode is not a device mode (i.e. actual size), null is returned.\n * @returns {deviceScreen|null}\n */\n getDeviceData: function getDeviceData() {\n return getSelectorData(this.getDevice(), devicesList);\n },\n\n /**\n * Selects a type of device\n * @param {String} identifier\n * @returns {devicesSelector}\n * @fires typechange event after the type has been changed\n * @fires devicechange event after the device has been updated if a list of devices is expected\n */\n setType: function setType(identifier) {\n // validate the identifier before applying the change\n identifier = getValidIdentifier(identifier, deviceTypesList);\n if (identifier !== selected.type) {\n selected.type = identifier;\n selected.device = null;\n\n // when the type changes, the list of devices must be updated\n devicesList = devicesHelper.getDevicesByType(selected.type);\n typeData = getSelectorData(selected.type, deviceTypesList);\n\n // update the rendered content\n if (this.is('rendered')) {\n updateSelect2(controls.$typeSelector, selected.type);\n this.updateMode();\n }\n\n /**\n * @event typechange\n * @param {String} selectedType\n */\n this.trigger('typechange', selected.type);\n\n // the current device must be adapted if a list of devices is expected\n if (typeData.devicesList) {\n this.setDevice(selected[selected.type]);\n }\n }\n return this;\n },\n\n /**\n * Sets the selected device orientation\n * @param {String} identifier\n * @returns {devicesSelector}\n * @fires orientationchange event after the type has been changed\n */\n setOrientation: function setOrientation(identifier) {\n // validate the identifier before applying the change\n identifier = getValidIdentifier(identifier, deviceOrientationsList);\n if (identifier !== selected.orientation) {\n selected.orientation = identifier;\n\n // update the rendered content\n if (this.is('rendered')) {\n updateSelect2(controls.$orientationSelector, selected.orientation);\n }\n\n /**\n * @event orientationchange\n * @param {String} selectedOrientation\n */\n this.trigger('orientationchange', selected.orientation);\n }\n return this;\n },\n\n /**\n * Selects a device\n * @param {String} identifier\n * @returns {devicesSelector}\n * @fires devicechange event after the device has been changed\n */\n setDevice: function setDevice(identifier) {\n var $selector;\n\n // validate the identifier before applying the change\n identifier = getValidIdentifier(identifier, devicesList);\n if (identifier !== selected.device) {\n selected.device = identifier;\n selected[selected.type] = identifier;\n\n // update the rendered content, depending on the device's category\n if (this.is('rendered') && this.isDeviceMode()) {\n $selector = controls['$' + selected.type + 'Selector'];\n if ($selector) {\n updateSelect2($selector, selected.device);\n }\n }\n\n /**\n * @event devicechange\n * @param {String} selectedDevice\n * @param {deviceScreen} deviceData\n */\n this.trigger('devicechange', selected.device, this.getDeviceData());\n }\n return this;\n },\n\n /**\n * Selects a value in the proper selector\n * @param {String} name - The name of the selector\n * @param {String} value - The value to select\n * @returns {devicesSelector}\n */\n select: function select(name, value) {\n var setterName = callbackMap[name];\n if (setterName && _.isFunction(this[setterName])) {\n this[setterName](value);\n }\n return this;\n },\n\n /**\n * Reset to default values, from the config.\n * @returns {devicesSelector}\n */\n reset: function reset() {\n var componentConfig = this.getConfig();\n this.setType(componentConfig.type);\n this.setDevice(componentConfig.device);\n this.setOrientation(componentConfig.orientation);\n return this;\n }\n };\n\n // build and setup the component\n var devicesSelector = componentFactory(api, defaults)\n // set the component's layout\n .setTemplate(devicesSelectorTpl)\n\n // auto render on init\n .on('init', function () {\n // ensure the initial state is aligned with the config\n this.reset();\n\n // auto render on init\n _.defer(function () {\n devicesSelector.render(container);\n });\n })\n\n // renders the component\n .on('render', function () {\n var self = this;\n\n /**\n * Renders a selector from a list of entries. Takes care of the currently selected value.\n * @param {String} name - The name of the selector\n * @param {selectorEntry[]} list - The list of entries\n * @param {String} selectedValue - The currently selected value\n * @param {String} [category=name] - The category of the selector (type, device, orientation).\n * Defaulted to the name if not provided.\n * @returns {jQuery}\n */\n function renderSelector(name, list, selectedValue, category) {\n var $selector = $(selectorTpl({\n name: name,\n category: category || name,\n items: _.map(list, function(item) {\n return {\n value: item.value,\n label: item.label,\n selected: selectedValue === item.value\n };\n })\n }));\n self.getElement().find('.' + name + '-selector').html($selector);\n return $selector;\n }\n\n // create each selector, and keep access to them\n controls = {\n $typeSelector: renderSelector('type', deviceTypesList, selected.type),\n $desktopSelector: renderSelector('desktop', devicesHelper.getDesktopDevices(), selected.device, 'device'),\n $mobileSelector: renderSelector('mobile', devicesHelper.getMobileDevices(), selected.device, 'device'),\n $orientationSelector: renderSelector('orientation', deviceOrientationsList, selected.orientation)\n };\n lookupSelecter(this.getElement());\n\n // react to any change in selectors and then forward the event to the related entry\n this.getElement().on('change', '.selector', function onSelectorChange(e) {\n var $selector = $(e.target).closest('select');\n self.select($selector.attr('name'), $selector.val());\n });\n\n // initialize the display mode\n this.updateMode();\n\n /**\n * @event ready\n */\n this.trigger('ready');\n })\n\n // take care of the disable state\n .on('disable', function () {\n if (this.is('rendered')) {\n setControlsProp(\"disabled\", true);\n }\n })\n .on('enable', function () {\n if (this.is('rendered')) {\n setControlsProp(\"disabled\", false);\n }\n })\n\n // cleanup the place\n .on('destroy', function () {\n _.forEach(controls, removeSelect2);\n controls = null;\n selected = null;\n typeData = null;\n devicesList = null;\n });\n\n // initialize the component with the provided config\n // defer the call to allow to listen to the init event\n _.defer(function () {\n devicesSelector.init(config);\n });\n\n return devicesSelector;\n }\n\n return devicesSelectorFactory;\n});\n\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2019 (original work) Open Assessment Technologies SA ;\n */\n\n/**\n * Test Previewer Responsive Scale plugin : Scale\n */\ndefine('taoQtiTestPreviewer/previewer/plugins/tools/scale/scale',[\n 'jquery',\n 'lodash',\n 'lib/uuid',\n 'util/namespace',\n 'taoTests/runner/plugin',\n 'taoQtiTestPreviewer/previewer/plugins/tools/scale/component/devicesPreviewer',\n 'taoQtiTestPreviewer/previewer/plugins/tools/scale/component/devicesSelector'\n], function (\n $,\n _,\n uuid,\n namespaceHelper,\n pluginFactory,\n devicesPreviewerFactory,\n devicesSelectorFactory\n) {\n 'use strict';\n\n return pluginFactory({\n\n name: 'scale',\n\n /**\n * Initialize the plugin (called during runner's init)\n */\n init: function init() {\n var self = this;\n var testRunner = this.getTestRunner();\n\n /**\n * Tells if the component is enabled\n * @returns {Boolean}\n */\n function isPluginAllowed() {\n var config = testRunner.getConfig();\n return !config.options.readOnly;\n }\n\n // generate unique id for global events\n this.nsId = this.getName() + uuid(6);\n\n if (!isPluginAllowed()) {\n this.hide();\n }\n\n this.disable();\n\n testRunner\n .on('render', function () {\n if (isPluginAllowed()) {\n self.show();\n } else {\n self.hide();\n }\n })\n .on('resizeitem', function (size, orientation, type) {\n if (self.devicesPreviewer) {\n self.devicesPreviewer\n .setDeviceType(type)\n .setDeviceOrientation(orientation)\n .setDeviceWidth(size && size.width)\n .setDeviceHeight(size && size.height)\n .previewDevice();\n }\n })\n .on('enablenav', function () {\n self.enable();\n })\n .on('disablenav', function () {\n self.disable();\n });\n },\n\n /**\n * Called during the runner's render phase\n * Renders plugins controls on proper place\n */\n render: function render() {\n var self = this;\n var testRunner = this.getTestRunner();\n var areaBroker = this.getAreaBroker();\n\n /**\n * Triggers an item resize based on the current selected device\n */\n function resizeItem() {\n if (self.devicesSelector && self.getState('enabled')) {\n /**\n * @event resizeitem\n * @param {deviceScreen} deviceData - The device data, containing width and height\n * @param {String} orientation - The device orientation\n * @param {String} type - The type of device\n */\n testRunner.trigger(\n 'resizeitem',\n self.devicesSelector.getDeviceData(),\n self.devicesSelector.getOrientation(),\n self.devicesSelector.getType()\n );\n }\n }\n\n /**\n * adjust device frame position and size when browser size change\n */\n $(window).on(namespaceHelper.namespaceAll('resize orientationchange', this.nsId), _.throttle(function () {\n if (self.devicesSelector && self.devicesSelector.isDeviceMode()) {\n resizeItem();\n }\n }, 50));\n\n return Promise.all([\n new Promise(function (resolve) {\n self.devicesSelector = devicesSelectorFactory(areaBroker.getHeaderArea())\n .on('ready', function () {\n if (!self.getState('enabled')) {\n this.disable();\n }\n\n this.on('typechange', function () {\n if (!this.isDeviceMode()) {\n resizeItem();\n }\n });\n\n this.on('devicechange orientationchange', function () {\n resizeItem();\n });\n\n resolve();\n });\n }),\n new Promise(function (resolve) {\n self.devicesPreviewer = devicesPreviewerFactory(areaBroker.getArea('contentWrapper'))\n .on('ready', function () {\n this.wrap(areaBroker.getContentArea());\n resolve();\n });\n })\n ]);\n },\n\n /**\n * Called during the runner's destroy phase\n * clears all controls tied to applications DOM\n * detaches the global events\n */\n destroy: function destroy() {\n if (this.nsId) {\n $(window).off('.' + this.nsId);\n }\n if (this.devicesSelector) {\n this.devicesSelector.destroy();\n }\n if (this.devicesPreviewer) {\n this.devicesPreviewer.destroy();\n }\n this.devicesSelector = null;\n this.devicesPreviewer = null;\n },\n\n /**\n * Enable default controls\n */\n enable: function enable() {\n if (this.devicesSelector) {\n this.devicesSelector.enable();\n }\n },\n\n /**\n * Disable default controls\n */\n disable: function disable() {\n if (this.devicesSelector) {\n this.devicesSelector.disable();\n }\n },\n\n /**\n * Show default controls\n */\n show: function show() {\n if (this.devicesSelector) {\n this.devicesSelector.show();\n }\n },\n\n /**\n * Hide default controls\n */\n hide: function hide() {\n if (this.devicesSelector) {\n this.devicesSelector.hide();\n }\n }\n });\n});\n\n","\ndefine('tpl!taoQtiTestPreviewer/previewer/provider/item/tpl/item', ['handlebars'], function(hb){ return hb.template(function (Handlebars,depth0,helpers,partials,data) {\n this.compilerInfo = [4,'>= 1.0.0'];\nhelpers = this.merge(helpers, Handlebars.helpers); data = data || {};\n \n\n\n return \"
                \\n
                \\n
                \\n
                \\n
                \\n
                  \\n
                  \\n
                  \\n
                  \\n\\n
                  \\n\\n \\n\\n
                  \\n
                  \\n
                  \\n
                  \\n\\n \\n\\n
                  \";\n }); });\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2018-2024 (original work) Open Assessment Technologies SA ;\n */\n\n/**\n * Test runner provider for the QTI item previewer\n *\n * @author Jean-Sébastien Conan \n */\ndefine('taoQtiTestPreviewer/previewer/provider/item/item',[\n 'jquery',\n 'lodash',\n 'i18n',\n 'ui/feedback',\n 'taoTests/runner/areaBroker',\n 'taoTests/runner/testStore',\n 'taoTests/runner/proxy',\n 'taoQtiTest/runner/ui/toolbox/toolbox',\n 'taoQtiItem/runner/qtiItemRunner',\n 'taoQtiTest/runner/config/assetManager',\n 'taoItems/assets/strategies',\n 'taoQtiItem/qtiCommonRenderer/helpers/container',\n 'tpl!taoQtiTestPreviewer/previewer/provider/item/tpl/item'\n], function (\n $,\n _,\n __,\n feedback,\n areaBrokerFactory,\n testStoreFactory,\n proxyFactory,\n toolboxFactory,\n qtiItemRunner,\n assetManagerFactory,\n assetStrategies,\n containerHelper,\n layoutTpl\n) {\n 'use strict';\n\n //the asset strategies\n const assetManager = assetManagerFactory();\n assetManager.prependStrategy(assetStrategies.taomedia);\n\n //store the current execution context of the common renderer (preview)\n let _$previousContext = null;\n function setContext($context) {\n _$previousContext = containerHelper.getContext();\n containerHelper.setContext($context);\n }\n function restoreContext() {\n containerHelper.setContext(_$previousContext);\n _$previousContext = null;\n }\n /**\n * A Test runner provider to be registered against the runner\n */\n return {\n //provider name\n name: 'qtiItemPreviewer',\n\n /**\n * Initialize and load the area broker with a correct mapping\n * @returns {areaBroker}\n */\n loadAreaBroker() {\n const $layout = $(layoutTpl());\n\n return areaBrokerFactory($layout, {\n contentWrapper: $('.content-wrapper', $layout),\n content: $('#qti-content', $layout),\n toolbox: $('.bottom-action-bar .tools-box', $layout),\n navigation: $('.bottom-action-bar .navi-box-list', $layout),\n control: $('.top-action-bar .control-box', $layout),\n actionsBar: $('.bottom-action-bar .control-box', $layout),\n panel: $('.test-sidebar-left', $layout),\n header: $('.top-action-bar .tools-box', $layout),\n context: $('.top-action-bar .navi-box-list', $layout)\n });\n },\n\n /**\n * Initialize and load the test runner proxy\n * @returns {proxy}\n */\n loadProxy() {\n const { proxyProvider, serviceCallId, bootstrap, timeout } = this.getConfig();\n return proxyFactory(proxyProvider || 'qtiItemPreviewerProxy', { serviceCallId, bootstrap, timeout });\n },\n\n /**\n * Initialize and load the test store\n * @returns {testStore}\n */\n loadTestStore() {\n const config = this.getConfig();\n\n //the test run needs to be identified uniquely\n const identifier = config.serviceCallId || `test-${Date.now()}`;\n return testStoreFactory(identifier);\n },\n\n /**\n * Installation of the provider, called during test runner init phase.\n */\n install() {\n const { plugins } = this.getConfig().options;\n if (plugins) {\n _.forEach(this.getPlugins(), plugin => {\n if (_.isPlainObject(plugin) && _.isFunction(plugin.setConfig)) {\n const config = plugins[plugin.getName()];\n if (_.isPlainObject(config)) {\n plugin.setConfig(config);\n }\n }\n });\n }\n },\n\n /**\n * Initialization of the provider, called during test runner init phase.\n *\n * We install behaviors during this phase (ie. even handlers)\n * and we call proxy.init.\n *\n * @this {runner} the runner context, not the provider\n * @returns {Promise} to chain proxy.init\n */\n init() {\n const dataHolder = this.getDataHolder();\n const areaBroker = this.getAreaBroker();\n\n areaBroker.setComponent('toolbox', toolboxFactory());\n areaBroker.getToolbox().init();\n\n /*\n * Install behavior on events\n */\n this.on('submititem', () => {\n const itemState = this.itemRunner.getState();\n const itemResponses = this.itemRunner.getResponses();\n\n this.trigger('disabletools disablenav');\n this.trigger('submitresponse', itemResponses, itemState);\n\n return this.getProxy()\n .submitItem(dataHolder.get('itemIdentifier'), itemState, itemResponses)\n .then(response => {\n this.trigger('scoreitem', response);\n this.trigger('enabletools enablenav resumeitem');\n })\n .catch(err => {\n this.trigger('enabletools enablenav');\n\n //some server errors are valid, so we don't fail (prevent empty responses)\n if (err.code === 200) {\n this.trigger(\n 'alert.submitError',\n err.message || __('An error occurred during results submission. Please retry.'),\n () => this.trigger('resumeitem')\n );\n }\n });\n })\n .on('ready', () => {\n const itemIdentifier = dataHolder.get('itemIdentifier');\n const itemData = dataHolder.get('itemData');\n\n if (itemIdentifier) {\n if (itemData) {\n this.renderItem(itemIdentifier, itemData);\n } else {\n this.loadItem(itemIdentifier);\n }\n }\n })\n .on('loaditem', (itemRef, itemData) => {\n dataHolder.set('itemIdentifier', itemRef);\n dataHolder.set('itemData', itemData);\n })\n .on('renderitem', () => {\n this.trigger('enabletools enablenav');\n })\n .on('resumeitem', () => {\n this.trigger('enableitem enablenav');\n })\n .on('disableitem', () => {\n this.trigger('disabletools');\n })\n .on('enableitem', () => {\n this.trigger('enabletools');\n })\n .on('error', () => {\n this.trigger('disabletools enablenav');\n })\n .on('finish leave', () => {\n this.trigger('disablenav disabletools');\n this.flush();\n })\n .on('flush', () => {\n this.destroy();\n });\n\n return this.getProxy()\n .init()\n .then(data => {\n dataHolder.set('itemIdentifier', data.itemIdentifier);\n dataHolder.set('itemData', data.itemData);\n });\n },\n\n /**\n * Rendering phase of the test runner\n *\n * Attach the test runner to the DOM\n *\n * @this {runner} the runner context, not the provider\n */\n render() {\n const config = this.getConfig();\n const areaBroker = this.getAreaBroker();\n\n config.renderTo.append(areaBroker.getContainer());\n\n if (config.options.view) {\n areaBroker.getContainer().addClass(`view-${config.options.view}`);\n }\n\n areaBroker.getToolbox().render(areaBroker.getToolboxArea());\n },\n\n /**\n * LoadItem phase of the test runner\n *\n * We call the proxy in order to get the item data\n *\n * @this {runner} the runner context, not the provider\n * @param {String} itemIdentifier - The identifier of the item to update\n * @returns {Promise} that calls in parallel the state and the item data\n */\n loadItem(itemIdentifier) {\n return this.getProxy().getItem(itemIdentifier);\n },\n\n /**\n * RenderItem phase of the test runner\n *\n * Here we initialize the item runner and wrap it's call to the test runner\n *\n * @this {runner} the runner context, not the provider\n * @param {String} itemIdentifier - The identifier of the item to update\n * @param {Object} itemData - The definition data of the item\n * @returns {Promise} resolves when the item is ready\n */\n renderItem(itemIdentifier, itemData) {\n const areaBroker = this.getAreaBroker();\n const options = this.getConfig().options;\n\n const changeState = () => {\n this.setItemState(itemIdentifier, 'changed', true);\n };\n\n setContext(areaBroker.getContentArea());\n\n return new Promise((resolve, reject) => {\n itemData.content = itemData.content || {};\n\n assetManager.setData('baseUrl', itemData.baseUrl);\n assetManager.setData('assets', itemData.content.assets);\n\n this.itemRunner = qtiItemRunner(\n itemData.content.type,\n itemData.content.data,\n Object.assign(\n {\n assetManager: assetManager\n },\n options\n )\n )\n .on('error', err => {\n this.trigger('enablenav');\n reject(err);\n feedback().error(\n __('It seems that there is an error during item preview loading. Please, try again.')\n );\n })\n .on('init', function onItemRunnerInit() {\n const { state, portableElements } = itemData;\n this.render(areaBroker.getContentArea(), { state, portableElements });\n })\n .on('render', function onItemRunnerRender() {\n this.on('responsechange', changeState);\n this.on('statechange', changeState);\n resolve();\n })\n .init();\n });\n },\n\n /**\n * UnloadItem phase of the test runner\n *\n * Item clean up\n *\n * @this {runner} the runner context, not the provider\n * @returns {Promise} resolves when the item is cleared\n */\n unloadItem() {\n this.trigger('beforeunloaditem disablenav disabletools');\n\n if (this.itemRunner) {\n return new Promise(resolve => {\n this.itemRunner.on('clear', resolve).clear();\n });\n }\n return Promise.resolve();\n },\n\n /**\n * Destroy phase of the test runner\n *\n * Clean up\n *\n * @this {runner} the runner context, not the provider\n */\n destroy() {\n const areaBroker = this.getAreaBroker();\n\n // prevent the item to be displayed while test runner is destroying\n if (this.itemRunner) {\n this.itemRunner.on('clear', restoreContext).clear();\n }\n this.itemRunner = null;\n\n if (areaBroker) {\n areaBroker.getToolbox().destroy();\n }\n }\n };\n});\n\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2021 (original work) Open Assessment Technologies SA ;\n */\ndefine('taoQtiTestPreviewer/previewer/proxy/itemDataHandlers',[\n 'module',\n 'context',\n 'lodash',\n 'core/moduleLoader'\n], function (module, context, _, moduleLoader) {\n 'use strict';\n\n const moduleConfig = module.config();\n let handlers = [];\n if (moduleConfig.handlers) {\n /*\n * This loads all the modules from module configuration, which are in the `handlers` array.\n */\n moduleLoader({}, _.isFunction)\n .addList(moduleConfig.handlers)\n .load(context.bundle)\n .then(data => (handlers = data));\n }\n\n return function itemDataHandlers(itemData) {\n if (!handlers.length) {\n return Promise.resolve(itemData);\n } if (handlers.length === 1) {\n return handlers[0](itemData);\n } else {\n return handlers.reduce(function(prev, cur) {\n return prev.then(updateItemData => cur(updateItemData)).catch(cur().reject);\n }, handlers[0](itemData));\n }\n };\n});\n\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2018-2022 (original work) Open Assessment Technologies SA ;\n */\n\n/**\n * Test runner proxy for the QTI item previewer\n *\n * @author Jean-Sébastien Conan \n */\ndefine('taoQtiTestPreviewer/previewer/proxy/item',[\n 'lodash',\n 'core/promiseQueue',\n 'core/request',\n 'taoQtiTestPreviewer/previewer/config/item',\n 'taoQtiTestPreviewer/previewer/proxy/itemDataHandlers'\n], function (_, promiseQueue, coreRequest, configFactory, itemDataHandlers) {\n 'use strict';\n\n /**\n * QTI proxy definition\n * Related to remote services calls\n * @type {Object}\n */\n return {\n name: 'qtiItemPreviewerProxy',\n\n /**\n * Installs the proxy\n */\n install() {\n /**\n * A promise queue to ensure requests run sequentially\n */\n this.queue = promiseQueue();\n\n /**\n * Some parameters needs special handling...\n * @param {Object} actionParams - the input parameters\n * @returns {Object} output parameters\n */\n this.prepareParams = function prepareParams(actionParams) {\n //some parameters need to be JSON.stringified\n const stringifyParams = ['itemState', 'itemResponse'];\n\n if (_.isPlainObject(actionParams)) {\n return _.mapValues(actionParams, (value, key) => {\n if (_.includes(stringifyParams, key)) {\n return JSON.stringify(value);\n }\n return value;\n });\n }\n\n return actionParams;\n };\n\n /**\n * Proxy request function. Returns a promise\n * Applied options: asynchronous call, JSON data, no cache\n * @param {String} url\n * @param {Object} [reqParams]\n * @param {String} [contentType] - to force the content type\n * @param {Boolean} [noToken] - to disable the token\n * @returns {Promise}\n */\n this.request = function request(url, reqParams, contentType, noToken) {\n return coreRequest({\n url: url,\n data: this.prepareParams(reqParams),\n method: reqParams ? 'POST' : 'GET',\n contentType: contentType,\n noToken: noToken,\n background: false,\n sequential: true,\n timeout: this.configStorage.getTimeout()\n })\n .then(response => {\n this.setOnline();\n\n if (response && response.success) {\n return Promise.resolve(response);\n } else {\n return Promise.reject(response);\n }\n })\n .catch(error => {\n if (error.data && this.isConnectivityError(error.data)) {\n this.setOffline('request');\n }\n return Promise.reject(error);\n });\n };\n },\n\n /**\n * Initializes the proxy\n * @param {Object} config - The config provided to the proxy factory\n * @param {String} config.testDefinition - The URI of the test\n * @param {String} config.testCompilation - The URI of the compiled delivery\n * @param {String} config.serviceCallId - The URI of the service call\n * @param {Object} [params] - Some optional parameters to join to the call\n * @returns {Promise} - Returns a promise. The proxy will be fully initialized on resolve.\n * Any error will be provided if rejected.\n */\n init(config, params) {\n // store config in a dedicated configStorage\n this.configStorage = configFactory(config || {});\n\n // request for initialization\n return this.request(this.configStorage.getTestActionUrl('init'), params, void 0, true);\n },\n\n /**\n * Uninstalls the proxy\n * @returns {Promise} - Returns a promise. The proxy will be fully uninstalled on resolve.\n * Any error will be provided if rejected.\n */\n destroy() {\n // no request, just a resources cleaning\n this.configStorage = null;\n this.queue = null;\n\n // the method must return a promise\n return Promise.resolve();\n },\n\n /**\n * Calls an action related to the test\n * @param {String} action - The name of the action to call\n * @param {Object} [params] - Some optional parameters to join to the call\n * @returns {Promise} - Returns a promise. The result of the request will be provided on resolve.\n * Any error will be provided if rejected.\n */\n callTestAction(action, params) {\n return this.request(this.configStorage.getTestActionUrl(action), params, void 0, true);\n },\n\n /**\n * Calls an action related to a particular item\n * @param {String} itemIdentifier - The identifier of the item for which call the action\n * @param {String} action - The name of the action to call\n * @param {Object} [params] - Some optional parameters to join to the call\n * @returns {Promise} - Returns a promise. The result of the request will be provided on resolve.\n * Any error will be provided if rejected.\n */\n callItemAction(itemIdentifier, action, params) {\n return this.request(this.configStorage.getItemActionUrl(itemIdentifier, action), params, void 0, true);\n },\n\n /**\n * Gets an item definition by its identifier, also gets its current state\n * @param {String} itemIdentifier - The identifier of the item to get\n * @param {Object} [params] - additional parameters\n * @returns {Promise} - Returns a promise. The item data will be provided on resolve.\n * Any error will be provided if rejected.\n */\n getItem(itemIdentifier, params) {\n return this.request(\n this.configStorage.getItemActionUrl(itemIdentifier, 'getItem'),\n params,\n void 0,\n true\n ).then(itemData => itemDataHandlers(itemData));\n },\n\n /**\n * Submits the state and the response of a particular item\n * @param {String} itemIdentifier - The identifier of the item to update\n * @param {Object} state - The state to submit\n * @param {Object} response - The response object to submit\n * @param {Object} [params] - Some optional parameters to join to the call\n * @returns {Promise} - Returns a promise. The result of the request will be provided on resolve.\n * Any error will be provided if rejected.\n */\n submitItem(itemIdentifier, state, response, params) {\n const body = _.merge(\n {\n itemState: state,\n itemResponse: response\n },\n params || {}\n );\n\n return this.request(this.configStorage.getItemActionUrl(itemIdentifier, 'submitItem'), body, void 0, true);\n }\n };\n});\n\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2020-2022 (original work) Open Assessment Technologies SA ;\n */\n\n/**\n * Test runner proxy for the QTI test previewer\n *\n * @author Hanna Dzmitryieva \n */\ndefine('taoQtiTestPreviewer/previewer/proxy/test',[\n 'core/promiseQueue',\n 'core/request',\n 'util/url',\n 'taoQtiTest/runner/helpers/map',\n 'taoQtiTestPreviewer/previewer/proxy/itemDataHandlers'\n], function (promiseQueue, request, urlUtil, mapHelper, itemDataHandlers) {\n 'use strict';\n\n const serviceControllerInit = 'TestPreviewer';\n const serviceControllerGetItem = 'Previewer';\n\n const serviceExtension = 'taoQtiTestPreviewer';\n\n /**\n * The possible states of the test session,\n * coming from the test context\n * (this state comes from the backend)\n */\n const testSessionStates = Object.freeze({\n initial: 0,\n interacting: 1,\n modalFeedback: 2,\n suspended: 3,\n closed: 4\n });\n /**\n * The possible states of an item session,\n * coming from the test context\n * (this state comes from the backend)\n */\n const itemSessionStates = Object.freeze({\n initial: 0,\n interacting: 1,\n modalFeedback: 2,\n suspended: 3,\n closed: 4,\n solution: 5,\n review: 6\n });\n\n /**\n * Updates testContext with item data\n * @param {Object} testMap\n * @param {Number} position - item position\n * @param {Object} testContext\n * @param {Array} presetMap\n */\n function updateTestContextWithItem(testMap, position, testContext, presetMap) {\n const jump = mapHelper.getJump(testMap, position);\n const item = mapHelper.getItemAt(testMap, position);\n if (!item) {\n return;\n }\n testContext.testPartId = jump.part;\n testContext.sectionId = jump.section;\n testContext.itemIdentifier = jump.identifier;\n testContext.itemSessionState = itemSessionStates.initial;\n testContext.options = createContextOptions(item, presetMap);\n testContext.allowSkipping = item.allowSkipping;\n }\n\n /**\n * Convert preset categories to context.options\n * @param {Object} item\n * @param {Array} presetMap\n * @returns {Object} options\n */\n function createContextOptions(item, presetMap) {\n const options = {};\n presetMap.forEach(category => {\n const pluginId = Object.keys(category)[0];\n const categoryId = category[pluginId];\n if (item.categories.includes(categoryId)) {\n options[pluginId] = true;\n }\n });\n return options;\n }\n\n /**\n * QTI proxy definition\n * Related to remote services calls\n * @type {Object}\n */\n return {\n name: 'qtiTestPreviewerProxy',\n\n /**\n * Installs the proxy\n */\n install() {\n /**\n * A promise queue to ensure requests run sequentially\n */\n this.queue = promiseQueue();\n },\n /**\n * Initializes the proxy\n * @param {Object} configs - configuration from proxy\n * @param {String} configs.options.testUri - The identifier of the test\n * @returns {Promise} - Returns a promise. The proxy will be fully initialized on resolve.\n * Any error will be provided if rejected.\n */\n init(configs) {\n this.itemStore = {};\n return request({\n url: urlUtil.route('init', serviceControllerInit, serviceExtension),\n data: { testUri: configs.options.testUri },\n noToken: true\n }).then(response => {\n const data = response.data;\n //the received map is not complete and should be \"built\"\n this.builtTestMap = mapHelper.reindex(data.testMap);\n this.presetMap = data.presetMap || [];\n delete data.presetMap;\n const firstJump = this.builtTestMap.jumps[0] || {};\n const firstItem = mapHelper.getItemAt(this.builtTestMap, 0);\n data.testContext = {\n itemIdentifier: firstJump.identifier,\n itemPosition: 0,\n itemSessionState: 0,\n testPartId: firstJump.part,\n sectionId: firstJump.section,\n canMoveBackward: true,\n state: testSessionStates.interacting,\n attempt: 1,\n options: createContextOptions(firstItem, this.presetMap),\n allowSkipping: firstItem.allowSkipping\n };\n return data;\n });\n },\n\n /**\n * Uninstalls the proxy\n * @returns {Promise} - Returns a promise. The proxy will be fully uninstalled on resolve.\n * Any error will be provided if rejected.\n */\n destroy() {\n // no request, just a resources cleaning\n this.queue = null;\n\n if (this.itemStore) {\n this.itemStore = null;\n }\n\n // the method must return a promise\n return Promise.resolve();\n },\n\n /**\n * Gets an item definition by its URI, also gets its current state\n * @param {String} itemIdentifier - The URI of the item to get\n * @returns {Promise} - Returns a promise. The item data will be provided on resolve.\n * Any error will be provided if rejected.\n */\n getItem(itemIdentifier) {\n if (itemIdentifier in this.itemStore) {\n // Load item from store\n return Promise.resolve(this.itemStore[itemIdentifier]);\n } else {\n // Load from server; Store in store\n const { uri } = mapHelper.getItem(this.builtTestMap, itemIdentifier) || {};\n if (!uri) {\n throw new Error(`There is no item ${itemIdentifier} in the testMap!`);\n }\n return request({\n url: urlUtil.route('getItem', serviceControllerGetItem, serviceExtension),\n data: { serviceCallId: 'previewer', itemUri: uri },\n noToken: true\n })\n .then(data => {\n data.itemData = data.content;\n data.itemIdentifier = data.content.data.identifier;\n data.itemState = {};\n this.itemStore[itemIdentifier] = data;\n return data;\n })\n .then(itemData => itemDataHandlers(itemData));\n }\n },\n\n /**\n * Call action on the test\n * @param {string} itemIdentifier - the current item\n * @param {string} action - the action id\n * @param {Object} params\n * @returns {Promise} resolves with the response\n */\n callItemAction(itemIdentifier, action, params = {}) {\n const dataHolder = this.getDataHolder();\n const testContext = dataHolder.get('testContext');\n const testMap = dataHolder.get('testMap');\n const actions = {\n //simulate backend move action\n move: () => {\n if (params.direction === 'next' || action === 'skip') {\n if (params.scope === 'testPart') {\n const testPartPosition = testMap.parts[testContext.testPartId].position;\n const nextPartsSorted = Object.values(testMap.parts)\n .filter(p => p.position > testPartPosition)\n .sort((a, b) => a.position - b.position);\n if (nextPartsSorted.length === 0) {\n testContext.state = testSessionStates.closed;\n } else {\n testContext.itemPosition = Math.min(\n testMap.stats.total - 1,\n nextPartsSorted[0].position\n );\n }\n } else {\n if (testContext.itemPosition + 1 >= testMap.stats.total) {\n testContext.state = testSessionStates.closed;\n } else {\n testContext.itemPosition = Math.min(\n testMap.stats.total - 1,\n testContext.itemPosition + 1\n );\n }\n }\n }\n if (params.direction === 'previous') {\n testContext.itemPosition = Math.max(0, testContext.itemPosition - 1);\n }\n if (params.direction === 'jump' && params.ref >= 0) {\n testContext.itemPosition = params.ref;\n }\n\n updateTestContextWithItem(testMap, testContext.itemPosition, testContext, this.presetMap);\n\n return { testContext, testMap };\n },\n\n flagItem: () => Promise.resolve()\n };\n actions.skip = actions.move;\n\n if (params.itemState) {\n // store itemState in itemStore\n this.itemStore[itemIdentifier].itemState = params.itemState;\n }\n\n if (typeof actions[action] === 'function') {\n return actions[action]();\n }\n },\n\n /**\n * Calls an action related to the test\n * @returns {Promise} - Returns a promise. The result of the request will be provided on resolve.\n * Any error will be provided if rejected.\n */\n callTestAction() {\n // the method must return a promise\n return Promise.resolve();\n }\n };\n});\n\n","\ndefine('tpl!taoQtiTestPreviewer/previewer/component/test/tpl/qtiTest', ['handlebars'], function(hb){ return hb.template(function (Handlebars,depth0,helpers,partials,data) {\n this.compilerInfo = [4,'>= 1.0.0'];\nhelpers = this.merge(helpers, Handlebars.helpers); data = data || {};\n var buffer = \"\", helper, options, helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;\n\n\n buffer += \"\";\n return buffer;\n }); });\n","\ndefine('css!taoQtiTestPreviewer/previewer/component/test/css/qtiTest',[],function(){});\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2020 (original work) Open Assessment Technologies SA ;\n */\n/**\n * @author Hanna Dzmitryieva \n */\ndefine('taoQtiTestPreviewer/previewer/component/test/qtiTest',[\n 'context',\n 'lodash',\n 'layout/loading-bar',\n 'taoTests/runner/runnerComponent',\n 'taoQtiTest/runner/config/assetManager',\n 'taoItems/assets/strategies',\n 'tpl!taoQtiTestPreviewer/previewer/component/test/tpl/qtiTest',\n 'css!taoQtiTestPreviewer/previewer/component/test/css/qtiTest',\n 'css!taoQtiTestCss/new-test-runner'\n], function (context, __, loadingBar, runnerComponentFactory, assetManagerFactory, assetStrategies, runnerTpl) {\n 'use strict';\n\n /**\n * Builds a test runner to preview test\n * @param {jQuery|HTMLElement|String} container - The container in which renders the component\n * @param {Object} [config] - The testRunner options\n *\n * @returns {runner}\n */\n return function qtiTestPreviewerFactory(container, config = {}) {\n const testRunnerConfig = __.defaults(\n {\n testDefinition: 'test-container',\n serviceCallId: 'previewer',\n proxyProvider: 'qtiTestPreviewerProxy',\n loadFromBundle: !!context.bundle,\n },\n config\n );\n\n testRunnerConfig.providers.proxy = [{\n id: 'qtiTestPreviewerProxy',\n module: 'taoQtiTestPreviewer/previewer/proxy/test',\n bundle: 'taoQtiTestPreviewer/loader/qtiPreviewer.min',\n category: 'proxy'\n }];\n\n //the asset manager should support taomedia strategy\n const assetManager = assetManagerFactory(testRunnerConfig.serviceCallId);\n assetManager.prependStrategy(assetStrategies.taomedia);\n\n return runnerComponentFactory(container, testRunnerConfig, runnerTpl)\n .on('render', function() {\n const { fullPage, readOnly, hideActionBars } = this.getConfig().options;\n this.setState('fullpage', fullPage);\n this.setState('readonly', readOnly);\n this.setState('hideactionbars', hideActionBars);\n })\n .on('ready', function(runner) {\n runner.on('destroy', () => {\n // stop loading bar - started in plugin loading\n loadingBar.stop();\n this.destroy();\n });\n });\n };\n});\n\n","/**\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; under version 2\n * of the License (non-upgradable).\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n * Copyright (c) 2020 (original work) Open Assessment Technologies SA ;\n */\n/**\n * @author Hanna Dzmitryieva \n */\ndefine('taoQtiTestPreviewer/previewer/adapter/test/qtiTest',[\n 'lodash',\n 'core/promiseQueue',\n 'core/request',\n 'util/url',\n 'core/logger',\n 'taoQtiTestPreviewer/previewer/component/test/qtiTest',\n 'ui/feedback',\n 'taoQtiTestPreviewer/previewer/component/topBlock/topBlock',\n], function (\n _,\n promiseQueue,\n request,\n urlUtil,\n loggerFactory,\n qtiTestPreviewerFactory,\n feedback,\n topBlockFactory\n) {\n 'use strict';\n\n const taoExtension = 'taoQtiTestPreviewer';\n\n const testPreviewerController = 'TestPreviewer';\n\n const logger = loggerFactory('taoQtiTestPreviewer/previewer');\n\n /**\n * List of required plugins that should be loaded in order to make the previewer work properly\n * @type {Object[]}\n */\n const defaultPlugins = [\n {\n module: 'taoQtiTestPreviewer/previewer/plugins/content/cloneLogoInTestPreview',\n bundle: 'taoQtiTestPreviewer/loader/qtiPreviewer.min',\n category: 'content'\n }\n ];\n\n const transformConfiguration = config => {\n const plugins = Array.isArray(config.plugins) ? [...defaultPlugins, ...config.plugins] : defaultPlugins;\n const { view, readOnly, fullPage, hideActionBars, pluginsOptions } = config;\n const options = _.omit({ view, readOnly, fullPage, hideActionBars }, _.isUndefined);\n\n return request({\n url: urlUtil.route('configuration', testPreviewerController, taoExtension),\n noToken: true\n }).then(response => {\n const configuration = response.data;\n\n configuration.providers.plugins = [...configuration.providers.plugins, ...plugins];\n\n _.assign(configuration.options, options);\n\n if (pluginsOptions) {\n if (!configuration.options.plugins) {\n configuration.options.plugins = {};\n }\n _.assign(configuration.options.plugins, pluginsOptions);\n }\n\n return configuration;\n });\n };\n\n /**\n * Wraps the test previewer in order to be loaded by the taoItems previewer factory\n */\n return {\n name: 'qtiTest',\n\n install() {\n this.queue = promiseQueue();\n },\n\n /**\n * Builds and shows the test previewer\n *\n * @param {String} testUri - The URI of the test to load\n * @param {Object} [config] - Some config entries\n * @param {Object[]} [config.plugins] - Additional plugins to load\n * @param {String} [config.fullPage] - Force the previewer to occupy the full window.\n * @param {String} [config.readOnly] - Do not allow to modify the previewed item.\n * @returns {Object}\n */\n init(testUri, config = {}) {\n return transformConfiguration(config).then(testPreviewConfig => {\n testPreviewConfig.options.testUri = testUri;\n let topBlock = null;\n const previewComponent = qtiTestPreviewerFactory(window.document.body, testPreviewConfig)\n .on('ready', function (runner) {\n topBlock = topBlockFactory(\n window.document.body,\n {\n isTest: testPreviewConfig.options.review.scope === 'test',\n title: runner.getTestMap().title,\n onClose: () => {\n runner.trigger('exit');\n }\n });\n })\n .on('error', function (err) {\n if (topBlock){\n topBlock.destroy();\n topBlock = null;\n }\n if (!_.isUndefined(err.message)) {\n feedback().error(err.message);\n }\n logger.error(err);\n })\n .on('destroy', () => {\n if (topBlock){\n topBlock.destroy();\n topBlock = null;\n }\n });\n return previewComponent;\n });\n },\n\n destroy() {\n this.queue = null;\n\n return Promise.resolve();\n },\n };\n});\n\n","\n(function(c){var d=document,a='appendChild',i='styleSheet',s=d.createElement('style');s.type='text/css';d.getElementsByTagName('head')[0][a](s);s[i]?s[i].cssText=c:s[a](d.createTextNode(c));})\n('.previewer,.previewer-component{position:relative}.item-previewer-scope{position:relative;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.item-previewer-scope.view-viewer .action-bar{display:none}.item-previewer-scope:not(.view-viewer){height:calc(100vh - 0px)}.item-previewer-scope:not(.view-viewer) .test-sidebar{height:calc(100vh - 80px)}.item-previewer-scope .test-runner-sections{-webkit-flex:1 1 0%;-ms-flex:1 1 0%;flex:1 1 0%;overflow:hidden;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}.item-previewer-scope .test-sidebar{background:#f3f1ef;-webkit-flex:0 1 auto;-ms-flex:0 1 auto;flex:0 1 auto;overflow-y:auto;max-width:350px}.item-previewer-scope .test-sidebar>.qti-panel{max-width:350px;padding:10px}@media only screen and (max-device-width: 800px){.item-previewer-scope .test-sidebar{max-width:200px}.item-previewer-scope .test-sidebar>.qti-panel{max-width:200px}}@media only screen and (min-device-width: 800px)and (max-device-width: 1280px){.item-previewer-scope .test-sidebar{max-width:250px}.item-previewer-scope .test-sidebar>.qti-panel{max-width:250px}}@media only screen and (min-device-width: 1280px)and (max-device-width: 1440px){.item-previewer-scope .test-sidebar{max-width:300px}.item-previewer-scope .test-sidebar>.qti-panel{max-width:300px}}.item-previewer-scope .test-sidebar-left{border-right:1px #ddd solid}.item-previewer-scope .test-sidebar-right{border-left:1px #ddd solid}.item-previewer-scope .content-wrapper{position:relative;-webkit-flex:1 1 0%;-ms-flex:1 1 0%;flex:1 1 0%;overflow:auto;padding:0}.item-previewer-scope .content-wrapper .overlay{position:absolute;left:0;right:0;top:0;bottom:0;width:100%;opacity:.9}.item-previewer-scope .content-wrapper .overlay-full{background-color:#fff;opacity:1}.item-previewer-scope #qti-content{-webkit-overflow-scrolling:touch;max-width:1024px;width:100%;margin:auto}.item-previewer-scope #qti-item{width:100%;min-width:100%;height:auto;overflow:visible}.item-previewer-scope .qti-item{padding:30px}.item-previewer-scope .size-wrapper{max-width:1280px;margin:auto;width:100%;padding-right:40px}.item-previewer-scope #qti-rubrics{margin:auto;max-width:1024px;width:100%}.item-previewer-scope #qti-rubrics .qti-rubricBlock{margin:20px 0}.item-previewer-scope #qti-rubrics .hidden{display:none}.no-controls .item-previewer-scope{height:100vh}.previewer-component{background:inherit}.previewer-component.fullpage{position:absolute;top:0;left:0;right:0;bottom:0;z-index:100000}.previewer-component.fullpage .item-previewer-scope{height:100vh}.previewer-component.readonly .qti-item::before{content:\\\" \\\";position:absolute;top:0;left:0;right:0;bottom:0;z-index:100000}.previewer-component.hideactionbars .test-sidebar{height:100%}.previewer-component.hideactionbars .action-bar{display:none}.item-previewer-scope .preview-console-closer{position:absolute;right:10px;top:10px;cursor:pointer;color:rgba(255,255,255,.9);text-shadow:none}.item-previewer-scope .preview-console-closer:hover{color:#fff}.item-previewer-scope .preview-console{background:#2b2b2b;color:#fff;font-family:Consolas,\\\"Andale Mono WT\\\",\\\"Andale Mono\\\",\\\"Lucida Console\\\",\\\"Lucida Sans Typewriter\\\",\\\"DejaVu Sans Mono\\\",\\\"Bitstream Vera Sans Mono\\\",\\\"Liberation Mono\\\",\\\"Nimbus Mono L\\\",Monaco,\\\"Courier New\\\",Courier,monospace;position:relative}.item-previewer-scope .preview-console .preview-console-body{padding:5px;margin:0;height:30vh;overflow:auto}.item-previewer-scope .preview-console .preview-console-body .log-time{color:#999}.item-previewer-scope .preview-console .preview-console-body .log-type{color:#eee}.item-previewer-scope .preview-console .preview-console-body .log-message{color:#69f}.item-previewer-scope .preview-console .preview-console-body pre{margin:0}.item-previewer-scope .action-bar.content-action-bar{padding:2px}.item-previewer-scope .action-bar.content-action-bar li{margin:2px 0 0 10px;border:none}.item-previewer-scope .action-bar.content-action-bar li.btn-info{padding-top:6px;height:33px;margin-top:0;border-bottom:solid 2px rgba(0,0,0,0);border-radius:0}.item-previewer-scope .action-bar.content-action-bar li.btn-info.btn-group{border:none !important;overflow:hidden;padding:0}.item-previewer-scope .action-bar.content-action-bar li.btn-info.btn-group a{float:left;margin:0 2px;padding:0 15px;border:1px solid rgba(255,255,255,.3);border-radius:0px;display:inline-block;height:inherit}.item-previewer-scope .action-bar.content-action-bar li.btn-info.btn-group a:first-of-type{border-top-left-radius:3px;border-bottom-left-radius:3px;margin-left:0}.item-previewer-scope .action-bar.content-action-bar li.btn-info.btn-group a:last-of-type{border-top-right-radius:3px;border-bottom-right-radius:3px;margin-right:0}.item-previewer-scope .action-bar.content-action-bar li.btn-info.btn-group a:hover,.item-previewer-scope .action-bar.content-action-bar li.btn-info.btn-group a.active{border-color:rgba(255,255,255,.8)}.item-previewer-scope .action-bar.content-action-bar li.btn-info.btn-group a .no-label{padding-right:0}.item-previewer-scope .action-bar.content-action-bar li.btn-info:hover,.item-previewer-scope .action-bar.content-action-bar li.btn-info.active{border-bottom-color:rgba(255,255,255,.8)}.item-previewer-scope .action-bar.content-action-bar li.btn-info:active,.item-previewer-scope .action-bar.content-action-bar li.btn-info.active{background:#e7eff4;border-color:rgba(255,255,255,.8)}.item-previewer-scope .action-bar.content-action-bar li.btn-info:active a,.item-previewer-scope .action-bar.content-action-bar li.btn-info.active a{color:#266d9c;text-shadow:none}.item-previewer-scope .action-bar.content-action-bar li.btn-info:active:hover,.item-previewer-scope .action-bar.content-action-bar li.btn-info.active:hover{background:#fff}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar{opacity:1;height:40px}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.top-action-bar>.control-box{height:40px;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-justify-content:space-between;-ms-flex-pack:space-between;justify-content:space-between;padding-left:10px;padding-right:40px}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box{color:rgba(255,255,255,.9);text-shadow:1px 1px 0 #000}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box .lft,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box .rgt{padding-left:20px}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box .lft:first-child,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box .rgt:first-child{padding-left:0}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box .lft:last-child ul,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box .rgt:last-child ul{display:inline-block}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box [class^=btn-],.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box [class*=\\\" btn-\\\"]{white-space:nowrap}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box{position:relative;overflow:visible}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .action{position:relative;overflow:visible}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu{color:#222;background:#f3f1ef;border:1px solid #aaa9a7;overflow:auto;list-style:none;min-width:150px;margin:0;padding:0;position:absolute;bottom:36px;left:-3px}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action{display:inline-block;text-align:left;width:100%;white-space:nowrap;overflow:hidden;color:#222;border-bottom:1px solid #c2c1bf;margin:0;-moz-border-radius:0px;-webkit-border-radius:0px;border-radius:0px;height:32px;padding:6px 15px;line-height:1;border-left:solid 3px rgba(0,0,0,0)}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action .icon-checkbox-checked{display:none}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.active{background-color:#dbd9d7;font-weight:bold}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.hover .icon-checkbox,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action:hover .icon-checkbox,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.active .icon-checkbox{display:none}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.hover .icon-checkbox-checked,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action:hover .icon-checkbox-checked,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.active .icon-checkbox-checked{display:inline-block}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.hover,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action:hover{background-color:#0e5d91;color:#fff;border-left-color:#313030 !important}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.hover .label,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.hover .icon,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action:hover .label,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action:hover .icon{color:#fff}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.hover .icon,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action:hover .icon{color:#e7eff4}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action .label,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action .icon{font-size:14px;font-size:1.4rem;text-shadow:none;color:#222}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar{overflow:visible;position:relative}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .action{line-height:1.6}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .icon.no-label{padding-right:0}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .tool-label-collapsed .btn-info .text,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .tool-label-collapsed-hover .btn-info:not(:hover) .text,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .btn-info.no-tool-label .text,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .btn-info.tool-label-collapsed .text,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .btn-info.tool-label-collapsed-over:not(:hover) .text{display:none}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .tool-label-collapsed .btn-info .icon,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .tool-label-collapsed-hover .btn-info:not(:hover) .icon,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .btn-info.no-tool-label .icon,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .btn-info.tool-label-collapsed .icon,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .btn-info.tool-label-collapsed-over:not(:hover) .icon{padding:0}\\n\\n/*# sourceMappingURL=taoQtiTestPreviewer/previewer/provider/item/css/item.css.map */.top-block-preview{position:fixed;top:0;left:50%;z-index:10000;display:flex;flex-direction:column;align-items:center;justify-content:center}.top-block-preview.open{transform:translate(-50%, 0);transition:transform .5s ease-out}.top-block-preview.close{transform:translate(-50%, calc(30px - 100%));transition:transform .5s ease-out}.top-block-preview-main{display:flex;padding:12px 24px;background-color:#f3f1ef;border:solid 1px #e5e4e4}.top-block-preview-main .btn-info{margin-left:16px;white-space:nowrap}.top-block-preview-main .btn-info .icon{padding-left:9px;padding-right:0}.top-block-preview-info{display:flex;align-items:center;justify-content:center}.top-block-preview-info p{margin-bottom:0}.top-block-preview-collapser{position:relative;width:60px;height:30px;background-color:#f3f1ef;border-bottom-left-radius:30px;border-bottom-right-radius:30px;transform:translateY(-10px);display:flex;align-items:center;justify-content:center;cursor:pointer;border-left:solid 1px #e5e4e4;border-right:solid 1px #e5e4e4}.top-block-preview-collapser::before{content:\\\" \\\";width:60px;height:10px;background-color:#f3f1ef;position:absolute;top:-1px}\\n\\n/*# sourceMappingURL=taoQtiTestPreviewer/previewer/component/topBlock/css/topBlock.css.map */.devices-previewer{width:100%;height:100%}.devices-previewer:not(.disabled)[data-type=desktop],.devices-previewer:not(.disabled)[data-type=mobile]{overflow:hidden}.devices-previewer:not(.disabled)[data-type=desktop] .preview-container,.devices-previewer:not(.disabled)[data-type=mobile] .preview-container{position:relative}.devices-previewer:not(.disabled)[data-type=desktop] .preview-frame,.devices-previewer:not(.disabled)[data-type=mobile] .preview-frame{position:relative;border:3px #aaa ridge;background:#5a5a5a;background:linear-gradient(135deg, rgb(90, 90, 90) 0%, rgb(86, 86, 86) 7%, rgb(68, 68, 68) 15%, rgb(20, 20, 20) 30%);-webkit-box-shadow:5px 5px 10px 0 rgba(0, 0, 0, 0.7);-moz-box-shadow:5px 5px 10px 0 rgba(0, 0, 0, 0.7);-ms-box-shadow:5px 5px 10px 0 rgba(0, 0, 0, 0.7);-o-box-shadow:5px 5px 10px 0 rgba(0, 0, 0, 0.7);box-shadow:5px 5px 10px 0 rgba(0, 0, 0, 0.7)}.devices-previewer:not(.disabled)[data-type=desktop] .preview-content,.devices-previewer:not(.disabled)[data-type=mobile] .preview-content{background:#fff;border-radius:3px;border:2px solid;border-color:#444 #999 #999 #444;overflow:auto}.devices-previewer:not(.disabled)[data-type=mobile] .preview-frame{border-radius:25px;padding:40px}.devices-previewer:not(.disabled)[data-type=desktop] .preview-frame{border-radius:5px;padding:30px}\\n\\n/*# sourceMappingURL=taoQtiTestPreviewer/previewer/plugins/tools/scale/component/css/devicesPreviewer.css.map */.devices-selector{display:-ms-flex;display:-webkit-flex;display:flex;-ms-flex-direction:row;-webkit-flex-direction:row;flex-direction:row}.devices-selector[data-type=standard] .desktop-selector,.devices-selector[data-type=standard] .mobile-selector,.devices-selector[data-type=standard] .orientation-selector{display:none}.devices-selector[data-type=desktop] .mobile-selector,.devices-selector[data-type=desktop] .orientation-selector{display:none}.devices-selector[data-type=mobile] .desktop-selector{display:none}.devices-selector .selector{display:inline-block;margin-top:.3em}.devices-selector .selector:not(:last-child){margin-right:1rem}.devices-selector .selector select{overflow:visible}.devices-selector .selector .select2-container{text-shadow:none}\\n\\n/*# sourceMappingURL=taoQtiTestPreviewer/previewer/plugins/tools/scale/component/css/devicesSelector.css.map */.previewer-test-component{background:inherit}.previewer-test-component.fullpage{position:absolute;top:0;left:0;right:0;bottom:64px;z-index:1000}.previewer-test-component.fullpage .item-previewer-scope{height:100vh}.previewer-test-component.readonly .qti-item::before{content:\\\" \\\";position:absolute;top:0;left:0;right:0;bottom:0;z-index:100000}.previewer-test-component.hideactionbars .test-sidebar{height:100%}.previewer-test-component.hideactionbars .action-bar{display:none}.previewer-test-component #preview-logo{margin:6px 30px 6px 30px;display:block;max-width:200px;height:52px;background:rgba(0,0,0,0)}.previewer-test-component footer{z-index:10000;position:relative;font-size:11px;padding:10px;border-top:1px #ddd solid}\\n\\n/*# sourceMappingURL=taoQtiTestPreviewer/previewer/component/test/css/qtiTest.css.map */');\n","\ndefine(\"taoQtiTestPreviewer/loader/qtiPreviewer.bundle\", function(){});\n","define(\"taoQtiTestPreviewer/loader/qtiPreviewer.min\", [\"taoItems/loader/taoItemsRunner.min\",\"taoTests/loader/taoTestsRunner.min\",\"taoQtiItem/loader/taoQtiItemRunner.min\",\"taoQtiTest/loader/taoQtiTestRunner.min\",\"taoQtiTest/loader/testPlugins.min\"], function(){});\n"],"mappings":"ACCAA,MAAA,oEAAAC,EAAA,SAAAA,EAAA,CAAAC,QAAA,UAAAC,UAAA,CAAAC,MAAA,CAAAC,OAAA,CAAAC,QAAA,CAAAC,IAAA,EAMA,MALA,MAAAC,YAAA,gBACAH,OAAA,MAAAI,KAAA,CAAAJ,OAAA,CAAAF,UAAA,CAAAE,OAAA,EAAAE,IAAA,CAAAA,IAAA,KAIA,2CACA,KCeAP,MAAA,yCACA,kCACA,2CACA,UAAAU,sBAAA,CAAAC,SAAA,EACA,aAgBA,gBAAAC,iBAAAC,SAAA,MAAAC,MAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAD,SAAA,aAAAA,SAAA,OAAAb,QAAA,GAAAa,SAAA,CAAAC,MAAA,EAAAD,SAAA,aAAAA,SAAA,SAEA,OAAAL,sBAAA,CAAAG,SAAA,CAAAC,MAAA,CAAAZ,QAAA,EAAAS,SAAA,E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AAA,GACAC,OAAA,KACAC,QAAA,KACA,EACAI,gCAAA,EACAf,KAAA,kBACAC,KAAA,KACAC,MAAA,MACAO,WAAA,GACAC,OAAA,KACAC,QAAA,KACA,EACAK,kCAAA,EACAhB,KAAA,kBACAC,KAAA,KACAC,MAAA,MACAO,WAAA,GACAC,OAAA,KACAC,QAAA,KACA,EACAM,kCAAA,EACAjB,KAAA,kBACAC,KAAA,MACAC,MAAA,MACAO,WAAA,GACAC,OAAA,KACAC,QAAA,KACA,EACAO,gCAAA,EACAlB,KAAA,kBACAC,KAAA,KACAC,MAAA,KACAO,WAAA,KACAC,OAAA,KACAC,QAAA,KACA,EACAQ,kCAAA,EACAnB,KAAA,wCACAC,KAAA,KACAC,MAAA,KACAO,WAAA,KACAC,OAAA,KACAC,QAAA,KACA,EACAS,kCAAA,EACApB,KAAA,sBACAC,KAAA,KACAC,MAAA,MACAO,WAAA,GACAC,OAAA,KACAC,QAAA,KACA,EACAU,gCAAA,EACArB,KAAA,yBACAC,KAAA,KACAC,MAAA,KACAO,WAAA,KACAC,OAAA,KACAC,QAAA,KACA,EACAW,gCAAA,EACAtB,KAAA,4CACAC,KAAA,KACAC,MAAA,KACAO,WAAA,KACAC,OAAA,KACAC,QAAA,KACA,EACAY,kCAAA,EACAvB,KAAA,gBACAC,KAAA,KACAC,MAAA,MACAO,WAAA,GACAC,OAAA,KACAC,QAAA,KACA,EACAa,gCAAA,EACAxB,KAAA,iCACAC,KAAA,KACAC,MAAA,MACAO,WAAA,KACAC,OAAA,KACAC,QAAA,KACA,EACAc,kCAAA,EACAzB,KAAA,kBACAC,KAAA,KACAC,MAAA,KACAO,WAAA,KACAC,OAAA,KACAC,QAAA,IACA,EACAe,kCAAA,EACA1B,KAAA,4CACAC,KAAA,KACAC,MAAA,KACAO,WAAA,KACAC,OAAA,KACAC,QAAA,KACA,EACAgB,gCAAA,EACA3B,KAAA,4DACAC,KAAA,KACAC,MAAA,KACAO,WAAA,GACAC,OAAA,KACAC,QAAA,IACA,EACAiB,kCAAA,EACA5B,KAAA,0BACAC,KAAA,KACAC,MAAA,MACAO,WAAA,GACAC,OAAA,KACAC,QAAA,KACA,EACAkB,gCAAA,EACA7B,KAAA,iCACAC,KAAA,KACAC,MAAA,KACAO,WAAA,GACAC,OAAA,KACAC,QAAA,IACA,EACAmB,kCAAA,EACA9B,KAAA,2DACAC,KAAA,KACAC,MAAA,KACAO,WAAA,KACAC,OAAA,KACAC,QAAA,KACA,EACAoB,kCAAA,EACA/B,KAAA,uBACAC,KAAA,KACAC,MAAA,MACAO,WAAA,GACAC,OAAA,KACAC,QAAA,KACA,EACAqB,kCAAA,EACAhC,KAAA,yBACAC,KAAA,MACAC,MAAA,MACAO,WAAA,GACAC,OAAA,KACAC,QAAA,KACA,EACAsB,kCAAA,EACAjC,KAAA,0BACAC,KAAA,KACAC,MAAA,MACAO,WAAA,GACAC,OAAA,KACAC,QAAA,KACA,EACAuB,kCAAA,EACAlC,KAAA,sCACAC,KAAA,KACAC,MAAA,MACAO,WAAA,GACAC,OAAA,KACAC,QAAA,KACA,EACAwB,kCAAA,EACAnC,KAAA,6BACAC,KAAA,KACAC,MAAA,KACAO,WAAA,KACAC,OAAA,KACAC,QAAA,KACA,EACAyB,kCAAA,EACApC,KAAA,qBACAC,KAAA,MACAC,MAAA,MACAO,WAAA,GACAC,OAAA,KACAC,QAAA,KACA,EACA0B,kCAAA,EACArC,KAAA,sBACAC,KAAA,KACAC,MAAA,MACAO,WAAA,GACAC,OAAA,KACAC,QAAA,KACA,EACA2B,kCAAA,EACAtC,KAAA,uBACAC,KAAA,KACAC,MAAA,KACAO,WAAA,GACAC,OAAA,KACAC,QAAA,IACA,EACA4B,kCAAA,EACAvC,KAAA,qBACAC,KAAA,MACAC,MAAA,MACAO,WAAA,GACAC,OAAA,KACAC,QAAA,KACA,CACA,EACA6B,OAAA,EACAC,kCAAA,EACAzC,KAAA,kBACAC,KAAA,MACAC,MAAA,MACAQ,OAAA,MACAC,QAAA,MACAF,WA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E,MAAA,CAAAuE,OAAA,QACA,CACA,EACA,GACA9E,EAAA,kBAAA+C,GAAA,EACAmB,QAAA,GACAA,QAAA,CAAA1D,OAAA,GACA0D,QAAA,OAEAlC,CAAA,CAAAgB,WAAA,CAAAD,GAAA,CAAAE,OAAA,GACAf,QAAA,GAAAgB,KAAA,CAAAH,GAAA,CAAAE,OAAA,EAEAd,MAAA,CAAAe,KAAA,CAAAH,GAAA,CACA,GACA/C,EAAA,gBACAkE,QAAA,GACAA,QAAA,CAAA1D,OAAA,GACA0D,QAAA,MAEA,GACA,OAAAme,gBACA,EACA,EAEA7hB,QAAA,EAGA,MAFA,MAAA2b,KAAA,MAEArF,OAAA,CAAAE,OAAA,EACA,CACA,CACA,GClJA,SAAAuL,CAAA,MAAAC,CAAA,CAAA3f,QAAA,CAAAwe,CAAA,eAAAoB,CAAA,cAAAC,CAAA,CAAAF,CAAA,CAAAG,aAAA,UAAAD,CAAA,CAAA5c,IAAA,YAAA0c,CAAA,CAAAI,oBAAA,YAAAC,WAAA,CAAAH,CAAA,EAAAA,CAAA,CAAAI,UAAA,CAAAJ,CAAA,CAAAI,UAAA,CAAAC,OAAA,CAAAR,CAAA,CAAAG,CAAA,CAAAG,WAAA,CAAAL,CAAA,CAAAQ,cAAA,CAAAT,CAAA,IACA,mtgBCDAxjB,MAAA,gEACAA,MCFA"} \ No newline at end of file diff --git a/views/js/previewer/adapter/item/qtiItem.js b/views/js/previewer/adapter/item/qtiItem.js index 53ed5735..7d0c5fd3 100644 --- a/views/js/previewer/adapter/item/qtiItem.js +++ b/views/js/previewer/adapter/item/qtiItem.js @@ -13,17 +13,17 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (c) 2019 (original work) Open Assessment Technologies SA ; + * Copyright (c) 2019-2024 (original work) Open Assessment Technologies SA ; */ /** * @author Jean-Sébastien Conan */ -define([ - 'lodash', - 'core/logger', - 'taoQtiTestPreviewer/previewer/component/qtiItem', - 'ui/feedback' -], function (_, loggerFactory, qtiItemPreviewerFactory, feedback) { +define(['lodash', 'core/logger', 'taoQtiTestPreviewer/previewer/component/qtiItem', 'ui/feedback'], function ( + _, + loggerFactory, + qtiItemPreviewerFactory, + feedback +) { 'use strict'; const logger = loggerFactory('taoQtiTest/previewer'); @@ -32,27 +32,33 @@ define([ * List of required plugins that should be loaded in order to make the previewer work properly * @type {Object[]} */ - const defaultPlugins = [{ - module: 'taoQtiTestPreviewer/previewer/plugins/controls/close', - bundle: 'taoQtiTestPreviewer/loader/qtiPreviewer.min', - category: 'controls' - }, { - module: 'taoQtiTestPreviewer/previewer/plugins/navigation/submit/submit', - bundle: 'taoQtiTestPreviewer/loader/qtiPreviewer.min', - category: 'navigation' - }, { - module: 'taoQtiTestPreviewer/previewer/plugins/tools/scale/scale', - bundle: 'taoQtiTestPreviewer/loader/qtiPreviewer.min', - category: 'tools' - }, { - module: 'taoQtiTest/runner/plugins/tools/itemThemeSwitcher/itemThemeSwitcher', - bundle: 'taoQtiTest/loader/testPlugins.min', - category: 'tools' - }, { - module: 'taoQtiTestPreviewer/previewer/plugins/content/enhancedReadOnlyMode', - bundle: 'taoQtiTestPreviewer/loader/qtiPreviewer.min', - category: 'content' - }]; + const defaultPlugins = [ + { + module: 'taoQtiTestPreviewer/previewer/plugins/controls/close', + bundle: 'taoQtiTestPreviewer/loader/qtiPreviewer.min', + category: 'controls' + }, + { + module: 'taoQtiTestPreviewer/previewer/plugins/navigation/submit/submit', + bundle: 'taoQtiTestPreviewer/loader/qtiPreviewer.min', + category: 'navigation' + }, + { + module: 'taoQtiTestPreviewer/previewer/plugins/tools/scale/scale', + bundle: 'taoQtiTestPreviewer/loader/qtiPreviewer.min', + category: 'tools' + }, + { + module: 'taoQtiTest/runner/plugins/tools/itemThemeSwitcher/itemThemeSwitcher', + bundle: 'taoQtiTest/loader/testPlugins.min', + category: 'tools' + }, + { + module: 'taoQtiTestPreviewer/previewer/plugins/content/enhancedReadOnlyMode', + bundle: 'taoQtiTestPreviewer/loader/qtiPreviewer.min', + category: 'content' + } + ]; /** * Wraps the legacy item previewer in order to be loaded by the taoItems previewer factory @@ -67,22 +73,30 @@ define([ * @param {Object} state - The state of the item * @param {Object} [config] - Some config entries * @param {Object[]} [config.plugins] - Additional plugins to load - * @param {String} [config.fullPage] - Force the previewer to occupy the full window. - * @param {String} [config.readOnly] - Do not allow to modify the previewed item. + * @param {boolean} [config.fullPage] - Force the previewer to occupy the full window. + * @param {boolean} [config.readOnly] - Do not allow to modify the previewed item. + * @param {string} [config.viewer] - Instruct the previewer of the type of usage. + * @param {boolean} [config.disableDefaultPlugins] - Disable the plugins. * @returns {Object} */ init(uri, state, config = {}) { config.itemUri = uri; config.itemState = state; - config.plugins = Array.isArray(config.plugins) ? [...defaultPlugins, ...config.plugins] : defaultPlugins; - return qtiItemPreviewerFactory(window.document.body, config) - .on('error', function (err) { + if (!config.disableDefaultPlugins) { + config.plugins = Array.isArray(config.plugins) + ? [...defaultPlugins, ...config.plugins] + : defaultPlugins; + } + return qtiItemPreviewerFactory(config.container || window.document.body, config).on( + 'error', + function (err) { if (!_.isUndefined(err.message)) { feedback().error(err.message); } else { logger.error(err); } - }); + } + ); } }; }); diff --git a/views/js/previewer/provider/item/css/item.css b/views/js/previewer/provider/item/css/item.css index f749bfd3..0ce49d87 100644 --- a/views/js/previewer/provider/item/css/item.css +++ b/views/js/previewer/provider/item/css/item.css @@ -1,3 +1,3 @@ -.previewer,.previewer-component{position:relative}.item-previewer-scope{position:relative;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;height:calc(100vh - 0px)}.item-previewer-scope .test-runner-sections{-webkit-flex:1 1 0%;-ms-flex:1 1 0%;flex:1 1 0%;overflow:hidden;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}.item-previewer-scope .test-sidebar{background:#f3f1ef;-webkit-flex:0 1 auto;-ms-flex:0 1 auto;flex:0 1 auto;height:calc(100vh - 80px);overflow-y:auto;max-width:350px}.item-previewer-scope .test-sidebar>.qti-panel{max-width:350px;padding:10px}@media only screen and (max-device-width: 800px){.item-previewer-scope .test-sidebar{max-width:200px}.item-previewer-scope .test-sidebar>.qti-panel{max-width:200px}}@media only screen and (min-device-width: 800px)and (max-device-width: 1280px){.item-previewer-scope .test-sidebar{max-width:250px}.item-previewer-scope .test-sidebar>.qti-panel{max-width:250px}}@media only screen and (min-device-width: 1280px)and (max-device-width: 1440px){.item-previewer-scope .test-sidebar{max-width:300px}.item-previewer-scope .test-sidebar>.qti-panel{max-width:300px}}.item-previewer-scope .test-sidebar-left{border-right:1px #ddd solid}.item-previewer-scope .test-sidebar-right{border-left:1px #ddd solid}.item-previewer-scope .content-wrapper{position:relative;-webkit-flex:1 1 0%;-ms-flex:1 1 0%;flex:1 1 0%;overflow:auto;padding:0}.item-previewer-scope .content-wrapper .overlay{position:absolute;left:0;right:0;top:0;bottom:0;width:100%;opacity:.9}.item-previewer-scope .content-wrapper .overlay-full{background-color:#fff;opacity:1}.item-previewer-scope #qti-content{-webkit-overflow-scrolling:touch;max-width:1024px;width:100%;margin:auto}.item-previewer-scope #qti-item{width:100%;min-width:100%;height:auto;overflow:visible}.item-previewer-scope .qti-item{padding:30px}.item-previewer-scope .size-wrapper{max-width:1280px;margin:auto;width:100%;padding-right:40px}.item-previewer-scope #qti-rubrics{margin:auto;max-width:1024px;width:100%}.item-previewer-scope #qti-rubrics .qti-rubricBlock{margin:20px 0}.item-previewer-scope #qti-rubrics .hidden{display:none}.no-controls .item-previewer-scope{height:100vh}.previewer-component{background:inherit}.previewer-component.fullpage{position:absolute;top:0;left:0;right:0;bottom:0;z-index:100000}.previewer-component.fullpage .item-previewer-scope{height:100vh}.previewer-component.readonly .qti-item::before{content:" ";position:absolute;top:0;left:0;right:0;bottom:0;z-index:100000}.previewer-component.hideactionbars .test-sidebar{height:100%}.previewer-component.hideactionbars .action-bar{display:none}.item-previewer-scope .preview-console-closer{position:absolute;right:10px;top:10px;cursor:pointer;color:rgba(255,255,255,.9);text-shadow:none}.item-previewer-scope .preview-console-closer:hover{color:#fff}.item-previewer-scope .preview-console{background:#2b2b2b;color:#fff;font-family:Consolas,"Andale Mono WT","Andale Mono","Lucida Console","Lucida Sans Typewriter","DejaVu Sans Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L",Monaco,"Courier New",Courier,monospace;position:relative}.item-previewer-scope .preview-console .preview-console-body{padding:5px;margin:0;height:30vh;overflow:auto}.item-previewer-scope .preview-console .preview-console-body .log-time{color:#999}.item-previewer-scope .preview-console .preview-console-body .log-type{color:#eee}.item-previewer-scope .preview-console .preview-console-body .log-message{color:#69f}.item-previewer-scope .preview-console .preview-console-body pre{margin:0}.item-previewer-scope .action-bar.content-action-bar{padding:2px}.item-previewer-scope .action-bar.content-action-bar li{margin:2px 0 0 10px;border:none}.item-previewer-scope .action-bar.content-action-bar li.btn-info{padding-top:6px;height:33px;margin-top:0;border-bottom:solid 2px rgba(0,0,0,0);border-radius:0}.item-previewer-scope .action-bar.content-action-bar li.btn-info.btn-group{border:none !important;overflow:hidden;padding:0}.item-previewer-scope .action-bar.content-action-bar li.btn-info.btn-group a{float:left;margin:0 2px;padding:0 15px;border:1px solid rgba(255,255,255,.3);border-radius:0px;display:inline-block;height:inherit}.item-previewer-scope .action-bar.content-action-bar li.btn-info.btn-group a:first-of-type{border-top-left-radius:3px;border-bottom-left-radius:3px;margin-left:0}.item-previewer-scope .action-bar.content-action-bar li.btn-info.btn-group a:last-of-type{border-top-right-radius:3px;border-bottom-right-radius:3px;margin-right:0}.item-previewer-scope .action-bar.content-action-bar li.btn-info.btn-group a:hover,.item-previewer-scope .action-bar.content-action-bar li.btn-info.btn-group a.active{border-color:rgba(255,255,255,.8)}.item-previewer-scope .action-bar.content-action-bar li.btn-info.btn-group a .no-label{padding-right:0}.item-previewer-scope .action-bar.content-action-bar li.btn-info:hover,.item-previewer-scope .action-bar.content-action-bar li.btn-info.active{border-bottom-color:rgba(255,255,255,.8)}.item-previewer-scope .action-bar.content-action-bar li.btn-info:active,.item-previewer-scope .action-bar.content-action-bar li.btn-info.active{background:#e7eff4;border-color:rgba(255,255,255,.8)}.item-previewer-scope .action-bar.content-action-bar li.btn-info:active a,.item-previewer-scope .action-bar.content-action-bar li.btn-info.active a{color:#266d9c;text-shadow:none}.item-previewer-scope .action-bar.content-action-bar li.btn-info:active:hover,.item-previewer-scope .action-bar.content-action-bar li.btn-info.active:hover{background:#fff}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar{opacity:1;height:40px}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.top-action-bar>.control-box{height:40px;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-justify-content:space-between;-ms-flex-pack:space-between;justify-content:space-between;padding-left:10px;padding-right:40px}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box{color:rgba(255,255,255,.9);text-shadow:1px 1px 0 #000}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box .lft,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box .rgt{padding-left:20px}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box .lft:first-child,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box .rgt:first-child{padding-left:0}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box .lft:last-child ul,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box .rgt:last-child ul{display:inline-block}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box [class^=btn-],.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box [class*=" btn-"]{white-space:nowrap}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box{position:relative;overflow:visible}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .action{position:relative;overflow:visible}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu{color:#222;background:#f3f1ef;border:1px solid #aaa9a7;overflow:auto;list-style:none;min-width:150px;margin:0;padding:0;position:absolute;bottom:36px;left:-3px}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action{display:inline-block;text-align:left;width:100%;white-space:nowrap;overflow:hidden;color:#222;border-bottom:1px solid #c2c1bf;margin:0;-moz-border-radius:0px;-webkit-border-radius:0px;border-radius:0px;height:32px;padding:6px 15px;line-height:1;border-left:solid 3px rgba(0,0,0,0)}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action .icon-checkbox-checked{display:none}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.active{background-color:#dbd9d7;font-weight:bold}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.hover .icon-checkbox,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action:hover .icon-checkbox,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.active .icon-checkbox{display:none}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.hover .icon-checkbox-checked,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action:hover .icon-checkbox-checked,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.active .icon-checkbox-checked{display:inline-block}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.hover,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action:hover{background-color:#0e5d91;color:#fff;border-left-color:#313030 !important}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.hover .label,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.hover .icon,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action:hover .label,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action:hover .icon{color:#fff}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.hover .icon,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action:hover .icon{color:#e7eff4}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action .label,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action .icon{font-size:14px;font-size:1.4rem;text-shadow:none;color:#222}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar{overflow:visible;position:relative}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .action{line-height:1.6}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .icon.no-label{padding-right:0}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .tool-label-collapsed .btn-info .text,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .tool-label-collapsed-hover .btn-info:not(:hover) .text,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .btn-info.no-tool-label .text,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .btn-info.tool-label-collapsed .text,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .btn-info.tool-label-collapsed-over:not(:hover) .text{display:none}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .tool-label-collapsed .btn-info .icon,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .tool-label-collapsed-hover .btn-info:not(:hover) .icon,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .btn-info.no-tool-label .icon,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .btn-info.tool-label-collapsed .icon,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .btn-info.tool-label-collapsed-over:not(:hover) .icon{padding:0} +.previewer,.previewer-component{position:relative}.item-previewer-scope{position:relative;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.item-previewer-scope.view-viewer .action-bar{display:none}.item-previewer-scope:not(.view-viewer){height:calc(100vh - 0px)}.item-previewer-scope:not(.view-viewer) .test-sidebar{height:calc(100vh - 80px)}.item-previewer-scope .test-runner-sections{-webkit-flex:1 1 0%;-ms-flex:1 1 0%;flex:1 1 0%;overflow:hidden;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}.item-previewer-scope .test-sidebar{background:#f3f1ef;-webkit-flex:0 1 auto;-ms-flex:0 1 auto;flex:0 1 auto;overflow-y:auto;max-width:350px}.item-previewer-scope .test-sidebar>.qti-panel{max-width:350px;padding:10px}@media only screen and (max-device-width: 800px){.item-previewer-scope .test-sidebar{max-width:200px}.item-previewer-scope .test-sidebar>.qti-panel{max-width:200px}}@media only screen and (min-device-width: 800px)and (max-device-width: 1280px){.item-previewer-scope .test-sidebar{max-width:250px}.item-previewer-scope .test-sidebar>.qti-panel{max-width:250px}}@media only screen and (min-device-width: 1280px)and (max-device-width: 1440px){.item-previewer-scope .test-sidebar{max-width:300px}.item-previewer-scope .test-sidebar>.qti-panel{max-width:300px}}.item-previewer-scope .test-sidebar-left{border-right:1px #ddd solid}.item-previewer-scope .test-sidebar-right{border-left:1px #ddd solid}.item-previewer-scope .content-wrapper{position:relative;-webkit-flex:1 1 0%;-ms-flex:1 1 0%;flex:1 1 0%;overflow:auto;padding:0}.item-previewer-scope .content-wrapper .overlay{position:absolute;left:0;right:0;top:0;bottom:0;width:100%;opacity:.9}.item-previewer-scope .content-wrapper .overlay-full{background-color:#fff;opacity:1}.item-previewer-scope #qti-content{-webkit-overflow-scrolling:touch;max-width:1024px;width:100%;margin:auto}.item-previewer-scope #qti-item{width:100%;min-width:100%;height:auto;overflow:visible}.item-previewer-scope .qti-item{padding:30px}.item-previewer-scope .size-wrapper{max-width:1280px;margin:auto;width:100%;padding-right:40px}.item-previewer-scope #qti-rubrics{margin:auto;max-width:1024px;width:100%}.item-previewer-scope #qti-rubrics .qti-rubricBlock{margin:20px 0}.item-previewer-scope #qti-rubrics .hidden{display:none}.no-controls .item-previewer-scope{height:100vh}.previewer-component{background:inherit}.previewer-component.fullpage{position:absolute;top:0;left:0;right:0;bottom:0;z-index:100000}.previewer-component.fullpage .item-previewer-scope{height:100vh}.previewer-component.readonly .qti-item::before{content:" ";position:absolute;top:0;left:0;right:0;bottom:0;z-index:100000}.previewer-component.hideactionbars .test-sidebar{height:100%}.previewer-component.hideactionbars .action-bar{display:none}.item-previewer-scope .preview-console-closer{position:absolute;right:10px;top:10px;cursor:pointer;color:rgba(255,255,255,.9);text-shadow:none}.item-previewer-scope .preview-console-closer:hover{color:#fff}.item-previewer-scope .preview-console{background:#2b2b2b;color:#fff;font-family:Consolas,"Andale Mono WT","Andale Mono","Lucida Console","Lucida Sans Typewriter","DejaVu Sans Mono","Bitstream Vera Sans Mono","Liberation Mono","Nimbus Mono L",Monaco,"Courier New",Courier,monospace;position:relative}.item-previewer-scope .preview-console .preview-console-body{padding:5px;margin:0;height:30vh;overflow:auto}.item-previewer-scope .preview-console .preview-console-body .log-time{color:#999}.item-previewer-scope .preview-console .preview-console-body .log-type{color:#eee}.item-previewer-scope .preview-console .preview-console-body .log-message{color:#69f}.item-previewer-scope .preview-console .preview-console-body pre{margin:0}.item-previewer-scope .action-bar.content-action-bar{padding:2px}.item-previewer-scope .action-bar.content-action-bar li{margin:2px 0 0 10px;border:none}.item-previewer-scope .action-bar.content-action-bar li.btn-info{padding-top:6px;height:33px;margin-top:0;border-bottom:solid 2px rgba(0,0,0,0);border-radius:0}.item-previewer-scope .action-bar.content-action-bar li.btn-info.btn-group{border:none !important;overflow:hidden;padding:0}.item-previewer-scope .action-bar.content-action-bar li.btn-info.btn-group a{float:left;margin:0 2px;padding:0 15px;border:1px solid rgba(255,255,255,.3);border-radius:0px;display:inline-block;height:inherit}.item-previewer-scope .action-bar.content-action-bar li.btn-info.btn-group a:first-of-type{border-top-left-radius:3px;border-bottom-left-radius:3px;margin-left:0}.item-previewer-scope .action-bar.content-action-bar li.btn-info.btn-group a:last-of-type{border-top-right-radius:3px;border-bottom-right-radius:3px;margin-right:0}.item-previewer-scope .action-bar.content-action-bar li.btn-info.btn-group a:hover,.item-previewer-scope .action-bar.content-action-bar li.btn-info.btn-group a.active{border-color:rgba(255,255,255,.8)}.item-previewer-scope .action-bar.content-action-bar li.btn-info.btn-group a .no-label{padding-right:0}.item-previewer-scope .action-bar.content-action-bar li.btn-info:hover,.item-previewer-scope .action-bar.content-action-bar li.btn-info.active{border-bottom-color:rgba(255,255,255,.8)}.item-previewer-scope .action-bar.content-action-bar li.btn-info:active,.item-previewer-scope .action-bar.content-action-bar li.btn-info.active{background:#e7eff4;border-color:rgba(255,255,255,.8)}.item-previewer-scope .action-bar.content-action-bar li.btn-info:active a,.item-previewer-scope .action-bar.content-action-bar li.btn-info.active a{color:#266d9c;text-shadow:none}.item-previewer-scope .action-bar.content-action-bar li.btn-info:active:hover,.item-previewer-scope .action-bar.content-action-bar li.btn-info.active:hover{background:#fff}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar{opacity:1;height:40px}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.top-action-bar>.control-box{height:40px;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-justify-content:space-between;-ms-flex-pack:space-between;justify-content:space-between;padding-left:10px;padding-right:40px}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box{color:rgba(255,255,255,.9);text-shadow:1px 1px 0 #000}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box .lft,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box .rgt{padding-left:20px}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box .lft:first-child,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box .rgt:first-child{padding-left:0}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box .lft:last-child ul,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box .rgt:last-child ul{display:inline-block}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box [class^=btn-],.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar>.control-box [class*=" btn-"]{white-space:nowrap}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box{position:relative;overflow:visible}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .action{position:relative;overflow:visible}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu{color:#222;background:#f3f1ef;border:1px solid #aaa9a7;overflow:auto;list-style:none;min-width:150px;margin:0;padding:0;position:absolute;bottom:36px;left:-3px}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action{display:inline-block;text-align:left;width:100%;white-space:nowrap;overflow:hidden;color:#222;border-bottom:1px solid #c2c1bf;margin:0;-moz-border-radius:0px;-webkit-border-radius:0px;border-radius:0px;height:32px;padding:6px 15px;line-height:1;border-left:solid 3px rgba(0,0,0,0)}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action .icon-checkbox-checked{display:none}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.active{background-color:#dbd9d7;font-weight:bold}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.hover .icon-checkbox,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action:hover .icon-checkbox,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.active .icon-checkbox{display:none}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.hover .icon-checkbox-checked,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action:hover .icon-checkbox-checked,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.active .icon-checkbox-checked{display:inline-block}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.hover,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action:hover{background-color:#0e5d91;color:#fff;border-left-color:#313030 !important}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.hover .label,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.hover .icon,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action:hover .label,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action:hover .icon{color:#fff}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action.hover .icon,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action:hover .icon{color:#e7eff4}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action .label,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar .tools-box .menu .action .icon{font-size:14px;font-size:1.4rem;text-shadow:none;color:#222}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar{overflow:visible;position:relative}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .action{line-height:1.6}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .icon.no-label{padding-right:0}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .tool-label-collapsed .btn-info .text,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .tool-label-collapsed-hover .btn-info:not(:hover) .text,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .btn-info.no-tool-label .text,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .btn-info.tool-label-collapsed .text,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .btn-info.tool-label-collapsed-over:not(:hover) .text{display:none}.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .tool-label-collapsed .btn-info .icon,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .tool-label-collapsed-hover .btn-info:not(:hover) .icon,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .btn-info.no-tool-label .icon,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .btn-info.tool-label-collapsed .icon,.item-previewer-scope .action-bar.content-action-bar.horizontal-action-bar.bottom-action-bar .btn-info.tool-label-collapsed-over:not(:hover) .icon{padding:0} /*# sourceMappingURL=item.css.map */ \ No newline at end of file diff --git a/views/js/previewer/provider/item/css/item.css.map b/views/js/previewer/provider/item/css/item.css.map index a2404fb8..63133c50 100644 --- a/views/js/previewer/provider/item/css/item.css.map +++ b/views/js/previewer/provider/item/css/item.css.map @@ -1 +1 @@ -{"version":3,"sourceRoot":"","sources":["../scss/inc/_previewer-layout.scss","../../../../../../../tao/views/node_modules/@oat-sa/tao-core-ui/scss/inc/_colors.scss","../scss/inc/_previewer-console.scss","../../../../../../../tao/views/node_modules/@oat-sa/tao-core-ui/scss/inc/_variables.scss","../scss/inc/_previewer-action-bars.scss","../../../../../../../tao/views/node_modules/@oat-sa/tao-core-ui/scss/inc/_functions.scss"],"names":[],"mappings":"AAAA,gCACI,kBAGJ,sBAEI,kBAEA,oBACA,qBACA,aACA,8BACA,0BACA,sBAEA,yBAEA,4CAGI,oBACA,gBACA,YAEA,gBAGA,oBACA,qBACA,aACA,2BACA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2BACA,2BACA,0LACI,kBACA,kNACI,eAIA,sNACI,qBAIZ,+MACI,mBAGR,sFACI,kBACA,iBACA,8FACI,kBACA,iBAGJ,4FACI,MHlGR,KGmGQ,WHhEX,QGiEW,yBACA,cACA,gBACA,gBAEA,SACA,UAEA,kBACA,YACA,UAEA,oGACI,qBACA,gBACA,WACA,mBACA,gBACA,MHtHZ,KGuHY,gCACA,SC1BpB,uBACA,0BACA,kBD0BoB,YACA,iBACA,cACA,oCAEA,2HACI,aAGJ,2GACI,yBACA,iBAOA,4WACI,aAEJ,oYACI,qBAIR,oNAEI,iBHzKrB,QG0KqB,MHtJZ,KGuJY,qCAEA,kcACI,MH1JhB,KG4JY,gOACI,cAIR,qNCiChB,eACA,iBDhCoB,iBACA,MHrKhB,KG2KA,6FACI,iBACA,kBACA,qGACI,gBAGA,4GACI,gBAWJ,wqBACI,aAEJ,wqBACI","file":"item.css"} \ No newline at end of file +{"version":3,"sourceRoot":"","sources":["../scss/inc/_previewer-layout.scss","../../../../../../../tao/views/node_modules/@oat-sa/tao-core-ui/scss/inc/_colors.scss","../scss/inc/_previewer-console.scss","../../../../../../../tao/views/node_modules/@oat-sa/tao-core-ui/scss/inc/_variables.scss","../scss/inc/_previewer-action-bars.scss","../../../../../../../tao/views/node_modules/@oat-sa/tao-core-ui/scss/inc/_functions.scss"],"names":[],"mappings":"AAAA,gCACI,kBAGJ,sBAEI,kBAEA,oBACA,qBACA,aACA,8BACA,0BACA,sBAGI,8CACI,aAGR,wCACI,yBAEA,sDACI,0BAIR,4CAGI,oBACA,gBACA,YAEA,gBAGA,oBACA,qBACA,aACA,2BACA,uBACA,mBAGJ,oCACI,WCSC,QDND,sBACA,kBACA,cAEA,gBAEA,gBACA,+CACI,gBACA,aAEJ,iDAfJ,oCAgBQ,gBACA,+CACI,iBAGR,+EArBJ,oCAsBQ,gBACA,+CACI,iBAGR,gFA3BJ,oCA4BQ,gBACA,+CACI,iBAIZ,yCACI,4BAGJ,0CACI,2BAGJ,uCACI,kBAEA,oBACA,gBACA,YAEA,cAEA,UAEA,gDACI,kBACA,OACA,QACA,MACA,SACA,WACA,WAEA,qDACI,iBChFK,KDiFL,UAKZ,mCACI,iCACA,iBACA,WACA,YAGJ,gCACI,WACA,eACA,YACA,iBAGJ,gCACI,aAGJ,oCACI,iBACA,YACA,WACA,mBAGJ,mCACI,YACA,iBACA,WACA,oDACI,cAEJ,2CACI,aAKZ,mCACI,aAGJ,qBACI,mBAEA,8BACI,kBACA,MACA,OACA,QACA,SACA,eAEA,oDACI,aAKJ,gDACI,YACA,kBACA,MACA,OACA,QACA,SACA,eAKJ,kDACI,YAGJ,gDACI,aE7LR,8CACI,kBACA,WACA,SACA,eACA,2BACA,iBAEA,oDACI,WAIR,uCACI,mBACA,MDKQ,KCJR,YCXQ,yMDYR,kBAEA,6DACI,YACA,SAEA,YACA,cAEA,uEACI,WAGJ,uEACI,WAGJ,0EACI,WAGJ,iEACI,SEtCZ,qDACI,YACA,wDACI,oBACA,YACA,iEACI,gBACA,YACA,aACA,sCACA,gBACA,2EACI,uBACA,gBACA,UACA,6EACI,WACA,aACA,eACA,sCACA,kBACA,qBACA,eACA,2FACI,2BACA,8BACA,cAEJ,0FACI,4BACA,+BACA,eAEJ,uKACI,kCAEJ,uFACI,gBAIZ,+IACI,yCAEJ,gJAMI,mBACA,kCALA,oJACI,cACA,iBAKJ,4JACI,gBAMhB,2EACI,UACA,YAEA,uGAEI,YAEA,oBACA,qBACA,aAEA,2BACA,uBACA,mBAEA,yBACA,qBACA,iBAEA,sCACA,4BACA,8BAEA,kBACA,mBAGJ,wFACI,2BACA,2BACA,0LACI,kBACA,kNACI,eAIA,sNACI,qBAIZ,+MACI,mBAGR,sFACI,kBACA,iBACA,8FACI,kBACA,iBAGJ,4FACI,MHlGR,KGmGQ,WHhEX,QGiEW,yBACA,cACA,gBACA,gBAEA,SACA,UAEA,kBACA,YACA,UAEA,oGACI,qBACA,gBACA,WACA,mBACA,gBACA,MHtHZ,KGuHY,gCACA,SC1BpB,uBACA,0BACA,kBD0BoB,YACA,iBACA,cACA,oCAEA,2HACI,aAGJ,2GACI,yBACA,iBAOA,4WACI,aAEJ,oYACI,qBAIR,oNAEI,iBHzKrB,QG0KqB,MHtJZ,KGuJY,qCAEA,kcACI,MH1JhB,KG4JY,gOACI,cAIR,qNCiChB,eACA,iBDhCoB,iBACA,MHrKhB,KG2KA,6FACI,iBACA,kBACA,qGACI,gBAGA,4GACI,gBAWJ,wqBACI,aAEJ,wqBACI","file":"item.css"} \ No newline at end of file diff --git a/views/js/previewer/provider/item/item.js b/views/js/previewer/provider/item/item.js index 1bb27e9e..4877f664 100644 --- a/views/js/previewer/provider/item/item.js +++ b/views/js/previewer/provider/item/item.js @@ -13,7 +13,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * Copyright (c) 2018-2020 (original work) Open Assessment Technologies SA ; + * Copyright (c) 2018-2024 (original work) Open Assessment Technologies SA ; */ /** @@ -58,11 +58,11 @@ define([ //store the current execution context of the common renderer (preview) let _$previousContext = null; - function setContext($context){ + function setContext($context) { _$previousContext = containerHelper.getContext(); containerHelper.setContext($context); } - function restoreContext(){ + function restoreContext() { containerHelper.setContext(_$previousContext); _$previousContext = null; } @@ -70,7 +70,6 @@ define([ * A Test runner provider to be registered against the runner */ return { - //provider name name: 'qtiItemPreviewer', @@ -99,8 +98,8 @@ define([ * @returns {proxy} */ loadProxy() { - const {proxyProvider, serviceCallId, bootstrap, timeout} = this.getConfig(); - return proxyFactory(proxyProvider || 'qtiItemPreviewerProxy', {serviceCallId, bootstrap, timeout}); + const { proxyProvider, serviceCallId, bootstrap, timeout } = this.getConfig(); + return proxyFactory(proxyProvider || 'qtiItemPreviewerProxy', { serviceCallId, bootstrap, timeout }); }, /** @@ -119,7 +118,7 @@ define([ * Installation of the provider, called during test runner init phase. */ install() { - const {plugins} = this.getConfig().options; + const { plugins } = this.getConfig().options; if (plugins) { _.forEach(this.getPlugins(), plugin => { if (_.isPlainObject(plugin) && _.isFunction(plugin.setConfig)) { @@ -151,32 +150,32 @@ define([ /* * Install behavior on events */ - this - .on('submititem', () => { - const itemState = this.itemRunner.getState(); - const itemResponses = this.itemRunner.getResponses(); - - this.trigger('disabletools disablenav'); - this.trigger('submitresponse', itemResponses, itemState); - - return this.getProxy() - .submitItem(dataHolder.get('itemIdentifier'), itemState, itemResponses) - .then(response => { - this.trigger('scoreitem', response); - this.trigger('enabletools enablenav resumeitem'); - }) - .catch(err => { - this.trigger('enabletools enablenav'); - - //some server errors are valid, so we don't fail (prevent empty responses) - if (err.code === 200) { - this.trigger('alert.submitError', - err.message || __('An error occurred during results submission. Please retry.'), - () => this.trigger('resumeitem') - ); - } - }); - }) + this.on('submititem', () => { + const itemState = this.itemRunner.getState(); + const itemResponses = this.itemRunner.getResponses(); + + this.trigger('disabletools disablenav'); + this.trigger('submitresponse', itemResponses, itemState); + + return this.getProxy() + .submitItem(dataHolder.get('itemIdentifier'), itemState, itemResponses) + .then(response => { + this.trigger('scoreitem', response); + this.trigger('enabletools enablenav resumeitem'); + }) + .catch(err => { + this.trigger('enabletools enablenav'); + + //some server errors are valid, so we don't fail (prevent empty responses) + if (err.code === 200) { + this.trigger( + 'alert.submitError', + err.message || __('An error occurred during results submission. Please retry.'), + () => this.trigger('resumeitem') + ); + } + }); + }) .on('ready', () => { const itemIdentifier = dataHolder.get('itemIdentifier'); const itemData = dataHolder.get('itemData'); @@ -237,6 +236,10 @@ define([ config.renderTo.append(areaBroker.getContainer()); + if (config.options.view) { + areaBroker.getContainer().addClass(`view-${config.options.view}`); + } + areaBroker.getToolbox().render(areaBroker.getToolboxArea()); }, @@ -279,17 +282,26 @@ define([ assetManager.setData('baseUrl', itemData.baseUrl); assetManager.setData('assets', itemData.content.assets); - this.itemRunner = qtiItemRunner(itemData.content.type, itemData.content.data, Object.assign({ - assetManager: assetManager - }, options)) + this.itemRunner = qtiItemRunner( + itemData.content.type, + itemData.content.data, + Object.assign( + { + assetManager: assetManager + }, + options + ) + ) .on('error', err => { this.trigger('enablenav'); reject(err); - feedback().error(__('It seems that there is an error during item preview loading. Please, try again.')); + feedback().error( + __('It seems that there is an error during item preview loading. Please, try again.') + ); }) .on('init', function onItemRunnerInit() { - const {state, portableElements} = itemData; - this.render(areaBroker.getContentArea(), {state, portableElements}); + const { state, portableElements } = itemData; + this.render(areaBroker.getContentArea(), { state, portableElements }); }) .on('render', function onItemRunnerRender() { this.on('responsechange', changeState); @@ -313,9 +325,7 @@ define([ if (this.itemRunner) { return new Promise(resolve => { - this.itemRunner - .on('clear', resolve) - .clear(); + this.itemRunner.on('clear', resolve).clear(); }); } return Promise.resolve(); @@ -333,9 +343,7 @@ define([ // prevent the item to be displayed while test runner is destroying if (this.itemRunner) { - this.itemRunner - .on('clear', restoreContext) - .clear(); + this.itemRunner.on('clear', restoreContext).clear(); } this.itemRunner = null; diff --git a/views/js/previewer/provider/item/scss/inc/_previewer-layout.scss b/views/js/previewer/provider/item/scss/inc/_previewer-layout.scss index 84f83634..5dc64ed8 100644 --- a/views/js/previewer/provider/item/scss/inc/_previewer-layout.scss +++ b/views/js/previewer/provider/item/scss/inc/_previewer-layout.scss @@ -13,7 +13,18 @@ -ms-flex-direction: column; flex-direction: column; - height: calc(100vh - #{(map-get($heights, header) + map-get($heights, footer)) * 1px}); + &.view-viewer { + .action-bar { + display: none; + } + } + &:not(.view-viewer) { + height: calc(100vh - #{(map-get($heights, header) + map-get($heights, footer)) * 1px}); + + .test-sidebar { + height: calc(100vh - #{(map-get($heights, header) + map-get($heights, footer) + map-get($heights, horizontal-action-bar) * 2) * 1px}); + } + } .test-runner-sections { @@ -41,8 +52,6 @@ -ms-flex: 0 1 auto; flex: 0 1 auto; - height: calc(100vh - #{(map-get($heights, header) + map-get($heights, footer) + map-get($heights, horizontal-action-bar) * 2) * 1px}); - overflow-y: auto; max-width: 350px;