!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){"use strict";functioni(e,t,n){if(!(thisinstanceofi))thrownewError('JSONEditor constructor called without "new".');varo=c.getInternetExplorerVersion();if(-1!=o&&o<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===i.VALID_OPTIONS.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(e){}varr=n(1),s=n(5),a=n(6),l=n(28),c=n(12);"undefined"==typeofPromise&&console.error("Promise undefined. Please load a Promise polyfill in the browser in order to use JSONEditor"),i.modes={},i.prototype.DEBOUNCE_INTERVAL=150,i.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","mainMenuBar","languages","language","enableSort","enableTransform"],i.prototype._create=function(e,t,n){this.container=e,this.options=t||{},this.json=n||{};vari=this.options.mode||this.options.modes&&this.options.modes[0]||"tree";this.setMode(i)},i.prototype.destroy=function(){},i.prototype.set=function(e){this.json=e},i.prototype.get=function(){returnthis.json},i.prototype.setText=function(e){this.json=c.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){if(e!==this.options.mode||!this.create){vart,n,o=this.container,r=c.extend({},this.options),s=r.mode;r.mode=e;vara=i.modes[e];if(!a)thrownewError('Unknown mode "'+r.mode+'"');try{varl="text"==a.data;if(n=this.getName(),t=this[l?"getText":"get"](),this.destroy(),c.clear(this),c.extend(this,a.mixin),this.create(o,r),this.setName(n),this[l?"setText":"set"](t),"function"==typeofa.load)try{a.load.call(this)}catch(e){console.error(e)}if("function"==typeofr.onModeChange&&e!==s)try{r.onModeChange(e,s)}catch(e){console.error(e)}}catch(e){this._onError(e)}}},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,t){if(e){varn;try{n=this.options.ajv||o({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(n){if(t){for(variint)n.removeSchema(i),t[i]&&n.addSchema(t[i],i);this.options.schemaRefs=t}this.validateSchema=n.compile(e),t
wholeWord:this.wholeWordOption.checked}),t=!e&&this.searchInput.value;i.setCssClass(this.searchBox,"ace_nomatch",t),this.editor._emit("findSearchBox",{match:!t}),this.highlight(),this.hide()},this.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},this.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},this.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},this.hide=function(){this.active=!1,this.setSearchRange(null),this.editor.off("changeSession",this.setSession),this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},this.show=function(e,t){this.active=!0,this.editor.on("changeSession",this.setSession),this.element.style.display="",this.replaceOption.checked=t,e&&(this.searchInput.value=e),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},this.isFocused=function(){vare=document.activeElement;returne==this.searchInput||e==this.replaceInput}}).call(c.prototype),t.SearchBox=c,t.Search=function(e,t){(e.searchBox||newc(e)).show(e.session.getTextRange(),t)}}),function(){ace.acequire(["ace/ext/searchbox"],function(){})}()},function(e,t,n){vari;if(window.Picker)i=window.Picker;elsetry{i=n(!function(){vare=newError('Cannot find module "vanilla-picker/dist/vanilla-picker"');throwe.code="MODULE_NOT_FOUND",e}())}catch(e){}e.exports=i},function(e,t,n){"use strict";vari=n(5),o=n(7),r=n(8),s=n(9),a=n(10),l=n(16),c=n(17),h=n(26),d=n(12),u=n(27),p=n(22),f=n(24),m=n(15).translate,g=n(15).setLanguages,v=n(15).setLanguage,y=document.body,b={};b.create=function(e,t){if(!e)thrownewError("No container element provided.");this.container=e,this.dom={},this.highlighter=newo,this.selection=void0,this.multiselection={nodes:[]},this.validateSchema=null,this.validationSequence=0,this.errorNodes=[],this.node=null,this.focusTarget=null,this._setOptions(t),t.autocomplete&&(this.autocomplete=newu(t.autocomplete)),this.options.history&&"view"!==this.options.mode&&(this.history=newr(this)),this._createFrame(),this._createTable()},b.destroy=function(){this.frame&&this.container&&this.frame.parentNode==this.container&&(this.container.removeChild(this.frame),this.frame=null),this.container=null,this.dom=null,this.clear(),this.node=null,this.focusTarget=null,this.selection=null,this.multiselection=null,this.errorNodes=null,this.validateSchema=null,this._debouncedValidate=null,this.history&&(this.history.destroy(),this.history=null),this.searchBox&&(this.searchBox.destroy(),this.searchBox=null),this.modeSwitcher&&(this.modeSwitcher.destroy(),this.modeSwitcher=null)},b._setOptions=function(e){if(this.options={search:!0,history:!0,mode:"tree",name:void0,schema:null,schemaRefs:null,autocomplete:null,navigationBar:!0,mainMenuBar:!0,onSelectionChange:null,colorPicker:!0,onColorPicker:function(e,t,n){i?newi({parent:e,color:t,popup:"bottom",onDone:function(e){vart=e.rgba[3],i=1===t?e.hex.substr(0,7):e.hex;n(i)}}).show():console.warn("Cannot open color picker: the `vanilla-picker` library is not included in the bundle. Either use the full bundle or implement your own color picker using `onColorPicker`.")},timestampTag:!0,onEvent:null,enableSort:!0,enableTransform:!0},e)for(vartine)e.hasOwnProperty(t)&&(this.options[t]=e[t]);this.setSchema(this.options.schema,this.options.schemaRefs),this._debouncedValidate=d.debounce(this.validate.bind(this),this.DEBOUNCE_INTERVAL),e.onSelectionChange&&this.onSelectionChange(e.onSelectionChange),g(this.options.languages),v(this.options.language)},b.set=function(e){if(einstanceofFunction||void0===e)this.clear();else{this.content.removeChild(this.table);vart={field:this.options.name,value:e},n=newc(this,t);this._setRoot(n),this.validate();this.node.expand(!1),this.content.appendChild(this.table)}this.history&&this.history.clear(),this.searchBox&&this.searchBox.clear()},b.update=function(e){if(!thi
objectType:'Campo do tipo "objeto". Um objeto contém uma lista de pares com chave e valor.',arrayType:'Campo do tipo "lista". Uma lista contem uma coleção de valores ordenados.',stringType:'Campo do tipo "string". Campo do tipo nao é determinado através do seu valor, mas sempre retornara um texto.'}},r="undefined"!=typeofnavigator?navigator.language||navigator.userLanguage:void0;n=i.find(function(e){returne===r}),n||(n="en"),e.exports={_locales:i,_defs:o,_lang:n,setLanguage:function(e){if(e){vart=i.find(function(t){returnt===e});t?n=t:console.error("Language not found")}},setLanguages:function(e){if(e)for(vartine){varn=i.find(function(e){returne===t});n||i.push(t),o[t]=Object.assign({},o.en,o[t],e[t])}},translate:function(e,t,i){i||(i=n);varr=o[i][e];if(t)for(eint)r=r.replace("${"+e+"}",t[e]);returnr||e}}},function(e,t,n){"use strict";functioni(e,t){e&&(this.root=t,this.path=document.createElement("div"),this.path.className="jsoneditor-treepath",e.appendChild(this.path),this.reset())}varo=n(10),r=n(15).translate;i.prototype.reset=function(){this.path.innerHTML=r("selectNode")},i.prototype.setPath=function(e){functiont(e){this.selectionCallback&&this.selectionCallback(e)}functionn(e,t){this.contextMenuCallback&&this.contextMenuCallback(e,t)}vari=this;this.path.innerHTML="",e&&e.length&&e.forEach(function(r,s){vara,l=document.createElement("span");if(l.className="jsoneditor-treepath-element",l.innerText=r.name,l.onclick=t.bind(i,r),i.path.appendChild(l),r.children.length&&(a=document.createElement("span"),a.className="jsoneditor-treepath-seperator",a.innerHTML="►",a.onclick=function(){vart=[];r.children.forEach(function(o){t.push({text:o.name,className:"jsoneditor-type-modes"+(e[s+1]+1&&e[s+1].name===o.name?" jsoneditor-selected":""),click:n.bind(i,r,o.name)})}),newo(t).show(a,i.root)},i.path.appendChild(a)),s===e.length-1){varc=(a||l).getBoundingClientRect().left;i.path.offsetWidth<c&&(i.path.scrollLeft=c)}})},i.prototype.onSectionSelected=function(e){"function"==typeofe&&(this.selectionCallback=e)},i.prototype.onContextMenuItemSelected=function(e){"function"==typeofe&&(this.contextMenuCallback=e)},e.exports=i},function(e,t,n){"use strict";functioni(e,t){this.editor=e,this.dom={},this.expanded=!1,t&&tinstanceofObject?(this.setField(t.field,t.fieldEditable),"value"int&&this.setValue(t.value,t.type),"internalValue"int&&this.setInternalValue(t.internalValue)):(this.setField(""),this.setValue(null)),this._debouncedOnChangeValue=f.debounce(this._onChangeValue.bind(this),i.prototype.DEBOUNCE_INTERVAL),this._debouncedOnChangeField=f.debounce(this._onChangeField.bind(this),i.prototype.DEBOUNCE_INTERVAL)}functiono(e){returne.getInternalPath()}functionr(e){returne.getField()}vars=n(18),a=n(19),l=n(11).createAbsoluteAnchor,c=n(10),h=n(20),d=n(21),u=n(22),p=n(24),f=n(12),m=n(15).translate,g=document.body;i.prototype.DEBOUNCE_INTERVAL=150,i.prototype.MAX_SEARCH_RESULTS=999,i.prototype.MAX_VISIBLE_CHILDS=100,i.prototype.visibleChilds=i.prototype.MAX_VISIBLE_CHILDS,i.prototype._updateEditability=function(){if(this.editable={field:!0,value:!0},this.editor&&(this.editable.field="tree"===this.editor.options.mode,this.editable.value="view"!==this.editor.options.mode,("tree"===this.editor.options.mode||"form"===this.editor.options.mode)&&"function"==typeofthis.editor.options.onEditable)){vare=this.editor.options.onEditable({field:this.field,value:this.value,path:this.getPath()});"boolean"==typeofe?(this.editable.field=e,this.editable.value=e):("boolean"==typeofe.field&&(this.editable.field=e.field),"boolean"==typeofe.value&&(this.editable.value=e.value))}},i.prototype.getPath=function(){for(vare=this,t=[];e;){varn=e.getName();void0!==n&&t.unshift(n),e=e.parent}returnt},i.prototype.getInternalPath=function(){for(vare=this,t=[];e;)e.parent&&t.unshift(e.getIndex()),e=e.parent;returnt},i.prototype.getName=function(){returnthis.parent?"array"!=this.parent.type?this.field:this.index:void0},i.prototype.findNodeByPath=function(e){if(e){if(0==e.length)returnthis;if(e.length&&this.childs&&th
void(this.elementHint.innerText.length>0&&this.element.innerText!=this.elementHint.realInnerText&&(this.element.innerText=this.elementHint.realInnerText,c.hideDropDown(),t(this.element),9==i&&(c.element.focus(),n.preventDefault(),n.stopPropagation())));if(13!=i){if(40==i){varr=o.substring(this.startFrom),a=h.move(1);return""==a&&c.onArrowDown(),this.elementHint.innerText=l+r+a.substring(r.length),this.elementHint.realInnerText=l+a,n.preventDefault(),voidn.stopPropagation()}if(38==i){varr=o.substring(this.startFrom),a=h.move(-1);return""==a&&c.onArrowUp(),this.elementHint.innerText=l+r+a.substring(r.length),this.elementHint.realInnerText=l+a,n.preventDefault(),voidn.stopPropagation()}}elseif(0==this.elementHint.innerText.length)c.onEnter();else{vard="hidden"==s.style.visibility;if(h.hide(),d)returnc.hideDropDown(),c.element.focus(),voidc.onEnter();this.element.innerText=this.elementHint.realInnerText,c.hideDropDown(),t(this.element),n.preventDefault(),n.stopPropagation()}}}.bind(c),u=function(e){c.hideDropDown()}.bind(c);returnh.onmouseselection=function(e,n){n.element.innerText=n.elementHint.innerText=l+e,n.hideDropDown(),window.setTimeout(function(){n.element.focus(),t(n.element)},1)},c}e.exports=n},function(e,t,n){"use strict";functioni(){try{this.format()}catch(e){}}varo=n(1),r=n(26),s=n(12),a={};a.create=function(e,t){t=t||{},void0===t.statusBar&&(t.statusBar=!0),t.mainMenuBar=!1!==t.mainMenuBar,this.options=t,t.indentation?this.indentation=Number(t.indentation):this.indentation=2;vari=t.ace?t.ace:o;if(this.mode="code"==t.mode?"code":"text","code"==this.mode&&void0===i&&(this.mode="text",console.warn("Failed to load Ace editor, falling back to plain text mode. Please use a JSONEditor bundle including Ace, or pass Ace as via the configuration option `ace`.")),this.theme=t.theme||"ace/theme/jsoneditor","ace/theme/jsoneditor"===this.theme&&i)try{n(29)}catch(e){console.error(e)}t.onTextSelectionChange&&this.onTextSelectionChange(t.onTextSelectionChange);vara=this;if(this.container=e,this.dom={},this.aceEditor=void0,this.textarea=void0,this.validateSchema=null,this.validationSequence=0,this.annotations=[],this._debouncedValidate=s.debounce(this.validate.bind(this),this.DEBOUNCE_INTERVAL),this.width=e.clientWidth,this.height=e.clientHeight,this.frame=document.createElement("div"),this.frame.className="jsoneditor jsoneditor-mode-"+this.options.mode,this.frame.onclick=function(e){e.preventDefault()},this.frame.onkeydown=function(e){a._onKeyDown(e)},this.content=document.createElement("div"),this.content.className="jsoneditor-outer",this.options.mainMenuBar){s.addClassName(this.content,"has-main-menu-bar"),this.menu=document.createElement("div"),this.menu.className="jsoneditor-menu",this.frame.appendChild(this.menu);varl=document.createElement("button");l.type="button",l.className="jsoneditor-format",l.title="Format JSON data, with proper indentation and line feeds (Ctrl+\\)",this.menu.appendChild(l),l.onclick=function(){try{a.format(),a._onChange()}catch(e){a._onError(e)}};varc=document.createElement("button");c.type="button",c.className="jsoneditor-compact",c.title="Compact JSON data, remove all whitespaces (Ctrl+Shift+\\)",this.menu.appendChild(c),c.onclick=function(){try{a.compact(),a._onChange()}catch(e){a._onError(e)}};varh=document.createElement("button");if(h.type="button",h.className="jsoneditor-repair",h.title="Repair JSON: fix quotes and escape characters, remove comments and JSONP notation, turn JavaScript objects into JSON.",this.menu.appendChild(h),h.onclick=function(){try{a.repair(),a._onChange()}catch(e){a._onError(e)}},this.options&&this.options.modes&&this.options.modes.length&&(this.modeSwitcher=newr(this.menu,this.options.modes,this.options.mode,function(e){a.setMode(e),a.modeSwitcher.focus()})),"code"==this.mode){vard=document.createElement("a");d.appendChild(document.createTextNode("powered by ace")),d.href="http://ace.ajax.org",d.target="_blank",d.className="jsoneditor-poweredBy",d.onclick=function(){window.open(d.href,d.target)},this.menu.appendChild(d)}}varu={},p=this.options.o