!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/dist/ajv.bundle.js"');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(4),o=n(5),r=n(6),s=n(7),a=n(8),l=n(9),c=n(3),d={
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.results.innerHTML=i+" results"}}elsethis.dom.results.innerHTML=""},i.prototype._onKeyDown=function(e){vart=e.which;27==t?(this.dom.search.value="",this._onSearch(),e.preventDefault(),e.stopPropagation()):13==t&&(e.ctrlKey?this._onSearch(!0):e.shiftKey?this.previous():this.next(),e.preventDefault(),e.stopPropagation())},i.prototype._onKeyUp=function(e){vart=e.keyCode;27!=t&&13!=t&&this._onDelayedSearch(e)},i.prototype.clear=function(){this.dom.search.value="",this._onSearch()},e.exports=i},function(e,t,n){functioni(e,t){functionn(e,t,o){o.forEach(function(o){if("separator"==o.type){varr=document.createElement("div");r.className="jsoneditor-separator",a=document.createElement("li"),a.appendChild(r),e.appendChild(a)}else{vars={},a=document.createElement("li");e.appendChild(a);varl=document.createElement("button");if(l.className=o.className,s.button=l,o.title&&(l.title=o.title),o.click&&(l.onclick=function(){i.hide(),o.click()}),a.appendChild(l),o.submenu){varc=document.createElement("div");c.className="jsoneditor-icon",l.appendChild(c),l.appendChild(document.createTextNode(o.text));vard;if(o.click){l.className+="jsoneditor-defaul