!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=l.getInternetExplorerVersion();if(-1!=r&&9>r)thrownewError("Unsupported browser, IE9 or newer required. Please install the newest version of your browser.");if(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)){varo=["ace","theme","ajv","schema","onChange","onEditable","onError","onModeChange","escapeUnicode","history","search","mode","modes","name","indentation","sortObjectKeys"];Object.keys(t).forEach(function(e){-1===o.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(o){}vars=i(51),a=i(62),l=i(54);n.modes={},n.prototype.DEBOUNCE_INTERVAL=150,n.prototype._create=function(e,t,i){this.container=e,this.options=t||{},this.json=i||{};varn=this.options.mode||"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=l.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){vart,i,r=this.container,o=l.extend({},this.options),s=o.mode;o.mode=e;vara=n.modes[e];if(!a)thrownewError('Unknown mode "'+o.mode+'"');try{varc="text"==a.data;if(i=this.getName(),t=this[c?"getText":"get"](),this.destroy(),l.clear(this),l.extend(this,a.mixin),this.create(r,o),this.setName(i),this[c?"setText":"set"](t),"function"==typeofa.load)try{a.load.call(this)}catch(h){console.error(h)}if("function"==typeofo.onModeChange&&e!==s)try{o.onModeChange(e,s)}catch(h){console.error(h)}}catch(h){this._onError(h)}},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){if(e){vart;try{t=this.options.ajv||r({allErrors:!0,verbose:!0})}catch(i){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`.")}t&&(this.validateSchema=t.compile(e),this.options.schema=e,this.validate())}elsethis.validateSchema=null,this.options.schema=null,this.validate()},n.prototype.validate=function(){},n.registerMode=function(e){vart,i;if(l.isArray(e))for(t=0;t<e.length;t++)n.registerMode(e[t]);else{if(!("mode"ine))thrownewError('Property "mode" missing');if(!("mixin"ine))thrownewError('Property "mixin" missing');if(!("data"ine))thrownewError('Property "data" missing');varr=e.mode;if(rinn.modes)thrownewError('Mode "'+r+'" already registered');if("function"!=typeofe.mixin.create)thrownewError('Required function "create" missing on mixin');varo=["setMode","registerMode","modes"];for(t=0;t<o.length;t++)if(i=o[t],iine.mixin)thrownewError('Reserved property "'+i+'" not allowed in mixin');n.modes[r]=e}},n.registerMode(s),n.registerMode(a),e.exports=n},function(e,t,i){"use strict";functionn(e){returnv.test(e)}functionr(e){functiont(e,t){vari;if("string"==typeofe){if(i=F(e),!i)thrownewErro
if("e"===n||"E"===n)for(t+=n,l(),"-"!==n&&"+"!==n||(t+=n,l());n>="0"&&"9">=n;)t+=n,l();returne=+t,isFinite(e)?e:voida("Bad number")},h=function(){vare,t,i,r="";if('"'===n)for(;l();){if('"'===n)returnl(),r;if("\\"===n)if(l(),"u"===n){for(i=0,t=0;4>t&&(e=parseInt(l(),16),isFinite(e));t+=1)i=16*i+e;r+=String.fromCharCode(i)}else{if("string"!=typeofs[n])break;r+=s[n]}elser+=n}a("Bad string")},d=function(){for(;n&&" ">=n;)l()},u=function(){switch(n){case"t":returnl("t"),l("r"),l("u"),l("e"),!0;case"f":returnl("f"),l("a"),l("l"),l("s"),l("e"),!1;case"n":returnl("n"),l("u"),l("l"),l("l"),null}a("Unexpected '"+n+"'")},f=function(){vare=[];if("["===n){if(l("["),d(),"]"===n)returnl("]"),e;for(;n;){if(e.push(o()),d(),"]"===n)returnl("]"),e;l(","),d()}}a("Bad array")},p=function(){vare,t={};if("{"===n){if(l("{"),d(),"}"===n)returnl("}"),t;for(;n;){if(e=h(),d(),l(":"),Object.hasOwnProperty.call(t,e)&&a('Duplicate key "'+e+'"'),t[e]=o(),d(),"}"===n)returnl("}"),t;l(","),d()}}a("Bad object")};o=function(){switch(d(),n){case"{":returnp();case"[":returnf();case'"':returnh();case"-":returnc();default:returnn>="0"&&"9">=n?c():u()}},e.exports=function(e,t){vars;returnr=e,i=0,n=" ",s=o(),d(),n&&a("Syntax error"),"function"==typeoft?functionl(e,i){varn,r,o=e[i];if(o&&"object"==typeofo)for(nino)Object.prototype.hasOwnProperty.call(o,n)&&(r=l(o,n),void0!==r?o[n]=r:deleteo[n]);returnt.call(e,i,o)}({"":s},""):s}},function(e,t){functioni(e){returna.lastIndex=0,a.test(e)?'"'+e.replace(a,function(e){vart=l[e];return"string"==typeoft?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}functionn(e,t){vara,l,c,h,d,u=r,f=t[e];switch(f&&"object"==typeoff&&"function"==typeoff.toJSON&&(f=f.toJSON(e)),"function"==typeofs&&(f=s.call(t,e,f)),typeoff){case"string":returni(f);case"number":returnisFinite(f)?String(f):"null";case"boolean":case"null":returnString(f);case"object":if(!f)return"null";if(r+=o,d=[],"[object Array]"===Object.prototype.toString.apply(f)){for(h=f.length,a=0;h>a;a+=1)d[a]=n(a,f)||"null";returnc=0===d.length?"[]":r?"[\n"+r+d.join(",\n"+r)+"\n"+u+"]":"["+d.join(",")+"]",r=u,c}if(s&&"object"==typeofs)for(h=s.length,a=0;h>a;a+=1)l=s[a],"string"==typeofl&&(c=n(l,f),c&&d.push(i(l)+(r?": ":":")+c));elsefor(linf)Object.prototype.hasOwnProperty.call(f,l)&&(c=n(l,f),c&&d.push(i(l)+(r?": ":":")+c));returnc=0===d.length?"{}":r?"{\n"+r+d.join(",\n"+r)+"\n"+u+"}":"{"+d.join(",")+"}",r=u,c}}varr,o,s,a=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,l={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};e.exports=function(e,t,i){vara;if(r="",o="","number"==typeofi)for(a=0;i>a;a+=1)o+=" ";else"string"==typeofi&&(o=i);if(s=t,t&&"function"!=typeoft&&("object"!=typeoft||"number"!=typeoft.length))thrownewError("JSON.stringify");returnn("",{"":e})}},function(e,t,i){"use strict";functionn(e){r.copy(e,this)}varr=i(11);e.exports=n},function(module,exports,__webpack_require__){"use strict";functionsetupAsync(e,t){t!==!1&&(t=!0);vari,n=e.async,r=e.transpile;switch(typeofr){case"string":varo=TRANSPILE[r];if(!o)thrownewError("bad transpiler: "+r);returne._transpileFunc=o(e,t);case"undefined":case"boolean":if("string"==typeofn){if(i=ASYNC[n],!i)thrownewError("bad async mode: "+n);returne.transpile=i(e,t)}for(vars=0;s<MODES.length;s++){vara=MODES[s];if(setupAsync(a,!1))returnutil.copy(a,e),e.transpile}thrownewError("generators, nodent and regenerator are not available");case"function":returne._transpileFunc=e.transpile;default:thrownewError("bad transpiler: "+r)}}functioncheckGenerators(opts,required){try{returneval("(function*(){})()"),!0}catch(e){if(required)thrownewError("generators not supported")}}functioncheckAsyncFunction(opts,required){try{returneval("(async function(){})()"),!0}catch(e){if(required)thrownewError("es7 async functions not supported")}}functiongetRegenerator(e,t){try{returnregenerator||(regenerator=__webpack_require__(!function(){vare=ne
u&&(n+=" var schema"+r+" = "+f+"; ",f="schema"+r);varp="i"+r;u||(n+=" var schema"+r+" = validate.schema"+a+";"),n+="var "+d+";",u&&(n+=" if (schema"+r+" === undefined) "+d+" = true; else if (!Array.isArray(schema"+r+")) "+d+" = false; else {"),n+=""+d+" = false;for (var "+p+"=0; "+p+"<schema"+r+".length; "+p+"++) if (equal("+h+", schema"+r+"["+p+"])) { "+d+" = true; break; }",u&&(n+=" } "),n+=" if (!"+d+") { ";varm=m||[];m.push(n),n="",e.createErrors!==!1?(n+=" { keyword: '"+(i||"enum")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+l+'" , params: {} ',e.opts.messages!==!1&&(n+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),n+=" } "):n+=" {} ";varg=n;returnn=m.pop(),n+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+g+"]); ":" validate.errors = ["+g+"]; return false; ":" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" }",c&&(n+=" else { "),n}},function(e,t){"use strict";e.exports=function(e,t){vari,n=" ",r=e.level,o=e.dataLevel,s=e.schema[t],a=e.schemaPath+"."+t,l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,h="data"+(o||"");if(e.opts.format===!1)returnc&&(n+=" if (true) { "),n;vard=e.opts.v5&&s.$data,u=d?e.util.getData(s.$data,o,e.dataPathArr):s;if(d&&(n+=" var schema"+r+" = "+u+"; ",u="schema"+r),d){varf="format"+r;n+=" var "+f+" = formats["+u+"]; var isObject"+r+" = typeof "+f+" == 'object' && !("+f+" instanceof RegExp) && "+f+".validate; if (isObject"+r+") { var async"+r+" = "+f+".async; "+f+" = "+f+".validate; } if ( ",d&&(n+=" ("+u+" !== undefined && typeof "+u+" != 'string') || "),n+=" ("+f+" && !(typeof "+f+" == 'function' ? ",n+=e.async?" (async"+r+" ? "+e.yieldAwait+" "+f+"("+h+") : "+f+"("+h+")) ":" "+f+"("+h+") ",n+=" : "+f+".test("+h+")))) {"}else{varf=e.formats[s];if(!f)returnc&&(n+=" if (true) { "),n;varp="object"==typeoff&&!(finstanceofRegExp)&&f.validate;if(p){varm=f.async===!0;f=f.validate}if(m){if(!e.async)thrownewError("async format in sync schema");varg="formats"+e.util.getProperty(s)+".validate";n+=" if (!("+e.yieldAwait+" "+g+"("+h+"))) { "}else{n+=" if (! ";varg="formats"+e.util.getProperty(s);p&&(g+=".validate"),n+="function"==typeoff?" "+g+"("+h+") ":" "+g+".test("+h+") ",n+=") { "}}varv=v||[];v.push(n),n="",e.createErrors!==!1?(n+=" { keyword: '"+(i||"format")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+l+'" , params: { format: ',n+=d?""+u:""+e.util.toQuotedString(s),n+=" } ",e.opts.messages!==!1&&(n+=" , message: 'should match format \"",n+=d?"' + "+u+" + '":""+e.util.escapeQuotes(s),n+="\"' "),e.opts.verbose&&(n+=" , schema: ",n+=d?"validate.schema"+a:""+e.util.toQuotedString(s),n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),n+=" } "):n+=" {} ";varw=n;returnn=v.pop(),n+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+w+"]); ":" validate.errors = ["+w+"]; return false; ":" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } ",c&&(n+=" else { "),n}},function(e,t){"use strict";e.exports=function(e,t){vari,n=" ",r=e.level,o=e.dataLevel,s=e.schema[t],a=e.schemaPath+"."+t,l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,h="data"+(o||""),d="valid"+r,u="errs__"+r,f=e.util.copy(e),p="";f.level++;varm=f.dataLevel=e.dataLevel+1,g="data"+m;if(n+="var "+u+" = errors;var "+d+";",Array.isArray(s)){varv=e.schema.additionalItems;if(v===!1){n+=" "+d+" = "+h+".length <= "+s.length+"; ";varw=l;l=e.errSchemaPath+"/additionalItems",n+=" if (!"+d+") { ";vary=y||[];y.push(n),n="",e.createErrors!==!1?(n+=" { keyword: '"+(i||"additionalItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+l+'" , params: { limit: '+s.length+" } ",e.opts.messages!==!1&&(n+=" , message: 'should NOT have more than "+s.length+" items' "),e.opts.verbose&&(n+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),n+=" } "):n+=" {} ";varA=n
n+="' "),e.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=A}elsec&&(n+=" if (true) {");returnn}},function(e,t){"use strict";e.exports=function(e,t){vari,n=" ",r=e.level,o=e.dataLevel,s=e.schema[t],a=e.schemaPath+"."+t,l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,h="data"+(o||""),d="valid"+r,u=e.opts.v5&&s.$data,f=u?e.util.getData(s.$data,o,e.dataPathArr):s;if(u&&(n+=" var schema"+r+" = "+f+"; ",f="schema"+r),(s||u)&&e.opts.uniqueItems!==!1){u&&(n+=" var "+d+"; if ("+f+" === false || "+f+" === undefined) "+d+" = true; else if (typeof "+f+" != 'boolean') "+d+" = false; else { "),n+=" var "+d+" = true; if ("+h+".length > 1) { var i = "+h+".length, j; outer: for (;i--;) { for (j = i; j--;) { if (equal("+h+"[i], "+h+"[j])) { "+d+" = false; break outer; } } } } ",u&&(n+=" } "),n+=" if (!"+d+") { ";varp=p||[];p.push(n),n="",e.createErrors!==!1?(n+=" { keyword: '"+(i||"uniqueItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+l+'" , params: { i: i, j: j } ',e.opts.messages!==!1&&(n+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(n+=" , schema: ",n+=u?"validate.schema"+a:""+s,n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),n+=" } "):n+=" {} ";varm=n;n=p.pop(),n+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } ",c&&(n+=" else { ")}elsec&&(n+=" if (true) { ");returnn}},function(e,t,i){"use strict";functionn(e){functiont(t,i,r){varo={inline:r||n[t],statements:!0,errors:"full"};i&&(o.type=i),e.addKeyword(t,o)}varn={"switch":i(44),constant:i(45),_formatLimit:i(46),patternRequired:i(47)};if(e._opts.meta!==!1){vars=i(48);e.addMetaSchema(s,o)}t("constant"),e.addKeyword("contains",{type:"array",macro:r}),t("formatMaximum","string",n._formatLimit),t("formatMinimum","string",n._formatLimit),e.addKeyword("exclusiveFormatMaximum"),e.addKeyword("exclusiveFormatMinimum"),e.addKeyword("patternGroups"),t("patternRequired","object"),t("switch")}functionr(e){return{not:{items:{not:e}}}}varo="https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json";e.exports={enable:n,META_SCHEMA_ID:o}},function(e,t){"use strict";e.exports=function(e,t){vari,n=" ",r=e.level,o=e.dataLevel,s=e.schema[t],a=e.schemaPath+"."+t,l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,h="data"+(o||""),d="valid"+r,u="errs__"+r,f=e.util.copy(e),p="";f.level++;varm,g="ifPassed"+e.level;n+="var "+g+";";varv=s;if(v)for(varw,y=-1,A=v.length-1;A>y;){if(w=v[y+=1],y&&!m&&(n+=" if (!"+g+") { ",p+="}"),w["if"]&&e.util.schemaHasRules(w["if"],e.RULES.all)){n+=" var "+u+" = errors; ";varC=e.compositeRule;if(e.compositeRule=f.compositeRule=!0,f.createErrors=!1,f.schema=w["if"],f.schemaPath=a+"["+y+"].if",f.errSchemaPath=l+"/"+y+"/if",n+=" "+e.validate(f)+" ",f.createErrors=!0,e.compositeRule=f.compositeRule=C,n+=" "+g+" = valid"+f.level+"; if ("+g+") { ","boolean"==typeofw.then){if(w.then===!1){varE=E||[];E.push(n),n="",e.createErrors!==!1?(n+=" { keyword: '"+(i||"switch")+"' , dataPath: (dataPath || '') + "+e.errorPath+' , schemaPath: "'+l+'" , params: { caseIndex: '+y+" } ",e.opts.messages!==!1&&(n+=" , message: 'should pass \"switch\" keyword validation' "),e.opts.verbose&&(n+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),n+=" } "):n+=" {} ";varb=n;n=E.pop(),n+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+b+"]); ":" validate.errors = ["+b+"]; return false; ":" var err = "+b+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}n+=" var valid"+f.level+" = "+w.then+"; "}elsef.schema=w.then,f.schemaPath=a+"["+y+"].then",f.errSchemaPath=l+"/"+y+"/then",n+=" "+e.validate(f)+" ";n+="}e
recurse:!0})}},n.prototype.moveBefore=function(e,t){if(this._hasChilds()){vari=this.dom.tr?this.dom.tr.parentNode:void0;if(i){varn=document.createElement("tr");n.style.height=i.clientHeight+"px",i.appendChild(n)}e.parent&&e.parent.removeChild(e),tinstanceofl?this.appendChild(e):this.insertBefore(e,t),i&&i.removeChild(n)}},n.prototype.moveTo=function(e,t){if(e.parent==this){vari=this.childs.indexOf(e);t>i&&t++}varn=this.childs[t]||this.append;this.moveBefore(e,n)},n.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{vari=this.childs.indexOf(t);if(-1==i)thrownewError("Node not found");e.setParent(this),e.fieldEditable="object"==this.type,this.childs.splice(i,0,e)}if(this.expanded){varn=e.getDom(),r=t.getDom(),o=r?r.parentNode:void0;r&&o&&o.insertBefore(n,r),e.showChilds()}this.updateDom({updateIndexes:!0}),e.updateDom({recurse:!0})}},n.prototype.insertAfter=function(e,t){if(this._hasChilds()){vari=this.childs.indexOf(t),n=this.childs[i+1];n?this.insertBefore(e,n):this.appendChild(e)}},n.prototype.search=function(e){vart,i=[],n=e?e.toLowerCase():void0;if(deletethis.searchField,deletethis.searchValue,void0!=this.field){varr=String(this.field).toLowerCase();t=r.indexOf(n),-1!=t&&(this.searchField=!0,i.push({node:this,elem:"field"})),this._updateDomField()}if(this._hasChilds()){if(this.childs){varo=[];this.childs.forEach(function(t){o=o.concat(t.search(e))}),i=i.concat(o)}if(void0!=n){vars=!1;0==o.length?this.collapse(s):this.expand(s)}}else{if(void0!=this.value){vara=String(this.value).toLowerCase();t=a.indexOf(n),-1!=t&&(this.searchValue=!0,i.push({node:this,elem:"value"}))}this._updateDomValue()}returni},n.prototype.scrollTo=function(e){if(!this.dom.tr||!this.dom.tr.parentNode)for(vart=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)},n.focusElement=void0,n.prototype.focus=function(e){if(n.focusElement=e,this.dom.tr&&this.dom.tr.parentNode){vart=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(),a.selectContentEditable(t.field)):t.value&&!this._hasChilds()?(t.value.focus(),a.selectContentEditable(t.value)):t.menu.focus();break;case"field":t.field&&this.fieldEditable?(t.field.focus(),a.selectContentEditable(t.field)):t.value&&!this._hasChilds()?(t.value.focus(),a.selectContentEditable(t.value)):this._hasChilds()?t.expand.focus():t.menu.focus();break;case"value":default:t.value&&!this._hasChilds()?(t.value.focus(),a.selectContentEditable(t.value)):t.field&&this.fieldEditable?(t.field.focus(),a.selectContentEditable(t.field)):this._hasChilds()?t.expand.focus():t.menu.focus()}}},n.select=function(e){setTimeout(function(){a.selectContentEditable(e)},0)},n.prototype.blur=function(){this._getDomValue(!1),this._getDomField(!1)},n.prototype.containsNode=function(e){if(this==e)return!0;vart=this.childs;if(t)for(vari=0,n=t.length;n>i;i++)if(t[i].containsNode(e))return!0;return!1},n.prototype._move=function(e,t){if(e!=t){if(e.containsNode(this))thrownewError("Cannot move a field into a child of itself");e.parent&&e.parent.removeChild(e);vari=e.clone();e.clearDom(),t?this.insertBefore(i,t):this.appendChild(i)}},n.prototype.removeChild=function(e){if(this.childs){vart=this.childs.indexOf(e);if(-1!=t){e.hide(),deletee.searchField,deletee.searchValue;vari=this.childs.splice(t,1)[0];returni.parent=null,this.updateDom({updateIndexes:!0}),i}}},n.prototype._remove=function(e){this.removeChild(e)},n.prototype.changeType=function(e){vart=this.type;if(t!=e){if("string"!=e&&"auto"!=e||"string"!=t&&"auto"!=t){vari,n=this.dom.tr?this.dom.tr.parentNode:void0;i=this.expanded?this.getAppend():this.getDom();varr=i&&i.parentNode?i.nextSibling:void0;this.hide(),this.clearDom(),this.type=e,"object"==e?(this.childs||(this.childs=[]),this.childs.forEach(function(e,t){e.clearDom(),deletee.ind
if(g){if(g>m)return-1;if(m>g)return1}for(varv=0,w=Math.max(f.length,p.length);w>v;v++){if(n=!(f[v]||"").match(c)&&parseFloat(f[v])||f[v]||0,r=!(p[v]||"").match(c)&&parseFloat(p[v])||p[v]||0,isNaN(n)!==isNaN(r))returnisNaN(n)?1:-1;if(typeofn!=typeofr&&(n+="",r+=""),r>n)return-1;if(n>r)return1}return0}},function(e,t,i){"use strict";functionn(e){functiont(e){this.editor=e,this.dom={}}returnt.prototype=newe,t.prototype.getDom=function(){vare=this.dom;if(e.tr)returne.tr;this._updateEditability();vart=document.createElement("tr");if(t.node=this,e.tr=t,this.editable.field){e.tdDrag=document.createElement("td");vari=document.createElement("td");e.tdMenu=i;varn=document.createElement("button");n.className="jsoneditor-contextmenu",n.title="Click to open the actions menu (Ctrl+M)",e.menu=n,i.appendChild(e.menu)}varr=document.createElement("td"),o=document.createElement("div");returno.innerHTML="(empty)",o.className="jsoneditor-readonly",r.appendChild(o),e.td=r,e.text=o,this.updateDom(),t},t.prototype.updateDom=function(){vare=this.dom,t=e.td;t&&(t.style.paddingLeft=24*this.getLevel()+26+"px");vari=e.text;i&&(i.innerHTML="(empty "+this.parent.type+")");varn=e.tr;this.isVisible()?e.tr.firstChild||(e.tdDrag&&n.appendChild(e.tdDrag),e.tdMenu&&n.appendChild(e.tdMenu),n.appendChild(t)):e.tr.firstChild&&(e.tdDrag&&n.removeChild(e.tdDrag),e.tdMenu&&n.removeChild(e.tdMenu),n.removeChild(t))},t.prototype.isVisible=function(){return0==this.parent.childs.length},t.prototype.showContextMenu=function(t,i){varn=this,r=e.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:"jsoneditor-insert",click:function(){n._onAppend("","","auto")},submenu:[{text:"Auto",className:"jsoneditor-type-auto",title:r.auto,click:function(){n._onAppend("","","auto")}},{text:"Array",className:"jsoneditor-type-array",title:r.array,click:function(){n._onAppend("",[])}},{text:"Object",className:"jsoneditor-type-object",title:r.object,click:function(){n._onAppend("",{})}},{text:"String",className:"jsoneditor-type-string",title:r.string,click:function(){n._onAppend("","","string")}}]}],a=newo(s,{close:i});a.show(t,this.editor.content)},t.prototype.onEvent=function(e){vart=e.type,i=e.target||e.srcElement,n=this.dom,o=n.menu;if(i==o&&("mouseover"==t?this.editor.highlighter.highlight(this.parent):"mouseout"==t&&this.editor.highlighter.unhighlight()),"click"==t&&i==n.menu){vars=this.editor.highlighter;s.highlight(this.parent),s.lock(),r.addClassName(n.menu,"jsoneditor-selected"),this.showContextMenu(n.menu,function(){r.removeClassName(n.menu,"jsoneditor-selected"),s.unlock(),s.unhighlight()})}"keydown"==t&&this.onKeyDown(e)},t}varr=i(54),o=i(57);e.exports=n},function(e,t,i){"use strict";functionn(e,t,i,n){for(varo={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")}}},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.className="jsoneditor-modes jsoneditor-separator",u.innerHTML=d+" ▾",u.title="Switch editor mode",u.onclick=function(){vare=newr(s);e.show(u)};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(57);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,i){"use strict";varn;t
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){returnconsole.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},this.insert=function(e,t){returnthis.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},this.insertInLine=function(e,t){vari=this.clippedPos(e.row,e.column),n=this.pos(e.row,e.column+t.length);returnthis.applyDelta({start:i,end:n,action:"insert",lines:[t]},!0),this.clonePos(n)},this.clippedPos=function(e,t){vari=this.getLength();void0===e?e=i:0>e?e=0:e>=i&&(e=i-1,t=void0);varn=this.getLine(e);returnvoid0==t&&(t=n.length),t=Math.min(Math.max(t,0),n.length),{row:e,column:t}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,t){return{row:e,column:t}},this.$clipPosition=function(e){vart=this.getLength();returne.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},this.insertFullLines=function(e,t){e=Math.min(Math.max(e,0),this.getLength());vari=0;e<this.getLength()?(t=t.concat([""]),i=0):(t=[""].concat(t),e--,i=this.$lines[e].length),this.insertMergedLines({row:e,column:i},t)},this.insertMergedLines=function(e,t){vari=this.clippedPos(e.row,e.column),n={row:i.row+t.length-1,column:(1==t.length?i.column:0)+t[t.length-1].length};returnthis.applyDelta({start:i,end:n,action:"insert",lines:t}),this.clonePos(n)},this.remove=function(e){vart=this.clippedPos(e.start.row,e.start.column),i=this.clippedPos(e.end.row,e.end.column);returnthis.applyDelta({start:t,end:i,action:"remove",lines:this.getLinesForRange({start:t,end:i})}),this.clonePos(t)},this.removeInLine=function(e,t,i){varn=this.clippedPos(e,t),r=this.clippedPos(e,i);returnthis.applyDelta({start:n,end:r,action:"remove",lines:this.getLinesForRange({start:n,end:r})},!0),this.clonePos(n)},this.removeFullLines=function(e,t
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","Ctrl-E"),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","Ctrl-Shift-E"),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:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",bindKey:n(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",bindKey:n("Ctrl-L","Command-L"),exec:function(e){vart=parseInt(prompt("Enter line number:"),10);isNaN(t)||e.gotoLine(t)},readOnly:!0},{name:"fold",bindKey:n("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:n("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",bindKey:n("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",bindKey:n("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",bindKey:n(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",bindKey:n("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",bindKey:n("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",bindKey:n("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",bindKey:n("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",bindKey:n("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",bindKey:n("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",bindKey:n("Ctrl-F","Command-F"),exec:function(e){o.loadModule("ace/ext/searchbox",function(t){t.Search(e)})},readOnly:!0},{name:"overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",bindKey:n("Ctrl-Shift-Home","Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",bindKey:n("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFile
"use strict";e("./lib/fixoldbrowsers");varn=e("./lib/dom"),r=e("./lib/event"),o=e("./editor").Editor,s=e("./edit_session").EditSession,a=e("./undomanager").UndoManager,l=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.acequire=e,t.edit=function(e){if("string"==typeofe){vari=e;if(e=document.getElementById(i),!e)thrownewError("ace.edit can't find div #"+i)}if(e&&e.env&&e.env.editorinstanceofo)returne.env.editor;vars="";if(e&&/input|textarea/i.test(e.tagName)){vara=e;s=a.value,e=n.createElement("pre"),a.parentNode.replaceChild(e,a)}elsee&&(s=n.getInnerText(e),e.innerHTML="");varc=t.createEditSession(s),h=newo(newl(e));h.setSession(c);vard={document:c,editor:h,onResize:h.resize.bind(h,null)};returna&&(d.textarea=a),r.addListener(window,"resize",d.onResize),h.on("destroy",function(){r.removeListener(window,"resize",d.onResize),d.editor.container.env=null}),h.container.env=h.env=d,h},t.createEditSession=function(e,t){vari=news(e,t);returni.setUndoManager(newa),i},t.EditSession=s,t.UndoManager=a,t.version="1.2.3"}),function(){ace.acequire(["ace/ace"],function(e){e&&e.config.init(!0),window.ace||(window.ace=e);for(vartine)e.hasOwnProperty(t)&&(window.ace[t]=e[t])})}(),e.exports=window.ace.acequire("ace/ace")},function(e,t){e.exports=function(){thrownewError("define cannot be used indirect")}},function(e,t){(function(t){functioni(){if(t.Blob)try{returnnewBlob(["asdf"],{type:"text/plain"}),Blob}catch(e){}vari=t.WebKitBlobBuilder||t.MozBlobBuilder||t.MSBlobBuilder;returnfunction(e,t){varn=newi,r=t.endings,o=t.type;if(r)for(vars=0,a=e.length;a>s;++s)n.append(e[s],r);elsefor(vars=0,a=e.length;a>s;++s)n.append(e[s]);returno?n.getBlob(o):n.getBlob()}}e.exports=i()}).call(t,function(){returnthis}())},function(e,t,i){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,i){"use strict";varn=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,o=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"invalid.illegal",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"invalid.illegal",regex:"\\/\\/.*$"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'[^"\\\\]+'},{token:"string",regex:'"',next:"start"},{token:"string",regex:"",next:"start"}]}};n.inherits(o,r),t.JsonHighlightRules=o}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,i){"use strict";varn=e("../range").Range,r=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){vari=e.getLine(t),r=i.match(/^(\s*\})/);if(!r)return0;varo=r[1].length,s=e.findMatchingBracket({row:t,column:o});if(!s||s.row==t)return0;vara=this.$getIndent(e.getLine(s.row));e.replace(newn(t,0,t,o-1),a)},this.$getIndent=function(e){returne.match(/^\s*/)[0]}}).call(r.prototype),t.MatchingBraceOutdent=r}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,i){"use strict";varn,r=e("../../lib/oop"),o=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,a=e("../../lib/lang"),l=["text","paren.rparen","punctuation.operator"],c=["text","paren.rparen","punctuation.operator","comment"],h={},d=function(e){vart=-1;returne.multiSelect&&(t=e.selection.index,h.rangeCount!=e.multiSelect.rangeCo