!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(i){if(n[i])returnn[i].exports;varo=n[i]={exports:{},id:i,loaded:!1};returne[i].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}varn={};returnt.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){functioni(e,t,n){if(!(thisinstanceofi))thrownewError('JSONEditor constructor called without "new".');varo=l.getInternetExplorerVersion();if(-1!=o&&9>o)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)){varr=["ace","theme","ajv","schema","onChange","onEditable","onError","onModeChange","escapeUnicode","history","search","mode","modes","name","indentation"];Object.keys(t).forEach(function(e){-1===r.indexOf(e)&&console.warn('Unknown option "'+e+'". This option will be ignored')})}arguments.length&&this._create(e,t,n)}varo;try{o=n(!function(){vare=newError('Cannot find module "ajv"');throwe.code="MODULE_NOT_FOUND",e}())}catch(r){}vars=n(1),a=n(2),l=n(3);i.modes={},i.prototype.DEBOUNCE_INTERVAL=150,i.prototype._create=function(e,t,n){this.container=e,this.options=t||{},this.json=n||{};vari=this.options.mode||"tree";this.setMode(i)},i.prototype._delete=function(){},i.prototype.set=function(e){this.json=e},i.prototype.get=function(){returnthis.json},i.prototype.setText=function(e){this.json=l.parse(e)},i.prototype.getText=function(){returnJSON.stringify(this.json)},i.prototype.setName=function(e){this.options||(this.options={}),this.options.name=e},i.prototype.getName=function(){returnthis.options&&this.options.name},i.prototype.setMode=function(e){vart,n,o=this.container,r=l.extend({},this.options),s=r.mode;r.mode=e;vara=i.modes[e];if(!a)thrownewError('Unknown mode "'+r.mode+'"');try{varc="text"==a.data;if(n=this.getName(),t=this[c?"getText":"get"](),this._delete(),l.clear(this),l.extend(this,a.mixin),this.create(o,r),this.setName(n),this[c?"setText":"set"](t),"function"==typeofa.load)try{a.load.call(this)}catch(d){console.error(d)}if("function"==typeofr.onModeChange&&e!==s)try{r.onModeChange(e,s)}catch(d){console.error(d)}}catch(d){this._onError(d)}},i.prototype.getMode=function(){returnthis.options.mode},i.prototype._onError=function(e){if(!this.options||"function"!=typeofthis.options.onError)throwe;this.options.onError(e)},i.prototype.setSchema=function(e){if(e){vart;try{t=this.options.ajv||o({allErrors:!0,verbose:!0})}catch(n){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()},i.prototype.validate=function(){},i.registerMode=function(e){vart,n;if(l.isArray(e))for(t=0;t<e.length;t++)i.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');varo=e.mode;if(oini.modes)thrownewError('Mode "'+o+'" already registered');if("function"!=typeofe.mixin.create)thrownewError('Required function "create" missing on mixin');varr=["setMode","registerMode","modes"];for(t=0;t<r.length;t++)if(n=r[t],nine.mixin)thrownewError('Reserved property "'+n+'" not allowed in mixin');i.modes[o]=e}},i.registerMode(s),i.registerMode(a),e.exports=i},function(e,t,n){vari=n(5),o=n(6),r=n(7),s=n(8),a=n(9),l=n(4),c=n(3),d={};d.create=function
this.onChange()},i.prototype.clear=function(){this.history=[],this.index=-1,this.onChange()},i.prototype.canUndo=function(){returnthis.index>=0},i.prototype.canRedo=function(){returnthis.index<this.history.length-1},i.prototype.undo=function(){if(this.canUndo()){vare=this.history[this.index];if(e){vart=this.actions[e.action];t&&t.undo?(t.undo(e.params),e.params.oldSelection&&this.editor.setSelection(e.params.oldSelection)):console.error(newError('unknown action "'+e.action+'"'))}this.index--,this.onChange()}},i.prototype.redo=function(){if(this.canRedo()){this.index++;vare=this.history[this.index];if(e){vart=this.actions[e.action];t&&t.redo?(t.redo(e.params),e.params.newSelection&&this.editor.setSelection(e.params.newSelection)):console.error(newError('unknown action "'+e.action+'"'))}this.onChange()}},e.exports=i},function(e,t,n){functioni(e,t){varn=this;this.editor=e,this.timeout=void0,this.delay=200,this.lastText=void0,this.dom={},this.dom.container=t;vari=document.createElement("table");this.dom.table=i,i.className="jsoneditor-search",t.appendChild(i);varo=document.createElement("tbody");this.dom.tbody=o,i.appendChild(o);varr=document.createElement("tr");o.appendChild(r);vars=document.createElement("td");r.appendChild(s);vara=document.createElement("div");this.dom.results=a,a.className="jsoneditor-results",s.appendChild(a),s=document.createElement("td"),r.appendChild(s);varl=document.createElement("div");this.dom.input=l,l.className="jsoneditor-frame",l.title="Search fields and values",s.appendChild(l);varc=document.createElement("table");l.appendChild(c);vard=document.createElement("tbody");c.appendChild(d),r=document.createElement("tr"),d.appendChild(r);varh=document.createElement("button");h.className="jsoneditor-refresh",s=document.createElement("td"),s.appendChild(h),r.appendChild(s);varu=document.createElement("input");this.dom.search=u,u.oninput=function(e){n._onDelayedSearch(e)},u.onchange=function(e){n._onSearch()},u.onkeydown=function(e){n._onKeyDown(e)},u.onkeyup=function(e){n._onKeyUp(e)},h.onclick=function(e){u.select()},s=document.createElement("td"),s.appendChild(u),r.appendChild(s);varp=document.createElement("button");p.title="Next result (Enter)",p.className="jsoneditor-next",p.onclick=function(){n.next()},s=document.createElement("td"),s.appendChild(p),r.appendChild(s);varf=document.createElement("button");f.title="Previous result (Shift+Enter)",f.className="jsoneditor-previous",f.onclick=function(){n.previous()},s=document.createElement("td"),s.appendChild(f),r.appendChild(s)}i.prototype.next=function(e){if(void0!=this.results){vart=void0!=this.resultIndex?this.resultIndex+1:0;t>this.results.length-1&&(t=0),this._setActiveResult(t,e)}},i.prototype.previous=function(e){if(void0!=this.results){vart=this.results.length-1,n=void0!=this.resultIndex?this.resultIndex-1:t;0>n&&(n=t),this._setActiveResult(n,e)}},i.prototype._setActiveResult=function(e,t){if(this.activeResult){varn=this.activeResult.node,i=this.activeResult.elem;"field"==i?deleten.searchFieldActive:deleten.searchValueActive,n.updateDom()}if(!this.results||!this.results[e])returnthis.resultIndex=void0,void(this.activeResult=void0);this.resultIndex=e;varo=this.results[this.resultIndex].node,r=this.results[this.resultIndex].elem;"field"==r?o.searchFieldActive=!0:o.searchValueActive=!0,this.activeResult=this.results[this.resultIndex],o.updateDom(),o.scrollTo(function(){t&&o.focus(r)})},i.prototype._clearDelay=function(){void0!=this.timeout&&(clearTimeout(this.timeout),deletethis.timeout)},i.prototype._onDelayedSearch=function(e){this._clearDelay();vart=this;this.timeout=setTimeout(function(e){t._onSearch()},this.delay)},i.prototype._onSearch=function(e){this._clearDelay();vart=this.dom.search.value,n=t.length>0?t:void0;if(n!=this.lastText||e)if(this.lastText=n,this.results=this.editor.search(n),this._setActiveResult(void0),void0!=n){vari=this.results.length;switch(i){case0:this.dom.results.innerHTML="no results";break;case1:this.dom.results.innerHTML="1 result";break;default:this.dom.res