Welcome to mirror list, hosted at ThFree Co, Russian Federation.

editor.js.map « build - github.com/nextcloud/files_texteditor.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: df504c9ee528116cbf9ab4408e0967def321592b (plain)
1
{"version":3,"sources":["webpack:///webpack/bootstrap 8c6dcde47d648a4e0ab0","webpack:///./js/ImportAce.js","webpack:///./js/SyntaxMode.js","webpack:///./js/editor.js","webpack:///./js/index.js","webpack:///./js/newfileplugin.js","webpack:///./js/sidebarpreview.js","webpack:///./js/supported_mimetypes.json"],"names":["parentJsonpFunction","window","chunkIds","moreModules","executeModules","moduleId","chunkId","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","shift","installedModules","30","__webpack_require__","exports","module","l","e","installedChunkData","Promise","resolve","promise","reject","head","document","getElementsByTagName","script","createElement","type","charset","async","timeout","nc","setAttribute","src","p","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","setTimeout","onScriptComplete","onerror","onload","clearTimeout","chunk","Error","undefined","appendChild","m","c","d","name","getter","o","defineProperty","configurable","enumerable","get","n","__esModule","object","property","oe","err","console","error","s","__webpack_exports__","then","bind","extension","filetype","loaders","$","when","supportedMimeTypes","ace","Texteditor","$container","editor","file","edited","mtime","dir","writeable","mime","size","saving","currentContext","saveTimer","oldTitle","saveMessageTimeout","previewPlugins","registerPreviewPlugin","mimeType","plugin","this","previewPluginsLoaded","preview","previewPluginOnChange","_onSaveTrigger","$message","find","text","t","show","saveFile","aceEditor","getSession","getValue","data","title","css","fadeOut","message","focus","_onCloseTrigger","hideEditor","OC","Notification","showTemporary","closeEditor","on","_onReOpenTrigger","_onEditorTrigger","filename","context","_this","fileList","__WEBPACK_IMPORTED_MODULE_1__ImportAce__","_ace","loadEditor","history","pushState","_onEdit","_onUnsaved","initialize","container","registerFileActions","_this2","forEach","OCA","Files","fileActions","registerAction","actionHandler","permissions","PERMISSION_READ","icon","imagePath","setDefault","_self","html","append","loadFile","removeClass","configureACE","loadControlBar","setupAutosave","bindVisibleActions","addClass","replace","_","debounce","element","loadPreviewPlugin","resize","loadPreviewControlBar","dialogs","alert","Deferred","init","escapeHTML","controlBar","before","setFilenameMaxLength","bindControlBar","setPreviewMode","mode","makeButton","tooltip","active","button","placement","delay","hide","click","attr","controls","after","unloadControlBar","remove","width","outerWidth","onpopstate","location","hash","substr","edit","setNewLineMode","setShowPrintMargin","setUseWrapMode","setReadOnly","setEditorSyntaxMode","split","setTheme","commands","addCommand","bindKey","win","mac","sender","exec","removeCommand","byName","transposeletters","__WEBPACK_IMPORTED_MODULE_0__SyntaxMode__","setMode","success","failure","generateUrl","done","filecontents","fail","jqXHR","JSON","parse","responseText","path","ajax","url","unBindVisibleActions","fileInfoModel","getModelForFile","set","etag","_onClickDocument","event","target","closest","unbind","__WEBPACK_IMPORTED_MODULE_2__newfileplugin__","filePath","querySelector","getAttribute","Files_Texteditor","__WEBPACK_IMPORTED_MODULE_1__editor__","Plugins","register","__WEBPACK_IMPORTED_MODULE_0__sidebarpreview__","ready","newFileMenuPlugin","attach","menu","id","addMenuEntry","displayName","templateName","iconClass","fileType","getCurrentDirectory","createFile","SidebarPreview","_classCallCheck","_createClass","key","value","manager","handler","handlePreview","addPreviewHandler","model","$thumbnailDiv","$thumbnailContainer","fallback","previewWidth","parent","previewHeight","getFileContent","getFullPath","content","$editorDiv","children","imports","parts","slice","join","headers","Range"],"mappings":"aACA,IAAAA,EAAAC,OAAA,uBACAA,OAAA,gCAAAC,EAAAC,EAAAC,GAIA,IADA,IAAAC,EAAAC,EAAAC,EAAA,EAAAC,KACQD,EAAAL,EAAAO,OAAoBF,IAC5BD,EAAAJ,EAAAK,GACAG,EAAAJ,IACAE,EAAAG,KAAAD,EAAAJ,GAAA,IAEAI,EAAAJ,GAAA,EAEA,IAAAD,KAAAF,EACAS,OAAAC,UAAAC,eAAAC,KAAAZ,EAAAE,KACAW,EAAAX,GAAAF,EAAAE,IAIA,IADA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jH,SAAS,SAC7BiH,EAAoBjH,SAAS,QAC7B,IAAMyH,EAAahN,EAAE,8BACrBgN,EAAWlL,KAAKiL,GAChBR,EAAcU,SAAS,cAAc3F,SACrCiF,EAAcvH,OAAOgI,GACrB9S,OAAAsJ,EAAA,EAAAtJ,GAAYyF,KAAK,SAACuN,GACjB,IAAM5M,EAAS4M,EAAQrF,KAAK,kBAC5BvH,EAAO2H,aAAY,IAEW,cAA1BqE,EAAMtN,IAAI,YACO9E,OAAA6O,EAAA,EAAA7O,CAAc,QAGdA,OAAA6O,EAAA,EAAA7O,CACnBoS,EAAMtN,IAAI,QAAQmJ,MAAM,KAAKmE,EAAMtN,IAAI,QAAQmJ,MAAM,KAAKpO,OAAS,KAGnD4F,KAAK,SAAU8G,GAC5BA,GACHnG,EAAO6B,aAAa6G,QAApB,YAAwCvC,KAI1C/L,EAAAI,EAAA,GAAA6E,KAAAjF,EAAAkF,KAAA,8CAA6BD,KAAK,WACjCW,EAAO8H,SAAS,sBAEjB4E,EAAWzK,IAAI,SAAUqK,GACzBI,EAAWzK,IAAI,QAASmK,MAEvB,WACFD,SA5CHT,IAAA,iBAAAC,MAAA,SAgDiBtC,GACf,IAAMwD,EAAQxD,EAAKxB,MAAM,KACnBzH,EAAMyM,EAAMC,MAAM,GAAI,GAAGC,KAAK,IAC9B9M,EAAO4M,EAAMC,OAAO,GAAGC,KAAK,IAElC,OAAOrN,EAAE4J,MACRC,IAAKhH,GAAGsG,YAAY,wCACpB9G,MACCe,SAAU7C,EACVG,IAAKA,GAEN4M,SACCC,MAAS,uBA5Db1B,EAAA,kDChBAjR,EAAAD,SAAA","file":"editor.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonpTexteditor\"];\n \twindow[\"webpackJsonpTexteditor\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t30: 0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n \t// This file contains only the entry chunk.\n \t// The chunk loading function for additional chunks\n \t__webpack_require__.e = function requireEnsure(chunkId) {\n \t\tvar installedChunkData = installedChunks[chunkId];\n \t\tif(installedChunkData === 0) {\n \t\t\treturn new Promise(function(resolve) { resolve(); });\n \t\t}\n\n \t\t// a Promise means \"currently loading\".\n \t\tif(installedChunkData) {\n \t\t\treturn installedChunkData[2];\n \t\t}\n\n \t\t// setup Promise in chunk cache\n \t\tvar promise = new Promise(function(resolve, reject) {\n \t\t\tinstalledChunkData = installedChunks[chunkId] = [resolve, reject];\n \t\t});\n \t\tinstalledChunkData[2] = promise;\n\n \t\t// start chunk loading\n \t\tvar head = document.getElementsByTagName('head')[0];\n \t\tvar script = document.createElement('script');\n \t\tscript.type = \"text/javascript\";\n \t\tscript.charset = 'utf-8';\n \t\tscript.async = true;\n \t\tscript.timeout = 120000;\n\n \t\tif (__webpack_require__.nc) {\n \t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n \t\t}\n \t\tscript.src = __webpack_require__.p + \"\" + ({\"1\":\"markdown-mode\",\"2\":\"php-mode\",\"3\":\"html-mode\",\"4\":\"svg-mode\",\"5\":\"xml-mode\",\"6\":\"scala-mode\",\"7\":\"lua-mode\",\"8\":\"json-mode\",\"9\":\"js-mode\",\"10\":\"java-mode\",\"11\":\"groovy-mode\",\"12\":\"css-mode\",\"13\":\"coffee-mode\",\"14\":\"ace\",\"15\":\"textile-mode\",\"16\":\"sql-mode\",\"17\":\"sh-mode\",\"18\":\"scss-mode\",\"19\":\"scad-mode\",\"20\":\"rb-mode\",\"21\":\"py-mode\",\"22\":\"ps1-mode\",\"23\":\"pl-mode\",\"24\":\"ml-mode\",\"25\":\"less-mode\",\"26\":\"latex-mode\",\"27\":\"cs-mode\",\"28\":\"h-mode\",\"29\":\"bat-mode\"}[chunkId]||chunkId) + \".bundle.js\";\n \t\tvar timeout = setTimeout(onScriptComplete, 120000);\n \t\tscript.onerror = script.onload = onScriptComplete;\n \t\tfunction onScriptComplete() {\n \t\t\t// avoid mem leaks in IE.\n \t\t\tscript.onerror = script.onload = null;\n \t\t\tclearTimeout(timeout);\n \t\t\tvar chunk = installedChunks[chunkId];\n \t\t\tif(chunk !== 0) {\n \t\t\t\tif(chunk) {\n \t\t\t\t\tchunk[1](new Error('Loading chunk ' + chunkId + ' failed.'));\n \t\t\t\t}\n \t\t\t\tinstalledChunks[chunkId] = undefined;\n \t\t\t}\n \t\t};\n \t\thead.appendChild(script);\n\n \t\treturn promise;\n \t};\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./js/index.js\");\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 8c6dcde47d648a4e0ab0","/*\n * @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n *\n * @author Julius Härtl <jus@bitgrid.net>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\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 Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nexport default function() {\n\treturn import(/* webpackChunkName: \"ace\" */'brace')\n}\n\n\n\n// WEBPACK FOOTER //\n// ./js/ImportAce.js","const filetype = {};\n// add file extensions like this: filetype[\"extension\"] = \"filetype\":\nfiletype[\"bat\"] = \"batchfile\";\nfiletype[\"cmd\"] = \"batchfile\";\nfiletype[\"h\"] = \"c_cpp\";\nfiletype[\"c\"] = \"c_cpp\";\nfiletype[\"clj\"] = \"clojure\";\nfiletype[\"coffee\"] = \"coffee\"; // coffescript can be compiled to javascript\nfiletype[\"cpp\"] = \"c_cpp\";\nfiletype[\"cs\"] = \"csharp\";\nfiletype[\"css\"] = \"css\";\nfiletype[\"groovy\"] = \"groovy\";\nfiletype[\"htm\"] = \"html\";\nfiletype[\"html\"] = \"html\";\nfiletype[\"tt\"] = \"html\";\nfiletype[\"java\"] = \"java\";\nfiletype[\"js\"] = \"javascript\";\nfiletype[\"jsm\"] = \"javascript\";\nfiletype[\"json\"] = \"json\";\nfiletype[\"latex\"] = \"latex\";\nfiletype[\"tex\"] = \"latex\";\nfiletype[\"less\"] = \"less\";\nfiletype[\"ly\"] = \"latex\";\nfiletype[\"ily\"] = \"latex\";\nfiletype[\"lua\"] = \"lua\";\nfiletype[\"markdown\"] = \"markdown\";\nfiletype[\"md\"] = \"markdown\";\nfiletype[\"mdown\"] = \"markdown\";\nfiletype[\"mdwn\"] = \"markdown\";\nfiletype[\"mkd\"] = \"markdown\";\nfiletype[\"ml\"] = \"ocaml\";\nfiletype[\"mli\"] = \"ocaml\";\nfiletype[\"pl\"] = \"perl\";\nfiletype[\"php\"] = \"php\";\nfiletype[\"ps1\"] = \"powershell\";\nfiletype[\"py\"] = \"python\";\nfiletype[\"rb\"] = \"ruby\";\nfiletype[\"scad\"] = \"scad\"; // seems to be something like 3d model files printed with e.g. reprap\nfiletype[\"scala\"] = \"scala\";\nfiletype[\"scss\"] = \"scss\"; // \"sassy css\"\nfiletype[\"sh\"] = \"sh\";\nfiletype[\"sql\"] = \"sql\";\nfiletype[\"svg\"] = \"svg\";\nfiletype[\"textile\"] = \"textile\"; // related to markdown\nfiletype[\"xml\"] = \"xml\";\n\nconst loaders = {};\n// add loader like this: loaders[\"filetype\"] = () => require(\"promise?brace/mode/filetype\"):\n\n// note that these require statements can't be generated from the filetypes dynamically\n// to make sure webpack can analyse our dependencies\nloaders[\"batchfile\"] = () => import(\n\t/* webpackChunkName: \"bat-mode\" */\n\t\"brace/mode/batchfile\"\n\t);\nloaders[\"c_cpp\"] = () => import(\n\t/* webpackChunkName: \"h-mode\" */\n\t\"brace/mode/c_cpp\"\n\t);\nloaders[\"coffee\"] = () => import\n\t/* webpackChunkName: \"coffee-mode\" */(\n\t\"brace/mode/coffee\"\n\t);\nloaders[\"cs\"] = () => import(\n\t/* webpackChunkName: \"cs-mode\" */\n\t\"brace/mode/csharp\"\n\t);\nloaders[\"css\"] = () => import(\n\t/* webpackChunkName: \"css-mode\" */\n\t\"brace/mode/css\"\n\t);\nloaders[\"groovy\"] = () => import\n\t/* webpackChunkName: \"groovy-mode\" */(\n\t\"brace/mode/groovy\"\n\t);\nloaders[\"html\"] = () => import(\n\t/* webpackChunkName: \"html-mode\" */\n\t\"brace/mode/html\"\n\t);\nloaders[\"java\"] = () => import(\n\t/* webpackChunkName: \"java-mode\" */\n\t\"brace/mode/java\"\n\t);\nloaders[\"javascript\"] = () => import(\n\t/* webpackChunkName: \"js-mode\" */\n\t\"brace/mode/javascript\"\n\t);\nloaders[\"json\"] = () => import(\n\t/* webpackChunkName: \"json-mode\" */\n\t\"brace/mode/json\"\n\t);\nloaders[\"latex\"] = () => import(\n\t/* webpackChunkName: \"latex-mode\" */\n\t\"brace/mode/latex\"\n\t);\nloaders[\"less\"] = () => import(\n\t/* webpackChunkName: \"less-mode\" */\n\t\"brace/mode/less\"\n\t);\nloaders[\"lua\"] = () => import(\n\t/* webpackChunkName: \"lua-mode\" */\n\t\"brace/mode/lua\"\n\t);\nloaders[\"markdown\"] = () => import(\n\t/* webpackChunkName: \"markdown-mode\" */\n\t\"brace/mode/markdown\"\n\t);\nloaders[\"ocaml\"] = () => import(\n\t/* webpackChunkName: \"ml-mode\" */\n\t\"brace/mode/ocaml\"\n\t);\nloaders[\"perl\"] = () => import(\n\t/* webpackChunkName: \"pl-mode\" */\n\t\"brace/mode/perl\"\n\t);\nloaders[\"php\"] = () => import(\n\t/* webpackChunkName: \"php-mode\" */\n\t\"brace/mode/php\"\n\t);\nloaders[\"powershell\"] = () => import(\n\t/* webpackChunkName: \"ps1-mode\" */\n\t\"brace/mode/powershell\"\n\t);\nloaders[\"python\"] = () => import(\n\t/* webpackChunkName: \"py-mode\" */\n\t\"brace/mode/python\"\n\t);\nloaders[\"ruby\"] = () => import(\n\t/* webpackChunkName: \"rb-mode\" */\n\t\"brace/mode/ruby\"\n\t);\nloaders[\"scad\"] = () => import(\n\t/* webpackChunkName: \"scad-mode\" */\n\t\"brace/mode/scad\"\n\t); // seems to be something like 3d model files printed with e.g. reprap\nloaders[\"scala\"] = () => import(\n\t/* webpackChunkName: \"scala-mode\" */\n\t\"brace/mode/scala\"\n\t);\nloaders[\"scss\"] = () => import(\n\t/* webpackChunkName: \"scss-mode\" */\n\t\"brace/mode/scss\"); // \"sassy css\"\nloaders[\"sh\"] = () => import(\n\t/* webpackChunkName: \"sh-mode\" */\n\t\"brace/mode/sh\"\n\t);\nloaders[\"sql\"] = () => import(\n\t/* webpackChunkName: \"sql-mode\" */\n\t\"brace/mode/sql\"\n\t);\nloaders[\"svg\"] = () => import(\n\t/* webpackChunkName: \"svg-mode\" */\n\t\"brace/mode/svg\"\n\t);\nloaders[\"textile\"] = () => import(\n\t/* webpackChunkName: \"textile-mode\" */\n\t\"brace/mode/textile\"); // related to markdown\nloaders[\"xml\"] = () => import(\n\t/* webpackChunkName: \"xml-mode\" */\n\t\"brace/mode/xml\"\n\t);\n\nexport function getSyntaxMode (extension) {\n\tconst type = filetype[extension];\n\tif (type) {\n\t\t// Then it must be in the array, so load the custom syntax mode\n\t\t// Set the syntax mode\n\t\treturn loaders[type]().then(() => {\n\t\t\treturn type;\n\t\t});\n\t}\n\n\treturn $.when();\n}\n\n\n\n// WEBPACK FOOTER //\n// ./js/SyntaxMode.js","import {getSyntaxMode} from './SyntaxMode';\nimport importAce from './ImportAce';\n\n/** @type array[] supportedMimeTypes */\nconst supportedMimeTypes = require('./supported_mimetypes.json');\n\nlet ace;\nexport const Texteditor = {\n\n\t/**\n\t * Holds the editor container\n\t */\n\t$container: null,\n\n\t/**\n\t * Holds the editor element ID\n\t */\n\teditor: 'editor',\n\n\t/**\n\t * Stores info on the file being edited\n\t */\n\tfile: {\n\t\tedited: false,\n\t\tmtime: null,\n\t\tdir: null,\n\t\tname: null,\n\t\twriteable: null,\n\t\tmime: null,\n\t\tsize: null\n\t},\n\n\t/**\n\t * Stored the saving state\n\t */\n\tsaving: false,\n\n\t/**\n\t * Current files app context\n\t */\n\tcurrentContext: null,\n\n\t/**\n\t * Stores the autosave timer\n\t */\n\tsaveTimer: null,\n\n\t/**\n\t * Stores the old page title\n\t */\n\toldTitle: null,\n\n\t/**\n\t * Stores the timeout for the saving message\n\t */\n\tsaveMessageTimeout: null,\n\n\t/**\n\t * preview plugins by mimetype\n\t */\n\tpreviewPlugins: {},\n\n\tregisterPreviewPlugin: function (mimeType, plugin) {\n\t\tthis.previewPlugins[mimeType] = plugin;\n\t},\n\n\tpreviewPluginsLoaded: {},\n\n\t/**\n\t * preview element\n\t */\n\tpreview: null,\n\n\tpreviewPluginOnChange: null,\n\n\t/**\n\t * Save handler, triggered by the button, or keyboard\n\t */\n\t_onSaveTrigger: function () {\n\t\t// Don't save if not edited\n\t\tif (!Texteditor.file.edited) {\n\t\t\treturn;\n\t\t}\n\t\t// Don't try to save twice\n\t\tif (Texteditor.saving) {\n\t\t\treturn;\n\t\t} else {\n\t\t\tTexteditor.saving = true;\n\t\t\tTexteditor.file.edited = false;\n\t\t}\n\n\t\t// Can any fade outs on the saving message\n\t\tclearTimeout(Texteditor.saveMessageTimeout);\n\n\t\t// Set the saving status\n\t\tvar $message = $('#editor_controls').find('small.saving-message');\n\t\t$message.text(t('files_texteditor', 'saving...'))\n\t\t\t.show();\n\t\t// Send to server\n\t\tTexteditor.saveFile(\n\t\t\twindow.aceEditor.getSession().getValue(),\n\t\t\tTexteditor.file,\n\t\t\tfunction (data) {\n\t\t\t\t// Yay\n\t\t\t\tif (Texteditor.file.edited == false) {\n\t\t\t\t\tdocument.title = Texteditor.file.name + ' - ' + Texteditor.oldTitle;\n\t\t\t\t\t$('small.unsaved-star').css('display', 'none');\n\t\t\t\t}\n\t\t\t\tTexteditor.file.mtime = data.mtime;\n\t\t\t\tTexteditor.file.size = data.size;\n\n\t\t\t\t$message.text(t('files_texteditor', 'saved!'));\n\t\t\t\tTexteditor.saveMessageTimeout = setTimeout(function () {\n\t\t\t\t\t$('small.saving-message').fadeOut(200);\n\t\t\t\t}, 2000);\n\t\t\t},\n\t\t\tfunction (message) {\n\t\t\t\t// Boo\n\t\t\t\tif (typeof message == 'undefined') {\n\t\t\t\t\t$('small.saving-message').text(t('files_texteditor', 'failed!'));\n\t\t\t\t} else {\n\t\t\t\t\t$('small.saving-message').text(message);\n\t\t\t\t}\n\t\t\t\tTexteditor.saveMessageTimeout = setTimeout(function () {\n\t\t\t\t\t$('small.saving-message').fadeOut(200);\n\t\t\t\t}, 5000);\n\t\t\t\tTexteditor.file.edited = true;\n\t\t\t}\n\t\t);\n\t\tTexteditor.saving = false;\n\t\twindow.aceEditor.focus();\n\t},\n\n\t/**\n\t * Handles on close button click\n\t */\n\t_onCloseTrigger: function () {\n\t\t// Hide or close?\n\t\tif (!Texteditor.file.edited) {\n\t\t\tTexteditor.closeEditor();\n\t\t} else {\n\t\t\t// Trick the autosave attempt into thinking we have no changes\n\t\t\tTexteditor.file.edited = false;\n\t\t\t// Hide the editor\n\t\t\tTexteditor.hideEditor();\n\t\t\t// Try to save\n\t\t\tTexteditor.saveFile(\n\t\t\t\twindow.aceEditor.getSession().getValue(),\n\t\t\t\tTexteditor.file,\n\t\t\t\tfunction () {\n\t\t\t\t\tOC.Notification.showTemporary(t(\n\t\t\t\t\t\t'files_texteditor',\n\t\t\t\t\t\t'Saved'\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t\t// Remove the editor\n\t\t\t\t\tTexteditor.closeEditor();\n\t\t\t\t},\n\t\t\t\tfunction () {\n\t\t\t\t\tOC.Notification.showTemporary(t(\n\t\t\t\t\t\t'files_texteditor',\n\t\t\t\t\t\t'There was a problem saving your changes. Click to resume editing.'\n\t\t\t\t\t));\n\t\t\t\t\t$('#notification').data('reopeneditor', true).on(\n\t\t\t\t\t\t'click',\n\t\t\t\t\t\tTexteditor._onReOpenTrigger\n\t\t\t\t\t);\n\t\t\t\t\tTexteditor.file.edited = true;\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t},\n\n\t/**\n\t * Handles the trigger or re open editor\n\t */\n\t_onReOpenTrigger: function () {\n\t\tif ($('#notification').data('reopeneditor') == true) {\n\t\t\tdocument.title = Texteditor.file.name + ' - ' + Texteditor.oldTitle;\n\t\t\tTexteditor.$container.show();\n\t\t}\n\t},\n\n\t/**\n\t * Handles the FileAction click event\n\t */\n\t_onEditorTrigger: function (filename, context) {\n\t\tthis.currentContext = context;\n\t\tthis.file.name = filename;\n\t\tthis.file.dir = context.dir;\n\t\tthis.fileList = context.fileList;\n\t\timportAce().then((_ace) => {\n\t\t\tace = _ace;\n\t\t\tthis.loadEditor(\n\t\t\t\tTexteditor.$container,\n\t\t\t\tTexteditor.file\n\t\t\t);\n\t\t\thistory.pushState({\n\t\t\t\tfile: filename,\n\t\t\t\tdir: context.dir\n\t\t\t}, 'Editor', '#editor');\n\t\t});\n\t},\n\n\t/**\n\t * Handler for edits detected\n\t */\n\t_onEdit: function () {\n\t\tif (!Texteditor.file.edited) {\n\t\t\tTexteditor.file.edited = true;\n\t\t\tif (!Texteditor.saving) {\n\t\t\t\tTexteditor._onUnsaved();\n\t\t\t}\n\t\t}\n\t\tif (this.previewPluginOnChange) {\n\t\t\tvar text = window.aceEditor.getSession().getValue();\n\t\t\tthis.previewPluginOnChange(text, this.preview);\n\t\t}\n\t},\n\n\t/**\n\t * Handler when unsaved work is detected\n\t */\n\t_onUnsaved: function () {\n\t\tdocument.title = '* ' + Texteditor.file.name + ' - ' + Texteditor.oldTitle;\n\t\t$('small.unsaved-star').css('display', 'inline-block');\n\t},\n\n\t/**\n\t * Setup on page load\n\t */\n\tinitialize: function (container) {\n\t\t// Don't load if not in the files app TODO: Fix for sharing\n\t\tif (!$('#content.app-files').length) {\n\t\t\treturn;\n\t\t}\n\t\tthis.$container = container;\n\t\tthis.registerFileActions();\n\t\tthis.oldTitle = document.title;\n\t},\n\n\t/**\n\t * Registers the file actions\n\t */\n\tregisterFileActions: function () {\n\t\tsupportedMimeTypes.forEach((mime) => {\n\t\t\tOCA.Files.fileActions.registerAction({\n\t\t\t\tname: 'Edit',\n\t\t\t\tmime: mime,\n\t\t\t\tactionHandler: this._onEditorTrigger.bind(this),\n\t\t\t\tpermissions: OC.PERMISSION_READ,\n\t\t\t\ticon: function () {\n\t\t\t\t\treturn OC.imagePath('core', 'actions/edit');\n\t\t\t\t}\n\t\t\t});\n\t\t\tOCA.Files.fileActions.setDefault(mime, 'Edit');\n\t\t});\n\t},\n\n\t/**\n\t * Actually fire up the editor in a container\n\t */\n\tloadEditor: function (container, file) {\n\t\tvar _self = this;\n\t\t// Insert the editor into the container\n\t\tcontainer.html(\n\t\t\t'<div id=\"editor_overlay\"></div>'\n\t\t\t+'<div id=\"editor_container\" class=\"icon-loading\">'\n\t\t\t+'<div id=\"editor_wrap\"><div id=\"editor\"></div>'\n\t\t\t+'<div id=\"preview_wrap\"><div id=\"preview\"></div></div></div></div>');\n\t\t$('#content').append(container);\n\n\t\t// Get the file data\n\t\tthis.loadFile(\n\t\t\tfile.dir,\n\t\t\tfile.name,\n\t\t\tfunction (file, data) {\n\t\t\t\t// Success!\n\t\t\t\t// Sort the title\n\t\t\t\tdocument.title = file.name + ' - ' + Texteditor.oldTitle;\n\t\t\t\t// Load ace\n\t\t\t\t$('#' + _self.editor).text(data);\n\t\t\t\t// Remove loading\n\t\t\t\t$('#editor_container').removeClass('icon-loading');\n\t\t\t\t// Configure ace\n\t\t\t\t_self.configureACE(file);\n\t\t\t\t// Show the controls\n\t\t\t\t_self.loadControlBar(file);\n\t\t\t\twindow.aceEditor.getSession().on('change', _self.setupAutosave);\n\t\t\t\t_self.bindVisibleActions();\n\t\t\t\twindow.aceEditor.focus();\n\n\t\t\t\tif (_self.previewPlugins[file.mime]) {\n\t\t\t\t\t_self.preview = container.find('#preview');\n\t\t\t\t\t_self.preview.addClass(file.mime.replace('/', '-'));\n\t\t\t\t\tcontainer.find('#editor_container').addClass('hasPreview');\n\t\t\t\t\t_self.previewPluginOnChange = _.debounce(function (text, element) {\n\t\t\t\t\t\t_self.loadPreviewPlugin(file.mime).then(function () {\n\t\t\t\t\t\t\t_self.previewPlugins[file.mime].preview(text, element);\n\t\t\t\t\t\t});\n\t\t\t\t\t}, 200);\n\t\t\t\t\tvar text = window.aceEditor.getSession().getValue();\n\t\t\t\t\t_self.previewPluginOnChange(text, _self.preview);\n\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\twindow.aceEditor.resize();\n\t\t\t\t\t}, 500);\n\t\t\t\t\t_self.loadPreviewControlBar();\n\t\t\t\t} else {\n\t\t\t\t\t_self.previewPluginOnChange = null;\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction (message) {\n\t\t\t\t// Oh dear\n\t\t\t\tOC.dialogs.alert(message, t('files_texteditor', 'An error occurred!'));\n\t\t\t\t_self.closeEditor();\n\t\t\t});\n\t},\n\n\tloadPreviewPlugin: function (mime) {\n\t\tif (this.previewPluginsLoaded[mime]) {\n\t\t\treturn $.Deferred().resolve().promise();\n\t\t}\n\t\tthis.previewPluginsLoaded[mime] = true;\n\t\tvar plugin = this.previewPlugins[mime];\n\t\treturn $.when(plugin.init());\n\t},\n\n\t/**\n\t * Load the editor control bar\n\t */\n\tloadControlBar: function (file) {\n\t\tvar html =\n\t\t\t'<small class=\"filename\">' + escapeHTML(file.name) + '</small>'\n\t\t\t+ '<small class=\"unsaved-star\" style=\"display: none\">*</small>'\n\t\t\t+ '<small class=\"saving-message\">'\n\t\t\t+ '</small>'\n\t\t\t+ '<button id=\"editor_close\" class=\"icon-close svg\"></button>';\n\t\tvar controlBar = $('<div id=\"editor_controls\"></div>').html(html);\n\t\t$('#editor_wrap').before(controlBar);\n\t\tthis.setFilenameMaxLength();\n\t\tthis.bindControlBar();\n\n\t},\n\n\tsetPreviewMode: function (mode) {\n\t\tvar container = $('#app-content-texteditor');\n\t\tvar controlBar = $('#preview_editor_controls');\n\t\tcontrolBar.find('button').removeClass('active');\n\t\tcontrolBar.find('button[data-type=\"' + mode + '\"]').addClass('active');\n\t\tswitch (mode) {\n\t\t\tcase 'mixed':\n\t\t\t\tcontainer.find('#editor_container').addClass('hasPreview');\n\t\t\t\tcontainer.find('#editor_container').removeClass('onlyPreview');\n\t\t\t\tbreak;\n\t\t\tcase 'text':\n\t\t\t\tcontainer.find('#editor_container').removeClass('hasPreview');\n\t\t\t\tcontainer.find('#editor_container').removeClass('onlyPreview');\n\t\t\t\tbreak;\n\t\t\tcase 'image':\n\t\t\t\tcontainer.find('#editor_container').addClass('hasPreview');\n\t\t\t\tcontainer.find('#editor_container').addClass('onlyPreview');\n\t\t\t\tbreak;\n\t\t}\n\t\tsetTimeout(function() {\n\t\t\twindow.aceEditor.resize();\n\t\t}, 500);\n\t},\n\n\tloadPreviewControlBar: function () {\n\t\tvar makeButton = function (type, tooltip, active) {\n\t\t\tvar button = $('<button/>');\n\t\t\tbutton.tooltip({\n\t\t\t\ttitle: tooltip,\n\t\t\t\tcontainer: 'body',\n\t\t\t\tplacement: 'bottom',\n\t\t\t\tdelay: {show: 500, hide: 0}\n\t\t\t});\n\t\t\tif (active) {\n\t\t\t\tbutton.addClass('active');\n\t\t\t}\n\t\t\tbutton.click(this.setPreviewMode.bind(this, type));\n\t\t\tbutton.attr('data-type', type);\n\t\t\treturn button.css('background-image', 'url(\"' + OC.imagePath('files_texteditor', type) + '\")');\n\t\t}.bind(this);\n\n\t\tvar controls = $('<span/>').attr('id', 'preview_editor_controls');\n\t\tcontrols.append(makeButton('text', t('files_texteditor', 'Edit')));\n\t\tcontrols.append(makeButton('mixed', t('files_texteditor', 'Mixed'), true));\n\t\tcontrols.append(makeButton('image', t('files_texteditor', 'Preview')));\n\t\t$('#editor_close').after(controls);\n\t},\n\n\t/**\n\t * Removes the control bar\n\t */\n\tunloadControlBar: function () {\n\t\t$('#editor_controls').remove();\n\t},\n\n\t/**\n\t * Set the max width of the filename to prevent wrapping\n\t */\n\tsetFilenameMaxLength: function () {\n\t\t// Get the width of the control bar\n\t\tvar controlBar = $('#editor_controls').width();\n\t\t// Get the width of all of the other controls\n\t\tvar controls = $('small.saving-message').outerWidth(true);\n\t\tcontrols += $('small.unsaved-star').outerWidth(true);\n\t\tcontrols += $('#editor_close').outerWidth(true);\n\t\t// Set the max width\n\t\t$('small.filename').css('max-width', controlBar - controls - 28);\n\t},\n\n\t/**\n\t * Binds the control events on the control bar\n\t */\n\tbindControlBar: function () {\n\t\t$('#editor_close').on('click', _.bind(this._onCloseTrigger, this));\n\t\t$(window).resize(Texteditor.setFilenameMaxLength);\n\t\twindow.onpopstate = function () {\n\t\t\tvar hash = location.hash.substr(1);\n\t\t\tif (hash.substr(0, 6) !== 'editor') {\n\t\t\t\tthis._onCloseTrigger();\n\t\t\t}\n\t\t}.bind(this);\n\t},\n\n\t/**\n\t * Configure the ACE editor\n\t */\n\tconfigureACE: function (file) {\n\t\twindow.aceEditor = ace.edit(this.editor);\n\t\taceEditor.getSession().setNewLineMode(\"windows\");\n\t\taceEditor.setShowPrintMargin(false);\n\t\taceEditor.getSession().setUseWrapMode(true);\n\t\tif (!file.writeable) {\n\t\t\taceEditor.setReadOnly(true);\n\t\t}\n\t\tif (file.mime && file.mime === 'text/html') {\n\t\t\tthis.setEditorSyntaxMode('html');\n\t\t} else {\n\t\t\t// Set the syntax mode based on the file extension\n\t\t\tthis.setEditorSyntaxMode(\n\t\t\t\tfile.name.split('.')[file.name.split('.').length - 1]\n\t\t\t);\n\t\t}\n\t\t// Set the theme\n\t\timport('brace/theme/clouds').then(() => {\n\t\t\twindow.aceEditor.setTheme(\"ace/theme/clouds\");\n\t\t});\n\t\t// Bind the edit event\n\t\twindow.aceEditor.getSession().on('change', this._onEdit.bind(this));\n\t\t// Bind save trigger\n\t\twindow.aceEditor.commands.addCommand({\n\t\t\tname: \"save\",\n\t\t\tbindKey: {\n\t\t\t\twin: \"Ctrl-S\",\n\t\t\t\tmac: \"Command-S\",\n\t\t\t\tsender: \"editor\"\n\t\t\t},\n\t\t\texec: Texteditor._onSaveTrigger\n\t\t});\n\n\t\t// disable Ctrl-T shortcut in ace to allow new tab feature in browser\n\t\twindow.aceEditor.commands.removeCommand(window.aceEditor.commands.byName.transposeletters);\n\t},\n\n\t/**\n\t * Sets the syntax highlighting for the editor based on the file extension\n\t */\n\tsetEditorSyntaxMode: function (extension) {\n\t\tgetSyntaxMode(extension).then(function (mode) {\n\t\t\tif (mode) {\n\t\t\t\twindow.aceEditor.getSession().setMode(`ace/mode/${mode}`);\n\t\t\t}\n\t\t});\n\t},\n\n\t/**\n\t * Loads the data through AJAX\n\t */\n\tloadFile: function (dir, filename, success, failure) {\n\t\t$.get(\n\t\t\tOC.generateUrl('/apps/files_texteditor/ajax/loadfile'),\n\t\t\t{\n\t\t\t\tfilename: filename,\n\t\t\t\tdir: dir\n\t\t\t}\n\t\t).done(function (data) {\n\t\t\t// Call success callback\n\t\t\tTexteditor.file.writeable = data.writeable;\n\t\t\tTexteditor.file.mime = data.mime;\n\t\t\tTexteditor.file.mtime = data.mtime;\n\t\t\tsuccess(Texteditor.file, data.filecontents);\n\t\t}).fail(function (jqXHR) {\n\t\t\tfailure(JSON.parse(jqXHR.responseText).message);\n\t\t});\n\t},\n\n/**\n * Send the new file data back to the server\n */\nsaveFile: function (data, file, success, failure) {\n\t// Send the post request\n\tvar path = file.dir + file.name;\n\tif (file.dir !== '/') {\n\t\tpath = file.dir + '/' + file.name;\n\t}\n\t$.ajax({\n\t\ttype: 'PUT',\n\t\turl: OC.generateUrl('/apps/files_texteditor/ajax/savefile'),\n\t\tdata: {\n\t\t\tfilecontents: data,\n\t\t\tpath: path,\n\t\t\tmtime: file.mtime\n\t\t}\n\t})\n\t\t.done(success)\n\t\t.fail(function (jqXHR) {\n\t\t\tvar message;\n\n\t\t\ttry {\n\t\t\t\tmessage = JSON.parse(jqXHR.responseText).message;\n\t\t\t} catch (e) {\n\t\t\t}\n\n\t\t\tfailure(message);\n\t\t});\n},\n\n/**\n * Close the editor for good\n */\ncloseEditor: function () {\n\tthis.$container.html('').show();\n\tthis.unloadControlBar();\n\tthis.unBindVisibleActions();\n\tvar fileInfoModel = this.fileList.getModelForFile(this.file.name);\n\tif (fileInfoModel) {\n\t\tfileInfoModel.set({\n\t\t\t// temp dummy, until we can do a PROPFIND\n\t\t\tetag: fileInfoModel.get('id') + this.file.mtime,\n\t\t\tmtime: this.file.mtime * 1000,\n\t\t\tsize: this.file.size\n\t\t});\n\t}\n\tdocument.title = this.oldTitle;\n},\n\n/**\n * Hide the editor (unsaved changes)\n */\nhideEditor: function () {\n\tthis.$container.hide();\n\tdocument.title = this.oldTitle;\n\tthis.unBindVisibleActions();\n},\n\n/**\n * Configure the autosave timer\n */\n\tsetupAutosave: function () {\n\t\tclearTimeout(this.saveTimer);\n\t\tthis.saveTimer = setTimeout(Texteditor._onSaveTrigger, 3000);\n\t},\n\n\t/**\n\t * Handles event when clicking outside editor\n\t */\n\t_onClickDocument: function (event) {\n\t\t// Check if click was inside the editor or not.\n\t\tif (!$(event.target).closest('#editor_container').length && !$(event.target).closest('.oc-dialog').length) {\n\t\t\t// Edit the editor\n\t\t\tTexteditor._onCloseTrigger();\n\t\t}\n\t},\n\n\t/*\n\t * Binds actions that need to happen whilst the editor is visible\n\t */\n\tbindVisibleActions: function () {\n\t\t$(document).bind('click', this._onClickDocument);\n\t},\n\n\t/**\n\t * Unbinds actions that happen whilst the editor is visible\n\t */\n\tunBindVisibleActions: function () {\n\t\t$(document).unbind('click', this._onClickDocument);\n\t}\n\n};\n\n\n\n// WEBPACK FOOTER //\n// ./js/editor.js","/**\n * ownCloud - Files_Texteditor\n *\n * This file is licensed under the Affero General Public License version 3 or\n * later. See the COPYING file.\n *\n * @author Tom Needham <tom@owncloud.com>\n * @copyright Tom Needham 2015\n */\n\nimport {SidebarPreview} from './sidebarpreview';\nimport {Texteditor} from './editor';\nimport {newFileMenuPlugin} from './newfileplugin';\n\n// convince webpack to load chunks\n__webpack_require__.p = OC.filePath('files_texteditor', 'js', '../build/');\nconst script = document.querySelector('[nonce]');\n__webpack_require__.nc = script['nonce'] || script.getAttribute('nonce');\n\nOCA.Files_Texteditor = Texteditor;\n\nOC.Plugins.register('OCA.Files.NewFileMenu', newFileMenuPlugin);\nOC.Plugins.register('OCA.Files.SidebarPreviewManager', new SidebarPreview());\n\n$(document).ready(function () {\n\t$('#editor').remove();\n\tOCA.Files_Texteditor.initialize($('<div id=\"app-content-texteditor\"></div>'));\n});\n\n\n\n// WEBPACK FOOTER //\n// ./js/index.js","export const newFileMenuPlugin = {\n\n\tattach: function (menu) {\n\t\tvar fileList = menu.fileList;\n\n\t\t// only attach to main file list, public view is not supported yet\n\t\tif (fileList.id !== 'files') {\n\t\t\treturn;\n\t\t}\n\n\t\t// register the new menu entry\n\t\tmenu.addMenuEntry({\n\t\t\tid: 'file',\n\t\t\tdisplayName: t('files_texteditor', 'New text file'),\n\t\t\ttemplateName: t('files_texteditor', 'New text file.txt'),\n\t\t\ticonClass: 'icon-filetype-text',\n\t\t\tfileType: 'file',\n\t\t\tactionHandler: function (name) {\n\t\t\t\tvar dir = fileList.getCurrentDirectory();\n\t\t\t\t// first create the file\n\t\t\t\tfileList.createFile(name).then(function () {\n\t\t\t\t\t// once the file got successfully created,\n\t\t\t\t\t// open the editor\n\t\t\t\t\tOCA.Files_Texteditor._onEditorTrigger(\n\t\t\t\t\t\tname,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfileList: fileList,\n\t\t\t\t\t\t\tdir: dir\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n};\n\n\n\n// WEBPACK FOOTER //\n// ./js/newfileplugin.js","/*\n * Copyright (c) 2016\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\nimport {getSyntaxMode} from \"./SyntaxMode\";\nimport importAce from './ImportAce';\n\n/** @type array[] supportedMimeTypes */\nconst supportedMimeTypes = require('./supported_mimetypes.json');\n\nexport class SidebarPreview {\n\tattach (manager) {\n\t\tconst handler = this.handlePreview.bind(this);\n\t\tsupportedMimeTypes.forEach(value => manager.addPreviewHandler(value, handler));\n\t}\n\n\thandlePreview (model, $thumbnailDiv, $thumbnailContainer, fallback) {\n\t\tconst previewWidth = $thumbnailContainer.parent().width() + 50;  // 50px for negative margins\n\t\tconst previewHeight = previewWidth / (16 / 9);\n\n\t\tthis.getFileContent(model.getFullPath()).then(function (content) {\n\t\t\tcontent = content.filecontents;\n\t\t\t$thumbnailDiv.removeClass('icon-loading icon-32');\n\t\t\t$thumbnailContainer.addClass('large');\n\t\t\t$thumbnailContainer.addClass('text');\n\t\t\tconst $editorDiv = $(\"<div id='sidebar_editor'/>\");\n\t\t\t$editorDiv.text(content);\n\t\t\t$thumbnailDiv.children('.stretcher').remove();\n\t\t\t$thumbnailDiv.append($editorDiv);\n\t\t\timportAce().then((imports) => {\n\t\t\t\tconst editor = imports.edit('sidebar_editor');\n\t\t\t\teditor.setReadOnly(true);\n\t\t\t\tlet syntaxModePromise;\n\t\t\t\tif (model.get('mimetype') === 'text/html') {\n\t\t\t\t\tsyntaxModePromise = getSyntaxMode('html');\n\t\t\t\t} else {\n\t\t\t\t\t// Set the syntax mode based on the file extension\n\t\t\t\t\tsyntaxModePromise = getSyntaxMode(\n\t\t\t\t\t\tmodel.get('name').split('.')[model.get('name').split('.').length - 1]\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tsyntaxModePromise.then(function (mode) {\n\t\t\t\t\tif (mode) {\n\t\t\t\t\t\teditor.getSession().setMode(`ace/mode/${mode}`);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t// Set the theme\n\t\t\t\timport('brace/theme/clouds').then(() => {\n\t\t\t\t\teditor.setTheme(\"ace/theme/clouds\");\n\t\t\t\t});\n\t\t\t\t$editorDiv.css(\"height\", previewHeight);\n\t\t\t\t$editorDiv.css(\"width\", previewWidth);\n\t\t\t});\n\t\t}, function () {\n\t\t\tfallback();\n\t\t});\n\t}\n\n\tgetFileContent (path) {\n\t\tconst parts = path.split('/');\n\t\tconst dir = parts.slice(0, -1).join('');\n\t\tconst file = parts.slice(-1).join('');\n\n\t\treturn $.ajax({\n\t\t\turl: OC.generateUrl('/apps/files_texteditor/ajax/loadfile'),\n\t\t\tdata: {\n\t\t\t\tfilename: file,\n\t\t\t\tdir: dir\n\t\t\t},\n\t\t\theaders: {\n\t\t\t\t'Range': 'bytes=0-10240'\n\t\t\t}\n\t\t});\n\t}\n}\n\n\n\n// WEBPACK FOOTER //\n// ./js/sidebarpreview.js","module.exports = [\"text\",\"application/cmd\",\"application/javascript\",\"application/json\",\"application/xml\",\"application/x-empty\",\"application/x-msdos-program\",\"application/x-php\",\"application/x-pearl\",\"application/x-text\",\"application/yaml\"]\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./js/supported_mimetypes.json\n// module id = ./js/supported_mimetypes.json\n// module chunks = 30"],"sourceRoot":""}