!function(e,t){"object"==typeofexports&&"object"==typeofmodule?module.exports=t():"function"==typeofdefine&&define.amd?define([],t):"object"==typeofexports?exports.JSONEditor=t():e.JSONEditor=t()}(this,function(){returnfunction(e){functiont(n){if(i[n])returni[n].exports;varr=i[n]={exports:{},id:n,loaded:!1};returne[n].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}vari={};returnt.m=e,t.c=i,t.p="",t(0)}([function(e,t,i){"use strict";functionn(e,t,i){if(!(thisinstanceofn))thrownewError('JSONEditor constructor called without "new".');varr=c.getInternetExplorerVersion();if(-1!=r&&r<9)thrownewError("Unsupported browser, IE9 or newer required. Please install the newest version of your browser.");t&&(t.error&&(console.warn('Option "error" has been renamed to "onError"'),t.onError=t.error,deletet.error),t.change&&(console.warn('Option "change" has been renamed to "onChange"'),t.onChange=t.change,deletet.change),t.editable&&(console.warn('Option "editable" has been renamed to "onEditable"'),t.onEditable=t.editable,deletet.editable),t.onChangeJSON&&("text"===t.mode||"code"===t.mode||t.modes&&(-1!==t.modes.indexOf("text")||-1!==t.modes.indexOf("code")))&&console.warn('Option "onChangeJSON" is not applicable to modes "text" and "code". Use "onChangeText" or "onChange" instead.'),t&&Object.keys(t).forEach(function(e){-1===n.VALID_OPTIONS.indexOf(e)&&console.warn('Unknown option "'+e+'". This option will be ignored')})),arguments.length&&this._create(e,t,i)}varr;try{r=i(1)}catch(e){}varo=i(51),s=i(57),a=i(59),l=i(81),c=i(65);"undefined"==typeofPromise&&console.error("Promise undefined. Please load a Promise polyfill in the browser in order to use JSONEditor"),n.modes={},n.prototype.DEBOUNCE_INTERVAL=150,n.VALID_OPTIONS=["ajv","schema","schemaRefs","templates","ace","theme","autocomplete","onChange","onChangeJSON","onChangeText","onEditable","onError","onEvent","onModeChange","onValidate","onSelectionChange","onTextSelectionChange","colorPicker","onColorPicker","timestampTag","escapeUnicode","history","search","mode","modes","name","indentation","sortObjectKeys","navigationBar","statusBar","languages","language"],n.prototype._create=function(e,t,i){this.container=e,this.options=t||{},this.json=i||{};varn=this.options.mode||this.options.modes&&this.options.modes[0]||"tree";this.setMode(n)},n.prototype.destroy=function(){},n.prototype.set=function(e){this.json=e},n.prototype.get=function(){returnthis.json},n.prototype.setText=function(e){this.json=c.parse(e)},n.prototype.getText=function(){returnJSON.stringify(this.json)},n.prototype.setName=function(e){this.options||(this.options={}),this.options.name=e},n.prototype.getName=function(){returnthis.options&&this.options.name},n.prototype.setMode=function(e){if(e!==this.options.mode||!this.create){vart,i,r=this.container,o=c.extend({},this.options),s=o.mode;o.mode=e;vara=n.modes[e];if(!a)thrownewError('Unknown mode "'+o.mode+'"');try{varl="text"==a.data;if(i=this.getName(),t=this[l?"getText":"get"](),this.destroy(),c.clear(this),c.extend(this,a.mixin),this.create(r,o),this.setName(i),this[l?"setText":"set"](t),"function"==typeofa.load)try{a.load.call(this)}catch(e){console.error(e)}if("function"==typeofo.onModeChange&&e!==s)try{o.onModeChange(e,s)}catch(e){console.error(e)}}catch(e){this._onError(e)}}},n.prototype.getMode=function(){returnthis.options.mode},n.prototype._onError=function(e){if(!this.options||"function"!=typeofthis.options.onError)throwe;this.options.onError(e)},n.prototype.setSchema=function(e,t){if(e){vari;try{i=this.options.ajv||r({allErrors:!0,verbose:!0})}catch(e){console.warn("Failed to create an instance of Ajv, JSON Schema validation is not available. Please use a JSONEditor bundle including Ajv, or pass an instance of Ajv as via the configuration option `ajv`.")}if(i){if(t){for(varnint)i.removeSchema(n),t[n]&&i.addSchema(t[n],n);this.options.schemaRefs=t}this.validateSchema=i.compile(e),this.options.schema=e,this.validate()}this.refresh()}elsethis.validateSchema=null,this.options.schema=null,this.options.schemaRefs=nu
Object.isExtensible||(Object.isExtensible=function(e){if(Object(e)===e)thrownewTypeError;for(vart="";g(e,t);)t+="?";e[t]=!0;vari=g(e,t);returndeletee[t],i}),!Object.keys){varF=!0,x=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],S=x.length;for(var_in{toString:null})F=!1;Object.keys=function(e){if("object"!=typeofe&&"function"!=typeofe||null===e)thrownewTypeError("Object.keys called on a non-object");vart=[];for(variine)g(e,i)&&t.push(i);if(F)for(varn=0,r=S;n<r;n++){varo=x[n];g(e,o)&&t.push(o)}returnt}}Date.now||(Date.now=function(){return(newDate).getTime()});vark="\t\n\v\f\r \u2028\u2029\ufeff";if(!String.prototype.trim||k.trim()){k="["+k+"]";varD=newRegExp("^"+k+k+"*"),$=newRegExp(k+k+"*$");String.prototype.trim=function(){returnString(this).replace(D,"").replace($,"")}}varB=function(e){if(null==e)thrownewTypeError("can't convert "+e+" to object");returnObject(e)}}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"],function(e,t,i){"use strict";e("./regexp"),e("./es5-shim")}),ace.define("ace/lib/dom",["require","exports","module"],function(e,t,i){"use strict";if(t.getDocumentHead=function(e){returne||(e=document),e.head||e.getElementsByTagName("head")[0]||e.documentElement},t.createElement=function(e,t){returndocument.createElementNS?document.createElementNS(t||"http://www.w3.org/1999/xhtml",e):document.createElement(e)},t.hasCssClass=function(e,t){return-1!==(e.className+"").split(/\s+/g).indexOf(t)},t.addCssClass=function(e,i){t.hasCssClass(e,i)||(e.className+=" "+i)},t.removeCssClass=function(e,t){for(vari=e.className.split(/\s+/g);;){varn=i.indexOf(t);if(-1==n)break;i.splice(n,1)}e.className=i.join(" ")},t.toggleCssClass=function(e,t){for(vari=e.className.split(/\s+/g),n=!0;;){varr=i.indexOf(t);if(-1==r)break;n=!1,i.splice(r,1)}returnn&&i.push(t),e.className=i.join(" "),n},t.setCssClass=function(e,i,n){n?t.addCssClass(e,i):t.removeCssClass(e,i)},t.hasCssString=function(e,t){vari,n=0;if(t=t||document,t.createStyleSheet&&(i=t.styleSheets)){for(;n<i.length;)if(i[n++].owningElement.id===e)return!0}elseif(i=t.getElementsByTagName("style"))for(;n<i.length;)if(i[n++].id===e)return!0;return!1},t.importCssString=function(e,i,n){if(n=n||document,i&&t.hasCssString(i,n))returnnull;varr;i&&(e+="\n/*# sourceURL=ace/css/"+i+" */"),n.createStyleSheet?(r=n.createStyleSheet(),r.cssText=e,i&&(r.owningElement.id=i)):(r=t.createElement("style"),r.appendChild(n.createTextNode(e)),i&&(r.id=i),t.getDocumentHead(n).appendChild(r))},t.importCssStylsheet=function(e,i){if(i.createStyleSheet)i.createStyleSheet(e);else{varn=t.createElement("link");n.rel="stylesheet",n.href=e,t.getDocumentHead(i).appendChild(n)}},t.getInnerWidth=function(e){returnparseInt(t.computedStyle(e,"paddingLeft"),10)+parseInt(t.computedStyle(e,"paddingRight"),10)+e.clientWidth},t.getInnerHeight=function(e){returnparseInt(t.computedStyle(e,"paddingTop"),10)+parseInt(t.computedStyle(e,"paddingBottom"),10)+e.clientHeight},t.scrollbarWidth=function(e){vari=t.createElement("ace_inner");i.style.width="100%",i.style.minWidth="0px",i.style.height="200px",i.style.display="block";varn=t.createElement("ace_outer"),r=n.style;r.position="absolute",r.left="-10000px",r.overflow="hidden",r.width="200px",r.minWidth="0px",r.height="150px",r.display="block",n.appendChild(i);varo=e.documentElement;o.appendChild(n);vars=i.offsetWidth;r.overflow="scroll";vara=i.offsetWidth;returns==a&&(a=n.clientWidth),o.removeChild(n),s-a},"undefined"==typeofdocument)returnvoid(t.importCssString=function(){});void0!==window.pageYOffset?(t.getPageScrollTop=function(){returnwindow.pageYOffset},t.getPageScrollLeft=function(){returnwindow.pageXOffset}):(t.getPageScrollTop=function(){returndocument.body.scrollTop},t.getPageScrollLeft=function(){returndocument.body.scrollLeft}),window.getComputedStyle?t.computedStyle=function(e,t){returnt?(window.getComputedStyle(e,"")||{})[t]||"":window.getComp
this.attach(e),void0===i?this.setPosition(t.row,t.column):this.setPosition(t,i)};(function(){functione(e,t,i){varn=i?e.column<=t.column:e.column<t.column;returne.row<t.row||e.row==t.row&&n}functiont(t,i,n){varr="insert"==t.action,o=(r?1:-1)*(t.end.row-t.start.row),s=(r?1:-1)*(t.end.column-t.start.column),a=t.start,l=r?a:t.end;returne(i,a,n)?{row:i.row,column:i.column}:e(l,i,!n)?{row:i.row+o,column:i.column+(i.row==l.row?s:0)}:{row:a.row,column:a.column}}n.implement(this,r),this.getPosition=function(){returnthis.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){returnthis.document},this.$insertRight=!1,this.onChange=function(e){if(!(e.start.row==e.end.row&&e.start.row!=this.row||e.start.row>this.row)){vari=t(e,{row:this.row,column:this.column},this.$insertRight);this.setPosition(i.row,i.column,!0)}},this.setPosition=function(e,t,i){varn;if(n=i?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=n.row||this.column!=n.column){varr={row:this.row,column:this.column};this.row=n.row,this.column=n.column,this._signal("change",{old:r,value:n})}},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){vari={};returne>=this.document.getLength()?(i.row=Math.max(0,this.document.getLength()-1),i.column=this.document.getLine(i.row).length):e<0?(i.row=0,i.column=0):(i.row=e,i.column=Math.min(this.document.getLine(i.row).length,Math.max(0,t))),t<0&&(i.column=0),i}}).call(o.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,t,i){"use strict";varn=e("./lib/oop"),r=e("./apply_delta").applyDelta,o=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,a=e("./anchor").Anchor,l=function(e){this.$lines=[""],0===e.length?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)};(function(){n.implement(this,o),this.setValue=function(e){vart=this.getLength()-1;this.remove(news(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e)},this.getValue=function(){returnthis.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){returnnewa(this,e,t)},0==="aaa".split(/a/).length?this.$split=function(e){returne.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){returne.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){vart=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:returnthis.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){returnthis.$newLineMode},this.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},this.getLine=function(e){returnthis.$lines[e]||""},this.getLines=function(e,t){returnthis.$lines.slice(e,t+1)},this.getAllLines=function(){returnthis.getLines(0,this.getLength())},this.getLength=function(){returnthis.$lines.length},this.getTextRange=function(e){returnthis.getLinesForRange(e).join(this.getNewLineCharacter())},this.getLinesForRange=function(e){vart;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{t=this.getLines(e.start.row,e.end.row),t[0]=(t[0]||"").substring(e.start.column);vari=t.length-1;e.end.row-e.start.row==i&&(t[i]=t[i].substring(0,e.end.column))}returnt},this.insertLines=function(e,t){returnconsole.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},this.removeLines=function(e,t){returnconsole.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},this.insertNewLine=function(e){retur
this.addCommands=function(e){e&&Object.keys(e).forEach(function(t){vari=e[t];if(i){if("string"==typeofi)returnthis.bindKey(i,t);"function"==typeofi&&(i={exec:i}),"object"==typeofi&&(i.name||(i.name=t),this.addCommand(i))}},this)},this.removeCommands=function(e){Object.keys(e).forEach(function(t){this.removeCommand(e[t])},this)},this.bindKeys=function(e){Object.keys(e).forEach(function(t){this.bindKey(t,e[t])},this)},this._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},this.parseKeys=function(e){vart=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(e){returne}),i=t.pop(),n=o[i];if(o.FUNCTION_KEYS[n])i=o.FUNCTION_KEYS[n].toLowerCase();else{if(!t.length)return{key:i,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:i.toUpperCase(),hashId:-1}}for(varr=0,s=t.length;s--;){vara=o.KEY_MODS[t[s]];if(null==a)return"undefined"!=typeofconsole&&console.error("invalid modifier "+t[s]+" in "+e),!1;r|=a}return{key:i,hashId:r}},this.findKeyCommand=function(e,t){vari=a[e]+t;returnthis.commandKeyBinding[i]},this.handleKeyboard=function(e,t,i,n){if(!(n<0)){varr=a[t]+i,o=this.commandKeyBinding[r];returne.$keyChain&&(e.$keyChain+=" "+r,o=this.commandKeyBinding[e.$keyChain]||o),!o||"chainKeys"!=o&&"chainKeys"!=o[o.length-1]?(e.$keyChain&&(t&&4!=t||1!=i.length?(-1==t||n>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-r.length-1)),{command:o}):(e.$keyChain=e.$keyChain||r,{command:"null"})}},this.getStatusText=function(e,t){returnt.$keyChain||""}}.call(n.prototype),t.HashHandler=n,t.MultiHashHandler=r}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,t,i){"use strict";varn=e("../lib/oop"),r=e("../keyboard/hash_handler").MultiHashHandler,o=e("../lib/event_emitter").EventEmitter,s=function(e,t){r.call(this,t,e),this.byName=this.commands,this.setDefaultHandler("exec",function(e){returne.command.exec(e.editor,e.args||{})})};n.inherits(s,r),function(){n.implement(this,o),this.exec=function(e,t,i){if(Array.isArray(e)){for(varn=e.length;n--;)if(this.exec(e[n],t,i))return!0;return!1}if("string"==typeofe&&(e=this.commands[e]),!e)return!1;if(t&&t.$readOnly&&!e.readOnly)return!1;if(e.isAvailable&&!e.isAvailable(t))return!1;varr={editor:t,command:e,args:i};returnr.returnValue=this._emit("exec",r),this._signal("afterExec",r),!1!==r.returnValue},this.toggleRecording=function(e){if(!this.$inReplay)returne&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.removeEventListener("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},this.replay=function(e){if(!this.$inReplay&&this.macro){if(this.recording)returnthis.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach(function(t){"string"==typeoft?this.exec(t,e):this.exec(t[0],e,t[1])},this)}finally{this.$inReplay=!1}}},this.trimMacro=function(e){returne.map(function(e){return"string"!=typeofe[0]&&(e[0]=e[0].name),e[1]||(e=e[0]),e})}}.call(s.prototype),t.CommandManager=s}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,t,i){"use strict";functionn(e,t){return{win:e,mac:t}}varr=e("../lib/lang"),o=e("../config"),s=e("../range").Range;t.commands=[{name:"showSettingsMenu",bindKey:n("Ctrl-,","Command-,"),exec:function(e){o.loadModule("ace/ext/settings_menu",function(t){t.init(e),e.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",bindKey:n("Alt-E","F4"),exec:function(e){o.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",bindKey:n("Alt-Shift-E","Shift-F4"),exec:function(e){o.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",bindKey:n("Ctrl-A","Command-A"),exec
pointers:C}},t.stringify=function(e,t,o){functions(e,t,h){switch(c(h,"value"),typeofe){case"number":case"boolean":a(""+e);break;case"string":a(n(e));break;case"object":null===e?a("null"):"function"==typeofe.toJSON?a(n(e.toJSON())):Array.isArray(e)?function(){if(e.length){a("[");for(varn=t+1,r=0;r<e.length;r++)r&&a(","),l(n),s(i(e[r])?e[r]:null,n,h+"/"+r);l(t),a("]")}elsea("[]")}():function(){vard=Object.keys(e);if(d.length){a("{");for(varu=t+1,f=0;f<d.length;f++){varp=d[f],m=e[p];if(i(m)){f&&a(",");varg=h+"/"+r(p);l(u),c(g,"key"),a(n(p)),c(g,"keyEnd"),a(":"),o&&a(" "),s(m,u,g)}}l(t),a("}")}elsea("{}")}()}c(h,"valueEnd")}functiona(e){w+=e.length,b+=e.length,g+=e}functionl(e){if(o){for(g+="\n"+h(e,o),y++,w=0;e--;)f?(y+=f,w=u):w+=u,b+=d;b+=1}}functionc(e,t){v[e]=v[e]||{},v[e][t]={line:y,column:w,pos:b}}functionh(e,t){returnArray(e+1).join(t)}if(i(e)){vard,u,f=0;switch(typeofo){case"number":varp=o>10?10:o<0?0:Math.floor(o);o=p&&h(p," "),d=p,u=p;break;case"string":o=o.slice(0,10),d=0,u=0;for(varm=0;m<o.length;m++){switch(o[m]){case" ":u++;break;case"\t":u+=4;break;case"\r":u=0;break;case"\n":u=0,f++;break;default:thrownewError("whitespace characters not allowed in JSON")}d++}break;default:o=void0}varg="",v={},y=0,w=0,b=0;returns(e,0,""),{json:g,pointers:v}}};vara=["number","boolean","string","object"],l=/"|\\/g,c=/[\b]/g,h=/\f/g,d=/\n/g,u=/\r/g,f=/\t/g,p=/~/g,m=/\//g},function(e,t){"use strict";vari,n=["en","pt-BR"],r={en:{array:"Array",auto:"Auto",appendText:"Append",appendTitle:"Append a new field with type 'auto' after this field (Ctrl+Shift+Ins)",appendSubmenuTitle:"Select the type of the field to be appended",appendTitleAuto:"Append a new field with type 'auto' (Ctrl+Shift+Ins)",ascending:"Ascending",ascendingTitle:"Sort the childs of this ${type} in ascending order",actionsMenu:"Click to open the actions menu (Ctrl+M)",collapseAll:"Collapse all fields",descending:"Descending",descendingTitle:"Sort the childs of this ${type} in descending order",drag:"Drag to move this field (Alt+Shift+Arrows)",duplicateKey:"duplicate key",duplicateText:"Duplicate",duplicateTitle:"Duplicate selected fields (Ctrl+D)",duplicateField:"Duplicate this field (Ctrl+D)",empty:"empty",expandAll:"Expand all fields",expandTitle:"Click to expand/collapse this field (Ctrl+E). \nCtrl+Click to expand/collapse including all childs.",insert:"Insert",insertTitle:"Insert a new field with type 'auto' before this field (Ctrl+Ins)",insertSub:"Select the type of the field to be inserted",object:"Object",ok:"Ok",redo:"Redo (Ctrl+Shift+Z)",removeText:"Remove",removeTitle:"Remove selected fields (Ctrl+Del)",removeField:"Remove this field (Ctrl+Del)",selectNode:"Select a node...",showAll:"show all",showMore:"show more",showMoreStatus:"displaying ${visibleChilds} of ${totalChilds} items.",sort:"Sort",sortTitle:"Sort the childs of this ${type}",sortTitleShort:"Sort contents",sortFieldLabel:"Field:",sortDirectionLabel:"Direction:",sortFieldTitle:"Select the nested field by which to sort the array or object",sortAscending:"Ascending",sortAscendingTitle:"Sort the selected field in ascending order",sortDescending:"Descending",sortDescendingTitle:"Sort the selected field in descending order",string:"String",transform:"Transform",transformTitle:"Filter, sort, or transform the childs of this ${type}",transformTitleShort:"Filter, sort, or transform contents",transformQueryTitle:"Enter a JMESPath query",transformWizardLabel:"Wizard",transformWizardFilter:"Filter",transformWizardSortBy:"Sort by",transformWizardSelectFields:"Select fields",transformQueryLabel:"Query",transformPreviewLabel:"Preview",type:"Type",typeTitle:"Change the type of this field",openUrl:"Ctrl+Click or Ctrl+Enter to open url in new window",undo:"Undo last action (Ctrl+Z)",validationCannotMove:"Cannot move a field into a child of itself",autoType:'Field type "auto". The field type is automatically determined from the value and can be a string, number, boolean, or null.',objectType:'Field type "object". An object contains an unordered set of key/value pairs.',arrayType:'Fieldtype
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")}}},s=[],a=0;a<t.length;a++){varl=t[a],c=o[l];if(!c)thrownewError('Unknown mode "'+l+'"');c.className="jsoneditor-type-modes"+(i==l?" jsoneditor-selected":""),s.push(c)}varh=o[i];if(!h)thrownewError('Unknown mode "'+i+'"');vard=h.text,u=document.createElement("button");u.type="button",u.className="jsoneditor-modes jsoneditor-separator",u.innerHTML=d+" ▾",u.title="Switch editor mode",u.onclick=function(){newr(s).show(u,e)};varf=document.createElement("div");f.className="jsoneditor-modes",f.style.position="relative",f.appendChild(u),e.appendChild(f),this.dom={container:e,box:u,frame:f}}varr=i(63);n.prototype.focus=function(){this.dom.box.focus()},n.prototype.destroy=function(){this.dom&&this.dom.frame&&this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame),this.dom=null},e.exports=n},function(e,t){"use strict";functioni(e){functiont(e){vart,i;document.createRange?(t=document.createRange(),t.selectNodeContents(e),t.collapse(!1),i=window.getSelection(),i.removeAllRanges(),i.addRange(t)):document.selection&&(t=document.body.createTextRange(),t.moveToElementText(e),t.collapse(!1),t.select())}functioni(e){returnvoid0===a&&(a=document.createElement("span"),a.style.visibility="hidden",a.style.position="fixed",a.style.outline="0",a.style.margin="0",a.style.padding="0",a.style.border="0",a.style.left="0",a.style.whiteSpace="pre",a.style.fontSize=n,a.style.fontFamily=r,a.style.fontWeight="normal",document.body.appendChild(a)),a.innerHTML=String(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">"),a.getBoundingClientRect().right}e=e||{},e.confirmKeys=e.confirmKeys||[39,35,9],e.caseSensitive=e.caseSensitive||!1;varn="",r="",o=document.createElement("div");o.style.position="relative",o.style.outline="0",o.style.border="0",o.style.margin="0",o.style.padding="0";vars=document.createElement("div");s.className="autocomplete dropdown",s.style.position="absolute",s.style.visibility="hidden";vara,l,c={onArrowDown:function(){},onArrowUp:function(){},onEnter:function(){},onTab:function(){},startFrom:0,options:[],element:null,elementHint:null,elementStyle:null,wrapper:o,show:function(e,t,i){this.startFrom=t,this.wrapper.remove(),this.elementHint&&(this.elementHint.remove(),this.elementHint=null),""==n&&(n=window.getComputedStyle(e).getPropertyValue("font-size")),""==r&&(r=window.getComputedStyle(e).getPropertyValue("font-family"));e.getBoundingClientRect().right,e.getBoundingClientRect().left;s.style.marginLeft="0",s.style.marginTop=e.getBoundingClientRect().height+"px",this.options=i,this.element!=e&&(this.element=e,this.elementStyle={zIndex:this.element.style.zIndex,position:this.element.style.position,backgroundColor:this.element.style.backgroundColor,borderColor:this.element.style.borderColor}),this.element.style.zIndex=3,this.element.style.position="relative",this.element.style.backgroundColor="transparent",this.element.style.borderColor="transparent",this.elementHint=e.cloneNode(),this.elementHint.className="autocomplete hint",this.elementHint.style.zIndex=2,this.elementHint.style.position="absolute",this.elementHint.onfocus=function(){this.element.focus()}.bind(this),this.element.addEventListener&&(this.element.removeEventListener("keydown",d),this.element.addEventListener("keydown",d,!1),this.element.removeEventListener("blur",u),this.element.addEventListener("blur",u,!1)),o.appendChild(this.elementHint),o.appendChild(s),e.parentElement.appendChild(o),this.repaint(e)},setText:function(e){this.element.innerText=e},getText:function(){returnthis.element.innerText},hideDropDown:function(){this.wrapper.remove(),this.elementHint&&(this.elementHint.remove(),this.elementHint=null,h.hide(),this.element.s