{ "version": 3, "file": "jsoneditor.js", "sources": [ "src/intro.js", "src/class.js", "src/ie9.js", "src/utilities.js", "src/core.js", "src/validator.js", "src/editor.js", "src/editors/null.js", "src/editors/string.js", "src/editors/number.js", "src/editors/integer.js", "src/editors/object.js", "src/editors/array.js", "src/editors/table.js", "src/editors/multiple.js", "src/editors/enum.js", "src/editors/select.js", "src/editors/multiselect.js", "src/editors/base64.js", "src/editors/upload.js", "src/editors/checkbox.js", "src/theme.js", "src/themes/bootstrap2.js", "src/themes/bootstrap3.js", "src/themes/foundation.js", "src/themes/html.js", "src/themes/jqueryui.js", "src/iconlib.js", "src/iconlibs/bootstrap2.js", "src/iconlibs/bootstrap3.js", "src/iconlibs/fontawesome3.js", "src/iconlibs/fontawesome4.js", "src/iconlibs/foundation2.js", "src/iconlibs/foundation3.js", "src/iconlibs/jqueryui.js", "src/templates/default.js", "src/templates/ejs.js", "src/templates/handlebars.js", "src/templates/hogan.js", "src/templates/markup.js", "src/templates/mustache.js", "src/templates/swig.js", "src/templates/underscore.js", "src/defaults.js", "src/jquery.js", "src/outro.js" ], "names": [], "mappings": "AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,K;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC/FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AChkBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACthBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACxbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC9bA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACt2BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC3rBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACxcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACzRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACrIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AChUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACpMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC5FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACrIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACjVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACnLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACvKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC9NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACjFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC3JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACdA;AACA;AACA;A;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACVA;AACA;AACA;A;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC3PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC/DA;AACA;A", "sourcesContent": [ "/*! JSON Editor v0.7.20 - JSON Schema -> HTML Editor\n * By Jeremy Dorn - https://github.com/jdorn/json-editor/\n * Released under the MIT license\n *\n * Date: 2015-06-08\n */\n\n/**\n * See README.md for requirements and usage info\n */\n\n(function() {\n", "/*jshint loopfunc: true */\n/* Simple JavaScript Inheritance\n * By John Resig http://ejohn.org/\n * MIT Licensed.\n */\n// Inspired by base2 and Prototype\nvar Class;\n(function(){\n var initializing = false, fnTest = /xyz/.test(function(){window.postMessage(\"xyz\");}) ? /\\b_super\\b/ : /.*/;\n \n // The base Class implementation (does nothing)\n Class = function(){};\n \n // Create a new Class that inherits from this class\n Class.extend = function(prop) {\n var _super = this.prototype;\n \n // Instantiate a base class (but only create the instance,\n // don't run the init constructor)\n initializing = true;\n var prototype = new this();\n initializing = false;\n \n // Copy the properties over onto the new prototype\n for (var name in prop) {\n // Check if we're overwriting an existing function\n prototype[name] = typeof prop[name] == \"function\" &&\n typeof _super[name] == \"function\" && fnTest.test(prop[name]) ?\n (function(name, fn){\n return function() {\n var tmp = this._super;\n \n // Add a new ._super() method that is the same method\n // but on the super-class\n this._super = _super[name];\n \n // The method only need to be bound temporarily, so we\n // remove it when we're done executing\n var ret = fn.apply(this, arguments); \n this._super = tmp;\n \n return ret;\n };\n })(name, prop[name]) :\n prop[name];\n }\n \n // The dummy class constructor\n function Class() {\n // All construction is actually done in the init method\n if ( !initializing && this.init )\n this.init.apply(this, arguments);\n }\n \n // Populate our constructed prototype object\n Class.prototype = prototype;\n \n // Enforce the constructor to be what we expect\n Class.prototype.constructor = Class;\n \n // And make this class extendable\n Class.extend = arguments.callee;\n \n return Class;\n };\n \n return Class;\n})();\n", "// CustomEvent constructor polyfill\n// From MDN\n(function () {\n function CustomEvent ( event, params ) {\n params = params || { bubbles: false, cancelable: false, detail: undefined };\n var evt = document.createEvent( 'CustomEvent' );\n evt.initCustomEvent( event, params.bubbles, params.cancelable, params.detail );\n return evt;\n }\n\n CustomEvent.prototype = window.Event.prototype;\n\n window.CustomEvent = CustomEvent;\n})();\n\n// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel\n// MIT license\n(function() {\n var lastTime = 0;\n var vendors = ['ms', 'moz', 'webkit', 'o'];\n for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {\n window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame'];\n window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame'] || \n window[vendors[x]+'CancelRequestAnimationFrame'];\n }\n \n if (!window.requestAnimationFrame)\n window.requestAnimationFrame = function(callback, element) {\n var currTime = new Date().getTime();\n var timeToCall = Math.max(0, 16 - (currTime - lastTime));\n var id = window.setTimeout(function() { callback(currTime + timeToCall); }, \n timeToCall);\n lastTime = currTime + timeToCall;\n return id;\n };\n \n if (!window.cancelAnimationFrame)\n window.cancelAnimationFrame = function(id) {\n clearTimeout(id);\n };\n}());\n\n// Array.isArray polyfill\n// From MDN\n(function() {\n\tif(!Array.isArray) {\n\t Array.isArray = function(arg) {\n\t\treturn Object.prototype.toString.call(arg) === '[object Array]';\n\t };\n\t}\n}());", "/**\n * Taken from jQuery 1\n *\n * @param obj\n * @returns {*}\n */\nvar $isplainobject = function( obj ) {\n var key;\n\n // Must be an Object.\n // Because of IE, we also have to check the presence of the constructor property.\n // Make sure that DOM nodes and window objects don't pass through, as well\n if ( !obj || typeof obj !== \"object\" || obj.nodeType || obj === window ) {\n return false;\n }\n\n // Not own constructor property must be Object\n if (obj.constructor &&\n !obj.hasOwnProperty('constructor') &&\n !obj.constructor.prototype.hasOwnProperty('isPrototypeOf')) {\n return false;\n }\n\n try {\n // Not own constructor property must be Object\n if ( obj.constructor &&\n !obj.hasOwnProperty(\"constructor\") &&\n !obj.constructor.prototype.hasOwnProperty('isPrototypeOf') ) {\n return false;\n }\n } catch ( e ) {\n // IE8,9 Will throw exceptions on certain host objects #9897\n return false;\n }\n\n // Support: IE<9\n // Handle iteration over inherited properties before own properties.\n if ( /msie 8\\.0/i.test( window.navigator.userAgent ) ) {\n for ( key in obj ) {\n return obj.hasOwnProperty(key);\n }\n }\n\n // Own properties are enumerated firstly, so to speed up,\n // if last one is own, then all properties are own.\n for ( key in obj ) {}\n return key === undefined || obj.hasOwnProperty(key);\n};\n\nvar $extend = function(destination) {\n var source, i,property;\n for(i=1; i 0 && (obj.length - 1) in obj)) {\n for(i=0; i= waiting && !callback_fired) {\n callback_fired = true;\n callback();\n }\n });\n }\n // Request failed\n else {\n window.console.log(r);\n throw \"Failed to fetch ref via ajax- \"+url;\n }\n };\n r.send();\n });\n \n if(!waiting) {\n callback();\n }\n },\n expandRefs: function(schema) {\n schema = $extend({},schema);\n \n while (schema.$ref) {\n var ref = schema.$ref;\n delete schema.$ref;\n \n if(!this.refs[ref]) ref = decodeURIComponent(ref);\n \n schema = this.extendSchemas(schema,this.refs[ref]);\n }\n return schema;\n },\n expandSchema: function(schema) {\n var self = this;\n var extended = $extend({},schema);\n var i;\n\n // Version 3 `type`\n if(typeof schema.type === 'object') {\n // Array of types\n if(Array.isArray(schema.type)) {\n $each(schema.type, function(key,value) {\n // Schema\n if(typeof value === 'object') {\n schema.type[key] = self.expandSchema(value);\n }\n });\n }\n // Schema\n else {\n schema.type = self.expandSchema(schema.type);\n }\n }\n // Version 3 `disallow`\n if(typeof schema.disallow === 'object') {\n // Array of types\n if(Array.isArray(schema.disallow)) {\n $each(schema.disallow, function(key,value) {\n // Schema\n if(typeof value === 'object') {\n schema.disallow[key] = self.expandSchema(value);\n }\n });\n }\n // Schema\n else {\n schema.disallow = self.expandSchema(schema.disallow);\n }\n }\n // Version 4 `anyOf`\n if(schema.anyOf) {\n $each(schema.anyOf, function(key,value) {\n schema.anyOf[key] = self.expandSchema(value);\n });\n }\n // Version 4 `dependencies` (schema dependencies)\n if(schema.dependencies) {\n $each(schema.dependencies,function(key,value) {\n if(typeof value === \"object\" && !(Array.isArray(value))) {\n schema.dependencies[key] = self.expandSchema(value);\n }\n });\n }\n // Version 4 `not`\n if(schema.not) {\n schema.not = this.expandSchema(schema.not);\n }\n \n // allOf schemas should be merged into the parent\n if(schema.allOf) {\n for(i=0; i= schema.maximum) {\n errors.push({\n path: path,\n property: 'maximum',\n message: this.translate('error_maximum_excl', [schema.maximum])\n });\n }\n else if(!schema.exclusiveMaximum && value > schema.maximum) {\n errors.push({\n path: path,\n property: 'maximum',\n message: this.translate('error_maximum_incl', [schema.maximum])\n });\n }\n }\n\n // `minimum`\n if(schema.hasOwnProperty('minimum')) {\n if(schema.exclusiveMinimum && value <= schema.minimum) {\n errors.push({\n path: path,\n property: 'minimum',\n message: this.translate('error_minimum_excl', [schema.minimum])\n });\n }\n else if(!schema.exclusiveMinimum && value < schema.minimum) {\n errors.push({\n path: path,\n property: 'minimum',\n message: this.translate('error_minimum_incl', [schema.minimum])\n });\n }\n }\n }\n // String specific validation\n else if(typeof value === \"string\") {\n // `maxLength`\n if(schema.maxLength) {\n if((value+\"\").length > schema.maxLength) {\n errors.push({\n path: path,\n property: 'maxLength',\n message: this.translate('error_maxLength', [schema.maxLength])\n });\n }\n }\n\n // `minLength`\n if(schema.minLength) {\n if((value+\"\").length < schema.minLength) { \n errors.push({\n path: path,\n property: 'minLength',\n message: this.translate((schema.minLength===1?'error_notempty':'error_minLength'), [schema.minLength])\n });\n }\n }\n\n // `pattern`\n if(schema.pattern) {\n if(!(new RegExp(schema.pattern)).test(value)) {\n errors.push({\n path: path,\n property: 'pattern',\n message: this.translate('error_pattern')\n });\n }\n }\n }\n // Array specific validation\n else if(typeof value === \"object\" && value !== null && Array.isArray(value)) {\n // `items` and `additionalItems`\n if(schema.items) {\n // `items` is an array\n if(Array.isArray(schema.items)) {\n for(i=0; i schema.maxItems) {\n errors.push({\n path: path,\n property: 'maxItems',\n message: this.translate('error_maxItems', [schema.maxItems])\n });\n }\n }\n\n // `minItems`\n if(schema.minItems) {\n if(value.length < schema.minItems) {\n errors.push({\n path: path,\n property: 'minItems',\n message: this.translate('error_minItems', [schema.minItems])\n });\n }\n }\n\n // `uniqueItems`\n if(schema.uniqueItems) {\n var seen = {};\n for(i=0; i schema.maxProperties) {\n errors.push({\n path: path,\n property: 'maxProperties',\n message: this.translate('error_maxProperties', [schema.maxProperties])\n });\n }\n }\n\n // `minProperties`\n if(schema.minProperties) {\n valid = 0;\n for(i in value) {\n if(!value.hasOwnProperty(i)) continue;\n valid++;\n }\n if(valid < schema.minProperties) {\n errors.push({\n path: path,\n property: 'minProperties',\n message: this.translate('error_minProperties', [schema.minProperties])\n });\n }\n }\n\n // Version 4 `required`\n if(schema.required && Array.isArray(schema.required)) {\n for(i=0; i=0) {\n holder = this.theme.getBlockLinkHolder();\n \n link = this.theme.getBlockLink();\n link.setAttribute('target','_blank');\n \n var media = document.createElement(type);\n media.setAttribute('controls','controls');\n \n this.theme.createMediaLink(holder,link,media);\n \n // When a watched field changes, update the url \n this.link_watchers.push(function(vars) {\n var url = href(vars);\n link.setAttribute('href',url);\n link.textContent = data.rel || url;\n media.setAttribute('src',url);\n });\n }\n // Text links\n else {\n holder = this.theme.getBlockLink();\n holder.setAttribute('target','_blank');\n holder.textContent = data.rel;\n \n // When a watched field changes, update the url \n this.link_watchers.push(function(vars) {\n var url = href(vars);\n holder.setAttribute('href',url);\n holder.textContent = data.rel || url;\n });\n }\n \n return holder;\n },\n refreshWatchedFieldValues: function() {\n if(!this.watched_values) return;\n var watched = {};\n var changed = false;\n var self = this;\n \n if(this.watched) {\n var val,editor;\n for(var name in this.watched) {\n if(!this.watched.hasOwnProperty(name)) continue;\n editor = self.jsoneditor.getEditor(this.watched[name]);\n val = editor? editor.getValue() : null;\n if(self.watched_values[name] !== val) changed = true;\n watched[name] = val;\n }\n }\n \n watched.self = this.getValue();\n if(this.watched_values.self !== watched.self) changed = true;\n \n this.watched_values = watched;\n \n return changed;\n },\n getWatchedFieldValues: function() {\n return this.watched_values;\n },\n updateHeaderText: function() {\n if(this.header) {\n // If the header has children, only update the text node's value\n if(this.header.children.length) {\n for(var i=0; i 1) disp[i] = name + \" \" + inc[name];\n });\n \n return disp;\n },\n getOption: function(key) {\n try {\n throw \"getOption is deprecated\";\n }\n catch(e) {\n window.console.error(e);\n }\n \n return this.options[key];\n },\n showValidationErrors: function(errors) {\n\n }\n});\n", "JSONEditor.defaults.editors[\"null\"] = JSONEditor.AbstractEditor.extend({\n getValue: function() {\n return null;\n },\n setValue: function() {\n this.onChange();\n },\n getNumColumns: function() {\n return 2;\n }\n});\n", "JSONEditor.defaults.editors.string = JSONEditor.AbstractEditor.extend({\n register: function() {\n this._super();\n if(!this.input) return;\n this.input.setAttribute('name',this.formname);\n },\n unregister: function() {\n this._super();\n if(!this.input) return;\n this.input.removeAttribute('name');\n },\n setValue: function(value,initial,from_template) {\n var self = this;\n \n if(this.template && !from_template) {\n return;\n }\n \n if(value === null) value = \"\";\n else if(typeof value === \"object\") value = JSON.stringify(value);\n else if(typeof value !== \"string\") value = \"\"+value;\n \n if(value === this.serialized) return;\n\n // Sanitize value before setting it\n var sanitized = this.sanitize(value);\n\n if(this.input.value === sanitized) {\n return;\n }\n\n this.input.value = sanitized;\n \n // If using SCEditor, update the WYSIWYG\n if(this.sceditor_instance) {\n this.sceditor_instance.val(sanitized);\n }\n else if(this.epiceditor) {\n this.epiceditor.importFile(null,sanitized);\n }\n else if(this.ace_editor) {\n this.ace_editor.setValue(sanitized);\n }\n \n var changed = from_template || this.getValue() !== value;\n \n this.refreshValue();\n \n if(initial) this.is_dirty = false;\n else if(this.jsoneditor.options.show_errors === \"change\") this.is_dirty = true;\n \n if(this.adjust_height) this.adjust_height(this.input);\n\n // Bubble this setValue to parents if the value changed\n this.onChange(changed);\n },\n getNumColumns: function() {\n var min = Math.ceil(Math.max(this.getTitle().length,this.schema.maxLength||0,this.schema.minLength||0)/5);\n var num;\n \n if(this.input_type === 'textarea') num = 6;\n else if(['text','email'].indexOf(this.input_type) >= 0) num = 4;\n else num = 2;\n \n return Math.min(12,Math.max(min,num));\n },\n build: function() {\n var self = this, i;\n if(!this.options.compact) this.header = this.label = this.theme.getFormInputLabel(this.getTitle());\n if(this.schema.description) this.description = this.theme.getFormInputDescription(this.schema.description);\n\n this.format = this.schema.format;\n if(!this.format && this.schema.media && this.schema.media.type) {\n this.format = this.schema.media.type.replace(/(^(application|text)\\/(x-)?(script\\.)?)|(-source$)/g,'');\n }\n if(!this.format && this.options.default_format) {\n this.format = this.options.default_format;\n }\n if(this.options.format) {\n this.format = this.options.format;\n }\n\n // Specific format\n if(this.format) {\n // Text Area\n if(this.format === 'textarea') {\n this.input_type = 'textarea';\n this.input = this.theme.getTextareaInput();\n }\n // Range Input\n else if(this.format === 'range') {\n this.input_type = 'range';\n var min = this.schema.minimum || 0;\n var max = this.schema.maximum || Math.max(100,min+1);\n var step = 1;\n if(this.schema.multipleOf) {\n if(min%this.schema.multipleOf) min = Math.ceil(min/this.schema.multipleOf)*this.schema.multipleOf;\n if(max%this.schema.multipleOf) max = Math.floor(max/this.schema.multipleOf)*this.schema.multipleOf;\n step = this.schema.multipleOf;\n }\n\n this.input = this.theme.getRangeInput(min,max,step);\n }\n // Source Code\n else if([\n 'actionscript',\n 'batchfile',\n 'bbcode',\n 'c',\n 'c++',\n 'cpp',\n 'coffee',\n 'csharp',\n 'css',\n 'dart',\n 'django',\n 'ejs',\n 'erlang',\n 'golang',\n 'handlebars',\n 'haskell',\n 'haxe',\n 'html',\n 'ini',\n 'jade',\n 'java',\n 'javascript',\n 'json',\n 'less',\n 'lisp',\n 'lua',\n 'makefile',\n 'markdown',\n 'matlab',\n 'mysql',\n 'objectivec',\n 'pascal',\n 'perl',\n 'pgsql',\n 'php',\n 'python',\n 'r',\n 'ruby',\n 'sass',\n 'scala',\n 'scss',\n 'smarty',\n 'sql',\n 'stylus',\n 'svg',\n 'twig',\n 'vbscript',\n 'xml',\n 'yaml'\n ].indexOf(this.format) >= 0\n ) {\n this.input_type = this.format;\n this.source_code = true;\n \n this.input = this.theme.getTextareaInput();\n }\n // HTML5 Input type\n else {\n this.input_type = this.format;\n this.input = this.theme.getFormInputField(this.input_type);\n }\n }\n // Normal text input\n else {\n this.input_type = 'text';\n this.input = this.theme.getFormInputField(this.input_type);\n }\n \n // minLength, maxLength, and pattern\n if(typeof this.schema.maxLength !== \"undefined\") this.input.setAttribute('maxlength',this.schema.maxLength);\n if(typeof this.schema.pattern !== \"undefined\") this.input.setAttribute('pattern',this.schema.pattern);\n else if(typeof this.schema.minLength !== \"undefined\") this.input.setAttribute('pattern','.{'+this.schema.minLength+',}');\n\n if(this.options.compact) {\n this.container.className += ' compact';\n }\n else {\n if(this.options.input_width) this.input.style.width = this.options.input_width;\n }\n\n if(this.schema.readOnly || this.schema.readonly || this.schema.template) {\n this.always_disabled = true;\n this.input.disabled = true;\n }\n\n this.input\n .addEventListener('change',function(e) { \n e.preventDefault();\n e.stopPropagation();\n \n // Don't allow changing if this field is a template\n if(self.schema.template) {\n this.value = self.value;\n return;\n }\n\n var val = this.value;\n \n // sanitize value\n var sanitized = self.sanitize(val);\n if(val !== sanitized) {\n this.value = sanitized;\n }\n \n self.is_dirty = true;\n\n self.refreshValue();\n self.onChange(true);\n });\n \n if(this.options.input_height) this.input.style.height = this.options.input_height;\n if(this.options.expand_height) {\n this.adjust_height = function(el) {\n if(!el) return;\n var i, ch=el.offsetHeight;\n // Input too short\n if(el.offsetHeight < el.scrollHeight) {\n i=0;\n while(el.offsetHeight < el.scrollHeight+3) {\n if(i>100) break;\n i++;\n ch++;\n el.style.height = ch+'px';\n }\n }\n else {\n i=0;\n while(el.offsetHeight >= el.scrollHeight+3) {\n if(i>100) break;\n i++;\n ch--;\n el.style.height = ch+'px';\n }\n el.style.height = (ch+1)+'px';\n }\n };\n \n this.input.addEventListener('keyup',function(e) {\n self.adjust_height(this);\n });\n this.input.addEventListener('change',function(e) {\n self.adjust_height(this);\n });\n this.adjust_height();\n }\n\n if(this.format) this.input.setAttribute('data-schemaformat',this.format);\n\n this.control = this.theme.getFormControl(this.label, this.input, this.description);\n this.container.appendChild(this.control);\n\n // Any special formatting that needs to happen after the input is added to the dom\n window.requestAnimationFrame(function() {\n // Skip in case the input is only a temporary editor,\n // otherwise, in the case of an ace_editor creation,\n // it will generate an error trying to append it to the missing parentNode\n if(self.input.parentNode) self.afterInputReady();\n if(self.adjust_height) self.adjust_height(self.input);\n });\n\n // Compile and store the template\n if(this.schema.template) {\n this.template = this.jsoneditor.compileTemplate(this.schema.template, this.template_engine);\n this.refreshValue();\n }\n else {\n this.refreshValue();\n }\n },\n enable: function() {\n if(!this.always_disabled) {\n this.input.disabled = false;\n // TODO: WYSIWYG and Markdown editors\n }\n this._super();\n },\n disable: function() {\n this.input.disabled = true;\n // TODO: WYSIWYG and Markdown editors\n this._super();\n },\n afterInputReady: function() {\n var self = this, options;\n \n // Code editor\n if(this.source_code) { \n // WYSIWYG html and bbcode editor\n if(this.options.wysiwyg && \n ['html','bbcode'].indexOf(this.input_type) >= 0 && \n window.jQuery && window.jQuery.fn && window.jQuery.fn.sceditor\n ) {\n options = $extend({},{\n plugins: self.input_type==='html'? 'xhtml' : 'bbcode',\n emoticonsEnabled: false,\n width: '100%',\n height: 300\n },JSONEditor.plugins.sceditor,self.options.sceditor_options||{});\n \n window.jQuery(self.input).sceditor(options);\n \n self.sceditor_instance = window.jQuery(self.input).sceditor('instance');\n \n self.sceditor_instance.blur(function() {\n // Get editor's value\n var val = window.jQuery(\"
\"+self.sceditor_instance.val()+\"
\");\n // Remove sceditor spans/divs\n window.jQuery('#sceditor-start-marker,#sceditor-end-marker,.sceditor-nlf',val).remove();\n // Set the value and update\n self.input.value = val.html();\n self.value = self.input.value;\n self.is_dirty = true;\n self.onChange(true);\n });\n }\n // EpicEditor for markdown (if it's loaded)\n else if (this.input_type === 'markdown' && window.EpicEditor) {\n this.epiceditor_container = document.createElement('div');\n this.input.parentNode.insertBefore(this.epiceditor_container,this.input);\n this.input.style.display = 'none';\n \n options = $extend({},JSONEditor.plugins.epiceditor,{\n container: this.epiceditor_container,\n clientSideStorage: false\n });\n \n this.epiceditor = new window.EpicEditor(options).load();\n \n this.epiceditor.importFile(null,this.getValue());\n \n this.epiceditor.on('update',function() {\n var val = self.epiceditor.exportFile();\n self.input.value = val;\n self.value = val;\n self.is_dirty = true;\n self.onChange(true);\n });\n }\n // ACE editor for everything else\n else if(window.ace) {\n var mode = this.input_type;\n // aliases for c/cpp\n if(mode === 'cpp' || mode === 'c++' || mode === 'c') {\n mode = 'c_cpp';\n }\n \n this.ace_container = document.createElement('div');\n this.ace_container.style.width = '100%';\n this.ace_container.style.position = 'relative';\n this.ace_container.style.height = '400px';\n this.input.parentNode.insertBefore(this.ace_container,this.input);\n this.input.style.display = 'none';\n this.ace_editor = window.ace.edit(this.ace_container);\n \n this.ace_editor.setValue(this.getValue());\n \n // The theme\n if(JSONEditor.plugins.ace.theme) this.ace_editor.setTheme('ace/theme/'+JSONEditor.plugins.ace.theme);\n // The mode\n mode = window.ace.require(\"ace/mode/\"+mode);\n if(mode) this.ace_editor.getSession().setMode(new mode.Mode());\n \n // Listen for changes\n this.ace_editor.on('change',function() {\n var val = self.ace_editor.getValue();\n self.input.value = val;\n self.refreshValue();\n self.is_dirty = true;\n self.onChange(true);\n });\n }\n }\n \n self.theme.afterInputReady(self.input);\n },\n refreshValue: function() {\n this.value = this.input.value;\n if(typeof this.value !== \"string\") this.value = '';\n this.serialized = this.value;\n },\n destroy: function() {\n // If using SCEditor, destroy the editor instance\n if(this.sceditor_instance) {\n this.sceditor_instance.destroy();\n }\n else if(this.epiceditor) {\n this.epiceditor.unload();\n }\n else if(this.ace_editor) {\n this.ace_editor.destroy();\n }\n \n \n this.template = null;\n if(this.input && this.input.parentNode) this.input.parentNode.removeChild(this.input);\n if(this.label && this.label.parentNode) this.label.parentNode.removeChild(this.label);\n if(this.description && this.description.parentNode) this.description.parentNode.removeChild(this.description);\n\n this._super();\n },\n /**\n * This is overridden in derivative editors\n */\n sanitize: function(value) {\n return value;\n },\n /**\n * Re-calculates the value if needed\n */\n onWatchedFieldChange: function() { \n var self = this, vars, j;\n \n // If this editor needs to be rendered by a macro template\n if(this.template) {\n vars = this.getWatchedFieldValues();\n this.setValue(this.template(vars),false,true);\n }\n \n this._super();\n },\n showValidationErrors: function(errors) {\n var self = this;\n \n if(this.jsoneditor.options.show_errors === \"always\") {}\n else if(!this.is_dirty && this.previous_error_setting===this.jsoneditor.options.show_errors) return;\n \n this.previous_error_setting = this.jsoneditor.options.show_errors;\n\n var messages = [];\n $each(errors,function(i,error) {\n if(error.path === self.path) {\n messages.push(error.message);\n }\n });\n\n if(messages.length) {\n this.theme.addInputError(this.input, messages.join('. ')+'.');\n }\n else {\n this.theme.removeInputError(this.input);\n }\n }\n});\n", "JSONEditor.defaults.editors.number = JSONEditor.defaults.editors.string.extend({\n sanitize: function(value) {\n return (value+\"\").replace(/[^0-9\\.\\-eE]/g,'');\n },\n getNumColumns: function() {\n return 2;\n },\n getValue: function() {\n return this.value*1;\n }\n});\n", "JSONEditor.defaults.editors.integer = JSONEditor.defaults.editors.number.extend({\n sanitize: function(value) {\n value = value + \"\";\n return value.replace(/[^0-9\\-]/g,'');\n },\n getNumColumns: function() {\n return 2;\n }\n});\n", "JSONEditor.defaults.editors.object = JSONEditor.AbstractEditor.extend({\n getDefault: function() {\n return $extend({},this.schema[\"default\"] || {});\n },\n getChildEditors: function() {\n return this.editors;\n },\n register: function() {\n this._super();\n if(this.editors) {\n for(var i in this.editors) {\n if(!this.editors.hasOwnProperty(i)) continue;\n this.editors[i].register();\n }\n }\n },\n unregister: function() {\n this._super();\n if(this.editors) {\n for(var i in this.editors) {\n if(!this.editors.hasOwnProperty(i)) continue;\n this.editors[i].unregister();\n }\n }\n },\n getNumColumns: function() {\n return Math.max(Math.min(12,this.maxwidth),3);\n },\n enable: function() {\n if(this.editjson_button) this.editjson_button.disabled = false;\n if(this.addproperty_button) this.addproperty_button.disabled = false;\n \n this._super();\n if(this.editors) {\n for(var i in this.editors) {\n if(!this.editors.hasOwnProperty(i)) continue;\n this.editors[i].enable();\n }\n }\n },\n disable: function() {\n if(this.editjson_button) this.editjson_button.disabled = true;\n if(this.addproperty_button) this.addproperty_button.disabled = true;\n this.hideEditJSON();\n \n this._super();\n if(this.editors) {\n for(var i in this.editors) {\n if(!this.editors.hasOwnProperty(i)) continue;\n this.editors[i].disable();\n }\n }\n },\n layoutEditors: function() {\n var self = this, i, j;\n \n if(!this.row_container) return;\n\n // Sort editors by propertyOrder\n this.property_order = Object.keys(this.editors);\n this.property_order = this.property_order.sort(function(a,b) {\n var ordera = self.editors[a].schema.propertyOrder;\n var orderb = self.editors[b].schema.propertyOrder;\n if(typeof ordera !== \"number\") ordera = 1000;\n if(typeof orderb !== \"number\") orderb = 1000;\n\n return ordera - orderb;\n });\n \n var container;\n \n if(this.format === 'grid') {\n var rows = [];\n $each(this.property_order, function(j,key) {\n var editor = self.editors[key];\n if(editor.property_removed) return;\n var found = false;\n var width = editor.options.hidden? 0 : (editor.options.grid_columns || editor.getNumColumns());\n var height = editor.options.hidden? 0 : editor.container.offsetHeight;\n // See if the editor will fit in any of the existing rows first\n for(var i=0; i height)) {\n found = i;\n }\n }\n }\n \n // If there isn't a spot in any of the existing rows, start a new row\n if(found === false) {\n rows.push({\n width: 0,\n minh: 999999,\n maxh: 0,\n editors: []\n });\n found = rows.length-1;\n }\n \n rows[found].editors.push({\n key: key,\n //editor: editor,\n width: width,\n height: height\n });\n rows[found].width += width;\n rows[found].minh = Math.min(rows[found].minh,height);\n rows[found].maxh = Math.max(rows[found].maxh,height);\n });\n \n // Make almost full rows width 12\n // Do this by increasing all editors' sizes proprotionately\n // Any left over space goes to the biggest editor\n // Don't touch rows with a width of 6 or less\n for(i=0; i rows[i].editors[biggest].width) biggest = j;\n rows[i].editors[j].width *= 12/rows[i].width;\n rows[i].editors[j].width = Math.floor(rows[i].editors[j].width);\n new_width += rows[i].editors[j].width;\n }\n if(new_width < 12) rows[i].editors[biggest].width += 12-new_width;\n rows[i].width = 12;\n }\n }\n \n // layout hasn't changed\n if(this.layout === JSON.stringify(rows)) return false;\n this.layout = JSON.stringify(rows);\n \n // Layout the form\n container = document.createElement('div');\n for(i=0; i= this.schema.maxProperties);\n \n if(this.addproperty_checkboxes) {\n this.addproperty_list.innerHTML = '';\n }\n this.addproperty_checkboxes = {};\n \n // Check for which editors can't be removed or added back\n for(i in this.cached_editors) {\n if(!this.cached_editors.hasOwnProperty(i)) continue;\n \n this.addPropertyCheckbox(i);\n \n if(this.isRequired(this.cached_editors[i]) && i in this.editors) {\n this.addproperty_checkboxes[i].disabled = true;\n }\n \n if(typeof this.schema.minProperties !== \"undefined\" && num_props <= this.schema.minProperties) {\n this.addproperty_checkboxes[i].disabled = this.addproperty_checkboxes[i].checked;\n if(!this.addproperty_checkboxes[i].checked) show_modal = true;\n }\n else if(!(i in this.editors)) {\n if(!can_add && !this.schema.properties.hasOwnProperty(i)) {\n this.addproperty_checkboxes[i].disabled = true;\n }\n else {\n this.addproperty_checkboxes[i].disabled = false;\n show_modal = true;\n }\n }\n else {\n show_modal = true;\n can_remove = true;\n }\n }\n \n if(this.canHaveAdditionalProperties()) {\n show_modal = true;\n }\n \n // Additional addproperty checkboxes not tied to a current editor\n for(i in this.schema.properties) {\n if(!this.schema.properties.hasOwnProperty(i)) continue;\n if(this.cached_editors[i]) continue;\n show_modal = true;\n this.addPropertyCheckbox(i);\n }\n \n // If no editors can be added or removed, hide the modal button\n if(!show_modal) {\n this.hideAddProperty();\n this.addproperty_controls.style.display = 'none';\n }\n // If additional properties are disabled\n else if(!this.canHaveAdditionalProperties()) {\n this.addproperty_add.style.display = 'none';\n this.addproperty_input.style.display = 'none';\n }\n // If no new properties can be added\n else if(!can_add) {\n this.addproperty_add.disabled = true;\n }\n // If new properties can be added\n else {\n this.addproperty_add.disabled = false;\n }\n },\n isRequired: function(editor) {\n if(typeof editor.schema.required === \"boolean\") return editor.schema.required;\n else if(Array.isArray(this.schema.required)) return this.schema.required.indexOf(editor.key) > -1;\n else if(this.jsoneditor.options.required_by_default) return true;\n else return false;\n },\n setValue: function(value, initial) {\n var self = this;\n value = value || {};\n \n if(typeof value !== \"object\" || Array.isArray(value)) value = {};\n\n // First, set the values for all of the defined properties\n $each(this.cached_editors, function(i,editor) {\n // Value explicitly set\n if(typeof value[i] !== \"undefined\") {\n self.addObjectProperty(i);\n editor.setValue(value[i],initial);\n }\n // Otherwise, remove value unless this is the initial set or it's required\n else if(!initial && !self.isRequired(editor)) {\n self.removeObjectProperty(i);\n }\n // Otherwise, set the value to the default\n else {\n editor.setValue(editor.getDefault(),initial);\n }\n });\n\n $each(value, function(i,val) {\n if(!self.cached_editors[i]) {\n self.addObjectProperty(i);\n if(self.editors[i]) self.editors[i].setValue(val,initial);\n }\n });\n \n this.refreshValue();\n this.layoutEditors();\n this.onChange();\n },\n showValidationErrors: function(errors) {\n var self = this;\n\n // Get all the errors that pertain to this editor\n var my_errors = [];\n var other_errors = [];\n $each(errors, function(i,error) {\n if(error.path === self.path) {\n my_errors.push(error);\n }\n else {\n other_errors.push(error);\n }\n });\n\n // Show errors for this editor\n if(this.error_holder) {\n if(my_errors.length) {\n var message = [];\n this.error_holder.innerHTML = '';\n this.error_holder.style.display = '';\n $each(my_errors, function(i,error) {\n self.error_holder.appendChild(self.theme.getErrorMessage(error.message));\n });\n }\n // Hide error area\n else {\n this.error_holder.style.display = 'none';\n }\n }\n\n // Show error for the table row if this is inside a table\n if(this.options.table_row) {\n if(my_errors.length) {\n this.theme.addTableRowError(this.container);\n }\n else {\n this.theme.removeTableRowError(this.container);\n }\n }\n\n // Show errors for child editors\n $each(this.editors, function(i,editor) {\n editor.showValidationErrors(other_errors);\n });\n }\n});\n", "JSONEditor.defaults.editors.array = JSONEditor.AbstractEditor.extend({\n getDefault: function() {\n return this.schema[\"default\"] || [];\n },\n register: function() {\n this._super();\n if(this.rows) {\n for(var i=0; i= this.schema.items.length) {\n if(this.schema.additionalItems===true) {\n return {};\n }\n else if(this.schema.additionalItems) {\n return $extend({},this.schema.additionalItems);\n }\n }\n else {\n return $extend({},this.schema.items[i]);\n }\n }\n else if(this.schema.items) {\n return $extend({},this.schema.items);\n }\n else {\n return {};\n }\n },\n getItemInfo: function(i) {\n var schema = this.getItemSchema(i);\n \n // Check if it's cached\n this.item_info = this.item_info || {};\n var stringified = JSON.stringify(schema);\n if(typeof this.item_info[stringified] !== \"undefined\") return this.item_info[stringified];\n \n // Get the schema for this item\n schema = this.jsoneditor.expandRefs(schema);\n \n this.item_info[stringified] = {\n title: schema.title || \"item\",\n 'default': schema[\"default\"],\n width: 12,\n child_editors: schema.properties || schema.items\n };\n \n return this.item_info[stringified];\n },\n getElementEditor: function(i) {\n var item_info = this.getItemInfo(i);\n var schema = this.getItemSchema(i);\n schema = this.jsoneditor.expandRefs(schema);\n schema.title = item_info.title+' '+(i+1);\n\n var editor = this.jsoneditor.getEditorClass(schema);\n\n var holder;\n if(this.tabs_holder) {\n holder = this.theme.getTabContent();\n }\n else if(item_info.child_editors) {\n holder = this.theme.getChildEditorHolder();\n }\n else {\n holder = this.theme.getIndentedPanel();\n }\n\n this.row_holder.appendChild(holder);\n\n var ret = this.jsoneditor.createEditor(editor,{\n jsoneditor: this.jsoneditor,\n schema: schema,\n container: holder,\n path: this.path+'.'+i,\n parent: this,\n required: true\n });\n ret.preBuild();\n ret.build();\n ret.postBuild();\n\n if(!ret.title_controls) {\n ret.array_controls = this.theme.getButtonHolder();\n holder.appendChild(ret.array_controls);\n }\n \n return ret;\n },\n destroy: function() {\n this.empty(true);\n if(this.title && this.title.parentNode) this.title.parentNode.removeChild(this.title);\n if(this.description && this.description.parentNode) this.description.parentNode.removeChild(this.description);\n if(this.row_holder && this.row_holder.parentNode) this.row_holder.parentNode.removeChild(this.row_holder);\n if(this.controls && this.controls.parentNode) this.controls.parentNode.removeChild(this.controls);\n if(this.panel && this.panel.parentNode) this.panel.parentNode.removeChild(this.panel);\n \n this.rows = this.row_cache = this.title = this.description = this.row_holder = this.panel = this.controls = null;\n\n this._super();\n },\n empty: function(hard) {\n if(!this.rows) return;\n var self = this;\n $each(this.rows,function(i,row) {\n if(hard) {\n if(row.tab && row.tab.parentNode) row.tab.parentNode.removeChild(row.tab);\n self.destroyRow(row,true);\n self.row_cache[i] = null;\n }\n self.rows[i] = null;\n });\n self.rows = [];\n if(hard) self.row_cache = [];\n },\n destroyRow: function(row,hard) {\n var holder = row.container;\n if(hard) {\n row.destroy();\n if(holder.parentNode) holder.parentNode.removeChild(holder);\n if(row.tab && row.tab.parentNode) row.tab.parentNode.removeChild(row.tab);\n }\n else {\n if(row.tab) row.tab.style.display = 'none';\n holder.style.display = 'none';\n row.unregister();\n }\n },\n getMax: function() {\n if((Array.isArray(this.schema.items)) && this.schema.additionalItems === false) {\n return Math.min(this.schema.items.length,this.schema.maxItems || Infinity);\n }\n else {\n return this.schema.maxItems || Infinity;\n }\n },\n refreshTabs: function(refresh_headers) {\n var self = this;\n $each(this.rows, function(i,row) {\n if(!row.tab) return;\n\n if(refresh_headers) {\n row.tab_text.textContent = row.getHeaderText();\n }\n else {\n if(row.tab === self.active_tab) {\n self.theme.markTabActive(row.tab);\n row.container.style.display = '';\n }\n else {\n self.theme.markTabInactive(row.tab);\n row.container.style.display = 'none';\n }\n }\n });\n },\n setValue: function(value, initial) {\n // Update the array's value, adding/removing rows when necessary\n value = value || [];\n \n if(!(Array.isArray(value))) value = [value];\n \n var serialized = JSON.stringify(value);\n if(serialized === this.serialized) return;\n\n // Make sure value has between minItems and maxItems items in it\n if(this.schema.minItems) {\n while(value.length < this.schema.minItems) {\n value.push(this.getItemInfo(value.length)[\"default\"]);\n }\n }\n if(this.getMax() && value.length > this.getMax()) {\n value = value.slice(0,this.getMax());\n }\n\n var self = this;\n $each(value,function(i,val) {\n if(self.rows[i]) {\n // TODO: don't set the row's value if it hasn't changed\n self.rows[i].setValue(val,initial);\n }\n else if(self.row_cache[i]) {\n self.rows[i] = self.row_cache[i];\n self.rows[i].setValue(val,initial);\n self.rows[i].container.style.display = '';\n if(self.rows[i].tab) self.rows[i].tab.style.display = '';\n self.rows[i].register();\n }\n else {\n self.addRow(val,initial);\n }\n });\n\n for(var j=value.length; j= this.rows.length;\n \n $each(this.rows,function(i,editor) {\n // Hide the move down button for the last row\n if(editor.movedown_button) {\n if(i === self.rows.length - 1) {\n editor.movedown_button.style.display = 'none';\n }\n else {\n editor.movedown_button.style.display = '';\n }\n }\n\n // Hide the delete button if we have minItems items\n if(editor.delete_button) {\n if(minItems) {\n editor.delete_button.style.display = 'none';\n }\n else {\n editor.delete_button.style.display = '';\n }\n }\n\n // Get the value for this editor\n self.value[i] = editor.getValue();\n });\n \n var controls_needed = false;\n \n if(!this.value.length) {\n this.delete_last_row_button.style.display = 'none';\n this.remove_all_rows_button.style.display = 'none';\n }\n else if(this.value.length === 1) { \n this.remove_all_rows_button.style.display = 'none'; \n\n // If there are minItems items in the array, hide the delete button beneath the rows\n if(minItems || this.hide_delete_buttons) {\n this.delete_last_row_button.style.display = 'none';\n }\n else {\n this.delete_last_row_button.style.display = '';\n controls_needed = true;\n }\n }\n else {\n // If there are minItems items in the array, hide the delete button beneath the rows\n if(minItems || this.hide_delete_buttons) {\n this.delete_last_row_button.style.display = 'none';\n this.remove_all_rows_button.style.display = 'none';\n }\n else {\n this.delete_last_row_button.style.display = '';\n this.remove_all_rows_button.style.display = '';\n controls_needed = true;\n }\n }\n\n // If there are maxItems in the array, hide the add button beneath the rows\n if((this.getMax() && this.getMax() <= this.rows.length) || this.hide_add_button){\n this.add_row_button.style.display = 'none';\n }\n else {\n this.add_row_button.style.display = '';\n controls_needed = true;\n } \n \n if(!this.collapsed && controls_needed) {\n this.controls.style.display = 'inline-block';\n }\n else {\n this.controls.style.display = 'none';\n }\n }\n },\n addRow: function(value, initial) {\n var self = this;\n var i = this.rows.length;\n \n self.rows[i] = this.getElementEditor(i);\n self.row_cache[i] = self.rows[i];\n\n if(self.tabs_holder) {\n self.rows[i].tab_text = document.createElement('span');\n self.rows[i].tab_text.textContent = self.rows[i].getHeaderText();\n self.rows[i].tab = self.theme.getTab(self.rows[i].tab_text);\n self.rows[i].tab.addEventListener('click', function(e) {\n self.active_tab = self.rows[i].tab;\n self.refreshTabs();\n e.preventDefault();\n e.stopPropagation();\n });\n\n self.theme.addTab(self.tabs_holder, self.rows[i].tab);\n }\n \n var controls_holder = self.rows[i].title_controls || self.rows[i].array_controls;\n \n // Buttons to delete row, move row up, and move row down\n if(!self.hide_delete_buttons) {\n self.rows[i].delete_button = this.getButton(self.getItemTitle(),'delete','Delete '+self.getItemTitle());\n self.rows[i].delete_button.className += ' delete';\n self.rows[i].delete_button.setAttribute('data-i',i);\n self.rows[i].delete_button.addEventListener('click',function(e) {\n e.preventDefault();\n e.stopPropagation();\n var i = this.getAttribute('data-i')*1;\n\n var value = self.getValue();\n\n var newval = [];\n var new_active_tab = null;\n $each(value,function(j,row) {\n if(j===i) {\n // If the one we're deleting is the active tab\n if(self.rows[j].tab === self.active_tab) {\n // Make the next tab active if there is one\n // Note: the next tab is going to be the current tab after deletion\n if(self.rows[j+1]) new_active_tab = self.rows[j].tab;\n // Otherwise, make the previous tab active if there is one\n else if(j) new_active_tab = self.rows[j-1].tab;\n }\n \n return; // If this is the one we're deleting\n }\n newval.push(row);\n });\n self.setValue(newval);\n if(new_active_tab) {\n self.active_tab = new_active_tab;\n self.refreshTabs();\n }\n\n self.onChange(true);\n });\n \n if(controls_holder) {\n controls_holder.appendChild(self.rows[i].delete_button);\n }\n }\n \n if(i && !self.hide_move_buttons) {\n self.rows[i].moveup_button = this.getButton('','moveup','Move up');\n self.rows[i].moveup_button.className += ' moveup';\n self.rows[i].moveup_button.setAttribute('data-i',i);\n self.rows[i].moveup_button.addEventListener('click',function(e) {\n e.preventDefault();\n e.stopPropagation();\n var i = this.getAttribute('data-i')*1;\n\n if(i<=0) return;\n var rows = self.getValue();\n var tmp = rows[i-1];\n rows[i-1] = rows[i];\n rows[i] = tmp;\n\n self.setValue(rows);\n self.active_tab = self.rows[i-1].tab;\n self.refreshTabs();\n\n self.onChange(true);\n });\n \n if(controls_holder) {\n controls_holder.appendChild(self.rows[i].moveup_button);\n }\n }\n \n if(!self.hide_move_buttons) {\n self.rows[i].movedown_button = this.getButton('','movedown','Move down');\n self.rows[i].movedown_button.className += ' movedown';\n self.rows[i].movedown_button.setAttribute('data-i',i);\n self.rows[i].movedown_button.addEventListener('click',function(e) {\n e.preventDefault();\n e.stopPropagation();\n var i = this.getAttribute('data-i')*1;\n\n var rows = self.getValue();\n if(i>=rows.length-1) return;\n var tmp = rows[i+1];\n rows[i+1] = rows[i];\n rows[i] = tmp;\n\n self.setValue(rows);\n self.active_tab = self.rows[i+1].tab;\n self.refreshTabs();\n self.onChange(true);\n });\n \n if(controls_holder) {\n controls_holder.appendChild(self.rows[i].movedown_button);\n }\n }\n\n if(value) self.rows[i].setValue(value, initial);\n self.refreshTabs();\n },\n addControls: function() {\n var self = this;\n \n this.collapsed = false;\n this.toggle_button = this.getButton('','collapse','Collapse');\n this.title_controls.appendChild(this.toggle_button);\n var row_holder_display = self.row_holder.style.display;\n var controls_display = self.controls.style.display;\n this.toggle_button.addEventListener('click',function(e) {\n e.preventDefault();\n e.stopPropagation();\n if(self.collapsed) {\n self.collapsed = false;\n if(self.panel) self.panel.style.display = '';\n self.row_holder.style.display = row_holder_display;\n if(self.tabs_holder) self.tabs_holder.style.display = '';\n self.controls.style.display = controls_display;\n self.setButtonText(this,'','collapse','Collapse');\n }\n else {\n self.collapsed = true;\n self.row_holder.style.display = 'none';\n if(self.tabs_holder) self.tabs_holder.style.display = 'none';\n self.controls.style.display = 'none';\n if(self.panel) self.panel.style.display = 'none';\n self.setButtonText(this,'','expand','Expand');\n }\n });\n\n // If it should start collapsed\n if(this.options.collapsed) {\n $trigger(this.toggle_button,'click');\n }\n \n // Collapse button disabled\n if(this.schema.options && typeof this.schema.options.disable_collapse !== \"undefined\") {\n if(this.schema.options.disable_collapse) this.toggle_button.style.display = 'none';\n }\n else if(this.jsoneditor.options.disable_collapse) {\n this.toggle_button.style.display = 'none';\n }\n \n // Add \"new row\" and \"delete last\" buttons below editor\n this.add_row_button = this.getButton(this.getItemTitle(),'add','Add '+this.getItemTitle());\n \n this.add_row_button.addEventListener('click',function(e) {\n e.preventDefault();\n e.stopPropagation();\n var i = self.rows.length;\n if(self.row_cache[i]) {\n self.rows[i] = self.row_cache[i];\n self.rows[i].container.style.display = '';\n if(self.rows[i].tab) self.rows[i].tab.style.display = '';\n self.rows[i].register();\n }\n else {\n self.addRow();\n }\n self.active_tab = self.rows[i].tab;\n self.refreshTabs();\n self.refreshValue();\n self.onChange(true);\n });\n self.controls.appendChild(this.add_row_button);\n\n this.delete_last_row_button = this.getButton('Last '+this.getItemTitle(),'delete','Delete Last '+this.getItemTitle());\n this.delete_last_row_button.addEventListener('click',function(e) {\n e.preventDefault();\n e.stopPropagation();\n var rows = self.getValue();\n \n var new_active_tab = null;\n if(self.rows.length > 1 && self.rows[self.rows.length-1].tab === self.active_tab) new_active_tab = self.rows[self.rows.length-2].tab;\n \n rows.pop();\n self.setValue(rows);\n if(new_active_tab) {\n self.active_tab = new_active_tab;\n self.refreshTabs();\n }\n self.onChange(true);\n });\n self.controls.appendChild(this.delete_last_row_button);\n\n this.remove_all_rows_button = this.getButton('All','delete','Delete All');\n this.remove_all_rows_button.addEventListener('click',function(e) {\n e.preventDefault();\n e.stopPropagation();\n self.setValue([]);\n self.onChange(true);\n });\n self.controls.appendChild(this.remove_all_rows_button);\n\n if(self.tabs) {\n this.add_row_button.style.width = '100%';\n this.add_row_button.style.textAlign = 'left';\n this.add_row_button.style.marginBottom = '3px';\n \n this.delete_last_row_button.style.width = '100%';\n this.delete_last_row_button.style.textAlign = 'left';\n this.delete_last_row_button.style.marginBottom = '3px';\n \n this.remove_all_rows_button.style.width = '100%';\n this.remove_all_rows_button.style.textAlign = 'left';\n this.remove_all_rows_button.style.marginBottom = '3px';\n }\n },\n showValidationErrors: function(errors) {\n var self = this;\n\n // Get all the errors that pertain to this editor\n var my_errors = [];\n var other_errors = [];\n $each(errors, function(i,error) {\n if(error.path === self.path) {\n my_errors.push(error);\n }\n else {\n other_errors.push(error);\n }\n });\n\n // Show errors for this editor\n if(this.error_holder) {\n if(my_errors.length) {\n var message = [];\n this.error_holder.innerHTML = '';\n this.error_holder.style.display = '';\n $each(my_errors, function(i,error) {\n self.error_holder.appendChild(self.theme.getErrorMessage(error.message));\n });\n }\n // Hide error area\n else {\n this.error_holder.style.display = 'none';\n }\n }\n\n // Show errors for child editors\n $each(this.rows, function(i,row) {\n row.showValidationErrors(other_errors);\n });\n }\n});\n", "JSONEditor.defaults.editors.table = JSONEditor.defaults.editors.array.extend({\n register: function() {\n this._super();\n if(this.rows) {\n for(var i=0; i this.schema.maxItems) {\n value = value.slice(0,this.schema.maxItems);\n }\n \n var serialized = JSON.stringify(value);\n if(serialized === this.serialized) return;\n\n var numrows_changed = false;\n\n var self = this;\n $each(value,function(i,val) {\n if(self.rows[i]) {\n // TODO: don't set the row's value if it hasn't changed\n self.rows[i].setValue(val);\n }\n else {\n self.addRow(val);\n numrows_changed = true;\n }\n });\n\n for(var j=value.length; j= this.rows.length;\n \n var need_row_buttons = false;\n $each(this.rows,function(i,editor) {\n // Hide the move down button for the last row\n if(editor.movedown_button) {\n if(i === self.rows.length - 1) {\n editor.movedown_button.style.display = 'none';\n }\n else {\n need_row_buttons = true;\n editor.movedown_button.style.display = '';\n }\n }\n\n // Hide the delete button if we have minItems items\n if(editor.delete_button) {\n if(minItems) {\n editor.delete_button.style.display = 'none';\n }\n else {\n need_row_buttons = true;\n editor.delete_button.style.display = '';\n }\n }\n \n if(editor.moveup_button) {\n need_row_buttons = true;\n }\n });\n \n // Show/hide controls column in table\n $each(this.rows,function(i,editor) {\n if(need_row_buttons) {\n editor.controls_cell.style.display = '';\n }\n else {\n editor.controls_cell.style.display = 'none';\n }\n });\n if(need_row_buttons) {\n this.controls_header_cell.style.display = '';\n }\n else {\n this.controls_header_cell.style.display = 'none';\n }\n \n var controls_needed = false;\n \n if(!this.value.length) {\n this.delete_last_row_button.style.display = 'none';\n this.remove_all_rows_button.style.display = 'none';\n this.table.style.display = 'none';\n }\n else if(this.value.length === 1 || this.hide_delete_buttons) {\n this.table.style.display = '';\n this.remove_all_rows_button.style.display = 'none';\n\n // If there are minItems items in the array, hide the delete button beneath the rows\n if(minItems || this.hide_delete_buttons) {\n this.delete_last_row_button.style.display = 'none';\n }\n else {\n this.delete_last_row_button.style.display = '';\n controls_needed = true;\n }\n }\n else {\n this.table.style.display = '';\n // If there are minItems items in the array, hide the delete button beneath the rows\n if(minItems || this.hide_delete_buttons) {\n this.delete_last_row_button.style.display = 'none';\n this.remove_all_rows_button.style.display = 'none';\n }\n else {\n this.delete_last_row_button.style.display = '';\n this.remove_all_rows_button.style.display = '';\n controls_needed = true;\n }\n }\n\n // If there are maxItems in the array, hide the add button beneath the rows\n if((this.schema.maxItems && this.schema.maxItems <= this.rows.length) || this.hide_add_button) {\n this.add_row_button.style.display = 'none';\n }\n else {\n this.add_row_button.style.display = '';\n controls_needed = true;\n }\n \n if(!controls_needed) {\n this.controls.style.display = 'none';\n }\n else {\n this.controls.style.display = '';\n }\n },\n refreshValue: function() {\n var self = this;\n this.value = [];\n\n $each(this.rows,function(i,editor) {\n // Get the value for this editor\n self.value[i] = editor.getValue();\n });\n this.serialized = JSON.stringify(this.value);\n },\n addRow: function(value) {\n var self = this;\n var i = this.rows.length;\n\n self.rows[i] = this.getElementEditor(i);\n\n var controls_holder = self.rows[i].table_controls;\n\n // Buttons to delete row, move row up, and move row down\n if(!this.hide_delete_buttons) {\n self.rows[i].delete_button = this.getButton('','delete','Delete');\n self.rows[i].delete_button.className += ' delete';\n self.rows[i].delete_button.setAttribute('data-i',i);\n self.rows[i].delete_button.addEventListener('click',function(e) {\n e.preventDefault();\n e.stopPropagation();\n var i = this.getAttribute('data-i')*1;\n\n var value = self.getValue();\n\n var newval = [];\n $each(value,function(j,row) {\n if(j===i) return; // If this is the one we're deleting\n newval.push(row);\n });\n self.setValue(newval);\n self.onChange(true);\n });\n controls_holder.appendChild(self.rows[i].delete_button);\n }\n\n \n if(i && !this.hide_move_buttons) {\n self.rows[i].moveup_button = this.getButton('','moveup','Move up');\n self.rows[i].moveup_button.className += ' moveup';\n self.rows[i].moveup_button.setAttribute('data-i',i);\n self.rows[i].moveup_button.addEventListener('click',function(e) {\n e.preventDefault();\n e.stopPropagation();\n var i = this.getAttribute('data-i')*1;\n\n if(i<=0) return;\n var rows = self.getValue();\n var tmp = rows[i-1];\n rows[i-1] = rows[i];\n rows[i] = tmp;\n\n self.setValue(rows);\n self.onChange(true);\n });\n controls_holder.appendChild(self.rows[i].moveup_button);\n }\n \n if(!this.hide_move_buttons) {\n self.rows[i].movedown_button = this.getButton('','movedown','Move down');\n self.rows[i].movedown_button.className += ' movedown';\n self.rows[i].movedown_button.setAttribute('data-i',i);\n self.rows[i].movedown_button.addEventListener('click',function(e) {\n e.preventDefault();\n e.stopPropagation();\n var i = this.getAttribute('data-i')*1;\n var rows = self.getValue();\n if(i>=rows.length-1) return;\n var tmp = rows[i+1];\n rows[i+1] = rows[i];\n rows[i] = tmp;\n\n self.setValue(rows);\n self.onChange(true);\n });\n controls_holder.appendChild(self.rows[i].movedown_button);\n }\n\n if(value) self.rows[i].setValue(value);\n },\n addControls: function() {\n var self = this;\n\n this.collapsed = false;\n this.toggle_button = this.getButton('','collapse','Collapse');\n if(this.title_controls) {\n this.title_controls.appendChild(this.toggle_button);\n this.toggle_button.addEventListener('click',function(e) {\n e.preventDefault();\n e.stopPropagation();\n\n if(self.collapsed) {\n self.collapsed = false;\n self.panel.style.display = '';\n self.setButtonText(this,'','collapse','Collapse');\n }\n else {\n self.collapsed = true;\n self.panel.style.display = 'none';\n self.setButtonText(this,'','expand','Expand');\n }\n });\n\n // If it should start collapsed\n if(this.options.collapsed) {\n $trigger(this.toggle_button,'click');\n }\n\n // Collapse button disabled\n if(this.schema.options && typeof this.schema.options.disable_collapse !== \"undefined\") {\n if(this.schema.options.disable_collapse) this.toggle_button.style.display = 'none';\n }\n else if(this.jsoneditor.options.disable_collapse) {\n this.toggle_button.style.display = 'none';\n }\n }\n\n // Add \"new row\" and \"delete last\" buttons below editor\n this.add_row_button = this.getButton(this.getItemTitle(),'add','Add '+this.getItemTitle());\n this.add_row_button.addEventListener('click',function(e) {\n e.preventDefault();\n e.stopPropagation();\n \n self.addRow();\n self.refreshValue();\n self.refreshRowButtons();\n self.onChange(true);\n });\n self.controls.appendChild(this.add_row_button);\n\n this.delete_last_row_button = this.getButton('Last '+this.getItemTitle(),'delete','Delete Last '+this.getItemTitle());\n this.delete_last_row_button.addEventListener('click',function(e) {\n e.preventDefault();\n e.stopPropagation();\n \n var rows = self.getValue();\n rows.pop();\n self.setValue(rows);\n self.onChange(true);\n });\n self.controls.appendChild(this.delete_last_row_button);\n\n this.remove_all_rows_button = this.getButton('All','delete','Delete All');\n this.remove_all_rows_button.addEventListener('click',function(e) {\n e.preventDefault();\n e.stopPropagation();\n \n self.setValue([]);\n self.onChange(true);\n });\n self.controls.appendChild(this.remove_all_rows_button);\n }\n});\n", "// Multiple Editor (for when `type` is an array)\nJSONEditor.defaults.editors.multiple = JSONEditor.AbstractEditor.extend({\n register: function() {\n if(this.editors) {\n for(var i=0; inull';\n }\n // Array or Object\n else if(typeof el === \"object\") {\n // TODO: use theme\n var ret = '';\n\n $each(el,function(i,child) {\n var html = self.getHTML(child);\n\n // Add the keys to object children\n if(!(Array.isArray(el))) {\n // TODO: use theme\n html = '
'+i+': '+html+'
';\n }\n\n // TODO: use theme\n ret += '
  • '+html+'
  • ';\n });\n \n if(Array.isArray(el)) ret = '
      '+ret+'
    ';\n else ret = \"
      \"+ret+'
    ';\n\n return ret;\n }\n // Boolean\n else if(typeof el === \"boolean\") {\n return el? 'true' : 'false';\n }\n // String\n else if(typeof el === \"string\") {\n return el.replace(/&/g,'&').replace(//g,'>');\n }\n // Number\n else {\n return el;\n }\n },\n setValue: function(val) {\n if(this.value !== val) {\n this.value = val;\n this.refreshValue();\n this.onChange();\n }\n },\n destroy: function() {\n if(this.display_area && this.display_area.parentNode) this.display_area.parentNode.removeChild(this.display_area);\n if(this.title && this.title.parentNode) this.title.parentNode.removeChild(this.title);\n if(this.switcher && this.switcher.parentNode) this.switcher.parentNode.removeChild(this.switcher);\n\n this._super();\n }\n});\n", "JSONEditor.defaults.editors.select = JSONEditor.AbstractEditor.extend({\n setValue: function(value,initial) {\n value = this.typecast(value||'');\n\n // Sanitize value before setting it\n var sanitized = value;\n if(this.enum_values.indexOf(sanitized) < 0) {\n sanitized = this.enum_values[0];\n }\n\n if(this.value === sanitized) {\n return;\n }\n\n this.input.value = this.enum_options[this.enum_values.indexOf(sanitized)];\n if(this.select2) this.select2.select2('val',this.input.value);\n this.value = sanitized;\n this.onChange();\n },\n register: function() {\n this._super();\n if(!this.input) return;\n this.input.setAttribute('name',this.formname);\n },\n unregister: function() {\n this._super();\n if(!this.input) return;\n this.input.removeAttribute('name');\n },\n getNumColumns: function() {\n if(!this.enum_options) return 3;\n var longest_text = this.getTitle().length;\n for(var i=0; i 2 || (this.enum_options.length && this.enumSource))) {\n var options = $extend({},JSONEditor.plugins.select2);\n if(this.schema.options && this.schema.options.select2_options) options = $extend(options,this.schema.options.select2_options);\n this.select2 = window.jQuery(this.input).select2(options);\n var self = this;\n this.select2.on('select2-blur',function() {\n self.input.value = self.select2.select2('val');\n self.onInputChange();\n });\n }\n else {\n this.select2 = null;\n }\n },\n postBuild: function() {\n this._super();\n this.theme.afterInputReady(this.input);\n this.setupSelect2();\n },\n onWatchedFieldChange: function() {\n var self = this, vars, j;\n \n // If this editor uses a dynamic select box\n if(this.enumSource) {\n vars = this.getWatchedFieldValues();\n var select_options = [];\n var select_titles = [];\n \n for(var i=0; iSize: '+Math.floor((this.value.length-this.value.split(',')[0].length-1)/1.33333)+' bytes';\n if(mime.substr(0,5)===\"image\") {\n this.preview.innerHTML += '
    ';\n var img = document.createElement('img');\n img.style.maxWidth = '100%';\n img.style.maxHeight = '100px';\n img.src = this.value;\n this.preview.appendChild(img);\n }\n }\n },\n enable: function() {\n if(this.uploader) this.uploader.disabled = false;\n this._super();\n },\n disable: function() {\n if(this.uploader) this.uploader.disabled = true;\n this._super();\n },\n setValue: function(val) {\n if(this.value !== val) {\n this.value = val;\n this.input.value = this.value;\n this.refreshPreview();\n this.onChange();\n }\n },\n destroy: function() {\n if(this.preview && this.preview.parentNode) this.preview.parentNode.removeChild(this.preview);\n if(this.title && this.title.parentNode) this.title.parentNode.removeChild(this.title);\n if(this.input && this.input.parentNode) this.input.parentNode.removeChild(this.input);\n if(this.uploader && this.uploader.parentNode) this.uploader.parentNode.removeChild(this.uploader);\n\n this._super();\n }\n});\n", "JSONEditor.defaults.editors.upload = JSONEditor.AbstractEditor.extend({\n getNumColumns: function() {\n return 4;\n },\n build: function() { \n var self = this;\n this.title = this.header = this.label = this.theme.getFormInputLabel(this.getTitle());\n\n // Input that holds the base64 string\n this.input = this.theme.getFormInputField('hidden');\n this.container.appendChild(this.input);\n \n // Don't show uploader if this is readonly\n if(!this.schema.readOnly && !this.schema.readonly) {\n\n if(!this.jsoneditor.options.upload) throw \"Upload handler required for upload editor\";\n\n // File uploader\n this.uploader = this.theme.getFormInputField('file');\n \n this.uploader.addEventListener('change',function(e) {\n e.preventDefault();\n e.stopPropagation();\n \n if(this.files && this.files.length) {\n var fr = new FileReader();\n fr.onload = function(evt) {\n self.preview_value = evt.target.result;\n self.refreshPreview();\n self.onChange(true);\n fr = null;\n };\n fr.readAsDataURL(this.files[0]);\n }\n });\n }\n\n var description = this.schema.description;\n if (!description) description = '';\n\n this.preview = this.theme.getFormInputDescription(description);\n this.container.appendChild(this.preview);\n\n this.control = this.theme.getFormControl(this.label, this.uploader||this.input, this.preview);\n this.container.appendChild(this.control);\n },\n refreshPreview: function() {\n if(this.last_preview === this.preview_value) return;\n this.last_preview = this.preview_value;\n\n this.preview.innerHTML = '';\n \n if(!this.preview_value) return;\n\n var self = this;\n\n var mime = this.preview_value.match(/^data:([^;,]+)[;,]/);\n if(mime) mime = mime[1];\n if(!mime) mime = 'unknown';\n\n var file = this.uploader.files[0];\n\n this.preview.innerHTML = 'Type: '+mime+', Size: '+file.size+' bytes';\n if(mime.substr(0,5)===\"image\") {\n this.preview.innerHTML += '
    ';\n var img = document.createElement('img');\n img.style.maxWidth = '100%';\n img.style.maxHeight = '100px';\n img.src = this.preview_value;\n this.preview.appendChild(img);\n }\n\n this.preview.innerHTML += '
    ';\n var uploadButton = this.getButton('Upload', 'upload', 'Upload');\n this.preview.appendChild(uploadButton);\n uploadButton.addEventListener('click',function(event) {\n event.preventDefault();\n\n uploadButton.setAttribute(\"disabled\", \"disabled\");\n self.theme.removeInputError(self.uploader);\n\n if (self.theme.getProgressBar) {\n self.progressBar = self.theme.getProgressBar();\n self.preview.appendChild(self.progressBar);\n }\n\n self.jsoneditor.options.upload(self.path, file, {\n success: function(url) {\n self.setValue(url);\n\n if(self.parent) self.parent.onChildEditorChange(self);\n else self.jsoneditor.onChange();\n\n if (self.progressBar) self.preview.removeChild(self.progressBar);\n uploadButton.removeAttribute(\"disabled\");\n },\n failure: function(error) {\n self.theme.addInputError(self.uploader, error);\n if (self.progressBar) self.preview.removeChild(self.progressBar);\n uploadButton.removeAttribute(\"disabled\");\n },\n updateProgress: function(progress) {\n if (self.progressBar) {\n if (progress) self.theme.updateProgressBar(self.progressBar, progress);\n else self.theme.updateProgressBarUnknown(self.progressBar);\n }\n }\n });\n });\n },\n enable: function() {\n if(this.uploader) this.uploader.disabled = false;\n this._super();\n },\n disable: function() {\n if(this.uploader) this.uploader.disabled = true;\n this._super();\n },\n setValue: function(val) {\n if(this.value !== val) {\n this.value = val;\n this.input.value = this.value;\n this.onChange();\n }\n },\n destroy: function() {\n if(this.preview && this.preview.parentNode) this.preview.parentNode.removeChild(this.preview);\n if(this.title && this.title.parentNode) this.title.parentNode.removeChild(this.title);\n if(this.input && this.input.parentNode) this.input.parentNode.removeChild(this.input);\n if(this.uploader && this.uploader.parentNode) this.uploader.parentNode.removeChild(this.uploader);\n\n this._super();\n }\n});\n", "JSONEditor.defaults.editors.checkbox = JSONEditor.AbstractEditor.extend({\n setValue: function(value,initial) {\n this.value = !!value;\n this.input.checked = this.value;\n this.onChange();\n },\n register: function() {\n this._super();\n if(!this.input) return;\n this.input.setAttribute('name',this.formname);\n },\n unregister: function() {\n this._super();\n if(!this.input) return;\n this.input.removeAttribute('name');\n },\n getNumColumns: function() {\n return Math.min(12,Math.max(this.getTitle().length/7,2));\n },\n build: function() {\n var self = this;\n if(!this.options.compact) {\n this.label = this.header = this.theme.getCheckboxLabel(this.getTitle());\n }\n if(this.schema.description) this.description = this.theme.getFormInputDescription(this.schema.description);\n if(this.options.compact) this.container.className += ' compact';\n\n this.input = this.theme.getCheckbox();\n this.control = this.theme.getFormControl(this.label, this.input, this.description);\n\n if(this.schema.readOnly || this.schema.readonly) {\n this.always_disabled = true;\n this.input.disabled = true;\n }\n\n this.input.addEventListener('change',function(e) {\n e.preventDefault();\n e.stopPropagation();\n self.value = this.checked;\n self.onChange(true);\n });\n\n this.container.appendChild(this.control);\n },\n enable: function() {\n if(!this.always_disabled) {\n this.input.disabled = false;\n }\n this._super();\n },\n disable: function() {\n this.input.disabled = true;\n this._super();\n },\n destroy: function() {\n if(this.label && this.label.parentNode) this.label.parentNode.removeChild(this.label);\n if(this.description && this.description.parentNode) this.description.parentNode.removeChild(this.description);\n if(this.input && this.input.parentNode) this.input.parentNode.removeChild(this.input);\n this._super();\n }\n});\n", "JSONEditor.AbstractTheme = Class.extend({\n getContainer: function() {\n return document.createElement('div');\n },\n getFloatRightLinkHolder: function() {\n var el = document.createElement('div');\n el.style = el.style || {};\n el.style.cssFloat = 'right';\n el.style.marginLeft = '10px';\n return el;\n },\n getModal: function() {\n var el = document.createElement('div');\n el.style.backgroundColor = 'white';\n el.style.border = '1px solid black';\n el.style.boxShadow = '3px 3px black';\n el.style.position = 'absolute';\n el.style.zIndex = '10';\n el.style.display = 'none';\n return el;\n },\n getGridContainer: function() {\n var el = document.createElement('div');\n return el;\n },\n getGridRow: function() {\n var el = document.createElement('div');\n el.className = 'row';\n return el;\n },\n getGridColumn: function() {\n var el = document.createElement('div');\n return el;\n },\n setGridColumnSize: function(el,size) {\n \n },\n getLink: function(text) {\n var el = document.createElement('a');\n el.setAttribute('href','#');\n el.appendChild(document.createTextNode(text));\n return el;\n },\n disableHeader: function(header) {\n header.style.color = '#ccc';\n },\n disableLabel: function(label) {\n label.style.color = '#ccc';\n },\n enableHeader: function(header) {\n header.style.color = '';\n },\n enableLabel: function(label) {\n label.style.color = '';\n },\n getFormInputLabel: function(text) {\n var el = document.createElement('label');\n el.appendChild(document.createTextNode(text));\n return el;\n },\n getCheckboxLabel: function(text) {\n var el = this.getFormInputLabel(text);\n el.style.fontWeight = 'normal';\n return el;\n },\n getHeader: function(text) {\n var el = document.createElement('h3');\n if(typeof text === \"string\") {\n el.textContent = text;\n }\n else {\n el.appendChild(text);\n }\n \n return el;\n },\n getCheckbox: function() {\n var el = this.getFormInputField('checkbox');\n el.style.display = 'inline-block';\n el.style.width = 'auto';\n return el;\n },\n getMultiCheckboxHolder: function(controls,label,description) {\n var el = document.createElement('div');\n\n if(label) {\n label.style.display = 'block';\n el.appendChild(label);\n }\n\n for(var i in controls) {\n if(!controls.hasOwnProperty(i)) continue;\n controls[i].style.display = 'inline-block';\n controls[i].style.marginRight = '20px';\n el.appendChild(controls[i]);\n }\n\n if(description) el.appendChild(description);\n\n return el;\n },\n getSelectInput: function(options) {\n var select = document.createElement('select');\n if(options) this.setSelectOptions(select, options);\n return select;\n },\n getSwitcher: function(options) {\n var switcher = this.getSelectInput(options);\n switcher.style.backgroundColor = 'transparent';\n switcher.style.height = 'auto';\n switcher.style.fontStyle = 'italic';\n switcher.style.fontWeight = 'normal';\n switcher.style.padding = '0 0 0 3px';\n return switcher;\n },\n getSwitcherOptions: function(switcher) {\n return switcher.getElementsByTagName('option');\n },\n setSwitcherOptions: function(switcher, options, titles) {\n this.setSelectOptions(switcher, options, titles);\n },\n setSelectOptions: function(select, options, titles) {\n titles = titles || [];\n select.innerHTML = '';\n for(var i=0; i
    \";\n return el;\n },\n applyStyles: function(el,styles) {\n el.style = el.style || {};\n for(var i in styles) {\n if(!styles.hasOwnProperty(i)) continue;\n el.style[i] = styles[i];\n }\n },\n closest: function(elem, selector) {\n var matchesSelector = elem.matches || elem.webkitMatchesSelector || elem.mozMatchesSelector || elem.msMatchesSelector;\n\n while (elem && elem !== document) {\n try {\n var f = matchesSelector.bind(elem);\n if (f(selector)) {\n return elem;\n } else {\n elem = elem.parentNode;\n }\n }\n catch(e) {\n return false;\n }\n }\n return false;\n },\n getTab: function(span) {\n var el = document.createElement('div');\n el.appendChild(span);\n el.style = el.style || {};\n this.applyStyles(el,{\n border: '1px solid #ccc',\n borderWidth: '1px 0 1px 1px',\n textAlign: 'center',\n lineHeight: '30px',\n borderRadius: '5px',\n borderBottomRightRadius: 0,\n borderTopRightRadius: 0,\n fontWeight: 'bold',\n cursor: 'pointer'\n });\n return el;\n },\n getTabContentHolder: function(tab_holder) {\n return tab_holder.children[1];\n },\n getTabContent: function() {\n return this.getIndentedPanel();\n },\n markTabActive: function(tab) {\n this.applyStyles(tab,{\n opacity: 1,\n background: 'white'\n });\n },\n markTabInactive: function(tab) {\n this.applyStyles(tab,{\n opacity:0.5,\n background: ''\n });\n },\n addTab: function(holder, tab) {\n holder.children[0].appendChild(tab);\n },\n getBlockLink: function() {\n var link = document.createElement('a');\n link.style.display = 'block';\n return link;\n },\n getBlockLinkHolder: function() {\n var el = document.createElement('div');\n return el;\n },\n getLinksHolder: function() {\n var el = document.createElement('div');\n return el;\n },\n createMediaLink: function(holder,link,media) {\n holder.appendChild(link);\n media.style.width='100%';\n holder.appendChild(media);\n },\n createImageLink: function(holder,link,image) {\n holder.appendChild(link);\n link.appendChild(image);\n }\n});\n", "JSONEditor.defaults.themes.bootstrap2 = JSONEditor.AbstractTheme.extend({\n getRangeInput: function(min, max, step) {\n // TODO: use bootstrap slider\n return this._super(min, max, step);\n },\n getGridContainer: function() {\n var el = document.createElement('div');\n el.className = 'container-fluid';\n return el;\n },\n getGridRow: function() {\n var el = document.createElement('div');\n el.className = 'row-fluid';\n return el;\n },\n getFormInputLabel: function(text) {\n var el = this._super(text);\n el.style.display = 'inline-block';\n el.style.fontWeight = 'bold';\n return el;\n },\n setGridColumnSize: function(el,size) {\n el.className = 'span'+size;\n },\n getSelectInput: function(options) {\n var input = this._super(options);\n input.style.width = 'auto';\n input.style.maxWidth = '98%';\n return input;\n },\n getFormInputField: function(type) {\n var el = this._super(type);\n el.style.width = '98%';\n return el;\n },\n afterInputReady: function(input) {\n if(input.controlgroup) return;\n input.controlgroup = this.closest(input,'.control-group');\n input.controls = this.closest(input,'.controls');\n if(this.closest(input,'.compact')) {\n input.controlgroup.className = input.controlgroup.className.replace(/control-group/g,'').replace(/[ ]{2,}/g,' ');\n input.controls.className = input.controlgroup.className.replace(/controls/g,'').replace(/[ ]{2,}/g,' ');\n input.style.marginBottom = 0;\n }\n\n // TODO: use bootstrap slider\n },\n getIndentedPanel: function() {\n var el = document.createElement('div');\n el.className = 'well well-small';\n return el;\n },\n getFormInputDescription: function(text) {\n var el = document.createElement('p');\n el.className = 'help-inline';\n el.textContent = text;\n return el;\n },\n getFormControl: function(label, input, description) {\n var ret = document.createElement('div');\n ret.className = 'control-group';\n\n var controls = document.createElement('div');\n controls.className = 'controls';\n\n if(label && input.getAttribute('type') === 'checkbox') {\n ret.appendChild(controls);\n label.className += ' checkbox';\n label.appendChild(input);\n controls.appendChild(label);\n controls.style.height = '30px';\n }\n else {\n if(label) {\n label.className += ' control-label';\n ret.appendChild(label);\n }\n controls.appendChild(input);\n ret.appendChild(controls);\n }\n\n if(description) controls.appendChild(description);\n\n return ret;\n },\n getHeaderButtonHolder: function() {\n var el = this.getButtonHolder();\n el.style.marginLeft = '10px';\n return el;\n },\n getButtonHolder: function() {\n var el = document.createElement('div');\n el.className = 'btn-group';\n return el;\n },\n getButton: function(text, icon, title) {\n var el = this._super(text, icon, title);\n el.className += ' btn btn-default';\n return el;\n },\n getTable: function() {\n var el = document.createElement('table');\n el.className = 'table table-bordered';\n el.style.width = 'auto';\n el.style.maxWidth = 'none';\n return el;\n },\n addInputError: function(input,text) {\n if(!input.controlgroup || !input.controls) return;\n input.controlgroup.className += ' error';\n if(!input.errmsg) {\n input.errmsg = document.createElement('p');\n input.errmsg.className = 'help-block errormsg';\n input.controls.appendChild(input.errmsg);\n }\n else {\n input.errmsg.style.display = '';\n }\n\n input.errmsg.textContent = text;\n },\n removeInputError: function(input) {\n if(!input.errmsg) return;\n input.errmsg.style.display = 'none';\n input.controlgroup.className = input.controlgroup.className.replace(/\\s?error/g,'');\n },\n getTabHolder: function() {\n var el = document.createElement('div');\n el.className = 'tabbable tabs-left';\n el.innerHTML = \"
    \";\n return el;\n },\n getTab: function(text) {\n var el = document.createElement('li');\n var a = document.createElement('a');\n a.setAttribute('href','#');\n a.appendChild(text);\n el.appendChild(a);\n return el;\n },\n getTabContentHolder: function(tab_holder) {\n return tab_holder.children[1];\n },\n getTabContent: function() {\n var el = document.createElement('div');\n el.className = 'tab-pane active';\n return el;\n },\n markTabActive: function(tab) {\n tab.className += ' active';\n },\n markTabInactive: function(tab) {\n tab.className = tab.className.replace(/\\s?active/g,'');\n },\n addTab: function(holder, tab) {\n holder.children[0].appendChild(tab);\n },\n getProgressBar: function() {\n var container = document.createElement('div');\n container.className = 'progress';\n\n var bar = document.createElement('div');\n bar.className = 'bar';\n bar.style.width = '0%';\n container.appendChild(bar);\n\n return container;\n },\n updateProgressBar: function(progressBar, progress) {\n if (!progressBar) return;\n\n progressBar.firstChild.style.width = progress + \"%\";\n },\n updateProgressBarUnknown: function(progressBar) {\n if (!progressBar) return;\n\n progressBar.className = 'progress progress-striped active';\n progressBar.firstChild.style.width = '100%';\n }\n});\n", "JSONEditor.defaults.themes.bootstrap3 = JSONEditor.AbstractTheme.extend({\n getSelectInput: function(options) {\n var el = this._super(options);\n el.className += 'form-control';\n //el.style.width = 'auto';\n return el;\n },\n setGridColumnSize: function(el,size) {\n el.className = 'col-md-'+size;\n },\n afterInputReady: function(input) {\n if(input.controlgroup) return;\n input.controlgroup = this.closest(input,'.form-group');\n if(this.closest(input,'.compact')) {\n input.controlgroup.style.marginBottom = 0;\n }\n\n // TODO: use bootstrap slider\n },\n getTextareaInput: function() {\n var el = document.createElement('textarea');\n el.className = 'form-control';\n return el;\n },\n getRangeInput: function(min, max, step) {\n // TODO: use better slider\n return this._super(min, max, step);\n },\n getFormInputField: function(type) {\n var el = this._super(type);\n if(type !== 'checkbox') {\n el.className += 'form-control';\n }\n return el;\n },\n getFormControl: function(label, input, description) {\n var group = document.createElement('div');\n\n if(label && input.type === 'checkbox') {\n group.className += ' checkbox';\n label.appendChild(input);\n label.style.fontSize = '14px';\n group.style.marginTop = '0';\n group.appendChild(label);\n input.style.position = 'relative';\n input.style.cssFloat = 'left';\n } \n else {\n group.className += ' form-group';\n if(label) {\n label.className += ' control-label';\n group.appendChild(label);\n }\n group.appendChild(input);\n }\n\n if(description) group.appendChild(description);\n\n return group;\n },\n getIndentedPanel: function() {\n var el = document.createElement('div');\n el.className = 'well well-sm';\n return el;\n },\n getFormInputDescription: function(text) {\n var el = document.createElement('p');\n el.className = 'help-block';\n el.innerHTML = text;\n return el;\n },\n getHeaderButtonHolder: function() {\n var el = this.getButtonHolder();\n el.style.marginLeft = '10px';\n return el;\n },\n getButtonHolder: function() {\n var el = document.createElement('div');\n el.className = 'btn-group';\n return el;\n },\n getButton: function(text, icon, title) {\n var el = this._super(text, icon, title);\n el.className += 'btn btn-default';\n return el;\n },\n getTable: function() {\n var el = document.createElement('table');\n el.className = 'table table-bordered';\n el.style.width = 'auto';\n el.style.maxWidth = 'none';\n return el;\n },\n\n addInputError: function(input,text) {\n if(!input.controlgroup) return;\n input.controlgroup.className += ' has-error';\n if(!input.errmsg) {\n input.errmsg = document.createElement('p');\n input.errmsg.className = 'help-block errormsg';\n input.controlgroup.appendChild(input.errmsg);\n }\n else {\n input.errmsg.style.display = '';\n }\n\n input.errmsg.textContent = text;\n },\n removeInputError: function(input) {\n if(!input.errmsg) return;\n input.errmsg.style.display = 'none';\n input.controlgroup.className = input.controlgroup.className.replace(/\\s?has-error/g,'');\n },\n getTabHolder: function() {\n var el = document.createElement('div');\n el.innerHTML = \"
    \";\n el.className = 'rows';\n return el;\n },\n getTab: function(text) {\n var el = document.createElement('a');\n el.className = 'list-group-item';\n el.setAttribute('href','#');\n el.appendChild(text);\n return el;\n },\n markTabActive: function(tab) {\n tab.className += ' active';\n },\n markTabInactive: function(tab) {\n tab.className = tab.className.replace(/\\s?active/g,'');\n },\n getProgressBar: function() {\n var min = 0, max = 100, start = 0;\n\n var container = document.createElement('div');\n container.className = 'progress';\n\n var bar = document.createElement('div');\n bar.className = 'progress-bar';\n bar.setAttribute('role', 'progressbar');\n bar.setAttribute('aria-valuenow', start);\n bar.setAttribute('aria-valuemin', min);\n bar.setAttribute('aria-valuenax', max);\n bar.innerHTML = start + \"%\";\n container.appendChild(bar);\n\n return container;\n },\n updateProgressBar: function(progressBar, progress) {\n if (!progressBar) return;\n\n var bar = progressBar.firstChild;\n var percentage = progress + \"%\";\n bar.setAttribute('aria-valuenow', progress);\n bar.style.width = percentage;\n bar.innerHTML = percentage;\n },\n updateProgressBarUnknown: function(progressBar) {\n if (!progressBar) return;\n\n var bar = progressBar.firstChild;\n progressBar.className = 'progress progress-striped active';\n bar.removeAttribute('aria-valuenow');\n bar.style.width = '100%';\n bar.innerHTML = '';\n }\n});\n", "// Base Foundation theme\nJSONEditor.defaults.themes.foundation = JSONEditor.AbstractTheme.extend({\n getChildEditorHolder: function() {\n var el = document.createElement('div');\n el.style.marginBottom = '15px';\n return el;\n },\n getSelectInput: function(options) {\n var el = this._super(options);\n el.style.minWidth = 'none';\n el.style.padding = '5px';\n el.style.marginTop = '3px';\n return el;\n },\n getSwitcher: function(options) {\n var el = this._super(options);\n el.style.paddingRight = '8px';\n return el;\n },\n afterInputReady: function(input) {\n if(this.closest(input,'.compact')) {\n input.style.marginBottom = 0;\n }\n input.group = this.closest(input,'.form-control');\n },\n getFormInputLabel: function(text) {\n var el = this._super(text);\n el.style.display = 'inline-block';\n return el;\n },\n getFormInputField: function(type) {\n var el = this._super(type);\n el.style.width = '100%';\n el.style.marginBottom = type==='checkbox'? '0' : '12px';\n return el;\n },\n getFormInputDescription: function(text) {\n var el = document.createElement('p');\n el.textContent = text;\n el.style.marginTop = '-10px';\n el.style.fontStyle = 'italic';\n return el;\n },\n getIndentedPanel: function() {\n var el = document.createElement('div');\n el.className = 'panel';\n return el;\n },\n getHeaderButtonHolder: function() {\n var el = this.getButtonHolder();\n el.style.display = 'inline-block';\n el.style.marginLeft = '10px';\n el.style.verticalAlign = 'middle';\n return el;\n },\n getButtonHolder: function() {\n var el = document.createElement('div');\n el.className = 'button-group';\n return el;\n },\n getButton: function(text, icon, title) {\n var el = this._super(text, icon, title);\n el.className += ' small button';\n return el;\n },\n addInputError: function(input,text) {\n if(!input.group) return;\n input.group.className += ' error';\n \n if(!input.errmsg) {\n input.insertAdjacentHTML('afterend','');\n input.errmsg = input.parentNode.getElementsByClassName('error')[0];\n }\n else {\n input.errmsg.style.display = '';\n }\n \n input.errmsg.textContent = text;\n },\n removeInputError: function(input) {\n if(!input.errmsg) return;\n input.group.className = input.group.className.replace(/ error/g,'');\n input.errmsg.style.display = 'none';\n },\n getProgressBar: function() {\n var progressBar = document.createElement('div');\n progressBar.className = 'progress';\n\n var meter = document.createElement('span');\n meter.className = 'meter';\n meter.style.width = '0%';\n progressBar.appendChild(meter);\n return progressBar;\n },\n updateProgressBar: function(progressBar, progress) {\n if (!progressBar) return;\n progressBar.firstChild.style.width = progress + '%';\n },\n updateProgressBarUnknown: function(progressBar) {\n if (!progressBar) return;\n progressBar.firstChild.style.width = '100%';\n }\n});\n\n// Foundation 3 Specific Theme\nJSONEditor.defaults.themes.foundation3 = JSONEditor.defaults.themes.foundation.extend({\n getHeaderButtonHolder: function() {\n var el = this._super();\n el.style.fontSize = '.6em';\n return el;\n },\n getFormInputLabel: function(text) {\n var el = this._super(text);\n el.style.fontWeight = 'bold';\n return el;\n },\n getTabHolder: function() {\n var el = document.createElement('div');\n el.className = 'row';\n el.innerHTML = \"
    \";\n return el;\n },\n setGridColumnSize: function(el,size) {\n var sizes = ['zero','one','two','three','four','five','six','seven','eight','nine','ten','eleven','twelve'];\n el.className = 'columns '+sizes[size];\n },\n getTab: function(text) {\n var el = document.createElement('dd');\n var a = document.createElement('a');\n a.setAttribute('href','#');\n a.appendChild(text);\n el.appendChild(a);\n return el;\n },\n getTabContentHolder: function(tab_holder) {\n return tab_holder.children[1];\n },\n getTabContent: function() {\n var el = document.createElement('div');\n el.className = 'content active';\n el.style.paddingLeft = '5px';\n return el;\n },\n markTabActive: function(tab) {\n tab.className += ' active';\n },\n markTabInactive: function(tab) {\n tab.className = tab.className.replace(/\\s*active/g,'');\n },\n addTab: function(holder, tab) {\n holder.children[0].appendChild(tab);\n }\n});\n\n// Foundation 4 Specific Theme\nJSONEditor.defaults.themes.foundation4 = JSONEditor.defaults.themes.foundation.extend({\n getHeaderButtonHolder: function() {\n var el = this._super();\n el.style.fontSize = '.6em';\n return el;\n },\n setGridColumnSize: function(el,size) {\n el.className = 'columns large-'+size;\n },\n getFormInputDescription: function(text) {\n var el = this._super(text);\n el.style.fontSize = '.8rem';\n return el;\n },\n getFormInputLabel: function(text) {\n var el = this._super(text);\n el.style.fontWeight = 'bold';\n return el;\n }\n});\n\n// Foundation 5 Specific Theme\nJSONEditor.defaults.themes.foundation5 = JSONEditor.defaults.themes.foundation.extend({\n getFormInputDescription: function(text) {\n var el = this._super(text);\n el.style.fontSize = '.8rem';\n return el;\n },\n setGridColumnSize: function(el,size) {\n el.className = 'columns medium-'+size;\n },\n getButton: function(text, icon, title) {\n var el = this._super(text,icon,title);\n el.className = el.className.replace(/\\s*small/g,'') + ' tiny';\n return el;\n },\n getTabHolder: function() {\n var el = document.createElement('div');\n el.innerHTML = \"
    \";\n return el;\n },\n getTab: function(text) {\n var el = document.createElement('dd');\n var a = document.createElement('a');\n a.setAttribute('href','#');\n a.appendChild(text);\n el.appendChild(a);\n return el;\n },\n getTabContentHolder: function(tab_holder) {\n return tab_holder.children[1];\n },\n getTabContent: function() {\n var el = document.createElement('div');\n el.className = 'content active';\n el.style.paddingLeft = '5px';\n return el;\n },\n markTabActive: function(tab) {\n tab.className += ' active';\n },\n markTabInactive: function(tab) {\n tab.className = tab.className.replace(/\\s*active/g,'');\n },\n addTab: function(holder, tab) {\n holder.children[0].appendChild(tab);\n }\n});\n", "JSONEditor.defaults.themes.html = JSONEditor.AbstractTheme.extend({\n getFormInputLabel: function(text) {\n var el = this._super(text);\n el.style.display = 'block';\n el.style.marginBottom = '3px';\n el.style.fontWeight = 'bold';\n return el;\n },\n getFormInputDescription: function(text) {\n var el = this._super(text);\n el.style.fontSize = '.8em';\n el.style.margin = 0;\n el.style.display = 'inline-block';\n el.style.fontStyle = 'italic';\n return el;\n },\n getIndentedPanel: function() {\n var el = this._super();\n el.style.border = '1px solid #ddd';\n el.style.padding = '5px';\n el.style.margin = '5px';\n el.style.borderRadius = '3px';\n return el;\n },\n getChildEditorHolder: function() {\n var el = this._super();\n el.style.marginBottom = '8px';\n return el;\n },\n getHeaderButtonHolder: function() {\n var el = this.getButtonHolder();\n el.style.display = 'inline-block';\n el.style.marginLeft = '10px';\n el.style.fontSize = '.8em';\n el.style.verticalAlign = 'middle';\n return el;\n },\n getTable: function() {\n var el = this._super();\n el.style.borderBottom = '1px solid #ccc';\n el.style.marginBottom = '5px';\n return el;\n },\n addInputError: function(input, text) {\n input.style.borderColor = 'red';\n \n if(!input.errmsg) {\n var group = this.closest(input,'.form-control');\n input.errmsg = document.createElement('div');\n input.errmsg.setAttribute('class','errmsg');\n input.errmsg.style = input.errmsg.style || {};\n input.errmsg.style.color = 'red';\n group.appendChild(input.errmsg);\n }\n else {\n input.errmsg.style.display = 'block';\n }\n \n input.errmsg.innerHTML = '';\n input.errmsg.appendChild(document.createTextNode(text));\n },\n removeInputError: function(input) {\n input.style.borderColor = '';\n if(input.errmsg) input.errmsg.style.display = 'none';\n },\n getProgressBar: function() {\n var max = 100, start = 0;\n\n var progressBar = document.createElement('progress');\n progressBar.setAttribute('max', max);\n progressBar.setAttribute('value', start);\n return progressBar;\n },\n updateProgressBar: function(progressBar, progress) {\n if (!progressBar) return;\n progressBar.setAttribute('value', progress);\n },\n updateProgressBarUnknown: function(progressBar) {\n if (!progressBar) return;\n progressBar.removeAttribute('value');\n }\n});\n", "JSONEditor.defaults.themes.jqueryui = JSONEditor.AbstractTheme.extend({\n getTable: function() {\n var el = this._super();\n el.setAttribute('cellpadding',5);\n el.setAttribute('cellspacing',0);\n return el;\n },\n getTableHeaderCell: function(text) {\n var el = this._super(text);\n el.className = 'ui-state-active';\n el.style.fontWeight = 'bold';\n return el;\n },\n getTableCell: function() {\n var el = this._super();\n el.className = 'ui-widget-content';\n return el;\n },\n getHeaderButtonHolder: function() {\n var el = this.getButtonHolder();\n el.style.marginLeft = '10px';\n el.style.fontSize = '.6em';\n el.style.display = 'inline-block';\n return el;\n },\n getFormInputDescription: function(text) {\n var el = this.getDescription(text);\n el.style.marginLeft = '10px';\n el.style.display = 'inline-block';\n return el;\n },\n getFormControl: function(label, input, description) {\n var el = this._super(label,input,description);\n if(input.type === 'checkbox') {\n el.style.lineHeight = '25px';\n \n el.style.padding = '3px 0';\n }\n else {\n el.style.padding = '4px 0 8px 0';\n }\n return el;\n },\n getDescription: function(text) {\n var el = document.createElement('span');\n el.style.fontSize = '.8em';\n el.style.fontStyle = 'italic';\n el.textContent = text;\n return el;\n },\n getButtonHolder: function() {\n var el = document.createElement('div');\n el.className = 'ui-buttonset';\n el.style.fontSize = '.7em';\n return el;\n },\n getFormInputLabel: function(text) {\n var el = document.createElement('label');\n el.style.fontWeight = 'bold';\n el.style.display = 'block';\n el.textContent = text;\n return el;\n },\n getButton: function(text, icon, title) {\n var button = document.createElement(\"button\");\n button.className = 'ui-button ui-widget ui-state-default ui-corner-all';\n\n // Icon only\n if(icon && !text) {\n button.className += ' ui-button-icon-only';\n icon.className += ' ui-button-icon-primary ui-icon-primary';\n button.appendChild(icon);\n }\n // Icon and Text\n else if(icon) {\n button.className += ' ui-button-text-icon-primary';\n icon.className += ' ui-button-icon-primary ui-icon-primary';\n button.appendChild(icon);\n }\n // Text only\n else {\n button.className += ' ui-button-text-only';\n }\n\n var el = document.createElement('span');\n el.className = 'ui-button-text';\n el.textContent = text||title||\".\";\n button.appendChild(el);\n\n button.setAttribute('title',title);\n \n return button;\n },\n setButtonText: function(button,text, icon, title) {\n button.innerHTML = '';\n button.className = 'ui-button ui-widget ui-state-default ui-corner-all';\n\n // Icon only\n if(icon && !text) {\n button.className += ' ui-button-icon-only';\n icon.className += ' ui-button-icon-primary ui-icon-primary';\n button.appendChild(icon);\n }\n // Icon and Text\n else if(icon) {\n button.className += ' ui-button-text-icon-primary';\n icon.className += ' ui-button-icon-primary ui-icon-primary';\n button.appendChild(icon);\n }\n // Text only\n else {\n button.className += ' ui-button-text-only';\n }\n\n var el = document.createElement('span');\n el.className = 'ui-button-text';\n el.textContent = text||title||\".\";\n button.appendChild(el);\n\n button.setAttribute('title',title);\n },\n getIndentedPanel: function() {\n var el = document.createElement('div');\n el.className = 'ui-widget-content ui-corner-all';\n el.style.padding = '1em 1.4em';\n el.style.marginBottom = '20px';\n return el;\n },\n afterInputReady: function(input) {\n if(input.controls) return;\n input.controls = this.closest(input,'.form-control');\n },\n addInputError: function(input,text) {\n if(!input.controls) return;\n if(!input.errmsg) {\n input.errmsg = document.createElement('div');\n input.errmsg.className = 'ui-state-error';\n input.controls.appendChild(input.errmsg);\n }\n else {\n input.errmsg.style.display = '';\n }\n\n input.errmsg.textContent = text;\n },\n removeInputError: function(input) {\n if(!input.errmsg) return;\n input.errmsg.style.display = 'none';\n },\n markTabActive: function(tab) {\n tab.className = tab.className.replace(/\\s*ui-widget-header/g,'')+' ui-state-active';\n },\n markTabInactive: function(tab) {\n tab.className = tab.className.replace(/\\s*ui-state-active/g,'')+' ui-widget-header';\n }\n});\n", "JSONEditor.AbstractIconLib = Class.extend({\n mapping: {\n collapse: '',\n expand: '',\n \"delete\": '',\n edit: '',\n add: '',\n cancel: '',\n save: '',\n moveup: '',\n movedown: ''\n },\n icon_prefix: '',\n getIconClass: function(key) {\n if(this.mapping[key]) return this.icon_prefix+this.mapping[key];\n else return null;\n },\n getIcon: function(key) {\n var iconclass = this.getIconClass(key);\n \n if(!iconclass) return null;\n \n var i = document.createElement('i');\n i.className = iconclass;\n return i;\n }\n});\n", "JSONEditor.defaults.iconlibs.bootstrap2 = JSONEditor.AbstractIconLib.extend({\n mapping: {\n collapse: 'chevron-down',\n expand: 'chevron-up',\n \"delete\": 'trash',\n edit: 'pencil',\n add: 'plus',\n cancel: 'ban-circle',\n save: 'ok',\n moveup: 'arrow-up',\n movedown: 'arrow-down'\n },\n icon_prefix: 'icon-'\n});\n", "JSONEditor.defaults.iconlibs.bootstrap3 = JSONEditor.AbstractIconLib.extend({\n mapping: {\n collapse: 'chevron-down',\n expand: 'chevron-right',\n \"delete\": 'remove',\n edit: 'pencil',\n add: 'plus',\n cancel: 'floppy-remove',\n save: 'floppy-saved',\n moveup: 'arrow-up',\n movedown: 'arrow-down'\n },\n icon_prefix: 'glyphicon glyphicon-'\n});\n", "JSONEditor.defaults.iconlibs.fontawesome3 = JSONEditor.AbstractIconLib.extend({\n mapping: {\n collapse: 'chevron-down',\n expand: 'chevron-right',\n \"delete\": 'remove',\n edit: 'pencil',\n add: 'plus',\n cancel: 'ban-circle',\n save: 'save',\n moveup: 'arrow-up',\n movedown: 'arrow-down'\n },\n icon_prefix: 'icon-'\n});\n", "JSONEditor.defaults.iconlibs.fontawesome4 = JSONEditor.AbstractIconLib.extend({\n mapping: {\n collapse: 'caret-square-o-down',\n expand: 'caret-square-o-right',\n \"delete\": 'times',\n edit: 'pencil',\n add: 'plus',\n cancel: 'ban',\n save: 'save',\n moveup: 'arrow-up',\n movedown: 'arrow-down'\n },\n icon_prefix: 'fa fa-'\n});\n", "JSONEditor.defaults.iconlibs.foundation2 = JSONEditor.AbstractIconLib.extend({\n mapping: {\n collapse: 'minus',\n expand: 'plus',\n \"delete\": 'remove',\n edit: 'edit',\n add: 'add-doc',\n cancel: 'error',\n save: 'checkmark',\n moveup: 'up-arrow',\n movedown: 'down-arrow'\n },\n icon_prefix: 'foundicon-'\n});\n", "JSONEditor.defaults.iconlibs.foundation3 = JSONEditor.AbstractIconLib.extend({\n mapping: {\n collapse: 'minus',\n expand: 'plus',\n \"delete\": 'x',\n edit: 'pencil',\n add: 'page-add',\n cancel: 'x-circle',\n save: 'save',\n moveup: 'arrow-up',\n movedown: 'arrow-down'\n },\n icon_prefix: 'fi-'\n});\n", "JSONEditor.defaults.iconlibs.jqueryui = JSONEditor.AbstractIconLib.extend({\n mapping: {\n collapse: 'triangle-1-s',\n expand: 'triangle-1-e',\n \"delete\": 'trash',\n edit: 'pencil',\n add: 'plusthick',\n cancel: 'closethick',\n save: 'disk',\n moveup: 'arrowthick-1-n',\n movedown: 'arrowthick-1-s'\n },\n icon_prefix: 'ui-icon ui-icon-'\n});\n", "JSONEditor.defaults.templates[\"default\"] = function() {\n return {\n compile: function(template) {\n var matches = template.match(/{{\\s*([a-zA-Z0-9\\-_\\.]+)\\s*}}/g);\n var l = matches.length;\n\n // Shortcut if the template contains no variables\n if(!l) return function() { return template; };\n\n // Pre-compute the search/replace functions\n // This drastically speeds up template execution\n var replacements = [];\n var get_replacement = function(i) {\n var p = matches[i].replace(/[{}\\s]+/g,'').split('.');\n var n = p.length;\n var func;\n \n if(n > 1) {\n var cur;\n func = function(vars) {\n cur = vars;\n for(i=0; i= 0) {\n return 'multiselect';\n }\n});\n// Use the multiple editor for schemas with `oneOf` set\nJSONEditor.defaults.resolvers.unshift(function(schema) {\n // If this schema uses `oneOf`\n if(schema.oneOf) return \"multiple\";\n});\n", "/**\n * This is a small wrapper for using JSON Editor like a typical jQuery plugin.\n */\n(function() {\n if(window.jQuery || window.Zepto) {\n var $ = window.jQuery || window.Zepto;\n $.jsoneditor = JSONEditor.defaults;\n \n $.fn.jsoneditor = function(options) {\n var self = this;\n var editor = this.data('jsoneditor');\n if(options === 'value') {\n if(!editor) throw \"Must initialize jsoneditor before getting/setting the value\";\n \n // Set value\n if(arguments.length > 1) {\n editor.setValue(arguments[1]);\n }\n // Get value\n else {\n return editor.getValue();\n }\n }\n else if(options === 'validate') {\n if(!editor) throw \"Must initialize jsoneditor before validating\";\n \n // Validate a specific value\n if(arguments.length > 1) {\n return editor.validate(arguments[1]);\n }\n // Validate current value\n else {\n return editor.validate();\n }\n }\n else if(options === 'destroy') {\n if(editor) {\n editor.destroy();\n this.data('jsoneditor',null);\n }\n }\n else {\n // Destroy first\n if(editor) {\n editor.destroy();\n }\n \n // Create editor\n editor = new JSONEditor(this.get(0),options);\n this.data('jsoneditor',editor);\n \n // Setup event listeners\n editor.on('change',function() {\n self.trigger('change');\n });\n editor.on('ready',function() {\n self.trigger('ready');\n });\n }\n \n return this;\n };\n }\n})();\n", " window.JSONEditor = JSONEditor;\n})();\n" ] }