From 5f9d4a54a2e014d10fb2c4e895318c3f9832f8e7 Mon Sep 17 00:00:00 2001 From: jos Date: Thu, 29 May 2014 22:35:47 +0200 Subject: [PATCH] Added css concat and minify to gulpfile --- gulpfile.js | 38 +++++-- jsoneditor.css | 73 +++++++------ jsoneditor.js | 224 +++++++++++++++++++-------------------- jsoneditor.map | 2 +- jsoneditor.min.js | 4 +- package.json | 12 +-- test/test.html | 10 +- test/test_build.html | 5 +- test/test_build_min.html | 69 ++++++++++++ 9 files changed, 262 insertions(+), 175 deletions(-) create mode 100644 test/test_build_min.html diff --git a/gulpfile.js b/gulpfile.js index b52b983..0f7b4c2 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,6 +1,8 @@ var fs = require('fs'), gulp = require('gulp'), gutil = require('gulp-util'), + concatCss = require('gulp-concat-css'), + minifyCSS = require('gulp-minify-css'), webpack = require('webpack'), uglify = require('uglify-js'); @@ -10,9 +12,11 @@ var ENTRY = './src/js/JSONEditor.js', FILE_MIN = 'jsoneditor.min.js', FILE_MAP = 'jsoneditor.map', DIST = './', - JSONEDITOR_JS = DIST + FILE, - JSONEDITOR_MIN_JS = DIST + FILE_MIN, - JSONEDITOR_MAP_JS = DIST + FILE_MAP; + JSONEDITOR_JS = DIST + FILE, + JSONEDITOR_MIN_JS = DIST + FILE_MIN, + JSONEDITOR_MAP_JS = DIST + FILE_MAP, + JSONEDITOR_CSS = DIST + 'jsoneditor.css', + JSONEDITOR_MIN_CSS = DIST + 'jsoneditor.min.css'; // generate banner with today's date and correct version function createBanner() { @@ -55,6 +59,7 @@ gulp.task('bundle', function (cb) { // update the banner contents (has a date in it which should stay up to date) bannerPlugin.banner = createBanner(); + // bundle javascript compiler.run(function (err, stats) { if (err) { gutil.log(err); @@ -62,12 +67,25 @@ gulp.task('bundle', function (cb) { gutil.log('bundled ' + JSONEDITOR_JS); - // TODO: bundle css - - // TODO: bundle and minify assets - cb(); }); + + // bundle css + gulp.src([ + 'src/css/jsoneditor.css', + 'src/css/contextmenu.css', + 'src/css/menu.css', + 'src/css/searchbox.css' + ]) + .pipe(concatCss(JSONEDITOR_CSS)) + .pipe(gulp.dest('.')) + .pipe(concatCss(JSONEDITOR_MIN_CSS)) + .pipe(minifyCSS()) + .pipe(gulp.dest('.')); + + gutil.log('bundled ' + JSONEDITOR_CSS); + gutil.log('bundled ' + JSONEDITOR_MIN_CSS); + }); gulp.task('minify', ['bundle'], function () { @@ -79,9 +97,11 @@ gulp.task('minify', ['bundle'], function () { gutil.log('Minified ' + JSONEDITOR_MIN_JS); gutil.log('Mapped ' + JSONEDITOR_MAP_JS); - // TODO: minify css - }); + +// TODO: bundle and minify assets + + // The default task (called when you run `gulp`) gulp.task('default', ['bundle', 'minify']); diff --git a/jsoneditor.css b/jsoneditor.css index eba26b6..f44cec9 100644 --- a/jsoneditor.css +++ b/jsoneditor.css @@ -1,4 +1,3 @@ - .jsoneditor .field, .jsoneditor .value, .jsoneditor .readonly { @@ -12,6 +11,7 @@ } /* adjust margin of p elements inside editable divs, needed for Opera, IE */ + .jsoneditor .field p, .jsoneditor .value p { margin: 0; @@ -33,12 +33,12 @@ } .jsoneditor .field.empty { - background-image: url('img/jsoneditor-icons.png'); + background-image: url("img/jsoneditor-icons.png"); background-position: 0 -144px; } .jsoneditor .value.empty { - background-image: url('img/jsoneditor-icons.png'); + background-image: url("img/jsoneditor-icons.png"); background-position: -48px -144px; } @@ -87,7 +87,7 @@ margin: 0; border: none; cursor: pointer; - background: transparent url('img/jsoneditor-icons.png'); + background: transparent url("img/jsoneditor-icons.png"); } .jsoneditor div.tree button.collapsed { @@ -132,7 +132,6 @@ -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; - width: 100%; height: 100%; overflow: auto; @@ -141,7 +140,6 @@ line-height: 100%; } - .jsoneditor div.tree table.tree { border-collapse: collapse; border-spacing: 0; @@ -154,11 +152,9 @@ height: 100%; margin: -35px 0 0 0; padding: 35px 0 0 0; - -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; - overflow: hidden; } @@ -173,11 +169,9 @@ width: 100%; height: 100%; margin: 0; - -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; - border: none; background-color: white; resize: none; @@ -188,7 +182,7 @@ } .jsoneditor div.tree button.dragarea { - background: url('img/jsoneditor-icons.png') -72px -72px; + background: url("img/jsoneditor-icons.png") -72px -72px; cursor: move; } @@ -221,8 +215,6 @@ font-size: 10pt; color: #1A1A1A; } - - /* ContextMenu - main menu */ .jsoneditor-contextmenu { @@ -235,11 +227,9 @@ left: 0; top: 0; width: 124px; - background: white; border: 1px solid #d3d3d3; box-shadow: 2px 2px 12px rgba(128, 128, 128, 0.3); - list-style: none; margin: 0; padding: 0; @@ -254,12 +244,12 @@ cursor: pointer; color: #4d4d4d; background: transparent; - line-height: 26px; text-align: left; } /* Fix button padding in firefox */ + .jsoneditor-contextmenu ul li button::-moz-focus-inner { padding: 0; border: 0; @@ -290,7 +280,7 @@ border: none; padding: 0; margin: 0; - background-image: url('img/jsoneditor-icons.png'); + background-image: url("img/jsoneditor-icons.png"); } .jsoneditor-contextmenu ul li button div.expand { @@ -299,7 +289,7 @@ height: 24px; padding: 0; margin: 0 4px 0 0; - background: url('img/jsoneditor-icons.png') 0 -72px; + background: url("img/jsoneditor-icons.png") 0 -72px; opacity: 0.4; } @@ -321,6 +311,7 @@ .jsoneditor-contextmenu button.remove > .icon { background-position: -24px -24px; } + .jsoneditor-contextmenu button.remove:hover > .icon, .jsoneditor-contextmenu button.remove:focus > .icon { background-position: -24px 0; @@ -329,6 +320,7 @@ .jsoneditor-contextmenu button.append > .icon { background-position: 0 -24px; } + .jsoneditor-contextmenu button.append:hover > .icon, .jsoneditor-contextmenu button.append:focus > .icon { background-position: 0 0; @@ -337,6 +329,7 @@ .jsoneditor-contextmenu button.insert > .icon { background-position: 0 -24px; } + .jsoneditor-contextmenu button.insert:hover > .icon, .jsoneditor-contextmenu button.insert:focus > .icon { background-position: 0 0; @@ -345,6 +338,7 @@ .jsoneditor-contextmenu button.duplicate > .icon { background-position: -48px -24px; } + .jsoneditor-contextmenu button.duplicate:hover > .icon, .jsoneditor-contextmenu button.duplicate:focus > .icon { background-position: -48px 0; @@ -353,6 +347,7 @@ .jsoneditor-contextmenu button.sort-asc > .icon { background-position: -168px -24px; } + .jsoneditor-contextmenu button.sort-asc:hover > .icon, .jsoneditor-contextmenu button.sort-asc:focus > .icon { background-position: -168px 0; @@ -361,6 +356,7 @@ .jsoneditor-contextmenu button.sort-desc > .icon { background-position: -192px -24px; } + .jsoneditor-contextmenu button.sort-desc:hover > .icon, .jsoneditor-contextmenu button.sort-desc:focus > .icon { background-position: -192px 0; @@ -381,11 +377,9 @@ position: relative; left: -10px; top: 0; - border: none; box-shadow: inset 0 0 10px rgba(128, 128, 128, 0.5); padding: 0 10px; - /* TODO: transition is not supported on IE8-9 */ -webkit-transition: all 0.3s ease-out; -moz-transition: all 0.3s ease-out; @@ -393,8 +387,7 @@ transition: all 0.3s ease-out; } -.jsoneditor-contextmenu ul li.selected ul { -} + .jsoneditor-contextmenu ul li ul li button { padding-left: 24px; @@ -403,21 +396,22 @@ .jsoneditor-contextmenu ul li ul li button:hover, .jsoneditor-contextmenu ul li ul li button:focus { background-color: #f5f5f5; - } .jsoneditor-contextmenu button.type-string > .icon { background-position: -144px -24px; } + .jsoneditor-contextmenu button.type-string:hover > .icon, .jsoneditor-contextmenu button.type-string:focus > .icon, -.jsoneditor-contextmenu button.type-string.selected > .icon{ +.jsoneditor-contextmenu button.type-string.selected > .icon { background-position: -144px 0; } .jsoneditor-contextmenu button.type-auto > .icon { background-position: -120px -24px; } + .jsoneditor-contextmenu button.type-auto:hover > .icon, .jsoneditor-contextmenu button.type-auto:focus > .icon, .jsoneditor-contextmenu button.type-auto.selected > .icon { @@ -427,18 +421,20 @@ .jsoneditor-contextmenu button.type-object > .icon { background-position: -72px -24px; } + .jsoneditor-contextmenu button.type-object:hover > .icon, .jsoneditor-contextmenu button.type-object:focus > .icon, -.jsoneditor-contextmenu button.type-object.selected > .icon{ +.jsoneditor-contextmenu button.type-object.selected > .icon { background-position: -72px 0; } .jsoneditor-contextmenu button.type-array > .icon { background-position: -96px -24px; } + .jsoneditor-contextmenu button.type-array:hover > .icon, .jsoneditor-contextmenu button.type-array:focus > .icon, -.jsoneditor-contextmenu button.type-array.selected > .icon{ +.jsoneditor-contextmenu button.type-array.selected > .icon { background-position: -96px 0; } @@ -446,8 +442,6 @@ background-image: none; width: 6px; } - - .jsoneditor .menu { width: 100%; height: 35px; @@ -457,7 +451,6 @@ -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; - color: #1A1A1A; background-color: #D5DDF6; border-bottom: 1px solid #97B0F8; @@ -470,22 +463,22 @@ padding: 0; border-radius: 2px; border: 1px solid #aec0f8; - background: #e3eaf6 url('img/jsoneditor-icons.png'); + background: #e3eaf6 url("img/jsoneditor-icons.png"); color: #4D4D4D; opacity: 0.8; - font-family: arial, sans-serif; font-size: 10pt; - float: left; } .jsoneditor .menu button:hover { background-color: #f0f2f5; } + .jsoneditor .menu button:active { background-color: #ffffff; } + .jsoneditor .menu button:disabled { background-color: #e3eaf6; } @@ -493,24 +486,31 @@ .jsoneditor .menu button.collapse-all { background-position: 0 -96px; } + .jsoneditor .menu button.expand-all { background-position: 0 -120px; } + .jsoneditor .menu button.undo { background-position: -24px -96px; } + .jsoneditor .menu button.undo:disabled { background-position: -24px -120px; } + .jsoneditor .menu button.redo { background-position: -48px -96px; } + .jsoneditor .menu button.redo:disabled { background-position: -48px -120px; } + .jsoneditor .menu button.compact { background-position: -72px -96px; } + .jsoneditor .menu button.format { background-position: -72px -120px; } @@ -546,8 +546,6 @@ } /* TODO: css for button:disabled is not supported by IE8 */ - - .jsoneditor .search input, .jsoneditor .search .results { font-family: arial, sans-serif; @@ -591,7 +589,7 @@ padding: 0; margin: 0; border: none; - background: url('img/jsoneditor-icons.png'); + background: url("img/jsoneditor-icons.png"); vertical-align: top; } @@ -608,6 +606,7 @@ cursor: pointer; background-position: -124px -73px; } + .jsoneditor .search button.next:hover { background-position: -124px -49px; } @@ -617,7 +616,7 @@ background-position: -148px -73px; margin-right: 2px; } + .jsoneditor .search button.previous:hover { background-position: -148px -49px; -} - +} \ No newline at end of file diff --git a/jsoneditor.js b/jsoneditor.js index c167f5e..62781ed 100644 --- a/jsoneditor.js +++ b/jsoneditor.js @@ -328,7 +328,7 @@ return /******/ (function(modules) { // webpackBootstrap /* 1 */ /***/ function(module, exports, __webpack_require__) { - var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(4), __webpack_require__(5), __webpack_require__(6), __webpack_require__(7), __webpack_require__(8), __webpack_require__(3)], __WEBPACK_AMD_DEFINE_RESULT__ = (function (Highlighter, History, SearchBox, Node, modebox, util) { + var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(5), __webpack_require__(6), __webpack_require__(7), __webpack_require__(8), __webpack_require__(4), __webpack_require__(3)], __WEBPACK_AMD_DEFINE_RESULT__ = (function (Highlighter, History, SearchBox, Node, modebox, util) { /** * @constructor TreeEditor @@ -1064,7 +1064,7 @@ return /******/ (function(modules) { // webpackBootstrap /* 2 */ /***/ function(module, exports, __webpack_require__) { - var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(8), __webpack_require__(3)], __WEBPACK_AMD_DEFINE_RESULT__ = (function (modebox, util) { + var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(4), __webpack_require__(3)], __WEBPACK_AMD_DEFINE_RESULT__ = (function (modebox, util) { /** * Create a TextEditor and attach it to given container @@ -1864,6 +1864,113 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, /* 4 */ +/***/ function(module, exports, __webpack_require__) { + + var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(9)], __WEBPACK_AMD_DEFINE_RESULT__ = (function (ContextMenu) { + + /** + * Create a mode box to be used in the editor menu's + * @param {JSONEditor} editor + * @param {String[]} modes Available modes: 'code', 'form', 'text', 'tree', 'view' + * @param {String} current Available modes: 'code', 'form', 'text', 'tree', 'view' + * @returns {HTMLElement} box + */ + function createModeBox(editor, modes, current) { + /** + * Switch the mode of the editor + * @param {String} mode + */ + function switchMode(mode) { + // switch mode + editor.setMode(mode); + + // restore focus on mode box + var modeBox = editor.dom && editor.dom.modeBox; + if (modeBox) { + modeBox.focus(); + } + } + + // available modes + var availableModes = { + code: { + 'text': 'Code', + 'title': 'Switch to code highlighter', + 'click': function () { + switchMode('code') + } + }, + form: { + 'text': 'Form', + 'title': 'Switch to form editor', + 'click': function () { + switchMode('form'); + } + }, + text: { + 'text': 'Text', + 'title': 'Switch to plain text editor', + 'click': function () { + switchMode('text'); + } + }, + tree: { + 'text': 'Tree', + 'title': 'Switch to tree editor', + 'click': function () { + switchMode('tree'); + } + }, + view: { + 'text': 'View', + 'title': 'Switch to tree view', + 'click': function () { + switchMode('view'); + } + } + }; + + // list the selected modes + var items = []; + for (var i = 0; i < modes.length; i++) { + var mode = modes[i]; + var item = availableModes[mode]; + if (!item) { + throw new Error('Unknown mode "' + mode + '"'); + } + + item.className = 'type-modes' + ((current == mode) ? ' selected' : ''); + items.push(item); + } + + // retrieve the title of current mode + var currentMode = availableModes[current]; + if (!currentMode) { + throw new Error('Unknown mode "' + current + '"'); + } + var currentTitle = currentMode.text; + + // create the html element + var box = document.createElement('button'); + box.className = 'modes separator'; + box.innerHTML = currentTitle + ' ▾'; + box.title = 'Switch editor mode'; + box.onclick = function () { + var menu = new ContextMenu(items); + menu.show(box); + }; + + return box; + } + + return { + create: createModeBox + } + }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__)), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + + +/***/ }, +/* 5 */ /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_RESULT__ = (function () { @@ -1955,7 +2062,7 @@ return /******/ (function(modules) { // webpackBootstrap }.call(exports, __webpack_require__, exports, module)), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); /***/ }, -/* 5 */ +/* 6 */ /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(3)], __WEBPACK_AMD_DEFINE_RESULT__ = (function (util) { @@ -2184,7 +2291,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 6 */ +/* 7 */ /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_RESULT__ = (function () { @@ -2483,7 +2590,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 7 */ +/* 8 */ /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(9), __webpack_require__(10), __webpack_require__(3)], __WEBPACK_AMD_DEFINE_RESULT__ = (function (ContextMenu, appendNodeFactory, util) { @@ -5354,113 +5461,6 @@ return /******/ (function(modules) { // webpackBootstrap return Node; }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__)), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); -/***/ }, -/* 8 */ -/***/ function(module, exports, __webpack_require__) { - - var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(9)], __WEBPACK_AMD_DEFINE_RESULT__ = (function (ContextMenu) { - - /** - * Create a mode box to be used in the editor menu's - * @param {JSONEditor} editor - * @param {String[]} modes Available modes: 'code', 'form', 'text', 'tree', 'view' - * @param {String} current Available modes: 'code', 'form', 'text', 'tree', 'view' - * @returns {HTMLElement} box - */ - function createModeBox(editor, modes, current) { - /** - * Switch the mode of the editor - * @param {String} mode - */ - function switchMode(mode) { - // switch mode - editor.setMode(mode); - - // restore focus on mode box - var modeBox = editor.dom && editor.dom.modeBox; - if (modeBox) { - modeBox.focus(); - } - } - - // available modes - var availableModes = { - code: { - 'text': 'Code', - 'title': 'Switch to code highlighter', - 'click': function () { - switchMode('code') - } - }, - form: { - 'text': 'Form', - 'title': 'Switch to form editor', - 'click': function () { - switchMode('form'); - } - }, - text: { - 'text': 'Text', - 'title': 'Switch to plain text editor', - 'click': function () { - switchMode('text'); - } - }, - tree: { - 'text': 'Tree', - 'title': 'Switch to tree editor', - 'click': function () { - switchMode('tree'); - } - }, - view: { - 'text': 'View', - 'title': 'Switch to tree view', - 'click': function () { - switchMode('view'); - } - } - }; - - // list the selected modes - var items = []; - for (var i = 0; i < modes.length; i++) { - var mode = modes[i]; - var item = availableModes[mode]; - if (!item) { - throw new Error('Unknown mode "' + mode + '"'); - } - - item.className = 'type-modes' + ((current == mode) ? ' selected' : ''); - items.push(item); - } - - // retrieve the title of current mode - var currentMode = availableModes[current]; - if (!currentMode) { - throw new Error('Unknown mode "' + current + '"'); - } - var currentTitle = currentMode.text; - - // create the html element - var box = document.createElement('button'); - box.className = 'modes separator'; - box.innerHTML = currentTitle + ' ▾'; - box.title = 'Switch editor mode'; - box.onclick = function () { - var menu = new ContextMenu(items); - menu.show(box); - }; - - return box; - } - - return { - create: createModeBox - } - }.apply(null, __WEBPACK_AMD_DEFINE_ARRAY__)), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - - /***/ }, /* 9 */ /***/ function(module, exports, __webpack_require__) { diff --git a/jsoneditor.map b/jsoneditor.map index f027998..26448d2 100644 --- a/jsoneditor.map +++ b/jsoneditor.map @@ -1 +1 @@ -{"version":3,"file":"jsoneditor.map","sources":["./jsoneditor.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","__WEBPACK_AMD_DEFINE_ARRAY__","__WEBPACK_AMD_DEFINE_RESULT__","TreeEditor","TextEditor","util","JSONEditor","container","options","json","Error","ieVersion","getInternetExplorerVersion","arguments","length","_create","modes","prototype","mode","setMode","_delete","set","get","setText","jsonText","parse","getText","JSON","stringify","setName","name","getName","data","extend","config","clear","editor","load","err","_onError","onError","log","error","registerModes","hasOwnProperty","apply","undefined","Highlighter","History","SearchBox","Node","modebox","dom","highlighter","selection","_setOptions","history","view","_createFrame","_createTable","frame","parentNode","removeChild","search","prop","edit","form","focusNode","Function","content","table","params","field","value","node","_setRoot","recurse","expand","appendChild","blur","getValue","updateField","collapse","tbody","getDom","text","results","expandAll","collapseAll","_onAction","action","add","change","startAutoScroll","mouseY","me","top","getAbsoluteTop","height","clientHeight","bottom","margin","interval","autoScrollStep","scrollTop","scrollHeight","autoScrollTimer","setInterval","stopAutoScroll","clearTimeout","setSelection","range","setSelectionOffset","focus","getSelection","domFocus","getSelectionOffset","scrollTo","callback","animateTimeout","animateCallback","finalScrollTop","Math","min","max","animate","diff","abs","setTimeout","onEvent","event","_onEvent","document","createElement","className","onclick","target","nodeName","preventDefault","oninput","onchange","onkeydown","onkeyup","oncut","onpaste","onmousedown","onmouseup","onmouseover","onmouseout","addEventListener","onfocusin","onfocusout","menu","title","undo","_onUndo","redo","_onRedo","onChange","disabled","canUndo","canRedo","modeBox","create","searchBox","type","_onKeyDown","getNodeFromTarget","keynum","which","keyCode","ctrlKey","shiftKey","handled","selectContentEditable","select","previous","next","stopPropagation","contentOuter","col","colgroupContent","width","tree","indentation","Number","ace","textarea","clientWidth","buttonFormat","format","buttonCompact","compact","editorDom","style","setTheme","setShowPrintMargin","setFontSize","getSession","setTabSize","setUseSoftTabs","setUseWrapMode","poweredBy","createTextNode","href","window","open","on","spellcheck","resize","force","setValue","code","jsonString","validate","jsonlint","a","b","console","object","String","Boolean","RegExp","Array","isArray","isUrlRegex","isUrl","test","getAbsoluteLeft","elem","rect","getBoundingClientRect","left","pageXOffset","scrollLeft","pageYOffset","addClassName","classes","split","indexOf","push","join","removeClassName","index","splice","stripFormatting","divElement","childs","childNodes","i","iMax","child","removeAttribute","attributes","j","attribute","specified","setEndOfContentEditable","contentEditableElement","createRange","selectNodeContents","removeAllRanges","addRange","sel","getRangeAt","rangeCount","startContainer","endContainer","startOffset","endOffset","setStart","firstChild","setEnd","getInnerText","element","buffer","first","flush","nodeValue","hasChildNodes","innerText","prevChild","prevName","_ieVersion","rv","navigator","appName","ua","userAgent","re","exec","parseFloat","$1","isFirefox","listener","useCapture","attachEvent","f","removeEventListener","detachEvent","locked","highlight","setHighlight","_cancelUnhighlight","unhighlight","unhighlightTimer","lock","unlock","actions","editField","oldValue","newValue","editValue","updateValue","appendNode","parent","insertBeforeNode","insertBefore","beforeNode","insertAfterNode","insertAfter","afterNode","removeNode","append","duplicateNode","clone","changeType","oldType","newType","moveNode","startParent","moveTo","startIndex","endParent","endIndex","sort","hideChilds","oldSort","oldChilds","showChilds","newSort","newChilds","timestamp","Date","obj","oldSelection","newSelection","timeout","delay","lastText","tr","td","divInput","input","tableInput","tbodySearch","refreshSearch","_onDelayedSearch","_onSearch","_onKeyUp","searchNext","searchPrevious","resultIndex","_setActiveResult","activeResult","prevNode","prevElem","searchFieldActive","searchValueActive","updateDom","_clearDelay","forceSearch","resultCount","innerHTML","ContextMenu","appendNodeFactory","expanded","Object","setField","fieldEditable","setParent","getField","_getDomField","childValue","_getType","childField","arr","forEach","_getDomValue","getLevel","fieldInnerText","valueInnerText","cloneChilds","childClone","getAppend","nextTr","nextSibling","hide","_hasChilds","newTr","appendTr","updateIndexes","moveBefore","trTemp","AppendNode","currentIndex","toLowerCase","searchField","searchValue","_updateDomField","childResults","concat","_updateDomValue","offsetTop","focusElement","elementName","drag","editableDiv","_duplicate","containsNode","_move","clearDom","removedNode","_remove","lastTr","_stringCast","silent","_unescapeHTML","str","domValue","v","t","color","isEmpty","count","domField","oldField","tdDrag","domDrag","tdMenu","tdField","_createDomTree","_onDragStart","mousemove","_onDrag","mouseup","_onDragEnd","oldCursor","body","cursor","mouseX","pageX","level","trThis","trPrev","trNext","trFirst","trLast","trRoot","nodePrev","nodeNext","topThis","topPrev","topFirst","heightThis","bottomNext","heightNext","pageY","moved","offsetHeight","previousSibling","diffX","diffLevel","round","levelNext","_isChildOf","n","_createDomField","domTree","marginLeft","contentEditable","_escapeHTML","_updateDomIndexes","_createDomValue","_createDomExpandButton","borderCollapse","tdExpand","tdSeparator","tdValue","srcElement","expandable","showContextMenu","_onExpand","offsetX","onKeyDown","nextNode","nextDom","nextDom2","altKey","_onDuplicate","_onRemove","_onInsertBefore","_onInsertAfter","lastNode","_lastNode","_getElementName","firstNode","_firstNode","prevElement","_previousElement","appendDom","nextNode2","_previousNode","nextElement","_nextElement","prevDom","isVisible","_nextNode","newNode","_onAppend","_onChangeType","_onSort","direction","order","firstDom","lastDom","lastChild","TYPE_TITLES","auto","array","string","anchor","onClose","titles","items","submenu","click","submenuTitle","close","show","lower","num","numFloat","isNaN","htmlEscaped","replace","substring","escapedText","_escapeJSON","escaped","charAt","createModeBox","current","switchMode","availableModes","item","currentMode","currentTitle","box","createMenuItems","list","domItems","separator","li","domItem","button","divIcon","buttonSubmenu","buttonExpand","divExpand","_onExpandItem","domSubItems","subItems","ul","eventListeners","visibleSubmenu","focusButton","overflow","maxHeight","_getVisibleButtons","buttons","expandedItem","subItem","visibleMenu","windowHeight","innerHeight","windowScroll","windowBottom","anchorHeight","menuHeight","mousedown","mousewheel","keydown","fn","alreadyVisible","padding","display","targetIndex","prevButton","nextButton","e","trAppend","tdAppend","domText","paddingLeft"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BA,SAA2CA,EAAMC,GAC1B,gBAAZC,UAA0C,gBAAXC,QACxCA,OAAOD,QAAUD,IACQ,kBAAXG,SAAyBA,OAAOC,IAC9CD,OAAOH,GACmB,gBAAZC,SACdA,QAAoB,WAAID,IAExBD,EAAiB,WAAIC,KACpBK,KAAM,WACT,MAAgB,UAAUC,GAMhB,QAASC,GAAoBC,GAE5B,GAAGC,EAAiBD,GACnB,MAAOC,GAAiBD,GAAUP,OAGnC,IAAIC,GAASO,EAAiBD,IAC7BP,WACAS,GAAIF,EACJG,QAAQ,EAUT,OANAL,GAAQE,GAAUI,KAAKV,EAAOD,QAASC,EAAQA,EAAOD,QAASM,GAG/DL,EAAOS,QAAS,EAGTT,EAAOD,QAtBf,GAAIQ,KAqCJ,OAVAF,GAAoBM,EAAIP,EAGxBC,EAAoBO,EAAIL,EAGxBF,EAAoBQ,EAAI,GAIjBR,EAAoB,KAK/B,SAASL,EAAQD,EAASM,GAE/B,GAAIS,GAA8BC,CAAgCD,IAAgCT,EAAoB,GAAIA,EAAoB,GAAIA,EAAoB,IAAKU,EAAiC,SAAUC,EAAYC,EAAYC,GA4B5O,QAASC,GAAYC,EAAWC,EAASC,GACvC,KAAMnB,eAAgBgB,IACpB,KAAM,IAAII,OAAM,+CAIlB,IAAIC,GAAYN,EAAKO,4BACrB,IAAiB,IAAbD,GAA+B,EAAZA,EACrB,KAAM,IAAID,OAAM,iGAIdG,WAAUC,QACZxB,KAAKyB,QAAQR,EAAWC,EAASC,GAqMrC,MAlLAH,GAAWU,SASXV,EAAWW,UAAUF,QAAU,SAAUR,EAAWC,EAASC,GAC3DnB,KAAKiB,UAAYA,EACjBjB,KAAKkB,QAAUA,MACflB,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AAa,aACbmB,MAAS4X,EAAOJ,MAChBO,MAAS,WACP9c,EAAK6b,UAAU,UAIjBlb,KAAQ,SACRiD,UAAa,cACbmB,MAAS4X,EAAO1T,OAChB6T,MAAS,WACP9c,EAAK6b,UAAU,UAIjBlb,KAAQ,SACRiD,UAAa,cACbmB,MAAS4X,EAAOH,OAChBM,MAAS,WACP9c,EAAK6b,UAAU,GAAI,GAAI,eAO7B/W,EAAO,GAAI8N,aAAYgK,GAAQI,MAAON,GAC1C5X,GAAKmY,KAAKR,IAOZ/H,EAAWnY,UAAUgH,QAAU,SAAUC,GACvC,GAAImC,GAAOnC,EAAMmC,KACb7B,EAASN,EAAMM,QAAUN,EAAMuW,WAC/Brb,EAAM9D,KAAK8D,IAGXoG,EAAOpG,EAAIoG,IAWf,IAVIhB,GAAUgB,IACA,aAARa,EACF/K,KAAK8C,OAAOiB,YAAYwP,UAAUvT,KAAKqU,QAExB,YAARtJ,GACP/K,KAAK8C,OAAOiB,YAAY2P,eAKhB,SAAR3I,GAAmB7B,GAAUpF,EAAIoG,KAAM,CACzC,GAAInG,GAAc/D,KAAK8C,OAAOiB,WAC9BA,GAAYwP,UAAUvT,KAAKqU,QAC3BtQ,EAAY6P,OACZ7S,EAAKuO,aAAaxL,EAAIoG,KAAM,YAC5BlK,KAAKqf,gBAAgBvb,EAAIoG,KAAM,WAC7BnJ,EAAK6O,gBAAgB9L,EAAIoG,KAAM,YAC/BnG,EAAY8P,SACZ9P,EAAY2P,gBAIJ,WAAR3I,GACF/K,KAAKwf,UAAU5W,IAIZkR,EAIT,MAAO7B,IACP1U,MAAM,KAAM5C,KAAkE6C,SAAlC5C,IAAgDf,EAAOD,QAAUgB"} \ No newline at end of file +{"version":3,"file":"jsoneditor.map","sources":["./jsoneditor.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","__WEBPACK_AMD_DEFINE_ARRAY__","__WEBPACK_AMD_DEFINE_RESULT__","TreeEditor","TextEditor","util","JSONEditor","container","options","json","Error","ieVersion","getInternetExplorerVersion","arguments","length","_create","modes","prototype","mode","setMode","_delete","set","get","setText","jsonText","parse","getText","JSON","stringify","setName","name","getName","data","extend","config","clear","editor","load","err","_onError","onError","log","error","registerModes","hasOwnProperty","apply","undefined","Highlighter","History","SearchBox","Node","modebox","dom","highlighter","selection","_setOptions","history","view","_createFrame","_createTable","frame","parentNode","removeChild","search","prop","edit","form","focusNode","Function","content","table","params","field","value","node","_setRoot","recurse","expand","appendChild","blur","getValue","updateField","collapse","tbody","getDom","text","results","expandAll","collapseAll","_onAction","action","add","change","startAutoScroll","mouseY","me","top","getAbsoluteTop","height","clientHeight","bottom","margin","interval","autoScrollStep","scrollTop","scrollHeight","autoScrollTimer","setInterval","stopAutoScroll","clearTimeout","setSelection","range","setSelectionOffset","focus","getSelection","domFocus","getSelectionOffset","scrollTo","callback","animateTimeout","animateCallback","finalScrollTop","Math","min","max","animate","diff","abs","setTimeout","onEvent","event","_onEvent","document","createElement","className","onclick","target","nodeName","preventDefault","oninput","onchange","onkeydown","onkeyup","oncut","onpaste","onmousedown","onmouseup","onmouseover","onmouseout","addEventListener","onfocusin","onfocusout","menu","title","undo","_onUndo","redo","_onRedo","onChange","disabled","canUndo","canRedo","modeBox","create","searchBox","type","_onKeyDown","getNodeFromTarget","keynum","which","keyCode","ctrlKey","shiftKey","handled","selectContentEditable","select","previous","next","stopPropagation","contentOuter","col","colgroupContent","width","tree","indentation","Number","ace","textarea","clientWidth","buttonFormat","format","buttonCompact","compact","editorDom","style","setTheme","setShowPrintMargin","setFontSize","getSession","setTabSize","setUseSoftTabs","setUseWrapMode","poweredBy","createTextNode","href","window","open","on","spellcheck","resize","force","setValue","code","jsonString","validate","jsonlint","a","b","console","object","String","Boolean","RegExp","Array","isArray","isUrlRegex","isUrl","test","getAbsoluteLeft","elem","rect","getBoundingClientRect","left","pageXOffset","scrollLeft","pageYOffset","addClassName","classes","split","indexOf","push","join","removeClassName","index","splice","stripFormatting","divElement","childs","childNodes","i","iMax","child","removeAttribute","attributes","j","attribute","specified","setEndOfContentEditable","contentEditableElement","createRange","selectNodeContents","removeAllRanges","addRange","sel","getRangeAt","rangeCount","startContainer","endContainer","startOffset","endOffset","setStart","firstChild","setEnd","getInnerText","element","buffer","first","flush","nodeValue","hasChildNodes","innerText","prevChild","prevName","_ieVersion","rv","navigator","appName","ua","userAgent","re","exec","parseFloat","$1","isFirefox","listener","useCapture","attachEvent","f","removeEventListener","detachEvent","ContextMenu","createModeBox","current","switchMode","availableModes","click","items","item","currentMode","currentTitle","box","innerHTML","show","locked","highlight","setHighlight","_cancelUnhighlight","unhighlight","unhighlightTimer","lock","unlock","actions","editField","oldValue","newValue","editValue","updateValue","appendNode","parent","insertBeforeNode","insertBefore","beforeNode","insertAfterNode","insertAfter","afterNode","removeNode","append","duplicateNode","clone","changeType","oldType","newType","moveNode","startParent","moveTo","startIndex","endParent","endIndex","sort","hideChilds","oldSort","oldChilds","showChilds","newSort","newChilds","timestamp","Date","obj","oldSelection","newSelection","timeout","delay","lastText","tr","td","divInput","input","tableInput","tbodySearch","refreshSearch","_onDelayedSearch","_onSearch","_onKeyUp","searchNext","searchPrevious","resultIndex","_setActiveResult","activeResult","prevNode","prevElem","searchFieldActive","searchValueActive","updateDom","_clearDelay","forceSearch","resultCount","appendNodeFactory","expanded","Object","setField","fieldEditable","setParent","getField","_getDomField","childValue","_getType","childField","arr","forEach","_getDomValue","getLevel","fieldInnerText","valueInnerText","cloneChilds","childClone","getAppend","nextTr","nextSibling","hide","_hasChilds","newTr","appendTr","updateIndexes","moveBefore","trTemp","AppendNode","currentIndex","toLowerCase","searchField","searchValue","_updateDomField","childResults","concat","_updateDomValue","offsetTop","focusElement","elementName","drag","editableDiv","_duplicate","containsNode","_move","clearDom","removedNode","_remove","lastTr","_stringCast","silent","_unescapeHTML","str","domValue","v","t","color","isEmpty","count","domField","oldField","tdDrag","domDrag","tdMenu","tdField","_createDomTree","_onDragStart","mousemove","_onDrag","mouseup","_onDragEnd","oldCursor","body","cursor","mouseX","pageX","level","trThis","trPrev","trNext","trFirst","trLast","trRoot","nodePrev","nodeNext","topThis","topPrev","topFirst","heightThis","bottomNext","heightNext","pageY","moved","offsetHeight","previousSibling","diffX","diffLevel","round","levelNext","_isChildOf","n","_createDomField","domTree","marginLeft","contentEditable","_escapeHTML","_updateDomIndexes","_createDomValue","_createDomExpandButton","borderCollapse","tdExpand","tdSeparator","tdValue","srcElement","expandable","showContextMenu","_onExpand","offsetX","onKeyDown","nextNode","nextDom","nextDom2","altKey","_onDuplicate","_onRemove","_onInsertBefore","_onInsertAfter","lastNode","_lastNode","_getElementName","firstNode","_firstNode","prevElement","_previousElement","appendDom","nextNode2","_previousNode","nextElement","_nextElement","prevDom","isVisible","_nextNode","newNode","_onAppend","_onChangeType","_onSort","direction","order","firstDom","lastDom","lastChild","TYPE_TITLES","auto","array","string","anchor","onClose","titles","submenu","submenuTitle","close","lower","num","numFloat","isNaN","htmlEscaped","replace","substring","escapedText","_escapeJSON","escaped","charAt","createMenuItems","list","domItems","separator","li","domItem","button","divIcon","buttonSubmenu","buttonExpand","divExpand","_onExpandItem","domSubItems","subItems","ul","eventListeners","visibleSubmenu","focusButton","overflow","maxHeight","_getVisibleButtons","buttons","expandedItem","subItem","visibleMenu","windowHeight","innerHeight","windowScroll","windowBottom","anchorHeight","menuHeight","mousedown","mousewheel","keydown","fn","alreadyVisible","padding","display","targetIndex","prevButton","nextButton","e","trAppend","tdAppend","domText","paddingLeft"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BA,SAA2CA,EAAMC,GAC1B,gBAAZC,UAA0C,gBAAXC,QACxCA,OAAOD,QAAUD,IACQ,kBAAXG,SAAyBA,OAAOC,IAC9CD,OAAOH,GACmB,gBAAZC,SACdA,QAAoB,WAAID,IAExBD,EAAiB,WAAIC,KACpBK,KAAM,WACT,MAAgB,UAAUC,GAMhB,QAASC,GAAoBC,GAE5B,GAAGC,EAAiBD,GAC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KAAKsO,IAOZ/H,EAAW9Y,UAAUgH,QAAU,SAAUC,GACvC,GAAImC,GAAOnC,EAAMmC,KACb7B,EAASN,EAAMM,QAAUN,EAAMkX,WAC/Bhc,EAAM9D,KAAK8D,IAGXoG,EAAOpG,EAAIoG,IAWf,IAVIhB,GAAUgB,IACA,aAARa,EACF/K,KAAK8C,OAAOiB,YAAYqQ,UAAUpU,KAAKkV,QAExB,YAARnK,GACP/K,KAAK8C,OAAOiB,YAAYwQ,eAKhB,SAARxJ,GAAmB7B,GAAUpF,EAAIoG,KAAM,CACzC,GAAInG,GAAc/D,KAAK8C,OAAOiB,WAC9BA,GAAYqQ,UAAUpU,KAAKkV,QAC3BnR,EAAY0Q,OACZ1T,EAAKuO,aAAaxL,EAAIoG,KAAM,YAC5BlK,KAAKggB,gBAAgBlc,EAAIoG,KAAM,WAC7BnJ,EAAK6O,gBAAgB9L,EAAIoG,KAAM,YAC/BnG,EAAY2Q,SACZ3Q,EAAYwQ,gBAIJ,WAARxJ,GACF/K,KAAKmgB,UAAUvX,IAIZ6R,EAIT,MAAO7B,IACPrV,MAAM,KAAM5C,KAAkE6C,SAAlC5C,IAAgDf,EAAOD,QAAUgB"} \ No newline at end of file diff --git a/jsoneditor.min.js b/jsoneditor.min.js index fb7f306..235b238 100644 --- a/jsoneditor.min.js +++ b/jsoneditor.min.js @@ -26,6 +26,6 @@ * @version 3.0.0-SNAPSHOT * @date 2014-05-29 */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):"object"==typeof exports?exports.JSONEditor=t():e.JSONEditor=t()}(this,function(){return function(e){function t(o){if(i[o])return i[o].exports;var n=i[o]={exports:{},id:o,loaded:!1};return e[o].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var i={};return t.m=e,t.c=i,t.p="",t(0)}([function(e,t,i){var o,n;o=[i(1),i(2),i(3)],n=function(e,t,i){function o(e,t,n){if(!(this instanceof o))throw new Error('JSONEditor constructor called without "new".');var s=i.getInternetExplorerVersion();if(-1!=s&&9>s)throw new Error("Unsupported browser, IE9 or newer required. Please install the newest version of your browser.");arguments.length&&this._create(e,t,n)}return o.modes={},o.prototype._create=function(e,t,i){this.container=e,this.options=t||{},this.json=i||{};var o=this.options.mode||"tree";this.setMode(o)},o.prototype._delete=function(){},o.prototype.set=function(e){this.json=e},o.prototype.get=function(){return this.json},o.prototype.setText=function(e){this.json=i.parse(e)},o.prototype.getText=function(){return JSON.stringify(this.json)},o.prototype.setName=function(e){this.options||(this.options={}),this.options.name=e},o.prototype.getName=function(){return this.options&&this.options.name},o.prototype.setMode=function(e){var t,n,s=this.container,r=i.extend({},this.options);r.mode=e;var a=o.modes[e];if(!a)throw new Error('Unknown mode "'+r.mode+'"');try{if("text"==a.data?(n=this.getName(),t=this.getText(),this._delete(),i.clear(this),i.extend(this,a.editor.prototype),this._create(s,r),this.setName(n),this.setText(t)):(n=this.getName(),t=this.get(),this._delete(),i.clear(this),i.extend(this,a.editor.prototype),this._create(s,r),this.setName(n),this.set(t)),"function"==typeof a.load)try{a.load.call(this)}catch(d){}}catch(d){this._onError(d)}},o.prototype._onError=function(e){if("function"==typeof this.onError&&(i.log("WARNING: JSONEditor.onError is deprecated. Use options.error instead."),this.onError(e)),!this.options||"function"!=typeof this.options.error)throw e;this.options.error(e)},o.registerModes=function(e){for(var t in e)if(e.hasOwnProperty(t)){if(t in o.modes)throw new Error('Mode "'+t+'" already registered');o.modes[t]=e[t]}},o.registerModes(e.modes),o.registerModes(t.modes),o}.apply(null,o),!(void 0!==n&&(e.exports=n))},function(e,t,i){var o,n;o=[i(4),i(5),i(6),i(7),i(8),i(3)],n=function(e,t,i,o,n,s){function r(e,t,i){if(!(this instanceof r))throw new Error('TreeEditor constructor called without "new".');this._create(e,t,i)}return r.prototype._create=function(i,o,n){if(!i)throw new Error("No container element provided.");this.container=i,this.dom={},this.highlighter=new e,this.selection=void 0,this._setOptions(o),this.options.history&&!this.mode.view&&(this.history=new t(this)),this._createFrame(),this._createTable(),this.set(n||{})},r.prototype._delete=function(){this.frame&&this.container&&this.frame.parentNode==this.container&&this.container.removeChild(this.frame)},r.prototype._setOptions=function(e){if(this.options={search:!0,history:!0,mode:"tree",name:void 0},e)for(var t in e)e.hasOwnProperty(t)&&(this.options[t]=e[t]);this.mode={edit:"view"!=this.options.mode&&"form"!=this.options.mode,view:"view"==this.options.mode,form:"form"==this.options.mode}},r.focusNode=void 0,r.prototype.set=function(e,t){if(t&&(s.log('Warning: second parameter "name" is deprecated. Use setName(name) instead.'),this.options.name=t),e instanceof Function||void 0===e)this.clear();else{this.content.removeChild(this.table);var i={field:this.options.name,value:e},n=new o(this,i);this._setRoot(n);var r=!1;this.node.expand(r),this.content.appendChild(this.table)}this.history&&this.history.clear()},r.prototype.get=function(){return r.focusNode&&r.focusNode.blur(),this.node?this.node.getValue():void 0},r.prototype.getText=function(){return JSON.stringify(this.get())},r.prototype.setText=function(e){this.set(s.parse(e))},r.prototype.setName=function(e){this.options.name=e,this.node&&this.node.updateField(this.options.name)},r.prototype.getName=function(){return this.options.name},r.prototype.clear=function(){this.node&&(this.node.collapse(),this.tbody.removeChild(this.node.getDom()),delete this.node)},r.prototype._setRoot=function(e){this.clear(),this.node=e,this.tbody.appendChild(e.getDom())},r.prototype.search=function(e){var t;return this.node?(this.content.removeChild(this.table),t=this.node.search(e),this.content.appendChild(this.table)):t=[],t},r.prototype.expandAll=function(){this.node&&(this.content.removeChild(this.table),this.node.expand(),this.content.appendChild(this.table))},r.prototype.collapseAll=function(){this.node&&(this.content.removeChild(this.table),this.node.collapse(),this.content.appendChild(this.table))},r.prototype._onAction=function(e,t){if(this.history&&this.history.add(e,t),this.options.change)try{this.options.change()}catch(i){s.log("Error in change callback: ",i)}},r.prototype.startAutoScroll=function(e){var t=this,i=this.content,o=s.getAbsoluteTop(i),n=i.clientHeight,r=o+n,a=24,d=50;this.autoScrollStep=o+a>e&&i.scrollTop>0?(o+a-e)/3:e>r-a&&n+i.scrollTop3?(i.scrollTop+=n/3,o.animateCallback=t,o.animateTimeout=setTimeout(a,50)):(t&&t(!0),i.scrollTop=r,delete o.animateTimeout,delete o.animateCallback)};a()}else t&&t(!1)},r.prototype._createFrame=function(){function e(e){t._onEvent(e)}this.frame=document.createElement("div"),this.frame.className="jsoneditor",this.container.appendChild(this.frame);var t=this;this.frame.onclick=function(t){var i=t.target;e(t),"BUTTON"==i.nodeName&&t.preventDefault()},this.frame.oninput=e,this.frame.onchange=e,this.frame.onkeydown=e,this.frame.onkeyup=e,this.frame.oncut=e,this.frame.onpaste=e,this.frame.onmousedown=e,this.frame.onmouseup=e,this.frame.onmouseover=e,this.frame.onmouseout=e,s.addEventListener(this.frame,"focus",e,!0),s.addEventListener(this.frame,"blur",e,!0),this.frame.onfocusin=e,this.frame.onfocusout=e,this.menu=document.createElement("div"),this.menu.className="menu",this.frame.appendChild(this.menu);var o=document.createElement("button");o.className="expand-all",o.title="Expand all fields",o.onclick=function(){t.expandAll()},this.menu.appendChild(o);var r=document.createElement("button");if(r.title="Collapse all fields",r.className="collapse-all",r.onclick=function(){t.collapseAll()},this.menu.appendChild(r),this.history){var a=document.createElement("button");a.className="undo separator",a.title="Undo last action (Ctrl+Z)",a.onclick=function(){t._onUndo()},this.menu.appendChild(a),this.dom.undo=a;var d=document.createElement("button");d.className="redo",d.title="Redo (Ctrl+Shift+Z)",d.onclick=function(){t._onRedo()},this.menu.appendChild(d),this.dom.redo=d,this.history.onChange=function(){a.disabled=!t.history.canUndo(),d.disabled=!t.history.canRedo()},this.history.onChange()}if(this.options&&this.options.modes&&this.options.modes.length){var h=n.create(this,this.options.modes,this.options.mode);this.menu.appendChild(h),this.dom.modeBox=h}this.options.search&&(this.searchBox=new i(this,this.menu))},r.prototype._onUndo=function(){this.history&&(this.history.undo(),this.options.change&&this.options.change())},r.prototype._onRedo=function(){this.history&&(this.history.redo(),this.options.change&&this.options.change())},r.prototype._onEvent=function(e){var t=e.target;"keydown"==e.type&&this._onKeyDown(e),"focus"==e.type&&(r.domFocus=t);var i=o.getNodeFromTarget(t);i&&i.onEvent(e)},r.prototype._onKeyDown=function(e){var t=e.which||e.keyCode,i=e.ctrlKey,o=e.shiftKey,n=!1;if(9==t&&setTimeout(function(){s.selectContentEditable(r.domFocus)},0),this.searchBox)if(i&&70==t)this.searchBox.dom.search.focus(),this.searchBox.dom.search.select(),n=!0;else if(114==t||i&&71==t){var a=!0;o?this.searchBox.previous(a):this.searchBox.next(a),n=!0}this.history&&(i&&!o&&90==t?(this._onUndo(),n=!0):i&&o&&90==t&&(this._onRedo(),n=!0)),n&&(e.preventDefault(),e.stopPropagation())},r.prototype._createTable=function(){var e=document.createElement("div");e.className="outer",this.contentOuter=e,this.content=document.createElement("div"),this.content.className="tree",e.appendChild(this.content),this.table=document.createElement("table"),this.table.className="tree",this.content.appendChild(this.table);var t;this.colgroupContent=document.createElement("colgroup"),this.mode.edit&&(t=document.createElement("col"),t.width="24px",this.colgroupContent.appendChild(t)),t=document.createElement("col"),t.width="24px",this.colgroupContent.appendChild(t),t=document.createElement("col"),this.colgroupContent.appendChild(t),this.table.appendChild(this.colgroupContent),this.tbody=document.createElement("tbody"),this.table.appendChild(this.tbody),this.frame.appendChild(e)},r.modes={tree:{editor:r,data:"json"},view:{editor:r,data:"json"},form:{editor:r,data:"json"}},r}.apply(null,o),!(void 0!==n&&(e.exports=n))},function(e,t,i){var o,n;o=[i(8),i(3)],n=function(e,t){function i(e,t,o){if(!(this instanceof i))throw new Error('TextEditor constructor called without "new".');this._create(e,t,o)}return i.prototype._create=function(i,o,n){o=o||{},this.options=o,this.indentation=o.indentation?Number(o.indentation):2,this.mode="code"==o.mode?"code":"text","code"==this.mode&&"undefined"==typeof ace&&(this.mode="text",t.log("WARNING: Cannot load code editor, Ace library not loaded. Falling back to plain text editor"));var s=this;this.container=i,this.dom={},this.editor=void 0,this.textarea=void 0,this.width=i.clientWidth,this.height=i.clientHeight,this.frame=document.createElement("div"),this.frame.className="jsoneditor",this.frame.onclick=function(e){e.preventDefault()},this.menu=document.createElement("div"),this.menu.className="menu",this.frame.appendChild(this.menu);var r=document.createElement("button");r.className="format",r.title="Format JSON data, with proper indentation and line feeds",this.menu.appendChild(r),r.onclick=function(){try{s.format()}catch(e){s._onError(e)}};var a=document.createElement("button");if(a.className="compact",a.title="Compact JSON data, remove all whitespaces",this.menu.appendChild(a),a.onclick=function(){try{s.compact()}catch(e){s._onError(e)}},this.options&&this.options.modes&&this.options.modes.length){var d=e.create(this,this.options.modes,this.options.mode);this.menu.appendChild(d),this.dom.modeBox=d}if(this.content=document.createElement("div"),this.content.className="outer",this.frame.appendChild(this.content),this.container.appendChild(this.frame),"code"==this.mode){this.editorDom=document.createElement("div"),this.editorDom.style.height="100%",this.editorDom.style.width="100%",this.content.appendChild(this.editorDom);var h=ace.edit(this.editorDom);h.setTheme("ace/theme/jsoneditor"),h.setShowPrintMargin(!1),h.setFontSize(13),h.getSession().setMode("ace/mode/json"),h.getSession().setTabSize(2),h.getSession().setUseSoftTabs(!0),h.getSession().setUseWrapMode(!0),this.editor=h;var l=document.createElement("a");l.appendChild(document.createTextNode("powered by ace")),l.href="http://ace.ajax.org",l.target="_blank",l.className="poweredBy",l.onclick=function(){window.open(l.href,l.target)},this.menu.appendChild(l),o.change&&h.on("change",function(){o.change()})}else{var c=document.createElement("textarea");c.className="text",c.spellcheck=!1,this.content.appendChild(c),this.textarea=c,o.change&&(null===this.textarea.oninput?this.textarea.oninput=function(){o.change()}:this.textarea.onchange=function(){o.change()})}"string"==typeof n?this.setText(n):this.set(n)},i.prototype._delete=function(){this.frame&&this.container&&this.frame.parentNode==this.container&&this.container.removeChild(this.frame)},i.prototype._onError=function(e){if("function"==typeof this.onError&&(t.log("WARNING: JSONEditor.onError is deprecated. Use options.error instead."),this.onError(e)),!this.options||"function"!=typeof this.options.error)throw e;this.options.error(e)},i.prototype.compact=function(){var e=t.parse(this.getText());this.setText(JSON.stringify(e))},i.prototype.format=function(){var e=t.parse(this.getText());this.setText(JSON.stringify(e,null,this.indentation))},i.prototype.focus=function(){this.textarea&&this.textarea.focus(),this.editor&&this.editor.focus()},i.prototype.resize=function(){if(this.editor){var e=!1;this.editor.resize(e)}},i.prototype.set=function(e){this.setText(JSON.stringify(e,null,this.indentation))},i.prototype.get=function(){return t.parse(this.getText())},i.prototype.getText=function(){return this.textarea?this.textarea.value:this.editor?this.editor.getValue():""},i.prototype.setText=function(e){this.textarea&&(this.textarea.value=e),this.editor&&this.editor.setValue(e,-1)},i.modes={text:{editor:i,data:"text",load:i.prototype.format},code:{editor:i,data:"text",load:i.prototype.format}},i}.apply(null,o),!(void 0!==n&&(e.exports=n))},function(e,t,i){var o;o=function(){var e={};e.parse=function(t){try{return JSON.parse(t)}catch(i){throw e.validate(t),i}},e.validate=function(e){"undefined"!=typeof jsonlint?jsonlint.parse(e):JSON.parse(e)},e.extend=function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);return e},e.clear=function(e){for(var t in e)e.hasOwnProperty(t)&&delete e[t];return e},e.log=function(){"undefined"!=typeof console&&"function"==typeof console.log&&console.log.apply(console,arguments)},e.type=function(e){return null===e?"null":void 0===e?"undefined":e instanceof Number||"number"==typeof e?"number":e instanceof String||"string"==typeof e?"string":e instanceof Boolean||"boolean"==typeof e?"boolean":e instanceof RegExp||"regexp"==typeof e?"regexp":Array.isArray(e)?"array":"object"};var t=/^https?:\/\/\S+$/;e.isUrl=function(e){return("string"==typeof e||e instanceof String)&&t.test(e)},e.getAbsoluteLeft=function(e){var t=e.getBoundingClientRect();return t.left+window.pageXOffset||document.scrollLeft||0},e.getAbsoluteTop=function(e){var t=e.getBoundingClientRect();return t.top+window.pageYOffset||document.scrollTop||0},e.addClassName=function(e,t){var i=e.className.split(" ");-1==i.indexOf(t)&&(i.push(t),e.className=i.join(" "))},e.removeClassName=function(e,t){var i=e.className.split(" "),o=i.indexOf(t);-1!=o&&(i.splice(o,1),e.className=i.join(" "))},e.stripFormatting=function(t){for(var i=t.childNodes,o=0,n=i.length;n>o;o++){var s=i[o];s.style&&s.removeAttribute("style");var r=s.attributes;if(r)for(var a=r.length-1;a>=0;a--){var d=r[a];1==d.specified&&s.removeAttribute(d.name)}e.stripFormatting(s)}},e.setEndOfContentEditable=function(e){var t,i;document.createRange&&(t=document.createRange(),t.selectNodeContents(e),t.collapse(!1),i=window.getSelection(),i.removeAllRanges(),i.addRange(t))},e.selectContentEditable=function(e){if(e&&"DIV"==e.nodeName){var t,i;window.getSelection&&document.createRange&&(i=document.createRange(),i.selectNodeContents(e),t=window.getSelection(),t.removeAllRanges(),t.addRange(i))}},e.getSelection=function(){if(window.getSelection){var e=window.getSelection();if(e.getRangeAt&&e.rangeCount)return e.getRangeAt(0)}return null},e.setSelection=function(e){if(e&&window.getSelection){var t=window.getSelection();t.removeAllRanges(),t.addRange(e)}},e.getSelectionOffset=function(){var t=e.getSelection();return t&&"startOffset"in t&&"endOffset"in t&&t.startContainer&&t.startContainer==t.endContainer?{startOffset:t.startOffset,endOffset:t.endOffset,container:t.startContainer.parentNode}:null},e.setSelectionOffset=function(t){if(document.createRange&&window.getSelection){var i=window.getSelection();if(i){var o=document.createRange();o.setStart(t.container.firstChild,t.startOffset),o.setEnd(t.container.firstChild,t.endOffset),e.setSelection(o)}}},e.getInnerText=function(t,i){var o=void 0==i;if(o&&(i={text:"",flush:function(){var e=this.text;return this.text="",e},set:function(e){this.text=e}}),t.nodeValue)return i.flush()+t.nodeValue;if(t.hasChildNodes()){for(var n=t.childNodes,s="",r=0,a=n.length;a>r;r++){var d=n[r];if("DIV"==d.nodeName||"P"==d.nodeName){var h=n[r-1],l=h?h.nodeName:void 0;l&&"DIV"!=l&&"P"!=l&&"BR"!=l&&(s+="\n",i.flush()),s+=e.getInnerText(d,i),i.set("\n")}else"BR"==d.nodeName?(s+=i.flush(),i.set("\n")):s+=e.getInnerText(d,i)}return s}return"P"==t.nodeName&&-1!=e.getInternetExplorerVersion()?i.flush():""},e.getInternetExplorerVersion=function(){if(-1==i){var e=-1;if("Microsoft Internet Explorer"==navigator.appName){var t=navigator.userAgent,o=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");null!=o.exec(t)&&(e=parseFloat(RegExp.$1))}i=e}return i},e.isFirefox=function(){return-1!=navigator.userAgent.indexOf("Firefox")};var i=-1;return e.addEventListener=function(t,i,o,n){if(t.addEventListener)return void 0===n&&(n=!1),"mousewheel"===i&&e.isFirefox()&&(i="DOMMouseScroll"),t.addEventListener(i,o,n),o;if(t.attachEvent){var s=function(){return o.call(t,window.event)};return t.attachEvent("on"+i,s),s}},e.removeEventListener=function(t,i,o,n){t.removeEventListener?(void 0===n&&(n=!1),"mousewheel"===i&&e.isFirefox()&&(i="DOMMouseScroll"),t.removeEventListener(i,o,n)):t.detachEvent&&t.detachEvent("on"+i,o)},e}.call(t,i,t,e),!(void 0!==o&&(e.exports=o))},function(e,t,i){var o;o=function(){function e(){this.locked=!1}return e.prototype.highlight=function(e){this.locked||(this.node!=e&&(this.node&&this.node.setHighlight(!1),this.node=e,this.node.setHighlight(!0)),this._cancelUnhighlight())},e.prototype.unhighlight=function(){if(!this.locked){var e=this;this.node&&(this._cancelUnhighlight(),this.unhighlightTimer=setTimeout(function(){e.node.setHighlight(!1),e.node=void 0,e.unhighlightTimer=void 0},0))}},e.prototype._cancelUnhighlight=function(){this.unhighlightTimer&&(clearTimeout(this.unhighlightTimer),this.unhighlightTimer=void 0)},e.prototype.lock=function(){this.locked=!0},e.prototype.unlock=function(){this.locked=!1},e}.call(t,i,t,e),!(void 0!==o&&(e.exports=o))},function(e,t,i){var o,n;o=[i(3)],n=function(e){function t(e){this.editor=e,this.clear(),this.actions={editField:{undo:function(e){e.node.updateField(e.oldValue)},redo:function(e){e.node.updateField(e.newValue)}},editValue:{undo:function(e){e.node.updateValue(e.oldValue)},redo:function(e){e.node.updateValue(e.newValue)}},appendNode:{undo:function(e){e.parent.removeChild(e.node)},redo:function(e){e.parent.appendChild(e.node)}},insertBeforeNode:{undo:function(e){e.parent.removeChild(e.node)},redo:function(e){e.parent.insertBefore(e.node,e.beforeNode)}},insertAfterNode:{undo:function(e){e.parent.removeChild(e.node)},redo:function(e){e.parent.insertAfter(e.node,e.afterNode)}},removeNode:{undo:function(e){var t=e.parent,i=t.childs[e.index]||t.append;t.insertBefore(e.node,i)},redo:function(e){e.parent.removeChild(e.node)}},duplicateNode:{undo:function(e){e.parent.removeChild(e.clone)},redo:function(e){e.parent.insertAfter(e.clone,e.node)}},changeType:{undo:function(e){e.node.changeType(e.oldType)},redo:function(e){e.node.changeType(e.newType)}},moveNode:{undo:function(e){e.startParent.moveTo(e.node,e.startIndex)},redo:function(e){e.endParent.moveTo(e.node,e.endIndex)}},sort:{undo:function(e){var t=e.node;t.hideChilds(),t.sort=e.oldSort,t.childs=e.oldChilds,t.showChilds()},redo:function(e){var t=e.node;t.hideChilds(),t.sort=e.newSort,t.childs=e.newChilds,t.showChilds()}}}}return t.prototype.onChange=function(){},t.prototype.add=function(e,t){this.index++,this.history[this.index]={action:e,params:t,timestamp:new Date},this.index=0},t.prototype.canRedo=function(){return this.indexthis.results.length-1&&(t=0),this._setActiveResult(t,e)}},e.prototype.previous=function(e){if(void 0!=this.results){var t=this.results.length-1,i=void 0!=this.resultIndex?this.resultIndex-1:t;0>i&&(i=t),this._setActiveResult(i,e)}},e.prototype._setActiveResult=function(e,t){if(this.activeResult){var i=this.activeResult.node,o=this.activeResult.elem;"field"==o?delete i.searchFieldActive:delete i.searchValueActive,i.updateDom()}if(!this.results||!this.results[e])return this.resultIndex=void 0,void(this.activeResult=void 0);this.resultIndex=e;var n=this.results[this.resultIndex].node,s=this.results[this.resultIndex].elem;"field"==s?n.searchFieldActive=!0:n.searchValueActive=!0,this.activeResult=this.results[this.resultIndex],n.updateDom(),n.scrollTo(function(){t&&n.focus(s)})},e.prototype._clearDelay=function(){void 0!=this.timeout&&(clearTimeout(this.timeout),delete this.timeout)},e.prototype._onDelayedSearch=function(){this._clearDelay();var e=this;this.timeout=setTimeout(function(t){e._onSearch(t)},this.delay)},e.prototype._onSearch=function(e,t){this._clearDelay();var i=this.dom.search.value,o=i.length>0?i:void 0;if(o!=this.lastText||t)if(this.lastText=o,this.results=this.editor.search(o),this._setActiveResult(void 0),void 0!=o){var n=this.results.length;switch(n){case 0:this.dom.results.innerHTML="no results";break;case 1:this.dom.results.innerHTML="1 result";break;default:this.dom.results.innerHTML=n+" results"}}else this.dom.results.innerHTML=""},e.prototype._onKeyDown=function(e){var t=e.which;27==t?(this.dom.search.value="",this._onSearch(e),e.preventDefault(),e.stopPropagation()):13==t&&(e.ctrlKey?this._onSearch(e,!0):e.shiftKey?this.previous():this.next(),e.preventDefault(),e.stopPropagation())},e.prototype._onKeyUp=function(e){var t=e.keyCode;27!=t&&13!=t&&this._onDelayedSearch(e)},e}.call(t,i,t,e),!(void 0!==o&&(e.exports=o))},function(e,t,i){var o,n;o=[i(9),i(10),i(3)],n=function(e,t,i){function o(e,t){this.editor=e,this.dom={},this.expanded=!1,t&&t instanceof Object?(this.setField(t.field,t.fieldEditable),this.setValue(t.value,t.type)):(this.setField(""),this.setValue(null))}o.prototype.setParent=function(e){this.parent=e},o.prototype.setField=function(e,t){this.field=e,this.fieldEditable=1==t},o.prototype.getField=function(){return void 0===this.field&&this._getDomField(),this.field},o.prototype.setValue=function(e,t){var i,n,s=this.childs;if(s)for(;s.length;)this.removeChild(s[0]);if(this.type=this._getType(e),t&&t!=this.type){if("string"!=t||"auto"!=this.type)throw new Error('Type mismatch: cannot cast value of type "'+this.type+' to the specified type "'+t+'"');this.type=t}if("array"==this.type){this.childs=[];for(var r=0,a=e.length;a>r;r++)i=e[r],void 0===i||i instanceof Function||(n=new o(this.editor,{value:i}),this.appendChild(n));this.value=""}else if("object"==this.type){this.childs=[];for(var d in e)e.hasOwnProperty(d)&&(i=e[d],void 0===i||i instanceof Function||(n=new o(this.editor,{field:d,value:i}),this.appendChild(n)));this.value=""}else this.childs=void 0,this.value=e},o.prototype.getValue=function(){if("array"==this.type){var e=[];return this.childs.forEach(function(t){e.push(t.getValue())}),e}if("object"==this.type){var t={};return this.childs.forEach(function(e){t[e.getField()]=e.getValue()}),t}return void 0===this.value&&this._getDomValue(),this.value},o.prototype.getLevel=function(){return this.parent?this.parent.getLevel()+1:0},o.prototype.clone=function(){var e=new o(this.editor);if(e.type=this.type,e.field=this.field,e.fieldInnerText=this.fieldInnerText,e.fieldEditable=this.fieldEditable,e.value=this.value,e.valueInnerText=this.valueInnerText,e.expanded=this.expanded,this.childs){var t=[];this.childs.forEach(function(i){var o=i.clone();o.setParent(e),t.push(o)}),e.childs=t}else e.childs=void 0;return e},o.prototype.expand=function(e){this.childs&&(this.expanded=!0,this.dom.expand&&(this.dom.expand.className="expanded"),this.showChilds(),0!=e&&this.childs.forEach(function(t){t.expand(e)}))},o.prototype.collapse=function(e){this.childs&&(this.hideChilds(),0!=e&&this.childs.forEach(function(t){t.collapse(e)}),this.dom.expand&&(this.dom.expand.className="collapsed"),this.expanded=!1)},o.prototype.showChilds=function(){var e=this.childs;if(e&&this.expanded){var t=this.dom.tr,i=t?t.parentNode:void 0;if(i){var o=this.getAppend(),n=t.nextSibling;n?i.insertBefore(o,n):i.appendChild(o),this.childs.forEach(function(e){i.insertBefore(e.getDom(),o),e.showChilds()})}}},o.prototype.hide=function(){var e=this.dom.tr,t=e?e.parentNode:void 0;t&&t.removeChild(e),this.hideChilds()},o.prototype.hideChilds=function(){var e=this.childs;if(e&&this.expanded){var t=this.getAppend();t.parentNode&&t.parentNode.removeChild(t),this.childs.forEach(function(e){e.hide()})}},o.prototype.appendChild=function(e){if(this._hasChilds()){if(e.setParent(this),e.fieldEditable="object"==this.type,"array"==this.type&&(e.index=this.childs.length),this.childs.push(e),this.expanded){var t=e.getDom(),i=this.getAppend(),o=i?i.parentNode:void 0;i&&o&&o.insertBefore(t,i),e.showChilds()}this.updateDom({updateIndexes:!0}),e.updateDom({recurse:!0})}},o.prototype.moveBefore=function(e,t){if(this._hasChilds()){var i=this.dom.tr?this.dom.tr.parentNode:void 0;if(i){var o=document.createElement("tr");o.style.height=i.clientHeight+"px",i.appendChild(o)}e.parent&&e.parent.removeChild(e),t instanceof n?this.appendChild(e):this.insertBefore(e,t),i&&i.removeChild(o)}},o.prototype.moveTo=function(e,t){if(e.parent==this){var i=this.childs.indexOf(e);t>i&&t++}var o=this.childs[t]||this.append;this.moveBefore(e,o)},o.prototype.insertBefore=function(e,t){if(this._hasChilds()){if(t==this.append)e.setParent(this),e.fieldEditable="object"==this.type,this.childs.push(e);else{var i=this.childs.indexOf(t);if(-1==i)throw new Error("Node not found");e.setParent(this),e.fieldEditable="object"==this.type,this.childs.splice(i,0,e)}if(this.expanded){var o=e.getDom(),n=t.getDom(),s=n?n.parentNode:void 0;n&&s&&s.insertBefore(o,n),e.showChilds()}this.updateDom({updateIndexes:!0}),e.updateDom({recurse:!0})}},o.prototype.insertAfter=function(e,t){if(this._hasChilds()){var i=this.childs.indexOf(t),o=this.childs[i+1];o?this.insertBefore(e,o):this.appendChild(e)}},o.prototype.search=function(e){var t,i=[],o=e?e.toLowerCase():void 0;if(delete this.searchField,delete this.searchValue,void 0!=this.field){var n=String(this.field).toLowerCase();t=n.indexOf(o),-1!=t&&(this.searchField=!0,i.push({node:this,elem:"field"})),this._updateDomField()}if(this._hasChilds()){if(this.childs){var s=[];this.childs.forEach(function(t){s=s.concat(t.search(e))}),i=i.concat(s)}if(void 0!=o){var r=!1;0==s.length?this.collapse(r):this.expand(r)}}else{if(void 0!=this.value){var a=String(this.value).toLowerCase();t=a.indexOf(o),-1!=t&&(this.searchValue=!0,i.push({node:this,elem:"value"}))}this._updateDomValue()}return i},o.prototype.scrollTo=function(e){if(!this.dom.tr||!this.dom.tr.parentNode)for(var t=this.parent,i=!1;t;)t.expand(i),t=t.parent;this.dom.tr&&this.dom.tr.parentNode&&this.editor.scrollTo(this.dom.tr.offsetTop,e)},o.focusElement=void 0,o.prototype.focus=function(e){if(o.focusElement=e,this.dom.tr&&this.dom.tr.parentNode){var t=this.dom;switch(e){case"drag":t.drag?t.drag.focus():t.menu.focus();break;case"menu":t.menu.focus();break;case"expand":this._hasChilds()?t.expand.focus():t.field&&this.fieldEditable?(t.field.focus(),i.selectContentEditable(t.field)):t.value&&!this._hasChilds()?(t.value.focus(),i.selectContentEditable(t.value)):t.menu.focus();break;case"field":t.field&&this.fieldEditable?(t.field.focus(),i.selectContentEditable(t.field)):t.value&&!this._hasChilds()?(t.value.focus(),i.selectContentEditable(t.value)):this._hasChilds()?t.expand.focus():t.menu.focus();break;case"value":default:t.value&&!this._hasChilds()?(t.value.focus(),i.selectContentEditable(t.value)):t.field&&this.fieldEditable?(t.field.focus(),i.selectContentEditable(t.field)):this._hasChilds()?t.expand.focus():t.menu.focus()}}},o.select=function(e){setTimeout(function(){i.selectContentEditable(e)},0)},o.prototype.blur=function(){this._getDomValue(!1),this._getDomField(!1)},o.prototype._duplicate=function(e){var t=e.clone();return this.insertAfter(t,e),t},o.prototype.containsNode=function(e){if(this==e)return!0;var t=this.childs;if(t)for(var i=0,o=t.length;o>i;i++)if(t[i].containsNode(e))return!0;return!1},o.prototype._move=function(e,t){if(e!=t){if(e.containsNode(this))throw new Error("Cannot move a field into a child of itself");e.parent&&e.parent.removeChild(e);var i=e.clone();e.clearDom(),t?this.insertBefore(i,t):this.appendChild(i)}},o.prototype.removeChild=function(e){if(this.childs){var t=this.childs.indexOf(e);if(-1!=t){e.hide(),delete e.searchField,delete e.searchValue;var i=this.childs.splice(t,1)[0];return this.updateDom({updateIndexes:!0}),i}}return void 0},o.prototype._remove=function(e){this.removeChild(e) -},o.prototype.changeType=function(e){var t=this.type;if(t!=e){if("string"!=e&&"auto"!=e||"string"!=t&&"auto"!=t){var i,o=this.dom.tr?this.dom.tr.parentNode:void 0;i=this.expanded?this.getAppend():this.getDom();var n=i&&i.parentNode?i.nextSibling:void 0;this.hide(),this.clearDom(),this.type=e,"object"==e?(this.childs||(this.childs=[]),this.childs.forEach(function(e){e.clearDom(),delete e.index,e.fieldEditable=!0,void 0==e.field&&(e.field="")}),("string"==t||"auto"==t)&&(this.expanded=!0)):"array"==e?(this.childs||(this.childs=[]),this.childs.forEach(function(e,t){e.clearDom(),e.fieldEditable=!1,e.index=t}),("string"==t||"auto"==t)&&(this.expanded=!0)):this.expanded=!1,o&&(n?o.insertBefore(this.getDom(),n):o.appendChild(this.getDom())),this.showChilds()}else this.type=e;("auto"==e||"string"==e)&&(this.value="string"==e?String(this.value):this._stringCast(String(this.value)),this.focus()),this.updateDom({updateIndexes:!0})}},o.prototype._getDomValue=function(e){if(this.dom.value&&"array"!=this.type&&"object"!=this.type&&(this.valueInnerText=i.getInnerText(this.dom.value)),void 0!=this.valueInnerText)try{var t;if("string"==this.type)t=this._unescapeHTML(this.valueInnerText);else{var o=this._unescapeHTML(this.valueInnerText);t=this._stringCast(o)}if(t!==this.value){var n=this.value;this.value=t,this.editor._onAction("editValue",{node:this,oldValue:n,newValue:t,oldSelection:this.editor.selection,newSelection:this.editor.getSelection()})}}catch(s){if(this.value=void 0,1!=e)throw s}},o.prototype._updateDomValue=function(){var e=this.dom.value;if(e){var t=this.value,o="auto"==this.type?i.type(t):this.type,n="string"==o&&i.isUrl(t),s="";s=n&&!this.editor.mode.edit?"":"string"==o?"green":"number"==o?"red":"boolean"==o?"darkorange":this._hasChilds()?"":null===t?"#004ED0":"black",e.style.color=s;var r=""==String(this.value)&&"array"!=this.type&&"object"!=this.type;if(r?i.addClassName(e,"empty"):i.removeClassName(e,"empty"),n?i.addClassName(e,"url"):i.removeClassName(e,"url"),"array"==o||"object"==o){var a=this.childs?this.childs.length:0;e.title=this.type+" containing "+a+" items"}else"string"==o&&i.isUrl(t)?this.editor.mode.edit&&(e.title="Ctrl+Click or Ctrl+Enter to open url in new window"):e.title="";this.searchValueActive?i.addClassName(e,"highlight-active"):i.removeClassName(e,"highlight-active"),this.searchValue?i.addClassName(e,"highlight"):i.removeClassName(e,"highlight"),i.stripFormatting(e)}},o.prototype._updateDomField=function(){var e=this.dom.field;if(e){var t=""==String(this.field)&&"array"!=this.parent.type;t?i.addClassName(e,"empty"):i.removeClassName(e,"empty"),this.searchFieldActive?i.addClassName(e,"highlight-active"):i.removeClassName(e,"highlight-active"),this.searchField?i.addClassName(e,"highlight"):i.removeClassName(e,"highlight"),i.stripFormatting(e)}},o.prototype._getDomField=function(e){if(this.dom.field&&this.fieldEditable&&(this.fieldInnerText=i.getInnerText(this.dom.field)),void 0!=this.fieldInnerText)try{var t=this._unescapeHTML(this.fieldInnerText);if(t!==this.field){var o=this.field;this.field=t,this.editor._onAction("editField",{node:this,oldValue:o,newValue:t,oldSelection:this.editor.selection,newSelection:this.editor.getSelection()})}}catch(n){if(this.field=void 0,1!=e)throw n}},o.prototype.clearDom=function(){this.dom={}},o.prototype.getDom=function(){var e=this.dom;if(e.tr)return e.tr;if(e.tr=document.createElement("tr"),e.tr.node=this,this.editor.mode.edit){var t=document.createElement("td");if(this.parent){var i=document.createElement("button");e.drag=i,i.className="dragarea",i.title="Drag to move this field (Alt+Shift+Arrows)",t.appendChild(i)}e.tr.appendChild(t);var o=document.createElement("td"),n=document.createElement("button");e.menu=n,n.className="contextmenu",n.title="Click to open the actions menu (Ctrl+M)",o.appendChild(e.menu),e.tr.appendChild(o)}var s=document.createElement("td");return e.tr.appendChild(s),e.tree=this._createDomTree(),s.appendChild(e.tree),this.updateDom({updateIndexes:!0}),e.tr},o.prototype._onDragStart=function(e){var t=this;this.mousemove||(this.mousemove=i.addEventListener(document,"mousemove",function(e){t._onDrag(e)})),this.mouseup||(this.mouseup=i.addEventListener(document,"mouseup",function(e){t._onDragEnd(e)})),this.editor.highlighter.lock(),this.drag={oldCursor:document.body.style.cursor,startParent:this.parent,startIndex:this.parent.childs.indexOf(this),mouseX:e.pageX,level:this.getLevel()},document.body.style.cursor="move",e.preventDefault()},o.prototype._onDrag=function(e){var t,s,r,a,d,h,l,c,u,p,f,m,v,g,y=e.pageY,x=e.pageX,C=!1;if(t=this.dom.tr,u=i.getAbsoluteTop(t),m=t.offsetHeight,u>y){s=t;do s=s.previousSibling,l=o.getNodeFromTarget(s),p=s?i.getAbsoluteTop(s):0;while(s&&p>y);l&&!l.parent&&(l=void 0),l||(h=t.parentNode.firstChild,s=h?h.nextSibling:void 0,l=o.getNodeFromTarget(s),l==this&&(l=void 0)),l&&(s=l.dom.tr,p=s?i.getAbsoluteTop(s):0,y>p+m&&(l=void 0)),l&&(l.parent.moveBefore(this,l),C=!0)}else if(d=this.expanded&&this.append?this.append.getDom():this.dom.tr,a=d?d.nextSibling:void 0){f=i.getAbsoluteTop(a),r=a;do c=o.getNodeFromTarget(r),r&&(v=r.nextSibling?i.getAbsoluteTop(r.nextSibling):0,g=r?v-f:0,1==c.parent.childs.length&&c.parent.childs[0]==this&&(u+=23)),r=r.nextSibling;while(r&&y>u+g);if(c&&c.parent){var b=x-this.drag.mouseX,N=Math.round(b/24/2),E=this.drag.level+N,_=c.getLevel();for(s=c.dom.tr.previousSibling;E>_&&s;){if(l=o.getNodeFromTarget(s),l==this||l._isChildOf(this));else{if(!(l instanceof n))break;var w=l.parent.childs;if(!(w.length>1||1==w.length&&w[0]!=this))break;c=o.getNodeFromTarget(s),_=c.getLevel()}s=s.previousSibling}d.nextSibling!=c.dom.tr&&(c.parent.moveBefore(this,c),C=!0)}}C&&(this.drag.mouseX=x,this.drag.level=this.getLevel()),this.editor.startAutoScroll(y),e.preventDefault()},o.prototype._onDragEnd=function(e){var t={node:this,startParent:this.drag.startParent,startIndex:this.drag.startIndex,endParent:this.parent,endIndex:this.parent.childs.indexOf(this)};(t.startParent!=t.endParent||t.startIndex!=t.endIndex)&&this.editor._onAction("moveNode",t),document.body.style.cursor=this.drag.oldCursor,this.editor.highlighter.unlock(),delete this.drag,this.mousemove&&(i.removeEventListener(document,"mousemove",this.mousemove),delete this.mousemove),this.mouseup&&(i.removeEventListener(document,"mouseup",this.mouseup),delete this.mouseup),this.editor.stopAutoScroll(),e.preventDefault()},o.prototype._isChildOf=function(e){for(var t=this.parent;t;){if(t==e)return!0;t=t.parent}return!1},o.prototype._createDomField=function(){return document.createElement("div")},o.prototype.setHighlight=function(e){this.dom.tr&&(this.dom.tr.className=e?"highlight":"",this.append&&this.append.setHighlight(e),this.childs&&this.childs.forEach(function(t){t.setHighlight(e)}))},o.prototype.updateValue=function(e){this.value=e,this.updateDom()},o.prototype.updateField=function(e){this.field=e,this.updateDom()},o.prototype.updateDom=function(e){var t=this.dom.tree;t&&(t.style.marginLeft=24*this.getLevel()+"px");var i=this.dom.field;if(i){1==this.fieldEditable?(i.contentEditable=this.editor.mode.edit,i.spellcheck=!1,i.className="field"):i.className="readonly";var o;o=void 0!=this.index?this.index:void 0!=this.field?this.field:this._hasChilds()?this.type:"",i.innerHTML=this._escapeHTML(o)}var n=this.dom.value;if(n){var s=this.childs?this.childs.length:0;n.innerHTML="array"==this.type?"["+s+"]":"object"==this.type?"{"+s+"}":this._escapeHTML(this.value)}this._updateDomField(),this._updateDomValue(),e&&1==e.updateIndexes&&this._updateDomIndexes(),e&&1==e.recurse&&this.childs&&this.childs.forEach(function(t){t.updateDom(e)}),this.append&&this.append.updateDom()},o.prototype._updateDomIndexes=function(){var e=this.dom.value,t=this.childs;e&&t&&("array"==this.type?t.forEach(function(e,t){e.index=t;var i=e.dom.field;i&&(i.innerHTML=t)}):"object"==this.type&&t.forEach(function(e){void 0!=e.index&&(delete e.index,void 0==e.field&&(e.field=""))}))},o.prototype._createDomValue=function(){var e;return"array"==this.type?(e=document.createElement("div"),e.className="readonly",e.innerHTML="[...]"):"object"==this.type?(e=document.createElement("div"),e.className="readonly",e.innerHTML="{...}"):!this.editor.mode.edit&&i.isUrl(this.value)?(e=document.createElement("a"),e.className="value",e.href=this.value,e.target="_blank",e.innerHTML=this._escapeHTML(this.value)):(e=document.createElement("div"),e.contentEditable=!this.editor.mode.view,e.spellcheck=!1,e.className="value",e.innerHTML=this._escapeHTML(this.value)),e},o.prototype._createDomExpandButton=function(){var e=document.createElement("button");return this._hasChilds()?(e.className=this.expanded?"expanded":"collapsed",e.title="Click to expand/collapse this field (Ctrl+E). \nCtrl+Click to expand/collapse including all childs."):(e.className="invisible",e.title=""),e},o.prototype._createDomTree=function(){var e=this.dom,t=document.createElement("table"),i=document.createElement("tbody");t.style.borderCollapse="collapse",t.className="values",t.appendChild(i);var o=document.createElement("tr");i.appendChild(o);var n=document.createElement("td");n.className="tree",o.appendChild(n),e.expand=this._createDomExpandButton(),n.appendChild(e.expand),e.tdExpand=n;var s=document.createElement("td");s.className="tree",o.appendChild(s),e.field=this._createDomField(),s.appendChild(e.field),e.tdField=s;var r=document.createElement("td");r.className="tree",o.appendChild(r),"object"!=this.type&&"array"!=this.type&&(r.appendChild(document.createTextNode(":")),r.className="separator"),e.tdSeparator=r;var a=document.createElement("td");return a.className="tree",o.appendChild(a),e.value=this._createDomValue(),a.appendChild(e.value),e.tdValue=a,t},o.prototype.onEvent=function(e){var t,o=e.type,n=e.target||e.srcElement,s=this.dom,r=this,a=this._hasChilds();if((n==s.drag||n==s.menu)&&("mouseover"==o?this.editor.highlighter.highlight(this):"mouseout"==o&&this.editor.highlighter.unhighlight()),"mousedown"==o&&n==s.drag&&this._onDragStart(e),"click"==o&&n==s.menu){var d=r.editor.highlighter;d.highlight(r),d.lock(),i.addClassName(s.menu,"selected"),this.showContextMenu(s.menu,function(){i.removeClassName(s.menu,"selected"),d.unlock(),d.unhighlight()})}if("click"==o&&n==s.expand&&a){var h=e.ctrlKey;this._onExpand(h)}var l=s.value;if(n==l)switch(o){case"focus":t=this;break;case"blur":case"change":this._getDomValue(!0),this._updateDomValue(),this.value&&(l.innerHTML=this._escapeHTML(this.value));break;case"input":this._getDomValue(!0),this._updateDomValue();break;case"keydown":case"mousedown":this.editor.selection=this.editor.getSelection();break;case"click":e.ctrlKey&&this.editor.mode.edit&&i.isUrl(this.value)&&window.open(this.value,"_blank");break;case"keyup":this._getDomValue(!0),this._updateDomValue();break;case"cut":case"paste":setTimeout(function(){r._getDomValue(!0),r._updateDomValue()},1)}var c=s.field;if(n==c)switch(o){case"focus":t=this;break;case"blur":case"change":this._getDomField(!0),this._updateDomField(),this.field&&(c.innerHTML=this._escapeHTML(this.field));break;case"input":this._getDomField(!0),this._updateDomField();break;case"keydown":case"mousedown":this.editor.selection=this.editor.getSelection();break;case"keyup":this._getDomField(!0),this._updateDomField();break;case"cut":case"paste":setTimeout(function(){r._getDomField(!0),r._updateDomField()},1)}var u=s.tree;if(n==u.parentNode)switch(o){case"click":var p=void 0!=e.offsetX?e.offsetX<24*(this.getLevel()+1):e.pageXo[i]?t:e[i]/g,">").replace(/ /g,"  ").replace(/^ /," ").replace(/ $/," "),i=JSON.stringify(t);return i.substring(1,i.length-1)},o.prototype._unescapeHTML=function(e){var t='"'+this._escapeJSON(e)+'"',o=i.parse(t);return o.replace(/</g,"<").replace(/>/g,">").replace(/ |\u00A0/g," ")},o.prototype._escapeJSON=function(e){for(var t="",i=0,o=e.length;o>i;){var n=e.charAt(i);"\n"==n?t+="\\n":"\\"==n?(t+=n,i++,n=e.charAt(i),-1=='"\\/bfnrtu'.indexOf(n)&&(t+="\\"),t+=n):t+='"'==n?'\\"':n,i++}return t};var n=t(o);return o}.apply(null,o),!(void 0!==n&&(e.exports=n))},function(e,t,i){var o,n;o=[i(9)],n=function(e){function t(t,i,o){function n(e){t.setMode(e);var i=t.dom&&t.dom.modeBox;i&&i.focus()}for(var s={code:{text:"Code",title:"Switch to code highlighter",click:function(){n("code")}},form:{text:"Form",title:"Switch to form editor",click:function(){n("form")}},text:{text:"Text",title:"Switch to plain text editor",click:function(){n("text")}},tree:{text:"Tree",title:"Switch to tree editor",click:function(){n("tree")}},view:{text:"View",title:"Switch to tree view",click:function(){n("view")}}},r=[],a=0;a',a.appendChild(c),n.submenuTitle&&(c.title=n.submenuTitle),l=c}else{var u=document.createElement("div");u.className="expand",d.appendChild(u),l=d}l.onclick=function(){o._onExpandItem(r),l.focus()};var p=[];r.subItems=p;var f=document.createElement("ul");r.ul=f,f.className="menu",f.style.height="0",a.appendChild(f),i(f,p,n.submenu)}else d.innerHTML='
'+n.text;t.push(r)}})}this.dom={};var o=this,n=this.dom;this.anchor=void 0,this.items=e,this.eventListeners={},this.selection=void 0,this.visibleSubmenu=void 0,this.onClose=t?t.close:void 0;var s=document.createElement("div");s.className="jsoneditor-contextmenu",n.menu=s;var r=document.createElement("ul");r.className="menu",s.appendChild(r),n.list=r,n.items=[];var a=document.createElement("button");n.focusButton=a;var d=document.createElement("li");d.style.overflow="hidden",d.style.height="0",d.appendChild(a),r.appendChild(d),i(r,this.dom.items,e),this.maxHeight=0,e.forEach(function(t){var i=24*(e.length+(t.submenu?t.submenu.length:0));o.maxHeight=Math.max(o.maxHeight,i)})}return t.prototype._getVisibleButtons=function(){var e=[],t=this;return this.dom.items.forEach(function(i){e.push(i.button),i.buttonExpand&&e.push(i.buttonExpand),i.subItems&&i==t.expandedItem&&i.subItems.forEach(function(t){e.push(t.button),t.buttonExpand&&e.push(t.buttonExpand)})}),e},t.visibleMenu=void 0,t.prototype.show=function(i){this.hide();var o=window.innerHeight,n=window.pageYOffset||document.scrollTop||0,s=o+n,r=i.offsetHeight,a=this.maxHeight,d=e.getAbsoluteLeft(i),h=e.getAbsoluteTop(i);s>h+r+a?(this.dom.menu.style.left=d+"px",this.dom.menu.style.top=h+r+"px",this.dom.menu.style.bottom=""):(this.dom.menu.style.left=d+"px",this.dom.menu.style.top="",this.dom.menu.style.bottom=o-h+"px"),document.body.appendChild(this.dom.menu);var l=this,c=this.dom.list;this.eventListeners.mousedown=e.addEventListener(document,"mousedown",function(e){var t=e.target;t==c||l._isChildOf(t,c)||(l.hide(),e.stopPropagation(),e.preventDefault())}),this.eventListeners.mousewheel=e.addEventListener(document,"mousewheel",function(e){e.stopPropagation(),e.preventDefault()}),this.eventListeners.keydown=e.addEventListener(document,"keydown",function(e){l._onKeyDown(e)}),this.selection=e.getSelection(),this.anchor=i,setTimeout(function(){l.dom.focusButton.focus()},0),t.visibleMenu&&t.visibleMenu.hide(),t.visibleMenu=this},t.prototype.hide=function(){this.dom.menu.parentNode&&(this.dom.menu.parentNode.removeChild(this.dom.menu),this.onClose&&this.onClose());for(var i in this.eventListeners)if(this.eventListeners.hasOwnProperty(i)){var o=this.eventListeners[i];o&&e.removeEventListener(document,i,o),delete this.eventListeners[i]}t.visibleMenu==this&&(t.visibleMenu=void 0)},t.prototype._onExpandItem=function(t){var i=this,o=t==this.expandedItem,n=this.expandedItem;if(n&&(n.ul.style.height="0",n.ul.style.padding="",setTimeout(function(){i.expandedItem!=n&&(n.ul.style.display="",e.removeClassName(n.ul.parentNode,"selected"))},300),this.expandedItem=void 0),!o){var s=t.ul;s.style.display="block";{s.clientHeight}setTimeout(function(){i.expandedItem==t&&(s.style.height=24*s.childNodes.length+"px",s.style.padding="5px 10px")},0),e.addClassName(s.parentNode,"selected"),this.expandedItem=t}},t.prototype._onKeyDown=function(t){var i,o,n,s,r=t.target,a=t.which,d=!1;27==a?(this.selection&&e.setSelection(this.selection),this.anchor&&this.anchor.focus(),this.hide(),d=!0):9==a?t.shiftKey?(i=this._getVisibleButtons(),o=i.indexOf(r),0==o&&(i[i.length-1].focus(),d=!0)):(i=this._getVisibleButtons(),o=i.indexOf(r),o==i.length-1&&(i[0].focus(),d=!0)):37==a?("expand"==r.className&&(i=this._getVisibleButtons(),o=i.indexOf(r),n=i[o-1],n&&n.focus()),d=!0):38==a?(i=this._getVisibleButtons(),o=i.indexOf(r),n=i[o-1],n&&"expand"==n.className&&(n=i[o-2]),n||(n=i[i.length-1]),n&&n.focus(),d=!0):39==a?(i=this._getVisibleButtons(),o=i.indexOf(r),s=i[o+1],s&&"expand"==s.className&&s.focus(),d=!0):40==a&&(i=this._getVisibleButtons(),o=i.indexOf(r),s=i[o+1],s&&"expand"==s.className&&(s=i[o+2]),s||(s=i[0]),s&&(s.focus(),d=!0),d=!0),d&&(t.stopPropagation(),t.preventDefault())},t.prototype._isChildOf=function(e,t){for(var i=e.parentNode;i;){if(i==t)return!0;i=i.parentNode}return!1},t}.apply(null,o),!(void 0!==n&&(e.exports=n))},function(e,t,i){var o,n;o=[i(3)],n=function(e){function t(t){function i(e){this.editor=e,this.dom={}}return i.prototype=new t,i.prototype.getDom=function(){var e=this.dom;if(e.tr)return e.tr;var t=document.createElement("tr");if(t.node=this,e.tr=t,this.editor.mode.edit){e.tdDrag=document.createElement("td");var i=document.createElement("td");e.tdMenu=i;var o=document.createElement("button");o.className="contextmenu",o.title="Click to open the actions menu (Ctrl+M)",e.menu=o,i.appendChild(e.menu)}var n=document.createElement("td"),s=document.createElement("div");return s.innerHTML="(empty)",s.className="readonly",n.appendChild(s),e.td=n,e.text=s,this.updateDom(),t},i.prototype.updateDom=function(){var e=this.dom,t=e.td;t&&(t.style.paddingLeft=24*this.getLevel()+26+"px");var i=e.text;i&&(i.innerHTML="(empty "+this.parent.type+")");var o=e.tr;this.isVisible()?e.tr.firstChild||(e.tdDrag&&o.appendChild(e.tdDrag),e.tdMenu&&o.appendChild(e.tdMenu),o.appendChild(t)):e.tr.firstChild&&(e.tdDrag&&o.removeChild(e.tdDrag),e.tdMenu&&o.removeChild(e.tdMenu),o.removeChild(t))},i.prototype.isVisible=function(){return 0==this.parent.childs.length},i.prototype.showContextMenu=function(e,i){var o=this,n=t.TYPE_TITLES,s=[{text:"Append",title:"Append a new field with type 'auto' (Ctrl+Shift+Ins)",submenuTitle:"Select the type of the field to be appended",className:"insert",click:function(){o._onAppend("","","auto")},submenu:[{text:"Auto",className:"type-auto",title:n.auto,click:function(){o._onAppend("","","auto")}},{text:"Array",className:"type-array",title:n.array,click:function(){o._onAppend("",[])}},{text:"Object",className:"type-object",title:n.object,click:function(){o._onAppend("",{})}},{text:"String",className:"type-string",title:n.string,click:function(){o._onAppend("","","string")}}]}],r=new ContextMenu(s,{close:i});r.show(e)},i.prototype.onEvent=function(t){var i=t.type,o=t.target||t.srcElement,n=this.dom,s=n.menu;if(o==s&&("mouseover"==i?this.editor.highlighter.highlight(this.parent):"mouseout"==i&&this.editor.highlighter.unhighlight()),"click"==i&&o==n.menu){var r=this.editor.highlighter;r.highlight(this.parent),r.lock(),e.addClassName(n.menu,"selected"),this.showContextMenu(n.menu,function(){e.removeClassName(n.menu,"selected"),r.unlock(),r.unhighlight()})}"keydown"==i&&this.onKeyDown(t)},i}return t}.apply(null,o),!(void 0!==n&&(e.exports=n))}])}); +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):"object"==typeof exports?exports.JSONEditor=t():e.JSONEditor=t()}(this,function(){return function(e){function t(o){if(i[o])return i[o].exports;var n=i[o]={exports:{},id:o,loaded:!1};return e[o].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var i={};return t.m=e,t.c=i,t.p="",t(0)}([function(e,t,i){var o,n;o=[i(1),i(2),i(3)],n=function(e,t,i){function o(e,t,n){if(!(this instanceof o))throw new Error('JSONEditor constructor called without "new".');var s=i.getInternetExplorerVersion();if(-1!=s&&9>s)throw new Error("Unsupported browser, IE9 or newer required. Please install the newest version of your browser.");arguments.length&&this._create(e,t,n)}return o.modes={},o.prototype._create=function(e,t,i){this.container=e,this.options=t||{},this.json=i||{};var o=this.options.mode||"tree";this.setMode(o)},o.prototype._delete=function(){},o.prototype.set=function(e){this.json=e},o.prototype.get=function(){return this.json},o.prototype.setText=function(e){this.json=i.parse(e)},o.prototype.getText=function(){return JSON.stringify(this.json)},o.prototype.setName=function(e){this.options||(this.options={}),this.options.name=e},o.prototype.getName=function(){return this.options&&this.options.name},o.prototype.setMode=function(e){var t,n,s=this.container,r=i.extend({},this.options);r.mode=e;var a=o.modes[e];if(!a)throw new Error('Unknown mode "'+r.mode+'"');try{if("text"==a.data?(n=this.getName(),t=this.getText(),this._delete(),i.clear(this),i.extend(this,a.editor.prototype),this._create(s,r),this.setName(n),this.setText(t)):(n=this.getName(),t=this.get(),this._delete(),i.clear(this),i.extend(this,a.editor.prototype),this._create(s,r),this.setName(n),this.set(t)),"function"==typeof a.load)try{a.load.call(this)}catch(d){}}catch(d){this._onError(d)}},o.prototype._onError=function(e){if("function"==typeof this.onError&&(i.log("WARNING: JSONEditor.onError is deprecated. Use options.error instead."),this.onError(e)),!this.options||"function"!=typeof this.options.error)throw e;this.options.error(e)},o.registerModes=function(e){for(var t in e)if(e.hasOwnProperty(t)){if(t in o.modes)throw new Error('Mode "'+t+'" already registered');o.modes[t]=e[t]}},o.registerModes(e.modes),o.registerModes(t.modes),o}.apply(null,o),!(void 0!==n&&(e.exports=n))},function(e,t,i){var o,n;o=[i(5),i(6),i(7),i(8),i(4),i(3)],n=function(e,t,i,o,n,s){function r(e,t,i){if(!(this instanceof r))throw new Error('TreeEditor constructor called without "new".');this._create(e,t,i)}return r.prototype._create=function(i,o,n){if(!i)throw new Error("No container element provided.");this.container=i,this.dom={},this.highlighter=new e,this.selection=void 0,this._setOptions(o),this.options.history&&!this.mode.view&&(this.history=new t(this)),this._createFrame(),this._createTable(),this.set(n||{})},r.prototype._delete=function(){this.frame&&this.container&&this.frame.parentNode==this.container&&this.container.removeChild(this.frame)},r.prototype._setOptions=function(e){if(this.options={search:!0,history:!0,mode:"tree",name:void 0},e)for(var t in e)e.hasOwnProperty(t)&&(this.options[t]=e[t]);this.mode={edit:"view"!=this.options.mode&&"form"!=this.options.mode,view:"view"==this.options.mode,form:"form"==this.options.mode}},r.focusNode=void 0,r.prototype.set=function(e,t){if(t&&(s.log('Warning: second parameter "name" is deprecated. Use setName(name) instead.'),this.options.name=t),e instanceof Function||void 0===e)this.clear();else{this.content.removeChild(this.table);var i={field:this.options.name,value:e},n=new o(this,i);this._setRoot(n);var r=!1;this.node.expand(r),this.content.appendChild(this.table)}this.history&&this.history.clear()},r.prototype.get=function(){return r.focusNode&&r.focusNode.blur(),this.node?this.node.getValue():void 0},r.prototype.getText=function(){return JSON.stringify(this.get())},r.prototype.setText=function(e){this.set(s.parse(e))},r.prototype.setName=function(e){this.options.name=e,this.node&&this.node.updateField(this.options.name)},r.prototype.getName=function(){return this.options.name},r.prototype.clear=function(){this.node&&(this.node.collapse(),this.tbody.removeChild(this.node.getDom()),delete this.node)},r.prototype._setRoot=function(e){this.clear(),this.node=e,this.tbody.appendChild(e.getDom())},r.prototype.search=function(e){var t;return this.node?(this.content.removeChild(this.table),t=this.node.search(e),this.content.appendChild(this.table)):t=[],t},r.prototype.expandAll=function(){this.node&&(this.content.removeChild(this.table),this.node.expand(),this.content.appendChild(this.table))},r.prototype.collapseAll=function(){this.node&&(this.content.removeChild(this.table),this.node.collapse(),this.content.appendChild(this.table))},r.prototype._onAction=function(e,t){if(this.history&&this.history.add(e,t),this.options.change)try{this.options.change()}catch(i){s.log("Error in change callback: ",i)}},r.prototype.startAutoScroll=function(e){var t=this,i=this.content,o=s.getAbsoluteTop(i),n=i.clientHeight,r=o+n,a=24,d=50;this.autoScrollStep=o+a>e&&i.scrollTop>0?(o+a-e)/3:e>r-a&&n+i.scrollTop3?(i.scrollTop+=n/3,o.animateCallback=t,o.animateTimeout=setTimeout(a,50)):(t&&t(!0),i.scrollTop=r,delete o.animateTimeout,delete o.animateCallback)};a()}else t&&t(!1)},r.prototype._createFrame=function(){function e(e){t._onEvent(e)}this.frame=document.createElement("div"),this.frame.className="jsoneditor",this.container.appendChild(this.frame);var t=this;this.frame.onclick=function(t){var i=t.target;e(t),"BUTTON"==i.nodeName&&t.preventDefault()},this.frame.oninput=e,this.frame.onchange=e,this.frame.onkeydown=e,this.frame.onkeyup=e,this.frame.oncut=e,this.frame.onpaste=e,this.frame.onmousedown=e,this.frame.onmouseup=e,this.frame.onmouseover=e,this.frame.onmouseout=e,s.addEventListener(this.frame,"focus",e,!0),s.addEventListener(this.frame,"blur",e,!0),this.frame.onfocusin=e,this.frame.onfocusout=e,this.menu=document.createElement("div"),this.menu.className="menu",this.frame.appendChild(this.menu);var o=document.createElement("button");o.className="expand-all",o.title="Expand all fields",o.onclick=function(){t.expandAll()},this.menu.appendChild(o);var r=document.createElement("button");if(r.title="Collapse all fields",r.className="collapse-all",r.onclick=function(){t.collapseAll()},this.menu.appendChild(r),this.history){var a=document.createElement("button");a.className="undo separator",a.title="Undo last action (Ctrl+Z)",a.onclick=function(){t._onUndo()},this.menu.appendChild(a),this.dom.undo=a;var d=document.createElement("button");d.className="redo",d.title="Redo (Ctrl+Shift+Z)",d.onclick=function(){t._onRedo()},this.menu.appendChild(d),this.dom.redo=d,this.history.onChange=function(){a.disabled=!t.history.canUndo(),d.disabled=!t.history.canRedo()},this.history.onChange()}if(this.options&&this.options.modes&&this.options.modes.length){var h=n.create(this,this.options.modes,this.options.mode);this.menu.appendChild(h),this.dom.modeBox=h}this.options.search&&(this.searchBox=new i(this,this.menu))},r.prototype._onUndo=function(){this.history&&(this.history.undo(),this.options.change&&this.options.change())},r.prototype._onRedo=function(){this.history&&(this.history.redo(),this.options.change&&this.options.change())},r.prototype._onEvent=function(e){var t=e.target;"keydown"==e.type&&this._onKeyDown(e),"focus"==e.type&&(r.domFocus=t);var i=o.getNodeFromTarget(t);i&&i.onEvent(e)},r.prototype._onKeyDown=function(e){var t=e.which||e.keyCode,i=e.ctrlKey,o=e.shiftKey,n=!1;if(9==t&&setTimeout(function(){s.selectContentEditable(r.domFocus)},0),this.searchBox)if(i&&70==t)this.searchBox.dom.search.focus(),this.searchBox.dom.search.select(),n=!0;else if(114==t||i&&71==t){var a=!0;o?this.searchBox.previous(a):this.searchBox.next(a),n=!0}this.history&&(i&&!o&&90==t?(this._onUndo(),n=!0):i&&o&&90==t&&(this._onRedo(),n=!0)),n&&(e.preventDefault(),e.stopPropagation())},r.prototype._createTable=function(){var e=document.createElement("div");e.className="outer",this.contentOuter=e,this.content=document.createElement("div"),this.content.className="tree",e.appendChild(this.content),this.table=document.createElement("table"),this.table.className="tree",this.content.appendChild(this.table);var t;this.colgroupContent=document.createElement("colgroup"),this.mode.edit&&(t=document.createElement("col"),t.width="24px",this.colgroupContent.appendChild(t)),t=document.createElement("col"),t.width="24px",this.colgroupContent.appendChild(t),t=document.createElement("col"),this.colgroupContent.appendChild(t),this.table.appendChild(this.colgroupContent),this.tbody=document.createElement("tbody"),this.table.appendChild(this.tbody),this.frame.appendChild(e)},r.modes={tree:{editor:r,data:"json"},view:{editor:r,data:"json"},form:{editor:r,data:"json"}},r}.apply(null,o),!(void 0!==n&&(e.exports=n))},function(e,t,i){var o,n;o=[i(4),i(3)],n=function(e,t){function i(e,t,o){if(!(this instanceof i))throw new Error('TextEditor constructor called without "new".');this._create(e,t,o)}return i.prototype._create=function(i,o,n){o=o||{},this.options=o,this.indentation=o.indentation?Number(o.indentation):2,this.mode="code"==o.mode?"code":"text","code"==this.mode&&"undefined"==typeof ace&&(this.mode="text",t.log("WARNING: Cannot load code editor, Ace library not loaded. Falling back to plain text editor"));var s=this;this.container=i,this.dom={},this.editor=void 0,this.textarea=void 0,this.width=i.clientWidth,this.height=i.clientHeight,this.frame=document.createElement("div"),this.frame.className="jsoneditor",this.frame.onclick=function(e){e.preventDefault()},this.menu=document.createElement("div"),this.menu.className="menu",this.frame.appendChild(this.menu);var r=document.createElement("button");r.className="format",r.title="Format JSON data, with proper indentation and line feeds",this.menu.appendChild(r),r.onclick=function(){try{s.format()}catch(e){s._onError(e)}};var a=document.createElement("button");if(a.className="compact",a.title="Compact JSON data, remove all whitespaces",this.menu.appendChild(a),a.onclick=function(){try{s.compact()}catch(e){s._onError(e)}},this.options&&this.options.modes&&this.options.modes.length){var d=e.create(this,this.options.modes,this.options.mode);this.menu.appendChild(d),this.dom.modeBox=d}if(this.content=document.createElement("div"),this.content.className="outer",this.frame.appendChild(this.content),this.container.appendChild(this.frame),"code"==this.mode){this.editorDom=document.createElement("div"),this.editorDom.style.height="100%",this.editorDom.style.width="100%",this.content.appendChild(this.editorDom);var h=ace.edit(this.editorDom);h.setTheme("ace/theme/jsoneditor"),h.setShowPrintMargin(!1),h.setFontSize(13),h.getSession().setMode("ace/mode/json"),h.getSession().setTabSize(2),h.getSession().setUseSoftTabs(!0),h.getSession().setUseWrapMode(!0),this.editor=h;var l=document.createElement("a");l.appendChild(document.createTextNode("powered by ace")),l.href="http://ace.ajax.org",l.target="_blank",l.className="poweredBy",l.onclick=function(){window.open(l.href,l.target)},this.menu.appendChild(l),o.change&&h.on("change",function(){o.change()})}else{var c=document.createElement("textarea");c.className="text",c.spellcheck=!1,this.content.appendChild(c),this.textarea=c,o.change&&(null===this.textarea.oninput?this.textarea.oninput=function(){o.change()}:this.textarea.onchange=function(){o.change()})}"string"==typeof n?this.setText(n):this.set(n)},i.prototype._delete=function(){this.frame&&this.container&&this.frame.parentNode==this.container&&this.container.removeChild(this.frame)},i.prototype._onError=function(e){if("function"==typeof this.onError&&(t.log("WARNING: JSONEditor.onError is deprecated. Use options.error instead."),this.onError(e)),!this.options||"function"!=typeof this.options.error)throw e;this.options.error(e)},i.prototype.compact=function(){var e=t.parse(this.getText());this.setText(JSON.stringify(e))},i.prototype.format=function(){var e=t.parse(this.getText());this.setText(JSON.stringify(e,null,this.indentation))},i.prototype.focus=function(){this.textarea&&this.textarea.focus(),this.editor&&this.editor.focus()},i.prototype.resize=function(){if(this.editor){var e=!1;this.editor.resize(e)}},i.prototype.set=function(e){this.setText(JSON.stringify(e,null,this.indentation))},i.prototype.get=function(){return t.parse(this.getText())},i.prototype.getText=function(){return this.textarea?this.textarea.value:this.editor?this.editor.getValue():""},i.prototype.setText=function(e){this.textarea&&(this.textarea.value=e),this.editor&&this.editor.setValue(e,-1)},i.modes={text:{editor:i,data:"text",load:i.prototype.format},code:{editor:i,data:"text",load:i.prototype.format}},i}.apply(null,o),!(void 0!==n&&(e.exports=n))},function(e,t,i){var o;o=function(){var e={};e.parse=function(t){try{return JSON.parse(t)}catch(i){throw e.validate(t),i}},e.validate=function(e){"undefined"!=typeof jsonlint?jsonlint.parse(e):JSON.parse(e)},e.extend=function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);return e},e.clear=function(e){for(var t in e)e.hasOwnProperty(t)&&delete e[t];return e},e.log=function(){"undefined"!=typeof console&&"function"==typeof console.log&&console.log.apply(console,arguments)},e.type=function(e){return null===e?"null":void 0===e?"undefined":e instanceof Number||"number"==typeof e?"number":e instanceof String||"string"==typeof e?"string":e instanceof Boolean||"boolean"==typeof e?"boolean":e instanceof RegExp||"regexp"==typeof e?"regexp":Array.isArray(e)?"array":"object"};var t=/^https?:\/\/\S+$/;e.isUrl=function(e){return("string"==typeof e||e instanceof String)&&t.test(e)},e.getAbsoluteLeft=function(e){var t=e.getBoundingClientRect();return t.left+window.pageXOffset||document.scrollLeft||0},e.getAbsoluteTop=function(e){var t=e.getBoundingClientRect();return t.top+window.pageYOffset||document.scrollTop||0},e.addClassName=function(e,t){var i=e.className.split(" ");-1==i.indexOf(t)&&(i.push(t),e.className=i.join(" "))},e.removeClassName=function(e,t){var i=e.className.split(" "),o=i.indexOf(t);-1!=o&&(i.splice(o,1),e.className=i.join(" "))},e.stripFormatting=function(t){for(var i=t.childNodes,o=0,n=i.length;n>o;o++){var s=i[o];s.style&&s.removeAttribute("style");var r=s.attributes;if(r)for(var a=r.length-1;a>=0;a--){var d=r[a];1==d.specified&&s.removeAttribute(d.name)}e.stripFormatting(s)}},e.setEndOfContentEditable=function(e){var t,i;document.createRange&&(t=document.createRange(),t.selectNodeContents(e),t.collapse(!1),i=window.getSelection(),i.removeAllRanges(),i.addRange(t))},e.selectContentEditable=function(e){if(e&&"DIV"==e.nodeName){var t,i;window.getSelection&&document.createRange&&(i=document.createRange(),i.selectNodeContents(e),t=window.getSelection(),t.removeAllRanges(),t.addRange(i))}},e.getSelection=function(){if(window.getSelection){var e=window.getSelection();if(e.getRangeAt&&e.rangeCount)return e.getRangeAt(0)}return null},e.setSelection=function(e){if(e&&window.getSelection){var t=window.getSelection();t.removeAllRanges(),t.addRange(e)}},e.getSelectionOffset=function(){var t=e.getSelection();return t&&"startOffset"in t&&"endOffset"in t&&t.startContainer&&t.startContainer==t.endContainer?{startOffset:t.startOffset,endOffset:t.endOffset,container:t.startContainer.parentNode}:null},e.setSelectionOffset=function(t){if(document.createRange&&window.getSelection){var i=window.getSelection();if(i){var o=document.createRange();o.setStart(t.container.firstChild,t.startOffset),o.setEnd(t.container.firstChild,t.endOffset),e.setSelection(o)}}},e.getInnerText=function(t,i){var o=void 0==i;if(o&&(i={text:"",flush:function(){var e=this.text;return this.text="",e},set:function(e){this.text=e}}),t.nodeValue)return i.flush()+t.nodeValue;if(t.hasChildNodes()){for(var n=t.childNodes,s="",r=0,a=n.length;a>r;r++){var d=n[r];if("DIV"==d.nodeName||"P"==d.nodeName){var h=n[r-1],l=h?h.nodeName:void 0;l&&"DIV"!=l&&"P"!=l&&"BR"!=l&&(s+="\n",i.flush()),s+=e.getInnerText(d,i),i.set("\n")}else"BR"==d.nodeName?(s+=i.flush(),i.set("\n")):s+=e.getInnerText(d,i)}return s}return"P"==t.nodeName&&-1!=e.getInternetExplorerVersion()?i.flush():""},e.getInternetExplorerVersion=function(){if(-1==i){var e=-1;if("Microsoft Internet Explorer"==navigator.appName){var t=navigator.userAgent,o=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");null!=o.exec(t)&&(e=parseFloat(RegExp.$1))}i=e}return i},e.isFirefox=function(){return-1!=navigator.userAgent.indexOf("Firefox")};var i=-1;return e.addEventListener=function(t,i,o,n){if(t.addEventListener)return void 0===n&&(n=!1),"mousewheel"===i&&e.isFirefox()&&(i="DOMMouseScroll"),t.addEventListener(i,o,n),o;if(t.attachEvent){var s=function(){return o.call(t,window.event)};return t.attachEvent("on"+i,s),s}},e.removeEventListener=function(t,i,o,n){t.removeEventListener?(void 0===n&&(n=!1),"mousewheel"===i&&e.isFirefox()&&(i="DOMMouseScroll"),t.removeEventListener(i,o,n)):t.detachEvent&&t.detachEvent("on"+i,o)},e}.call(t,i,t,e),!(void 0!==o&&(e.exports=o))},function(e,t,i){var o,n;o=[i(9)],n=function(e){function t(t,i,o){function n(e){t.setMode(e);var i=t.dom&&t.dom.modeBox;i&&i.focus()}for(var s={code:{text:"Code",title:"Switch to code highlighter",click:function(){n("code")}},form:{text:"Form",title:"Switch to form editor",click:function(){n("form")}},text:{text:"Text",title:"Switch to plain text editor",click:function(){n("text")}},tree:{text:"Tree",title:"Switch to tree editor",click:function(){n("tree")}},view:{text:"View",title:"Switch to tree view",click:function(){n("view")}}},r=[],a=0;a=0},t.prototype.canRedo=function(){return this.indexthis.results.length-1&&(t=0),this._setActiveResult(t,e)}},e.prototype.previous=function(e){if(void 0!=this.results){var t=this.results.length-1,i=void 0!=this.resultIndex?this.resultIndex-1:t;0>i&&(i=t),this._setActiveResult(i,e)}},e.prototype._setActiveResult=function(e,t){if(this.activeResult){var i=this.activeResult.node,o=this.activeResult.elem;"field"==o?delete i.searchFieldActive:delete i.searchValueActive,i.updateDom()}if(!this.results||!this.results[e])return this.resultIndex=void 0,void(this.activeResult=void 0);this.resultIndex=e;var n=this.results[this.resultIndex].node,s=this.results[this.resultIndex].elem;"field"==s?n.searchFieldActive=!0:n.searchValueActive=!0,this.activeResult=this.results[this.resultIndex],n.updateDom(),n.scrollTo(function(){t&&n.focus(s)})},e.prototype._clearDelay=function(){void 0!=this.timeout&&(clearTimeout(this.timeout),delete this.timeout)},e.prototype._onDelayedSearch=function(){this._clearDelay();var e=this;this.timeout=setTimeout(function(t){e._onSearch(t)},this.delay)},e.prototype._onSearch=function(e,t){this._clearDelay();var i=this.dom.search.value,o=i.length>0?i:void 0;if(o!=this.lastText||t)if(this.lastText=o,this.results=this.editor.search(o),this._setActiveResult(void 0),void 0!=o){var n=this.results.length;switch(n){case 0:this.dom.results.innerHTML="no results";break;case 1:this.dom.results.innerHTML="1 result";break;default:this.dom.results.innerHTML=n+" results"}}else this.dom.results.innerHTML=""},e.prototype._onKeyDown=function(e){var t=e.which;27==t?(this.dom.search.value="",this._onSearch(e),e.preventDefault(),e.stopPropagation()):13==t&&(e.ctrlKey?this._onSearch(e,!0):e.shiftKey?this.previous():this.next(),e.preventDefault(),e.stopPropagation())},e.prototype._onKeyUp=function(e){var t=e.keyCode;27!=t&&13!=t&&this._onDelayedSearch(e)},e}.call(t,i,t,e),!(void 0!==o&&(e.exports=o))},function(e,t,i){var o,n;o=[i(9),i(10),i(3)],n=function(e,t,i){function o(e,t){this.editor=e,this.dom={},this.expanded=!1,t&&t instanceof Object?(this.setField(t.field,t.fieldEditable),this.setValue(t.value,t.type)):(this.setField(""),this.setValue(null))}o.prototype.setParent=function(e){this.parent=e},o.prototype.setField=function(e,t){this.field=e,this.fieldEditable=1==t},o.prototype.getField=function(){return void 0===this.field&&this._getDomField(),this.field},o.prototype.setValue=function(e,t){var i,n,s=this.childs;if(s)for(;s.length;)this.removeChild(s[0]);if(this.type=this._getType(e),t&&t!=this.type){if("string"!=t||"auto"!=this.type)throw new Error('Type mismatch: cannot cast value of type "'+this.type+' to the specified type "'+t+'"');this.type=t}if("array"==this.type){this.childs=[];for(var r=0,a=e.length;a>r;r++)i=e[r],void 0===i||i instanceof Function||(n=new o(this.editor,{value:i}),this.appendChild(n));this.value=""}else if("object"==this.type){this.childs=[];for(var d in e)e.hasOwnProperty(d)&&(i=e[d],void 0===i||i instanceof Function||(n=new o(this.editor,{field:d,value:i}),this.appendChild(n)));this.value=""}else this.childs=void 0,this.value=e},o.prototype.getValue=function(){if("array"==this.type){var e=[];return this.childs.forEach(function(t){e.push(t.getValue())}),e}if("object"==this.type){var t={};return this.childs.forEach(function(e){t[e.getField()]=e.getValue()}),t}return void 0===this.value&&this._getDomValue(),this.value},o.prototype.getLevel=function(){return this.parent?this.parent.getLevel()+1:0},o.prototype.clone=function(){var e=new o(this.editor);if(e.type=this.type,e.field=this.field,e.fieldInnerText=this.fieldInnerText,e.fieldEditable=this.fieldEditable,e.value=this.value,e.valueInnerText=this.valueInnerText,e.expanded=this.expanded,this.childs){var t=[];this.childs.forEach(function(i){var o=i.clone();o.setParent(e),t.push(o)}),e.childs=t}else e.childs=void 0;return e},o.prototype.expand=function(e){this.childs&&(this.expanded=!0,this.dom.expand&&(this.dom.expand.className="expanded"),this.showChilds(),0!=e&&this.childs.forEach(function(t){t.expand(e)}))},o.prototype.collapse=function(e){this.childs&&(this.hideChilds(),0!=e&&this.childs.forEach(function(t){t.collapse(e)}),this.dom.expand&&(this.dom.expand.className="collapsed"),this.expanded=!1)},o.prototype.showChilds=function(){var e=this.childs;if(e&&this.expanded){var t=this.dom.tr,i=t?t.parentNode:void 0;if(i){var o=this.getAppend(),n=t.nextSibling;n?i.insertBefore(o,n):i.appendChild(o),this.childs.forEach(function(e){i.insertBefore(e.getDom(),o),e.showChilds()})}}},o.prototype.hide=function(){var e=this.dom.tr,t=e?e.parentNode:void 0;t&&t.removeChild(e),this.hideChilds()},o.prototype.hideChilds=function(){var e=this.childs;if(e&&this.expanded){var t=this.getAppend();t.parentNode&&t.parentNode.removeChild(t),this.childs.forEach(function(e){e.hide()})}},o.prototype.appendChild=function(e){if(this._hasChilds()){if(e.setParent(this),e.fieldEditable="object"==this.type,"array"==this.type&&(e.index=this.childs.length),this.childs.push(e),this.expanded){var t=e.getDom(),i=this.getAppend(),o=i?i.parentNode:void 0;i&&o&&o.insertBefore(t,i),e.showChilds()}this.updateDom({updateIndexes:!0}),e.updateDom({recurse:!0})}},o.prototype.moveBefore=function(e,t){if(this._hasChilds()){var i=this.dom.tr?this.dom.tr.parentNode:void 0;if(i){var o=document.createElement("tr");o.style.height=i.clientHeight+"px",i.appendChild(o)}e.parent&&e.parent.removeChild(e),t instanceof n?this.appendChild(e):this.insertBefore(e,t),i&&i.removeChild(o)}},o.prototype.moveTo=function(e,t){if(e.parent==this){var i=this.childs.indexOf(e);t>i&&t++}var o=this.childs[t]||this.append;this.moveBefore(e,o)},o.prototype.insertBefore=function(e,t){if(this._hasChilds()){if(t==this.append)e.setParent(this),e.fieldEditable="object"==this.type,this.childs.push(e);else{var i=this.childs.indexOf(t);if(-1==i)throw new Error("Node not found");e.setParent(this),e.fieldEditable="object"==this.type,this.childs.splice(i,0,e)}if(this.expanded){var o=e.getDom(),n=t.getDom(),s=n?n.parentNode:void 0;n&&s&&s.insertBefore(o,n),e.showChilds()}this.updateDom({updateIndexes:!0}),e.updateDom({recurse:!0})}},o.prototype.insertAfter=function(e,t){if(this._hasChilds()){var i=this.childs.indexOf(t),o=this.childs[i+1];o?this.insertBefore(e,o):this.appendChild(e)}},o.prototype.search=function(e){var t,i=[],o=e?e.toLowerCase():void 0;if(delete this.searchField,delete this.searchValue,void 0!=this.field){var n=String(this.field).toLowerCase();t=n.indexOf(o),-1!=t&&(this.searchField=!0,i.push({node:this,elem:"field"})),this._updateDomField()}if(this._hasChilds()){if(this.childs){var s=[];this.childs.forEach(function(t){s=s.concat(t.search(e))}),i=i.concat(s)}if(void 0!=o){var r=!1;0==s.length?this.collapse(r):this.expand(r)}}else{if(void 0!=this.value){var a=String(this.value).toLowerCase();t=a.indexOf(o),-1!=t&&(this.searchValue=!0,i.push({node:this,elem:"value"}))}this._updateDomValue()}return i},o.prototype.scrollTo=function(e){if(!this.dom.tr||!this.dom.tr.parentNode)for(var t=this.parent,i=!1;t;)t.expand(i),t=t.parent;this.dom.tr&&this.dom.tr.parentNode&&this.editor.scrollTo(this.dom.tr.offsetTop,e)},o.focusElement=void 0,o.prototype.focus=function(e){if(o.focusElement=e,this.dom.tr&&this.dom.tr.parentNode){var t=this.dom;switch(e){case"drag":t.drag?t.drag.focus():t.menu.focus();break;case"menu":t.menu.focus();break;case"expand":this._hasChilds()?t.expand.focus():t.field&&this.fieldEditable?(t.field.focus(),i.selectContentEditable(t.field)):t.value&&!this._hasChilds()?(t.value.focus(),i.selectContentEditable(t.value)):t.menu.focus();break;case"field":t.field&&this.fieldEditable?(t.field.focus(),i.selectContentEditable(t.field)):t.value&&!this._hasChilds()?(t.value.focus(),i.selectContentEditable(t.value)):this._hasChilds()?t.expand.focus():t.menu.focus();break;case"value":default:t.value&&!this._hasChilds()?(t.value.focus(),i.selectContentEditable(t.value)):t.field&&this.fieldEditable?(t.field.focus(),i.selectContentEditable(t.field)):this._hasChilds()?t.expand.focus():t.menu.focus() +}}},o.select=function(e){setTimeout(function(){i.selectContentEditable(e)},0)},o.prototype.blur=function(){this._getDomValue(!1),this._getDomField(!1)},o.prototype._duplicate=function(e){var t=e.clone();return this.insertAfter(t,e),t},o.prototype.containsNode=function(e){if(this==e)return!0;var t=this.childs;if(t)for(var i=0,o=t.length;o>i;i++)if(t[i].containsNode(e))return!0;return!1},o.prototype._move=function(e,t){if(e!=t){if(e.containsNode(this))throw new Error("Cannot move a field into a child of itself");e.parent&&e.parent.removeChild(e);var i=e.clone();e.clearDom(),t?this.insertBefore(i,t):this.appendChild(i)}},o.prototype.removeChild=function(e){if(this.childs){var t=this.childs.indexOf(e);if(-1!=t){e.hide(),delete e.searchField,delete e.searchValue;var i=this.childs.splice(t,1)[0];return this.updateDom({updateIndexes:!0}),i}}return void 0},o.prototype._remove=function(e){this.removeChild(e)},o.prototype.changeType=function(e){var t=this.type;if(t!=e){if("string"!=e&&"auto"!=e||"string"!=t&&"auto"!=t){var i,o=this.dom.tr?this.dom.tr.parentNode:void 0;i=this.expanded?this.getAppend():this.getDom();var n=i&&i.parentNode?i.nextSibling:void 0;this.hide(),this.clearDom(),this.type=e,"object"==e?(this.childs||(this.childs=[]),this.childs.forEach(function(e){e.clearDom(),delete e.index,e.fieldEditable=!0,void 0==e.field&&(e.field="")}),("string"==t||"auto"==t)&&(this.expanded=!0)):"array"==e?(this.childs||(this.childs=[]),this.childs.forEach(function(e,t){e.clearDom(),e.fieldEditable=!1,e.index=t}),("string"==t||"auto"==t)&&(this.expanded=!0)):this.expanded=!1,o&&(n?o.insertBefore(this.getDom(),n):o.appendChild(this.getDom())),this.showChilds()}else this.type=e;("auto"==e||"string"==e)&&(this.value="string"==e?String(this.value):this._stringCast(String(this.value)),this.focus()),this.updateDom({updateIndexes:!0})}},o.prototype._getDomValue=function(e){if(this.dom.value&&"array"!=this.type&&"object"!=this.type&&(this.valueInnerText=i.getInnerText(this.dom.value)),void 0!=this.valueInnerText)try{var t;if("string"==this.type)t=this._unescapeHTML(this.valueInnerText);else{var o=this._unescapeHTML(this.valueInnerText);t=this._stringCast(o)}if(t!==this.value){var n=this.value;this.value=t,this.editor._onAction("editValue",{node:this,oldValue:n,newValue:t,oldSelection:this.editor.selection,newSelection:this.editor.getSelection()})}}catch(s){if(this.value=void 0,1!=e)throw s}},o.prototype._updateDomValue=function(){var e=this.dom.value;if(e){var t=this.value,o="auto"==this.type?i.type(t):this.type,n="string"==o&&i.isUrl(t),s="";s=n&&!this.editor.mode.edit?"":"string"==o?"green":"number"==o?"red":"boolean"==o?"darkorange":this._hasChilds()?"":null===t?"#004ED0":"black",e.style.color=s;var r=""==String(this.value)&&"array"!=this.type&&"object"!=this.type;if(r?i.addClassName(e,"empty"):i.removeClassName(e,"empty"),n?i.addClassName(e,"url"):i.removeClassName(e,"url"),"array"==o||"object"==o){var a=this.childs?this.childs.length:0;e.title=this.type+" containing "+a+" items"}else"string"==o&&i.isUrl(t)?this.editor.mode.edit&&(e.title="Ctrl+Click or Ctrl+Enter to open url in new window"):e.title="";this.searchValueActive?i.addClassName(e,"highlight-active"):i.removeClassName(e,"highlight-active"),this.searchValue?i.addClassName(e,"highlight"):i.removeClassName(e,"highlight"),i.stripFormatting(e)}},o.prototype._updateDomField=function(){var e=this.dom.field;if(e){var t=""==String(this.field)&&"array"!=this.parent.type;t?i.addClassName(e,"empty"):i.removeClassName(e,"empty"),this.searchFieldActive?i.addClassName(e,"highlight-active"):i.removeClassName(e,"highlight-active"),this.searchField?i.addClassName(e,"highlight"):i.removeClassName(e,"highlight"),i.stripFormatting(e)}},o.prototype._getDomField=function(e){if(this.dom.field&&this.fieldEditable&&(this.fieldInnerText=i.getInnerText(this.dom.field)),void 0!=this.fieldInnerText)try{var t=this._unescapeHTML(this.fieldInnerText);if(t!==this.field){var o=this.field;this.field=t,this.editor._onAction("editField",{node:this,oldValue:o,newValue:t,oldSelection:this.editor.selection,newSelection:this.editor.getSelection()})}}catch(n){if(this.field=void 0,1!=e)throw n}},o.prototype.clearDom=function(){this.dom={}},o.prototype.getDom=function(){var e=this.dom;if(e.tr)return e.tr;if(e.tr=document.createElement("tr"),e.tr.node=this,this.editor.mode.edit){var t=document.createElement("td");if(this.parent){var i=document.createElement("button");e.drag=i,i.className="dragarea",i.title="Drag to move this field (Alt+Shift+Arrows)",t.appendChild(i)}e.tr.appendChild(t);var o=document.createElement("td"),n=document.createElement("button");e.menu=n,n.className="contextmenu",n.title="Click to open the actions menu (Ctrl+M)",o.appendChild(e.menu),e.tr.appendChild(o)}var s=document.createElement("td");return e.tr.appendChild(s),e.tree=this._createDomTree(),s.appendChild(e.tree),this.updateDom({updateIndexes:!0}),e.tr},o.prototype._onDragStart=function(e){var t=this;this.mousemove||(this.mousemove=i.addEventListener(document,"mousemove",function(e){t._onDrag(e)})),this.mouseup||(this.mouseup=i.addEventListener(document,"mouseup",function(e){t._onDragEnd(e)})),this.editor.highlighter.lock(),this.drag={oldCursor:document.body.style.cursor,startParent:this.parent,startIndex:this.parent.childs.indexOf(this),mouseX:e.pageX,level:this.getLevel()},document.body.style.cursor="move",e.preventDefault()},o.prototype._onDrag=function(e){var t,s,r,a,d,h,l,c,u,p,f,m,v,g,y=e.pageY,x=e.pageX,C=!1;if(t=this.dom.tr,u=i.getAbsoluteTop(t),m=t.offsetHeight,u>y){s=t;do s=s.previousSibling,l=o.getNodeFromTarget(s),p=s?i.getAbsoluteTop(s):0;while(s&&p>y);l&&!l.parent&&(l=void 0),l||(h=t.parentNode.firstChild,s=h?h.nextSibling:void 0,l=o.getNodeFromTarget(s),l==this&&(l=void 0)),l&&(s=l.dom.tr,p=s?i.getAbsoluteTop(s):0,y>p+m&&(l=void 0)),l&&(l.parent.moveBefore(this,l),C=!0)}else if(d=this.expanded&&this.append?this.append.getDom():this.dom.tr,a=d?d.nextSibling:void 0){f=i.getAbsoluteTop(a),r=a;do c=o.getNodeFromTarget(r),r&&(v=r.nextSibling?i.getAbsoluteTop(r.nextSibling):0,g=r?v-f:0,1==c.parent.childs.length&&c.parent.childs[0]==this&&(u+=23)),r=r.nextSibling;while(r&&y>u+g);if(c&&c.parent){var b=x-this.drag.mouseX,N=Math.round(b/24/2),E=this.drag.level+N,_=c.getLevel();for(s=c.dom.tr.previousSibling;E>_&&s;){if(l=o.getNodeFromTarget(s),l==this||l._isChildOf(this));else{if(!(l instanceof n))break;var w=l.parent.childs;if(!(w.length>1||1==w.length&&w[0]!=this))break;c=o.getNodeFromTarget(s),_=c.getLevel()}s=s.previousSibling}d.nextSibling!=c.dom.tr&&(c.parent.moveBefore(this,c),C=!0)}}C&&(this.drag.mouseX=x,this.drag.level=this.getLevel()),this.editor.startAutoScroll(y),e.preventDefault()},o.prototype._onDragEnd=function(e){var t={node:this,startParent:this.drag.startParent,startIndex:this.drag.startIndex,endParent:this.parent,endIndex:this.parent.childs.indexOf(this)};(t.startParent!=t.endParent||t.startIndex!=t.endIndex)&&this.editor._onAction("moveNode",t),document.body.style.cursor=this.drag.oldCursor,this.editor.highlighter.unlock(),delete this.drag,this.mousemove&&(i.removeEventListener(document,"mousemove",this.mousemove),delete this.mousemove),this.mouseup&&(i.removeEventListener(document,"mouseup",this.mouseup),delete this.mouseup),this.editor.stopAutoScroll(),e.preventDefault()},o.prototype._isChildOf=function(e){for(var t=this.parent;t;){if(t==e)return!0;t=t.parent}return!1},o.prototype._createDomField=function(){return document.createElement("div")},o.prototype.setHighlight=function(e){this.dom.tr&&(this.dom.tr.className=e?"highlight":"",this.append&&this.append.setHighlight(e),this.childs&&this.childs.forEach(function(t){t.setHighlight(e)}))},o.prototype.updateValue=function(e){this.value=e,this.updateDom()},o.prototype.updateField=function(e){this.field=e,this.updateDom()},o.prototype.updateDom=function(e){var t=this.dom.tree;t&&(t.style.marginLeft=24*this.getLevel()+"px");var i=this.dom.field;if(i){1==this.fieldEditable?(i.contentEditable=this.editor.mode.edit,i.spellcheck=!1,i.className="field"):i.className="readonly";var o;o=void 0!=this.index?this.index:void 0!=this.field?this.field:this._hasChilds()?this.type:"",i.innerHTML=this._escapeHTML(o)}var n=this.dom.value;if(n){var s=this.childs?this.childs.length:0;n.innerHTML="array"==this.type?"["+s+"]":"object"==this.type?"{"+s+"}":this._escapeHTML(this.value)}this._updateDomField(),this._updateDomValue(),e&&1==e.updateIndexes&&this._updateDomIndexes(),e&&1==e.recurse&&this.childs&&this.childs.forEach(function(t){t.updateDom(e)}),this.append&&this.append.updateDom()},o.prototype._updateDomIndexes=function(){var e=this.dom.value,t=this.childs;e&&t&&("array"==this.type?t.forEach(function(e,t){e.index=t;var i=e.dom.field;i&&(i.innerHTML=t)}):"object"==this.type&&t.forEach(function(e){void 0!=e.index&&(delete e.index,void 0==e.field&&(e.field=""))}))},o.prototype._createDomValue=function(){var e;return"array"==this.type?(e=document.createElement("div"),e.className="readonly",e.innerHTML="[...]"):"object"==this.type?(e=document.createElement("div"),e.className="readonly",e.innerHTML="{...}"):!this.editor.mode.edit&&i.isUrl(this.value)?(e=document.createElement("a"),e.className="value",e.href=this.value,e.target="_blank",e.innerHTML=this._escapeHTML(this.value)):(e=document.createElement("div"),e.contentEditable=!this.editor.mode.view,e.spellcheck=!1,e.className="value",e.innerHTML=this._escapeHTML(this.value)),e},o.prototype._createDomExpandButton=function(){var e=document.createElement("button");return this._hasChilds()?(e.className=this.expanded?"expanded":"collapsed",e.title="Click to expand/collapse this field (Ctrl+E). \nCtrl+Click to expand/collapse including all childs."):(e.className="invisible",e.title=""),e},o.prototype._createDomTree=function(){var e=this.dom,t=document.createElement("table"),i=document.createElement("tbody");t.style.borderCollapse="collapse",t.className="values",t.appendChild(i);var o=document.createElement("tr");i.appendChild(o);var n=document.createElement("td");n.className="tree",o.appendChild(n),e.expand=this._createDomExpandButton(),n.appendChild(e.expand),e.tdExpand=n;var s=document.createElement("td");s.className="tree",o.appendChild(s),e.field=this._createDomField(),s.appendChild(e.field),e.tdField=s;var r=document.createElement("td");r.className="tree",o.appendChild(r),"object"!=this.type&&"array"!=this.type&&(r.appendChild(document.createTextNode(":")),r.className="separator"),e.tdSeparator=r;var a=document.createElement("td");return a.className="tree",o.appendChild(a),e.value=this._createDomValue(),a.appendChild(e.value),e.tdValue=a,t},o.prototype.onEvent=function(e){var t,o=e.type,n=e.target||e.srcElement,s=this.dom,r=this,a=this._hasChilds();if((n==s.drag||n==s.menu)&&("mouseover"==o?this.editor.highlighter.highlight(this):"mouseout"==o&&this.editor.highlighter.unhighlight()),"mousedown"==o&&n==s.drag&&this._onDragStart(e),"click"==o&&n==s.menu){var d=r.editor.highlighter;d.highlight(r),d.lock(),i.addClassName(s.menu,"selected"),this.showContextMenu(s.menu,function(){i.removeClassName(s.menu,"selected"),d.unlock(),d.unhighlight()})}if("click"==o&&n==s.expand&&a){var h=e.ctrlKey;this._onExpand(h)}var l=s.value;if(n==l)switch(o){case"focus":t=this;break;case"blur":case"change":this._getDomValue(!0),this._updateDomValue(),this.value&&(l.innerHTML=this._escapeHTML(this.value));break;case"input":this._getDomValue(!0),this._updateDomValue();break;case"keydown":case"mousedown":this.editor.selection=this.editor.getSelection();break;case"click":e.ctrlKey&&this.editor.mode.edit&&i.isUrl(this.value)&&window.open(this.value,"_blank");break;case"keyup":this._getDomValue(!0),this._updateDomValue();break;case"cut":case"paste":setTimeout(function(){r._getDomValue(!0),r._updateDomValue()},1)}var c=s.field;if(n==c)switch(o){case"focus":t=this;break;case"blur":case"change":this._getDomField(!0),this._updateDomField(),this.field&&(c.innerHTML=this._escapeHTML(this.field));break;case"input":this._getDomField(!0),this._updateDomField();break;case"keydown":case"mousedown":this.editor.selection=this.editor.getSelection();break;case"keyup":this._getDomField(!0),this._updateDomField();break;case"cut":case"paste":setTimeout(function(){r._getDomField(!0),r._updateDomField()},1)}var u=s.tree;if(n==u.parentNode)switch(o){case"click":var p=void 0!=e.offsetX?e.offsetX<24*(this.getLevel()+1):e.pageXo[i]?t:e[i]/g,">").replace(/ /g,"  ").replace(/^ /," ").replace(/ $/," "),i=JSON.stringify(t);return i.substring(1,i.length-1)},o.prototype._unescapeHTML=function(e){var t='"'+this._escapeJSON(e)+'"',o=i.parse(t);return o.replace(/</g,"<").replace(/>/g,">").replace(/ |\u00A0/g," ")},o.prototype._escapeJSON=function(e){for(var t="",i=0,o=e.length;o>i;){var n=e.charAt(i);"\n"==n?t+="\\n":"\\"==n?(t+=n,i++,n=e.charAt(i),-1=='"\\/bfnrtu'.indexOf(n)&&(t+="\\"),t+=n):t+='"'==n?'\\"':n,i++}return t};var n=t(o);return o}.apply(null,o),!(void 0!==n&&(e.exports=n))},function(e,t,i){var o,n;o=[i(3)],n=function(e){function t(e,t){function i(e,t,n){n.forEach(function(n){if("separator"==n.type){var s=document.createElement("div");s.className="separator",a=document.createElement("li"),a.appendChild(s),e.appendChild(a)}else{var r={},a=document.createElement("li");e.appendChild(a);var d=document.createElement("button");if(d.className=n.className,r.button=d,n.title&&(d.title=n.title),n.click&&(d.onclick=function(){o.hide(),n.click()}),a.appendChild(d),n.submenu){var h=document.createElement("div");h.className="icon",d.appendChild(h),d.appendChild(document.createTextNode(n.text));var l;if(n.click){d.className+=" default";var c=document.createElement("button");r.buttonExpand=c,c.className="expand",c.innerHTML='
',a.appendChild(c),n.submenuTitle&&(c.title=n.submenuTitle),l=c}else{var u=document.createElement("div");u.className="expand",d.appendChild(u),l=d}l.onclick=function(){o._onExpandItem(r),l.focus()};var p=[];r.subItems=p;var f=document.createElement("ul");r.ul=f,f.className="menu",f.style.height="0",a.appendChild(f),i(f,p,n.submenu)}else d.innerHTML='
'+n.text;t.push(r)}})}this.dom={};var o=this,n=this.dom;this.anchor=void 0,this.items=e,this.eventListeners={},this.selection=void 0,this.visibleSubmenu=void 0,this.onClose=t?t.close:void 0;var s=document.createElement("div");s.className="jsoneditor-contextmenu",n.menu=s;var r=document.createElement("ul");r.className="menu",s.appendChild(r),n.list=r,n.items=[];var a=document.createElement("button");n.focusButton=a;var d=document.createElement("li");d.style.overflow="hidden",d.style.height="0",d.appendChild(a),r.appendChild(d),i(r,this.dom.items,e),this.maxHeight=0,e.forEach(function(t){var i=24*(e.length+(t.submenu?t.submenu.length:0));o.maxHeight=Math.max(o.maxHeight,i)})}return t.prototype._getVisibleButtons=function(){var e=[],t=this;return this.dom.items.forEach(function(i){e.push(i.button),i.buttonExpand&&e.push(i.buttonExpand),i.subItems&&i==t.expandedItem&&i.subItems.forEach(function(t){e.push(t.button),t.buttonExpand&&e.push(t.buttonExpand)})}),e},t.visibleMenu=void 0,t.prototype.show=function(i){this.hide();var o=window.innerHeight,n=window.pageYOffset||document.scrollTop||0,s=o+n,r=i.offsetHeight,a=this.maxHeight,d=e.getAbsoluteLeft(i),h=e.getAbsoluteTop(i);s>h+r+a?(this.dom.menu.style.left=d+"px",this.dom.menu.style.top=h+r+"px",this.dom.menu.style.bottom=""):(this.dom.menu.style.left=d+"px",this.dom.menu.style.top="",this.dom.menu.style.bottom=o-h+"px"),document.body.appendChild(this.dom.menu);var l=this,c=this.dom.list;this.eventListeners.mousedown=e.addEventListener(document,"mousedown",function(e){var t=e.target;t==c||l._isChildOf(t,c)||(l.hide(),e.stopPropagation(),e.preventDefault())}),this.eventListeners.mousewheel=e.addEventListener(document,"mousewheel",function(e){e.stopPropagation(),e.preventDefault()}),this.eventListeners.keydown=e.addEventListener(document,"keydown",function(e){l._onKeyDown(e)}),this.selection=e.getSelection(),this.anchor=i,setTimeout(function(){l.dom.focusButton.focus()},0),t.visibleMenu&&t.visibleMenu.hide(),t.visibleMenu=this},t.prototype.hide=function(){this.dom.menu.parentNode&&(this.dom.menu.parentNode.removeChild(this.dom.menu),this.onClose&&this.onClose());for(var i in this.eventListeners)if(this.eventListeners.hasOwnProperty(i)){var o=this.eventListeners[i];o&&e.removeEventListener(document,i,o),delete this.eventListeners[i]}t.visibleMenu==this&&(t.visibleMenu=void 0)},t.prototype._onExpandItem=function(t){var i=this,o=t==this.expandedItem,n=this.expandedItem;if(n&&(n.ul.style.height="0",n.ul.style.padding="",setTimeout(function(){i.expandedItem!=n&&(n.ul.style.display="",e.removeClassName(n.ul.parentNode,"selected"))},300),this.expandedItem=void 0),!o){var s=t.ul;s.style.display="block";{s.clientHeight}setTimeout(function(){i.expandedItem==t&&(s.style.height=24*s.childNodes.length+"px",s.style.padding="5px 10px")},0),e.addClassName(s.parentNode,"selected"),this.expandedItem=t}},t.prototype._onKeyDown=function(t){var i,o,n,s,r=t.target,a=t.which,d=!1;27==a?(this.selection&&e.setSelection(this.selection),this.anchor&&this.anchor.focus(),this.hide(),d=!0):9==a?t.shiftKey?(i=this._getVisibleButtons(),o=i.indexOf(r),0==o&&(i[i.length-1].focus(),d=!0)):(i=this._getVisibleButtons(),o=i.indexOf(r),o==i.length-1&&(i[0].focus(),d=!0)):37==a?("expand"==r.className&&(i=this._getVisibleButtons(),o=i.indexOf(r),n=i[o-1],n&&n.focus()),d=!0):38==a?(i=this._getVisibleButtons(),o=i.indexOf(r),n=i[o-1],n&&"expand"==n.className&&(n=i[o-2]),n||(n=i[i.length-1]),n&&n.focus(),d=!0):39==a?(i=this._getVisibleButtons(),o=i.indexOf(r),s=i[o+1],s&&"expand"==s.className&&s.focus(),d=!0):40==a&&(i=this._getVisibleButtons(),o=i.indexOf(r),s=i[o+1],s&&"expand"==s.className&&(s=i[o+2]),s||(s=i[0]),s&&(s.focus(),d=!0),d=!0),d&&(t.stopPropagation(),t.preventDefault())},t.prototype._isChildOf=function(e,t){for(var i=e.parentNode;i;){if(i==t)return!0;i=i.parentNode}return!1},t}.apply(null,o),!(void 0!==n&&(e.exports=n))},function(e,t,i){var o,n;o=[i(3)],n=function(e){function t(t){function i(e){this.editor=e,this.dom={}}return i.prototype=new t,i.prototype.getDom=function(){var e=this.dom;if(e.tr)return e.tr;var t=document.createElement("tr");if(t.node=this,e.tr=t,this.editor.mode.edit){e.tdDrag=document.createElement("td");var i=document.createElement("td");e.tdMenu=i;var o=document.createElement("button");o.className="contextmenu",o.title="Click to open the actions menu (Ctrl+M)",e.menu=o,i.appendChild(e.menu)}var n=document.createElement("td"),s=document.createElement("div");return s.innerHTML="(empty)",s.className="readonly",n.appendChild(s),e.td=n,e.text=s,this.updateDom(),t},i.prototype.updateDom=function(){var e=this.dom,t=e.td;t&&(t.style.paddingLeft=24*this.getLevel()+26+"px");var i=e.text;i&&(i.innerHTML="(empty "+this.parent.type+")");var o=e.tr;this.isVisible()?e.tr.firstChild||(e.tdDrag&&o.appendChild(e.tdDrag),e.tdMenu&&o.appendChild(e.tdMenu),o.appendChild(t)):e.tr.firstChild&&(e.tdDrag&&o.removeChild(e.tdDrag),e.tdMenu&&o.removeChild(e.tdMenu),o.removeChild(t))},i.prototype.isVisible=function(){return 0==this.parent.childs.length},i.prototype.showContextMenu=function(e,i){var o=this,n=t.TYPE_TITLES,s=[{text:"Append",title:"Append a new field with type 'auto' (Ctrl+Shift+Ins)",submenuTitle:"Select the type of the field to be appended",className:"insert",click:function(){o._onAppend("","","auto")},submenu:[{text:"Auto",className:"type-auto",title:n.auto,click:function(){o._onAppend("","","auto")}},{text:"Array",className:"type-array",title:n.array,click:function(){o._onAppend("",[])}},{text:"Object",className:"type-object",title:n.object,click:function(){o._onAppend("",{})}},{text:"String",className:"type-string",title:n.string,click:function(){o._onAppend("","","string")}}]}],r=new ContextMenu(s,{close:i});r.show(e)},i.prototype.onEvent=function(t){var i=t.type,o=t.target||t.srcElement,n=this.dom,s=n.menu;if(o==s&&("mouseover"==i?this.editor.highlighter.highlight(this.parent):"mouseout"==i&&this.editor.highlighter.unhighlight()),"click"==i&&o==n.menu){var r=this.editor.highlighter;r.highlight(this.parent),r.lock(),e.addClassName(n.menu,"selected"),this.showContextMenu(n.menu,function(){e.removeClassName(n.menu,"selected"),r.unlock(),r.unhighlight()})}"keydown"==i&&this.onKeyDown(t)},i}return t}.apply(null,o),!(void 0!==n&&(e.exports=n))}])}); //# sourceMappingURL=jsoneditor.map \ No newline at end of file diff --git a/package.json b/package.json index 4b5fe78..255a690 100644 --- a/package.json +++ b/package.json @@ -21,15 +21,13 @@ }, "dependencies": {}, "devDependencies": { - "jake": "latest", - "jake-utils": "latest", - "archiver": "latest", - "clean-css": "latest", + "ace": "git://github.com/ajaxorg/ace.git", "gulp": "latest", + "gulp-concat-css": "^0.1.4", + "gulp-minify-css": "^0.3.4", "gulp-util": "latest", - "webpack": "latest", - "uglify-js": "latest", "jsonlint": "latest", - "ace": "git://github.com/ajaxorg/ace.git" + "uglify-js": "latest", + "webpack": "latest" } } diff --git a/test/test.html b/test/test.html index eb5dd2c..a9e14c7 100644 --- a/test/test.html +++ b/test/test.html @@ -13,7 +13,10 @@ location: '../src/js/', main: 'JSONEditor' } - ] + ], + paths: { + 'theme-jsoneditor.js': '../src/js/ace/theme-jsoneditor.js' + } }); @@ -21,11 +24,10 @@ - - + - + + + + +

+ Switch editor mode using the mode box. + Note that the mode can be changed programmatically as well using the method + editor.setMode(mode), try it in the console of your browser. +

+ +
+ + + +