From e89f2e7b255c293a0bae70c0ca98728ebd2c36da Mon Sep 17 00:00:00 2001
From: Sreeraj S
Date: Tue, 6 Nov 2018 08:13:25 +0530
Subject: [PATCH]
---
tryit-editor/public/assets/libraries/app/js/app.min.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tryit-editor/public/assets/libraries/app/js/app.min.js b/tryit-editor/public/assets/libraries/app/js/app.min.js
index a4ac104..cd7d79f 100644
--- a/tryit-editor/public/assets/libraries/app/js/app.min.js
+++ b/tryit-editor/public/assets/libraries/app/js/app.min.js
@@ -2,4 +2,4 @@
# Author: BitCompiler
# Copyright @ bitCompiler.com. All Rights Reserved
*/
-function extractHostname(t){var e;return e=t.indexOf("://")>-1?t.split("/")[2]:t.split("/")[0],e=e.split(":")[0],e=e.split("?")[0]}function extractRootDomain(t){var e=extractHostname(t),a=e.split("."),r=a.length;return r>2&&(e=a[r-2]+"."+a[r-1]),e}function toggleCDNView(){$(".cdn-wrapper").is(":hidden")?($(".cdn-wrapper").slideDown(function(){moveDragbar()}),$(".cdn-wrapper").find(".cdn-library-search").focus()):hideCDNView()}function hideCDNView(){$(".cdn-wrapper").slideUp(function(){moveDragbar()})}function cdnLibrarySearch(){if($(".cdn-wrapper").find(".cdn-library-search").val()){$("#cdn-pagination").twbsPagination("destroy");var t=$('').attr("src",bitcompiler.constants.HOME_URL+"/public/assets/images/round-loader.gif");t.attr("alt","Loading..."),$(".cdn-wrapper").find(".list-group").html(t);var e="https://api.cdnjs.com/libraries?search="+$(".cdn-wrapper").find(".cdn-library-search").val();moveDragbar(),$(".cdn-wrapper .panel-body").BitCompiler().hideInlineMessageBox(!0),$.ajax({type:"GET",url:e,success:function(t,e,a){t.total||$(".cdn-wrapper .panel-body").BitCompiler().showInlineMessageBox({messageBoxType:"error",message:"There is no data to be displayed"});var r=Math.ceil(t.total/10);10>=t.total?populateCDNSearchData(1,10,t):($("#cdn-pagination").twbsPagination({totalPages:r,visiblePages:10,onPageClick:function(e,a){populateCDNSearchData(a,10,t)}}),moveDragbar())},error:function(t,e,a){bitcompiler.doDebug("error","app.js",null,"cdnLibrarySearch()","cdnjs request Failed! (Code: "+t.status+", Status: "+e+", Error: "+a+")",null)},complete:function(t,e,a){}})}}function cdnLibrarySelect(t){var e=$(t).data("cdn-library-id"),a=$(t).closest(".cdn-wrapper").find("#"+e).find(".well");if(0!==a.length)return a.remove(),void $(t).text("More");$(t).text("Less");var r=$(t).closest("h4.list-group-item-heading").find(".cdn-library-name").text(),i=$(t).closest(".list-group-item").find(".cdn-library-filename").text().split(r)[0];$(t).closest(".cdn-wrapper").find("#"+e).append('');var o=$('').attr("src",bitcompiler.constants.HOME_URL+"/public/assets/images/round-loader.gif");o.attr("alt","Loading..."),$(t).closest(".cdn-wrapper").find("#"+e).find(".well").html(o);var n="https://api.cdnjs.com/libraries/"+r;moveDragbar(),$.ajax({type:"GET",url:n,success:function(a,o,n){$(t).closest(".cdn-wrapper").find("#"+e).find(".well").html($(".cdn-certain-library-select-template").html());var l=$(t).closest(".cdn-wrapper").find("#"+e).find(".well").find(".versions");l.data("cdn-provider-baseurl",i),l.data("cdn-library-name",r),l.data("cdn-response",a),$(t).closest(".cdn-wrapper").find("#"+e).find(".well").find(".select-cdn-providers").html("");for(var d=0;d"+a.assets[d].version+"");l.trigger("change"),moveDragbar()},error:function(t,e,a){bitcompiler.doDebug("error","app.js",null,"cdnLibrarySelect()","Request Failed! (Code: "+t.status+", Status: "+e+", Error: "+a+")",null)},complete:function(t,e,a){}})}function populateCDNCertainLibraryFilenames(t,e,a,r){for(var i=$(".cdn-wrapper").find(".cdn-certain-library-filenames").html(""),o=t*e-e,n=o;n<(a.length '+r.data("cdn-provider-baseurl")+r.data("cdn-library-name")+"/"+r.val()+"/"+a[n]+"
")}function populateCDNSearchData(t,e,a){$(".cdn-wrapper").find(".list-group").html("");for(var r=t*e-e,i=r;i<(a.total '+a.results[i].name+"",o+=' '+a.results[i].latest+"
",$(".cdn-wrapper").find(".list-group").append(o)}}function windowOnloadScripts(){try{htmlEditorData.userInput.decrypted.filename=(new bitcompiler.Common).getURLParameterValue("filename");var t=(new bitcompiler.Common).getURLParameterValue("id");if(htmlEditorData.userInput.decrypted.filename){if(htmlEditorData.storage.isSupport()){var e;t?($container.BitCompiler().showSplashScreen({modal:!0,message:"Loading...",imageURL:bitcompiler.constants.HOME_URL+"/public/assets/images/round-loader.gif",timeout:{enabled:!1}}),$.ajax({url:"https://tutorials.bitcompiler.com/feeds/posts/default/"+t+"?alt=json",type:"get",dataType:"jsonp",success:function(t,e,a){var r=t.entry.content.$t,i=$("").html(r).find("textarea.DemoCode").val();i?htmlEditorData.editor?htmlEditorData.editor.setValue(i):$("#textarea-code").val(i):htmlEditorData.editor?htmlEditorData.editor.setValue(""):$("#textarea-code").val(""),autoFormat(),run()},error:function(t,e,a){(new bitcompiler.jquery.ui.MessageBox).show({type:"error",modal:!0,title:"Error",body:a})},complete:function(t,e){$container.BitCompiler().hideSplashScreen()}})):e=getEditorDataFromLocalStorage(htmlEditorData.userInput.decrypted.filename),e?$("#textarea-code").val(e):$("#textarea-code").val(""),run()}}else manageSaveIndicator()}catch(t){bitcompiler.doDebug("error","gui.js",null,"windowOnloadScripts()","Error occured in check input data availability",t.message)}if($(window).resize(function(){onResizeEvent()}),$(".textarea-wrapper-container").show(),setSizeData(),changeOrientation(getOrientation($(".change-orientation"))),document.getElementById("resize-detector").addEventListener("onresize",function(t){if(!$(t.target).data("timer-id")){createDragbar();var e=setTimeout(function(){$(t.target).data("timer-id",null),createDragbar()},10);$(t.target).data("timer-id",e)}}),htmlEditorData.editor=CodeMirror.fromTextArea(document.getElementById("textarea-code"),{mode:"text/html",htmlMode:!0,lineWrapping:!0,smartIndent:!1,addModeClass:!0,lineNumbers:!0}),setFocus(),htmlEditorData.editor.setSize("100%","100%"),htmlEditorData.editor.on("change",function(t,e){manageSaveIndicator()}),$(".toggle-fullscreen").click(function(t){t.preventDefault();var e=$(this);e.children("i").hasClass("glyphicon-resize-full")?e.children("i").addClass("glyphicon-resize-small").removeClass("glyphicon-resize-full"):e.children("i").hasClass("glyphicon-resize-small")&&e.children("i").addClass("glyphicon-resize-full").removeClass("glyphicon-resize-small"),$(this).closest(".bitcompiler-editor-container").toggleClass("fullscreen"),$("body").toggleClass("hide-main-scrollbar"),moveDragbar()}),$(".toggle-fullscreen").trigger("click"),window.onbeforeunload=function(t){var e=htmlEditorData.editor?htmlEditorData.editor.getValue():document.getElementById("textarea-code").value;if(!htmlEditorData.userInput.decrypted.filename&&e)return confirm("Confirm Refresh")},$(document).bind("keydown",function(t){if(!$(t.target).is("input")){if(t.ctrlKey&&83===t.which)return t.preventDefault(),save(),!1;if(t.ctrlKey&&86===t.which)manageSaveIndicator(),setTimeout(function(){autoFormat()},10);else{if(t.ctrlKey&&72===t.which)return t.preventDefault(),toggleHistoryView(),!1;if(t.ctrlKey&&68===t.which)return t.preventDefault(),newFile(!1),!1;if(t.ctrlKey&&69===t.which)return t.preventDefault(),newFile(!0),!1;8===t.which&&manageSaveIndicator()}}}),$(".cdn-wrapper").find(".cdn-library-search").keyup(function(t){13===t.keyCode&&cdnLibrarySearch()}),window.addEventListener)try{document.getElementById("dragbar").addEventListener("mousedown",function(t){dragStart(t)}),document.getElementById("dragbar").addEventListener("touchstart",function(t){dragStart(t)}),window.addEventListener("mousemove",function(t){dragMove(t)}),window.addEventListener("touchmove",function(t){dragMove(t)}),window.addEventListener("mouseup",dragEnd),window.addEventListener("touchend",dragEnd)}catch(t){bitcompiler.doDebug("error","gui.js",null,"windowOnloadScripts()","Couldn't add dragbar events",t.message)}manageSaveIndicator()}function newFile(t){try{if(t)htmlEditorData.editor.setValue("");else{var e=$(".default-template").val();e=CryptoJS.AES.decrypt(e,htmlEditorData.cryptKey,256).toString(CryptoJS.enc.Utf8),htmlEditorData.editor.setValue(e)}var a=window.location.href.substr(0,window.location.href.length-window.location.search.length);history.pushState(null,"",a),htmlEditorData.userInput.decrypted.filename=null,$("#inline-frame-wrapper").html(""),manageSaveIndicator(),setFocus()}catch(t){bitcompiler.doDebug("error","gui.js",null,"newFile()","Couldn't create new file",t.message)}}function downloadAsHTMLFile(){try{var t=htmlEditorData.editor?htmlEditorData.editor.getValue():document.getElementById("textarea-code").value;if(t){var e=(new bitcompiler.Common).getURLParameterValue("filename");if(!e){if(null===(e=prompt("Please enter file name (optional)","")))return;(e=e.trim())?htmlEditorData.userInput.decrypted.filename=e.replace(/[^a-z0-9]+/gi,"-").replace(/^-*|-*$/g,"").toLowerCase():e=(new Date).getTime().toString()}var a={fileName:e+".html",fileContent:t,type:"text/html"};(new bitcompiler.Common).downloadFile(a)}else alert("Nothing to download!!!");return!1}catch(t){bitcompiler.doDebug("error","gui.js",null,"downloadAsHTMLFile()","Couldn't download the file",t.message)}}function save(t){try{var e=htmlEditorData.editor?htmlEditorData.editor.getValue():document.getElementById("textarea-code").value,a=(new bitcompiler.Common).getURLParameterValue("filename");if(a&&!t)htmlEditorData.userInput.decrypted.filename=a,setEditorDataToLocalStorage(htmlEditorData.userInput.decrypted.filename,e);else if(null!==(a=prompt("Please enter file name (optional)",""))){if(a=a.trim()){if(htmlEditorData.userInput.decrypted.filename=a.replace(/[^a-z0-9]+/gi,"-").replace(/^-*|-*$/g,"").toLowerCase(),null!==getEditorDataFromLocalStorage(htmlEditorData.userInput.decrypted.filename)){var r="File name '"+a+"' already exists.\nDo you want to replace it?";if(!1===confirm(r))return void save()}}else{var i=new Date;htmlEditorData.userInput.decrypted.filename=i.getTime().toString()}(new bitcompiler.Common).setURLParameter("filename",htmlEditorData.userInput.decrypted.filename),setEditorDataToLocalStorage(htmlEditorData.userInput.decrypted.filename,e)}historyManager()}catch(t){bitcompiler.doDebug("error","gui.js",null,"save()","Couldn't save the script",t.message)}}function run(){try{$("#inline-frame-wrapper").html(""),htmlEditorData.editor&&htmlEditorData.editor.save();var t=htmlEditorData.editor?htmlEditorData.editor.getValue():document.getElementById("textarea-code").value;if(!t)return;var e=document.createElement("iframe");e.setAttribute("frameborder","0"),e.setAttribute("id","inline-frame-output"),e.setAttribute("name","inline-frame-output"),document.getElementById("inline-frame-wrapper").innerHTML="",document.getElementById("inline-frame-wrapper").appendChild(e);var a=e.contentWindow?e.contentWindow:e.contentDocument.document?e.contentDocument.document:e.contentDocument;a.document.open(),a.document.write(t),a.document.close(),a.document.body&&!a.document.body.isContentEditable&&(a.document.body.contentEditable=!0,a.document.body.contentEditable=!1),setFocus()}catch(t){bitcompiler.doDebug("error","gui.js",null,"run()","Couldn't run the script",t.message)}}function historyDataToBootstrapTable(t,e,a,r,i,o){var n={jsonData:e?e.content:e,hideFields:r||[],serialNo:{enabled:!0,slno:1},additionalColumnData:{values:a||[]},callback:{error:function(t){}}};return"function"==typeof i&&(n.callback.beforeRowCreation=function(t,e,a){i(t,e,a)}),"function"==typeof o&&(n.callback.afterRowCreation=function(t,e){o(t,e)}),t.BitCompiler().jsonToBootstrapTable(n),n}function historyPagination(t,e,a){var r={totalPages:t?t.totalPages:0,visiblePages:t?t.visiblePages:0,forceCreate:!!a,ajaxSettings:null,callback:{beforeSendRequest:function(t,e){var a=prepareDataForHistoryView(t=parseInt(t));$container.find(".history-wrapper").find("table.table").BitCompiler().reloadTable({reload:{page:t,pageSize:a.pageSize,data:a.content},tableOptions:htmlEditorData.history.tableOptions})}}};return $container.find(".history-pagination").BitCompiler().pagination(r),r}function loadHistoryDataToView(){htmlEditorData.localStorage.isDataUpdated&&(htmlEditorData.localStorage.isDataUpdated=!1,htmlEditorData.localStorage.wholeData=htmlEditorData.storage.getAll(htmlEditorData.localStorage.keyPrefix))}function prepareDataForHistoryView(t){var e={};if(e.visiblePages=10,e.pageSize=1,e.all=htmlEditorData.localStorage.wholeData,e.currentPageNo=t,e.totalPages=Math.ceil(e.all.length/e.pageSize),e.content=[],t<0||isNaN(t)||0===htmlEditorData.localStorage.wholeData.length)return e;for(var a=t?t*e.pageSize-e.pageSize:0,r=a;r30?e.fileName.substr(0,30)+"...":e.fileName,e.action=' | ',a(e)}),$('[data-toggle="tooltip"]').tooltip(),htmlEditorData.history.paginationOptions=historyPagination(t,htmlEditorData.history.tableOptions,!0)}}function toggleHistoryView(){$(".history-wrapper").is(":hidden")?($(".history-wrapper .table-responsive").html(""),$(".history-wrapper").slideDown(function(){$(".history-wrapper .table-responsive").html(''),historyManager(),moveDragbar()})):hideHistoryView()}function hideHistoryView(){$(".history-wrapper").slideUp(function(){moveDragbar()})}function openHistory(t){var e=JSON.parse($(t).closest("tr").find("td.data-json").find("textarea.data").val());(new bitcompiler.Common).setURLParameter("filename",e.fileName),htmlEditorData.userInput.decrypted.filename=e.fileName,htmlEditorData.editor.setValue(e.fileData),$(".run").trigger("click")}function clearHistory(t){try{var e=null!==t?"Are you sure you want to delete this file?":"Are you sure you want to remove all files?";if(!0===confirm(e)){var a=null;if(t&&(a=(i=JSON.parse($(t).closest("tr").find("td.data-json").find("textarea.data").val())).fileName),removeEditorDataFromLocalStorage(a),loadHistoryDataToView(),htmlEditorData.localStorage.wholeData.length){var r=$container.find(".history-pagination").BitCompiler().pagination("getCurrentPageNumber"),i=prepareDataForHistoryView(r);$container.find(".history-wrapper").find("table.table").BitCompiler().reloadTable({reload:{page:i.currentPageNo,pageSize:i.pageSize,data:i.content},tableOptions:htmlEditorData.history.tableOptions}),htmlEditorData.history.paginationOptions.totalPages=i.totalPages,htmlEditorData.history.paginationOptions.currentPageNo=r,htmlEditorData.history.paginationOptions.initiateStartPageClick=0===htmlEditorData.localStorage.wholeData.length,$container.find(".history-pagination").BitCompiler().pagination(htmlEditorData.history.paginationOptions)}else historyManager();if(a&&htmlEditorData.userInput.decrypted.filename&&htmlEditorData.userInput.decrypted.filename.toString()!==a.toString())return;newFile(!0)}}catch(t){bitcompiler.doDebug("error","gui.js",null,"clearHistory()","Couldn't clear editor data from localstorage",t.message)}}function setSizeData(){htmlEditorData.height.menubar=$(".menubar").innerHeight(),htmlEditorData.height.wrapper=$(window).innerHeight()-htmlEditorData.height.menubar}function onResizeEvent(){htmlEditorData.event="resize",setSizeData(),changeOrientation(getOrientation($(".change-orientation")))}function getOrientation(t){return!htmlEditorData.orientationButton.clickedStatus&&$(window).innerWidth()=htmlEditorData.window.maxWidth?htmlEditorData.orientation="V":htmlEditorData.orientationButton.clickedStatus&&"click"===htmlEditorData.event&&(htmlEditorData.orientation="V"===htmlEditorData.orientation?"H":"V"),$(t).data("orientation",htmlEditorData.orientation),htmlEditorData}function onClickChangeOrientation(t){htmlEditorData.event="click",htmlEditorData.orientationButton.clickedStatus=!0,htmlEditorData=getOrientation(t),changeOrientation(),setSizeData()}function changeOrientation(){"H"===htmlEditorData.orientation?($(".change-orientation").html(''),$(".textarea-wrapper-col").css({"margin-bottom":"9px","padding-right":"15px"}),$(".inline-frame-col").css({"padding-left":"15px"}),htmlEditorData.orientationButton.clickedStatus&&$(".textarea-wrapper-col,.inline-frame-col").removeClass("col-md-6 col-sm-6 col-xs-6").addClass("col-md-12 col-sm-12 col-xs-12"),$(".textarea-wrapper-col,.textarea-code,.textarea-wrapper,#inline-frame-wrapper").height((htmlEditorData.height.wrapper-20)/2),setEditorSizeByXYPosition(null,$(".textarea-wrapper-container").innerHeight()/2)):"V"===htmlEditorData.orientation&&($(".change-orientation").html(''),$(".textarea-wrapper-col").css({"margin-bottom":"0px","padding-right":"5px"}),$(".inline-frame-col").css({"padding-left":"5px"}),htmlEditorData.orientationButton.clickedStatus&&$(".textarea-wrapper-col,.inline-frame-col").removeClass("col-md-12 col-sm-12 col-xs-12").addClass("col-md-6 col-sm-6 col-xs-6"),setEditorSizeByXYPosition($(window).innerWidth()/2,null)),setTimeout(function(){createDragbar()},100)}function share(){$(".share-wrapper").is(":hidden")?$(".share-wrapper").slideDown(function(){moveDragbar()}):hideShareView()}function hideShareView(){$(".share-wrapper").slideUp(function(){moveDragbar()})}function dragStart(t){$("#dragbar").data("is-dragging",!0),htmlEditorData.draggingData.previousMousePosition.x=t.pageX,htmlEditorData.draggingData.previousMousePosition.y=t.pageY}function dragMove(t){!$("#dragbar").data("is-dragging")||htmlEditorData.draggingData.previousMousePosition.x===t.pageX&&htmlEditorData.draggingData.previousMousePosition.y===t.pageY||($("#dragging-overlay").show(),setEditorSizeByXYPosition(t.pageX,t.pageY-$(".textarea-wrapper-container").offset().top),moveDragbar())}function dragEnd(t){$("#dragbar").data("is-dragging")&&($("#dragbar").data("is-dragging",!1),$("#dragging-overlay").hide())}function createDragbar(){try{setDragColumnDimensions(),$("#dragbar").css({width:"0px",height:"0px",top:"0",left:"0"}),"H"===htmlEditorData.orientation?(htmlEditorData.draggingData.dragbar.height=12,htmlEditorData.draggingData.dragbar.width=htmlEditorData.draggingData.column.width+2,htmlEditorData.draggingData.dragbar.left=htmlEditorData.draggingData.column.left,htmlEditorData.draggingData.dragbar.top=htmlEditorData.draggingData.column.top+htmlEditorData.draggingData.column.height,$("#dragbar").offset({top:htmlEditorData.draggingData.dragbar.top,left:htmlEditorData.draggingData.dragbar.left}),$("#dragbar").css({width:htmlEditorData.draggingData.dragbar.width+"px",height:htmlEditorData.draggingData.dragbar.height+"px",cursor:"row-resize"})):"V"===htmlEditorData.orientation&&(htmlEditorData.draggingData.dragbar.width=12,htmlEditorData.draggingData.dragbar.height=htmlEditorData.draggingData.column.height+2,htmlEditorData.draggingData.dragbar.left=htmlEditorData.draggingData.column.left+htmlEditorData.draggingData.column.width,htmlEditorData.draggingData.dragbar.top=htmlEditorData.draggingData.column.top,$("#dragbar").css({width:htmlEditorData.draggingData.dragbar.width+"px",height:htmlEditorData.draggingData.dragbar.height+"px",cursor:"col-resize"}),$("#dragbar").offset({top:htmlEditorData.draggingData.dragbar.top,left:htmlEditorData.draggingData.dragbar.left})),showOutputResolutionInfo(),$("#dragbar").data("is-dragging",!1),$("#dragbar").show()}catch(t){bitcompiler.doDebug("error","gui.js",null,"createDragbar()","Couldn't create dragbar",t.message)}}function moveDragbar(){try{setDragColumnDimensions(),"H"===htmlEditorData.orientation?(htmlEditorData.draggingData.column.height=$(".textarea-wrapper").innerHeight(),htmlEditorData.draggingData.column.top=$(".textarea-wrapper").offset().top,htmlEditorData.draggingData.dragbar.top=htmlEditorData.draggingData.column.top+htmlEditorData.draggingData.column.height,$("#dragbar").offset({top:htmlEditorData.draggingData.dragbar.top})):"V"===htmlEditorData.orientation&&(htmlEditorData.draggingData.dragbar.left=htmlEditorData.draggingData.column.left+htmlEditorData.draggingData.column.width,$("#dragbar").offset({top:htmlEditorData.draggingData.column.top,left:htmlEditorData.draggingData.dragbar.left}))}catch(t){bitcompiler.doDebug("error","gui.js",null,"moveDragbar()","Couldn't move dragbar",t.message)}}function setEditorSizeByXYPosition(t,e){try{if($(".textarea-wrapper-container,.textarea-wrapper-row").css({height:htmlEditorData.height.wrapper-10+"px"}),"H"===htmlEditorData.orientation){var a=e/$(".textarea-wrapper-container").innerHeight()*100,r=100-a,i=$(".textarea-wrapper-container").innerHeight()*(a/100)-4.5,o=$(".textarea-wrapper-container").innerHeight()*(r/100)-4.5;if(i<50||o<50)return;$(".textarea-wrapper-col").css({width:"100%",height:i+"px"}),$(".textarea-wrapper,.textarea-code").css({width:"100%",height:"100%"}),$(".inline-frame-col").css({width:"100%",height:o+"px"}),$("#inline-frame-wrapper,#inline-frame-output").css({width:"100%",height:"100%"})}else if("V"===htmlEditorData.orientation){var n=t/$(window).innerWidth()*100,l=100-n,d=$(window).innerWidth()*(n/100)-15,s=$(window).innerWidth()*(l/100)-15;if(d<50||s<50)return;$(".textarea-wrapper-col").css({width:n+"%",height:"100%"}),$(".textarea-wrapper,.textarea-code").css({width:"100%",height:"100%"}),$(".inline-frame-col").css({width:l+"%",height:"100%"}),$("#inline-frame-wrapper,#inline-frame-output").css({width:"100%",height:"100%"})}showOutputResolutionInfo()}catch(t){bitcompiler.doDebug("error","gui.js",null,"setEditorSizeByXYPosition()","Couldn't set editor X,Y positions",t.message)}}function showOutputResolutionInfo(){$(".output-resolution").html(""+Math.ceil($("#inline-frame-wrapper").innerWidth())+" x "+Math.ceil($("#inline-frame-wrapper").innerHeight())+"")}function setDragColumnDimensions(){$("#dragbar").is(":visible")&&($("#dragbar").data("is-dragbar-hidden",!0),$("#dragbar").hide()),htmlEditorData.draggingData.column.width=$(".textarea-wrapper").innerWidth(),htmlEditorData.draggingData.column.height=$(".textarea-wrapper").innerHeight(),htmlEditorData.draggingData.column.top=$(".textarea-wrapper").offset().top,htmlEditorData.draggingData.column.left=$(".textarea-wrapper").offset().left,$("#dragbar").data("is-dragbar-hidden")&&($("#dragbar").show(),$("#dragbar").removeAttr("is-dragbar-hidden"))}function manageSaveIndicator(){var t=(new bitcompiler.Common).getURLParameterValue("filename"),e=htmlEditorData.editor?htmlEditorData.editor.getValue():document.getElementById("textarea-code").value;t?getEditorDataFromLocalStorage(t)!==e?($(".save-indicator").html('').show(),$container.find(".dropdown-menu a[class='save']").BitCompiler().setDisabled(!1)):($(".save-indicator").html("").hide(),$container.find(".dropdown-menu a[class='save']").BitCompiler().setDisabled(!0)):e.length?($(".save-indicator").html('').show(),$container.find(".dropdown-menu a[class='save']").BitCompiler().setDisabled(!1)):($(".save-indicator").html("").hide(),$container.find(".dropdown-menu a[class='save']").BitCompiler().setDisabled(!0))}function setFocus(){htmlEditorData.editor?(htmlEditorData.editor.focus(),htmlEditorData.editor.setCursor(htmlEditorData.editor.lineCount(),0)):$("#textarea-code").focus()}function autoFormat(){var t=htmlEditorData.editor.lineCount();htmlEditorData.editor.autoFormatRange({line:0,ch:0},{line:t-1,ch:htmlEditorData.editor.getLine(t-1).length})}function setEditorDataToLocalStorage(t,e){try{if(!t)return;$(".save-indicator").html("").hide(),$(".save-indicator").text("Saving...").show(),htmlEditorData.storage.isAvailable()||!0===confirm("Browser storage is full. Are you sure you want to clear history?")&&removeEditorDataFromLocalStorage(null),htmlEditorData.localStorage.keyName=htmlEditorData.localStorage.keyPrefix?htmlEditorData.localStorage.keyPrefix+"-"+t:t,htmlEditorData.localStorage.editor.fileName=t,htmlEditorData.localStorage.editor.fileData=e;var a=htmlEditorData.storage.get(htmlEditorData.localStorage.keyName);if(a){try{a=(new bitcompiler.Validation).isJSON(CryptoJS.AES.decrypt(a,htmlEditorData.cryptKey,256).toString(CryptoJS.enc.Utf8))}catch(t){bitcompiler.doDebug("error","app.js",null,"setEditorDataToLocalStorage()","Couldn't decrypt data",t.message),a=!1}htmlEditorData.localStorage.editor.createTime=a?a.createTime:(new Date).getTime(),htmlEditorData.localStorage.editor.lastUpdateTime=(new Date).getTime()}else htmlEditorData.localStorage.editor.createTime=(new Date).getTime(),htmlEditorData.localStorage.editor.lastUpdateTime=null;htmlEditorData.localStorage.isDataUpdated=!0,htmlEditorData.localStorage.keyValue=CryptoJS.AES.encrypt(JSON.stringify(htmlEditorData.localStorage.editor),htmlEditorData.cryptKey,256),htmlEditorData.storage.set(htmlEditorData.localStorage.keyName,htmlEditorData.localStorage.keyValue),null!==htmlEditorData.saveIndicator.timer.id&&clearTimeout(htmlEditorData.saveIndicator.timer.id),htmlEditorData.saveIndicator.timer.id=setTimeout(function(){$(".save-indicator").text("Saved").fadeOut(500,function(){manageSaveIndicator()})},htmlEditorData.saveIndicator.timer.timeout)}catch(t){bitcompiler.doDebug("error","app.js",null,"setEditorDataToLocalStorage()","Couldn't set data to localstorage",t.message)}}function getEditorDataFromLocalStorage(t){try{if(!t)return null;var e=null!==htmlEditorData.localStorage.keyPrefix?htmlEditorData.localStorage.keyPrefix+"-"+t:t,a=htmlEditorData.storage.get(e);if(!a)return null;if(!htmlEditorData.localStorage.keyPrefix)return a;var r=null;try{r=(new bitcompiler.Validation).isJSON(CryptoJS.AES.decrypt(a,htmlEditorData.cryptKey,256).toString(CryptoJS.enc.Utf8))}catch(t){bitcompiler.doDebug("error","app.js",null,"getEditorDataFromLocalStorage()","Couldn't decrypt data",t.message),r=!1}return r?r.fileData:r}catch(t){return bitcompiler.doDebug("error","app.js",null,"getEditorDataFromLocalStorage()","Couldn't get editor data from storage",t.message),null}}function removeEditorDataFromLocalStorage(t){try{if(t)t=htmlEditorData.localStorage.keyPrefix?htmlEditorData.localStorage.keyPrefix+"-"+t:t,htmlEditorData.storage.remove(t);else if(htmlEditorData.localStorage.keyPrefix)for(var e=0;e=e.assets[a].files.length)return void populateCDNCertainLibraryFilenames(1,20,e.assets[a].files,t);$(this).closest(".well").find("#cdn-certain-library-filenames-pagination").twbsPagination({totalPages:r,visiblePages:10,onPageClick:function(r,i){populateCDNCertainLibraryFilenames(i,20,e.assets[a].files,t)}});break}});try{var clipboard=new Clipboard(".cdn-wrapper .btn",{text:function(t){var e=t.getAttribute("data-clipboard-target");if(e){var a=$(e).text();return-1===a.indexOf(".js")?-1!==a.indexOf(".css")?'':a:'