@colyseus/playground 0.15.0 → 0.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/asset-manifest.json +11 -9
- package/build/favicon.ico +0 -0
- package/build/index.html +1 -1
- package/build/index.js +1 -1
- package/build/index.js.map +2 -2
- package/build/index.mjs +1 -1
- package/build/index.mjs.map +2 -2
- package/build/logo192.png +0 -0
- package/build/logo512.png +0 -0
- package/build/static/css/main.97175480.css +13 -0
- package/build/static/css/main.97175480.css.map +1 -0
- package/build/static/js/787.1ad89818.chunk.js +2 -0
- package/build/static/js/{787.28cb0dcd.chunk.js.map → 787.1ad89818.chunk.js.map} +1 -1
- package/build/static/js/main.52f8cf2a.js +3 -0
- package/build/static/js/main.52f8cf2a.js.LICENSE.txt +134 -0
- package/build/static/js/main.52f8cf2a.js.map +1 -0
- package/build/static/media/favicon.cad7290b5f48941db9f836712c091ae7.svg +23 -0
- package/build/static/media/jsoneditor-icons.15f2789dd231f36d43a4.svg +749 -0
- package/package.json +3 -3
- package/build/static/css/main.65eb13cd.css +0 -6
- package/build/static/css/main.65eb13cd.css.map +0 -1
- package/build/static/js/787.28cb0dcd.chunk.js +0 -2
- package/build/static/js/main.d1739c94.js +0 -3
- package/build/static/js/main.d1739c94.js.LICENSE.txt +0 -63
- package/build/static/js/main.d1739c94.js.map +0 -1
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! For license information please see main.52f8cf2a.js.LICENSE.txt */
|
|
2
|
+
!function(){var e={366:function(e,t,n){!function(e){"use strict";function t(e,t){return t.forEach((function(t){t&&"string"!==typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(n){if("default"!==n&&!(n in e)){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}}))})),Object.freeze(e)}ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return null!==e&&"object"===typeof e&&e.buffer instanceof ArrayBuffer}),"undefined"===typeof globalThis&&"undefined"!==typeof window&&(window.globalThis=window);var i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},i(e,t)};function r(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function o(e,t,n,i){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(t){o(t)}}function a(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){e.done?n(e.value):r(e.value).then(s,a)}l((i=i.apply(e,t||[])).next())}))}function s(e,t){var n,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return l([e,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(n=1,i&&(r=2&a[0]?i.return:a[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;switch(i=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,i=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(r=(r=s.trys).length>0&&r[r.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){s.label=a[1];break}if(6===a[0]&&s.label<r[1]){s.label=r[1],r=a;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(a);break}r[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(l){a=[6,l],i=0}finally{n=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}}function a(e,t){t.headers=e.headers||{},t.statusMessage=e.statusText,t.statusCode=e.status,t.data=e.response}function l(e,t,n){return new Promise((function(i,r){n=n||{};var o,s,l,c=new XMLHttpRequest,u=n.body,h=n.headers||{};for(o in n.timeout&&(c.timeout=n.timeout),c.ontimeout=c.onerror=function(e){e.timeout="timeout"==e.type,r(e)},c.open(e,t.href||t),c.onload=function(){for(l=c.getAllResponseHeaders().trim().split(/[\r\n]+/),a(c,c);s=l.shift();)s=s.split(": "),c.headers[s.shift().toLowerCase()]=s.join(": ");if((s=c.headers["content-type"])&&~s.indexOf("application/json"))try{c.data=JSON.parse(c.data,n.reviver)}catch(e){return a(c,e),r(e)}(c.status>=400?r:i)(c)},typeof FormData<"u"&&u instanceof FormData||u&&"object"==typeof u&&(h["content-type"]="application/json",u=JSON.stringify(u)),c.withCredentials=!!n.withCredentials,h)c.setRequestHeader(o,h[o]);c.send(u)}))}var c,u=l.bind(l,"GET"),h=l.bind(l,"POST"),d=l.bind(l,"PATCH"),p=l.bind(l,"DELETE"),g=l.bind(l,"PUT"),f=u,m=h,v={del:p,get:f,patch:d,post:m,put:g,send:l},y=t({__proto__:null,default:v,del:p,get:f,patch:d,post:m,put:g,send:l},[v]);!function(e){e[e.CONSENTED=4e3]="CONSENTED",e[e.DEVMODE_RESTART=4010]="DEVMODE_RESTART"}(c||(c={}));var C=function(e){function t(t,n){var i=e.call(this,n)||this;return i.name="ServerError",i.code=t,i}return r(t,e),t}(Error);function b(e,t){if(this._offset=t,e instanceof ArrayBuffer)this._buffer=e,this._view=new DataView(this._buffer);else{if(!ArrayBuffer.isView(e))throw new Error("Invalid argument");this._buffer=e.buffer,this._view=new DataView(this._buffer,e.byteOffset,e.byteLength)}}function I(e,t,n){for(var i="",r=0,o=t,s=t+n;o<s;o++){var a=e.getUint8(o);if(0!==(128&a))if(192!==(224&a))if(224!==(240&a)){if(240!==(248&a))throw new Error("Invalid byte "+a.toString(16));(r=(7&a)<<18|(63&e.getUint8(++o))<<12|(63&e.getUint8(++o))<<6|(63&e.getUint8(++o))<<0)>=65536?(r-=65536,i+=String.fromCharCode(55296+(r>>>10),56320+(1023&r))):i+=String.fromCharCode(r)}else i+=String.fromCharCode((15&a)<<12|(63&e.getUint8(++o))<<6|(63&e.getUint8(++o))<<0);else i+=String.fromCharCode((31&a)<<6|63&e.getUint8(++o));else i+=String.fromCharCode(a)}return i}function A(e,t){void 0===t&&(t=0);var n=new b(e,t),i=n._parse();if(n._offset!==e.byteLength)throw new Error(e.byteLength-n._offset+" trailing bytes");return i}b.prototype._array=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=this._parse();return t},b.prototype._map=function(e){for(var t={},n=0;n<e;n++)t[this._parse()]=this._parse();return t},b.prototype._str=function(e){var t=I(this._view,this._offset,e);return this._offset+=e,t},b.prototype._bin=function(e){var t=this._buffer.slice(this._offset,this._offset+e);return this._offset+=e,t},b.prototype._parse=function(){var e,t=this._view.getUint8(this._offset++),n=0,i=0,r=0,o=0;if(t<192)return t<128?t:t<144?this._map(15&t):t<160?this._array(15&t):this._str(31&t);if(t>223)return-1*(255-t+1);switch(t){case 192:return null;case 194:return!1;case 195:return!0;case 196:return n=this._view.getUint8(this._offset),this._offset+=1,this._bin(n);case 197:return n=this._view.getUint16(this._offset),this._offset+=2,this._bin(n);case 198:return n=this._view.getUint32(this._offset),this._offset+=4,this._bin(n);case 199:if(n=this._view.getUint8(this._offset),i=this._view.getInt8(this._offset+1),this._offset+=2,-1===i){var s=this._view.getUint32(this._offset);return r=this._view.getInt32(this._offset+4),o=this._view.getUint32(this._offset+8),this._offset+=12,new Date(1e3*(4294967296*r+o)+s/1e6)}return[i,this._bin(n)];case 200:return n=this._view.getUint16(this._offset),i=this._view.getInt8(this._offset+2),this._offset+=3,[i,this._bin(n)];case 201:return n=this._view.getUint32(this._offset),i=this._view.getInt8(this._offset+4),this._offset+=5,[i,this._bin(n)];case 202:return e=this._view.getFloat32(this._offset),this._offset+=4,e;case 203:return e=this._view.getFloat64(this._offset),this._offset+=8,e;case 204:return e=this._view.getUint8(this._offset),this._offset+=1,e;case 205:return e=this._view.getUint16(this._offset),this._offset+=2,e;case 206:return e=this._view.getUint32(this._offset),this._offset+=4,e;case 207:return r=this._view.getUint32(this._offset)*Math.pow(2,32),o=this._view.getUint32(this._offset+4),this._offset+=8,r+o;case 208:return e=this._view.getInt8(this._offset),this._offset+=1,e;case 209:return e=this._view.getInt16(this._offset),this._offset+=2,e;case 210:return e=this._view.getInt32(this._offset),this._offset+=4,e;case 211:return r=this._view.getInt32(this._offset)*Math.pow(2,32),o=this._view.getUint32(this._offset+4),this._offset+=8,r+o;case 212:return i=this._view.getInt8(this._offset),this._offset+=1,0===i?void(this._offset+=1):[i,this._bin(1)];case 213:return i=this._view.getInt8(this._offset),this._offset+=1,[i,this._bin(2)];case 214:return i=this._view.getInt8(this._offset),this._offset+=1,-1===i?(e=this._view.getUint32(this._offset),this._offset+=4,new Date(1e3*e)):[i,this._bin(4)];case 215:return i=this._view.getInt8(this._offset),this._offset+=1,0===i?(r=this._view.getInt32(this._offset)*Math.pow(2,32),o=this._view.getUint32(this._offset+4),this._offset+=8,new Date(r+o)):-1===i?(r=this._view.getUint32(this._offset),o=this._view.getUint32(this._offset+4),this._offset+=8,new Date(1e3*(4294967296*(3&r)+o)+(r>>>2)/1e6)):[i,this._bin(8)];case 216:return i=this._view.getInt8(this._offset),this._offset+=1,[i,this._bin(16)];case 217:return n=this._view.getUint8(this._offset),this._offset+=1,this._str(n);case 218:return n=this._view.getUint16(this._offset),this._offset+=2,this._str(n);case 219:return n=this._view.getUint32(this._offset),this._offset+=4,this._str(n);case 220:return n=this._view.getUint16(this._offset),this._offset+=2,this._array(n);case 221:return n=this._view.getUint32(this._offset),this._offset+=4,this._array(n);case 222:return n=this._view.getUint16(this._offset),this._offset+=2,this._map(n);case 223:return n=this._view.getUint32(this._offset),this._offset+=4,this._map(n)}throw new Error("Could not parse")};var w=4294967295,x=17179869183;function S(e,t,n){for(var i=0,r=0,o=n.length;r<o;r++)(i=n.charCodeAt(r))<128?e.setUint8(t++,i):i<2048?(e.setUint8(t++,192|i>>6),e.setUint8(t++,128|63&i)):i<55296||i>=57344?(e.setUint8(t++,224|i>>12),e.setUint8(t++,128|i>>6&63),e.setUint8(t++,128|63&i)):(r++,i=65536+((1023&i)<<10|1023&n.charCodeAt(r)),e.setUint8(t++,240|i>>18),e.setUint8(t++,128|i>>12&63),e.setUint8(t++,128|i>>6&63),e.setUint8(t++,128|63&i))}function k(e){for(var t=0,n=0,i=0,r=e.length;i<r;i++)(t=e.charCodeAt(i))<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(i++,n+=4);return n}function E(e,t,n){var i=typeof n,r=0,o=0,s=0,a=0,l=0,c=0;if("string"===i){if((l=k(n))<32)e.push(160|l),c=1;else if(l<256)e.push(217,l),c=2;else if(l<65536)e.push(218,l>>8,l),c=3;else{if(!(l<4294967296))throw new Error("String too long");e.push(219,l>>24,l>>16,l>>8,l),c=5}return t.push({_str:n,_length:l,_offset:e.length}),c+l}if("number"===i)return Math.floor(n)===n&&isFinite(n)?n>=0?n<128?(e.push(n),1):n<256?(e.push(204,n),2):n<65536?(e.push(205,n>>8,n),3):n<4294967296?(e.push(206,n>>24,n>>16,n>>8,n),5):(s=n/Math.pow(2,32)>>0,a=n>>>0,e.push(207,s>>24,s>>16,s>>8,s,a>>24,a>>16,a>>8,a),9):n>=-32?(e.push(n),1):n>=-128?(e.push(208,n),2):n>=-32768?(e.push(209,n>>8,n),3):n>=-2147483648?(e.push(210,n>>24,n>>16,n>>8,n),5):(s=Math.floor(n/Math.pow(2,32)),a=n>>>0,e.push(211,s>>24,s>>16,s>>8,s,a>>24,a>>16,a>>8,a),9):(e.push(203),t.push({_float:n,_length:8,_offset:e.length}),9);if("object"===i){if(null===n)return e.push(192),1;if(Array.isArray(n)){if((l=n.length)<16)e.push(144|l),c=1;else if(l<65536)e.push(220,l>>8,l),c=3;else{if(!(l<4294967296))throw new Error("Array too large");e.push(221,l>>24,l>>16,l>>8,l),c=5}for(r=0;r<l;r++)c+=E(e,t,n[r]);return c}if(n instanceof Date){var u=n.getTime(),h=Math.floor(u/1e3),d=1e6*(u-1e3*h);return h>=0&&d>=0&&h<=x?0===d&&h<=w?(e.push(214,255,h>>24,h>>16,h>>8,h),6):(s=h/4294967296,a=4294967295&h,e.push(215,255,d>>22,d>>14,d>>6,s,a>>24,a>>16,a>>8,a),10):(s=Math.floor(h/4294967296),a=h>>>0,e.push(199,12,255,d>>24,d>>16,d>>8,d,s>>24,s>>16,s>>8,s,a>>24,a>>16,a>>8,a),15)}if(n instanceof ArrayBuffer){if((l=n.byteLength)<256)e.push(196,l),c=2;else if(l<65536)e.push(197,l>>8,l),c=3;else{if(!(l<4294967296))throw new Error("Buffer too large");e.push(198,l>>24,l>>16,l>>8,l),c=5}return t.push({_bin:n,_length:l,_offset:e.length}),c+l}if("function"===typeof n.toJSON)return E(e,t,n.toJSON());var p=[],g="",f=Object.keys(n);for(r=0,o=f.length;r<o;r++)void 0!==n[g=f[r]]&&"function"!==typeof n[g]&&p.push(g);if((l=p.length)<16)e.push(128|l),c=1;else if(l<65536)e.push(222,l>>8,l),c=3;else{if(!(l<4294967296))throw new Error("Object too large");e.push(223,l>>24,l>>16,l>>8,l),c=5}for(r=0;r<l;r++)c+=E(e,t,g=p[r]),c+=E(e,t,n[g]);return c}if("boolean"===i)return e.push(n?195:194),1;if("undefined"===i)return e.push(192),1;if("function"===typeof n.toJSON)return E(e,t,n.toJSON());throw new Error("Could not encode")}function T(e){var t=[],n=[],i=E(t,n,e),r=new ArrayBuffer(i),o=new DataView(r),s=0,a=0,l=-1;n.length>0&&(l=n[0]._offset);for(var c,u=0,h=0,d=0,p=t.length;d<p;d++)if(o.setUint8(a+d,t[d]),d+1===l){if(u=(c=n[s])._length,h=a+l,c._bin)for(var g=new Uint8Array(c._bin),f=0;f<u;f++)o.setUint8(h+f,g[f]);else c._str?S(o,h,c._str):void 0!==c._float&&o.setFloat64(h,c._float);a+=u,n[++s]&&(l=n[s]._offset)}return r}var R,_,$=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")},L=globalThis.WebSocket||$,N=function(){function e(e){this.events=e}return e.prototype.send=function(e){e instanceof ArrayBuffer?this.ws.send(e):Array.isArray(e)&&this.ws.send(new Uint8Array(e).buffer)},e.prototype.connect=function(e){this.ws=new L(e,this.protocols),this.ws.binaryType="arraybuffer",this.ws.onopen=this.events.onopen,this.ws.onmessage=this.events.onmessage,this.ws.onclose=this.events.onclose,this.ws.onerror=this.events.onerror},e.prototype.close=function(e,t){this.ws.close(e,t)},Object.defineProperty(e.prototype,"isOpen",{get:function(){return this.ws.readyState===L.OPEN},enumerable:!1,configurable:!0}),e}(),M=function(){function e(){this.events={},this.transport=new N(this.events)}return e.prototype.send=function(e){this.transport.send(e)},e.prototype.connect=function(e){this.transport.connect(e)},e.prototype.close=function(e,t){this.transport.close(e,t)},Object.defineProperty(e.prototype,"isOpen",{get:function(){return this.transport.isOpen},enumerable:!1,configurable:!0}),e}();function P(e,t){for(var n=e[t++],i="",r=0,o=t,s=t+n;o<s;o++){var a=e[o];if(0!==(128&a))if(192!==(224&a))if(224!==(240&a)){if(240!==(248&a))throw new Error("Invalid byte "+a.toString(16));(r=(7&a)<<18|(63&e[++o])<<12|(63&e[++o])<<6|(63&e[++o])<<0)>=65536?(r-=65536,i+=String.fromCharCode(55296+(r>>>10),56320+(1023&r))):i+=String.fromCharCode(r)}else i+=String.fromCharCode((15&a)<<12|(63&e[++o])<<6|(63&e[++o])<<0);else i+=String.fromCharCode((31&a)<<6|63&e[++o]);else i+=String.fromCharCode(a)}return i}function O(e){void 0===e&&(e="");for(var t=0,n=0,i=0,r=e.length;i<r;i++)(t=e.charCodeAt(i))<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(i++,n+=4);return n+1}e.Protocol=void 0,(_=e.Protocol||(e.Protocol={}))[_.HANDSHAKE=9]="HANDSHAKE",_[_.JOIN_ROOM=10]="JOIN_ROOM",_[_.ERROR=11]="ERROR",_[_.LEAVE_ROOM=12]="LEAVE_ROOM",_[_.ROOM_DATA=13]="ROOM_DATA",_[_.ROOM_STATE=14]="ROOM_STATE",_[_.ROOM_STATE_PATCH=15]="ROOM_STATE_PATCH",_[_.ROOM_DATA_SCHEMA=16]="ROOM_DATA_SCHEMA",_[_.ROOM_DATA_BYTES=17]="ROOM_DATA_BYTES",e.ErrorCode=void 0,(R=e.ErrorCode||(e.ErrorCode={}))[R.MATCHMAKE_NO_HANDLER=4210]="MATCHMAKE_NO_HANDLER",R[R.MATCHMAKE_INVALID_CRITERIA=4211]="MATCHMAKE_INVALID_CRITERIA",R[R.MATCHMAKE_INVALID_ROOM_ID=4212]="MATCHMAKE_INVALID_ROOM_ID",R[R.MATCHMAKE_UNHANDLED=4213]="MATCHMAKE_UNHANDLED",R[R.MATCHMAKE_EXPIRED=4214]="MATCHMAKE_EXPIRED",R[R.AUTH_FAILED=4215]="AUTH_FAILED",R[R.APPLICATION_ERROR=4216]="APPLICATION_ERROR";var B={};function W(e,t){B[e]=t}function F(e){var t=B[e];if(!t)throw new Error("missing serializer: "+e);return t}var H=function(){return{events:{},emit:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];(this.events[e]||[]).forEach((function(e){return e.apply(void 0,n)}))},on:function(e,t){var n=this;return(this.events[e]=this.events[e]||[]).push(t),function(){return n.events[e]=(n.events[e]||[]).filter((function(e){return e!==t}))}}}},D=function(){function e(){this.handlers=[]}return e.prototype.register=function(e,t){return this.handlers.push(e),this},e.prototype.invoke=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.handlers.forEach((function(n){return n.apply(e,t)}))},e.prototype.invokeAsync=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return Promise.all(this.handlers.map((function(n){return n.apply(e,t)})))},e.prototype.remove=function(e){var t=this.handlers.indexOf(e);this.handlers[t]=this.handlers[this.handlers.length-1],this.handlers.pop()},e.prototype.clear=function(){this.handlers=[]},e}();function G(){var e=new D;function t(t){return e.register(t,null===this)}return t.once=function(t){var n=function n(){for(var i=[],r=0;r<arguments.length;r++)i[r]=arguments[r];t.apply(this,i),e.remove(n)};e.register(n)},t.remove=function(t){return e.remove(t)},t.invoke=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.invoke.apply(e,t)},t.invokeAsync=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.invokeAsync.apply(e,t)},t.clear=function(){return e.clear()},t}function V(e){var t={exports:{}};return e(t,t.exports),t.exports}"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof n.g?n.g:"undefined"!==typeof self&&self;var j,Z,z=V((function(e,t){!function(e,n){n(t)}(0,(function(e){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},t(e,n)};function n(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}function i(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,n,s):r(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s}function r(e,t,n){if(n||2===arguments.length)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var o,s=255,a=213;e.OPERATION=void 0,(o=e.OPERATION||(e.OPERATION={}))[o.ADD=128]="ADD",o[o.REPLACE=0]="REPLACE",o[o.DELETE=64]="DELETE",o[o.DELETE_AND_ADD=192]="DELETE_AND_ADD",o[o.TOUCH=1]="TOUCH",o[o.CLEAR=10]="CLEAR";var l=function(){function t(e,t,n){this.changed=!1,this.changes=new Map,this.allChanges=new Set,this.caches={},this.currentCustomOperation=0,this.ref=e,this.setParent(t,n)}return t.prototype.setParent=function(e,t,n){var i=this;if(this.indexes||(this.indexes=this.ref instanceof Re?this.ref._definition.indexes:{}),this.parent=e,this.parentIndex=n,t)if(this.root=t,this.ref instanceof Re){var r=this.ref._definition;for(var o in r.schema){var s=this.ref[o];if(s&&s.$changes){var a=r.indexes[o];s.$changes.setParent(this.ref,t,a)}}}else"object"===typeof this.ref&&this.ref.forEach((function(e,t){if(e instanceof Re){var n=e.$changes,r=i.ref.$changes.indexes[t];n.setParent(i.ref,i.root,r)}}))},t.prototype.operation=function(e){this.changes.set(--this.currentCustomOperation,e)},t.prototype.change=function(t,n){void 0===n&&(n=e.OPERATION.ADD);var i="number"===typeof t?t:this.indexes[t];this.assertValidIndex(i,t);var r=this.changes.get(i);r&&r.op!==e.OPERATION.DELETE&&r.op!==e.OPERATION.TOUCH||this.changes.set(i,{op:r&&r.op===e.OPERATION.DELETE?e.OPERATION.DELETE_AND_ADD:n,index:i}),this.allChanges.add(i),this.changed=!0,this.touchParents()},t.prototype.touch=function(t){var n="number"===typeof t?t:this.indexes[t];this.assertValidIndex(n,t),this.changes.has(n)||this.changes.set(n,{op:e.OPERATION.TOUCH,index:n}),this.allChanges.add(n),this.touchParents()},t.prototype.touchParents=function(){this.parent&&this.parent.$changes.touch(this.parentIndex)},t.prototype.getType=function(e){if(this.ref._definition)return(t=this.ref._definition).schema[t.fieldsByIndex[e]];var t,n=(t=this.parent._definition).schema[t.fieldsByIndex[this.parentIndex]];return Object.values(n)[0]},t.prototype.getChildrenFilter=function(){var e=this.parent._definition.childFilters;return e&&e[this.parentIndex]},t.prototype.getValue=function(e){return this.ref.getByIndex(e)},t.prototype.delete=function(t){var n="number"===typeof t?t:this.indexes[t];if(void 0!==n){var i=this.getValue(n);this.changes.set(n,{op:e.OPERATION.DELETE,index:n}),this.allChanges.delete(n),delete this.caches[n],i&&i.$changes&&(i.$changes.parent=void 0),this.changed=!0,this.touchParents()}else console.warn("@colyseus/schema ".concat(this.ref.constructor.name,": trying to delete non-existing index: ").concat(t," (").concat(n,")"))},t.prototype.discard=function(t,n){var i=this;void 0===t&&(t=!1),void 0===n&&(n=!1),this.ref instanceof Re||this.changes.forEach((function(t){if(t.op===e.OPERATION.DELETE){var n=i.ref.getIndex(t.index);delete i.indexes[n]}})),this.changes.clear(),this.changed=t,n&&this.allChanges.clear(),this.currentCustomOperation=0},t.prototype.discardAll=function(){var e=this;this.changes.forEach((function(t){var n=e.getValue(t.index);n&&n.$changes&&n.$changes.discardAll()})),this.discard()},t.prototype.cache=function(e,t){this.caches[e]=t},t.prototype.clone=function(){return new t(this.ref,this.parent,this.root)},t.prototype.ensureRefId=function(){void 0===this.refId&&(this.refId=this.root.getNextUniqueId())},t.prototype.assertValidIndex=function(e,t){if(void 0===e)throw new Error('ChangeTree: missing index for field "'.concat(t,'"'))},t}();function c(e,t,n,i){return e[t]||(e[t]=[]),e[t].push(n),null===i||void 0===i||i.forEach((function(e,t){return n(e,t)})),function(){return h(e[t],e[t].indexOf(n))}}function u(t){var n=this,i="string"!==typeof this.$changes.getType();this.$items.forEach((function(r,o){t.push({refId:n.$changes.refId,op:e.OPERATION.DELETE,field:o,value:void 0,previousValue:r}),i&&n.$changes.root.removeRef(r.$changes.refId)}))}function h(e,t){if(-1===t||t>=e.length)return!1;for(var n=e.length-1,i=t;i<n;i++)e[i]=e[i+1];return e.length=n,!0}var d=function(e,t){var n=e.toString(),i=t.toString();return n<i?-1:n>i?1:0};function p(e){return e.$proxy=!0,e=new Proxy(e,{get:function(e,t){return"symbol"===typeof t||isNaN(t)?e[t]:e.at(t)},set:function(e,t,n){if("symbol"===typeof t||isNaN(t))e[t]=n;else{var i=Array.from(e.$items.keys()),r=parseInt(i[t]||t);void 0===n||null===n?e.deleteAt(r):e.setAt(r,n)}return!0},deleteProperty:function(e,t){return"number"===typeof t?e.deleteAt(t):delete e[t],!0}})}var g=function(){function t(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.$changes=new l(this),this.$items=new Map,this.$indexes=new Map,this.$refId=0,this.push.apply(this,e)}return t.prototype.onAdd=function(t,n){return void 0===n&&(n=!0),c(this.$callbacks||(this.$callbacks=[]),e.OPERATION.ADD,t,n?this.$items:void 0)},t.prototype.onRemove=function(t){return c(this.$callbacks||(this.$callbacks=[]),e.OPERATION.DELETE,t)},t.prototype.onChange=function(t){return c(this.$callbacks||(this.$callbacks=[]),e.OPERATION.REPLACE,t)},t.is=function(e){return Array.isArray(e)||void 0!==e.array},Object.defineProperty(t.prototype,"length",{get:function(){return this.$items.size},set:function(e){0===e?this.clear():this.splice(e,this.length-e)},enumerable:!1,configurable:!0}),t.prototype.push=function(){for(var e,t=this,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return n.forEach((function(n){e=t.$refId++,t.setAt(e,n)})),e},t.prototype.pop=function(){var e=Array.from(this.$indexes.values()).pop();if(void 0!==e){this.$changes.delete(e),this.$indexes.delete(e);var t=this.$items.get(e);return this.$items.delete(e),t}},t.prototype.at=function(e){var t=Array.from(this.$items.keys())[e];return this.$items.get(t)},t.prototype.setAt=function(t,n){var i,r;void 0!==n.$changes&&n.$changes.setParent(this,this.$changes.root,t);var o=null!==(r=null===(i=this.$changes.indexes[t])||void 0===i?void 0:i.op)&&void 0!==r?r:e.OPERATION.ADD;this.$changes.indexes[t]=t,this.$indexes.set(t,t),this.$items.set(t,n),this.$changes.change(t,o)},t.prototype.deleteAt=function(e){var t=Array.from(this.$items.keys())[e];return void 0!==t&&this.$deleteAt(t)},t.prototype.$deleteAt=function(e){return this.$changes.delete(e),this.$indexes.delete(e),this.$items.delete(e)},t.prototype.clear=function(t){this.$changes.discard(!0,!0),this.$changes.indexes={},this.$indexes.clear(),t&&u.call(this,t),this.$items.clear(),this.$changes.operation({index:0,op:e.OPERATION.CLEAR}),this.$changes.touchParents()},t.prototype.concat=function(){for(var e,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return new(t.bind.apply(t,r([void 0],(e=Array.from(this.$items.values())).concat.apply(e,n),!1)))},t.prototype.join=function(e){return Array.from(this.$items.values()).join(e)},t.prototype.reverse=function(){var e=this,t=Array.from(this.$items.keys());return Array.from(this.$items.values()).reverse().forEach((function(n,i){e.setAt(t[i],n)})),this},t.prototype.shift=function(){var e=Array.from(this.$items.keys()).shift();if(void 0!==e){var t=this.$items.get(e);return this.$deleteAt(e),t}},t.prototype.slice=function(e,n){return new(t.bind.apply(t,r([void 0],Array.from(this.$items.values()).slice(e,n),!1)))},t.prototype.sort=function(e){var t=this;void 0===e&&(e=d);var n=Array.from(this.$items.keys());return Array.from(this.$items.values()).sort(e).forEach((function(e,i){t.setAt(n[i],e)})),this},t.prototype.splice=function(e,t){void 0===t&&(t=this.length-e);for(var n=Array.from(this.$items.keys()),i=[],r=e;r<e+t;r++)i.push(this.$items.get(n[r])),this.$deleteAt(n[r]);return i},t.prototype.unshift=function(){for(var e=this,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var i=this.length,r=t.length,o=Array.from(this.$items.values());return t.forEach((function(t,n){e.setAt(n,t)})),o.forEach((function(t,n){e.setAt(r+n,t)})),i+r},t.prototype.indexOf=function(e,t){return Array.from(this.$items.values()).indexOf(e,t)},t.prototype.lastIndexOf=function(e,t){return void 0===t&&(t=this.length-1),Array.from(this.$items.values()).lastIndexOf(e,t)},t.prototype.every=function(e,t){return Array.from(this.$items.values()).every(e,t)},t.prototype.some=function(e,t){return Array.from(this.$items.values()).some(e,t)},t.prototype.forEach=function(e,t){Array.from(this.$items.values()).forEach(e,t)},t.prototype.map=function(e,t){return Array.from(this.$items.values()).map(e,t)},t.prototype.filter=function(e,t){return Array.from(this.$items.values()).filter(e,t)},t.prototype.reduce=function(e,t){return Array.prototype.reduce.apply(Array.from(this.$items.values()),arguments)},t.prototype.reduceRight=function(e,t){return Array.prototype.reduceRight.apply(Array.from(this.$items.values()),arguments)},t.prototype.find=function(e,t){return Array.from(this.$items.values()).find(e,t)},t.prototype.findIndex=function(e,t){return Array.from(this.$items.values()).findIndex(e,t)},t.prototype.fill=function(e,t,n){throw new Error("ArraySchema#fill() not implemented")},t.prototype.copyWithin=function(e,t,n){throw new Error("ArraySchema#copyWithin() not implemented")},t.prototype.toString=function(){return this.$items.toString()},t.prototype.toLocaleString=function(){return this.$items.toLocaleString()},t.prototype[Symbol.iterator]=function(){return Array.from(this.$items.values())[Symbol.iterator]()},t.prototype.entries=function(){return this.$items.entries()},t.prototype.keys=function(){return this.$items.keys()},t.prototype.values=function(){return this.$items.values()},t.prototype.includes=function(e,t){return Array.from(this.$items.values()).includes(e,t)},t.prototype.flatMap=function(e,t){throw new Error("ArraySchema#flatMap() is not supported.")},t.prototype.flat=function(e){throw new Error("ArraySchema#flat() is not supported.")},t.prototype.setIndex=function(e,t){this.$indexes.set(e,t)},t.prototype.getIndex=function(e){return this.$indexes.get(e)},t.prototype.getByIndex=function(e){return this.$items.get(this.$indexes.get(e))},t.prototype.deleteByIndex=function(e){var t=this.$indexes.get(e);this.$items.delete(t),this.$indexes.delete(e)},t.prototype.toArray=function(){return Array.from(this.$items.values())},t.prototype.toJSON=function(){return this.toArray().map((function(e){return"function"===typeof e.toJSON?e.toJSON():e}))},t.prototype.clone=function(e){return e?new(t.bind.apply(t,r([void 0],Array.from(this.$items.values()),!1))):new(t.bind.apply(t,r([void 0],this.map((function(e){return e.$changes?e.clone():e})),!1)))},t}();function f(e){return e.$proxy=!0,e=new Proxy(e,{get:function(e,t){return"symbol"!==typeof t&&"undefined"===typeof e[t]?e.get(t):e[t]},set:function(e,t,n){return"symbol"!==typeof t&&-1===t.indexOf("$")&&"onAdd"!==t&&"onRemove"!==t&&"onChange"!==t?e.set(t,n):e[t]=n,!0},deleteProperty:function(e,t){return e.delete(t),!0}})}var m=function(){function t(e){var n=this;if(this.$changes=new l(this),this.$items=new Map,this.$indexes=new Map,this.$refId=0,e)if(e instanceof Map||e instanceof t)e.forEach((function(e,t){return n.set(t,e)}));else for(var i in e)this.set(i,e[i])}return t.prototype.onAdd=function(t,n){return void 0===n&&(n=!0),c(this.$callbacks||(this.$callbacks=[]),e.OPERATION.ADD,t,n?this.$items:void 0)},t.prototype.onRemove=function(t){return c(this.$callbacks||(this.$callbacks=[]),e.OPERATION.DELETE,t)},t.prototype.onChange=function(t){return c(this.$callbacks||(this.$callbacks=[]),e.OPERATION.REPLACE,t)},t.is=function(e){return void 0!==e.map},t.prototype[Symbol.iterator]=function(){return this.$items[Symbol.iterator]()},Object.defineProperty(t.prototype,Symbol.toStringTag,{get:function(){return this.$items[Symbol.toStringTag]},enumerable:!1,configurable:!0}),t.prototype.set=function(t,n){if(void 0===n||null===n)throw new Error("MapSchema#set('".concat(t,"', ").concat(n,"): trying to set ").concat(n," value on '").concat(t,"'."));var i="undefined"!==typeof this.$changes.indexes[t],r=i?this.$changes.indexes[t]:this.$refId++,o=i?e.OPERATION.REPLACE:e.OPERATION.ADD,s=void 0!==n.$changes;return s&&n.$changes.setParent(this,this.$changes.root,r),i?s&&this.$items.get(t)!==n&&(o=e.OPERATION.ADD):(this.$changes.indexes[t]=r,this.$indexes.set(r,t)),this.$items.set(t,n),this.$changes.change(t,o),this},t.prototype.get=function(e){return this.$items.get(e)},t.prototype.delete=function(e){return this.$changes.delete(e),this.$items.delete(e)},t.prototype.clear=function(t){this.$changes.discard(!0,!0),this.$changes.indexes={},this.$indexes.clear(),t&&u.call(this,t),this.$items.clear(),this.$changes.operation({index:0,op:e.OPERATION.CLEAR}),this.$changes.touchParents()},t.prototype.has=function(e){return this.$items.has(e)},t.prototype.forEach=function(e){this.$items.forEach(e)},t.prototype.entries=function(){return this.$items.entries()},t.prototype.keys=function(){return this.$items.keys()},t.prototype.values=function(){return this.$items.values()},Object.defineProperty(t.prototype,"size",{get:function(){return this.$items.size},enumerable:!1,configurable:!0}),t.prototype.setIndex=function(e,t){this.$indexes.set(e,t)},t.prototype.getIndex=function(e){return this.$indexes.get(e)},t.prototype.getByIndex=function(e){return this.$items.get(this.$indexes.get(e))},t.prototype.deleteByIndex=function(e){var t=this.$indexes.get(e);this.$items.delete(t),this.$indexes.delete(e)},t.prototype.toJSON=function(){var e={};return this.forEach((function(t,n){e[n]="function"===typeof t.toJSON?t.toJSON():t})),e},t.prototype.clone=function(e){var n;return e?n=Object.assign(new t,this):(n=new t,this.forEach((function(e,t){e.$changes?n.set(t,e.clone()):n.set(t,e)}))),n},t}(),v={};function y(e,t){v[e]=t}function C(e){return v[e]}var b=function(){function e(){this.indexes={},this.fieldsByIndex={},this.deprecated={},this.descriptors={}}return e.create=function(t){var n=new e;return n.schema=Object.assign({},t&&t.schema||{}),n.indexes=Object.assign({},t&&t.indexes||{}),n.fieldsByIndex=Object.assign({},t&&t.fieldsByIndex||{}),n.descriptors=Object.assign({},t&&t.descriptors||{}),n.deprecated=Object.assign({},t&&t.deprecated||{}),n},e.prototype.addField=function(e,t){var n=this.getNextFieldIndex();this.fieldsByIndex[n]=e,this.indexes[e]=n,this.schema[e]=Array.isArray(t)?{array:t[0]}:t},e.prototype.hasField=function(e){return void 0!==this.indexes[e]},e.prototype.addFilter=function(e,t){return this.filters||(this.filters={},this.indexesWithFilters=[]),this.filters[this.indexes[e]]=t,this.indexesWithFilters.push(this.indexes[e]),!0},e.prototype.addChildrenFilter=function(e,t){var n=this.indexes[e],i=this.schema[e];if(C(Object.keys(i)[0]))return this.childFilters||(this.childFilters={}),this.childFilters[n]=t,!0;console.warn("@filterChildren: field '".concat(e,"' can't have children. Ignoring filter."))},e.prototype.getChildrenFilter=function(e){return this.childFilters&&this.childFilters[this.indexes[e]]},e.prototype.getNextFieldIndex=function(){return Object.keys(this.schema||{}).length},e}();function I(e){return e._context&&e._context.useFilters}var A=function(){function e(){this.types={},this.schemas=new Map,this.useFilters=!1}return e.prototype.has=function(e){return this.schemas.has(e)},e.prototype.get=function(e){return this.types[e]},e.prototype.add=function(e,t){void 0===t&&(t=this.schemas.size),e._definition=b.create(e._definition),e._typeid=t,this.types[t]=e,this.schemas.set(e,t)},e.create=function(t){return void 0===t&&(t={}),function(n){return t.context||(t.context=new e),x(n,t)}},e}(),w=new A;function x(e,t){return void 0===t&&(t={}),function(n,i){var o=t.context||w,s=n.constructor;if(s._context=o,!e)throw new Error("".concat(s.name,': @type() reference provided for "').concat(i,"\" is undefined. Make sure you don't have any circular dependencies."));o.has(s)||o.add(s);var a=s._definition;if(a.addField(i,e),a.descriptors[i]){if(a.deprecated[i])return;try{throw new Error("@colyseus/schema: Duplicate '".concat(i,"' definition on '").concat(s.name,"'.\nCheck @type() annotation"))}catch(v){var l=v.stack.split("\n")[4].trim();throw new Error("".concat(v.message," ").concat(l))}}var c=g.is(e),u=!c&&m.is(e);if("string"!==typeof e&&!Re.is(e)){var h=Object.values(e)[0];"string"===typeof h||o.has(h)||o.add(h)}if(t.manual)a.descriptors[i]={enumerable:!0,configurable:!0,writable:!0};else{var d="_".concat(i);a.descriptors[d]={enumerable:!1,configurable:!1,writable:!0},a.descriptors[i]={get:function(){return this[d]},set:function(e){e!==this[d]&&(void 0!==e&&null!==e?(!c||e instanceof g||(e=new(g.bind.apply(g,r([void 0],e,!1)))),!u||e instanceof m||(e=new m(e)),void 0===e.$proxy&&(u?e=f(e):c&&(e=p(e))),this.$changes.change(i),e.$changes&&e.$changes.setParent(this,this.$changes.root,this._definition.indexes[i])):this[d]&&this.$changes.delete(i),this[d]=e)},enumerable:!0,configurable:!0}}}}function S(e){return function(t,n){var i=t.constructor;i._definition.addFilter(n,e)&&(i._context.useFilters=!0)}}function k(e){return function(t,n){var i=t.constructor;i._definition.addChildrenFilter(n,e)&&(i._context.useFilters=!0)}}function E(e){return void 0===e&&(e=!0),function(t,n){var i=t.constructor._definition;i.deprecated[n]=!0,e&&(i.descriptors[n]={get:function(){throw new Error("".concat(n," is deprecated."))},set:function(e){},enumerable:!1,configurable:!0})}}function T(e,t,n){for(var i in void 0===n&&(n={}),n.context||(n.context=e._context||n.context||w),t)x(t[i],n)(e.prototype,i);return e}function R(e){for(var t=0,n=0,i=0,r=e.length;i<r;i++)(t=e.charCodeAt(i))<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(i++,n+=4);return n}function _(e,t,n){for(var i=0,r=0,o=n.length;r<o;r++)(i=n.charCodeAt(r))<128?e[t++]=i:i<2048?(e[t++]=192|i>>6,e[t++]=128|63&i):i<55296||i>=57344?(e[t++]=224|i>>12,e[t++]=128|i>>6&63,e[t++]=128|63&i):(r++,i=65536+((1023&i)<<10|1023&n.charCodeAt(r)),e[t++]=240|i>>18,e[t++]=128|i>>12&63,e[t++]=128|i>>6&63,e[t++]=128|63&i)}function $(e,t){e.push(255&t)}function L(e,t){e.push(255&t)}function N(e,t){e.push(255&t),e.push(t>>8&255)}function M(e,t){e.push(255&t),e.push(t>>8&255)}function P(e,t){e.push(255&t),e.push(t>>8&255),e.push(t>>16&255),e.push(t>>24&255)}function O(e,t){var n=t>>24,i=t>>16,r=t>>8,o=t;e.push(255&o),e.push(255&r),e.push(255&i),e.push(255&n)}function B(e,t){var n=Math.floor(t/Math.pow(2,32));O(e,t>>>0),O(e,n)}function W(e,t){var n=t/Math.pow(2,32)>>0;O(e,t>>>0),O(e,n)}function F(e,t){j(e,t)}function H(e,t){Z(e,t)}var D=new Int32Array(2),G=new Float32Array(D.buffer),V=new Float64Array(D.buffer);function j(e,t){G[0]=t,P(e,D[0])}function Z(e,t){V[0]=t,P(e,D[0]),P(e,D[1])}function z(e,t){return L(e,t?1:0)}function K(e,t){t||(t="");var n=R(t),i=0;if(n<32)e.push(160|n),i=1;else if(n<256)e.push(217),L(e,n),i=2;else if(n<65536)e.push(218),M(e,n),i=3;else{if(!(n<4294967296))throw new Error("String too long");e.push(219),O(e,n),i=5}return _(e,e.length,t),i+n}function X(e,t){return isNaN(t)?X(e,0):isFinite(t)?t!==(0|t)?(e.push(203),Z(e,t),9):t>=0?t<128?(L(e,t),1):t<256?(e.push(204),L(e,t),2):t<65536?(e.push(205),M(e,t),3):t<4294967296?(e.push(206),O(e,t),5):(e.push(207),W(e,t),9):t>=-32?(e.push(224|t+32),1):t>=-128?(e.push(208),$(e,t),2):t>=-32768?(e.push(209),N(e,t),3):t>=-2147483648?(e.push(210),P(e,t),5):(e.push(211),B(e,t),9):X(e,t>0?Number.MAX_SAFE_INTEGER:-Number.MAX_SAFE_INTEGER)}var U=Object.freeze({__proto__:null,utf8Write:_,int8:$,uint8:L,int16:N,uint16:M,int32:P,uint32:O,int64:B,uint64:W,float32:F,float64:H,writeFloat32:j,writeFloat64:Z,boolean:z,string:K,number:X});function J(e,t,n){for(var i="",r=0,o=t,s=t+n;o<s;o++){var a=e[o];0!==(128&a)?192!==(224&a)?224!==(240&a)?240!==(248&a)?console.error("Invalid byte "+a.toString(16)):(r=(7&a)<<18|(63&e[++o])<<12|(63&e[++o])<<6|(63&e[++o])<<0)>=65536?(r-=65536,i+=String.fromCharCode(55296+(r>>>10),56320+(1023&r))):i+=String.fromCharCode(r):i+=String.fromCharCode((15&a)<<12|(63&e[++o])<<6|(63&e[++o])<<0):i+=String.fromCharCode((31&a)<<6|63&e[++o]):i+=String.fromCharCode(a)}return i}function Y(e,t){return Q(e,t)<<24>>24}function Q(e,t){return e[t.offset++]}function q(e,t){return ee(e,t)<<16>>16}function ee(e,t){return e[t.offset++]|e[t.offset++]<<8}function te(e,t){return e[t.offset++]|e[t.offset++]<<8|e[t.offset++]<<16|e[t.offset++]<<24}function ne(e,t){return te(e,t)>>>0}function ie(e,t){return ue(e,t)}function re(e,t){return he(e,t)}function oe(e,t){var n=ne(e,t);return te(e,t)*Math.pow(2,32)+n}function se(e,t){var n=ne(e,t);return ne(e,t)*Math.pow(2,32)+n}var ae=new Int32Array(2),le=new Float32Array(ae.buffer),ce=new Float64Array(ae.buffer);function ue(e,t){return ae[0]=te(e,t),le[0]}function he(e,t){return ae[0]=te(e,t),ae[1]=te(e,t),ce[0]}function de(e,t){return Q(e,t)>0}function pe(e,t){var n,i=e[t.offset++];i<192?n=31&i:217===i?n=Q(e,t):218===i?n=ee(e,t):219===i&&(n=ne(e,t));var r=J(e,t.offset,n);return t.offset+=n,r}function ge(e,t){var n=e[t.offset];return n<192&&n>160||217===n||218===n||219===n}function fe(e,t){var n=e[t.offset++];return n<128?n:202===n?ue(e,t):203===n?he(e,t):204===n?Q(e,t):205===n?ee(e,t):206===n?ne(e,t):207===n?se(e,t):208===n?Y(e,t):209===n?q(e,t):210===n?te(e,t):211===n?oe(e,t):n>223?-1*(255-n+1):void 0}function me(e,t){var n=e[t.offset];return n<128||n>=202&&n<=211}function ve(e,t){return e[t.offset]<160}function ye(e,t){return e[t.offset-1]===s&&(e[t.offset]<128||e[t.offset]>=202&&e[t.offset]<=211)}var Ce=Object.freeze({__proto__:null,int8:Y,uint8:Q,int16:q,uint16:ee,int32:te,uint32:ne,float32:ie,float64:re,int64:oe,uint64:se,readFloat32:ue,readFloat64:he,boolean:de,string:pe,stringCheck:ge,number:fe,numberCheck:me,arrayCheck:ve,switchStructureCheck:ye}),be=function(){function t(e){var t=this;this.$changes=new l(this),this.$items=new Map,this.$indexes=new Map,this.$refId=0,e&&e.forEach((function(e){return t.add(e)}))}return t.prototype.onAdd=function(t,n){return void 0===n&&(n=!0),c(this.$callbacks||(this.$callbacks=[]),e.OPERATION.ADD,t,n?this.$items:void 0)},t.prototype.onRemove=function(t){return c(this.$callbacks||(this.$callbacks=[]),e.OPERATION.DELETE,t)},t.prototype.onChange=function(t){return c(this.$callbacks||(this.$callbacks=[]),e.OPERATION.REPLACE,t)},t.is=function(e){return void 0!==e.collection},t.prototype.add=function(e){var t=this.$refId++;return void 0!==e.$changes&&e.$changes.setParent(this,this.$changes.root,t),this.$changes.indexes[t]=t,this.$indexes.set(t,t),this.$items.set(t,e),this.$changes.change(t),t},t.prototype.at=function(e){var t=Array.from(this.$items.keys())[e];return this.$items.get(t)},t.prototype.entries=function(){return this.$items.entries()},t.prototype.delete=function(e){for(var t,n,i=this.$items.entries();(n=i.next())&&!n.done;)if(e===n.value[1]){t=n.value[0];break}return void 0!==t&&(this.$changes.delete(t),this.$indexes.delete(t),this.$items.delete(t))},t.prototype.clear=function(t){this.$changes.discard(!0,!0),this.$changes.indexes={},this.$indexes.clear(),t&&u.call(this,t),this.$items.clear(),this.$changes.operation({index:0,op:e.OPERATION.CLEAR}),this.$changes.touchParents()},t.prototype.has=function(e){return Array.from(this.$items.values()).some((function(t){return t===e}))},t.prototype.forEach=function(e){var t=this;this.$items.forEach((function(n,i,r){return e(n,i,t)}))},t.prototype.values=function(){return this.$items.values()},Object.defineProperty(t.prototype,"size",{get:function(){return this.$items.size},enumerable:!1,configurable:!0}),t.prototype.setIndex=function(e,t){this.$indexes.set(e,t)},t.prototype.getIndex=function(e){return this.$indexes.get(e)},t.prototype.getByIndex=function(e){return this.$items.get(this.$indexes.get(e))},t.prototype.deleteByIndex=function(e){var t=this.$indexes.get(e);this.$items.delete(t),this.$indexes.delete(e)},t.prototype.toArray=function(){return Array.from(this.$items.values())},t.prototype.toJSON=function(){var e=[];return this.forEach((function(t,n){e.push("function"===typeof t.toJSON?t.toJSON():t)})),e},t.prototype.clone=function(e){var n;return e?n=Object.assign(new t,this):(n=new t,this.forEach((function(e){e.$changes?n.add(e.clone()):n.add(e)}))),n},t}(),Ie=function(){function t(e){var t=this;this.$changes=new l(this),this.$items=new Map,this.$indexes=new Map,this.$refId=0,e&&e.forEach((function(e){return t.add(e)}))}return t.prototype.onAdd=function(t,n){return void 0===n&&(n=!0),c(this.$callbacks||(this.$callbacks=[]),e.OPERATION.ADD,t,n?this.$items:void 0)},t.prototype.onRemove=function(t){return c(this.$callbacks||(this.$callbacks=[]),e.OPERATION.DELETE,t)},t.prototype.onChange=function(t){return c(this.$callbacks||(this.$callbacks=[]),e.OPERATION.REPLACE,t)},t.is=function(e){return void 0!==e.set},t.prototype.add=function(t){var n,i;if(this.has(t))return!1;var r=this.$refId++;void 0!==t.$changes&&t.$changes.setParent(this,this.$changes.root,r);var o=null!==(i=null===(n=this.$changes.indexes[r])||void 0===n?void 0:n.op)&&void 0!==i?i:e.OPERATION.ADD;return this.$changes.indexes[r]=r,this.$indexes.set(r,r),this.$items.set(r,t),this.$changes.change(r,o),r},t.prototype.entries=function(){return this.$items.entries()},t.prototype.delete=function(e){for(var t,n,i=this.$items.entries();(n=i.next())&&!n.done;)if(e===n.value[1]){t=n.value[0];break}return void 0!==t&&(this.$changes.delete(t),this.$indexes.delete(t),this.$items.delete(t))},t.prototype.clear=function(t){this.$changes.discard(!0,!0),this.$changes.indexes={},this.$indexes.clear(),t&&u.call(this,t),this.$items.clear(),this.$changes.operation({index:0,op:e.OPERATION.CLEAR}),this.$changes.touchParents()},t.prototype.has=function(e){for(var t,n=this.$items.values(),i=!1;(t=n.next())&&!t.done;)if(e===t.value){i=!0;break}return i},t.prototype.forEach=function(e){var t=this;this.$items.forEach((function(n,i,r){return e(n,i,t)}))},t.prototype.values=function(){return this.$items.values()},Object.defineProperty(t.prototype,"size",{get:function(){return this.$items.size},enumerable:!1,configurable:!0}),t.prototype.setIndex=function(e,t){this.$indexes.set(e,t)},t.prototype.getIndex=function(e){return this.$indexes.get(e)},t.prototype.getByIndex=function(e){return this.$items.get(this.$indexes.get(e))},t.prototype.deleteByIndex=function(e){var t=this.$indexes.get(e);this.$items.delete(t),this.$indexes.delete(e)},t.prototype.toArray=function(){return Array.from(this.$items.values())},t.prototype.toJSON=function(){var e=[];return this.forEach((function(t,n){e.push("function"===typeof t.toJSON?t.toJSON():t)})),e},t.prototype.clone=function(e){var n;return e?n=Object.assign(new t,this):(n=new t,this.forEach((function(e){e.$changes?n.add(e.clone()):n.add(e)}))),n},t}(),Ae=function(){function e(){this.refIds=new WeakSet,this.containerIndexes=new WeakMap}return e.prototype.addRefId=function(e){this.refIds.has(e)||(this.refIds.add(e),this.containerIndexes.set(e,new Set))},e.get=function(t){return void 0===t.$filterState&&(t.$filterState=new e),t.$filterState},e}(),we=function(){function e(){this.refs=new Map,this.refCounts={},this.deletedRefs=new Set,this.nextUniqueId=0}return e.prototype.getNextUniqueId=function(){return this.nextUniqueId++},e.prototype.addRef=function(e,t,n){void 0===n&&(n=!0),this.refs.set(e,t),n&&(this.refCounts[e]=(this.refCounts[e]||0)+1)},e.prototype.removeRef=function(e){this.refCounts[e]=this.refCounts[e]-1,this.deletedRefs.add(e)},e.prototype.clearRefs=function(){this.refs.clear(),this.deletedRefs.clear(),this.refCounts={}},e.prototype.garbageCollectDeletedRefs=function(){var e=this;this.deletedRefs.forEach((function(t){if(!(e.refCounts[t]>0)){var n=e.refs.get(t);if(n instanceof Re)for(var i in n._definition.schema)"string"!==typeof n._definition.schema[i]&&n[i]&&n[i].$changes&&e.removeRef(n[i].$changes.refId);else{var r=n.$changes.parent._definition,o=r.schema[r.fieldsByIndex[n.$changes.parentIndex]];"function"===typeof Object.values(o)[0]&&Array.from(n.values()).forEach((function(t){return e.removeRef(t.$changes.refId)}))}e.refs.delete(t),delete e.refCounts[t]}})),this.deletedRefs.clear()},e}(),xe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(Error);function Se(e,t,n,i){var r,o=!1;switch(t){case"number":case"int8":case"uint8":case"int16":case"uint16":case"int32":case"uint32":case"int64":case"uint64":case"float32":case"float64":r="number",isNaN(e)&&console.log('trying to encode "NaN" in '.concat(n.constructor.name,"#").concat(i));break;case"string":r="string",o=!0;break;case"boolean":return}if(typeof e!==r&&(!o||o&&null!==e)){var s="'".concat(JSON.stringify(e),"'").concat(e&&e.constructor&&" (".concat(e.constructor.name,")")||"");throw new xe("a '".concat(r,"' was expected, but ").concat(s," was provided in ").concat(n.constructor.name,"#").concat(i))}}function ke(e,t,n,i){if(!(e instanceof t))throw new xe("a '".concat(t.name,"' was expected, but '").concat(e.constructor.name,"' was provided in ").concat(n.constructor.name,"#").concat(i))}function Ee(e,t,n,i,r){Se(n,e,i,r);var o=U[e];if(!o)throw new xe("a '".concat(e,"' was expected, but ").concat(n," was provided in ").concat(i.constructor.name,"#").concat(r));o(t,n)}function Te(e,t,n){return Ce[e](t,n)}var Re=function(){function t(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];Object.defineProperties(this,{$changes:{value:new l(this,void 0,new we),enumerable:!1,writable:!0},$callbacks:{value:void 0,enumerable:!1,writable:!0}});var n=this._definition.descriptors;n&&Object.defineProperties(this,n),e[0]&&this.assign(e[0])}return t.onError=function(e){console.error(e)},t.is=function(e){return e._definition&&void 0!==e._definition.schema},t.prototype.onChange=function(t){return c(this.$callbacks||(this.$callbacks=[]),e.OPERATION.REPLACE,t)},t.prototype.onRemove=function(t){return c(this.$callbacks||(this.$callbacks=[]),e.OPERATION.DELETE,t)},t.prototype.assign=function(e){return Object.assign(this,e),this},Object.defineProperty(t.prototype,"_definition",{get:function(){return this.constructor._definition},enumerable:!1,configurable:!0}),t.prototype.setDirty=function(e,t){this.$changes.change(e,t)},t.prototype.listen=function(e,t){var n=this;return this.$callbacks||(this.$callbacks={}),this.$callbacks[e]||(this.$callbacks[e]=[]),this.$callbacks[e].push(t),function(){return h(n.$callbacks[e],n.$callbacks[e].indexOf(t))}},t.prototype.decode=function(n,i,r){void 0===i&&(i={offset:0}),void 0===r&&(r=this);var o=[],a=this.$changes.root,l=n.length,c=0;for(a.refs.set(c,this);i.offset<l;){var u=n[i.offset++];if(u!=s){var h=r.$changes,d=void 0!==r._definition,p=d?u>>6<<6:u;if(p!==e.OPERATION.CLEAR){var f=d?u%(p||255):fe(n,i),v=d?r._definition.fieldsByIndex[f]:"",y=h.getType(f),b=void 0,I=void 0,A=void 0;if(d?I=r["_".concat(v)]:(I=r.getByIndex(f),(p&e.OPERATION.ADD)===e.OPERATION.ADD?(A=r instanceof m?pe(n,i):f,r.setIndex(f,A)):A=r.getIndex(f)),(p&e.OPERATION.DELETE)===e.OPERATION.DELETE&&(p!==e.OPERATION.DELETE_AND_ADD&&r.deleteByIndex(f),I&&I.$changes&&a.removeRef(I.$changes.refId),b=null),void 0!==v){if(p===e.OPERATION.DELETE);else if(t.is(y)){var w=fe(n,i);if(b=a.refs.get(w),p!==e.OPERATION.REPLACE){var x=this.getSchemaType(n,i,y);b||((b=this.createTypeInstance(x)).$changes.refId=w,I&&(b.$callbacks=I.$callbacks,I.$changes.refId&&w!==I.$changes.refId&&a.removeRef(I.$changes.refId))),a.addRef(w,b,b!==I)}}else if("string"===typeof y)b=Te(y,n,i);else{var S=C(Object.keys(y)[0]),k=fe(n,i),E=a.refs.has(k)?I||a.refs.get(k):new S.constructor;if((b=E.clone(!0)).$changes.refId=k,I&&(b.$callbacks=I.$callbacks,I.$changes.refId&&k!==I.$changes.refId)){a.removeRef(I.$changes.refId);for(var T=I.entries(),R=void 0;(R=T.next())&&!R.done;){var _=R.value,$=_[0],L=_[1];o.push({refId:k,op:e.OPERATION.DELETE,field:$,value:void 0,previousValue:L})}}a.addRef(k,b,E!==I)}if(null!==b&&void 0!==b)if(b.$changes&&b.$changes.setParent(h.ref,h.root,f),r instanceof t)r[v]=b;else if(r instanceof m)$=A,r.$items.set($,b),r.$changes.allChanges.add(f);else if(r instanceof g)r.setAt(f,b);else if(r instanceof be){var N=r.add(b);r.setIndex(f,N)}else r instanceof Ie&&!1!==(N=r.add(b))&&r.setIndex(f,N);I!==b&&o.push({refId:c,op:p,field:v,dynamicIndex:A,value:b,previousValue:I})}else{console.warn("@colyseus/schema: definition mismatch");for(var M={offset:i.offset};i.offset<l&&(!ye(n,i)||(M.offset=i.offset+1,!a.refs.has(fe(n,M))));)i.offset++}}else r.clear(o)}else{c=fe(n,i);var P=a.refs.get(c);if(!P)throw new Error('"refId" not found: '.concat(c));r=P}}return this._triggerChanges(o),a.garbageCollectDeletedRefs(),o},t.prototype.encode=function(n,i,r){void 0===n&&(n=!1),void 0===i&&(i=[]),void 0===r&&(r=!1);for(var o=this.$changes,a=new WeakSet,l=[o],c=1,u=0;u<c;u++){var h=l[u],d=h.ref,p=d instanceof t;h.ensureRefId(),a.add(h),h!==o&&(h.changed||n)&&(L(i,s),X(i,h.refId));for(var g=n?Array.from(h.allChanges):Array.from(h.changes.values()),f=0,v=g.length;f<v;f++){var y=n?{op:e.OPERATION.ADD,index:g[f]}:g[f],b=y.index,I=p?d._definition.fieldsByIndex&&d._definition.fieldsByIndex[b]:b,A=i.length;if(y.op!==e.OPERATION.TOUCH)if(p)L(i,b|y.op);else{if(L(i,y.op),y.op===e.OPERATION.CLEAR)continue;X(i,b)}if(p||(y.op&e.OPERATION.ADD)!=e.OPERATION.ADD||d instanceof m&&K(i,h.ref.$indexes.get(b)),y.op!==e.OPERATION.DELETE){var w=h.getType(b),x=h.getValue(b);if(x&&x.$changes&&!a.has(x.$changes)&&(l.push(x.$changes),x.$changes.ensureRefId(),c++),y.op!==e.OPERATION.TOUCH){if(t.is(w))ke(x,w,d,I),X(i,x.$changes.refId),(y.op&e.OPERATION.ADD)===e.OPERATION.ADD&&this.tryEncodeTypeId(i,w,x.constructor);else if("string"===typeof w)Ee(w,i,x,d,I);else{var S=C(Object.keys(w)[0]);ke(d["_".concat(I)],S.constructor,d,I),X(i,x.$changes.refId)}r&&h.cache(b,i.slice(A))}}}n||r||h.discard()}return i},t.prototype.encodeAll=function(e){return this.encode(!0,[],e)},t.prototype.applyFilters=function(n,i){var r,o;void 0===i&&(i=!1);for(var a=this,l=new Set,c=Ae.get(n),u=[this.$changes],h=1,d=[],p=function(p){var g=u[p];if(l.has(g.refId))return"continue";var f=g.ref,v=f instanceof t;L(d,s),X(d,g.refId);var y=c.refIds.has(g),C=i||!y;c.addRefId(g);var b=c.containerIndexes.get(g),I=C?Array.from(g.allChanges):Array.from(g.changes.values());!i&&v&&f._definition.indexesWithFilters&&f._definition.indexesWithFilters.forEach((function(t){!b.has(t)&&g.allChanges.has(t)&&(C?I.push(t):I.push({op:e.OPERATION.ADD,index:t}))}));for(var A=0,w=I.length;A<w;A++){var x=C?{op:e.OPERATION.ADD,index:I[A]}:I[A];if(x.op!==e.OPERATION.CLEAR){var S=x.index;if(x.op!==e.OPERATION.DELETE){var k=g.getValue(S),E=g.getType(S);if(v){if((T=f._definition.filters&&f._definition.filters[S])&&!T.call(f,n,k,a)){k&&k.$changes&&l.add(k.$changes.refId);continue}}else{var T,R=g.parent;if((T=g.getChildrenFilter())&&!T.call(R,n,f.$indexes.get(S),k,a)){k&&k.$changes&&l.add(k.$changes.refId);continue}}if(k.$changes&&(u.push(k.$changes),h++),x.op!==e.OPERATION.TOUCH)if(x.op===e.OPERATION.ADD||v)d.push.apply(d,null!==(r=g.caches[S])&&void 0!==r?r:[]),b.add(S);else if(b.has(S))d.push.apply(d,null!==(o=g.caches[S])&&void 0!==o?o:[]);else{if(b.add(S),L(d,e.OPERATION.ADD),X(d,S),f instanceof m){var _=g.ref.$indexes.get(S);K(d,_)}k.$changes?X(d,k.$changes.refId):U[E](d,k)}else k.$changes&&!v&&(L(d,e.OPERATION.ADD),X(d,S),f instanceof m&&(_=g.ref.$indexes.get(S),K(d,_)),X(d,k.$changes.refId))}else v?L(d,x.op|S):(L(d,x.op),X(d,S))}else L(d,x.op)}},g=0;g<h;g++)p(g);return d},t.prototype.clone=function(){var e,t=new this.constructor,n=this._definition.schema;for(var i in n)"object"===typeof this[i]&&"function"===typeof(null===(e=this[i])||void 0===e?void 0:e.clone)?t[i]=this[i].clone():t[i]=this[i];return t},t.prototype.toJSON=function(){var e=this._definition.schema,t=this._definition.deprecated,n={};for(var i in e)t[i]||null===this[i]||"undefined"===typeof this[i]||(n[i]="function"===typeof this[i].toJSON?this[i].toJSON():this["_".concat(i)]);return n},t.prototype.discardAllChanges=function(){this.$changes.discardAll()},t.prototype.getByIndex=function(e){return this[this._definition.fieldsByIndex[e]]},t.prototype.deleteByIndex=function(e){this[this._definition.fieldsByIndex[e]]=void 0},t.prototype.tryEncodeTypeId=function(e,t,n){t._typeid!==n._typeid&&(L(e,a),X(e,n._typeid))},t.prototype.getSchemaType=function(e,t,n){var i;return e[t.offset]===a&&(t.offset++,i=this.constructor._context.get(fe(e,t))),i||n},t.prototype.createTypeInstance=function(e){var t=new e;return t.$changes.root=this.$changes.root,t},t.prototype._triggerChanges=function(n){for(var i,r,o,s,a,l,c,u,h,d=new Set,p=this.$changes.root.refs,g=function(g){var f=n[g],m=f.refId,v=p.get(m),y=v.$callbacks;if((f.op&e.OPERATION.DELETE)===e.OPERATION.DELETE&&f.previousValue instanceof t&&(null===(r=null===(i=f.previousValue.$callbacks)||void 0===i?void 0:i[e.OPERATION.DELETE])||void 0===r||r.forEach((function(e){return e()}))),!y)return"continue";if(v instanceof t){if(!d.has(m))try{null===(o=null===y||void 0===y?void 0:y[e.OPERATION.REPLACE])||void 0===o||o.forEach((function(e){return e(n)}))}catch(C){t.onError(C)}try{y.hasOwnProperty(f.field)&&(null===(s=y[f.field])||void 0===s||s.forEach((function(e){return e(f.value,f.previousValue)})))}catch(C){t.onError(C)}}else f.op===e.OPERATION.ADD&&void 0===f.previousValue?null===(a=y[e.OPERATION.ADD])||void 0===a||a.forEach((function(e){var t;return e(f.value,null!==(t=f.dynamicIndex)&&void 0!==t?t:f.field)})):f.op===e.OPERATION.DELETE?void 0!==f.previousValue&&(null===(l=y[e.OPERATION.DELETE])||void 0===l||l.forEach((function(e){var t;return e(f.previousValue,null!==(t=f.dynamicIndex)&&void 0!==t?t:f.field)}))):f.op===e.OPERATION.DELETE_AND_ADD&&(void 0!==f.previousValue&&(null===(c=y[e.OPERATION.DELETE])||void 0===c||c.forEach((function(e){var t;return e(f.previousValue,null!==(t=f.dynamicIndex)&&void 0!==t?t:f.field)}))),null===(u=y[e.OPERATION.ADD])||void 0===u||u.forEach((function(e){var t;return e(f.value,null!==(t=f.dynamicIndex)&&void 0!==t?t:f.field)}))),f.value!==f.previousValue&&(null===(h=y[e.OPERATION.REPLACE])||void 0===h||h.forEach((function(e){var t;return e(f.value,null!==(t=f.dynamicIndex)&&void 0!==t?t:f.field)})));d.add(m)},f=0;f<n.length;f++)g(f)},t._definition=b.create(),t}();function _e(e){for(var t=[e.$changes],n=1,i={},r=i,o=function(e){var n=t[e];n.changes.forEach((function(e){var t=n.ref,i=e.index,o=t._definition?t._definition.fieldsByIndex[i]:t.$indexes.get(i);r[o]=n.getValue(i)}))},s=0;s<n;s++)o(s);return i}var $e={context:new A},Le=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),i([x("string",$e)],t.prototype,"name",void 0),i([x("string",$e)],t.prototype,"type",void 0),i([x("number",$e)],t.prototype,"referencedType",void 0),t}(Re),Ne=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.fields=new g,t}return n(t,e),i([x("number",$e)],t.prototype,"id",void 0),i([x([Le],$e)],t.prototype,"fields",void 0),t}(Re),Me=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.types=new g,t}return n(t,e),t.encode=function(e){var n=e.constructor,i=new t;i.rootType=n._typeid;var r=function(e,t){for(var n in t){var r=new Le;r.name=n;var o=void 0;if("string"===typeof t[n])o=t[n];else{var s=t[n],a=void 0;Re.is(s)?(o="ref",a=t[n]):"string"===typeof s[o=Object.keys(s)[0]]?o+=":"+s[o]:a=s[o],r.referencedType=a?a._typeid:-1}r.type=o,e.fields.push(r)}i.types.push(e)},o=n._context.types;for(var s in o){var a=new Ne;a.id=Number(s),r(a,o[s]._definition.schema)}return i.encodeAll()},t.decode=function(e,i){var r=new A,o=new t;o.decode(e,i);var s=o.types.reduce((function(e,t){var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(Re),o=t.id;return e[o]=i,r.add(i,o),e}),{});o.types.forEach((function(e){var t=s[e.id];e.fields.forEach((function(e){var n;if(void 0!==e.referencedType){var i=e.type,o=s[e.referencedType];if(!o){var a=e.type.split(":");i=a[0],o=a[1]}"ref"===i?x(o,{context:r})(t.prototype,e.name):x(((n={})[i]=o,n),{context:r})(t.prototype,e.name)}else x(e.type,{context:r})(t.prototype,e.name)}))}));var a=s[o.rootType],l=new a;for(var c in a._definition.schema){var u=a._definition.schema[c];"string"!==typeof u&&(l[c]="function"===typeof u?new u:new(C(Object.keys(u)[0]).constructor))}return l},i([x([Ne],$e)],t.prototype,"types",void 0),i([x("number",$e)],t.prototype,"rootType",void 0),t}(Re);y("map",{constructor:m}),y("array",{constructor:g}),y("set",{constructor:Ie}),y("collection",{constructor:be}),e.ArraySchema=g,e.CollectionSchema=be,e.Context=A,e.MapSchema=m,e.Reflection=Me,e.ReflectionField=Le,e.ReflectionType=Ne,e.Schema=Re,e.SchemaDefinition=b,e.SetSchema=Ie,e.decode=Ce,e.defineTypes=T,e.deprecated=E,e.dumpChanges=_e,e.encode=U,e.filter=S,e.filterChildren=k,e.hasFilter=I,e.registerType=y,e.type=x,Object.defineProperty(e,"__esModule",{value:!0})}))})),K=function(){function t(e,t){var n=this;this.onStateChange=G(),this.onError=G(),this.onLeave=G(),this.onJoin=G(),this.hasJoined=!1,this.onMessageHandlers=H(),this.roomId=null,this.name=e,t&&(this.serializer=new(F("schema")),this.rootSchema=t,this.serializer.state=new t),this.onError((function(e,t){return console.warn("colyseus.js - onError => (".concat(e,") ").concat(t))})),this.onLeave((function(){return n.removeAllListeners()}))}return Object.defineProperty(t.prototype,"id",{get:function(){return this.roomId},enumerable:!1,configurable:!0}),t.prototype.connect=function(e,n,i){void 0===i&&(i=this);var r=new M;i.connection=r,r.events.onmessage=t.prototype.onMessageCallback.bind(i),r.events.onclose=function(e){if(!i.hasJoined)return console.warn("Room connection was closed unexpectedly (".concat(e.code,"): ").concat(e.reason)),void i.onError.invoke(e.code,e.reason);e.code===c.DEVMODE_RESTART&&n?n():(i.onLeave.invoke(e.code),i.destroy())},r.events.onerror=function(e){console.warn("Room, onError (".concat(e.code,"): ").concat(e.reason)),i.onError.invoke(e.code,e.reason)},r.connect(e)},t.prototype.leave=function(t){var n=this;return void 0===t&&(t=!0),new Promise((function(i){n.onLeave((function(e){return i(e)})),n.connection?t?n.connection.send([e.Protocol.LEAVE_ROOM]):n.connection.close():n.onLeave.invoke(c.CONSENTED)}))},t.prototype.onMessage=function(e,t){return this.onMessageHandlers.on(this.getMessageHandlerKey(e),t)},t.prototype.send=function(t,n){var i,r=[e.Protocol.ROOM_DATA];if("string"===typeof t?z.encode.string(r,t):z.encode.number(r,t),void 0!==n){var o=T(n);(i=new Uint8Array(r.length+o.byteLength)).set(new Uint8Array(r),0),i.set(new Uint8Array(o),r.length)}else i=new Uint8Array(r);this.connection.send(i.buffer)},t.prototype.sendBytes=function(t,n){var i,r=[e.Protocol.ROOM_DATA_BYTES];"string"===typeof t?z.encode.string(r,t):z.encode.number(r,t),(i=new Uint8Array(r.length+(n.byteLength||n.length))).set(new Uint8Array(r),0),i.set(new Uint8Array(n),r.length),this.connection.send(i.buffer)},Object.defineProperty(t.prototype,"state",{get:function(){return this.serializer.getState()},enumerable:!1,configurable:!0}),t.prototype.removeAllListeners=function(){this.onJoin.clear(),this.onStateChange.clear(),this.onError.clear(),this.onLeave.clear(),this.onMessageHandlers.events={}},t.prototype.onMessageCallback=function(t){var n=Array.from(new Uint8Array(t.data)),i=n[0];if(i===e.Protocol.JOIN_ROOM){var r=1,o=P(n,r);if(r+=O(o),this.serializerId=P(n,r),r+=O(this.serializerId),!this.serializer){var s=F(this.serializerId);this.serializer=new s}n.length>r&&this.serializer.handshake&&this.serializer.handshake(n,{offset:r}),this.reconnectionToken="".concat(this.roomId,":").concat(o),this.hasJoined=!0,this.onJoin.invoke(),this.connection.send([e.Protocol.JOIN_ROOM])}else if(i===e.Protocol.ERROR){var a={offset:1},l=z.decode.number(n,a),c=z.decode.string(n,a);this.onError.invoke(l,c)}else if(i===e.Protocol.LEAVE_ROOM)this.leave();else if(i===e.Protocol.ROOM_DATA_SCHEMA){var u={offset:1};(c=new(d=this.serializer.getState().constructor._context.get(z.decode.number(n,u)))).decode(n,u),this.dispatchMessage(d,c)}else if(i===e.Protocol.ROOM_STATE)n.shift(),this.setState(n);else if(i===e.Protocol.ROOM_STATE_PATCH)n.shift(),this.patch(n);else if(i===e.Protocol.ROOM_DATA){var h={offset:1},d=z.decode.stringCheck(n,h)?z.decode.string(n,h):z.decode.number(n,h);c=n.length>h.offset?A(t.data,h.offset):void 0,this.dispatchMessage(d,c)}else if(i===e.Protocol.ROOM_DATA_BYTES){var p={offset:1};d=z.decode.stringCheck(n,p)?z.decode.string(n,p):z.decode.number(n,p),this.dispatchMessage(d,new Uint8Array(n.slice(p.offset)))}},t.prototype.setState=function(e){this.serializer.setState(e),this.onStateChange.invoke(this.serializer.getState())},t.prototype.patch=function(e){this.serializer.patch(e),this.onStateChange.invoke(this.serializer.getState())},t.prototype.dispatchMessage=function(e,t){var n=this.getMessageHandlerKey(e);this.onMessageHandlers.events[n]?this.onMessageHandlers.emit(n,t):this.onMessageHandlers.events["*"]?this.onMessageHandlers.emit("*",e,t):console.warn("colyseus.js: onMessage() not registered for type '".concat(e,"'."))},t.prototype.destroy=function(){this.serializer&&this.serializer.teardown()},t.prototype.getMessageHandlerKey=function(e){switch(typeof e){case"function":return"$".concat(e._typeid);case"string":return e;case"number":return"i".concat(e);default:throw new Error("invalid message type.")}},t}(),X=function(e){function t(n,i){var r=e.call(this,n)||this;return r.code=i,Object.setPrototypeOf(r,t.prototype),r}return r(t,e),t}(Error),U="undefined"!==typeof window&&"undefined"!==typeof(null===(j=null===window||void 0===window?void 0:window.location)||void 0===j?void 0:j.hostname)?"".concat(window.location.protocol.replace("http","ws"),"//").concat(window.location.hostname).concat(window.location.port&&":".concat(window.location.port)):"ws://127.0.0.1:2567",J=function(){function e(e){if(void 0===e&&(e=U),"string"===typeof e){var t=new URL(e),n="https:"===t.protocol||"wss:"===t.protocol,i=Number(t.port||(n?443:80));this.settings={hostname:t.hostname,pathname:"/"!==t.pathname?t.pathname:"",port:i,secure:n}}else void 0===e.port&&(e.port=e.secure?443:80),void 0===e.pathname&&(e.pathname=""),this.settings=e}return e.prototype.joinOrCreate=function(e,t,n){return void 0===t&&(t={}),o(this,void 0,void 0,(function(){return s(this,(function(i){switch(i.label){case 0:return[4,this.createMatchMakeRequest("joinOrCreate",e,t,n)];case 1:return[2,i.sent()]}}))}))},e.prototype.create=function(e,t,n){return void 0===t&&(t={}),o(this,void 0,void 0,(function(){return s(this,(function(i){switch(i.label){case 0:return[4,this.createMatchMakeRequest("create",e,t,n)];case 1:return[2,i.sent()]}}))}))},e.prototype.join=function(e,t,n){return void 0===t&&(t={}),o(this,void 0,void 0,(function(){return s(this,(function(i){switch(i.label){case 0:return[4,this.createMatchMakeRequest("join",e,t,n)];case 1:return[2,i.sent()]}}))}))},e.prototype.joinById=function(e,t,n){return void 0===t&&(t={}),o(this,void 0,void 0,(function(){return s(this,(function(i){switch(i.label){case 0:return[4,this.createMatchMakeRequest("joinById",e,t,n)];case 1:return[2,i.sent()]}}))}))},e.prototype.reconnect=function(e,t){return o(this,void 0,void 0,(function(){var n,i,r;return s(this,(function(o){switch(o.label){case 0:if("string"===typeof e&&"string"===typeof t)throw new Error("DEPRECATED: .reconnect() now only accepts 'reconnectionToken' as argument.\nYou can get this token from previously connected `room.reconnectionToken`");return n=e.split(":"),i=n[0],r=n[1],[4,this.createMatchMakeRequest("reconnect",i,{reconnectionToken:r},t)];case 1:return[2,o.sent()]}}))}))},e.prototype.getAvailableRooms=function(e){return void 0===e&&(e=""),o(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,f(this.getHttpEndpoint("".concat(e)),{headers:{Accept:"application/json"}})];case 1:return[2,t.sent().data]}}))}))},e.prototype.consumeSeatReservation=function(e,t,n){return o(this,void 0,void 0,(function(){var i,r,a,l=this;return s(this,(function(c){return(i=this.createRoom(e.room.name,t)).roomId=e.room.roomId,i.sessionId=e.sessionId,r={sessionId:i.sessionId},e.reconnectionToken&&(r.reconnectionToken=e.reconnectionToken),a=n||i,i.connect(this.buildEndpoint(e.room,r),e.devMode&&function(){return o(l,void 0,void 0,(function(){var n,r,l,c=this;return s(this,(function(u){return console.info("[Colyseus devMode]: ".concat(String.fromCodePoint(128260)," Re-establishing connection with room id '").concat(i.roomId,"'...")),n=0,r=8,l=function(){return o(c,void 0,void 0,(function(){return s(this,(function(o){switch(o.label){case 0:n++,o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.consumeSeatReservation(e,t,a)];case 2:return o.sent(),console.info("[Colyseus devMode]: ".concat(String.fromCodePoint(9989)," Successfully re-established connection with room '").concat(i.roomId,"'")),[3,4];case 3:return o.sent(),n<r?(console.info("[Colyseus devMode]: ".concat(String.fromCodePoint(128260)," retrying... (").concat(n," out of ").concat(r,")")),setTimeout(l,2e3)):console.info("[Colyseus devMode]: ".concat(String.fromCodePoint(10060)," Failed to reconnect. Is your server running? Please check server logs.")),[3,4];case 4:return[2]}}))}))},setTimeout(l,2e3),[2]}))}))},a),[2,new Promise((function(e,t){var n=function(e,n){return t(new C(e,n))};a.onError.once(n),a.onJoin.once((function(){a.onError.remove(n),e(a)}))}))]}))}))},e.prototype.createMatchMakeRequest=function(e,t,n,i,r){return void 0===n&&(n={}),o(this,void 0,void 0,(function(){var o;return s(this,(function(s){switch(s.label){case 0:return[4,m(this.getHttpEndpoint("".concat(e,"/").concat(t)),{headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)})];case 1:if((o=s.sent().data).error)throw new X(o.error,o.code);return"reconnect"===e&&(o.reconnectionToken=n.reconnectionToken),[4,this.consumeSeatReservation(o,i,r)];case 2:return[2,s.sent()]}}))}))},e.prototype.createRoom=function(e,t){return new K(e,t)},e.prototype.buildEndpoint=function(e,t){void 0===t&&(t={});var n=[];for(var i in t)t.hasOwnProperty(i)&&n.push("".concat(i,"=").concat(t[i]));var r=this.settings.secure?"wss://":"ws://";return e.publicAddress?r+="".concat(e.publicAddress):r+="".concat(this.settings.hostname).concat(this.getEndpointPort()).concat(this.settings.pathname),"".concat(r,"/").concat(e.processId,"/").concat(e.roomId,"?").concat(n.join("&"))},e.prototype.getHttpEndpoint=function(e){return void 0===e&&(e=""),"".concat(this.settings.secure?"https":"http","://").concat(this.settings.hostname).concat(this.getEndpointPort()).concat(this.settings.pathname,"/matchmake/").concat(e)},e.prototype.getEndpointPort=function(){return 80!==this.settings.port&&443!==this.settings.port?":".concat(this.settings.port):""},e}();function Y(){return Z||(Z="undefined"!==typeof cc&&cc.sys&&cc.sys.localStorage?cc.sys.localStorage:"undefined"!==typeof window&&window.localStorage?window.localStorage:{cache:{},setItem:function(e,t){this.cache[e]=t},getItem:function(e){this.cache[e]},removeItem:function(e){delete this.cache[e]}}),Z}function Q(e,t){Y().setItem(e,t)}function q(e){Y().removeItem(e)}function ee(e,t){var n=Y().getItem(e);"undefined"!==typeof Promise&&n instanceof Promise?n.then((function(e){return t(e)})):t(n)}var te,ne="colyseus-auth-token";e.Platform=void 0,(te=e.Platform||(e.Platform={})).ios="ios",te.android="android";var ie=function(){function e(e){var t=this;this._id=void 0,this.username=void 0,this.displayName=void 0,this.avatarUrl=void 0,this.isAnonymous=void 0,this.email=void 0,this.lang=void 0,this.location=void 0,this.timezone=void 0,this.metadata=void 0,this.devices=void 0,this.facebookId=void 0,this.twitterId=void 0,this.googleId=void 0,this.gameCenterId=void 0,this.steamId=void 0,this.friendIds=void 0,this.blockedUserIds=void 0,this.createdAt=void 0,this.updatedAt=void 0,this.token=void 0,this.endpoint=e.replace("ws","http"),ee(ne,(function(e){return t.token=e}))}return Object.defineProperty(e.prototype,"hasToken",{get:function(){return!!this.token},enumerable:!1,configurable:!0}),e.prototype.login=function(e){return void 0===e&&(e={}),o(this,void 0,void 0,(function(){var t,n,i;return s(this,(function(r){switch(r.label){case 0:return t=Object.assign({},e),this.hasToken&&(t.token=this.token),[4,this.request("post","/auth",t)];case 1:for(i in n=r.sent(),this.token=n.token,Q(ne,this.token),n)this.hasOwnProperty(i)&&(this[i]=n[i]);return this.registerPingService(),[2,this]}}))}))},e.prototype.save=function(){return o(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.request("put","/auth",{},{username:this.username,displayName:this.displayName,avatarUrl:this.avatarUrl,lang:this.lang,location:this.location,timezone:this.timezone})];case 1:return e.sent(),[2,this]}}))}))},e.prototype.getFriends=function(){return o(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.request("get","/friends/all")];case 1:return[2,e.sent()]}}))}))},e.prototype.getOnlineFriends=function(){return o(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.request("get","/friends/online")];case 1:return[2,e.sent()]}}))}))},e.prototype.getFriendRequests=function(){return o(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.request("get","/friends/requests")];case 1:return[2,e.sent()]}}))}))},e.prototype.sendFriendRequest=function(e){return o(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.request("post","/friends/requests",{userId:e})];case 1:return[2,t.sent()]}}))}))},e.prototype.acceptFriendRequest=function(e){return o(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.request("put","/friends/requests",{userId:e})];case 1:return[2,t.sent()]}}))}))},e.prototype.declineFriendRequest=function(e){return o(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.request("del","/friends/requests",{userId:e})];case 1:return[2,t.sent()]}}))}))},e.prototype.blockUser=function(e){return o(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.request("post","/friends/block",{userId:e})];case 1:return[2,t.sent()]}}))}))},e.prototype.unblockUser=function(e){return o(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.request("put","/friends/block",{userId:e})];case 1:return[2,t.sent()]}}))}))},e.prototype.request=function(e,t,n,i,r){return void 0===n&&(n={}),void 0===r&&(r={}),o(this,void 0,void 0,(function(){var o,a,l,c;return s(this,(function(s){switch(s.label){case 0:for(a in r.Accept="application/json",this.hasToken&&(r.Authorization="Bearer "+this.token),o=[],n)o.push("".concat(a,"=").concat(n[a]));return l=o.length>0?"?".concat(o.join("&")):"",c={headers:r},i&&(c.body=i),[4,y[e]("".concat(this.endpoint).concat(t).concat(l),c)];case 1:return[2,s.sent().data]}}))}))},e.prototype.logout=function(){this.token=void 0,q(ne),this.unregisterPingService()},e.prototype.registerPingService=function(e){var t=this;void 0===e&&(e=15e3),this.unregisterPingService(),this.keepOnlineInterval=setInterval((function(){return t.request("get","/auth")}),e)},e.prototype.unregisterPingService=function(){clearInterval(this.keepOnlineInterval)},e}(),re=function(){function e(){}return e.prototype.setState=function(e){return this.state.decode(e)},e.prototype.getState=function(){return this.state},e.prototype.patch=function(e){return this.state.decode(e)},e.prototype.teardown=function(){var e,t;null===(t=null===(e=this.state)||void 0===e?void 0:e.$changes)||void 0===t||t.root.clearRefs()},e.prototype.handshake=function(e,t){this.state?(new z.Reflection).decode(e,t):this.state=z.Reflection.decode(e,t)},e}(),oe=function(){function e(){}return e.prototype.setState=function(e){},e.prototype.getState=function(){return null},e.prototype.patch=function(e){},e.prototype.teardown=function(){},e.prototype.handshake=function(e){},e}();W("schema",re),W("none",oe),e.Auth=ie,e.Client=J,e.Room=K,e.SchemaSerializer=re,e.registerSerializer=W,Object.defineProperty(e,"__esModule",{value:!0})}(t)},403:function(e){self,e.exports=function(){return t={897:function(e,t,n){"use strict";n.d(t,{x:function(){return l}});var i=n(2602),r=n(9791),o=n(7907);function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,function(e){return e=function(e,t){if("object"!==s(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!==s(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string"),"symbol"===s(e)?e:String(e)}(i.key),i)}}var l=function(){function e(t,n){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.dom={};var i=this,r=this.dom,s=((this.anchor=void 0,this.items=t,this.eventListeners={},this.selection=void 0,this.onClose=n?n.close:void 0,this.limitHeight=!!n&&n.limitHeight,n=document.createElement("div")).className="jsoneditor-contextmenu-root",r.root=n,document.createElement("div"));(s.className="jsoneditor-contextmenu",r.menu=s,n.appendChild(s),n=document.createElement("ul")).className="jsoneditor-menu",s.appendChild(n),r.list=n,r.items=[],((s=document.createElement("button")).type="button",r.focusButton=s,r=document.createElement("li")).style.overflow="hidden",r.style.height="0",r.appendChild(s),n.appendChild(r),function e(t,n,r){r.forEach((function(r){var s,a,l,c,u,h;"separator"===r.type?((u=document.createElement("div")).className="jsoneditor-separator",(a=document.createElement("li")).appendChild(u),t.appendChild(a)):(s={},u=document.createElement("li"),t.appendChild(u),(a=document.createElement("button")).type="button",a.className=r.className,s.button=a,r.title&&(a.title=r.title),r.click&&(a.onclick=function(e){e.preventDefault(),i.hide(),r.click()}),u.appendChild(a),r.submenu?((c=document.createElement("div")).className="jsoneditor-icon",a.appendChild(c),(c=document.createElement("div")).className="jsoneditor-text"+(r.click?"":" jsoneditor-right-margin"),c.appendChild(document.createTextNode(r.text)),a.appendChild(c),(l=r.click?(a.className+=" jsoneditor-default",(c=document.createElement("button")).type="button",(s.buttonExpand=c).className="jsoneditor-expand",(h=document.createElement("div")).className="jsoneditor-expand",c.appendChild(h),u.appendChild(c),r.submenuTitle&&(c.title=r.submenuTitle),c):((h=document.createElement("div")).className="jsoneditor-expand",a.appendChild(h),a)).onclick=function(e){e.preventDefault(),i._onExpandItem(s),l.focus()},s.subItems=c=[],h=document.createElement("ul"),(s.ul=h).className="jsoneditor-menu",h.style.height="0",u.appendChild(h),e(h,c,r.submenu)):((u=document.createElement("div")).className="jsoneditor-icon",a.appendChild(u),(h=document.createElement("div")).className="jsoneditor-text",h.appendChild(document.createTextNode((0,o.Iu)(r.text))),a.appendChild(h)),n.push(s))}))}(n,this.dom.items,t),this.maxHeight=0,t.forEach((function(e){e=24*(t.length+(e.submenu?e.submenu.length:0)),i.maxHeight=Math.max(i.maxHeight,e)}))}var t,n,s;return t=e,(n=[{key:"_getVisibleButtons",value:function(){var e=[],t=this;return this.dom.items.forEach((function(n){e.push(n.button),n.buttonExpand&&e.push(n.buttonExpand),n.subItems&&n===t.expandedItem&&n.subItems.forEach((function(t){e.push(t.button),t.buttonExpand&&e.push(t.buttonExpand)}))})),e}},{key:"show",value:function(t,n,o){this.hide();var s=!0,a=t.parentNode,l=t.getBoundingClientRect(),c=(a=a.getBoundingClientRect(),n.getBoundingClientRect()),u=this;this.dom.absoluteAnchor=(0,i.w)(t,n,(function(){u.hide()})),l.bottom+this.maxHeight<c.bottom||l.top-this.maxHeight>c.top&&(s=!1),n=o?0:l.top-a.top,s?(o=t.offsetHeight,this.dom.menu.style.left="0",this.dom.menu.style.top=n+o+"px",this.dom.menu.style.bottom=""):(this.dom.menu.style.left="0",this.dom.menu.style.top="",this.dom.menu.style.bottom="0px"),this.limitHeight&&(a=s?c.bottom-l.bottom-10:l.top-c.top-10,this.dom.list.style.maxHeight=a+"px",this.dom.list.style.overflowY="auto"),this.dom.absoluteAnchor.appendChild(this.dom.root),this.selection=(0,r.getSelection)(),this.anchor=t,setTimeout((function(){u.dom.focusButton.focus()}),0),e.visibleMenu&&e.visibleMenu.hide(),e.visibleMenu=this}},{key:"hide",value:function(){this.dom.absoluteAnchor&&(this.dom.absoluteAnchor.destroy(),delete this.dom.absoluteAnchor),this.dom.root.parentNode&&(this.dom.root.parentNode.removeChild(this.dom.root),this.onClose)&&this.onClose(),e.visibleMenu===this&&(e.visibleMenu=void 0)}},{key:"_onExpandItem",value:function(e){var t,n=this,i=e===this.expandedItem,o=this.expandedItem;o&&(o.ul.style.height="0",o.ul.style.padding="",setTimeout((function(){n.expandedItem!==o&&(o.ul.style.display="",r.removeClassName)(o.ul.parentNode,"jsoneditor-selected")}),300),this.expandedItem=void 0),i||((t=e.ul).style.display="block",t.clientHeight,setTimeout((function(){if(n.expandedItem===e){for(var i=0,r=0;r<t.childNodes.length;r++)i+=t.childNodes[r].clientHeight;t.style.height=i+"px",t.style.padding="5px 10px"}}),0),(0,r.addClassName)(t.parentNode,"jsoneditor-selected"),this.expandedItem=e)}},{key:"_onKeyDown",value:function(e){var t,n,i,o,s=e.target,a=e.which,l=!1;27===a?(this.selection&&(0,r.setSelection)(this.selection),this.anchor&&this.anchor.focus(),this.hide(),l=!0):9===a?e.shiftKey?0===(n=(t=this._getVisibleButtons()).indexOf(s))&&(t[t.length-1].focus(),l=!0):(n=(t=this._getVisibleButtons()).indexOf(s))===t.length-1&&(t[0].focus(),l=!0):37===a?("jsoneditor-expand"===s.className&&(n=(t=this._getVisibleButtons()).indexOf(s),i=t[n-1])&&i.focus(),l=!0):38===a?(n=(t=this._getVisibleButtons()).indexOf(s),(i=(i=(i=t[n-1])&&"jsoneditor-expand"===i.className?t[n-2]:i)||t[t.length-1])&&i.focus(),l=!0):39===a?(n=(t=this._getVisibleButtons()).indexOf(s),(o=t[n+1])&&"jsoneditor-expand"===o.className&&o.focus(),l=!0):40===a&&(n=(t=this._getVisibleButtons()).indexOf(s),(o=(o=(o=t[n+1])&&"jsoneditor-expand"===o.className?t[n+2]:o)||t[0])&&(o.focus(),l=!0),l=!0),l&&(e.stopPropagation(),e.preventDefault())}}])&&a(t.prototype,n),s&&a(t,s),Object.defineProperty(t,"prototype",{writable:!1}),e}();l.visibleMenu=void 0},6436:function(e,t,n){"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,function(e){return e=function(e,t){if("object"!==i(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!==i(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string"),"symbol"===i(e)?e:String(e)}(r.key),r)}}n.d(t,{Q:function(){return o}});var o=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var n;this.errorTableVisible=t.errorTableVisible,this.onToggleVisibility=t.onToggleVisibility,this.onFocusLine=t.onFocusLine||function(){},this.onChangeHeight=t.onChangeHeight,this.dom={},((t=document.createElement("div")).className="jsoneditor-validation-errors-container",this.dom.validationErrorsContainer=t,n=document.createElement("div")).style.display="none",n.className="jsoneditor-additional-errors fadein",n.textContent="Scroll for more \u25bf",this.dom.additionalErrorsIndication=n,t.appendChild(n),((t=document.createElement("span")).className="jsoneditor-validation-error-icon",t.style.display="none",this.dom.validationErrorIcon=t,n=document.createElement("span")).className="jsoneditor-validation-error-count",n.style.display="none",this.dom.validationErrorCount=n,this.dom.parseErrorIndication=document.createElement("span"),this.dom.parseErrorIndication.className="jsoneditor-parse-error-icon",this.dom.parseErrorIndication.style.display="none"}var t,n,i;return t=e,(n=[{key:"getErrorTable",value:function(){return this.dom.validationErrorsContainer}},{key:"getErrorCounter",value:function(){return this.dom.validationErrorCount}},{key:"getWarningIcon",value:function(){return this.dom.validationErrorIcon}},{key:"getErrorIcon",value:function(){return this.dom.parseErrorIndication}},{key:"toggleTableVisibility",value:function(){this.errorTableVisible=!this.errorTableVisible,this.onToggleVisibility(this.errorTableVisible)}},{key:"setErrors",value:function(e,t){var n,i,r=this,o=(this.dom.validationErrors&&(this.dom.validationErrors.parentNode.removeChild(this.dom.validationErrors),this.dom.validationErrors=null,this.dom.additionalErrorsIndication.style.display="none"),this.errorTableVisible&&0<e.length?((o=document.createElement("div")).className="jsoneditor-validation-errors",(i=document.createElement("table")).className="jsoneditor-text-errors",o.appendChild(i),n=document.createElement("tbody"),i.appendChild(n),e.forEach((function(e){isNaN(e.line)?e.dataPath&&(s=t.find((function(t){return t.path===e.dataPath})))&&(i=s.line+1):i=e.line;var i,o,s=document.createElement("tr"),a=(s.className=isNaN(i)?"":"jump-to-line","error"===e.type?s.className+=" parse-error":s.className+=" validation-error",document.createElement("td"));((o=document.createElement("button")).className="jsoneditor-schema-error",a.appendChild(o),s.appendChild(a),o=document.createElement("td")).style="white-space: nowrap;",o.textContent=isNaN(i)?"":"Ln "+i,s.appendChild(o),"string"==typeof e?((a=document.createElement("td")).colSpan=2,(o=document.createElement("pre")).appendChild(document.createTextNode(e)),a.appendChild(o),s.appendChild(a)):((o=document.createElement("td")).appendChild(document.createTextNode(e.dataPath||"")),s.appendChild(o),a=document.createElement("td"),(o=document.createElement("pre")).appendChild(document.createTextNode(e.message.replace(/<br>/gi,"\n"))),a.appendChild(o),s.appendChild(a)),s.onclick=function(){r.onFocusLine(i)},n.appendChild(s)})),this.dom.validationErrors=o,this.dom.validationErrorsContainer.appendChild(o),this.dom.additionalErrorsIndication.title=e.length+" errors total",this.dom.validationErrorsContainer.clientHeight<this.dom.validationErrorsContainer.scrollHeight?(this.dom.additionalErrorsIndication.style.display="block",this.dom.validationErrorsContainer.onscroll=function(){r.dom.additionalErrorsIndication.style.display=0<r.dom.validationErrorsContainer.clientHeight&&0===r.dom.validationErrorsContainer.scrollTop?"block":"none"}):this.dom.validationErrorsContainer.onscroll=void 0,i=this.dom.validationErrorsContainer.clientHeight+(this.dom.statusBar?this.dom.statusBar.clientHeight:0),this.onChangeHeight(i)):this.onChangeHeight(0),e.filter((function(e){return"error"!==e.type})).length);0<o?(this.dom.validationErrorCount.style.display="inline",this.dom.validationErrorCount.innerText=o,this.dom.validationErrorCount.onclick=this.toggleTableVisibility.bind(this),this.dom.validationErrorIcon.style.display="inline",this.dom.validationErrorIcon.title=o+" schema validation error(s) found",this.dom.validationErrorIcon.onclick=this.toggleTableVisibility.bind(this)):(this.dom.validationErrorCount.style.display="none",this.dom.validationErrorIcon.style.display="none"),e.some((function(e){return"error"===e.type}))?(i=e[0].line,this.dom.parseErrorIndication.style.display="block",this.dom.parseErrorIndication.title=isNaN(i)?"parse error - check that the json is valid":"parse error on line "+i,this.dom.parseErrorIndication.onclick=this.toggleTableVisibility.bind(this)):this.dom.parseErrorIndication.style.display="none"}}])&&r(t.prototype,n),i&&r(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}()},2474:function(e,t,n){"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,function(e){return e=function(e,t){if("object"!==i(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!==i(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string"),"symbol"===i(e)?e:String(e)}(r.key),r)}}n.d(t,{R:function(){return o}});var o=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");if(this.target=t.target||null,!this.target)throw new Error('FocusTracker constructor called without a "target" to track.');this.onFocus="function"==typeof t.onFocus?t.onFocus:null,this.onBlur="function"==typeof t.onBlur?t.onBlur:null,this._onClick=this._onEvent.bind(this),this._onKeyUp=function(e){9!==e.which&&9!==e.keyCode||this._onEvent(e)}.bind(this),this._onBlur=this._onEvent.bind(this),this.focusFlag=!1,this.firstEventFlag=!0,(this.onFocus||this.onBlur)&&(document.addEventListener("click",this._onClick),document.addEventListener("keyup",this._onKeyUp),document.addEventListener("blur",this._onBlur))}var t,n,i;return t=e,(n=[{key:"destroy",value:function(){document.removeEventListener("click",this._onClick),document.removeEventListener("keyup",this._onKeyUp),document.removeEventListener("blur",this._onBlur),this._onEvent({target:document.body})}},{key:"_onEvent",value:function(e){(e=(e=e.target)===this.target||!(!this.target.contains(e)&&!this.target.contains(document.activeElement)))?this.focusFlag||(this.onFocus&&this.onFocus({type:"focus",target:this.target}),this.focusFlag=!0):(this.focusFlag||this.firstEventFlag)&&(this.onBlur&&this.onBlur({type:"blur",target:this.target}),this.focusFlag=!1,this.firstEventFlag)&&(this.firstEventFlag=!1)}}])&&r(t.prototype,n),i&&r(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}()},3161:function(e,t,n){"use strict";var i=n(8170),r=n(8037),o=n(8038).treeModeMixins,s=n(8458).textModeMixins,a=n(341).previewModeMixins,l=(p=n(9791)).clear,c=p.extend,u=p.getInnerText,h=p.getInternetExplorerVersion,d=p.parse,p=n(2744).tryRequireAjv,g=n(2558).showTransformModal,f=n(6210).showSortModal,m=p();function v(e,t,n){if(!(this instanceof v))throw new Error('JSONEditor constructor called without "new".');var i=h();if(-1!==i&&i<9)throw new Error("Unsupported browser, IE9 or newer required. Please install the newest version of your browser.");t&&(t.error&&(console.warn('Option "error" has been renamed to "onError"'),t.onError=t.error,delete t.error),t.change&&(console.warn('Option "change" has been renamed to "onChange"'),t.onChange=t.change,delete t.change),t.editable&&(console.warn('Option "editable" has been renamed to "onEditable"'),t.onEditable=t.editable,delete t.editable),t.onChangeJSON&&("text"===t.mode||"code"===t.mode||t.modes&&(-1!==t.modes.indexOf("text")||-1!==t.modes.indexOf("code")))&&console.warn('Option "onChangeJSON" is not applicable to modes "text" and "code". Use "onChangeText" or "onChange" instead.'),t)&&Object.keys(t).forEach((function(e){-1===v.VALID_OPTIONS.indexOf(e)&&console.warn('Unknown option "'+e+'". This option will be ignored')})),arguments.length&&this._create(e,t,n)}"undefined"==typeof Promise&&console.error("Promise undefined. Please load a Promise polyfill in the browser in order to use JSONEditor"),v.modes={},v.prototype.DEBOUNCE_INTERVAL=150,v.VALID_OPTIONS=["ajv","schema","schemaRefs","templates","ace","theme","autocomplete","onChange","onChangeJSON","onChangeText","onExpand","onEditable","onError","onEvent","onModeChange","onNodeName","onValidate","onCreateMenu","onSelectionChange","onTextSelectionChange","onClassName","onFocus","onBlur","colorPicker","onColorPicker","timestampTag","timestampFormat","escapeUnicode","history","search","mode","modes","name","indentation","sortObjectKeys","navigationBar","statusBar","mainMenuBar","languages","language","enableSort","enableTransform","limitDragging","maxVisibleChilds","onValidationError","modalAnchor","popupAnchor","createQuery","executeQuery","queryDescription","allowSchemaSuggestions","showErrorTable"],v.prototype._create=function(e,t,n){this.container=e,this.options=t||{},this.json=n||{},e=this.options.mode||this.options.modes&&this.options.modes[0]||"tree",this.setMode(e)},v.prototype.destroy=function(){},v.prototype.set=function(e){this.json=e},v.prototype.get=function(){return this.json},v.prototype.setText=function(e){this.json=d(e)},v.prototype.getText=function(){return JSON.stringify(this.json)},v.prototype.setName=function(e){this.options||(this.options={}),this.options.name=e},v.prototype.getName=function(){return this.options&&this.options.name},v.prototype.setMode=function(e){if(e!==this.options.mode||!this.create){var t=this.container,n=c({},this.options),i=n.mode,r=(n.mode=e,v.modes[e]);if(!r)throw new Error('Unknown mode "'+n.mode+'"');var o="text"===r.data,s=this.getName(),a=this[o?"getText":"get"]();if(this.destroy(),l(this),c(this,r.mixin),this.create(t,n),this.setName(s),this[o?"setText":"set"](a),"function"==typeof r.load)try{r.load.call(this)}catch(e){console.error(e)}if("function"==typeof n.onModeChange&&e!==i)try{n.onModeChange(e,i)}catch(e){console.error(e)}}},v.prototype.getMode=function(){return this.options.mode},v.prototype._onError=function(e){this.options&&"function"==typeof this.options.onError?this.options.onError(e):window.alert(e.toString())},v.prototype.setSchema=function(e,t){if(e){var i;try{this.options.ajv?i=this.options.ajv:((i=m({allErrors:!0,verbose:!0,schemaId:"auto",$data:!0})).addMetaSchema(n(7171)),i.addMetaSchema(n(6273)))}catch(e){console.warn("Failed to create an instance of Ajv, JSON Schema validation is not available. Please use a JSONEditor bundle including Ajv, or pass an instance of Ajv as via the configuration option `ajv`.")}if(i){if(t){for(var r in t)i.removeSchema(r),t[r]&&i.addSchema(t[r],r);this.options.schemaRefs=t}this.validateSchema=i.compile(e),this.options.schema=e,this.options.schemaRefs=t,this.validate()}}else this.validateSchema=null,this.options.schema=null,this.options.schemaRefs=null,this.validate();this.refresh(),"function"==typeof this._onSchemaChange&&this._onSchemaChange(e,t)},v.prototype.validate=function(){},v.prototype.refresh=function(){},(v.registerMode=function(e){var t;if(Array.isArray(e))for(r=0;r<e.length;r++)v.registerMode(e[r]);else{if(!("mode"in e))throw new Error('Property "mode" missing');if(!("mixin"in e))throw new Error('Property "mixin" missing');if(!("data"in e))throw new Error('Property "data" missing');var n=e.mode;if(n in v.modes)throw new Error('Mode "'+n+'" already registered');if("function"!=typeof e.mixin.create)throw new Error('Required function "create" missing on mixin');for(var i=["setMode","registerMode","modes"],r=0;r<i.length;r++)if((t=i[r])in e.mixin)throw new Error('Reserved property "'+t+'" not allowed in mixin');v.modes[n]=e}})(o),v.registerMode(s),v.registerMode(a),v.ace=i,v.Ajv=m,v.VanillaPicker=r,v.showTransformModal=g,v.showSortModal=f,v.getInnerText=u,e.exports=v.default=v},6617:function(e,t,n){"use strict";n.d(t,{x:function(){return a}});var i=n(897),r=n(7907);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,function(e){return e=function(e,t){if("object"!==o(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!==o(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string"),"symbol"===o(e)?e:String(e)}(i.key),i)}}var a=function(){function e(t,n,o,s){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");for(var a={code:{text:(0,r.Iu)("modeCodeText"),title:(0,r.Iu)("modeCodeTitle"),click:function(){s("code")}},form:{text:(0,r.Iu)("modeFormText"),title:(0,r.Iu)("modeFormTitle"),click:function(){s("form")}},text:{text:(0,r.Iu)("modeTextText"),title:(0,r.Iu)("modeTextTitle"),click:function(){s("text")}},tree:{text:(0,r.Iu)("modeTreeText"),title:(0,r.Iu)("modeTreeTitle"),click:function(){s("tree")}},view:{text:(0,r.Iu)("modeViewText"),title:(0,r.Iu)("modeViewTitle"),click:function(){s("view")}},preview:{text:(0,r.Iu)("modePreviewText"),title:(0,r.Iu)("modePreviewTitle"),click:function(){s("preview")}}},l=[],c=0;c<n.length;c++){var u=n[c],h=a[u];if(!h)throw new Error('Unknown mode "'+u+'"');h.className="jsoneditor-type-modes"+(o===u?" jsoneditor-selected":""),l.push(h)}if(!(d=a[o]))throw new Error('Unknown mode "'+o+'"');var d=d.text,p=document.createElement("button");(p.type="button",p.className="jsoneditor-modes jsoneditor-separator",p.textContent=d+" \u25be",p.title=(0,r.Iu)("modeEditorTitle"),p.onclick=function(){new i.x(l).show(p,t)},d=document.createElement("div")).className="jsoneditor-modes",d.style.position="relative",d.appendChild(p),t.appendChild(d),this.dom={container:t,box:p,frame:d}}var t,n,o;return t=e,(n=[{key:"focus",value:function(){this.dom.box.focus()}},{key:"destroy",value:function(){this.dom&&this.dom.frame&&this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame),this.dom=null}}])&&s(t.prototype,n),o&&s(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}()},8170:function(e,t,n){var i;if(window.ace)i=window.ace;else try{i=n(6225),n(4091),n(3330),n(4317);var r=n(7923);i.config.setModuleUrl("ace/mode/json_worker",r)}catch(e){}e.exports=i},4864:function(){window.ace.define("ace/theme/jsoneditor",["require","exports","module","ace/lib/dom"],(function(e,t,n){t.isDark=!1,t.cssClass="ace-jsoneditor",t.cssText='.ace-jsoneditor .ace_gutter {\nbackground: #ebebeb;\ncolor: #333\n}\n\n.ace-jsoneditor.ace_editor {\nline-height: 1.3;\nbackground-color: #fff;\n}\n.ace-jsoneditor .ace_print-margin {\nwidth: 1px;\nbackground: #e8e8e8\n}\n.ace-jsoneditor .ace_scroller {\nbackground-color: #FFFFFF\n}\n.ace-jsoneditor .ace_text-layer {\ncolor: gray\n}\n.ace-jsoneditor .ace_variable {\ncolor: #1a1a1a\n}\n.ace-jsoneditor .ace_cursor {\nborder-left: 2px solid #000000\n}\n.ace-jsoneditor .ace_overwrite-cursors .ace_cursor {\nborder-left: 0px;\nborder-bottom: 1px solid #000000\n}\n.ace-jsoneditor .ace_marker-layer .ace_selection {\nbackground: lightgray\n}\n.ace-jsoneditor.ace_multiselect .ace_selection.ace_start {\nbox-shadow: 0 0 3px 0px #FFFFFF;\nborder-radius: 2px\n}\n.ace-jsoneditor .ace_marker-layer .ace_step {\nbackground: rgb(255, 255, 0)\n}\n.ace-jsoneditor .ace_marker-layer .ace_bracket {\nmargin: -1px 0 0 -1px;\nborder: 1px solid #BFBFBF\n}\n.ace-jsoneditor .ace_marker-layer .ace_active-line {\nbackground: #FFFBD1\n}\n.ace-jsoneditor .ace_gutter-active-line {\nbackground-color : #dcdcdc\n}\n.ace-jsoneditor .ace_marker-layer .ace_selected-word {\nborder: 1px solid lightgray\n}\n.ace-jsoneditor .ace_invisible {\ncolor: #BFBFBF\n}\n.ace-jsoneditor .ace_keyword,\n.ace-jsoneditor .ace_meta,\n.ace-jsoneditor .ace_support.ace_constant.ace_property-value {\ncolor: #AF956F\n}\n.ace-jsoneditor .ace_keyword.ace_operator {\ncolor: #484848\n}\n.ace-jsoneditor .ace_keyword.ace_other.ace_unit {\ncolor: #96DC5F\n}\n.ace-jsoneditor .ace_constant.ace_language {\ncolor: darkorange\n}\n.ace-jsoneditor .ace_constant.ace_numeric {\ncolor: red\n}\n.ace-jsoneditor .ace_constant.ace_character.ace_entity {\ncolor: #BF78CC\n}\n.ace-jsoneditor .ace_invalid {\ncolor: #FFFFFF;\nbackground-color: #FF002A;\n}\n.ace-jsoneditor .ace_fold {\nbackground-color: #AF956F;\nborder-color: #000000\n}\n.ace-jsoneditor .ace_storage,\n.ace-jsoneditor .ace_support.ace_class,\n.ace-jsoneditor .ace_support.ace_function,\n.ace-jsoneditor .ace_support.ace_other,\n.ace-jsoneditor .ace_support.ace_type {\ncolor: #C52727\n}\n.ace-jsoneditor .ace_string {\ncolor: green\n}\n.ace-jsoneditor .ace_comment {\ncolor: #BCC8BA\n}\n.ace-jsoneditor .ace_entity.ace_name.ace_tag,\n.ace-jsoneditor .ace_entity.ace_other.ace_attribute-name {\ncolor: #606060\n}\n.ace-jsoneditor .ace_markup.ace_underline {\ntext-decoration: underline\n}\n.ace-jsoneditor .ace_indent-guide {\nbackground: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y\n}',e("../lib/dom").importCssString(t.cssText,t.cssClass)}))},6589:function(e,t){var n;(n={trace:function(){},yy:{},symbols_:{error:2,JSONString:3,STRING:4,JSONNumber:5,NUMBER:6,JSONNullLiteral:7,NULL:8,JSONBooleanLiteral:9,TRUE:10,FALSE:11,JSONText:12,JSONValue:13,EOF:14,JSONObject:15,JSONArray:16,"{":17,"}":18,JSONMemberList:19,JSONMember:20,":":21,",":22,"[":23,"]":24,JSONElementList:25,$accept:0,$end:1},terminals_:{2:"error",4:"STRING",6:"NUMBER",8:"NULL",10:"TRUE",11:"FALSE",14:"EOF",17:"{",18:"}",21:":",22:",",23:"[",24:"]"},productions_:[0,[3,1],[5,1],[7,1],[9,1],[9,1],[12,2],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[15,2],[15,3],[20,3],[19,1],[19,3],[16,2],[16,3],[25,1],[25,3]],performAction:function(e,t,n,i,r,o,s){var a=o.length-1;switch(r){case 1:this.$=e.replace(/\\(\\|")/g,"$1").replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g,"\t").replace(/\\v/g,"\v").replace(/\\f/g,"\f").replace(/\\b/g,"\b");break;case 2:this.$=Number(e);break;case 3:this.$=null;break;case 4:this.$=!0;break;case 5:this.$=!1;break;case 6:return this.$=o[a-1];case 13:this.$={};break;case 14:case 19:this.$=o[a-1];break;case 15:this.$=[o[a-2],o[a]];break;case 16:this.$={},this.$[o[a][0]]=o[a][1];break;case 17:this.$=o[a-2],o[a-2][o[a][0]]=o[a][1];break;case 18:this.$=[];break;case 20:this.$=[o[a]];break;case 21:this.$=o[a-2],o[a-2].push(o[a])}},table:[{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],12:1,13:2,15:7,16:8,17:[1,14],23:[1,15]},{1:[3]},{14:[1,16]},{14:[2,7],18:[2,7],22:[2,7],24:[2,7]},{14:[2,8],18:[2,8],22:[2,8],24:[2,8]},{14:[2,9],18:[2,9],22:[2,9],24:[2,9]},{14:[2,10],18:[2,10],22:[2,10],24:[2,10]},{14:[2,11],18:[2,11],22:[2,11],24:[2,11]},{14:[2,12],18:[2,12],22:[2,12],24:[2,12]},{14:[2,3],18:[2,3],22:[2,3],24:[2,3]},{14:[2,4],18:[2,4],22:[2,4],24:[2,4]},{14:[2,5],18:[2,5],22:[2,5],24:[2,5]},{14:[2,1],18:[2,1],21:[2,1],22:[2,1],24:[2,1]},{14:[2,2],18:[2,2],22:[2,2],24:[2,2]},{3:20,4:[1,12],18:[1,17],19:18,20:19},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:23,15:7,16:8,17:[1,14],23:[1,15],24:[1,21],25:22},{1:[2,6]},{14:[2,13],18:[2,13],22:[2,13],24:[2,13]},{18:[1,24],22:[1,25]},{18:[2,16],22:[2,16]},{21:[1,26]},{14:[2,18],18:[2,18],22:[2,18],24:[2,18]},{22:[1,28],24:[1,27]},{22:[2,20],24:[2,20]},{14:[2,14],18:[2,14],22:[2,14],24:[2,14]},{3:20,4:[1,12],20:29},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:30,15:7,16:8,17:[1,14],23:[1,15]},{14:[2,19],18:[2,19],22:[2,19],24:[2,19]},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:31,15:7,16:8,17:[1,14],23:[1,15]},{18:[2,17],22:[2,17]},{18:[2,15],22:[2,15]},{22:[2,21],24:[2,21]}],defaultActions:{16:[2,6]},parseError:function(e,t){throw new Error(e)},parse:function(e){var t=this,n=[0],i=[null],r=[],o=this.table,s="",a=0,l=0,c=0,u=(this.lexer.setInput(e),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,void 0===this.lexer.yylloc&&(this.lexer.yylloc={}),this.lexer.yylloc);function h(){var e=t.lexer.lex()||1;return"number"!=typeof e&&t.symbols_[e]||e}r.push(u),"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var d,p,g,f,m,v,y,C,b,I={};;){if(g=n[n.length-1],void 0===(f=this.defaultActions[g]||(null==d&&(d=h()),o[g]&&o[g][d]))||!f.length||!f[0]){if(!c){for(m in C=[],o[g])this.terminals_[m]&&2<m&&C.push("'"+this.terminals_[m]+"'");var A="";A=this.lexer.showPosition?"Parse error on line "+(a+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+C.join(", ")+", got '"+this.terminals_[d]+"'":"Parse error on line "+(a+1)+": Unexpected "+(1==d?"end of input":"'"+(this.terminals_[d]||d)+"'"),this.parseError(A,{text:this.lexer.match,token:this.terminals_[d]||d,line:this.lexer.yylineno,loc:u,expected:C})}if(3==c){if(1==d)throw new Error(A||"Parsing halted.");l=this.lexer.yyleng,s=this.lexer.yytext,a=this.lexer.yylineno,u=this.lexer.yylloc,d=h()}for(;!(2..toString()in o[g]);){if(0==g)throw new Error(A||"Parsing halted.");b=1,n.length=n.length-2*b,i.length=i.length-b,r.length=r.length-b,g=n[n.length-1]}p=d,d=2,f=o[g=n[n.length-1]]&&o[g][2],c=3}if(f[0]instanceof Array&&1<f.length)throw new Error("Parse Error: multiple actions possible at state: "+g+", token: "+d);switch(f[0]){case 1:n.push(d),i.push(this.lexer.yytext),r.push(this.lexer.yylloc),n.push(f[1]),d=null,p?(d=p,p=null):(l=this.lexer.yyleng,s=this.lexer.yytext,a=this.lexer.yylineno,u=this.lexer.yylloc,0<c&&c--);break;case 2:if(v=this.productions_[f[1]][1],I.$=i[i.length-v],I._$={first_line:r[r.length-(v||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(v||1)].first_column,last_column:r[r.length-1].last_column},void 0!==(y=this.performAction.call(I,s,l,a,this.yy,f[1],i,r)))return y;v&&(n=n.slice(0,-1*v*2),i=i.slice(0,-1*v),r=r.slice(0,-1*v)),n.push(this.productions_[f[1]][0]),i.push(I.$),r.push(I._$),y=o[n[n.length-2]][n[n.length-1]],n.push(y);break;case 3:return!0}}return!0}}).lexer={EOF:1,parseError:function(e,t){if(!this.yy.parseError)throw new Error(e);this.yy.parseError(e,t)},setInput:function(e){return this._input=e,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this},input:function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.match+=e,this.matched+=e,e.match(/\n/)&&this.yylineno++,this._input=this._input.slice(1),e},unput:function(e){return this._input=e+this._input,this},more:function(){return this._more=!0,this},less:function(e){this._input=this.match.slice(e)+this._input},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var e,t,n,i,r=this._currentRules(),o=0;o<r.length&&(!(t=this._input.match(this.rules[r[o]]))||e&&!(t[0].length>e[0].length)||(e=t,n=o,this.options.flex));o++);return e?((i=e[0].match(/\n.*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-1:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.yyleng=this.yytext.length,this._more=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],i=this.performAction.call(this,this.yy,this,r[n],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i||void 0):""===this._input?this.EOF:void this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return void 0!==e?e:this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(e){this.begin(e)},options:{},performAction:function(e,t,n,i){switch(n){case 0:break;case 1:return 6;case 2:return t.yytext=t.yytext.substr(1,t.yyleng-2),4;case 3:return 17;case 4:return 18;case 5:return 23;case 6:return 24;case 7:return 22;case 8:return 21;case 9:return 10;case 10:return 11;case 11:return 8;case 12:return 14;case 13:return"INVALID"}},rules:[/^(?:\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:$)/,/^(?:.)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}},t.parser=n,t.parse=n.parse.bind(n)},3879:function(e){"use strict";function t(){}t.prototype={on:function(e,t){this._events=this._events||{},this._events[e]=this._events[e]||[],this._events[e].push(t)},off:function(e,t){this._events=this._events||{},e in this._events!=0&&this._events[e].splice(this._events[e].indexOf(t),1)},emit:function(e){if(this._events=this._events||{},e in this._events!=0)for(var t=0;t<this._events[e].length;t++)this._events[e][t].apply(this,Array.prototype.slice.call(arguments,1))}},t.mixin=function(e){for(var n=["on","off","emit"],i=0;i<n.length;i++)"function"==typeof e?e.prototype[n[i]]=t.prototype[n[i]]:e[n[i]]=t.prototype[n[i]];return e};var n={escapeRegExp:function(e){var t=/[\\^$.*+?()[\]{}|]/g,n=new RegExp(t.source);return e&&n.test(e)?e.replace(t,"\\$&"):e},extend:function(e,t){for(var i in t){var r;t.hasOwnProperty(i)&&((r=t[i])&&"[object Object]"===Object.prototype.toString.call(r)?(e[i]=e[i]||{},n.extend(e[i],r)):e[i]=r)}return e},each:function(e,t,n){if("[object Object]"===Object.prototype.toString.call(e))for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(n,i,e[i],e);else for(var r=0,o=e.length;r<o;r++)t.call(n,r,e[r],e)},createElement:function(e,t){var n,i=document.createElement(e);if(t&&"[object Object]"===Object.prototype.toString.call(t))for(n in t)n in i?i[n]=t[n]:"html"===n?i.innerHTML=t[n]:i.setAttribute(n,t[n]);return i},hasClass:function(e,t){if(e)return e.classList?e.classList.contains(t):!!e.className&&!!e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))},addClass:function(e,t){n.hasClass(e,t)||(e.classList?e.classList.add(t):e.className=e.className.trim()+" "+t)},removeClass:function(e,t){n.hasClass(e,t)&&(e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\s)"+t.split(" ").join("|")+"(\\s|$)","gi")," "))},closest:function(e,t){return e&&e!==document.body&&(t(e)?e:n.closest(e.parentNode,t))},isInt:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},debounce:function(e,t,n){var i;return function(){var r=this,o=arguments,s=n&&!i;clearTimeout(i),i=setTimeout((function(){i=null,n||e.apply(r,o)}),t),s&&e.apply(r,o)}},rect:function(e,t){var n=window,i=(e=e.getBoundingClientRect(),t?n.pageXOffset:0);return t=t?n.pageYOffset:0,{bottom:e.bottom+t,height:e.height,left:e.left+i,right:e.right+i,top:e.top+t,width:e.width}},includes:function(e,t){return-1<e.indexOf(t)},startsWith:function(e,t){return e.substr(0,t.length)===t},truncate:function(e){for(;e.firstChild;)e.removeChild(e.firstChild)}};function i(e,t){return e.hasOwnProperty(t)&&(!0===e[t]||e[t].length)}function r(e,t,i){e.parentNode?e.parentNode.parentNode||t.appendChild(e.parentNode):t.appendChild(e),n.removeClass(e,"excluded"),i||(e.textContent=e.textContent)}function o(){var e,t;this.items.length&&(e=document.createDocumentFragment(),this.config.pagination?(t=this.pages.slice(0,this.pageIndex),n.each(t,(function(t,i){n.each(i,(function(t,n){r(n,e,this.customOption)}),this)}),this)):n.each(this.items,(function(t,n){r(n,e,this.customOption)}),this),e.childElementCount&&(n.removeClass(this.items[this.navIndex],"active"),this.navIndex=(e.querySelector(".selectr-option.selected")||e.querySelector(".selectr-option")).idx,n.addClass(this.items[this.navIndex],"active")),this.tree.appendChild(e))}function s(e,t){t=t||e;var i={class:"selectr-option",role:"treeitem","aria-selected":!1};return this.customOption?i.html=this.config.renderOption(t):i.textContent=e.textContent,(t=n.createElement("li",i)).idx=e.idx,this.items.push(t),e.defaultSelected&&this.defaultSelected.push(e.idx),e.disabled&&(t.disabled=!0,n.addClass(t,"disabled")),t}function a(){var e,t=this.tree,i=t.scrollTop;t.scrollHeight-t.offsetHeight<=i&&this.pageIndex<this.pages.length&&(e=document.createDocumentFragment(),n.each(this.pages[this.pageIndex],(function(t,n){r(n,e,this.customOption)}),this),t.appendChild(e),this.pageIndex++,this.emit("selectr.paginate",{items:this.items.length,total:this.data.length,page:this.pageIndex,pages:this.pages.length}))}function l(){(this.config.searchable||this.config.taggable)&&(this.input.value=null,this.searching=!1,this.config.searchable&&n.removeClass(this.inputContainer,"active"),n.hasClass(this.container,"notice")&&(n.removeClass(this.container,"notice"),n.addClass(this.container,"open"),this.input.focus()),n.each(this.items,(function(e,t){n.removeClass(t,"excluded"),this.customOption||(t.textContent=t.textContent)}),this))}function c(e,t){if(!e)throw new Error("You must supply either a HTMLSelectElement or a CSS3 selector string.");if("string"==typeof(this.el=e)&&(this.el=document.querySelector(e)),null===this.el)throw new Error("The element you passed to Selectr can not be found.");if("select"!==this.el.nodeName.toLowerCase())throw new Error("The element you passed to Selectr is not a HTMLSelectElement.");this.render(t)}c.prototype.render=function(e){var r;this.rendered||((this.el.selectr=this).config=n.extend({defaultSelected:!0,width:"auto",disabled:!1,disabledMobile:!1,searchable:!0,clearable:!1,sortSelected:!1,allowDeselect:!1,closeOnScroll:!1,nativeDropdown:!1,nativeKeyboard:!1,placeholder:"Select an option...",taggable:!1,tagPlaceholder:"Enter a tag...",messages:{noResults:"No results.",noOptions:"No options available.",maxSelections:"A maximum of {max} items can be selected.",tagDuplicate:"That tag is already in use.",searchPlaceholder:"Search options..."}},e),this.originalType=this.el.type,this.originalIndex=this.el.tabIndex,this.defaultSelected=[],this.originalOptionCount=this.el.options.length,(this.config.multiple||this.config.taggable)&&(this.el.multiple=!0),this.disabled=i(this.config,"disabled"),this.opened=!1,this.config.taggable&&(this.config.searchable=!1),this.navigating=!1,this.mobileDevice=!1,!this.config.disabledMobile&&/Android|webOS|iPhone|iPad|BlackBerry|Windows Phone|Opera Mini|IEMobile|Mobile/i.test(navigator.userAgent)&&(this.mobileDevice=!0),this.customOption=this.config.hasOwnProperty("renderOption")&&"function"==typeof this.config.renderOption,this.customSelected=this.config.hasOwnProperty("renderSelection")&&"function"==typeof this.config.renderSelection,this.supportsEventPassiveOption=this.detectEventPassiveOption(),t.mixin(this),function(){this.requiresPagination=this.config.pagination&&0<this.config.pagination,i(this.config,"width")&&(n.isInt(this.config.width)?this.width=this.config.width+"px":"auto"===this.config.width?this.width="100%":n.includes(this.config.width,"%")&&(this.width=this.config.width)),this.container=n.createElement("div",{class:"selectr-container"}),this.config.customClass&&n.addClass(this.container,this.config.customClass),this.mobileDevice?n.addClass(this.container,"selectr-mobile"):n.addClass(this.container,"selectr-desktop"),this.el.tabIndex=-1,this.config.nativeDropdown||this.mobileDevice?n.addClass(this.el,"selectr-visible"):n.addClass(this.el,"selectr-hidden"),this.selected=n.createElement("div",{class:"selectr-selected",disabled:this.disabled,tabIndex:0,"aria-expanded":!1}),this.label=n.createElement(this.el.multiple?"ul":"span",{class:"selectr-label"});var e=n.createElement("div",{class:"selectr-options-container"});if(this.tree=n.createElement("ul",{class:"selectr-options",role:"tree","aria-hidden":!0,"aria-expanded":!1}),this.notice=n.createElement("div",{class:"selectr-notice"}),this.el.setAttribute("aria-hidden",!0),this.disabled&&(this.el.disabled=!0),this.el.multiple?(n.addClass(this.label,"selectr-tags"),n.addClass(this.container,"multiple"),this.tags=[],this.selectedValues=this.config.defaultSelected?this.getSelectedProperties("value"):[],this.selectedIndexes=this.getSelectedProperties("idx")):(this.selectedValue=null,this.selectedIndex=-1),this.selected.appendChild(this.label),this.config.clearable&&(this.selectClear=n.createElement("button",{class:"selectr-clear",type:"button"}),this.container.appendChild(this.selectClear),n.addClass(this.container,"clearable")),this.config.taggable){var t=n.createElement("li",{class:"input-tag"});if(this.input=n.createElement("input",{class:"selectr-tag-input",placeholder:this.config.tagPlaceholder,tagIndex:0,autocomplete:"off",autocorrect:"off",autocapitalize:"off",spellcheck:"false",role:"textbox",type:"search"}),t.appendChild(this.input),this.label.appendChild(t),n.addClass(this.container,"taggable"),this.tagSeperators=[","],this.config.tagSeperators){this.tagSeperators=this.tagSeperators.concat(this.config.tagSeperators);for(var r=[],o=0;o<this.tagSeperators.length;o++)r.push(n.escapeRegExp(this.tagSeperators[o]));this.tagSeperatorsRegex=new RegExp(r.join("|"),"i")}else this.tagSeperatorsRegex=new RegExp(",","i")}this.config.searchable&&(this.input=n.createElement("input",{class:"selectr-input",tagIndex:-1,autocomplete:"off",autocorrect:"off",autocapitalize:"off",spellcheck:"false",role:"textbox",type:"search",placeholder:this.config.messages.searchPlaceholder}),this.inputClear=n.createElement("button",{class:"selectr-input-clear",type:"button"}),this.inputContainer=n.createElement("div",{class:"selectr-input-container"}),this.inputContainer.appendChild(this.input),this.inputContainer.appendChild(this.inputClear),e.appendChild(this.inputContainer)),e.appendChild(this.notice),e.appendChild(this.tree),this.items=[],this.options=[],this.el.options.length&&(this.options=[].slice.call(this.el.options));var a,l,c,u=!1,h=0;this.el.children.length&&n.each(this.el.children,(function(e,t){"OPTGROUP"===t.nodeName?(u=n.createElement("ul",{class:"selectr-optgroup",role:"group",html:"<li class='selectr-optgroup--label'>"+t.label+"</li>"}),n.each(t.children,(function(e,t){t.idx=h,u.appendChild(s.call(this,t,u)),h++}),this)):(t.idx=h,s.call(this,t),h++)}),this),this.config.data&&Array.isArray(this.config.data)&&(a=!(this.data=[]),u=!1,h=0,n.each(this.config.data,(function(e,t){i(t,"children")?(a=n.createElement("optgroup",{label:t.text}),u=n.createElement("ul",{class:"selectr-optgroup",role:"group",html:"<li class='selectr-optgroup--label'>"+t.text+"</li>"}),n.each(t.children,(function(e,t){(l=new Option(t.text,t.value,!1,t.hasOwnProperty("selected")&&!0===t.selected)).disabled=i(t,"disabled"),this.options.push(l),a.appendChild(l),l.idx=h,u.appendChild(s.call(this,l,t)),this.data[h]=t,h++}),this),this.el.appendChild(a)):((l=new Option(t.text,t.value,!1,t.hasOwnProperty("selected")&&!0===t.selected)).disabled=i(t,"disabled"),this.options.push(l),l.idx=h,s.call(this,l,t),this.data[h]=t,h++)}),this)),this.setSelected(!0);for(var d=this.navIndex=0;d<this.items.length;d++)if(c=this.items[d],!n.hasClass(c,"disabled")){n.addClass(c,"active"),this.navIndex=d;break}this.requiresPagination&&(this.pageIndex=1,this.paginate()),this.container.appendChild(this.selected),this.container.appendChild(e),this.placeEl=n.createElement("div",{class:"selectr-placeholder"}),this.setPlaceholder(),this.selected.appendChild(this.placeEl),this.disabled&&this.disable(),this.el.parentNode.insertBefore(this.container,this.el),this.container.appendChild(this.el)}.call(this),this.bindEvents(),this.update(),this.optsRect=n.rect(this.tree),this.rendered=!0,this.el.multiple||(this.el.selectedIndex=this.selectedIndex),r=this,setTimeout((function(){r.emit("selectr.init")}),20))},c.prototype.getSelected=function(){return this.el.querySelectorAll("option:checked")},c.prototype.getSelectedProperties=function(e){var t=this.getSelected();return[].slice.call(t).map((function(t){return t[e]})).filter((function(e){return null!=e}))},c.prototype.detectEventPassiveOption=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t)}catch(e){}return e},c.prototype.bindEvents=function(){var e,t=this;this.events={},this.events.dismiss=function(e){e=e.target,this.container.contains(e)||!this.opened&&!n.hasClass(this.container,"notice")||this.close()}.bind(this),this.events.navigate=function(e){if(e=e||window.event,this.items.length&&this.opened&&n.includes([13,38,40],e.which)){if(e.preventDefault(),13===e.which)return!(this.noResults||this.config.taggable&&0<this.input.value.length)&&this.change(this.navIndex);var t,i=this.items[this.navIndex],r=this.navIndex;switch(e.which){case 38:(t=0)<this.navIndex&&this.navIndex--;break;case 40:this.navIndex<this.items.length-(t=1)&&this.navIndex++}for(this.navigating=!0;n.hasClass(this.items[this.navIndex],"disabled")||n.hasClass(this.items[this.navIndex],"excluded");){if(!(0<this.navIndex&&this.navIndex<this.items.length-1)){this.navIndex=r;break}if(t?this.navIndex++:this.navIndex--,this.searching){if(this.navIndex>this.tree.lastElementChild.idx){this.navIndex=this.tree.lastElementChild.idx;break}if(this.navIndex<this.tree.firstElementChild.idx){this.navIndex=this.tree.firstElementChild.idx;break}}}e=n.rect(this.items[this.navIndex]),t?(0===this.navIndex?this.tree.scrollTop=0:e.top+e.height>this.optsRect.top+this.optsRect.height&&(this.tree.scrollTop=this.tree.scrollTop+(e.top+e.height-(this.optsRect.top+this.optsRect.height))),this.navIndex===this.tree.childElementCount-1&&this.requiresPagination&&a.call(this)):0===this.navIndex?this.tree.scrollTop=0:e.top-this.optsRect.top<0&&(this.tree.scrollTop=this.tree.scrollTop+(e.top-this.optsRect.top)),i&&n.removeClass(i,"active"),n.addClass(this.items[this.navIndex],"active")}else this.navigating=!1}.bind(this),this.events.reset=this.reset.bind(this),(this.config.nativeDropdown||this.mobileDevice)&&(this.container.addEventListener("touchstart",(function(e){e.changedTouches[0].target===t.el&&t.toggle()}),!!this.supportsEventPassiveOption&&{passive:!0}),this.container.addEventListener("click",(function(e){e.target===t.el&&t.toggle()})),this.el.addEventListener("change",(function(e){e.__selfTriggered||(t.el.multiple?(e=t.getSelectedProperties("idx"),e=function(e,t){for(var n,i=[],r=e.slice(0),o=0;o<t.length;o++)-1<(n=r.indexOf(t[o]))?r.splice(n,1):i.push(t[o]);return[i,r]}(t.selectedIndexes,e),n.each(e[0],(function(e,n){t.select(n)}),t),n.each(e[1],(function(e,n){t.deselect(n)}),t)):-1<t.el.selectedIndex&&t.select(t.el.selectedIndex))}))),this.config.nativeDropdown&&this.container.addEventListener("keydown",(function(e){"Enter"===e.key&&t.selected===document.activeElement&&(t.toggle(),setTimeout((function(){t.el.focus()}),200))})),this.selected.addEventListener("click",(function(e){t.disabled||t.toggle(),e.preventDefault()})),this.config.nativeKeyboard&&(e="",this.selected.addEventListener("keydown",(function(n){var i;t.disabled||t.selected!==document.activeElement||n.altKey||n.ctrlKey||n.metaKey||(" "===n.key||!t.opened&&-1<["Enter","ArrowUp","ArrowDown"].indexOf(n.key)?(t.toggle(),n.preventDefault(),n.stopPropagation()):n.key.length<=2&&String[String.fromCodePoint?"fromCodePoint":"fromCharCode"](n.key[String.codePointAt?"codePointAt":"charCodeAt"](0))===n.key&&(t.config.multiple?(t.open(),t.config.searchable&&(t.input.value=n.key,t.input.focus(),t.search(null,!0))):(e+=n.key,(i=t.search(e,!0))&&i.length&&(t.clear(),t.setValue(i[0].value)),setTimeout((function(){e=""}),1e3)),n.preventDefault(),n.stopPropagation()))})),this.container.addEventListener("keyup",(function(e){t.opened&&"Escape"===e.key&&(t.close(),e.stopPropagation(),t.selected.focus())}))),this.label.addEventListener("click",(function(e){n.hasClass(e.target,"selectr-tag-remove")&&t.deselect(e.target.parentNode.idx)})),this.selectClear&&this.selectClear.addEventListener("click",this.clear.bind(this)),this.tree.addEventListener("mousedown",(function(e){e.preventDefault()})),this.tree.addEventListener("click",(function(e){var i=n.closest(e.target,(function(e){return e&&n.hasClass(e,"selectr-option")}));i&&!n.hasClass(i,"disabled")&&(n.hasClass(i,"selected")?(t.el.multiple||!t.el.multiple&&t.config.allowDeselect)&&t.deselect(i.idx):t.select(i.idx),t.opened&&!t.el.multiple)&&t.close(),e.preventDefault(),e.stopPropagation()})),this.tree.addEventListener("mouseover",(function(e){!n.hasClass(e.target,"selectr-option")||n.hasClass(e.target,"disabled")||(n.removeClass(t.items[t.navIndex],"active"),n.addClass(e.target,"active"),t.navIndex=[].slice.call(t.items).indexOf(e.target))})),this.config.searchable&&(this.input.addEventListener("focus",(function(e){t.searching=!0})),this.input.addEventListener("blur",(function(e){t.searching=!1})),this.input.addEventListener("keyup",(function(e){t.search(),t.config.taggable||(this.value.length?n.addClass(this.parentNode,"active"):n.removeClass(this.parentNode,"active"))})),this.inputClear.addEventListener("click",(function(e){t.input.value=null,l.call(t),t.tree.childElementCount||o.call(t)}))),this.config.taggable&&this.input.addEventListener("keyup",(function(e){var i,r;t.search(),t.config.taggable&&this.value.length&&(i=this.value.trim()).length&&(13===e.which||t.tagSeperatorsRegex.test(i))&&(e=i.replace(t.tagSeperatorsRegex,""),(r=(e=(e=n.escapeRegExp(e)).trim()).length?t.add({value:e,textContent:e,selected:!0},!0):r)?(t.close(),l.call(t)):(this.value="",t.setMessage(t.config.messages.tagDuplicate)))})),this.update=n.debounce((function(){t.opened&&t.config.closeOnScroll&&t.close(),t.width&&(t.container.style.width=t.width),t.invert()}),50),this.requiresPagination&&(this.paginateItems=n.debounce((function(){a.call(this)}),50),this.tree.addEventListener("scroll",this.paginateItems.bind(this))),document.addEventListener("click",this.events.dismiss),window.addEventListener("keydown",this.events.navigate),window.addEventListener("resize",this.update),window.addEventListener("scroll",this.update),this.on("selectr.destroy",(function(){document.removeEventListener("click",this.events.dismiss),window.removeEventListener("keydown",this.events.navigate),window.removeEventListener("resize",this.update),window.removeEventListener("scroll",this.update)})),this.el.form&&(this.el.form.addEventListener("reset",this.events.reset),this.on("selectr.destroy",(function(){this.el.form.removeEventListener("reset",this.events.reset)})))},c.prototype.setSelected=function(e){var t;this.config.data||this.el.multiple||!this.el.options.length||(0!==this.el.selectedIndex||this.el.options[0].defaultSelected||this.config.defaultSelected||(this.el.selectedIndex=-1),this.selectedIndex=this.el.selectedIndex,-1<this.selectedIndex&&this.select(this.selectedIndex)),this.config.multiple&&"select-one"===this.originalType&&!this.config.data&&this.el.options[0].selected&&!this.el.options[0].defaultSelected&&(this.el.options[0].selected=!1),n.each(this.options,(function(e,t){t.selected&&t.defaultSelected&&this.select(t.idx)}),this),this.config.selectedValue&&this.setValue(this.config.selectedValue),this.config.data&&(!this.el.multiple&&this.config.defaultSelected&&this.el.selectedIndex<0&&0<this.config.data.length&&this.select(0),t=0,n.each(this.config.data,(function(e,r){i(r,"children")?n.each(r.children,(function(e,n){n.hasOwnProperty("selected")&&!0===n.selected&&this.select(t),t++}),this):(r.hasOwnProperty("selected")&&!0===r.selected&&this.select(t),t++)}),this))},c.prototype.destroy=function(){this.rendered&&(this.emit("selectr.destroy"),"select-one"===this.originalType&&(this.el.multiple=!1),this.config.data&&(this.el.innerHTML=""),n.removeClass(this.el,"selectr-hidden"),this.container.parentNode.replaceChild(this.el,this.container),this.rendered=!1,delete this.el.selectr)},c.prototype.change=function(e){var t=this.items[e],i=this.options[e];i.disabled||(i.selected&&n.hasClass(t,"selected")?this.deselect(e):this.select(e),this.opened&&!this.el.multiple&&this.close())},c.prototype.select=function(e){var t=this.items[e],i=[].slice.call(this.el.options),r=this.options[e];if(this.el.multiple){if(n.includes(this.selectedIndexes,e))return!1;if(this.config.maxSelections&&this.tags.length===this.config.maxSelections)return this.setMessage(this.config.messages.maxSelections.replace("{max}",this.config.maxSelections),!0),!1;this.selectedValues.push(r.value),this.selectedIndexes.push(e),function(e){var t,i=this,r=document.createDocumentFragment(),o=this.options[e.idx],s=this.data?this.data[e.idx]:o,a={class:"selectr-tag"};this.customSelected?a.html=this.config.renderSelection(s):a.textContent=o.textContent,s=n.createElement("li",a),a=n.createElement("button",{class:"selectr-tag-remove",type:"button"}),s.appendChild(a),s.idx=e.idx,s.tag=o.value,this.tags.push(s),this.config.sortSelected?(a=this.tags.slice(),t=function(e,t){e.replace(/(\d+)|(\D+)/g,(function(e,n,i){t.push([n||1/0,i||""])}))},a.sort((function(e,n){var r,o,s=[],a=[];for(!0===i.config.sortSelected?(r=e.tag,o=n.tag):"text"===i.config.sortSelected&&(r=e.textContent,o=n.textContent),t(r,s),t(o,a);s.length&&a.length;){var l=s.shift(),c=a.shift();if(l=l[0]-c[0]||l[1].localeCompare(c[1]))return l}return s.length-a.length})),n.each(a,(function(e,t){r.appendChild(t)})),this.label.innerHTML=""):r.appendChild(s),this.config.taggable?this.label.insertBefore(r,this.input.parentNode):this.label.appendChild(r)}.call(this,t)}else{var o=this.data?this.data[e]:r;this.customSelected?this.label.innerHTML=this.config.renderSelection(o):this.label.textContent=r.textContent,this.selectedValue=r.value,this.selectedIndex=e,n.each(this.options,(function(t,i){var r=this.items[t];t!==e&&(r&&n.removeClass(r,"selected"),i.selected=!1,i.removeAttribute("selected"))}),this)}n.includes(i,r)||this.el.add(r),t.setAttribute("aria-selected",!0),n.addClass(t,"selected"),n.addClass(this.container,"has-selected"),r.selected=!0,r.setAttribute("selected",""),this.emit("selectr.change",r),this.emit("selectr.select",r),"createEvent"in document?((o=document.createEvent("HTMLEvents")).initEvent("change",!0,!0),o.__selfTriggered=!0,this.el.dispatchEvent(o)):this.el.fireEvent("onchange")},c.prototype.deselect=function(e,t){var i=this.items[e],r=this.options[e];if(this.el.multiple){var o=this.selectedIndexes.indexOf(e);this.selectedIndexes.splice(o,1),o=this.selectedValues.indexOf(r.value),this.selectedValues.splice(o,1),function(e){var t=!1;n.each(this.tags,(function(n,i){i.idx===e.idx&&(t=i)}),this),t&&(this.label.removeChild(t),this.tags.splice(this.tags.indexOf(t),1))}.call(this,i),this.tags.length||n.removeClass(this.container,"has-selected")}else{if(!t&&!this.config.clearable&&!this.config.allowDeselect)return!1;this.label.innerHTML="",this.selectedValue=null,this.el.selectedIndex=this.selectedIndex=-1,n.removeClass(this.container,"has-selected")}this.items[e].setAttribute("aria-selected",!1),n.removeClass(this.items[e],"selected"),r.selected=!1,r.removeAttribute("selected"),this.emit("selectr.change",null),this.emit("selectr.deselect",r),"createEvent"in document?((o=document.createEvent("HTMLEvents")).initEvent("change",!0,!0),o.__selfTriggered=!0,this.el.dispatchEvent(o)):this.el.fireEvent("onchange")},c.prototype.setValue=function(e){var t=Array.isArray(e);if(t||(e=e.toString().trim()),!this.el.multiple&&t)return!1;n.each(this.options,(function(n,i){(t&&-1<e.indexOf(i.value)||i.value===e)&&this.change(i.idx)}),this)},c.prototype.getValue=function(e,t){var i,r;return this.el.multiple?e?this.selectedIndexes.length&&(r={values:[]},n.each(this.selectedIndexes,(function(e,t){t=this.options[t],r.values[e]={value:t.value,text:t.textContent}}),this)):r=this.selectedValues.slice():r=e?{value:(i=this.options[this.selectedIndex]).value,text:i.textContent}:this.selectedValue,r=e&&t?JSON.stringify(r):r},c.prototype.add=function(e,t){if(e){if(this.data=this.data||[],this.items=this.items||[],this.options=this.options||[],Array.isArray(e))n.each(e,(function(e,n){this.add(n,t)}),this);else if("[object Object]"===Object.prototype.toString.call(e)){if(t){var i=!1;if(n.each(this.options,(function(t,n){n.value.toLowerCase()===e.value.toLowerCase()&&(i=!0)})),i)return!1}var r=n.createElement("option",e);return this.data.push(e),this.mobileDevice&&this.el.add(r),this.options.push(r),r.idx=0<this.options.length?this.options.length-1:0,s.call(this,r),e.selected&&this.select(r.idx),this.setPlaceholder(),r}return this.config.pagination&&this.paginate(),!0}},c.prototype.remove=function(e){var t,i=[];Array.isArray(e)?n.each(e,(function(e,t){n.isInt(t)?i.push(this.getOptionByIndex(t)):"string"==typeof t&&i.push(this.getOptionByValue(t))}),this):n.isInt(e)?i.push(this.getOptionByIndex(e)):"string"==typeof e&&i.push(this.getOptionByValue(e)),i.length&&(n.each(i,(function(e,i){t=i.idx,this.el.remove(i),this.options.splice(t,1),(i=this.items[t].parentNode)&&i.removeChild(this.items[t]),this.items.splice(t,1),n.each(this.options,(function(e,t){t.idx=e,this.items[e].idx=e}),this)}),this),this.setPlaceholder(),this.config.pagination)&&this.paginate()},c.prototype.removeAll=function(){this.clear(!0),n.each(this.el.options,(function(e,t){this.el.remove(t)}),this),n.truncate(this.tree),this.items=[],this.options=[],this.data=[],this.navIndex=0,this.requiresPagination&&(this.requiresPagination=!1,this.pageIndex=1,this.pages=[]),this.setPlaceholder()},c.prototype.search=function(e,t){var i,s,a,l,c;if(!this.navigating)return i=!1,e||(e=this.input.value,i=!0,this.removeMessage(),n.truncate(this.tree)),s=[],a=document.createDocumentFragment(),0<(e=e.trim().toLowerCase()).length?(l=t?n.startsWith:n.includes,n.each(this.options,(function(t,o){var c,u,h,d,p=this.items[o.idx];l(o.textContent.trim().toLowerCase(),e)&&!o.disabled?(s.push({text:o.textContent,value:o.value}),i&&(r(p,a,this.customOption),n.removeClass(p,"excluded"),!this.customOption)&&(c=e,h=o.textContent,d=(c=new RegExp(c,"ig")).exec(h))&&(o.innerHTML="",(u=document.createElement("span")).classList.add("selectr-match"),u.textContent=d[0],o.appendChild(document.createTextNode(h.substring(0,d.index))),o.appendChild(u),o.appendChild(document.createTextNode(h.substring(c.lastIndex))))):i&&n.addClass(p,"excluded")}),this),i&&(a.childElementCount?(t=this.items[this.navIndex],c=a.querySelector(".selectr-option:not(.excluded)"),this.noResults=!1,n.removeClass(t,"active"),this.navIndex=c.idx,n.addClass(c,"active")):this.config.taggable||(this.noResults=!0,this.setMessage(this.config.messages.noResults)),this.tree.appendChild(a))):o.call(this),s},c.prototype.toggle=function(){this.disabled||(this.opened?this.close():this.open())},c.prototype.open=function(){var e=this;if(!this.options.length)return!1;this.opened||this.emit("selectr.open"),this.opened=!0,this.mobileDevice||this.config.nativeDropdown?(n.addClass(this.container,"native-open"),this.config.data&&n.each(this.options,(function(e,t){this.el.add(t)}),this)):(n.addClass(this.container,"open"),o.call(this),this.invert(),this.tree.scrollTop=0,n.removeClass(this.container,"notice"),this.selected.setAttribute("aria-expanded",!0),this.tree.setAttribute("aria-hidden",!1),this.tree.setAttribute("aria-expanded",!0),this.config.searchable&&!this.config.taggable&&setTimeout((function(){e.input.focus(),e.input.tabIndex=0}),10))},c.prototype.close=function(){var e;this.opened&&this.emit("selectr.close"),this.opened=!1,this.navigating=!1,this.mobileDevice||this.config.nativeDropdown?n.removeClass(this.container,"native-open"):(e=n.hasClass(this.container,"notice"),this.config.searchable&&!e&&(this.input.blur(),this.input.tabIndex=-1,this.searching=!1),e&&(n.removeClass(this.container,"notice"),this.notice.textContent=""),n.removeClass(this.container,"open"),n.removeClass(this.container,"native-open"),this.selected.setAttribute("aria-expanded",!1),this.tree.setAttribute("aria-hidden",!0),this.tree.setAttribute("aria-expanded",!1),n.truncate(this.tree),l.call(this))},c.prototype.enable=function(){this.disabled=!1,this.el.disabled=!1,this.selected.tabIndex=this.originalIndex,this.el.multiple&&n.each(this.tags,(function(e,t){t.lastElementChild.tabIndex=0})),n.removeClass(this.container,"selectr-disabled")},c.prototype.disable=function(e){e||(this.el.disabled=!0),this.selected.tabIndex=-1,this.el.multiple&&n.each(this.tags,(function(e,t){t.lastElementChild.tabIndex=-1})),this.disabled=!0,n.addClass(this.container,"selectr-disabled")},c.prototype.reset=function(){this.disabled||(this.clear(),this.setSelected(!0),n.each(this.defaultSelected,(function(e,t){this.select(t)}),this),this.emit("selectr.reset"))},c.prototype.clear=function(e,t){var i;this.el.multiple?this.selectedIndexes.length&&(i=this.selectedIndexes.slice(),t?this.deselect(i.slice(-1)[0]):n.each(i,(function(e,t){this.deselect(t)}),this)):-1<this.selectedIndex&&this.deselect(this.selectedIndex,e),this.emit("selectr.clear")},c.prototype.serialise=function(e){var t=[];return n.each(this.options,(function(e,n){var i={value:n.value,text:n.textContent};n.selected&&(i.selected=!0),n.disabled&&(i.disabled=!0),t[e]=i})),e?JSON.stringify(t):t},c.prototype.serialize=function(e){return this.serialise(e)},c.prototype.setPlaceholder=function(e){e=e||this.config.placeholder||this.el.getAttribute("placeholder"),this.options.length||(e=this.config.messages.noOptions),this.placeEl.innerHTML=e},c.prototype.paginate=function(){var e;if(this.items.length)return(e=this).pages=this.items.map((function(t,n){return n%e.config.pagination==0?e.items.slice(n,n+e.config.pagination):null})).filter((function(e){return e})),this.pages},c.prototype.setMessage=function(e,t){t&&this.close(),n.addClass(this.container,"notice"),this.notice.textContent=e},c.prototype.removeMessage=function(){n.removeClass(this.container,"notice"),this.notice.innerHTML=""},c.prototype.invert=function(){var e=n.rect(this.selected),t=this.tree.parentNode.offsetHeight,i=window.innerHeight;e.top+e.height+t>i?(n.addClass(this.container,"inverted"),this.isInverted=!0):(n.removeClass(this.container,"inverted"),this.isInverted=!1),this.optsRect=n.rect(this.tree)},c.prototype.getOptionByIndex=function(e){return this.options[e]},c.prototype.getOptionByValue=function(e){for(var t=!1,n=0,i=this.options.length;n<i;n++)if(this.options[n].value.trim()===e.toString().trim()){t=this.options[n];break}return t},e.exports=c},4188:function(e,t,n){"use strict";n.d(t,{EX:function(){return r},WF:function(){return o},oW:function(){return s},qD:function(){return i}});var i=document.body,r=10485760,o=2e4,s=2147483648},2602:function(e,t,n){"use strict";n.d(t,{w:function(){return r}});var i=n(9791);function r(e,t,n){var r,o=3<arguments.length&&void 0!==arguments[3]&&arguments[3],s="function"==typeof(l=e).getRootNode?l.getRootNode():window,a={},l=e.getBoundingClientRect(),c=t.getBoundingClientRect(),u=document.createElement("div");function h(){if(u&&u.parentNode){for(var t in u.parentNode.removeChild(u),a)r=t,Object.prototype.hasOwnProperty.call(a,r)&&((r=a[t])&&(0,i.removeEventListener)(s,t,r),delete a[t]);"function"==typeof n&&n(e)}var r}function d(e){(e=e.target)===u||(0,i.isChildOf)(e,u)||h()}return u.className="jsoneditor-anchor",u.style.position="absolute",u.style.left=l.left-c.left+"px",u.style.top=l.top-c.top+"px",u.style.width=l.width-2+"px",u.style.height=l.height-2+"px",u.style.boxSizing="border-box",t.appendChild(u),a.mousedown=(0,i.addEventListener)(s,"mousedown",d),a.mousewheel=(0,i.addEventListener)(s,"mousewheel",d),o&&(r=null,u.onmouseover=function(){clearTimeout(r),r=null},u.onmouseout=function(){r=r||setTimeout(h,200)}),u.destroy=h,u}},7923:function(e){e.exports="data:application/javascript;base64,Im5vIHVzZSBzdHJpY3QiOwohKGZ1bmN0aW9uKHdpbmRvdykgewppZiAodHlwZW9mIHdpbmRvdy53aW5kb3cgIT0gInVuZGVmaW5lZCIgJiYgd2luZG93LmRvY3VtZW50KQogICAgcmV0dXJuOwppZiAod2luZG93LnJlcXVpcmUgJiYgd2luZG93LmRlZmluZSkKICAgIHJldHVybjsKCmlmICghd2luZG93LmNvbnNvbGUpIHsKICAgIHdpbmRvdy5jb25zb2xlID0gZnVuY3Rpb24oKSB7CiAgICAgICAgdmFyIG1zZ3MgPSBBcnJheS5wcm90b3R5cGUuc2xpY2UuY2FsbChhcmd1bWVudHMsIDApOwogICAgICAgIHBvc3RNZXNzYWdlKHt0eXBlOiAibG9nIiwgZGF0YTogbXNnc30pOwogICAgfTsKICAgIHdpbmRvdy5jb25zb2xlLmVycm9yID0KICAgIHdpbmRvdy5jb25zb2xlLndhcm4gPSAKICAgIHdpbmRvdy5jb25zb2xlLmxvZyA9CiAgICB3aW5kb3cuY29uc29sZS50cmFjZSA9IHdpbmRvdy5jb25zb2xlOwp9CndpbmRvdy53aW5kb3cgPSB3aW5kb3c7CndpbmRvdy5hY2UgPSB3aW5kb3c7Cgp3aW5kb3cub25lcnJvciA9IGZ1bmN0aW9uKG1lc3NhZ2UsIGZpbGUsIGxpbmUsIGNvbCwgZXJyKSB7CiAgICBwb3N0TWVzc2FnZSh7dHlwZTogImVycm9yIiwgZGF0YTogewogICAgICAgIG1lc3NhZ2U6IG1lc3NhZ2UsCiAgICAgICAgZGF0YTogZXJyICYmIGVyci5kYXRhLAogICAgICAgIGZpbGU6IGZpbGUsCiAgICAgICAgbGluZTogbGluZSwgCiAgICAgICAgY29sOiBjb2wsCiAgICAgICAgc3RhY2s6IGVyciAmJiBlcnIuc3RhY2sKICAgIH19KTsKfTsKCndpbmRvdy5ub3JtYWxpemVNb2R1bGUgPSBmdW5jdGlvbihwYXJlbnRJZCwgbW9kdWxlTmFtZSkgewogICAgLy8gbm9ybWFsaXplIHBsdWdpbiByZXF1aXJlcwogICAgaWYgKG1vZHVsZU5hbWUuaW5kZXhPZigiISIpICE9PSAtMSkgewogICAgICAgIHZhciBjaHVua3MgPSBtb2R1bGVOYW1lLnNwbGl0KCIhIik7CiAgICAgICAgcmV0dXJuIHdpbmRvdy5ub3JtYWxpemVNb2R1bGUocGFyZW50SWQsIGNodW5rc1swXSkgKyAiISIgKyB3aW5kb3cubm9ybWFsaXplTW9kdWxlKHBhcmVudElkLCBjaHVua3NbMV0pOwogICAgfQogICAgLy8gbm9ybWFsaXplIHJlbGF0aXZlIHJlcXVpcmVzCiAgICBpZiAobW9kdWxlTmFtZS5jaGFyQXQoMCkgPT0gIi4iKSB7CiAgICAgICAgdmFyIGJhc2UgPSBwYXJlbnRJZC5zcGxpdCgiLyIpLnNsaWNlKDAsIC0xKS5qb2luKCIvIik7CiAgICAgICAgbW9kdWxlTmFtZSA9IChiYXNlID8gYmFzZSArICIvIiA6ICIiKSArIG1vZHVsZU5hbWU7CiAgICAgICAgCiAgICAgICAgd2hpbGUgKG1vZHVsZU5hbWUuaW5kZXhPZigiLiIpICE9PSAtMSAmJiBwcmV2aW91cyAhPSBtb2R1bGVOYW1lKSB7CiAgICAgICAgICAgIHZhciBwcmV2aW91cyA9IG1vZHVsZU5hbWU7CiAgICAgICAgICAgIG1vZHVsZU5hbWUgPSBtb2R1bGVOYW1lLnJlcGxhY2UoL15cLlwvLywgIiIpLnJlcGxhY2UoL1wvXC5cLy8sICIvIikucmVwbGFjZSgvW15cL10rXC9cLlwuXC8vLCAiIik7CiAgICAgICAgfQogICAgfQogICAgCiAgICByZXR1cm4gbW9kdWxlTmFtZTsKfTsKCndpbmRvdy5yZXF1aXJlID0gZnVuY3Rpb24gcmVxdWlyZShwYXJlbnRJZCwgaWQpIHsKICAgIGlmICghaWQpIHsKICAgICAgICBpZCA9IHBhcmVudElkOwogICAgICAgIHBhcmVudElkID0gbnVsbDsKICAgIH0KICAgIGlmICghaWQuY2hhckF0KQogICAgICAgIHRocm93IG5ldyBFcnJvcigid29ya2VyLmpzIHJlcXVpcmUoKSBhY2NlcHRzIG9ubHkgKHBhcmVudElkLCBpZCkgYXMgYXJndW1lbnRzIik7CgogICAgaWQgPSB3aW5kb3cubm9ybWFsaXplTW9kdWxlKHBhcmVudElkLCBpZCk7CgogICAgdmFyIG1vZHVsZSA9IHdpbmRvdy5yZXF1aXJlLm1vZHVsZXNbaWRdOwogICAgaWYgKG1vZHVsZSkgewogICAgICAgIGlmICghbW9kdWxlLmluaXRpYWxpemVkKSB7CiAgICAgICAgICAgIG1vZHVsZS5pbml0aWFsaXplZCA9IHRydWU7CiAgICAgICAgICAgIG1vZHVsZS5leHBvcnRzID0gbW9kdWxlLmZhY3RvcnkoKS5leHBvcnRzOwogICAgICAgIH0KICAgICAgICByZXR1cm4gbW9kdWxlLmV4cG9ydHM7CiAgICB9CiAgIAogICAgaWYgKCF3aW5kb3cucmVxdWlyZS50bG5zKQogICAgICAgIHJldHVybiBjb25zb2xlLmxvZygidW5hYmxlIHRvIGxvYWQgIiArIGlkKTsKICAgIAogICAgdmFyIHBhdGggPSByZXNvbHZlTW9kdWxlSWQoaWQsIHdpbmRvdy5yZXF1aXJlLnRsbnMpOwogICAgaWYgKHBhdGguc2xpY2UoLTMpICE9ICIuanMiKSBwYXRoICs9ICIuanMiOwogICAgCiAgICB3aW5kb3cucmVxdWlyZS5pZCA9IGlkOwogICAgd2luZG93LnJlcXVpcmUubW9kdWxlc1tpZF0gPSB7fTsgLy8gcHJldmVudCBpbmZpbml0ZSBsb29wIG9uIGJyb2tlbiBtb2R1bGVzCiAgICBpbXBvcnRTY3JpcHRzKHBhdGgpOwogICAgcmV0dXJuIHdpbmRvdy5yZXF1aXJlKHBhcmVudElkLCBpZCk7Cn07CmZ1bmN0aW9uIHJlc29sdmVNb2R1bGVJZChpZCwgcGF0aHMpIHsKICAgIHZhciB0ZXN0UGF0aCA9IGlkLCB0YWlsID0gIiI7CiAgICB3aGlsZSAodGVzdFBhdGgpIHsKICAgICAgICB2YXIgYWxpYXMgPSBwYXRoc1t0ZXN0UGF0aF07CiAgICAgICAgaWYgKHR5cGVvZiBhbGlhcyA9PSAic3RyaW5nIikgewogICAgICAgICAgICByZXR1cm4gYWxpYXMgKyB0YWlsOwogICAgICAgIH0gZWxzZSBpZiAoYWxpYXMpIHsKICAgICAgICAgICAgcmV0dXJuICBhbGlhcy5sb2NhdGlvbi5yZXBsYWNlKC9cLyokLywgIi8iKSArICh0YWlsIHx8IGFsaWFzLm1haW4gfHwgYWxpYXMubmFtZSk7CiAgICAgICAgfSBlbHNlIGlmIChhbGlhcyA9PT0gZmFsc2UpIHsKICAgICAgICAgICAgcmV0dXJuICIiOwogICAgICAgIH0KICAgICAgICB2YXIgaSA9IHRlc3RQYXRoLmxhc3RJbmRleE9mKCIvIik7CiAgICAgICAgaWYgKGkgPT09IC0xKSBicmVhazsKICAgICAgICB0YWlsID0gdGVzdFBhdGguc3Vic3RyKGkpICsgdGFpbDsKICAgICAgICB0ZXN0UGF0aCA9IHRlc3RQYXRoLnNsaWNlKDAsIGkpOwogICAgfQogICAgcmV0dXJuIGlkOwp9CndpbmRvdy5yZXF1aXJlLm1vZHVsZXMgPSB7fTsKd2luZG93LnJlcXVpcmUudGxucyA9IHt9OwoKd2luZG93LmRlZmluZSA9IGZ1bmN0aW9uKGlkLCBkZXBzLCBmYWN0b3J5KSB7CiAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCA9PSAyKSB7CiAgICAgICAgZmFjdG9yeSA9IGRlcHM7CiAgICAgICAgaWYgKHR5cGVvZiBpZCAhPSAic3RyaW5nIikgewogICAgICAgICAgICBkZXBzID0gaWQ7CiAgICAgICAgICAgIGlkID0gd2luZG93LnJlcXVpcmUuaWQ7CiAgICAgICAgfQogICAgfSBlbHNlIGlmIChhcmd1bWVudHMubGVuZ3RoID09IDEpIHsKICAgICAgICBmYWN0b3J5ID0gaWQ7CiAgICAgICAgZGVwcyA9IFtdOwogICAgICAgIGlkID0gd2luZG93LnJlcXVpcmUuaWQ7CiAgICB9CiAgICAKICAgIGlmICh0eXBlb2YgZmFjdG9yeSAhPSAiZnVuY3Rpb24iKSB7CiAgICAgICAgd2luZG93LnJlcXVpcmUubW9kdWxlc1tpZF0gPSB7CiAgICAgICAgICAgIGV4cG9ydHM6IGZhY3RvcnksCiAgICAgICAgICAgIGluaXRpYWxpemVkOiB0cnVlCiAgICAgICAgfTsKICAgICAgICByZXR1cm47CiAgICB9CgogICAgaWYgKCFkZXBzLmxlbmd0aCkKICAgICAgICAvLyBJZiB0aGVyZSBpcyBubyBkZXBlbmRlbmNpZXMsIHdlIGluamVjdCAicmVxdWlyZSIsICJleHBvcnRzIiBhbmQKICAgICAgICAvLyAibW9kdWxlIiBhcyBkZXBlbmRlbmNpZXMsIHRvIHByb3ZpZGUgQ29tbW9uSlMgY29tcGF0aWJpbGl0eS4KICAgICAgICBkZXBzID0gWyJyZXF1aXJlIiwgImV4cG9ydHMiLCAibW9kdWxlIl07CgogICAgdmFyIHJlcSA9IGZ1bmN0aW9uKGNoaWxkSWQpIHsKICAgICAgICByZXR1cm4gd2luZG93LnJlcXVpcmUoaWQsIGNoaWxkSWQpOwogICAgfTsKCiAgICB3aW5kb3cucmVxdWlyZS5tb2R1bGVzW2lkXSA9IHsKICAgICAgICBleHBvcnRzOiB7fSwKICAgICAgICBmYWN0b3J5OiBmdW5jdGlvbigpIHsKICAgICAgICAgICAgdmFyIG1vZHVsZSA9IHRoaXM7CiAgICAgICAgICAgIHZhciByZXR1cm5FeHBvcnRzID0gZmFjdG9yeS5hcHBseSh0aGlzLCBkZXBzLnNsaWNlKDAsIGZhY3RvcnkubGVuZ3RoKS5tYXAoZnVuY3Rpb24oZGVwKSB7CiAgICAgICAgICAgICAgICBzd2l0Y2ggKGRlcCkgewogICAgICAgICAgICAgICAgICAgIC8vIEJlY2F1c2UgInJlcXVpcmUiLCAiZXhwb3J0cyIgYW5kICJtb2R1bGUiIGFyZW4ndCBhY3R1YWwKICAgICAgICAgICAgICAgICAgICAvLyBkZXBlbmRlbmNpZXMsIHdlIG11c3QgaGFuZGxlIHRoZW0gc2VwZXJhdGVseS4KICAgICAgICAgICAgICAgICAgICBjYXNlICJyZXF1aXJlIjogcmV0dXJuIHJlcTsKICAgICAgICAgICAgICAgICAgICBjYXNlICJleHBvcnRzIjogcmV0dXJuIG1vZHVsZS5leHBvcnRzOwogICAgICAgICAgICAgICAgICAgIGNhc2UgIm1vZHVsZSI6ICByZXR1cm4gbW9kdWxlOwogICAgICAgICAgICAgICAgICAgIC8vIEJ1dCBmb3IgYWxsIG90aGVyIGRlcGVuZGVuY2llcywgd2UgY2FuIGp1c3QgZ28gYWhlYWQgYW5kCiAgICAgICAgICAgICAgICAgICAgLy8gcmVxdWlyZSB0aGVtLgogICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6ICAgICAgICByZXR1cm4gcmVxKGRlcCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgaWYgKHJldHVybkV4cG9ydHMpCiAgICAgICAgICAgICAgICBtb2R1bGUuZXhwb3J0cyA9IHJldHVybkV4cG9ydHM7CiAgICAgICAgICAgIHJldHVybiBtb2R1bGU7CiAgICAgICAgfQogICAgfTsKfTsKd2luZG93LmRlZmluZS5hbWQgPSB7fTsKd2luZG93LnJlcXVpcmUudGxucyA9IHt9Owp3aW5kb3cuaW5pdEJhc2VVcmxzICA9IGZ1bmN0aW9uIGluaXRCYXNlVXJscyh0b3BMZXZlbE5hbWVzcGFjZXMpIHsKICAgIGZvciAodmFyIGkgaW4gdG9wTGV2ZWxOYW1lc3BhY2VzKQogICAgICAgIHRoaXMucmVxdWlyZS50bG5zW2ldID0gdG9wTGV2ZWxOYW1lc3BhY2VzW2ldOwp9OwoKd2luZG93LmluaXRTZW5kZXIgPSBmdW5jdGlvbiBpbml0U2VuZGVyKCkgewoKICAgIHZhciBFdmVudEVtaXR0ZXIgPSB3aW5kb3cucmVxdWlyZSgiYWNlL2xpYi9ldmVudF9lbWl0dGVyIikuRXZlbnRFbWl0dGVyOwogICAgdmFyIG9vcCA9IHdpbmRvdy5yZXF1aXJlKCJhY2UvbGliL29vcCIpOwogICAgCiAgICB2YXIgU2VuZGVyID0gZnVuY3Rpb24oKSB7fTsKICAgIAogICAgKGZ1bmN0aW9uKCkgewogICAgICAgIAogICAgICAgIG9vcC5pbXBsZW1lbnQodGhpcywgRXZlbnRFbWl0dGVyKTsKICAgICAgICAgICAgICAgIAogICAgICAgIHRoaXMuY2FsbGJhY2sgPSBmdW5jdGlvbihkYXRhLCBjYWxsYmFja0lkKSB7CiAgICAgICAgICAgIHBvc3RNZXNzYWdlKHsKICAgICAgICAgICAgICAgIHR5cGU6ICJjYWxsIiwKICAgICAgICAgICAgICAgIGlkOiBjYWxsYmFja0lkLAogICAgICAgICAgICAgICAgZGF0YTogZGF0YQogICAgICAgICAgICB9KTsKICAgICAgICB9OwogICAgCiAgICAgICAgdGhpcy5lbWl0ID0gZnVuY3Rpb24obmFtZSwgZGF0YSkgewogICAgICAgICAgICBwb3N0TWVzc2FnZSh7CiAgICAgICAgICAgICAgICB0eXBlOiAiZXZlbnQiLAogICAgICAgICAgICAgICAgbmFtZTogbmFtZSwKICAgICAgICAgICAgICAgIGRhdGE6IGRhdGEKICAgICAgICAgICAgfSk7CiAgICAgICAgfTsKICAgICAgICAKICAgIH0pLmNhbGwoU2VuZGVyLnByb3RvdHlwZSk7CiAgICAKICAgIHJldHVybiBuZXcgU2VuZGVyKCk7Cn07Cgp2YXIgbWFpbiA9IHdpbmRvdy5tYWluID0gbnVsbDsKdmFyIHNlbmRlciA9IHdpbmRvdy5zZW5kZXIgPSBudWxsOwoKd2luZG93Lm9ubWVzc2FnZSA9IGZ1bmN0aW9uKGUpIHsKICAgIHZhciBtc2cgPSBlLmRhdGE7CiAgICBpZiAobXNnLmV2ZW50ICYmIHNlbmRlcikgewogICAgICAgIHNlbmRlci5fc2lnbmFsKG1zZy5ldmVudCwgbXNnLmRhdGEpOwogICAgfQogICAgZWxzZSBpZiAobXNnLmNvbW1hbmQpIHsKICAgICAgICBpZiAobWFpblttc2cuY29tbWFuZF0pCiAgICAgICAgICAgIG1haW5bbXNnLmNvbW1hbmRdLmFwcGx5KG1haW4sIG1zZy5hcmdzKTsKICAgICAgICBlbHNlIGlmICh3aW5kb3dbbXNnLmNvbW1hbmRdKQogICAgICAgICAgICB3aW5kb3dbbXNnLmNvbW1hbmRdLmFwcGx5KHdpbmRvdywgbXNnLmFyZ3MpOwogICAgICAgIGVsc2UKICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCJVbmtub3duIGNvbW1hbmQ6IiArIG1zZy5jb21tYW5kKTsKICAgIH0KICAgIGVsc2UgaWYgKG1zZy5pbml0KSB7CiAgICAgICAgd2luZG93LmluaXRCYXNlVXJscyhtc2cudGxucyk7CiAgICAgICAgc2VuZGVyID0gd2luZG93LnNlbmRlciA9IHdpbmRvdy5pbml0U2VuZGVyKCk7CiAgICAgICAgdmFyIGNsYXp6ID0gdGhpcy5yZXF1aXJlKG1zZy5tb2R1bGUpW21zZy5jbGFzc25hbWVdOwogICAgICAgIG1haW4gPSB3aW5kb3cubWFpbiA9IG5ldyBjbGF6eihzZW5kZXIpOwogICAgfQp9Owp9KSh0aGlzKTsKCmFjZS5kZWZpbmUoImFjZS9saWIvb29wIixbXSwgZnVuY3Rpb24ocmVxdWlyZSwgZXhwb3J0cywgbW9kdWxlKXsidXNlIHN0cmljdCI7CmV4cG9ydHMuaW5oZXJpdHMgPSBmdW5jdGlvbiAoY3Rvciwgc3VwZXJDdG9yKSB7CiAgICBjdG9yLnN1cGVyXyA9IHN1cGVyQ3RvcjsKICAgIGN0b3IucHJvdG90eXBlID0gT2JqZWN0LmNyZWF0ZShzdXBlckN0b3IucHJvdG90eXBlLCB7CiAgICAgICAgY29uc3RydWN0b3I6IHsKICAgICAgICAgICAgdmFsdWU6IGN0b3IsCiAgICAgICAgICAgIGVudW1lcmFibGU6IGZhbHNlLAogICAgICAgICAgICB3cml0YWJsZTogdHJ1ZSwKICAgICAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlCiAgICAgICAgfQogICAgfSk7Cn07CmV4cG9ydHMubWl4aW4gPSBmdW5jdGlvbiAob2JqLCBtaXhpbikgewogICAgZm9yICh2YXIga2V5IGluIG1peGluKSB7CiAgICAgICAgb2JqW2tleV0gPSBtaXhpbltrZXldOwogICAgfQogICAgcmV0dXJuIG9iajsKfTsKZXhwb3J0cy5pbXBsZW1lbnQgPSBmdW5jdGlvbiAocHJvdG8sIG1peGluKSB7CiAgICBleHBvcnRzLm1peGluKHByb3RvLCBtaXhpbik7Cn07Cgp9KTsKCmFjZS5kZWZpbmUoImFjZS9hcHBseV9kZWx0YSIsW10sIGZ1bmN0aW9uKHJlcXVpcmUsIGV4cG9ydHMsIG1vZHVsZSl7InVzZSBzdHJpY3QiOwpmdW5jdGlvbiB0aHJvd0RlbHRhRXJyb3IoZGVsdGEsIGVycm9yVGV4dCkgewogICAgY29uc29sZS5sb2coIkludmFsaWQgRGVsdGE6IiwgZGVsdGEpOwogICAgdGhyb3cgIkludmFsaWQgRGVsdGE6ICIgKyBlcnJvclRleHQ7Cn0KZnVuY3Rpb24gcG9zaXRpb25JbkRvY3VtZW50KGRvY0xpbmVzLCBwb3NpdGlvbikgewogICAgcmV0dXJuIHBvc2l0aW9uLnJvdyA+PSAwICYmIHBvc2l0aW9uLnJvdyA8IGRvY0xpbmVzLmxlbmd0aCAmJgogICAgICAgIHBvc2l0aW9uLmNvbHVtbiA+PSAwICYmIHBvc2l0aW9uLmNvbHVtbiA8PSBkb2NMaW5lc1twb3NpdGlvbi5yb3ddLmxlbmd0aDsKfQpmdW5jdGlvbiB2YWxpZGF0ZURlbHRhKGRvY0xpbmVzLCBkZWx0YSkgewogICAgaWYgKGRlbHRhLmFjdGlvbiAhPSAiaW5zZXJ0IiAmJiBkZWx0YS5hY3Rpb24gIT0gInJlbW92ZSIpCiAgICAgICAgdGhyb3dEZWx0YUVycm9yKGRlbHRhLCAiZGVsdGEuYWN0aW9uIG11c3QgYmUgJ2luc2VydCcgb3IgJ3JlbW92ZSciKTsKICAgIGlmICghKGRlbHRhLmxpbmVzIGluc3RhbmNlb2YgQXJyYXkpKQogICAgICAgIHRocm93RGVsdGFFcnJvcihkZWx0YSwgImRlbHRhLmxpbmVzIG11c3QgYmUgYW4gQXJyYXkiKTsKICAgIGlmICghZGVsdGEuc3RhcnQgfHwgIWRlbHRhLmVuZCkKICAgICAgICB0aHJvd0RlbHRhRXJyb3IoZGVsdGEsICJkZWx0YS5zdGFydC9lbmQgbXVzdCBiZSBhbiBwcmVzZW50Iik7CiAgICB2YXIgc3RhcnQgPSBkZWx0YS5zdGFydDsKICAgIGlmICghcG9zaXRpb25JbkRvY3VtZW50KGRvY0xpbmVzLCBkZWx0YS5zdGFydCkpCiAgICAgICAgdGhyb3dEZWx0YUVycm9yKGRlbHRhLCAiZGVsdGEuc3RhcnQgbXVzdCBiZSBjb250YWluZWQgaW4gZG9jdW1lbnQiKTsKICAgIHZhciBlbmQgPSBkZWx0YS5lbmQ7CiAgICBpZiAoZGVsdGEuYWN0aW9uID09ICJyZW1vdmUiICYmICFwb3NpdGlvbkluRG9jdW1lbnQoZG9jTGluZXMsIGVuZCkpCiAgICAgICAgdGhyb3dEZWx0YUVycm9yKGRlbHRhLCAiZGVsdGEuZW5kIG11c3QgY29udGFpbmVkIGluIGRvY3VtZW50IGZvciAncmVtb3ZlJyBhY3Rpb25zIik7CiAgICB2YXIgbnVtUmFuZ2VSb3dzID0gZW5kLnJvdyAtIHN0YXJ0LnJvdzsKICAgIHZhciBudW1SYW5nZUxhc3RMaW5lQ2hhcnMgPSAoZW5kLmNvbHVtbiAtIChudW1SYW5nZVJvd3MgPT0gMCA/IHN0YXJ0LmNvbHVtbiA6IDApKTsKICAgIGlmIChudW1SYW5nZVJvd3MgIT0gZGVsdGEubGluZXMubGVuZ3RoIC0gMSB8fCBkZWx0YS5saW5lc1tudW1SYW5nZVJvd3NdLmxlbmd0aCAhPSBudW1SYW5nZUxhc3RMaW5lQ2hhcnMpCiAgICAgICAgdGhyb3dEZWx0YUVycm9yKGRlbHRhLCAiZGVsdGEucmFuZ2UgbXVzdCBtYXRjaCBkZWx0YSBsaW5lcyIpOwp9CmV4cG9ydHMuYXBwbHlEZWx0YSA9IGZ1bmN0aW9uIChkb2NMaW5lcywgZGVsdGEsIGRvTm90VmFsaWRhdGUpIHsKICAgIHZhciByb3cgPSBkZWx0YS5zdGFydC5yb3c7CiAgICB2YXIgc3RhcnRDb2x1bW4gPSBkZWx0YS5zdGFydC5jb2x1bW47CiAgICB2YXIgbGluZSA9IGRvY0xpbmVzW3Jvd10gfHwgIiI7CiAgICBzd2l0Y2ggKGRlbHRhLmFjdGlvbikgewogICAgICAgIGNhc2UgImluc2VydCI6CiAgICAgICAgICAgIHZhciBsaW5lcyA9IGRlbHRhLmxpbmVzOwogICAgICAgICAgICBpZiAobGluZXMubGVuZ3RoID09PSAxKSB7CiAgICAgICAgICAgICAgICBkb2NMaW5lc1tyb3ddID0gbGluZS5zdWJzdHJpbmcoMCwgc3RhcnRDb2x1bW4pICsgZGVsdGEubGluZXNbMF0gKyBsaW5lLnN1YnN0cmluZyhzdGFydENvbHVtbik7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICB2YXIgYXJncyA9IFtyb3csIDFdLmNvbmNhdChkZWx0YS5saW5lcyk7CiAgICAgICAgICAgICAgICBkb2NMaW5lcy5zcGxpY2UuYXBwbHkoZG9jTGluZXMsIGFyZ3MpOwogICAgICAgICAgICAgICAgZG9jTGluZXNbcm93XSA9IGxpbmUuc3Vic3RyaW5nKDAsIHN0YXJ0Q29sdW1uKSArIGRvY0xpbmVzW3Jvd107CiAgICAgICAgICAgICAgICBkb2NMaW5lc1tyb3cgKyBkZWx0YS5saW5lcy5sZW5ndGggLSAxXSArPSBsaW5lLnN1YnN0cmluZyhzdGFydENvbHVtbik7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgY2FzZSAicmVtb3ZlIjoKICAgICAgICAgICAgdmFyIGVuZENvbHVtbiA9IGRlbHRhLmVuZC5jb2x1bW47CiAgICAgICAgICAgIHZhciBlbmRSb3cgPSBkZWx0YS5lbmQucm93OwogICAgICAgICAgICBpZiAocm93ID09PSBlbmRSb3cpIHsKICAgICAgICAgICAgICAgIGRvY0xpbmVzW3Jvd10gPSBsaW5lLnN1YnN0cmluZygwLCBzdGFydENvbHVtbikgKyBsaW5lLnN1YnN0cmluZyhlbmRDb2x1bW4pOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgZG9jTGluZXMuc3BsaWNlKHJvdywgZW5kUm93IC0gcm93ICsgMSwgbGluZS5zdWJzdHJpbmcoMCwgc3RhcnRDb2x1bW4pICsgZG9jTGluZXNbZW5kUm93XS5zdWJzdHJpbmcoZW5kQ29sdW1uKSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgYnJlYWs7CiAgICB9Cn07Cgp9KTsKCmFjZS5kZWZpbmUoImFjZS9saWIvZXZlbnRfZW1pdHRlciIsW10sIGZ1bmN0aW9uKHJlcXVpcmUsIGV4cG9ydHMsIG1vZHVsZSl7InVzZSBzdHJpY3QiOwp2YXIgRXZlbnRFbWl0dGVyID0ge307CnZhciBzdG9wUHJvcGFnYXRpb24gPSBmdW5jdGlvbiAoKSB7IHRoaXMucHJvcGFnYXRpb25TdG9wcGVkID0gdHJ1ZTsgfTsKdmFyIHByZXZlbnREZWZhdWx0ID0gZnVuY3Rpb24gKCkgeyB0aGlzLmRlZmF1bHRQcmV2ZW50ZWQgPSB0cnVlOyB9OwpFdmVudEVtaXR0ZXIuX2VtaXQgPQogICAgRXZlbnRFbWl0dGVyLl9kaXNwYXRjaEV2ZW50ID0gZnVuY3Rpb24gKGV2ZW50TmFtZSwgZSkgewogICAgICAgIHRoaXMuX2V2ZW50UmVnaXN0cnkgfHwgKHRoaXMuX2V2ZW50UmVnaXN0cnkgPSB7fSk7CiAgICAgICAgdGhpcy5fZGVmYXVsdEhhbmRsZXJzIHx8ICh0aGlzLl9kZWZhdWx0SGFuZGxlcnMgPSB7fSk7CiAgICAgICAgdmFyIGxpc3RlbmVycyA9IHRoaXMuX2V2ZW50UmVnaXN0cnlbZXZlbnROYW1lXSB8fCBbXTsKICAgICAgICB2YXIgZGVmYXVsdEhhbmRsZXIgPSB0aGlzLl9kZWZhdWx0SGFuZGxlcnNbZXZlbnROYW1lXTsKICAgICAgICBpZiAoIWxpc3RlbmVycy5sZW5ndGggJiYgIWRlZmF1bHRIYW5kbGVyKQogICAgICAgICAgICByZXR1cm47CiAgICAgICAgaWYgKHR5cGVvZiBlICE9ICJvYmplY3QiIHx8ICFlKQogICAgICAgICAgICBlID0ge307CiAgICAgICAgaWYgKCFlLnR5cGUpCiAgICAgICAgICAgIGUudHlwZSA9IGV2ZW50TmFtZTsKICAgICAgICBpZiAoIWUuc3RvcFByb3BhZ2F0aW9uKQogICAgICAgICAgICBlLnN0b3BQcm9wYWdhdGlvbiA9IHN0b3BQcm9wYWdhdGlvbjsKICAgICAgICBpZiAoIWUucHJldmVudERlZmF1bHQpCiAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQgPSBwcmV2ZW50RGVmYXVsdDsKICAgICAgICBsaXN0ZW5lcnMgPSBsaXN0ZW5lcnMuc2xpY2UoKTsKICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGxpc3RlbmVycy5sZW5ndGg7IGkrKykgewogICAgICAgICAgICBsaXN0ZW5lcnNbaV0oZSwgdGhpcyk7CiAgICAgICAgICAgIGlmIChlLnByb3BhZ2F0aW9uU3RvcHBlZCkKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgIH0KICAgICAgICBpZiAoZGVmYXVsdEhhbmRsZXIgJiYgIWUuZGVmYXVsdFByZXZlbnRlZCkKICAgICAgICAgICAgcmV0dXJuIGRlZmF1bHRIYW5kbGVyKGUsIHRoaXMpOwogICAgfTsKRXZlbnRFbWl0dGVyLl9zaWduYWwgPSBmdW5jdGlvbiAoZXZlbnROYW1lLCBlKSB7CiAgICB2YXIgbGlzdGVuZXJzID0gKHRoaXMuX2V2ZW50UmVnaXN0cnkgfHwge30pW2V2ZW50TmFtZV07CiAgICBpZiAoIWxpc3RlbmVycykKICAgICAgICByZXR1cm47CiAgICBsaXN0ZW5lcnMgPSBsaXN0ZW5lcnMuc2xpY2UoKTsKICAgIGZvciAodmFyIGkgPSAwOyBpIDwgbGlzdGVuZXJzLmxlbmd0aDsgaSsrKQogICAgICAgIGxpc3RlbmVyc1tpXShlLCB0aGlzKTsKfTsKRXZlbnRFbWl0dGVyLm9uY2UgPSBmdW5jdGlvbiAoZXZlbnROYW1lLCBjYWxsYmFjaykgewogICAgdmFyIF9zZWxmID0gdGhpczsKICAgIHRoaXMub24oZXZlbnROYW1lLCBmdW5jdGlvbiBuZXdDYWxsYmFjaygpIHsKICAgICAgICBfc2VsZi5vZmYoZXZlbnROYW1lLCBuZXdDYWxsYmFjayk7CiAgICAgICAgY2FsbGJhY2suYXBwbHkobnVsbCwgYXJndW1lbnRzKTsKICAgIH0pOwogICAgaWYgKCFjYWxsYmFjaykgewogICAgICAgIHJldHVybiBuZXcgUHJvbWlzZShmdW5jdGlvbiAocmVzb2x2ZSkgewogICAgICAgICAgICBjYWxsYmFjayA9IHJlc29sdmU7CiAgICAgICAgfSk7CiAgICB9Cn07CkV2ZW50RW1pdHRlci5zZXREZWZhdWx0SGFuZGxlciA9IGZ1bmN0aW9uIChldmVudE5hbWUsIGNhbGxiYWNrKSB7CiAgICB2YXIgaGFuZGxlcnMgPSB0aGlzLl9kZWZhdWx0SGFuZGxlcnM7CiAgICBpZiAoIWhhbmRsZXJzKQogICAgICAgIGhhbmRsZXJzID0gdGhpcy5fZGVmYXVsdEhhbmRsZXJzID0geyBfZGlzYWJsZWRfOiB7fSB9OwogICAgaWYgKGhhbmRsZXJzW2V2ZW50TmFtZV0pIHsKICAgICAgICB2YXIgb2xkID0gaGFuZGxlcnNbZXZlbnROYW1lXTsKICAgICAgICB2YXIgZGlzYWJsZWQgPSBoYW5kbGVycy5fZGlzYWJsZWRfW2V2ZW50TmFtZV07CiAgICAgICAgaWYgKCFkaXNhYmxlZCkKICAgICAgICAgICAgaGFuZGxlcnMuX2Rpc2FibGVkX1tldmVudE5hbWVdID0gZGlzYWJsZWQgPSBbXTsKICAgICAgICBkaXNhYmxlZC5wdXNoKG9sZCk7CiAgICAgICAgdmFyIGkgPSBkaXNhYmxlZC5pbmRleE9mKGNhbGxiYWNrKTsKICAgICAgICBpZiAoaSAhPSAtMSkKICAgICAgICAgICAgZGlzYWJsZWQuc3BsaWNlKGksIDEpOwogICAgfQogICAgaGFuZGxlcnNbZXZlbnROYW1lXSA9IGNhbGxiYWNrOwp9OwpFdmVudEVtaXR0ZXIucmVtb3ZlRGVmYXVsdEhhbmRsZXIgPSBmdW5jdGlvbiAoZXZlbnROYW1lLCBjYWxsYmFjaykgewogICAgdmFyIGhhbmRsZXJzID0gdGhpcy5fZGVmYXVsdEhhbmRsZXJzOwogICAgaWYgKCFoYW5kbGVycykKICAgICAgICByZXR1cm47CiAgICB2YXIgZGlzYWJsZWQgPSBoYW5kbGVycy5fZGlzYWJsZWRfW2V2ZW50TmFtZV07CiAgICBpZiAoaGFuZGxlcnNbZXZlbnROYW1lXSA9PSBjYWxsYmFjaykgewogICAgICAgIGlmIChkaXNhYmxlZCkKICAgICAgICAgICAgdGhpcy5zZXREZWZhdWx0SGFuZGxlcihldmVudE5hbWUsIGRpc2FibGVkLnBvcCgpKTsKICAgIH0KICAgIGVsc2UgaWYgKGRpc2FibGVkKSB7CiAgICAgICAgdmFyIGkgPSBkaXNhYmxlZC5pbmRleE9mKGNhbGxiYWNrKTsKICAgICAgICBpZiAoaSAhPSAtMSkKICAgICAgICAgICAgZGlzYWJsZWQuc3BsaWNlKGksIDEpOwogICAgfQp9OwpFdmVudEVtaXR0ZXIub24gPQogICAgRXZlbnRFbWl0dGVyLmFkZEV2ZW50TGlzdGVuZXIgPSBmdW5jdGlvbiAoZXZlbnROYW1lLCBjYWxsYmFjaywgY2FwdHVyaW5nKSB7CiAgICAgICAgdGhpcy5fZXZlbnRSZWdpc3RyeSA9IHRoaXMuX2V2ZW50UmVnaXN0cnkgfHwge307CiAgICAgICAgdmFyIGxpc3RlbmVycyA9IHRoaXMuX2V2ZW50UmVnaXN0cnlbZXZlbnROYW1lXTsKICAgICAgICBpZiAoIWxpc3RlbmVycykKICAgICAgICAgICAgbGlzdGVuZXJzID0gdGhpcy5fZXZlbnRSZWdpc3RyeVtldmVudE5hbWVdID0gW107CiAgICAgICAgaWYgKGxpc3RlbmVycy5pbmRleE9mKGNhbGxiYWNrKSA9PSAtMSkKICAgICAgICAgICAgbGlzdGVuZXJzW2NhcHR1cmluZyA/ICJ1bnNoaWZ0IiA6ICJwdXNoIl0oY2FsbGJhY2spOwogICAgICAgIHJldHVybiBjYWxsYmFjazsKICAgIH07CkV2ZW50RW1pdHRlci5vZmYgPQogICAgRXZlbnRFbWl0dGVyLnJlbW92ZUxpc3RlbmVyID0KICAgICAgICBFdmVudEVtaXR0ZXIucmVtb3ZlRXZlbnRMaXN0ZW5lciA9IGZ1bmN0aW9uIChldmVudE5hbWUsIGNhbGxiYWNrKSB7CiAgICAgICAgICAgIHRoaXMuX2V2ZW50UmVnaXN0cnkgPSB0aGlzLl9ldmVudFJlZ2lzdHJ5IHx8IHt9OwogICAgICAgICAgICB2YXIgbGlzdGVuZXJzID0gdGhpcy5fZXZlbnRSZWdpc3RyeVtldmVudE5hbWVdOwogICAgICAgICAgICBpZiAoIWxpc3RlbmVycykKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgdmFyIGluZGV4ID0gbGlzdGVuZXJzLmluZGV4T2YoY2FsbGJhY2spOwogICAgICAgICAgICBpZiAoaW5kZXggIT09IC0xKQogICAgICAgICAgICAgICAgbGlzdGVuZXJzLnNwbGljZShpbmRleCwgMSk7CiAgICAgICAgfTsKRXZlbnRFbWl0dGVyLnJlbW92ZUFsbExpc3RlbmVycyA9IGZ1bmN0aW9uIChldmVudE5hbWUpIHsKICAgIGlmICghZXZlbnROYW1lKQogICAgICAgIHRoaXMuX2V2ZW50UmVnaXN0cnkgPSB0aGlzLl9kZWZhdWx0SGFuZGxlcnMgPSB1bmRlZmluZWQ7CiAgICBpZiAodGhpcy5fZXZlbnRSZWdpc3RyeSkKICAgICAgICB0aGlzLl9ldmVudFJlZ2lzdHJ5W2V2ZW50TmFtZV0gPSB1bmRlZmluZWQ7CiAgICBpZiAodGhpcy5fZGVmYXVsdEhhbmRsZXJzKQogICAgICAgIHRoaXMuX2RlZmF1bHRIYW5kbGVyc1tldmVudE5hbWVdID0gdW5kZWZpbmVkOwp9OwpleHBvcnRzLkV2ZW50RW1pdHRlciA9IEV2ZW50RW1pdHRlcjsKCn0pOwoKYWNlLmRlZmluZSgiYWNlL3JhbmdlIixbXSwgZnVuY3Rpb24ocmVxdWlyZSwgZXhwb3J0cywgbW9kdWxlKXsidXNlIHN0cmljdCI7CnZhciBjb21wYXJlUG9pbnRzID0gZnVuY3Rpb24gKHAxLCBwMikgewogICAgcmV0dXJuIHAxLnJvdyAtIHAyLnJvdyB8fCBwMS5jb2x1bW4gLSBwMi5jb2x1bW47Cn07CnZhciBSYW5nZSA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uICgpIHsKICAgIGZ1bmN0aW9uIFJhbmdlKHN0YXJ0Um93LCBzdGFydENvbHVtbiwgZW5kUm93LCBlbmRDb2x1bW4pIHsKICAgICAgICB0aGlzLnN0YXJ0ID0gewogICAgICAgICAgICByb3c6IHN0YXJ0Um93LAogICAgICAgICAgICBjb2x1bW46IHN0YXJ0Q29sdW1uCiAgICAgICAgfTsKICAgICAgICB0aGlzLmVuZCA9IHsKICAgICAgICAgICAgcm93OiBlbmRSb3csCiAgICAgICAgICAgIGNvbHVtbjogZW5kQ29sdW1uCiAgICAgICAgfTsKICAgIH0KICAgIFJhbmdlLnByb3RvdHlwZS5pc0VxdWFsID0gZnVuY3Rpb24gKHJhbmdlKSB7CiAgICAgICAgcmV0dXJuIHRoaXMuc3RhcnQucm93ID09PSByYW5nZS5zdGFydC5yb3cgJiYKICAgICAgICAgICAgdGhpcy5lbmQucm93ID09PSByYW5nZS5lbmQucm93ICYmCiAgICAgICAgICAgIHRoaXMuc3RhcnQuY29sdW1uID09PSByYW5nZS5zdGFydC5jb2x1bW4gJiYKICAgICAgICAgICAgdGhpcy5lbmQuY29sdW1uID09PSByYW5nZS5lbmQuY29sdW1uOwogICAgfTsKICAgIFJhbmdlLnByb3RvdHlwZS50b1N0cmluZyA9IGZ1bmN0aW9uICgpIHsKICAgICAgICByZXR1cm4gKCJSYW5nZTogWyIgKyB0aGlzLnN0YXJ0LnJvdyArICIvIiArIHRoaXMuc3RhcnQuY29sdW1uICsKICAgICAgICAgICAgIl0gLT4gWyIgKyB0aGlzLmVuZC5yb3cgKyAiLyIgKyB0aGlzLmVuZC5jb2x1bW4gKyAiXSIpOwogICAgfTsKICAgIFJhbmdlLnByb3RvdHlwZS5jb250YWlucyA9IGZ1bmN0aW9uIChyb3csIGNvbHVtbikgewogICAgICAgIHJldHVybiB0aGlzLmNvbXBhcmUocm93LCBjb2x1bW4pID09IDA7CiAgICB9OwogICAgUmFuZ2UucHJvdG90eXBlLmNvbXBhcmVSYW5nZSA9IGZ1bmN0aW9uIChyYW5nZSkgewogICAgICAgIHZhciBjbXAsIGVuZCA9IHJhbmdlLmVuZCwgc3RhcnQgPSByYW5nZS5zdGFydDsKICAgICAgICBjbXAgPSB0aGlzLmNvbXBhcmUoZW5kLnJvdywgZW5kLmNvbHVtbik7CiAgICAgICAgaWYgKGNtcCA9PSAxKSB7CiAgICAgICAgICAgIGNtcCA9IHRoaXMuY29tcGFyZShzdGFydC5yb3csIHN0YXJ0LmNvbHVtbik7CiAgICAgICAgICAgIGlmIChjbXAgPT0gMSkgewogICAgICAgICAgICAgICAgcmV0dXJuIDI7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSBpZiAoY21wID09IDApIHsKICAgICAgICAgICAgICAgIHJldHVybiAxOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgcmV0dXJuIDA7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgZWxzZSBpZiAoY21wID09IC0xKSB7CiAgICAgICAgICAgIHJldHVybiAtMjsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIGNtcCA9IHRoaXMuY29tcGFyZShzdGFydC5yb3csIHN0YXJ0LmNvbHVtbik7CiAgICAgICAgICAgIGlmIChjbXAgPT0gLTEpIHsKICAgICAgICAgICAgICAgIHJldHVybiAtMTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmIChjbXAgPT0gMSkgewogICAgICAgICAgICAgICAgcmV0dXJuIDQyOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgcmV0dXJuIDA7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9OwogICAgUmFuZ2UucHJvdG90eXBlLmNvbXBhcmVQb2ludCA9IGZ1bmN0aW9uIChwKSB7CiAgICAgICAgcmV0dXJuIHRoaXMuY29tcGFyZShwLnJvdywgcC5jb2x1bW4pOwogICAgfTsKICAgIFJhbmdlLnByb3RvdHlwZS5jb250YWluc1JhbmdlID0gZnVuY3Rpb24gKHJhbmdlKSB7CiAgICAgICAgcmV0dXJuIHRoaXMuY29tcGFyZVBvaW50KHJhbmdlLnN0YXJ0KSA9PSAwICYmIHRoaXMuY29tcGFyZVBvaW50KHJhbmdlLmVuZCkgPT0gMDsKICAgIH07CiAgICBSYW5nZS5wcm90b3R5cGUuaW50ZXJzZWN0cyA9IGZ1bmN0aW9uIChyYW5nZSkgewogICAgICAgIHZhciBjbXAgPSB0aGlzLmNvbXBhcmVSYW5nZShyYW5nZSk7CiAgICAgICAgcmV0dXJuIChjbXAgPT0gLTEgfHwgY21wID09IDAgfHwgY21wID09IDEpOwogICAgfTsKICAgIFJhbmdlLnByb3RvdHlwZS5pc0VuZCA9IGZ1bmN0aW9uIChyb3csIGNvbHVtbikgewogICAgICAgIHJldHVybiB0aGlzLmVuZC5yb3cgPT0gcm93ICYmIHRoaXMuZW5kLmNvbHVtbiA9PSBjb2x1bW47CiAgICB9OwogICAgUmFuZ2UucHJvdG90eXBlLmlzU3RhcnQgPSBmdW5jdGlvbiAocm93LCBjb2x1bW4pIHsKICAgICAgICByZXR1cm4gdGhpcy5zdGFydC5yb3cgPT0gcm93ICYmIHRoaXMuc3RhcnQuY29sdW1uID09IGNvbHVtbjsKICAgIH07CiAgICBSYW5nZS5wcm90b3R5cGUuc2V0U3RhcnQgPSBmdW5jdGlvbiAocm93LCBjb2x1bW4pIHsKICAgICAgICBpZiAodHlwZW9mIHJvdyA9PSAib2JqZWN0IikgewogICAgICAgICAgICB0aGlzLnN0YXJ0LmNvbHVtbiA9IHJvdy5jb2x1bW47CiAgICAgICAgICAgIHRoaXMuc3RhcnQucm93ID0gcm93LnJvdzsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIHRoaXMuc3RhcnQucm93ID0gcm93OwogICAgICAgICAgICB0aGlzLnN0YXJ0LmNvbHVtbiA9IGNvbHVtbjsKICAgICAgICB9CiAgICB9OwogICAgUmFuZ2UucHJvdG90eXBlLnNldEVuZCA9IGZ1bmN0aW9uIChyb3csIGNvbHVtbikgewogICAgICAgIGlmICh0eXBlb2Ygcm93ID09ICJvYmplY3QiKSB7CiAgICAgICAgICAgIHRoaXMuZW5kLmNvbHVtbiA9IHJvdy5jb2x1bW47CiAgICAgICAgICAgIHRoaXMuZW5kLnJvdyA9IHJvdy5yb3c7CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICB0aGlzLmVuZC5yb3cgPSByb3c7CiAgICAgICAgICAgIHRoaXMuZW5kLmNvbHVtbiA9IGNvbHVtbjsKICAgICAgICB9CiAgICB9OwogICAgUmFuZ2UucHJvdG90eXBlLmluc2lkZSA9IGZ1bmN0aW9uIChyb3csIGNvbHVtbikgewogICAgICAgIGlmICh0aGlzLmNvbXBhcmUocm93LCBjb2x1bW4pID09IDApIHsKICAgICAgICAgICAgaWYgKHRoaXMuaXNFbmQocm93LCBjb2x1bW4pIHx8IHRoaXMuaXNTdGFydChyb3csIGNvbHVtbikpIHsKICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHJldHVybiBmYWxzZTsKICAgIH07CiAgICBSYW5nZS5wcm90b3R5cGUuaW5zaWRlU3RhcnQgPSBmdW5jdGlvbiAocm93LCBjb2x1bW4pIHsKICAgICAgICBpZiAodGhpcy5jb21wYXJlKHJvdywgY29sdW1uKSA9PSAwKSB7CiAgICAgICAgICAgIGlmICh0aGlzLmlzRW5kKHJvdywgY29sdW1uKSkgewogICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgfTsKICAgIFJhbmdlLnByb3RvdHlwZS5pbnNpZGVFbmQgPSBmdW5jdGlvbiAocm93LCBjb2x1bW4pIHsKICAgICAgICBpZiAodGhpcy5jb21wYXJlKHJvdywgY29sdW1uKSA9PSAwKSB7CiAgICAgICAgICAgIGlmICh0aGlzLmlzU3RhcnQocm93LCBjb2x1bW4pKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICByZXR1cm4gZmFsc2U7CiAgICB9OwogICAgUmFuZ2UucHJvdG90eXBlLmNvbXBhcmUgPSBmdW5jdGlvbiAocm93LCBjb2x1bW4pIHsKICAgICAgICBpZiAoIXRoaXMuaXNNdWx0aUxpbmUoKSkgewogICAgICAgICAgICBpZiAocm93ID09PSB0aGlzLnN0YXJ0LnJvdykgewogICAgICAgICAgICAgICAgcmV0dXJuIGNvbHVtbiA8IHRoaXMuc3RhcnQuY29sdW1uID8gLTEgOiAoY29sdW1uID4gdGhpcy5lbmQuY29sdW1uID8gMSA6IDApOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGlmIChyb3cgPCB0aGlzLnN0YXJ0LnJvdykKICAgICAgICAgICAgcmV0dXJuIC0xOwogICAgICAgIGlmIChyb3cgPiB0aGlzLmVuZC5yb3cpCiAgICAgICAgICAgIHJldHVybiAxOwogICAgICAgIGlmICh0aGlzLnN0YXJ0LnJvdyA9PT0gcm93KQogICAgICAgICAgICByZXR1cm4gY29sdW1uID49IHRoaXMuc3RhcnQuY29sdW1uID8gMCA6IC0xOwogICAgICAgIGlmICh0aGlzLmVuZC5yb3cgPT09IHJvdykKICAgICAgICAgICAgcmV0dXJuIGNvbHVtbiA8PSB0aGlzLmVuZC5jb2x1bW4gPyAwIDogMTsKICAgICAgICByZXR1cm4gMDsKICAgIH07CiAgICBSYW5nZS5wcm90b3R5cGUuY29tcGFyZVN0YXJ0ID0gZnVuY3Rpb24gKHJvdywgY29sdW1uKSB7CiAgICAgICAgaWYgKHRoaXMuc3RhcnQucm93ID09IHJvdyAmJiB0aGlzLnN0YXJ0LmNvbHVtbiA9PSBjb2x1bW4pIHsKICAgICAgICAgICAgcmV0dXJuIC0xOwogICAgICAgIH0KICAgICAgICBlbHNlIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuY29tcGFyZShyb3csIGNvbHVtbik7CiAgICAgICAgfQogICAgfTsKICAgIFJhbmdlLnByb3RvdHlwZS5jb21wYXJlRW5kID0gZnVuY3Rpb24gKHJvdywgY29sdW1uKSB7CiAgICAgICAgaWYgKHRoaXMuZW5kLnJvdyA9PSByb3cgJiYgdGhpcy5lbmQuY29sdW1uID09IGNvbHVtbikgewogICAgICAgICAgICByZXR1cm4gMTsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIHJldHVybiB0aGlzLmNvbXBhcmUocm93LCBjb2x1bW4pOwogICAgICAgIH0KICAgIH07CiAgICBSYW5nZS5wcm90b3R5cGUuY29tcGFyZUluc2lkZSA9IGZ1bmN0aW9uIChyb3csIGNvbHVtbikgewogICAgICAgIGlmICh0aGlzLmVuZC5yb3cgPT0gcm93ICYmIHRoaXMuZW5kLmNvbHVtbiA9PSBjb2x1bW4pIHsKICAgICAgICAgICAgcmV0dXJuIDE7CiAgICAgICAgfQogICAgICAgIGVsc2UgaWYgKHRoaXMuc3RhcnQucm93ID09IHJvdyAmJiB0aGlzLnN0YXJ0LmNvbHVtbiA9PSBjb2x1bW4pIHsKICAgICAgICAgICAgcmV0dXJuIC0xOwogICAgICAgIH0KICAgICAgICBlbHNlIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMuY29tcGFyZShyb3csIGNvbHVtbik7CiAgICAgICAgfQogICAgfTsKICAgIFJhbmdlLnByb3RvdHlwZS5jbGlwUm93cyA9IGZ1bmN0aW9uIChmaXJzdFJvdywgbGFzdFJvdykgewogICAgICAgIGlmICh0aGlzLmVuZC5yb3cgPiBsYXN0Um93KQogICAgICAgICAgICB2YXIgZW5kID0geyByb3c6IGxhc3RSb3cgKyAxLCBjb2x1bW46IDAgfTsKICAgICAgICBlbHNlIGlmICh0aGlzLmVuZC5yb3cgPCBmaXJzdFJvdykKICAgICAgICAgICAgdmFyIGVuZCA9IHsgcm93OiBmaXJzdFJvdywgY29sdW1uOiAwIH07CiAgICAgICAgaWYgKHRoaXMuc3RhcnQucm93ID4gbGFzdFJvdykKICAgICAgICAgICAgdmFyIHN0YXJ0ID0geyByb3c6IGxhc3RSb3cgKyAxLCBjb2x1bW46IDAgfTsKICAgICAgICBlbHNlIGlmICh0aGlzLnN0YXJ0LnJvdyA8IGZpcnN0Um93KQogICAgICAgICAgICB2YXIgc3RhcnQgPSB7IHJvdzogZmlyc3RSb3csIGNvbHVtbjogMCB9OwogICAgICAgIHJldHVybiBSYW5nZS5mcm9tUG9pbnRzKHN0YXJ0IHx8IHRoaXMuc3RhcnQsIGVuZCB8fCB0aGlzLmVuZCk7CiAgICB9OwogICAgUmFuZ2UucHJvdG90eXBlLmV4dGVuZCA9IGZ1bmN0aW9uIChyb3csIGNvbHVtbikgewogICAgICAgIHZhciBjbXAgPSB0aGlzLmNvbXBhcmUocm93LCBjb2x1bW4pOwogICAgICAgIGlmIChjbXAgPT0gMCkKICAgICAgICAgICAgcmV0dXJuIHRoaXM7CiAgICAgICAgZWxzZSBpZiAoY21wID09IC0xKQogICAgICAgICAgICB2YXIgc3RhcnQgPSB7IHJvdzogcm93LCBjb2x1bW46IGNvbHVtbiB9OwogICAgICAgIGVsc2UKICAgICAgICAgICAgdmFyIGVuZCA9IHsgcm93OiByb3csIGNvbHVtbjogY29sdW1uIH07CiAgICAgICAgcmV0dXJuIFJhbmdlLmZyb21Qb2ludHMoc3RhcnQgfHwgdGhpcy5zdGFydCwgZW5kIHx8IHRoaXMuZW5kKTsKICAgIH07CiAgICBSYW5nZS5wcm90b3R5cGUuaXNFbXB0eSA9IGZ1bmN0aW9uICgpIHsKICAgICAgICByZXR1cm4gKHRoaXMuc3RhcnQucm93ID09PSB0aGlzLmVuZC5yb3cgJiYgdGhpcy5zdGFydC5jb2x1bW4gPT09IHRoaXMuZW5kLmNvbHVtbik7CiAgICB9OwogICAgUmFuZ2UucHJvdG90eXBlLmlzTXVsdGlMaW5lID0gZnVuY3Rpb24gKCkgewogICAgICAgIHJldHVybiAodGhpcy5zdGFydC5yb3cgIT09IHRoaXMuZW5kLnJvdyk7CiAgICB9OwogICAgUmFuZ2UucHJvdG90eXBlLmNsb25lID0gZnVuY3Rpb24gKCkgewogICAgICAgIHJldHVybiBSYW5nZS5mcm9tUG9pbnRzKHRoaXMuc3RhcnQsIHRoaXMuZW5kKTsKICAgIH07CiAgICBSYW5nZS5wcm90b3R5cGUuY29sbGFwc2VSb3dzID0gZnVuY3Rpb24gKCkgewogICAgICAgIGlmICh0aGlzLmVuZC5jb2x1bW4gPT0gMCkKICAgICAgICAgICAgcmV0dXJuIG5ldyBSYW5nZSh0aGlzLnN0YXJ0LnJvdywgMCwgTWF0aC5tYXgodGhpcy5zdGFydC5yb3csIHRoaXMuZW5kLnJvdyAtIDEpLCAwKTsKICAgICAgICBlbHNlCiAgICAgICAgICAgIHJldHVybiBuZXcgUmFuZ2UodGhpcy5zdGFydC5yb3csIDAsIHRoaXMuZW5kLnJvdywgMCk7CiAgICB9OwogICAgUmFuZ2UucHJvdG90eXBlLnRvU2NyZWVuUmFuZ2UgPSBmdW5jdGlvbiAoc2Vzc2lvbikgewogICAgICAgIHZhciBzY3JlZW5Qb3NTdGFydCA9IHNlc3Npb24uZG9jdW1lbnRUb1NjcmVlblBvc2l0aW9uKHRoaXMuc3RhcnQpOwogICAgICAgIHZhciBzY3JlZW5Qb3NFbmQgPSBzZXNzaW9uLmRvY3VtZW50VG9TY3JlZW5Qb3NpdGlvbih0aGlzLmVuZCk7CiAgICAgICAgcmV0dXJuIG5ldyBSYW5nZShzY3JlZW5Qb3NTdGFydC5yb3csIHNjcmVlblBvc1N0YXJ0LmNvbHVtbiwgc2NyZWVuUG9zRW5kLnJvdywgc2NyZWVuUG9zRW5kLmNvbHVtbik7CiAgICB9OwogICAgUmFuZ2UucHJvdG90eXBlLm1vdmVCeSA9IGZ1bmN0aW9uIChyb3csIGNvbHVtbikgewogICAgICAgIHRoaXMuc3RhcnQucm93ICs9IHJvdzsKICAgICAgICB0aGlzLnN0YXJ0LmNvbHVtbiArPSBjb2x1bW47CiAgICAgICAgdGhpcy5lbmQucm93ICs9IHJvdzsKICAgICAgICB0aGlzLmVuZC5jb2x1bW4gKz0gY29sdW1uOwogICAgfTsKICAgIHJldHVybiBSYW5nZTsKfSgpKTsKUmFuZ2UuZnJvbVBvaW50cyA9IGZ1bmN0aW9uIChzdGFydCwgZW5kKSB7CiAgICByZXR1cm4gbmV3IFJhbmdlKHN0YXJ0LnJvdywgc3RhcnQuY29sdW1uLCBlbmQucm93LCBlbmQuY29sdW1uKTsKfTsKUmFuZ2UuY29tcGFyZVBvaW50cyA9IGNvbXBhcmVQb2ludHM7ClJhbmdlLmNvbXBhcmVQb2ludHMgPSBmdW5jdGlvbiAocDEsIHAyKSB7CiAgICByZXR1cm4gcDEucm93IC0gcDIucm93IHx8IHAxLmNvbHVtbiAtIHAyLmNvbHVtbjsKfTsKZXhwb3J0cy5SYW5nZSA9IFJhbmdlOwoKfSk7CgphY2UuZGVmaW5lKCJhY2UvYW5jaG9yIixbXSwgZnVuY3Rpb24ocmVxdWlyZSwgZXhwb3J0cywgbW9kdWxlKXsidXNlIHN0cmljdCI7CnZhciBvb3AgPSByZXF1aXJlKCIuL2xpYi9vb3AiKTsKdmFyIEV2ZW50RW1pdHRlciA9IHJlcXVpcmUoIi4vbGliL2V2ZW50X2VtaXR0ZXIiKS5FdmVudEVtaXR0ZXI7CnZhciBBbmNob3IgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoKSB7CiAgICBmdW5jdGlvbiBBbmNob3IoZG9jLCByb3csIGNvbHVtbikgewogICAgICAgIHRoaXMuJG9uQ2hhbmdlID0gdGhpcy5vbkNoYW5nZS5iaW5kKHRoaXMpOwogICAgICAgIHRoaXMuYXR0YWNoKGRvYyk7CiAgICAgICAgaWYgKHR5cGVvZiBjb2x1bW4gPT0gInVuZGVmaW5lZCIpCiAgICAgICAgICAgIHRoaXMuc2V0UG9zaXRpb24ocm93LnJvdywgcm93LmNvbHVtbik7CiAgICAgICAgZWxzZQogICAgICAgICAgICB0aGlzLnNldFBvc2l0aW9uKHJvdywgY29sdW1uKTsKICAgIH0KICAgIEFuY2hvci5wcm90b3R5cGUuZ2V0UG9zaXRpb24gPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgcmV0dXJuIHRoaXMuJGNsaXBQb3NpdGlvblRvRG9jdW1lbnQodGhpcy5yb3csIHRoaXMuY29sdW1uKTsKICAgIH07CiAgICBBbmNob3IucHJvdG90eXBlLmdldERvY3VtZW50ID0gZnVuY3Rpb24gKCkgewogICAgICAgIHJldHVybiB0aGlzLmRvY3VtZW50OwogICAgfTsKICAgIEFuY2hvci5wcm90b3R5cGUub25DaGFuZ2UgPSBmdW5jdGlvbiAoZGVsdGEpIHsKICAgICAgICBpZiAoZGVsdGEuc3RhcnQucm93ID09IGRlbHRhLmVuZC5yb3cgJiYgZGVsdGEuc3RhcnQucm93ICE9IHRoaXMucm93KQogICAgICAgICAgICByZXR1cm47CiAgICAgICAgaWYgKGRlbHRhLnN0YXJ0LnJvdyA+IHRoaXMucm93KQogICAgICAgICAgICByZXR1cm47CiAgICAgICAgdmFyIHBvaW50ID0gJGdldFRyYW5zZm9ybWVkUG9pbnQoZGVsdGEsIHsgcm93OiB0aGlzLnJvdywgY29sdW1uOiB0aGlzLmNvbHVtbiB9LCB0aGlzLiRpbnNlcnRSaWdodCk7CiAgICAgICAgdGhpcy5zZXRQb3NpdGlvbihwb2ludC5yb3csIHBvaW50LmNvbHVtbiwgdHJ1ZSk7CiAgICB9OwogICAgQW5jaG9yLnByb3RvdHlwZS5zZXRQb3NpdGlvbiA9IGZ1bmN0aW9uIChyb3csIGNvbHVtbiwgbm9DbGlwKSB7CiAgICAgICAgdmFyIHBvczsKICAgICAgICBpZiAobm9DbGlwKSB7CiAgICAgICAgICAgIHBvcyA9IHsKICAgICAgICAgICAgICAgIHJvdzogcm93LAogICAgICAgICAgICAgICAgY29sdW1uOiBjb2x1bW4KICAgICAgICAgICAgfTsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIHBvcyA9IHRoaXMuJGNsaXBQb3NpdGlvblRvRG9jdW1lbnQocm93LCBjb2x1bW4pOwogICAgICAgIH0KICAgICAgICBpZiAodGhpcy5yb3cgPT0gcG9zLnJvdyAmJiB0aGlzLmNvbHVtbiA9PSBwb3MuY29sdW1uKQogICAgICAgICAgICByZXR1cm47CiAgICAgICAgdmFyIG9sZCA9IHsKICAgICAgICAgICAgcm93OiB0aGlzLnJvdywKICAgICAgICAgICAgY29sdW1uOiB0aGlzLmNvbHVtbgogICAgICAgIH07CiAgICAgICAgdGhpcy5yb3cgPSBwb3Mucm93OwogICAgICAgIHRoaXMuY29sdW1uID0gcG9zLmNvbHVtbjsKICAgICAgICB0aGlzLl9zaWduYWwoImNoYW5nZSIsIHsKICAgICAgICAgICAgb2xkOiBvbGQsCiAgICAgICAgICAgIHZhbHVlOiBwb3MKICAgICAgICB9KTsKICAgIH07CiAgICBBbmNob3IucHJvdG90eXBlLmRldGFjaCA9IGZ1bmN0aW9uICgpIHsKICAgICAgICB0aGlzLmRvY3VtZW50Lm9mZigiY2hhbmdlIiwgdGhpcy4kb25DaGFuZ2UpOwogICAgfTsKICAgIEFuY2hvci5wcm90b3R5cGUuYXR0YWNoID0gZnVuY3Rpb24gKGRvYykgewogICAgICAgIHRoaXMuZG9jdW1lbnQgPSBkb2MgfHwgdGhpcy5kb2N1bWVudDsKICAgICAgICB0aGlzLmRvY3VtZW50Lm9uKCJjaGFuZ2UiLCB0aGlzLiRvbkNoYW5nZSk7CiAgICB9OwogICAgQW5jaG9yLnByb3RvdHlwZS4kY2xpcFBvc2l0aW9uVG9Eb2N1bWVudCA9IGZ1bmN0aW9uIChyb3csIGNvbHVtbikgewogICAgICAgIHZhciBwb3MgPSB7fTsKICAgICAgICBpZiAocm93ID49IHRoaXMuZG9jdW1lbnQuZ2V0TGVuZ3RoKCkpIHsKICAgICAgICAgICAgcG9zLnJvdyA9IE1hdGgubWF4KDAsIHRoaXMuZG9jdW1lbnQuZ2V0TGVuZ3RoKCkgLSAxKTsKICAgICAgICAgICAgcG9zLmNvbHVtbiA9IHRoaXMuZG9jdW1lbnQuZ2V0TGluZShwb3Mucm93KS5sZW5ndGg7CiAgICAgICAgfQogICAgICAgIGVsc2UgaWYgKHJvdyA8IDApIHsKICAgICAgICAgICAgcG9zLnJvdyA9IDA7CiAgICAgICAgICAgIHBvcy5jb2x1bW4gPSAwOwogICAgICAgIH0KICAgICAgICBlbHNlIHsKICAgICAgICAgICAgcG9zLnJvdyA9IHJvdzsKICAgICAgICAgICAgcG9zLmNvbHVtbiA9IE1hdGgubWluKHRoaXMuZG9jdW1lbnQuZ2V0TGluZShwb3Mucm93KS5sZW5ndGgsIE1hdGgubWF4KDAsIGNvbHVtbikpOwogICAgICAgIH0KICAgICAgICBpZiAoY29sdW1uIDwgMCkKICAgICAgICAgICAgcG9zLmNvbHVtbiA9IDA7CiAgICAgICAgcmV0dXJuIHBvczsKICAgIH07CiAgICByZXR1cm4gQW5jaG9yOwp9KCkpOwpBbmNob3IucHJvdG90eXBlLiRpbnNlcnRSaWdodCA9IGZhbHNlOwpvb3AuaW1wbGVtZW50KEFuY2hvci5wcm90b3R5cGUsIEV2ZW50RW1pdHRlcik7CmZ1bmN0aW9uICRwb2ludHNJbk9yZGVyKHBvaW50MSwgcG9pbnQyLCBlcXVhbFBvaW50c0luT3JkZXIpIHsKICAgIHZhciBiQ29sSXNBZnRlciA9IGVxdWFsUG9pbnRzSW5PcmRlciA/IHBvaW50MS5jb2x1bW4gPD0gcG9pbnQyLmNvbHVtbiA6IHBvaW50MS5jb2x1bW4gPCBwb2ludDIuY29sdW1uOwogICAgcmV0dXJuIChwb2ludDEucm93IDwgcG9pbnQyLnJvdykgfHwgKHBvaW50MS5yb3cgPT0gcG9pbnQyLnJvdyAmJiBiQ29sSXNBZnRlcik7Cn0KZnVuY3Rpb24gJGdldFRyYW5zZm9ybWVkUG9pbnQoZGVsdGEsIHBvaW50LCBtb3ZlSWZFcXVhbCkgewogICAgdmFyIGRlbHRhSXNJbnNlcnQgPSBkZWx0YS5hY3Rpb24gPT0gImluc2VydCI7CiAgICB2YXIgZGVsdGFSb3dTaGlmdCA9IChkZWx0YUlzSW5zZXJ0ID8gMSA6IC0xKSAqIChkZWx0YS5lbmQucm93IC0gZGVsdGEuc3RhcnQucm93KTsKICAgIHZhciBkZWx0YUNvbFNoaWZ0ID0gKGRlbHRhSXNJbnNlcnQgPyAxIDogLTEpICogKGRlbHRhLmVuZC5jb2x1bW4gLSBkZWx0YS5zdGFydC5jb2x1bW4pOwogICAgdmFyIGRlbHRhU3RhcnQgPSBkZWx0YS5zdGFydDsKICAgIHZhciBkZWx0YUVuZCA9IGRlbHRhSXNJbnNlcnQgPyBkZWx0YVN0YXJ0IDogZGVsdGEuZW5kOyAvLyBDb2xsYXBzZSBpbnNlcnQgcmFuZ2UuCiAgICBpZiAoJHBvaW50c0luT3JkZXIocG9pbnQsIGRlbHRhU3RhcnQsIG1vdmVJZkVxdWFsKSkgewogICAgICAgIHJldHVybiB7CiAgICAgICAgICAgIHJvdzogcG9pbnQucm93LAogICAgICAgICAgICBjb2x1bW46IHBvaW50LmNvbHVtbgogICAgICAgIH07CiAgICB9CiAgICBpZiAoJHBvaW50c0luT3JkZXIoZGVsdGFFbmQsIHBvaW50LCAhbW92ZUlmRXF1YWwpKSB7CiAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgcm93OiBwb2ludC5yb3cgKyBkZWx0YVJvd1NoaWZ0LAogICAgICAgICAgICBjb2x1bW46IHBvaW50LmNvbHVtbiArIChwb2ludC5yb3cgPT0gZGVsdGFFbmQucm93ID8gZGVsdGFDb2xTaGlmdCA6IDApCiAgICAgICAgfTsKICAgIH0KICAgIHJldHVybiB7CiAgICAgICAgcm93OiBkZWx0YVN0YXJ0LnJvdywKICAgICAgICBjb2x1bW46IGRlbHRhU3RhcnQuY29sdW1uCiAgICB9Owp9CmV4cG9ydHMuQW5jaG9yID0gQW5jaG9yOwoKfSk7CgphY2UuZGVmaW5lKCJhY2UvZG9jdW1lbnQiLFtdLCBmdW5jdGlvbihyZXF1aXJlLCBleHBvcnRzLCBtb2R1bGUpeyJ1c2Ugc3RyaWN0IjsKdmFyIG9vcCA9IHJlcXVpcmUoIi4vbGliL29vcCIpOwp2YXIgYXBwbHlEZWx0YSA9IHJlcXVpcmUoIi4vYXBwbHlfZGVsdGEiKS5hcHBseURlbHRhOwp2YXIgRXZlbnRFbWl0dGVyID0gcmVxdWlyZSgiLi9saWIvZXZlbnRfZW1pdHRlciIpLkV2ZW50RW1pdHRlcjsKdmFyIFJhbmdlID0gcmVxdWlyZSgiLi9yYW5nZSIpLlJhbmdlOwp2YXIgQW5jaG9yID0gcmVxdWlyZSgiLi9hbmNob3IiKS5BbmNob3I7CnZhciBEb2N1bWVudCA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uICgpIHsKICAgIGZ1bmN0aW9uIERvY3VtZW50KHRleHRPckxpbmVzKSB7CiAgICAgICAgdGhpcy4kbGluZXMgPSBbIiJdOwogICAgICAgIGlmICh0ZXh0T3JMaW5lcy5sZW5ndGggPT09IDApIHsKICAgICAgICAgICAgdGhpcy4kbGluZXMgPSBbIiJdOwogICAgICAgIH0KICAgICAgICBlbHNlIGlmIChBcnJheS5pc0FycmF5KHRleHRPckxpbmVzKSkgewogICAgICAgICAgICB0aGlzLmluc2VydE1lcmdlZExpbmVzKHsgcm93OiAwLCBjb2x1bW46IDAgfSwgdGV4dE9yTGluZXMpOwogICAgICAgIH0KICAgICAgICBlbHNlIHsKICAgICAgICAgICAgdGhpcy5pbnNlcnQoeyByb3c6IDAsIGNvbHVtbjogMCB9LCB0ZXh0T3JMaW5lcyk7CiAgICAgICAgfQogICAgfQogICAgRG9jdW1lbnQucHJvdG90eXBlLnNldFZhbHVlID0gZnVuY3Rpb24gKHRleHQpIHsKICAgICAgICB2YXIgbGVuID0gdGhpcy5nZXRMZW5ndGgoKSAtIDE7CiAgICAgICAgdGhpcy5yZW1vdmUobmV3IFJhbmdlKDAsIDAsIGxlbiwgdGhpcy5nZXRMaW5lKGxlbikubGVuZ3RoKSk7CiAgICAgICAgdGhpcy5pbnNlcnQoeyByb3c6IDAsIGNvbHVtbjogMCB9LCB0ZXh0IHx8ICIiKTsKICAgIH07CiAgICBEb2N1bWVudC5wcm90b3R5cGUuZ2V0VmFsdWUgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgcmV0dXJuIHRoaXMuZ2V0QWxsTGluZXMoKS5qb2luKHRoaXMuZ2V0TmV3TGluZUNoYXJhY3RlcigpKTsKICAgIH07CiAgICBEb2N1bWVudC5wcm90b3R5cGUuY3JlYXRlQW5jaG9yID0gZnVuY3Rpb24gKHJvdywgY29sdW1uKSB7CiAgICAgICAgcmV0dXJuIG5ldyBBbmNob3IodGhpcywgcm93LCBjb2x1bW4pOwogICAgfTsKICAgIERvY3VtZW50LnByb3RvdHlwZS4kZGV0ZWN0TmV3TGluZSA9IGZ1bmN0aW9uICh0ZXh0KSB7CiAgICAgICAgdmFyIG1hdGNoID0gdGV4dC5tYXRjaCgvXi4qPyhcclxufFxyfFxuKS9tKTsKICAgICAgICB0aGlzLiRhdXRvTmV3TGluZSA9IG1hdGNoID8gbWF0Y2hbMV0gOiAiXG4iOwogICAgICAgIHRoaXMuX3NpZ25hbCgiY2hhbmdlTmV3TGluZU1vZGUiKTsKICAgIH07CiAgICBEb2N1bWVudC5wcm90b3R5cGUuZ2V0TmV3TGluZUNoYXJhY3RlciA9IGZ1bmN0aW9uICgpIHsKICAgICAgICBzd2l0Y2ggKHRoaXMuJG5ld0xpbmVNb2RlKSB7CiAgICAgICAgICAgIGNhc2UgIndpbmRvd3MiOgogICAgICAgICAgICAgICAgcmV0dXJuICJcclxuIjsKICAgICAgICAgICAgY2FzZSAidW5peCI6CiAgICAgICAgICAgICAgICByZXR1cm4gIlxuIjsKICAgICAgICAgICAgZGVmYXVsdDoKICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLiRhdXRvTmV3TGluZSB8fCAiXG4iOwogICAgICAgIH0KICAgIH07CiAgICBEb2N1bWVudC5wcm90b3R5cGUuc2V0TmV3TGluZU1vZGUgPSBmdW5jdGlvbiAobmV3TGluZU1vZGUpIHsKICAgICAgICBpZiAodGhpcy4kbmV3TGluZU1vZGUgPT09IG5ld0xpbmVNb2RlKQogICAgICAgICAgICByZXR1cm47CiAgICAgICAgdGhpcy4kbmV3TGluZU1vZGUgPSBuZXdMaW5lTW9kZTsKICAgICAgICB0aGlzLl9zaWduYWwoImNoYW5nZU5ld0xpbmVNb2RlIik7CiAgICB9OwogICAgRG9jdW1lbnQucHJvdG90eXBlLmdldE5ld0xpbmVNb2RlID0gZnVuY3Rpb24gKCkgewogICAgICAgIHJldHVybiB0aGlzLiRuZXdMaW5lTW9kZTsKICAgIH07CiAgICBEb2N1bWVudC5wcm90b3R5cGUuaXNOZXdMaW5lID0gZnVuY3Rpb24gKHRleHQpIHsKICAgICAgICByZXR1cm4gKHRleHQgPT0gIlxyXG4iIHx8IHRleHQgPT0gIlxyIiB8fCB0ZXh0ID09ICJcbiIpOwogICAgfTsKICAgIERvY3VtZW50LnByb3RvdHlwZS5nZXRMaW5lID0gZnVuY3Rpb24gKHJvdykgewogICAgICAgIHJldHVybiB0aGlzLiRsaW5lc1tyb3ddIHx8ICIiOwogICAgfTsKICAgIERvY3VtZW50LnByb3RvdHlwZS5nZXRMaW5lcyA9IGZ1bmN0aW9uIChmaXJzdFJvdywgbGFzdFJvdykgewogICAgICAgIHJldHVybiB0aGlzLiRsaW5lcy5zbGljZShmaXJzdFJvdywgbGFzdFJvdyArIDEpOwogICAgfTsKICAgIERvY3VtZW50LnByb3RvdHlwZS5nZXRBbGxMaW5lcyA9IGZ1bmN0aW9uICgpIHsKICAgICAgICByZXR1cm4gdGhpcy5nZXRMaW5lcygwLCB0aGlzLmdldExlbmd0aCgpKTsKICAgIH07CiAgICBEb2N1bWVudC5wcm90b3R5cGUuZ2V0TGVuZ3RoID0gZnVuY3Rpb24gKCkgewogICAgICAgIHJldHVybiB0aGlzLiRsaW5lcy5sZW5ndGg7CiAgICB9OwogICAgRG9jdW1lbnQucHJvdG90eXBlLmdldFRleHRSYW5nZSA9IGZ1bmN0aW9uIChyYW5nZSkgewogICAgICAgIHJldHVybiB0aGlzLmdldExpbmVzRm9yUmFuZ2UocmFuZ2UpLmpvaW4odGhpcy5nZXROZXdMaW5lQ2hhcmFjdGVyKCkpOwogICAgfTsKICAgIERvY3VtZW50LnByb3RvdHlwZS5nZXRMaW5lc0ZvclJhbmdlID0gZnVuY3Rpb24gKHJhbmdlKSB7CiAgICAgICAgdmFyIGxpbmVzOwogICAgICAgIGlmIChyYW5nZS5zdGFydC5yb3cgPT09IHJhbmdlLmVuZC5yb3cpIHsKICAgICAgICAgICAgbGluZXMgPSBbdGhpcy5nZXRMaW5lKHJhbmdlLnN0YXJ0LnJvdykuc3Vic3RyaW5nKHJhbmdlLnN0YXJ0LmNvbHVtbiwgcmFuZ2UuZW5kLmNvbHVtbildOwogICAgICAgIH0KICAgICAgICBlbHNlIHsKICAgICAgICAgICAgbGluZXMgPSB0aGlzLmdldExpbmVzKHJhbmdlLnN0YXJ0LnJvdywgcmFuZ2UuZW5kLnJvdyk7CiAgICAgICAgICAgIGxpbmVzWzBdID0gKGxpbmVzWzBdIHx8ICIiKS5zdWJzdHJpbmcocmFuZ2Uuc3RhcnQuY29sdW1uKTsKICAgICAgICAgICAgdmFyIGwgPSBsaW5lcy5sZW5ndGggLSAxOwogICAgICAgICAgICBpZiAocmFuZ2UuZW5kLnJvdyAtIHJhbmdlLnN0YXJ0LnJvdyA9PSBsKQogICAgICAgICAgICAgICAgbGluZXNbbF0gPSBsaW5lc1tsXS5zdWJzdHJpbmcoMCwgcmFuZ2UuZW5kLmNvbHVtbik7CiAgICAgICAgfQogICAgICAgIHJldHVybiBsaW5lczsKICAgIH07CiAgICBEb2N1bWVudC5wcm90b3R5cGUuaW5zZXJ0TGluZXMgPSBmdW5jdGlvbiAocm93LCBsaW5lcykgewogICAgICAgIGNvbnNvbGUud2FybigiVXNlIG9mIGRvY3VtZW50Lmluc2VydExpbmVzIGlzIGRlcHJlY2F0ZWQuIFVzZSB0aGUgaW5zZXJ0RnVsbExpbmVzIG1ldGhvZCBpbnN0ZWFkLiIpOwogICAgICAgIHJldHVybiB0aGlzLmluc2VydEZ1bGxMaW5lcyhyb3csIGxpbmVzKTsKICAgIH07CiAgICBEb2N1bWVudC5wcm90b3R5cGUucmVtb3ZlTGluZXMgPSBmdW5jdGlvbiAoZmlyc3RSb3csIGxhc3RSb3cpIHsKICAgICAgICBjb25zb2xlLndhcm4oIlVzZSBvZiBkb2N1bWVudC5yZW1vdmVMaW5lcyBpcyBkZXByZWNhdGVkLiBVc2UgdGhlIHJlbW92ZUZ1bGxMaW5lcyBtZXRob2QgaW5zdGVhZC4iKTsKICAgICAgICByZXR1cm4gdGhpcy5yZW1vdmVGdWxsTGluZXMoZmlyc3RSb3csIGxhc3RSb3cpOwogICAgfTsKICAgIERvY3VtZW50LnByb3RvdHlwZS5pbnNlcnROZXdMaW5lID0gZnVuY3Rpb24gKHBvc2l0aW9uKSB7CiAgICAgICAgY29uc29sZS53YXJuKCJVc2Ugb2YgZG9jdW1lbnQuaW5zZXJ0TmV3TGluZSBpcyBkZXByZWNhdGVkLiBVc2UgaW5zZXJ0TWVyZ2VkTGluZXMocG9zaXRpb24sIFsnJywgJyddKSBpbnN0ZWFkLiIpOwogICAgICAgIHJldHVybiB0aGlzLmluc2VydE1lcmdlZExpbmVzKHBvc2l0aW9uLCBbIiIsICIiXSk7CiAgICB9OwogICAgRG9jdW1lbnQucHJvdG90eXBlLmluc2VydCA9IGZ1bmN0aW9uIChwb3NpdGlvbiwgdGV4dCkgewogICAgICAgIGlmICh0aGlzLmdldExlbmd0aCgpIDw9IDEpCiAgICAgICAgICAgIHRoaXMuJGRldGVjdE5ld0xpbmUodGV4dCk7CiAgICAgICAgcmV0dXJuIHRoaXMuaW5zZXJ0TWVyZ2VkTGluZXMocG9zaXRpb24sIHRoaXMuJHNwbGl0KHRleHQpKTsKICAgIH07CiAgICBEb2N1bWVudC5wcm90b3R5cGUuaW5zZXJ0SW5MaW5lID0gZnVuY3Rpb24gKHBvc2l0aW9uLCB0ZXh0KSB7CiAgICAgICAgdmFyIHN0YXJ0ID0gdGhpcy5jbGlwcGVkUG9zKHBvc2l0aW9uLnJvdywgcG9zaXRpb24uY29sdW1uKTsKICAgICAgICB2YXIgZW5kID0gdGhpcy5wb3MocG9zaXRpb24ucm93LCBwb3NpdGlvbi5jb2x1bW4gKyB0ZXh0Lmxlbmd0aCk7CiAgICAgICAgdGhpcy5hcHBseURlbHRhKHsKICAgICAgICAgICAgc3RhcnQ6IHN0YXJ0LAogICAgICAgICAgICBlbmQ6IGVuZCwKICAgICAgICAgICAgYWN0aW9uOiAiaW5zZXJ0IiwKICAgICAgICAgICAgbGluZXM6IFt0ZXh0XQogICAgICAgIH0sIHRydWUpOwogICAgICAgIHJldHVybiB0aGlzLmNsb25lUG9zKGVuZCk7CiAgICB9OwogICAgRG9jdW1lbnQucHJvdG90eXBlLmNsaXBwZWRQb3MgPSBmdW5jdGlvbiAocm93LCBjb2x1bW4pIHsKICAgICAgICB2YXIgbGVuZ3RoID0gdGhpcy5nZXRMZW5ndGgoKTsKICAgICAgICBpZiAocm93ID09PSB1bmRlZmluZWQpIHsKICAgICAgICAgICAgcm93ID0gbGVuZ3RoOwogICAgICAgIH0KICAgICAgICBlbHNlIGlmIChyb3cgPCAwKSB7CiAgICAgICAgICAgIHJvdyA9IDA7CiAgICAgICAgfQogICAgICAgIGVsc2UgaWYgKHJvdyA+PSBsZW5ndGgpIHsKICAgICAgICAgICAgcm93ID0gbGVuZ3RoIC0gMTsKICAgICAgICAgICAgY29sdW1uID0gdW5kZWZpbmVkOwogICAgICAgIH0KICAgICAgICB2YXIgbGluZSA9IHRoaXMuZ2V0TGluZShyb3cpOwogICAgICAgIGlmIChjb2x1bW4gPT0gdW5kZWZpbmVkKQogICAgICAgICAgICBjb2x1bW4gPSBsaW5lLmxlbmd0aDsKICAgICAgICBjb2x1bW4gPSBNYXRoLm1pbihNYXRoLm1heChjb2x1bW4sIDApLCBsaW5lLmxlbmd0aCk7CiAgICAgICAgcmV0dXJuIHsgcm93OiByb3csIGNvbHVtbjogY29sdW1uIH07CiAgICB9OwogICAgRG9jdW1lbnQucHJvdG90eXBlLmNsb25lUG9zID0gZnVuY3Rpb24gKHBvcykgewogICAgICAgIHJldHVybiB7IHJvdzogcG9zLnJvdywgY29sdW1uOiBwb3MuY29sdW1uIH07CiAgICB9OwogICAgRG9jdW1lbnQucHJvdG90eXBlLnBvcyA9IGZ1bmN0aW9uIChyb3csIGNvbHVtbikgewogICAgICAgIHJldHVybiB7IHJvdzogcm93LCBjb2x1bW46IGNvbHVtbiB9OwogICAgfTsKICAgIERvY3VtZW50LnByb3RvdHlwZS4kY2xpcFBvc2l0aW9uID0gZnVuY3Rpb24gKHBvc2l0aW9uKSB7CiAgICAgICAgdmFyIGxlbmd0aCA9IHRoaXMuZ2V0TGVuZ3RoKCk7CiAgICAgICAgaWYgKHBvc2l0aW9uLnJvdyA+PSBsZW5ndGgpIHsKICAgICAgICAgICAgcG9zaXRpb24ucm93ID0gTWF0aC5tYXgoMCwgbGVuZ3RoIC0gMSk7CiAgICAgICAgICAgIHBvc2l0aW9uLmNvbHVtbiA9IHRoaXMuZ2V0TGluZShsZW5ndGggLSAxKS5sZW5ndGg7CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICBwb3NpdGlvbi5yb3cgPSBNYXRoLm1heCgwLCBwb3NpdGlvbi5yb3cpOwogICAgICAgICAgICBwb3NpdGlvbi5jb2x1bW4gPSBNYXRoLm1pbihNYXRoLm1heChwb3NpdGlvbi5jb2x1bW4sIDApLCB0aGlzLmdldExpbmUocG9zaXRpb24ucm93KS5sZW5ndGgpOwogICAgICAgIH0KICAgICAgICByZXR1cm4gcG9zaXRpb247CiAgICB9OwogICAgRG9jdW1lbnQucHJvdG90eXBlLmluc2VydEZ1bGxMaW5lcyA9IGZ1bmN0aW9uIChyb3csIGxpbmVzKSB7CiAgICAgICAgcm93ID0gTWF0aC5taW4oTWF0aC5tYXgocm93LCAwKSwgdGhpcy5nZXRMZW5ndGgoKSk7CiAgICAgICAgdmFyIGNvbHVtbiA9IDA7CiAgICAgICAgaWYgKHJvdyA8IHRoaXMuZ2V0TGVuZ3RoKCkpIHsKICAgICAgICAgICAgbGluZXMgPSBsaW5lcy5jb25jYXQoWyIiXSk7CiAgICAgICAgICAgIGNvbHVtbiA9IDA7CiAgICAgICAgfQogICAgICAgIGVsc2UgewogICAgICAgICAgICBsaW5lcyA9IFsiIl0uY29uY2F0KGxpbmVzKTsKICAgICAgICAgICAgcm93LS07CiAgICAgICAgICAgIGNvbHVtbiA9IHRoaXMuJGxpbmVzW3Jvd10ubGVuZ3RoOwogICAgICAgIH0KICAgICAgICB0aGlzLmluc2VydE1lcmdlZExpbmVzKHsgcm93OiByb3csIGNvbHVtbjogY29sdW1uIH0sIGxpbmVzKTsKICAgIH07CiAgICBEb2N1bWVudC5wcm90b3R5cGUuaW5zZXJ0TWVyZ2VkTGluZXMgPSBmdW5jdGlvbiAocG9zaXRpb24sIGxpbmVzKSB7CiAgICAgICAgdmFyIHN0YXJ0ID0gdGhpcy5jbGlwcGVkUG9zKHBvc2l0aW9uLnJvdywgcG9zaXRpb24uY29sdW1uKTsKICAgICAgICB2YXIgZW5kID0gewogICAgICAgICAgICByb3c6IHN0YXJ0LnJvdyArIGxpbmVzLmxlbmd0aCAtIDEsCiAgICAgICAgICAgIGNvbHVtbjogKGxpbmVzLmxlbmd0aCA9PSAxID8gc3RhcnQuY29sdW1uIDogMCkgKyBsaW5lc1tsaW5lcy5sZW5ndGggLSAxXS5sZW5ndGgKICAgICAgICB9OwogICAgICAgIHRoaXMuYXBwbHlEZWx0YSh7CiAgICAgICAgICAgIHN0YXJ0OiBzdGFydCwKICAgICAgICAgICAgZW5kOiBlbmQsCiAgICAgICAgICAgIGFjdGlvbjogImluc2VydCIsCiAgICAgICAgICAgIGxpbmVzOiBsaW5lcwogICAgICAgIH0pOwogICAgICAgIHJldHVybiB0aGlzLmNsb25lUG9zKGVuZCk7CiAgICB9OwogICAgRG9jdW1lbnQucHJvdG90eXBlLnJlbW92ZSA9IGZ1bmN0aW9uIChyYW5nZSkgewogICAgICAgIHZhciBzdGFydCA9IHRoaXMuY2xpcHBlZFBvcyhyYW5nZS5zdGFydC5yb3csIHJhbmdlLnN0YXJ0LmNvbHVtbik7CiAgICAgICAgdmFyIGVuZCA9IHRoaXMuY2xpcHBlZFBvcyhyYW5nZS5lbmQucm93LCByYW5nZS5lbmQuY29sdW1uKTsKICAgICAgICB0aGlzLmFwcGx5RGVsdGEoewogICAgICAgICAgICBzdGFydDogc3RhcnQsCiAgICAgICAgICAgIGVuZDogZW5kLAogICAgICAgICAgICBhY3Rpb246ICJyZW1vdmUiLAogICAgICAgICAgICBsaW5lczogdGhpcy5nZXRMaW5lc0ZvclJhbmdlKHsgc3RhcnQ6IHN0YXJ0LCBlbmQ6IGVuZCB9KQogICAgICAgIH0pOwogICAgICAgIHJldHVybiB0aGlzLmNsb25lUG9zKHN0YXJ0KTsKICAgIH07CiAgICBEb2N1bWVudC5wcm90b3R5cGUucmVtb3ZlSW5MaW5lID0gZnVuY3Rpb24gKHJvdywgc3RhcnRDb2x1bW4sIGVuZENvbHVtbikgewogICAgICAgIHZhciBzdGFydCA9IHRoaXMuY2xpcHBlZFBvcyhyb3csIHN0YXJ0Q29sdW1uKTsKICAgICAgICB2YXIgZW5kID0gdGhpcy5jbGlwcGVkUG9zKHJvdywgZW5kQ29sdW1uKTsKICAgICAgICB0aGlzLmFwcGx5RGVsdGEoewogICAgICAgICAgICBzdGFydDogc3RhcnQsCiAgICAgICAgICAgIGVuZDogZW5kLAogICAgICAgICAgICBhY3Rpb246ICJyZW1vdmUiLAogICAgICAgICAgICBsaW5lczogdGhpcy5nZXRMaW5lc0ZvclJhbmdlKHsgc3RhcnQ6IHN0YXJ0LCBlbmQ6IGVuZCB9KQogICAgICAgIH0sIHRydWUpOwogICAgICAgIHJldHVybiB0aGlzLmNsb25lUG9zKHN0YXJ0KTsKICAgIH07CiAgICBEb2N1bWVudC5wcm90b3R5cGUucmVtb3ZlRnVsbExpbmVzID0gZnVuY3Rpb24gKGZpcnN0Um93LCBsYXN0Um93KSB7CiAgICAgICAgZmlyc3RSb3cgPSBNYXRoLm1pbihNYXRoLm1heCgwLCBmaXJzdFJvdyksIHRoaXMuZ2V0TGVuZ3RoKCkgLSAxKTsKICAgICAgICBsYXN0Um93ID0gTWF0aC5taW4oTWF0aC5tYXgoMCwgbGFzdFJvdyksIHRoaXMuZ2V0TGVuZ3RoKCkgLSAxKTsKICAgICAgICB2YXIgZGVsZXRlRmlyc3ROZXdMaW5lID0gbGFzdFJvdyA9PSB0aGlzLmdldExlbmd0aCgpIC0gMSAmJiBmaXJzdFJvdyA+IDA7CiAgICAgICAgdmFyIGRlbGV0ZUxhc3ROZXdMaW5lID0gbGFzdFJvdyA8IHRoaXMuZ2V0TGVuZ3RoKCkgLSAxOwogICAgICAgIHZhciBzdGFydFJvdyA9IChkZWxldGVGaXJzdE5ld0xpbmUgPyBmaXJzdFJvdyAtIDEgOiBmaXJzdFJvdyk7CiAgICAgICAgdmFyIHN0YXJ0Q29sID0gKGRlbGV0ZUZpcnN0TmV3TGluZSA/IHRoaXMuZ2V0TGluZShzdGFydFJvdykubGVuZ3RoIDogMCk7CiAgICAgICAgdmFyIGVuZFJvdyA9IChkZWxldGVMYXN0TmV3TGluZSA/IGxhc3RSb3cgKyAxIDogbGFzdFJvdyk7CiAgICAgICAgdmFyIGVuZENvbCA9IChkZWxldGVMYXN0TmV3TGluZSA/IDAgOiB0aGlzLmdldExpbmUoZW5kUm93KS5sZW5ndGgpOwogICAgICAgIHZhciByYW5nZSA9IG5ldyBSYW5nZShzdGFydFJvdywgc3RhcnRDb2wsIGVuZFJvdywgZW5kQ29sKTsKICAgICAgICB2YXIgZGVsZXRlZExpbmVzID0gdGhpcy4kbGluZXMuc2xpY2UoZmlyc3RSb3csIGxhc3RSb3cgKyAxKTsKICAgICAgICB0aGlzLmFwcGx5RGVsdGEoewogICAgICAgICAgICBzdGFydDogcmFuZ2Uuc3RhcnQsCiAgICAgICAgICAgIGVuZDogcmFuZ2UuZW5kLAogICAgICAgICAgICBhY3Rpb246ICJyZW1vdmUiLAogICAgICAgICAgICBsaW5lczogdGhpcy5nZXRMaW5lc0ZvclJhbmdlKHJhbmdlKQogICAgICAgIH0pOwogICAgICAgIHJldHVybiBkZWxldGVkTGluZXM7CiAgICB9OwogICAgRG9jdW1lbnQucHJvdG90eXBlLnJlbW92ZU5ld0xpbmUgPSBmdW5jdGlvbiAocm93KSB7CiAgICAgICAgaWYgKHJvdyA8IHRoaXMuZ2V0TGVuZ3RoKCkgLSAxICYmIHJvdyA+PSAwKSB7CiAgICAgICAgICAgIHRoaXMuYXBwbHlEZWx0YSh7CiAgICAgICAgICAgICAgICBzdGFydDogdGhpcy5wb3Mocm93LCB0aGlzLmdldExpbmUocm93KS5sZW5ndGgpLAogICAgICAgICAgICAgICAgZW5kOiB0aGlzLnBvcyhyb3cgKyAxLCAwKSwKICAgICAgICAgICAgICAgIGFjdGlvbjogInJlbW92ZSIsCiAgICAgICAgICAgICAgICBsaW5lczogWyIiLCAiIl0KICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgfTsKICAgIERvY3VtZW50LnByb3RvdHlwZS5yZXBsYWNlID0gZnVuY3Rpb24gKHJhbmdlLCB0ZXh0KSB7CiAgICAgICAgaWYgKCEocmFuZ2UgaW5zdGFuY2VvZiBSYW5nZSkpCiAgICAgICAgICAgIHJhbmdlID0gUmFuZ2UuZnJvbVBvaW50cyhyYW5nZS5zdGFydCwgcmFuZ2UuZW5kKTsKICAgICAgICBpZiAodGV4dC5sZW5ndGggPT09IDAgJiYgcmFuZ2UuaXNFbXB0eSgpKQogICAgICAgICAgICByZXR1cm4gcmFuZ2Uuc3RhcnQ7CiAgICAgICAgaWYgKHRleHQgPT0gdGhpcy5nZXRUZXh0UmFuZ2UocmFuZ2UpKQogICAgICAgICAgICByZXR1cm4gcmFuZ2UuZW5kOwogICAgICAgIHRoaXMucmVtb3ZlKHJhbmdlKTsKICAgICAgICB2YXIgZW5kOwogICAgICAgIGlmICh0ZXh0KSB7CiAgICAgICAgICAgIGVuZCA9IHRoaXMuaW5zZXJ0KHJhbmdlLnN0YXJ0LCB0ZXh0KTsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIGVuZCA9IHJhbmdlLnN0YXJ0OwogICAgICAgIH0KICAgICAgICByZXR1cm4gZW5kOwogICAgfTsKICAgIERvY3VtZW50LnByb3RvdHlwZS5hcHBseURlbHRhcyA9IGZ1bmN0aW9uIChkZWx0YXMpIHsKICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGRlbHRhcy5sZW5ndGg7IGkrKykgewogICAgICAgICAgICB0aGlzLmFwcGx5RGVsdGEoZGVsdGFzW2ldKTsKICAgICAgICB9CiAgICB9OwogICAgRG9jdW1lbnQucHJvdG90eXBlLnJldmVydERlbHRhcyA9IGZ1bmN0aW9uIChkZWx0YXMpIHsKICAgICAgICBmb3IgKHZhciBpID0gZGVsdGFzLmxlbmd0aCAtIDE7IGkgPj0gMDsgaS0tKSB7CiAgICAgICAgICAgIHRoaXMucmV2ZXJ0RGVsdGEoZGVsdGFzW2ldKTsKICAgICAgICB9CiAgICB9OwogICAgRG9jdW1lbnQucHJvdG90eXBlLmFwcGx5RGVsdGEgPSBmdW5jdGlvbiAoZGVsdGEsIGRvTm90VmFsaWRhdGUpIHsKICAgICAgICB2YXIgaXNJbnNlcnQgPSBkZWx0YS5hY3Rpb24gPT0gImluc2VydCI7CiAgICAgICAgaWYgKGlzSW5zZXJ0ID8gZGVsdGEubGluZXMubGVuZ3RoIDw9IDEgJiYgIWRlbHRhLmxpbmVzWzBdCiAgICAgICAgICAgIDogIVJhbmdlLmNvbXBhcmVQb2ludHMoZGVsdGEuc3RhcnQsIGRlbHRhLmVuZCkpIHsKICAgICAgICAgICAgcmV0dXJuOwogICAgICAgIH0KICAgICAgICBpZiAoaXNJbnNlcnQgJiYgZGVsdGEubGluZXMubGVuZ3RoID4gMjAwMDApIHsKICAgICAgICAgICAgdGhpcy4kc3BsaXRBbmRhcHBseUxhcmdlRGVsdGEoZGVsdGEsIDIwMDAwKTsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIGFwcGx5RGVsdGEodGhpcy4kbGluZXMsIGRlbHRhLCBkb05vdFZhbGlkYXRlKTsKICAgICAgICAgICAgdGhpcy5fc2lnbmFsKCJjaGFuZ2UiLCBkZWx0YSk7CiAgICAgICAgfQogICAgfTsKICAgIERvY3VtZW50LnByb3RvdHlwZS4kc2FmZUFwcGx5RGVsdGEgPSBmdW5jdGlvbiAoZGVsdGEpIHsKICAgICAgICB2YXIgZG9jTGVuZ3RoID0gdGhpcy4kbGluZXMubGVuZ3RoOwogICAgICAgIGlmIChkZWx0YS5hY3Rpb24gPT0gInJlbW92ZSIgJiYgZGVsdGEuc3RhcnQucm93IDwgZG9jTGVuZ3RoICYmIGRlbHRhLmVuZC5yb3cgPCBkb2NMZW5ndGgKICAgICAgICAgICAgfHwgZGVsdGEuYWN0aW9uID09ICJpbnNlcnQiICYmIGRlbHRhLnN0YXJ0LnJvdyA8PSBkb2NMZW5ndGgpIHsKICAgICAgICAgICAgdGhpcy5hcHBseURlbHRhKGRlbHRhKTsKICAgICAgICB9CiAgICB9OwogICAgRG9jdW1lbnQucHJvdG90eXBlLiRzcGxpdEFuZGFwcGx5TGFyZ2VEZWx0YSA9IGZ1bmN0aW9uIChkZWx0YSwgTUFYKSB7CiAgICAgICAgdmFyIGxpbmVzID0gZGVsdGEubGluZXM7CiAgICAgICAgdmFyIGwgPSBsaW5lcy5sZW5ndGggLSBNQVggKyAxOwogICAgICAgIHZhciByb3cgPSBkZWx0YS5zdGFydC5yb3c7CiAgICAgICAgdmFyIGNvbHVtbiA9IGRlbHRhLnN0YXJ0LmNvbHVtbjsKICAgICAgICBmb3IgKHZhciBmcm9tID0gMCwgdG8gPSAwOyBmcm9tIDwgbDsgZnJvbSA9IHRvKSB7CiAgICAgICAgICAgIHRvICs9IE1BWCAtIDE7CiAgICAgICAgICAgIHZhciBjaHVuayA9IGxpbmVzLnNsaWNlKGZyb20sIHRvKTsKICAgICAgICAgICAgY2h1bmsucHVzaCgiIik7CiAgICAgICAgICAgIHRoaXMuYXBwbHlEZWx0YSh7CiAgICAgICAgICAgICAgICBzdGFydDogdGhpcy5wb3Mocm93ICsgZnJvbSwgY29sdW1uKSwKICAgICAgICAgICAgICAgIGVuZDogdGhpcy5wb3Mocm93ICsgdG8sIGNvbHVtbiA9IDApLAogICAgICAgICAgICAgICAgYWN0aW9uOiBkZWx0YS5hY3Rpb24sCiAgICAgICAgICAgICAgICBsaW5lczogY2h1bmsKICAgICAgICAgICAgfSwgdHJ1ZSk7CiAgICAgICAgfQogICAgICAgIGRlbHRhLmxpbmVzID0gbGluZXMuc2xpY2UoZnJvbSk7CiAgICAgICAgZGVsdGEuc3RhcnQucm93ID0gcm93ICsgZnJvbTsKICAgICAgICBkZWx0YS5zdGFydC5jb2x1bW4gPSBjb2x1bW47CiAgICAgICAgdGhpcy5hcHBseURlbHRhKGRlbHRhLCB0cnVlKTsKICAgIH07CiAgICBEb2N1bWVudC5wcm90b3R5cGUucmV2ZXJ0RGVsdGEgPSBmdW5jdGlvbiAoZGVsdGEpIHsKICAgICAgICB0aGlzLiRzYWZlQXBwbHlEZWx0YSh7CiAgICAgICAgICAgIHN0YXJ0OiB0aGlzLmNsb25lUG9zKGRlbHRhLnN0YXJ0KSwKICAgICAgICAgICAgZW5kOiB0aGlzLmNsb25lUG9zKGRlbHRhLmVuZCksCiAgICAgICAgICAgIGFjdGlvbjogKGRlbHRhLmFjdGlvbiA9PSAiaW5zZXJ0IiA/ICJyZW1vdmUiIDogImluc2VydCIpLAogICAgICAgICAgICBsaW5lczogZGVsdGEubGluZXMuc2xpY2UoKQogICAgICAgIH0pOwogICAgfTsKICAgIERvY3VtZW50LnByb3RvdHlwZS5pbmRleFRvUG9zaXRpb24gPSBmdW5jdGlvbiAoaW5kZXgsIHN0YXJ0Um93KSB7CiAgICAgICAgdmFyIGxpbmVzID0gdGhpcy4kbGluZXMgfHwgdGhpcy5nZXRBbGxMaW5lcygpOwogICAgICAgIHZhciBuZXdsaW5lTGVuZ3RoID0gdGhpcy5nZXROZXdMaW5lQ2hhcmFjdGVyKCkubGVuZ3RoOwogICAgICAgIGZvciAodmFyIGkgPSBzdGFydFJvdyB8fCAwLCBsID0gbGluZXMubGVuZ3RoOyBpIDwgbDsgaSsrKSB7CiAgICAgICAgICAgIGluZGV4IC09IGxpbmVzW2ldLmxlbmd0aCArIG5ld2xpbmVMZW5ndGg7CiAgICAgICAgICAgIGlmIChpbmRleCA8IDApCiAgICAgICAgICAgICAgICByZXR1cm4geyByb3c6IGksIGNvbHVtbjogaW5kZXggKyBsaW5lc1tpXS5sZW5ndGggKyBuZXdsaW5lTGVuZ3RoIH07CiAgICAgICAgfQogICAgICAgIHJldHVybiB7IHJvdzogbCAtIDEsIGNvbHVtbjogaW5kZXggKyBsaW5lc1tsIC0gMV0ubGVuZ3RoICsgbmV3bGluZUxlbmd0aCB9OwogICAgfTsKICAgIERvY3VtZW50LnByb3RvdHlwZS5wb3NpdGlvblRvSW5kZXggPSBmdW5jdGlvbiAocG9zLCBzdGFydFJvdykgewogICAgICAgIHZhciBsaW5lcyA9IHRoaXMuJGxpbmVzIHx8IHRoaXMuZ2V0QWxsTGluZXMoKTsKICAgICAgICB2YXIgbmV3bGluZUxlbmd0aCA9IHRoaXMuZ2V0TmV3TGluZUNoYXJhY3RlcigpLmxlbmd0aDsKICAgICAgICB2YXIgaW5kZXggPSAwOwogICAgICAgIHZhciByb3cgPSBNYXRoLm1pbihwb3Mucm93LCBsaW5lcy5sZW5ndGgpOwogICAgICAgIGZvciAodmFyIGkgPSBzdGFydFJvdyB8fCAwOyBpIDwgcm93OyArK2kpCiAgICAgICAgICAgIGluZGV4ICs9IGxpbmVzW2ldLmxlbmd0aCArIG5ld2xpbmVMZW5ndGg7CiAgICAgICAgcmV0dXJuIGluZGV4ICsgcG9zLmNvbHVtbjsKICAgIH07CiAgICBEb2N1bWVudC5wcm90b3R5cGUuJHNwbGl0ID0gZnVuY3Rpb24gKHRleHQpIHsKICAgICAgICByZXR1cm4gdGV4dC5zcGxpdCgvXHJcbnxccnxcbi8pOwogICAgfTsKICAgIHJldHVybiBEb2N1bWVudDsKfSgpKTsKRG9jdW1lbnQucHJvdG90eXBlLiRhdXRvTmV3TGluZSA9ICIiOwpEb2N1bWVudC5wcm90b3R5cGUuJG5ld0xpbmVNb2RlID0gImF1dG8iOwpvb3AuaW1wbGVtZW50KERvY3VtZW50LnByb3RvdHlwZSwgRXZlbnRFbWl0dGVyKTsKZXhwb3J0cy5Eb2N1bWVudCA9IERvY3VtZW50OwoKfSk7CgphY2UuZGVmaW5lKCJhY2UvbGliL2xhbmciLFtdLCBmdW5jdGlvbihyZXF1aXJlLCBleHBvcnRzLCBtb2R1bGUpeyJ1c2Ugc3RyaWN0IjsKZXhwb3J0cy5sYXN0ID0gZnVuY3Rpb24gKGEpIHsKICAgIHJldHVybiBhW2EubGVuZ3RoIC0gMV07Cn07CmV4cG9ydHMuc3RyaW5nUmV2ZXJzZSA9IGZ1bmN0aW9uIChzdHJpbmcpIHsKICAgIHJldHVybiBzdHJpbmcuc3BsaXQoIiIpLnJldmVyc2UoKS5qb2luKCIiKTsKfTsKZXhwb3J0cy5zdHJpbmdSZXBlYXQgPSBmdW5jdGlvbiAoc3RyaW5nLCBjb3VudCkgewogICAgdmFyIHJlc3VsdCA9ICcnOwogICAgd2hpbGUgKGNvdW50ID4gMCkgewogICAgICAgIGlmIChjb3VudCAmIDEpCiAgICAgICAgICAgIHJlc3VsdCArPSBzdHJpbmc7CiAgICAgICAgaWYgKGNvdW50ID4+PSAxKQogICAgICAgICAgICBzdHJpbmcgKz0gc3RyaW5nOwogICAgfQogICAgcmV0dXJuIHJlc3VsdDsKfTsKdmFyIHRyaW1CZWdpblJlZ2V4cCA9IC9eXHNccyovOwp2YXIgdHJpbUVuZFJlZ2V4cCA9IC9cc1xzKiQvOwpleHBvcnRzLnN0cmluZ1RyaW1MZWZ0ID0gZnVuY3Rpb24gKHN0cmluZykgewogICAgcmV0dXJuIHN0cmluZy5yZXBsYWNlKHRyaW1CZWdpblJlZ2V4cCwgJycpOwp9OwpleHBvcnRzLnN0cmluZ1RyaW1SaWdodCA9IGZ1bmN0aW9uIChzdHJpbmcpIHsKICAgIHJldHVybiBzdHJpbmcucmVwbGFjZSh0cmltRW5kUmVnZXhwLCAnJyk7Cn07CmV4cG9ydHMuY29weU9iamVjdCA9IGZ1bmN0aW9uIChvYmopIHsKICAgIHZhciBjb3B5ID0ge307CiAgICBmb3IgKHZhciBrZXkgaW4gb2JqKSB7CiAgICAgICAgY29weVtrZXldID0gb2JqW2tleV07CiAgICB9CiAgICByZXR1cm4gY29weTsKfTsKZXhwb3J0cy5jb3B5QXJyYXkgPSBmdW5jdGlvbiAoYXJyYXkpIHsKICAgIHZhciBjb3B5ID0gW107CiAgICBmb3IgKHZhciBpID0gMCwgbCA9IGFycmF5Lmxlbmd0aDsgaSA8IGw7IGkrKykgewogICAgICAgIGlmIChhcnJheVtpXSAmJiB0eXBlb2YgYXJyYXlbaV0gPT0gIm9iamVjdCIpCiAgICAgICAgICAgIGNvcHlbaV0gPSB0aGlzLmNvcHlPYmplY3QoYXJyYXlbaV0pOwogICAgICAgIGVsc2UKICAgICAgICAgICAgY29weVtpXSA9IGFycmF5W2ldOwogICAgfQogICAgcmV0dXJuIGNvcHk7Cn07CmV4cG9ydHMuZGVlcENvcHkgPSBmdW5jdGlvbiBkZWVwQ29weShvYmopIHsKICAgIGlmICh0eXBlb2Ygb2JqICE9PSAib2JqZWN0IiB8fCAhb2JqKQogICAgICAgIHJldHVybiBvYmo7CiAgICB2YXIgY29weTsKICAgIGlmIChBcnJheS5pc0FycmF5KG9iaikpIHsKICAgICAgICBjb3B5ID0gW107CiAgICAgICAgZm9yICh2YXIga2V5ID0gMDsga2V5IDwgb2JqLmxlbmd0aDsga2V5KyspIHsKICAgICAgICAgICAgY29weVtrZXldID0gZGVlcENvcHkob2JqW2tleV0pOwogICAgICAgIH0KICAgICAgICByZXR1cm4gY29weTsKICAgIH0KICAgIGlmIChPYmplY3QucHJvdG90eXBlLnRvU3RyaW5nLmNhbGwob2JqKSAhPT0gIltvYmplY3QgT2JqZWN0XSIpCiAgICAgICAgcmV0dXJuIG9iajsKICAgIGNvcHkgPSB7fTsKICAgIGZvciAodmFyIGtleSBpbiBvYmopCiAgICAgICAgY29weVtrZXldID0gZGVlcENvcHkob2JqW2tleV0pOwogICAgcmV0dXJuIGNvcHk7Cn07CmV4cG9ydHMuYXJyYXlUb01hcCA9IGZ1bmN0aW9uIChhcnIpIHsKICAgIHZhciBtYXAgPSB7fTsKICAgIGZvciAodmFyIGkgPSAwOyBpIDwgYXJyLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgbWFwW2FycltpXV0gPSAxOwogICAgfQogICAgcmV0dXJuIG1hcDsKfTsKZXhwb3J0cy5jcmVhdGVNYXAgPSBmdW5jdGlvbiAocHJvcHMpIHsKICAgIHZhciBtYXAgPSBPYmplY3QuY3JlYXRlKG51bGwpOwogICAgZm9yICh2YXIgaSBpbiBwcm9wcykgewogICAgICAgIG1hcFtpXSA9IHByb3BzW2ldOwogICAgfQogICAgcmV0dXJuIG1hcDsKfTsKZXhwb3J0cy5hcnJheVJlbW92ZSA9IGZ1bmN0aW9uIChhcnJheSwgdmFsdWUpIHsKICAgIGZvciAodmFyIGkgPSAwOyBpIDw9IGFycmF5Lmxlbmd0aDsgaSsrKSB7CiAgICAgICAgaWYgKHZhbHVlID09PSBhcnJheVtpXSkgewogICAgICAgICAgICBhcnJheS5zcGxpY2UoaSwgMSk7CiAgICAgICAgfQogICAgfQp9OwpleHBvcnRzLmVzY2FwZVJlZ0V4cCA9IGZ1bmN0aW9uIChzdHIpIHsKICAgIHJldHVybiBzdHIucmVwbGFjZSgvKFsuKis/XiR7fSgpfFtcXVwvXFxdKS9nLCAnXFwkMScpOwp9OwpleHBvcnRzLmVzY2FwZUhUTUwgPSBmdW5jdGlvbiAoc3RyKSB7CiAgICByZXR1cm4gKCIiICsgc3RyKS5yZXBsYWNlKC8mL2csICImIzM4OyIpLnJlcGxhY2UoLyIvZywgIiYjMzQ7IikucmVwbGFjZSgvJy9nLCAiJiMzOTsiKS5yZXBsYWNlKC88L2csICImIzYwOyIpOwp9OwpleHBvcnRzLmdldE1hdGNoT2Zmc2V0cyA9IGZ1bmN0aW9uIChzdHJpbmcsIHJlZ0V4cCkgewogICAgdmFyIG1hdGNoZXMgPSBbXTsKICAgIHN0cmluZy5yZXBsYWNlKHJlZ0V4cCwgZnVuY3Rpb24gKHN0cikgewogICAgICAgIG1hdGNoZXMucHVzaCh7CiAgICAgICAgICAgIG9mZnNldDogYXJndW1lbnRzW2FyZ3VtZW50cy5sZW5ndGggLSAyXSwKICAgICAgICAgICAgbGVuZ3RoOiBzdHIubGVuZ3RoCiAgICAgICAgfSk7CiAgICB9KTsKICAgIHJldHVybiBtYXRjaGVzOwp9OwpleHBvcnRzLmRlZmVycmVkQ2FsbCA9IGZ1bmN0aW9uIChmY24pIHsKICAgIHZhciB0aW1lciA9IG51bGw7CiAgICB2YXIgY2FsbGJhY2sgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgdGltZXIgPSBudWxsOwogICAgICAgIGZjbigpOwogICAgfTsKICAgIHZhciBkZWZlcnJlZCA9IGZ1bmN0aW9uICh0aW1lb3V0KSB7CiAgICAgICAgZGVmZXJyZWQuY2FuY2VsKCk7CiAgICAgICAgdGltZXIgPSBzZXRUaW1lb3V0KGNhbGxiYWNrLCB0aW1lb3V0IHx8IDApOwogICAgICAgIHJldHVybiBkZWZlcnJlZDsKICAgIH07CiAgICBkZWZlcnJlZC5zY2hlZHVsZSA9IGRlZmVycmVkOwogICAgZGVmZXJyZWQuY2FsbCA9IGZ1bmN0aW9uICgpIHsKICAgICAgICB0aGlzLmNhbmNlbCgpOwogICAgICAgIGZjbigpOwogICAgICAgIHJldHVybiBkZWZlcnJlZDsKICAgIH07CiAgICBkZWZlcnJlZC5jYW5jZWwgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgY2xlYXJUaW1lb3V0KHRpbWVyKTsKICAgICAgICB0aW1lciA9IG51bGw7CiAgICAgICAgcmV0dXJuIGRlZmVycmVkOwogICAgfTsKICAgIGRlZmVycmVkLmlzUGVuZGluZyA9IGZ1bmN0aW9uICgpIHsKICAgICAgICByZXR1cm4gdGltZXI7CiAgICB9OwogICAgcmV0dXJuIGRlZmVycmVkOwp9OwpleHBvcnRzLmRlbGF5ZWRDYWxsID0gZnVuY3Rpb24gKGZjbiwgZGVmYXVsdFRpbWVvdXQpIHsKICAgIHZhciB0aW1lciA9IG51bGw7CiAgICB2YXIgY2FsbGJhY2sgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgdGltZXIgPSBudWxsOwogICAgICAgIGZjbigpOwogICAgfTsKICAgIHZhciBfc2VsZiA9IGZ1bmN0aW9uICh0aW1lb3V0KSB7CiAgICAgICAgaWYgKHRpbWVyID09IG51bGwpCiAgICAgICAgICAgIHRpbWVyID0gc2V0VGltZW91dChjYWxsYmFjaywgdGltZW91dCB8fCBkZWZhdWx0VGltZW91dCk7CiAgICB9OwogICAgX3NlbGYuZGVsYXkgPSBmdW5jdGlvbiAodGltZW91dCkgewogICAgICAgIHRpbWVyICYmIGNsZWFyVGltZW91dCh0aW1lcik7CiAgICAgICAgdGltZXIgPSBzZXRUaW1lb3V0KGNhbGxiYWNrLCB0aW1lb3V0IHx8IGRlZmF1bHRUaW1lb3V0KTsKICAgIH07CiAgICBfc2VsZi5zY2hlZHVsZSA9IF9zZWxmOwogICAgX3NlbGYuY2FsbCA9IGZ1bmN0aW9uICgpIHsKICAgICAgICB0aGlzLmNhbmNlbCgpOwogICAgICAgIGZjbigpOwogICAgfTsKICAgIF9zZWxmLmNhbmNlbCA9IGZ1bmN0aW9uICgpIHsKICAgICAgICB0aW1lciAmJiBjbGVhclRpbWVvdXQodGltZXIpOwogICAgICAgIHRpbWVyID0gbnVsbDsKICAgIH07CiAgICBfc2VsZi5pc1BlbmRpbmcgPSBmdW5jdGlvbiAoKSB7CiAgICAgICAgcmV0dXJuIHRpbWVyOwogICAgfTsKICAgIHJldHVybiBfc2VsZjsKfTsKCn0pOwoKYWNlLmRlZmluZSgiYWNlL3dvcmtlci9taXJyb3IiLFtdLCBmdW5jdGlvbihyZXF1aXJlLCBleHBvcnRzLCBtb2R1bGUpIHsKInVzZSBzdHJpY3QiOwoKdmFyIERvY3VtZW50ID0gcmVxdWlyZSgiLi4vZG9jdW1lbnQiKS5Eb2N1bWVudDsKdmFyIGxhbmcgPSByZXF1aXJlKCIuLi9saWIvbGFuZyIpOwogICAgCnZhciBNaXJyb3IgPSBleHBvcnRzLk1pcnJvciA9IGZ1bmN0aW9uKHNlbmRlcikgewogICAgdGhpcy5zZW5kZXIgPSBzZW5kZXI7CiAgICB2YXIgZG9jID0gdGhpcy5kb2MgPSBuZXcgRG9jdW1lbnQoIiIpOwogICAgCiAgICB2YXIgZGVmZXJyZWRVcGRhdGUgPSB0aGlzLmRlZmVycmVkVXBkYXRlID0gbGFuZy5kZWxheWVkQ2FsbCh0aGlzLm9uVXBkYXRlLmJpbmQodGhpcykpOwogICAgCiAgICB2YXIgX3NlbGYgPSB0aGlzOwogICAgc2VuZGVyLm9uKCJjaGFuZ2UiLCBmdW5jdGlvbihlKSB7CiAgICAgICAgdmFyIGRhdGEgPSBlLmRhdGE7CiAgICAgICAgaWYgKGRhdGFbMF0uc3RhcnQpIHsKICAgICAgICAgICAgZG9jLmFwcGx5RGVsdGFzKGRhdGEpOwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgZGF0YS5sZW5ndGg7IGkgKz0gMikgewogICAgICAgICAgICAgICAgdmFyIGQsIGVycjsgCiAgICAgICAgICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShkYXRhW2krMV0pKSB7CiAgICAgICAgICAgICAgICAgICAgZCA9IHthY3Rpb246ICJpbnNlcnQiLCBzdGFydDogZGF0YVtpXSwgbGluZXM6IGRhdGFbaSsxXX07CiAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICAgIGQgPSB7YWN0aW9uOiAicmVtb3ZlIiwgc3RhcnQ6IGRhdGFbaV0sIGVuZDogZGF0YVtpKzFdfTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgaWYgKChkLmFjdGlvbiA9PSAiaW5zZXJ0IiA/IGQuc3RhcnQgOiBkLmVuZCkucm93ID49IGRvYy4kbGluZXMubGVuZ3RoKSB7CiAgICAgICAgICAgICAgICAgICAgZXJyID0gbmV3IEVycm9yKCJJbnZhbGlkIGRlbHRhIik7CiAgICAgICAgICAgICAgICAgICAgZXJyLmRhdGEgPSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHBhdGg6IF9zZWxmLiRwYXRoLAogICAgICAgICAgICAgICAgICAgICAgICBsaW5lc0xlbmd0aDogZG9jLiRsaW5lcy5sZW5ndGgsCiAgICAgICAgICAgICAgICAgICAgICAgIHN0YXJ0OiBkLnN0YXJ0LAogICAgICAgICAgICAgICAgICAgICAgICBlbmQ6IGQuZW5kCiAgICAgICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgICAgICB0aHJvdyBlcnI7CiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgZG9jLmFwcGx5RGVsdGEoZCwgdHJ1ZSk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgaWYgKF9zZWxmLiR0aW1lb3V0KQogICAgICAgICAgICByZXR1cm4gZGVmZXJyZWRVcGRhdGUuc2NoZWR1bGUoX3NlbGYuJHRpbWVvdXQpOwogICAgICAgIF9zZWxmLm9uVXBkYXRlKCk7CiAgICB9KTsKfTsKCihmdW5jdGlvbigpIHsKICAgIAogICAgdGhpcy4kdGltZW91dCA9IDUwMDsKICAgIAogICAgdGhpcy5zZXRUaW1lb3V0ID0gZnVuY3Rpb24odGltZW91dCkgewogICAgICAgIHRoaXMuJHRpbWVvdXQgPSB0aW1lb3V0OwogICAgfTsKICAgIAogICAgdGhpcy5zZXRWYWx1ZSA9IGZ1bmN0aW9uKHZhbHVlKSB7CiAgICAgICAgdGhpcy5kb2Muc2V0VmFsdWUodmFsdWUpOwogICAgICAgIHRoaXMuZGVmZXJyZWRVcGRhdGUuc2NoZWR1bGUodGhpcy4kdGltZW91dCk7CiAgICB9OwogICAgCiAgICB0aGlzLmdldFZhbHVlID0gZnVuY3Rpb24oY2FsbGJhY2tJZCkgewogICAgICAgIHRoaXMuc2VuZGVyLmNhbGxiYWNrKHRoaXMuZG9jLmdldFZhbHVlKCksIGNhbGxiYWNrSWQpOwogICAgfTsKICAgIAogICAgdGhpcy5vblVwZGF0ZSA9IGZ1bmN0aW9uKCkgewogICAgfTsKICAgIAogICAgdGhpcy5pc1BlbmRpbmcgPSBmdW5jdGlvbigpIHsKICAgICAgICByZXR1cm4gdGhpcy5kZWZlcnJlZFVwZGF0ZS5pc1BlbmRpbmcoKTsKICAgIH07CiAgICAKfSkuY2FsbChNaXJyb3IucHJvdG90eXBlKTsKCn0pOwoKYWNlLmRlZmluZSgiYWNlL21vZGUvanNvbi9qc29uX3BhcnNlIixbXSwgZnVuY3Rpb24ocmVxdWlyZSwgZXhwb3J0cywgbW9kdWxlKSB7CiJ1c2Ugc3RyaWN0IjsKCiAgICB2YXIgYXQsICAgICAvLyBUaGUgaW5kZXggb2YgdGhlIGN1cnJlbnQgY2hhcmFjdGVyCiAgICAgICAgY2gsICAgICAvLyBUaGUgY3VycmVudCBjaGFyYWN0ZXIKICAgICAgICBlc2NhcGVlID0gewogICAgICAgICAgICAnIic6ICAnIicsCiAgICAgICAgICAgICdcXCc6ICdcXCcsCiAgICAgICAgICAgICcvJzogICcvJywKICAgICAgICAgICAgYjogICAgJ1xiJywKICAgICAgICAgICAgZjogICAgJ1xmJywKICAgICAgICAgICAgbjogICAgJ1xuJywKICAgICAgICAgICAgcjogICAgJ1xyJywKICAgICAgICAgICAgdDogICAgJ1x0JwogICAgICAgIH0sCiAgICAgICAgdGV4dCwKCiAgICAgICAgZXJyb3IgPSBmdW5jdGlvbiAobSkgewoKICAgICAgICAgICAgdGhyb3cgewogICAgICAgICAgICAgICAgbmFtZTogICAgJ1N5bnRheEVycm9yJywKICAgICAgICAgICAgICAgIG1lc3NhZ2U6IG0sCiAgICAgICAgICAgICAgICBhdDogICAgICBhdCwKICAgICAgICAgICAgICAgIHRleHQ6ICAgIHRleHQKICAgICAgICAgICAgfTsKICAgICAgICB9LAoKICAgICAgICBuZXh0ID0gZnVuY3Rpb24gKGMpIHsKCiAgICAgICAgICAgIGlmIChjICYmIGMgIT09IGNoKSB7CiAgICAgICAgICAgICAgICBlcnJvcigiRXhwZWN0ZWQgJyIgKyBjICsgIicgaW5zdGVhZCBvZiAnIiArIGNoICsgIiciKTsKICAgICAgICAgICAgfQoKICAgICAgICAgICAgY2ggPSB0ZXh0LmNoYXJBdChhdCk7CiAgICAgICAgICAgIGF0ICs9IDE7CiAgICAgICAgICAgIHJldHVybiBjaDsKICAgICAgICB9LAoKICAgICAgICBudW1iZXIgPSBmdW5jdGlvbiAoKSB7CgogICAgICAgICAgICB2YXIgbnVtYmVyLAogICAgICAgICAgICAgICAgc3RyaW5nID0gJyc7CgogICAgICAgICAgICBpZiAoY2ggPT09ICctJykgewogICAgICAgICAgICAgICAgc3RyaW5nID0gJy0nOwogICAgICAgICAgICAgICAgbmV4dCgnLScpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHdoaWxlIChjaCA+PSAnMCcgJiYgY2ggPD0gJzknKSB7CiAgICAgICAgICAgICAgICBzdHJpbmcgKz0gY2g7CiAgICAgICAgICAgICAgICBuZXh0KCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGNoID09PSAnLicpIHsKICAgICAgICAgICAgICAgIHN0cmluZyArPSAnLic7CiAgICAgICAgICAgICAgICB3aGlsZSAobmV4dCgpICYmIGNoID49ICcwJyAmJiBjaCA8PSAnOScpIHsKICAgICAgICAgICAgICAgICAgICBzdHJpbmcgKz0gY2g7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGNoID09PSAnZScgfHwgY2ggPT09ICdFJykgewogICAgICAgICAgICAgICAgc3RyaW5nICs9IGNoOwogICAgICAgICAgICAgICAgbmV4dCgpOwogICAgICAgICAgICAgICAgaWYgKGNoID09PSAnLScgfHwgY2ggPT09ICcrJykgewogICAgICAgICAgICAgICAgICAgIHN0cmluZyArPSBjaDsKICAgICAgICAgICAgICAgICAgICBuZXh0KCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB3aGlsZSAoY2ggPj0gJzAnICYmIGNoIDw9ICc5JykgewogICAgICAgICAgICAgICAgICAgIHN0cmluZyArPSBjaDsKICAgICAgICAgICAgICAgICAgICBuZXh0KCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgbnVtYmVyID0gK3N0cmluZzsKICAgICAgICAgICAgaWYgKGlzTmFOKG51bWJlcikpIHsKICAgICAgICAgICAgICAgIGVycm9yKCJCYWQgbnVtYmVyIik7CiAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICByZXR1cm4gbnVtYmVyOwogICAgICAgICAgICB9CiAgICAgICAgfSwKCiAgICAgICAgc3RyaW5nID0gZnVuY3Rpb24gKCkgewoKICAgICAgICAgICAgdmFyIGhleCwKICAgICAgICAgICAgICAgIGksCiAgICAgICAgICAgICAgICBzdHJpbmcgPSAnJywKICAgICAgICAgICAgICAgIHVmZmZmOwoKICAgICAgICAgICAgaWYgKGNoID09PSAnIicpIHsKICAgICAgICAgICAgICAgIHdoaWxlIChuZXh0KCkpIHsKICAgICAgICAgICAgICAgICAgICBpZiAoY2ggPT09ICciJykgewogICAgICAgICAgICAgICAgICAgICAgICBuZXh0KCk7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBzdHJpbmc7CiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChjaCA9PT0gJ1xcJykgewogICAgICAgICAgICAgICAgICAgICAgICBuZXh0KCk7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjaCA9PT0gJ3UnKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1ZmZmZiA9IDA7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgNDsgaSArPSAxKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGV4ID0gcGFyc2VJbnQobmV4dCgpLCAxNik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFpc0Zpbml0ZShoZXgpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1ZmZmZiA9IHVmZmZmICogMTYgKyBoZXg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJpbmcgKz0gU3RyaW5nLmZyb21DaGFyQ29kZSh1ZmZmZik7CiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIGVzY2FwZWVbY2hdID09PSAnc3RyaW5nJykgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyaW5nICs9IGVzY2FwZWVbY2hdOwogICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGNoID09ICJcbiIgfHwgY2ggPT0gIlxyIikgewogICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICBzdHJpbmcgKz0gY2g7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGVycm9yKCJCYWQgc3RyaW5nIik7CiAgICAgICAgfSwKCiAgICAgICAgd2hpdGUgPSBmdW5jdGlvbiAoKSB7CgogICAgICAgICAgICB3aGlsZSAoY2ggJiYgY2ggPD0gJyAnKSB7CiAgICAgICAgICAgICAgICBuZXh0KCk7CiAgICAgICAgICAgIH0KICAgICAgICB9LAoKICAgICAgICB3b3JkID0gZnVuY3Rpb24gKCkgewoKICAgICAgICAgICAgc3dpdGNoIChjaCkgewogICAgICAgICAgICBjYXNlICd0JzoKICAgICAgICAgICAgICAgIG5leHQoJ3QnKTsKICAgICAgICAgICAgICAgIG5leHQoJ3InKTsKICAgICAgICAgICAgICAgIG5leHQoJ3UnKTsKICAgICAgICAgICAgICAgIG5leHQoJ2UnKTsKICAgICAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgICAgICBjYXNlICdmJzoKICAgICAgICAgICAgICAgIG5leHQoJ2YnKTsKICAgICAgICAgICAgICAgIG5leHQoJ2EnKTsKICAgICAgICAgICAgICAgIG5leHQoJ2wnKTsKICAgICAgICAgICAgICAgIG5leHQoJ3MnKTsKICAgICAgICAgICAgICAgIG5leHQoJ2UnKTsKICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgY2FzZSAnbic6CiAgICAgICAgICAgICAgICBuZXh0KCduJyk7CiAgICAgICAgICAgICAgICBuZXh0KCd1Jyk7CiAgICAgICAgICAgICAgICBuZXh0KCdsJyk7CiAgICAgICAgICAgICAgICBuZXh0KCdsJyk7CiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDsKICAgICAgICAgICAgfQogICAgICAgICAgICBlcnJvcigiVW5leHBlY3RlZCAnIiArIGNoICsgIiciKTsKICAgICAgICB9LAoKICAgICAgICB2YWx1ZSwgIC8vIFBsYWNlIGhvbGRlciBmb3IgdGhlIHZhbHVlIGZ1bmN0aW9uLgoKICAgICAgICBhcnJheSA9IGZ1bmN0aW9uICgpIHsKCiAgICAgICAgICAgIHZhciBhcnJheSA9IFtdOwoKICAgICAgICAgICAgaWYgKGNoID09PSAnWycpIHsKICAgICAgICAgICAgICAgIG5leHQoJ1snKTsKICAgICAgICAgICAgICAgIHdoaXRlKCk7CiAgICAgICAgICAgICAgICBpZiAoY2ggPT09ICddJykgewogICAgICAgICAgICAgICAgICAgIG5leHQoJ10nKTsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gYXJyYXk7ICAgLy8gZW1wdHkgYXJyYXkKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHdoaWxlIChjaCkgewogICAgICAgICAgICAgICAgICAgIGFycmF5LnB1c2godmFsdWUoKSk7CiAgICAgICAgICAgICAgICAgICAgd2hpdGUoKTsKICAgICAgICAgICAgICAgICAgICBpZiAoY2ggPT09ICddJykgewogICAgICAgICAgICAgICAgICAgICAgICBuZXh0KCddJyk7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBhcnJheTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgbmV4dCgnLCcpOwogICAgICAgICAgICAgICAgICAgIHdoaXRlKCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZXJyb3IoIkJhZCBhcnJheSIpOwogICAgICAgIH0sCgogICAgICAgIG9iamVjdCA9IGZ1bmN0aW9uICgpIHsKCiAgICAgICAgICAgIHZhciBrZXksCiAgICAgICAgICAgICAgICBvYmplY3QgPSB7fTsKCiAgICAgICAgICAgIGlmIChjaCA9PT0gJ3snKSB7CiAgICAgICAgICAgICAgICBuZXh0KCd7Jyk7CiAgICAgICAgICAgICAgICB3aGl0ZSgpOwogICAgICAgICAgICAgICAgaWYgKGNoID09PSAnfScpIHsKICAgICAgICAgICAgICAgICAgICBuZXh0KCd9Jyk7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG9iamVjdDsgICAvLyBlbXB0eSBvYmplY3QKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHdoaWxlIChjaCkgewogICAgICAgICAgICAgICAgICAgIGtleSA9IHN0cmluZygpOwogICAgICAgICAgICAgICAgICAgIHdoaXRlKCk7CiAgICAgICAgICAgICAgICAgICAgbmV4dCgnOicpOwogICAgICAgICAgICAgICAgICAgIGlmIChPYmplY3QuaGFzT3duUHJvcGVydHkuY2FsbChvYmplY3QsIGtleSkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3IoJ0R1cGxpY2F0ZSBrZXkgIicgKyBrZXkgKyAnIicpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBvYmplY3Rba2V5XSA9IHZhbHVlKCk7CiAgICAgICAgICAgICAgICAgICAgd2hpdGUoKTsKICAgICAgICAgICAgICAgICAgICBpZiAoY2ggPT09ICd9JykgewogICAgICAgICAgICAgICAgICAgICAgICBuZXh0KCd9Jyk7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBvYmplY3Q7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIG5leHQoJywnKTsKICAgICAgICAgICAgICAgICAgICB3aGl0ZSgpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGVycm9yKCJCYWQgb2JqZWN0Iik7CiAgICAgICAgfTsKCiAgICB2YWx1ZSA9IGZ1bmN0aW9uICgpIHsKCiAgICAgICAgd2hpdGUoKTsKICAgICAgICBzd2l0Y2ggKGNoKSB7CiAgICAgICAgY2FzZSAneyc6CiAgICAgICAgICAgIHJldHVybiBvYmplY3QoKTsKICAgICAgICBjYXNlICdbJzoKICAgICAgICAgICAgcmV0dXJuIGFycmF5KCk7CiAgICAgICAgY2FzZSAnIic6CiAgICAgICAgICAgIHJldHVybiBzdHJpbmcoKTsKICAgICAgICBjYXNlICctJzoKICAgICAgICAgICAgcmV0dXJuIG51bWJlcigpOwogICAgICAgIGRlZmF1bHQ6CiAgICAgICAgICAgIHJldHVybiBjaCA+PSAnMCcgJiYgY2ggPD0gJzknID8gbnVtYmVyKCkgOiB3b3JkKCk7CiAgICAgICAgfQogICAgfTsKCiAgICByZXR1cm4gZnVuY3Rpb24gKHNvdXJjZSwgcmV2aXZlcikgewogICAgICAgIHZhciByZXN1bHQ7CgogICAgICAgIHRleHQgPSBzb3VyY2U7CiAgICAgICAgYXQgPSAwOwogICAgICAgIGNoID0gJyAnOwogICAgICAgIHJlc3VsdCA9IHZhbHVlKCk7CiAgICAgICAgd2hpdGUoKTsKICAgICAgICBpZiAoY2gpIHsKICAgICAgICAgICAgZXJyb3IoIlN5bnRheCBlcnJvciIpOwogICAgICAgIH0KCiAgICAgICAgcmV0dXJuIHR5cGVvZiByZXZpdmVyID09PSAnZnVuY3Rpb24nID8gZnVuY3Rpb24gd2Fsayhob2xkZXIsIGtleSkgewogICAgICAgICAgICB2YXIgaywgdiwgdmFsdWUgPSBob2xkZXJba2V5XTsKICAgICAgICAgICAgaWYgKHZhbHVlICYmIHR5cGVvZiB2YWx1ZSA9PT0gJ29iamVjdCcpIHsKICAgICAgICAgICAgICAgIGZvciAoayBpbiB2YWx1ZSkgewogICAgICAgICAgICAgICAgICAgIGlmIChPYmplY3QuaGFzT3duUHJvcGVydHkuY2FsbCh2YWx1ZSwgaykpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdiA9IHdhbGsodmFsdWUsIGspOwogICAgICAgICAgICAgICAgICAgICAgICBpZiAodiAhPT0gdW5kZWZpbmVkKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZVtrXSA9IHY7CiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWxldGUgdmFsdWVba107CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIHJldml2ZXIuY2FsbChob2xkZXIsIGtleSwgdmFsdWUpOwogICAgICAgIH0oeycnOiByZXN1bHR9LCAnJykgOiByZXN1bHQ7CiAgICB9Owp9KTsKCmFjZS5kZWZpbmUoImFjZS9tb2RlL2pzb25fd29ya2VyIixbXSwgZnVuY3Rpb24ocmVxdWlyZSwgZXhwb3J0cywgbW9kdWxlKSB7CiJ1c2Ugc3RyaWN0IjsKCnZhciBvb3AgPSByZXF1aXJlKCIuLi9saWIvb29wIik7CnZhciBNaXJyb3IgPSByZXF1aXJlKCIuLi93b3JrZXIvbWlycm9yIikuTWlycm9yOwp2YXIgcGFyc2UgPSByZXF1aXJlKCIuL2pzb24vanNvbl9wYXJzZSIpOwoKdmFyIEpzb25Xb3JrZXIgPSBleHBvcnRzLkpzb25Xb3JrZXIgPSBmdW5jdGlvbihzZW5kZXIpIHsKICAgIE1pcnJvci5jYWxsKHRoaXMsIHNlbmRlcik7CiAgICB0aGlzLnNldFRpbWVvdXQoMjAwKTsKfTsKCm9vcC5pbmhlcml0cyhKc29uV29ya2VyLCBNaXJyb3IpOwoKKGZ1bmN0aW9uKCkgewoKICAgIHRoaXMub25VcGRhdGUgPSBmdW5jdGlvbigpIHsKICAgICAgICB2YXIgdmFsdWUgPSB0aGlzLmRvYy5nZXRWYWx1ZSgpOwogICAgICAgIHZhciBlcnJvcnMgPSBbXTsKICAgICAgICB0cnkgewogICAgICAgICAgICBpZiAodmFsdWUpCiAgICAgICAgICAgICAgICBwYXJzZSh2YWx1ZSk7CiAgICAgICAgfSBjYXRjaCAoZSkgewogICAgICAgICAgICB2YXIgcG9zID0gdGhpcy5kb2MuaW5kZXhUb1Bvc2l0aW9uKGUuYXQtMSk7CiAgICAgICAgICAgIGVycm9ycy5wdXNoKHsKICAgICAgICAgICAgICAgIHJvdzogcG9zLnJvdywKICAgICAgICAgICAgICAgIGNvbHVtbjogcG9zLmNvbHVtbiwKICAgICAgICAgICAgICAgIHRleHQ6IGUubWVzc2FnZSwKICAgICAgICAgICAgICAgIHR5cGU6ICJlcnJvciIKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgICAgIHRoaXMuc2VuZGVyLmVtaXQoImFubm90YXRlIiwgZXJyb3JzKTsKICAgIH07Cgp9KS5jYWxsKEpzb25Xb3JrZXIucHJvdG90eXBlKTsKCn0pOwo="},7907:function(e,t,n){"use strict";n.d(t,{Iu:function(){return u},cC:function(){return c},m0:function(){return l}}),n(4987);var i={en:{array:"Array",auto:"Auto",appendText:"Append",appendTitle:"Append a new field with type 'auto' after this field (Ctrl+Shift+Ins)",appendSubmenuTitle:"Select the type of the field to be appended",appendTitleAuto:"Append a new field with type 'auto' (Ctrl+Shift+Ins)",ascending:"Ascending",ascendingTitle:"Sort the childs of this ${type} in ascending order",actionsMenu:"Click to open the actions menu (Ctrl+M)",cannotParseFieldError:"Cannot parse field into JSON",cannotParseValueError:"Cannot parse value into JSON",collapseAll:"Collapse all fields",compactTitle:"Compact JSON data, remove all whitespaces (Ctrl+Shift+I)",descending:"Descending",descendingTitle:"Sort the childs of this ${type} in descending order",drag:"Drag to move this field (Alt+Shift+Arrows)",duplicateKey:"duplicate key",duplicateText:"Duplicate",duplicateTitle:"Duplicate selected fields (Ctrl+D)",duplicateField:"Duplicate this field (Ctrl+D)",duplicateFieldError:"Duplicate field name",empty:"empty",expandAll:"Expand all fields",expandTitle:"Click to expand/collapse this field (Ctrl+E). \nCtrl+Click to expand/collapse including all childs.",formatTitle:"Format JSON data, with proper indentation and line feeds (Ctrl+I)",insert:"Insert",insertTitle:"Insert a new field with type 'auto' before this field (Ctrl+Ins)",insertSub:"Select the type of the field to be inserted",object:"Object",ok:"Ok",redo:"Redo (Ctrl+Shift+Z)",removeText:"Remove",removeTitle:"Remove selected fields (Ctrl+Del)",removeField:"Remove this field (Ctrl+Del)",repairTitle:"Repair JSON: fix quotes and escape characters, remove comments and JSONP notation, turn JavaScript objects into JSON.",searchTitle:"Search fields and values",searchNextResultTitle:"Next result (Enter)",searchPreviousResultTitle:"Previous result (Shift + Enter)",selectNode:"Select a node...",showAll:"show all",showMore:"show more",showMoreStatus:"displaying ${visibleChilds} of ${totalChilds} items.",sort:"Sort",sortTitle:"Sort the childs of this ${type}",sortTitleShort:"Sort contents",sortFieldLabel:"Field:",sortDirectionLabel:"Direction:",sortFieldTitle:"Select the nested field by which to sort the array or object",sortAscending:"Ascending",sortAscendingTitle:"Sort the selected field in ascending order",sortDescending:"Descending",sortDescendingTitle:"Sort the selected field in descending order",string:"String",transform:"Transform",transformTitle:"Filter, sort, or transform the childs of this ${type}",transformTitleShort:"Filter, sort, or transform contents",extract:"Extract",extractTitle:"Extract this ${type}",transformQueryTitle:"Enter a JMESPath query",transformWizardLabel:"Wizard",transformWizardFilter:"Filter",transformWizardSortBy:"Sort by",transformWizardSelectFields:"Select fields",transformQueryLabel:"Query",transformPreviewLabel:"Preview",type:"Type",typeTitle:"Change the type of this field",openUrl:"Ctrl+Click or Ctrl+Enter to open url in new window",undo:"Undo last action (Ctrl+Z)",validationCannotMove:"Cannot move a field into a child of itself",autoType:'Field type "auto". The field type is automatically determined from the value and can be a string, number, boolean, or null.',objectType:'Field type "object". An object contains an unordered set of key/value pairs.',arrayType:'Field type "array". An array contains an ordered collection of values.',stringType:'Field type "string". Field type is not determined from the value, but always returned as string.',modeEditorTitle:"Switch Editor Mode",modeCodeText:"Code",modeCodeTitle:"Switch to code highlighter",modeFormText:"Form",modeFormTitle:"Switch to form editor",modeTextText:"Text",modeTextTitle:"Switch to plain text editor",modeTreeText:"Tree",modeTreeTitle:"Switch to tree editor",modeViewText:"View",modeViewTitle:"Switch to tree view",modePreviewText:"Preview",modePreviewTitle:"Switch to preview mode",examples:"Examples",default:"Default",containsInvalidProperties:"Contains invalid properties",containsInvalidItems:"Contains invalid items"},es:{array:"Matriz",auto:"Auto",appendText:"Agregar",appendTitle:"Agregue un nuevo campo con el tipo 'auto' despu\xe9s de este campo (Ctrl + Shift + Ins)",appendSubmenuTitle:"Seleccione el tipo de campo que se agregar\xe1",appendTitleAuto:"Agregue un nuevo campo con el tipo 'auto' (Ctrl + Shift + Ins)",ascending:"Ascendente",ascendingTitle:"Ordene los elementos secundarios de este ${type} en orden ascendente",actionsMenu:"Haga clic para abrir el men\xfa de acciones (Ctrl + M)",cannotParseFieldError:"No se puede parsear el campo en JSON",cannotParseValueError:"No se puede parsear el valor en JSON",collapseAll:"Contraer todos los campos",compactTitle:"Compactar datos JSON, eliminar todos los espacios en blanco (Ctrl + Shift + I)",descending:"Descendente",descendingTitle:"Ordene los hijos de este ${type} en orden descendente",drag:"Arrastre para mover este campo (Alt + May\xfas + Flechas)",duplicateKey:"llave duplicada",duplicateText:"Duplicar",duplicateTitle:"Duplicar campos seleccionados (Ctrl + D)",duplicateField:"Duplicar este campo (Ctrl + D)",duplicateFieldError:"Nombre de campo duplicado",empty:"vacio",expandAll:"Expandir todos los campos",expandTitle:"Haga clic para expandir/contraer este campo (Ctrl + E). \n Ctrl+Clic para expandir/contraer incluyendo todos los ni\xf1os.",formatTitle:"Formatee los datos JSON, con la sangr\xeda y los avances de l\xednea adecuados (Ctrl + I)",insert:"Insertar",insertTitle:"Inserte un nuevo campo con el tipo 'auto' antes de este campo (Ctrl + Ins)",insertSub:"Seleccione el tipo de campo a insertar",object:"Objeto",ok:"Ok",redo:"Rehacer (Ctrl+May\xfas+Z)",removeText:"Eliminar",removeTitle:"Eliminar campos seleccionados (Ctrl+Supr)",removeField:"Eliminar este campo (Ctrl+Supr)",repairTitle:"Reparar JSON: corrija comillas y caracteres de escape, elimine comentarios y notaci\xf3n JSONP, convierta objetos JavaScript en JSON.",searchTitle:"Campos de b\xfasqueda y valores",searchNextResultTitle:"Siguiente resultado (Entrar)",searchPreviousResultTitle:"Resultado anterior (Shift + Enter)",selectNode:"Seleccione un nodo...",showAll:"mostrar todo",showMore:"mostrar m\xe1s",showMoreStatus:"mostrando ${visibleChilds} de ${totalChilds} elementos.",sort:"Ordenar",sortTitle:"Ordene los hijos de este ${type}",sortTitleShort:"Ordenar contenidos",sortFieldLabel:"Campo:",sortDirectionLabel:"Direcci\xf3n:",sortFieldTitle:"Seleccione el campo anidado por el cual ordenar la matriz u objeto",sortAscending:"Ascendente",sortAscendingTitle:"Ordenar el campo seleccionado en orden ascendente",sortDescending:"Descendente",sortDescendingTitle:"Ordenar por el campo seleccionado, en orden descendente",string:"Texto",transform:"Transformar",transformTitle:"Filtrar, ordenar o transformar los hijos de este ${type}",transformTitleShort:"Filtrar, ordenar o transformar contenidos",extract:"Extraer",extractTitle:"Extrae este ${type}",transformQueryTitle:"Ingrese una consulta JMESPath",transformWizardLabel:"Wizard",transformWizardFilter:"Filtro",transformWizardSortBy:"Ordenar por",transformWizardSelectFields:"Seleccione un campo",transformQueryLabel:"Consulta",transformPreviewLabel:"Vista Previa",type:"Tipo",typeTitle:"Cambiar el tipo de campo",openUrl:"Ctrl+Click o Ctrl+Enter para abrir la URL en una nueva ventana",undo:"Deshacer la \xfaltima acci\xf3n (Ctrl+Z)",validationCannotMove:"No se puede mover un campo a un hijo de s\xed mismo.",autoType:'Field type "auto". The field type is automatically determined from the value and can be a string, number, boolean, or null.',objectType:'Tipo de campo "objeto". Un objeto contiene un conjunto desordenado de pares clave/valor.',arrayType:'Tipo de campo "matriz". Una matriz contiene una colecci\xf3n ordenada de valores.',stringType:'Tipo de campo "cadena". El tipo de campo no se determina a partir del valor, pero siempre se devuelve como una cadena.',modeEditorTitle:"Cambiar modo de editor",modeCodeText:"Codigo",modeCodeTitle:"Cambiar al resaltador de c\xf3digo",modeFormText:"Formulario",modeFormTitle:"Cambiar al editor de formularios",modeTextText:"Texto",modeTextTitle:"Cambiar al editor de texto sin formato",modeTreeText:"Arbol",modeTreeTitle:"Cambiar al editor de \xe1rbol",modeViewText:"Vista",modeViewTitle:"Cambiar a la vista de \xe1rbol",modePreviewText:"Vista Previa",modePreviewTitle:"Cambiar al modo de vista previa",examples:"Ejemplos",default:"Predeterminado",containsInvalidProperties:"Contiene propiedades no validas",containsInvalidItems:"Contiene items no validos"},"zh-CN":{array:"\u6570\u7ec4",auto:"\u81ea\u52a8",appendText:"\u8ffd\u52a0",appendTitle:"\u5728\u6b64\u5b57\u6bb5\u540e\u8ffd\u52a0\u4e00\u4e2a\u7c7b\u578b\u4e3a\u201cauto\u201d\u7684\u65b0\u5b57\u6bb5 (Ctrl+Shift+Ins)",appendSubmenuTitle:"\u9009\u62e9\u8981\u8ffd\u52a0\u7684\u5b57\u6bb5\u7c7b\u578b",appendTitleAuto:"\u8ffd\u52a0\u7c7b\u578b\u4e3a\u201cauto\u201d\u7684\u65b0\u5b57\u6bb5 (Ctrl+Shift+Ins)",ascending:"\u5347\u5e8f",ascendingTitle:"\u5347\u5e8f\u6392\u5217${type}\u7684\u5b50\u8282\u70b9",actionsMenu:"\u70b9\u51fb\u6253\u5f00\u52a8\u4f5c\u83dc\u5355(Ctrl+M)",cannotParseFieldError:"\u65e0\u6cd5\u5c06\u5b57\u6bb5\u89e3\u6790\u4e3aJSON",cannotParseValueError:"\u65e0\u6cd5\u5c06\u503c\u89e3\u6790\u4e3aJSON",collapseAll:"\u7f29\u8fdb\u6240\u6709\u5b57\u6bb5",compactTitle:"\u538b\u7f29JSON\u6570\u636e\uff0c\u5220\u9664\u6240\u6709\u7a7a\u683c (Ctrl+Shift+I)",descending:"\u964d\u5e8f",descendingTitle:"\u964d\u5e8f\u6392\u5217${type}\u7684\u5b50\u8282\u70b9",drag:"\u62d6\u62fd\u79fb\u52a8\u8be5\u8282\u70b9(Alt+Shift+Arrows)",duplicateKey:"\u91cd\u590d\u952e",duplicateText:"\u590d\u5236",duplicateTitle:"\u590d\u5236\u9009\u4e2d\u5b57\u6bb5(Ctrl+D)",duplicateField:"\u590d\u5236\u8be5\u5b57\u6bb5(Ctrl+D)",duplicateFieldError:"\u91cd\u590d\u7684\u5b57\u6bb5\u540d\u79f0",empty:"\u6e05\u7a7a",expandAll:"\u5c55\u5f00\u6240\u6709\u5b57\u6bb5",expandTitle:"\u70b9\u51fb \u5c55\u5f00/\u6536\u7f29 \u8be5\u5b57\u6bb5(Ctrl+E). \nCtrl+Click \u5c55\u5f00/\u6536\u7f29 \u5305\u542b\u6240\u6709\u5b50\u8282\u70b9.",formatTitle:"\u4f7f\u7528\u9002\u5f53\u7684\u7f29\u8fdb\u548c\u6362\u884c\u7b26\u683c\u5f0f\u5316JSON\u6570\u636e (Ctrl+I)",insert:"\u63d2\u5165",insertTitle:"\u5728\u6b64\u5b57\u6bb5\u524d\u63d2\u5165\u7c7b\u578b\u4e3a\u201cauto\u201d\u7684\u65b0\u5b57\u6bb5 (Ctrl+Ins)",insertSub:"\u9009\u62e9\u8981\u63d2\u5165\u7684\u5b57\u6bb5\u7c7b\u578b",object:"\u5bf9\u8c61",ok:"Ok",redo:"\u91cd\u505a (Ctrl+Shift+Z)",removeText:"\u79fb\u9664",removeTitle:"\u79fb\u9664\u9009\u4e2d\u5b57\u6bb5 (Ctrl+Del)",removeField:"\u79fb\u9664\u8be5\u5b57\u6bb5 (Ctrl+Del)",repairTitle:"\u4fee\u590dJSON\uff1a\u4fee\u590d\u5f15\u53f7\u548c\u8f6c\u4e49\u7b26\uff0c\u5220\u9664\u6ce8\u91ca\u548cJSONP\u8868\u793a\u6cd5\uff0c\u5c06JavaScript\u5bf9\u8c61\u8f6c\u6362\u4e3aJSON\u3002",selectNode:"\u9009\u62e9\u4e00\u4e2a\u8282\u70b9...",showAll:"\u5c55\u793a\u5168\u90e8",showMore:"\u5c55\u793a\u66f4\u591a",showMoreStatus:"\u663e\u793a${totalChilds}\u7684${visibleChilds}\u9879\u76ee.",sort:"\u6392\u5e8f",sortTitle:"\u6392\u5e8f${type}\u7684\u5b50\u8282\u70b9",sortTitleShort:"\u5185\u5bb9\u6392\u5e8f",sortFieldLabel:"\u5b57\u6bb5\uff1a",sortDirectionLabel:"\u65b9\u5411\uff1a",sortFieldTitle:"\u9009\u62e9\u7528\u4e8e\u5bf9\u6570\u7ec4\u6216\u5bf9\u8c61\u6392\u5e8f\u7684\u5d4c\u5957\u5b57\u6bb5",sortAscending:"\u5347\u5e8f\u6392\u5e8f",sortAscendingTitle:"\u6309\u7167\u8be5\u5b57\u6bb5\u5347\u5e8f\u6392\u5e8f",sortDescending:"\u964d\u5e8f\u6392\u5e8f",sortDescendingTitle:"\u6309\u7167\u8be5\u5b57\u6bb5\u964d\u5e8f\u6392\u5e8f",string:"\u5b57\u7b26\u4e32",transform:"\u53d8\u6362",transformTitle:"\u7b5b\u9009\uff0c\u6392\u5e8f\uff0c\u6216\u8005\u8f6c\u6362${type}\u7684\u5b50\u8282\u70b9",transformTitleShort:"\u7b5b\u9009\uff0c\u6392\u5e8f\uff0c\u6216\u8005\u8f6c\u6362\u5185\u5bb9",extract:"\u63d0\u53d6",extractTitle:"\u63d0\u53d6\u8fd9\u4e2a ${type}",transformQueryTitle:"\u8f93\u5165JMESPath\u67e5\u8be2",transformWizardLabel:"\u5411\u5bfc",transformWizardFilter:"\u7b5b\u9009",transformWizardSortBy:"\u6392\u5e8f",transformWizardSelectFields:"\u9009\u62e9\u5b57\u6bb5",transformQueryLabel:"\u67e5\u8be2",transformPreviewLabel:"\u9884\u89c8",type:"\u7c7b\u578b",typeTitle:"\u66f4\u6539\u5b57\u6bb5\u7c7b\u578b",openUrl:"Ctrl+Click \u6216\u8005 Ctrl+Enter \u5728\u65b0\u7a97\u53e3\u6253\u5f00\u94fe\u63a5",undo:"\u64a4\u9500\u4e0a\u6b21\u52a8\u4f5c (Ctrl+Z)",validationCannotMove:"\u65e0\u6cd5\u5c06\u5b57\u6bb5\u79fb\u5165\u5176\u5b50\u8282\u70b9",autoType:'\u5b57\u6bb5\u7c7b\u578b "auto". \u5b57\u6bb5\u7c7b\u578b\u7531\u503c\u81ea\u52a8\u786e\u5b9a \u53ef\u4ee5\u4e3a string\uff0cnumber\uff0cboolean\uff0c\u6216\u8005 null.',objectType:'\u5b57\u6bb5\u7c7b\u578b "object". \u5bf9\u8c61\u5305\u542b\u4e00\u7ec4\u65e0\u5e8f\u7684\u952e/\u503c\u5bf9.',arrayType:'\u5b57\u6bb5\u7c7b\u578b "array". \u6570\u7ec4\u5305\u542b\u503c\u7684\u6709\u5e8f\u96c6\u5408.',stringType:'\u5b57\u6bb5\u7c7b\u578b "string". \u5b57\u6bb5\u7c7b\u578b\u7531\u503c\u81ea\u52a8\u786e\u5b9a\uff0c\u4f46\u59cb\u7ec8\u4f5c\u4e3a\u5b57\u7b26\u4e32\u8fd4\u56de.',modeCodeText:"\u4ee3\u7801",modeCodeTitle:"\u5207\u6362\u81f3\u4ee3\u7801\u9ad8\u4eae",modeFormText:"\u8868\u5355",modeFormTitle:"\u5207\u6362\u81f3\u8868\u5355\u7f16\u8f91",modeTextText:"\u6587\u672c",modeTextTitle:"\u5207\u6362\u81f3\u6587\u672c\u7f16\u8f91",modeTreeText:"\u6811",modeTreeTitle:"\u5207\u6362\u81f3\u6811\u7f16\u8f91",modeViewText:"\u89c6\u56fe",modeViewTitle:"\u5207\u6362\u81f3\u6811\u89c6\u56fe",modePreviewText:"\u9884\u89c8",modePreviewTitle:"\u5207\u6362\u81f3\u9884\u89c8\u6a21\u5f0f",examples:"\u4f8b\u5b50",default:"\u7f3a\u7701",containsInvalidProperties:"\u5305\u542b\u65e0\u6548\u7684\u5c5e\u6027",containsInvalidItems:"\u5305\u542b\u65e0\u6548\u9879\u76ee"},"pt-BR":{array:"Lista",auto:"Automatico",appendText:"Adicionar",appendTitle:"Adicionar novo campo com tipo 'auto' depois deste campo (Ctrl+Shift+Ins)",appendSubmenuTitle:"Selecione o tipo do campo a ser adicionado",appendTitleAuto:"Adicionar novo campo com tipo 'auto' (Ctrl+Shift+Ins)",ascending:"Ascendente",ascendingTitle:"Organizar filhor do tipo ${type} em crescente",actionsMenu:"Clique para abrir o menu de a\xe7\xf5es (Ctrl+M)",cannotParseFieldError:"N\xe3o \xe9 poss\xedvel analisar o campo no JSON",cannotParseValueError:"N\xe3o \xe9 poss\xedvel analisar o valor em JSON",collapseAll:"Fechar todos campos",compactTitle:"Dados JSON compactos, remova todos os espa\xe7os em branco (Ctrl+Shift+I)",descending:"Descendente",descendingTitle:"Organizar o filhos do tipo ${type} em decrescente",duplicateKey:"chave duplicada",drag:"Arraste para mover este campo (Alt+Shift+Arrows)",duplicateText:"Duplicar",duplicateTitle:"Duplicar campos selecionados (Ctrl+D)",duplicateField:"Duplicar este campo (Ctrl+D)",duplicateFieldError:"Nome do campo duplicado",empty:"vazio",expandAll:"Expandir todos campos",expandTitle:"Clique para expandir/encolher este campo (Ctrl+E). \nCtrl+Click para expandir/encolher incluindo todos os filhos.",formatTitle:"Formate dados JSON, com recuo e feeds de linha adequados (Ctrl+I)",insert:"Inserir",insertTitle:"Inserir um novo campo do tipo 'auto' antes deste campo (Ctrl+Ins)",insertSub:"Selecionar o tipo de campo a ser inserido",object:"Objeto",ok:"Ok",redo:"Refazer (Ctrl+Shift+Z)",removeText:"Remover",removeTitle:"Remover campos selecionados (Ctrl+Del)",removeField:"Remover este campo (Ctrl+Del)",repairTitle:"Repare JSON: corrija aspas e caracteres de escape, remova coment\xe1rios e nota\xe7\xe3o JSONP, transforme objetos JavaScript em JSON.",selectNode:"Selecione um n\xf3dulo...",showAll:"mostrar todos",showMore:"mostrar mais",showMoreStatus:"exibindo ${visibleChilds} de ${totalChilds} itens.",sort:"Organizar",sortTitle:"Organizar os filhos deste ${type}",sortTitleShort:"Organizar os filhos",sortFieldLabel:"Campo:",sortDirectionLabel:"Dire\xe7\xe3o:",sortFieldTitle:"Selecione um campo filho pelo qual ordenar o array ou objeto",sortAscending:"Ascendente",sortAscendingTitle:"Ordenar o campo selecionado por ordem ascendente",sortDescending:"Descendente",sortDescendingTitle:"Ordenar o campo selecionado por ordem descendente",string:"Texto",transform:"Transformar",transformTitle:"Filtrar, ordenar ou transformar os filhos deste ${type}",transformTitleShort:"Filtrar, ordenar ou transformar conte\xfados",transformQueryTitle:"Insira uma express\xe3o JMESPath",transformWizardLabel:"Assistente",transformWizardFilter:"Filtro",transformWizardSortBy:"Ordenar por",transformWizardSelectFields:"Selecionar campos",transformQueryLabel:"Express\xe3o",transformPreviewLabel:"Visualizar",type:"Tipo",typeTitle:"Mudar o tipo deste campo",openUrl:"Ctrl+Click ou Ctrl+Enter para abrir link em nova janela",undo:"Desfazer \xfaltimo a\xe7\xe3o (Ctrl+Z)",validationCannotMove:"N\xe3o pode mover um campo como filho dele mesmo",autoType:'Campo do tipo "auto". O tipo do campo \xe9 determinao automaticamente a partir do seu valor e pode ser texto, n\xfamero, verdade/falso ou nulo.',objectType:'Campo do tipo "objeto". Um objeto cont\xe9m uma lista de pares com chave e valor.',arrayType:'Campo do tipo "lista". Uma lista contem uma cole\xe7\xe3o de valores ordenados.',stringType:'Campo do tipo "string". Campo do tipo nao \xe9 determinado atrav\xe9s do seu valor, mas sempre retornara um texto.',examples:"Exemplos",default:"Revelia",containsInvalidProperties:"Cont\xe9m propriedades inv\xe1lidas",containsInvalidItems:"Cont\xe9m itens inv\xe1lidos"},tr:{array:"Dizin",auto:"Otomatik",appendText:"Ekle",appendTitle:"Bu alan\u0131n alt\u0131na 'otomatik' tipinde yeni bir alan ekle (Ctrl+Shift+Ins)",appendSubmenuTitle:"Eklenecek alan\u0131n tipini se\xe7",appendTitleAuto:"'Otomatik' tipinde yeni bir alan ekle (Ctrl+Shift+Ins)",ascending:"Artan",ascendingTitle:"${type}'\u0131n alt tiplerini artan d\xfczende s\u0131rala",actionsMenu:"Aksiyon men\xfcs\xfcn\xfc a\xe7mak i\xe7in t\u0131klay\u0131n (Ctrl+M)",collapseAll:"T\xfcm alanlar\u0131 kapat",descending:"Azalan",descendingTitle:"${type}'\u0131n alt tiplerini azalan d\xfczende s\u0131rala",drag:"Bu alan\u0131 ta\u015f\u0131mak i\xe7in s\xfcr\xfckleyin (Alt+Shift+Arrows)",duplicateKey:"Var olan anahtar",duplicateText:"A\u015fa\u011f\u0131ya kopyala",duplicateTitle:"Se\xe7ili alanlardan bir daha olu\u015ftur (Ctrl+D)",duplicateField:"Bu alandan bir daha olu\u015ftur (Ctrl+D)",duplicateFieldError:"Duplicate field name",cannotParseFieldError:"Alan JSON'a ayr\u0131\u015ft\u0131r\u0131lam\u0131yor",cannotParseValueError:"JSON'a de\u011fer ayr\u0131\u015ft\u0131r\u0131lam\u0131yor",empty:"bo\u015f",expandAll:"T\xfcm alanlar\u0131 a\xe7",expandTitle:"Bu alan\u0131 a\xe7mak/kapatmak i\xe7in t\u0131kla (Ctrl+E). \nAlt alanlarda dahil t\xfcm alanlar\u0131 a\xe7mak i\xe7in Ctrl+Click ",insert:"Ekle",insertTitle:"Bu alan\u0131n \xfcst\xfcne 'otomatik' tipinde yeni bir alan ekle (Ctrl+Ins)",insertSub:"Araya eklenecek alan\u0131n tipini se\xe7",object:"Nesne",ok:"Tamam",redo:"Yeniden yap (Ctrl+Shift+Z)",removeText:"Kald\u0131r",removeTitle:"Se\xe7ilen alanlar\u0131 kald\u0131r (Ctrl+Del)",removeField:"Bu alan\u0131 kald\u0131r (Ctrl+Del)",selectNode:"Bir nesne se\xe7...",showAll:"t\xfcm\xfcn\xfc g\xf6ster",showMore:"daha fazla g\xf6ster",showMoreStatus:"${totalChilds} alan\u0131n ${visibleChilds} alt alanlar\u0131 g\xf6steriliyor",sort:"S\u0131rala",sortTitle:"${type}'\u0131n alt alanlar\u0131n\u0131 s\u0131rala",sortTitleShort:"\u0130\xe7erikleri s\u0131rala",sortFieldLabel:"Alan:",sortDirectionLabel:"Y\xf6n:",sortFieldTitle:"Diziyi veya nesneyi s\u0131ralamak i\xe7in i\xe7 i\xe7e ge\xe7mi\u015f alan\u0131 se\xe7in",sortAscending:"Artan",sortAscendingTitle:"Se\xe7ili alan\u0131 artan d\xfczende s\u0131rala",sortDescending:"Azalan",sortDescendingTitle:"Se\xe7ili alan\u0131 azalan d\xfczende s\u0131rala",string:"Karakter Dizisi",transform:"D\xf6n\xfc\u015ft\xfcr",transformTitle:"${type}'\u0131n alt alanlar\u0131n\u0131 filtrele, s\u0131rala veya d\xf6n\xfc\u015ft\xfcr",transformTitleShort:"\u0130\xe7erikleri filterele, s\u0131rala veya d\xf6n\xfc\u015ft\xfcr",transformQueryTitle:"JMESPath sorgusu gir",transformWizardLabel:"Sihirbaz",transformWizardFilter:"Filtre",transformWizardSortBy:"S\u0131rala",transformWizardSelectFields:"Alanlar\u0131 se\xe7",transformQueryLabel:"Sorgu",transformPreviewLabel:"\xd6nizleme",type:"Tip",typeTitle:"Bu alan\u0131n tipini de\u011fi\u015ftir",openUrl:"URL'i yeni bir pencerede a\xe7mak i\xe7in Ctrl+Click veya Ctrl+Enter",undo:"Son de\u011fi\u015fikli\u011fi geri al (Ctrl+Z)",validationCannotMove:"Alt alan olarak ta\u015f\u0131nam\u0131yor",autoType:'Alan tipi "otomatik". Alan t\xfcr\xfc otomatik olarak de\u011ferden belirlenirve bir dize, say\u0131, boolean veya null olabilir.',objectType:'Alan tipi "nesne". Bir nesne, s\u0131ralanmam\u0131\u015f bir anahtar / de\u011fer \xe7ifti k\xfcmesi i\xe7erir.',arrayType:'Alan tipi "dizi". Bir dizi, d\xfczenli de\u011ferler koleksiyonu i\xe7erir.',stringType:'Alan tipi "karakter dizisi". Alan t\xfcr\xfc de\u011ferden belirlenmez,ancak her zaman karakter dizisi olarak d\xf6nd\xfcr\xfcl\xfcr.',modeCodeText:"Kod",modeCodeTitle:"Kod vurgulay\u0131c\u0131ya ge\xe7",modeFormText:"Form",modeFormTitle:"Form d\xfczenleyiciye ge\xe7",modeTextText:"Metin",modeTextTitle:"D\xfcz metin d\xfczenleyiciye ge\xe7",modeTreeText:"A\u011fa\xe7",modeTreeTitle:"A\u011fa\xe7 d\xfczenleyiciye ge\xe7",modeViewText:"G\xf6r\xfcn\xfcm",modeViewTitle:"A\u011fa\xe7 g\xf6r\xfcn\xfcm\xfcne ge\xe7",examples:"\xd6rnekler",default:"Varsay\u0131lan",containsInvalidProperties:"Ge\xe7ersiz \xf6zellikler i\xe7eriyor",containsInvalidItems:"Ge\xe7ersiz \xf6\u011feler i\xe7eriyor"},ja:{array:"\u914d\u5217",auto:"\u30aa\u30fc\u30c8",appendText:"\u8ffd\u52a0",appendTitle:'\u6b21\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u306b"\u30aa\u30fc\u30c8"\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u8ffd\u52a0 (Ctrl+Shift+Ins)',appendSubmenuTitle:"\u8ffd\u52a0\u3059\u308b\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u578b\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044",appendTitleAuto:'"\u30aa\u30fc\u30c8"\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u8ffd\u52a0 (Ctrl+Shift+Ins)',ascending:"\u6607\u9806",ascendingTitle:"${type}\u306e\u5b50\u8981\u7d20\u3092\u6607\u9806\u306b\u4e26\u3079\u66ff\u3048",actionsMenu:"\u30af\u30ea\u30c3\u30af\u3057\u3066\u30a2\u30af\u30b7\u30e7\u30f3\u30e1\u30cb\u30e5\u30fc\u3092\u958b\u304f (Ctrl+M)",collapseAll:"\u3059\u3079\u3066\u3092\u6298\u308a\u305f\u305f\u3080",descending:"\u964d\u9806",descendingTitle:"${type}\u306e\u5b50\u8981\u7d20\u3092\u964d\u9806\u306b\u4e26\u3079\u66ff\u3048",drag:"\u30c9\u30e9\u30c3\u30b0\u3057\u3066\u9078\u629e\u4e2d\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u79fb\u52d5 (Alt+Shift+Arrows)",duplicateKey:"\u8907\u88fd\u30ad\u30fc",duplicateText:"\u8907\u88fd",duplicateTitle:"\u9078\u629e\u4e2d\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u8907\u88fd (Ctrl+D)",duplicateField:"\u9078\u629e\u4e2d\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u8907\u88fd (Ctrl+D)",duplicateFieldError:"\u30d5\u30a3\u30fc\u30eb\u30c9\u540d\u304c\u91cd\u8907\u3057\u3066\u3044\u307e\u3059",cannotParseFieldError:"JSON\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u89e3\u6790\u3067\u304d\u307e\u305b\u3093",cannotParseValueError:"JSON\u306e\u5024\u3092\u89e3\u6790\u3067\u304d\u307e\u305b\u3093",empty:"\u7a7a",expandAll:"\u3059\u3079\u3066\u3092\u5c55\u958b",expandTitle:"\u30af\u30ea\u30c3\u30af\u3057\u3066\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u5c55\u958b/\u6298\u308a\u305f\u305f\u3080 (Ctrl+E). \nCtrl+Click \u3067\u3059\u3079\u3066\u306e\u5b50\u8981\u7d20\u3092\u5c55\u958b/\u6298\u308a\u305f\u305f\u3080",insert:"\u633f\u5165",insertTitle:"\u9078\u629e\u4e2d\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u524d\u306b\u65b0\u3057\u3044\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u633f\u5165 (Ctrl+Ins)",insertSub:"\u633f\u5165\u3059\u308b\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u578b\u3092\u9078\u629e",object:"\u30aa\u30d6\u30b8\u30a7\u30af\u30c8",ok:"\u5b9f\u884c",redo:"\u3084\u308a\u76f4\u3059 (Ctrl+Shift+Z)",removeText:"\u524a\u9664",removeTitle:"\u9078\u629e\u4e2d\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u524a\u9664 (Ctrl+Del)",removeField:"\u9078\u629e\u4e2d\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u524a\u9664 (Ctrl+Del)",selectNode:"\u30ce\u30fc\u30c9\u3092\u9078\u629e...",showAll:"\u3059\u3079\u3066\u3092\u8868\u793a",showMore:"\u3082\u3063\u3068\u898b\u308b",showMoreStatus:"${totalChilds}\u500b\u306e\u30a2\u30a4\u30c6\u30e0\u306e\u3046\u3061 ${visibleChilds}\u500b\u3092\u8868\u793a\u3057\u3066\u3044\u307e\u3059\u3002",sort:"\u4e26\u3079\u66ff\u3048",sortTitle:"${type}\u306e\u5b50\u8981\u7d20\u3092\u4e26\u3079\u66ff\u3048",sortTitleShort:"\u4e26\u3079\u66ff\u3048",sortFieldLabel:"\u30d5\u30a3\u30fc\u30eb\u30c9:",sortDirectionLabel:"\u9806\u5e8f:",sortFieldTitle:"\u914d\u5217\u307e\u305f\u306f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4e26\u3073\u66ff\u3048\u308b\u305f\u3081\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u9078\u629e",sortAscending:"\u6607\u9806",sortAscendingTitle:"\u9078\u629e\u4e2d\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u6607\u9806\u306b\u4e26\u3073\u66ff\u3048",sortDescending:"\u964d\u9806",sortDescendingTitle:"\u9078\u629e\u4e2d\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u964d\u9806\u306b\u4e26\u3073\u66ff\u3048",string:"\u6587\u5b57\u5217",transform:"\u5909\u63db",transformTitle:"${type}\u306e\u5b50\u8981\u7d20\u3092\u30d5\u30a3\u30eb\u30bf\u30fc\u30fb\u4e26\u3073\u66ff\u3048\u30fb\u5909\u63db\u3059\u308b",transformTitleShort:"\u5185\u5bb9\u3092\u30d5\u30a3\u30eb\u30bf\u30fc\u30fb\u4e26\u3073\u66ff\u3048\u30fb\u5909\u63db\u3059\u308b",extract:"\u62bd\u51fa",extractTitle:"${type}\u3092\u62bd\u51fa",transformQueryTitle:"JMESPath\u30af\u30a8\u30ea\u3092\u5165\u529b",transformWizardLabel:"\u30a6\u30a3\u30b6\u30fc\u30c9",transformWizardFilter:"\u30d5\u30a3\u30eb\u30bf\u30fc",transformWizardSortBy:"\u4e26\u3073\u66ff\u3048",transformWizardSelectFields:"\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u9078\u629e",transformQueryLabel:"\u30af\u30a8\u30ea",transformPreviewLabel:"\u30d7\u30ec\u30d3\u30e5\u30fc",type:"\u578b",typeTitle:"\u9078\u629e\u4e2d\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u578b\u3092\u5909\u66f4",openUrl:"Ctrl+Click \u307e\u305f\u306f Ctrl+Enter \u3067 \u65b0\u898f\u30a6\u30a3\u30f3\u30c9\u30a6\u3067URL\u3092\u958b\u304f",undo:"\u5143\u306b\u623b\u3059 (Ctrl+Z)",validationCannotMove:"\u5b50\u8981\u7d20\u306b\u79fb\u52d5\u3067\u304d\u307e\u305b\u3093 ",autoType:"\u30aa\u30fc\u30c8\uff1a \u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u578b\u306f\u5024\u304b\u3089\u81ea\u52d5\u7684\u306b\u6c7a\u5b9a\u3055\u308c\u307e\u3059\u3002 (\u6587\u5b57\u5217\u30fb\u6570\u5024\u30fb\u30d6\u30fc\u30eb\u30fbnull)",objectType:"\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\uff1a \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306f\u9806\u5e8f\u304c\u6c7a\u307e\u3063\u3066\u3044\u306a\u3044\u30ad\u30fc\u3068\u5024\u306e\u30da\u30a2\u7d44\u307f\u5408\u308f\u305b\u3067\u3059\u3002",arrayType:"\u914d\u5217\uff1a \u914d\u5217\u306f\u9806\u5e8f\u304c\u6c7a\u307e\u3063\u3066\u3044\u308b\u5024\u306e\u96c6\u5408\u4f53\u3067\u3059\u3002",stringType:"\u6587\u5b57\u5217\uff1a \u30d5\u30a3\u30fc\u30eb\u30c9\u578b\u306f\u5024\u304b\u3089\u6c7a\u5b9a\u3055\u308c\u307e\u305b\u3093\u304c\u3001\u5e38\u306b\u6587\u5b57\u5217\u3068\u3057\u3066\u8fd4\u3055\u308c\u307e\u3059\u3002",modeCodeText:"\u30b3\u30fc\u30c9\u30e2\u30fc\u30c9",modeCodeTitle:"\u30cf\u30a4\u30e9\u30a4\u30c8\u30e2\u30fc\u30c9\u306b\u5207\u308a\u66ff\u3048",modeFormText:"\u30d5\u30a9\u30fc\u30e0\u30e2\u30fc\u30c9",modeFormTitle:"\u30d5\u30a9\u30fc\u30e0\u30e2\u30fc\u30c9\u306b\u5207\u308a\u66ff\u3048",modeTextText:"\u30c6\u30ad\u30b9\u30c8\u30e2\u30fc\u30c9",modeTextTitle:"\u30c6\u30ad\u30b9\u30c8\u30e2\u30fc\u30c9\u306b\u5207\u308a\u66ff\u3048",modeTreeText:"\u30c4\u30ea\u30fc\u30e2\u30fc\u30c9",modeTreeTitle:"\u30c4\u30ea\u30fc\u30e2\u30fc\u30c9\u306b\u5207\u308a\u66ff\u3048",modeViewText:"\u30d3\u30e5\u30fc\u30e2\u30fc\u30c9",modeViewTitle:"\u30d3\u30e5\u30fc\u30e2\u30fc\u30c9\u306b\u5207\u308a\u66ff\u3048",modePreviewText:"\u30d7\u30ec\u30d3\u30e5\u30fc",modePreviewTitle:"\u30d7\u30ec\u30d3\u30e5\u30fc\u306b\u5207\u308a\u66ff\u3048",examples:"\u4f8b",default:"\u30c7\u30d5\u30a9\u30eb\u30c8",containsInvalidProperties:"\u7121\u52b9\u306a\u30d7\u30ed\u30d1\u30c6\u30a3\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059",containsInvalidItems:"\u7121\u52b9\u306a\u30a2\u30a4\u30c6\u30e0\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059"},"fr-FR":{array:"Liste",auto:"Auto",appendText:"Ajouter",appendTitle:"Ajouter un champ de type 'auto' apr\xe8s ce champ (Ctrl+Shift+Ins)",appendSubmenuTitle:"S\xe9lectionner le type du champ \xe0 ajouter",appendTitleAuto:"Ajouter un champ de type 'auto' (Ctrl+Shift+Ins)",ascending:"Ascendant",ascendingTitle:"Trier les enfants de ce ${type} par ordre ascendant",actionsMenu:"Ouvrir le menu des actions (Ctrl+M)",collapseAll:"Regrouper",descending:"Descendant",descendingTitle:"Trier les enfants de ce ${type} par ordre descendant",drag:"D\xe9placer (Alt+Shift+Arrows)",duplicateKey:"Dupliquer la cl\xe9",duplicateText:"Dupliquer",duplicateTitle:"Dupliquer les champs s\xe9lectionn\xe9s (Ctrl+D)",duplicateField:"Dupliquer ce champ (Ctrl+D)",duplicateFieldError:"Dupliquer le nom de champ",cannotParseFieldError:"Champ impossible \xe0 parser en JSON",cannotParseValueError:"Valeur impossible \xe0 parser en JSON",empty:"vide",expandAll:"\xc9tendre",expandTitle:"\xc9tendre/regrouper ce champ (Ctrl+E). \nCtrl+Click pour \xe9tendre/regrouper avec tous les champs.",insert:"Ins\xe9rer",insertTitle:"Ins\xe9rer un champ de type 'auto' avant ce champ (Ctrl+Ins)",insertSub:"S\xe9lectionner le type de champ \xe0 ins\xe9rer",object:"Objet",ok:"Ok",redo:"Rejouer (Ctrl+Shift+Z)",removeText:"Supprimer",removeTitle:"Supprimer les champs s\xe9lectionn\xe9s (Ctrl+Del)",removeField:"Supprimer ce champ (Ctrl+Del)",searchTitle:"Rechercher champs et valeurs",searchNextResultTitle:"R\xe9sultat suivant (Enter)",searchPreviousResultTitle:"R\xe9sultat pr\xe9c\xe9dent (Shift + Enter)",selectNode:"S\xe9lectionner un n\u0153ud...",showAll:"voir tout",showMore:"voir plus",showMoreStatus:"${visibleChilds} \xe9l\xe9ments affich\xe9s de ${totalChilds}.",sort:"Trier",sortTitle:"Trier les champs de ce ${type}",sortTitleShort:"Trier",sortFieldLabel:"Champ:",sortDirectionLabel:"Direction:",sortFieldTitle:"S\xe9lectionner les champs permettant de trier les listes et objet",sortAscending:"Ascendant",sortAscendingTitle:"Trier les champs s\xe9lectionn\xe9s par ordre ascendant",sortDescending:"Descendant",sortDescendingTitle:"Trier les champs s\xe9lectionn\xe9s par ordre descendant",string:"Cha\xeene",transform:"Transformer",transformTitle:"Filtrer, trier, or transformer les enfants de ce ${type}",transformTitleShort:"Filtrer, trier ou transformer le contenu",extract:"Extraire",extractTitle:"Extraire ce ${type}",transformQueryTitle:"Saisir une requ\xeate JMESPath",transformWizardLabel:"Assistant",transformWizardFilter:"Filtrer",transformWizardSortBy:"Trier par",transformWizardSelectFields:"S\xe9lectionner les champs",transformQueryLabel:"Requ\xeate",transformPreviewLabel:"Pr\xe9visualisation",type:"Type",typeTitle:"Changer le type de ce champ",openUrl:"Ctrl+Click ou Ctrl+Enter pour ouvrir l'url dans une autre fen\xeatre",undo:"Annuler la derni\xe8re action (Ctrl+Z)",validationCannotMove:"Cannot move a field into a child of itself",autoType:'Champe de type "auto". Ce type de champ est automatiquement d\xe9termin\xe9 en fonction de la valeur et peut \xeatre de type "cha\xeene", "nombre", "bool\xe9en" ou null.',objectType:'Champ de type "objet". Un objet contient un ensemble non ordonn\xe9 de paires cl\xe9/valeur.',arrayType:'Champ de type "liste". Une liste contient une collection ordonn\xe9e de valeurs.',stringType:'Champ de type "cha\xeene". Ce type de champ n\'est pas d\xe9termin\xe9 en fonction de la valeur, mais retourne syst\xe9matiquement une cha\xeene de caract\xe8res.',modeEditorTitle:"Changer mode d'\xe9dition",modeCodeText:"Code",modeCodeTitle:"Activer surlignage code",modeFormText:"Formulaire",modeFormTitle:"Activer formulaire",modeTextText:"Texte",modeTextTitle:"Activer \xe9diteur texte",modeTreeText:"Arbre",modeTreeTitle:"Activer \xe9diteur arbre",modeViewText:"Lecture seule",modeViewTitle:"Activer vue arbre",modePreviewText:"Pr\xe9visualisation",modePreviewTitle:"Activer mode pr\xe9visualiser",examples:"Exemples",default:"D\xe9faut",containsInvalidProperties:"Contient des propri\xe9t\xe9s non valides",containsInvalidItems:"Contient des \xe9l\xe9ments invalides"},de:{array:"Auflistung",auto:"Auto",appendText:"anh\xe4ngen",appendTitle:"F\xfcgen Sie nach diesem Feld ein neues Feld mit dem Typ 'auto' ein (Strg+Umschalt+Ein)",appendSubmenuTitle:"W\xe4hlen Sie den Typ des neuen Feldes",appendTitleAuto:"Ein neues Feld vom Typ 'auto' hinzuf\xfcgen (Strg+Umschalt+Ein)",ascending:"Aufsteigend",ascendingTitle:"Sortieren Sie die Elemente dieses ${type} in aufsteigender Reihenfolge",actionsMenu:"Klicken Sie zum \xd6ffnen des Aktionsmen\xfcs (Strg+M)",cannotParseFieldError:"Feld kann nicht in JSON geparst werden",cannotParseValueError:"Wert kann nicht in JSON geparst werden",collapseAll:"Alle Felder zuklappen",compactTitle:"JSON-Daten verdichten, alle Leerzeichen entfernen (Strg+Umschalt+\\)",descending:"Absteigend",descendingTitle:"Sortieren Sie die Elemente dieses ${type} in absteigender Reihenfolge",drag:"Ziehen, um dieses Feld zu verschieben (Alt+Umschalt+Pfeile)",duplicateKey:"Doppelter Schl\xfcssel",duplicateText:"Duplikat",duplicateTitle:"Ausgew\xe4hlte Felder duplizieren (Strg+D)",duplicateField:"Dieses Feld duplizieren (Strg+D)",duplicateFieldError:"Doppelter Feldname",empty:"leer",expandAll:"Alle Felder anzeigen",expandTitle:"Klicken Sie, um dieses Feld zu erweitern/zu kollabieren (Strg+E). \nStrg+Klicken Sie, um dieses Feld einschlie\xdflich aller Elemente zu erweitern/zu kollabieren.",formatTitle:"JSON-Daten mit korrekter Einr\xfcckung und Zeilenvorsch\xfcben formatieren (Strg+\\)",insert:"einf\xfcgen",insertTitle:"F\xfcgen Sie vor diesem Feld ein neues Feld mit dem Typ 'auto' ein (Strg+Einfg)",insertSub:"W\xe4hlen Sie den Typ des neuen Feldes",object:"Objekt",ok:"Ok",redo:"Wiederholen (Strg+Umschalt+Z)",removeText:"entfernen",removeTitle:"Ausgew\xe4hlte Felder entfernen (Strg+Entf)",removeField:"Dieses Feld entfernen (Strg+Entf)",repairTitle:"JSON reparieren: Anf\xfchrungszeichen und Escape-Zeichen korrigieren, Kommentare und JSONP-Notation entfernen, JavaScript-Objekte in JSON umwandeln.",searchTitle:"Suchfelder und Werte",searchNextResultTitle:"N\xe4chstes Ergebnis (Enter)",searchPreviousResultTitle:"Vorheriges Ergebnis (Umschalt + Eingabe)",selectNode:"W\xe4hlen Sie einen Knoten aus...",showAll:"alle anzeigen",showMore:"mehr anzeigen",showMoreStatus:"Anzeige von ${visibleChilds} von ${totalChilds}-Elementen.",sort:"Sortieren",sortTitle:"Sortieren Sie die Elemente dieses ${type}",sortTitleShort:"Inhalt sortieren",sortFieldLabel:"Feld:",sortDirectionLabel:"Richtung:",sortFieldTitle:"W\xe4hlen Sie das verschachtelte Feld, nach dem das Array oder Objekt sortiert werden soll.",sortAscending:"Aufsteigend",sortAscendingTitle:"Sortieren Sie das ausgew\xe4hlte Feld in aufsteigender Reihenfolge",sortDescending:"Absteigend",sortDescendingTitle:"Sortieren Sie das ausgew\xe4hlte Feld in absteigender Reihenfolge",string:"Zeichenfolge",transform:"Verwandeln",transformTitle:"Die Elemente dieses ${type} filtern, sortieren oder transformieren",transformTitleShort:"Inhalte filtern, sortieren oder transformieren",extract:"Auszug",extractTitle:"Extrahieren Sie diesen ${type}",transformQueryTitle:"Eine JMESPath-Abfrage eingeben",transformWizardLabel:"Zauberer",transformWizardFilter:"Filter",transformWizardSortBy:"Sortieren nach",transformWizardSelectFields:"Felder ausw\xe4hlen",transformQueryLabel:"Anfrage",transformPreviewLabel:"Vorschau",type:"Geben Sie ein.",typeTitle:"\xc4ndern Sie den Typ dieses Feldes",openUrl:"Strg+Klicken oder Strg+Eingabe, um die URL in einem neuen Fenster zu \xf6ffnen",undo:"Letzte Aktion r\xfcckg\xe4ngig machen (Strg+Z)",validationCannotMove:"Kann ein Feld nicht in ein Kind seiner selbst verschieben",autoType:'Feldtyp "auto". Der Feldtyp wird automatisch aus dem Wert bestimmt und kann ein String, eine Zahl, boolesch oder null sein.',objectType:'Feldtyp "Objekt". Ein Objekt enth\xe4lt eine ungeordnete Menge von Schl\xfcssel/Wert-Paaren.',arrayType:'Feldtyp "Array". Ein Array enth\xe4lt eine geordnete Sammlung von Werten.',stringType:'Feldtyp "Zeichenfolge". Der Feldtyp wird nicht aus dem Wert bestimmt, sondern immer als Zeichenfolge zur\xfcckgegeben.',modeEditorTitle:"Editor-Modus umschalten",modeCodeText:"Code",modeCodeTitle:"Umschalten auf Code-Highlighter",modeFormText:"Formular",modeFormTitle:"Zum Formular-Editor wechseln",modeTextText:"Text",modeTextTitle:"Zum Editor f\xfcr einfachen Text wechseln",modeTreeText:"Baum",modeTreeTitle:"Zum Baum-Editor wechseln",modeViewText:"Siehe",modeViewTitle:"Zur Baumansicht wechseln",modePreviewText:"Vorschau",modePreviewTitle:"In den Vorschau-Modus wechseln",examples:"Beispiele",default:"Standardm\xe4\xdfig",containsInvalidProperties:"Enth\xe4lt ung\xfcltige Eigenschaften",containsInvalidItems:"Enth\xe4lt ung\xfcltige Elemente"},ru:{array:"\u041c\u0430\u0441\u0441\u0438\u0432",auto:"\u0410\u0432\u0442\u043e",appendText:"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c",appendTitle:"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u043e\u0435 \u043f\u043e\u043b\u0435 \u0441 \u0442\u0438\u043f\u043e\u043c '\u0430\u0432\u0442\u043e' \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043b\u044f (Ctrl+Shift+Ins)",appendSubmenuTitle:"\u0412\u044b\u0431\u0440\u0430\u0442\u044c \u0442\u0438\u043f \u043f\u043e\u043b\u044f \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f",appendTitleAuto:"\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u043e\u0435 \u043f\u043e\u043b\u0435 \u0441 \u0442\u0438\u043f\u043e\u043c '\u0430\u0432\u0442\u043e' (Ctrl+Shift+Ins)",ascending:"\u041f\u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u043d\u0438\u044e",ascendingTitle:"\u0421\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c ${type} \u043f\u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u043d\u0438\u044e",actionsMenu:"\u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u0434\u043b\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u044f \u043c\u0435\u043d\u044e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 (Ctrl+M)",cannotParseFieldError:"\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u0435 \u0432 JSON",cannotParseValueError:"\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 JSON",collapseAll:"\u0421\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432\u0441\u0435",compactTitle:"\u041c\u0438\u043d\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f JSON (Ctrl+Shift+I)",descending:"\u041f\u043e \u0443\u0431\u044b\u0432\u0430\u043d\u0438\u044e",descendingTitle:"\u0421\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c ${type} \u043f\u043e \u0443\u0431\u044b\u0432\u0430\u043d\u0438\u044e",drag:"\u041f\u043e\u0442\u044f\u043d\u0438\u0442\u0435 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043b\u044f (Alt+Shift+Arrows)",duplicateKey:"\u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u0439\u0441\u044f \u043a\u043b\u044e\u0447",duplicateText:"\u0414\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c",duplicateTitle:"\u0414\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u0435\u0439 (Ctrl+D)",duplicateField:"\u0414\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u0435 (Ctrl+D)",duplicateFieldError:"\u0414\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u044f",empty:"\u043f\u0443\u0441\u0442\u043e\u0439",expandAll:"\u0420\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432\u0441\u0435",expandTitle:"\u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u0434\u043b\u044f \u0440\u0430\u0441\u043a\u0440\u044b\u0442\u0438\u044f/\u0441\u043a\u0440\u044b\u0442\u0438\u044f \u043f\u043e\u043b\u044f (Ctrl+E)\n\u0438\u043b\u0438 Ctrl+Click \u0434\u043b\u044f \u0440\u0430\u0441\u043a\u0440\u044b\u0442\u0438\u044f/\u0441\u043a\u0440\u044b\u0442\u0438\u044f \u0432\u0441\u0435\u0445 \u043f\u043e\u0442\u043e\u043c\u043a\u043e\u0432.",formatTitle:"\u0424\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 JSON (Ctrl+I)",insert:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c",insertTitle:"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u043e\u0435 \u043f\u043e\u043b\u0435 \u0441 \u0442\u0438\u043f\u043e\u043c '\u0430\u0432\u0442\u043e' \u043f\u0435\u0440\u0435\u0434 \u044d\u0442\u0438\u043c \u043f\u043e\u043b\u0435\u043c (Ctrl+Ins)",insertSub:"\u0412\u044b\u0431\u0440\u0430\u0442\u044c \u0442\u0438\u043f \u043f\u043e\u043b\u044f \u0434\u043b\u044f \u0432\u0441\u0442\u0430\u0432\u043a\u0438",object:"\u041e\u0431\u044a\u0435\u043a\u0442",ok:"\u041e\u041a",redo:"\u041f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c (Ctrl+Shift+Z)",removeText:"\u0423\u0434\u0430\u043b\u0438\u0442\u044c",removeTitle:"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044f (Ctrl+Del)",removeField:"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u043f\u043e\u043b\u0435 (Ctrl+Del)",repairTitle:"\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 JSON: \u0438\u0441\u043f\u0440\u0430\u0432\u044c\u0442\u0435 \u043a\u0430\u0432\u044b\u0447\u043a\u0438 \u0438 escape-\u0441\u0438\u043c\u0432\u043e\u043b\u044b, \u0443\u0434\u0430\u043b\u0438\u0442\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0438 \u043d\u043e\u0442\u0430\u0446\u0438\u044e JSONP, \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0439\u0442\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b JavaScript \u0432 JSON.",searchTitle:"\u041f\u043e\u0438\u0441\u043a",searchNextResultTitle:"\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 (Enter)",searchPreviousResultTitle:"\u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 (Shift + Enter)",selectNode:"\u0412\u044b\u0431\u043e\u0440 \u0443\u0437\u043b\u0430...",showAll:"\u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0441\u0435",showMore:"\u0431\u043e\u043b\u044c\u0448\u0435",showMoreStatus:"${visibleChilds} \u0438\u0437 ${totalChilds}",sort:"\u0421\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430",sortTitle:"\u0421\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430 \u043f\u043e\u0442\u043e\u043c\u043a\u043e\u0432 \u0442\u0438\u043f\u0430 ${type}",sortTitleShort:"\u0421\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e",sortFieldLabel:"\u041f\u043e\u043b\u0435:",sortDirectionLabel:"\u041d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435:",sortFieldTitle:"\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043f\u043e\u043b\u0435 \u0434\u043b\u044f \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0438\u043b\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430",sortAscending:"\u041f\u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u043d\u0438\u044e",sortAscendingTitle:"\u0421\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0440\u044f \u043f\u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u043d\u0438\u044e",sortDescending:"\u041f\u043e \u0443\u0431\u044b\u0432\u0430\u043d\u0438\u044e",sortDescendingTitle:"\u0421\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0440\u044f \u043f\u043e \u0443\u0431\u044b\u0432\u0430\u043d\u0438\u044e",string:"\u0421\u0442\u0440\u043e\u043a\u0430",transform:"\u041c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f",transformTitle:"\u0424\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044f, \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430 \u0438\u043b\u0438 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0442\u0438\u043f\u0430 ${type}",transformTitleShort:"\u0424\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044f, \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430 \u0438\u043b\u0438 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445",extract:"\u0418\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435",extractTitle:"\u0418\u0437\u0432\u043b\u0435\u0447\u044c \u0442\u0438\u043f ${type}",transformQueryTitle:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 JMESpath \u0437\u0430\u043f\u0440\u043e\u0441",transformWizardLabel:"\u041c\u0430\u0441\u0442\u0435\u0440",transformWizardFilter:"\u0424\u0438\u043b\u044c\u0442\u0440",transformWizardSortBy:"\u0421\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430",transformWizardSelectFields:"\u041f\u043e\u043b\u044f",transformQueryLabel:"\u0417\u0430\u043f\u0440\u043e\u0441",transformPreviewLabel:"\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440",type:"\u0422\u0438\u043f",typeTitle:"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0442\u0438\u043f \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043b\u044f",openUrl:"Ctrl+Click \u0438\u043b\u0438 Ctrl+Enter \u0434\u043b\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u044f url \u0432 \u043d\u043e\u0432\u043e\u043c \u043e\u043a\u043d\u0435",undo:"\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c (Ctrl+Z)",validationCannotMove:"\u041f\u043e\u043b\u0435 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u043e \u0432 \u043f\u043e\u0442\u043e\u043c\u043a\u0430",autoType:"\u0422\u0438\u043f \u043f\u043e\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e \u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u043e\u0439, \u0447\u0438\u0441\u043b\u043e\u043c, \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u0438\u043b\u0438 null.",objectType:"\u041e\u0431\u044a\u0435\u043a\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0435\u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u043f\u0430\u0440 \u043a\u043b\u044e\u0447/\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.",arrayType:"\u041c\u0430\u0441\u0441\u0438\u0432 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439.",stringType:"\u0422\u0438\u043f \u043f\u043e\u043b\u044f \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0437 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043d\u043e \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0441\u0442\u0440\u043e\u043a\u0430.",modeEditorTitle:"\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0440\u0435\u0436\u0438\u043c\u0430 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430",modeCodeText:"\u041a\u043e\u0434",modeCodeTitle:"\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432 \u0440\u0435\u0436\u0438\u043c \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430 \u043a\u043e\u0434\u0430",modeFormText:"\u0424\u043e\u0440\u043c\u0430",modeFormTitle:"\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432 \u0440\u0435\u0436\u0438\u043c \u0444\u043e\u0440\u043c\u044b",modeTextText:"\u0422\u0435\u043a\u0441\u0442",modeTextTitle:"\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432 \u0440\u0435\u0436\u0438\u043c \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430 \u0442\u0435\u043a\u0441\u0442\u0430",modeTreeText:"\u0414\u0435\u0440\u0435\u0432\u043e",modeTreeTitle:"\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432 \u0440\u0435\u0436\u0438\u043c \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430 \u0434\u0435\u0440\u0435\u0432\u0430",modeViewText:"\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0434\u0435\u0440\u0435\u0432\u0430",modeViewTitle:"\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432 \u0440\u0435\u0436\u0438\u043c \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0434\u0435\u0440\u0435\u0432\u0430",modePreviewText:"\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440",modePreviewTitle:"\u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432 \u0440\u0435\u0436\u0438\u043c \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430",examples:"\u041f\u0440\u0438\u043c\u0435\u0440\u044b",default:"\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e",containsInvalidProperties:"\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430",containsInvalidItems:"\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b"},ko:{array:"\ubc30\uc5f4",auto:"\uc790\ub3d9",appendText:"\ucd94\uac00",appendTitle:'\uc120\ud0dd\ud55c \uc694\uc18c \uc544\ub798\uc5d0 "\uc790\ub3d9" \uc694\uc18c\ub97c \ucd94\uac00\ud569\ub2c8\ub2e4. (Ctrl + Shift + Ins)',appendSubmenuTitle:"\ucd94\uac00\ud560 \uc694\uc18c\uc758 \uc720\ud615\uc744 \uc120\ud0dd\ud574\uc8fc\uc138\uc694.",appendTitleAuto:'"\uc790\ub3d9" \uc694\uc18c\ub97c \ucd94\uac00\ud569\ub2c8\ub2e4. (Ctrl + Shift + Ins)',ascending:"\uc624\ub984\ucc28\uc21c",ascendingTitle:"\uc120\ud0dd\ud55c ${type}\uc758 \ud558\uc704 \uc694\uc18c\ub97c \uc624\ub984\ucc28\uc21c \uc815\ub82c\ud569\ub2c8\ub2e4.",actionsMenu:"\uba54\ub274 \uc5f4\uae30 (Ctrl + M)",cannotParseFieldError:"JSON\uc758 \uc694\uc18c\ub97c \ud574\uc11d\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.",cannotParseValueError:"JSON\uc758 \uac12\uc744 \ud574\uc11d\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.",collapseAll:"\ubaa8\ub450 \uc811\uae30",compactTitle:"\ubaa8\ub4e0 \uacf5\ubc31\uc744 \uc81c\uac70\ud558\uc5ec JSON \ub370\uc774\ud130\ub97c \uc791\uac8c \ub9cc\ub4ed\ub2c8\ub2e4. (Ctrl + Shift + I)",descending:"\ub0b4\ub9bc\ucc28\uc21c",descendingTitle:"\uc120\ud0dd\ud55c ${type}\uc758 \ud558\uc704 \uc694\uc18c\ub97c \ub0b4\ub9bc\ucc28\uc21c\uc73c\ub85c \uc815\ub82c",drag:"\ub4dc\ub798\uadf8\ud558\uc5ec \uc694\uc18c\ub97c \uc774\ub3d9\ud569\ub2c8\ub2e4. (Alt + Shift + Arrows)",duplicateKey:"\ubcf5\uc81c\ud0a4",duplicateText:"\ubcf5\uc81c",duplicateTitle:"\uc120\ud0dd\ud55c \uc694\uc18c\ub97c \ubcf5\uc81c\ud569\ub2c8\ub2e4. (Ctrl + D)",duplicateField:"\uc120\ud0dd\ud55c \uc694\uc18c\ub97c \ubcf5\uc81c\ud569\ub2c8\ub2e4. (Ctrl + D)",duplicateFieldError:"\uc694\uc18c \uc774\ub984\uc774 \uc911\ubcf5\ub418\uc5c8\uc2b5\ub2c8\ub2e4.",empty:"\ube44\uc5b4\uc788\uc74c",expandAll:"\ubaa8\ub450 \uc5f4\uae30",expandTitle:"\ud074\ub9ad\ud558\uc5ec \uc694\uc18c\ub97c \uc5f4\uac70\ub098 \ub2eb\uc2b5\ub2c8\ub2e4. (Ctrl + E) \nCtrl + Click\uc73c\ub85c \ubaa8\ub4e0 \ud558\uc704 \uc694\uc18c\ub97c \uc5f4\uac70\ub098 \ub2eb\uc2b5\ub2c8\ub2e4.",formatTitle:"\uc801\uc808\ud55c \ub4e4\uc5ec\uc4f0\uae30 \ubc0f \uc904\ubc14\uafc8\uc73c\ub85c JSON \ub370\uc774\ud130\ub97c \uc815\ud615\ud654\ud569\ub2c8\ub2e4. (Ctrl + I)",insert:"\uc0bd\uc785",insertTitle:"\uc120\ud0dd\ud55c \uc694\uc18c \uc704\uc5d0 \uc0c8\uc694\uc18c\ub97c \uc0bd\uc785\ud569\ub2c8\ub2e4. (Ctrl + Ins)",insertSub:"\uc0bd\uc785\ud560 \uc694\uc18c\uc758 \uc720\ud615\uc744 \uc120\ud0dd\ud574\uc8fc\uc138\uc694.",object:"\uac1d\uccb4",ok:"\ud655\uc778",redo:"\ub2e4\uc2dc \uc2e4\ud589 (Ctrl + Shift + Z)",removeText:"\uc0ad\uc81c",removeTitle:"\uc120\ud0dd\ud55c \uc694\uc18c\ub97c \uc0ad\uc81c\ud569\ub2c8\ub2e4. (Ctrl + Del)",removeField:"\uc120\ud0dd\ud55c \uc694\uc18c\ub97c \uc0ad\uc81c\ud569\ub2c8\ub2e4. (Ctrl + Del)",repairTitle:"JSON \uad50\uc815: JSON \ub0b4\uc758 \uc8fc\uc11d\uacfc JSONP \ud45c\uae30\ubc95\uc744 \uc9c0\uc6b0\uace0 \ub530\uc634\ud45c\uc640 \uc774\uc2a4\ucf00\uc774\ud504 \ubb38\uc790\ub97c \uc218\uc815\ud569\ub2c8\ub2e4.",searchTitle:"\uc694\uc18c \ub610\ub294 \uac12 \ucc3e\uae30",searchNextResultTitle:"\ub2e4\uc74c\uc73c\ub85c \ucc3e\uae30 (Enter)",searchPreviousResultTitle:"\uc774\uc804\uc73c\ub85c \ucc3e\uae30 (Shift + Enter)",selectNode:"\uc694\uc18c\ub97c \uc120\ud0dd\ud574\uc8fc\uc138\uc694...",showAll:"\ubaa8\ub450\ubcf4\uae30",showMore:"\ub354\ubcf4\uae30",showMoreStatus:"${totalChilds} \uac1c\uc758 \ud56d\ubaa9 \uc911 ${visibleChilds} \uac1c\ub97c \ud45c\uc2dc\ud569\ub2c8\ub2e4.",sort:"\uc815\ub82c",sortTitle:"\uc120\ud0dd\ud55c ${type}\uc758 \ud558\uc704 \uc694\uc18c\ub97c \uc815\ub82c\ud569\ub2c8\ub2e4.",sortTitleShort:"\uc815\ub82c",sortFieldLabel:"\uc694\uc18c:",sortDirectionLabel:"\uc21c\uc11c:",sortFieldTitle:"\ubc30\uc5f4\uc774\ub098 \uac1d\uccb4\ub97c \uc815\ub82c\ud558\ub294 \uc694\uc18c\ub97c \uc120\ud0dd\ud574\uc8fc\uc138\uc694.",sortAscending:"\uc624\ub984\ucc28\uc21c",sortAscendingTitle:"\uc120\ud0dd\ud55c \uc694\uc18c\ub97c \uc624\ub984\ucc28\uc21c\uc73c\ub85c \uc815\ub82c\ud569\ub2c8\ub2e4.",sortDescending:"\ub0b4\ub9bc\ucc28\uc21c",sortDescendingTitle:"\uc120\ud0dd\ud55c \uc694\uc18c\ub97c \ub0b4\ub9bc\ucc28\uc21c\uc73c\ub85c \uc815\ub82c\ud569\ub2c8\ub2e4.",string:"\ubb38\uc790",transform:"\ubcc0\ud658",transformTitle:"\uc120\ud0dd\ud55c ${type}\uc758 \ud558\uc704 \uc694\uc18c\ub97c \ud544\ud130\ud558\uac70\ub098 \uc815\ub82c \ub610\ub294 \ubcc0\ud658\ud569\ub2c8\ub2e4.",transformTitleShort:"\ub0b4\uc6a9\uc744 \ud544\ud130\ud558\uac70\ub098 \uc815\ub82c \ub610\ub294 \ubcc0\ud658\ud569\ub2c8\ub2e4.",extract:"\ucd94\ucd9c",extractTitle:"\uc120\ud0dd\ud55c ${type}\uc758 \uac12\uc744 \ucd5c\uc0c1\uc704\uc5d0 \uc704\uce58\uc2dc\ud0b5\ub2c8\ub2e4.",transformQueryTitle:"JMESPath \ucffc\ub9ac\ub97c \uc785\ub825\ud574\uc8fc\uc138\uc694.",transformWizardLabel:"\ub9c8\ubc95\uc0ac",transformWizardFilter:"\ud544\ud130",transformWizardSortBy:"\uc815\ub82c",transformWizardSelectFields:"\uc694\uc18c\ub97c \uc120\ud0dd\ud574\uc8fc\uc138\uc694.",transformQueryLabel:"\ucffc\ub9ac",transformPreviewLabel:"\ubbf8\ub9ac\ubcf4\uae30",type:"\uc720\ud615",typeTitle:"\uc120\ud0dd\ud55c \uc694\uc18c\uc758 \uc720\ud615\uc744 \ubcc0\uacbd\ud569\ub2c8\ub2e4.",openUrl:"Ctrl + Click \ub610\ub294 Ctrl + Enter\ub85c \uc0c8 \ucc3d\uc5d0\uc11c URL \uc5f4\uae30",undo:"\uc2e4\ud589 \ucde8\uc18c (Ctrl + Z)",validationCannotMove:"\ud558\uc704 \uc694\uc18c\ub85c \uc774\ub3d9\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.",autoType:"\uc790\ub3d9: \uc694\uc18c\uc758 \ud615\uc2dd\uc774 \uac12\uc758 \uc720\ud615\uc73c\ub85c \uacb0\uc815\ub429\ub2c8\ub2e4. \ubb38\uc790, \uc22b\uc790, \ubd80\uc6b8, \ub610\ub294 null\ub9cc \ud5c8\uc6a9\ub429\ub2c8\ub2e4.",objectType:"\uac1d\uccb4: \uc21c\uc11c\ub300\ub85c \ub098\uc5f4\ub418\uc9c0 \uc54a\uc740 \uc774\ub984/\uac12 \uc30d\uc73c\ub85c \uc774\ub8e8\uc5b4\uc9c4 \uc9d1\ud569\uc785\ub2c8\ub2e4.",arrayType:"\ubc30\uc5f4: \uc21c\uc11c\ub300\ub85c \ub098\uc5f4\ub41c \uac12\uc758 \uc9d1\ud569\uc785\ub2c8\ub2e4.",stringType:"\ubb38\uc790: \uc694\uc18c\uc758 \uc720\ud615\uc774 \uac12\uc5d0\uc11c \uacb0\uc815\ub418\uc9c0 \uc54a\uc9c0\ub9cc \ud56d\uc0c1 \ubb38\uc790\ub85c \ubc18\ud658\ub429\ub2c8\ub2e4.",modeEditorTitle:"\ud3b8\uc9d1\uae30 \uc720\ud615 \ubcc0\uacbd",modeCodeText:"\ucf54\ub4dc",modeCodeTitle:"\ud615\uc2dd \uad50\uc815\uc744 \ub3c4\uc640\uc8fc\ub294 \uae30\ub2a5\uc774 \ud3ec\ud568\ub41c \ubb38\uc790 \ud3b8\uc9d1\uae30",modeFormText:"\uc785\ub825 \uc591\uc2dd",modeFormTitle:"\uc815\ud574\uc9c4 \uc694\uc18c\uc5d0 \uac12\uc744 \uc785\ub825\ud558\ub294 \ud3b8\uc9d1\uae30",modeTextText:"\ubb38\uc790",modeTextTitle:"\ub2e8\uc21c \ubb38\uc790 \ud3b8\uc9d1\uae30",modeTreeText:"\ud2b8\ub9ac",modeTreeTitle:"\ud2b8\ub9ac \uad6c\uc870\ub85c \ud45c\uc2dc\ub418\ub294 \ud3b8\uc9d1\uae30",modeViewText:"\ubcf4\uae30",modeViewTitle:"\uc77d\uae30\uc804\uc6a9 \ud2b8\ub9ac \uad6c\uc870\ub85c JSON\uc744 \ud45c\uc2dc",modePreviewText:"\ubbf8\ub9ac\ubcf4\uae30",modePreviewTitle:"\uc77d\uae30\uc804\uc6a9 \ubb38\uc790\ub85c JSON\uc744 \ud45c\uc2dc",examples:"\uc608\uc81c",default:"\uae30\ubcf8\uac12",containsInvalidProperties:"\uc798\ubabb\ub41c \uc18d\uc131\uc774 \ud3ec\ud568\ub418\uc5b4 \uc788\uc2b5\ub2c8\ub2e4.",containsInvalidItems:"\uc798\ubabb\ub41c \ud56d\ubaa9\uc774 \ud3ec\ud568\ub418\uc5b4 \uc788\uc2b5\ub2c8\ub2e4"}},r=Object.keys(i),o="en",s="undefined"!=typeof navigator?navigator.language||navigator.userLanguage:void 0,a=r.find((function(e){return e===s}))||o;function l(e){var t;e&&((t=r.find((function(t){return t===e})))?a=t:console.error("Language not found"))}function c(e){if(e)for(var t in e)!function(t){r.find((function(e){return e===t}))||r.push(t),i[t]=Object.assign({},i[o],i[t],e[t])}(t)}function u(e,t,n){var r=i[n=n||a][e]||i[o][e]||e;if(t)for(var s in t)r=r.replace("${"+s+"}",t[s]);return r}},6056:function(e,t,n){"use strict";n.d(t,{J:function(){return s},r:function(){return o}}),t=n(5156);var i=n.n(t),r=n(9791);function o(e,t){var n,i=t.sort,o=t.filter,s=(t=t.projection,"");return o?(n="@"!==o.field?["0"].concat((0,r.parsePath)("."+o.field)):["0"],n="string"==typeof(0,r.get)(e,n)?o.value:(0,r.parseString)(o.value),s+="[? "+o.field+" "+o.relation+" `"+JSON.stringify(n)+"`]"):s+=Array.isArray(e)?"[*]":"@",i&&("desc"===i.direction?s+=" | reverse(sort_by(@, &"+i.field+"))":s+=" | sort_by(@, &"+i.field+")"),t&&("]"!==s[s.length-1]&&(s+=" | [*]"),1===t.fields.length?s+="."+t.fields[0]:1<t.fields.length&&(s+=".{"+t.fields.map((function(e){var t=e.split(".");return t[t.length-1]+": "+e})).join(", ")+"}")),s}function s(e,t){return i().search(e,t)}},4987:function(){function e(e){void 0===e||"remove"in e||Object.defineProperty(e,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){void 0!==this.parentNode&&this.parentNode.removeChild(this)}})}"undefined"!=typeof Element&&(void 0!==window.Element&&e(window.Element.prototype),void 0!==window.CharacterData&&e(window.CharacterData.prototype),void 0!==window.DocumentType)&&e(window.DocumentType.prototype),Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(e){for(var t=0;t<this.length;t++){var n=this[t];if(e.call(this,n,t,this))return t}return-1},configurable:!0,writable:!0}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e){return this[e=this.findIndex(e)]},configurable:!0,writable:!0}),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")})},341:function(e,t,n){"use strict";n.r(t),n.d(t,{previewModeMixins:function(){return m}});var i=n(1262),r=n(4188),o=n(6436),s=n(2474);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,function(e){return e=function(e,t){if("object"!==a(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!==a(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string"),"symbol"===a(e)?e:String(e)}(i.key),i)}}var c=function(){function e(t,n,i){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.onChange=t,this.calculateItemSize=n||function(){return 1},this.limit=i,this.items=[],this.index=-1}var t,n,i;return t=e,(n=[{key:"add",value:function(e){for(;this._calculateHistorySize()>this.limit&&1<this.items.length;)this.items.shift(),this.index--;this.items=this.items.slice(0,this.index+1),this.items.push(e),this.index++,this.onChange()}},{key:"_calculateHistorySize",value:function(){var e=this.calculateItemSize,t=0;return this.items.forEach((function(n){t+=e(n)})),t}},{key:"undo",value:function(){if(this.canUndo())return this.index--,this.onChange(),this.items[this.index]}},{key:"redo",value:function(){if(this.canRedo())return this.index++,this.onChange(),this.items[this.index]}},{key:"canUndo",value:function(){return 0<this.index}},{key:"canRedo",value:function(){return this.index<this.items.length-1}},{key:"clear",value:function(){this.items=[],this.index=-1,this.onChange()}}])&&l(t.prototype,n),i&&l(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}(),u=n(7907),h=n(6056),d=n(6617),p=n(6210),g=n(2558),f=(t=n(8458),n(9791)),m=(n=t.textModeMixins[0].mixin,t={create:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=(void 0===t.statusBar&&(t.statusBar=!0),t.mainMenuBar=!1!==t.mainMenuBar,t.enableSort=!1!==t.enableSort,t.enableTransform=!1!==t.enableTransform,t.createQuery=t.createQuery||h.r,t.executeQuery=t.executeQuery||h.J,"number"==typeof(this.options=t).indentation?this.indentation=Number(t.indentation):this.indentation=2,(0,u.cC)(this.options.languages),(0,u.m0)(this.options.language),this.mode="preview",this);this.container=e,this.dom={},this.json=void 0,this.text="",this._debouncedValidate=(0,f.debounce)(this.validate.bind(this),this.DEBOUNCE_INTERVAL),this.width=e.clientWidth,this.height=e.clientHeight,this.frame=document.createElement("div"),this.frame.className="jsoneditor jsoneditor-mode-preview",this.frame.onclick=function(e){e.preventDefault()},e={target:this.frame,onFocus:this.options.onFocus||null,onBlur:this.options.onBlur||null},this.frameFocusTracker=new s.R(e),this.content=document.createElement("div"),this.content.className="jsoneditor-outer",this.dom.busy=document.createElement("div"),this.dom.busy.className="jsoneditor-busy",this.dom.busyContent=document.createElement("span"),this.dom.busyContent.textContent="busy...",this.dom.busy.appendChild(this.dom.busyContent),this.content.appendChild(this.dom.busy),this.dom.previewContent=document.createElement("pre"),this.dom.previewContent.className="jsoneditor-preview",this.dom.previewText=document.createTextNode(""),this.dom.previewContent.appendChild(this.dom.previewText),this.content.appendChild(this.dom.previewContent),this.options.mainMenuBar&&((0,f.addClassName)(this.content,"has-main-menu-bar"),this.menu=document.createElement("div"),this.menu.className="jsoneditor-menu",this.frame.appendChild(this.menu),(e=document.createElement("button")).type="button",e.className="jsoneditor-format",e.title=(0,u.Iu)("formatTitle"),this.menu.appendChild(e),e.onclick=function(){n.executeWithBusyMessage((function(){try{n.format()}catch(e){n._onError(e)}}),"formatting...")},(e=document.createElement("button")).type="button",e.className="jsoneditor-compact",e.title=(0,u.Iu)("compactTitle"),this.menu.appendChild(e),e.onclick=function(){n.executeWithBusyMessage((function(){try{n.compact()}catch(e){n._onError(e)}}),"compacting...")},this.options.enableSort&&((e=document.createElement("button")).type="button",e.className="jsoneditor-sort",e.title=(0,u.Iu)("sortTitleShort"),e.onclick=function(){n._showSortModal()},this.menu.appendChild(e)),this.options.enableTransform&&((e=document.createElement("button")).type="button",e.title=(0,u.Iu)("transformTitleShort"),e.className="jsoneditor-transform",e.onclick=function(){n._showTransformModal()},this.dom.transform=e,this.menu.appendChild(e)),(e=document.createElement("button")).type="button",e.className="jsoneditor-repair",e.title=(0,u.Iu)("repairTitle"),this.menu.appendChild(e),!(e.onclick=function(){void 0===n.json&&n.executeWithBusyMessage((function(){try{n.repair()}catch(e){n._onError(e)}}),"repairing...")})!==this.options.history&&(this.history=new c((function(){n.dom.undo.disabled=!n.history.canUndo(),n.dom.redo.disabled=!n.history.canRedo()}),(function(e){return 2*e.text.length}),r.oW),(e=document.createElement("button")).type="button",e.className="jsoneditor-undo jsoneditor-separator",e.title=(0,u.Iu)("undo"),e.onclick=function(){var e=n.history.undo();e&&n._applyHistory(e)},this.menu.appendChild(e),this.dom.undo=e,(e=document.createElement("button")).type="button",e.className="jsoneditor-redo",e.title=(0,u.Iu)("redo"),e.onclick=function(){var e=n.history.redo();e&&n._applyHistory(e)},this.menu.appendChild(e),this.dom.redo=e,this.history.onChange()),this.options)&&this.options.modes&&this.options.modes.length&&(this.modeSwitcher=new d.x(this.menu,this.options.modes,this.options.mode,(function(e){try{n.setMode(e),n.modeSwitcher.focus()}catch(e){n._onError(e)}}))),e=Array.isArray(this.options.showErrorTable)?this.options.showErrorTable.includes(this.mode):!0===this.options.showErrorTable,this.errorTable=new o.Q({errorTableVisible:e,onToggleVisibility:function(){n.validate()},onFocusLine:null,onChangeHeight:function(e){e=e+(n.dom.statusBar?n.dom.statusBar.clientHeight:0)+1,n.content.style.marginBottom=-e+"px",n.content.style.paddingBottom=e+"px"}}),this.frame.appendChild(this.content),this.frame.appendChild(this.errorTable.getErrorTable()),this.container.appendChild(this.frame),t.statusBar&&((0,f.addClassName)(this.content,"has-status-bar"),e=document.createElement("div"),(this.dom.statusBar=e).className="jsoneditor-statusbar",this.frame.appendChild(e),this.dom.fileSizeInfo=document.createElement("span"),this.dom.fileSizeInfo.className="jsoneditor-size-info",this.dom.fileSizeInfo.innerText="",e.appendChild(this.dom.fileSizeInfo),this.dom.arrayInfo=document.createElement("span"),this.dom.arrayInfo.className="jsoneditor-size-info",this.dom.arrayInfo.innerText="",e.appendChild(this.dom.arrayInfo),e.appendChild(this.errorTable.getErrorCounter()),e.appendChild(this.errorTable.getWarningIcon()),e.appendChild(this.errorTable.getErrorIcon())),this._renderPreview(),this.setSchema(this.options.schema,this.options.schemaRefs)},_renderPreview:function(){var e=this.getText();this.dom.previewText.nodeValue=(0,f.limitCharacters)(e,r.WF),this.dom.fileSizeInfo&&(this.dom.fileSizeInfo.innerText="Size: "+(0,f.formatSize)(e.length)),this.dom.arrayInfo&&(Array.isArray(this.json)?this.dom.arrayInfo.innerText="Array: "+this.json.length+" items":this.dom.arrayInfo.innerText="")},_onChange:function(){if(this._debouncedValidate(),this.options.onChange)try{this.options.onChange()}catch(e){console.error("Error in onChange callback: ",e)}if(this.options.onChangeJSON)try{this.options.onChangeJSON(this.get())}catch(e){console.error("Error in onChangeJSON callback: ",e)}if(this.options.onChangeText)try{this.options.onChangeText(this.getText())}catch(e){console.error("Error in onChangeText callback: ",e)}}},t._showSortModal=function(){var e=this;this.executeWithBusyMessage((function(){var t=e.options.modalAnchor||r.qD,n=e.get();e._renderPreview(),(0,p.showSortModal)(t,n,(function(t){e.executeWithBusyMessage((function(){var i,r,o;i=n,r=t,Array.isArray(i)&&(o=(0,f.sort)(i,r.path,r.direction),e.sortedBy=r,e._setAndFireOnChange(o)),(0,f.isObject)(i)&&(o=(0,f.sortObjectKeys)(i,r.direction),e.sortedBy=r,e._setAndFireOnChange(o))}),"sorting...")}),e.sortedBy)}),"parsing...")},t._showTransformModal=function(){var e=this;this.executeWithBusyMessage((function(){var t=(o=e.options).createQuery,n=o.executeQuery,i=o.modalAnchor,o=o.queryDescription,s=e.get();e._renderPreview(),(0,g.showTransformModal)({container:i||r.qD,json:s,queryDescription:o,createQuery:t,executeQuery:n,onTransform:function(t){e.executeWithBusyMessage((function(){var i=n(s,t);e._setAndFireOnChange(i)}),"transforming...")}})}),"parsing...")},t.destroy=function(){this.frame&&this.container&&this.frame.parentNode===this.container&&this.container.removeChild(this.frame),this.modeSwitcher&&(this.modeSwitcher.destroy(),this.modeSwitcher=null),this._debouncedValidate=null,this.history&&(this.history.clear(),this.history=null),this.frameFocusTracker.destroy()},t.compact=function(){var e=this.get(),t=JSON.stringify(e);this._setTextAndFireOnChange(t,e)},t.format=function(){var e=this.get(),t=JSON.stringify(e,null,this.indentation);this._setTextAndFireOnChange(t,e)},t.repair=function(){var e=this.getText();try{var t=(0,i.K)(e);this._setTextAndFireOnChange(t)}catch(e){}},t.focus=function(){this.dom.transform.focus()},t.set=function(e){this.history&&this.history.clear(),this._set(e)},t.update=function(e){this._set(e)},t._set=function(e){this.text=void 0,this.json=e,this._renderPreview(),this._pushHistory(),this._debouncedValidate()},t._setAndFireOnChange=function(e){this._set(e),this._onChange()},t.get=function(){var e;return void 0===this.json&&(e=this.getText(),this.json=(0,f.parse)(e)),this.json},t.getText=function(){return void 0===this.text&&(this.text=JSON.stringify(this.json,null,this.indentation),!0===this.options.escapeUnicode)&&(this.text=(0,f.escapeUnicodeChars)(this.text)),this.text},t.setText=function(e){this.history&&this.history.clear(),this._setText(e)},t.updateText=function(e){this.getText()!==e&&this._setText(e)},t._setText=function(e,t){var n;!0===this.options.escapeUnicode?this.text=(0,f.escapeUnicodeChars)(e):this.text=e,this.json=t,this._renderPreview(),void 0===this.json?(n=this).executeWithBusyMessage((function(){try{n.json=n.get(),n._renderPreview(),n._pushHistory()}catch(e){}}),"parsing..."):this._pushHistory(),this._debouncedValidate()},t._setTextAndFireOnChange=function(e,t){this._setText(e,t),this._onChange()},t._applyHistory=function(e){this.json=e.json,this.text=e.text,this._renderPreview(),this._debouncedValidate()},t._pushHistory=function(){var e;this.history&&(e={text:this.text,json:this.json},this.history.add(e))},t.executeWithBusyMessage=function(e,t){var n;this.getText().length>r.EX?((0,f.addClassName)((n=this).frame,"busy"),n.dom.busyContent.innerText=t,setTimeout((function(){e(),(0,f.removeClassName)(n.frame,"busy"),n.dom.busyContent.innerText=""}),100)):e()},t.validate=n.validate,t._renderErrors=n._renderErrors,[{mode:"preview",mixin:t,data:"json"}])},6210:function(e,t,n){"use strict";n.r(t),n.d(t,{showSortModal:function(){return s}}),t=n(483);var i=n.n(t),r=n(7907),o=n(9791);function s(e,t,n,s){var a=Array.isArray(t)?(0,o.getChildPaths)(t):[""],l=s&&s.path&&(0,o.contains)(a,s.path)?s.path:a[0],c=s&&s.direction||"asc";t='<div class="pico-modal-contents"><div class="pico-modal-header">'+(0,r.Iu)("sort")+"</div><form><table><tbody><tr> <td>"+(0,r.Iu)("sortFieldLabel")+' </td> <td class="jsoneditor-modal-input"> <div class="jsoneditor-select-wrapper"> <select id="field" title="'+(0,r.Iu)("sortFieldTitle")+'"> </select> </div> </td></tr><tr> <td>'+(0,r.Iu)("sortDirectionLabel")+' </td> <td class="jsoneditor-modal-input"> <div id="direction" class="jsoneditor-button-group"><input type="button" value="'+(0,r.Iu)("sortAscending")+'" title="'+(0,r.Iu)("sortAscendingTitle")+'" data-value="asc" class="jsoneditor-button-first jsoneditor-button-asc"/><input type="button" value="'+(0,r.Iu)("sortDescending")+'" title="'+(0,r.Iu)("sortDescendingTitle")+'" data-value="desc" class="jsoneditor-button-last jsoneditor-button-desc"/> </div> </td></tr><tr><td colspan="2" class="jsoneditor-modal-input jsoneditor-modal-actions"> <input type="submit" id="ok" value="'+(0,r.Iu)("ok")+'" /></td></tr></tbody></table></form></div>',i()({parent:e,content:t,overlayClass:"jsoneditor-modal-overlay",overlayStyles:{backgroundColor:"rgb(1,1,1)",opacity:.3},modalClass:"jsoneditor-modal jsoneditor-modal-sort"}).afterCreate((function(e){var t=e.modalElem().querySelector("form"),i=e.modalElem().querySelector("#ok"),r=e.modalElem().querySelector("#field"),o=e.modalElem().querySelector("#direction");function s(e){o.value=e,o.className="jsoneditor-button-group jsoneditor-button-group-value-"+o.value}a.forEach((function(e){var t,n=document.createElement("option");n.text=""===(t=e)?"@":"."===t[0]?t.slice(1):t,n.value=e,r.appendChild(n)})),r.value=l||a[0],s(c||"asc"),o.onclick=function(e){s(e.target.getAttribute("data-value"))},i.onclick=function(t){t.preventDefault(),t.stopPropagation(),e.close(),n({path:r.value,direction:o.value})},t&&(t.onsubmit=i.onclick)})).afterClose((function(e){e.destroy()})).show()}},2558:function(e,t,n){"use strict";n.r(t),n.d(t,{showTransformModal:function(){return d}}),t=n(483);var i=n.n(t),r=(t=n(3879),n.n(t)),o=n(7907);function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t,n,i){if("boolean"==typeof e||e instanceof Boolean||null===e||"number"==typeof e||e instanceof Number||"string"==typeof e||e instanceof String||e instanceof Date)return JSON.stringify(e);if(Array.isArray(e)){for(var r=e,o=t,l=n,c=i,u=o?l+o:void 0,h=o?"[\n":"[",d=0;d<r.length;d++){var p=r[d];if(o&&(h+=u),h+=void 0!==p&&"function"!=typeof p?a(p,o,u,c):"null",d<r.length-1&&(h+=o?",\n":","),h.length>c)return h+"..."}return h+(o?"\n"+l+"]":"]")}if(e&&"object"===s(e)){var g,f=e,m=t,v=(l=n,i),y=m?l+m:void 0,C=!0,b=m?"{\n":"{";if("function"==typeof f.toJSON)return a(f.toJSON(),m,l,v);for(g in f)if(function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}(f,g)&&(C?C=!1:b+=m?",\n":",",(b=(b+=m?y+'"'+g+'": ':'"'+g+'":')+a(f[g],m,y,v)).length>v))return b+"...";return b+(m?"\n"+l+"}":"}")}}function l(e,t){for(var n="";0<t--;)n+=e;return n}var c=n(9791),u=n(4188),h='Enter a <a href="http://jmespath.org" target="_blank">JMESPath</a> query to filter, sort, or transform the JSON data.<br/>To learn JMESPath, go to <a href="http://jmespath.org/tutorial.html" target="_blank">the interactive tutorial</a>.';function d(e){var t=e.container,n=e.json,s=void 0===(s=e.queryDescription)?h:s,d=e.createQuery,p=e.executeQuery,g=e.onTransform,f=n;e='<label class="pico-modal-contents"><div class="pico-modal-header">'+(0,o.Iu)("transform")+"</div><p>"+s+'</p><div class="jsoneditor-jmespath-label">'+(0,o.Iu)("transformWizardLabel")+' </div><div id="wizard" class="jsoneditor-jmespath-block jsoneditor-jmespath-wizard"> <table class="jsoneditor-jmespath-wizard-table"> <tbody> <tr> <th>'+(0,o.Iu)("transformWizardFilter")+'</th> <td class="jsoneditor-jmespath-filter"> <div class="jsoneditor-inline jsoneditor-jmespath-filter-field" > <select id="filterField"> </select> </div> <div class="jsoneditor-inline jsoneditor-jmespath-filter-relation" > <select id="filterRelation"> <option value="==">==</option> <option value="!=">!=</option> <option value="<"><</option> <option value="<="><=</option> <option value=">">></option> <option value=">=">>=</option> </select> </div> <div class="jsoneditor-inline jsoneditor-jmespath-filter-value" > <input type="text" class="value" placeholder="value..." id="filterValue" /> </div> </td> </tr> <tr> <th>'+(0,o.Iu)("transformWizardSortBy")+'</th> <td class="jsoneditor-jmespath-filter"> <div class="jsoneditor-inline jsoneditor-jmespath-sort-field"> <select id="sortField"> </select> </div> <div class="jsoneditor-inline jsoneditor-jmespath-sort-order" > <select id="sortOrder"> <option value="asc">Ascending</option> <option value="desc">Descending</option> </select> </div> </td> </tr> <tr id="selectFieldsPart"> <th>'+(0,o.Iu)("transformWizardSelectFields")+'</th> <td class="jsoneditor-jmespath-filter"> <select class="jsoneditor-jmespath-select-fields" id="selectFields" multiple></select> </td> </tr> </tbody> </table></div><div class="jsoneditor-jmespath-label">'+(0,o.Iu)("transformQueryLabel")+' </div><div class="jsoneditor-jmespath-block"> <textarea id="query" rows="4" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" title="'+(0,o.Iu)("transformQueryTitle")+'">[*]</textarea></div><div class="jsoneditor-jmespath-label">'+(0,o.Iu)("transformPreviewLabel")+' </div><div class="jsoneditor-jmespath-block"> <textarea id="preview" class="jsoneditor-transform-preview" readonly> </textarea></div><div class="jsoneditor-jmespath-block jsoneditor-modal-actions"> <input type="submit" id="ok" value="'+(0,o.Iu)("ok")+'" autofocus /></div></div>',i()({parent:t,content:e,overlayClass:"jsoneditor-modal-overlay",overlayStyles:{backgroundColor:"rgb(1,1,1)",opacity:.3},modalClass:"jsoneditor-modal jsoneditor-modal-transform",focus:!1}).afterCreate((function(e){var t=e.modalElem(),i=t.querySelector("#wizard"),o=t.querySelector("#ok"),s=t.querySelector("#filterField"),h=t.querySelector("#filterRelation"),m=t.querySelector("#filterValue"),v=t.querySelector("#sortField"),y=t.querySelector("#sortOrder"),C=t.querySelector("#selectFields"),b=t.querySelector("#query"),I=t.querySelector("#preview");Array.isArray(f)||(i.style.fontStyle="italic",i.textContent="(wizard not available for objects, only for arrays)"),(0,c.getChildPaths)(n).forEach((function(e){var t;e=k(e),((t=document.createElement("option")).text=e,t.value=e,s.appendChild(t),t=document.createElement("option")).text=e,t.value=e,v.appendChild(t)})),i=(0,c.getChildPaths)(n,!0).filter((function(e){return""!==e})),0<i.length?i.forEach((function(e){e=k(e);var t=document.createElement("option");t.text=e,t.value=e,C.appendChild(t)})):(i=t.querySelector("#selectFieldsPart"))&&(i.style.display="none"),i=new(r())(s,{defaultSelected:!1,clearable:!0,allowDeselect:!0,placeholder:"field..."});var A=new(r())(h,{defaultSelected:!1,clearable:!0,allowDeselect:!0,placeholder:"compare..."}),w=new(r())(v,{defaultSelected:!1,clearable:!0,allowDeselect:!0,placeholder:"field..."}),x=new(r())(y,{defaultSelected:!1,clearable:!0,allowDeselect:!0,placeholder:"order..."}),S=new(r())(C,{multiple:!0,clearable:!0,defaultSelected:!1,placeholder:"select fields..."});function k(e){return""===e?"@":"."===e[0]?e.slice(1):e}i.on("selectr.change",R),A.on("selectr.change",R),m.oninput=R,w.on("selectr.change",R),x.on("selectr.change",R),S.on("selectr.change",R),t.querySelector(".pico-modal-contents").onclick=function(e){"A"!==e.target.nodeName&&e.preventDefault()};var E=(0,c.debounce)((function(){try{var e=p(f,b.value);I.className="jsoneditor-transform-preview",I.value=(t=e,n=2,i=u.WF,"number"==typeof n?10<n?r=l(" ",10):1<=n&&(r=l(" ",n)):"string"==typeof n&&""!==n&&(r=n),(n=a(t,r,"",i)).length>i?(t=n,("number"==typeof(r=i)?t.slice(0,r):t)+"..."):n),o.disabled=!1}catch(e){I.className="jsoneditor-transform-preview jsoneditor-error",I.value=e.toString(),o.disabled=!0}var t,n,i,r}),300);function T(e,t){try{b.value=d(e,t),o.disabled=!1,E()}catch(t){e='Error: an error happened when executing "createQuery": '+(t.message||t.toString()),b.value="",o.disabled=!0,I.className="jsoneditor-transform-preview jsoneditor-error",I.value=e}}function R(){var e={};if(s.value&&h.value&&m.value&&(e.filter={field:s.value,relation:h.value,value:m.value}),v.value&&y.value&&(e.sort={field:v.value,direction:y.value}),C.value){for(var t,i=[],r=0;r<C.options.length;r++)C.options[r].selected&&(t=C.options[r].value,i.push(t));e.projection={fields:i}}T(n,e)}b.oninput=E,o.onclick=function(t){t.preventDefault(),t.stopPropagation(),e.close(),g(b.value)},T(n,{}),setTimeout((function(){b.select(),b.focus(),b.selectionStart=3,b.selectionEnd=3}))})).afterClose((function(e){e.destroy()})).show()}},8458:function(e,t,n){"use strict";n.r(t),n.d(t,{textModeMixins:function(){return A}});var i=n(1262),r=(t=n(8170),n.n(t)),o=n(4188),s=n(6436),a=n(2474),l=n(7907),c=n(6056),u=n(6617),h=n(6210),d=n(2558),p=n(9125),g=n(7026),f=n(9791);function m(e){return(m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function v(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,function(e){return e=function(e,t){if("object"!==m(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!==m(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string"),"symbol"===m(e)?e:String(e)}(i.key),i)}}var y=function(){function e(t,n){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.schema=t,this.schemaRefs=n||{},this.suggestions={},this.suggestionsRefs={},this._buildSuggestions()}var t,n,i;return t=e,(n=[{key:"_buildSuggestions",value:function(){for(var e in this._handleSchemaEntry("",this.schema,this.suggestions),this.schemaRefs)this.suggestionsRefs[e]={},this._handleSchemaEntry("",this.schemaRefs[e],this.suggestionsRefs[e])}},{key:"_handleRef",value:function(e,t,n){n[e]=n[e]||{},n[e].refs=n[e].refs||[],n[e].refs=(0,f.uniqueMergeArrays)(n[e].refs,[t])}},{key:"_handleSchemaEntry",value:function(e,t,n){if(t)if(t.$ref)this._handleRef(e,t.$ref,n);else{var i=this._checkOfConditon(t);if(i)this._handleOfCondition(e,t[i],n);else switch(t.type){case"object":this._handleObject(e,t,n);break;case"string":case"number":case"integer":this._handlePrimitive(e,t,n);break;case"boolean":this._handleBoolean(e,t,n);break;case"array":this._handleArray(e,t,n)}}else console.error("SchemaTextCompleter: schema node is missing for path",e)}},{key:"_handleObject",value:function(e,t,n){var i,r=this;(0,f.isObject)(t.properties)&&(i=Object.keys(t.properties),n[e]=n[e]||{},n[e].props=n[e].props||[],n[e].props=(0,f.uniqueMergeArrays)(n[e].props,i),i.forEach((function(i){(0,f.asyncExec)((function(){r._handleSchemaEntry("".concat(e,"/").concat(i),t.properties[i],n)}))})))}},{key:"_handlePrimitive",value:function(e,t,n){n[e]=n[e]||{},(0,f.isArray)(t.examples)&&(n[e].examples=n[e].examples||[],n[e].examples=(0,f.uniqueMergeArrays)(n[e].examples,t.examples)),(0,f.isArray)(t.enum)&&(n[e].enum=n[e].enum||[],n[e].enum=(0,f.uniqueMergeArrays)(n[e].enum,t.enum))}},{key:"_handleBoolean",value:function(e,t,n){n[e]||(n[e]={bool:[!0,!1]})}},{key:"_handleArray",value:function(e,t,n){var i=this;t.items&&(0,f.asyncExec)((function(){i._handleSchemaEntry("".concat(e,"/\\d+"),t.items,n)}))}},{key:"_handleOfCondition",value:function(e,t,n){var i=this;t&&t.length&&t.forEach((function(t){(0,f.asyncExec)((function(){i._handleSchemaEntry(e,t,n)}))}))}},{key:"_checkOfConditon",value:function(e){if(e)return e.oneOf?"oneOf":e.anyOf?"anyOf":e.allOf?"allOf":void 0}},{key:"getCompletions",value:function(e,t,n,i,r){var o=this;try{var s=g.parse(t.getValue()).pointers||{},a=function(e){function t(t){var r,o={props:"property",enum:"enum",bool:"boolean",examples:"examples"};e&&null!=(r=e[t])&&r.length&&(n=n.concat(e[t].map((function(e){return{caption:e+"",meta:"schema [".concat(o[t],"]"),score:i++,value:e+""}}))))}var n=[],i=0;t("props"),t("enum"),t("bool"),t("examples"),n.length&&r(null,n)};Object.keys(s).forEach((function(e){(0,f.asyncExec)((function(){function t(e,n,i){var r,s=Object.keys(n).reduce((function(t,n){return new RegExp("^".concat(i).concat(n)).test(e)&&(!t||t.length<n.length)?n:t}));if("string"==typeof s){if(null!=(r=n[s])&&null!=(r=r.refs)&&r.length){var a,l={};for(a in n[s].refs){var c=n[s].refs[a];o.suggestionsRefs[c]&&(null!=(c=t(e,o.suggestionsRefs[c],"".concat(i).concat(s)))&&c.enum&&(l.enum=(0,f.uniqueMergeArrays)(l.enum,c.enum)),null!=c&&c.examples&&(l.examples=(0,f.uniqueMergeArrays)(l.examples,c.examples)),null!=c&&c.bool&&(l.bool=(0,f.uniqueMergeArrays)(l.bool,c.bool)),null!=c)&&c.props&&(l.props=(0,f.uniqueMergeArrays)(l.props,c.props))}return l}if(new RegExp("^".concat(i).concat(s,"$")).test(e))return n[s]}}var i,r;(null==(r=s[e].key)?void 0:r.line)===n.row&&n.column>=s[e].key.column&&n.column<=s[e].keyEnd.column&&(i=e.slice(0,e.lastIndexOf("/"))),(i=(null==(r=s[e].value)?void 0:r.line)===n.row&&(null==(r=s[e].value)?void 0:r.line)===(null==(r=s[e].valueEnd)?void 0:r.line)&&n.column>=s[e].value.column&&n.column<=s[e].valueEnd.column?e:i)&&(r=t(i,o.suggestions,""),a(r))}))}))}catch(e){}}}])&&v(t.prototype,n),i&&v(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();function C(e){return(C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var b="ace/theme/jsoneditor";function I(){try{this.format()}catch(e){}}(t={}).create=function(e){var t,n,i,o=this,h=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},d=(void 0===h.statusBar&&(h.statusBar=!0),h.mainMenuBar=!1!==h.mainMenuBar,h.enableSort=!1!==h.enableSort,h.enableTransform=!1!==h.enableTransform,h.createQuery=h.createQuery||c.r,h.executeQuery=h.executeQuery||c.J,h.showErrorTable=void 0!==h.showErrorTable?h.showErrorTable:["text","preview"],"number"==typeof(this.options=h).indentation?this.indentation=Number(h.indentation):this.indentation=2,(0,l.cC)(this.options.languages),(0,l.m0)(this.options.language),h.ace||r()),g=(this.mode="code"===h.mode?"code":"text","code"===this.mode&&void 0===d&&(this.mode="text",console.warn("Failed to load Ace editor, falling back to plain text mode. Please use a JSONEditor bundle including Ace, or pass Ace as via the configuration option `ace`.")),this.theme=h.theme||b,this.theme===b&&d&&(0,p.O)(),h.onTextSelectionChange&&this.onTextSelectionChange(h.onTextSelectionChange),this);this.container=e,this.dom={},this.aceEditor=void 0,this.textarea=void 0,this.validateSchema=null,this.annotations=[],this.lastSchemaErrors=void 0,this._debouncedValidate=(0,f.debounce)(this._validateAndCatch.bind(this),this.DEBOUNCE_INTERVAL),this.width=e.clientWidth,this.height=e.clientHeight,this.frame=document.createElement("div"),this.frame.className="jsoneditor jsoneditor-mode-"+this.options.mode,this.frame.onclick=function(e){e.preventDefault()},this.frame.onkeydown=function(e){g._onKeyDown(e)},e={target:this.frame,onFocus:this.options.onFocus||null,onBlur:this.options.onBlur||null},this.frameFocusTracker=new a.R(e),this.content=document.createElement("div"),this.content.className="jsoneditor-outer",this.options.mainMenuBar&&((0,f.addClassName)(this.content,"has-main-menu-bar"),this.menu=document.createElement("div"),this.menu.className="jsoneditor-menu",this.frame.appendChild(this.menu),(e=document.createElement("button")).type="button",e.className="jsoneditor-format",e.title=(0,l.Iu)("formatTitle"),this.menu.appendChild(e),e.onclick=function(){try{g.format(),g._onChange()}catch(e){g._onError(e)}},(e=document.createElement("button")).type="button",e.className="jsoneditor-compact",e.title=(0,l.Iu)("compactTitle"),this.menu.appendChild(e),e.onclick=function(){try{g.compact(),g._onChange()}catch(e){g._onError(e)}},this.options.enableSort&&((e=document.createElement("button")).type="button",e.className="jsoneditor-sort",e.title=(0,l.Iu)("sortTitleShort"),e.onclick=function(){g._showSortModal()},this.menu.appendChild(e)),this.options.enableTransform&&((e=document.createElement("button")).type="button",e.title=(0,l.Iu)("transformTitleShort"),e.className="jsoneditor-transform",e.onclick=function(){g._showTransformModal()},this.menu.appendChild(e)),(e=document.createElement("button")).type="button",e.className="jsoneditor-repair",e.title=(0,l.Iu)("repairTitle"),this.menu.appendChild(e),e.onclick=function(){try{g.repair(),g._onChange()}catch(e){g._onError(e)}},"code"===this.mode&&((e=document.createElement("button")).type="button",e.className="jsoneditor-undo jsoneditor-separator",e.title=(0,l.Iu)("undo"),e.onclick=function(){o.aceEditor.getSession().getUndoManager().undo()},this.menu.appendChild(e),this.dom.undo=e,(e=document.createElement("button")).type="button",e.className="jsoneditor-redo",e.title=(0,l.Iu)("redo"),e.onclick=function(){o.aceEditor.getSession().getUndoManager().redo()},this.menu.appendChild(e),this.dom.redo=e),this.options&&this.options.modes&&this.options.modes.length&&(this.modeSwitcher=new u.x(this.menu,this.options.modes,this.options.mode,(function(e){try{g.setMode(e),g.modeSwitcher.focus()}catch(e){g._onError(e)}}))),"code"===this.mode)&&((t=document.createElement("a")).appendChild(document.createTextNode("powered by ace")),t.href="https://ace.c9.io/",t.target="_blank",t.className="jsoneditor-poweredBy",t.onclick=function(){window.open(t.href,t.target,"noreferrer")},this.menu.appendChild(t)),e=this.options.onEditable&&C("function"===this.options.onEditable)&&!this.options.onEditable({}),this.frame.appendChild(this.content),this.container.appendChild(this.frame),"code"===this.mode?(this.editorDom=document.createElement("div"),this.editorDom.style.height="100%",this.editorDom.style.width="100%",this.content.appendChild(this.editorDom),i=(d=d.edit(this.editorDom)).getSession(),d.$blockScrolling=1/0,d.setTheme(this.theme),d.setOptions({readOnly:e}),d.setShowPrintMargin(!1),d.setFontSize("14px"),i.setMode("ace/mode/json"),i.setTabSize(this.indentation),i.setUseSoftTabs(!0),i.setUseWrapMode(!0),n=i.setAnnotations,i.setAnnotations=function(e){n.call(this,e&&e.length?e:g.annotations)},d.commands.bindKey("Ctrl-L",null),d.commands.bindKey("Command-L",null),d.commands.bindKey("Ctrl-\\",null),d.commands.bindKey("Command-\\",null),d.commands.bindKey("Ctrl-Shift-\\",null),d.commands.bindKey("Command-Shift-\\",null),(this.aceEditor=d).on("change",this._onChange.bind(this)),d.on("changeSelection",this._onSelect.bind(this))):((i=document.createElement("textarea")).className="jsoneditor-text",i.spellcheck=!1,this.content.appendChild(i),this.textarea=i,this.textarea.readOnly=e,null===this.textarea.oninput?this.textarea.oninput=this._onChange.bind(this):this.textarea.onchange=this._onChange.bind(this),i.onselect=this._onSelect.bind(this),i.onmousedown=this._onMouseDown.bind(this),i.onblur=this._onBlur.bind(this)),this._updateHistoryButtons(),d=Array.isArray(this.options.showErrorTable)?this.options.showErrorTable.includes(this.mode):!0===this.options.showErrorTable,this.errorTable=new s.Q({errorTableVisible:d,onToggleVisibility:function(){g._validateAndCatch()},onFocusLine:function(e){g.isFocused=!0,isNaN(e)||g.setTextSelection({row:e,column:1},{row:e,column:1e3})},onChangeHeight:function(e){e=e+(g.dom.statusBar?g.dom.statusBar.clientHeight:0)+1,g.content.style.marginBottom=-e+"px",g.content.style.paddingBottom=e+"px"}}),this.frame.appendChild(this.errorTable.getErrorTable()),h.statusBar&&((0,f.addClassName)(this.content,"has-status-bar"),this.curserInfoElements={},e=document.createElement("div"),(this.dom.statusBar=e).className="jsoneditor-statusbar",this.frame.appendChild(e),(i=document.createElement("span")).className="jsoneditor-curserinfo-label",i.innerText="Ln:",(d=document.createElement("span")).className="jsoneditor-curserinfo-val",d.innerText="1",e.appendChild(i),e.appendChild(d),(h=document.createElement("span")).className="jsoneditor-curserinfo-label",h.innerText="Col:",(i=document.createElement("span")).className="jsoneditor-curserinfo-val",i.innerText="1",e.appendChild(h),e.appendChild(i),this.curserInfoElements.colVal=i,this.curserInfoElements.lnVal=d,(h=document.createElement("span")).className="jsoneditor-curserinfo-label",h.innerText="characters selected",h.style.display="none",(i=document.createElement("span")).className="jsoneditor-curserinfo-count",i.innerText="0",i.style.display="none",this.curserInfoElements.countLabel=h,this.curserInfoElements.countVal=i,e.appendChild(i),e.appendChild(h),e.appendChild(this.errorTable.getErrorCounter()),e.appendChild(this.errorTable.getWarningIcon()),e.appendChild(this.errorTable.getErrorIcon())),this.setSchema(this.options.schema,this.options.schemaRefs)},t._onSchemaChange=function(e,t){this.aceEditor&&(this.options.allowSchemaSuggestions&&e?(this.aceEditor.setOption("enableBasicAutocompletion",[new y(e,t)]),this.aceEditor.setOption("enableLiveAutocompletion",!0)):(this.aceEditor.setOption("enableBasicAutocompletion",void 0),this.aceEditor.setOption("enableLiveAutocompletion",!1)))},t._onChange=function(){var e=this;if(!this.onChangeDisabled){if(setTimeout((function(){e._updateHistoryButtons&&e._updateHistoryButtons()})),this._debouncedValidate(),this.options.onChange)try{this.options.onChange()}catch(e){console.error("Error in onChange callback: ",e)}if(this.options.onChangeText)try{this.options.onChangeText(this.getText())}catch(e){console.error("Error in onChangeText callback: ",e)}}},t._updateHistoryButtons=function(){var e;this.aceEditor&&this.dom.undo&&this.dom.redo&&(e=this.aceEditor.getSession().getUndoManager())&&e.hasUndo&&e.hasRedo&&(this.dom.undo.disabled=!e.hasUndo(),this.dom.redo.disabled=!e.hasRedo())},t._showSortModal=function(){try{var e=this,t=this.options.modalAnchor||o.qD,n=this.get();(0,h.showSortModal)(t,n,(function(t){var i;Array.isArray(n)&&(i=(0,f.sort)(n,t.path,t.direction),e.sortedBy=t,e.update(i)),(0,f.isObject)(n)&&(i=(0,f.sortObjectKeys)(n,t.direction),e.sortedBy=t,e.update(i))}),e.sortedBy)}catch(t){this._onError(t)}},t._showTransformModal=function(){var e=this;try{var t=this.options,n=t.modalAnchor,i=t.createQuery,r=t.executeQuery,s=t.queryDescription,a=this.get();(0,d.showTransformModal)({container:n||o.qD,json:a,queryDescription:s,createQuery:i,executeQuery:r,onTransform:function(t){t=r(a,t),e.update(t)}})}catch(t){this._onError(t)}},t._onSelect=function(){this._updateCursorInfo(),this._emitSelectionChange()},t._onKeyDown=function(e){var t=!1;73===(e.which||e.keyCode)&&e.ctrlKey&&(e.shiftKey?this.compact():this.format(),this._onChange(),t=!0),t&&(e.preventDefault(),e.stopPropagation()),this._updateCursorInfo(),this._emitSelectionChange()},t._onMouseDown=function(){this._updateCursorInfo(),this._emitSelectionChange()},t._onBlur=function(){var e=this;setTimeout((function(){e.isFocused||(e._updateCursorInfo(),e._emitSelectionChange()),e.isFocused=!1}))},t._updateCursorInfo=function(){var e,t,n,i,r,o=this;function s(){o.curserInfoElements.countVal.innerText!==r&&(o.curserInfoElements.countVal.innerText=r,o.curserInfoElements.countVal.style.display=r?"inline":"none",o.curserInfoElements.countLabel.style.display=r?"inline":"none"),o.curserInfoElements.lnVal.innerText=n,o.curserInfoElements.colVal.innerText=i}this.textarea?setTimeout((function(){var e=(0,f.getInputSelection)(o.textarea);e.startIndex!==e.endIndex&&(r=e.endIndex-e.startIndex),i=(r&&o.cursorInfo&&o.cursorInfo.line===e.end.row&&o.cursorInfo.column===e.end.column?(n=e.start.row,e.start):(n=e.end.row,e.end)).column,o.cursorInfo={line:n,column:i,count:r},o.options.statusBar&&s()}),0):this.aceEditor&&this.curserInfoElements&&(e=this.aceEditor.getCursorPosition(),t=this.aceEditor.getSelectedText(),n=e.row+1,i=e.column+1,r=t.length,o.cursorInfo={line:n,column:i,count:r},this.options.statusBar)&&s()},t._emitSelectionChange=function(){var e;this._selectionChangedHandler&&(e=this.getTextSelection(),this._selectionChangedHandler(e.start,e.end,e.text))},t._refreshAnnotations=function(){var e,t=this.aceEditor&&this.aceEditor.getSession();t&&(e=t.getAnnotations().filter((function(e){return"error"===e.type})),t.setAnnotations(e))},t.destroy=function(){this.aceEditor&&(this.aceEditor.destroy(),this.aceEditor=null),this.frame&&this.container&&this.frame.parentNode===this.container&&this.container.removeChild(this.frame),this.modeSwitcher&&(this.modeSwitcher.destroy(),this.modeSwitcher=null),this.textarea=null,this._debouncedValidate=null,this.frameFocusTracker.destroy()},t.compact=function(){var e=this.get();e=JSON.stringify(e),this.updateText(e)},t.format=function(){var e=this.get();e=JSON.stringify(e,null,this.indentation),this.updateText(e)},t.repair=function(){var e=this.getText();try{var t=(0,i.K)(e);this.updateText(t)}catch(e){}},t.focus=function(){this.textarea&&this.textarea.focus(),this.aceEditor&&this.aceEditor.focus()},t.resize=function(){this.aceEditor&&this.aceEditor.resize(!1)},t.set=function(e){this.setText(JSON.stringify(e,null,this.indentation))},t.update=function(e){this.updateText(JSON.stringify(e,null,this.indentation))},t.get=function(){var e=this.getText();return(0,f.parse)(e)},t.getText=function(){return this.textarea?this.textarea.value:this.aceEditor?this.aceEditor.getValue():""},t._setText=function(e,t){var n,i=this;e=!0===this.options.escapeUnicode?(0,f.escapeUnicodeChars)(e):e,this.textarea&&(this.textarea.value=e),this.aceEditor&&(this.onChangeDisabled=!0,this.aceEditor.setValue(e,-1),this.onChangeDisabled=!1,t&&(n=this,setTimeout((function(){n.aceEditor&&n.aceEditor.session.getUndoManager().reset()}))),setTimeout((function(){i._updateHistoryButtons&&i._updateHistoryButtons()}))),this._debouncedValidate()},t.setText=function(e){this._setText(e,!0)},t.updateText=function(e){this.getText()!==e&&this._setText(e,!1)},t.validate=function(){var t,n=this,i=[],r=[];try{var o=this.get(),s=(this.validateSchema&&!this.validateSchema(o)&&(i=this.validateSchema.errors.map((function(e){return e.type="validation",(0,f.improveSchemaError)(e)}))),this.validationSequence=(this.validationSequence||0)+1,this),a=this.validationSequence;return function(e,t){if(!t)return Promise.resolve([]);try{var n=t(e);return((0,f.isPromise)(n)?n:Promise.resolve(n)).then((function(e){return Array.isArray(e)?e.filter((function(e){var t=(0,f.isValidValidationError)(e);return t||console.warn('Ignoring a custom validation error with invalid structure. Expected structure: {path: [...], message: "..."}. Actual error:',e),t})).map((function(e){return{dataPath:(0,f.stringifyPath)(e.path),message:e.message,type:"customValidation"}})):[]}))}catch(e){return Promise.reject(e)}}(o,this.options.onValidate).then((function(e){return a===s.validationSequence&&(e=i.concat(r).concat(e),s._renderErrors(e),"function"==typeof n.options.onValidationError&&(0,f.isValidationErrorChanged)(e,n.lastSchemaErrors)&&n.options.onValidationError.call(n,e),n.lastSchemaErrors=e),n.lastSchemaErrors}))}catch(e){return this.getText()&&((o=/\w*line\s*(\d+)\w*/g.exec(e.message))&&(t=+o[1]),r=[{type:"error",message:e.message.replace(/\n/g,"<br>"),line:t}]),this._renderErrors(r),"function"==typeof this.options.onValidationError&&(0,f.isValidationErrorChanged)(r,this.lastSchemaErrors)&&this.options.onValidationError.call(this,r),this.lastSchemaErrors=r,Promise.resolve(this.lastSchemaErrors)}},t._validateAndCatch=function(){this.validate().catch((function(e){console.error("Error running validation:",e)}))},t._renderErrors=function(e){var t=this.getText(),n=[];e.reduce((function(e,t){return"string"==typeof t.dataPath&&-1===e.indexOf(t.dataPath)&&e.push(t.dataPath),e}),n),t=(0,f.getPositionForPath)(t,n),this.aceEditor&&(this.annotations=t.map((function(t){var n=e.filter((function(e){return e.dataPath===t.path})),i=n.map((function(e){return e.message})).join("\n");return i?{row:t.line,column:t.column,text:"Schema validation error"+(1!==n.length?"s":"")+": \n"+i,type:"warning",source:"jsoneditor"}:{}})),this._refreshAnnotations()),this.errorTable.setErrors(e,t),this.aceEditor&&this.aceEditor.resize(!1)},t.getTextSelection=function(){var e,t,n,i={};return this.textarea?(n=(0,f.getInputSelection)(this.textarea),this.cursorInfo&&this.cursorInfo.line===n.end.row&&this.cursorInfo.column===n.end.column?(i.start=n.end,i.end=n.start):i=n,{start:i.start,end:i.end,text:this.textarea.value.substring(n.startIndex,n.endIndex)}):this.aceEditor?(n=this.aceEditor.getSelection(),e=this.aceEditor.getSelectedText(),t=n.getRange(),(n=n.getSelectionLead()).row===t.end.row&&n.column===t.end.column?i=t:(i.start=t.end,i.end=t.start),{start:{row:i.start.row+1,column:i.start.column+1},end:{row:i.end.row+1,column:i.end.column+1},text:e}):void 0},t.onTextSelectionChange=function(e){"function"==typeof e&&(this._selectionChangedHandler=(0,f.debounce)(e,this.DEBOUNCE_INTERVAL))},t.setTextSelection=function(e,t){var n,i,r;e&&t&&(this.textarea?(n=(0,f.getIndexForPosition)(this.textarea,e.row,e.column),r=(0,f.getIndexForPosition)(this.textarea,t.row,t.column),-1<n&&-1<r&&(this.textarea.setSelectionRange?(this.textarea.focus(),this.textarea.setSelectionRange(n,r)):this.textarea.createTextRange&&((i=this.textarea.createTextRange()).collapse(!0),i.moveEnd("character",r),i.moveStart("character",n),i.select()),r=(this.textarea.value.match(/\n/g)||[]).length+1,n=this.textarea.scrollHeight/r,i=e.row*n,this.textarea.scrollTop=i>this.textarea.clientHeight?i-this.textarea.clientHeight/2:0)):this.aceEditor&&(r={start:{row:e.row-1,column:e.column-1},end:{row:t.row-1,column:t.column-1}},this.aceEditor.selection.setRange(r),this.aceEditor.scrollToLine(e.row-1,!0)))};var A=[{mode:"text",mixin:t,data:"text",load:I},{mode:"code",mixin:t,data:"text",load:I}]},8038:function(e,t,n){"use strict";n.r(t),n.d(t,{treeModeMixins:function(){return j}});var i={start:function(e,t,n){return 0===t.indexOf(e)},contain:function(e,t,n){return-1<t.indexOf(e)}},r=n(897),o=n(2474);function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,function(e){return e=function(e,t){if("object"!==s(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!==s(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string"),"symbol"===s(e)?e:String(e)}(i.key),i)}}var l=function(){function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.locked=!1}var t,n,i;return t=e,(n=[{key:"highlight",value:function(e){this.locked||(this.node!==e&&(this.node&&this.node.setHighlight(!1),this.node=e,this.node.setHighlight(!0)),this._cancelUnhighlight())}},{key:"unhighlight",value:function(){var e;this.locked||(e=this).node&&(this._cancelUnhighlight(),this.unhighlightTimer=setTimeout((function(){e.node.setHighlight(!1),e.node=void 0,e.unhighlightTimer=void 0}),0))}},{key:"_cancelUnhighlight",value:function(){this.unhighlightTimer&&(clearTimeout(this.unhighlightTimer),this.unhighlightTimer=void 0)}},{key:"lock",value:function(){this.locked=!0}},{key:"unlock",value:function(){this.locked=!1}}])&&a(t.prototype,n),i&&a(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}(),c=n(7907),u=n(6056),h=n(6617),d=(t=n(233),n.n(t)),p=n(2602),g=n(9791),f=n(6210),m=n(2558),v=n(4188);function y(e){return function(e){if(Array.isArray(e))return A(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||I(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=o.call(n)).done)&&(a.push(i.value),a.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw r}}return a}}(e,t)||I(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,t){var n,i,r,o,s="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(s)return i=!(n=!0),{s:function(){s=s.call(e)},n:function(){var e=s.next();return n=e.done,e},e:function(e){i=!0,r=e},f:function(){try{n||null==s.return||s.return()}finally{if(i)throw r}}};if(Array.isArray(e)||(s=I(e))||t&&e&&"number"==typeof e.length)return s&&(e=s),o=0,{s:t=function(){},n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function I(e,t){var n;if(e)return"string"==typeof e?A(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A(e,t):void 0}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function w(e){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function x(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,function(e){return e=function(e,t){if("object"!==w(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!==w(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string"),"symbol"===w(e)?e:String(e)}(i.key),i)}}var S=function(){function e(t,n){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.editor=t,this.dom={},this.expanded=!1,n&&n instanceof Object?(this.setField(n.field,n.fieldEditable),"value"in n&&this.setValue(n.value,n.type),"internalValue"in n&&this.setInternalValue(n.internalValue)):(this.setField(""),this.setValue(null)),this._debouncedOnChangeValue=(0,g.debounce)(this._onChangeValue.bind(this),e.prototype.DEBOUNCE_INTERVAL),this._debouncedOnChangeField=(0,g.debounce)(this._onChangeField.bind(this),e.prototype.DEBOUNCE_INTERVAL),this.visibleChilds=this.getMaxVisibleChilds()}var t,n,i;return t=e,(n=[{key:"getMaxVisibleChilds",value:function(){return this.editor&&this.editor.options&&this.editor.options.maxVisibleChilds?this.editor.options.maxVisibleChilds:k}},{key:"_updateEditability",value:function(){var e,t;this.editable={field:!0,value:!0},this.editor&&(this.editable.field="tree"===this.editor.options.mode,this.editable.value="view"!==this.editor.options.mode,"tree"!==this.editor.options.mode&&"form"!==this.editor.options.mode||"function"!=typeof this.editor.options.onEditable||(e=this.getValue.bind(this),"boolean"==typeof(t=this.editor.options.onEditable({field:this.field,get value(){return e()},path:this.getPath()}))?(this.editable.field=t,this.editable.value=t):"object"===w(t)&&null!==t?("boolean"==typeof t.field&&(this.editable.field=t.field),"boolean"==typeof t.value&&(this.editable.value=t.value)):(console.error("Invalid return value for function onEditable.","Actual value:",t,".","Either a boolean or object { field: boolean, value: boolean } expected."),this.editable.field=!1,this.editable.value=!1)))}},{key:"getPath",value:function(){for(var e=this,t=[];e;){var n=e.getName();void 0!==n&&t.unshift(n),e=e.parent}return t}},{key:"getInternalPath",value:function(){for(var e=this,t=[];e;)e.parent&&t.unshift(e.getIndex()),e=e.parent;return t}},{key:"getName",value:function(){return this.parent?"array"!==this.parent.type?this.field:this.index:void 0}},{key:"findNodeByPath",value:function(e){if(e){if(0===e.length)return this;if(e.length&&this.childs&&this.childs.length)for(var t=0;t<this.childs.length;++t)if(""+e[0]==""+this.childs[t].getName())return this.childs[t].findNodeByPath(e.slice(1))}}},{key:"findNodeByInternalPath",value:function(e){if(e){for(var t=this,n=0;n<e.length&&t;n++){var i=e[n];t=t.childs[i]}return t}}},{key:"serialize",value:function(){return{value:this.getValue(),path:this.getPath()}}},{key:"findNode",value:function(e){for(var t=(0,g.parsePath)(e),n=this;n&&0<t.length;)!function(){var e=t.shift();if("number"==typeof e){if("array"!==n.type)throw new Error("Cannot get child node at index "+e+": node is no array");n=n.childs[e]}else{if("object"!==n.type)throw new Error("Cannot get child node "+e+": node is no object");n=n.childs.filter((function(t){return t.field===e}))[0]}}();return n}},{key:"findParents",value:function(){for(var e=[],t=this.parent;t;)e.unshift(t),t=t.parent;return e}},{key:"setError",value:function(e,t){this.error=e,this.errorChild=t,this.dom&&this.dom.tr&&this.updateError()}},{key:"updateError",value:function(){var e=this,t=this.fieldError||this.valueError||this.error,n=this.dom.tdError;if(t&&this.dom&&this.dom.tr){(0,g.addClassName)(this.dom.tr,"jsoneditor-validation-error"),n||(n=document.createElement("td"),this.dom.tdError=n,this.dom.tdValue.parentNode.appendChild(n));var i=document.createElement("button"),r=(i.type="button",i.className="jsoneditor-button jsoneditor-schema-error",function(){e.dom.popupAnchor&&e.dom.popupAnchor.destroy()}),o=function(){delete e.dom.popupAnchor},s=function(n){var r=e.editor.frame;e.dom.popupAnchor=(0,p.w)(i,e.editor.getPopupAnchor(),o,n),n=i.getBoundingClientRect(),r=120<r.getBoundingClientRect().width-n.x?"jsoneditor-above":"jsoneditor-left",(n=document.createElement("div")).className="jsoneditor-popover "+r,n.appendChild(document.createTextNode(t.message)),e.dom.popupAnchor.appendChild(n)},a=(i.onmouseover=function(){e.dom.popupAnchor||s(!0)},i.onfocus=function(){r(),s(!1)},i.onblur=function(){r()},this.errorChild);for(a&&(i.onclick=function(){a.findParents().forEach((function(e){e.expand(!1)})),a.scrollTo((function(){a.focus()}))});n.firstChild;)n.removeChild(n.firstChild);n.appendChild(i)}else this.dom.tr&&(0,g.removeClassName)(this.dom.tr,"jsoneditor-validation-error"),n&&(this.dom.tdError.parentNode.removeChild(this.dom.tdError),delete this.dom.tdError)}},{key:"getIndex",value:function(){var e;return this.parent?-1!==(e=this.parent.childs.indexOf(this))?e:null:-1}},{key:"setParent",value:function(e){this.parent=e}},{key:"setField",value:function(e,t){this.field=e,this.previousField=e,this.fieldEditable=!0===t}},{key:"getField",value:function(){return void 0===this.field&&this._getDomField(),this.field}},{key:"setValue",value:function(t,n){var i,r,o,s,a,l,c=this.childs;if(this.type=this._getType(t),n&&n!==this.type){if("string"!==n||"auto"!==this.type)throw new Error('Type mismatch: cannot cast value of type "'+this.type+' to the specified type "'+n+'"');this.type=n}if("array"===this.type){for(this.childs||(this.childs=[]),i=0;i<t.length;i++)void 0===(a=t[i])||a instanceof Function||(i<this.childs.length?((o=this.childs[i]).fieldEditable=!1,o.index=i,o.setValue(a)):(o=new e(this.editor,{value:a}),s=i<this.getMaxVisibleChilds(),this.appendChild(o,s,!1)));for(r=this.childs.length;r>=t.length;r--)this.removeChild(this.childs[r],!1)}else if("object"===this.type){for(this.childs||(this.childs=[]),r=this.childs.length-1;0<=r;r--)R(t,this.childs[r].field)||this.removeChild(this.childs[r],!1);for(var u in i=0,t)R(t,u)&&(void 0===(a=t[u])||a instanceof Function||((l=this.findChildByProperty(u))?(l.setField(u,!0),l.setValue(a)):(l=new e(this.editor,{field:u,value:a}),u=i<this.getMaxVisibleChilds(),this.appendChild(l,u,!1))),i++);!(this.value="")===this.editor.options.sortObjectKeys&&this.sort([],"asc",!1)}else this.hideChilds(),delete this.append,delete this.showMore,delete this.expanded,delete this.childs,this.value=t;Array.isArray(c)!==Array.isArray(this.childs)&&this.recreateDom(),this.updateDom({updateIndexes:!0}),this.previousValue=this.value}},{key:"setInternalValue",value:function(t){var n,i,r,o,s,a=this.childs;if(this.type=t.type,"array"===t.type){for(this.childs||(this.childs=[]),o=0;o<t.childs.length;o++)void 0===(n=t.childs[o])||n instanceof Function||(o<this.childs.length?((i=this.childs[o]).fieldEditable=!1,i.index=o,i.setInternalValue(n)):(i=new e(this.editor,{internalValue:n}),r=o<this.getMaxVisibleChilds(),this.appendChild(i,r,!1)));for(s=this.childs.length;s>=t.childs.length;s--)this.removeChild(this.childs[s],!1)}else if("object"===t.type){for(this.childs||(this.childs=[]),o=0;o<t.childs.length;o++)void 0===(n=t.childs[o])||n instanceof Function||(o<this.childs.length?(delete(i=this.childs[o]).index,i.setField(n.field,!0),i.setInternalValue(n.value)):(i=new e(this.editor,{field:n.field,internalValue:n.value}),r=o<this.getMaxVisibleChilds(),this.appendChild(i,r,!1)));for(s=this.childs.length;s>=t.childs.length;s--)this.removeChild(this.childs[s],!1)}else this.hideChilds(),delete this.append,delete this.showMore,delete this.expanded,delete this.childs,this.value=t.value;Array.isArray(a)!==Array.isArray(this.childs)&&this.recreateDom(),this.updateDom({updateIndexes:!0}),this.previousValue=this.value}},{key:"recreateDom",value:function(){var e;this.dom&&this.dom.tr&&this.dom.tr.parentNode?(e=this._detachFromDom(),this.clearDom(),this._attachToDom(e)):this.clearDom()}},{key:"getValue",value:function(){var e,t;return"array"===this.type?(e=[],this.childs.forEach((function(t){e.push(t.getValue())})),e):"object"===this.type?(t={},this.childs.forEach((function(e){t[e.getField()]=e.getValue()})),t):(void 0===this.value&&this._getDomValue(),this.value)}},{key:"getInternalValue",value:function(){return"array"===this.type?{type:this.type,childs:this.childs.map((function(e){return e.getInternalValue()}))}:"object"===this.type?{type:this.type,childs:this.childs.map((function(e){return{field:e.getField(),value:e.getInternalValue()}}))}:(void 0===this.value&&this._getDomValue(),{type:this.type,value:this.value})}},{key:"getLevel",value:function(){return this.parent?this.parent.getLevel()+1:0}},{key:"getNodePath",value:function(){var e=this.parent?this.parent.getNodePath():[];return e.push(this),e}},{key:"clone",value:function(){var t,n;return(t=new e(this.editor)).type=this.type,t.field=this.field,t.fieldInnerText=this.fieldInnerText,t.fieldEditable=this.fieldEditable,t.previousField=this.previousField,t.value=this.value,t.valueInnerText=this.valueInnerText,t.previousValue=this.previousValue,t.expanded=this.expanded,t.visibleChilds=this.visibleChilds,this.childs?(n=[],this.childs.forEach((function(e){(e=e.clone()).setParent(t),n.push(e)})),t.childs=n):t.childs=void 0,t}},{key:"expand",value:function(e){this.childs&&(this.expanded=!0,this.dom.expand&&(this.dom.expand.className="jsoneditor-button jsoneditor-expanded"),this.showChilds(),!1!==e&&this.childs.forEach((function(t){t.expand(e)})),this.updateDom({recurse:!1}))}},{key:"collapse",value:function(e){this.childs&&(this.hideChilds(),!1!==e&&this.childs.forEach((function(t){t.collapse(e)})),this.dom.expand&&(this.dom.expand.className="jsoneditor-button jsoneditor-collapsed"),this.expanded=!1,this.updateDom({recurse:!1}))}},{key:"showChilds",value:function(){if((e=this.childs)&&this.expanded){var e,t=(e=this.dom.tr)?e.parentNode:void 0;if(t){for(var n=this.getAppendDom(),i=(n.parentNode||((r=e.nextSibling)?t.insertBefore(n,r):t.appendChild(n)),Math.min(this.childs.length,this.visibleChilds)),r=this._getNextTr(),o=0;o<i;o++){var s=this.childs[o];s.getDom().parentNode||t.insertBefore(s.getDom(),r),s.showChilds()}e=this.getShowMoreDom(),r=this._getNextTr(),e.parentNode||t.insertBefore(e,r),this.showMore.updateDom()}}}},{key:"_getNextTr",value:function(){return this.showMore&&this.showMore.getDom().parentNode?this.showMore.getDom():this.append&&this.append.getDom().parentNode?this.append.getDom():void 0}},{key:"hide",value:function(e){var t=this.dom.tr,n=t?t.parentNode:void 0;n&&n.removeChild(t),this.dom.popupAnchor&&this.dom.popupAnchor.destroy(),this.hideChilds(e)}},{key:"hideChilds",value:function(e){var t;this.childs&&this.expanded&&((t=this.getAppendDom()).parentNode&&t.parentNode.removeChild(t),this.childs.forEach((function(e){e.hide()})),(t=this.getShowMoreDom()).parentNode&&t.parentNode.removeChild(t),e&&!e.resetVisibleChilds||(this.visibleChilds=this.getMaxVisibleChilds()))}},{key:"_updateCssClassName",value:function(){var e,t;this.dom.field&&this.editor&&this.editor.options&&"function"==typeof this.editor.options.onClassName&&this.dom.tree&&((0,g.removeAllClassNames)(this.dom.tree),e=this.getValue.bind(this),t=this.editor.options.onClassName({path:this.getPath(),field:this.field,get value(){return e()}})||"",(0,g.addClassName)(this.dom.tree,"jsoneditor-values "+t))}},{key:"recursivelyUpdateCssClassesOnNodes",value:function(){if(this._updateCssClassName(),Array.isArray(this.childs))for(var e=0;e<this.childs.length;e++)this.childs[e].recursivelyUpdateCssClassesOnNodes()}},{key:"expandTo",value:function(){for(var e=this.parent;e;)e.expanded||e.expand(),e=e.parent}},{key:"appendChild",value:function(e,t,n){var i,r;this._hasChilds()&&(e.setParent(this),e.fieldEditable="object"===this.type,"array"===this.type&&(e.index=this.childs.length),"object"===this.type&&void 0===e.field&&e.setField(""),this.childs.push(e),this.expanded&&!1!==t&&(t=e.getDom(),r=(i=this._getNextTr())?i.parentNode:void 0,i&&r&&r.insertBefore(t,i),e.showChilds(),this.visibleChilds++),!1!==n)&&(this.updateDom({updateIndexes:!0}),e.updateDom({recurse:!0}))}},{key:"moveBefore",value:function(e,t,n){var i,r,o;this._hasChilds()&&((i=this.dom.tr?this.dom.tr.parentNode:void 0)&&((r=document.createElement("tr")).style.height=i.clientHeight+"px",i.appendChild(r)),e.parent&&e.parent.removeChild(e),t instanceof _||!t?this.childs.length+1>this.visibleChilds?(o=this.childs[this.visibleChilds-1],this.insertBefore(e,o,n)):this.appendChild(e,!0,n):this.insertBefore(e,t,n),i)&&r&&i.removeChild(r)}},{key:"insertBefore",value:function(e,t,n){if(this._hasChilds()){if(this.visibleChilds++,"object"===this.type&&void 0===e.field&&e.setField(""),t===this.append)e.setParent(this),e.fieldEditable="object"===this.type,this.childs.push(e);else{var i=this.childs.indexOf(t);if(-1===i)throw new Error("Node not found");e.setParent(this),e.fieldEditable="object"===this.type,this.childs.splice(i,0,e)}var r;this.expanded&&(i=e.getDom(),r=(t=t.getDom())?t.parentNode:void 0,t&&r&&r.insertBefore(i,t),e.showChilds(),this.showChilds()),!1!==n&&(this.updateDom({updateIndexes:!0}),e.updateDom({recurse:!0}))}}},{key:"insertAfter",value:function(e,t){this._hasChilds()&&(t=this.childs.indexOf(t),(t=this.childs[t+1])?this.insertBefore(e,t):this.appendChild(e))}},{key:"search",value:function(e,t){Array.isArray(t)||(t=[]);var n=e?e.toLowerCase():void 0;return delete this.searchField,delete this.searchValue,void 0!==this.field&&t.length<=this.MAX_SEARCH_RESULTS&&(-1!==String(this.field).toLowerCase().indexOf(n)&&(this.searchField=!0,t.push({node:this,elem:"field"})),this._updateDomField()),this._hasChilds()?this.childs&&this.childs.forEach((function(n){n.search(e,t)})):void 0!==this.value&&t.length<=this.MAX_SEARCH_RESULTS&&(-1!==String(this.value).toLowerCase().indexOf(n)&&(this.searchValue=!0,t.push({node:this,elem:"value"})),this._updateDomValue()),t}},{key:"scrollTo",value:function(e){this.expandPathToNode(),this.dom.tr&&this.dom.tr.parentNode&&this.editor.scrollTo(this.dom.tr.offsetTop,e)}},{key:"expandPathToNode",value:function(){for(var e=this;e&&e.parent;){for(var t="array"===e.parent.type?e.index:e.parent.childs.indexOf(e);e.parent.visibleChilds<t+1;)e.parent.visibleChilds+=this.getMaxVisibleChilds();e.parent.expand(!1),e=e.parent}}},{key:"focus",value:function(t){if(e.focusElement=t,this.dom.tr&&this.dom.tr.parentNode){var n=this.dom;switch(t){case"drag":(n.drag||n.menu).focus();break;case"menu":n.menu.focus();break;case"expand":this._hasChilds()?n.expand.focus():n.field&&this.fieldEditable?(n.field.focus(),(0,g.selectContentEditable)(n.field)):n.value&&!this._hasChilds()?(n.value.focus(),(0,g.selectContentEditable)(n.value)):n.menu.focus();break;case"field":n.field&&this.fieldEditable?(n.field.focus(),(0,g.selectContentEditable)(n.field)):n.value&&!this._hasChilds()?(n.value.focus(),(0,g.selectContentEditable)(n.value)):(this._hasChilds()?n.expand:n.menu).focus();break;default:n.select?n.select.focus():n.value&&!this._hasChilds()?(n.value.focus(),(0,g.selectContentEditable)(n.value)):n.field&&this.fieldEditable?(n.field.focus(),(0,g.selectContentEditable)(n.field)):(this._hasChilds()?n.expand:n.menu).focus()}}}},{key:"containsNode",value:function(e){if(this===e)return!0;var t=this.childs;if(t)for(var n=0,i=t.length;n<i;n++)if(t[n].containsNode(e))return!0;return!1}},{key:"removeChild",value:function(e,t){if(this.childs){var n=this.childs.indexOf(e);if(-1!==n)return n<this.visibleChilds&&this.expanded&&this.visibleChilds--,e.hide(),delete e.searchField,delete e.searchValue,(e=this.childs.splice(n,1)[0]).parent=null,!1!==t&&this.updateDom({updateIndexes:!0}),e}}},{key:"_remove",value:function(e){this.removeChild(e)}},{key:"changeType",value:function(e){var t,n=this.type;n!==e&&("string"!==e&&"auto"!==e||"string"!==n&&"auto"!==n?(t=this._detachFromDom(),this.clearDom(),"object"===(this.type=e)?(this.childs||(this.childs=[]),this.childs.forEach((function(e){e.clearDom(),delete e.index,e.fieldEditable=!0,void 0===e.field&&(e.field="")})),"string"!==n&&"auto"!==n||(this.expanded=!0)):"array"===e?(this.childs||(this.childs=[]),this.childs.forEach((function(e,t){e.clearDom(),e.fieldEditable=!1,e.index=t})),"string"!==n&&"auto"!==n||(this.expanded=!0)):this.expanded=!1,this._attachToDom(t)):this.type=e,"auto"!==e&&"string"!==e||(this.value="string"===e?String(this.value):(0,g.parseString)(String(this.value)),this.focus()),this.updateDom({updateIndexes:!0}))}},{key:"deepEqual",value:function(e){var t;if("array"===this.type){if(!Array.isArray(e))return!1;if(this.childs.length!==e.length)return!1;for(t=0;t<this.childs.length;t++)if(!this.childs[t].deepEqual(e[t]))return!1}else if("object"===this.type){if("object"!==w(e)||!e)return!1;var n=Object.keys(e);if(this.childs.length!==n.length)return!1;for(t=0;t<n.length;t++){var i=this.childs[t];if(i.field!==n[t]||!i.deepEqual(e[i.field]))return!1}}else if(this.value!==e)return!1;return!0}},{key:"_getDomValue",value:function(){if(this._clearValueError(),this.dom.value&&"array"!==this.type&&"object"!==this.type&&(this.valueInnerText=(0,g.getInnerText)(this.dom.value),""===this.valueInnerText)&&""!==this.dom.value.innerHTML&&(this.dom.value.textContent=""),void 0!==this.valueInnerText)try{var e,t;(t="string"===this.type?this._unescapeHTML(this.valueInnerText):(e=this._unescapeHTML(this.valueInnerText),(0,g.parseString)(e)))!==this.value&&(this.value=t,this._debouncedOnChangeValue())}catch(e){this._setValueError((0,c.Iu)("cannotParseValueError"))}}},{key:"_setValueError",value:function(e){this.valueError={message:e},this.updateError()}},{key:"_clearValueError",value:function(){this.valueError&&(this.valueError=null,this.updateError())}},{key:"_setFieldError",value:function(e){this.fieldError={message:e},this.updateError()}},{key:"_clearFieldError",value:function(){this.fieldError&&(this.fieldError=null,this.updateError())}},{key:"_onChangeValue",value:function(){var e,t=this.editor.getDomSelection(),n=(t.range&&(n=(0,g.textDiff)(String(this.value),String(this.previousValue)),t.range.startOffset=n.start,t.range.endOffset=n.end),this.editor.getDomSelection());n.range&&(e=(0,g.textDiff)(String(this.previousValue),String(this.value)),n.range.startOffset=e.start,n.range.endOffset=e.end),this.editor._onAction("editValue",{path:this.getInternalPath(),oldValue:this.previousValue,newValue:this.value,oldSelection:t,newSelection:n}),this.previousValue=this.value}},{key:"_onChangeField",value:function(){var e=this.editor.getDomSelection(),t=this.previousField||"",n=(e.range&&(n=(0,g.textDiff)(this.field,t),e.range.startOffset=n.start,e.range.endOffset=n.end),this.editor.getDomSelection());n.range&&(t=(0,g.textDiff)(t,this.field),n.range.startOffset=t.start,n.range.endOffset=t.end),this.editor._onAction("editField",{parentPath:this.parent.getInternalPath(),index:this.getIndex(),oldValue:this.previousField,newValue:this.field,oldSelection:e,newSelection:n}),this.previousField=this.field}},{key:"_updateDomValue",value:function(){var e=this.dom.value;if(e){var t=["jsoneditor-value"],n=this.value,i="auto"===this.type?(0,g.getType)(n):this.type,r="string"===i&&(0,g.isUrl)(n);if(t.push("jsoneditor-"+i),r&&t.push("jsoneditor-url"),""===String(this.value)&&"array"!==this.type&&"object"!==this.type&&t.push("jsoneditor-empty"),this.searchValueActive&&t.push("jsoneditor-highlight-active"),this.searchValue&&t.push("jsoneditor-highlight"),e.className=t.join(" "),"array"===i||"object"===i?(t=this.childs?this.childs.length:0,e.title=this.type+" containing "+t+" items"):r&&this.editable.value?e.title=(0,c.Iu)("openUrl"):e.title="","boolean"===i&&this.editable.value?(this.dom.checkbox||(this.dom.checkbox=document.createElement("input"),this.dom.checkbox.type="checkbox",this.dom.tdCheckbox=document.createElement("td"),this.dom.tdCheckbox.className="jsoneditor-tree",this.dom.tdCheckbox.appendChild(this.dom.checkbox),this.dom.tdValue.parentNode.insertBefore(this.dom.tdCheckbox,this.dom.tdValue)),this.dom.checkbox.checked=this.value):this.dom.tdCheckbox&&(this.dom.tdCheckbox.parentNode.removeChild(this.dom.tdCheckbox),delete this.dom.tdCheckbox,delete this.dom.checkbox),this.enum&&this.editable.value?(this.dom.select||(this.dom.select=document.createElement("select"),this.id=this.field+"_"+(new Date).getUTCMilliseconds(),this.dom.select.id=this.id,this.dom.select.name=this.dom.select.id,(t=document.createElement("option")).value="",t.textContent="--",this.dom.select.appendChild(t),this._updateEnumOptions(),this.dom.tdSelect=document.createElement("td"),this.dom.tdSelect.className="jsoneditor-tree",this.dom.tdSelect.appendChild(this.dom.select),this.dom.tdValue.parentNode.insertBefore(this.dom.tdSelect,this.dom.tdValue)),this.dom.select.value=-1!==this.enum.indexOf(this.value)?this.value:"",!this.schema||R(this.schema,"oneOf")||R(this.schema,"anyOf")||R(this.schema,"allOf")?delete this.valueFieldHTML:(this.valueFieldHTML=this.dom.tdValue.innerHTML,this.dom.tdValue.style.visibility="hidden",this.dom.tdValue.textContent="")):this.dom.tdSelect&&(this.dom.tdSelect.parentNode.removeChild(this.dom.tdSelect),delete this.dom.tdSelect,delete this.dom.select,this.dom.tdValue.innerHTML=this.valueFieldHTML,this.dom.tdValue.style.visibility="",delete this.valueFieldHTML,this.dom.tdValue.appendChild(this.dom.value)),this.editor.options.colorPicker&&"string"==typeof n&&(0,g.isValidColor)(n)?(this.dom.color||(this.dom.color=document.createElement("div"),this.dom.color.className="jsoneditor-color",this.dom.tdColor=document.createElement("td"),this.dom.tdColor.className="jsoneditor-tree",this.dom.tdColor.appendChild(this.dom.color),this.dom.tdValue.parentNode.insertBefore(this.dom.tdColor,this.dom.tdValue)),(0,g.addClassName)(this.dom.value,"jsoneditor-color-value"),(this.editable.value?g.removeClassName:g.addClassName)(this.dom.color,"jsoneditor-color-readonly"),this.dom.color.style.backgroundColor=n):this._deleteDomColor(),this._showTimestampTag()){if(this.dom.date||(this.dom.date=document.createElement("div"),this.dom.date.className="jsoneditor-date",this.dom.value.parentNode.appendChild(this.dom.date)),r=null,r="function"==typeof this.editor.options.timestampFormat?this.editor.options.timestampFormat({field:this.field,value:this.value,path:this.getPath()}):r){for(;this.dom.date.firstChild;)this.dom.date.removeChild(this.dom.date.firstChild);this.dom.date.appendChild(document.createTextNode(r))}else this.dom.date.textContent=new Date(n).toISOString();this.dom.date.title=new Date(n).toString()}else this.dom.date&&(this.dom.date.parentNode.removeChild(this.dom.date),delete this.dom.date);(0,g.stripFormatting)(e),this._updateDomDefault()}}},{key:"_updateEnumOptions",value:function(){if(this.enum&&this.dom.select){this.dom.select.innerHTML="";for(var e=0;e<this.enum.length;e++){var t=document.createElement("option");t.value=this.enum[e],t.textContent=this.enum[e],this.dom.select.appendChild(t)}}}},{key:"_deleteDomColor",value:function(){this.dom.color&&(this.dom.tdColor.parentNode.removeChild(this.dom.tdColor),delete this.dom.tdColor,delete this.dom.color,(0,g.removeClassName)(this.dom.value,"jsoneditor-color-value"))}},{key:"_updateDomField",value:function(){var e,t=this.dom.field;t&&((e=(0,g.makeFieldTooltip)(this.schema,this.editor.options.language))&&(t.title=e),(""===String(this.field)&&this.parent&&"array"!==this.parent.type?g.addClassName:g.removeClassName)(t,"jsoneditor-empty"),(this.searchFieldActive?g.addClassName:g.removeClassName)(t,"jsoneditor-highlight-active"),(this.searchField?g.addClassName:g.removeClassName)(t,"jsoneditor-highlight"),(0,g.stripFormatting)(t))}},{key:"_getDomField",value:function(e){if(this._clearFieldError(),this.dom.field&&this.fieldEditable&&(this.fieldInnerText=(0,g.getInnerText)(this.dom.field),""===this.fieldInnerText)&&""!==this.dom.field.innerHTML&&(this.dom.field.textContent=""),void 0!==this.fieldInnerText)try{var t=this._unescapeHTML(this.fieldInnerText),n=this.parent.getFieldNames(this);-1!==n.indexOf(t)?e?(t=(0,g.findUniqueName)(t,n))!==this.field&&(this.field=t,this._debouncedOnChangeField()):this._setFieldError((0,c.Iu)("duplicateFieldError")):t!==this.field&&(this.field=t,this._debouncedOnChangeField())}catch(e){this._setFieldError((0,c.Iu)("cannotParseFieldError"))}}},{key:"_updateDomDefault",value:function(){var e;this.schema&&void 0!==this.schema.default&&!this._hasChilds()&&(e=this.dom.select||this.dom.value)&&(this.value===this.schema.default?(e.title=(0,c.Iu)("default"),(0,g.addClassName)(e,"jsoneditor-is-default"),g.removeClassName):(e.removeAttribute("title"),(0,g.removeClassName)(e,"jsoneditor-is-default"),g.addClassName))(e,"jsoneditor-is-not-default")}},{key:"_showTimestampTag",value:function(){var e,t;return"number"==typeof this.value&&("function"==typeof(e=this.editor.options.timestampTag)?"boolean"==typeof(t=e({field:this.field,value:this.value,path:this.getPath()}))?t:(0,g.isTimestamp)(this.field,this.value):!0===e&&(0,g.isTimestamp)(this.field,this.value))}},{key:"clearDom",value:function(){this.dom={}}},{key:"getDom",value:function(){var e,t,n=this.dom;return n.tr||(this._updateEditability(),n.tr=document.createElement("tr"),"tree"===(n.tr.node=this).editor.options.mode&&(t=document.createElement("td"),this.editable.field&&this.parent&&((e=document.createElement("button")).type="button",(n.drag=e).className="jsoneditor-button jsoneditor-dragarea",e.title=(0,c.Iu)("drag"),t.appendChild(e)),n.tr.appendChild(t),e=document.createElement("td"),(t=document.createElement("button")).type="button",(n.menu=t).className="jsoneditor-button jsoneditor-contextmenu-button",t.title=(0,c.Iu)("actionsMenu"),e.appendChild(n.menu),n.tr.appendChild(e)),t=document.createElement("td"),n.tr.appendChild(t),n.tree=this._createDomTree(),t.appendChild(n.tree),this.updateDom({updateIndexes:!0})),n.tr}},{key:"isVisible",value:function(){return this.dom&&this.dom.tr&&this.dom.tr.parentNode||!1}},{key:"isDescendantOf",value:function(e){for(var t=this.parent;t;){if(t===e)return!0;t=t.parent}return!1}},{key:"_createDomField",value:function(){return document.createElement("div")}},{key:"setHighlight",value:function(e){this.dom.tr&&((e?g.addClassName:g.removeClassName)(this.dom.tr,"jsoneditor-highlight"),this.append&&this.append.setHighlight(e),this.childs)&&this.childs.forEach((function(t){t.setHighlight(e)}))}},{key:"setSelected",value:function(e,t){this.selected=e,this.dom.tr&&((e?g.addClassName:g.removeClassName)(this.dom.tr,"jsoneditor-selected"),(t?g.addClassName:g.removeClassName)(this.dom.tr,"jsoneditor-first"),this.append&&this.append.setSelected(e),this.showMore&&this.showMore.setSelected(e),this.childs)&&this.childs.forEach((function(t){t.setSelected(e)}))}},{key:"updateValue",value:function(e){this.value=e,this.previousValue=e,this.valueError=void 0,this.updateDom()}},{key:"updateField",value:function(e){this.field=e,this.previousField=e,this.fieldError=void 0,this.updateDom()}},{key:"updateDom",value:function(t){var n,i;(i=this.dom.tree)&&(i.style.marginLeft=24*this.getLevel()+"px"),(i=this.dom.field)&&(this.fieldEditable?(i.contentEditable=this.editable.field,i.spellcheck=!1,i.className="jsoneditor-field"):(i.contentEditable=!1,i.className="jsoneditor-readonly"),n=void 0!==this.index?this.index:void 0!==this.field?this.field:(n=this.editor.options.schema?e._findSchema(this.editor.options.schema,this.editor.options.schemaRefs||{},this.getPath()):void 0)&&n.title?n.title:this._hasChilds()?this.type:"",n=this._escapeHTML(n),document.activeElement!==i&&n!==this._unescapeHTML((0,g.getInnerText)(i))&&(i.innerHTML=n),this._updateSchema(),this._updateEnumOptions()),(i=this.dom.value)&&("array"===this.type||"object"===this.type?this.updateNodeName():(n=this._escapeHTML(this.value),document.activeElement!==i&&n!==this._unescapeHTML((0,g.getInnerText)(i))&&(i.innerHTML=n))),(i=this.dom.tr)&&("array"===this.type||"object"===this.type?((0,g.addClassName)(i,"jsoneditor-expandable"),this.expanded?((0,g.addClassName)(i,"jsoneditor-expanded"),(0,g.removeClassName)(i,"jsoneditor-collapsed")):((0,g.addClassName)(i,"jsoneditor-collapsed"),(0,g.removeClassName)(i,"jsoneditor-expanded"))):((0,g.removeClassName)(i,"jsoneditor-expandable"),(0,g.removeClassName)(i,"jsoneditor-expanded"),(0,g.removeClassName)(i,"jsoneditor-collapsed"))),this._updateDomField(),this._updateDomValue(),t&&!0===t.updateIndexes&&this._updateDomIndexes(),t&&!0===t.recurse&&this.childs&&this.childs.forEach((function(e){e.updateDom(t)})),this.error&&this.updateError(),this.append&&this.append.updateDom(),this.showMore&&this.showMore.updateDom(),this._updateCssClassName()}},{key:"_updateSchema",value:function(){this.editor&&this.editor.options&&(this.schema=this.editor.options.schema?e._findSchema(this.editor.options.schema,this.editor.options.schemaRefs||{},this.getPath()):null,this.schema?this.enum=e._findEnum(this.schema):delete this.enum)}},{key:"_updateDomIndexes",value:function(){var e=this.dom.value,t=this.childs;e&&t&&("array"===this.type?t.forEach((function(e,t){e.index=t,(e=e.dom.field)&&(e.textContent=t)})):"object"===this.type&&t.forEach((function(e){void 0!==e.index&&(delete e.index,void 0===e.field)&&(e.field="")})))}},{key:"_createDomValue",value:function(){var e;return"array"===this.type?(e=document.createElement("div")).textContent="[...]":"object"===this.type?(e=document.createElement("div")).textContent="{...}":(!this.editable.value&&(0,g.isUrl)(this.value)?(e=document.createElement("a")).href=this.value:((e=document.createElement("div")).contentEditable=this.editable.value,e.spellcheck=!1),e.innerHTML=this._escapeHTML(this.value)),e}},{key:"_createDomExpandButton",value:function(){var e=document.createElement("button");return e.type="button",this._hasChilds()?(e.className=this.expanded?"jsoneditor-button jsoneditor-expanded":"jsoneditor-button jsoneditor-collapsed",e.title=(0,c.Iu)("expandTitle")):(e.className="jsoneditor-button jsoneditor-invisible",e.title=""),e}},{key:"_createDomTree",value:function(){var e=this.dom,t=document.createElement("table"),n=document.createElement("tbody"),i=(t.style.borderCollapse="collapse",t.className="jsoneditor-values",t.appendChild(n),document.createElement("tr"));return((((n.appendChild(i),n=document.createElement("td")).className="jsoneditor-tree",i.appendChild(n),e.expand=this._createDomExpandButton(),n.appendChild(e.expand),e.tdExpand=n,n=document.createElement("td")).className="jsoneditor-tree",i.appendChild(n),e.field=this._createDomField(),n.appendChild(e.field),e.tdField=n,n=document.createElement("td")).className="jsoneditor-tree",i.appendChild(n),"object"!==this.type&&"array"!==this.type&&(n.appendChild(document.createTextNode(":")),n.className="jsoneditor-separator"),e.tdSeparator=n,n=document.createElement("td")).className="jsoneditor-tree",i.appendChild(n),e.value=this._createDomValue(),n.appendChild(e.value),e.tdValue=n,t}},{key:"onEvent",value:function(e){var t,n=e.type,i=e.target||e.srcElement,r=this.dom,o=this,s=this._hasChilds(),a=(i!==r.drag&&i!==r.menu||("mouseover"===n?this.editor.highlighter.highlight(this):"mouseout"===n&&this.editor.highlighter.unhighlight()),"click"===n&&i===r.menu&&((t=o.editor.highlighter).highlight(o),t.lock(),(0,g.addClassName)(r.menu,"jsoneditor-selected"),this.showContextMenu(r.menu,(function(){(0,g.removeClassName)(r.menu,"jsoneditor-selected"),t.unlock(),t.unhighlight()}))),"click"===n&&i===r.expand&&s&&(h=e.ctrlKey,this._onExpand(h)),"click"!==n||e.target!==o.dom.tdColor&&e.target!==o.dom.color||!this.editable.value||this._showColorPicker(),"change"===n&&i===r.checkbox&&(this.dom.value.textContent=String(!this.value),this._getDomValue(),this._updateDomDefault()),"change"===n&&i===r.select&&(this.dom.value.innerHTML=this._escapeHTML(r.select.value),this._getDomValue(),this._updateDomValue()),r.value);if(i===a)switch(n){case"blur":case"change":this._getDomValue(),this._clearValueError(),this._updateDomValue();var l=this._escapeHTML(this.value);l!==this._unescapeHTML((0,g.getInnerText)(a))&&(a.innerHTML=l);break;case"input":case"keyup":this._getDomValue(),this._updateDomValue();break;case"keydown":case"mousedown":this.editor.selection=this.editor.getDomSelection();break;case"click":e.ctrlKey&&this.editable.value&&(0,g.isUrl)(this.value)&&(e.preventDefault(),window.open(this.value,"_blank","noreferrer"));break;case"cut":case"paste":setTimeout((function(){o._getDomValue(),o._updateDomValue()}),1)}var c=r.field;if(i===c)switch(n){case"blur":this._getDomField(!0),this._updateDomField();var u=this._escapeHTML(this.field);u!==this._unescapeHTML((0,g.getInnerText)(c))&&(c.innerHTML=u);break;case"input":this._getDomField(),this._updateSchema(),this._updateDomField(),this._updateDomValue();break;case"keydown":case"mousedown":this.editor.selection=this.editor.getDomSelection();break;case"keyup":this._getDomField(),this._updateDomField();break;case"cut":case"paste":setTimeout((function(){o._getDomField(),o._updateDomField()}),1)}var h=r.tree;h&&i===h.parentNode&&"click"===n&&!e.hasMoved&&((void 0!==e.offsetX?e.offsetX<24*(this.getLevel()+1):e.pageX<(0,g.getAbsoluteLeft)(r.tdSeparator))||s?c&&((0,g.setEndOfContentEditable)(c),c.focus()):a&&!this.enum&&((0,g.setEndOfContentEditable)(a),a.focus())),(i!==r.tdExpand||s)&&i!==r.tdField&&i!==r.tdSeparator||"click"!==n||e.hasMoved||c&&((0,g.setEndOfContentEditable)(c),c.focus()),"keydown"===n&&this.onKeyDown(e),"function"==typeof this.editor.options.onEvent&&this._onEvent(e)}},{key:"_onEvent",value:function(e){var t=(n=e.target)===this.dom.field,n=n===this.dom.value||n===this.dom.checkbox||n===this.dom.select;(t||n)&&(t={field:this.getField(),path:this.getPath()},n&&!this._hasChilds()&&(t.value=this.getValue()),this.editor.options.onEvent(t,e))}},{key:"onKeyDown",value:function(t){var n,i,r,o,s,a,l,c,u,h,d,p,f,m,v=t.which||t.keyCode,y=t.target||t.srcElement,C=t.ctrlKey,b=t.shiftKey,I=t.altKey,A=!1,w="tree"===this.editor.options.mode,x=0<this.editor.multiselection.nodes.length?this.editor.multiselection.nodes:[this],S=x[0],k=x[x.length-1];13===v?y===this.dom.value?this.editable.value&&!t.ctrlKey||(0,g.isUrl)(this.value)&&(window.open(this.value,"_blank","noreferrer"),A=!0):y===this.dom.expand&&this._hasChilds()&&(f=t.ctrlKey,this._onExpand(f),y.focus(),A=!0):68===v?C&&w&&(e.onDuplicate(x),A=!0):69===v?C&&(this._onExpand(b),y.focus(),A=!0):77===v&&w?C&&(this.showContextMenu(y),A=!0):46===v&&w?C&&(e.onRemove(x),A=!0):45===v&&w?C&&!b?(this._onInsertBefore(),A=!0):C&&b&&(this._onInsertAfter(),A=!0):35===v?I&&((f=this._lastNode())&&f.focus(e.focusElement||this._getElementName(y)),A=!0):36===v?I&&((f=this._firstNode())&&f.focus(e.focusElement||this._getElementName(y)),A=!0):37===v?I&&!b?((f=this._previousElement(y))&&this.focus(this._getElementName(f)),A=!0):I&&b&&w&&(f=k.expanded?(f=k.getAppendDom())?f.nextSibling:void 0:k.getDom().nextSibling)&&(d=e.getNodeFromTarget(f),f=f.nextSibling,p=e.getNodeFromTarget(f),d)&&d instanceof _&&1!==k.parent.childs.length&&p&&p.parent&&(i=this.editor.getDomSelection(),r=(o=S.parent).childs[k.getIndex()+1]||o.append,s=S.getIndex(),a=p.getIndex(),l=o.getInternalPath(),c=p.parent.getInternalPath(),x.forEach((function(e){p.parent.moveBefore(e,p)})),this.focus(e.focusElement||this._getElementName(y)),this.editor._onAction("moveNodes",{count:x.length,fieldNames:x.map(T),oldParentPath:o.getInternalPath(),newParentPath:S.parent.getInternalPath(),oldIndex:r.getIndex(),newIndex:S.getIndex(),oldIndexRedo:s,newIndexRedo:a,oldParentPathRedo:l,newParentPathRedo:c,oldSelection:i,newSelection:this.editor.getDomSelection()})):38===v?I&&!b?((n=this._previousNode())&&(this.editor.deselect(!0),n.focus(e.focusElement||this._getElementName(y))),A=!0):!I&&C&&b&&w?((n=this._previousNode())&&((h=this.editor.multiselection).start=h.start||this,h.end=n,u=this.editor._findTopLevelNodes(h.start,h.end),this.editor.select(u),n.focus("field")),A=!0):I&&b&&w&&((n=S._previousNode())&&n.parent&&(i=this.editor.getDomSelection(),r=(o=S.parent).childs[k.getIndex()+1]||o.append,s=S.getIndex(),a=n.getIndex(),l=o.getInternalPath(),c=n.parent.getInternalPath(),x.forEach((function(e){n.parent.moveBefore(e,n)})),this.focus(e.focusElement||this._getElementName(y)),this.editor._onAction("moveNodes",{count:x.length,fieldNames:x.map(T),oldParentPath:o.getInternalPath(),newParentPath:S.parent.getInternalPath(),oldIndex:r.getIndex(),newIndex:S.getIndex(),oldIndexRedo:s,newIndexRedo:a,oldParentPathRedo:l,newParentPathRedo:c,oldSelection:i,newSelection:this.editor.getDomSelection()})),A=!0):39===v?I&&!b?((f=this._nextElement(y))&&this.focus(this._getElementName(f)),A=!0):I&&b&&w&&(f=S.getDom().previousSibling)&&(n=e.getNodeFromTarget(f))&&n.parent&&!n.isVisible()&&(i=this.editor.getDomSelection(),r=(o=S.parent).childs[k.getIndex()+1]||o.append,s=S.getIndex(),a=n.getIndex(),l=o.getInternalPath(),c=n.parent.getInternalPath(),x.forEach((function(e){n.parent.moveBefore(e,n)})),this.focus(e.focusElement||this._getElementName(y)),this.editor._onAction("moveNodes",{count:x.length,fieldNames:x.map(T),oldParentPath:o.getInternalPath(),newParentPath:S.parent.getInternalPath(),oldIndex:r.getIndex(),newIndex:S.getIndex(),oldIndexRedo:s,newIndexRedo:a,oldParentPathRedo:l,newParentPathRedo:c,oldSelection:i,newSelection:this.editor.getDomSelection()})):40===v&&(I&&!b?((d=this._nextNode())&&(this.editor.deselect(!0),d.focus(e.focusElement||this._getElementName(y))),A=!0):!I&&C&&b&&w?((d=this._nextNode())&&((h=this.editor.multiselection).start=h.start||this,h.end=d,u=this.editor._findTopLevelNodes(h.start,h.end),this.editor.select(u),d.focus("field")),A=!0):I&&b&&w&&((m=(d=(d=(d=k.expanded?k.append?k.append._nextNode():void 0:k._nextNode())&&!d.isVisible()?d.parent.showMore:d)&&d instanceof _?k:d)&&(d._nextNode()||d.parent.append))&&m.parent&&(i=this.editor.getDomSelection(),r=(o=S.parent).childs[k.getIndex()+1]||o.append,s=S.getIndex(),a=m.getIndex(),l=o.getInternalPath(),c=m.parent.getInternalPath(),x.forEach((function(e){m.parent.moveBefore(e,m)})),this.focus(e.focusElement||this._getElementName(y)),this.editor._onAction("moveNodes",{count:x.length,fieldNames:x.map(T),oldParentPath:o.getInternalPath(),newParentPath:S.parent.getInternalPath(),oldParentPathRedo:l,newParentPathRedo:c,oldIndexRedo:s,newIndexRedo:a,oldIndex:r.getIndex(),newIndex:S.getIndex(),oldSelection:i,newSelection:this.editor.getDomSelection()})),A=!0)),A&&(t.preventDefault(),t.stopPropagation())}},{key:"_onExpand",value:function(e){var t,n,i;e&&(i=(n=(t=this.dom.tr.parentNode).parentNode).scrollTop,n.removeChild(t)),this.expanded?this.collapse(e):this.expand(e),e&&(n.appendChild(t),n.scrollTop=i),"function"==typeof this.editor.options.onExpand&&this.editor.options.onExpand({path:this.getPath(),isExpand:this.expanded,recursive:e})}},{key:"_showColorPicker",value:function(){var e,t;"function"==typeof this.editor.options.onColorPicker&&this.dom.color&&((e=this)._deleteDomColor(),e.updateDom(),t=(0,p.w)(this.dom.color,this.editor.getPopupAnchor()),this.editor.options.onColorPicker(t,this.value,(function(t){"string"==typeof t&&t!==e.value&&(e._deleteDomColor(),e.value=t,e.updateDom(),e._debouncedOnChangeValue())})))}},{key:"getFieldNames",value:function(e){return"object"===this.type?this.childs.filter((function(t){return t!==e})).map((function(e){return e.field})):[]}},{key:"_onInsertBefore",value:function(t,n,i){var r=this.editor.getDomSelection();(t=new e(this.editor,{field:void 0!==t?t:"",value:void 0!==n?n:"",type:i})).expand(!0),n=this.getInternalPath(),this.parent.insertBefore(t,this),this.editor.highlighter.unhighlight(),t.focus("field"),i=this.editor.getDomSelection(),this.editor._onAction("insertBeforeNodes",{nodes:[t],paths:[t.getInternalPath()],beforePath:n,parentPath:this.parent.getInternalPath(),oldSelection:r,newSelection:i})}},{key:"_onInsertAfter",value:function(t,n,i){var r=this.editor.getDomSelection();(t=new e(this.editor,{field:void 0!==t?t:"",value:void 0!==n?n:"",type:i})).expand(!0),this.parent.insertAfter(t,this),this.editor.highlighter.unhighlight(),t.focus("field"),n=this.editor.getDomSelection(),this.editor._onAction("insertAfterNodes",{nodes:[t],paths:[t.getInternalPath()],afterPath:this.getInternalPath(),parentPath:this.parent.getInternalPath(),oldSelection:r,newSelection:n})}},{key:"_onAppend",value:function(t,n,i){var r=this.editor.getDomSelection();(t=new e(this.editor,{field:void 0!==t?t:"",value:void 0!==n?n:"",type:i})).expand(!0),this.parent.appendChild(t),this.editor.highlighter.unhighlight(),t.focus("field"),n=this.editor.getDomSelection(),this.editor._onAction("appendNodes",{nodes:[t],paths:[t.getInternalPath()],parentPath:this.parent.getInternalPath(),oldSelection:r,newSelection:n})}},{key:"_onChangeType",value:function(e){var t,n,i=this.type;e!==i&&(t=this.editor.getDomSelection(),this.changeType(e),n=this.editor.getDomSelection(),this.editor._onAction("changeType",{path:this.getInternalPath(),oldType:i,newType:e,oldSelection:t,newSelection:n}))}},{key:"sort",value:function(e,t){var n,i,r=!(2<arguments.length&&void 0!==arguments[2])||arguments[2];"string"==typeof e&&(e=(0,g.parsePath)(e)),this._hasChilds()&&(this.hideChilds(),n=this.childs,this.childs=this.childs.concat(),i="desc"===t?-1:1,"object"===this.type?this.childs.sort((function(e,t){return i*d()(e.field,t.field)})):this.childs.sort((function(t,n){return t=t.getNestedChild(e),n=n.getNestedChild(e),t?n?(t=t.value,n=n.value,"string"!=typeof t&&"string"!=typeof n?n<t?i:t<n?-i:0:i*d()(t,n)):-i:i})),this._updateDomIndexes(),this.showChilds(),!0===r)&&this.editor._onAction("sort",{path:this.getInternalPath(),oldChilds:n,newChilds:this.childs})}},{key:"update",value:function(e){var t=this.getInternalValue();this.setValue(e),this.editor._onAction("transform",{path:this.getInternalPath(),oldValue:t,newValue:this.getInternalValue()})}},{key:"_detachFromDom",value:function(){var e=this.dom.tr?this.dom.tr.parentNode:void 0,t=(t=this.expanded?this.getAppendDom():this.getDom())&&t.parentNode?t.nextSibling:void 0;return this.hide({resetVisibleChilds:!1}),{table:e,nextTr:t}}},{key:"_attachToDom",value:function(e){e.table&&(e.nextTr?e.table.insertBefore(this.getDom(),e.nextTr):e.table.appendChild(this.getDom())),this.expanded&&this.showChilds()}},{key:"transform",value:function(e){if(this._hasChilds()){this.hideChilds();try{var t=this.getInternalValue(),n=this.getValue(),i=this.editor.options.executeQuery(n,e),r=(this.setValue(i),this.getInternalValue());this.editor._onAction("transform",{path:this.getInternalPath(),oldValue:t,newValue:r}),this.showChilds()}catch(e){this.showChilds(),this.editor._onError(e)}}}},{key:"extract",value:function(){this.editor.node.hideChilds(),this.hideChilds();try{var e=this.editor.node.getInternalValue(),t=(this.editor._setRoot(this),this.editor.node.getInternalValue());this.editor._onAction("transform",{path:this.editor.node.getInternalPath(),oldValue:e,newValue:t})}catch(e){this.editor._onError(e)}finally{this.updateDom({recurse:!0}),this.showChilds()}}},{key:"getNestedChild",value:function(e){for(var t=0,n=this;n&&t<e.length;)n=n.findChildByProperty(e[t]),t++;return n}},{key:"findChildByProperty",value:function(e){if("object"===this.type)return this.childs.find((function(t){return t.field===e}))}},{key:"getAppendDom",value:function(){return this.append||(this.append=new _(this.editor),this.append.setParent(this)),this.append.getDom()}},{key:"getShowMoreDom",value:function(){return this.showMore||(this.showMore=new L(this.editor,this)),this.showMore.getDom()}},{key:"nextSibling",value:function(){var e=this.parent.childs.indexOf(this);return this.parent.childs[e+1]||this.parent.append}},{key:"_previousNode",value:function(){var t=null,n=this.getDom();if(n&&n.parentNode)for(var i=n;i=i.previousSibling,t=e.getNodeFromTarget(i),i&&t&&t instanceof _&&!t.isVisible(););return t}},{key:"_nextNode",value:function(){var t=null,n=this.getDom();if(n&&n.parentNode)for(var i=n;i=i.nextSibling,t=e.getNodeFromTarget(i),i&&t&&t instanceof _&&!t.isVisible(););return t}},{key:"_firstNode",value:function(){var t=null,n=this.getDom();return n&&n.parentNode&&(n=n.parentNode.firstChild,t=e.getNodeFromTarget(n)),t}},{key:"_lastNode",value:function(){var t=null,n=this.getDom();if(n&&n.parentNode){var i=n.parentNode.lastChild;for(t=e.getNodeFromTarget(i);i&&t&&!t.isVisible();)i=i.previousSibling,t=e.getNodeFromTarget(i)}return t}},{key:"_previousElement",value:function(e){var t=this.dom;switch(e){case t.value:if(this.fieldEditable)return t.field;case t.field:if(this._hasChilds())return t.expand;case t.expand:return t.menu;case t.menu:if(t.drag)return t.drag;default:return null}}},{key:"_nextElement",value:function(e){var t=this.dom;switch(e){case t.drag:return t.menu;case t.menu:if(this._hasChilds())return t.expand;case t.expand:if(this.fieldEditable)return t.field;case t.field:if(!this._hasChilds())return t.value;default:return null}}},{key:"_getElementName",value:function(e){var t=this;return Object.keys(this.dom).find((function(n){return t.dom[n]===e}))}},{key:"_hasChilds",value:function(){return"array"===this.type||"object"===this.type}},{key:"addTemplates",value:function(e,t){var n=this,i=n.editor.options.templates;null!=i&&(i.length&&e.push({type:"separator"}),i.forEach((function(i){e.push({text:i.text,className:i.className||"jsoneditor-type-object",title:i.title,click:(t?function(e,t){n._onAppend(e,t)}:function(e,t){n._onInsertBefore(e,t)}).bind(this,i.field,i.value)})})))}},{key:"showContextMenu",value:function(t,n){var i,o=this,s=[];this.editable.value&&s.push({text:(0,c.Iu)("type"),title:(0,c.Iu)("typeTitle"),className:"jsoneditor-type-"+this.type,submenu:[{text:(0,c.Iu)("auto"),className:"jsoneditor-type-auto"+("auto"===this.type?" jsoneditor-selected":""),title:(0,c.Iu)("autoType"),click:function(){o._onChangeType("auto")}},{text:(0,c.Iu)("array"),className:"jsoneditor-type-array"+("array"===this.type?" jsoneditor-selected":""),title:(0,c.Iu)("arrayType"),click:function(){o._onChangeType("array")}},{text:(0,c.Iu)("object"),className:"jsoneditor-type-object"+("object"===this.type?" jsoneditor-selected":""),title:(0,c.Iu)("objectType"),click:function(){o._onChangeType("object")}},{text:(0,c.Iu)("string"),className:"jsoneditor-type-string"+("string"===this.type?" jsoneditor-selected":""),title:(0,c.Iu)("stringType"),click:function(){o._onChangeType("string")}}]}),this._hasChilds()&&(this.editor.options.enableSort&&s.push({text:(0,c.Iu)("sort"),title:(0,c.Iu)("sortTitle",{type:this.type}),className:"jsoneditor-sort-asc",click:function(){o.showSortModal()}}),this.editor.options.enableTransform&&s.push({text:(0,c.Iu)("transform"),title:(0,c.Iu)("transformTitle",{type:this.type}),className:"jsoneditor-transform",click:function(){o.showTransformModal()}}),this.parent)&&s.push({text:(0,c.Iu)("extract"),title:(0,c.Iu)("extractTitle",{type:this.type}),className:"jsoneditor-extract",click:function(){o.extract()}}),this.parent&&this.parent._hasChilds()&&(s.length&&s.push({type:"separator"}),i=o.parent.childs,o===i[i.length-1]&&(i=[{text:(0,c.Iu)("auto"),className:"jsoneditor-type-auto",title:(0,c.Iu)("autoType"),click:function(){o._onAppend("","","auto")}},{text:(0,c.Iu)("array"),className:"jsoneditor-type-array",title:(0,c.Iu)("arrayType"),click:function(){o._onAppend("",[])}},{text:(0,c.Iu)("object"),className:"jsoneditor-type-object",title:(0,c.Iu)("objectType"),click:function(){o._onAppend("",{})}},{text:(0,c.Iu)("string"),className:"jsoneditor-type-string",title:(0,c.Iu)("stringType"),click:function(){o._onAppend("","","string")}}],o.addTemplates(i,!0),s.push({text:(0,c.Iu)("appendText"),title:(0,c.Iu)("appendTitle"),submenuTitle:(0,c.Iu)("appendSubmenuTitle"),className:"jsoneditor-append",click:function(){o._onAppend("","","auto")},submenu:i})),i=[{text:(0,c.Iu)("auto"),className:"jsoneditor-type-auto",title:(0,c.Iu)("autoType"),click:function(){o._onInsertBefore("","","auto")}},{text:(0,c.Iu)("array"),className:"jsoneditor-type-array",title:(0,c.Iu)("arrayType"),click:function(){o._onInsertBefore("",[])}},{text:(0,c.Iu)("object"),className:"jsoneditor-type-object",title:(0,c.Iu)("objectType"),click:function(){o._onInsertBefore("",{})}},{text:(0,c.Iu)("string"),className:"jsoneditor-type-string",title:(0,c.Iu)("stringType"),click:function(){o._onInsertBefore("","","string")}}],o.addTemplates(i,!1),s.push({text:(0,c.Iu)("insert"),title:(0,c.Iu)("insertTitle"),submenuTitle:(0,c.Iu)("insertSub"),className:"jsoneditor-insert",click:function(){o._onInsertBefore("","","auto")},submenu:i}),this.editable.field)&&(s.push({text:(0,c.Iu)("duplicateText"),title:(0,c.Iu)("duplicateField"),className:"jsoneditor-duplicate",click:function(){e.onDuplicate(o)}}),s.push({text:(0,c.Iu)("removeText"),title:(0,c.Iu)("removeField"),className:"jsoneditor-remove",click:function(){e.onRemove(o)}})),this.editor.options.onCreateMenu&&(i=o.getPath(),s=this.editor.options.onCreateMenu(s,{type:"single",path:i,paths:[i]})),new r.x(s,{close:n}).show(t,this.editor.getPopupAnchor())}},{key:"showSortModal",value:function(){var e=this,t=this.editor.options.modalAnchor||v.qD,n=this.getValue();(0,f.showSortModal)(t,n,(function(t){var n=t.path;n=(0,g.parsePath)(n),e.sortedBy=t,e.sort(n,t.direction)}),e.sortedBy)}},{key:"showTransformModal",value:function(){var e=this,t=(r=this.editor.options).modalAnchor,n=r.createQuery,i=r.executeQuery,r=r.queryDescription,o=this.getValue();(0,m.showTransformModal)({container:t||v.qD,json:o,queryDescription:r,createQuery:n,executeQuery:i,onTransform:function(t){e.transform(t)}})}},{key:"_getType",value:function(e){return e instanceof Array?"array":e instanceof Object?"object":"string"==typeof e&&"string"!=typeof(0,g.parseString)(e)?"string":"auto"}},{key:"_escapeHTML",value:function(e){return"string"!=typeof e?String(e):(e=String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/ {2}/g," ").replace(/^ /," ").replace(/ $/," "),e=(e=JSON.stringify(e)).substring(1,e.length-1),!0===this.editor.options.escapeUnicode?(0,g.escapeUnicodeChars)(e):e)}},{key:"_unescapeHTML",value:function(e){return e='"'+this._escapeJSON(e)+'"',(0,g.parse)(e).replace(/</g,"<").replace(/>/g,">").replace(/ |\u00A0/g," ").replace(/&/g,"&")}},{key:"_escapeJSON",value:function(e){for(var t="",n=0;n<e.length;){var i=e.charAt(n);"\n"===i?t+="\\n":"\\"===i?(t+=i,n++,""!==(i=e.charAt(n))&&-1!=='"\\/bfnrtu'.indexOf(i)||(t+="\\"),t+=i):t+='"'===i?'\\"':i,n++}return t}},{key:"updateNodeName",value:function(){var e=this.childs?this.childs.length:0;if("object"===this.type||"array"===this.type){if(this.editor.options.onNodeName)try{var t=this.getValue.bind(this),n=this.editor.options.onNodeName({path:this.getPath(),size:e,type:this.type,get value(){return t()}})}catch(e){console.error("Error in onNodeName callback: ",e)}this.dom.value.textContent="object"===this.type?"{"+(n||e)+"}":"["+(n||e)+"]"}}},{key:"recursivelyUpdateNodeName",value:function(){if(this.expanded&&(this.updateNodeName(),"undefined"!==this.childs))for(var e in this.childs)this.childs[e].recursivelyUpdateNodeName()}}])&&x(t.prototype,n),i&&x(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}(),k=(S.prototype.DEBOUNCE_INTERVAL=150,S.prototype.MAX_SEARCH_RESULTS=999,100);function E(e){return e.getInternalPath()}function T(e){return e.getField()}function R(e,t){return Object.prototype.hasOwnProperty.call(e,t)}S.focusElement=void 0,S.select=function(e){setTimeout((function(){(0,g.selectContentEditable)(e)}),0)},S.onDragStart=function(e,t){if(!Array.isArray(e))return S.onDragStart([e],t);var n,i,r,o,s;0!==e.length&&(n=e[0],i=e[e.length-1],r=n.parent,s=S.getNodeFromTarget(t.target),o=n.editor,s=(0,g.getAbsoluteTop)(s.dom.tr)-(0,g.getAbsoluteTop)(n.dom.tr),o.mousemove||(o.mousemove=(0,g.addEventListener)(t.view,"mousemove",(function(t){S.onDrag(e,t)}))),o.mouseup||(o.mouseup=(0,g.addEventListener)(t.view,"mouseup",(function(t){S.onDragEnd(e,t)}))),o.highlighter.lock(),o.drag={oldCursor:document.body.style.cursor,oldSelection:o.getDomSelection(),oldPaths:e.map(E),oldParent:r,oldNextNode:r.childs[i.getIndex()+1]||r.append,oldParentPathRedo:r.getInternalPath(),oldIndexRedo:n.getIndex(),mouseX:t.pageX,offsetY:s,level:n.getLevel()},document.body.style.cursor="move",t.preventDefault())},S.onDrag=function(e,t){if(!Array.isArray(e))return S.onDrag([e],t);if(0!==e.length){var n,i,r,o,s,a=e[0].editor,l=t.pageY-a.drag.offsetY,c=t.pageX,u=!1,h=e[0],d=h.dom.tr,p=(0,g.getAbsoluteTop)(d),f=d.offsetHeight;if(l<p){for(C=d;C=C.previousSibling,b=S.getNodeFromTarget(C),r=C?(0,g.getAbsoluteTop)(C):0,C&&l<r;);(b=b&&!b.parent?void 0:b)||(C=(d=d.parentNode.firstChild)?d.nextSibling:void 0,(b=S.getNodeFromTarget(C))===h&&(b=void 0)),!(b=b&&b.isVisible()&&(r=(C=b.dom.tr)?(0,g.getAbsoluteTop)(C):0)+f<l?void 0:b)||!1!==a.options.limitDragging&&b.parent!==e[0].parent||(e.forEach((function(e){b.parent.moveBefore(e,b)})),u=!0)}else{var m=e[e.length-1];if(f=(d=m.expanded&&m.append?m.append.getDom():m.dom.tr)?d.nextSibling:void 0){for(o=(0,g.getAbsoluteTop)(f),n=f;i=S.getNodeFromTarget(n),n&&(s=n.nextSibling?(0,g.getAbsoluteTop)(n.nextSibling):0,s=n?s-o:0,i&&i.parent.childs.length===e.length&&i.parent.childs[e.length-1]===m&&(p+=27),n=n.nextSibling),n&&p+s<l;);if(i&&i.parent){f=c-a.drag.mouseX,f=Math.round(f/24/2);for(var v=a.drag.level+f,y=i.getLevel(),C=i.dom.tr&&i.dom.tr.previousSibling;y<v&&C;){var b=S.getNodeFromTarget(C),I=e.some((function(e){return e===b||b.isDescendantOf(e)}));if(!I){if(!(b instanceof _))break;if((I=b.parent.childs).length===e.length&&I[e.length-1]===m)break;y=(i=S.getNodeFromTarget(C)).getLevel()}C=C.previousSibling}(i=i instanceof _&&!i.isVisible()&&i.parent.showMore.isVisible()?i._nextNode():i)&&(!1===a.options.limitDragging||i.parent===e[0].parent)&&i.dom.tr&&i.dom.tr!==d.nextSibling&&(e.forEach((function(e){i.parent.moveBefore(e,i)})),u=!0)}}}u&&(a.drag.mouseX=c,a.drag.level=h.getLevel()),a.startAutoScroll(l),t.preventDefault()}},S.onDragEnd=function(e,t){if(!Array.isArray(e))return S.onDrag([e],t);var n,i,r,o,s,a,l,c,u;0!==e.length&&(a=e[0],n=a.editor,a&&a.dom.menu&&a.dom.menu.focus(),i=n.drag.oldParent.getInternalPath(),r=a.parent.getInternalPath(),o=n.drag.oldParent===a.parent,s=n.drag.oldNextNode.getIndex(),a=a.getIndex(),l=n.drag.oldParentPathRedo,c=n.drag.oldIndexRedo,u=o&&c<a?a+e.length:a,o&&c===a||n._onAction("moveNodes",{count:e.length,fieldNames:e.map(T),oldParentPath:i,newParentPath:r,oldIndex:s,newIndex:a,oldIndexRedo:c,newIndexRedo:u,oldParentPathRedo:l,newParentPathRedo:null,oldSelection:n.drag.oldSelection,newSelection:n.getDomSelection()}),document.body.style.cursor=n.drag.oldCursor,n.highlighter.unlock(),e.forEach((function(e){e.updateDom(),t.target!==e.dom.drag&&t.target!==e.dom.menu&&n.highlighter.unhighlight()})),delete n.drag,n.mousemove&&((0,g.removeEventListener)(t.view,"mousemove",n.mousemove),delete n.mousemove),n.mouseup&&((0,g.removeEventListener)(t.view,"mouseup",n.mouseup),delete n.mouseup),n.stopAutoScroll(),t.preventDefault())},S._findEnum=function(e){return e.enum?e.enum:(e=e.oneOf||e.anyOf||e.allOf)&&0<(e=e.filter((function(e){return e.enum}))).length?e[0].enum:null},S._findSchema=function(e,t,n){for(var i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:e,r=n.slice(1,n.length),o=n[0],s=[i],a=0,l=[i.oneOf,i.anyOf,i.allOf];a<l.length;a++){var c=l[a];Array.isArray(c)&&(s=s.concat(c))}var u,h=b(s);try{for(h.s();!(u=h.n()).done;){if("$ref"in(i=u.value)&&"string"==typeof i.$ref){var d,p=i.$ref;if(p in t)i=t[p];else{if(!p.startsWith("#/")){if(1===(null==(d=p.match(/#\//g))?void 0:d.length)){var g,f,m,v=C(p.split("#/"),2),I=v[0],A=v[1];if(I in t)return g=t[I],f={$ref:"#/".concat(A)},(m=[]).push(o),0<r.length&&m.push.apply(m,y(r)),S._findSchema(g,t,m,f)}throw Error("Unable to resolve reference ".concat(p))}var x,k=p.substring(2).split("/"),E=(i=e,b(k));try{for(E.s();!(x=E.n()).done;){var T=x.value;if(!(T in i))throw Error("Unable to resolve reference ".concat(p));i=i[T]}}catch(e){E.e(e)}finally{E.f()}}}if(void 0===o)return i;if("string"==typeof o){if("object"===w(i.properties)&&null!==i.properties&&o in i.properties)return i=i.properties[o],S._findSchema(e,t,r,i);if("object"===w(i.patternProperties)&&null!==i.patternProperties)for(var R in i.patternProperties)if(o.match(R))return i=i.patternProperties[R],S._findSchema(e,t,r,i);if("object"===w(i.additionalProperties))return i=i.additionalProperties,S._findSchema(e,t,r,i)}else if("number"==typeof o&&"object"===w(i.items)&&null!==i.items)return i=i.items,S._findSchema(e,t,r,i)}}catch(e){h.e(e)}finally{h.f()}return null},S.onRemove=function(e){if(!Array.isArray(e))return S.onRemove([e]);var t,n,i,r,o,s;e&&0<e.length&&(t=(i=e[0]).parent,n=i.editor,i=i.getIndex(),n.highlighter.unhighlight(),r=n.getDomSelection(),S.blurNodes(e),o=n.getDomSelection(),s=e.map(E),e.forEach((function(e){e.parent._remove(e)})),n._onAction("removeNodes",{nodes:e,paths:s,parentPath:t.getInternalPath(),index:i,oldSelection:r,newSelection:o}))},S.onDuplicate=function(e){if(!Array.isArray(e))return S.onDuplicate([e]);var t,n,i,r,o,s,a;e&&0<e.length&&(t=e[e.length-1],n=t.parent,(i=t.editor).deselect(i.multiselection.nodes),r=i.getDomSelection(),o=t,s=e.map((function(e){var t,i=e.clone();return"object"===e.parent.type&&(t=e.parent.getFieldNames(),i.field=(0,g.findUniqueName)(e.field,t)),n.insertAfter(i,o),o=i})),1===e.length?"object"===s[0].parent.type?(s[0].dom.field.innerHTML=e[0]._escapeHTML(e[0].field),s[0].focus("field")):s[0].focus():i.select(s),a=i.getDomSelection(),i._onAction("duplicateNodes",{paths:e.map(E),clonePaths:s.map(E),afterPath:t.getInternalPath(),parentPath:n.getInternalPath(),oldSelection:r,newSelection:a}))},S.getNodeFromTarget=function(e){for(;e;){if(e.node)return e.node;e=e.parentNode}},S.targetIsColorPicker=function(e){var t=S.getNodeFromTarget(e);if(t)for(var n=e&&e.parentNode;n;){if(n===t.dom.color)return!0;n=n.parentNode}return!1},S.blurNodes=function(e){var t,n;Array.isArray(e)?(t=(n=e[0]).parent,n=n.getIndex(),(t.childs[n+e.length]?t.childs[n+e.length]:t.childs[n-1]||t).focus()):S.blurNodes([e])},($.prototype=new S).getDom=function(){var e=this.dom;if(e.tr)return e.tr;this._updateEditability();var t=document.createElement("tr"),n=(t.className="jsoneditor-append",t.node=this,e.tr=t,"tree"===this.editor.options.mode&&(e.tdDrag=document.createElement("td"),i=document.createElement("td"),e.tdMenu=i,(n=document.createElement("button")).type="button",n.className="jsoneditor-button jsoneditor-contextmenu-button",n.title="Click to open the actions menu (Ctrl+M)",e.menu=n,i.appendChild(e.menu)),document.createElement("td")),i=document.createElement("div");return i.appendChild(document.createTextNode("("+(0,c.Iu)("empty")+")")),i.className="jsoneditor-readonly",n.appendChild(i),e.td=n,e.text=i,this.updateDom(),t},$.prototype.getPath=function(){return null},$.prototype.getIndex=function(){return null},$.prototype.updateDom=function(e){var t=this.dom,n=t.td,i=(n&&(n.style.paddingLeft=24*this.getLevel()+26+"px"),(i=t.text)&&(i.firstChild.nodeValue="("+(0,c.Iu)("empty")+" "+this.parent.type+")"),t.tr);this.isVisible()?t.tr.firstChild||(t.tdDrag&&i.appendChild(t.tdDrag),t.tdMenu&&i.appendChild(t.tdMenu),i.appendChild(n)):t.tr.firstChild&&(t.tdDrag&&i.removeChild(t.tdDrag),t.tdMenu&&i.removeChild(t.tdMenu),i.removeChild(n))},$.prototype.isVisible=function(){return 0===this.parent.childs.length},$.prototype.showContextMenu=function(e,t){var n,i=this,o=[{text:(0,c.Iu)("auto"),className:"jsoneditor-type-auto",title:(0,c.Iu)("autoType"),click:function(){i._onAppend("","","auto")}},{text:(0,c.Iu)("array"),className:"jsoneditor-type-array",title:(0,c.Iu)("arrayType"),click:function(){i._onAppend("",[])}},{text:(0,c.Iu)("object"),className:"jsoneditor-type-object",title:(0,c.Iu)("objectType"),click:function(){i._onAppend("",{})}},{text:(0,c.Iu)("string"),className:"jsoneditor-type-string",title:(0,c.Iu)("stringType"),click:function(){i._onAppend("","","string")}}];i.addTemplates(o,!0),o=[{text:(0,c.Iu)("appendText"),title:(0,c.Iu)("appendTitleAuto"),submenuTitle:(0,c.Iu)("appendSubmenuTitle"),className:"jsoneditor-insert",click:function(){i._onAppend("","","auto")},submenu:o}],this.editor.options.onCreateMenu&&(n=i.parent.getPath(),o=this.editor.options.onCreateMenu(o,{type:"append",path:n,paths:[n]})),new r.x(o,{close:t}).show(e,this.editor.getPopupAnchor())},$.prototype.onEvent=function(e){var t,n=e.type,i=e.target||e.srcElement,r=this.dom;i===r.menu&&("mouseover"===n?this.editor.highlighter.highlight(this.parent):"mouseout"===n&&this.editor.highlighter.unhighlight()),"click"===n&&i===r.menu&&((t=this.editor.highlighter).highlight(this.parent),t.lock(),(0,g.addClassName)(r.menu,"jsoneditor-selected"),this.showContextMenu(r.menu,(function(){(0,g.removeClassName)(r.menu,"jsoneditor-selected"),t.unlock(),t.unhighlight()}))),"keydown"===n&&this.onKeyDown(e)};var _=$;function $(e){this.editor=e,this.dom={}}(N.prototype=new S).getDom=function(){var e,t,n,i,r,o;return this.dom.tr||(this._updateEditability(),this.dom.tr||(t=(e=this).parent,(r=document.createElement("a")).appendChild(document.createTextNode((0,c.Iu)("showMore"))),r.href="#",r.onclick=function(n){return t.visibleChilds=Math.floor(t.visibleChilds/t.getMaxVisibleChilds()+1)*t.getMaxVisibleChilds(),e.updateDom(),t.showChilds(),n.preventDefault(),!1},(o=document.createElement("a")).appendChild(document.createTextNode((0,c.Iu)("showAll"))),o.href="#",o.onclick=function(n){return t.visibleChilds=1/0,e.updateDom(),t.showChilds(),n.preventDefault(),!1},n=document.createElement("div"),i=document.createTextNode(this._getShowMoreText()),n.className="jsoneditor-show-more",n.appendChild(i),n.appendChild(r),n.appendChild(document.createTextNode(". ")),n.appendChild(o),n.appendChild(document.createTextNode(". ")),(r=document.createElement("td")).appendChild(n),o=document.createElement("tr"),"tree"===this.editor.options.mode&&(o.appendChild(document.createElement("td")),o.appendChild(document.createElement("td"))),o.appendChild(r),o.className="jsoneditor-show-more",this.dom.tr=o,this.dom.moreContents=n,this.dom.moreText=i),this.updateDom()),this.dom.tr},N.prototype.updateDom=function(e){var t;this.isVisible()?(this.dom.tr.node=this.parent.childs[this.parent.visibleChilds],this.dom.tr.parentNode||(t=this.parent._getNextTr())&&t.parentNode.insertBefore(this.dom.tr,t),this.dom.moreText.nodeValue=this._getShowMoreText(),this.dom.moreContents.style.marginLeft=24*(this.getLevel()+1)+"px"):this.dom.tr&&this.dom.tr.parentNode&&this.dom.tr.parentNode.removeChild(this.dom.tr)},N.prototype._getShowMoreText=function(){return(0,c.Iu)("showMoreStatus",{visibleChilds:this.parent.visibleChilds,totalChilds:this.parent.childs.length})+" "},N.prototype.isVisible=function(){return this.parent.expanded&&this.parent.childs.length>this.parent.visibleChilds},N.prototype.onEvent=function(e){"keydown"===e.type&&this.onKeyDown(e)};var L=N;function N(e,t){this.editor=e,this.parent=t,this.dom={}}function M(e){return(M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function P(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,function(e){return e=function(e,t){if("object"!==M(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!==M(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string"),"symbol"===M(e)?e:String(e)}(i.key),i)}}var O=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");function n(e){return t.node.findNodeByInternalPath(e)}this.editor=t,this.history=[],this.index=-1,this.clear(),this.actions={editField:{undo:function(e){n(e.parentPath).childs[e.index].updateField(e.oldValue)},redo:function(e){n(e.parentPath).childs[e.index].updateField(e.newValue)}},editValue:{undo:function(e){n(e.path).updateValue(e.oldValue)},redo:function(e){n(e.path).updateValue(e.newValue)}},changeType:{undo:function(e){n(e.path).changeType(e.oldType)},redo:function(e){n(e.path).changeType(e.newType)}},appendNodes:{undo:function(e){var t=n(e.parentPath);e.paths.map(n).forEach((function(e){t.removeChild(e)}))},redo:function(e){var t=n(e.parentPath);e.nodes.forEach((function(e){t.appendChild(e)}))}},insertBeforeNodes:{undo:function(e){var t=n(e.parentPath);e.paths.map(n).forEach((function(e){t.removeChild(e)}))},redo:function(e){var t=n(e.parentPath),i=n(e.beforePath);e.nodes.forEach((function(e){t.insertBefore(e,i)}))}},insertAfterNodes:{undo:function(e){var t=n(e.parentPath);e.paths.map(n).forEach((function(e){t.removeChild(e)}))},redo:function(e){var t=n(e.parentPath),i=n(e.afterPath);e.nodes.forEach((function(e){t.insertAfter(e,i),i=e}))}},removeNodes:{undo:function(e){var t=n(e.parentPath),i=t.childs[e.index]||t.append;e.nodes.forEach((function(e){t.insertBefore(e,i)}))},redo:function(e){var t=n(e.parentPath);e.paths.map(n).forEach((function(e){t.removeChild(e)}))}},duplicateNodes:{undo:function(e){var t=n(e.parentPath);e.clonePaths.map(n).forEach((function(e){t.removeChild(e)}))},redo:function(e){var t=n(e.parentPath),i=n(e.afterPath);e.paths.map(n).forEach((function(e){var n,r=e.clone();"object"===t.type&&(n=t.getFieldNames(),r.field=(0,g.findUniqueName)(e.field,n)),t.insertAfter(r,i),i=r}))}},moveNodes:{undo:function(e){var t=n(e.oldParentPath),i=n(e.newParentPath),r=t.childs[e.oldIndex]||t.append;i.childs.slice(e.newIndex,e.newIndex+e.count).forEach((function(n,i){n.field=e.fieldNames[i],t.moveBefore(n,r)})),null===e.newParentPathRedo&&(e.newParentPathRedo=i.getInternalPath())},redo:function(e){var t=n(e.oldParentPathRedo),i=n(e.newParentPathRedo),r=i.childs[e.newIndexRedo]||i.append;t.childs.slice(e.oldIndexRedo,e.oldIndexRedo+e.count).forEach((function(t,n){t.field=e.fieldNames[n],i.moveBefore(t,r)}))}},sort:{undo:function(e){var t=n(e.path);t.hideChilds(),t.childs=e.oldChilds,t.updateDom({updateIndexes:!0}),t.showChilds()},redo:function(e){var t=n(e.path);t.hideChilds(),t.childs=e.newChilds,t.updateDom({updateIndexes:!0}),t.showChilds()}},transform:{undo:function(e){n(e.path).setInternalValue(e.oldValue)},redo:function(e){n(e.path).setInternalValue(e.newValue)}}}}var t,n,i;return t=e,(n=[{key:"onChange",value:function(){}},{key:"add",value:function(e,t){this.index++,this.history[this.index]={action:e,params:t,timestamp:new Date},this.index<this.history.length-1&&this.history.splice(this.index+1,this.history.length-this.index-1),this.onChange()}},{key:"clear",value:function(){this.history=[],this.index=-1,this.onChange()}},{key:"canUndo",value:function(){return 0<=this.index}},{key:"canRedo",value:function(){return this.index<this.history.length-1}},{key:"undo",value:function(){if(this.canUndo()){var e=this.history[this.index];if(e){var t=this.actions[e.action];if(t&&t.undo){if(t.undo(e.params),e.params.oldSelection)try{this.editor.setDomSelection(e.params.oldSelection)}catch(e){console.error(e)}}else console.error(new Error('unknown action "'+e.action+'"'))}this.index--,this.onChange()}}},{key:"redo",value:function(){if(this.canRedo()){this.index++;var e=this.history[this.index];if(e){var t=this.actions[e.action];if(t&&t.redo){if(t.redo(e.params),e.params.newSelection)try{this.editor.setDomSelection(e.params.newSelection)}catch(e){console.error(e)}}else console.error(new Error('unknown action "'+e.action+'"'))}this.onChange()}}},{key:"destroy",value:function(){this.editor=null,this.history=[],this.index=-1}}])&&P(t.prototype,n),i&&P(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();function B(e){return(B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function W(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,function(e){return e=function(e,t){if("object"!==B(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!==B(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string"),"symbol"===B(e)?e:String(e)}(i.key),i)}}var F=function(){function e(t,n){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var i=this,r=(this.editor=t,this.timeout=void 0,this.delay=200,this.lastText=void 0,this.results=null,this.dom={},this.dom.container=n,t=document.createElement("div"),(this.dom.wrapper=t).className="jsoneditor-search",n.appendChild(t),n=document.createElement("div"),(this.dom.results=n).className="jsoneditor-results",t.appendChild(n),n=document.createElement("div"),((this.dom.input=n).className="jsoneditor-frame",n.title=(0,c.Iu)("searchTitle"),t.appendChild(n),t=document.createElement("button")).type="button",t.className="jsoneditor-refresh",n.appendChild(t),document.createElement("input"));((r.type="text",(this.dom.search=r).oninput=function(e){i._onDelayedSearch(e)},r.onchange=function(e){i._onSearch()},r.onkeydown=function(e){i._onKeyDown(e)},r.onkeyup=function(e){i._onKeyUp(e)},t.onclick=function(e){r.select()},n.appendChild(r),t=document.createElement("button")).type="button",t.title=(0,c.Iu)("searchNextResultTitle"),t.className="jsoneditor-next",t.onclick=function(){i.next()},n.appendChild(t),t=document.createElement("button")).type="button",t.title=(0,c.Iu)("searchPreviousResultTitle"),t.className="jsoneditor-previous",t.onclick=function(){i.previous()},n.appendChild(t)}var t,n,i;return t=e,(n=[{key:"next",value:function(e){var t;this.results&&((t=null!==this.resultIndex?this.resultIndex+1:0)>this.results.length-1&&(t=0),this._setActiveResult(t,e))}},{key:"previous",value:function(e){var t,n;this.results&&(t=this.results.length-1,n=null!==this.resultIndex?this.resultIndex-1:t,this._setActiveResult(n=n<0?t:n,e))}},{key:"_setActiveResult",value:function(e,t){var n,i,r;this.activeResult&&(n=this.activeResult.node,"field"===this.activeResult.elem?delete n.searchFieldActive:delete n.searchValueActive,n.updateDom()),this.results&&this.results[e]?(this.resultIndex=e,i=this.results[this.resultIndex].node,"field"===(r=this.results[this.resultIndex].elem)?i.searchFieldActive=!0:i.searchValueActive=!0,this.activeResult=this.results[this.resultIndex],i.updateDom(),i.scrollTo((function(){t&&i.focus(r)}))):(this.resultIndex=void 0,this.activeResult=void 0)}},{key:"_clearDelay",value:function(){void 0!==this.timeout&&(clearTimeout(this.timeout),delete this.timeout)}},{key:"_onDelayedSearch",value:function(e){this._clearDelay();var t=this;this.timeout=setTimeout((function(e){t._onSearch()}),this.delay)}},{key:"_onSearch",value:function(e){var t;if(this._clearDelay(),(t=0<(t=this.dom.search.value).length?t:void 0)!==this.lastText||e){this.lastText=t,this.results=this.editor.search(t),e=this.results[0]?this.results[0].node.MAX_SEARCH_RESULTS:1/0;var n=0;if(this.activeResult)for(var i=0;i<this.results.length;i++)if(this.results[i].node===this.activeResult.node){n=i;break}this._setActiveResult(n,!1),void 0!==t?(t=this.results.length,this.dom.results.textContent=0===t?"no\xa0results":1===t?"1\xa0result":e<t?e+"+\xa0results":t+"\xa0results"):this.dom.results.textContent=""}}},{key:"_onKeyDown",value:function(e){var t=e.which;27===t?(this.dom.search.value="",this._onSearch(),e.preventDefault(),e.stopPropagation()):13===t&&(e.ctrlKey?this._onSearch(!0):e.shiftKey?this.previous():this.next(),e.preventDefault(),e.stopPropagation())}},{key:"_onKeyUp",value:function(e){var t=e.keyCode;27!==t&&13!==t&&this._onDelayedSearch(e)}},{key:"clear",value:function(){this.dom.search.value="",this._onSearch()}},{key:"forceSearch",value:function(){this._onSearch(!0)}},{key:"isEmpty",value:function(){return""===this.dom.search.value}},{key:"destroy",value:function(){this.editor=null,this.dom.container.removeChild(this.dom.wrapper),this.dom=null,this.results=null,this.activeResult=null,this._clearDelay()}}])&&W(t.prototype,n),i&&W(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();function H(e){return(H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function D(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,function(e){return e=function(e,t){if("object"!==H(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!==H(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string"),"symbol"===H(e)?e:String(e)}(i.key),i)}}var G=function(){function e(t,n){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");t&&(this.root=n,this.path=document.createElement("div"),this.path.className="jsoneditor-treepath",this.path.setAttribute("tabindex",0),this.contentMenuClicked=!1,t.appendChild(this.path),this.reset())}var t,n,i;return t=e,(n=[{key:"reset",value:function(){this.path.textContent=(0,c.Iu)("selectNode")}},{key:"setPath",value:function(e){var t=this;this.path.textContent="",e&&e.length&&e.forEach((function(n,i){var o,s=document.createElement("span");s.className="jsoneditor-treepath-element",s.innerText=n.name,s.onclick=function(e){this.selectionCallback&&this.selectionCallback(e)}.bind(t,n),t.path.appendChild(s),n.children.length&&((o=document.createElement("span")).className="jsoneditor-treepath-seperator",o.textContent="\u25ba",o.onclick=function(){t.contentMenuClicked=!0;var s=[];n.children.forEach((function(r){s.push({text:r.name,className:"jsoneditor-type-modes"+(e[i+1]+1&&e[i+1].name===r.name?" jsoneditor-selected":""),click:function(e,t){this.contextMenuCallback&&this.contextMenuCallback(e,t)}.bind(t,n,r.name)})})),new r.x(s,{limitHeight:!0}).show(o,t.root,!0)},t.path.appendChild(o)),i===e.length-1&&(s=(o||s).getBoundingClientRect().right,t.path.offsetWidth<s&&(t.path.scrollLeft=s),t.path.scrollLeft)&&((s=document.createElement("span")).className="jsoneditor-treepath-show-all-btn",s.title="show all path",s.textContent="...",s.onclick=function(e){(t.contentMenuClicked=!1,g.addClassName)(t.path,"show-all"),t.path.style.width=t.path.parentNode.getBoundingClientRect().width-10+"px",t.path.onblur=function(){t.contentMenuClicked?(t.contentMenuClicked=!1,t.path.focus()):((0,g.removeClassName)(t.path,"show-all"),t.path.onblur=void 0,t.path.style.width="",t.setPath(e))}}.bind(t,e),t.path.insertBefore(s,t.path.firstChild))}))}},{key:"onSectionSelected",value:function(e){"function"==typeof e&&(this.selectionCallback=e)}},{key:"onContextMenuItemSelected",value:function(e){"function"==typeof e&&(this.contextMenuCallback=e)}}])&&D(t.prototype,n),i&&D(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}(),V=(t=n(8037),n.n(t)),j=((n={}).create=function(e,t){if(!e)throw new Error("No container element provided.");function n(e){var t,n;document.createRange?((t=document.createRange()).selectNodeContents(e),t.collapse(!1),(n=window.getSelection()).removeAllRanges(),n.addRange(t)):document.selection&&((t=document.body.createTextRange()).moveToElementText(e),t.collapse(!1),t.select())}function r(e){return void 0===u&&((u=document.createElement("span")).style.visibility="hidden",u.style.position="fixed",u.style.outline="0",u.style.margin="0",u.style.padding="0",u.style.border="0",u.style.left="0",u.style.whiteSpace="pre",u.style.fontSize=d,u.style.fontFamily=p,u.style.fontWeight="normal",document.body.appendChild(u)),u.textContent=e,u.getBoundingClientRect().right}function o(){this.style.backgroundColor="#ddd"}function s(){this.style.backgroundColor=""}function a(){b.hide(),b.onmouseselection(this.__hint,b.rs)}var c,u,h,d,p,g,f,m,v,y,C,b,I,A,w,x;this.container=e,this.dom={},this.highlighter=new l,this.selection=void 0,this.multiselection={nodes:[]},this.validateSchema=null,this.validationSequence=0,this.errorNodes=[],this.lastSchemaErrors=void 0,this.node=null,this.focusTarget=null,this._setOptions(t),t.autocomplete&&(this.autocomplete=((c=(c=t.autocomplete)||{}).filter=c.filter||"start",c.trigger=c.trigger||"keydown",c.confirmKeys=c.confirmKeys||[39,35,9],c.caseSensitive=c.caseSensitive||!1,p=d="",(g=document.createElement("div")).style.position="relative",g.style.outline="0",g.style.border="0",g.style.margin="0",g.style.padding="0",(f=document.createElement("div")).className="autocomplete dropdown",f.style.position="absolute",f.style.visibility="hidden",m=f,v=[],C=-1,A=b={rs:I={onArrowDown:function(){},onArrowUp:function(){},onEnter:function(){},onTab:function(){},startFrom:y=0,options:[],element:null,elementHint:null,elementStyle:null,wrapper:g,show:function(e,t,n){var i=this;this.startFrom=t,this.wrapper.remove(),this.elementHint&&(this.elementHint.remove(),this.elementHint=null),""===d&&(d=window.getComputedStyle(e).getPropertyValue("font-size")),""===p&&(p=window.getComputedStyle(e).getPropertyValue("font-family")),f.style.marginLeft="0",f.style.marginTop=e.getBoundingClientRect().height+"px",this.options=n.map(String),this.element!==e&&(this.element=e,this.elementStyle={zIndex:this.element.style.zIndex,position:this.element.style.position,backgroundColor:this.element.style.backgroundColor,borderColor:this.element.style.borderColor}),this.element.style.zIndex=3,this.element.style.position="relative",this.element.style.backgroundColor="transparent",this.element.style.borderColor="transparent",this.elementHint=e.cloneNode(),this.elementHint.className="autocomplete hint",this.elementHint.style.zIndex=2,this.elementHint.style.position="absolute",this.elementHint.onfocus=function(){i.element.focus()},this.element.addEventListener&&(this.element.removeEventListener("keydown",w),this.element.addEventListener("keydown",w,!1),this.element.removeEventListener("blur",x),this.element.addEventListener("blur",x,!1)),g.appendChild(this.elementHint),g.appendChild(f),e.parentElement.appendChild(g),this.repaint(e)},setText:function(e){this.element.innerText=e},getText:function(){return this.element.innerText},hideDropDown:function(){this.wrapper.remove(),this.elementHint&&(this.elementHint.remove(),this.elementHint=null,A.hide(),this.element.style.zIndex=this.elementStyle.zIndex,this.element.style.position=this.elementStyle.position,this.element.style.backgroundColor=this.elementStyle.backgroundColor,this.element.style.borderColor=this.elementStyle.borderColor)},repaint:function(e){e=(e=e.innerText).replace("\n","");var t=this.options.length,n=e.substring(this.startFrom);h=e.substring(0,this.startFrom);for(var i=0;i<t;i++){var o=this.options[i];if(!c.caseSensitive&&0===o.toLowerCase().indexOf(n.toLowerCase())||c.caseSensitive&&0===o.indexOf(n)){this.elementHint.innerText=h+n+o.substring(n.length),this.elementHint.realInnerText=h+o;break}}f.style.left=r(h)+"px",A.refresh(n,this.options),this.elementHint.style.width=r(this.elementHint.innerText)+10+"px","hidden"!==f.style.visibility&&(this.elementHint.style.width=r(this.elementHint.innerText)+f.clientWidth+"px")}},hide:function(){m.style.visibility="hidden"},refresh:function(e,t){m.style.visibility="hidden",y=0,m.textContent="";var n=window.innerHeight||document.documentElement.clientHeight,r=(u=m.parentNode.getBoundingClientRect()).top-6,l=(n=n-u.bottom-6,v=[],"function"==typeof c.filter?c.filter:i[c.filter]),u=l?t.filter((function(t){return l(c.caseSensitive?e:e.toLowerCase(),c.caseSensitive?t:t.toLowerCase(),c)})):[];0===(v=u.map((function(t){var n=document.createElement("div"),i=(n.className="item",n.onmouseover=o,n.onmouseout=s,n.onmousedown=a,n.__hint=t,n.textContent="",n.appendChild(document.createTextNode(t.substring(0,e.length))),document.createElement("b"));return i.appendChild(document.createTextNode(t.substring(e.length))),n.appendChild(i),m.appendChild(n),n}))).length||1===v.length&&(e.toLowerCase()===v[0].__hint.toLowerCase()&&!c.caseSensitive||e===v[0].__hint&&c.caseSensitive)||v.length<2||(b.highlight(0),3*n<r?(m.style.maxHeight=r+"px",m.style.top="",m.style.bottom="100%"):(m.style.top="100%",m.style.bottom="",m.style.maxHeight=n+"px"),m.style.visibility="visible")},highlight:function(e){-1!==C&&v[C]&&(v[C].className="item"),v[e].className="item hover",C=e},move:function(e){return"hidden"===m.style.visibility?"":(y+e!==-1&&y+e!==v.length&&(y+=e,b.highlight(y)),v[y].__hint)},onmouseselection:function(){}},w=function(e){var t=(e=e||window.event).keyCode;if(null!=this.elementHint&&33!==t&&34!==t)if(27===t)I.hideDropDown(),I.element.focus(),e.preventDefault(),e.stopPropagation();else{var i,r=(r=this.element.innerText).replace("\n","");if(0<=c.confirmKeys.indexOf(t))9===t&&0===this.elementHint.innerText.length&&I.onTab(),0<this.elementHint.innerText.length&&this.element.innerText!==this.elementHint.realInnerText&&(this.element.innerText=this.elementHint.realInnerText,I.hideDropDown(),n(this.element),9===t)&&(I.element.focus(),e.preventDefault(),e.stopPropagation());else if(13===t)if(0===this.elementHint.innerText.length)I.onEnter();else{var o="hidden"===f.style.visibility;if(A.hide(),o)return I.hideDropDown(),I.element.focus(),void I.onEnter();this.element.innerText=this.elementHint.realInnerText,I.hideDropDown(),n(this.element),e.preventDefault(),e.stopPropagation()}else 40===t?(o=r.substring(this.startFrom),""===(i=A.move(1))&&I.onArrowDown(),this.elementHint.innerText=h+o+i.substring(o.length),this.elementHint.realInnerText=h+i,e.preventDefault(),e.stopPropagation()):38===t&&(o=r.substring(this.startFrom),""===(i=A.move(-1))&&I.onArrowUp(),this.elementHint.innerText=h+o+i.substring(o.length),this.elementHint.realInnerText=h+i,e.preventDefault(),e.stopPropagation())}}.bind(I),x=function(e){I.hideDropDown()},A.onmouseselection=function(e,t){t.element.innerText=t.elementHint.innerText=h+e,t.hideDropDown(),window.setTimeout((function(){t.element.focus(),n(t.element)}),1)},I)),this.options.history&&"view"!==this.options.mode&&(this.history=new O(this)),this._createFrame(),this._createTable()},n.destroy=function(){this.frame&&this.container&&this.frame.parentNode===this.container&&(this.container.removeChild(this.frame),this.frame=null),this.container=null,this.dom=null,this.clear(),this.node=null,this.focusTarget=null,this.selection=null,this.multiselection=null,this.errorNodes=null,this.validateSchema=null,this._debouncedValidate=null,this.history&&(this.history.destroy(),this.history=null),this.searchBox&&(this.searchBox.destroy(),this.searchBox=null),this.modeSwitcher&&(this.modeSwitcher.destroy(),this.modeSwitcher=null),this.frameFocusTracker.destroy()},n._setOptions=function(e){var t=this;this.options={search:!0,history:!0,mode:"tree",name:void 0,schema:null,schemaRefs:null,autocomplete:null,navigationBar:!0,mainMenuBar:!0,limitDragging:!1,onSelectionChange:null,colorPicker:!0,onColorPicker:function(e,t,n){var i;V()?(i=e.getBoundingClientRect().top,i=(0,g.getWindow)(e).innerHeight-i<300&&300<i,new(V())({parent:e,color:t,popup:i?"top":"bottom",onDone:function(e){e=1===e.rgba[3]?e.hex.substr(0,7):e.hex,n(e)}}).show()):console.warn("Cannot open color picker: the `vanilla-picker` library is not included in the bundle. Either use the full bundle or implement your own color picker using `onColorPicker`.")},timestampTag:!0,timestampFormat:null,createQuery:u.r,executeQuery:u.J,onEvent:null,enableSort:!0,enableTransform:!0},e&&(Object.keys(e).forEach((function(n){t.options[n]=e[n]})),null==e.limitDragging)&&null!=e.schema&&(this.options.limitDragging=!0),this.setSchema(this.options.schema,this.options.schemaRefs),this._debouncedValidate=(0,g.debounce)(this._validateAndCatch.bind(this),this.DEBOUNCE_INTERVAL),e.onSelectionChange&&this.onSelectionChange(e.onSelectionChange),(0,c.cC)(this.options.languages),(0,c.m0)(this.options.language)},n.set=function(e){e instanceof Function||void 0===e?this.clear():(this.content.removeChild(this.table),e={field:this.options.name,value:e},e=new S(this,e),this._setRoot(e),this._validateAndCatch(),this.node.expand(!1),this.content.appendChild(this.table)),this.history&&this.history.clear(),this.searchBox&&this.searchBox.clear()},n.update=function(e){var t,n;this.node.deepEqual(e)||(t=this.getSelection(),this.onChangeDisabled=!0,this.node.update(e),this.onChangeDisabled=!1,this._validateAndCatch(),this.searchBox&&!this.searchBox.isEmpty()&&this.searchBox.forceSearch(),t&&t.start&&t.end&&(e=this.node.findNodeByPath(t.start.path),n=this.node.findNodeByPath(t.end.path),e)&&n?this.setSelection(t.start,t.end):this.setSelection({},{}))},n.get=function(){if(this.node)return this.node.getValue()},n.getText=function(){return JSON.stringify(this.get())},n.setText=function(e){try{this.set((0,g.parse)(e))}catch(t){e=(0,g.tryJsonRepair)(e),this.set((0,g.parse)(e))}},n.updateText=function(e){try{this.update((0,g.parse)(e))}catch(t){e=(0,g.tryJsonRepair)(e),this.update((0,g.parse)(e))}},n.setName=function(e){this.options.name=e,this.node&&this.node.updateField(this.options.name)},n.getName=function(){return this.options.name},n.focus=function(){var e=this.scrollableContent.querySelector("[contenteditable=true]");e?e.focus():this.node.dom.expand?this.node.dom.expand.focus():this.node.dom.menu?this.node.dom.menu.focus():(e=this.frame.querySelector("button"))&&e.focus()},n.clear=function(){this.node&&(this.node.hide(),delete this.node),this.treePath&&this.treePath.reset()},n._setRoot=function(e){this.clear(),(this.node=e).setParent(null),e.setField(this.getName(),!1),delete e.index,this.tbody.appendChild(e.getDom())},n.search=function(e){var t;return this.node?(this.content.removeChild(this.table),t=this.node.search(e),this.content.appendChild(this.table)):t=[],t},n.expandAll=function(){this.node&&(this.content.removeChild(this.table),this.node.expand(),this.content.appendChild(this.table))},n.collapseAll=function(){this.node&&(this.content.removeChild(this.table),this.node.collapse(),this.content.appendChild(this.table))},n.expand=function(e){var t;e&&(t=this.node?this.node.findNodeByPath(e.path):null)&&(e.isExpand?t.expand(e.recursive):t.collapse(e.recursive))},n._onAction=function(e,t){this.history&&this.history.add(e,t),this._onChange()},n._onChange=function(){if(!this.onChangeDisabled){var e;if(this.selection=this.getDomSelection(),this._debouncedValidate(),this.treePath&&((e=this.node&&this.selection?this.node.findNodeByInternalPath(this.selection.path):this.multiselection?this.multiselection.nodes[0]:void 0)?this._updateTreePath(e.getNodePath()):this.treePath.reset()),this.options.onChange)try{this.options.onChange()}catch(e){console.error("Error in onChange callback: ",e)}if(this.options.onChangeJSON)try{this.options.onChangeJSON(this.get())}catch(e){console.error("Error in onChangeJSON callback: ",e)}if(this.options.onChangeText)try{this.options.onChangeText(this.getText())}catch(e){console.error("Error in onChangeText callback: ",e)}if(this.options.onClassName&&this.node.recursivelyUpdateCssClassesOnNodes(),this.options.onNodeName&&this.node.childs)try{this.node.recursivelyUpdateNodeName()}catch(e){console.error("Error in onNodeName callback: ",e)}}},n.validate=function(){var e=this,t=this.node;if(t){var n=t.getValue(),i=[];this.validateSchema&&!this.validateSchema(n)&&(i=this.validateSchema.errors.map((function(e){return(0,g.improveSchemaError)(e)})).map((function(e){return{node:t.findNode(e.dataPath),error:e,type:"validation"}})).filter((function(e){return null!=e.node})));try{this.validationSequence++;var r=this,o=this.validationSequence;return this._validateCustom(n).then((function(t){return o===r.validationSequence&&(t=[].concat(i,t||[]),r._renderValidationErrors(t),"function"==typeof e.options.onValidationError&&(0,g.isValidationErrorChanged)(t,e.lastSchemaErrors)&&e.options.onValidationError.call(e,t),e.lastSchemaErrors=t),e.lastSchemaErrors}))}catch(n){return Promise.reject(n)}}},n._validateAndCatch=function(){this.validate().catch((function(e){console.error("Error running validation:",e)}))},n._renderValidationErrors=function(e){this.errorNodes&&this.errorNodes.forEach((function(e){e.setError(null)}));var t=e.reduce((function(e,t){return t.node.findParents().filter((function(t){return!e.some((function(e){return e[0]===t}))})).map((function(e){return[e,t.node]})).concat(e)}),[]);this.errorNodes=t.map((function(e){return{node:e[0],child:e[1],error:{message:"object"===e[0].type?(0,c.Iu)("containsInvalidProperties"):(0,c.Iu)("containsInvalidItems")}}})).concat(e).map((function(e){return e.node.setError(e.error,e.child),e.node}))},n._validateCustom=function(e){try{var t,n;if(this.options.onValidate)return t=this.node,n=this.options.onValidate(e),((0,g.isPromise)(n)?n:Promise.resolve(n)).then((function(e){return Array.isArray(e)?e.filter((function(e){var t=(0,g.isValidValidationError)(e);return t||console.warn('Ignoring a custom validation error with invalid structure. Expected structure: {path: [...], message: "..."}. Actual error:',e),t})).map((function(e){var n;try{n=e&&e.path?t.findNodeByPath(e.path):null}catch(e){}return n||console.warn("Ignoring validation error: node not found. Path:",e.path,"Error:",e),{node:n,error:e,type:"customValidation"}})).filter((function(e){return e&&e.node&&e.error&&e.error.message})):null}))}catch(e){return Promise.reject(e)}return Promise.resolve(null)},n.refresh=function(){this.node&&this.node.updateDom({recurse:!0})},n.startAutoScroll=function(e){var t=this,n=this.scrollableContent,i=(0,g.getAbsoluteTop)(n),r=n.clientHeight,o=i+r;e<i+24&&0<n.scrollTop?this.autoScrollStep=(i+24-e)/3:o-24<e&&r+n.scrollTop<n.scrollHeight?this.autoScrollStep=(o-24-e)/3:this.autoScrollStep=void 0,this.autoScrollStep?this.autoScrollTimer||(this.autoScrollTimer=setInterval((function(){t.autoScrollStep?n.scrollTop-=t.autoScrollStep:t.stopAutoScroll()}),50)):this.stopAutoScroll()},n.stopAutoScroll=function(){this.autoScrollTimer&&(clearTimeout(this.autoScrollTimer),delete this.autoScrollTimer),this.autoScrollStep&&delete this.autoScrollStep},n.setDomSelection=function(e){var t,n,i;e&&("scrollTop"in e&&this.scrollableContent&&(this.scrollableContent.scrollTop=e.scrollTop),e.paths?(t=this,n=e.paths.map((function(e){return t.node.findNodeByInternalPath(e)})),this.select(n)):(i=(n=e.path?this.node.findNodeByInternalPath(e.path):null)&&e.domName?n.dom[e.domName]:null,e.range&&i?(e=Object.assign({},e.range,{container:i}),(0,g.setSelectionOffset)(e)):n&&n.focus()))},n.getDomSelection=function(){var e=S.getNodeFromTarget(this.focusTarget),t=this.focusTarget,n=e?Object.keys(e.dom).find((function(n){return e.dom[n]===t})):null,i=(0,g.getSelectionOffset)();return(i=(i=i&&"DIV"!==i.container.nodeName?null:i)&&i.container!==t?null:i)&&delete i.container,{path:e?e.getInternalPath():null,domName:n,range:i,paths:0<this.multiselection.length?this.multiselection.nodes.map((function(e){return e.getInternalPath()})):null,scrollTop:this.scrollableContent?this.scrollableContent.scrollTop:0}},n.scrollTo=function(e,t){var n,i,r,o,s=this.scrollableContent;s?((n=this).animateTimeout&&(clearTimeout(n.animateTimeout),delete n.animateTimeout),n.animateCallback&&(n.animateCallback(!1),delete n.animateCallback),i=s.clientHeight,r=s.scrollHeight-i,o=Math.min(Math.max(e-i/4,0),r),function e(){var i=s.scrollTop;i=o-i,3<Math.abs(i)?(s.scrollTop+=i/3,n.animateCallback=t,n.animateTimeout=setTimeout(e,50)):(t&&t(!0),s.scrollTop=o,delete n.animateTimeout,delete n.animateCallback)}()):t&&t(!1)},n._createFrame=function(){var e=this,t=(this.frame=document.createElement("div"),this.frame.className="jsoneditor jsoneditor-mode-"+this.options.mode,this.container.appendChild(this.frame),this.contentOuter=document.createElement("div"),this.contentOuter.className="jsoneditor-outer",this);function n(e){t._onEvent&&t._onEvent(e)}var i,r,s,a={target:this.frame,onFocus:this.options.onFocus||null,onBlur:this.options.onBlur||null};this.frameFocusTracker=new o.R(a),this.frame.onclick=function(e){var t=e.target;n(e),"BUTTON"===t.nodeName&&e.preventDefault()},this.frame.oninput=n,this.frame.onchange=n,this.frame.onkeydown=n,this.frame.onkeyup=n,this.frame.oncut=n,this.frame.onpaste=n,this.frame.onmousedown=n,this.frame.onmouseup=n,this.frame.onmouseover=n,this.frame.onmouseout=n,(0,g.addEventListener)(this.frame,"focus",n,!0),(0,g.addEventListener)(this.frame,"blur",n,!0),this.frame.onfocusin=n,this.frame.onfocusout=n,this.options.mainMenuBar&&((0,g.addClassName)(this.contentOuter,"has-main-menu-bar"),this.menu=document.createElement("div"),this.menu.className="jsoneditor-menu",this.frame.appendChild(this.menu),(a=document.createElement("button")).type="button",a.className="jsoneditor-expand-all",a.title=(0,c.Iu)("expandAll"),a.onclick=function(){t.expandAll(),"function"==typeof e.options.onExpand&&e.options.onExpand({path:[],isExpand:!0,recursive:!0})},this.menu.appendChild(a),(a=document.createElement("button")).type="button",a.title=(0,c.Iu)("collapseAll"),a.className="jsoneditor-collapse-all",a.onclick=function(){t.collapseAll(),"function"==typeof e.options.onExpand&&e.options.onExpand({path:[],isExpand:!1,recursive:!0})},this.menu.appendChild(a),this.options.enableSort&&((a=document.createElement("button")).type="button",a.className="jsoneditor-sort",a.title=(0,c.Iu)("sortTitleShort"),a.onclick=function(){t.node.showSortModal()},this.menu.appendChild(a)),this.options.enableTransform&&((a=document.createElement("button")).type="button",a.title=(0,c.Iu)("transformTitleShort"),a.className="jsoneditor-transform",a.onclick=function(){t.node.showTransformModal()},this.menu.appendChild(a)),this.history&&((i=document.createElement("button")).type="button",i.className="jsoneditor-undo jsoneditor-separator",i.title=(0,c.Iu)("undo"),i.onclick=function(){t._onUndo()},this.menu.appendChild(i),this.dom.undo=i,(r=document.createElement("button")).type="button",r.className="jsoneditor-redo",r.title=(0,c.Iu)("redo"),r.onclick=function(){t._onRedo()},this.menu.appendChild(r),this.dom.redo=r,this.history.onChange=function(){i.disabled=!t.history.canUndo(),r.disabled=!t.history.canRedo()},this.history.onChange()),this.options&&this.options.modes&&this.options.modes.length&&((s=this).modeSwitcher=new h.x(this.menu,this.options.modes,this.options.mode,(function(e){try{s.setMode(e),s.modeSwitcher.focus()}catch(e){s._onError(e)}}))),this.options.search)&&(this.searchBox=new F(this,this.menu)),this.options.navigationBar&&(this.navBar=document.createElement("div"),this.navBar.className="jsoneditor-navigation-bar nav-bar-empty",this.frame.appendChild(this.navBar),this.treePath=new G(this.navBar,this.getPopupAnchor()),this.treePath.onSectionSelected(this._onTreePathSectionSelected.bind(this)),this.treePath.onContextMenuItemSelected(this._onTreePathMenuItemSelected.bind(this)))},n._onUndo=function(){this.history&&(this.history.undo(),this._onChange())},n._onRedo=function(){this.history&&(this.history.redo(),this._onChange())},n._onEvent=function(e){if(!S.targetIsColorPicker(e.target)){var t,n=S.getNodeFromTarget(e.target);if("keydown"===e.type&&this._onKeyDown(e),n&&"focus"===e.type&&(this.focusTarget=e.target,this.options.autocomplete)&&"focus"===this.options.autocomplete.trigger&&this._showAutoComplete(e.target),"mousedown"===e.type&&this._startDragDistance(e),"mousemove"!==e.type&&"mouseup"!==e.type&&"click"!==e.type||this._updateDragDistance(e),n&&this.options&&this.options.navigationBar&&n&&("keydown"===e.type||"mousedown"===e.type)&&(t=this,setTimeout((function(){t._updateTreePath(n.getNodePath())}))),n&&n.selected){if("click"===e.type){if(e.target===n.dom.menu)return void this.showContextMenu(e.target);e.hasMoved||this.deselect()}"mousedown"===e.type&&S.onDragStart(this.multiselection.nodes,e)}else"mousedown"===e.type&&(0,g.hasParentNode)(e.target,this.content)&&(this.deselect(),n&&e.target===n.dom.drag?S.onDragStart(n,e):n&&(e.target===n.dom.field||e.target===n.dom.value||e.target===n.dom.select)||this._onMultiSelectStart(e));n&&n.onEvent(e)}},n._updateTreePath=function(e){var t;function n(e){return e.parent?"array"===e.parent.type?e.index:e.field:e.field||e.type}e&&e.length?((0,g.removeClassName)(this.navBar,"nav-bar-empty"),t=[],e.forEach((function(e){var i={name:n(e),node:e,children:[]};e.childs&&e.childs.length&&e.childs.forEach((function(e){i.children.push({name:n(e),node:e})})),t.push(i)})),this.treePath.setPath(t)):(0,g.addClassName)(this.navBar,"nav-bar-empty")},n._onTreePathSectionSelected=function(e){e&&e.node&&(e.node.expandTo(),e.node.focus())},n._onTreePathMenuItemSelected=function(e,t){e&&e.children.length&&(e=e.children.find((function(e){return e.name===t})))&&e.node&&(this._updateTreePath(e.node.getNodePath()),e.node.expandTo(),e.node.focus())},n._startDragDistance=function(e){this.dragDistanceEvent={initialTarget:e.target,initialPageX:e.pageX,initialPageY:e.pageY,dragDistance:0,hasMoved:!1}},n._updateDragDistance=function(e){this.dragDistanceEvent||this._startDragDistance(e);var t=e.pageX-this.dragDistanceEvent.initialPageX,n=e.pageY-this.dragDistanceEvent.initialPageY;return this.dragDistanceEvent.dragDistance=Math.sqrt(t*t+n*n),this.dragDistanceEvent.hasMoved=this.dragDistanceEvent.hasMoved||10<this.dragDistanceEvent.dragDistance,e.dragDistance=this.dragDistanceEvent.dragDistance,e.hasMoved=this.dragDistanceEvent.hasMoved,e.dragDistance},n._onMultiSelectStart=function(e){var t,n=S.getNodeFromTarget(e.target);"tree"===this.options.mode&&void 0===this.options.onEditable&&(this.multiselection={start:n||null,end:null,nodes:[]},this._startDragDistance(e),(t=this).mousemove||(this.mousemove=(0,g.addEventListener)(e.view,"mousemove",(function(e){t._onMultiSelect(e)}))),this.mouseup||(this.mouseup=(0,g.addEventListener)(e.view,"mouseup",(function(e){t._onMultiSelectEnd(e)}))),e.preventDefault())},n._onMultiSelect=function(e){var t;e.preventDefault(),this._updateDragDistance(e),e.hasMoved&&((e=S.getNodeFromTarget(e.target))&&(null==this.multiselection.start&&(this.multiselection.start=e),this.multiselection.end=e),this.deselect(),e=this.multiselection.start,t=this.multiselection.end||this.multiselection.start,e)&&t&&(this.multiselection.nodes=this._findTopLevelNodes(e,t),this.multiselection.nodes&&this.multiselection.nodes.length&&(e=this.multiselection.nodes[0],this.multiselection.start===e||this.multiselection.start.isDescendantOf(e)?this.multiselection.direction="down":this.multiselection.direction="up"),this.select(this.multiselection.nodes))},n._onMultiSelectEnd=function(e){var t=this.multiselection.nodes[0];t&&t.dom.menu&&t.dom.menu.focus(),this.multiselection.start=null,this.multiselection.end=null,this.mousemove&&((0,g.removeEventListener)(e.view,"mousemove",this.mousemove),delete this.mousemove),this.mouseup&&((0,g.removeEventListener)(e.view,"mouseup",this.mouseup),delete this.mouseup)},n.deselect=function(e){var t=!!this.multiselection.nodes.length;this.multiselection.nodes.forEach((function(e){e.setSelected(!1)})),this.multiselection.nodes=[],e&&(this.multiselection.start=null,this.multiselection.end=null),t&&this._selectionChangedHandler&&this._selectionChangedHandler()},n.select=function(e){if(!Array.isArray(e))return this.select([e]);var t;e&&(this.deselect(),this.multiselection.nodes=e.slice(0),t=e[0],e.forEach((function(e){e.expandPathToNode(),e.setSelected(!0,e===t)})),this._selectionChangedHandler)&&(e=this.getSelection(),this._selectionChangedHandler(e.start,e.end))},n._findTopLevelNodes=function(e,t){for(var n=e.getNodePath(),i=t.getNodePath(),r=0;r<n.length&&n[r]===i[r];)r++;e=n[r-1],t=n[r];var o,s=i[r];return t&&s||(e.parent?e=(s=t=e).parent:(t=e.childs[0],s=e.childs[e.childs.length-1])),e&&t&&s?(t=e.childs.indexOf(t),s=e.childs.indexOf(s),o=Math.min(t,s),t=Math.max(t,s),e.childs.slice(o,t+1)):[]},n._showAutoComplete=function(e){var t,n=S.getNodeFromTarget(e),i="";0<=e.className.indexOf("jsoneditor-value")&&(i="value"),""!==(i=0<=e.className.indexOf("jsoneditor-field")?"field":i)&&(t=this,setTimeout((function(){var r;n&&("focus"===t.options.autocomplete.trigger||0<e.innerText.length)&&null!==(r=t.options.autocomplete.getOptions(e.innerText,n.getPath(),i,n.editor))?"function"==typeof r.then?r.then((function(n){null===n?t.autocomplete.hideDropDown():n.options?t.autocomplete.show(e,n.startFrom,n.options):t.autocomplete.show(e,0,n)})).catch((function(e){console.error(e)})):r.options?t.autocomplete.show(e,r.startFrom,r.options):t.autocomplete.show(e,0,r):t.autocomplete.hideDropDown()}),50))},n._onKeyDown=function(e){var t,n=e.which||e.keyCode,i=e.altKey,r=e.ctrlKey,o=e.metaKey,s=e.shiftKey,a=!1,l=this.focusTarget;9===n&&(t=this,setTimeout((function(){t.focusTarget!==l&&(0,g.selectContentEditable)(t.focusTarget)}),0)),this.searchBox&&(r&&70===n?(this.searchBox.dom.search.focus(),this.searchBox.dom.search.select(),a=!0):(114===n||r&&71===n)&&(s?this.searchBox.previous(!0):this.searchBox.next(!0),a=!0)),this.history&&(r&&!s&&90===n?(this._onUndo(),a=!0):r&&s&&90===n&&(this._onRedo(),a=!0)),!this.options.autocomplete||a||r||i||o||1!==e.key.length&&8!==n&&46!==n||(a=!1,this._showAutoComplete(e.target)),a&&(e.preventDefault(),e.stopPropagation())},n._createTable=function(){var e;this.options.navigationBar&&(0,g.addClassName)(this.contentOuter,"has-nav-bar"),this.scrollableContent=document.createElement("div"),this.scrollableContent.className="jsoneditor-tree",this.contentOuter.appendChild(this.scrollableContent),this.content=document.createElement("div"),this.content.className="jsoneditor-tree-inner",this.scrollableContent.appendChild(this.content),this.table=document.createElement("table"),this.table.className="jsoneditor-tree",this.content.appendChild(this.table),this.colgroupContent=document.createElement("colgroup"),"tree"===this.options.mode&&((e=document.createElement("col")).width="24px",this.colgroupContent.appendChild(e)),(e=document.createElement("col")).width="24px",this.colgroupContent.appendChild(e),e=document.createElement("col"),this.colgroupContent.appendChild(e),this.table.appendChild(this.colgroupContent),this.tbody=document.createElement("tbody"),this.table.appendChild(this.tbody),this.frame.appendChild(this.contentOuter)},n.showContextMenu=function(e,t){var n,i=[],o=this.multiselection.nodes.slice();i.push({text:(0,c.Iu)("duplicateText"),title:(0,c.Iu)("duplicateTitle"),className:"jsoneditor-duplicate",click:function(){S.onDuplicate(o)}}),i.push({text:(0,c.Iu)("remove"),title:(0,c.Iu)("removeTitle"),className:"jsoneditor-remove",click:function(){S.onRemove(o)}}),this.options.onCreateMenu&&(n=o.map((function(e){return e.getPath()})),i=this.options.onCreateMenu(i,{type:"multiple",path:n[0],paths:n})),new r.x(i,{close:t}).show(e,this.getPopupAnchor())},n.getPopupAnchor=function(){return this.options.popupAnchor||this.frame},n.getSelection=function(){var e,t,n={start:null,end:null};return this.multiselection.nodes&&this.multiselection.nodes.length&&this.multiselection.nodes.length&&(e=this.multiselection.nodes[0],t=this.multiselection.nodes[this.multiselection.nodes.length-1],"down"===this.multiselection.direction?(n.start=e.serialize(),n.end=t.serialize()):(n.start=t.serialize(),n.end=e.serialize())),n},n.onSelectionChange=function(e){"function"==typeof e&&(this._selectionChangedHandler=(0,g.debounce)(e,this.DEBOUNCE_INTERVAL))},n.setSelection=function(e,t){e&&e.dom&&e.range&&(console.warn("setSelection/getSelection usage for text selection is deprecated and should not be used, see documentation for supported selection options"),this.setDomSelection(e)),(e=this._getNodeInstancesByRange(e,t)).forEach((function(e){e.expandTo()})),this.select(e)},n._getNodeInstancesByRange=function(e,t){e&&e.path&&(n=this.node.findNodeByPath(e.path),t)&&t.path&&(i=this.node.findNodeByPath(t.path));var n,i,r=[];if(n instanceof S)if(i instanceof S&&i!==n)if(n.parent===i.parent){t=n.getIndex()<i.getIndex()?(e=n,i):(e=i,n);var o=e;for(r.push(o);o=o.nextSibling(),r.push(o),o&&o!==t;);}else r=this._findTopLevelNodes(n,i);else r.push(n);return r},n.getNodesByRange=function(e,t){e=this._getNodeInstancesByRange(e,t);var n=[];return e.forEach((function(e){n.push(e.serialize())})),n},[{mode:"tree",mixin:n,data:"json"},{mode:"view",mixin:n,data:"json"},{mode:"form",mixin:n,data:"json"}])},2744:function(e,t,n){t.tryRequireAjv=function(){try{return n(8903)}catch(e){}}},9125:function(e,t,n){t.O=function(){try{n(4864)}catch(e){console.error(e)}}},9791:function(e,t,n){"use strict";n.r(t),n.d(t,{addClassName:function(){return k},addEventListener:function(){return G},asyncExec:function(){return Ce},clear:function(){return y},compileJSONPointer:function(){return ne},contains:function(){return me},debounce:function(){return Y},escapeUnicodeChars:function(){return f},extend:function(){return v},findUniqueName:function(){return ae},formatSize:function(){return pe},get:function(){return se},getAbsoluteLeft:function(){return x},getAbsoluteTop:function(){return S},getChildPaths:function(){return le},getColorCSS:function(){return ie},getIndexForPosition:function(){return ee},getInnerText:function(){return O},getInputSelection:function(){return q},getInternetExplorerVersion:function(){return F},getPositionForPath:function(){return te},getSelection:function(){return L},getSelectionOffset:function(){return M},getType:function(){return C},getWindow:function(){return w},hasParentNode:function(){return W},improveSchemaError:function(){return K},insideRect:function(){return J},isArray:function(){return A},isChildOf:function(){return j},isFirefox:function(){return D},isObject:function(){return fe},isPromise:function(){return X},isTimestamp:function(){return de},isUrl:function(){return I},isValidColor:function(){return re},isValidValidationError:function(){return U},isValidationErrorChanged:function(){return ve},limitCharacters:function(){return ge},makeFieldTooltip:function(){return oe},parse:function(){return p},parsePath:function(){return Z},parseString:function(){return he},removeAllClassNames:function(){return E},removeClassName:function(){return T},removeEventListener:function(){return V},removeReturnsAndSurroundingWhitespace:function(){return B},selectContentEditable:function(){return $},setEndOfContentEditable:function(){return _},setSelection:function(){return N},setSelectionOffset:function(){return P},sort:function(){return ce},sortObjectKeys:function(){return ue},stringifyPath:function(){return z},stripFormatting:function(){return R},textDiff:function(){return Q},tryJsonRepair:function(){return g},uniqueMergeArrays:function(){return ye},validate:function(){return m}}),n(4987),t=n(233);var i=n.n(t),r=n(1262),o=n(6589),s=n(7026),a=n(7907);function l(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){var n;if(e)return"string"==typeof e?c(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var h=1e4,d=9466848e5;function p(e){try{return JSON.parse(e)}catch(t){throw m(e),t}}function g(e){try{return(0,r.K)(e)}catch(t){return e}}function f(e){return e.replace(/[\u007F-\uFFFF]/g,(function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))}function m(e){(void 0!==o?o:JSON).parse(e)}function v(e,t){for(var n in t)be(t,n)&&(e[n]=t[n]);return e}function y(e){for(var t in e)be(e,t)&&delete e[t];return e}function C(e){return null===e?"null":void 0===e?"undefined":e instanceof Number||"number"==typeof e?"number":e instanceof String||"string"==typeof e?"string":e instanceof Boolean||"boolean"==typeof e?"boolean":e instanceof RegExp?"regexp":A(e)?"array":"object"}var b=/^https?:\/\/\S+$/;function I(e){return("string"==typeof e||e instanceof String)&&b.test(e)}function A(e){return"[object Array]"===Object.prototype.toString.call(e)}function w(e){return e.ownerDocument.defaultView}function x(e){return e.getBoundingClientRect().left+window.pageXOffset||document.scrollLeft||0}function S(e){return e.getBoundingClientRect().top+window.pageYOffset||document.scrollTop||0}function k(e,t){var n=e.className.split(" ");-1===n.indexOf(t)&&(n.push(t),e.className=n.join(" "))}function E(e){e.className=""}function T(e,t){var n=e.className.split(" ");-1!==(t=n.indexOf(t))&&(n.splice(t,1),e.className=n.join(" "))}function R(e){for(var t=e.childNodes,n=0,i=t.length;n<i;n++){var r=t[n],o=(r.style&&r.removeAttribute("style"),r.attributes);if(o)for(var s=o.length-1;0<=s;s--){var a=o[s];!0===a.specified&&r.removeAttribute(a.name)}R(r)}}function _(e){var t;document.createRange&&((t=document.createRange()).selectNodeContents(e),t.collapse(!1),(e=window.getSelection()).removeAllRanges(),e.addRange(t))}function $(e){var t;e&&"DIV"===e.nodeName&&window.getSelection&&document.createRange&&((t=document.createRange()).selectNodeContents(e),(e=window.getSelection()).removeAllRanges(),e.addRange(t))}function L(){if(window.getSelection){var e=window.getSelection();if(e.getRangeAt&&e.rangeCount)return e.getRangeAt(0)}return null}function N(e){var t;e&&window.getSelection&&((t=window.getSelection()).removeAllRanges(),t.addRange(e))}function M(){var e=L();return e&&"startOffset"in e&&"endOffset"in e&&e.startContainer&&e.startContainer===e.endContainer?{startOffset:e.startOffset,endOffset:e.endOffset,container:e.startContainer.parentNode}:null}function P(e){var t;document.createRange&&window.getSelection&&window.getSelection()&&(t=document.createRange(),e.container.firstChild||e.container.appendChild(document.createTextNode("")),t.setStart(e.container.firstChild,e.startOffset),t.setEnd(e.container.firstChild,e.endOffset),N(t))}function O(e,t){var n;if(void 0===t&&(t={_text:"",flush:function(){var e=this._text;return this._text="",e},set:function(e){this._text=e}}),e.nodeValue)return""!==(n=B(e.nodeValue))?t.flush()+n:"";if(e.hasChildNodes()){for(var i=e.childNodes,r="",o=0,s=i.length;o<s;o++){var a,l=i[o];"DIV"===l.nodeName||"P"===l.nodeName?((a=(a=i[o-1])?a.nodeName:void 0)&&"DIV"!==a&&"P"!==a&&"BR"!==a&&(""!==r&&(r+="\n"),t.flush()),r+=O(l,t),t.set("\n")):"BR"===l.nodeName?(r+=t.flush(),t.set("\n")):r+=O(l,t)}return r}return""}function B(e){return e.replace(/(\b|^)\s*(\b|$)/g,(function(e){return/\n/.exec(e)?"":e}))}function W(e,t){for(var n=e?e.parentNode:void 0;n;){if(n===t)return!0;n=n.parentNode}return!1}function F(){var e;return-1===H&&(e=-1,"undefined"!=typeof navigator&&"Microsoft Internet Explorer"===navigator.appName&&null!=/MSIE ([0-9]+[.0-9]+)/.exec(navigator.userAgent)&&(e=parseFloat(RegExp.$1)),H=e),H}var H=-1;function D(){return"undefined"!=typeof navigator&&-1!==navigator.userAgent.indexOf("Firefox")}function G(e,t,n,i){return e.addEventListener?(void 0===i&&(i=!1),"mousewheel"===t&&D()&&(t="DOMMouseScroll"),e.addEventListener(t,n,i),n):e.attachEvent?(e.attachEvent("on"+t,i=function(){return n.call(e,window.event)}),i):void 0}function V(e,t,n,i){e.removeEventListener?(void 0===i&&(i=!1),"mousewheel"===t&&D()&&(t="DOMMouseScroll"),e.removeEventListener(t,n,i)):e.detachEvent&&e.detachEvent("on"+t,n)}function j(e,t){for(var n=e.parentNode;n;){if(n===t)return!0;n=n.parentNode}return!1}function Z(e){var t=[],n=0;function i(t){for(var i="";void 0!==e[n]&&e[n]!==t;)i+=e[n],n++;if(e[n]!==t)throw new Error("Invalid JSON path: unexpected end, character "+t+" expected");return i}for(;void 0!==e[n];)if("."===e[n])n++,t.push(function(){for(var t="";void 0!==e[n]&&/[\w$]/.test(e[n]);)t+=e[n],n++;if(""===t)throw new Error("Invalid JSON path: property name expected at index "+n);return t}());else{if("["!==e[n])throw new Error('Invalid JSON path: unexpected character "'+e[n]+'" at index '+n);if("'"===e[++n]||'"'===e[n]){var r=e[n];if(n++,t.push(i(r)),e[n]!==r)throw new Error("Invalid JSON path: closing quote ' expected at index "+n);n++}else{if(0===(r=i("]").trim()).length)throw new Error("Invalid JSON path: array value expected at index "+n);r="*"===r?r:JSON.parse(r),t.push(r)}if("]"!==e[n])throw new Error("Invalid JSON path: closing bracket ] expected at index "+n);n++}return t}function z(e){return e.map((function(e){return"number"==typeof e?"["+e+"]":"string"==typeof e&&e.match(/^[A-Za-z0-9_$]+$/)?"."+e:'["'+e+'"]'})).join("")}function K(e){var t,n;return"enum"===e.keyword&&Array.isArray(e.schema)&&(n=e.schema)&&(5<(n=n.map((function(e){return JSON.stringify(e)}))).length&&(t=["("+(n.length-5)+" more...)"],(n=n.slice(0,5)).push(t)),e.message="should be equal to one of: "+n.join(", ")),"additionalProperties"===e.keyword&&(e.message="should NOT have additional property: "+e.params.additionalProperty),e}function X(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}function U(e){return"object"===u(e)&&Array.isArray(e.path)&&"string"==typeof e.message}function J(e,t,n){return n=void 0!==n?n:0,t.left-n>=e.left&&t.right+n<=e.right&&t.top-n>=e.top&&t.bottom+n<=e.bottom}function Y(e,t,n){var i;return function(){var r=this,o=arguments,s=n&&!i;clearTimeout(i),i=setTimeout((function(){i=null,n||e.apply(r,o)}),t),s&&e.apply(r,o)}}function Q(e,t){for(var n=t.length,i=0,r=e.length,o=t.length;t.charAt(i)===e.charAt(i)&&i<n;)i++;for(;t.charAt(o-1)===e.charAt(r-1)&&i<o&&0<r;)o--,r--;return{start:i,end:o}}function q(e){var t,n,i,r,o=0,s=0;return"number"==typeof e.selectionStart&&"number"==typeof e.selectionEnd?(o=e.selectionStart,s=e.selectionEnd):(r=document.selection.createRange())&&r.parentElement()===e&&(i=e.value.length,t=e.value.replace(/\r\n/g,"\n"),(n=e.createTextRange()).moveToBookmark(r.getBookmark()),(r=e.createTextRange()).collapse(!1),-1<n.compareEndPoints("StartToEnd",r)?o=s=i:(o=-n.moveStart("character",-i),o+=t.slice(0,o).split("\n").length-1,-1<n.compareEndPoints("EndToEnd",r)?s=i:(s=-n.moveEnd("character",-i),s+=t.slice(0,s).split("\n").length-1))),{startIndex:o,endIndex:s,start:a(o),end:a(s)};function a(t){return{row:((t=e.value.substring(0,t)).match(/\n/g)||[]).length+1,column:t.length-t.lastIndexOf("\n")}}}function ee(e,t,n){return e=e.value||"",0<t&&0<n?(e=e.split("\n",t),t=Math.min(e.length,t),n=Math.min(e[t-1].length,n-1),n=1===t?n:n+1,e.slice(0,t-1).join("\n").length+n):-1}function te(e,t){var n,i=[];if(t&&t.length){try{n=s.parse(e)}catch(e){return i}t.forEach((function(e){var t=ne(Z(e));(t=n.pointers[t])&&i.push({path:e,line:t.key?t.key.line:t.value?t.value.line:0,column:t.key?t.key.column:t.value?t.value.column:0})}))}return i}function ne(e){return e.map((function(e){return"/"+String(e).replace(/~/g,"~0").replace(/\//g,"~1")})).join("")}function ie(e){var t=document.createElement("div");return t.style.color=e,t.style.color.split(/\s+/).join("").toLowerCase()||null}function re(e){return!!ie(e)}function oe(e,t){var n;return e?(n="",e.title&&(n+=e.title),e.description&&(0<n.length&&(n+="\n"),n+=e.description),e.default&&(0<n.length&&(n+="\n\n"),n=(n+=(0,a.Iu)("default",void 0,t)+"\n")+JSON.stringify(e.default,null,2)),Array.isArray(e.examples)&&0<e.examples.length&&(0<n.length&&(n+="\n\n"),n+=(0,a.Iu)("examples",void 0,t)+"\n",e.examples.forEach((function(t,i){n+=JSON.stringify(t,null,2),i!==e.examples.length-1&&(n+="\n")}))),n):""}function se(e,t){for(var n=e,i=0;i<t.length&&null!=n;i++)n=n[t[i]];return n}function ae(e,t){for(var n=e.replace(/ \(copy( \d+)?\)$/,""),i=n,r=1;-1!==t.indexOf(i);)i=n+" (copy"+(1<r?" "+r:"")+")",r++;return i}function le(e,t){var n={};if(Array.isArray(e))for(var i=Math.min(e.length,h),r=0;r<i;r++)!function e(t,n,i,r){(Array.isArray(t)||fe(t))&&!r||(n[i||""]=!0),fe(t)&&Object.keys(t).forEach((function(o){e(t[o],n,i+"."+o,r)}))}(e[r],n,"",t);else n[""]=!0;return Object.keys(n).sort()}function ce(e,t,n){var i=t&&"."!==t?Z(t):[],r="desc"===n?-1:1;return(t=e.slice()).sort((function(e,t){return e=se(e,i),t=se(t,i),r*(t<e?1:e<t?-1:0)})),t}function ue(e,t){var n="desc"===t?-1:1,r=(t=Object.keys(e).sort((function(e,t){return n*i()(e,t)})),{});return t.forEach((function(t){r[t]=e[t]})),r}function he(e){var t,n;return""===e?"":"null"===(t=e.toLowerCase())?null:"true"===t||"false"!==t&&(t=Number(e),n=parseFloat(e),isNaN(t)||isNaN(n)?e:t)}function de(e,t){return"number"==typeof t&&d<t&&isFinite(t)&&Math.floor(t)===t&&!isNaN(new Date(t).valueOf())}function pe(e){return e<900?e.toFixed()+" B":(e/=1e3)<900?e.toFixed(1)+" KB":(e/=1e3)<900?e.toFixed(1)+" MB":(e/=1e3)<900?e.toFixed(1)+" GB":(e/1e3).toFixed(1)+" TB"}function ge(e,t){return e.length<=t?e:e.slice(0,t)+"..."}function fe(e){return"object"===u(e)&&null!==e&&!Array.isArray(e)}function me(e,t){return-1!==e.indexOf(t)}function ve(e,t){if(t||e){if(t&&!e||!t&&e)return!0;if(t.length!==e.length)return!0;for(var n=0;n<e.length;++n){var i=function(n){if(!("error"===e[n].type?t.find((function(t){return t.line===e[n].line})):t.find((function(t){return t.dataPath===e[n].dataPath&&t.schemaPath===e[n].schemaPath}))))return{v:!0}}(n);if("object"===u(i))return i.v}}return!1}function ye(e,t){return e=null!=e&&e.length?e:[],t=null!=t&&t.length?t:[],l(new Set(e.concat(t)))}function Ce(e){setTimeout(e)}function be(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},8037:function(e,t,n){var i;if(window.Picker)i=window.Picker;else try{i=n(4049)}catch(e){}e.exports=i},6225:function(e,t,n){function i(e,t){var n,i;return t=u(e,t),(e=a.modules[t])||("function"==typeof(e=a.payloads[t])&&(n={id:t,uri:"",exports:i={},packaged:!0},i=e((function(e,n){return l(t,e,n)}),i,n)||n.exports,a.modules[t]=i,delete a.payloads[t]),e=a.modules[t]=i||e),e}var r,o,s,a,l,c,u;e=n.nmd(e),(s=function(){return this}())||"undefined"==typeof window||(s=window),(a=function(e,t,n){"string"!=typeof e?a.original?a.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace()):(2==arguments.length&&(n=t),a.modules[e]||(a.payloads[e]=n,a.modules[e]=null))}).modules={},a.payloads={},l=function(e,t,n){if("string"==typeof t){var r=i(e,t);if(null!=r)return n&&n(),r}else if("[object Array]"===Object.prototype.toString.call(t)){for(var o=[],s=0,a=t.length;s<a;++s){var l=i(e,t[s]);if(null==l&&c.original)return;o.push(l)}return n&&n.apply(null,o)||!0}},c=function(e,t){var n=l("",e,t);return null==n&&c.original?c.original.apply(this,arguments):n},u=function(e,t){var n;if(-1!==t.indexOf("!"))return n=t.split("!"),u(e,n[0])+"!"+u(e,n[1]);if("."==t.charAt(0))for(t=e.split("/").slice(0,-1).join("/")+"/"+t;-1!==t.indexOf(".")&&i!=t;){var i=t;t=t.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}return t},o=s,(r="ace")&&(s[r]||(s[r]={}),o=s[r]),o.define&&o.define.packaged||(a.original=o.define,o.define=a,o.define.packaged=!0),o.require&&o.require.packaged||(c.original=o.require,o.require=c,o.require.packaged=!0),ace.define("ace/lib/es6-shim",["require","exports","module"],(function(e,t,n){function i(e,t,n){Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||i(String.prototype,"startsWith",(function(e,t){return this.lastIndexOf(e,t=t||0)===t})),String.prototype.endsWith||i(String.prototype,"endsWith",(function(e,t){return(void 0===t||t>this.length)&&(t=this.length),t-=e.length,-1!==(e=this.indexOf(e,t))&&e===t})),String.prototype.repeat||i(String.prototype,"repeat",(function(e){for(var t="",n=this;0<e;)1&e&&(t+=n),(e>>=1)&&(n+=n);return t})),String.prototype.includes||i(String.prototype,"includes",(function(e,t){return-1!=this.indexOf(e,t)})),Object.assign||(Object.assign=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var i=arguments[n];null!=i&&Object.keys(i).forEach((function(e){t[e]=i[e]}))}return t}),Object.values||(Object.values=function(e){return Object.keys(e).map((function(t){return e[t]}))}),Array.prototype.find||i(Array.prototype,"find",(function(e){for(var t=this.length,n=arguments[1],i=0;i<t;i++){var r=this[i];if(e.call(n,r,i,this))return r}})),Array.prototype.findIndex||i(Array.prototype,"findIndex",(function(e){for(var t=this.length,n=arguments[1],i=0;i<t;i++){var r=this[i];if(e.call(n,r,i,this))return i}})),Array.prototype.includes||i(Array.prototype,"includes",(function(e,t){return-1!=this.indexOf(e,t)})),Array.prototype.fill||i(Array.prototype,"fill",(function(e){for(var t,n=this.length>>>0,i=(t=arguments[1]>>0)<0?Math.max(n+t,0):Math.min(t,n),r=(t=void 0===(t=arguments[2])?n:t>>0)<0?Math.max(n+t,0):Math.min(t,n);i<r;)this[i]=e,i++;return this})),Array.of||i(Array,"of",(function(){return Array.prototype.slice.call(arguments)}))})),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],(function(e,t,n){"use strict";e("./es6-shim")})),ace.define("ace/lib/lang",["require","exports","module"],(function(e,t,n){"use strict";t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){for(var n="";0<t;)1&t&&(n+=e),(t>>=1)&&(e+=e);return n};var i=/^\s\s*/,r=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(i,"")},t.stringTrimRight=function(e){return e.replace(r,"")},t.copyObject=function(e){var t,n={};for(t in e)n[t]=e[t];return n},t.copyArray=function(e){for(var t=[],n=0,i=e.length;n<i;n++)e[n]&&"object"==typeof e[n]?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=function e(t){if("object"!=typeof t||!t)return t;if(Array.isArray(t))for(var n=[],i=0;i<t.length;i++)n[i]=e(t[i]);else{if("[object Object]"!==Object.prototype.toString.call(t))return t;for(var i in n={},t)n[i]=e(t[i])}return n},t.arrayToMap=function(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t,n=Object.create(null);for(t in e)n[t]=e[t];return n},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return(""+e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,(function(e){n.push({offset:arguments[arguments.length-2],length:e.length})})),n},t.deferredCall=function(e){function t(){i=null,e()}function n(e){return n.cancel(),i=setTimeout(t,e||0),n}var i=null;return(n.schedule=n).call=function(){return this.cancel(),e(),n},n.cancel=function(){return clearTimeout(i),i=null,n},n.isPending=function(){return i},n},t.delayedCall=function(e,t){function n(){r=null,e()}function i(e){null==r&&(r=setTimeout(n,e||t))}var r=null;return i.delay=function(e){r&&clearTimeout(r),r=setTimeout(n,e||t)},(i.schedule=i).call=function(){this.cancel(),e()},i.cancel=function(){r&&clearTimeout(r),r=null},i.isPending=function(){return r},i}})),ace.define("ace/lib/useragent",["require","exports","module"],(function(e,t,n){"use strict";t.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS};var i="object"==typeof navigator?navigator:{},r=(/mac|win|linux/i.exec(i.platform)||["other"])[0].toLowerCase(),o=i.userAgent||"";i=i.appName||"",t.isWin="win"==r,t.isMac="mac"==r,t.isLinux="linux"==r,t.isIE="Microsoft Internet Explorer"==i||0<=i.indexOf("MSAppHost")?parseFloat((o.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((o.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=o.match(/ Gecko\/\d+/),t.isOpera="object"==typeof opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(o.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(o.split(" Chrome/")[1])||void 0,t.isEdge=parseFloat(o.split(" Edge/")[1])||void 0,t.isAIR=0<=o.indexOf("AdobeAIR"),t.isAndroid=0<=o.indexOf("Android"),t.isChromeOS=0<=o.indexOf(" CrOS "),t.isIOS=/iPad|iPhone|iPod/.test(o)&&!window.MSStream,t.isIOS&&(t.isMac=!0),t.isMobile=t.isIOS||t.isAndroid})),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],(function(e,t,n){"use strict";e=e("./useragent");var i,r,o=(t.buildDom=function e(t,n,i){if("string"==typeof t&&t)return c=document.createTextNode(t),n&&n.appendChild(c),c;if(!Array.isArray(t))return t&&t.appendChild&&n&&n.appendChild(t),t;if("string"!=typeof t[0]||!t[0]){for(var r=[],o=0;o<t.length;o++){var s=e(t[o],n,i);s&&r.push(s)}return r}var a=document.createElement(t[0]),l=t[1],c=1;for(o=c=l&&"object"==typeof l&&!Array.isArray(l)?2:c;o<t.length;o++)e(t[o],a,i);return 2==c&&Object.keys(l).forEach((function(e){var t=l[e];"class"===e?a.className=Array.isArray(t)?t.join(" "):t:"function"==typeof t||"value"==e||"$"==e[0]?a[e]=t:"ref"===e?i&&(i[t]=a):"style"===e?"string"==typeof t&&(a.style.cssText=t):null!=t&&a.setAttribute(e,t)})),n&&n.appendChild(a),a},t.getDocumentHead=function(e){return(e=e||document).head||e.getElementsByTagName("head")[0]||e.documentElement},t.createElement=function(e,t){return document.createElementNS?document.createElementNS(t||"http://www.w3.org/1999/xhtml",e):document.createElement(e)},t.removeChildren=function(e){e.innerHTML=""},t.createTextNode=function(e,t){return(t?t.ownerDocument:document).createTextNode(e)},t.createFragment=function(e){return(e?e.ownerDocument:document).createDocumentFragment()},t.hasCssClass=function(e,t){return-1!==(e.className+"").split(/\s+/g).indexOf(t)},t.addCssClass=function(e,n){t.hasCssClass(e,n)||(e.className+=" "+n)},t.removeCssClass=function(e,t){for(var n=e.className.split(/\s+/g);;){var i=n.indexOf(t);if(-1==i)break;n.splice(i,1)}e.className=n.join(" ")},t.toggleCssClass=function(e,t){for(var n=e.className.split(/\s+/g),i=!0;;){var r=n.indexOf(t);if(-1==r)break;i=!1,n.splice(r,1)}return i&&n.push(t),e.className=n.join(" "),i},t.setCssClass=function(e,n,i){i?t.addCssClass(e,n):t.removeCssClass(e,n)},t.hasCssString=function(e,t){var n,i=0;if(n=(t=t||document).querySelectorAll("style"))for(;i<n.length;)if(n[i++].id===e)return!0},t.removeElementById=function(e,t){(t=t||document).getElementById(e)&&t.getElementById(e).remove()},[]);function s(){var e=o;o=null,e&&e.forEach((function(e){a(e[0],e[1])}))}function a(e,n,r){if("undefined"!=typeof document){if(o)if(r)s();else if(!1===r)return o.push([e,n]);if(!i){var a=r;if(r=(a=r&&r.getRootNode&&(a=r.getRootNode())&&a!=r?a:document).ownerDocument||a,n&&t.hasCssString(n,a))return null;n&&(e+="\n/*# sourceURL=ace/css/"+n+" */");var l=t.createElement("style");l.appendChild(r.createTextNode(e)),n&&(l.id=n),(a=a==r?t.getDocumentHead(r):a).insertBefore(l,a.firstChild)}}}t.useStrictCSP=function(e){0==(i=e)?s():o=o||[]},t.importCssString=a,t.importCssStylsheet=function(e,n){t.buildDom(["link",{rel:"stylesheet",href:e}],t.getDocumentHead(n))},t.scrollbarWidth=function(e){var n=t.createElement("ace_inner"),i=(n.style.width="100%",n.style.minWidth="0px",n.style.height="200px",n.style.display="block",t.createElement("ace_outer"));if((r=i.style).position="absolute",r.left="-10000px",r.overflow="hidden",r.width="200px",r.minWidth="0px",r.height="150px",r.display="block",i.appendChild(n),!(e=e&&e.documentElement||document&&document.documentElement))return 0;e.appendChild(i);var r,o=n.offsetWidth;return o===(r.overflow="scroll",r=n.offsetWidth)&&(r=i.clientWidth),e.removeChild(i),o-r},t.computedStyle=function(e,t){return window.getComputedStyle(e,"")||{}},t.setStyle=function(e,t,n){e[t]!==n&&(e[t]=n)},t.HAS_CSS_ANIMATION=!1,t.HAS_CSS_TRANSFORMS=!1,t.HI_DPI=!e.isWin||"undefined"!=typeof window&&1.5<=window.devicePixelRatio,e.isChromeOS&&(t.HI_DPI=!1),"undefined"!=typeof document&&(r=document.createElement("div"),t.HI_DPI&&void 0!==r.style.transform&&(t.HAS_CSS_TRANSFORMS=!0),e.isEdge||void 0===r.style.animationName||(t.HAS_CSS_ANIMATION=!0),r=null),t.HAS_CSS_TRANSFORMS?t.translate=function(e,t,n){e.style.transform="translate("+Math.round(t)+"px, "+Math.round(n)+"px)"}:t.translate=function(e,t,n){e.style.top=Math.round(n)+"px",e.style.left=Math.round(t)+"px"}})),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var i=e("./dom");t.get=function(e,t){var n=new XMLHttpRequest;n.open("GET",e,!0),n.onreadystatechange=function(){4===n.readyState&&t(n.responseText)},n.send(null)},t.loadScript=function(e,t){var n=i.getDocumentHead(),r=document.createElement("script");r.src=e,n.appendChild(r),r.onload=r.onreadystatechange=function(e,n){!n&&r.readyState&&"loaded"!=r.readyState&&"complete"!=r.readyState||(r=r.onload=r.onreadystatechange=null,n)||t()}},t.qualifyURL=function(e){var t=document.createElement("a");return t.href=e,t.href}})),ace.define("ace/lib/oop",["require","exports","module"],(function(e,t,n){"use strict";t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}})),ace.define("ace/lib/event_emitter",["require","exports","module"],(function(e,t,n){"use strict";function i(){this.propagationStopped=!0}function r(){this.defaultPrevented=!0}var o={};o._emit=o._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],o=this._defaultHandlers[e];if(n.length||o){(t="object"==typeof t&&t?t:{}).type||(t.type=e),t.stopPropagation||(t.stopPropagation=i),t.preventDefault||(t.preventDefault=r),n=n.slice();for(var s=0;s<n.length&&(n[s](t,this),!t.propagationStopped);s++);return o&&!t.defaultPrevented?o(t,this):void 0}},o._signal=function(e,t){if(n=(this._eventRegistry||{})[e])for(var n=n.slice(),i=0;i<n.length;i++)n[i](t,this)},o.once=function(e,t){var n=this;if(this.on(e,(function i(){n.off(e,i),t.apply(null,arguments)})),!t)return new Promise((function(e){t=e}))},o.setDefaultHandler=function(e,t){var n,i,r=this._defaultHandlers;(r=r||(this._defaultHandlers={_disabled_:{}}))[e]&&(i=r[e],(n=r._disabled_[e])||(r._disabled_[e]=n=[]),n.push(i),-1!=(i=n.indexOf(t)))&&n.splice(i,1),r[e]=t},o.removeDefaultHandler=function(e,t){var n,i=this._defaultHandlers;i&&(n=i._disabled_[e],i[e]==t?n&&this.setDefaultHandler(e,n.pop()):n&&-1!=(i=n.indexOf(t))&&n.splice(i,1))},o.on=o.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var i=this._eventRegistry[e];return-1==(i=i||(this._eventRegistry[e]=[])).indexOf(t)&&i[n?"unshift":"push"](t),t},o.off=o.removeListener=o.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{},(e=this._eventRegistry[e])&&-1!==(t=e.indexOf(t))&&e.splice(t,1)},o.removeAllListeners=function(e){e||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[e]=void 0),this._defaultHandlers&&(this._defaultHandlers[e]=void 0)},t.EventEmitter=o})),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,n){var i,r=e("./oop"),o=(e=e("./event_emitter").EventEmitter,{setOptions:function(e){Object.keys(e).forEach((function(t){this.setOption(t,e[t])}),this)},getOptions:function(e){var t,n={};return e?Array.isArray(e)||(n=e,e=Object.keys(n)):(t=this.$options,e=Object.keys(t).filter((function(e){return!t[e].hidden}))),e.forEach((function(e){n[e]=this.getOption(e)}),this),n},setOption:function(e,t){var n;if(this["$"+e]!==t)return(n=this.$options[e])?n.forwardTo?this[n.forwardTo]&&this[n.forwardTo].setOption(e,t):(n.handlesSet||(this["$"+e]=t),void(n&&n.set&&n.set.call(this,t))):s('misspelled option "'+e+'"')},getOption:function(e){var t=this.$options[e];return t?t.forwardTo?this[t.forwardTo]&&this[t.forwardTo].getOption(e):t&&t.get?t.get.call(this):this["$"+e]:s('misspelled option "'+e+'"')}});function s(e){"undefined"!=typeof console&&console.warn&&console.warn.apply(console,arguments)}l.prototype.defineOptions=function(e,t,n){return e.$options||(this.$defaultOptions[t]=e.$options={}),Object.keys(n).forEach((function(t){var i=n[t];(i="string"==typeof i?{forwardTo:i}:i).name||(i.name=t),"initialValue"in(e.$options[i.name]=i)&&(e["$"+i.name]=i.initialValue)})),r.implement(e,o),this},l.prototype.resetOptions=function(e){Object.keys(e.$options).forEach((function(t){var n=e.$options[t];"value"in n&&e.setOption(t,n.value)}))},l.prototype.setDefaultValue=function(e,t,n){if(!e){for(e in this.$defaultOptions)if(this.$defaultOptions[e][t])break;if(!this.$defaultOptions[e][t])return!1}var i=this.$defaultOptions[e]||(this.$defaultOptions[e]={});i[t]&&(i.forwardTo?this.setDefaultValue(i.forwardTo,t,n):i[t].value=n)},l.prototype.setDefaultValues=function(e,t){Object.keys(t).forEach((function(n){this.setDefaultValue(e,n,t[n])}),this)},l.prototype.setMessages=function(e){i=e},l.prototype.nls=function(e,t){return e=i&&i[e]||e,t?e.replace(/\$(\$|[\d]+)/g,(function(e,n){return"$"==n?"$":t[n]})):e};var a=l;function l(){this.$defaultOptions={}}a.prototype.warn=s,a.prototype.reportError=function(e,t){var n=new Error(e);n.data=t,"object"==typeof console&&console.error&&console.error(n),setTimeout((function(){throw n}))},r.implement(a.prototype,e),t.AppConfig=a})),ace.define("ace/theme/textmate.css",["require","exports","module"],(function(e,t,n){n.exports='.ace-tm .ace_gutter {\n background: #f0f0f0;\n color: #333;\n}\n\n.ace-tm .ace_print-margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-tm .ace_fold {\n background-color: #6B72E6;\n}\n\n.ace-tm {\n background-color: #FFFFFF;\n color: black;\n}\n\n.ace-tm .ace_cursor {\n color: black;\n}\n \n.ace-tm .ace_invisible {\n color: rgb(191, 191, 191);\n}\n\n.ace-tm .ace_storage,\n.ace-tm .ace_keyword {\n color: blue;\n}\n\n.ace-tm .ace_constant {\n color: rgb(197, 6, 11);\n}\n\n.ace-tm .ace_constant.ace_buildin {\n color: rgb(88, 72, 246);\n}\n\n.ace-tm .ace_constant.ace_language {\n color: rgb(88, 92, 246);\n}\n\n.ace-tm .ace_constant.ace_library {\n color: rgb(6, 150, 14);\n}\n\n.ace-tm .ace_invalid {\n background-color: rgba(255, 0, 0, 0.1);\n color: red;\n}\n\n.ace-tm .ace_support.ace_function {\n color: rgb(60, 76, 114);\n}\n\n.ace-tm .ace_support.ace_constant {\n color: rgb(6, 150, 14);\n}\n\n.ace-tm .ace_support.ace_type,\n.ace-tm .ace_support.ace_class {\n color: rgb(109, 121, 222);\n}\n\n.ace-tm .ace_keyword.ace_operator {\n color: rgb(104, 118, 135);\n}\n\n.ace-tm .ace_string {\n color: rgb(3, 106, 7);\n}\n\n.ace-tm .ace_comment {\n color: rgb(76, 136, 107);\n}\n\n.ace-tm .ace_comment.ace_doc {\n color: rgb(0, 102, 255);\n}\n\n.ace-tm .ace_comment.ace_doc.ace_tag {\n color: rgb(128, 159, 191);\n}\n\n.ace-tm .ace_constant.ace_numeric {\n color: rgb(0, 0, 205);\n}\n\n.ace-tm .ace_variable {\n color: rgb(49, 132, 149);\n}\n\n.ace-tm .ace_xml-pe {\n color: rgb(104, 104, 91);\n}\n\n.ace-tm .ace_entity.ace_name.ace_function {\n color: #0000A2;\n}\n\n\n.ace-tm .ace_heading {\n color: rgb(12, 7, 255);\n}\n\n.ace-tm .ace_list {\n color:rgb(185, 6, 144);\n}\n\n.ace-tm .ace_meta.ace_tag {\n color:rgb(0, 22, 142);\n}\n\n.ace-tm .ace_string.ace_regex {\n color: rgb(255, 0, 0)\n}\n\n.ace-tm .ace_marker-layer .ace_selection {\n background: rgb(181, 213, 255);\n}\n.ace-tm.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px white;\n}\n.ace-tm .ace_marker-layer .ace_step {\n background: rgb(252, 255, 0);\n}\n\n.ace-tm .ace_marker-layer .ace_stack {\n background: rgb(164, 229, 101);\n}\n\n.ace-tm .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgb(192, 192, 192);\n}\n\n.ace-tm .ace_marker-layer .ace_active-line {\n background: rgba(0, 0, 0, 0.07);\n}\n\n.ace-tm .ace_gutter-active-line {\n background-color : #dcdcdc;\n}\n\n.ace-tm .ace_marker-layer .ace_selected-word {\n background: rgb(250, 250, 255);\n border: 1px solid rgb(200, 200, 250);\n}\n\n.ace-tm .ace_indent-guide {\n background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;\n}\n\n.ace-tm .ace_indent-guide-active {\n background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;\n}\n'})),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate.css","ace/lib/dom"],(function(e,t,n){"use strict";t.isDark=!1,t.cssClass="ace-tm",t.cssText=e("./textmate.css"),t.$id="ace/theme/textmate",e("../lib/dom").importCssString(t.cssText,t.cssClass,!1)})),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],(function(e,t,n){var i=e("./lib/lang"),r=e("./lib/net"),o=e("./lib/dom"),s=e("./lib/app_config").AppConfig,a=(n.exports=t=new s,{packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null}),l=(t.get=function(e){if(a.hasOwnProperty(e))return a[e];throw new Error("Unknown config key: "+e)},t.set=function(e,t){if(a.hasOwnProperty(e))a[e]=t;else if(0==this.setDefaultValue("",e,t))throw new Error("Unknown config key: "+e);"useStrictCSP"==e&&o.useStrictCSP(t)},t.all=function(){return i.copyObject(a)},t.$modes={},t.moduleUrl=function(e,t){var n,i,r;return a.$moduleUrls[e]||(e=e.split("/"),n="snippets"==(t=t||e[e.length-2]||"")?"/":"-",i=e[e.length-1],"worker"==t&&"-"==n&&(r=new RegExp("^"+t+"[\\-_]|[\\-_]"+t+"$","g"),i=i.replace(r,"")),(!i||i==t)&&1<e.length&&(i=e[e.length-2]),null==(r=a[t+"Path"])?r=a.basePath:"/"==n&&(t=n=""),r&&"/"!=r.slice(-1)&&(r+="/"),r+t+n+i+this.get("suffix"))},t.setModuleUrl=function(e,t){return a.$moduleUrls[e]=t},function(t,n){return"ace/theme/textmate"===t||"./theme/textmate"===t?n(null,e("./theme/textmate")):console.error("loader is not configured")}),c=(t.setLoader=function(e){l=e},t.dynamicModules=Object.create(null),t.$loading={},t.loadModule=function(n,i){function o(e){if(e&&!t.$loading[n])return i&&i(e);if(t.$loading[n]||(t.$loading[n]=[]),t.$loading[n].push(i),!(1<t.$loading[n].length)){var o=function(){l(n,(function(e,i){t._emit("load.module",{name:n,module:i});var r=t.$loading[n];t.$loading[n]=null,r.forEach((function(e){e&&e(i)}))}))};if(!t.get("packaged"))return o();r.loadScript(t.moduleUrl(n,a),o),c()}}var s,a;if(Array.isArray(n)&&(a=n[0],n=n[1]),t.dynamicModules[n])t.dynamicModules[n]().then((function(e){e.default?o(e.default):o(e)}));else{try{s=e(n)}catch(s){}o(s)}},t.setModuleLoader=function(e,n){t.dynamicModules[e]=n},function(){a.basePath||a.workerPath||a.modePath||a.themePath||Object.keys(a.$moduleUrls).length||(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),c=function(){})});t.version="1.20.0"})),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],(function(e,t,i){"use strict";e("./lib/fixoldbrowsers");var r=e("./config"),o=(r.setLoader((function(t,n){e([t],(function(e){n(null,e)}))})),function(){return this||"undefined"!=typeof window&&window}());function s(t){if(o&&o.document){r.set("packaged",t||e.packaged||i.packaged||o.define&&n.amdD.packaged);for(var s,a={},l="",c=(t=document.currentScript||document._currentScript)&&t.ownerDocument||document,u=(t&&t.src&&(l=t.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||""),c.getElementsByTagName("script")),h=0;h<u.length;h++){var d=u[h],p=d.src||d.getAttribute("src");if(p){for(var g=d.attributes,f=0,m=g.length;f<m;f++){var v=g[f];0===v.name.indexOf("data-ace-")&&(a[v.name.replace(/^data-ace-/,"").replace(/-(.)/g,(function(e,t){return t.toUpperCase()}))]=v.value)}(d=p.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/))&&(l=d[1])}}for(s in l&&(a.base=a.base||l,a.packaged=!0),a.basePath=a.base,a.workerPath=a.workerPath||a.base,a.modePath=a.modePath||a.base,a.themePath=a.themePath||a.base,delete a.base,a)void 0!==a[s]&&r.set(s,a[s])}}i.exports=function(t){r.init=s,t.require=e,t.define=n.amdD},s(!0)})),ace.define("ace/range",["require","exports","module"],(function(e,t,n){"use strict";r.prototype.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},r.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},r.prototype.contains=function(e,t){return 0==this.compare(e,t)},r.prototype.compareRange=function(e){var t=e.end;return e=e.start,1==(t=this.compare(t.row,t.column))?1==(t=this.compare(e.row,e.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(e.row,e.column))?-1:1==t?42:0},r.prototype.comparePoint=function(e){return this.compare(e.row,e.column)},r.prototype.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},r.prototype.intersects=function(e){return-1==(e=this.compareRange(e))||0==e||1==e},r.prototype.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},r.prototype.isStart=function(e,t){return this.start.row==e&&this.start.column==t},r.prototype.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},r.prototype.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},r.prototype.inside=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)&&!this.isStart(e,t)},r.prototype.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},r.prototype.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},r.prototype.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row!==e||t<=this.end.column?0:1:t<this.start.column?-1:t>this.end.column?1:0},r.prototype.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},r.prototype.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},r.prototype.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},r.prototype.clipRows=function(e,t){var n,i;return this.end.row>t?n={row:t+1,column:0}:this.end.row<e&&(n={row:e,column:0}),this.start.row>t?i={row:t+1,column:0}:this.start.row<e&&(i={row:e,column:0}),r.fromPoints(i||this.start,n||this.end)},r.prototype.extend=function(e,t){var n,i,o=this.compare(e,t);return 0==o?this:(-1==o?n={row:e,column:t}:i={row:e,column:t},r.fromPoints(n||this.start,i||this.end))},r.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},r.prototype.isMultiLine=function(){return this.start.row!==this.end.row},r.prototype.clone=function(){return r.fromPoints(this.start,this.end)},r.prototype.collapseRows=function(){return 0==this.end.column?new r(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new r(this.start.row,0,this.end.row,0)},r.prototype.toScreenRange=function(e){var t=e.documentToScreenPosition(this.start);return e=e.documentToScreenPosition(this.end),new r(t.row,t.column,e.row,e.column)},r.prototype.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t};var i=r;function r(e,t,n,i){this.start={row:e,column:t},this.end={row:n,column:i}}i.fromPoints=function(e,t){return new i(e.row,e.column,t.row,t.column)},i.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},i.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=i})),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],(function(e,t,n){"use strict";var i=e("./oop"),r=function(){var e,t,n={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};for(t in n.PRINTABLE_KEYS[173]="-",n.FUNCTION_KEYS)e=n.FUNCTION_KEYS[t].toLowerCase(),n[e]=parseInt(t,10);for(t in n.PRINTABLE_KEYS)e=n.PRINTABLE_KEYS[t].toLowerCase(),n[e]=parseInt(t,10);i.mixin(n,n.MODIFIER_KEYS),i.mixin(n,n.PRINTABLE_KEYS),i.mixin(n,n.FUNCTION_KEYS),n.enter=n.return,n.escape=n.esc,n.del=n.delete;for(var r=["cmd","ctrl","alt","shift"],o=Math.pow(2,r.length);o--;)n.KEY_MODS[o]=r.filter((function(e){return o&n.KEY_MODS[e]})).join("-")+"-";return n.KEY_MODS[0]="",n.KEY_MODS[-1]="input-",n}();i.mixin(t,r),t.keyCodeToString=function(e){var t=r[e];return(t="string"!=typeof t?String.fromCharCode(e):t).toLowerCase()}})),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,n){"use strict";var i,r=e("./keys"),o=e("./useragent"),s=null,a=0;function l(){if(null==i){i=!1;try{document.createComment("").addEventListener("test",(function(){}),{get passive(){i={passive:!1}}})}catch(e){}}return i}function c(e,t,n){this.elem=e,this.type=t,this.callback=n}function u(e){return 0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)}c.prototype.destroy=function(){p(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var h,d=t.addListener=function(e,t,n,i){e.addEventListener(t,n,l()),i&&i.$toDestroy.push(new c(e,t,n))},p=t.removeListener=function(e,t,n){e.removeEventListener(t,n,l())};function g(e,t,n){var i=u(t);if(!o.isMac&&s){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(i|=8),s.altGr){if(3==(3&i))return;s.altGr=0}18!==n&&17!==n||(l="location"in t?t.location:t.keyLocation,17===n&&1===l?1==s[n]&&(a=t.timeStamp):18===n&&3===i&&2===l&&t.timeStamp-a<50&&(s.altGr=!0))}if(n in r.MODIFIER_KEYS&&(n=-1),!i&&13===n){var l="location"in t?t.location:t.keyLocation;if(3===l&&(e(t,i,-n),t.defaultPrevented))return}if(o.isChromeOS&&8&i){if(e(t,i,n),t.defaultPrevented)return;i&=-9}return!!(i||n in r.FUNCTION_KEYS||n in r.PRINTABLE_KEYS)&&e(t,i,n)}function f(){s=Object.create(null)}t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation&&e.stopPropagation()},t.preventDefault=function(e){e.preventDefault&&e.preventDefault()},t.getButton=function(e){return"dblclick"==e.type?0:"contextmenu"==e.type||o.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.button},t.capture=function(e,t,n){var i=e&&e.ownerDocument||document;function r(e){t&&t(e),n&&n(e),p(i,"mousemove",t),p(i,"mouseup",r),p(i,"dragstart",r)}return d(i,"mousemove",t),d(i,"mouseup",r),d(i,"dragstart",r),r},t.addMouseWheelListener=function(e,t,n){d(e,"wheel",(function(e){var n=e.deltaX||0,i=e.deltaY||0;switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=.15*n,e.wheelY=.15*i;break;case e.DOM_DELTA_LINE:e.wheelX=15*n,e.wheelY=15*i;break;case e.DOM_DELTA_PAGE:e.wheelX=150*n,e.wheelY=150*i}t(e)}),n)},t.addMultiMouseDownListener=function(e,n,i,r,s){var a,l,c,u=0,h={2:"dblclick",3:"tripleclick",4:"quadclick"};function p(e){var s;if(0!==t.getButton(e)?u=0:1<e.detail&&!(4<++u)||(u=1),o.isIE&&(s=5<Math.abs(e.clientX-a)||5<Math.abs(e.clientY-l),c&&!s||(u=1),c&&clearTimeout(c),c=setTimeout((function(){c=null}),n[u-1]||600),1==u)&&(a=e.clientX,l=e.clientY),e._clicks=u,i[r]("mousedown",e),4<u)u=0;else if(1<u)return i[r](h[u],e)}(e=Array.isArray(e)?e:[e]).forEach((function(e){d(e,"mousedown",p,s)}))},t.getModifierString=function(e){return r.KEY_MODS[u(e)]},t.addCommandKeyListener=function(e,n,i){var r,a;o.isOldGecko||o.isOpera&&!("KeyboardEvent"in window)?(r=null,d(e,"keydown",(function(e){r=e.keyCode}),i),d(e,"keypress",(function(e){return g(n,e,r)}),i)):(a=null,d(e,"keydown",(function(e){s[e.keyCode]=(s[e.keyCode]||0)+1;var t=g(n,e,e.keyCode);return a=e.defaultPrevented,t}),i),d(e,"keypress",(function(e){a&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),a=null)}),i),d(e,"keyup",(function(e){s[e.keyCode]=null}),i),s||(f(),d(window,"focus",f)))},"object"==typeof window&&window.postMessage&&!o.isOldIE&&(h=1,t.nextTick=function(e,n){function i(o){o.data==r&&(t.stopPropagation(o),p(n,"message",i),e())}n=n||window;var r="zero-timeout-message-"+h++;d(n,"message",i),n.postMessage(r,"*")}),t.$idleBlocked=!1,t.onIdle=function(e,n){return setTimeout((function n(){t.$idleBlocked?setTimeout(n,100):e()}),n)},t.$idleBlockId=null,t.blockIdle=function(e){t.$idleBlockId&&clearTimeout(t.$idleBlockId),t.$idleBlocked=!0,t.$idleBlockId=setTimeout((function(){t.$idleBlocked=!1}),e||100)},t.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}})),ace.define("ace/clipboard",["require","exports","module"],(function(e,t,n){"use strict";var i;n.exports={lineMode:!1,pasteCancelled:function(){return!!(i&&i>Date.now()-50)||(i=!1)},cancel:function(){i=Date.now()}}})),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],(function(e,t,n){"use strict";var i=e("../lib/event"),r=e("../config").nls,o=e("../lib/useragent"),s=e("../lib/dom"),a=e("../lib/lang"),l=e("../clipboard"),c=o.isChrome<18,u=o.isIE,h=63<o.isChrome,d=e("../lib/keys"),p=d.KEY_MODS,g=o.isIOS,f=g?/\s/:/\n/,m=o.isMobile;t.TextInput=function(e,t){var n=s.createElement("textarea"),v=(n.className="ace_text-input",n.setAttribute("wrap","off"),n.setAttribute("autocorrect","off"),n.setAttribute("autocapitalize","off"),n.setAttribute("spellcheck",!1),n.style.opacity="0",e.insertBefore(n,e.firstChild),!1),y=!1,C=!1,b=!1,I="",A=(m||(n.style.fontSize="1px"),!1),w=!1,x="",S=0,k=0,E=0;try{var T=document.activeElement===n}catch(e){}this.setAriaOptions=function(e){e.activeDescendant?(n.setAttribute("aria-haspopup","true"),n.setAttribute("aria-autocomplete",e.inline?"both":"list"),n.setAttribute("aria-activedescendant",e.activeDescendant)):(n.setAttribute("aria-haspopup","false"),n.setAttribute("aria-autocomplete","both"),n.removeAttribute("aria-activedescendant")),e.role&&n.setAttribute("role",e.role)},this.setAriaLabel=function(){var e;t.session&&t.renderer.enableKeyboardAccessibility?(e=t.session.selection.cursor.row,n.setAttribute("aria-roledescription",r("editor")),n.setAttribute("aria-label",r("Cursor at row $0",[e+1]))):(n.removeAttribute("aria-roledescription"),n.removeAttribute("aria-label"))},this.setAriaOptions({role:"textbox"}),this.setAriaLabel(),i.addListener(n,"blur",(function(e){w||(t.onBlur(e),T=!1,m&&!g&&document.removeEventListener("selectionchange",$))}),t),i.addListener(n,"focus",(function(e){if(!w){if(T=!0,o.isEdge)try{if(!document.hasFocus())return}catch(e){}t.onFocus(e),o.isEdge?setTimeout(R):R(),m&&!g&&document.addEventListener("selectionchange",$)}}),t),this.$focusScroll=!1,this.focus=function(){if(this.setAriaLabel(),I||h||"browser"==this.$focusScroll)return n.focus({preventScroll:!0});var e=n.style.top;n.style.position="fixed",n.style.top="0px";try{var t=0!=n.getBoundingClientRect().top}catch(e){return}var i=[];if(t)for(var r=n.parentElement;r&&1==r.nodeType;)i.push(r),r.setAttribute("ace_nocontext",!0),r=!r.parentElement&&r.getRootNode?r.getRootNode().host:r.parentElement;n.focus({preventScroll:!0}),t&&i.forEach((function(e){e.removeAttribute("ace_nocontext")})),setTimeout((function(){n.style.position="","0px"==n.style.top&&(n.style.top=e)}),0)},this.blur=function(){n.blur()},this.isFocused=function(){return T},t.on("beforeEndOperation",(function(){var e=t.curOp,i=e&&e.command&&e.command.name;"insertstring"!=i&&(i=i&&(e.docChanged||e.selectionChanged),C&&i&&(x=n.value="",G()),R())}));var R=g?function(e){var i;!T||v&&!e||b||((i="\n ab"+(e=e||"")+"cde fg\n")!=n.value&&(n.value=x=i),i=4+(e.length||(t.selection.isEmpty()?0:1)),4==S&&k==i||n.setSelectionRange(4,i),S=4,k=i)}:function(){if(!C&&!b&&(T||O)){C=!0;var e,i,r=0,o=0,s="",a=(t.session&&(a=(e=t.selection).getRange(),e=e.cursor.row,r=a.start.column,o=a.end.column,s=t.session.getLine(e),a.start.row!=e?(i=t.session.getLine(e-1),r=a.start.row<e-1?0:r,o+=i.length+1,s=i+"\n"+s):a.end.row!=e?(i=t.session.getLine(e+1),o=a.end.row>e+1?i.length:o,o+=s.length+1,s=s+"\n"+i):m&&0<e&&(s="\n"+s,o+=1,r+=1),400<s.length)&&(r<400&&o<400?s=s.slice(0,400):(s="\n",r==o?r=o=0:(r=0,o=1))),s+"\n\n");if(a!=x&&(n.value=x=a,S=k=a.length),O&&(S=n.selectionStart,k=n.selectionEnd),k!=o||S!=r||n.selectionEnd!=k)try{n.setSelectionRange(r,o),S=r,k=o}catch(e){}C=!1}},_=(this.resetSelection=R,T&&t.onFocus(),function(e){return 0===e.selectionStart&&e.selectionEnd>=x.length&&e.value===x&&x&&e.selectionEnd!==k});function $(e){if(n&&n.parentNode||document.removeEventListener("selectionchange",$),!C&&n.selectionStart===n.selectionEnd)for(var i=n.selectionStart-S,r=k-S,o=(0<i?i=Math.max(i-r,1):0===i&&r&&(i=-1),Math.abs(i)),s=0<i?d.right:d.left,a=0;a<o;a++)t.onCommandKey({},0,s)}function L(e){H(e,!0)}function N(e){H(e,!1)}function M(e){var r=F(e);l.pasteCancelled()||("string"==typeof r?(r&&t.onPaste(r,e),o.isIE&&setTimeout(R),i.preventDefault(e)):(n.value="",y=!0))}var P=null,O=(this.setInputHandler=function(e){P=e},!(this.getInputHandler=function(){return P})),B=function(e,i){if(O=O&&!1,y)return R(),e&&t.onPaste(e),y=!1,"";for(var r=n.selectionStart,s=n.selectionEnd,a=S,l=x.length-k,c=e,u=e.length-r,h=e.length-s,d=0;0<a&&x[d]==e[d];)d++,a--;for(c=c.slice(d),d=1;0<l&&x.length-d>S-1&&x[x.length-d]==e[e.length-d];)d++,l--;u-=d-1,h-=d-1;var p=c.length-d+1;return p<0&&(a=-p,p=0),c=c.slice(0,p),i||c||u||a||l||h?(p=!(b=!0),o.isAndroid&&". "==c&&(c=" ",p=!0),c&&!a&&!l&&!u&&!h||A?t.onTextInput(c):t.onTextInput(c,{extendLeft:a,extendRight:l,restoreStart:u,restoreEnd:h}),b=!1,x=e,S=r,k=s,E=h,p?"\n":c):""},W=function(e){if(C)return D();if(e&&e.inputType){if("historyUndo"==e.inputType)return t.execCommand("undo");if("historyRedo"==e.inputType)return t.execCommand("redo")}e=n.value;var i=B(e,!0);(500<e.length||f.test(i)||m&&S<1&&S==k)&&R()},F=function e(t,n,i){var r=t.clipboardData||window.clipboardData;if(r&&!c){var o=u||i?"Text":"text/plain";try{return n?!1!==r.setData(o,n):r.getData(o)}catch(t){if(!i)return e(t,n,!0)}}},H=function(e,r){var o=t.getCopyText();if(!o)return i.preventDefault(e);F(e,o)?(g&&(R(o),v=o,setTimeout((function(){v=!1}),10)),r?t.onCut():t.onCopy(),i.preventDefault(e)):(v=!0,n.value=o,n.select(),setTimeout((function(){v=!1,R(),r?t.onCut():t.onCopy()})))},D=(i.addCommandKeyListener(n,t.onCommandKey.bind(t),t),i.addListener(n,"select",(function(e){C||(v?v=!1:_(n)?(t.selectAll(),R()):m&&n.selectionStart!=S&&R())}),t),i.addListener(n,"input",W,t),i.addListener(n,"cut",L,t),i.addListener(n,"copy",N,t),i.addListener(n,"paste",M,t),"oncut"in n&&"oncopy"in n&&"onpaste"in n||i.addListener(e,"keydown",(function(e){if((!o.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:N(e);break;case 86:M(e);break;case 88:L(e)}}),t),function(){var e;if(C&&t.onCompositionUpdate&&!t.$readOnly)return A?V():void(C.useTextareaForIME?t.onCompositionUpdate(n.value):(e=n.value,B(e),C.markerRange&&(C.context&&(C.markerRange.start.column=C.selectionStart=C.context.compositionStartOffset),C.markerRange.end.column=C.markerRange.start.column+k-C.selectionStart+E)))}),G=function(e){t.onCompositionEnd&&!t.$readOnly&&(C=!1,t.onCompositionEnd(),t.off("mousedown",V),e)&&W()};function V(){w=!0,n.blur(),n.focus(),w=!1}var j,Z=a.delayedCall(D,50).schedule.bind(null,null);function z(){clearTimeout(j),j=setTimeout((function(){I&&(n.style.cssText=I,I=""),t.renderer.$isMousePressed=!1,t.renderer.$keepTextAreaAtCursor&&t.renderer.$moveTextAreaToCursor()}),0)}function K(e){t.textInput.onContextMenu(e),z()}if(i.addListener(n,"compositionstart",(function(e){C||!t.onCompositionStart||t.$readOnly||(C={},A)||(e.data&&(C.useTextareaForIME=!1),setTimeout(D,0),t._signal("compositionStart"),t.on("mousedown",V),(e=t.getSelectionRange()).end.row=e.start.row,e.end.column=e.start.column,C.markerRange=e,C.selectionStart=S,t.onCompositionStart(C),C.useTextareaForIME?(x=n.value="",k=S=0):(n.msGetInputContext&&(C.context=n.msGetInputContext()),n.getInputContext&&(C.context=n.getInputContext())))}),t),i.addListener(n,"compositionupdate",D,t),i.addListener(n,"keyup",(function(e){27==e.keyCode&&n.value.length<n.selectionStart&&(C||(x=n.value),S=k=-1,R()),Z()}),t),i.addListener(n,"keydown",Z,t),i.addListener(n,"compositionend",G,t),this.getElement=function(){return n},this.setCommandMode=function(e){A=e,n.readOnly=!1},this.setReadOnly=function(e){A||(n.readOnly=e)},this.setCopyWithEmptySelection=function(e){},this.onContextMenu=function(e){O=!0,R(),t._emit("nativecontextmenu",{target:t,domEvent:e}),this.moveToMouse(e,!0)},this.moveToMouse=function(e,r){function a(e){s.translate(n,e.clientX-u-2,Math.min(e.clientY-c-2,h))}I=I||n.style.cssText,n.style.cssText=(r?"z-index:100000;":"")+(o.isIE?"opacity:0.1;":"")+"text-indent: -"+(S+k)*t.renderer.characterWidth*.5+"px;",r=t.container.getBoundingClientRect();var l=s.computedStyle(t.container),c=r.top+(parseInt(l.borderTopWidth)||0),u=r.left+(parseInt(r.borderLeftWidth)||0),h=r.bottom-c-n.clientHeight-2;a(e),"mousedown"==e.type&&(t.renderer.$isMousePressed=!0,clearTimeout(j),o.isWin)&&i.capture(t.container,a,z)},this.onContextMenuClose=z,i.addListener(n,"mouseup",K,t),i.addListener(n,"mousedown",(function(e){e.preventDefault(),z()}),t),i.addListener(t.renderer.scroller,"contextmenu",K,t),i.addListener(n,"contextmenu",K,t),g){var X=function(e){var t,n,i,r;document.activeElement!==J||Q||C||U.$mouseHandler.isMousePressed||v||(t=J.selectionStart,n=J.selectionEnd,i=null,(r=0)==t?i=d.up:1==t?i=d.home:k<n&&"\n"==x[n]?i=d.end:t<S&&" "==x[t-1]?(i=d.left,r=p.option):t<S||t==S&&k!=S&&t==n?i=d.left:k<n&&2<x.slice(0,n).split("\n").length?i=d.down:k<n&&" "==x[n-1]?(i=d.right,r=p.option):(k<n||n==k&&k!=S&&t==n)&&(i=d.right),t!==n&&(r|=p.shift),i&&(!U.onCommandKey({},r,i)&&U.commands&&(i=d.keyCodeToString(i),r=U.commands.findKeyCommand(r,i))&&U.execCommand(r),S=t,k=n,R("")))},U=t,J=n,Y=null,Q=!1;J.addEventListener("keydown",(function(e){Y&&clearTimeout(Y),Q=!0}),!0),J.addEventListener("keyup",(function(e){Y=setTimeout((function(){Q=!1}),100)}),!0),document.addEventListener("selectionchange",X),U.on("destroy",(function(){document.removeEventListener("selectionchange",X)}))}this.destroy=function(){n.parentElement&&n.parentElement.removeChild(n)}},t.$setUserAgentForTests=function(e,t){m=e,g=t}})),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],(function(e,t,n){"use strict";var i=e("../lib/useragent");function r(e){e.$clickSelection=null;var t=e.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(e)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(e)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(e)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(e)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(e)),["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach((function(t){e[t]=this[t]}),this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")}function o(e,t){return(e.start.row==e.end.row?2*t.column-e.start.column-e.end.column:e.start.row!=e.end.row-1||e.start.column||e.end.column?2*t.row-e.start.row-e.end.row:t.column-4)<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}r.prototype.onMouseDown=function(e){var t=e.inSelection(),n=e.getDocumentPosition(),r=(this.mousedownEvent=e,this.editor),o=e.getButton();if(0!==o)!r.getSelectionRange().isEmpty()&&1!=o||r.selection.moveToPosition(n),2==o&&(r.textInput.onContextMenu(e.domEvent),i.isMozilla||e.preventDefault());else{if(this.mousedownEvent.time=Date.now(),!t||r.isFocused()||(r.focus(),!this.$focusTimeout)||this.$clickSelection||r.inMultiSelectMode)return this.captureMouse(e),this.startSelect(n,1<e.domEvent._clicks),e.preventDefault();this.setState("focusWait"),this.captureMouse(e)}},r.prototype.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(e):t||n.selection.moveToPosition(e),t||this.select(),n.setStyle("ace_selecting"),this.setState("select"))},r.prototype.select=function(){var e,t=this.editor,n=t.renderer.screenToTextCoordinates(this.x,this.y);this.$clickSelection&&(e=-1==(e=this.$clickSelection.comparePoint(n))?this.$clickSelection.end:1==e?this.$clickSelection.start:(n=(e=o(this.$clickSelection,n)).cursor,e.anchor),t.selection.setSelectionAnchor(e.row,e.column)),t.selection.selectToPosition(n),t.renderer.scrollCursorIntoView()},r.prototype.extendSelectionBy=function(e){var t,n,i,r=this.editor,s=r.renderer.screenToTextCoordinates(this.x,this.y);e=r.selection[e](s.row,s.column),this.$clickSelection&&(n=this.$clickSelection.comparePoint(e.start),t=this.$clickSelection.comparePoint(e.end),-1==n&&t<=0?(i=this.$clickSelection.end,e.end.row==s.row&&e.end.column==s.column||(s=e.start)):1==t&&0<=n?(i=this.$clickSelection.start,e.start.row==s.row&&e.start.column==s.column||(s=e.end)):i=-1==n&&1==t?(s=e.end,e.start):(s=(n=o(this.$clickSelection,s)).cursor,n.anchor),r.selection.setSelectionAnchor(i.row,i.column)),r.selection.selectToPosition(s),r.renderer.scrollCursorIntoView()},r.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},r.prototype.focusWait=function(){i=this.mousedownEvent.x,e=this.mousedownEvent.y,n=this.x,t=this.y;var e,t,n=Math.sqrt(Math.pow(n-i,2)+Math.pow(t-e,2)),i=Date.now();(0<n||i-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},r.prototype.onDoubleClick=function(e){e=e.getDocumentPosition();var t=this.editor,n=t.session.getBracketRange(e);n?(n.isEmpty()&&(n.start.column--,n.end.column++),this.setState("select")):(n=t.selection.getWordRange(e.row,e.column),this.setState("selectByWords")),this.$clickSelection=n,this.select()},r.prototype.onTripleClick=function(e){e=e.getDocumentPosition();var t=this.editor,n=(this.setState("selectByLines"),t.getSelectionRange());n.isMultiLine()&&n.contains(e.row,e.column)?(this.$clickSelection=t.selection.getLineRange(n.start.row),this.$clickSelection.end=t.selection.getLineRange(n.end.row).end):this.$clickSelection=t.selection.getLineRange(e.row),this.select()},r.prototype.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},r.prototype.onMouseWheel=function(e){var t,n,i,r,o,s,a;if(!e.getAccelKey())return e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0),t=this.editor,this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0}),n=this.$lastScroll,r=(a=(i=e.domEvent.timeStamp)-n.t)?e.wheelX/a:n.vx,o=a?e.wheelY/a:n.vy,a<550&&(r=(r+n.vx)/2,o=(o+n.vy)/2),a=!1,1<=(s=Math.abs(r/o))&&t.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(a=!0),(a=!!(s<=1&&t.renderer.isScrollableBy(0,e.wheelY*e.speed))||a)?n.allowed=i:i-n.allowed<550&&(Math.abs(r)<=1.5*Math.abs(n.vx)&&Math.abs(o)<=1.5*Math.abs(n.vy)?(a=!0,n.allowed=i):n.allowed=0),n.t=i,n.vx=r,n.vy=o,a?(t.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0},(e=r).prototype.selectEnd=e.prototype.selectByLinesEnd,e.prototype.selectAllEnd=e.prototype.selectByLinesEnd,e.prototype.selectByWordsEnd=e.prototype.selectByLinesEnd,t.DefaultHandlers=e})),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/range"],(function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}))(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&i>=e.length?void 0:e)&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},s=e("./lib/dom"),a=e("./range").Range,l="ace_tooltip";function c(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}function u(){this.popups=[]}c.prototype.$init=function(){return this.$element=s.createElement("div"),this.$element.className=l,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},c.prototype.getElement=function(){return this.$element||this.$init()},c.prototype.setText=function(e){this.getElement().textContent=e},c.prototype.setHtml=function(e){this.getElement().innerHTML=e},c.prototype.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},c.prototype.setClassName=function(e){s.addCssClass(this.getElement(),e)},c.prototype.setTheme=function(e){this.$element.className=l+" "+(e.isDark?"ace_dark ":"")+(e.cssClass||"")},c.prototype.show=function(e,t,n){null!=e&&this.setText(e),null!=t&&null!=n&&this.setPosition(t,n),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},c.prototype.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=l,this.isOpen=!1)},c.prototype.getHeight=function(){return this.getElement().offsetHeight},c.prototype.getWidth=function(){return this.getElement().offsetWidth},c.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},e=c,u.prototype.addPopup=function(e){this.popups.push(e),this.updatePopups()},u.prototype.removePopup=function(e){-1!==(e=this.popups.indexOf(e))&&(this.popups.splice(e,1),this.updatePopups())},u.prototype.updatePopups=function(){this.popups.sort((function(e,t){return t.priority-e.priority}));var e,t,n,i,r=[];try{for(var s=o(this.popups),a=s.next();!a.done;a=s.next()){var l=a.value,c=!0;try{n=void 0;for(var u=o(r),h=u.next();!h.done;h=u.next()){var d=h.value;if(this.doPopupsOverlap(d,l)){c=!1;break}}}catch(t){n={error:t}}finally{try{h&&!h.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}c?r.push(l):l.hide()}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}},u.prototype.doPopupsOverlap=function(e,t){return e=e.getElement().getBoundingClientRect(),t=t.getElement().getBoundingClientRect(),e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top};var h,d=new u;function p(e){void 0===e&&(e=document.body);var t=((e=h.call(this,e)||this).timeout=void 0,e.lastT=0,e.idleTime=350,e.lastEvent=void 0,e.onMouseOut=e.onMouseOut.bind(e),e.onMouseMove=e.onMouseMove.bind(e),e.waitForHover=e.waitForHover.bind(e),e.hide=e.hide.bind(e),e.getElement());return t.style.whiteSpace="pre-wrap",t.style.pointerEvents="auto",t.addEventListener("mouseout",e.onMouseOut),t.tabIndex=-1,t.addEventListener("blur",function(){t.contains(document.activeElement)||this.hide()}.bind(e)),e}t.popupManager=d,t.Tooltip=e,r(p,h=e),p.prototype.addToEditor=function(e){e.on("mousemove",this.onMouseMove),e.on("mousedown",this.hide),e.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},p.prototype.removeFromEditor=function(e){e.off("mousemove",this.onMouseMove),e.off("mousedown",this.hide),e.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},p.prototype.onMouseMove=function(e,t){var n;this.lastEvent=e,this.lastT=Date.now(),t=t.$mouseHandler.isMousePressed,this.isOpen&&(n=this.lastEvent&&this.lastEvent.getDocumentPosition(),this.range&&this.range.contains(n.row,n.column)&&!t&&!this.isOutsideOfText(this.lastEvent)||this.hide()),this.timeout||t||(this.lastEvent=e,this.timeout=setTimeout(this.waitForHover,this.idleTime))},p.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var e=Date.now()-this.lastT;10<this.idleTime-e?this.timeout=setTimeout(this.waitForHover,this.idleTime-e):(this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor))},p.prototype.isOutsideOfText=function(e){var t=e.editor,n=e.getDocumentPosition(),i=t.session.getLine(n.row);return n.column==i.length&&(i=t.renderer.pixelToScreenCoordinates(e.clientX,e.clientY),(e=t.session.documentToScreenPosition(n.row,n.column)).column!=i.column||e.row!=i.row)},p.prototype.setDataProvider=function(e){this.$gatherData=e},p.prototype.showForRange=function(e,t,n,i){var r,o,s;i&&i!=this.lastEvent||this.isOpen&&document.activeElement==this.getElement()||(i=e.renderer,this.isOpen||(d.addPopup(this),this.$registerCloseEvents(),this.setTheme(i.theme)),this.isOpen=!0,this.addMarker(t,e.session),this.range=a.fromPoints(t.start,t.end),(r=this.getElement()).innerHTML="",r.appendChild(n),r.style.display="block",n=i.textToScreenCoordinates(t.start.row,t.start.column),t=e.getCursorPosition(),e=r.clientHeight,o=i.scroller.getBoundingClientRect(),s=!0,this.row>t.row?s=!0:this.row<t.row&&(s=!1),n.pageY-e+i.lineHeight<o.top?s=!0:n.pageY+e>o.bottom&&(s=!1),s?n.pageY+=i.lineHeight:n.pageY-=e,r.style.maxWidth=o.width-(n.pageX-o.left)+"px",this.setPosition(n.pageX,n.pageY))},p.prototype.addMarker=function(e,t){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=t,this.marker=t&&t.addMarker(e,"ace_highlight-marker","text")},p.prototype.hide=function(e){!e&&document.activeElement==this.getElement()||e&&e.target&&("keydown"!=e.type||e.ctrlKey||e.metaKey)&&this.$element.contains(e.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,d.removePopup(this)))},p.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("mousewheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},p.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("mousewheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},p.prototype.onMouseOut=function(e){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,!this.isOpen||!e.relatedTarget||e.relatedTarget==this.getElement()||e&&e.currentTarget.contains(e.relatedTarget)||e.relatedTarget.classList.contains("ace_content")||this.hide()},r=p,t.HoverTooltip=r})),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config"],(function(e,t,n){"use strict";var i,r=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}))(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&i>=e.length?void 0:e)&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},s=e("../lib/dom"),a=e("../lib/event"),l=e("../tooltip").Tooltip,c=e("../config").nls;t.GutterHandler=function(e){var t,n,i=e.editor,r=i.renderer.$gutterLayer,o=new h(i);function l(){t=t&&clearTimeout(t),o.isOpen&&(o.hide(),i._signal("hideGutterTooltip",o),i.off("mousewheel",l))}function c(e){o.setPosition(e.x,e.y)}e.editor.setDefaultHandler("guttermousedown",(function(t){if(i.isFocused()&&0==t.getButton()&&"foldWidgets"!=(n=r.getRegion(t))){var n=t.getDocumentPosition().row,o=i.session.selection;if(t.getShiftKey())o.selectTo(n,0);else{if(2==t.domEvent.detail)return i.selectAll(),t.preventDefault();e.$clickSelection=i.selection.getLineRange(n)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}})),e.editor.setDefaultHandler("guttermousemove",(function(a){var u=a.domEvent.target||a.domEvent.srcElement;if(s.hasCssClass(u,"ace_fold-widget"))return l();o.isOpen&&e.$tooltipFollowsMouse&&c(a),n=a,t=t||setTimeout((function(){if(t=null,n&&!e.isMousePressed){var s=n.getDocumentPosition().row;if(s==i.session.getLength()){var a=i.renderer.pixelToScreenCoordinates(0,n.y).row,u=n.$pos;if(a>i.session.documentToScreenRow(u.row,u.column))return void l()}o.showTooltip(s),i.on("mousewheel",l),e.$tooltipFollowsMouse?c(n):(a=r.$lines.cells[s].element.querySelector("[class*=ace_icon]").getBoundingClientRect(),(u=o.getElement().style).left=a.right+"px",u.top=a.bottom+"px")}else l()}),50)})),a.addListener(i.renderer.$gutter,"mouseout",(function(e){n=null,o.isOpen&&(t=t||setTimeout((function(){t=null,l()}),50))}),i),i.on("changeSession",l)},r(d,u=l),d.prototype.setPosition=function(e,t){var n=window.innerWidth||document.documentElement.clientWidth,i=window.innerHeight||document.documentElement.clientHeight,r=this.getWidth(),o=this.getHeight();n<(e+=15)+r&&(e-=e+r-n),i<(t+=15)+o&&(t-=20+o),l.prototype.setPosition.call(this,e,t)},Object.defineProperty(d,"annotationLabels",{get:function(){return{error:{singular:c("error"),plural:c("errors")},warning:{singular:c("warning"),plural:c("warnings")},info:{singular:c("information message"),plural:c("information messages")}}},enumerable:!1,configurable:!0}),d.prototype.showTooltip=function(e){var t=this.editor.renderer.$gutterLayer,n=t.$annotations[e],i=n?{text:Array.from(n.text),type:Array.from(n.type)}:{text:[],type:[]},r=t.session.getFoldLine(e);if(r&&t.$showFoldedAnnotations){for(var o,s={error:[],warning:[],info:[]},a=e+1;a<=r.end.row;a++)if(t.$annotations[a])for(var l=0;l<t.$annotations[a].text.length;l++){var c=t.$annotations[a].type[l];s[c].push(t.$annotations[a].text[l]),"error"===c?o="error_fold":"warning"===c&&(o="warning_fold")}"error_fold"!==o&&"warning_fold"!==o||(n="".concat(d.annotationsToSummaryString(s)," in folded code."),i.text.push(n),i.type.push(o))}if(0===i.text.length)return this.hide();var u={error:[],warning:[],info:[]},h=t.$useSvgGutterIcons?"ace_icon_svg":"ace_icon";for(a=0;a<i.text.length;a++){var p="<span class='ace_".concat(i.type[a]," ").concat(h,"' aria-label='").concat(d.annotationLabels[i.type[a].replace("_fold","")].singular,"' role=img> </span> ").concat(i.text[a]);u[i.type[a].replace("_fold","")].push(p)}e=[].concat(u.error,u.warning,u.info).join("<br>"),this.setHtml(e),this.setClassName("ace_gutter-tooltip"),this.$element.setAttribute("aria-live","polite"),this.isOpen||this.setTheme(this.editor.renderer.theme),this.editor._signal("showGutterTooltip",this),this.show()},d.annotationsToSummaryString=function(e){var t,n,i=[];try{for(var r=o(["error","warning","info"]),s=r.next();!s.done;s=r.next()){var a,l=s.value;e[l].length&&(a=1===e[l].length?d.annotationLabels[l].singular:d.annotationLabels[l].plural,i.push("".concat(e[l].length," ").concat(a)))}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return i.join(", ")};var u,h=d;function d(e){var t=u.call(this,e.container)||this;return t.editor=e,t}t.GutterTooltip=h})),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],(function(e,t,n){"use strict";var i=e("../lib/event"),r=e("../lib/useragent");function o(e,t){this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}o.prototype.stopPropagation=function(){i.stopPropagation(this.domEvent),this.propagationStopped=!0},o.prototype.preventDefault=function(){i.preventDefault(this.domEvent),this.defaultPrevented=!0},o.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},o.prototype.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY)),this.$pos},o.prototype.inSelection=function(){var e,t;return null===this.$inSelection&&((e=this.editor.getSelectionRange()).isEmpty()?this.$inSelection=!1:(t=this.getDocumentPosition(),this.$inSelection=e.contains(t.row,t.column))),this.$inSelection},o.prototype.getButton=function(){return i.getButton(this.domEvent)},o.prototype.getShiftKey=function(){return this.domEvent.shiftKey},o.prototype.getAccelKey=function(){return r.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},t.MouseEvent=o})),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],(function(e,t,n){"use strict";var i=e("../lib/dom"),r=e("../lib/event"),o=e("../lib/useragent");function s(e){var t,n,s,l,c,u,h,d,p,g,f,m=e.editor,v=i.createElement("div"),y=(v.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",v.textContent="\xa0",["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach((function(t){e[t]=this[t]}),this),m.on("mousedown",this.onMouseDown.bind(e)),m.container),C=0;function b(){var e,t,i,r,o,l,c,h,d=u;i=u=m.renderer.screenToTextCoordinates(n,s),t=d,r=Date.now(),e=!t||i.row!=t.row,t=!t||i.column!=t.column,!g||e||t?(m.moveCursorToPosition(i),g=r,f={x:n,y:s}):5<a(f.x,f.y,n,s)?g=null:200<=r-g&&(m.renderer.scrollCursorIntoView(),g=null),e=u,t=d,i=Date.now(),r=m.renderer.layerConfig.lineHeight,d=m.renderer.layerConfig.characterWidth,o=m.renderer.scroller.getBoundingClientRect(),o={x:{left:n-o.left,right:o.right-n},y:{top:s-o.top,bottom:o.bottom-s}},l=Math.min(o.x.left,o.x.right),c=Math.min(o.y.top,o.y.bottom),h={row:e.row,column:e.column},l/d<=2&&(h.column+=o.x.left<o.x.right?-3:2),c/r<=1&&(h.row+=o.y.top<o.y.bottom?-1:1),l=e.row!=h.row,d=e.column!=h.column,c=!t||e.row!=t.row,l||d&&!c?p?200<=i-p&&m.renderer.scrollCursorIntoView(h):p=i:p=null}function I(){c=m.selection.toOrientedRange(),t=m.session.addMarker(c,"ace_selection",m.getSelectionStyle()),m.clearSelection(),m.isFocused()&&m.renderer.$cursorLayer.setBlinking(!1),clearInterval(l),b(),l=setInterval(b,20),C=0,r.addListener(document,"mousemove",x)}function A(){clearInterval(l),m.session.removeMarker(t),t=null,m.selection.fromOrientedRange(c),m.isFocused()&&!d&&m.$resetCursorStyle(),C=0,g=p=u=c=null,r.removeListener(document,"mousemove",x)}this.onDragStart=function(e){var t;if(this.cancelDrag||!y.draggable)return t=this,setTimeout((function(){t.startSelect(),t.captureMouse(e)}),0),e.preventDefault();c=m.getSelectionRange();var n=e.dataTransfer;n.effectAllowed=m.getReadOnly()?"copy":"copyMove",m.container.appendChild(v),n.setDragImage&&n.setDragImage(v,0,0),setTimeout((function(){m.container.removeChild(v)})),n.clearData(),n.setData("Text",m.session.getTextRange()),d=!0,this.setState("drag")},this.onDragEnd=function(e){y.draggable=!1,d=!1,this.setState(null),m.getReadOnly()||(e=e.dataTransfer.dropEffect,h||"move"!=e||m.session.remove(m.getSelectionRange()),m.$resetCursorStyle()),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!m.getReadOnly()&&S(e.dataTransfer))return n=e.clientX,s=e.clientY,t||I(),C++,e.dataTransfer.dropEffect=h=k(e),r.preventDefault(e)},this.onDragOver=function(e){if(!m.getReadOnly()&&S(e.dataTransfer))return n=e.clientX,s=e.clientY,t||(I(),C++),null!==w&&(w=null),e.dataTransfer.dropEffect=h=k(e),r.preventDefault(e)},this.onDragLeave=function(e){if(--C<=0&&t)return A(),h=null,r.preventDefault(e)},this.onDrop=function(e){if(u){var t=e.dataTransfer;if(d)switch(h){case"move":c=c.contains(u.row,u.column)?{start:u,end:u}:m.moveText(c,u);break;case"copy":c=m.moveText(c,u,!0)}else t=t.getData("Text"),c={start:u,end:m.session.insert(u,t)},m.focus(),h=null;return A(),r.preventDefault(e)}},r.addListener(y,"dragstart",this.onDragStart.bind(e),m),r.addListener(y,"dragend",this.onDragEnd.bind(e),m),r.addListener(y,"dragenter",this.onDragEnter.bind(e),m),r.addListener(y,"dragover",this.onDragOver.bind(e),m),r.addListener(y,"dragleave",this.onDragLeave.bind(e),m),r.addListener(y,"drop",this.onDrop.bind(e),m);var w=null;function x(){null==w&&(w=setTimeout((function(){null!=w&&t&&A()}),20))}function S(e){return!(e=e.types)||Array.prototype.some.call(e,(function(e){return"text/plain"==e||"Text"==e}))}function k(e){var t=["copy","copymove","all","uninitialized"],n=o.isMac?e.altKey:e.ctrlKey,i="uninitialized";try{i=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var r="none";return n&&0<=t.indexOf(i)?r="copy":0<=["move","copymove","linkmove","all","uninitialized"].indexOf(i)?r="move":0<=t.indexOf(i)&&(r="copy"),r}}function a(e,t,n,i){return Math.sqrt(Math.pow(n-e,2)+Math.pow(i-t,2))}(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor,t=(e.container.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging"),o.isWin?"default":"move");e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;o.isIE&&"dragReady"==this.state&&3<a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)&&t.dragDrop(),"dragWait"===this.state&&0<a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))},this.onMouseDown=function(e){var t,n,i;this.$dragEnabled&&(this.mousedownEvent=e,t=this.editor,n=e.inSelection(),i=e.getButton(),1!==(e.domEvent.detail||1)||0!==i||!n||e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey())||(this.mousedownEvent.time=Date.now(),"unselectable"in(i=e.domEvent.target||e.domEvent.srcElement)&&(i.unselectable="on"),t.getDragDelay()?(o.isWebKit&&(this.cancelDrag=!0,t.container.draggable=!0),this.setState("dragWait")):this.startDrag(),this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0))}}).call(s.prototype),t.DragdropHandler=s})),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],(function(e,t,n){"use strict";var i=e("./mouse_event").MouseEvent,r=e("../lib/event"),o=e("../lib/dom");t.addTouchListeners=function(e,t){var n,s,a,l,c,u,h,d,p,g="scroll",f=0,m=0,v=0,y=0;function C(){function e(e){var r,s=e.target.getAttribute("action");"more"!=s&&i?("paste"==s?n.readText().then((function(e){t.execCommand(s,e)})):s&&("cut"!=s&&"copy"!=s||(n?n.writeText(t.getCopyText()):document.execCommand("copy")),t.execCommand(s)),p.firstChild.style.display="none",i=!1,"openCommandPallete"!=s&&t.focus()):(i=!i,e=t.getCopyText(),r=t.session.getUndoManager().hasUndo(),p.replaceChild(o.buildDom(i?["span",!e&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],e&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],e&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],n&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],r&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPallete"},"Palette"]]:["span"]),p.firstChild))}var n=window.navigator&&window.navigator.clipboard,i=!1;p=o.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(e){g="menu",e.stopPropagation(),e.preventDefault(),t.textInput.focus()},ontouchend:function(t){t.stopPropagation(),t.preventDefault(),e(t)},onclick:e},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],t.container)}function b(){p||C();var e=t.selection.cursor,n=(e=t.renderer.textToScreenCoordinates(e.row,e.column),t.renderer.textToScreenCoordinates(0,0).pageX),i=t.renderer.scrollLeft,r=t.container.getBoundingClientRect();p.style.top=e.pageY-r.top-3+"px",e.pageX-r.left<r.width-70?(p.style.left="",p.style.right="10px"):(p.style.right="",p.style.left=n+i-r.left+"px"),p.style.display="",p.firstChild.style.display="none",t.on("input",I)}function I(e){p&&(p.style.display="none"),t.off("input",I)}function A(){c=null,clearTimeout(c);var e=t.selection.getRange(),n=e.contains(h.row,h.column);!e.isEmpty()&&n||(t.selection.moveToPosition(h),t.selection.selectWord()),g="wait",b()}r.addListener(e,"contextmenu",(function(e){d&&t.textInput.getElement().focus()}),t),r.addListener(e,"touchstart",(function(e){var r=e.touches;if(c||1<r.length)clearTimeout(c),c=null,a=-1,g="zoom";else{d=t.$mouseHandler.isMousePressed=!0;var o=t.renderer.layerConfig.lineHeight,u=t.renderer.layerConfig.lineHeight,p=e.timeStamp,C=(l=p,b=r[0]).clientX,b=b.clientY;if(Math.abs(n-C)+Math.abs(s-b)>o&&(a=-1),n=e.clientX=C,s=e.clientY=b,v=y=0,C=new i(e,t),h=C.getDocumentPosition(),p-a<500&&1==r.length&&!f)m++,e.preventDefault(),e.button=0,c=null,clearTimeout(c),t.selection.moveToPosition(h),(b=2<=m?t.selection.getLineRange(h.row):t.session.getBracketRange(h))&&!b.isEmpty()?t.selection.setRange(b):t.selection.selectWord(),g="wait";else{m=0,C=t.selection.cursor,r=t.selection.isEmpty()?C:t.selection.anchor,b=t.renderer.$cursorLayer.getPixelPosition(C,!0),C=t.renderer.$cursorLayer.getPixelPosition(r,!0),r=t.renderer.scroller.getBoundingClientRect();var I=t.renderer.layerConfig.offset,w=t.renderer.scrollLeft,x=function(e,t){return(e/=u)*e+(t=t/o-.75)*t};if(e.clientX<r.left)return void(g="zoom");b=x(e.clientX-r.left-b.left+w,e.clientY-r.top-b.top+I),x=x(e.clientX-r.left-C.left+w,e.clientY-r.top-C.top+I),b<3.5&&x<3.5&&(g=x<b?"cursor":"anchor"),g=x<3.5?"anchor":b<3.5?"cursor":"scroll",c=setTimeout(A,450)}a=p}}),t),r.addListener(e,"touchend",(function(e){d=t.$mouseHandler.isMousePressed=!1,u&&clearInterval(u),"zoom"==g?(g="",f=0):(c?(t.selection.moveToPosition(h),f=0,b):"scroll"==g?(f+=60,u=setInterval((function(){f--<=0&&(clearInterval(u),u=null),Math.abs(v)<.01&&(v=0),Math.abs(y)<.01&&(y=0),f<20&&(v*=.9),f<20&&(y*=.9);var e=t.session.getScrollTop();t.renderer.scrollBy(10*v,10*y),e==t.session.getScrollTop()&&(f=0)}),10),I):b)(),clearTimeout(c),c=null}),t),r.addListener(e,"touchmove",(function(e){if(c&&(clearTimeout(c),c=null),!(1<(r=e.touches).length||"zoom"==g)){var r=r[0],o=n-r.clientX,a=s-r.clientY;if("wait"==g){if(!(4<o*o+a*a))return e.preventDefault();g="cursor"}n=r.clientX,s=r.clientY,e.clientX=r.clientX,e.clientY=r.clientY;var u=(r=e.timeStamp)-l;l=r,"scroll"==g?((r=new i(e,t)).speed=1,r.wheelX=o,r.wheelY=a,10*Math.abs(o)<Math.abs(a)&&(o=0),10*Math.abs(a)<Math.abs(o)&&(a=0),0!=u&&(v=o/u,y=a/u),t._emit("mousewheel",r),r.propagationStopped||(v=y=0)):(o=new i(e,t).getDocumentPosition(),"cursor"==g?t.selection.moveCursorToPosition(o):"anchor"==g&&t.selection.setSelectionAnchor(o.row,o.column),t.renderer.scrollCursorIntoView(o),e.preventDefault())}}),t)}})),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],(function(e,t,n){"use strict";var i=e("../lib/event"),r=e("../lib/useragent"),o=e("./default_handlers").DefaultHandlers,s=e("./default_gutter_handler").GutterHandler,a=e("./mouse_event").MouseEvent,l=e("./dragdrop_handler").DragdropHandler,c=e("./touch_handler").addTouchListeners,u=(e=e("../config"),h.prototype.onMouseEvent=function(e,t){this.editor.session&&this.editor._emit(e,new a(t,this.editor))},h.prototype.onMouseMove=function(e,t){var n=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;n&&n.length&&this.editor._emit(e,new a(t,this.editor))},h.prototype.onMouseWheel=function(e,t){var n=new a(t,this.editor);n.speed=2*this.$scrollSpeed,n.wheelX=t.wheelX,n.wheelY=t.wheelY,this.editor._emit(e,n)},h.prototype.setState=function(e){this.state=e},h.prototype.captureMouse=function(e,t){function n(e){if(e){if(r.isWebKit&&!e.which&&u.releaseMouse)return u.releaseMouse();u.x=e.clientX,u.y=e.clientY,t&&t(e),u.mouseEvent=new a(e,u.editor),u.$mouseMoved=!0}}function o(e){l.off("beforeEndOperation",h),clearInterval(d),l.session&&s(),u[u.state+"End"]&&u[u.state+"End"](e),u.state="",u.isMousePressed=c.$isMousePressed=!1,c.$keepTextAreaAtCursor&&c.$moveTextAreaToCursor(),u.$onCaptureMouseMove=u.releaseMouse=null,e&&u.onMouseEvent("mouseup",e),l.endOperation()}function s(){u[u.state]&&u[u.state](),u.$mouseMoved=!1}this.x=e.x,this.y=e.y,this.isMousePressed=!0;var l=this.editor,c=this.editor.renderer,u=(c.$isMousePressed=!0,this);if(r.isOldIE&&"dblclick"==e.domEvent.type)return setTimeout((function(){o(e)}));var h=function(e){u.releaseMouse&&l.curOp.command.name&&l.curOp.selectionChanged&&(u[u.state+"End"]&&u[u.state+"End"](),u.state="",u.releaseMouse())},d=(l.on("beforeEndOperation",h),l.startOperation({command:{name:"mouse"}}),u.$onCaptureMouseMove=n,u.releaseMouse=i.capture(this.editor.container,n,o),setInterval(s,20))},h.prototype.cancelContextMenu=function(){var e=function(t){t&&t.domEvent&&"contextmenu"!=t.domEvent.type||(this.editor.off("nativecontextmenu",e),t&&t.domEvent&&i.stopEvent(t.domEvent))}.bind(this);setTimeout(e,10),this.editor.on("nativecontextmenu",e)},h.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},h);function h(e){function t(t){document.hasFocus&&document.hasFocus()&&(e.isFocused()||document.activeElement!=(e.textInput&&e.textInput.getElement()))||window.focus(),e.focus(),setTimeout((function(){e.isFocused()||e.focus()}))}var n=this,a=(this.editor=e,new o(this),new s(this),new l(this),e.renderer.getMouseEventTarget()),u=(i.addListener(a,"click",this.onMouseEvent.bind(this,"click"),e),i.addListener(a,"mousemove",this.onMouseMove.bind(this,"mousemove"),e),i.addMultiMouseDownListener([a,e.renderer.scrollBarV&&e.renderer.scrollBarV.inner,e.renderer.scrollBarH&&e.renderer.scrollBarH.inner,e.textInput&&e.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",e),i.addMouseWheelListener(e.container,this.onMouseWheel.bind(this,"mousewheel"),e),c(e.container,e),e.renderer.$gutter);i.addListener(u,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),e),i.addListener(u,"click",this.onMouseEvent.bind(this,"gutterclick"),e),i.addListener(u,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),e),i.addListener(u,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),e),i.addListener(a,"mousedown",t,e),i.addListener(u,"mousedown",t,e),r.isIE&&e.renderer.scrollBarV&&(i.addListener(e.renderer.scrollBarV.element,"mousedown",t,e),i.addListener(e.renderer.scrollBarH.element,"mousedown",t,e)),e.on("mousemove",(function(t){var i,r;n.state||n.$dragDelay||!n.$dragEnabled||(t=e.renderer.screenToTextCoordinates(t.x,t.y),i=e.session.selection.getRange(),r=e.renderer,!i.isEmpty()&&i.insideStart(t.row,t.column)?r.setCursorStyle("default"):r.setCursorStyle(""))}),e)}u.prototype.releaseMouse=null,e.defineOptions(u.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:r.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),t.MouseHandler=u})),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var i=e("../lib/dom");t.FoldHandler=function(e){e.on("click",(function(t){var n=t.getDocumentPosition(),r=e.session;(n=r.getFoldAt(n.row,n.column,1))&&(t.getAccelKey()?r.removeFold(n):r.expandFold(n),t.stop()),(n=t.domEvent&&t.domEvent.target)&&i.hasCssClass(n,"ace_inline_button")&&i.hasCssClass(n,"ace_toggle_wrap")&&(r.setOption("wrap",!r.getUseWrapMode()),e.renderer.scrollCursorIntoView())})),e.on("gutterclick",(function(t){var n,i;"foldWidgets"==e.renderer.$gutterLayer.getRegion(t)&&(n=t.getDocumentPosition().row,(i=e.session).foldWidgets&&i.foldWidgets[n]&&e.session.onFoldWidgetClick(n,t),e.isFocused()||e.focus(),t.stop())})),e.on("gutterdblclick",(function(t){var n,i,r;"foldWidgets"==e.renderer.$gutterLayer.getRegion(t)&&(r=t.getDocumentPosition().row,(i=(i=(n=e.session).getParentFoldRangeData(r,!0)).range||i.firstRange)&&(r=i.start.row,(r=n.getFoldAt(r,n.getLine(r).length,1))?n.removeFold(r):(n.addFold("...",i),e.renderer.scrollCursorIntoView({row:i.start.row,column:0}))),t.stop())}))}})),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],(function(e,t,n){"use strict";var i=e("../lib/keys"),r=e("../lib/event");function o(e){this.$editor=e,this.$data={editor:e},this.$handlers=[],this.setDefaultHandler(e.commands)}o.prototype.setDefaultHandler=function(e){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=e,this.addKeyboardHandler(e,0)},o.prototype.setKeyboardHandler=function(e){var t=this.$handlers;if(t[t.length-1]!=e){for(;t[t.length-1]&&t[t.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(t[t.length-1]);this.addKeyboardHandler(e,1)}},o.prototype.addKeyboardHandler=function(e,t){var n;e&&("function"!=typeof e||e.handleKeyboard||(e.handleKeyboard=e),-1!=(n=this.$handlers.indexOf(e))&&this.$handlers.splice(n,1),null==t?this.$handlers.push(e):this.$handlers.splice(t,0,e),-1==n)&&e.attach&&e.attach(this.$editor)},o.prototype.removeKeyboardHandler=function(e){var t=this.$handlers.indexOf(e);return-1!=t&&(this.$handlers.splice(t,1),e.detach&&e.detach(this.$editor),!0)},o.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},o.prototype.getStatusText=function(){var e=this.$data,t=e.editor;return this.$handlers.map((function(n){return n.getStatusText&&n.getStatusText(t,e)||""})).filter(Boolean).join(" ")},o.prototype.$callKeyboardHandlers=function(e,t,n,i){for(var o,s=!1,a=this.$editor.commands,l=this.$handlers.length;l--&&!((o=this.$handlers[l].handleKeyboard(this.$data,e,t,n,i))&&o.command&&((s="null"==o.command||a.exec(o.command,this.$editor,o.args,i))&&i&&-1!=e&&1!=o.passEvent&&1!=o.command.passEvent&&r.stopEvent(i),s)););return s||-1!=e||(o={command:"insertstring"},s=a.exec("insertstring",this.$editor,t)),s&&this.$editor._signal&&this.$editor._signal("keyboardActivity",o),s},o.prototype.onCommandKey=function(e,t,n){var r=i.keyCodeToString(n);return this.$callKeyboardHandlers(t,r,n,e)},o.prototype.onTextInput=function(e){return this.$callKeyboardHandlers(-1,e)},t.KeyBinding=o})),ace.define("ace/lib/bidiutil",["require","exports","module"],(function(e,t,n){"use strict";var i=0,r=0,o=!1,s=!1,a=!1,l=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],c=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],u=0,h=1,d=2,p=3,g=4,f=5,m=6,v=7,y=8,C=9,b=10,I=11,A=12,w=13,x=14,S=15,k=16,E=17,T=18,R=[T,T,T,T,T,T,T,T,T,m,f,m,y,f,T,T,T,T,T,T,T,T,T,T,T,T,T,T,f,f,f,m,y,g,g,I,I,I,g,g,g,g,g,b,C,b,C,C,d,d,d,d,d,d,d,d,d,d,C,g,g,g,g,g,g,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,g,g,g,g,g,g,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,g,g,g,g,T,T,T,T,T,T,f,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,C,g,I,I,I,I,g,g,g,g,u,g,g,T,g,g,I,I,d,d,g,u,g,g,g,d,u,g,g,g,g,g],_=[y,y,y,y,y,y,y,y,y,y,y,T,T,T,u,h,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,y,f,w,x,S,k,E,C,I,I,I,I,I,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,C,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,g,y];function $(e,t,n,R){var _,$,L,M=i?c:l,P=0,O=-1,B=null,W=null,F=[];if(!R)for(B=0,R=[];B<n;B++)R[B]=N(e[B]);for(r=i,a=s=o=!1,W=0;W<n;W++){if(L=P,F[W]=_=function(e,t,n,r){var l,c,R,_=t[r];switch(_){case u:case h:o=!1;case g:case p:return _;case d:return o?p:d;case v:return o=!0,h;case y:return g;case C:return r<1||r+1>=t.length||(l=n[r-1])!=d&&l!=p||($=t[r+1])!=d&&$!=p?g:($=o?p:$)==l?$:g;case b:return(l=0<r?n[r-1]:f)==d&&r+1<t.length&&t[r+1]==d?d:g;case I:if(0<r&&n[r-1]==d)return d;if(o)return g;for(R=r+1,c=t.length;R<c&&t[R]==I;)R++;return R<c&&t[R]==d?d:g;case A:for(c=t.length,R=r+1;R<c&&t[R]==A;)R++;if(R<c){var $=1425<=($=e[r])&&$<=2303||64286==$;if(l=t[R],$&&(l==h||l==v))return h}return r<1||(l=t[r-1])==f?g:n[r-1];case f:return s=!(o=!1),i;case m:return a=!0,g;case w:case x:case k:case E:case S:o=!1;case T:return g}}(e,R,F,W),L=240&(P=M[L][_]),P&=15,t[W]=$=M[P][5],0<L){if(16==L)for(B=O;B<W;B++)t[B]=1;O=-1}if(M[P][6])-1==O&&(O=W);else if(-1<O){for(B=O;B<W;B++)t[B]=$;O=-1}R[W]==f&&(t[W]=0),r|=$}if(a)for(B=0;B<n;B++)if(R[B]==m){t[B]=i;for(var H=B-1;0<=H&&R[H]==y;H--)t[H]=i}}function L(e,t,n){if(!(r<e))if(1!=e||1!=i||s)for(var o,a,l,c,u=n.length,h=0;h<u;){if(t[h]>=e){for(o=h+1;o<u&&t[o]>=e;)o++;for(a=h,l=o-1;a<l;a++,l--)c=n[a],n[a]=n[l],n[l]=c;h=o}h++}else n.reverse()}function N(e){var t=e.charCodeAt(0),n=t>>8;return 0==n?191<t?u:R[t]:5==n?/[\u0591-\u05f4]/.test(e)?h:u:6==n?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(e)?A:/[\u0660-\u0669\u066b-\u066c]/.test(e)?p:1642==t?I:/[\u06f0-\u06f9]/.test(e)?d:v:32==n&&t<=8287?_[255&t]:254==n&&65136<=t?v:g}t.L=u,t.R=h,t.EN=d,t.ON_R=3,t.AN=4,t.R_H=5,t.B=6,t.RLE=7,t.DOT="\xb7",t.doBidiReorder=function(e,n,r){if(e.length<2)return{};var o=e.split(""),s=new Array(o.length),a=new Array(o.length),l=[];i=r?1:0,$(o,l,o.length,n);for(var c=0;c<s.length;s[c]=c,c++);for(L(2,l,s),L(1,l,s),c=0;c<s.length-1;c++)n[c]===p?l[c]=t.AN:l[c]===h&&(n[c]>v&&n[c]<w||n[c]===g||n[c]===T)?l[c]=t.ON_R:0<c&&"\u0644"===o[c-1]&&/\u0622|\u0623|\u0625|\u0627/.test(o[c])&&(l[c-1]=l[c]=t.R_H,c++);for(o[o.length-1]===t.DOT&&(l[o.length-1]=t.B),"\u202b"===o[0]&&(l[0]=t.RLE),c=0;c<s.length;c++)a[c]=l[s[c]];return{logicalFromVisual:s,bidiLevels:a}},t.hasBidiCharacters=function(e,t){for(var n=!1,i=0;i<e.length;i++)t[i]=N(e.charAt(i)),n||t[i]!=h&&t[i]!=v&&t[i]!=p||(n=!0);return n},t.getVisualFromLogicalIdx=function(e,t){for(var n=0;n<t.logicalFromVisual.length;n++)if(t.logicalFromVisual[n]==e)return n;return 0}})),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],(function(e,t,n){"use strict";var i=e("./lib/bidiutil"),r=e("./lib/lang"),o=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/;function s(e){this.session=e,this.bidiMap={},this.currentRow=null,this.bidiUtil=i,this.charWidths=[],this.EOL="\xac",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="\xb6",this.RLE="\u202b",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=o.test(e.getValue())}s.prototype.isBidiRow=function(e,t,n){return!!this.seenBidi&&(e!==this.currentRow&&(this.currentRow=e,this.updateRowLine(t,n),this.updateBidiMap()),this.bidiMap.bidiLevels)},s.prototype.onChange=function(e){this.seenBidi?this.currentRow=null:"insert"==e.action&&o.test(e.lines.join("\n"))&&(this.seenBidi=!0,this.currentRow=null)},s.prototype.getDocumentRow=function(){var e=0,t=this.session.$screenRowCache;return t.length&&0<=(t=this.session.$getRowCacheIndex(t,this.currentRow))?this.session.$docRowCache[t]:e},s.prototype.getSplitIndex=function(){var e=0,t=this.session.$screenRowCache;if(t.length)for(var n,i=this.session.$getRowCacheIndex(t,this.currentRow);0<this.currentRow-e&&(n=this.session.$getRowCacheIndex(t,this.currentRow-e-1))===i;)i=n,e++;else e=this.currentRow;return e},s.prototype.updateRowLine=function(e,t){var n,o=(e=void 0===e?this.getDocumentRow():e)===this.session.getLength()-1?this.EOF:this.EOL,s=(this.wrapIndent=0,this.line=this.session.getLine(e),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,(!this.session.$useWrapMode||(e=this.session.$wrapData[e])&&(0<(t=void 0===t?this.getSplitIndex():t)&&e.length?(this.wrapIndent=e.indent,this.wrapOffset=this.wrapIndent*this.charWidths[i.L],this.line=t<e.length?this.line.substring(e[t-1],e[t]):this.line.substring(e[e.length-1])):this.line=this.line.substring(0,e[t]),t==e.length))&&(this.line+=this.showInvisibles?o:i.DOT),this.session),a=0;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,(function(e,t){return"\t"===e||s.isFullWidth(e.charCodeAt(0))?(n="\t"===e?s.getScreenTabSize(t+a):2,a+=n-1,r.stringRepeat(i.DOT,n)):e})),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==i.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},s.prototype.updateBidiMap=function(){var e=[];i.hasBidiCharacters(this.line,e)||this.isRtlDir?this.bidiMap=i.doBidiReorder(this.line,e,this.isRtlDir):this.bidiMap={}},s.prototype.markAsDirty=function(){this.currentRow=null},s.prototype.updateCharacterWidths=function(e){var t;this.characterWidth!==e.$characterSize.width&&(this.fontMetrics=e,t=this.characterWidth=e.$characterSize.width,e=e.$measureCharWidth("\u05d4"),this.charWidths[i.L]=this.charWidths[i.EN]=this.charWidths[i.ON_R]=t,this.charWidths[i.R]=this.charWidths[i.AN]=e,this.charWidths[i.R_H]=.45*e,this.charWidths[i.B]=this.charWidths[i.RLE]=0,this.currentRow=null)},s.prototype.setShowInvisibles=function(e){this.showInvisibles=e,this.currentRow=null},s.prototype.setEolChar=function(e){this.EOL=e},s.prototype.setContentWidth=function(e){this.contentWidth=e},s.prototype.isRtlLine=function(e){return!!this.$isRtl||(null!=e?this.session.getLine(e).charAt(0)==this.RLE:this.isRtlDir)},s.prototype.setRtlDirection=function(e,t){for(var n=e.getCursorPosition(),i=e.selection.getSelectionAnchor().row;i<=n.row;i++)t||e.session.getLine(i).charAt(0)!==e.session.$bidiHandler.RLE?t&&e.session.getLine(i).charAt(0)!==e.session.$bidiHandler.RLE&&e.session.doc.insert({column:0,row:i},e.session.$bidiHandler.RLE):e.session.doc.removeInLine(i,0,1)},s.prototype.getPosLeft=function(e){e-=this.wrapIndent;var t=this.line.charAt(0)===this.RLE?1:0,n=t<e?this.session.getOverwrite()?e:e-1:t,r=i.getVisualFromLogicalIdx(n,this.bidiMap),o=this.bidiMap.bidiLevels,s=0;!this.session.getOverwrite()&&e<=t&&o[r]%2!=0&&r++;for(var a=0;a<r;a++)s+=this.charWidths[o[a]];return!this.session.getOverwrite()&&t<e&&o[r]%2==0&&(s+=this.charWidths[o[r]]),this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(s+=this.rtlLineOffset),s},s.prototype.getSelections=function(e,t){var n,i=this.bidiMap,r=i.bidiLevels,o=[],s=0,a=Math.min(e,t)-this.wrapIndent,l=Math.max(e,t)-this.wrapIndent,c=!1,u=!1,h=0;this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var d,p=0;p<r.length;p++)d=i.logicalFromVisual[p],n=r[p],(c=a<=d&&d<l)&&!u?h=s:!c&&u&&o.push({left:h,width:s-h}),s+=this.charWidths[n],u=c;if(c&&p===r.length&&o.push({left:h,width:s-h}),this.isRtlDir)for(var g=0;g<o.length;g++)o[g].left+=this.rtlLineOffset;return o},s.prototype.offsetToCol=function(e){this.isRtlDir&&(e-=this.rtlLineOffset);var t=0,n=(e=Math.max(e,0),0),i=0,r=this.bidiMap.bidiLevels,o=this.charWidths[r[i]];for(this.wrapIndent&&(e-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);n+o/2<e;){if(n+=o,i===r.length-1){o=0;break}o=this.charWidths[r[++i]]}return 0===(t=0<i&&r[i-1]%2!=0&&r[i]%2==0?(e<n&&i--,this.bidiMap.logicalFromVisual[i]):0<i&&r[i-1]%2==0&&r[i]%2!=0?1+(n<e?this.bidiMap.logicalFromVisual[i]:this.bidiMap.logicalFromVisual[i-1]):this.isRtlDir&&i===r.length-1&&0===o&&r[i-1]%2==0||!this.isRtlDir&&0===i&&r[i]%2!=0?1+this.bidiMap.logicalFromVisual[i]:(0<i&&r[i-1]%2!=0&&0!==o&&i--,this.bidiMap.logicalFromVisual[i]))&&this.isRtlDir&&t++,t+this.wrapIndent},t.BidiHandler=s})),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],(function(e,t,n){"use strict";function i(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var t=this;this.cursor.on("change",(function(e){t.$cursorChanged=!0,t.$silent||t._emit("changeCursor"),t.$isEmpty||t.$silent||t._emit("changeSelection"),t.$keepDesiredColumnOnChange||e.old.column==e.value.column||(t.$desiredColumn=null)})),this.anchor.on("change",(function(){t.$anchorChanged=!0,t.$isEmpty||t.$silent||t._emit("changeSelection")}))}var r=e("./lib/oop"),o=e("./lib/lang"),s=e("./lib/event_emitter").EventEmitter,a=e("./range").Range;(function(){r.implement(this,s),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},this.getCursor=function(){return this.lead.getPosition()},this.setAnchor=function(e,t){this.$isEmpty=!1,this.anchor.setPosition(e,t)},this.setSelectionAnchor=this.setAnchor,this.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionAnchor=this.getAnchor,this.getSelectionLead=function(){return this.lead.getPosition()},this.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},this.getRange=function(){var e=this.anchor,t=this.lead;return this.$isEmpty?a.fromPoints(t,t):this.isBackwards()?a.fromPoints(t,e):a.fromPoints(e,t)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},this.setRange=this.setSelectionRange=function(e,t){var n=t?e.end:e.start;t=t?e.start:e.end,this.$setSelection(n.row,n.column,t.row,t.column)},this.$setSelection=function(e,t,n,i){var r,o;!this.$silent&&(r=this.$isEmpty,o=this.inMultiSelectMode,this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(e,t),this.cursor.setPosition(n,i),this.$isEmpty=!a.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),this.$cursorChanged||this.$anchorChanged||r!=this.$isEmpty||o)&&this._emit("changeSelection")},this.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},this.selectTo=function(e,t){this.$moveSelection((function(){this.moveCursorTo(e,t)}))},this.selectToPosition=function(e){this.$moveSelection((function(){this.moveCursorToPosition(e)}))},this.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},this.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(e,t){var n;return void 0===t&&(e=(n=e||this.lead).row,t=n.column),this.session.getWordRange(e,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor();e=this.session.getAWordRange(e.row,e.column),this.setSelectionRange(e)},this.getLineRange=function(e,t){e="number"==typeof e?e:this.lead.row;var n=(n=this.session.getFoldLine(e))?(e=n.start.row,n.end.row):e;return!0===t?new a(e,0,n,this.session.getLine(n).length):new a(e,0,n+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.wouldMoveIntoSoftTab=function(e,t,n){var i=e.column,r=e.column+t;return n<0&&(i=e.column-t,r=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(i,r).split(" ").length-1==t},this.moveCursorLeft=function(){var e,t=this.lead.getPosition();(e=this.session.getFoldAt(t.row,t.column,-1))?this.moveCursorTo(e.start.row,e.start.column):0===t.column?0<t.row&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length):(e=this.session.getTabSize(),this.wouldMoveIntoSoftTab(t,e,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-e):this.moveCursorBy(0,-1))},this.moveCursorRight=function(){var e,t=this.lead.getPosition();(e=this.session.getFoldAt(t.row,t.column,1))?this.moveCursorTo(e.end.row,e.end.column):this.lead.column==this.doc.getLine(this.lead.row).length?this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0):(e=this.session.getTabSize(),t=this.lead,this.wouldMoveIntoSoftTab(t,e,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,e):this.moveCursorBy(0,1))},this.moveCursorLineStart=function(){var e=this.lead.row,t=this.lead.column,n=this.session.documentToScreenRow(e,t);n=this.session.screenToDocumentPosition(n,0),(e=this.session.getDisplayLine(e,null,n.row,n.column).match(/^\s*/))[0].length==t||this.session.$useEmacsStyleLineStart||(n.column+=e[0].length),this.moveCursorToPosition(n)},this.moveCursorLineEnd=function(){var e,t=this.lead;t=this.session.getDocumentLastRowColumnPosition(t.row,t.column),this.lead.column==t.column&&(e=this.session.getLine(t.row),t.column==e.length)&&0<(e=e.search(/\s+$/))&&(t.column=e),this.moveCursorTo(t.row,t.column)},this.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),i=n.substring(t),r=(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.getFoldAt(e,t,1));r?this.moveCursorTo(r.end.row,r.end.column):(this.session.nonTokenRe.exec(i)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,i=n.substring(t)),t>=n.length?(this.moveCursorTo(e,n.length),this.moveCursorRight(),e<this.doc.getLength()-1&&this.moveCursorWordRight()):(this.session.tokenRe.exec(i)&&(t+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(e,t)))},this.moveCursorLongWordLeft=function(){var e,t=this.lead.row,n=this.lead.column;(e=this.session.getFoldAt(t,n,-1))?this.moveCursorTo(e.start.row,e.start.column):(null==(e=this.session.getFoldStringAt(t,n,-1))&&(e=this.doc.getLine(t).substring(0,n)),e=o.stringReverse(e),this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(e)&&(n-=this.session.nonTokenRe.lastIndex,e=e.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),n<=0?(this.moveCursorTo(t,0),this.moveCursorLeft(),0<t&&this.moveCursorWordLeft()):(this.session.tokenRe.exec(e)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,n)))},this.$shortWordEndIndex=function(e){var t,n=0,i=/\s/,r=this.session.tokenRe;if(r.lastIndex=0,this.session.tokenRe.exec(e))n=this.session.tokenRe.lastIndex;else{for(;(t=e[n])&&i.test(t);)n++;if(n<1)for(r.lastIndex=0;(t=e[n])&&!r.test(t);)if(r.lastIndex=0,n++,i.test(t)){if(2<n){n--;break}for(;(t=e[n])&&i.test(t);)n++;if(2<n)break}}return r.lastIndex=0,n},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),i=n.substring(t),r=this.session.getFoldAt(e,t,1);if(r)return this.moveCursorTo(r.end.row,r.end.column);if(t==n.length){for(var o=this.doc.getLength();i=this.doc.getLine(++e),e<o&&/^\s*$/.test(i););/^\s+/.test(i)||(i=""),t=0}r=this.$shortWordEndIndex(i),this.moveCursorTo(e,t+r)},this.moveCursorShortWordLeft=function(){var e=this.lead.row,t=this.lead.column;if(i=this.session.getFoldAt(e,t,-1))return this.moveCursorTo(i.start.row,i.start.column);var n=this.session.getLine(e).substring(0,t);if(0===t){for(;n=this.doc.getLine(--e),0<e&&/^\s*$/.test(n););t=n.length,/\s+$/.test(n)||(n="")}var i=o.stringReverse(n);return i=this.$shortWordEndIndex(i),this.moveCursorTo(e,t-i)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(e,t){var n,i=this.session.documentToScreenPosition(this.lead.row,this.lead.column),r=(0===t&&(0!==e&&(this.session.$bidiHandler.isBidiRow(i.row,this.lead.row)?(n=this.session.$bidiHandler.getPosLeft(i.column),i.column=Math.round(n/this.session.$bidiHandler.charWidths[0])):n=i.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?i.column=this.$desiredColumn:this.$desiredColumn=i.column),0!=e&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]&&(r=this.session.lineWidgets[this.lead.row],e<0?e-=r.rowsAbove||0:0<e&&(e+=r.rowCount-(r.rowsAbove||0))),this.session.screenToDocumentPosition(i.row+e,i.column,n));0!==e&&0===t&&r.row===this.lead.row&&(r.column,this.lead.column),this.moveCursorTo(r.row,r.column+t,0===t)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,n){var i=((i=this.session.getFoldAt(e,t,1))&&(e=i.start.row,t=i.start.column),this.$keepDesiredColumnOnChange=!0,this.session.getLine(e));/[\uDC00-\uDFFF]/.test(i.charAt(t))&&i.charAt(t-1)&&(this.lead.row==e&&this.lead.column==t+1?t-=1:t+=1),this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},this.moveCursorToScreen=function(e,t,n){e=this.session.screenToDocumentPosition(e,t),this.moveCursorTo(e.row,e.column,n)},this.detach=function(){this.lead.detach(),this.anchor.detach()},this.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},this.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var n=this.getCursor();return a.fromPoints(t,n)}catch(e){return a.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},this.toJSON=function(){var e;return this.rangeCount?e=this.ranges.map((function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t})):(e=this.getRange()).isBackwards=this.isBackwards(),e},this.fromJSON=function(e){if(null==e.start){if(this.rangeList&&1<e.length){this.toSingleRange(e[0]);for(var t=e.length;t--;){var n=a.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},this.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0}}).call(i.prototype),t.Selection=i})),ace.define("ace/tokenizer",["require","exports","module","ace/config"],(function(e,t,n){"use strict";e=e("./config");var i=2e3,r=(o.prototype.$setMaxTokenCount=function(e){i=0|e},o.prototype.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),n=this.token.apply(this,t);if("string"==typeof n)return[{type:n,value:e}];for(var i=[],r=0,o=n.length;r<o;r++)t[r]&&(i[i.length]={type:n[r],value:t[r]});return i},o.prototype.$arrayTokens=function(e){if(!e)return[];var t=this.splitRegex.exec(e);if(!t)return"text";for(var n=[],i=this.tokenArray,r=0,o=i.length;r<o;r++)t[r+1]&&(n[n.length]={type:i[r],value:t[r+1]});return n},o.prototype.removeCapturingGroups=function(e){return e.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,(function(e,t){return t?"(?:":e}))},o.prototype.createSplitterRegexp=function(e,t){var n,i,r;return"$"!=(e="^"!=(e=-1!=e.indexOf("(?=")&&(n=0,i=!1,r={},e.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,(function(e,t,o,s,a,l){return i?i="]"!=a:a?i=!0:s?(n==r.stack&&(r.end=l+1,r.stack=-1),n--):o&&(n++,1!=o.length)&&(r.stack=n,r.start=l),e})),null!=r.end)&&/^\)*$/.test(e.substr(r.end))?e.substring(0,r.start)+e.substr(r.end):e).charAt(0)?"^"+e:e).charAt(e.length-1)&&(e+="$"),new RegExp(e,(t||"").replace("g",""))},o.prototype.getLineTokens=function(e,t){t&&"string"!=typeof t?"#tmp"===(t=(n=t.slice(0))[0])&&(n.shift(),t=n.shift()):n=[];for(var n,r,o=t||"start",s=(s=this.states[o])||this.states[o="start"],a=this.matchMappings[o],l=this.regExps[o],c=[],u=l.lastIndex=0,h=0,d={type:null,value:""};r=l.exec(e);){var p,g=a.defaultToken,f=null,m=r[0],v=l.lastIndex;v-m.length>u&&(p=e.substring(u,v-m.length),d.type==g?d.value+=p:(d.type&&c.push(d),d={type:g,value:p}));for(var y=0;y<r.length-2;y++)if(void 0!==r[y+1]){g=(f=s[a[y]]).onMatch?f.onMatch(m,o,n,e):f.token,f.next&&(o="string"==typeof f.next?f.next:f.next(o,n),(s=this.states[o])||(this.reportError("state doesn't exist",o),s=this.states[o="start"]),a=this.matchMappings[o],(l=this.regExps[o]).lastIndex=u=v),f.consumeLineEnd&&(u=v);break}if(m)if("string"==typeof g)f&&!1===f.merge||d.type!==g?(d.type&&c.push(d),d={type:g,value:m}):d.value+=m;else if(g)for(d.type&&c.push(d),d={type:null,value:""},y=0;y<g.length;y++)c.push(g[y]);if(u==e.length)break;if(u=v,h++>i){for(h>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});u<e.length;)d.type&&c.push(d),d={value:e.substring(u,u+=500),type:"overflow"};o="start",n=[];break}}return d.type&&c.push(d),1<n.length&&n[0]!==o&&n.unshift("#tmp",o),{tokens:c,state:n.length?n:o}},o);function o(e){for(var t in this.states=e,this.regExps={},this.matchMappings={},this.states){for(var n=this.states[t],i=[],r=0,o=this.matchMappings[t]={defaultToken:"text"},s="g",a=[],l=0;l<n.length;l++){var c,u,h=n[l];h.defaultToken&&(o.defaultToken=h.defaultToken),h.caseInsensitive&&-1===s.indexOf("i")&&(s+="i"),h.unicode&&-1===s.indexOf("u")&&(s+="u"),null==h.regex||(h.regex instanceof RegExp&&(h.regex=h.regex.toString().slice(1,-1)),c=h.regex,u=new RegExp("(?:("+c+")|(.))").exec("a").length-2,Array.isArray(h.token)?1==h.token.length||1==u?h.token=h.token[0]:u-1!=h.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:h,groupCount:u-1}),h.token=h.token[0]):(h.tokenArray=h.token,h.token=null,h.onMatch=this.$arrayTokens):"function"!=typeof h.token||h.onMatch||(h.onMatch=1<u?this.$applyToken:h.token),1<u&&(c=/\\\d/.test(h.regex)?h.regex.replace(/\\([0-9]+)/g,(function(e,t){return"\\"+(parseInt(t,10)+r+1)})):(u=1,this.removeCapturingGroups(h.regex)),h.splitRegex||"string"==typeof h.token||a.push(h)),o[r]=l,r+=u,i.push(c),h.onMatch)||(h.onMatch=null)}i.length||(o[0]=0,i.push("$")),a.forEach((function(e){e.splitRegex=this.createSplitterRegexp(e.regex,s)}),this),this.regExps[t]=new RegExp("("+i.join(")|(")+")|($)",s)}}r.prototype.reportError=e.reportError,t.Tokenizer=r})),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],(function(e,t,n){"use strict";function i(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}}var r=e("../lib/lang");(function(){function e(e,t){return"start"==e&&!t.length||t.unshift(this.nextState,e),this.nextState}function t(e,t){return t.shift(),t.shift()||"start"}this.addRules=function(e,t){if(t)for(var n in e){for(var i=e[n],r=0;r<i.length;r++){var o=i[r];(o.next||o.onMatch)&&("string"==typeof o.next&&0!==o.next.indexOf(t)&&(o.next=t+o.next),o.nextState)&&0!==o.nextState.indexOf(t)&&(o.nextState=t+o.nextState)}this.$rules[t+n]=i}else for(var n in e)this.$rules[n]=e[n]},this.getRules=function(){return this.$rules},this.embedRules=function(e,t,n,i,o){if(e="function"==typeof e?(new e).getRules():e,i)for(var s=0;s<i.length;s++)i[s]=t+i[s];else for(var a in i=[],e)i.push(t+a);if(this.addRules(e,t),n){var l=Array.prototype[o?"push":"unshift"];for(s=0;s<i.length;s++)l.apply(this.$rules[i[s]],r.deepCopy(n))}this.$embeds||(this.$embeds=[]),this.$embeds.push(t)},this.getEmbeds=function(){return this.$embeds},this.normalizeRules=function(){var n=0,i=this.$rules;Object.keys(i).forEach((function r(o){var s=i[o];s.processed=!0;for(var a=0;a<s.length;a++){var l=s[a],c=null,u=(Array.isArray(l)&&(c=l,l={}),!l.regex&&l.start&&(l.regex=l.start,l.next||(l.next=[]),l.next.push({defaultToken:l.token},{token:l.token+".end",regex:l.end||l.start,next:"pop"}),l.token=l.token+".start",l.push=!0),l.next||l.push);if(u&&Array.isArray(u)?((d=l.stateName)||("string"!=typeof(d=l.token)&&(d=d[0]||""),i[d]&&(d+=n++)),i[d]=u,r(l.next=d)):"pop"==u&&(l.next=t),l.push&&(l.nextState=l.next||l.push,l.next=e,delete l.push),l.rules)for(var h in l.rules)i[h]?i[h].push&&i[h].push.apply(i[h],l.rules[h]):i[h]=l.rules[h];var d="string"==typeof l?l:l.include;d&&("$self"===d&&(d="start"),c=Array.isArray(d)?d.map((function(e){return i[e]})):i[d]),c&&(u=[a,1].concat(c),l.noEscape&&(u=u.filter((function(e){return!e.next}))),s.splice.apply(s,u),a--),l.keywordMap&&(l.token=this.createKeywordMapper(l.keywordMap,l.defaultToken||"text",l.caseInsensitive),delete l.defaultToken)}}),this)},this.createKeywordMapper=function(e,t,n,i){var r=Object.create(null);return this.$keywordList=[],Object.keys(e).forEach((function(t){for(var o=e[t].split(i||"|"),s=o.length;s--;){var a=o[s];this.$keywordList.push(a),n&&(a=a.toLowerCase()),r[a]=t}}),this),e=null,n?function(e){return r[e.toLowerCase()]||t}:function(e){return r[e]||t}},this.getKeywords=function(){return this.$keywords}}).call(i.prototype),t.TextHighlightRules=i})),ace.define("ace/mode/behaviour",["require","exports","module"],(function(e,t,n){"use strict";function i(){this.$behaviours={}}(function(){this.add=function(e,t,n){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[e]:this.$behaviours[e]={}}this.$behaviours[e][t]=n},this.addBehaviours=function(e){for(var t in e)for(var n in e[t])this.add(t,n,e[t][n])},this.remove=function(e){this.$behaviours&&this.$behaviours[e]&&delete this.$behaviours[e]},this.inherit=function(e,t){e=("function"==typeof e?new e:e).getBehaviours(t),this.addBehaviours(e)},this.getBehaviours=function(e){if(e){for(var t={},n=0;n<e.length;n++)this.$behaviours[e[n]]&&(t[e[n]]=this.$behaviours[e[n]]);return t}return this.$behaviours}}).call(i.prototype),t.Behaviour=i})),ace.define("ace/token_iterator",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var i=e("./range").Range;function r(e,t,n){this.$session=e,this.$row=t,this.$rowTokens=e.getTokens(t),e=e.getTokenAt(t,n),this.$tokenIndex=e?e.index:-1}r.prototype.stepBackward=function(){for(--this.$tokenIndex;this.$tokenIndex<0;){if(--this.$row,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},r.prototype.stepForward=function(){var e;for(this.$tokenIndex+=1;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,e=e||this.$session.getLength(),this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},r.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},r.prototype.getCurrentTokenRow=function(){return this.$row},r.prototype.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,n=e[t].start;if(void 0===n)for(n=0;0<t;)n+=e[--t].value.length;return n},r.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},r.prototype.getCurrentTokenRange=function(){var e=this.$rowTokens[this.$tokenIndex],t=this.getCurrentTokenColumn();return new i(this.$row,t,this.$row,t+e.value.length)},t.TokenIterator=r})),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],(function(e,t,n){"use strict";function i(e){var t=-1;if((p=e.multiSelect&&(t=e.selection.index,p.rangeCount!=e.multiSelect.rangeCount)?{rangeCount:e.multiSelect.rangeCount}:p)[t])return s=p[t];s=p[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}}function r(e,t,n,i){var r=e.end.row-e.start.row;return{text:n+t+i,selection:[0,e.start.column+1,r,e.end.column+(r?0:1)]}}function o(e){this.add("braces","insertion",(function(t,n,a,l,c){var h=a.getCursorPosition(),d=l.doc.getLine(h.row);if("{"==c)return i(a),g=a.getSelectionRange(),""!==(f=l.doc.getTextRange(g))&&"{"!==f&&a.getWrapBehavioursEnabled()?r(g,f,"{","}"):o.isSaneInsertion(a,l)?/[\]\}\)]/.test(d[h.column])||a.inMultiSelectMode||e&&e.braces?(o.recordAutoInsert(a,l,"}"),{text:"{}",selection:[1,1]}):(o.recordMaybeInsert(a,l,"{"),{text:"{",selection:[1,1]}):void 0;if("}"==c){i(a);var p=d.substring(h.column,h.column+1);if("}"==p&&null!==l.$findOpeningBracket("}",{column:h.column+1,row:h.row})&&o.isAutoInsertedClosing(h,d,c))return o.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==c||"\r\n"==c){i(a);var g="";if(o.isMaybeInsertedClosing(h,d)&&(g=u.stringRepeat("}",s.maybeInsertedBrackets),o.clearMaybeInsertedClosing()),"}"===(p=d.substring(h.column,h.column+1))){var f=l.findMatchingBracket({row:h.row,column:h.column+1},"}");if(!f)return null;var m=this.$getIndent(l.getLine(f.row))}else{if(!g)return void o.clearMaybeInsertedClosing();m=this.$getIndent(d)}return{text:"\n"+(c=m+l.getTabString())+"\n"+m+g,selection:[1,c.length,1,c.length]}}o.clearMaybeInsertedClosing()}})),this.add("braces","deletion",(function(e,t,n,r,o){var a=r.doc.getTextRange(o);if(!o.isMultiLine()&&"{"==a){if(i(n),"}"==r.doc.getLine(o.start.row).substring(o.end.column,o.end.column+1))return o.end.column++,o;s.maybeInsertedBrackets--}})),this.add("parens","insertion",(function(e,t,n,s,a){if("("==a)return i(n),l=n.getSelectionRange(),""!==(c=s.doc.getTextRange(l))&&n.getWrapBehavioursEnabled()?r(l,c,"(",")"):o.isSaneInsertion(n,s)?(o.recordAutoInsert(n,s,")"),{text:"()",selection:[1,1]}):void 0;if(")"==a){i(n);var l=n.getCursorPosition(),c=s.doc.getLine(l.row);if(")"==(n=c.substring(l.column,l.column+1))&&null!==s.$findOpeningBracket(")",{column:l.column+1,row:l.row})&&o.isAutoInsertedClosing(l,c,a))return o.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("parens","deletion",(function(e,t,n,r,o){var s=r.doc.getTextRange(o);if(!o.isMultiLine()&&"("==s&&(i(n),")"==r.doc.getLine(o.start.row).substring(o.start.column+1,o.start.column+2)))return o.end.column++,o})),this.add("brackets","insertion",(function(e,t,n,s,a){if("["==a)return i(n),l=n.getSelectionRange(),""!==(c=s.doc.getTextRange(l))&&n.getWrapBehavioursEnabled()?r(l,c,"[","]"):o.isSaneInsertion(n,s)?(o.recordAutoInsert(n,s,"]"),{text:"[]",selection:[1,1]}):void 0;if("]"==a){i(n);var l=n.getCursorPosition(),c=s.doc.getLine(l.row);if("]"==(n=c.substring(l.column,l.column+1))&&null!==s.$findOpeningBracket("]",{column:l.column+1,row:l.row})&&o.isAutoInsertedClosing(l,c,a))return o.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("brackets","deletion",(function(e,t,n,r,o){var s=r.doc.getTextRange(o);if(!o.isMultiLine()&&"["==s&&(i(n),"]"==r.doc.getLine(o.start.row).substring(o.start.column+1,o.start.column+2)))return o.end.column++,o})),this.add("string_dquotes","insertion",(function(e,t,n,o,s){var a=o.$mode.$quotes||g;if(1==s.length&&a[s]&&(!this.lineCommentStart||-1==this.lineCommentStart.indexOf(s))){i(n);var l=n.getSelectionRange();if(!(""===(c=o.doc.getTextRange(l))||1==c.length&&a[c])&&n.getWrapBehavioursEnabled())return r(l,c,s,s);if(!c){a=n.getCursorPosition();var c=(l=o.doc.getLine(a.row)).substring(a.column-1,a.column),u=(n=l.substring(a.column,a.column+1),o.getTokenAt(a.row,a.column)),h=o.getTokenAt(a.row,a.column+1);if("\\"==c&&u&&/escape/.test(u.type))return null;u=u&&/string|escape/.test(u.type);var d,p=!h||/string|escape/.test(h.type);if(n==s)(d=u!==p)&&/string\.end/.test(h.type)&&(d=!1);else{if(u&&!p)return null;if(u&&p)return null;if((h=o.$mode.tokenRe).lastIndex=0,u=h.test(c),h.lastIndex=0,p=h.test(n),!((o=o.$mode.$pairQuotesAfter)&&o[s]&&o[s].test(c))&&u||p)return null;if(n&&!/[\s;,.})\]\\]/.test(n))return null;if(o=l[a.column-2],c==s&&(o==s||h.test(o)))return null;d=!0}return{text:d?s+s:"",selection:[1,1]}}}})),this.add("string_dquotes","deletion",(function(e,t,n,r,o){var s=r.$mode.$quotes||g,a=r.doc.getTextRange(o);if(!o.isMultiLine()&&s.hasOwnProperty(a)&&(i(n),r.doc.getLine(o.start.row).substring(o.start.column+1,o.start.column+2)==a))return o.end.column++,o}))}var s,a=e("../../lib/oop"),l=e("../behaviour").Behaviour,c=e("../../token_iterator").TokenIterator,u=e("../../lib/lang"),h=["text","paren.rparen","rparen","paren","punctuation.operator"],d=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],p={},g={'"':'"',"'":"'"};o.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),i=new c(t,n.row,n.column);if(!this.$matchTokenType(i.getCurrentToken()||"text",h)){if(/[)}\]]/.test(e.session.getLine(n.row)[n.column]))return!0;if(e=new c(t,n.row,n.column+1),!this.$matchTokenType(e.getCurrentToken()||"text",h))return!1}return i.stepForward(),i.getCurrentTokenRow()!==n.row||this.$matchTokenType(i.getCurrentToken()||"text",d)},o.$matchTokenType=function(e,t){return-1<t.indexOf(e.type||e)},o.recordAutoInsert=function(e,t,n){e=e.getCursorPosition(),t=t.doc.getLine(e.row),this.isAutoInsertedClosing(e,t,s.autoInsertedLineEnd[0])||(s.autoInsertedBrackets=0),s.autoInsertedRow=e.row,s.autoInsertedLineEnd=n+t.substr(e.column),s.autoInsertedBrackets++},o.recordMaybeInsert=function(e,t,n){e=e.getCursorPosition(),t=t.doc.getLine(e.row),this.isMaybeInsertedClosing(e,t)||(s.maybeInsertedBrackets=0),s.maybeInsertedRow=e.row,s.maybeInsertedLineStart=t.substr(0,e.column)+n,s.maybeInsertedLineEnd=t.substr(e.column),s.maybeInsertedBrackets++},o.isAutoInsertedClosing=function(e,t,n){return 0<s.autoInsertedBrackets&&e.row===s.autoInsertedRow&&n===s.autoInsertedLineEnd[0]&&t.substr(e.column)===s.autoInsertedLineEnd},o.isMaybeInsertedClosing=function(e,t){return 0<s.maybeInsertedBrackets&&e.row===s.maybeInsertedRow&&t.substr(e.column)===s.maybeInsertedLineEnd&&t.substr(0,e.column)==s.maybeInsertedLineStart},o.popAutoInsertedClosing=function(){s.autoInsertedLineEnd=s.autoInsertedLineEnd.substr(1),s.autoInsertedBrackets--},o.clearMaybeInsertedClosing=function(){s&&(s.maybeInsertedBrackets=0,s.maybeInsertedRow=-1)},a.inherits(o,l),t.CstyleBehaviour=o})),ace.define("ace/unicode",["require","exports","module"],(function(e,t,n){"use strict";for(var i=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],r=0,o=[],s=0;s<i.length;s+=2)o.push(r+=i[s]),i[s+1]&&o.push(45,r+=i[s+1]);t.wordChars=String.fromCharCode.apply(null,o)})),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],(function(e,t,n){"use strict";function i(){this.HighlightRules=s}var r=e("../config"),o=e("../tokenizer").Tokenizer,s=e("./text_highlight_rules").TextHighlightRules,a=e("./behaviour/cstyle").CstyleBehaviour,l=e("../unicode"),c=e("../lib/lang"),u=e("../token_iterator").TokenIterator,h=e("../range").Range;(function(){this.$defaultBehaviour=new a,this.tokenRe=new RegExp("^["+l.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+l.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new o(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,t,n,i){var r=t.doc,o=!0,s=!0,a=1/0,l=t.getTabSize(),u=!1;if(this.lineCommentStart){m=Array.isArray(this.lineCommentStart)?(y=this.lineCommentStart.map(c.escapeRegExp).join("|"),this.lineCommentStart[0]):(y=c.escapeRegExp(this.lineCommentStart),this.lineCommentStart),y=new RegExp("^(\\s*)(?:"+y+") ?"),u=t.getUseSoftTabs();var h=function(e,t){var n,i,o=e.match(y);o&&(n=o[1].length,i=o[0].length,f(e,n,i)||" "!=o[0][i-1]||i--,r.removeInLine(t,n,i))},d=m+" ",p=function(e,t){o&&!/\S/.test(e)||(f(e,a,a)?r.insertInLine({row:t,column:a},d):r.insertInLine({row:t,column:a},m))},g=function(e,t){return y.test(e)},f=function(e,t,n){for(var i=0;t--&&" "==e.charAt(t);)i++;if(i%l!=0)return!1;for(i=0;" "==e.charAt(n++);)i++;return 2<l?i%l!=l-1:i%l==0}}else{if(!this.blockComment)return!1;var m=this.blockComment.start,v=this.blockComment.end,y=new RegExp("^(\\s*)(?:"+c.escapeRegExp(m)+")"),C=new RegExp("(?:"+c.escapeRegExp(v)+")\\s*$");p=function(e,t){g(e,t)||o&&!/\S/.test(e)||(r.insertInLine({row:t,column:e.length},v),r.insertInLine({row:t,column:a},m))},h=function(e,t){var n;(n=e.match(C))&&r.removeInLine(t,e.length-n[0].length,e.length),(n=e.match(y))&&r.removeInLine(t,n[1].length,n[0].length)},g=function(e,n){if(y.test(e))return!0;for(var i=t.getTokens(n),r=0;r<i.length;r++)if("comment"===i[r].type)return!0}}function b(e){for(var t=n;t<=i;t++)e(r.getLine(t),t)}var I=1/0;b((function(e,t){var n=e.search(/\S/);-1!==n?(n<a&&(a=n),s&&!g(e,t)&&(s=!1)):I>e.length&&(I=e.length)})),a==1/0&&(a=I,s=o=!1),u&&a%l!=0&&(a=Math.floor(a/l)*l),b(s?h:p)},this.toggleBlockComment=function(e,t,n,i){var r=this.blockComment;if(r){!r.start&&r[0]&&(r=r[0]);var o,s,a=(g=new u(t,i.row,i.column)).getCurrentToken(),l=(t.selection,t.selection.toOrientedRange());if(a&&/comment/.test(a.type)){for(;a&&/comment/.test(a.type);){if(-1!=(f=a.value.indexOf(r.start))){var c=g.getCurrentTokenRow(),d=g.getCurrentTokenColumn()+f,p=new h(c,d,c,d+r.start.length);break}a=g.stepBackward()}var g,f;for(a=(g=new u(t,i.row,i.column)).getCurrentToken();a&&/comment/.test(a.type);){if(-1!=(f=a.value.indexOf(r.end))){c=g.getCurrentTokenRow(),d=g.getCurrentTokenColumn()+f;var m=new h(c,d,c,d+r.end.length);break}a=g.stepForward()}m&&t.remove(m),p&&(t.remove(p),o=p.start.row,s=-r.start.length)}else s=r.start.length,o=n.start.row,t.insert(n.end,r.end),t.insert(n.start,r.start);l.start.row==o&&(l.start.column+=s),l.end.row==o&&(l.end.column+=s),t.selection.fromOrientedRange(l)}},this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.autoOutdent=function(e,t,n){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){for(var t in this.$embeds=[],this.$modes={},e){var n,i,o;e[t]&&(i=(n=e[t]).prototype.$id,(o=r.$modes[i])||(r.$modes[i]=o=new n),r.$modes[t]||(r.$modes[t]=o),this.$embeds.push(t),this.$modes[t]=o)}var s=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"];for(t=0;t<s.length;t++)!function(e){var n=s[t],i=e[n];e[s[t]]=function(){return this.$delegator(n,arguments,i)}}(this)},this.$delegator=function(e,t,n){var i=t[0]||"start";if("string"!=typeof i){if(Array.isArray(i[2])){var r=i[2][i[2].length-1];if(s=this.$modes[r])return s[e].apply(s,[i[1]].concat([].slice.call(t,1)))}i=i[0]||"start"}for(var o=0;o<this.$embeds.length;o++)if(this.$modes[this.$embeds[o]]){var s,a=i.split(this.$embeds[o]);if(!a[0]&&a[1])return t[0]=a[1],(s=this.$modes[this.$embeds[o]])[e].apply(s,t)}return r=n.apply(this,t),n?r:void 0},this.transformAction=function(e,t,n,i,r){if(this.$behaviour){var o,s=this.$behaviour.getBehaviours();for(o in s)if(s[o][t]){var a=s[o][t].apply(this,arguments);if(a)return a}}},this.getKeywords=function(e){if(!this.completionKeywords){var t=this.$tokenizer.rules,n=[];for(s in t)for(var i=t[s],r=0,o=i.length;r<o;r++)if("string"==typeof i[r].token)/keyword|support|storage/.test(i[r].token)&&n.push(i[r].regex);else if("object"==typeof i[r].token)for(var s,a=0,l=i[r].token.length;a<l;a++)/keyword|support|storage/.test(i[r].token[a])&&(s=i[r].regex.match(/\(.+?\)/g)[a],n.push(s.substr(1,s.length-2)));this.completionKeywords=n}return e?n.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(e,t,n,i){return(this.$keywordList||this.$createKeywordList()).map((function(e){return{name:e,value:e,score:0,meta:"keyword"}}))},this.$id="ace/mode/text"}).call(i.prototype),t.Mode=i})),ace.define("ace/apply_delta",["require","exports","module"],(function(e,t,n){"use strict";t.applyDelta=function(e,t,n){var i=t.start.row,r=t.start.column,o=e[i]||"";switch(t.action){case"insert":1===t.lines.length?e[i]=o.substring(0,r)+t.lines[0]+o.substring(r):(s=[i,1].concat(t.lines),e.splice.apply(e,s),e[i]=o.substring(0,r)+e[i],e[i+t.lines.length-1]+=o.substring(r));break;case"remove":var s=t.end.column,a=t.end.row;i===a?e[i]=o.substring(0,r)+o.substring(s):e.splice(i,a-i+1,o.substring(0,r)+e[a].substring(s))}}})),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,n){"use strict";var i=e("./lib/oop"),r=(e=e("./lib/event_emitter").EventEmitter,o.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},o.prototype.getDocument=function(){return this.document},o.prototype.onChange=function(e){e.start.row==e.end.row&&e.start.row!=this.row||e.start.row>this.row||(e=function(e,t,n){var i=((a="insert"==e.action)?1:-1)*(e.end.row-e.start.row),r=(a?1:-1)*(e.end.column-e.start.column),o=e.start,a=a?o:e.end;return s(t,o,n)?{row:t.row,column:t.column}:s(a,t,!n)?{row:t.row+i,column:t.column+(t.row==a.row?r:0)}:{row:o.row,column:o.column}}(e,{row:this.row,column:this.column},this.$insertRight),this.setPosition(e.row,e.column,!0))},o.prototype.setPosition=function(e,t,n){n=n?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row==n.row&&this.column==n.column||(e={row:this.row,column:this.column},this.row=n.row,this.column=n.column,this._signal("change",{old:e,value:n}))},o.prototype.detach=function(){this.document.off("change",this.$onChange)},o.prototype.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},o.prototype.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n},o);function o(e,t,n){this.$onChange=this.onChange.bind(this),this.attach(e),void 0===n?this.setPosition(t.row,t.column):this.setPosition(t,n)}function s(e,t,n){return n=n?e.column<=t.column:e.column<t.column,e.row<t.row||e.row==t.row&&n}r.prototype.$insertRight=!1,i.implement(r.prototype,e),t.Anchor=r})),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],(function(e,t,n){"use strict";var i=e("./lib/oop"),r=e("./apply_delta").applyDelta,o=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,a=e("./anchor").Anchor;function l(e){this.$lines=[""],0===e.length?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)}l.prototype.setValue=function(e){var t=this.getLength()-1;this.remove(new s(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e||"")},l.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},l.prototype.createAnchor=function(e,t){return new a(this,e,t)},l.prototype.$detectNewLine=function(e){e=e.match(/^.*?(\r\n|\r|\n)/m),this.$autoNewLine=e?e[1]:"\n",this._signal("changeNewLineMode")},l.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},l.prototype.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},l.prototype.getNewLineMode=function(){return this.$newLineMode},l.prototype.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},l.prototype.getLine=function(e){return this.$lines[e]||""},l.prototype.getLines=function(e,t){return this.$lines.slice(e,t+1)},l.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},l.prototype.getLength=function(){return this.$lines.length},l.prototype.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},l.prototype.getLinesForRange=function(e){var t,n;return e.start.row===e.end.row?t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)]:((t=this.getLines(e.start.row,e.end.row))[0]=(t[0]||"").substring(e.start.column),n=t.length-1,e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))),t},l.prototype.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},l.prototype.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},l.prototype.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},l.prototype.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},l.prototype.insertInLine=function(e,t){var n=this.clippedPos(e.row,e.column);return e=this.pos(e.row,e.column+t.length),this.applyDelta({start:n,end:e,action:"insert",lines:[t]},!0),this.clonePos(e)},l.prototype.clippedPos=function(e,t){var n=this.getLength();return void 0===e?e=n:e<0?e=0:n<=e&&(e=n-1,t=void 0),n=this.getLine(e),null==t&&(t=n.length),{row:e,column:t=Math.min(Math.max(t,0),n.length)}},l.prototype.clonePos=function(e){return{row:e.row,column:e.column}},l.prototype.pos=function(e,t){return{row:e,column:t}},l.prototype.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},l.prototype.insertFullLines=function(e,t){var n=0;n=(e=Math.min(Math.max(e,0),this.getLength()))<this.getLength()?(t=t.concat([""]),0):(t=[""].concat(t),this.$lines[--e].length),this.insertMergedLines({row:e,column:n},t)},l.prototype.insertMergedLines=function(e,t){var n={row:(e=this.clippedPos(e.row,e.column)).row+t.length-1,column:(1==t.length?e.column:0)+t[t.length-1].length};return this.applyDelta({start:e,end:n,action:"insert",lines:t}),this.clonePos(n)},l.prototype.remove=function(e){var t=this.clippedPos(e.start.row,e.start.column);return e=this.clippedPos(e.end.row,e.end.column),this.applyDelta({start:t,end:e,action:"remove",lines:this.getLinesForRange({start:t,end:e})}),this.clonePos(t)},l.prototype.removeInLine=function(e,t,n){return t=this.clippedPos(e,t),e=this.clippedPos(e,n),this.applyDelta({start:t,end:e,action:"remove",lines:this.getLinesForRange({start:t,end:e})},!0),this.clonePos(t)},l.prototype.removeFullLines=function(e,t){e=Math.min(Math.max(0,e),this.getLength()-1);var n=(t=Math.min(Math.max(0,t),this.getLength()-1))==this.getLength()-1&&0<e,i=t<this.getLength()-1,r=n?e-1:e,o=(n=n?this.getLine(r).length:0,i?t+1:t);return i=i?0:this.getLine(o).length,r=new s(r,n,o,i),n=this.$lines.slice(e,t+1),this.applyDelta({start:r.start,end:r.end,action:"remove",lines:this.getLinesForRange(r)}),n},l.prototype.removeNewLine=function(e){e<this.getLength()-1&&0<=e&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},l.prototype.replace=function(e,t){return e instanceof s||(e=s.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty()?e.start:t==this.getTextRange(e)?e.end:(this.remove(e),t?this.insert(e.start,t):e.start)},l.prototype.applyDeltas=function(e){for(var t=0;t<e.length;t++)this.applyDelta(e[t])},l.prototype.revertDeltas=function(e){for(var t=e.length-1;0<=t;t--)this.revertDelta(e[t])},l.prototype.applyDelta=function(e,t){var n="insert"==e.action;(n?e.lines.length<=1&&!e.lines[0]:!s.comparePoints(e.start,e.end))||(n&&2e4<e.lines.length?this.$splitAndapplyLargeDelta(e,2e4):(r(this.$lines,e,t),this._signal("change",e)))},l.prototype.$safeApplyDelta=function(e){var t=this.$lines.length;("remove"==e.action&&e.start.row<t&&e.end.row<t||"insert"==e.action&&e.start.row<=t)&&this.applyDelta(e)},l.prototype.$splitAndapplyLargeDelta=function(e,t){for(var n=e.lines,i=n.length-t+1,r=e.start.row,o=e.start.column,s=0,a=0;s<i;s=a){a+=t-1;var l=n.slice(s,a);l.push(""),this.applyDelta({start:this.pos(r+s,o),end:this.pos(r+a,o=0),action:e.action,lines:l},!0)}e.lines=n.slice(s),e.start.row=r+s,e.start.column=o,this.applyDelta(e,!0)},l.prototype.revertDelta=function(e){this.$safeApplyDelta({start:this.clonePos(e.start),end:this.clonePos(e.end),action:"insert"==e.action?"remove":"insert",lines:e.lines.slice()})},l.prototype.indexToPosition=function(e,t){for(var n=this.$lines||this.getAllLines(),i=this.getNewLineCharacter().length,r=t||0,o=n.length;r<o;r++)if((e-=n[r].length+i)<0)return{row:r,column:e+n[r].length+i};return{row:o-1,column:e+n[o-1].length+i}},l.prototype.positionToIndex=function(e,t){for(var n=this.$lines||this.getAllLines(),i=this.getNewLineCharacter().length,r=0,o=Math.min(e.row,n.length),s=t||0;s<o;++s)r+=n[s].length+i;return r+e.column},l.prototype.$split=function(e){return e.split(/\r\n|\r|\n/)},(e=l).prototype.$autoNewLine="",e.prototype.$newLineMode="auto",i.implement(e.prototype,o),t.Document=e})),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,n){"use strict";var i=e("./lib/oop"),r=(e=e("./lib/event_emitter").EventEmitter,o.prototype.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},o.prototype.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},o.prototype.fireUpdateEvent=function(e,t){this._signal("update",{data:{first:e,last:t}})},o.prototype.start=function(e){this.currentLine=Math.min(e||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},o.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},o.prototype.$updateOnChange=function(e){var t=e.start.row,n=e.end.row-t;0==n?this.lines[t]=null:"remove"==e.action?(this.lines.splice(t,1+n,null),this.states.splice(t,1+n,null)):((e=Array(1+n)).unshift(t,1),this.lines.splice.apply(this.lines,e),this.states.splice.apply(this.states,e)),this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},o.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},o.prototype.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},o.prototype.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},o.prototype.$tokenizeRow=function(e){var t=this.doc.getLine(e),n=this.states[e-1];return t=this.tokenizer.getLineTokens(t,n,e),this.states[e]+""!=t.state+""?(this.states[e]=t.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=t.tokens},o.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},o);function o(e,t){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=e;var n=this;this.$worker=function(){if(n.running){for(var e=new Date,t=n.currentLine,i=-1,r=n.doc,o=t;n.lines[t];)t++;var s=r.getLength(),a=0;for(n.running=!1;t<s;){for(n.$tokenizeRow(t),i=t;t++,n.lines[t];);if(++a%5==0&&20<new Date-e){n.running=setTimeout(n.$worker,20);break}}n.currentLine=t,o<=(i=-1==i?t:i)&&n.fireUpdateEvent(o,i)}}}i.implement(r.prototype,e),t.BackgroundTokenizer=r})),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],(function(e,t,n){"use strict";var i=e("./lib/lang"),r=e("./range").Range;function o(e,t,n){void 0===n&&(n="text"),this.setRegexp(e),this.clazz=t,this.type=n}o.prototype.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},o.prototype.update=function(e,t,n,o){if(this.regExp)for(var s=o.firstRow,a=o.lastRow,l={},c=s;c<=a;c++){var u=this.cache[c];null==u&&(u=(u=(u=i.getMatchOffsets(n.getLine(c),this.regExp)).length>this.MAX_RANGES?u.slice(0,this.MAX_RANGES):u).map((function(e){return new r(c,e.offset,c,e.offset+e.length)})),this.cache[c]=u.length?u:"");for(var h=u.length;h--;){var d=u[h].toScreenRange(n),p=d.toString();l[p]||(l[p]=!0,t.drawSingleLineMarker(e,d,this.clazz,o))}}},(e=o).prototype.MAX_RANGES=500,t.SearchHighlight=e})),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var i=e("../range").Range;function r(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t],e=t[t.length-1],this.range=new i(t[0].start.row,t[0].start.column,e.end.row,e.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach((function(e){e.setFoldLine(this)}),this)}r.prototype.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach((function(t){t.start.row+=e,t.end.row+=e}))},r.prototype.addFold=function(e){if(e.sameRow){if(e.start.row<this.startRow||e.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort((function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)})),0<this.range.compareEnd(e.start.row,e.start.column)?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},r.prototype.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},r.prototype.walk=function(e,t,n){var i,r,o=0,s=this.folds,a=!0;null==t&&(t=this.end.row,n=this.end.column);for(var l=0;l<s.length;l++){if(-1==(r=(i=s[l]).range.compareStart(t,n)))return void e(null,t,n,o,a);if(!e(null,i.start.row,i.start.column,o,a)&&e(i.placeholder,i.start.row,i.start.column,o)||0===r)return;a=!i.sameRow,o=i.end.column}e(null,t,n,o,a)},r.prototype.getNextFoldTo=function(e,t){for(var n,i,r=0;r<this.folds.length;r++){if(-1==(i=(n=this.folds[r]).range.compareEnd(e,t)))return{fold:n,kind:"after"};if(0===i)return{fold:n,kind:"inside"}}return null},r.prototype.addRemoveChars=function(e,t,n){var i,r=this.getNextFoldTo(e,t);if(r)if(i=r.fold,"inside"==r.kind&&i.start.column!=t&&i.start.row!=e)window.console&&window.console.log(e,t,i);else if(i.start.row==e){var o,s=(o=this.folds).indexOf(i);for(0===s&&(this.start.column+=n);s<o.length;s++){if((i=o[s]).start.column+=n,!i.sameRow)return;i.end.column+=n}this.end.column+=n}},r.prototype.split=function(e,t){var n,i;return(e=this.getNextFoldTo(e,t))&&"inside"!=e.kind?(t=e.fold,e=this.folds,n=this.foldData,t=e.indexOf(t),i=e[t-1],this.end.row=i.end.row,this.end.column=i.end.column,i=new r(n,e=e.splice(t,e.length-t)),n.splice(n.indexOf(this)+1,0,i),i):null},r.prototype.merge=function(e){for(var t=e.folds,n=0;n<t.length;n++)this.addFold(t[n]);var i=this.foldData;i.splice(i.indexOf(e),1)},r.prototype.toString=function(){var e=[this.range.toString()+": ["];return this.folds.forEach((function(t){e.push(" "+t.toString())})),e.push("]"),e.join("\n")},r.prototype.idxToPosition=function(e){for(var t=0,n=0;n<this.folds.length;n++){var i=this.folds[n];if((e-=i.start.column-t)<0)return{row:i.start.row,column:i.start.column+e};if((e-=i.placeholder.length)<0)return i.start;t=i.end.column}return{row:this.end.row,column:this.end.column+e}},t.FoldLine=r})),ace.define("ace/range_list",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var i=e("./range").Range.comparePoints;function r(){this.ranges=[],this.$bias=1}r.prototype.pointIndex=function(e,t,n){for(var r=this.ranges,o=n||0;o<r.length;o++){var s=r[o],a=i(e,s.end);if(!(0<a))return s=i(e,s.start),0===a?t&&0!==s?-o-2:o:0<s||0===s&&!t?o:-o-1}return-o-1},r.prototype.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t);return(t=this.pointIndex(e.end,t,n=n<0?-n-1:n))<0?t=-t-1:t++,this.ranges.splice(n,t-n,e)},r.prototype.addList=function(e){for(var t=[],n=e.length;n--;)t.push.apply(t,this.add(e[n]));return t},r.prototype.substractPoint=function(e){if(0<=(e=this.pointIndex(e)))return this.ranges.splice(e,1)},r.prototype.merge=function(){for(var e=[],t=this.ranges,n=(t=t.sort((function(e,t){return i(e.start,t.start)})))[0],r=1;r<t.length;r++){var o=n,s=(n=t[r],i(o.end,n.start));s<0||(0!=s||o.isEmpty()||n.isEmpty())&&(i(o.end,n.end)<0&&(o.end.row=n.end.row,o.end.column=n.end.column),t.splice(r,1),e.push(n),n=o,r--)}return this.ranges=t,e},r.prototype.contains=function(e,t){return 0<=this.pointIndex({row:e,column:t})},r.prototype.containsPoint=function(e){return 0<=this.pointIndex(e)},r.prototype.rangeAtPoint=function(e){if(0<=(e=this.pointIndex(e)))return this.ranges[e]},r.prototype.clipRows=function(e,t){var n=this.ranges;if(n[0].start.row>t||n[n.length-1].start.row<e)return[];e=this.pointIndex({row:e,column:0});for(var i=this.pointIndex({row:t,column:0},e=e<0?-e-1:e),r=(i<0&&(i=-i-1),[]),o=e;o<i;o++)r.push(n[o]);return r},r.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},r.prototype.attach=function(e){this.session&&this.detach(),this.session=e,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},r.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},r.prototype.$onChange=function(e){for(var t=e.start,n=e.end,i=t.row,r=n.row,o=this.ranges,s=0,a=o.length;s<a&&!((l=o[s]).end.row>=i);s++);var l;if("insert"==e.action)for(var c=r-i,u=-t.column+n.column;s<a&&!((l=o[s]).start.row>i);s++)l.start.row==i&&l.start.column>=t.column&&(l.start.column==t.column&&this.$bias<=0||(l.start.column+=u,l.start.row+=c)),l.end.row==i&&l.end.column>=t.column&&(l.end.column==t.column&&this.$bias<0||(l.end.column==t.column&&0<u&&s<a-1&&l.end.column>l.start.column&&l.end.column==o[s+1].start.column&&(l.end.column-=u),l.end.column+=u,l.end.row+=c));else for(c=i-r,u=t.column-n.column;s<a&&!((l=o[s]).start.row>r);s++)l.end.row<r&&(i<l.end.row||i==l.end.row&&t.column<l.end.column)?(l.end.row=i,l.end.column=t.column):l.end.row==r?l.end.column<=n.column?(c||l.end.column>t.column)&&(l.end.column=t.column,l.end.row=t.row):(l.end.column+=u,l.end.row+=c):l.end.row>r&&(l.end.row+=c),l.start.row<r&&(i<l.start.row||i==l.start.row&&t.column<l.start.column)?(l.start.row=i,l.start.column=t.column):l.start.row==r?l.start.column<=n.column?(c||l.start.column>t.column)&&(l.start.column=t.column,l.start.row=t.row):(l.start.column+=u,l.start.row+=c):l.start.row>r&&(l.start.row+=c);if(0!=c&&s<a)for(;s<a;s++)(l=o[s]).start.row+=c,l.end.row+=c},(e=r).prototype.comparePoints=i,t.RangeList=e})),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],(function(e,t,n){"use strict";var i,r,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}))(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});function s(e,t){var n=r.call(this)||this;return n.foldLine=null,n.placeholder=t,n.range=e,n.start=e.start,n.end=e.end,n.sameRow=e.start.row==e.end.row,n.subFolds=n.ranges=[],n}function a(e,t){e.row-=t.row,0==e.row&&(e.column-=t.column)}function l(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row}e=e("../range_list").RangeList,o(s,r=e),s.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},s.prototype.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach((function(t){t.setFoldLine(e)}))},s.prototype.clone=function(){var e=new s(this.range.clone(),this.placeholder);return this.subFolds.forEach((function(t){e.subFolds.push(t.clone())})),e.collapseChildren=this.collapseChildren,e},s.prototype.addSubFold=function(e){if(!this.range.isEqual(e)){o=e,s=this.start,a(o.start,s),a(o.end,s);for(var t=e.start.row,n=e.start.column,i=0,r=-1;i<this.subFolds.length&&1==(r=this.subFolds[i].range.compare(t,n));i++);var o=this.subFolds[i],s=0;if(0==r){if(o.range.containsRange(e))return o.addSubFold(e);s=1}t=e.range.end.row,n=e.range.end.column;var l=i;for(r=-1;l<this.subFolds.length&&1==(r=this.subFolds[l].range.compare(t,n));l++);0==r&&l++;for(var c=this.subFolds.splice(i,l-i,e),u=0==r?c.length-1:c.length,h=s;h<u;h++)e.addSubFold(c[h]);return e.setFoldLine(this.foldLine),e}},s.prototype.restoreRange=function(e){return t=this.start,l(e.start,t),void l(e.end,t);var t},o=s,t.Fold=o})),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator","ace/mouse/mouse_event"],(function(e,t,n){"use strict";var i=e("../range").Range,r=e("./fold_line").FoldLine,o=e("./fold").Fold,s=e("../token_iterator").TokenIterator,a=e("../mouse/mouse_event").MouseEvent;t.Folding=function(){this.getFoldAt=function(e,t,n){var i=this.getFoldLine(e);if(!i)return null;for(var r=i.folds,o=0;o<r.length;o++){var s=r[o].range;if(s.contains(e,t)&&(1!=n||!s.isEnd(e,t)||s.isEmpty())&&(-1!=n||!s.isStart(e,t)||s.isEmpty()))return r[o]}},this.getFoldsInRange=function(e){var t=e.start,n=e.end,i=this.$foldData,r=[];t.column+=1,--n.column;for(var o=0;o<i.length;o++){var s=i[o].range.compareRange(e);if(2!=s){if(-2==s)break;for(var a=i[o].folds,l=0;l<a.length;l++){var c=a[l];if(-2==(s=c.range.compareRange(e)))break;if(2!=s){if(42==s)break;r.push(c)}}}}return--t.column,n.column+=1,r},this.getFoldsInRangeList=function(e){var t;return Array.isArray(e)?(t=[],e.forEach((function(e){t=t.concat(this.getFoldsInRange(e))}),this)):t=this.getFoldsInRange(e),t},this.getAllFolds=function(){for(var e=[],t=this.$foldData,n=0;n<t.length;n++)for(var i=0;i<t[n].folds.length;i++)e.push(t[n].folds[i]);return e},this.getFoldStringAt=function(e,t,n,i){if(!(i=i||this.getFoldLine(e)))return null;for(var r,o={end:{column:0}},s=0;s<i.folds.length;s++){var a,l=(a=i.folds[s]).range.compareEnd(e,t);if(-1==l){r=this.getLine(a.start.row).substring(o.end.column,a.start.column);break}if(0===l)return null;o=a}return r=r||this.getLine(a.start.row).substring(o.end.column),-1==n?r.substring(0,t-o.end.column):1==n?r.substring(t-o.end.column):r},this.getFoldLine=function(e,t){var n=this.$foldData,i=0;for(-1==(i=t?n.indexOf(t):i)&&(i=0);i<n.length;i++){var r=n[i];if(r.start.row<=e&&r.end.row>=e)return r;if(r.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,i=0;for(-1==(i=t?n.indexOf(t):i)&&(i=0);i<n.length;i++){var r=n[i];if(r.end.row>=e)return r}return null},this.getFoldedRowCount=function(e,t){for(var n=this.$foldData,i=t-e+1,r=0;r<n.length;r++){var o=(s=n[r]).end.row,s=s.start.row;if(t<=o){s<t&&(e<=s?i-=t-s:i=0);break}e<=o&&(i-=e<=s?o-s:o-e+1)}return i},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort((function(e,t){return e.start.row-t.start.row})),e},this.addFold=function(e,t){var n,i=this.$foldData,s=!1,a=(e instanceof o?n=e:(n=new o(t,e)).collapseChildren=t.collapseChildren,this.$clipRangeToDocument(n.range),n.start.row),l=(e=n.start.column,n.end.row),c=(t=n.end.column,this.getFoldAt(a,e,1)),u=this.getFoldAt(l,t,-1);if(c&&u==c)return c.addSubFold(n);c&&!c.range.isStart(a,e)&&this.removeFold(c),u&&!u.range.isEnd(l,t)&&this.removeFold(u),0<(e=this.getFoldsInRange(n.range)).length&&(this.removeFolds(e),n.collapseChildren||e.forEach((function(e){n.addSubFold(e)})));for(var h=0;h<i.length;h++){var d=i[h];if(l==d.start.row){d.addFold(n),s=!0;break}if(a==d.end.row){if(d.addFold(n),s=!0,!n.sameRow){var p=i[h+1];if(p&&p.start.row==l){d.merge(p);break}}break}if(l<=d.start.row)break}return s||(d=this.$addFoldLine(new r(this.$foldData,n))),this.$useWrapMode?this.$updateWrapData(d.start.row,d.start.row):this.$updateRowLengthCache(d.start.row,d.start.row),this.$modified=!0,this._signal("changeFold",{data:n,action:"add"}),n},this.addFolds=function(e){e.forEach((function(e){this.addFold(e)}),this)},this.removeFold=function(e){var t=e.foldLine,n=t.start.row,i=t.end.row,r=this.$foldData,o=t.folds;1==o.length?r.splice(r.indexOf(t),1):t.range.isEnd(e.end.row,e.end.column)?(o.pop(),t.end.row=o[o.length-1].end.row,t.end.column=o[o.length-1].end.column):t.range.isStart(e.start.row,e.start.column)?(o.shift(),t.start.row=o[0].start.row,t.start.column=o[0].start.column):e.sameRow?o.splice(o.indexOf(e),1):((o=(r=t.split(e.start.row,e.start.column)).folds).shift(),r.start.row=o[0].start.row,r.start.column=o[0].start.column),this.$updating||(this.$useWrapMode?this.$updateWrapData(n,i):this.$updateRowLengthCache(n,i)),this.$modified=!0,this._signal("changeFold",{data:e,action:"remove"})},this.removeFolds=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n]);t.forEach((function(e){this.removeFold(e)}),this),this.$modified=!0},this.expandFold=function(e){this.removeFold(e),e.subFolds.forEach((function(t){e.restoreRange(t),this.addFold(t)}),this),0<e.collapseChildren&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach((function(e){this.expandFold(e)}),this)},this.unfold=function(e,t){var n,r;if(null==e)n=new i(0,0,this.getLength(),0),null==t&&(t=!0);else if("number"==typeof e)n=new i(e,0,e,this.getLine(e).length);else if("row"in e)n=i.fromPoints(e,e);else{if(Array.isArray(e))return r=[],e.forEach((function(e){r=r.concat(this.unfold(e))}),this),r;n=e}for(e=r=this.getFoldsInRangeList(n);1==r.length&&i.comparePoints(r[0].start,n.start)<0&&0<i.comparePoints(r[0].end,n.end);)this.expandFolds(r),r=this.getFoldsInRangeList(n);if(0!=t?this.removeFolds(r):this.expandFolds(r),e.length)return e},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){return(t=this.getFoldLine(e,t))?t.end.row:e},this.getRowFoldStart=function(e,t){return(t=this.getFoldLine(e,t))?t.start.row:e},this.getFoldDisplayLine=function(e,t,n,i,r){null==i&&(i=e.start.row),null==r&&(r=0),null==t&&(t=e.end.row),null==n&&(n=this.getLine(t).length);var o=this.doc,s="";return e.walk((function(e,t,n,a){if(!(t<i)){if(t==i){if(n<r)return;a=Math.max(r,a)}s+=null!=e?e:o.getLine(t).substring(a,n)}}),t,n),s},this.getDisplayLine=function(e,t,n,i){var r=this.getFoldLine(e);return r?this.getFoldDisplayLine(r,e,t,n,i):(r=this.doc.getLine(e)).substring(i||0,t||r.length)},this.$cloneFoldData=function(){var e=[];return e=this.$foldData.map((function(t){return t=t.folds.map((function(e){return e.clone()})),new r(e,t)}))},this.toggleFold=function(e){var t=this.selection.getRange();if(t.isEmpty()){var n,i=t.start;if(n=this.getFoldAt(i.row,i.column))return void this.expandFold(n);(r=this.findMatchingBracket(i))?1==t.comparePoint(r)?t.end=r:(t.start=r,t.start.column++,t.end.column--):(r=this.findMatchingBracket({row:i.row,column:i.column+1}))?(1==t.comparePoint(r)?t.end=r:t.start=r,t.start.column++):t=this.getCommentFoldRange(i.row,i.column)||t}else{var r=this.getFoldsInRange(t);if(e&&r.length)return void this.expandFolds(r);1==r.length&&(n=r[0])}if((n=n||this.getFoldAt(t.start.row,t.start.column))&&n.range.toString()==t.toString())this.expandFold(n);else{if(i="...",!t.isMultiLine()){if((i=this.getTextRange(t)).length<4)return;i=i.trim().substring(0,2)+".."}this.addFold(i,t)}},this.getCommentFoldRange=function(e,t,n){var r=new s(this,e,t),o=r.getCurrentToken(),a=o&&o.type;if(o&&/^comment|string/.test(a)){"comment"==(a=a.match(/comment|string/)[0])&&(a+="|doc-start");var l=new RegExp(a);if(a=new i,1!=n){for(;(o=r.stepBackward())&&l.test(o.type)&&!/^comment.end/.test(o.type););o=r.stepForward()}if(a.start.row=r.getCurrentTokenRow(),a.start.column=r.getCurrentTokenColumn()+(/^comment.start/.test(o.type)?o.value.length:2),r=new s(this,e,t),-1!=n){var c=-1;do{if(o=r.stepForward(),-1==c){var u=this.getState(r.$row);l.test(u)||(c=r.$row)}else if(r.$row>c)break}while(o&&l.test(o.type)&&!/^comment.start/.test(o.type));o=r.stepBackward()}else o=r.getCurrentToken();return a.end.row=r.getCurrentTokenRow(),a.end.column=r.getCurrentTokenColumn(),/^comment.end/.test(o.type)||(a.end.column+=o.value.length-2),a}},this.foldAll=function(e,t,n,i){null==n&&(n=1e5);var r=this.foldWidgets;if(r){t=t||this.getLength();for(var o,s=e=e||0;s<t;s++)null==r[s]&&(r[s]=this.getFoldWidget(s)),"start"!=r[s]||i&&!i(s)||(o=this.getFoldWidgetRange(s))&&o.isMultiLine()&&o.end.row<=t&&o.start.row>=e&&(s=o.end.row,o.collapseChildren=n,this.addFold("...",o))}},this.foldToLevel=function(e){for(this.foldAll();0<e--;)this.unfold(null,!1)},this.foldAllComments=function(){var e=this;this.foldAll(null,null,null,(function(t){for(var n=e.getTokens(t),i=0;i<n.length;i++){var r=n[i];if("text"!=r.type||!/^\s+$/.test(r.value))return!!/comment/.test(r.type)}}))},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(e){if(!this.$foldStyles[e])throw new Error("invalid fold style: "+e+"["+Object.keys(this.$foldStyles).join(", ")+"]");this.$foldStyle!=e&&("manual"==(this.$foldStyle=e)&&this.unfold(),e=this.$foldMode,this.$setFolding(null),this.$setFolding(e))},this.$setFolding=function(e){this.$foldMode!=e&&(this.$foldMode=e,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),e&&"manual"!=this.$foldStyle?(this.foldWidgets=[],this.getFoldWidget=e.getFoldWidget.bind(e,this,this.$foldStyle),this.getFoldWidgetRange=e.getFoldWidgetRange.bind(e,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)):this.foldWidgets=null)},this.getParentFoldRangeData=function(e,t){var n=this.foldWidgets;if(!n||t&&n[e])return{};for(var i=e-1;0<=i;){var r=n[i];if("start"==(r=null==r?n[i]=this.getFoldWidget(i):r)){var o=this.getFoldWidgetRange(i),s=s||o;if(o&&o.end.row>=e)break}i--}return{range:-1!==i&&o,firstRange:s}},this.onFoldWidgetClick=function(e,t){var n={children:(t=t instanceof a?t.domEvent:t).shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};this.$toggleFoldWidget(e,n)||(e=t.target||t.srcElement)&&/ace_fold-widget/.test(e.className)&&(e.className+=" ace_invalid")},this.$toggleFoldWidget=function(e,t){var n,i,r,o;if(this.getFoldWidget)return n=this.getFoldWidget(e),i=this.getLine(e),(i=this.getFoldAt(e,-1==(n="end"===n?-1:1)?0:i.length,n))?(t.children||t.all?this.removeFold(i):this.expandFold(i),i):(n=this.getFoldWidgetRange(e,!0))&&!n.isMultiLine()&&(i=this.getFoldAt(n.start.row,n.start.column,1))&&n.isEqual(i.range)?(this.removeFold(i),i):(t.siblings?((i=this.getParentFoldRangeData(e)).range&&(r=i.range.start.row+1,o=i.range.end.row),this.foldAll(r,o,t.all?1e4:0)):t.children?(o=n?n.end.row:this.getLength(),this.foldAll(e+1,o,t.all?1e4:0)):n&&(t.all&&(n.collapseChildren=1e4),this.addFold("...",n)),n)},this.toggleFoldWidget=function(e){var t,n=this.selection.getCursor().row;n=this.getRowFoldStart(n),!this.$toggleFoldWidget(n,{})&&(t=(t=this.getParentFoldRangeData(n,!0)).range||t.firstRange)&&(n=t.start.row,(n=this.getFoldAt(n,this.getLine(n).length,1))?this.removeFold(n):this.addFold("...",t))},this.updateFoldWidgets=function(e){var t=e.start.row,n=e.end.row-t;0==n?this.foldWidgets[t]=null:"remove"==e.action?this.foldWidgets.splice(t,1+n,null):((e=Array(1+n)).unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,e))},this.tokenizerUpdateFoldWidgets=function(e){(e=e.data).first!=e.last&&this.foldWidgets.length>e.first&&this.foldWidgets.splice(e.first,this.foldWidgets.length)}}})),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],(function(e,t,n){"use strict";var i=e("../token_iterator").TokenIterator,r=e("../range").Range;t.BracketMatch=function(){this.findMatchingBracket=function(e,t){return 0!=e.column&&""!=(t=t||this.getLine(e.row).charAt(e.column-1))&&(t=t.match(/([\(\[\{])|([\)\]\}])/))?t[1]?this.$findClosingBracket(t[1],e):this.$findOpeningBracket(t[2],e):null},this.getBracketRange=function(e){var t,n,i=this.getLine(e.row),o=!0,s=i.charAt(e.column-1),a=s&&s.match(/([\(\[\{])|([\)\]\}])/);if(a||(s=i.charAt(e.column),e={row:e.row,column:e.column+1},a=s&&s.match(/([\(\[\{])|([\)\]\}])/),o=!1),!a)return null;if(a[1]){if(!(n=this.$findClosingBracket(a[1],e)))return null;t=r.fromPoints(e,n),o||(t.end.column++,t.start.column--),t.cursor=t.end}else{if(!(n=this.$findOpeningBracket(a[2],e)))return null;t=r.fromPoints(n,e),o||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.getMatchingBracketRanges=function(e,t){var n=this.getLine(e.row),i=/([\(\[\{])|([\)\]\}])/,o=!t&&n.charAt(e.column-1),s=o&&o.match(i);return s||(o=(void 0===t||t)&&n.charAt(e.column),e={row:e.row,column:e.column+1},s=o&&o.match(i)),s?(t=new r(e.row,e.column-1,e.row,e.column),(n=s[1]?this.$findClosingBracket(s[1],e):this.$findOpeningBracket(s[2],e))?[t,new r(n.row,n.column,n.row,n.column+1)]:[t]):null},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(e,t,n){var r=this.$brackets[e],o=1,s=new i(this,t.row,t.column),a=s.getCurrentToken();if(a=a||s.stepForward()){n=n||new RegExp("(\\.?"+a.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+");for(var l=t.column-s.getCurrentTokenColumn()-2,c=a.value;;){for(;0<=l;){var u=c.charAt(l);if(u==r){if(0==--o)return{row:s.getCurrentTokenRow(),column:l+s.getCurrentTokenColumn()}}else u==e&&(o+=1);--l}for(;(a=s.stepBackward())&&!n.test(a.type););if(null==a)break;l=(c=a.value).length-1}return null}},this.$findClosingBracket=function(e,t,n){var r=this.$brackets[e],o=1,s=new i(this,t.row,t.column),a=s.getCurrentToken();if(a=a||s.stepForward()){n=n||new RegExp("(\\.?"+a.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+");for(var l=t.column-s.getCurrentTokenColumn();;){for(var c=a.value,u=c.length;l<u;){var h=c.charAt(l);if(h==r){if(0==--o)return{row:s.getCurrentTokenRow(),column:l+s.getCurrentTokenColumn()}}else h==e&&(o+=1);l+=1}for(;(a=s.stepForward())&&!n.test(a.type););if(null==a)break;l=0}return null}},this.getMatchingTags=function(e){e=new i(this,e.row,e.column);var t=this.$findTagName(e);if(t)return"<"===e.stepBackward().value?this.$findClosingTag(e,t):this.$findOpeningTag(e,t)},this.$findTagName=function(e){var t=e.getCurrentToken(),n=!1,i=!1;if(t&&-1===t.type.indexOf("tag-name"))for(;(t=i?e.stepBackward():e.stepForward())&&("/>"===t.value?i=!0:-1!==t.type.indexOf("tag-name")&&(n=!0)),t&&!n;);return t},this.$findClosingTag=function(e,t){var n=t.value,i=t.value,o=0,s=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1),a=(t=e.stepForward(),new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length)),l=!1;do{var c,u=t;if(t=e.stepForward())if(">"!==t.value||l||(c=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1),l=!0),-1!==t.type.indexOf("tag-name")){if(i===(n=t.value))if("<"===u.value)o++;else if("</"===u.value&&--o<0){e.stepBackward();var h=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+2),d=(t=e.stepForward(),new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length));if(!(t=e.stepForward())||">"!==t.value)return;var p=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}else i===n&&"/>"===t.value&&--o<0&&(p=d=h=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+2),c=new r(a.end.row,a.end.column,a.end.row,a.end.column+1))}while(t&&0<=o);if(s&&c&&h&&p&&a&&d)return{openTag:new r(s.start.row,s.start.column,c.end.row,c.end.column),closeTag:new r(h.start.row,h.start.column,p.end.row,p.end.column),openTagName:a,closeTagName:d}},this.$findOpeningTag=function(e,t){var n,i=e.getCurrentToken(),o=t.value,s=0,a=e.getCurrentTokenRow(),l=e.getCurrentTokenColumn(),c=new r(a,l,a,l+2),u=(e.stepForward(),new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length));if((t=e.stepForward())&&">"===t.value){var h=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);e.stepBackward(),e.stepBackward();do{if(t=i,a=e.getCurrentTokenRow(),n=(l=e.getCurrentTokenColumn())+t.value.length,i=e.stepBackward(),t)if(-1!==t.type.indexOf("tag-name")){if(o===t.value)if("<"===i.value){if(0<++s){for(var d=new r(a,l,a,n),p=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);(t=e.stepForward())&&">"!==t.value;);var g=new r(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}else"</"===i.value&&s--}else if("/>"===t.value){for(var f=0,m=i;m;){if(-1!==m.type.indexOf("tag-name")&&m.value===o){s--;break}if("<"===m.value)break;m=e.stepBackward(),f++}for(var v=0;v<f;v++)e.stepForward()}}while(i&&s<=0);return p&&g&&c&&h&&d&&u?{openTag:new r(p.start.row,p.start.column,g.end.row,g.end.column),closeTag:new r(c.start.row,c.start.column,h.end.row,h.end.column),openTagName:d,closeTagName:u}:void 0}}}})),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"],(function(e,t,n){"use strict";var i=e("./lib/oop"),r=e("./lib/lang"),o=e("./bidihandler").BidiHandler,s=e("./config"),a=e("./lib/event_emitter").EventEmitter,l=e("./selection").Selection,c=e("./mode/text").Mode,u=e("./range").Range,h=e("./document").Document,d=e("./background_tokenizer").BackgroundTokenizer,p=e("./search_highlight").SearchHighlight,g=(f.prototype.setDocument=function(e){this.doc&&this.doc.off("change",this.$onChange),(this.doc=e).on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},f.prototype.getDocument=function(){return this.doc},f.prototype.$resetRowCache=function(e){var t;e?(t=this.$docRowCache.length,(e=this.$getRowCacheIndex(this.$docRowCache,e)+1)<t&&(this.$docRowCache.splice(e,t),this.$screenRowCache.splice(e,t))):(this.$docRowCache=[],this.$screenRowCache=[])},f.prototype.$getRowCacheIndex=function(e,t){for(var n=0,i=e.length-1;n<=i;){var r=n+i>>1,o=e[r];if(o<t)n=1+r;else{if(!(t<o))return r;i=r-1}}return n-1},f.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},f.prototype.onChangeFold=function(e){e=e.data,this.$resetRowCache(e.start.row)},f.prototype.onChange=function(e){this.$modified=!0,this.$bidiHandler.onChange(e),this.$resetRowCache(e.start.row);var t=this.$updateInternalDataOnChange(e);!this.$fromUndo&&this.$undoManager&&(t&&t.length&&(this.$undoManager.add({action:"removeFolds",folds:t},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(e,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(e),this._signal("change",e)},f.prototype.setValue=function(e){this.doc.setValue(e),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},f.prototype.toString=function(){return this.doc.getValue()},f.prototype.getSelection=function(){return this.selection},f.prototype.getState=function(e){return this.bgTokenizer.getState(e)},f.prototype.getTokens=function(e){return this.bgTokenizer.getTokens(e)},f.prototype.getTokenAt=function(e,t){var n=this.bgTokenizer.getTokens(e),i=0;if(null==t){var r=n.length-1;i=this.getLine(e).length}else for(r=0;r<n.length&&!(t<=(i+=n[r].value.length));r++);return(e=n[r])?(e.index=r,e.start=i-e.value.length,e):null},f.prototype.setUndoManager=function(e){var t;this.$undoManager=e,this.$informUndoManager&&this.$informUndoManager.cancel(),e?(e.addSession(t=this),this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.mergeUndoDeltas=!1},this.$informUndoManager=r.delayedCall(this.$syncInformUndoManager)):this.$syncInformUndoManager=function(){}},f.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},f.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},f.prototype.getTabString=function(){return this.getUseSoftTabs()?r.stringRepeat(" ",this.getTabSize()):"\t"},f.prototype.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},f.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},f.prototype.setTabSize=function(e){this.setOption("tabSize",e)},f.prototype.getTabSize=function(){return this.$tabSize},f.prototype.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize==0},f.prototype.setNavigateWithinSoftTabs=function(e){this.setOption("navigateWithinSoftTabs",e)},f.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},f.prototype.setOverwrite=function(e){this.setOption("overwrite",e)},f.prototype.getOverwrite=function(){return this.$overwrite},f.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},f.prototype.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},f.prototype.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},f.prototype.getBreakpoints=function(){return this.$breakpoints},f.prototype.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t<e.length;t++)this.$breakpoints[e[t]]="ace_breakpoint";this._signal("changeBreakpoint",{})},f.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},f.prototype.setBreakpoint=function(e,t){(t=void 0===t?"ace_breakpoint":t)?this.$breakpoints[e]=t:delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},f.prototype.clearBreakpoint=function(e){delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},f.prototype.addMarker=function(e,t,n,i){var r=this.$markerId++;return e={range:e,type:n||"line",renderer:"function"==typeof n?n:null,clazz:t,inFront:!!i,id:r},i?(this.$frontMarkers[r]=e,this._signal("changeFrontMarker")):(this.$backMarkers[r]=e,this._signal("changeBackMarker")),r},f.prototype.addDynamicMarker=function(e,t){var n;if(e.update)return n=this.$markerId++,e.id=n,e.inFront=!!t,t?(this.$frontMarkers[n]=e,this._signal("changeFrontMarker")):(this.$backMarkers[n]=e,this._signal("changeBackMarker")),e},f.prototype.removeMarker=function(e){var t=this.$frontMarkers[e]||this.$backMarkers[e];t&&(delete(t.inFront?this.$frontMarkers:this.$backMarkers)[e],this._signal(t.inFront?"changeFrontMarker":"changeBackMarker"))},f.prototype.getMarkers=function(e){return e?this.$frontMarkers:this.$backMarkers},f.prototype.highlight=function(e){var t;this.$searchHighlight||(t=new p(null,"ace_selected-word","text"),this.$searchHighlight=this.addDynamicMarker(t)),this.$searchHighlight.setRegexp(e)},f.prototype.highlightLines=function(e,t,n,i){return"number"!=typeof t&&(n=t,t=e),n=n||"ace_step",(e=new u(e,0,t,1/0)).id=this.addMarker(e,n,"fullLine",i),e},f.prototype.setAnnotations=function(e){this.$annotations=e,this._signal("changeAnnotation",{})},f.prototype.getAnnotations=function(){return this.$annotations||[]},f.prototype.clearAnnotations=function(){this.setAnnotations([])},f.prototype.$detectNewLine=function(e){e=e.match(/^.*?(\r?\n)/m),this.$autoNewLine=e?e[1]:"\n"},f.prototype.getWordRange=function(e,t){var n,i=this.getLine(e),r=!1,o=(n=(r=(r=0<t?!!i.charAt(t-1).match(this.tokenRe):r)||!!i.charAt(t).match(this.tokenRe))?this.tokenRe:/^\s+$/.test(i.slice(t-1,t+1))?/\s/:this.nonTokenRe,t);if(0<o){for(;0<=--o&&i.charAt(o).match(n););o++}for(var s=t;s<i.length&&i.charAt(s).match(n);)s++;return new u(e,o,e,s)},f.prototype.getAWordRange=function(e,t){for(var n=this.getWordRange(e,t),i=this.getLine(n.end.row);i.charAt(n.end.column).match(/[ \t]/);)n.end.column+=1;return n},f.prototype.setNewLineMode=function(e){this.doc.setNewLineMode(e)},f.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},f.prototype.setUseWorker=function(e){this.setOption("useWorker",e)},f.prototype.getUseWorker=function(){return this.$useWorker},f.prototype.onReloadTokenizer=function(e){var t=e.data;this.bgTokenizer.start(t.first),this._signal("tokenizerUpdate",e)},f.prototype.setMode=function(e,t){if(e&&"object"==typeof e){if(e.getTokenizer)return this.$onChangeMode(e);var n=e,i=n.path}else i=e||"ace/mode/text";this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new c),this.$modes[i]&&!n?(this.$onChangeMode(this.$modes[i]),t&&t()):(this.$modeId=i,s.loadModule(["mode",i],function(e){if(this.$modeId!==i)return t&&t();this.$modes[i]&&!n?this.$onChangeMode(this.$modes[i]):e&&e.Mode&&(e=new e.Mode(n),n||((this.$modes[i]=e).$id=i),this.$onChangeMode(e)),t&&t()}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0))},f.prototype.$onChangeMode=function(e,t){var n,i,r;t||(this.$modeId=e.$id),this.$mode===e||(n=this.$mode,this.$mode=e,this.$stopWorker(),this.$useWorker&&this.$startWorker(),void 0!==(i=e.getTokenizer()).on&&(r=this.onReloadTokenizer.bind(this),i.on("update",r)),this.bgTokenizer.setTokenizer(i),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=e.tokenRe,this.nonTokenRe=e.nonTokenRe,t)||(e.attachToSession&&e.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(e.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:n,mode:e}))},f.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},f.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(e){s.warn("Could not load worker",e),this.$worker=null}},f.prototype.getMode=function(){return this.$mode},f.prototype.setScrollTop=function(e){this.$scrollTop===e||isNaN(e)||(this.$scrollTop=e,this._signal("changeScrollTop",e))},f.prototype.getScrollTop=function(){return this.$scrollTop},f.prototype.setScrollLeft=function(e){this.$scrollLeft===e||isNaN(e)||(this.$scrollLeft=e,this._signal("changeScrollLeft",e))},f.prototype.getScrollLeft=function(){return this.$scrollLeft},f.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},f.prototype.getLineWidgetMaxWidth=function(){var e;return null!=this.lineWidgetsWidth?this.lineWidgetsWidth:(e=0,this.lineWidgets.forEach((function(t){t&&t.screenWidth>e&&(e=t.screenWidth)})),this.lineWidgetWidth=e)},f.prototype.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),n=this.$rowLengthCache,i=0,r=0,o=this.$foldData[r],s=o?o.start.row:1/0,a=t.length,l=0;l<a;l++){if(s<l){if(a<=(l=o.end.row+1))break;s=(o=this.$foldData[r++])?o.start.row:1/0}null==n[l]&&(n[l]=this.$getStringScreenWidth(t[l])[0]),n[l]>i&&(i=n[l])}this.screenWidth=i}},f.prototype.getLine=function(e){return this.doc.getLine(e)},f.prototype.getLines=function(e,t){return this.doc.getLines(e,t)},f.prototype.getLength=function(){return this.doc.getLength()},f.prototype.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},f.prototype.insert=function(e,t){return this.doc.insert(e,t)},f.prototype.remove=function(e){return this.doc.remove(e)},f.prototype.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},f.prototype.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=e.length-1;-1!=n;n--){var i=e[n];"insert"==i.action||"remove"==i.action?this.doc.revertDelta(i):i.folds&&this.addFolds(i.folds)}!t&&this.$undoSelect&&(e.selectionBefore?this.selection.fromJSON(e.selectionBefore):this.selection.setRange(this.$getUndoSelection(e,!0))),this.$fromUndo=!1}},f.prototype.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=0;n<e.length;n++){var i=e[n];"insert"!=i.action&&"remove"!=i.action||this.doc.$safeApplyDelta(i)}!t&&this.$undoSelect&&(e.selectionAfter?this.selection.fromJSON(e.selectionAfter):this.selection.setRange(this.$getUndoSelection(e,!1))),this.$fromUndo=!1}},f.prototype.setUndoSelect=function(e){this.$undoSelect=e},f.prototype.$getUndoSelection=function(e,t){function n(e){return t?"insert"!==e.action:"insert"===e.action}for(var i,r,o=0;o<e.length;o++){var s=e[o];s.start&&(i?n(s)?(r=s.start,-1==i.compare(r.row,r.column)&&i.setStart(r),r=s.end,1==i.compare(r.row,r.column)&&i.setEnd(r)):(r=s.start,-1==i.compare(r.row,r.column)&&(i=u.fromPoints(s.start,s.start))):i=n(s)?u.fromPoints(s.start,s.end):u.fromPoints(s.start,s.start))}return i},f.prototype.replace=function(e,t){return this.doc.replace(e,t)},f.prototype.moveText=function(e,t,n){var i,r,o,s=this.getTextRange(e),a=this.getFoldsInRange(e);return t=u.fromPoints(t,t),n||(this.remove(e),r=e.start.row-e.end.row,(o=r?-e.end.column:e.start.column-e.end.column)&&(t.start.row==e.end.row&&t.start.column>e.end.column&&(t.start.column+=o),t.end.row==e.end.row)&&t.end.column>e.end.column&&(t.end.column+=o),r&&t.start.row>=e.end.row&&(t.start.row+=r,t.end.row+=r)),t.end=this.insert(t.start,s),a.length&&(i=e.start,n=t.start,r=n.row-i.row,o=n.column-i.column,this.addFolds(a.map((function(e){return(e=e.clone()).start.row==i.row&&(e.start.column+=o),e.end.row==i.row&&(e.end.column+=o),e.start.row+=r,e.end.row+=r,e})))),t},f.prototype.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var i=e;i<=t;i++)this.doc.insertInLine({row:i,column:0},n)},f.prototype.outdentRows=function(e){for(var t=e.collapseRows(),n=new u(0,0,0,0),i=this.getTabSize(),r=t.start.row;r<=t.end.row;++r){var o=this.getLine(r);n.start.row=r,n.end.row=r;for(var s=0;s<i&&" "==o.charAt(s);++s);s<i&&"\t"==o.charAt(s)?(n.start.column=s,n.end.column=s+1):(n.start.column=0,n.end.column=s),this.remove(n)}},f.prototype.$moveLines=function(e,t,n){if(e=this.getRowFoldStart(e),t=this.getRowFoldEnd(t),n<0){if((r=this.getRowFoldStart(e+n))<0)return 0;var i=r-e}else if(0<n){if((r=this.getRowFoldEnd(t+n))>this.doc.getLength()-1)return 0;i=r-t}else e=this.$clipRowToDocument(e),i=(t=this.$clipRowToDocument(t))-e+1;var r=new u(e,0,t,Number.MAX_VALUE);return r=this.getFoldsInRange(r).map((function(e){return(e=e.clone()).start.row+=i,e.end.row+=i,e})),n=0==n?this.doc.getLines(e,t):this.doc.removeFullLines(e,t),this.doc.insertFullLines(e+i,n),r.length&&this.addFolds(r),i},f.prototype.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},f.prototype.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},f.prototype.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},f.prototype.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},f.prototype.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},f.prototype.$clipPositionToDocument=function(e,t){var n;return t=Math.max(0,t),t=e<0?e=0:(n=this.doc.getLength())<=e?this.doc.getLine(e=n-1).length:Math.min(this.doc.getLine(e).length,t),{row:e,column:t}},f.prototype.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},f.prototype.setUseWrapMode=function(e){e!=this.$useWrapMode&&(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e&&(e=this.getLength(),this.$wrapData=Array(e),this.$updateWrapData(0,e-1)),this._signal("changeWrapMode"))},f.prototype.getUseWrapMode=function(){return this.$useWrapMode},f.prototype.setWrapLimitRange=function(e,t){this.$wrapLimitRange.min===e&&this.$wrapLimitRange.max===t||(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},f.prototype.adjustWrapLimit=function(e,t){var n=this.$wrapLimitRange;return n.max<0&&(n={min:t,max:t}),(t=this.$constrainWrapLimit(e,n.min,n.max))!=this.$wrapLimit&&1<t&&(this.$wrapLimit=t,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},f.prototype.$constrainWrapLimit=function(e,t,n){return t&&(e=Math.max(t,e)),n?Math.min(n,e):e},f.prototype.getWrapLimit=function(){return this.$wrapLimit},f.prototype.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},f.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},f.prototype.$updateInternalDataOnChange=function(e){var t,n=this.$useWrapMode,i=e.action,r=e.start,o=e.end,s=r.row,a=o.row,l=a-s,c=null;if(this.$updating=!0,0!=l)if("remove"===i){this[n?"$wrapData":"$rowLengthCache"].splice(s,l);var u=this.$foldData;c=this.getFoldsInRange(e),this.removeFolds(c);var h=0;for((t=this.getFoldLine(o.row))&&(t.addRemoveChars(o.row,o.column,r.column-o.column),t.shiftRow(-l),(d=this.getFoldLine(s))&&d!==t&&(d.merge(t),t=d),h=u.indexOf(t)+1);h<u.length;h++)(t=u[h]).start.row>=o.row&&t.shiftRow(-l);a=s}else{var d=Array(l),p=(d.unshift(s,0),n?this.$wrapData:this.$rowLengthCache);for(p.splice.apply(p,d),u=this.$foldData,h=0,(t=this.getFoldLine(s))&&(0==(p=t.range.compareInside(r.row,r.column))?(t=t.split(r.row,r.column))&&(t.shiftRow(l),t.addRemoveChars(a,0,o.column-r.column)):-1==p&&(t.addRemoveChars(s,0,o.column-r.column),t.shiftRow(l)),h=u.indexOf(t)+1);h<u.length;h++)(t=u[h]).start.row>=s&&t.shiftRow(l)}else l=Math.abs(e.start.column-e.end.column),"remove"===i&&(c=this.getFoldsInRange(e),this.removeFolds(c),l=-l),(t=this.getFoldLine(s))&&t.addRemoveChars(s,r.column,l);return n&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,n?this.$updateWrapData(s,a):this.$updateRowLengthCache(s,a),c},f.prototype.$updateRowLengthCache=function(e,t,n){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},f.prototype.$updateWrapData=function(e,t){var n,i,r=this.doc.getAllLines(),o=this.getTabSize(),s=this.$wrapData,a=this.$wrapLimit,l=e;for(t=Math.min(t,r.length-1);l<=t;)(i=this.getFoldLine(l,i))?(n=[],i.walk(function(e,t,i,o){var s;if(null!=e){(s=this.$getDisplayTokens(e,n.length))[0]=y;for(var a=1;a<s.length;a++)s[a]=C}else s=this.$getDisplayTokens(r[t].substring(o,i),n.length);n=n.concat(s)}.bind(this),i.end.row,r[i.end.row].length+1),s[i.start.row]=this.$computeWrapSplits(n,a,o),l=i.end.row+1):(n=this.$getDisplayTokens(r[l]),s[l]=this.$computeWrapSplits(n,a,o),l++)},f.prototype.$computeWrapSplits=function(e,t,n){if(0==e.length)return[];var i=[],r=e.length,o=0,s=0,a=this.$wrapAsCode,l=this.$indentedSoftWrap,c=t<=Math.max(2*n,8)||!1===l?0:Math.floor(t/2);function u(t){for(var r=t-o,u=o;u<t;u++){var d=e[u];12!==d&&2!==d||--r}i.length||(h=function(){var t=0;if(0===c)return t;if(l)for(var i=0;i<e.length;i++){var r=e[i];if(r==I)t+=1;else if(r==A)t+=n;else if(r!=w)break}return a&&!1!==l&&(t+=n),Math.min(t,c)}(),i.indent=h),s+=r,i.push(s),o=t}for(var h=0;t-h<r-o;){var d=o+t-h;if(e[d-1]>=I&&e[d]>=I)u(d);else if(e[d]==y||e[d]==C){for(;d!=o-1&&e[d]!=y;d--);if(o<d);else{for(d=o+t;d<e.length&&e[d]==C;d++);if(d==e.length)break}u(d)}else{for(var p=Math.max(d-(t-(t>>2)),o-1);p<d&&e[d]<y;)d--;if(a){for(;p<d&&e[d]<y;)d--;for(;p<d&&e[d]==b;)d--}else for(;p<d&&e[d]<I;)d--;p<d?u(++d):(e[d=o+t]==v&&d--,u(d-h))}}return i},f.prototype.$getDisplayTokens=function(e,t){var n,i=[];t=t||0;for(var r=0;r<e.length;r++){var o=e.charCodeAt(r);if(9==o){n=this.getScreenTabSize(i.length+t),i.push(A);for(var s=1;s<n;s++)i.push(w)}else 32==o?i.push(I):39<o&&o<48||57<o&&o<64?i.push(b):4352<=o&&x(o)?i.push(m,v):i.push(m)}return i},f.prototype.$getStringScreenWidth=function(e,t,n){if(0==t)return[0,0];var i,r;for(null==t&&(t=1/0),n=n||0,r=0;r<e.length&&(9==(i=e.charCodeAt(r))?n+=this.getScreenTabSize(n):4352<=i&&x(i)?n+=2:n+=1,!(t<n));r++);return[n,r]},f.prototype.getRowLength=function(e){var t=1;return this.lineWidgets&&(t+=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0),this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+t:t},f.prototype.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},f.prototype.getRowWrapIndent=function(e){var t;return this.$useWrapMode&&(e=this.screenToDocumentPosition(e,Number.MAX_VALUE),(t=this.$wrapData[e.row]).length)&&t[0]<e.column?t.indent:0},f.prototype.getScreenLastRowColumn=function(e){return e=this.screenToDocumentPosition(e,Number.MAX_VALUE),this.documentToScreenColumn(e.row,e.column)},f.prototype.getDocumentLastRowColumn=function(e,t){return e=this.documentToScreenRow(e,t),this.getScreenLastRowColumn(e)},f.prototype.getDocumentLastRowColumnPosition=function(e,t){return e=this.documentToScreenRow(e,t),this.screenToDocumentPosition(e,Number.MAX_VALUE/10)},f.prototype.getRowSplitData=function(e){if(this.$useWrapMode)return this.$wrapData[e]},f.prototype.getScreenTabSize=function(e){return this.$tabSize-(e%this.$tabSize|0)},f.prototype.screenToDocumentRow=function(e,t){return this.screenToDocumentPosition(e,t).row},f.prototype.screenToDocumentColumn=function(e,t){return this.screenToDocumentPosition(e,t).column},f.prototype.screenToDocumentPosition=function(e,t,n){if(e<0)return{row:0,column:0};for(var i,r,o,s=0,a=0,l=0,c=0,u=this.$screenRowCache,h=this.$getRowCacheIndex(u,e),d=u.length,p=(o=d&&0<=h?(l=u[h],s=this.$docRowCache[h],e>u[d-1]):!d,this.getLength()-1),g=this.getNextFoldLine(s),f=g?g.start.row:1/0;l<=e&&!(e<l+(c=this.getRowLength(s))||p<=s);)l+=c,f<++s&&(s=g.end.row+1,f=(g=this.getNextFoldLine(s,g))?g.start.row:1/0),o&&(this.$docRowCache.push(s),this.$screenRowCache.push(l));if(g&&g.start.row<=s)i=this.getFoldDisplayLine(g),s=g.start.row;else{if(l+c<=e||p<s)return{row:p,column:this.getLine(p).length};i=this.getLine(s),g=null}return h=0,u=Math.floor(e-l),this.$useWrapMode&&(d=this.$wrapData[s])&&(r=d[u],0<u)&&d.length&&(h=d.indent,a=d[u-1]||d[d.length-1],i=i.substring(a)),void 0!==n&&this.$bidiHandler.isBidiRow(l+u,s,u)&&(t=this.$bidiHandler.offsetToCol(n)),a+=this.$getStringScreenWidth(i,t-h)[1],this.$useWrapMode&&r<=a&&(a=r-1),g?g.idxToPosition(a):{row:s,column:a}},f.prototype.documentToScreenPosition=function(e,t){var n=(e=(i=void 0===t?this.$clipPositionToDocument(e.row,e.column):this.$clipPositionToDocument(e,t)).row,t=i.column,0),i=null;(a=this.getFoldAt(e,t,1))&&(e=a.start.row,t=a.start.column);for(var r,o,s=0,a=this.$docRowCache,l=this.$getRowCacheIndex(a,e),c=a.length,u=(o=c&&0<=l?(s=a[l],n=this.$screenRowCache[l],e>a[c-1]):!c,this.getNextFoldLine(s)),h=u?u.start.row:1/0;s<e;){if(h<=s){if(e<(r=u.end.row+1))break;h=(u=this.getNextFoldLine(r,u))?u.start.row:1/0}else r=s+1;n+=this.getRowLength(s),s=r,o&&(this.$docRowCache.push(s),this.$screenRowCache.push(n))}var d="";if(i=u&&h<=s?(d=this.getFoldDisplayLine(u,e,t),u.start.row):(d=this.getLine(e).substring(0,t),e),l=0,this.$useWrapMode){var p=this.$wrapData[i];if(p){for(var g=0;d.length>=p[g];)n++,g++;d=d.substring(p[g-1]||0,d.length),l=0<g?p.indent:0}}return this.lineWidgets&&this.lineWidgets[s]&&this.lineWidgets[s].rowsAbove&&(n+=this.lineWidgets[s].rowsAbove),{row:n,column:l+this.$getStringScreenWidth(d)[0]}},f.prototype.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},f.prototype.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},f.prototype.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var n=this.$wrapData.length,i=0,r=0,o=(t=this.$foldData[r++])?t.start.row:1/0;i<n;){var s=this.$wrapData[i];e+=s?s.length+1:1,o<++i&&(i=t.end.row+1,o=(t=this.$foldData[r++])?t.start.row:1/0)}else{e=this.getLength();var a=this.$foldData;for(r=0;r<a.length;r++)e-=(t=a[r]).end.row-t.start.row}return this.lineWidgets&&(e+=this.$getWidgetScreenLength()),e},f.prototype.$setFontMetrics=function(e){this.$enableVarChar&&(this.$getStringScreenWidth=function(t,n,i){if(0===n)return[0,0];var r,o;for(n=n||1/0,i=i||0,o=0;o<t.length&&!(n<(i+="\t"===(r=t.charAt(o))?this.getScreenTabSize(i):e.getCharacterWidth(r)));o++);return[i,o]})},f.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection.detach()},f);function f(e,t){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.id="session"+ ++f.$uid,this.$foldData.toString=function(){return this.join("\n")},this.bgTokenizer=new d((new c).getTokenizer(),this);var n=this;this.bgTokenizer.on("update",(function(e){n._signal("tokenizerUpdate",e)})),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),"object"==typeof e&&e.getLine||(e=new h(e)),this.setDocument(e),this.selection=new l(this),this.$bidiHandler=new o(this),s.resetOptions(this),this.setMode(t),s._signal("session",this),this.destroyed=!1}g.$uid=0,g.prototype.$modes=s.$modes,g.prototype.getValue=g.prototype.toString,g.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},g.prototype.$overwrite=!1,g.prototype.$mode=null,g.prototype.$modeId=null,g.prototype.$scrollTop=0,g.prototype.$scrollLeft=0,g.prototype.$wrapLimit=80,g.prototype.$useWrapMode=!1,g.prototype.$wrapLimitRange={min:null,max:null},g.prototype.lineWidgets=null,g.prototype.isFullWidth=x,i.implement(g.prototype,a);var m=1,v=2,y=3,C=4,b=9,I=10,A=11,w=12;function x(e){return!(e<4352)&&(4352<=e&&e<=4447||4515<=e&&e<=4519||4602<=e&&e<=4607||9001<=e&&e<=9002||11904<=e&&e<=11929||11931<=e&&e<=12019||12032<=e&&e<=12245||12272<=e&&e<=12283||12288<=e&&e<=12350||12353<=e&&e<=12438||12441<=e&&e<=12543||12549<=e&&e<=12589||12593<=e&&e<=12686||12688<=e&&e<=12730||12736<=e&&e<=12771||12784<=e&&e<=12830||12832<=e&&e<=12871||12880<=e&&e<=13054||13056<=e&&e<=19903||19968<=e&&e<=42124||42128<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||55216<=e&&e<=55238||55243<=e&&e<=55291||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65106||65108<=e&&e<=65126||65128<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510)}e("./edit_session/folding").Folding.call(g.prototype),e("./edit_session/bracket_match").BracketMatch.call(g.prototype),s.defineOptions(g.prototype,"session",{wrap:{set:function(e){e&&"off"!=e?"free"==e?e=!0:"printMargin"==e?e=-1:"string"==typeof e&&(e=parseInt(e,10)||!1):e=!1,this.$wrap!=e&&((this.$wrap=e)?(this.setWrapLimitRange(e="number"==typeof e?e:null,e),this.setUseWrapMode(!0)):this.setUseWrapMode(!1))},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(e){(e="auto"==e?"text"!=this.$mode.type:"text"!=e)!=this.$wrapAsCode&&(this.$wrapAsCode=e,this.$useWrapMode)&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){0<(e=parseInt(e))&&this.$tabSize!==e&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(e){this.setFoldStyle(e)},handlesSet:!0},overwrite:{set:function(e){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(e){this.setMode(e)},get:function(){return this.$modeId},handlesSet:!0}}),t.EditSession=g})),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,n){"use strict";var i=e("./lib/lang"),r=e("./lib/oop"),o=e("./range").Range;function s(){this.$options={}}s.prototype.set=function(e){return r.mixin(this.$options,e),this},s.prototype.getOptions=function(){return i.copyObject(this.$options)},s.prototype.setOptions=function(e){this.$options=e},s.prototype.find=function(e){var t,n=this.$options;return!!(e=this.$matchIterator(e,n))&&(t=null,e.forEach((function(e,i,r,s){return t=new o(e,i,r,s),!(i==s&&n.start&&n.start.start&&0!=n.skipCurrent&&t.isEqual(n.start)&&(t=null,1))})),t)},s.prototype.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,r=n?e.getLines(n.start.row,n.end.row):e.doc.getAllLines(),s=[],a=t.re;if(t.$isMultiLine){var l,c=a.length,u=r.length-c;e:for(var h=a.offset||0;h<=u;h++){for(var d=0;d<c;d++)if(-1==r[h+d].search(a[d]))continue e;var p=r[h],g=r[h+c-1];p=p.length-p.match(a[0])[0].length,g=g.match(a[c-1])[0].length,l&&l.end.row===h&&l.end.column>p||(s.push(l=new o(h,p,h+c-1,g)),2<c&&(h=h+c-2))}}else for(var f=0;f<r.length;f++){var m=i.getMatchOffsets(r[f],a);for(d=0;d<m.length;d++){var v=m[d];s.push(new o(f,v.offset,f,v.offset+v.length))}}if(n){var y=n.start.column,C=n.end.column;for(f=0,d=s.length-1;f<d&&s[f].start.column<y&&0==s[f].start.row;)f++;for(var b=n.end.row-n.start.row;f<d&&s[d].end.column>C&&s[d].end.row==b;)d--;for(s=s.slice(f,d+1),f=0,d=s.length;f<d;f++)s[f].start.row+=n.start.row,s[f].end.row+=n.start.row}return s},s.prototype.replace=function(e,t){var n=this.$options,i=this.$assembleRegExp(n);if(n.$isMultiLine)return t;if(i){var r=i.exec(e);if(!r||r[0].length!=e.length)return null;if(t=e.replace(i,t),n.preserveCase){t=t.split("");for(var o=Math.min(e.length,e.length);o--;){var s=e[o];s&&s.toLowerCase()!=s?t[o]=t[o].toUpperCase():t[o]=t[o].toLowerCase()}t=t.join("")}return t}},s.prototype.$assembleRegExp=function(e,t){if(e.needle instanceof RegExp)return e.re=e.needle;var n,r=e.needle;if(!e.needle)return e.re=!1;function o(e){return/\w/.test(e)||n.regExp?"\\b":""}e.regExp||(r=i.escapeRegExp(r)),e.wholeWord&&(n=e,r=o((s=r)[0])+s+o(s[s.length-1]));var s=e.caseSensitive?"gm":"gmi";if(e.$isMultiLine=!t&&/[\n\r]/.test(r),e.$isMultiLine)return e.re=this.$assembleMultilineRegExp(r,s);try{var a=new RegExp(r,s)}catch(e){a=!1}return e.re=a},s.prototype.$assembleMultilineRegExp=function(e,t){for(var n=e.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),i=[],r=0;r<n.length;r++)try{i.push(new RegExp(n[r],t))}catch(e){return!1}return i},s.prototype.$matchIterator=function(e,t){var n,i,r,o,s,a,l,c,u=this.$assembleRegExp(t);return!!u&&(n=1==t.backwards,i=0!=t.skipCurrent,r=t.range,(o=(o=t.start)||(r?r[n?"end":"start"]:e.selection.getRange())).start&&(o=o[i!=n?"end":"start"]),s=r?r.start.row:0,a=r?r.end.row:e.getLength()-1,c=t.$isMultiLine?(l=u.length,function(t,i,r){var o=n?t-l+1:t;if(!(o<0||o+l>e.getLength())){var s=e.getLine(o);if(t=s.search(u[0]),!(!n&&t<i||-1===t)){for(var a=1;a<l;a++)if(-1==(s=e.getLine(o+a)).search(u[a]))return;var c=s.match(u[l-1])[0].length;if(!(n&&i<c))return!!r(o,t,o+l-1,c)||void 0}}}):n?function(t,n,i){var r,o=e.getLine(t),s=[];for(u.lastIndex=0;r=u.exec(o);){var a=r[0].length,l=r.index;if(!a){if(l>=o.length)break;u.lastIndex=l+=1}if(r.index+a>n)break;s.push(r.index,a)}for(var c=s.length-1;0<=c;c-=2){var h=s[c-1];if(i(t,h,t,h+(a=s[c])))return!0}}:function(t,n,i){var r=e.getLine(t);for(u.lastIndex=n;o=u.exec(r);){var o,s=o[0].length;if(i(t,o=o.index,t,o+s))return!0;if(!s&&(u.lastIndex=o+=1,o>=r.length))return!1}},{forEach:n?function(e){var n=o.row;if(!c(n,o.column,e)){for(n--;s<=n;n--)if(c(n,Number.MAX_VALUE,e))return;if(0!=t.wrap)for(n=a,s=o.row;s<=n;n--)if(c(n,Number.MAX_VALUE,e))return}}:function(e){var n=o.row;if(!c(n,o.column,e)){for(n+=1;n<=a;n++)if(c(n,0,e))return;if(0!=t.wrap)for(n=s,a=o.row;n<=a;n++)if(c(n,0,e))return}}})},t.Search=s})),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,n){"use strict";var i=e("../lib/keys"),r=e("../lib/useragent"),o=i.KEY_MODS;function s(e,t){this.platform=t||(r.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=!0}function a(e,t){s.call(this,e,t),this.$singleCommand=!1}a.prototype=s.prototype,function(){function e(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),(this.commands[e.name]=e).bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e,t){var n,i=e&&("string"==typeof e?e:e.name),r=(e=this.commands[i],t||delete this.commands[i],this.commandKeyBinding);for(n in r){var o,s=r[n];s==e?delete r[n]:Array.isArray(s)&&-1!=(o=s.indexOf(e))&&(s.splice(o,1),1==s.length)&&(r[n]=s[0])}},this.bindKey=function(e,t,n){if("object"==typeof e&&e&&(null==n&&(n=e.position),e=e[this.platform]),e)return"function"==typeof t?this.addCommand({exec:t,bindKey:e,name:t.name||e}):void e.split("|").forEach((function(e){var i="",r=(-1!=e.indexOf(" ")&&(e=(r=e.split(/\s+/)).pop(),r.forEach((function(e){e=this.parseKeys(e),e=o[e.hashId]+e.key,i+=(i?" ":"")+e,this._addCommandToBinding(i,"chainKeys")}),this),i+=" "),this.parseKeys(e));e=o[r.hashId]+r.key,this._addCommandToBinding(i+e,t,n)}),this)},this._addCommandToBinding=function(t,n,i){var r=this.commandKeyBinding;if(n)if(!r[t]||this.$singleCommand)r[t]=n;else{Array.isArray(r[t])?-1!=(s=r[t].indexOf(n))&&r[t].splice(s,1):r[t]=[r[t]],"number"!=typeof i&&(i=e(n));for(var o=r[t],s=0;s<o.length&&!(i<e(o[s]));s++);o.splice(s,0,n)}else delete r[t]},this.addCommands=function(e){e&&Object.keys(e).forEach((function(t){var n=e[t];if(n){if("string"==typeof n)return this.bindKey(n,t);"object"==typeof(n="function"==typeof n?{exec:n}:n)&&(n.name||(n.name=t),this.addCommand(n))}}),this)},this.removeCommands=function(e){Object.keys(e).forEach((function(t){this.removeCommand(e[t])}),this)},this.bindKeys=function(e){Object.keys(e).forEach((function(t){this.bindKey(t,e[t])}),this)},this._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},this.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter((function(e){return e})),n=t.pop(),r=i[n];if(i.FUNCTION_KEYS[r])n=i.FUNCTION_KEYS[r].toLowerCase();else{if(!t.length)return{key:n,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:n.toUpperCase(),hashId:-1}}for(var o=0,s=t.length;s--;){var a=i.KEY_MODS[t[s]];if(null==a)return"undefined"!=typeof console&&console.error("invalid modifier "+t[s]+" in "+e),!1;o|=a}return{key:n,hashId:o}},this.findKeyCommand=function(e,t){return e=o[e]+t,this.commandKeyBinding[e]},this.handleKeyboard=function(e,t,n,i){var r,s;if(!(i<0))return r=o[t]+n,s=this.commandKeyBinding[r],e.$keyChain&&(e.$keyChain+=" "+r,s=this.commandKeyBinding[e.$keyChain]||s),!s||"chainKeys"!=s&&"chainKeys"!=s[s.length-1]?(e.$keyChain&&(t&&4!=t||1!=n.length?(-1==t||0<i)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-r.length-1)),{command:s}):(e.$keyChain=e.$keyChain||r,{command:"null"})},this.getStatusText=function(e,t){return t.$keyChain||""}}.call(s.prototype),t.HashHandler=s,t.MultiHashHandler=a})),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],(function(e,t,n){"use strict";var i,r,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}))(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=e("../lib/oop"),a=e("../keyboard/hash_handler").MultiHashHandler;function l(e,t){return(t=r.call(this,t,e)||this).byName=t.commands,t.setDefaultHandler("exec",(function(e){return e.args?e.command.exec(e.editor,e.args,e.event,!1):e.command.exec(e.editor,{},e.event,!0)})),t}e=e("../lib/event_emitter").EventEmitter,o(l,r=a),l.prototype.exec=function(e,t,n){if(Array.isArray(e)){for(var i=e.length;i--;)if(this.exec(e[i],t,n))return!0;return!1}var r;return!!(e="string"==typeof e?this.commands[e]:e)&&!(t&&t.$readOnly&&!e.readOnly||0!=this.$checkCommandState&&e.isAvailable&&!e.isAvailable(t)||((r={editor:t,command:e,args:n}).returnValue=this._emit("exec",r),this._signal("afterExec",r),!1===r.returnValue))},l.prototype.toggleRecording=function(e){if(!this.$inReplay)return e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},l.prototype.replay=function(e){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach((function(t){"string"==typeof t?this.exec(t,e):this.exec(t[0],e,t[1])}),this)}finally{this.$inReplay=!1}}},l.prototype.trimMacro=function(e){return e.map((function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e[1]?e:e[0]}))},o=l,s.implement(o.prototype,e),t.CommandManager=o})),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],(function(e,t,n){"use strict";var i=e("../lib/lang"),r=e("../config"),o=e("../range").Range;function s(e,t){return{win:e,mac:t}}t.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:s("Ctrl-,","Command-,"),exec:function(e){r.loadModule("ace/ext/settings_menu",(function(t){t.init(e),e.showSettingsMenu()}))},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:s("Alt-E","F4"),exec:function(e){r.loadModule("ace/ext/error_marker",(function(t){t.showErrorMarker(e,1)}))},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:s("Alt-Shift-E","Shift-F4"),exec:function(e){r.loadModule("ace/ext/error_marker",(function(t){t.showErrorMarker(e,-1)}))},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:s("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:s(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:s("Ctrl-L","Command-L"),exec:function(e,t){"number"!=typeof t||isNaN(t)||e.gotoLine(t),e.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:s("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:s("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:s("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:s("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:s("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:s("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:s("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:s("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:s("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:s("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:s("Ctrl-F","Command-F"),exec:function(e){r.loadModule("ace/ext/searchbox",(function(t){t.Search(e)}))},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:s("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:s("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:s("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:s("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:s("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:s("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:s("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:s("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:s("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:s("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:s("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:s("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:s("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:s("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:s("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:s("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:s("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:s("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:s("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:s("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:s(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:s("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:s(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:s("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:s("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:s("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:s("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:s("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:s("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:s("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:s(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(e){},readOnly:!0},{name:"cut",description:"Cut",exec:function(e){var t=e.$copyWithEmptySelection&&e.selection.isEmpty()?e.selection.getLineRange():e.selection.getRange();e._emit("cut",t),t.isEmpty()||e.session.remove(t),e.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:s("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:s("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:s("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:s("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:s("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:s("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:s("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:s("Ctrl-H","Command-Option-F"),exec:function(e){r.loadModule("ace/ext/searchbox",(function(t){t.Search(e,!0)}))}},{name:"undo",description:"Undo",bindKey:s("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",description:"Redo",bindKey:s("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:s("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:s("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:s("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:s("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:s("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:s("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:s("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:s("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:s("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:s("Ctrl-Shift-Backspace",null),exec:function(e){var t=e.selection.getRange();t.start.column=0,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:s("Ctrl-Shift-Delete",null),exec:function(e){var t=e.selection.getRange();t.end.column=Number.MAX_VALUE,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:s("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:s("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:s("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:s("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:s("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:s("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(e,t){e.insert(i.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:s(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:s("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:s("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:s("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:s(null,null),exec:function(e){e.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:s("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:s("Ctrl+F3","F3"),exec:function(e){e.openLink()}},{name:"joinlines",description:"Join lines",bindKey:s(null,null),exec:function(e){for(var t=(r=e.selection.isBackwards())?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),n=r?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),r=e.session.doc.getLine(t.row).length,s=e.session.doc.getTextRange(e.selection.getRange()).replace(/\n\s*/," ").length,a=e.session.doc.getLine(t.row),l=t.row+1;l<=n.row+1;l++){var c=i.stringTrimLeft(i.stringTrimRight(e.session.doc.getLine(l)));a+=c=0!==c.length?" "+c:c}n.row+1<e.session.doc.getLength()-1&&(a+=e.session.doc.getNewLineCharacter()),e.clearSelection(),e.session.doc.replace(new o(t.row,0,n.row+2,0),a),0<s?(e.selection.moveCursorTo(t.row,t.column),e.selection.selectTo(t.row,t.column+s)):(r=e.session.doc.getLine(t.row).length>r?r+1:r,e.selection.moveCursorTo(t.row,r))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:s(null,null),exec:function(e){var t=e.session.doc.getLength()-1,n=e.session.doc.getLine(t).length,i=e.selection.rangeList.ranges,r=[];i.length<1&&(i=[e.selection.getRange()]);for(var s=0;s<i.length;s++)s!=i.length-1||i[s].end.row===t&&i[s].end.column===n||r.push(new o(i[s].end.row,i[s].end.column,t,n)),0===s?0===i[s].start.row&&0===i[s].start.column||r.push(new o(0,0,i[s].start.row,i[s].start.column)):r.push(new o(i[s-1].end.row,i[s-1].end.column,i[s].start.row,i[s].start.column));for(e.exitMultiSelectMode(),e.clearSelection(),s=0;s<r.length;s++)e.selection.addRange(r[s],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(e){e.selection.clearSelection(),e.navigateLineEnd(),e.insert("\n")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(e){e.selection.clearSelection();var t=e.getCursorPosition();e.selection.moveTo(t.row-1,Number.MAX_VALUE),e.insert("\n"),0===t.row&&e.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",description:"Open command palette",bindKey:s("F1","F1"),exec:function(e){e.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:s(null,null),exec:function(e){e.prompt({$type:"modes"})},readOnly:!0}];for(var a=1;a<9;a++)t.commands.push({name:"foldToLevel"+a,description:"Fold To Level "+a,level:a,exec:function(e){e.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})})),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var i=e("./lib/dom");function r(e){this.session=e,(this.session.widgetManager=this).session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}r.prototype.getRowLength=function(e){var t=this.lineWidgets&&this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0;return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},r.prototype.$getWidgetScreenLength=function(){var e=0;return this.lineWidgets.forEach((function(t){t&&t.rowCount&&!t.hidden&&(e+=t.rowCount)})),e},r.prototype.$onChangeEditor=function(e){this.attach(e.editor)},r.prototype.attach=function(e){e&&e.widgetManager&&e.widgetManager!=this&&e.widgetManager.detach(),this.editor!=e&&(this.detach(),this.editor=e)&&(e.widgetManager=this,e.renderer.on("beforeRender",this.measureWidgets),e.renderer.on("afterRender",this.renderWidgets))},r.prototype.detach=function(e){var t=this.editor;t&&(this.editor=null,t.widgetManager=null,t.renderer.off("beforeRender",this.measureWidgets),t.renderer.off("afterRender",this.renderWidgets),t=this.session.lineWidgets)&&t.forEach((function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))}))},r.prototype.updateOnFold=function(e,t){var n=t.lineWidgets;if(n&&e.action){for(var i=(t=e.data).start.row,r=t.end.row,o="add"==e.action,s=i+1;s<r;s++)n[s]&&(n[s].hidden=o);n[r]&&(o?n[i]?n[r].hidden=o:n[i]=n[r]:(n[i]==n[r]&&(n[i]=void 0),n[r].hidden=o))}},r.prototype.updateOnChange=function(e){var t,n,i,r=this.session.lineWidgets;r&&(t=e.start.row,0!=(n=e.end.row-t))&&("remove"==e.action?(i=r.splice(t+1,n),!r[t]&&i[i.length-1]&&(r[t]=i.pop()),i.forEach((function(e){e&&this.removeLineWidget(e)}),this)):(i=new Array(n),r[t]&&null!=r[t].column&&e.start.column>r[t].column&&t++,i.unshift(t,0),r.splice.apply(r,i)),this.$updateRows())},r.prototype.$updateRows=function(){var e,t=this.session.lineWidgets;t&&(e=!0,t.forEach((function(t,n){if(t)for(e=!1,t.row=n;t.$oldWidget;)t.$oldWidget.row=n,t=t.$oldWidget})),e)&&(this.session.lineWidgets=null)},r.prototype.$registerLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var t=this.session.lineWidgets[e.row];return t&&(e.$oldWidget=t).el&&t.el.parentNode&&(t.el.parentNode.removeChild(t.el),t._inDocument=!1),this.session.lineWidgets[e.row]=e},r.prototype.addLineWidget=function(e){var t,n,r;return this.$registerLineWidget(e),e.session=this.session,this.editor&&(t=this.editor.renderer,e.html&&!e.el&&(e.el=i.createElement("div"),e.el.innerHTML=e.html),e.text&&!e.el&&(e.el=i.createElement("div"),e.el.textContent=e.text),e.el&&(i.addCssClass(e.el,"ace_lineWidgetContainer"),e.className&&i.addCssClass(e.el,e.className),e.el.style.position="absolute",e.el.style.zIndex=5,t.container.appendChild(e.el),e._inDocument=!0,e.coverGutter||(e.el.style.zIndex=3),null==e.pixelHeight)&&(e.pixelHeight=e.el.offsetHeight),null==e.rowCount&&(e.rowCount=e.pixelHeight/t.layerConfig.lineHeight),n=this.session.getFoldAt(e.row,0),(e.$fold=n)&&(r=this.session.lineWidgets,e.row!=n.end.row||r[n.start.row]?e.hidden=!0:r[n.start.row]=e),this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,t),this.onWidgetChanged(e)),e},r.prototype.removeLineWidget=function(e){if(e._inDocument=!1,e.session=null,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el),e.editor&&e.editor.destroy)try{e.editor.destroy()}catch(e){}if(this.session.lineWidgets){var t=this.session.lineWidgets[e.row];if(t==e)this.session.lineWidgets[e.row]=e.$oldWidget,e.$oldWidget&&this.onWidgetChanged(e.$oldWidget);else for(;t;){if(t.$oldWidget==e){t.$oldWidget=e.$oldWidget;break}t=t.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},r.prototype.getWidgetsAtRow=function(e){for(var t=this.session.lineWidgets,n=t&&t[e],i=[];n;)i.push(n),n=n.$oldWidget;return i},r.prototype.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},r.prototype.measureWidgets=function(e,t){var n=this.session._changedWidgets,i=t.layerConfig;if(n&&n.length){for(var r=1/0,o=0;o<n.length;o++){var s=n[o];if(s&&s.el&&s.session==this.session){if(!s._inDocument){if(this.session.lineWidgets[s.row]!=s)continue;s._inDocument=!0,t.container.appendChild(s.el)}s.h=s.el.offsetHeight,s.fixedWidth||(s.w=s.el.offsetWidth,s.screenWidth=Math.ceil(s.w/i.characterWidth));var a=s.h/i.lineHeight;s.coverLine&&(a-=this.session.getRowLineCount(s.row))<0&&(a=0),s.rowCount!=a&&(s.rowCount=a,s.row<r)&&(r=s.row)}}r!=1/0&&(this.session._emit("changeFold",{data:{start:{row:r}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},r.prototype.renderWidgets=function(e,t){var n=t.layerConfig,i=this.session.lineWidgets;if(i){for(var r=Math.min(this.firstRow,n.firstRow),o=Math.max(this.lastRow,n.lastRow,i.length);0<r&&!i[r];)r--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,t.$cursorLayer.config=n;for(var s=r;s<=o;s++){var a,l=i[s];l&&l.el&&(l.hidden?l.el.style.top=-100-(l.pixelHeight||0)+"px":(l._inDocument||(l._inDocument=!0,t.container.appendChild(l.el)),a=t.$cursorLayer.getPixelPosition({row:s,column:0},!0).top,l.coverLine||(a+=n.lineHeight*this.session.getRowLineCount(l.row)),l.el.style.top=a-n.offset+"px",a=l.coverGutter?0:t.gutterWidth,l.fixedWidth||(a-=t.scrollLeft),l.el.style.left=a+"px",l.fullWidth&&l.screenWidth&&(l.el.style.minWidth=n.width+2*n.padding+"px"),l.fixedWidth?l.el.style.right=t.scrollBar.getWidth()+"px":l.el.style.right=""))}}},t.LineWidgets=r})),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],(function(e,t,n){"use strict";var i=e("../lib/keys"),r=e("../mouse/default_gutter_handler").GutterTooltip;function o(e){this.editor=e,this.gutterLayer=e.renderer.$gutterLayer,this.element=e.renderer.$gutter,this.lines=e.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new r(this.editor)}o.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},o.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},o.prototype.$onGutterKeyDown=function(e){var t;if(this.annotationTooltip.isOpen)e.preventDefault(),e.keyCode===i.escape&&this.annotationTooltip.hide();else if(e.target===this.element)e.keyCode==i.enter&&(e.preventDefault(),t=this.editor.getCursorPosition().row,this.editor.isRowVisible(t)||this.editor.scrollToLine(t,!0,!0),setTimeout(function(){var e=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),t=this.$findNearestFoldWidget(e),n=this.$findNearestAnnotation(e);null===t&&null===n||(null===t&&null!==n||(null===t||null!==n)&&Math.abs(n-e)<Math.abs(t-e)?(this.activeRowIndex=n,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex)):(this.activeRowIndex=t,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex)))}.bind(this),10));else if(e.keyCode===i.tab)e.preventDefault();else if(e.keyCode===i.escape)e.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;else if(e.keyCode===i.up)switch(e.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp()}else if(e.keyCode===i.down)switch(e.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown()}else if(e.keyCode===i.left&&(e.preventDefault(),this.$switchLane("annotation")),e.keyCode===i.right&&(e.preventDefault(),this.$switchLane("fold")),e.keyCode===i.enter||e.keyCode===i.space)switch(e.preventDefault(),this.activeLane){case"fold":if("start"===this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]){var n=this.$rowIndexToRow(this.activeRowIndex);this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),e),setTimeout(function(){this.$rowIndexToRow(this.activeRowIndex)!==n&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(n),this.$focusFoldWidget(this.activeRowIndex))}.bind(this),10);break}if("end"===this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)])break;return;case"annotation":var r=this.lines.cells[this.activeRowIndex].element.childNodes[2].getBoundingClientRect(),o=this.annotationTooltip.getElement().style;o.left=r.right+"px",o.top=r.bottom+"px",this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex))}},o.prototype.$blurGutter=function(){if(null!==this.activeRowIndex)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex)}this.annotationTooltip.isOpen&&this.annotationTooltip.hide()},o.prototype.$isFoldWidgetVisible=function(e){var t=this.editor.isRowFullyVisible(this.$rowIndexToRow(e));return e="none"!==this.$getFoldWidget(e).style.display,t&&e},o.prototype.$isAnnotationVisible=function(e){var t=this.editor.isRowFullyVisible(this.$rowIndexToRow(e));return e="none"!==this.$getAnnotation(e).style.display,t&&e},o.prototype.$getFoldWidget=function(e){return this.lines.get(e).element.childNodes[1]},o.prototype.$getAnnotation=function(e){return this.lines.get(e).element.childNodes[2]},o.prototype.$findNearestFoldWidget=function(e){if(this.$isFoldWidgetVisible(e))return e;for(var t=0;0<e-t||e+t<this.lines.getLength()-1;){if(0<=e-++t&&this.$isFoldWidgetVisible(e-t))return e-t;if(e+t<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(e+t))return e+t}return null},o.prototype.$findNearestAnnotation=function(e){if(this.$isAnnotationVisible(e))return e;for(var t=0;0<e-t||e+t<this.lines.getLength()-1;){if(0<=e-++t&&this.$isAnnotationVisible(e-t))return e-t;if(e+t<=this.lines.getLength()-1&&this.$isAnnotationVisible(e+t))return e+t}return null},o.prototype.$focusFoldWidget=function(e){null!=e&&((e=this.$getFoldWidget(e)).classList.add(this.editor.renderer.keyboardFocusClassName),e.focus())},o.prototype.$focusAnnotation=function(e){null!=e&&((e=this.$getAnnotation(e)).classList.add(this.editor.renderer.keyboardFocusClassName),e.setAttribute("role","button"),e.focus())},o.prototype.$blurFoldWidget=function(e){(e=this.$getFoldWidget(e)).classList.remove(this.editor.renderer.keyboardFocusClassName),e.blur()},o.prototype.$blurAnnotation=function(e){(e=this.$getAnnotation(e)).classList.remove(this.editor.renderer.keyboardFocusClassName),e.removeAttribute("role"),e.blur()},o.prototype.$moveFoldWidgetUp=function(){for(var e=this.activeRowIndex;0<e;)if(this.$isFoldWidgetVisible(--e))return this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=e,void this.$focusFoldWidget(this.activeRowIndex)},o.prototype.$moveFoldWidgetDown=function(){for(var e=this.activeRowIndex;e<this.lines.getLength()-1;)if(this.$isFoldWidgetVisible(++e))return this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=e,void this.$focusFoldWidget(this.activeRowIndex)},o.prototype.$moveAnnotationUp=function(){for(var e=this.activeRowIndex;0<e;)if(this.$isAnnotationVisible(--e))return this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=e,void this.$focusAnnotation(this.activeRowIndex)},o.prototype.$moveAnnotationDown=function(){for(var e=this.activeRowIndex;e<this.lines.getLength()-1;)if(this.$isAnnotationVisible(++e))return this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=e,void this.$focusAnnotation(this.activeRowIndex)},o.prototype.$switchLane=function(e){switch(e){case"annotation":"annotation"!==this.activeLane&&null!=(t=this.$findNearestAnnotation(this.activeRowIndex))&&(this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=t,this.$focusAnnotation(this.activeRowIndex));break;case"fold":var t;"fold"!==this.activeLane&&null!=(t=this.$findNearestFoldWidget(this.activeRowIndex))&&(this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=t,this.$focusFoldWidget(this.activeRowIndex))}},o.prototype.$rowIndexToRow=function(e){return(e=this.lines.get(e))?e.row:null},o.prototype.$rowToRowIndex=function(e){for(var t=0;t<this.lines.getLength();t++)if(this.lines.get(t).row==e)return t;return null},t.GutterKeyboardHandler=o})),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/line_widgets","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys"],(function(e,t,n){"use strict";var i=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&i>=e.length?void 0:e)&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},r=e("./lib/oop"),o=e("./lib/dom"),s=e("./lib/lang"),a=e("./lib/useragent"),l=e("./keyboard/textinput").TextInput,c=e("./mouse/mouse_handler").MouseHandler,u=e("./mouse/fold_handler").FoldHandler,h=e("./keyboard/keybinding").KeyBinding,d=e("./edit_session").EditSession,p=e("./search").Search,g=e("./range").Range,f=e("./lib/event_emitter").EventEmitter,m=e("./commands/command_manager").CommandManager,v=e("./commands/default_commands").commands,y=e("./config"),C=e("./token_iterator").TokenIterator,b=e("./line_widgets").LineWidgets,I=e("./keyboard/gutter_handler").GutterKeyboardHandler,A=e("./config").nls,w=e("./clipboard"),x=e("./lib/keys");function S(e,t,n){this.$toDestroy=[];var i=e.getContainerElement();this.container=i,this.renderer=e,this.id="editor"+ ++S.$uid,this.commands=new m(a.isMac?"mac":"win",v),"object"==typeof document&&(this.textInput=new l(e.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new c(this),new u(this)),this.keyBinding=new h(this),this.$search=(new p).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=s.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",(function(e,t){t._$emitInputEvent.schedule(31)})),this.setSession(t||n&&n.session||new d("")),y.resetOptions(this),n&&this.setOptions(n),y._signal("editor",this)}S.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=s.delayedCall(this.endOperation.bind(this,!0)),this.on("change",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.docChanged=!0}.bind(this),!0),this.on("changeSelection",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.selectionChanged=!0}.bind(this),!0)},S.prototype.startOperation=function(e){if(this.curOp){if(!e||this.curOp.command)return;this.prevOp=this.curOp}e||(this.previousCommand=null,e={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:e.command||{},args:e.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},S.prototype.endOperation=function(e){if(this.curOp&&this.session){if(e&&!1===e.returnValue||!this.session)return this.curOp=null;if((1!=e||!this.curOp.command||"mouse"!=this.curOp.command.name)&&(this._signal("beforeEndOperation"),this.curOp)){var t=(e=this.curOp.command)&&e.scrollIntoView;if(t){switch(t){case"center-animate":t="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var n=this.selection.getRange(),i=this.renderer.layerConfig;(n.start.row>=i.lastRow||n.end.row<=i.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==t&&this.renderer.animateScrolling(this.curOp.scrollTop)}e=this.selection.toJSON(),this.curOp.selectionAfter=e,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(e),this.prevOp=this.curOp,this.curOp=null}}},S.prototype.$historyTracker=function(e){var t,n,i,r;this.$mergeUndoDeltas&&(t=this.prevOp,n=this.$mergeableCommands,i=t.command&&e.command.name==t.command.name,"insertstring"==e.command.name?(r=e.args,void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),i=i&&this.mergeNextCommand&&(!/\s/.test(r)||/\s/.test(t.args)),this.mergeNextCommand=!0):i=i&&-1!==n.indexOf(e.command.name),(i=!("always"!=this.$mergeUndoDeltas&&2e3<Date.now()-this.sequenceStartTime)&&i)?this.session.mergeUndoDeltas=!0:-1!==n.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now()))},S.prototype.setKeyboardHandler=function(e,t){var n;e&&"string"==typeof e&&"ace"!=e?(this.$keybindingId=e,n=this,y.loadModule(["keybinding",e],(function(i){n.$keybindingId==e&&n.keyBinding.setKeyboardHandler(i&&i.handler),t&&t()}))):(this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t())},S.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},S.prototype.setSession=function(e){var t,n;this.session!=e&&(this.curOp&&this.endOperation(),this.curOp={},(t=this.session)&&(this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange),(n=this.session.getSelection()).off("changeCursor",this.$onCursorChange),n.off("changeSelection",this.$onSelectionChange)),(this.session=e)?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.on("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(e)),this._signal("changeSession",{session:e,oldSession:t}),this.curOp=null,t&&t._signal("changeEditor",{oldEditor:this}),e&&e._signal("changeEditor",{editor:this}),e)&&!e.destroyed&&e.bgTokenizer.scheduleStart()},S.prototype.getSession=function(){return this.session},S.prototype.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},S.prototype.getValue=function(){return this.session.getValue()},S.prototype.getSelection=function(){return this.selection},S.prototype.resize=function(e){this.renderer.onResize(e)},S.prototype.setTheme=function(e,t){this.renderer.setTheme(e,t)},S.prototype.getTheme=function(){return this.renderer.getTheme()},S.prototype.setStyle=function(e){this.renderer.setStyle(e)},S.prototype.unsetStyle=function(e){this.renderer.unsetStyle(e)},S.prototype.getFontSize=function(){return this.getOption("fontSize")||o.computedStyle(this.container).fontSize},S.prototype.setFontSize=function(e){this.setOption("fontSize",e)},S.prototype.$highlightBrackets=function(){var e;this.$highlightPending||((e=this).$highlightPending=!0,setTimeout((function(){e.$highlightPending=!1;var t,n,i,r,o=e.session;o&&!o.destroyed&&(o.$bracketHighlight&&(o.$bracketHighlight.markerIds.forEach((function(e){o.removeMarker(e)})),o.$bracketHighlight=null),t=e.getCursorPosition(),n=(n=e.getKeyboardHandler())&&n.$getDirectionForHighlight&&n.$getDirectionForHighlight(e),(n=o.getMatchingBracketRanges(t,n))||(i=new C(o,t.row,t.column).getCurrentToken())&&/\b(?:tag-open|tag-name)/.test(i.type)&&(i=o.getMatchingTags(t))&&(n=[i.openTagName,i.closeTagName]),(n=!n&&o.$mode.getMatching?o.$mode.getMatching(e.session):n)&&(r="ace_bracket",Array.isArray(n)?1==n.length&&(r="ace_error_bracket"):n=[n],2==n.length&&(0==g.comparePoints(n[0].end,n[1].start)?n=[g.fromPoints(n[0].start,n[1].end)]:0==g.comparePoints(n[0].start,n[1].end)&&(n=[g.fromPoints(n[1].start,n[0].end)])),o.$bracketHighlight={ranges:n,markerIds:n.map((function(e){return o.addMarker(e,r,"text")}))}),e.getHighlightIndentGuides())&&e.renderer.$textLayer.$highlightIndentGuide()}),50))},S.prototype.focus=function(){this.textInput.focus()},S.prototype.isFocused=function(){return this.textInput.isFocused()},S.prototype.blur=function(){this.textInput.blur()},S.prototype.onFocus=function(e){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",e))},S.prototype.onBlur=function(e){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",e))},S.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},S.prototype.onDocumentChange=function(e){var t=this.session.$useWrapMode,n=e.start.row==e.end.row?e.end.row:1/0;this.renderer.updateLines(e.start.row,n,t),this._signal("change",e),this.$cursorChange()},S.prototype.onTokenizerUpdate=function(e){e=e.data,this.renderer.updateLines(e.first,e.last)},S.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},S.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},S.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},S.prototype.$updateHighlightActiveLine=function(){var e,t,n=this.getSession();this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(e=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(e=!1),!this.renderer.$maxLines||1!==this.session.getLength()||1<this.renderer.$minLines||(e=!1)),n.$highlightLineMarker&&!e?(n.removeMarker(n.$highlightLineMarker.id),n.$highlightLineMarker=null):!n.$highlightLineMarker&&e?((t=new g(e.row,e.column,e.row,1/0)).id=n.addMarker(t,"ace_active-line","screenLine"),n.$highlightLineMarker=t):e&&(n.$highlightLineMarker.start.row=e.row,n.$highlightLineMarker.end.row=e.row,n.$highlightLineMarker.start.column=e.column,n._signal("changeBackMarker"))},S.prototype.onSelectionChange=function(e){var t,n,i=((i=this.session).$selectionMarker&&i.removeMarker(i.$selectionMarker),i.$selectionMarker=null,this.selection.isEmpty()?this.$updateHighlightActiveLine():(t=this.selection.getRange(),n=this.getSelectionStyle(),i.$selectionMarker=i.addMarker(t,"ace_selection",n)),this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp());this.session.highlight(i),this._signal("changeSelection")},S.prototype.$getSelectionHighLightRegexp=function(){var e=this.session;if(!(t=this.getSelectionRange()).isEmpty()&&!t.isMultiLine()){var t,n=t.start.column,i=t.end.column;if(!(5e3<(t=(e=e.getLine(t.start.row)).substring(n,i)).length)&&/[\w\d]/.test(t)&&(t=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:t}),e=e.substring(n-1,i+1),t.test(e)))return t}},S.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},S.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},S.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},S.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},S.prototype.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},S.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},S.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},S.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},S.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},S.prototype.getCopyText=function(){var e=this.getSelectedText(),t=this.session.doc.getNewLineCharacter(),n=!1;if(!e&&this.$copyWithEmptySelection){n=!0;for(var i=this.selection.getAllRanges(),r=0;r<i.length;r++){var o=i[r];r&&i[r-1].start.row==o.start.row||(e+=this.session.getLine(o.start.row)+t)}}var s={text:e};return this._signal("copy",s),w.lineMode=!!n&&s.text,s.text},S.prototype.onCopy=function(){this.commands.exec("copy",this)},S.prototype.onCut=function(){this.commands.exec("cut",this)},S.prototype.onPaste=function(e,t){this.commands.exec("paste",this,{text:e,event:t})},S.prototype.$handlePaste=function(e){this._signal("paste",e="string"==typeof e?{text:e}:e);var t=e.text,n=(e=t===w.lineMode,this.session);if(!this.inMultiSelectMode||this.inVirtualSelectionMode)e?n.insert({row:this.selection.lead.row,column:0},t):this.insert(t);else if(e)this.selection.rangeList.ranges.forEach((function(e){n.insert({row:e.start.row,column:0},t)}));else{var i=t.split(/\r\n|\r|\n/),r=this.selection.rangeList.ranges;if(e=!(2!=i.length||i[0]&&i[1]),i.length!=r.length||e)return this.commands.exec("insertstring",this,t);for(var o=r.length;o--;){var s=r[o];s.isEmpty()||n.remove(s),n.insert(s.start,i[o])}}},S.prototype.execCommand=function(e,t){return this.commands.exec(e,this,t)},S.prototype.insert=function(e,t){var n,i=this.session,r=i.getMode(),o=this.getCursorPosition(),s=(this.getBehavioursEnabled()&&!t&&(n=r.transformAction(i.getState(o.row),"insertion",this,i,e))&&(e===n.text||this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1),e=n.text),"\t"==e&&(e=this.session.getTabString()),this.selection.isEmpty()?this.session.getOverwrite()&&-1==e.indexOf("\n")&&((s=new g.fromPoints(o,o)).end.column+=e.length,this.session.remove(s)):(s=this.getSelectionRange(),o=this.session.remove(s),this.clearSelection()),"\n"!=e&&"\r\n"!=e||(a=i.getLine(o.row),o.column>a.search(/\S|$/)&&(t=a.substr(o.column).search(/\S|$/),i.doc.removeInLine(o.row,o.column,o.column+t))),this.clearSelection(),o.column),a=(t=i.getState(o.row),i.getLine(o.row)),l=r.checkOutdent(t,a,e);i.insert(o,e),n&&n.selection&&(2==n.selection.length?this.selection.setSelectionRange(new g(o.row,s+n.selection[0],o.row,s+n.selection[1])):this.selection.setSelectionRange(new g(o.row+n.selection[0],n.selection[1],o.row+n.selection[2],n.selection[3]))),this.$enableAutoIndent&&(i.getDocument().isNewLine(e)&&(s=r.getNextLineIndent(t,a.slice(0,o.column),i.getTabString()),i.insert({row:o.row+1,column:0},s)),l)&&r.autoOutdent(t,i,o.row)},S.prototype.autoIndent=function(){for(var e,t,n,i,r,o=this.session,s=o.getMode(),a=(n=this.selection.isEmpty()?(t=0,o.doc.getLength()-1):(t=(e=this.getSelectionRange()).start.row,e.end.row),""),l="",c=o.getTabString(),u=t;u<=n;u++)0<u&&(a=o.getState(u-1),i=o.getLine(u-1),l=s.getNextLineIndent(a,i,c)),i=o.getLine(u),l!==(r=s.$getIndent(i))&&(0<r.length&&(r=new g(u,0,u,r.length),o.remove(r)),0<l.length)&&o.insert({row:u,column:0},l),s.autoOutdent(a,o,u)},S.prototype.onTextInput=function(e,t){if(!t)return this.keyBinding.onTextInput(e);this.startOperation({command:{name:"insertstring"}}),e=this.applyComposition.bind(this,e,t),this.selection.rangeCount?this.forEachSelection(e):e(),this.endOperation()},S.prototype.applyComposition=function(e,t){var n;(t.extendLeft||t.extendRight)&&((n=this.selection.getRange()).start.column-=t.extendLeft,n.end.column+=t.extendRight,n.start.column<0&&(n.start.row--,n.start.column+=this.session.getLine(n.start.row).length+1),this.selection.setRange(n),e||n.isEmpty()||this.remove()),!e&&this.selection.isEmpty()||this.insert(e,!0),(t.restoreStart||t.restoreEnd)&&((n=this.selection.getRange()).start.column-=t.restoreStart,n.end.column-=t.restoreEnd,this.selection.setRange(n))},S.prototype.onCommandKey=function(e,t,n){return this.keyBinding.onCommandKey(e,t,n)},S.prototype.setOverwrite=function(e){this.session.setOverwrite(e)},S.prototype.getOverwrite=function(){return this.session.getOverwrite()},S.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},S.prototype.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},S.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},S.prototype.setDragDelay=function(e){this.setOption("dragDelay",e)},S.prototype.getDragDelay=function(){return this.getOption("dragDelay")},S.prototype.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},S.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},S.prototype.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},S.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},S.prototype.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},S.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},S.prototype.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},S.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},S.prototype.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},S.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},S.prototype.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},S.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},S.prototype.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},S.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},S.prototype.setHighlightIndentGuides=function(e){this.renderer.setHighlightIndentGuides(e)},S.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},S.prototype.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},S.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},S.prototype.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},S.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},S.prototype.setReadOnly=function(e){this.setOption("readOnly",e)},S.prototype.getReadOnly=function(){return this.getOption("readOnly")},S.prototype.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},S.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},S.prototype.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},S.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},S.prototype.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},S.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},S.prototype.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},S.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},S.prototype.remove=function(e){var t,n,i;this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight()),e=this.getSelectionRange(),this.getBehavioursEnabled()&&(n=(t=this.session).getState(e.start.row),n=t.getMode().transformAction(n,"deletion",this,t,e),0===e.end.column&&"\n"==(i=t.getTextRange(e))[i.length-1]&&(i=t.getLine(e.end.row),/^\s+$/.test(i))&&(e.end.column=i.length),n)&&(e=n),this.session.remove(e),this.clearSelection()},S.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},S.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},S.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},S.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},S.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},S.prototype.setGhostText=function(e,t){this.session.widgetManager||(this.session.widgetManager=new b(this.session),this.session.widgetManager.attach(this)),this.renderer.setGhostText(e,t)},S.prototype.removeGhostText=function(){this.session.widgetManager&&this.renderer.removeGhostText()},S.prototype.transposeLetters=function(){var e,t,n,i;this.selection.isEmpty()&&0!==(t=(e=this.getCursorPosition()).column)&&(i=t<(i=this.session.getLine(e.row)).length?(n=i.charAt(t)+i.charAt(t-1),new g(e.row,t-1,e.row,t+1)):(n=i.charAt(t-1)+i.charAt(t-2),new g(e.row,t-2,e.row,t)),this.session.replace(i,n),this.session.selection.moveToPosition(i.end))},S.prototype.toLowerCase=function(){var e=this.getSelectionRange(),t=(this.selection.isEmpty()&&this.selection.selectWord(),this.getSelectionRange()),n=this.session.getTextRange(t);this.session.replace(t,n.toLowerCase()),this.selection.setSelectionRange(e)},S.prototype.toUpperCase=function(){var e=this.getSelectionRange(),t=(this.selection.isEmpty()&&this.selection.selectWord(),this.getSelectionRange()),n=this.session.getTextRange(t);this.session.replace(t,n.toUpperCase()),this.selection.setSelectionRange(e)},S.prototype.indent=function(){var e=this.session,t=this.getSelectionRange();if(!(t.start.row<t.end.row)){if(t.start.column<t.end.column){var n,i=e.getTextRange(t);if(!/^\s+$/.test(i))return n=this.$getSelectedRows(),void e.indentRows(n.first,n.last,"\t")}var r=e.getLine(t.start.row),o=(i=t.start,e.getTabSize());if(i=e.documentToScreenColumn(i.row,i.column),this.session.getUseSoftTabs())var a=o-i%o,l=s.stringRepeat(" ",a);else{for(a=i%o;" "==r[t.start.column-1]&&a;)t.start.column--,a--;this.selection.setSelectionRange(t),l="\t"}return this.insert(l)}n=this.$getSelectedRows(),e.indentRows(n.first,n.last,"\t")},S.prototype.blockIndent=function(){var e=this.$getSelectedRows();this.session.indentRows(e.first,e.last,"\t")},S.prototype.blockOutdent=function(){var e=this.session.getSelection();this.session.outdentRows(e.getRange())},S.prototype.sortLines=function(){for(var e=this.$getSelectedRows(),t=this.session,n=[],i=e.first;i<=e.last;i++)n.push(t.getLine(i));n.sort((function(e,t){return e.toLowerCase()<t.toLowerCase()?-1:e.toLowerCase()>t.toLowerCase()?1:0}));var r=new g(0,0,0,0);for(i=e.first;i<=e.last;i++){var o=t.getLine(i);r.start.row=i,r.end.row=i,r.end.column=o.length,t.replace(r,n[i-e.first])}},S.prototype.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},S.prototype.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,n,e)},S.prototype.getNumberAt=function(e,t){for(var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g,i=(n.lastIndex=0,this.session.getLine(e));n.lastIndex<t;){var r=n.exec(i);if(r.index<=t&&r.index+r[0].length>=t)return{value:r[0],start:r.index,end:r.index+r[0].length}}return null},S.prototype.modifyNumber=function(e){var t,n,i,r=this.selection.getCursor().row,o=this.selection.getCursor().column,s=new g(r,o-1,r,o);s=this.session.getTextRange(s),!isNaN(parseFloat(s))&&isFinite(s)?(s=this.getNumberAt(r,o))&&(i=0<=s.value.indexOf(".")?s.start+s.value.indexOf(".")+1:s.end,t=s.start+s.value.length-i,n=parseFloat(s.value),n*=Math.pow(10,t),i!==s.end&&o<i?e*=Math.pow(10,s.end-o-1):e*=Math.pow(10,s.end-o),i=(n=(n+=e)/Math.pow(10,t)).toFixed(t),e=new g(r,s.start,r,s.end),this.session.replace(e,i),this.moveCursorTo(r,Math.max(s.start+1,o+i.length-s.value.length))):this.toggleWord()},S.prototype.toggleWord=function(){for(var e,t=this.selection.getCursor().row,n=this.selection.getCursor().column,i=(this.selection.selectWord(),this.getSelectedText()),r=this.selection.getWordRange().start.column,o=i.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),a=n-r-1,l=(a<0&&(a=0),0),c=this,u=(i.match(/[A-Za-z0-9_]+/)&&o.forEach((function(n,o){e=l+n.length,l<=a&&a<=e&&(i=n,c.selection.clearSelection(),c.moveCursorTo(t,l+r),c.selection.selectTo(t,e+r)),l=e})),this.$toggleWordPairs),h=0;h<u.length;h++)for(var d=u[h],p=0;p<=1;p++){var g=+!p,f=i.match(new RegExp("^\\s?_?("+s.escapeRegExp(d[p])+")\\s?$","i"));f&&i.match(new RegExp("([_]|^|\\s)("+s.escapeRegExp(f[1])+")($|\\s)","g"))&&(f=i.replace(new RegExp(s.escapeRegExp(d[p]),"i"),(function(e){var t=d[g];return e.toUpperCase()==e?t=t.toUpperCase():e.charAt(0).toUpperCase()==e.charAt(0)&&(t=t.substr(0,0)+d[g].charAt(0).toUpperCase()+t.substr(1)),t})),this.insert(f))}},S.prototype.findLinkAt=function(e,t){e=this.session.getLine(e).split(/((?:https?|ftp):\/\/[\S]+)/);var n,r,o,s=t,a=(s<0&&(s=0),0);try{for(var l=i(e),c=l.next();!c.done;c=l.next()){var u=c.value,h=a+u.length;if(a<=s&&s<=h&&u.match(/((?:https?|ftp):\/\/[\S]+)/)){o=u.replace(/[\s:.,'";}\]]+$/,"");break}a=h}}catch(e){n={error:e}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}return o},S.prototype.openLink=function(){var e=this.selection.getCursor();return(e=this.findLinkAt(e.row,e.column))&&window.open(e,"_blank"),null!=e},S.prototype.removeLines=function(){var e=this.$getSelectedRows();this.session.removeFullLines(e.first,e.last),this.clearSelection()},S.prototype.duplicateSelection=function(){var e,t=this.selection,n=this.session,i=t.getRange(),r=t.isBackwards();i.isEmpty()?(e=i.start.row,n.duplicateLines(e,e)):(e=r?i.start:i.end,n=n.insert(e,n.getTextRange(i),!1),i.start=e,i.end=n,t.setSelectionRange(i,r))},S.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},S.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},S.prototype.moveText=function(e,t,n){return this.session.moveText(e,t,n)},S.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},S.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},S.prototype.$moveLines=function(e,t){var n=this.selection;if(!n.inMultiSelectMode||this.inVirtualSelectionMode){var i=n.toOrientedRange(),r=this.$getSelectedRows(i),o=this.session.$moveLines(r.first,r.last,t?0:e);i.moveBy(o=t&&-1==e?0:o,0),n.fromOrientedRange(i)}else{for(var s=n.rangeList.ranges,a=(n.rangeList.detach(this.session),this.inVirtualSelectionMode=!0,0),l=0,c=s.length,u=0;u<c;u++){for(var h=u,d=(s[u].moveBy(a,0),(r=this.$getSelectedRows(s[u])).first),p=r.last;++u<c;){l&&s[u].moveBy(l,0);var g=this.$getSelectedRows(s[u]);if(t&&g.first!=p)break;if(!t&&g.first>p+1)break;p=g.last}for(u--,a=this.session.$moveLines(d,p,t?0:e),t&&-1==e&&(h=u+1);h<=u;)s[h].moveBy(a,0),h++;l+=a=t?a:0}n.fromOrientedRange(n.ranges[0]),n.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},S.prototype.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},S.prototype.onCompositionStart=function(e){this.renderer.showComposition(e)},S.prototype.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},S.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},S.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},S.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},S.prototype.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},S.prototype.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},S.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},S.prototype.$moveByPage=function(e,t){var n=this.renderer,i=this.renderer.layerConfig,r=e*Math.floor(i.height/i.lineHeight);!0===t?this.selection.$moveSelection((function(){this.moveCursorBy(r,0)})):!1===t&&(this.selection.moveCursorBy(r,0),this.selection.clearSelection()),e=n.scrollTop,n.scrollBy(0,r*i.lineHeight),null!=t&&n.scrollCursorIntoView(null,.5),n.animateScrolling(e)},S.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},S.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},S.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},S.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},S.prototype.scrollPageDown=function(){this.$moveByPage(1)},S.prototype.scrollPageUp=function(){this.$moveByPage(-1)},S.prototype.scrollToRow=function(e){this.renderer.scrollToRow(e)},S.prototype.scrollToLine=function(e,t,n,i){this.renderer.scrollToLine(e,t,n,i)},S.prototype.centerSelection=function(){var e=this.getSelectionRange();e={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)},this.renderer.alignCursor(e,.5)},S.prototype.getCursorPosition=function(){return this.selection.getCursor()},S.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},S.prototype.getSelectionRange=function(){return this.selection.getRange()},S.prototype.selectAll=function(){this.selection.selectAll()},S.prototype.clearSelection=function(){this.selection.clearSelection()},S.prototype.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},S.prototype.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},S.prototype.jumpToMatching=function(e,t){var n=this.getCursorPosition(),i=new C(this.session,n.row,n.column),r=i.getCurrentToken(),o=0,s=(r=r&&-1!==r.type.indexOf("tag-name")?i.stepBackward():r)||i.stepForward();if(s){var a,l,c=!1,u={},h=n.column-s.start,d={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(s.value.match(/[{}()\[\]]/g)){for(;h<s.value.length&&!c;h++)if(d[s.value[h]])switch(l=d[s.value[h]]+"."+s.type.replace("rparen","lparen"),isNaN(u[l])&&(u[l]=0),s.value[h]){case"(":case"[":case"{":u[l]++;break;case")":case"]":case"}":u[l]--,-1===u[l]&&(a="bracket",c=!0)}}else-1!==s.type.indexOf("tag-name")&&(isNaN(u[s.value])&&(u[s.value]=0),"<"===r.value&&1<o?u[s.value]++:"</"===r.value&&u[s.value]--,-1===u[s.value])&&(a="tag",c=!0)}while(c||(r=s,o++,s=i.stepForward(),h=0),s&&!c);if(a){if("bracket"===a)!(f=this.session.getBracketRange(n))&&(m=(f=new g(i.getCurrentTokenRow(),i.getCurrentTokenColumn()+h-1,i.getCurrentTokenRow(),i.getCurrentTokenColumn()+h-1)).start,t||m.row===n.row&&Math.abs(m.column-n.column)<2)&&(f=this.session.getBracketRange(m));else if("tag"===a){if(!s||-1===s.type.indexOf("tag-name"))return;var p,f,m=(m=0===(f=new g(i.getCurrentTokenRow(),i.getCurrentTokenColumn()-2,i.getCurrentTokenRow(),i.getCurrentTokenColumn()-2)).compare(n.row,n.column)&&(p=this.session.getMatchingTags(n))?p.openTag.contains(n.row,n.column)?(f=p.closeTag).start:(f=p.openTag,p.closeTag.start.row===n.row&&p.closeTag.start.column===n.column?f.end:f.start):m)||f.start}(m=f&&f.cursor||m)&&(e?f&&t?this.selection.setRange(f):f&&f.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(m.row,m.column):this.selection.moveTo(m.row,m.column))}}},S.prototype.gotoLine=function(e,t,n){this.selection.clearSelection(),this.session.unfold({row:e-1,column:t||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(e-1,t||0),this.isRowFullyVisible(e-1)||this.scrollToLine(e-1,!0,n)},S.prototype.navigateTo=function(e,t){this.selection.moveTo(e,t)},S.prototype.navigateUp=function(e){var t;if(this.selection.isMultiLine()&&!this.selection.isBackwards())return t=this.selection.anchor.getPosition(),this.moveCursorToPosition(t);this.selection.clearSelection(),this.selection.moveCursorBy(-e||-1,0)},S.prototype.navigateDown=function(e){var t;if(this.selection.isMultiLine()&&this.selection.isBackwards())return t=this.selection.anchor.getPosition(),this.moveCursorToPosition(t);this.selection.clearSelection(),this.selection.moveCursorBy(e||1,0)},S.prototype.navigateLeft=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorLeft();else{var t=this.getSelectionRange().start;this.moveCursorToPosition(t)}this.clearSelection()},S.prototype.navigateRight=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorRight();else{var t=this.getSelectionRange().end;this.moveCursorToPosition(t)}this.clearSelection()},S.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},S.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},S.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},S.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},S.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},S.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},S.prototype.replace=function(e,t){t&&this.$search.set(t);var n=0;return(t=this.$search.find(this.session))&&(this.$tryReplace(t,e)&&(n=1),this.selection.setSelectionRange(t),this.renderer.scrollSelectionIntoView(t.start,t.end)),n},S.prototype.replaceAll=function(e,t){t&&this.$search.set(t);var n=this.$search.findAll(this.session),i=0;if(n.length){t=this.getSelectionRange(),this.selection.moveTo(0,0);for(var r=n.length-1;0<=r;--r)this.$tryReplace(n[r],e)&&i++;this.selection.setSelectionRange(t)}return i},S.prototype.$tryReplace=function(e,t){var n=this.session.getTextRange(e);return null!==(t=this.$search.replace(n,t))?(e.end=this.session.replace(e,t),e):null},S.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},S.prototype.find=function(e,t,n){t=t||{},"string"==typeof e||e instanceof RegExp?t.needle=e:"object"==typeof e&&r.mixin(t,e);var i=this.selection.getRange();return null==t.needle&&((e=this.session.getTextRange(i)||this.$search.$options.needle)||(i=this.session.getWordRange(i.start.row,i.start.column),e=this.session.getTextRange(i)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:i}),e=this.$search.find(this.session),t.preventScroll?e:e?(this.revealRange(e,n),e):(t.backwards?i.start=i.end:i.end=i.start,void this.selection.setRange(i))},S.prototype.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},S.prototype.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},S.prototype.revealRange=function(e,t){this.session.unfold(e),this.selection.setSelectionRange(e);var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),!1!==t&&this.renderer.animateScrolling(n)},S.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},S.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},S.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach((function(e){e.destroy()})),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},S.prototype.setAutoScrollEditorIntoView=function(e){var t,n,i,r,o,s,a;e&&(i=!1,(n=this).$scrollAnchor||(this.$scrollAnchor=document.createElement("div")),(r=this.$scrollAnchor).style.cssText="position:absolute",this.container.insertBefore(r,this.container.firstChild),o=this.on("changeSelection",(function(){i=!0})),s=this.renderer.on("beforeRender",(function(){i&&(t=n.renderer.container.getBoundingClientRect())})),a=this.renderer.on("afterRender",(function(){var e,o,s;i&&t&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())&&(e=(o=n.renderer).$cursorLayer.$pixelPos,o=o.layerConfig,s=e.top-o.offset,null!=(i=0<=e.top&&s+t.top<0||!(e.top<o.height&&e.top+t.top+o.lineHeight>window.innerHeight)&&null)&&(r.style.top=s+"px",r.style.left=e.left+"px",r.style.height=o.lineHeight+"px",r.scrollIntoView(i)),i=t=null)})),this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",o),this.renderer.off("afterRender",a),this.renderer.off("beforeRender",s))})},S.prototype.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,o.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))},S.prototype.prompt=function(e,t,n){var i=this;y.loadModule("ace/ext/prompt",(function(r){r.prompt(i,e,t,n)}))},(e=S).$uid=0,e.prototype.curOp=null,e.prototype.prevOp={},e.prototype.$mergeableCommands=["backspace","del","insertstring"],e.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],r.implement(e.prototype,f),y.defineOptions(e.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){this.textInput.setReadOnly(e),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(e){this.textInput.setCopyWithEmptySelection(e)},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(e){this.session.setValue(e)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(e){this.setSession(e)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(e){this.renderer.$gutterLayer.setShowLineNumbers(e),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),e&&this.$relativeLineNumbers?k.attach(this):k.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(e){this.$showLineNumbers&&e?k.attach(this):k.detach(this)}},placeholder:{set:function(e){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var e=this.session&&(this.renderer.$composition||this.getValue());e&&this.renderer.placeholderNode?(this.renderer.off("afterRender",this.$updatePlaceholder),o.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null):e||this.renderer.placeholderNode?!e&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||""):(this.renderer.on("afterRender",this.$updatePlaceholder),o.addCssClass(this.container,"ace_hasPlaceholder"),(e=o.createElement("div")).className="ace_placeholder",e.textContent=this.$placeholder||"",this.renderer.placeholderNode=e,this.renderer.content.appendChild(this.renderer.placeholderNode))}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(e){function t(e){e.target==this.renderer.scroller&&e.keyCode===x.enter&&(e.preventDefault(),e=this.getCursorPosition().row,this.isRowVisible(e)||this.scrollToLine(e,!0,!0),this.focus())}var n,i={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(e){e.blur(),e.renderer.scroller.focus()},readOnly:!0};e?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",A("editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",A("Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",t.bind(this)),this.commands.addCommand(i),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",A("editor")),this.renderer.$gutter.setAttribute("aria-label",A("Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),(n=n||new I(this)).addListener()):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",t.bind(this)),this.commands.removeCommand(i),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),n&&n.removeListener())},initialValue:!1},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var k={getText:function(e,t){return(Math.abs(e.selection.lead.row-t)||t+1+(t<9?"\xb7":""))+""},getWidth:function(e,t,n){return Math.max(t.toString().length,(n.lastRow+1).toString().length,2)*n.characterWidth},update:function(e,t){t.renderer.$loop.schedule(t.renderer.CHANGE_GUTTER)},attach:function(e){e.renderer.$gutterLayer.$renderer=this,e.on("changeSelection",this.update),this.update(null,e)},detach:function(e){e.renderer.$gutterLayer.$renderer==this&&(e.renderer.$gutterLayer.$renderer=null),e.off("changeSelection",this.update),this.update(null,e)}};t.Editor=e})),ace.define("ace/undomanager",["require","exports","module","ace/range"],(function(e,t,n){"use strict";r.prototype.addSession=function(e){this.$session=e},r.prototype.add=function(e,t,n){this.$fromUndo||e!=this.$lastDelta&&(this.$keepRedoStack||(this.$redoStack.length=0),!1!==t&&this.lastDeltas||(this.lastDeltas=[],(t=this.$undoStack.length)>this.$undoDepth-1&&this.$undoStack.splice(0,t-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),e.id=this.$rev=++this.$maxRev),"remove"!=e.action&&"insert"!=e.action||(this.$lastDelta=e),this.lastDeltas.push(e))},r.prototype.addSelection=function(e,t){this.selections.push({value:e,rev:t||this.$rev})},r.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},r.prototype.markIgnored=function(e,t){null==t&&(t=this.$rev+1);for(var n=this.$undoStack,i=n.length;i--;){var r=n[i][0];if(r.id<=e)break;r.id<t&&(r.ignore=!0)}this.lastDeltas=null},r.prototype.getSelection=function(e,t){for(var n=this.selections,i=n.length;i--;){var r=n[i];if(r.rev<e)return t?n[i+1]:r}},r.prototype.getRevision=function(){return this.$rev},r.prototype.getDeltas=function(e,t){null==t&&(t=this.$rev+1);for(var n=this.$undoStack,i=null,r=0,o=n.length;o--;){var s=n[o][0];if(s.id<t&&!i&&(i=o+1),s.id<=e){r=o+1;break}}return n.slice(r,i)},r.prototype.getChangedRanges=function(e,t){null==t&&this.$rev},r.prototype.getChangedLines=function(e,t){null==t&&this.$rev},r.prototype.undo=function(e,t){this.lastDeltas=null;var n,i=this.$undoStack;if(function(e,t){for(var n=t;n--;){var i=e[n];if(i&&!i[0].ignore){for(;n<t-1;){var r=function(e,t){for(var n=e.length;n--;)for(var i=0;i<t.length;i++)if(!u(e[n],t[i])){for(;n<e.length;){for(;i--;)u(t[i],e[n]);i=t.length,n++}return[e,t]}return e.selectionBefore=t.selectionBefore=e.selectionAfter=t.selectionAfter=null,[t,e]}(e[n],e[n+1]);e[n]=r[0],e[n+1]=r[1],n++}return 1}}}(i,i.length))return e=e||this.$session,this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0,n=null,(i=i.pop())&&(n=e.undoChanges(i,t),this.$redoStack.push(i),this.$syncRev()),this.$fromUndo=!1,n},r.prototype.redo=function(e,t){if(this.lastDeltas=null,e=e||this.$session,this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){for(var n=this.getDeltas(this.$redoStackBaseRev,this.$rev+1),i=this.$redoStack,r=n,l=0;l<r.length;l++)for(var c=r[l],u=0;u<c.length;u++){g=void 0,f=void 0,m=void 0,v=void 0,y=void 0,C=void 0;var g=i,f=c[u];f=function(e){return{start:a(e.start),end:a(e.end),action:e.action,lines:e.lines.slice()}}(f);for(var m=g.length;m--;){for(var v=g[m],y=0;y<v.length;y++){var C=function(e,t){var n,i,r="insert"==e.action,a="insert"==t.action;if(r&&a)s(e.start,t.start)<0?h(t,e,1):h(e,t,1);else if(r&&!a)0<=s(e.start,t.end)?h(e,t,-1):(s(e.start,t.start)<=0||h(e,o.fromPoints(t.start,e.start),-1),h(t,e,1));else if(!r&&a)0<=s(t.start,e.end)?h(t,e,-1):(s(t.start,e.start)<=0||h(t,o.fromPoints(e.start,t.start),-1),h(e,t,1));else if(!r&&!a)if(0<=s(t.start,e.end))h(t,e,-1);else{if(!(s(t.end,e.start)<=0))return s(e.start,t.start)<0&&(e=p(n=e,t.start)),0<s(e.end,t.end)&&(i=p(e,t.end)),d(t.end,e.start,e.end,-1),i&&!n&&(e.lines=i.lines,e.start=i.start,e.end=i.end,i=e),[t,n,i].filter(Boolean);h(e,t,-1)}return[t,e]}(v[y],f);f=C[0],2!=C.length&&(C[2]?(v.splice(y+1,1,C[1],C[2]),y++):C[1]||(v.splice(y,1),y--))}v.length||g.splice(m,1)}}this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach((function(e){e[0].id=++this.$maxRev}),this)}var b=null;return(n=this.$redoStack.pop())&&(b=e.redoChanges(n,t),this.$undoStack.push(n),this.$syncRev()),this.$fromUndo=!1,b},r.prototype.$syncRev=function(){var e=(e=(e=this.$undoStack)[e.length-1])&&e[0].id||0;this.$redoStackBaseRev=e,this.$rev=e},r.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},r.prototype.canUndo=function(){return 0<this.$undoStack.length},r.prototype.canRedo=function(){return 0<this.$redoStack.length},r.prototype.bookmark=function(e){null==e&&(e=this.$rev),this.mark=e},r.prototype.isAtBookmark=function(){return this.$rev===this.mark},r.prototype.toJSON=function(){},r.prototype.fromJSON=function(){},r.prototype.$prettyPrint=function(e){return e?l(e):l(this.$undoStack)+"\n---\n"+l(this.$redoStack)};var i=r;function r(){this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}i.prototype.hasUndo=i.prototype.canUndo,i.prototype.hasRedo=i.prototype.canRedo,i.prototype.isClean=i.prototype.isAtBookmark,i.prototype.markClean=i.prototype.bookmark;var o=e("./range").Range,s=o.comparePoints;function a(e){return{row:e.row,column:e.column}}function l(e){var t;return e=e||this,Array.isArray(e)?e.map(l).join("\n"):(t="",e.action?(t="insert"==e.action?"+":"-",t+="["+e.lines+"]"):e.value&&(t=Array.isArray(e.value)?e.value.map(c).join("\n"):c(e.value)),e.start&&(t+=c(e)),(e.id||e.rev)&&(t+="\t("+(e.id||e.rev)+")"),t)}function c(e){return e.start.row+":"+e.start.column+"=>"+e.end.row+":"+e.end.column}function u(e,t){var n="insert"==e.action,i="insert"==t.action;if(n&&i)if(0<=s(t.start,e.end))h(t,e,-1);else{if(!(s(t.start,e.start)<=0))return;h(e,t,1)}else if(n&&!i)if(0<=s(t.start,e.end))h(t,e,-1);else{if(!(s(t.end,e.start)<=0))return;h(e,t,-1)}else if(!n&&i)if(0<=s(t.start,e.start))h(t,e,1);else{if(!(s(t.start,e.start)<=0))return;h(e,t,1)}else if(!n&&!i)if(0<=s(t.start,e.start))h(t,e,1);else{if(!(s(t.end,e.start)<=0))return;h(e,t,-1)}return 1}function h(e,t,n){d(e.start,t.start,t.end,n),d(e.end,t.start,t.end,n)}function d(e,t,n,i){e.row==(1==i?t:n).row&&(e.column+=i*(n.column-t.column)),e.row+=i*(n.row-t.row)}function p(e,t){var n=e.lines,i=e.end,r=(e.end=a(t),e.end.row-e.start.row),o=n.splice(r,n.length);return r=r?t.column:t.column-e.start.column,n.push(o[0].substring(0,r)),o[0]=o[0].substr(r),{start:a(t),end:i,lines:o,action:e.action}}o.comparePoints,t.UndoManager=i})),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var i=e("../lib/dom");function r(e,t){this.element=e,this.canvasHeight=t||5e5,this.element.style.height=2*this.canvasHeight+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}r.prototype.moveContainer=function(e){i.translate(this.element,0,-e.firstRowScreen*e.lineHeight%this.canvasHeight-e.offset*this.$offsetCoefficient)},r.prototype.pageChanged=function(e,t){return Math.floor(e.firstRowScreen*e.lineHeight/this.canvasHeight)!==Math.floor(t.firstRowScreen*t.lineHeight/this.canvasHeight)},r.prototype.computeLineTop=function(e,t,n){var i=t.firstRowScreen*t.lineHeight;return i=Math.floor(i/this.canvasHeight),n.documentToScreenRow(e,0)*t.lineHeight-i*this.canvasHeight},r.prototype.computeLineHeight=function(e,t,n){return t.lineHeight*n.getRowLineCount(e)},r.prototype.getLength=function(){return this.cells.length},r.prototype.get=function(e){return this.cells[e]},r.prototype.shift=function(){this.$cacheCell(this.cells.shift())},r.prototype.pop=function(){this.$cacheCell(this.cells.pop())},r.prototype.push=function(e){if(Array.isArray(e)){this.cells.push.apply(this.cells,e);for(var t=i.createFragment(this.element),n=0;n<e.length;n++)t.appendChild(e[n].element);this.element.appendChild(t)}else this.cells.push(e),this.element.appendChild(e.element)},r.prototype.unshift=function(e){if(Array.isArray(e)){this.cells.unshift.apply(this.cells,e);for(var t=i.createFragment(this.element),n=0;n<e.length;n++)t.appendChild(e[n].element);this.element.firstChild?this.element.insertBefore(t,this.element.firstChild):this.element.appendChild(t)}else this.cells.unshift(e),this.element.insertAdjacentElement("afterbegin",e.element)},r.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},r.prototype.$cacheCell=function(e){e&&(e.element.remove(),this.cellCache.push(e))},r.prototype.createCell=function(e,t,n,r){var o,s=this.cellCache.pop();return s||(o=i.createElement("div"),r&&r(o),this.element.appendChild(o),s={element:o,text:"",row:e}),s.row=e,s},t.Lines=r})),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"],(function(e,t,n){"use strict";var i=e("../lib/dom"),r=e("../lib/oop"),o=e("../lib/lang"),s=e("../lib/event_emitter").EventEmitter,a=e("./lines").Lines,l=e("../config").nls;function c(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new a(this.element),this.$lines.$offsetCoefficient=1}function u(e){var t=document.createTextNode(""),n=(e.appendChild(t),t=i.createElement("span"),e.appendChild(t),t=i.createElement("span"),e.appendChild(t),i.createElement("span"));return t.appendChild(n),e}c.prototype.setSession=function(e){this.session&&this.session.off("change",this.$updateAnnotations),(this.session=e)&&e.on("change",this.$updateAnnotations)},c.prototype.addGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,t)},c.prototype.removeGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,t)},c.prototype.setAnnotations=function(e){this.$annotations=[];for(var t=0;t<e.length;t++){var n=e[t],i=n.row,r=(r=this.$annotations[i])||(this.$annotations[i]={text:[],type:[]}),s=(i=n.text,n.type);i=i?o.escapeHTML(i):n.html||"",-1===r.text.indexOf(i)&&(r.text.push(i),r.type.push(s)),(i=n.className)?r.className=i:"error"==s?r.className=" ace_error":"warning"==s&&" ace_error"!=r.className?r.className=" ace_warning":"info"!=s||r.className||(r.className=" ace_info")}},c.prototype.$updateAnnotations=function(e){var t,n;this.$annotations.length&&(t=e.start.row,0!=(n=e.end.row-t))&&("remove"==e.action?this.$annotations.splice(t,1+n,null):((e=new Array(1+n)).unshift(t,1),this.$annotations.splice.apply(this.$annotations,e)))},c.prototype.update=function(e){this.config=e;for(var t=this.session,n=e.firstRow,i=Math.min(e.lastRow+e.gutterOffset,t.getLength()-1),r=(this.oldLastRow=i,this.config=e,this.$lines.moveContainer(e),this.$updateCursorRow(),t.getNextFoldLine(n)),o=r?r.start.row:1/0,s=null,a=-1,l=n;;){if(o<l&&(l=r.end.row+1,o=(r=t.getNextFoldLine(l,r))?r.start.row:1/0),i<l){for(;this.$lines.getLength()>a+1;)this.$lines.pop();break}(s=this.$lines.get(++a))?s.row=l:(s=this.$lines.createCell(l,e,this.session,u),this.$lines.push(s)),this.$renderCell(s,e,r,l),l++}this._signal("afterRender"),this.$updateGutterWidth(e)},c.prototype.$updateGutterWidth=function(e){var t=this.session,n=t.gutterRenderer||this.$renderer,i=t.$firstLineNumber,r=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||t.$useWrapMode)&&(r=t.getLength()+i-1),i=n?n.getWidth(t,r,e):r.toString().length*e.characterWidth,(i+=(n=this.$padding||this.$computePadding()).left+n.right)===this.gutterWidth||isNaN(i)||(this.gutterWidth=i,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",i))},c.prototype.$updateCursorRow=function(){var e;this.$highlightGutterLine&&(e=this.session.selection.getCursor(),this.$cursorRow!==e.row)&&(this.$cursorRow=e.row)},c.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var e=this.session.selection.cursor.row;if(this.$cursorRow=e,!this.$cursorCell||this.$cursorCell.row!=e){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var t=this.$lines.cells;this.$cursorCell=null;for(var n=0;n<t.length;n++){var i=t[n];if(i.row>=this.$cursorRow){if(i.row>this.$cursorRow){var r=this.session.getFoldLine(this.$cursorRow);if(!(0<n&&r&&r.start.row==t[n-1].row))break;i=t[n-1]}i.element.className="ace_gutter-active-line "+i.element.className,this.$cursorCell=i;break}}}}},c.prototype.scrollLines=function(e){var t=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var n=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),i=this.oldLastRow;if(this.oldLastRow=n,!t||i<e.firstRow)return this.update(e);if(n<t.firstRow)return this.update(e);if(t.firstRow<e.firstRow)for(var r=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);0<r;r--)this.$lines.shift();if(n<i)for(r=this.session.getFoldedRowCount(n+1,i);0<r;r--)this.$lines.pop();e.firstRow<t.firstRow&&this.$lines.unshift(this.$renderLines(e,e.firstRow,t.firstRow-1)),i<n&&this.$lines.push(this.$renderLines(e,i+1,n)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},c.prototype.$renderLines=function(e,t,n){for(var i=[],r=t,o=this.session.getNextFoldLine(r),s=o?o.start.row:1/0;s<r&&(r=o.end.row+1,s=(o=this.session.getNextFoldLine(r,o))?o.start.row:1/0),!(n<r);){var a=this.$lines.createCell(r,e,this.session,u);this.$renderCell(a,e,o,r),i.push(a),r++}return i},c.prototype.$renderCell=function(e,t,n,r){var o,s=e.element,a=this.session,c=s.childNodes[0],u=s.childNodes[1],h=s.childNodes[2],d=h.firstChild,p=a.$firstLineNumber,g=a.$breakpoints,f=a.$decorations,m=a.gutterRenderer||this.$renderer,v=this.$showFoldWidgets&&a.foldWidgets,y=n?n.start.row:Number.MAX_VALUE,C=t.lineHeight+"px",b=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",I=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon";if(m=(m?m.getText(a,r):r+p).toString(),this.$highlightGutterLine&&(r==this.$cursorRow||n&&r<this.$cursorRow&&y<=r&&this.$cursorRow<=n.end.row)&&(b+="ace_gutter-active-line ",this.$cursorCell!=e)&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=e),g[r]&&(b+=g[r]),f[r]&&(b+=f[r]),this.$annotations[r]&&r!==y&&(b+=this.$annotations[r].className),s.className!=b&&(s.className=b),o=v&&null==(o=v[r])?v[r]=a.getFoldWidget(r):o){if(b="ace_fold-widget ace_"+o,"start"==o&&r==y&&r<n.end.row){b+=" ace_closed";for(var A,w=!1,x=r+1;x<=n.end.row;x++)if(this.$annotations[x]){if(" ace_error"===this.$annotations[x].className){w=!0,A=" ace_error_fold";break}" ace_warning"===this.$annotations[x].className&&(w=!0,A=" ace_warning_fold")}s.className+=A}else b+=" ace_open";u.className!=b&&(u.className=b),i.setStyle(u.style,"height",C),i.setStyle(u.style,"display","inline-block"),u.setAttribute("role","button"),u.setAttribute("tabindex","-1"),(n=a.getFoldLine(m-1))?(u.setAttribute("aria-label",l("Unfold rows $0 to $1",[m,n.end.row+1])),u.setAttribute("title",l("Unfold code"))):(u.setAttribute("aria-label",l("Fold at row $0",[m])),u.setAttribute("title",l("Fold code")))}else u&&(i.setStyle(u.style,"display","none"),u.setAttribute("tabindex","0"),u.removeAttribute("role"),u.removeAttribute("aria-label"));return w&&this.$showFoldedAnnotations?(h.className="ace_gutter_annotation",d.className=I,d.className+=A,i.setStyle(d.style,"height",C),i.setStyle(h.style,"display","block"),i.setStyle(h.style,"height",C),h.setAttribute("aria-label",l("Read annotations row $0",[m])),h.setAttribute("tabindex","-1")):this.$annotations[r]?(h.className="ace_gutter_annotation",d.className=I,this.$useSvgGutterIcons?d.className+=this.$annotations[r].className:s.classList.add(this.$annotations[r].className.replace(" ","")),i.setStyle(d.style,"height",C),i.setStyle(h.style,"display","block"),i.setStyle(h.style,"height",C),h.setAttribute("aria-label",l("Read annotations row $0",[m])),h.setAttribute("tabindex","-1")):(i.setStyle(h.style,"display","none"),h.removeAttribute("aria-label"),h.setAttribute("tabindex","0")),m!==c.data&&(c.data=m),i.setStyle(e.element.style,"height",this.$lines.computeLineHeight(r,t,a)+"px"),i.setStyle(e.element.style,"top",this.$lines.computeLineTop(r,t,a)+"px"),e.text=m,"none"===h.style.display&&"none"===u.style.display?e.element.setAttribute("aria-hidden",!0):e.element.setAttribute("aria-hidden",!1),e},c.prototype.setHighlightGutterLine=function(e){this.$highlightGutterLine=e},c.prototype.setShowLineNumbers=function(e){this.$renderer=!e&&{getWidth:function(){return 0},getText:function(){return""}}},c.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},c.prototype.setShowFoldWidgets=function(e){e?i.addCssClass(this.element,"ace_folding-enabled"):i.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null},c.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},c.prototype.$computePadding=function(){var e;return this.element.firstChild?(e=i.computedStyle(this.element.firstChild),this.$padding={},this.$padding.left=(parseInt(e.borderLeftWidth)||0)+(parseInt(e.paddingLeft)||0)+1,this.$padding.right=(parseInt(e.borderRightWidth)||0)+(parseInt(e.paddingRight)||0),this.$padding):{left:0,right:0}},c.prototype.getRegion=function(e){var t=this.$padding||this.$computePadding(),n=this.element.getBoundingClientRect();return e.x<t.left+n.left?"markers":this.$showFoldWidgets&&e.x>n.right-t.right?"foldWidgets":void 0},(e=c).prototype.$fixedWidth=!1,e.prototype.$highlightGutterLine=!0,e.prototype.$renderer="",e.prototype.$showLineNumbers=!0,e.prototype.$showFoldWidgets=!0,r.implement(e.prototype,s),t.Gutter=e})),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],(function(e,t,n){"use strict";var i=e("../range").Range,r=e("../lib/dom");function o(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)}o.prototype.setPadding=function(e){this.$padding=e},o.prototype.setSession=function(e){this.session=e},o.prototype.setMarkers=function(e){this.markers=e},o.prototype.elt=function(e,t){var n=-1!=this.i&&this.element.childNodes[this.i];n?this.i++:(n=document.createElement("div"),this.element.appendChild(n),this.i=-1),n.style.cssText=t,n.className=e},o.prototype.update=function(e){if(e){var t,n;for(n in this.config=e,this.i=0,this.markers){var i,r,o,s=this.markers[n];s.range?(o=s.range.clipRows(e.firstRow,e.lastRow)).isEmpty()||(o=o.toScreenRange(this.session),s.renderer?(i=this.$getTop(o.start.row,e),r=this.$padding+o.start.column*e.characterWidth,s.renderer(t,o,r,i,e)):"fullLine"==s.type?this.drawFullLineMarker(t,o,s.clazz,e):"screenLine"==s.type?this.drawScreenLineMarker(t,o,s.clazz,e):o.isMultiLine()?"text"==s.type?this.drawTextMarker(t,o,s.clazz,e):this.drawMultiLineMarker(t,o,s.clazz,e):this.drawSingleLineMarker(t,o,s.clazz+" ace_start ace_br15",e)):s.update(t,this,this.session,e)}if(-1!=this.i)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},o.prototype.$getTop=function(e,t){return(e-t.firstRowScreen)*t.lineHeight},o.prototype.drawTextMarker=function(e,t,n,r,o){for(var s,a=this.session,l=t.start.row,c=t.end.row,u=l,h=0,d=a.getScreenLastRowColumn(u),p=new i(u,t.start.column,u,h);u<=c;u++)p.start.row=p.end.row=u,p.start.column=u==l?t.start.column:a.getRowWrapIndent(u),p.end.column=d,s=h,h=d,d=u+1<c?a.getScreenLastRowColumn(u+1):u==c?0:t.end.column,this.drawSingleLineMarker(e,p,n+(u==l?" ace_start":"")+" ace_br"+((u==l||u==l+1&&t.start.column?1:0)|(s<h?2:0)|(d<h?4:0)|(u==c?8:0)),r,u==c?0:1,o)},o.prototype.drawMultiLineMarker=function(e,t,n,i,r){var o,s=this.$padding,a=i.lineHeight,l=this.$getTop(t.start.row,i),c=s+t.start.column*i.characterWidth;r=r||"",this.session.$bidiHandler.isBidiRow(t.start.row)?((o=t.clone()).end.row=o.start.row,o.end.column=this.session.getLine(o.start.row).length,this.drawBidiSingleLineMarker(e,o,n+" ace_br1 ace_start",i,null,r)):this.elt(n+" ace_br1 ace_start","height:"+a+"px;right:0;top:"+l+"px;left:"+c+"px;"+(r||"")),this.session.$bidiHandler.isBidiRow(t.end.row)?((o=t.clone()).start.row=o.end.row,o.start.column=0,this.drawBidiSingleLineMarker(e,o,n+" ace_br12",i,null,r)):(l=this.$getTop(t.end.row,i),c=t.end.column*i.characterWidth,this.elt(n+" ace_br12","height:"+a+"px;width:"+c+"px;top:"+l+"px;left:"+s+"px;"+(r||""))),(a=(t.end.row-t.start.row-1)*i.lineHeight)<=0||(l=this.$getTop(t.start.row+1,i),e=(t.start.column?1:0)|(t.end.column?0:8),this.elt(n+(e?" ace_br"+e:""),"height:"+a+"px;right:0;top:"+l+"px;left:"+s+"px;"+(r||"")))},o.prototype.drawSingleLineMarker=function(e,t,n,i,r,o){if(this.session.$bidiHandler.isBidiRow(t.start.row))return this.drawBidiSingleLineMarker(e,t,n,i,r,o);e=i.lineHeight,r=(t.end.column+(r||0)-t.start.column)*i.characterWidth;var s=this.$getTop(t.start.row,i);t=this.$padding+t.start.column*i.characterWidth,this.elt(n,"height:"+e+"px;width:"+r+"px;top:"+s+"px;left:"+t+"px;"+(o||""))},o.prototype.drawBidiSingleLineMarker=function(e,t,n,i,r,o){var s=i.lineHeight,a=this.$getTop(t.start.row,i),l=this.$padding;this.session.$bidiHandler.getSelections(t.start.column,t.end.column).forEach((function(e){this.elt(n,"height:"+s+"px;width:"+(e.width+(r||0))+"px;top:"+a+"px;left:"+(l+e.left)+"px;"+(o||""))}),this)},o.prototype.drawFullLineMarker=function(e,t,n,i,r){var o=this.$getTop(t.start.row,i),s=i.lineHeight;t.start.row!=t.end.row&&(s+=this.$getTop(t.end.row,i)-o),this.elt(n,"height:"+s+"px;top:"+o+"px;left:0;right:0;"+(r||""))},o.prototype.drawScreenLineMarker=function(e,t,n,i,r){t=this.$getTop(t.start.row,i),i=i.lineHeight,this.elt(n,"height:"+i+"px;top:"+t+"px;left:0;right:0;"+(r||""))},(e=o).prototype.$padding=0,t.Marker=e})),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter"],(function(e,t,n){"use strict";var i=e("../lib/oop"),r=e("../lib/dom"),o=e("../lib/lang"),s=e("./lines").Lines,a=(e=e("../lib/event_emitter").EventEmitter,l.prototype.$updateEolChar=function(){var e="\n"==(e=this.session.doc).getNewLineCharacter()&&"windows"!=e.getNewLineMode()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=e)return this.EOL_CHAR=e,!0},l.prototype.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},l.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},l.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},l.prototype.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},l.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},l.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},l.prototype.setSession=function(e){(this.session=e)&&this.$computeTabString()},l.prototype.setShowInvisibles=function(e){return this.showInvisibles!=e&&("string"==typeof(this.showInvisibles=e)?(this.showSpaces=/tab/i.test(e),this.showTabs=/space/i.test(e),this.showEOL=/eol/i.test(e)):this.showSpaces=this.showTabs=this.showEOL=e,this.$computeTabString(),!0)},l.prototype.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},l.prototype.setHighlightIndentGuides=function(e){return this.$highlightIndentGuides!==e&&(this.$highlightIndentGuides=e)},l.prototype.$computeTabString=function(){for(var e,t,n,i,r,s,a=this.session.getTabSize(),l=(this.tabSize=a,this.$tabStrings=[0]),c=1;c<a+1;c++)this.showTabs?((s=this.dom.createElement("span")).className="ace_invisible ace_invisible_tab",s.textContent=o.stringRepeat(this.TAB_CHAR,c),l.push(s)):l.push(this.dom.createTextNode(o.stringRepeat(" ",c),this.element));this.displayIndentGuides&&(this.$indentGuideRe=/\s\S| \t|\t |\s$/,e="ace_indent-guide",t=this.showSpaces?" ace_invisible ace_invisible_space":"",n=this.showSpaces?o.stringRepeat(this.SPACE_CHAR,this.tabSize):o.stringRepeat(" ",this.tabSize),i=this.showTabs?" ace_invisible ace_invisible_tab":"",r=this.showTabs?o.stringRepeat(this.TAB_CHAR,this.tabSize):n,(s=this.dom.createElement("span")).className=e+t,s.textContent=n,this.$tabStrings[" "]=s,(s=this.dom.createElement("span")).className=e+i,s.textContent=r,this.$tabStrings["\t"]=s)},l.prototype.updateLines=function(e,t,n){if(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)return this.update(e);this.config=e;for(var i=Math.max(t,e.firstRow),r=Math.min(n,e.lastRow),o=this.element.childNodes,s=0,a=e.firstRow;a<i;a++){if(l=this.session.getFoldLine(a)){if(l.containsRow(i)){i=l.start.row;break}a=l.end.row}s++}for(var l,c=!1,u=(a=i,(l=this.session.getNextFoldLine(a))?l.start.row:1/0);u<a&&(a=l.end.row+1,u=(l=this.session.getNextFoldLine(a,l))?l.start.row:1/0),!(r<a);){var h,d=o[s++];d&&(this.dom.removeChildren(d),this.$renderLine(d,a,a==u&&l),c&&(d.style.top=this.$lines.computeLineTop(a,e,this.session)+"px"),h=e.lineHeight*this.session.getRowLength(a)+"px",d.style.height!=h)&&(c=!0,d.style.height=h),a++}if(c)for(;s<this.$lines.cells.length;){var p=this.$lines.cells[s++];p.element.style.top=this.$lines.computeLineTop(p.row,e,this.session)+"px"}},l.prototype.scrollLines=function(e){var t=this.config;if(this.config=e,this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var n=e.lastRow,i=t?t.lastRow:-1;if(!t||i<e.firstRow)return this.update(e);if(n<t.firstRow)return this.update(e);if(!t||t.lastRow<e.firstRow)return this.update(e);if(e.lastRow<t.firstRow)return this.update(e);if(t.firstRow<e.firstRow)for(var r=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);0<r;r--)this.$lines.shift();if(t.lastRow>e.lastRow)for(r=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);0<r;r--)this.$lines.pop();e.firstRow<t.firstRow&&this.$lines.unshift(this.$renderLinesFragment(e,e.firstRow,t.firstRow-1)),e.lastRow>t.lastRow&&this.$lines.push(this.$renderLinesFragment(e,t.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},l.prototype.$renderLinesFragment=function(e,t,n){for(var i=[],o=t,s=this.session.getNextFoldLine(o),a=s?s.start.row:1/0;a<o&&(o=s.end.row+1,a=(s=this.session.getNextFoldLine(o,s))?s.start.row:1/0),!(n<o);){var l=this.$lines.createCell(o,e,this.session),c=l.element;this.dom.removeChildren(c),r.setStyle(c.style,"height",this.$lines.computeLineHeight(o,e,this.session)+"px"),r.setStyle(c.style,"top",this.$lines.computeLineTop(o,e,this.session)+"px"),this.$renderLine(c,o,o==a&&s),this.$useLineGroups()?c.className="ace_line_group":c.className="ace_line",i.push(l),o++}return i},l.prototype.update=function(e){this.$lines.moveContainer(e);for(var t=(this.config=e).firstRow,n=e.lastRow,i=this.$lines;i.getLength();)i.pop();i.push(this.$renderLinesFragment(e,t,n))},l.prototype.$renderToken=function(e,t,n,i){for(var r,s,a=this,l=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,c=this.dom.createFragment(this.element),u=0;r=l.exec(i);){var h,d,p=r[1],g=r[2],f=r[3],m=r[4],v=r[5];!a.showSpaces&&g||(h=u!=r.index?i.slice(u,r.index):"",u=r.index+r[0].length,h&&c.appendChild(this.dom.createTextNode(h,this.element)),p?(h=a.session.getScreenTabSize(t+r.index),c.appendChild(a.$tabStrings[h].cloneNode(!0)),t+=h-1):g?a.showSpaces?((d=this.dom.createElement("span")).className="ace_invisible ace_invisible_space",d.textContent=o.stringRepeat(a.SPACE_CHAR,g.length),c.appendChild(d)):c.appendChild(this.com.createTextNode(g,this.element)):f?((d=this.dom.createElement("span")).className="ace_invisible ace_invisible_space ace_invalid",d.textContent=o.stringRepeat(a.SPACE_CHAR,f.length),c.appendChild(d)):m?(t+=1,(d=this.dom.createElement("span")).style.width=2*a.config.characterWidth+"px",d.className=a.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",d.textContent=a.showSpaces?a.SPACE_CHAR:m,c.appendChild(d)):v&&(t+=1,(d=this.dom.createElement("span")).style.width=2*a.config.characterWidth+"px",d.className="ace_cjk",d.textContent=v,c.appendChild(d)))}return c.appendChild(this.dom.createTextNode(u?i.slice(u):i,this.element)),this.$textToken[n.type]?e.appendChild(c):(s="ace_"+n.type.replace(/\./g," ace_"),d=this.dom.createElement("span"),"fold"==n.type&&(d.style.width=n.value.length*this.config.characterWidth+"px",d.setAttribute("title","Unfold code")),d.className=s,d.appendChild(c),e.appendChild(d)),t+i.length},l.prototype.renderIndentGuide=function(e,t,n){var i=t.search(this.$indentGuideRe);if(!(i<=0||n<=i)){if(" "==t[0]){for(var r=(i-=i%this.tabSize)/this.tabSize,o=0;o<r;o++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),t.substr(i)}if("\t"==t[0]){for(o=0;o<i;o++)e.appendChild(this.$tabStrings["\t"].cloneNode(!0));return this.$highlightIndentGuide(),t.substr(i)}this.$highlightIndentGuide()}return t},l.prototype.$highlightIndentGuide=function(){if(this.$highlightIndentGuides&&this.displayIndentGuides){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var e=this.session.doc.$lines;if(e){var t=this.session.selection.getCursor(),n=/^\s*/.exec(this.session.doc.getLine(t.row))[0].length,i=Math.floor(n/this.tabSize);if(this.$highlightIndentGuideMarker={indentLevel:i,start:t.row},this.session.$bracketHighlight)for(var r=this.session.$bracketHighlight.ranges,o=0;o<r.length;o++)if(t.row!==r[o].start.row){this.$highlightIndentGuideMarker.end=r[o].start.row,t.row>r[o].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}if(!this.$highlightIndentGuideMarker.end&&""!==e[t.row]&&t.column===e[t.row].length)for(this.$highlightIndentGuideMarker.dir=1,o=t.row+1;o<e.length;o++){var s=e[o],a=/^\s*/.exec(s)[0].length;if(""!==s&&(this.$highlightIndentGuideMarker.end=o,a<=n))break}this.$renderHighlightIndentGuide()}}},l.prototype.$clearActiveIndentGuide=function(){for(var e=this.$lines.cells,t=0;t<e.length;t++){var n=e[t].element.childNodes;if(0<n.length)for(var i=0;i<n.length;i++)if(n[i].classList&&n[i].classList.contains("ace_indent-guide-active")){n[i].classList.remove("ace_indent-guide-active");break}}},l.prototype.$setIndentGuideActive=function(e,t){""!==this.session.doc.getLine(e.row)&&(e=e.element.childNodes)&&(e=e[t-1])&&e.classList&&e.classList.contains("ace_indent-guide")&&e.classList.add("ace_indent-guide-active")},l.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var e=this.$lines.cells,t=(this.$clearActiveIndentGuide(),this.$highlightIndentGuideMarker.indentLevel);if(0!==t)if(1===this.$highlightIndentGuideMarker.dir)for(var n=0;n<e.length;n++){var i=e[n];if(this.$highlightIndentGuideMarker.end&&i.row>=this.$highlightIndentGuideMarker.start+1){if(i.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(i,t)}}else for(n=e.length-1;0<=n;n--)if(i=e[n],this.$highlightIndentGuideMarker.end&&i.row<this.$highlightIndentGuideMarker.start){if(i.row<=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(i,t)}}},l.prototype.$createLineElement=function(e){var t=this.dom.createElement("div");return t.className="ace_line",t.style.height=this.config.lineHeight+"px",t},l.prototype.$renderWrappedLine=function(e,t,n){var i=0,r=0,s=n[0],a=0,l=this.$createLineElement();e.appendChild(l);for(var c=0;c<t.length;c++){var u=t[c],h=u.value;if(0==c&&this.displayIndentGuides){if(i=h.length,!(h=this.renderIndentGuide(l,h,s)))continue;i-=h.length}if(i+h.length<s)a=this.$renderToken(l,a,u,h),i+=h.length;else{for(;i+h.length>=s;)a=this.$renderToken(l,a,u,h.substring(0,s-i)),h=h.substring(s-i),i=s,l=this.$createLineElement(),e.appendChild(l),l.appendChild(this.dom.createTextNode(o.stringRepeat("\xa0",n.indent),this.element)),a=0,s=n[++r]||Number.MAX_VALUE;0!=h.length&&(i+=h.length,a=this.$renderToken(l,a,u,h))}}n[n.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(l,a,null,"",!0)},l.prototype.$renderSimpleLine=function(e,t){for(var n=0,i=0;i<t.length;i++){var r=t[i],o=r.value;if(0!=i||!this.displayIndentGuides||(o=this.renderIndentGuide(e,o))){if(n+o.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,n,r,o);n=this.$renderToken(e,n,r,o)}}},l.prototype.$renderOverflowMessage=function(e,t,n,i,r){n&&this.$renderToken(e,t,n,i.slice(0,this.MAX_LINE_LENGTH-t)),(n=this.dom.createElement("span")).className="ace_inline_button ace_keyword ace_toggle_wrap",n.textContent=r?"<hide>":"<click to see more...>",e.appendChild(n)},l.prototype.$renderLine=function(e,t,n){var i,r,o=e;(i=(n=n||0==n?n:this.session.getFoldLine(t))?this.$getFoldLineTokens(t,n):this.session.getTokens(t)).length?(r=this.session.getRowSplitData(t))&&r.length?(this.$renderWrappedLine(e,i,r),o=e.lastChild):(o=e,this.$useLineGroups()&&(o=this.$createLineElement(),e.appendChild(o)),this.$renderSimpleLine(o,i)):this.$useLineGroups()&&(o=this.$createLineElement(),e.appendChild(o)),this.showEOL&&o&&(n&&(t=n.end.row),(r=this.dom.createElement("span")).className="ace_invisible ace_invisible_eol",r.textContent=t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,o.appendChild(r))},l.prototype.$getFoldLineTokens=function(e,t){var n=this.session,i=[],r=n.getTokens(e);return t.walk((function(e,t,o,s,a){if(null!=e)i.push({type:"fold",value:e});else if((r=a?n.getTokens(t):r).length){for(var l,c=r,u=s,h=o,d=0,p=0;p+c[d].value.length<u;)if(p+=c[d].value.length,++d==c.length)return;for(p!=u&&((l=c[d].value.substring(u-p)).length>h-u&&(l=l.substring(0,h-u)),i.push({type:c[d].type,value:l}),p=u+l.length,d+=1);p<h&&d<c.length;)(l=c[d].value).length+p>h?i.push({type:c[d].type,value:l.substring(0,h-p)}):i.push(c[d]),p+=l.length,d+=1}}),t.end.row,this.session.getLine(t.end.row).length),i},l.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},l);function l(e){this.dom=r,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new s(this.element)}a.prototype.$textToken={text:!0,rparen:!0,lparen:!0},a.prototype.EOF_CHAR="\xb6",a.prototype.EOL_CHAR_LF="\xac",a.prototype.EOL_CHAR_CRLF="\xa4",a.prototype.EOL_CHAR=a.prototype.EOL_CHAR_LF,a.prototype.TAB_CHAR="\u2014",a.prototype.SPACE_CHAR="\xb7",a.prototype.$padding=0,a.prototype.MAX_LINE_LENGTH=1e4,a.prototype.showInvisibles=!1,a.prototype.showSpaces=!1,a.prototype.showTabs=!1,a.prototype.showEOL=!1,a.prototype.displayIndentGuides=!0,a.prototype.$highlightIndentGuides=!0,a.prototype.$tabStrings=[],a.prototype.destroy={},a.prototype.onChangeTabSize=a.prototype.$computeTabString,i.implement(a.prototype,e),t.Text=a})),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var i=e("../lib/dom");function r(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),i.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}r.prototype.$updateOpacity=function(e){for(var t=this.cursors,n=t.length;n--;)i.setStyle(t[n].style,"opacity",e?"":"0")},r.prototype.$startCssAnimation=function(){for(var e=this.cursors,t=e.length;t--;)e[t].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&i.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},r.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,i.removeCssClass(this.element,"ace_animate-blinking")},r.prototype.setPadding=function(e){this.$padding=e},r.prototype.setSession=function(e){this.session=e},r.prototype.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},r.prototype.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},r.prototype.setSmoothBlinking=function(e){e!=this.smoothBlinking&&(this.smoothBlinking=e,i.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.restartTimer())},r.prototype.addCursor=function(){var e=i.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},r.prototype.removeCursor=function(){var e;if(1<this.cursors.length)return(e=this.cursors.pop()).parentNode.removeChild(e),e},r.prototype.hideCursor=function(){this.isVisible=!1,i.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},r.prototype.showCursor=function(){this.isVisible=!0,i.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},r.prototype.restartTimer=function(){var e,t=this.$updateCursors;clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,i.removeCssClass(this.element,"ace_smooth-blinking")),t(!0),this.isBlinking&&this.blinkInterval&&this.isVisible?(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&i.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),i.HAS_CSS_ANIMATION?this.$startCssAnimation():(e=function(){this.timeoutId=setTimeout((function(){t(!1)}),.6*this.blinkInterval)}.bind(this),this.intervalId=setInterval((function(){t(!0),e()}),this.blinkInterval),e())):this.$stopCssAnimation()},r.prototype.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e=e||this.session.selection.getCursor();var n=this.session.documentToScreenPosition(e);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,e.row)?this.session.$bidiHandler.getPosLeft(n.column):n.column*this.config.characterWidth),top:(n.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight}},r.prototype.isCursorInView=function(e,t){return 0<=e.top&&e.top<t.maxHeight},r.prototype.update=function(e){this.config=e;for(var t=this.session.$selectionMarkers,n=0,r=0,o=(n=0,(t=void 0!==t&&0!==t.length?t:[{cursor:null}]).length);n<o;n++){var s,a,l=this.getPixelPosition(t[n].cursor,!0);(l.top>e.height+e.offset||l.top<0)&&1<n||(a=(s=this.cursors[r++]||this.addCursor()).style,this.drawCursor?this.drawCursor(s,l,e,t[n],this.session):this.isCursorInView(l,e)?(i.setStyle(a,"display","block"),i.translate(s,l.left,l.top),i.setStyle(a,"width",Math.round(e.characterWidth)+"px"),i.setStyle(a,"height",e.lineHeight+"px")):i.setStyle(a,"display","none"))}for(;this.cursors.length>r;)this.removeCursor();var c=this.session.getOverwrite();this.$setOverwrite(c),this.$pixelPos=l,this.restartTimer()},r.prototype.$setOverwrite=function(e){e!=this.overwrite&&((this.overwrite=e)?i.addCssClass(this.element,"ace_overwrite-cursors"):i.removeCssClass(this.element,"ace_overwrite-cursors"))},r.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},(e=r).prototype.$padding=0,e.prototype.drawCursor=null,t.Cursor=e})),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(e,t,n){"use strict";var i,r,o,s=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}))(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=e("./lib/oop"),l=e("./lib/dom"),c=e("./lib/event"),u=(e=e("./lib/event_emitter").EventEmitter,h.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},h);function h(e,t){this.element=l.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+t,this.inner=l.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent="\xa0",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,c.addListener(this.element,"scroll",this.onScroll.bind(this)),c.addListener(this.element,"mousedown",c.preventDefault)}function d(e,t){var n=r.call(this,e,"-v")||this;return n.scrollTop=0,n.scrollHeight=0,t.$scrollbarWidth=n.width=l.scrollbarWidth(e.ownerDocument),n.inner.style.width=n.element.style.width=(n.width||15)+5+"px",n.$minWidth=0,n}function p(e,t){return(e=o.call(this,e,"-h")||this).scrollLeft=0,e.height=t.$scrollbarWidth,e.inner.style.height=e.element.style.height=(e.height||15)+5+"px",e}a.implement(u.prototype,e),s(d,r=u),d.prototype.onScroll=function(){var e;this.skipEvent||(this.scrollTop=this.element.scrollTop,1!=this.coeff&&(e=this.element.clientHeight/this.scrollHeight,this.scrollTop=this.scrollTop*(1-e)/(this.coeff-e)),this._emit("scroll",{data:this.scrollTop})),this.skipEvent=!1},d.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},d.prototype.setHeight=function(e){this.element.style.height=e+"px"},d.prototype.setScrollHeight=function(e){32768<(this.scrollHeight=e)?(this.coeff=32768/e,e=32768):1!=this.coeff&&(this.coeff=1),this.inner.style.height=e+"px"},d.prototype.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)},(a=d).prototype.setInnerHeight=a.prototype.setScrollHeight,s(p,o=u),p.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},p.prototype.getHeight=function(){return this.isVisible?this.height:0},p.prototype.setWidth=function(e){this.element.style.width=e+"px"},p.prototype.setInnerWidth=function(e){this.inner.style.width=e+"px"},p.prototype.setScrollWidth=function(e){this.inner.style.width=e+"px"},p.prototype.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)},e=p,t.ScrollBar=a,t.ScrollBarV=a,t.ScrollBarH=e,t.VScrollBar=a,t.HScrollBar=e})),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(e,t,n){"use strict";var i,r,o,s=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}))(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=e("./lib/oop"),l=e("./lib/dom"),c=e("./lib/event"),u=(e=e("./lib/event_emitter").EventEmitter,l.importCssString(".ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{\n position: absolute;\n background: rgba(128, 128, 128, 0.6);\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n border: 1px solid #bbb;\n border-radius: 2px;\n z-index: 8;\n}\n.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {\n position: absolute;\n z-index: 6;\n background: none;\n overflow: hidden!important;\n}\n.ace_editor>.ace_sb-v {\n z-index: 6;\n right: 0;\n top: 0;\n width: 12px;\n}\n.ace_editor>.ace_sb-v div {\n z-index: 8;\n right: 0;\n width: 100%;\n}\n.ace_editor>.ace_sb-h {\n bottom: 0;\n left: 0;\n height: 12px;\n}\n.ace_editor>.ace_sb-h div {\n bottom: 0;\n height: 100%;\n}\n.ace_editor>.ace_sb_grabbed {\n z-index: 8;\n background: #000;\n}","ace_scrollbar.css",!1),h.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},h);function h(e,t){this.element=l.createElement("div"),this.element.className="ace_sb"+t,this.inner=l.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,c.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}function d(e,t){var n=r.call(this,e,"-v")||this;return n.scrollTop=0,n.scrollHeight=0,n.parent=e,n.width=n.VScrollWidth,n.renderer=t,n.inner.style.width=n.element.style.width=(n.width||15)+"px",n.$minWidth=0,n}function p(e,t){return(e=o.call(this,e,"-h")||this).scrollLeft=0,e.scrollWidth=0,e.height=e.HScrollHeight,e.inner.style.height=e.element.style.height=(e.height||12)+"px",e.renderer=t,e}a.implement(u.prototype,e),s(d,r=u),d.prototype.onMouseDown=function(e,t){var n,i,r,o,s;if("mousedown"===e&&0===c.getButton(t)&&2!==t.detail)return t.target===this.inner?(n=this,i=t.clientY,r=t.clientY,o=this.thumbTop,c.capture(this.inner,(function(e){i=e.clientY}),(function(){clearInterval(s)})),s=setInterval((function(){var e;void 0!==i&&(e=n.scrollTopFromThumbTop(o+i-r))!==n.scrollTop&&n._emit("scroll",{data:e})}),20)):(e=t.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2,this._emit("scroll",{data:this.scrollTopFromThumbTop(e)})),c.preventDefault(t)},d.prototype.getHeight=function(){return this.height},d.prototype.scrollTopFromThumbTop=function(e){return e=e*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight),(e>>=0)<0?e=0:e>this.pageHeight-this.viewHeight&&(e=this.pageHeight-this.viewHeight),e},d.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},d.prototype.setHeight=function(e){this.height=Math.max(0,e),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},d.prototype.setScrollHeight=function(e,t){(this.pageHeight!==e||t)&&(this.pageHeight=e,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight)&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop}))},d.prototype.setScrollTop=function(e){this.scrollTop=e,this.thumbTop=(e=e<0?0:e)*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},(a=d).prototype.setInnerHeight=a.prototype.setScrollHeight,s(p,o=u),p.prototype.onMouseDown=function(e,t){var n,i,r,o,s;if("mousedown"===e&&0===c.getButton(t)&&2!==t.detail)return t.target===this.inner?(n=this,i=t.clientX,r=t.clientX,o=this.thumbLeft,c.capture(this.inner,(function(e){i=e.clientX}),(function(){clearInterval(s)})),s=setInterval((function(){var e;void 0!==i&&(e=n.scrollLeftFromThumbLeft(o+i-r))!==n.scrollLeft&&n._emit("scroll",{data:e})}),20)):(e=t.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2,this._emit("scroll",{data:this.scrollLeftFromThumbLeft(e)})),c.preventDefault(t)},p.prototype.getHeight=function(){return this.isVisible?this.height:0},p.prototype.scrollLeftFromThumbLeft=function(e){return e=e*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth),(e>>=0)<0?e=0:e>this.pageWidth-this.viewWidth&&(e=this.pageWidth-this.viewWidth),e},p.prototype.setWidth=function(e){this.width=Math.max(0,e),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},p.prototype.setScrollWidth=function(e,t){(this.pageWidth!==e||t)&&(this.pageWidth=e,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth)&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft}))},p.prototype.setScrollLeft=function(e){this.scrollLeft=e,this.thumbLeft=(e=e<0?0:e)*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},(e=p).prototype.setInnerWidth=e.prototype.setScrollWidth,t.ScrollBar=a,t.ScrollBarV=a,t.ScrollBarH=e,t.VScrollBar=a,t.HScrollBar=e})),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],(function(e,t,n){"use strict";var i=e("./lib/event");function r(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=t||window;var n=this;this._flush=function(e){n.pending=!1;var t=n.changes;t&&(i.blockIdle(100),n.changes=0,n.onRender(t)),n.changes?n.$recursionLimit--<0||n.schedule():n.$recursionLimit=2}}r.prototype.schedule=function(e){this.changes=this.changes|e,this.changes&&!this.pending&&(i.nextFrame(this._flush),this.pending=!0)},r.prototype.clear=function(e){var t=this.changes;return this.changes=0,t},t.RenderLoop=r})),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],(function(e,t,n){var i=e("../lib/oop"),r=e("../lib/dom"),o=e("../lib/lang"),s=e("../lib/event"),a=e("../lib/useragent"),l=(e=e("../lib/event_emitter").EventEmitter,"function"==typeof ResizeObserver),c=(u.prototype.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",a.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},u.prototype.checkForSizeChanges=function(e){var t;!(e=void 0===e?this.$measureSizes():e)||this.$characterSize.width===e.width&&this.$characterSize.height===e.height||(this.$measureNode.style.fontWeight="bold",t=this.$measureSizes(),this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e}))},u.prototype.$addObserver=function(){var e=this;this.$observer=new window.ResizeObserver((function(t){e.checkForSizeChanges()})),this.$observer.observe(this.$measureNode)},u.prototype.$pollSizeChanges=function(){var e;return this.$pollSizeChangesTimer||this.$observer?this.$pollSizeChangesTimer:(e=this).$pollSizeChangesTimer=s.onIdle((function t(){e.checkForSizeChanges(),s.onIdle(t,500)}),500)},u.prototype.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},u.prototype.$measureSizes=function(e){return 0===(e={height:(e||this.$measureNode).clientHeight,width:(e||this.$measureNode).clientWidth/512}).width||0===e.height?null:e},u.prototype.$measureCharWidth=function(e){return this.$main.textContent=o.stringRepeat(e,512),this.$main.getBoundingClientRect().width/512},u.prototype.getCharacterWidth=function(e){var t=this.charSizes[e];return void 0===t?this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width:t},u.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},u.prototype.$getZoom=function(e){return e&&e.parentElement?(window.getComputedStyle(e).zoom||1)*this.$getZoom(e.parentElement):1},u.prototype.$initTransformMeasureNodes=function(){function e(e,t){return["div",{style:"position: absolute;top:"+e+"px;left:"+t+"px;"}]}this.els=r.buildDom([e(0,0),e(200,0),e(0,200),e(200,200)],this.el)},u.prototype.transformCoordinates=function(e,t){function n(e,t,n){var i=e[1]*t[0]-e[0]*t[1];return[(-t[1]*n[0]+t[0]*n[1])/i,(+e[1]*n[0]-e[0]*n[1])/i]}function i(e,t){return[e[0]-t[0],e[1]-t[1]]}function r(e,t){return[e[0]+t[0],e[1]+t[1]]}function o(e,t){return[e*t[0],e*t[1]]}function s(e){return[(e=e.getBoundingClientRect()).left,e.top]}e=e&&o(1/this.$getZoom(this.el),e),this.els||this.$initTransformMeasureNodes();var a,l,c=s(this.els[0]),u=s(this.els[1]),h=s(this.els[2]);return u=o(1+(l=n(i(l=s(this.els[3]),u),i(l,h),i(r(u,h),r(l,c))))[0],i(u,c)),h=o(1+l[1],i(h,c)),t?(a=l[0]*t[0]/200+l[1]*t[1]/200+1,t=r(o(t[0],u),o(t[1],h)),r(o(1/a/200,t),c)):(a=i(e,c),t=n(i(u,o(l[0],a)),i(h,o(l[1],a)),a),o(200,t))},u);function u(e){this.el=r.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=r.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=r.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),this.$measureNode.textContent=o.stringRepeat("X",512),this.$characterSize={width:0,height:0},l?this.$addObserver():this.checkForSizeChanges()}c.prototype.$characterSize={width:0,height:0},i.implement(c.prototype,e),t.FontMetrics=c})),ace.define("ace/css/editor.css",["require","exports","module"],(function(e,t,n){n.exports='\n.ace_br1 {border-top-left-radius : 3px;}\n.ace_br2 {border-top-right-radius : 3px;}\n.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}\n.ace_br4 {border-bottom-right-radius: 3px;}\n.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}\n.ace_br8 {border-bottom-left-radius : 3px;}\n.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n\n\n.ace_editor {\n position: relative;\n overflow: hidden;\n padding: 0;\n font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'Source Code Pro\', \'source-code-pro\', monospace;\n direction: ltr;\n text-align: left;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n\n.ace_scroller {\n position: absolute;\n overflow: hidden;\n top: 0;\n bottom: 0;\n background-color: inherit;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n cursor: text;\n}\n\n.ace_content {\n position: absolute;\n box-sizing: border-box;\n min-width: 100%;\n contain: style size layout;\n font-variant-ligatures: no-common-ligatures;\n}\n\n.ace_keyboard-focus:focus {\n box-shadow: inset 0 0 0 2px #5E9ED6;\n outline: none;\n}\n\n.ace_dragging .ace_scroller:before{\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n content: \'\';\n background: rgba(250, 250, 250, 0.01);\n z-index: 1000;\n}\n.ace_dragging.ace_dark .ace_scroller:before{\n background: rgba(0, 0, 0, 0.01);\n}\n\n.ace_gutter {\n position: absolute;\n overflow : hidden;\n width: auto;\n top: 0;\n bottom: 0;\n left: 0;\n cursor: default;\n z-index: 4;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n contain: style size layout;\n}\n\n.ace_gutter-active-line {\n position: absolute;\n left: 0;\n right: 0;\n}\n\n.ace_scroller.ace_scroll-left:after {\n content: "";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;\n pointer-events: none;\n}\n\n.ace_gutter-cell, .ace_gutter-cell_svg-icons {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n padding-left: 19px;\n padding-right: 6px;\n background-repeat: no-repeat;\n}\n\n.ace_gutter-cell_svg-icons .ace_gutter_annotation {\n margin-left: -14px;\n float: left;\n}\n\n.ace_gutter-cell .ace_gutter_annotation {\n margin-left: -19px;\n float: left;\n}\n\n.ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_info, .ace_icon.ace_info {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n.ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");\n}\n\n.ace_icon_svg.ace_error {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");\n background-color: crimson;\n}\n.ace_icon_svg.ace_warning {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");\n background-color: darkorange;\n}\n.ace_icon_svg.ace_info {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");\n background-color: royalblue;\n}\n\n.ace_icon_svg.ace_error_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");\n background-color: crimson;\n}\n.ace_icon_svg.ace_warning_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");\n background-color: darkorange;\n}\n\n.ace_scrollbar {\n contain: strict;\n position: absolute;\n right: 0;\n bottom: 0;\n z-index: 6;\n}\n\n.ace_scrollbar-inner {\n position: absolute;\n cursor: text;\n left: 0;\n top: 0;\n}\n\n.ace_scrollbar-v{\n overflow-x: hidden;\n overflow-y: scroll;\n top: 0;\n}\n\n.ace_scrollbar-h {\n overflow-x: scroll;\n overflow-y: hidden;\n left: 0;\n}\n\n.ace_print-margin {\n position: absolute;\n height: 100%;\n}\n\n.ace_text-input {\n position: absolute;\n z-index: 0;\n width: 0.5em;\n height: 1em;\n opacity: 0;\n background: transparent;\n -moz-appearance: none;\n appearance: none;\n border: none;\n resize: none;\n outline: none;\n overflow: hidden;\n font: inherit;\n padding: 0 1px;\n margin: 0 -1px;\n contain: strict;\n -ms-user-select: text;\n -moz-user-select: text;\n -webkit-user-select: text;\n user-select: text;\n /*with `pre-line` chrome inserts instead of space*/\n white-space: pre!important;\n}\n.ace_text-input.ace_composition {\n background: transparent;\n color: inherit;\n z-index: 1000;\n opacity: 1;\n}\n.ace_composition_placeholder { color: transparent }\n.ace_composition_marker { \n border-bottom: 1px solid;\n position: absolute;\n border-radius: 0;\n margin-top: 1px;\n}\n\n[ace_nocontext=true] {\n transform: none!important;\n filter: none!important;\n clip-path: none!important;\n mask : none!important;\n contain: none!important;\n perspective: none!important;\n mix-blend-mode: initial!important;\n z-index: auto;\n}\n\n.ace_layer {\n z-index: 1;\n position: absolute;\n overflow: hidden;\n /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/\n word-wrap: normal;\n white-space: pre;\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n /* setting pointer-events: auto; on node under the mouse, which changes\n during scroll, will break mouse wheel scrolling in Safari */\n pointer-events: none;\n}\n\n.ace_gutter-layer {\n position: relative;\n width: auto;\n text-align: right;\n pointer-events: auto;\n height: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer {\n font: inherit !important;\n position: absolute;\n height: 1000000px;\n width: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {\n contain: style size layout;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n}\n\n.ace_hidpi .ace_text-layer,\n.ace_hidpi .ace_gutter-layer,\n.ace_hidpi .ace_content,\n.ace_hidpi .ace_gutter {\n contain: strict;\n}\n.ace_hidpi .ace_text-layer > .ace_line, \n.ace_hidpi .ace_text-layer > .ace_line_group {\n contain: strict;\n}\n\n.ace_cjk {\n display: inline-block;\n text-align: center;\n}\n\n.ace_cursor-layer {\n z-index: 4;\n}\n\n.ace_cursor {\n z-index: 4;\n position: absolute;\n box-sizing: border-box;\n border-left: 2px solid;\n /* workaround for smooth cursor repaintng whole screen in chrome */\n transform: translatez(0);\n}\n\n.ace_multiselect .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_slim-cursors .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_overwrite-cursors .ace_cursor {\n border-left-width: 0;\n border-bottom: 1px solid;\n}\n\n.ace_hidden-cursors .ace_cursor {\n opacity: 0.2;\n}\n\n.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {\n opacity: 0;\n}\n\n.ace_smooth-blinking .ace_cursor {\n transition: opacity 0.18s;\n}\n\n.ace_animate-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: step-end;\n animation-name: blink-ace-animate;\n animation-iteration-count: infinite;\n}\n\n.ace_animate-blinking.ace_smooth-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: ease-in-out;\n animation-name: blink-ace-animate-smooth;\n}\n \n@keyframes blink-ace-animate {\n from, to { opacity: 1; }\n 60% { opacity: 0; }\n}\n\n@keyframes blink-ace-animate-smooth {\n from, to { opacity: 1; }\n 45% { opacity: 1; }\n 60% { opacity: 0; }\n 85% { opacity: 0; }\n}\n\n.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\n position: absolute;\n z-index: 3;\n}\n\n.ace_marker-layer .ace_selection {\n position: absolute;\n z-index: 5;\n}\n\n.ace_marker-layer .ace_bracket {\n position: absolute;\n z-index: 6;\n}\n\n.ace_marker-layer .ace_error_bracket {\n position: absolute;\n border-bottom: 1px solid #DE5555;\n border-radius: 0;\n}\n\n.ace_marker-layer .ace_active-line {\n position: absolute;\n z-index: 2;\n}\n\n.ace_marker-layer .ace_selected-word {\n position: absolute;\n z-index: 4;\n box-sizing: border-box;\n}\n\n.ace_line .ace_fold {\n box-sizing: border-box;\n\n display: inline-block;\n height: 11px;\n margin-top: -2px;\n vertical-align: middle;\n\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");\n background-repeat: no-repeat, repeat-x;\n background-position: center center, top left;\n color: transparent;\n\n border: 1px solid black;\n border-radius: 2px;\n\n cursor: pointer;\n pointer-events: auto;\n}\n\n.ace_dark .ace_fold {\n}\n\n.ace_fold:hover{\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");\n}\n\n.ace_tooltip {\n background-color: #f5f5f5;\n border: 1px solid gray;\n border-radius: 1px;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\n color: black;\n max-width: 100%;\n padding: 3px 4px;\n position: fixed;\n z-index: 999999;\n box-sizing: border-box;\n cursor: default;\n white-space: pre;\n word-wrap: break-word;\n line-height: normal;\n font-style: normal;\n font-weight: normal;\n letter-spacing: normal;\n pointer-events: none;\n}\n\n.ace_tooltip.ace_dark {\n background-color: #636363;\n color: #fff;\n}\n\n.ace_tooltip:focus {\n outline: 1px solid #5E9ED6;\n}\n\n.ace_icon {\n display: inline-block;\n width: 18px;\n vertical-align: top;\n}\n\n.ace_icon_svg {\n display: inline-block;\n width: 12px;\n vertical-align: top;\n -webkit-mask-repeat: no-repeat;\n -webkit-mask-size: 12px;\n -webkit-mask-position: center;\n}\n\n.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {\n padding-right: 13px;\n}\n\n.ace_fold-widget {\n box-sizing: border-box;\n\n margin: 0 -12px 0 1px;\n display: none;\n width: 11px;\n vertical-align: top;\n\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: center;\n\n border-radius: 3px;\n \n border: 1px solid transparent;\n cursor: pointer;\n}\n\n.ace_folding-enabled .ace_fold-widget {\n display: inline-block; \n}\n\n.ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");\n}\n\n.ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");\n}\n\n.ace_fold-widget:hover {\n border: 1px solid rgba(0, 0, 0, 0.3);\n background-color: rgba(255, 255, 255, 0.2);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\n}\n\n.ace_fold-widget:active {\n border: 1px solid rgba(0, 0, 0, 0.4);\n background-color: rgba(0, 0, 0, 0.05);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\n}\n/**\n * Dark version for fold widgets\n */\n.ace_dark .ace_fold-widget {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");\n}\n.ace_dark .ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget:hover {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n background-color: rgba(255, 255, 255, 0.1);\n}\n.ace_dark .ace_fold-widget:active {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n}\n\n.ace_inline_button {\n border: 1px solid lightgray;\n display: inline-block;\n margin: -1px 8px;\n padding: 0 5px;\n pointer-events: auto;\n cursor: pointer;\n}\n.ace_inline_button:hover {\n border-color: gray;\n background: rgba(200,200,200,0.2);\n display: inline-block;\n pointer-events: auto;\n}\n\n.ace_fold-widget.ace_invalid {\n background-color: #FFB4B4;\n border-color: #DE5555;\n}\n\n.ace_fade-fold-widgets .ace_fold-widget {\n transition: opacity 0.4s ease 0.05s;\n opacity: 0;\n}\n\n.ace_fade-fold-widgets:hover .ace_fold-widget {\n transition: opacity 0.05s ease 0.05s;\n opacity:1;\n}\n\n.ace_underline {\n text-decoration: underline;\n}\n\n.ace_bold {\n font-weight: bold;\n}\n\n.ace_nobold .ace_bold {\n font-weight: normal;\n}\n\n.ace_italic {\n font-style: italic;\n}\n\n\n.ace_error-marker {\n background-color: rgba(255, 0, 0,0.2);\n position: absolute;\n z-index: 9;\n}\n\n.ace_highlight-marker {\n background-color: rgba(255, 255, 0,0.2);\n position: absolute;\n z-index: 8;\n}\n\n.ace_mobile-menu {\n position: absolute;\n line-height: 1.5;\n border-radius: 4px;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n background: white;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #dcdcdc;\n color: black;\n}\n.ace_dark > .ace_mobile-menu {\n background: #333;\n color: #ccc;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #444;\n\n}\n.ace_mobile-button {\n padding: 2px;\n cursor: pointer;\n overflow: hidden;\n}\n.ace_mobile-button:hover {\n background-color: #eee;\n opacity:1;\n}\n.ace_mobile-button:active {\n background-color: #ddd;\n}\n\n.ace_placeholder {\n font-family: arial;\n transform: scale(0.9);\n transform-origin: left;\n white-space: pre;\n opacity: 0.7;\n margin: 0 10px;\n}\n\n.ace_ghost_text {\n opacity: 0.5;\n font-style: italic;\n white-space: pre;\n}'})),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,n){"use strict";var i=e("../lib/dom"),r=e("../lib/oop"),o=(e=e("../lib/event_emitter").EventEmitter,s.prototype.$updateDecorators=function(e){var t=!0===this.renderer.theme.isDark?this.colors.dark:this.colors.light,n=(e&&(this.maxHeight=e.maxHeight,this.lineHeight=e.lineHeight,this.canvasHeight=e.height,(e.lastRow+1)*this.lineHeight<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight),this.canvas.getContext("2d")),i=this.renderer.session.$annotations;if(n.clearRect(0,0,this.canvas.width,this.canvas.height),i)for(var r={info:1,warning:2,error:3},o=(i.forEach((function(e){e.priority=r[e.type]||null})),i=i.sort((function(e,t){return e.priority<t.priority?-1:e.priority>t.priority?1:0})),this.renderer.session.$foldData),s=0;s<i.length;s++){var a,l=i[s].row,c=this.compensateFoldRows(l,o),u=Math.round((l-c)*this.lineHeight*this.heightRatio),h=Math.round((l-c)*this.lineHeight*this.heightRatio);(l=Math.round(((l-c)*this.lineHeight+this.lineHeight)*this.heightRatio))-h<this.minDecorationHeight&&((a=(h+l)/2|0)<this.halfMinDecorationHeight?a=this.halfMinDecorationHeight:a+this.halfMinDecorationHeight>this.canvasHeight&&(a=this.canvasHeight-this.halfMinDecorationHeight),h=Math.round(a-this.halfMinDecorationHeight),l=Math.round(a+this.halfMinDecorationHeight)),n.fillStyle=t[i[s].type]||null,n.fillRect(0,u,this.canvasWidth,l-h)}(e=this.renderer.session.selection.getCursor())&&(c=this.compensateFoldRows(e.row,o),u=Math.round((e.row-c)*this.lineHeight*this.heightRatio),n.fillStyle="rgba(0, 0, 0, 0.5)",n.fillRect(0,u,this.canvasWidth,2))},s.prototype.compensateFoldRows=function(e,t){var n=0;if(t&&0<t.length)for(var i=0;i<t.length;i++)e>t[i].start.row&&e<t[i].end.row?n+=e-t[i].start.row:e>=t[i].end.row&&(n+=t[i].end.row-t[i].start.row);return n},s);function s(e,t){this.canvas=i.createElement("canvas"),this.renderer=t,this.pixelRatio=1,this.maxHeight=t.layerConfig.maxHeight,this.lineHeight=t.layerConfig.lineHeight,this.canvasHeight=e.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=e.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},e.element.appendChild(this.canvas)}r.implement(o.prototype,e),t.Decorator=o})),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor.css","ace/layer/decorators","ace/lib/useragent"],(function(e,t,n){"use strict";var i=e("./lib/oop"),r=e("./lib/dom"),o=e("./lib/lang"),s=e("./config"),a=e("./layer/gutter").Gutter,l=e("./layer/marker").Marker,c=e("./layer/text").Text,u=e("./layer/cursor").Cursor,h=e("./scrollbar").HScrollBar,d=e("./scrollbar").VScrollBar,p=e("./scrollbar_custom").HScrollBar,g=e("./scrollbar_custom").VScrollBar,f=e("./renderloop").RenderLoop,m=e("./layer/font_metrics").FontMetrics,v=e("./lib/event_emitter").EventEmitter,y=e("./css/editor.css"),C=e("./layer/decorators").Decorator,b=e("./lib/useragent");function I(e,t){var n=this;this.container=e||r.createElement("div"),r.addCssClass(this.container,"ace_editor"),r.HI_DPI&&r.addCssClass(this.container,"ace_hidpi"),this.setTheme(t),null==s.get("useStrictCSP")&&s.set("useStrictCSP",!1),this.$gutter=r.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=r.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=r.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new a(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new l(this.content),e=this.$textLayer=new c(this.content),this.canvas=e.element,this.$markerFront=new l(this.content),this.$cursorLayer=new u(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new d(this.container,this),this.scrollBarH=new h(this.container,this),this.scrollBarV.on("scroll",(function(e){n.$scrollAnimation||n.session.setScrollTop(e.data-n.scrollMargin.top)})),this.scrollBarH.on("scroll",(function(e){n.$scrollAnimation||n.session.setScrollLeft(e.data-n.scrollMargin.left)})),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new m(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",(function(e){n.updateCharacterSize(),n.onResize(!0,n.gutterWidth,n.$size.width,n.$size.height),n._signal("changeCharacterSize",e)})),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!b.isIOS,this.$loop=new f(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),s.resetOptions(this),s._signal("renderer",this)}r.importCssString(y,"ace_editor.css",!1),I.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),r.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},I.prototype.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),(this.session=e)&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),e&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},I.prototype.updateLines=function(e,t,n){if(void 0===t&&(t=1/0),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRow<t&&(this.$changedLines.lastRow=t)):this.$changedLines={firstRow:e,lastRow:t},this.$changedLines.lastRow<this.layerConfig.firstRow){if(!n)return;this.$changedLines.lastRow=this.layerConfig.lastRow}this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},I.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},I.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},I.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},I.prototype.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},I.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},I.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},I.prototype.onResize=function(e,t,n,i){if(!(2<this.resizing)){0<this.resizing?this.resizing++:this.resizing=e?1:0;var r=this.container;if(i=i||r.clientHeight||r.scrollHeight,n=n||r.clientWidth||r.scrollWidth,r=this.$updateCachedSize(e,t,n,i),this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!n&&!i)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(r|this.$changes,!0):this.$loop.schedule(r|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},I.prototype.$updateCachedSize=function(e,t,n,i){i-=this.$extraHeight||0;var o=0,s=this.$size,a={width:s.width,height:s.height,scrollerHeight:s.scrollerHeight,scrollerWidth:s.scrollerWidth};return i&&(e||s.height!=i)&&(s.height=i,o|=this.CHANGE_SIZE,s.scrollerHeight=s.height,this.$horizScroll&&(s.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(s.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",o|=this.CHANGE_SCROLL),n&&(e||s.width!=n)&&(o|=this.CHANGE_SIZE,s.width=n,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,r.setStyle(this.scrollBarH.element.style,"left",t+"px"),r.setStyle(this.scroller.style,"left",t+this.margin.left+"px"),s.scrollerWidth=Math.max(0,n-t-this.scrollBarV.getWidth()-this.margin.h),r.setStyle(this.$gutter.style,"left",this.margin.left+"px"),t=this.scrollBarV.getWidth()+"px",r.setStyle(this.scrollBarH.element.style,"right",t),r.setStyle(this.scroller.style,"right",t),r.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(s.scrollerWidth),this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(o|=this.CHANGE_FULL),s.$dirty=!n||!i,o&&this._signal("resize",a),o},I.prototype.onGutterResize=function(e){(e=this.$showGutter?e:0)!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,e,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()||this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},I.prototype.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-2*this.$padding;return e=Math.floor(e/this.characterWidth),this.session.adjustWrapLimit(e,this.$showPrintMargin&&this.$printMarginColumn)},I.prototype.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},I.prototype.getAnimatedScroll=function(){return this.$animatedScroll},I.prototype.setShowInvisibles=function(e){this.setOption("showInvisibles",e),this.session.$bidiHandler.setShowInvisibles(e)},I.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},I.prototype.getDisplayIndentGuide=function(){return this.getOption("displayIndentGuides")},I.prototype.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},I.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},I.prototype.setHighlightIndentGuides=function(e){this.setOption("highlightIndentGuides",e)},I.prototype.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},I.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},I.prototype.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},I.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},I.prototype.getShowGutter=function(){return this.getOption("showGutter")},I.prototype.setShowGutter=function(e){return this.setOption("showGutter",e)},I.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},I.prototype.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},I.prototype.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},I.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},I.prototype.$updatePrintMargin=function(){var e;(this.$showPrintMargin||this.$printMarginEl)&&(this.$printMarginEl||((e=r.createElement("div")).className="ace_layer ace_print-margin-layer",this.$printMarginEl=r.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)),(e=this.$printMarginEl.style).left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",e.visibility=this.$showPrintMargin?"visible":"hidden",this.session)&&-1==this.session.$wrap&&this.adjustWrapLimit()},I.prototype.getContainerElement=function(){return this.container},I.prototype.getMouseEventTarget=function(){return this.scroller},I.prototype.getTextAreaContainer=function(){return this.container},I.prototype.$moveTextAreaToCursor=function(){var e,t,n,i,o,s,a;this.$isMousePressed||(e=this.textarea.style,s=this.$composition,this.$keepTextAreaAtCursor||s?(n=this.$cursorLayer.$pixelPos)&&(s&&s.markerRange&&(n=this.$cursorLayer.getPixelPosition(s.markerRange.start,!0)),a=this.layerConfig,t=n.top,n=n.left,t-=a.offset,i=s&&s.useTextareaForIME||b.isMobile?this.lineHeight:1,t<0||t>a.height-i?r.translate(this.textarea,0,0):(a=1,o=this.$size.height-i,s?s.useTextareaForIME?(s=this.textarea.value,a=this.characterWidth*this.session.$getStringScreenWidth(s)[0]):t+=this.lineHeight+2:t+=this.lineHeight,(n-=this.scrollLeft)>this.$size.scrollerWidth-a&&(n=this.$size.scrollerWidth-a),n+=this.gutterWidth+this.margin.left,r.setStyle(e,"height",i+"px"),r.setStyle(e,"width",a+"px"),r.translate(this.textarea,Math.min(n,this.$size.scrollerWidth-a),Math.min(t,o)))):r.translate(this.textarea,-100,0))},I.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},I.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},I.prototype.getLastFullyVisibleRow=function(){var e=this.layerConfig,t=e.lastRow;return this.session.documentToScreenRow(t,0)*e.lineHeight-this.session.getScrollTop()>e.height-e.lineHeight?t-1:t},I.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},I.prototype.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},I.prototype.setScrollMargin=function(e,t,n,i){var r=this.scrollMargin;r.top=0|e,r.bottom=0|t,r.right=0|i,r.left=0|n,r.v=r.top+r.bottom,r.h=r.left+r.right,r.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-r.top),this.updateFull()},I.prototype.setMargin=function(e,t,n,i){var r=this.margin;r.top=0|e,r.bottom=0|t,r.right=0|i,r.left=0|n,r.v=r.top+r.bottom,r.h=r.left+r.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},I.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},I.prototype.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},I.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},I.prototype.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},I.prototype.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t)&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},I.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},I.prototype.freeze=function(){this.$frozen=!0},I.prototype.unfreeze=function(){this.$frozen=!1},I.prototype.$renderChanges=function(e,t){if(this.$changes&&(e|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(e||t)){if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);var n,i;this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",e),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics),t=this.layerConfig,(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL)&&(e|=this.$computeLayerConfig()|this.$loop.clear(),t.firstRow!=this.layerConfig.firstRow&&t.firstRowScreen==this.layerConfig.firstRowScreen&&0<(n=this.scrollTop+(t.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight)&&(this.scrollTop=n,e=(e|=this.CHANGE_SCROLL)|this.$computeLayerConfig()|this.$loop.clear()),t=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),r.translate(this.content,-this.scrollLeft,-t.offset),n=t.width+2*this.$padding+"px",i=t.minHeight+"px",r.setStyle(this.content.style,"width",n),r.setStyle(this.content.style,"height",i)),e&this.CHANGE_H_SCROLL&&(r.translate(this.content,-this.scrollLeft,-t.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility)&&(this.scroller.className+=this.keyboardFocusClassName),e&this.CHANGE_FULL?(this.$changedLines=null,this.$textLayer.update(t),this.$showGutter&&this.$gutterLayer.update(t),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(t),this.$markerBack.update(t),this.$markerFront.update(t),this.$cursorLayer.update(t),this.$moveTextAreaToCursor()):e&this.CHANGE_SCROLL?(this.$changedLines=null,e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(t):this.$textLayer.scrollLines(t),this.$showGutter&&(e&this.CHANGE_GUTTER||e&this.CHANGE_LINES?this.$gutterLayer.update(t):this.$gutterLayer.scrollLines(t)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(t),this.$markerBack.update(t),this.$markerFront.update(t),this.$cursorLayer.update(t),this.$moveTextAreaToCursor()):(e&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(t),this.$showGutter&&this.$gutterLayer.update(t),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(t)):e&this.CHANGE_LINES?((this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(t),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(t)):e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(t),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(t)):e&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(t),this.$customScrollbar)&&this.$scrollDecorator.$updateDecorators(t),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(t),this.$moveTextAreaToCursor()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(t),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(t)),this._signal("afterRender",e)}else this.$changes|=e},I.prototype.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,n=Math.min(t,Math.max((this.$minLines||1)*this.lineHeight,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(n+=this.scrollBarH.getHeight()),t=!((n=this.$maxPixelHeight&&n>this.$maxPixelHeight?this.$maxPixelHeight:n)<=2*this.lineHeight)&&t<e,n==this.desiredHeight&&this.$size.height==this.desiredHeight&&t==this.$vScroll||(t!=this.$vScroll&&(this.$vScroll=t,this.scrollBarV.setVisible(t)),e=this.container.clientWidth,this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,e,n),this.desiredHeight=n,this._signal("autosize"))},I.prototype.$computeLayerConfig=function(){var e,t,n=this.session,i=this.$size,r=i.height<=2*this.lineHeight,o=this.session.getScreenLength()*this.lineHeight,s=this.$getLongestLine(),a=!r&&(this.$hScrollBarAlwaysVisible||i.scrollerWidth-s-2*this.$padding<0),l=this.$horizScroll!==a,c=(l&&(this.$horizScroll=a,this.scrollBarH.setVisible(a)),a=this.$vScroll,this.$maxLines&&1<this.lineHeight&&this.$autosize(),i.scrollerHeight+this.lineHeight),u=(o+=t=!this.$maxLines&&this.$scrollPastEnd?(i.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0,this.scrollMargin),h=((t=a!==(this.session.setScrollTop(Math.max(-u.top,Math.min(this.scrollTop,o-i.scrollerHeight+u.bottom))),this.session.setScrollLeft(Math.max(-u.left,Math.min(this.scrollLeft,s+2*this.$padding-i.scrollerWidth+u.right))),r=!r&&(this.$vScrollBarAlwaysVisible||i.scrollerHeight-o+t<0||this.scrollTop>u.top)))&&(this.$vScroll=r,this.scrollBarV.setVisible(r)),u=this.scrollTop%this.lineHeight,a=Math.ceil(c/this.lineHeight)-1,a=(r=Math.max(0,Math.round((this.scrollTop-u)/this.lineHeight)))+a,this.lineHeight),d=(r=n.screenToDocumentRow(r,0),n.getFoldLine(r));return d&&(r=d.start.row),d=n.documentToScreenRow(r,0),e=n.getRowLength(r)*h,a=Math.min(n.screenToDocumentRow(a,0),n.getLength()-1),c=i.scrollerHeight+n.getRowLength(a)*h+e,u=this.scrollTop-d*h,n=0,this.layerConfig.width==s&&!l||(n=this.CHANGE_H_SCROLL),(l||t)&&(n|=this.$updateCachedSize(!0,this.gutterWidth,i.width,i.height),this._signal("scrollbarVisibilityChanged"),t)&&(s=this.$getLongestLine()),this.layerConfig={width:s,padding:this.$padding,firstRow:r,firstRowScreen:d,lastRow:a,lineHeight:h,characterWidth:this.characterWidth,minHeight:c,maxHeight:o,offset:u,gutterOffset:h?Math.max(0,Math.ceil((u+i.height-i.scrollerHeight)/h)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(s-this.$padding),n},I.prototype.$updateLines=function(){if(this.$changedLines){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow,n=(this.$changedLines=null,this.layerConfig);if(!(e>n.lastRow+1||t<n.firstRow)){if(t!==1/0)return this.$textLayer.updateLines(n,e,t),!0;this.$showGutter&&this.$gutterLayer.update(n),this.$textLayer.update(n)}}},I.prototype.$getLongestLine=function(){var e=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(e+=1),this.$textLayer&&e>this.$textLayer.MAX_LINE_LENGTH&&(e=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},I.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},I.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},I.prototype.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},I.prototype.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},I.prototype.updateBreakpoints=function(e){this.$loop.schedule(this.CHANGE_GUTTER)},I.prototype.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},I.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},I.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},I.prototype.showCursor=function(){this.$cursorLayer.showCursor()},I.prototype.scrollSelectionIntoView=function(e,t,n){this.scrollCursorIntoView(e,n),this.scrollCursorIntoView(t,n)},I.prototype.scrollCursorIntoView=function(e,t,n){var i,r,o;0!==this.$size.scrollerHeight&&(i=(e=this.$cursorLayer.getPixelPosition(e)).left,e=e.top,r=n&&n.top||0,n=n&&n.bottom||0,this.$scrollAnimation&&(this.$stopAnimation=!0),e<(o=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop)+r?(t&&o+r>e+this.lineHeight&&(e-=t*this.$size.scrollerHeight),0===e&&(e=-this.scrollMargin.top),this.session.setScrollTop(e)):o+this.$size.scrollerHeight-n<e+this.lineHeight&&(t&&o+this.$size.scrollerHeight-n<e-this.lineHeight&&(e+=t*this.$size.scrollerHeight),this.session.setScrollTop(e+this.lineHeight+n-this.$size.scrollerHeight)),r=this.scrollLeft,i-(o=2*this.layerConfig.characterWidth)<r?((i-=o)<this.$padding+o&&(i=-this.scrollMargin.left),this.session.setScrollLeft(i)):r+this.$size.scrollerWidth<(i+=o)+this.characterWidth?this.session.setScrollLeft(Math.round(i+this.characterWidth-this.$size.scrollerWidth)):r<=this.$padding&&i-r<this.characterWidth&&this.session.setScrollLeft(0))},I.prototype.getScrollTop=function(){return this.session.getScrollTop()},I.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},I.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},I.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},I.prototype.scrollToRow=function(e){this.session.setScrollTop(e*this.lineHeight)},I.prototype.alignCursor=function(e,t){e=this.$cursorLayer.getPixelPosition(e="number"==typeof e?{row:e,column:0}:e);var n=this.$size.scrollerHeight-this.lineHeight;return e=e.top-n*(t||0),this.session.setScrollTop(e),e},I.prototype.$calcSteps=function(e,t){var n,i,r=0,o=this.STEPS,s=[];for(r=0;r<o;++r)s.push((n=r/this.STEPS,(t-(i=e))*(Math.pow(n-1,3)+1)+i));return s},I.prototype.scrollToLine=function(e,t,n,i){e=this.$cursorLayer.getPixelPosition({row:e,column:0}).top,t&&(e-=this.$size.scrollerHeight/2),t=this.scrollTop,this.session.setScrollTop(e),!1!==n&&this.animateScrolling(t,i)},I.prototype.animateScrolling=function(e,t){var n=this.scrollTop;if(this.$animatedScroll){var i=this;if(e!=n){if(this.$scrollAnimation){var r=this.$scrollAnimation.steps;if(r.length&&(e=r[0])==n)return}var o=i.$calcSteps(e,n);this.$scrollAnimation={from:e,to:n,steps:o},clearInterval(this.$timer),i.session.setScrollTop(o.shift()),i.session.$scrollTop=n,this.$timer=setInterval((function(){if(!i.$stopAnimation)return i.session?void(o.length?(i.session.setScrollTop(o.shift()),i.session.$scrollTop=n):null!=n?(i.session.$scrollTop=-1,i.session.setScrollTop(n),n=null):s()):clearInterval(i.$timer);s()}),10)}}function s(){i.$timer=clearInterval(i.$timer),i.$scrollAnimation=null,i.$stopAnimation=!1,t&&t()}},I.prototype.scrollToY=function(e){this.scrollTop!==e&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=e)},I.prototype.scrollToX=function(e){this.scrollLeft!==e&&(this.scrollLeft=e),this.$loop.schedule(this.CHANGE_H_SCROLL)},I.prototype.scrollTo=function(e,t){this.session.setScrollTop(t),this.session.setScrollLeft(e)},I.prototype.scrollBy=function(e,t){t&&this.session.setScrollTop(this.session.getScrollTop()+t),e&&this.session.setScrollLeft(this.session.getScrollLeft()+e)},I.prototype.isScrollableBy=function(e,t){return t<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||0<t&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||0<e&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0},I.prototype.pixelToScreenCoordinates=function(e,t){this.$hasCssTransforms?(i={top:0,left:0},e=(n=this.$fontMetrics.transformCoordinates([e,t]))[1]-this.gutterWidth-this.margin.left,t=n[0]):i=this.scroller.getBoundingClientRect();var n=e+this.scrollLeft-i.left-this.$padding,i=(e=n/this.characterWidth,t=Math.floor((t+this.scrollTop-i.top)/this.lineHeight),this.$blockCursor?Math.floor(e):Math.round(e));return{row:t,column:i,side:0<e-i?1:-1,offsetX:n}},I.prototype.screenToTextCoordinates=function(e,t){this.$hasCssTransforms?(n={top:0,left:0},e=(i=this.$fontMetrics.transformCoordinates([e,t]))[1]-this.gutterWidth-this.margin.left,t=i[0]):n=this.scroller.getBoundingClientRect();var n,i=e+this.scrollLeft-n.left-this.$padding;return e=i/this.characterWidth,e=this.$blockCursor?Math.floor(e):Math.round(e),t=Math.floor((t+this.scrollTop-n.top)/this.lineHeight),this.session.screenToDocumentPosition(t,Math.max(e,0),i)},I.prototype.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect();return t=this.session.documentToScreenPosition(e,t),e=this.$padding+(this.session.$bidiHandler.isBidiRow(t.row,e)?this.session.$bidiHandler.getPosLeft(t.column):Math.round(t.column*this.characterWidth)),t=t.row*this.lineHeight,{pageX:n.left+e-this.scrollLeft,pageY:n.top+t-this.scrollTop}},I.prototype.visualizeFocus=function(){r.addCssClass(this.container,"ace_focus")},I.prototype.visualizeBlur=function(){r.removeCssClass(this.container,"ace_focus")},I.prototype.showComposition=function(e){(this.$composition=e).cssText||(e.cssText=this.textarea.style.cssText),null==e.useTextareaForIME&&(e.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(r.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):e.markerId=this.session.addMarker(e.markerRange,"ace_composition_marker","text")},I.prototype.setCompositionText=function(e){var t=this.session.selection.cursor;this.addToken(e,"composition_placeholder",t.row,t.column),this.$moveTextAreaToCursor()},I.prototype.hideComposition=function(){var e;this.$composition&&(this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),r.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText,e=this.session.selection.cursor,this.removeExtraToken(e.row,e.column),this.$composition=null,this.$cursorLayer.element.style.display="")},I.prototype.setGhostText=function(e,t){var n=this.session.selection.cursor;t=t||{row:n.row,column:n.column},this.removeGhostText(),n=e.split("\n"),this.addToken(n[0],"ghost_text",t.row,t.column),this.$ghostText={text:e,position:{row:t.row,column:t.column}},1<n.length&&(this.$ghostTextWidget={text:n.slice(1).join("\n"),row:t.row,column:t.column,className:"ace_ghost_text"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget))},I.prototype.removeGhostText=function(){var e;this.$ghostText&&(e=this.$ghostText.position,this.removeExtraToken(e.row,e.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null)},I.prototype.addToken=function(e,t,n,i){var r=this.session,o=(r.bgTokenizer.lines[n]=null,{type:t,value:e}),s=r.getTokens(n);if(null!=i&&s.length)for(var a=0,l=0;l<s.length;l++){var c=s[l];if(i<=(a+=c.value.length)){var u=c.value.length-(a-i),h=c.value.slice(0,u);u=c.value.slice(u),s.splice(l,1,{type:c.type,value:h},o,{type:c.type,value:u});break}}else s.push(o);this.updateLines(n,n)},I.prototype.removeExtraToken=function(e,t){this.session.bgTokenizer.lines[e]=null,this.updateLines(e,e)},I.prototype.setTheme=function(e,t){var n,i=this;function o(n){if(i.$themeId!=e)return t&&t();if(!n||!n.cssClass)throw new Error("couldn't load module "+e+" or it didn't call define");n.$id&&(i.$themeId=n.$id),r.importCssString(n.cssText,n.cssClass,i.container),i.theme&&r.removeCssClass(i.container,i.theme.cssClass);var o="padding"in n?n.padding:"padding"in(i.theme||{})?4:i.$padding;i.$padding&&o!=i.$padding&&i.setPadding(o),i.$theme=n.cssClass,i.theme=n,r.addCssClass(i.container,n.cssClass),r.setCssClass(i.container,"ace_dark",n.isDark),i.$size&&(i.$size.width=0,i.$updateSizeAsync()),i._dispatchEvent("themeLoaded",{theme:n}),t&&t()}this.$themeId=e,i._dispatchEvent("themeChange",{theme:e}),e&&"string"!=typeof e?o(e):(n=e||this.$options.theme.initialValue,s.loadModule(["theme",n],o))},I.prototype.getTheme=function(){return this.$themeId},I.prototype.setStyle=function(e,t){r.setCssClass(this.container,e,!1!==t)},I.prototype.unsetStyle=function(e){r.removeCssClass(this.container,e)},I.prototype.setCursorStyle=function(e){r.setStyle(this.scroller.style,"cursor",e)},I.prototype.setMouseCursor=function(e){r.setStyle(this.scroller.style,"cursor",e)},I.prototype.attachToShadowRoot=function(){r.importCssString(y,"ace_editor.css",this.container)},I.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},I.prototype.$updateCustomScrollbar=function(e){var t=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),this.$scrollDecorator&&delete this.$scrollDecorator,!0===e?(this.scrollBarV=new g(this.container,this),this.scrollBarH=new p(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",(function(e){t.$scrollAnimation||t.session.setScrollTop(e.data-t.scrollMargin.top)})),this.scrollBarH.addEventListener("scroll",(function(e){t.$scrollAnimation||t.session.setScrollLeft(e.data-t.scrollMargin.left)})),this.$scrollDecorator=new C(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators()):(this.scrollBarV=new d(this.container,this),this.scrollBarH=new h(this.container,this),this.scrollBarV.addEventListener("scroll",(function(e){t.$scrollAnimation||t.session.setScrollTop(e.data-t.scrollMargin.top)})),this.scrollBarH.addEventListener("scroll",(function(e){t.$scrollAnimation||t.session.setScrollLeft(e.data-t.scrollMargin.left)})))},I.prototype.$addResizeObserver=function(){var e;window.ResizeObserver&&!this.$resizeObserver&&((e=this).$resizeTimer=o.delayedCall((function(){e.destroyed||e.onResize()}),50),this.$resizeObserver=new window.ResizeObserver((function(t){var n=t[0].contentRect.width;t=t[0].contentRect.height,1<Math.abs(e.$size.width-n)||1<Math.abs(e.$size.height-t)?e.$resizeTimer.delay():e.$resizeTimer.cancel()})),this.$resizeObserver.observe(this.container))},(e=I).prototype.CHANGE_CURSOR=1,e.prototype.CHANGE_MARKER=2,e.prototype.CHANGE_GUTTER=4,e.prototype.CHANGE_SCROLL=8,e.prototype.CHANGE_LINES=16,e.prototype.CHANGE_TEXT=32,e.prototype.CHANGE_SIZE=64,e.prototype.CHANGE_MARKER_BACK=128,e.prototype.CHANGE_MARKER_FRONT=256,e.prototype.CHANGE_FULL=512,e.prototype.CHANGE_H_SCROLL=1024,e.prototype.$changes=0,e.prototype.$padding=null,e.prototype.$frozen=!1,e.prototype.STEPS=8,i.implement(e.prototype,v),s.defineOptions(e.prototype,"renderer",{useResizeObserver:{set:function(e){!e&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):e&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(e){this.$textLayer.setShowInvisibles(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(e){"number"==typeof e&&(this.$printMarginColumn=e),this.$showPrintMargin=!!e,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(e){this.$gutter.style.display=e?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(e){this.$gutterLayer.$useSvgGutterIcons=e},initialValue:!1},showFoldedAnnotations:{set:function(e){this.$gutterLayer.$showFoldedAnnotations=e},initialValue:!1},fadeFoldWidgets:{set:function(e){r.setCssClass(this.$gutter,"ace_fade-fold-widgets",e)},initialValue:!1},showFoldWidgets:{set:function(e){this.$gutterLayer.setShowFoldWidgets(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(e){this.$textLayer.setDisplayIndentGuides(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(e){1==this.$textLayer.setHighlightIndentGuides(e)?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(e){this.$gutterLayer.setHighlightGutterLine(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(e){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(e){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(e){"number"==typeof e&&(e+="px"),this.container.style.fontSize=e,this.updateFontSize()},initialValue:12},fontFamily:{set:function(e){this.container.style.fontFamily=e,this.updateFontSize()}},maxLines:{set:function(e){this.updateFull()}},minLines:{set:function(e){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(e){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(e){this.$scrollPastEnd!=(e=+e||0)&&(this.$scrollPastEnd=e,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(e){this.$gutterLayer.$fixedWidth=!!e,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(e){this.$updateCustomScrollbar(e)},initialValue:!1},theme:{set:function(e){this.setTheme(e)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!b.isMobile&&!b.isIE}}),t.VirtualRenderer=e})),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],(function(e,t,n){"use strict";var i=e("../lib/oop"),r=e("../lib/net"),o=e("../lib/event_emitter").EventEmitter,s=e("../config");function a(e){var t;return"undefined"==typeof Worker?{postMessage:function(){},terminate:function(){}}:s.get("loadWorkerFromBlob")?(t=function(t){t="importScripts('"+r.qualifyURL(t)+"');";try{return new Blob([t],{type:"application/javascript"})}catch(e){var n=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder);return n.append(t),n.getBlob("application/javascript")}}(e),t=(window.URL||window.webkitURL).createObjectURL(t),new Worker(t)):new Worker(e)}function l(e){e.postMessage||(e=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=e,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage}(function(){i.implement(this,o),this.$createWorkerFromOldConfig=function(t,n,i,r,o){var l,c;return e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),s.get("packaged")||!e.toUrl?r=r||s.moduleUrl(n,"worker"):(l=this.$normalizePath,r=r||l(e.toUrl("ace/worker/worker.js",null,"_")),c={},t.forEach((function(t){c[t]=l(e.toUrl(t,null,"_").replace(/(\.js)?(\?.*)?$/,""))}))),this.$worker=a(r),o&&this.send("importScripts",o),this.$worker.postMessage({init:!0,tlns:c,module:n,classname:i}),this.$worker},this.onMessage=function(e){var t=e.data;switch(t.type){case"event":this._signal(t.name,{data:t.data});break;case"call":var n=this.callbacks[t.id];n&&(n(t.data),delete this.callbacks[t.id]);break;case"error":this.reportError(t.data);break;case"log":window.console&&console.log&&console.log.apply(console,t.data)}},this.reportError=function(e){window.console&&console.error&&console.error(e)},this.$normalizePath=function(e){return r.qualifyURL(e)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(e,t){this.$worker.postMessage({command:e,args:t})},this.call=function(e,t,n){var i;n&&(i=this.callbackId++,this.callbacks[i]=n,t.push(i)),this.send(e,t)},this.emit=function(e,t){try{t.data&&t.data.err&&(t.data.err={message:t.data.err.message,stack:t.data.err.stack,code:t.data.err.code}),this.$worker&&this.$worker.postMessage({event:e,data:{data:t.data}})}catch(e){console.error(e.stack)}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call("setValue",[e.getValue()]),e.on("change",this.changeListener,!0)},this.changeListener=function(e){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),"insert"==e.action?this.deltaQueue.push(e.start,e.lines):this.deltaQueue.push(e.start,e.end)},this.$sendDeltaQueue=function(){var e=this.deltaQueue;e&&(this.deltaQueue=null,50<e.length&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))}}).call(l.prototype),t.UIWorkerClient=function(e,t,n){var i=null,r=!1,a=Object.create(o),c=[],u=new l({messageBuffer:c,terminate:function(){},postMessage:function(e){c.push(e),i&&(r?setTimeout(h):h())}}),h=(u.setEmitSync=function(e){r=e},function(){var e=c.shift();e.command?i[e.command].apply(i,e.args):e.event&&a._signal(e.event,e.data)});return a.postMessage=function(e){u.onMessage({data:e})},a.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},a.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},s.loadModule(["worker",t],(function(e){for(i=new e[n](a);c.length;)h()})),u},t.WorkerClient=l,t.createWorker=a})),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],(function(e,t,n){"use strict";var i=e("./range").Range,r=e("./lib/event_emitter").EventEmitter,o=(e=e("./lib/oop"),s.prototype.setup=function(){var e=this,t=this.doc,n=this.session,r=(this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column),this.pos);r.$insertRight=!0,r.detach(),r.markerId=n.addMarker(new i(r.row,r.column,r.row,r.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach((function(n){(n=t.createAnchor(n.row,n.column)).$insertRight=!0,n.detach(),e.others.push(n)})),n.setUndoSelect(!1)},s.prototype.showOtherMarkers=function(){var e,t;this.othersActive||(e=this.session,(t=this).othersActive=!0,this.others.forEach((function(n){n.markerId=e.addMarker(new i(n.row,n.column,n.row,n.column+t.length),t.othersClass,null,!1)})))},s.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e<this.others.length;e++)this.session.removeMarker(this.others[e].markerId)}},s.prototype.onUpdate=function(e){if(this.$updating)return this.updateAnchors(e);var t=e;if(t.start.row===t.end.row&&t.start.row===this.pos.row){this.$updating=!0;var n="insert"===e.action?t.end.column-t.start.column:t.start.column-t.end.column,r=t.start.column>=this.pos.column&&t.start.column<=this.pos.column+this.length+1,o=t.start.column-this.pos.column;if(this.updateAnchors(e),r&&(this.length+=n),r&&!this.session.$fromUndo)if("insert"===e.action)for(var s=this.others.length-1;0<=s;s--){var a={row:(l=this.others[s]).row,column:l.column+o};this.doc.insertMergedLines(a,e.lines)}else if("remove"===e.action)for(s=this.others.length-1;0<=s;s--){var l;a={row:(l=this.others[s]).row,column:l.column+o},this.doc.remove(new i(a.row,a.column,a.row,a.column-n))}this.$updating=!1,this.updateMarkers()}},s.prototype.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},s.prototype.updateMarkers=function(){if(!this.$updating){var e=this,t=this.session,n=function(n,r){t.removeMarker(n.markerId),n.markerId=t.addMarker(new i(n.row,n.column,n.row,n.column+e.length),r,null,!1)};n(this.pos,this.mainClass);for(var r=this.others.length;r--;)n(this.others[r],this.othersClass)}},s.prototype.onCursorChange=function(e){var t;!this.$updating&&this.session&&((t=this.session.selection.getCursor()).row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e)))},s.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},s.prototype.cancel=function(){if(-1!==this.$undoStackDepth){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,n=0;n<t;n++)e.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},s);function s(e,t,n,i,r,o){var s=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=r,this.othersClass=o,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=i,this.$onCursorChange=function(){setTimeout((function(){s.onCursorChange()}))},this.$pos=n,t=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1},this.$undoStackDepth=t.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)}e.implement(o.prototype,r),t.PlaceHolder=o})),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],(function(e,t,n){var i=e("../lib/event"),r=e("../lib/useragent");function o(e,t){return e.row==t.row&&e.column==t.column}t.onMouseDown=function(e){var t=e.domEvent,n=t.altKey,s=t.shiftKey,a=t.ctrlKey,l=e.getAccelKey(),c=e.getButton();if(a&&r.isMac&&(c=t.button),e.editor.inMultiSelectMode&&2==c)e.editor.textInput.onContextMenu(e.domEvent);else if(a||n||l){if(0===c){var u,h,d,p,g,f,m,v,y=e.editor,C=y.selection,b=y.inMultiSelectMode,I=e.getDocumentPosition(),A=C.getCursor(),w=(A=e.inSelection()||C.isEmpty()&&o(I,A),e.x),x=e.y,S=y.session,k=y.renderer.pixelToScreenCoordinates(w,x),E=k;if(y.$mouseHandler.$enableJumpToDef)a&&n||l&&n?u=s?"block":"add":n&&y.$blockSelectEnabled&&(u="block");else if(l&&!n){if(u="add",!b&&s)return}else n&&y.$blockSelectEnabled&&(u="block");if(u&&r.isMac&&t.ctrlKey&&y.$mouseHandler.cancelContextMenu(),"add"==u)!b&&A||(b||(h=C.toOrientedRange(),y.addSelectionMarker(h)),d=C.rangeList.rangeAtPoint(I),y.inVirtualSelectionMode=!0,s&&(d=null,h=C.ranges[0]||h,y.removeSelectionMarker(h)),y.once("mouseup",(function(){var e=C.toOrientedRange();d&&e.isEmpty()&&o(d.cursor,e.cursor)?C.substractPoint(e.cursor):(s?C.substractPoint(h.cursor):h&&(y.removeSelectionMarker(h),C.addRange(h)),C.addRange(e)),y.inVirtualSelectionMode=!1})));else if("block"==u)return e.stop(),y.inVirtualSelectionMode=!0,g=[],f=function(){var e=y.renderer.pixelToScreenCoordinates(w,x),t=S.screenToDocumentPosition(e.row,e.column,e.offsetX);o(E,e)&&o(t,C.lead)||(E=e,y.selection.moveToPosition(t),y.renderer.scrollCursorIntoView(),y.removeSelectionMarkers(g),g=C.rectangularRangeBlock(E,k),y.$mouseHandler.$clickSelection&&1==g.length&&g[0].isEmpty()&&(g[0]=y.$mouseHandler.$clickSelection.clone()),g.forEach(y.addSelectionMarker,y),y.updateSelectionMarkers())},b&&!l?C.toSingleRange():!b&&l&&(p=C.toOrientedRange(),y.addSelectionMarker(p)),s?k=S.documentToScreenPosition(C.lead):C.moveToPosition(I),E={row:-1,column:-1},m=f,i.capture(y.container,(function(e){w=e.clientX,x=e.clientY}),(function(e){f(),clearInterval(v),y.removeSelectionMarkers(g),g.length||(g=[C.toOrientedRange()]),p&&(y.removeSelectionMarker(p),C.toSingleRange(p));for(var t=0;t<g.length;t++)C.addRange(g[t]);y.inVirtualSelectionMode=!1,y.$mouseHandler.$clickSelection=null})),v=setInterval((function(){m()}),20),e.preventDefault()}}else 0===c&&e.editor.inMultiSelectMode&&e.editor.exitMultiSelectMode()}})),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],(function(e,t,n){t.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(e){e.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(e){e.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(e){e.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(e){e.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(e){e.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(e){e.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(e){e.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(e){e.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split selection into lines",exec:function(e){1<e.multiSelect.rangeCount?e.multiSelect.joinSelections():e.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(e){e.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(e){e.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(e){e.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],t.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(e){e.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}],e=e("../keyboard/hash_handler").HashHandler,t.keyboardHandler=new e(t.multiSelectCommands)})),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],(function(e,t,n){var i=e("./range_list").RangeList,r=e("./range").Range,o=e("./selection").Selection,s=e("./mouse/multi_select_handler").onMouseDown,a=e("./lib/event"),l=e("./lib/lang"),c=e("./commands/multi_select_commands");t.commands=c.defaultCommands.concat(c.multiSelectCommands);var u=new(e("./search").Search),h=e("./edit_session").EditSession;function d(e){var n,i;function r(e){i&&(n.renderer.setMouseCursor(""),i=!1)}e.$multiselectOnSessionChange||(e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),e.$multiselectOnSessionChange=t.onSessionChange.bind(e),e.$checkMultiselectChange=e.$checkMultiselectChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",s),e.commands.addCommands(c.defaultCommands),(n=e).textInput&&(e=n.textInput.getElement(),i=!1,a.addListener(e,"keydown",(function(e){e=18==e.keyCode&&!(e.ctrlKey||e.shiftKey||e.metaKey),n.$blockSelectEnabled&&e?i||(n.renderer.setMouseCursor("crosshair"),i=!0):i&&r()}),n),a.addListener(e,"keyup",r,n),a.addListener(e,"blur",r,n)))}(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(h.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(e){if(!this.inMultiSelectMode&&0===this.rangeCount){var n=this.toOrientedRange();if(this.rangeList.add(n),this.rangeList.add(e),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(n),this.$onAddRange(n)}return e.cursor||(e.cursor=e.end),n=this.rangeList.add(e),this.$onAddRange(e),n.length&&this.$onRemoveRange(n),1<this.rangeCount&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){if(e=this.rangeList.substractPoint(e))return this.$onRemoveRange(e),e[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length&&this.$onRemoveRange(e)},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){var t;this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode&&(t=this.rangeList.ranges.pop(),e.push(t),this.rangeCount=0);for(var n=e.length;n--;){var i=this.ranges.indexOf(e[n]);this.ranges.splice(i,1)}this._signal("removeRange",{ranges:e}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(t=t||this.ranges[0])&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new i,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var e=this.ranges.length?this.ranges:[this.getRange()],t=[],n=0;n<e.length;n++){var i=e[n],o=i.start.row,s=i.end.row;if(o===s)t.push(i.clone());else{for(t.push(new r(o,i.start.column,o,this.session.getLine(o).length));++o<s;)t.push(this.getLineRange(o,!0));t.push(new r(s,0,s,i.end.column))}0!=n||this.isBackwards()||(t=t.reverse())}for(this.toSingleRange(),n=t.length;n--;)this.addRange(t[n])},this.joinSelections=function(){var e=(t=this.rangeList.ranges)[t.length-1],t=r.fromPoints(t[0].start,e.end);this.toSingleRange(),this.setSelectionRange(t,e.cursor==e.start)},this.toggleBlockSelection=function(){var e,t;1<this.rangeCount?(t=(e=this.rangeList.ranges)[e.length-1],e=r.fromPoints(e[0].start,t.end),this.toSingleRange(),this.setSelectionRange(e,t.cursor==t.start)):(e=this.session.documentToScreenPosition(this.cursor),t=this.session.documentToScreenPosition(this.anchor),this.rectangularRangeBlock(e,t).forEach(this.addRange,this))},this.rectangularRangeBlock=function(e,t,n){var i,o,s,a,l,c,u,h=[],d=e.column<t.column,p=(a=(d?(i=e.column,o=t.column,s=e.offsetX,t):(i=t.column,o=e.column,s=t.offsetX,e)).offsetX,e.row<t.row);c=(p?(l=e.row,t):(l=t.row,e)).row,i<0&&(i=0),(l=l<0?0:l)==c&&(n=!0);for(var g,f,m=l;m<=c;m++){var v=r.fromPoints(this.session.screenToDocumentPosition(m,i,s),this.session.screenToDocumentPosition(m,o,a));if(v.isEmpty()){if(u&&(f=u,(g=v.end).row==f.row)&&g.column==f.column)break;u=v.end}v.cursor=d?v.start:v.end,h.push(v)}if(p&&h.reverse(),!n){for(var y=h.length-1;h[y].isEmpty()&&0<y;)y--;if(0<y)for(var C=0;h[C].isEmpty();)C++;for(var b=y;C<=b;b--)h[b].isEmpty()&&h.splice(b,1)}return h}}.call(o.prototype),h=e("./editor").Editor,function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){e.marker&&(this.session.removeMarker(e.marker),-1!=(e=this.session.$selectionMarkers.indexOf(e))&&this.session.$selectionMarkers.splice(e,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length)},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,n=e.length;n--;){var i=e[n];i.marker&&(this.session.removeMarker(i.marker),-1!=(i=t.indexOf(i)))&&t.splice(i,1)}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(c.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(e){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(c.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(e){var t,n=e.command,i=e.editor;if(i.multiSelect)return n.multiSelectAction?t="forEach"==n.multiSelectAction?i.forEachSelection(n,e.args):"forEachLine"==n.multiSelectAction?i.forEachSelection(n,e.args,!0):"single"==n.multiSelectAction?(i.exitMultiSelectMode(),n.exec(i,e.args||{})):n.multiSelectAction(i,e.args||{}):(t=n.exec(i,e.args||{}),i.multiSelect.addRange(i.multiSelect.toOrientedRange()),i.multiSelect.mergeOverlappingRanges()),t},this.forEachSelection=function(e,t,n){if(!this.inVirtualSelectionMode){var i,r=n&&n.keepOrder,s=1==n||n&&n.$byLines,a=this.session,l=(n=this.selection).rangeList,c=(r?n:l).ranges;if(!c.length)return e.exec?e.exec(this,t||{}):e(this,t||{});r=n._eventRegistry;var u=(n._eventRegistry={},new o(a));this.inVirtualSelectionMode=!0;for(var h=c.length;h--;){if(s)for(;0<h&&c[h].start.row==c[h-1].end.row;)h--;u.fromOrientedRange(c[h]),u.index=h,this.selection=a.selection=u;var d=e.exec?e.exec(this,t||{}):e(this,t||{});i||void 0===d||(i=d),u.toOrientedRange(c[h])}return u.detach(),this.selection=a.selection=n,this.inVirtualSelectionMode=!1,n._eventRegistry=r,n.mergeOverlappingRanges(),n.ranges[0]&&n.fromOrientedRange(n.ranges[0]),l=this.renderer.$scrollAnimation,this.onCursorChange(),this.onSelectionChange(),l&&l.from==l.to&&this.renderer.animateScrolling(l.from),i}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,n=[],i=0;i<t.length;i++)n.push(this.session.getTextRange(t[i]));var r=this.session.getDocument().getNewLineCharacter();(e=n.join(r)).length==(n.length-1)*r.length&&(e="")}else this.selection.isEmpty()||(e=this.session.getTextRange(this.getSelectionRange()));return e},this.$checkMultiselectChange=function(e,t){var n;this.inMultiSelectMode&&!this.inVirtualSelectionMode&&(n=this.multiSelect.ranges[0],this.multiSelect.isEmpty()&&t==this.multiSelect.anchor||((n=t==this.multiSelect.anchor?n.cursor==n.start?n.end:n.start:n.cursor).row!=t.row||this.session.$clipPositionToDocument(n.row,n.column).column!=t.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()))},this.findAll=function(e,t,n){(t=t||{}).needle=e||t.needle,null==t.needle&&(i=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange(),t.needle=this.session.getTextRange(i)),this.$search.set(t);var i,r=this.$search.findAll(this.session);if(!r.length)return 0;var o=this.multiSelect;n||o.toSingleRange(r[0]);for(var s=r.length;s--;)o.addRange(r[s],!0);return i&&o.rangeList.rangeAtPoint(i.start)&&o.addRange(i,!0),r.length},this.selectMoreLines=function(e,t){var n,i,o,s=this.selection.toOrientedRange(),a=s.cursor==s.end,l=this.session.documentToScreenPosition(s.cursor),c=(this.selection.$desiredColumn&&(l.column=this.selection.$desiredColumn),this.session.screenToDocumentPosition(l.row+e,l.column));e=s.isEmpty()?c:(n=this.session.documentToScreenPosition(a?s.end:s.start),this.session.screenToDocumentPosition(n.row+e,n.column)),a?(i=r.fromPoints(c,e)).cursor=i.start:(i=r.fromPoints(e,c)).cursor=i.end,i.desiredColumn=l.column,this.selection.inMultiSelectMode?t&&(o=s.cursor):this.selection.addRange(s),this.selection.addRange(i),o&&this.selection.substractPoint(o)},this.transposeSelections=function(e){for(var t=this.session,n=t.multiSelect,i=n.ranges,r=i.length;r--;)(s=i[r]).isEmpty()&&(a=t.getWordRange(s.start.row,s.start.column),s.start.row=a.start.row,s.start.column=a.start.column,s.end.row=a.end.row,s.end.column=a.end.column);n.mergeOverlappingRanges();var o=[];for(r=i.length;r--;){var s=i[r];o.unshift(t.getTextRange(s))}for(e<0?o.unshift(o.pop()):o.push(o.shift()),r=i.length;r--;){var a=(s=i[r]).clone();t.replace(s,o[r]),s.start.row=a.start.row,s.start.column=a.start.column}n.fromOrientedRange(n.ranges[0])},this.selectMore=function(e,t,n){var i,r=this.session,o=r.multiSelect.toOrientedRange();o.isEmpty()&&((o=r.getWordRange(o.start.row,o.start.column)).cursor=-1==e?o.start:o.end,this.multiSelect.addRange(o),n)||(n=r.getTextRange(o),i=e,u.$options.wrap=!0,u.$options.needle=n,u.$options.backwards=-1==i,(n=u.find(r))&&(n.cursor=-1==e?n.start:n.end,this.session.unfold(n),this.multiSelect.addRange(n),this.renderer.scrollCursorIntoView(null,.5)),t&&this.multiSelect.substractPoint(o.cursor))},this.alignCursors=function(){var e=this.session,t=e.multiSelect,n=t.ranges,i=-1,o=n.filter((function(e){if(e.cursor.row==i)return!0;i=e.cursor.row}));if(n.length&&o.length!=n.length-1){o.forEach((function(e){t.substractPoint(e.cursor)}));var s=0,a=1/0,c=n.map((function(t){t=t.cursor;var n=e.getLine(t.row).substr(t.column).search(/\S/g);return t.column>s&&(s=t.column),(n=-1==n?0:n)<a&&(a=n),n}));n.forEach((function(t,n){var i=t.cursor,o=s-i.column;(n=c[n]-a)<o?e.insert(i,l.stringRepeat(" ",o-n)):e.remove(new r(i.row,i.column,i.row,i.column-o+n)),t.start.column=t.end.column=s,t.start.row=t.end.row=i.row,t.cursor=t.end})),t.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var u=(o=this.selection.getRange()).start.row,h=o.end.row;if(n=u==h){for(var d,p=this.session.getLength();d=this.session.getLine(h),/[=:]/.test(d)&&++h<p;);for(;d=this.session.getLine(u),/[=:]/.test(d)&&0<--u;);u<0&&(u=0),p<=h&&(h=p-1)}var g=this.session.removeFullLines(u,h);g=this.$reAlignText(g,n),this.session.insert({row:u,column:0},g.join("\n")+"\n"),n||(o.start.column=0,o.end.column=g[g.length-1].length),this.selection.setRange(o)}},this.$reAlignText=function(e,t){var n,i,r,o=!0,s=!0;return e.map((function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?(null==n?(n=t[1].length,i=t[2].length,r=t[3].length):(n+i+r!=t[1].length+t[2].length+t[3].length&&(s=!1),n!=t[1].length&&(o=!1),n>t[1].length&&(n=t[1].length),i<t[2].length&&(i=t[2].length),r>t[3].length&&(r=t[3].length)),t):[e]})).map(t?c:o?s?function(e){return e[2]?a(n+i-e[2].length)+e[2]+a(r)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}:c:function(e){return e[2]?a(n)+e[2]+a(r)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]});function a(e){return l.stringRepeat(" ",e)}function c(e){return e[2]?a(n)+e[2]+a(i-e[2].length+r)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}}}.call(h.prototype),t.onSessionChange=function(e){var t=e.session;t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect,(e=e.oldSession)&&(e.multiSelect.off("addRange",this.$onAddRange),e.multiSelect.off("removeRange",this.$onRemoveRange),e.multiSelect.off("multiSelect",this.$onMultiSelect),e.multiSelect.off("singleSelect",this.$onSingleSelect),e.multiSelect.lead.off("change",this.$checkMultiselectChange),e.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=d,e("./config").defineOptions(h.prototype,"editor",{enableMultiselect:{set:function(e){d(this),e?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",s)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",s))},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})})),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var i=e("../../range").Range;e=t.FoldMode=function(){},function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){return e=e.getLine(n),this.foldingStartMarker.test(e)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(e)?"end":""},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,n){var r=/\S/,o=(l=e.getLine(t)).search(r);if(-1!=o){n=n||l.length;for(var s,a=e.getLength(),l=t,c=t;++t<a;){var u=e.getLine(t).search(r);if(-1!=u){if(u<=o&&(!(u=e.getTokenAt(t,0))||"string"!==u.type))break;c=t}}return l<c?(s=e.getLine(c).length,new i(l,n,c,s)):void 0}},this.openingBracketBlock=function(e,t,n,r,o){if(n={row:n,column:r+1},r=e.$findClosingBracket(t,n,o))return"start"==(t=null==(t=e.foldWidgets[r.row])?e.getFoldWidget(r.row):t)&&r.row>n.row&&(r.row--,r.column=e.getLine(r.row).length),i.fromPoints(n,r)},this.closingBracketBlock=function(e,t,n,r,o){if(n={row:n,column:r},r=e.$findOpeningBracket(t,n))return r.column++,n.column--,i.fromPoints(r,n)}}.call(e.prototype)})),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range","ace/config"],(function(e,t,n){"use strict";var i=e("../line_widgets").LineWidgets,r=e("../lib/dom"),o=e("../range").Range,s=e("../config").nls;function a(e,t,n){var i=e.getAnnotations().sort(o.comparePoints);if(i.length){var r=function(e,t,n){for(var i=0,r=e.length-1;i<=r;){var o=i+r>>1,s=n(t,e[o]);if(0<s)i=1+o;else{if(!(s<0))return o;r=o-1}}return-(i+1)}(i,{row:t,column:-1},o.comparePoints),s=((r=r<0?-r-1:r)>=i.length?r=0<n?0:i.length-1:0===r&&n<0&&(r=i.length-1),i[r]);if(s&&n){if(s.row===t){for(;(s=i[r+=n])&&s.row===t;);if(!s)return i.slice()}var a=[];for(t=s.row;a[n<0?"unshift":"push"](s),(s=i[r+=n])&&s.row==t;);return a.length&&a}}}t.showErrorMarker=function(e,t){var n,o=e.session,l=(o.widgetManager||(o.widgetManager=new i(o),o.widgetManager.attach(e)),e.getCursorPosition()),c=l.row,u=o.widgetManager.getWidgetsAtRow(c).filter((function(e){return"errorMarker"==e.type}))[0];if(u?u.destroy():c-=t,c=a(o,c,t))t=c[0],l.column=(t.pos&&"number"!=typeof t.column?t.pos.sc:t.column)||0,l.row=t.row,n=e.renderer.$gutterLayer.$annotations[l.row];else{if(u)return;n={text:[s("Looks good!")],className:"ace_ok"}}function h(e,t,n){if(0===t&&("esc"===n||"return"===n))return d.destroy(),{command:"null"}}e.session.unfold(l.row),e.selection.moveToPosition(l);var d={row:l.row,fixedWidth:!0,coverGutter:!0,el:r.createElement("div"),type:"errorMarker"};c=d.el.appendChild(r.createElement("div")),(t=d.el.appendChild(r.createElement("div"))).className="error_widget_arrow "+n.className,u=e.renderer.$cursorLayer.getPixelPosition(l).left,t.style.left=u+e.renderer.gutterWidth-5+"px",d.el.className="error_widget_wrapper",c.className="error_widget "+n.className,c.innerHTML=n.text.join("<br>"),c.appendChild(r.createElement("div")),d.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(h),o.widgetManager.removeLineWidget(d),e.off("changeSelection",d.destroy),e.off("changeSession",d.destroy),e.off("mouseup",d.destroy),e.off("change",d.destroy))},e.keyBinding.addKeyboardHandler(h),e.on("changeSelection",d.destroy),e.on("changeSession",d.destroy),e.on("mouseup",d.destroy),e.on("change",d.destroy),e.session.widgetManager.addLineWidget(d),d.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:d.el.offsetHeight})},r.importCssString("\n .error_widget_wrapper {\n background: inherit;\n color: inherit;\n border:none\n }\n .error_widget {\n border-top: solid 2px;\n border-bottom: solid 2px;\n margin: 5px 0;\n padding: 10px 40px;\n white-space: pre-wrap;\n }\n .error_widget.ace_error, .error_widget_arrow.ace_error{\n border-color: #ff5a5a\n }\n .error_widget.ace_warning, .error_widget_arrow.ace_warning{\n border-color: #F1D817\n }\n .error_widget.ace_info, .error_widget_arrow.ace_info{\n border-color: #5a5a5a\n }\n .error_widget.ace_ok, .error_widget_arrow.ace_ok{\n border-color: #5aaa5a\n }\n .error_widget_arrow {\n position: absolute;\n border: solid 5px;\n border-top-color: transparent!important;\n border-right-color: transparent!important;\n border-left-color: transparent!important;\n top: -5px;\n }\n","error_marker.css",!1)})),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],(function(e,t,n){"use strict";e("./loader_build")(t);var i=e("./lib/dom"),r=e("./range").Range,o=e("./editor").Editor,s=e("./edit_session").EditSession,a=e("./undomanager").UndoManager,l=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.edit=function(e,n){if("string"==typeof e){var r=e;if(!(e=document.getElementById(r)))throw new Error("ace.edit can't find div #"+r)}var s,a;return e&&e.env&&e.env.editor instanceof o?e.env.editor:(r="",e&&/input|textarea/i.test(e.tagName)?(r=(s=e).value,e=i.createElement("pre"),s.parentNode.replaceChild(e,s)):e&&(r=e.textContent,e.innerHTML=""),r=t.createEditSession(r),e=new o(new l(e),r,n),a={document:r,editor:e,onResize:e.resize.bind(e,null)},s&&(a.textarea=s),e.on("destroy",(function(){a.editor.container.env=null})),e.container.env=e.env=a,e)},t.createEditSession=function(e,t){return(e=new s(e,t)).setUndoManager(new a),e},t.Range=r,t.Editor=o,t.EditSession=s,t.UndoManager=a,t.VirtualRenderer=l,t.version=t.config.version})),ace.require(["ace/ace"],(function(t){for(var n in t&&(t.config.init(!0),t.define=ace.define),window.ace||(window.ace=t),t)t.hasOwnProperty(n)&&(window.ace[n]=t[n]);window.ace.default=window.ace,e&&(e.exports=window.ace)}))},4317:function(e,t,n){e=n.nmd(e),ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],(function(e,t,n){"use strict";var i=e("./lib/dom"),r=e("./lib/oop"),o=e("./lib/event_emitter").EventEmitter,s=e("./lib/lang"),a=e("./range").Range,l=e("./range_list").RangeList,c=e("./keyboard/hash_handler").HashHandler,u=e("./tokenizer").Tokenizer,h=e("./clipboard"),d={CURRENT_WORD:function(e){return e.session.getTextRange(e.session.getWordRange())},SELECTION:function(e,t,n){return e=e.session.getTextRange(),n?e.replace(/\n\r?([ \t]*\S)/g,"\n"+n+"$1"):e},CURRENT_LINE:function(e){return e.session.getLine(e.getCursorPosition().row)},PREV_LINE:function(e){return e.session.getLine(e.getCursorPosition().row-1)},LINE_INDEX:function(e){return e.getCursorPosition().row},LINE_NUMBER:function(e){return e.getCursorPosition().row+1},SOFT_TABS:function(e){return e.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(e){return e.session.getTabSize()},CLIPBOARD:function(e){return h.getText&&h.getText()},FILENAME:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0]},FILENAME_BASE:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(e){return this.FILEPATH(e).replace(/[^/\\]*$/,"")},FILEPATH:function(e){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(e){return(e=e.session.$mode||{}).blockComment&&e.blockComment.start||""},BLOCK_COMMENT_END:function(e){return(e=e.session.$mode||{}).blockComment&&e.blockComment.end||""},LINE_COMMENT:function(e){return(e.session.$mode||{}).lineCommentStart||""},CURRENT_YEAR:p.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:p.bind(null,{year:"2-digit"}),CURRENT_MONTH:p.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:p.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:p.bind(null,{month:"short"}),CURRENT_DATE:p.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:p.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:p.bind(null,{weekday:"short"}),CURRENT_HOUR:p.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:p.bind(null,{minute:"2-digit"}),CURRENT_SECOND:p.bind(null,{second:"2-digit"})};function p(e){return 1==(e=(new Date).toLocaleString("en-us",e)).length?"0"+e:e}function g(){this.snippetMap={},this.snippetNameMap={}}d.SELECTED_TEXT=d.SELECTION,function(){function e(e,t,n){void 0===n&&(n={});for(var i=e.getCursorPosition(),r=e.session.getLine(i.row),o=e.session.getTabString(),s=r.match(/^\s*/)[0],a=(i.column<s.length&&(s=s.slice(0,i.column)),t=t.replace(/\r/g,""),this.tokenizeTmSnippet(t)),l=(a=(a=this.resolveVariables(a,e)).map((function(e){return"\n"!=e||n.excludeExtraIndent?"string"==typeof e?e.replace(/\t/g,o):e:e+s})),[]),c=(a.forEach((function(e,t){var n,i,r;"object"==typeof e&&(r=e.tabstopId,(n=l[r])||((n=l[r]=[]).index=r,n.value="",n.parents={}),-1===n.indexOf(e))&&(e.choices&&!n.choices&&(n.choices=e.choices),n.push(e),-1!==(i=a.indexOf(e,t+1)))&&((r=a.slice(t+1,i)).some((function(e){return"object"==typeof e}))&&!n.value?n.value=r:!r.length||n.value&&"string"==typeof n.value||(n.value=r.join("")))})),l.forEach((function(e){e.length=0})),{}),u=0;u<a.length;u++){var h,d,p,g=a[u];"object"==typeof g&&(p=g.tabstopId,h=l[p],d=a.indexOf(g,u+1),c[p]?c[p]===g&&(delete c[p],Object.keys(c).forEach((function(e){h.parents[e]=!0}))):(c[p]=g,"string"!=typeof(p=h.value)?p=function(e){for(var t=[],n=0;n<e.length;n++){if("object"==typeof(i=e[n])){if(c[i.tabstopId])continue;var i=t[e.lastIndexOf(i,n-1)]||{tabstopId:i.tabstopId}}t[n]=i}return t}(p):g.fmt&&(p=this.tmStrFormat(p,g,e)),a.splice.apply(a,[u+1,Math.max(0,d-u)].concat(p,g)),-1===h.indexOf(g)&&h.push(g)))}var f=0,m=0,v="";return a.forEach((function(e){var t;"string"==typeof e?(1<(t=e.split("\n")).length?(m=t[t.length-1].length,f+=t.length-1):m+=e.length,v+=e):e&&(e.start?e.end={row:f,column:m}:e.start={row:f,column:m})})),{text:v,tabstops:l,tokens:a}}r.implement(this,o),this.getTokenizer=function(){return g.$tokenizer||this.createTokenizer()},this.createTokenizer=function(){function e(e){return e=e.substr(1),/^\d+$/.test(e)?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function t(e){return"(?:[^\\\\"+e+"]|\\\\.)"}var n={regex:"/("+t("/")+"+)/",onMatch:function(e,t,n){return(n=n[0]).fmtString=!0,n.guard=e.slice(1,-1),n.flag=""},next:"formatString"};return g.$tokenizer=new u({start:[{regex:/\\./,onMatch:function(e,t,n){var i=e[1];return[e="}"==i&&n.length||-1!="`$\\".indexOf(i)?i:e]}},{regex:/}/,onMatch:function(e,t,n){return[n.length?n.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:e},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(t,n,i){return t=e(t.substr(1)),i.unshift(t[0]),t},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+t("\\|")+"*\\|",onMatch:function(e,t,n){return e=e.slice(1,-1).replace(/\\[,|\\]|,/g,(function(e){return 2==e.length?e[1]:"\0"})).split("\0").map((function(e){return{value:e}})),[(n[0].choices=e)[0]]},next:"start"},n,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(e,t,n){return n.length&&n[0].expectElse?(n[0].expectElse=!1,n[0].ifEnd={elseEnd:n[0]},[n[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(e,t,n){var i=e[1];return"}"==i&&n.length||-1!="`$\\".indexOf(i)?e=i:"n"==i?e="\n":"t"==i?e="\t":-1!="ulULE".indexOf(i)&&(e={changeCase:i,local:"a"<i}),[e]}},{regex:"/\\w*}",onMatch:function(e,t,n){return(n=n.shift())&&(n.flag=e.slice(1,-1)),this.next=n&&n.tabstopId?"start":"",[n||e]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(e,t,n){return[{text:e.slice(1)}]}},{regex:/\${\w+/,onMatch:function(e,t,n){return e={text:e.slice(2)},n.unshift(e),[e]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(e,t,n){return n=n.shift(),this.next=n&&n.tabstopId?"start":"",[n||e]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(e,t,n){return n[0].formatFunction=e.slice(2,-1),[n.shift()]},next:"formatString"},n,{regex:/:[\?\-+]?/,onMatch:function(e,t,n){"+"==e[1]&&(n[0].ifEnd=n[0]),"?"==e[1]&&(n[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]})},this.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map((function(e){return e.value||e}))},this.getVariableValue=function(e,t,n){var i;return/^\d+$/.test(t)?(this.variables.__||{})[t]||"":/^[A-Z]\d+$/.test(t)?(this.variables[t[0]+"__"]||{})[t.substr(1)]||"":(t=t.replace(/^TM_/,""),this.variables.hasOwnProperty(t)&&null!=(i="function"==typeof(i=this.variables[t])?this.variables[t](e,t,n):i)?i:"")},this.variables=d,this.tmStrFormat=function(e,t,n){var i,r,o,s;return t.fmt?(i=t.flag||"",r=t.guard,r=new RegExp(r,i.replace(/[^gim]/g,"")),o="string"==typeof t.fmt?this.tokenizeTmSnippet(t.fmt,"formatString"):t.fmt,s=this,e.replace(r,(function(){for(var e=s.variables.__,t=(s.variables.__=[].slice.call(arguments),s.resolveVariables(o,n)),i="E",r=0;r<t.length;r++){var a,l=t[r];"object"==typeof l?(t[r]="",l.changeCase&&l.local?(a=t[r+1])&&"string"==typeof a&&("u"==l.changeCase?t[r]=a[0].toUpperCase():t[r]=a[0].toLowerCase(),t[r+1]=a.substr(1)):l.changeCase&&(i=l.changeCase)):"U"==i?t[r]=l.toUpperCase():"L"==i&&(t[r]=l.toLowerCase())}return s.variables.__=e,t.join("")}))):e},this.tmFormatFunction=function(e,t,n){return"upcase"==t.formatFunction?e.toUpperCase():"downcase"==t.formatFunction?e.toLowerCase():e},this.resolveVariables=function(e,t){for(var n=[],i="",r=!0,o=0;o<e.length;o++){var s,a=e[o];"string"==typeof a?(n.push(a),"\n"==a?(r=!0,i=""):r&&(i=/^\t*/.exec(a)[0],r=/\S/.test(a))):a&&(r=!1,a.fmtString&&(-1==(s=e.indexOf(a,o+1))&&(s=e.length),a.fmt=e.slice(o+1,s),o=s),a.text?(s=this.getVariableValue(t,a.text,i)+"",a.fmtString&&(s=this.tmStrFormat(s,a,t)),(s=a.formatFunction?this.tmFormatFunction(s,a,t):s)&&!a.ifEnd?(n.push(s),l(a)):!s&&a.ifEnd&&l(a.ifEnd)):a.elseEnd?l(a.elseEnd):null==a.tabstopId&&null==a.changeCase||n.push(a))}function l(t){-1!=(t=e.indexOf(t,o+1))&&(o=t)}return n},this.getDisplayTextForSnippet=function(t,n){return e.call(this,t,n).text},this.insertSnippetForSelection=function(t,n,i){n=e.call(this,t,n,i=void 0===i?{}:i);var r=t.getSelectionRange(),o=(i.range&&0===i.range.compareRange(r)&&(r=i.range),i=t.session.replace(r,n.text),new f(t));t=t.inVirtualSelectionMode&&t.selection.index,o.addTabstops(n.tabstops,r.start,i,t)},this.insertSnippet=function(e,t,n){var i=this;if(!(n=void 0===n?{}:n).range||n.range instanceof a||(n.range=a.fromPoints(n.range.start,n.range.end)),e.inVirtualSelectionMode)return i.insertSnippetForSelection(e,t,n);e.forEachSelection((function(){i.insertSnippetForSelection(e,t,n)}),null,{keepOrder:!0}),e.tabstopManager&&e.tabstopManager.tabNext()},this.$getScope=function(e){var t,n=e.session.$mode.$id||"";return"html"!==(n=n.split("/").pop())&&"php"!==n||("php"!==n||e.session.$mode.inlinePhp||(n="html"),t=e.getCursorPosition(),(e="object"==typeof(e=e.session.getState(t.row))?e[0]:e).substring&&("js-"==e.substring(0,3)?n="javascript":"css-"==e.substring(0,4)?n="css":"php-"==e.substring(0,4)&&(n="php"))),n},this.getActiveScopes=function(e){var t=[e=this.$getScope(e)],n=this.snippetMap;return n[e]&&n[e].includeScopes&&t.push.apply(t,n[e].includeScopes),t.push("_"),t},this.expandWithTab=function(e,t){var n=this,i=e.forEachSelection((function(){return n.expandSnippetForSelection(e,t)}),null,{keepOrder:!0});return i&&e.tabstopManager&&e.tabstopManager.tabNext(),i},this.expandSnippetForSelection=function(e,t){var n,i=e.getCursorPosition(),r=e.session.getLine(i.row),o=r.substring(0,i.column),s=r.substr(i.column),a=this.snippetMap;return this.getActiveScopes(e).some((function(e){return e=a[e],!!(n=e?this.findMatchingSnippet(e,o,s):n)}),this),!!n&&(t&&t.dryRun||(e.session.doc.removeInLine(i.row,i.column-n.replaceBefore.length,i.column+n.replaceAfter.length),this.variables.M__=n.matchBefore,this.variables.T__=n.matchAfter,this.insertSnippetForSelection(e,n.content),this.variables.M__=this.variables.T__=null),!0)},this.findMatchingSnippet=function(e,t,n){for(var i=e.length;i--;){var r=e[i];if((!r.startRe||r.startRe.test(t))&&(!r.endRe||r.endRe.test(n))&&(r.startRe||r.endRe))return r.matchBefore=r.startRe?r.startRe.exec(t):[""],r.matchAfter=r.endRe?r.endRe.exec(n):[""],r.replaceBefore=r.triggerRe?r.triggerRe.exec(t)[0]:"",r.replaceAfter=r.endTriggerRe?r.endTriggerRe.exec(n)[0]:"",r}},this.snippetMap={},this.snippetNameMap={},this.register=function(e,t){var n=this.snippetMap,i=this.snippetNameMap,r=this;function o(e){return(e=e&&!/^\^?\(.*\)\$?$|^\\b$/.test(e)?"(?:"+e+")":e)||""}function a(e,t,n){return e=o(e),t=o(t),n?(e=t+e)&&"$"!=e[e.length-1]&&(e+="$"):(e+=t)&&"^"!=e[0]&&(e="^"+e),new RegExp(e)}function l(e){e.scope||(e.scope=t||"_"),t=e.scope,n[t]||(n[t]=[],i[t]={});var o,l=i[t];e.name&&((o=l[e.name])&&r.unregister(o),l[e.name]=e),n[t].push(e),e.prefix&&(e.tabTrigger=e.prefix),!e.content&&e.body&&(e.content=Array.isArray(e.body)?e.body.join("\n"):e.body),e.tabTrigger&&!e.trigger&&(!e.guard&&/^\w/.test(e.tabTrigger)&&(e.guard="\\b"),e.trigger=s.escapeRegExp(e.tabTrigger)),(e.trigger||e.guard||e.endTrigger||e.endGuard)&&(e.startRe=a(e.trigger,e.guard,!0),e.triggerRe=new RegExp(e.trigger),e.endRe=a(e.endTrigger,e.endGuard,!0),e.endTriggerRe=new RegExp(e.endTrigger))}e=e||[],Array.isArray(e)?e.forEach(l):Object.keys(e).forEach((function(t){l(e[t])})),this._signal("registerSnippets",{scope:t})},this.unregister=function(e,t){var n=this.snippetMap,i=this.snippetNameMap;function r(e){var r=i[e.scope||t];r&&r[e.name]&&(delete r[e.name],0<=(e=(r=n[e.scope||t])&&r.indexOf(e)))&&r.splice(e,1)}e.content?r(e):Array.isArray(e)&&e.forEach(r)},this.parseSnippetFile=function(e){e=e.replace(/\r/g,"");for(var t,n,i,r=[],o={},s=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;n=s.exec(e);){if(n[1])try{o=JSON.parse(n[1]),r.push(o)}catch(e){}n[4]?(o.content=n[4].replace(/^\t/gm,""),r.push(o),o={}):(t=n[2],n=n[3],"regex"==t?(o.guard=(i=/\/((?:[^\/\\]|\\.)*)|$/g).exec(n)[1],o.trigger=i.exec(n)[1],o.endTrigger=i.exec(n)[1],o.endGuard=i.exec(n)[1]):"snippet"==t?(o.tabTrigger=n.match(/^\S*/)[0],o.name||(o.name=n)):t&&(o[t]=n))}return r},this.getSnippetByName=function(e,t){var n,i=this.snippetNameMap;return this.getActiveScopes(t).some((function(t){return t=i[t],!!(n=t?t[e]:n)}),this),n}}.call(g.prototype);var f=function(e){if(e.tabstopManager)return e.tabstopManager;(e.tabstopManager=this).$onChange=this.onChange.bind(this),this.$onChangeSelection=s.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)},m=(function(){this.attach=function(e){this.index=0,this.ranges=[],this.tabstops=[],this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},this.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges=null,this.tabstops=null,this.selectedTabstop=null,this.editor.removeListener("change",this.$onChange),this.editor.removeListener("changeSelection",this.$onChangeSelection),this.editor.removeListener("changeSession",this.$onChangeSession),this.editor.commands.removeListener("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.editor=null},this.onChange=function(e){for(var t="r"==e.action[0],n=this.selectedTabstop||{},i=n.parents||{},r=(this.tabstops||[]).slice(),o=0;o<r.length;o++){var s=r[o],a=s==n||i[s.index];if(s.rangeList.$bias=a?0:1,"remove"==e.action&&s!==n){a=s.parents&&s.parents[n.index];for(var l=(l=s.rangeList.pointIndex(e.start,a))<0?-l-1:l+1,c=(a=s.rangeList.pointIndex(e.end,a),s.rangeList.ranges.slice(l,a<0?-a-1:a-1)),u=0;u<c.length;u++)this.removeRange(c[u])}s.rangeList.$onChange(e)}var h=this.editor.session;this.$inChange||!t||1!=h.getLength()||h.getValue()||this.detach()},this.updateLinkedFields=function(){var e=this.selectedTabstop;if(e&&e.hasLinkedRanges&&e.firstNonLinked){this.$inChange=!0;for(var n=this.editor.session,i=n.getTextRange(e.firstNonLinked),r=0;r<e.length;r++){var o,s=e[r];s.linked&&(o=s.original,o=t.snippetManager.tmStrFormat(i,o,this.editor),n.replace(s,o))}this.$inChange=!1}},this.onAfterExec=function(e){e.command&&!e.command.readOnly&&this.updateLinkedFields()},this.onChangeSelection=function(){if(this.editor){for(var e=this.editor.selection.lead,t=this.editor.selection.anchor,n=this.editor.selection.isEmpty(),i=0;i<this.ranges.length;i++)if(!this.ranges[i].linked){var r=this.ranges[i].contains(e.row,e.column),o=n||this.ranges[i].contains(t.row,t.column);if(r&&o)return}this.detach()}},this.onChangeSession=function(){this.detach()},this.tabNext=function(e){var t=this.tabstops.length;e=this.index+(e||1),e=Math.min(Math.max(e,1),t),this.selectTabstop(e=e==t?0:e),0===e&&this.detach()},this.selectTabstop=function(e){this.$openTabstops=null;var t=this.tabstops[this.index];if(t&&this.addTabstopMarkers(t),this.index=e,(t=this.tabstops[this.index])&&t.length){if(e=(this.selectedTabstop=t).firstNonLinked||t,t.choices&&(e.cursor=e.start),this.editor.inVirtualSelectionMode)this.editor.selection.fromOrientedRange(e);else{var n=this.editor.multiSelect;n.toSingleRange(e);for(var i=0;i<t.length;i++)t.hasLinkedRanges&&t[i].linked||n.addRange(t[i].clone(),!0)}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler),this.selectedTabstop&&this.selectedTabstop.choices&&this.editor.execCommand("startAutocomplete",{matches:this.selectedTabstop.choices})}},this.addTabstops=function(e,t,n){var i=this.useLink||!this.editor.getOption("enableMultiselect");this.$openTabstops||(this.$openTabstops=[]),e[0]||(n=a.fromPoints(n,n),v(n.start,t),v(n.end,t),e[0]=[n],e[0].index=0);var r=[this.index+1,0],o=this.ranges;e.forEach((function(e,n){for(var s=this.$openTabstops[n]||e,c=0;c<e.length;c++){var u=e[c],h=a.fromPoints(u.start,u.end||u.start);m(h.start,t),m(h.end,t),h.original=u,h.tabstop=s,o.push(h),s!=e?s.unshift(h):s[c]=h,u.fmtString||s.firstNonLinked&&i?(h.linked=!0,s.hasLinkedRanges=!0):s.firstNonLinked||(s.firstNonLinked=h)}s.firstNonLinked||(s.hasLinkedRanges=!1),s===e&&(r.push(s),this.$openTabstops[n]=s),this.addTabstopMarkers(s),s.rangeList=s.rangeList||new l,s.rangeList.$bias=0,s.rangeList.addList(s)}),this),2<r.length&&(this.tabstops.length&&r.push(r.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,r))},this.addTabstopMarkers=function(e){var t=this.editor.session;e.forEach((function(e){e.markerId||(e.markerId=t.addMarker(e,"ace_snippet-marker","text"))}))},this.removeTabstopMarkers=function(e){var t=this.editor.session;e.forEach((function(e){t.removeMarker(e.markerId),e.markerId=null}))},this.removeRange=function(e){var t=e.tabstop.indexOf(e);-1!=t&&e.tabstop.splice(t,1),-1!=(t=this.ranges.indexOf(e))&&this.ranges.splice(t,1),-1!=(t=e.tabstop.rangeList.ranges.indexOf(e))&&e.tabstop.splice(t,1),this.editor.session.removeMarker(e.markerId),e.tabstop.length||(-1!=(t=this.tabstops.indexOf(e.tabstop))&&this.tabstops.splice(t,1),this.tabstops.length)||this.detach()},this.keyboardHandler=new c,this.keyboardHandler.bindKeys({Tab:function(e){t.snippetManager&&t.snippetManager.expandWithTab(e)||(e.tabstopManager.tabNext(1),e.renderer.scrollCursorIntoView())},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1),e.renderer.scrollCursorIntoView()},Esc:function(e){e.tabstopManager.detach()}})}.call(f.prototype),function(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row}),v=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row};i.importCssString("\n.ace_snippet-marker {\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n background: rgba(194, 193, 208, 0.09);\n border: 1px dotted rgba(211, 208, 235, 0.62);\n position: absolute;\n}","snippets.css",!1),t.snippetManager=new g,i=e("./editor").Editor,function(){this.insertSnippet=function(e,n){return t.snippetManager.insertSnippet(this,e,n)},this.expandSnippet=function(e){return t.snippetManager.expandWithTab(this,e)}}.call(i.prototype)})),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config"],(function(e,t,n){"use strict";function i(e){return"suggest-aria-id:".concat(e)}function r(e){return(e=new s(e)).$maxLines=4,(e=new a(e)).setHighlightActiveLine(!1),e.setShowPrintMargin(!1),e.renderer.setShowGutter(!1),e.renderer.setHighlightGutterLine(!1),e.$mouseHandler.$focusTimeout=0,e.$highlightTagPending=!0,e}function o(e){function t(){}function n(){f(-1)}var o,s=h.createElement("div"),a=new r(s),p=(e&&e.appendChild(s),s.style.display="none",a.renderer.content.style.cursor="default",a.renderer.setStyle("ace_autocomplete"),a.renderer.container.setAttribute("role","listbox"),a.renderer.container.setAttribute("aria-label",d("Autocomplete suggestions")),a.setOption("displayIndentGuides",!1),a.setOption("dragDelay",150),a.focus=t,a.$isFocused=!0,a.renderer.$cursorLayer.restartTimer=t,a.renderer.$cursorLayer.element.style.opacity=0,a.renderer.$maxLines=8,a.renderer.$keepTextAreaAtCursor=!1,a.setHighlightActiveLine(!1),a.session.highlight(""),a.session.$searchHighlight.clazz="ace_highlight-marker",a.on("mousedown",(function(e){var t=e.getDocumentPosition();a.selection.moveToPosition(t),g.start.row=g.end.row=t.row,e.stop()})),new l(-1,0,-1,1/0)),g=new l(-1,0,-1,1/0),f=(g.id=a.session.addMarker(g,"ace_active-line","fullLine"),a.setSelectOnHover=function(e){e?p.id&&(a.session.removeMarker(p.id),p.id=null):p.id=a.session.addMarker(p,"ace_line-hover","fullLine")},a.setSelectOnHover(!1),a.on("mousemove",(function(e){var t;o?o.x==e.x&&o.y==e.y||((o=e).scrollTop=a.renderer.scrollTop,t=o.getDocumentPosition().row,p.start.row!=t&&(p.id||a.setRow(t),f(t))):o=e})),a.renderer.on("beforeRender",(function(){var e;o&&-1!=p.start.row&&(o.$pos=null,e=o.getDocumentPosition().row,p.id||a.setRow(e),f(e,!0))})),a.renderer.on("afterRender",(function(){var e=a.getRow(),t=a.renderer.$textLayer,n=t.element.childNodes[e-t.config.firstRow],r=document.activeElement;n!==t.selectedNode&&t.selectedNode&&(h.removeCssClass(t.selectedNode,"ace_selected"),r.removeAttribute("aria-activedescendant"),t.selectedNode.removeAttribute("id")),(t.selectedNode=n)&&(h.addCssClass(n,"ace_selected"),t=i(e),n.id=t,a.renderer.container.setAttribute("aria-activedescendant",t),r.setAttribute("aria-activedescendant",t),n.setAttribute("role","option"),n.setAttribute("aria-label",a.getData(e).value),n.setAttribute("aria-setsize",a.data.length),n.setAttribute("aria-posinset",e))})),function(e,t){e!==p.start.row&&(p.start.row=p.end.row=e,t||a.session._emit("changeBackMarker"),a._emit("changeHoverMarker"))});return a.getHoveredRow=function(){return p.start.row},c.addListener(a.container,"mouseout",n),a.on("hide",n),a.on("changeSelection",n),a.session.doc.getLength=function(){return a.data.length},a.session.doc.getLine=function(e){return"string"==typeof(e=a.data[e])?e:e&&e.value||""},(e=a.session.bgTokenizer).$tokenizeRow=function(e){var t=a.data[e],n=[];if(t){for(var i,r,o=(t="string"==typeof t?{value:t}:t).caption||t.value||t.name,s=o.toLowerCase(),l=(a.filterText||"").toLowerCase(),c=0,u=0,h=0;h<=l.length;h++)h!=u&&(t.matchMask&1<<h||h==l.length)&&(i=l.slice(u,h),u=h,-1!=(r=s.indexOf(i,c)))&&(d(o.slice(c,r),""),c=r+i.length,d(o.slice(r,c),"completion-highlight"));d(o.slice(c,o.length),""),t.meta&&n.push({type:"completion-meta",value:t.meta}),t.message&&n.push({type:"completion-message",value:t.message})}return n;function d(e,i){e&&n.push({type:(t.className||"")+(i||""),value:e})}},e.$updateOnChange=t,e.start=t,a.session.$computeWidth=function(){return this.screenWidth=0},a.isOpen=!1,a.isTopdown=!1,a.autoSelect=!0,a.filterText="",a.data=[],a.setData=function(e,t){a.filterText=t||"",a.setValue(u.stringRepeat("\n",e.length),-1),a.data=e||[],a.setRow(0)},a.getData=function(e){return a.data[e]},a.getRow=function(){return g.start.row},a.setRow=function(e){e=Math.max(this.autoSelect?0:-1,Math.min(this.data.length,e)),g.start.row!=e&&(a.selection.clearSelection(),g.start.row=g.end.row=e||0,a.session._emit("changeBackMarker"),a.moveCursorTo(e||0,0),a.isOpen)&&a._signal("select")},a.on("changeSelection",(function(){a.isOpen&&a.setRow(a.selection.lead.row),a.renderer.scrollCursorIntoView()})),a.hide=function(){this.container.style.display="none",a.anchorPos=null,a.anchor=null,a.isOpen&&(a.isOpen=!1,this._signal("hide"))},a.tryShow=function(e,t,n,i){if(i||!a.isOpen||!a.anchorPos||!a.anchor||a.anchorPos.top!==e.top||a.anchorPos.left!==e.left||a.anchor!==n){var r=this.container,s=window.innerHeight,l=window.innerWidth,c=this.renderer,u=c.$maxLines*t*1.4,h={top:0,bottom:0,left:0},d=s-e.top-3*this.$borderSize-t,p=e.top-3*this.$borderSize;if("top"===(n=n||(p<=d||u<=d?"bottom":"top"))?(h.bottom=e.top-this.$borderSize,h.top=h.bottom-u):"bottom"===n&&(h.top=e.top+t+this.$borderSize,h.bottom=h.top+u),t=0<=h.top&&h.bottom<=s,!i&&!t)return!1;c.$maxPixelHeight=t?null:"top"===n?p:d,"top"===n?(r.style.top="",r.style.bottom=s-h.bottom+"px",a.isTopdown=!1):(r.style.top=h.top+"px",r.style.bottom="",a.isTopdown=!0),r.style.display="",(u=e.left)+r.offsetWidth>l&&(u=l-r.offsetWidth),r.style.left=u+"px",r.style.right="",a.isOpen||(a.isOpen=!0,this._signal("show"),o=null),a.anchorPos=e,a.anchor=n}return!0},a.show=function(e,t,n){this.tryShow(e,t,n?"bottom":void 0,!0)},a.goTo=function(e){var t=this.getRow(),n=this.session.getLength()-1;switch(e){case"up":t=t<=0?n:t-1;break;case"down":t=n<=t?-1:t+1;break;case"start":t=0;break;case"end":t=n}this.setRow(t)},a.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},a.$imageSize=0,a.$borderSize=1,a}var s=e("../virtual_renderer").VirtualRenderer,a=e("../editor").Editor,l=e("../range").Range,c=e("../lib/event"),u=e("../lib/lang"),h=e("../lib/dom"),d=e("../config").nls;h.importCssString("\n.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #CAD6FA;\n z-index: 1;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #3a674e;\n}\n.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid #abbffe;\n margin-top: -1px;\n background: rgba(233,233,253,0.4);\n position: absolute;\n z-index: 2;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid rgba(109, 150, 13, 0.8);\n background: rgba(58, 103, 78, 0.62);\n}\n.ace_completion-meta {\n opacity: 0.5;\n margin: 0 0.9em;\n}\n.ace_completion-message {\n color: blue;\n}\n.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #2d69c7;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #93ca12;\n}\n.ace_editor.ace_autocomplete {\n width: 300px;\n z-index: 200000;\n border: 1px lightgray solid;\n position: fixed;\n box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n line-height: 1.4;\n background: #fefefe;\n color: #111;\n}\n.ace_dark.ace_editor.ace_autocomplete {\n border: 1px #484747 solid;\n box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);\n line-height: 1.4;\n background: #25282c;\n color: #c1c1c1;\n}\n.ace_autocomplete_right .ace_text-layer {\n width: calc(100% - 8px);\n}\n.ace_autocomplete_right .ace_line {\n display: flex;\n}\n.ace_autocomplete_right .ace_completion-meta {\n flex: 1;\n text-align: right;\n}\n","autocompletion.css",!1),t.AcePopup=o,t.$singleLineEditor=r,t.getAriaId=i})),ace.define("ace/autocomplete/inline",["require","exports","module","ace/snippets"],(function(e,t,n){"use strict";var i=e("../snippets").snippetManager;function r(){this.editor=null}r.prototype.show=function(e,t,n){return n=n||"",e&&this.editor&&this.editor!==e&&(this.hide(),this.editor=null),!(!e||!t||!(t=t.snippet?i.getDisplayTextForSnippet(e,t.snippet):t.value)||!t.startsWith(n)||(this.editor=e,""===(t=t.slice(n.length))?e.removeGhostText():e.setGhostText(t),0))},r.prototype.isOpen=function(){return!!this.editor&&!!this.editor.renderer.$ghostText},r.prototype.hide=function(){return!!this.editor&&(this.editor.removeGhostText(),!0)},r.prototype.destroy=function(){this.hide(),this.editor=null},t.AceInline=r})),ace.define("ace/autocomplete/util",["require","exports","module"],(function(e,t,n){"use strict";t.parForEach=function(e,t,n){var i=0,r=e.length;0===r&&n();for(var o=0;o<r;o++)t(e[o],(function(e,t){++i===r&&n(e,t)}))};var i=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;t.retrievePrecedingIdentifier=function(e,t,n){n=n||i;for(var r=[],o=t-1;0<=o&&n.test(e[o]);o--)r.push(e[o]);return r.reverse().join("")},t.retrieveFollowingIdentifier=function(e,t,n){n=n||i;for(var r=[],o=t;o<e.length&&n.test(e[o]);o++)r.push(e[o]);return r},t.getCompletionPrefix=function(e){var t,n=e.getCursorPosition(),i=e.session.getLine(n.row);return e.completers.forEach(function(e){e.identifierRegexps&&e.identifierRegexps.forEach(function(e){!t&&e&&(t=this.retrievePrecedingIdentifier(i,n.column,e))}.bind(this))}.bind(this)),t||this.retrievePrecedingIdentifier(i,n.column)}})),ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/inline","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/lang","ace/lib/dom","ace/snippets","ace/config"],(function(e,t,n){"use strict";function i(e,t){t.completer&&t.completer.destroy()}var r=e("./keyboard/hash_handler").HashHandler,o=e("./autocomplete/popup").AcePopup,s=e("./autocomplete/inline").AceInline,a=e("./autocomplete/popup").getAriaId,l=e("./autocomplete/util"),c=e("./lib/lang"),u=e("./lib/dom"),h=e("./snippets").snippetManager,d=e("./config"),p=(g.prototype.$init=function(){return this.popup=new o(document.body||document.documentElement),this.popup.on("click",function(e){this.insertMatch(),e.stop()}.bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on("show",this.$onPopupChange.bind(this)),this.popup.on("hide",this.$onHidePopup.bind(this)),this.popup.on("select",this.$onPopupChange.bind(this)),this.popup.on("changeHoverMarker",this.tooltipTimer.bind(null,null)),this.popup},g.prototype.$initInline=function(){if(this.inlineEnabled&&!this.inlineRenderer)return this.inlineRenderer=new s,this.inlineRenderer},g.prototype.getPopup=function(){return this.popup||this.$init()},g.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip()},g.prototype.$onPopupChange=function(e){var t;this.inlineRenderer&&this.inlineEnabled&&(e=e?null:this.popup.getData(this.popup.getRow()),t=l.getCompletionPrefix(this.editor),this.inlineRenderer.show(this.editor,e,t)||this.inlineRenderer.hide(),this.$updatePopupPosition()),this.tooltipTimer.call(null,null)},g.prototype.$updatePopupPosition=function(){var e=this.editor,t=e.renderer,n=t.layerConfig.lineHeight,i=t.$cursorLayer.getPixelPosition(this.base,!0),r=(i.left-=this.popup.getTextLeftOffset(),e.container.getBoundingClientRect());i.top+=r.top-t.layerConfig.offset,i.left+=r.left-e.renderer.scrollLeft,i.left+=t.gutterWidth,r={top:i.top,left:i.left},t.$ghostText&&t.$ghostTextWidget&&this.base.row===t.$ghostText.position.row&&(r.top+=t.$ghostTextWidget.el.offsetHeight),this.popup.tryShow(r,n,"bottom")||this.popup.tryShow(i,n,"top")||this.popup.show(i,n)},g.prototype.openPopup=function(e,t,n){this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:a(this.popup.getRow()),inline:this.inlineEnabled}),e.keyBinding.addKeyboardHandler(this.keyboardHandler),this.popup.setRow(this.autoSelect?0:-1),n?t||this.detach():(this.popup.setTheme(e.getTheme()),this.popup.setFontSize(e.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel()},g.prototype.detach=function(){this.editor&&(this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener),this.editor.off("mousedown",this.mousedownListener),this.editor.off("mousewheel",this.mousewheelListener)),this.changeTimer.cancel(),this.hideDocTooltip(),this.completionProvider&&this.completionProvider.detach(),this.popup&&this.popup.isOpen&&this.popup.hide(),this.base&&this.base.detach(),this.activated=!1,this.completionProvider=this.completions=this.base=null},g.prototype.changeListener=function(e){var t=this.editor.selection.lead;(t.row!=this.base.row||t.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},g.prototype.blurListener=function(e){var t=document.activeElement,n=this.editor.textInput.getElement(),i=e.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(e.relatedTarget),r=this.popup&&this.popup.container;t==n||t.parentNode==r||i||t==this.tooltipNode||e.relatedTarget==n||this.detach()},g.prototype.mousedownListener=function(e){this.detach()},g.prototype.mousewheelListener=function(e){this.detach()},g.prototype.goTo=function(e){this.popup.goTo(e)},g.prototype.insertMatch=function(e,t){var n;return!!(e=e||this.popup.getData(this.popup.getRow()))&&(n=this.completions,e=this.getCompletionProvider().insertMatch(this.editor,e,n.filterText,t),this.completions==n&&this.detach(),e)},g.prototype.showPopup=function(e,t){this.editor&&this.detach(),this.activated=!0,(this.editor=e).completer!=this&&(e.completer&&e.completer.detach(),e.completer=this),e.on("changeSelection",this.changeListener),e.on("blur",this.blurListener),e.on("mousedown",this.mousedownListener),e.on("mousewheel",this.mousewheelListener),this.updateCompletions(!1,t)},g.prototype.getCompletionProvider=function(){return this.completionProvider||(this.completionProvider=new f),this.completionProvider},g.prototype.gatherCompletions=function(e,t){return this.getCompletionProvider().gatherCompletions(e,t)},g.prototype.updateCompletions=function(e,t){var n,i;return e&&this.base&&this.completions?(n=this.editor.getCursorPosition(),(i=this.editor.session.getTextRange({start:this.base,end:n}))==this.completions.filterText?void 0:(this.completions.setFilter(i),this.completions.filtered.length&&(1!=this.completions.filtered.length||this.completions.filtered[0].value!=i||this.completions.filtered[0].snippet)?void this.openPopup(this.editor,i,e):this.detach())):t&&t.matches?(n=this.editor.getSelectionRange().start,this.base=this.editor.session.doc.createAnchor(n.row,n.column),this.base.$insertRight=!0,this.completions=new v(t.matches),this.openPopup(this.editor,"",e)):(t=this.editor.getSession(),n=this.editor.getCursorPosition(),i=l.getCompletionPrefix(this.editor),this.base=t.doc.createAnchor(n.row,n.column-i.length),this.base.$insertRight=!0,t={exactMatch:this.exactMatch},void this.getCompletionProvider().provideCompletions(this.editor,t,function(t,n,i){var r=n.filtered,o=l.getCompletionPrefix(this.editor);if(i){if(!r.length)return this.detach();if(1==r.length&&r[0].value==o&&!r[0].snippet)return this.detach();if(this.autoInsert&&1==r.length)return this.insertMatch(r[0])}this.completions=n,this.openPopup(this.editor,o,e)}.bind(this)))},g.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},g.prototype.updateDocTooltip=function(){var e=this.popup,t=e.data,n=t&&(t[e.getHoveredRow()]||t[e.getRow()]),i=null;if(!n||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var r=this.editor.completers.length,o=0;o<r;o++){var s=this.editor.completers[o];if(s.getDocTooltip&&n.completerId===s.id){i=s.getDocTooltip(n);break}}if(!(i="string"==typeof(i=i||"string"==typeof n?i:n)?{docText:i}:i)||!i.docHTML&&!i.docText)return this.hideDocTooltip();this.showDocTooltip(i)},g.prototype.showDocTooltip=function(e){this.tooltipNode||(this.tooltipNode=u.createElement("div"),this.tooltipNode.style.margin=0,this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this));var t=this.editor.renderer.theme,n=(this.tooltipNode.className="ace_tooltip ace_doc-tooltip "+(t.isDark?"ace_dark ":"")+(t.cssClass||""),t=this.tooltipNode,(e.docHTML?t.innerHTML=e.docHTML:e.docText&&(t.textContent=e.docText),t.parentNode||document.body.appendChild(t),e=this.popup).container.getBoundingClientRect());t.style.top=e.container.style.top,t.style.bottom=e.container.style.bottom,t.style.display="block",window.innerWidth-n.right<320?n.left<320?(e.isTopdown?t.style.top=n.bottom+"px":t.style.top=e.container.offsetTop-t.offsetHeight+"px",t.style.left=n.left+"px",t.style.right="",t.style.bottom=""):(t.style.right=window.innerWidth-n.left+"px",t.style.left=""):(t.style.left=n.right+1+"px",t.style.right="")},g.prototype.hideDocTooltip=function(){var e;this.tooltipTimer.cancel(),this.tooltipNode&&(e=this.tooltipNode,this.editor.isFocused()||document.activeElement!=e||this.editor.focus(),this.tooltipNode=null,e.parentNode)&&e.parentNode.removeChild(e)},g.prototype.onTooltipClick=function(e){for(var t=e.target;t&&t!=this.tooltipNode;){if("A"==t.nodeName&&t.href){t.rel="noreferrer",t.target="_blank";break}t=t.parentNode}},g.prototype.destroy=function(){var e;this.detach(),this.popup&&(this.popup.destroy(),e=this.popup.container)&&e.parentNode&&e.parentNode.removeChild(e),this.editor&&this.editor.completer==this&&(this.editor.off("destroy",i),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},g);function g(){this.autoInsert=!1,this.autoSelect=!0,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new r,this.keyboardHandler.bindKeys(this.commands),this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.changeTimer=c.delayedCall(function(){this.updateCompletions(!0)}.bind(this)),this.tooltipTimer=c.delayedCall(this.updateDocTooltip.bind(this),50)}p.prototype.commands={Up:function(e){e.completer.goTo("up")},Down:function(e){e.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(e){e.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(e){e.completer.goTo("end")},Esc:function(e){e.completer.detach()},Return:function(e){return e.completer.insertMatch()},"Shift-Return":function(e){e.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(e){var t=e.completer.insertMatch();if(t||e.tabstopManager)return t;e.completer.goTo("down")},PageUp:function(e){e.completer.popup.gotoPageUp()},PageDown:function(e){e.completer.popup.gotoPageDown()}},p.for=function(e){return e.completer instanceof p||(e.completer&&(e.completer.destroy(),e.completer=null),d.get("sharedPopups")?(p.$sharedInstance||(p.$sharedInstance=new p),e.completer=p.$sharedInstance):(e.completer=new p,e.once("destroy",i))),e.completer},p.startCommand={name:"startAutocomplete",exec:function(e,t){var n=p.for(e);n.autoInsert=!1,n.autoSelect=!0,n.showPopup(e,t),n.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"},m.prototype.insertByIndex=function(e,t,n){return!(!this.completions||!this.completions.filtered)&&this.insertMatch(e,this.completions.filtered[t],n)},m.prototype.insertMatch=function(e,t,n){if(!t)return!1;if(e.startOperation({command:{name:"insertMatch"}}),t.completer&&t.completer.insertMatch)t.completer.insertMatch(e,t);else{if(!this.completions)return!1;if(this.completions.filterText)for(var i,r=e.selection.getAllRanges?e.selection.getAllRanges():[e.getSelectionRange()],o=0;i=r[o];o++)i.start.column-=this.completions.filterText.length,e.session.remove(i);t.snippet?h.insertSnippet(e,t.snippet,{range:t.range}):this.$insertString(e,t),t.command&&"startAutocomplete"===t.command&&e.execCommand(t.command)}return e.endOperation(),!0},m.prototype.$insertString=function(e,t){var n=t.value||t;if(t.range){if(e.inVirtualSelectionMode)return e.session.replace(t.range,n);e.forEachSelection((function(){var i=e.getSelectionRange();0===t.range.compareRange(i)?e.session.replace(t.range,n):e.insert(n)}),null,{keepOrder:!0})}else e.execCommand("insertstring",n)},m.prototype.gatherCompletions=function(e,t){var n=e.getSession(),i=e.getCursorPosition(),r=l.getCompletionPrefix(e),o=[],s=e.completers.length;return e.completers.forEach((function(a,c){a.getCompletions(e,n,i,r,(function(n,i){!n&&i&&(o=o.concat(i)),t(null,{prefix:l.getCompletionPrefix(e),matches:o,finished:0==--s})}))})),!0},m.prototype.provideCompletions=function(e,t,n){var i=function(e){var i=e.prefix,r=e.matches;this.completions=new v(r),t.exactMatch&&(this.completions.exactMatch=!0),t.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(i),(e.finished||this.completions.filtered.length)&&n(null,this.completions,e.finished)}.bind(this),r=!0,o=null;this.gatherCompletions(e,function(e,t){this.active&&(e&&(n(e,[],!0),this.detach()),0===t.prefix.indexOf(t.prefix))&&(r?o=t:i(t))}.bind(this)),r=!1,o&&(e=o,o=null,i(e))},m.prototype.detach=function(){this.active=!1};var f=m;function m(){this.active=!0}y.prototype.setFilter=function(e){t=e.length>this.filterText&&0===e.lastIndexOf(this.filterText,0)?this.filtered:this.all,this.filterText=e,t=(t=this.filterCompletions(t,this.filterText)).sort((function(e,t){return t.exactMatch-e.exactMatch||t.$score-e.$score||(e.caption||e.value).localeCompare(t.caption||t.value)}));var t,n=null;t=t.filter((function(e){return(e=e.snippet||e.caption||e.value)!==n&&(n=e,!0)})),this.filtered=t},y.prototype.filterCompletions=function(e,t){var n=[],i=t.toUpperCase(),r=t.toLowerCase();e:for(var o,s=0;o=e[s];s++){var a=!this.ignoreCaption&&o.caption||o.value||o.snippet;if(a){var l=-1,c=0,u=0;if(this.exactMatch){if(t!==a.substr(0,t.length))continue}else{var h=a.toLowerCase().indexOf(r);if(-1<h)u=h;else for(var d=0;d<t.length;d++){var p=a.indexOf(r[d],l+1),g=a.indexOf(i[d],l+1);if((p=0<=p&&(g<0||p<g)?p:g)<0)continue e;0<(g=p-l-1)&&(-1===l&&(u+=10),u+=g,c|=1<<d),l=p}}o.matchMask=c,o.exactMatch=u?0:1,o.$score=(o.score||0)-u,n.push(o)}}return n};var v=y;function y(e,t){this.all=e,this.filtered=e,this.filterText=t||"",this.exactMatch=!1,this.ignoreCaption=!1}t.Autocomplete=p,t.CompletionProvider=f,t.FilteredList=v})),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],(function(e,t,n){var i=e("../range").Range,r=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;function o(e,t){var n=e.getTextRange(i.fromPoints({row:0,column:0},t)).split(r).length-1,o=e.getValue().split(r),s=Object.create(null),a=o[n];return o.forEach((function(e,t){e&&e!==a&&(t=Math.abs(n-t),t=o.length-t,s[e]?s[e]=Math.max(t,s[e]):s[e]=t)})),s}t.getCompletions=function(e,t,n,i,r){var s=o(t,n);r(null,Object.keys(s).map((function(e){return{caption:e,value:e,score:s[e],meta:"local"}})))}})),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/autocomplete/text_completer","ace/editor","ace/config"],(function(e,t,n){"use strict";function i(e,t){f(t.session.$mode)}function r(e){var t=e.editor,n=t.completer&&t.completer.activated;"backspace"===e.command.name?n&&!c.getCompletionPrefix(t)&&t.completer.detach():"insertstring"===e.command.name&&c.getCompletionPrefix(t)&&!n&&((e=s.for(t)).autoInsert=!1,e.showPopup(t))}var o=e("../snippets").snippetManager,s=e("../autocomplete").Autocomplete,a=e("../config"),l=e("../lib/lang"),c=e("../autocomplete/util"),u=e("../autocomplete/text_completer"),h={getCompletions:function(e,t,n,i,r){if(t.$mode.completer)return t.$mode.completer.getCompletions(e,t,n,i,r);e=e.session.getState(n.row),r(null,t.$mode.getCompletions(e,t,n,i).map((function(e){return e.completerId=h.id,e})))},id:"keywordCompleter"},d={getCompletions:function(e,t,n,i,r){var s=[],a=((t=t.getTokenAt(n.row,n.column))&&t.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?s.push("html-tag"):s=o.getActiveScopes(e),o.snippetMap),l=[];s.forEach((function(e){for(var t=a[e]||[],n=t.length;n--;){var i=t[n],r=i.name||i.tabTrigger;r&&l.push({caption:r,snippet:i.content,meta:i.tabTrigger&&!i.name?i.tabTrigger+"\u21e5 ":"snippet",completerId:d.id})}}),this),r(null,l)},getDocTooltip:function(e){var t;e.snippet&&!e.docHTML&&(e.docHTML=["<b>",l.escapeHTML(e.caption),"</b>","<hr></hr>",l.escapeHTML((e=e.snippet,t={},e.replace(/\${(\d+)(:(.*?))?}/g,(function(e,n,i,r){return t[n]=r||""})).replace(/\$(\d+?)/g,(function(e,n){return t[n]}))))].join(""))},id:"snippetCompleter"},p=[d,u,h],g=(t.setCompleters=function(e){p.length=0,e&&p.push.apply(p,e)},t.addCompleter=function(e){p.push(e)},t.textCompleter=u,t.keyWordCompleter=h,t.snippetCompleter=d,{name:"expandSnippet",exec:function(e){return o.expandWithTab(e)},bindKey:"Tab"}),f=function e(t){(t="string"==typeof t?a.$modes[t]:t)&&(o.files||(o.files={}),m(t.$id,t.snippetFileId),t.modes)&&t.modes.forEach(e)},m=function(e,t){t&&e&&!o.files[e]&&(o.files[e]={},a.loadModule(t,(function(t){t&&(!(o.files[e]=t).snippets&&t.snippetText&&(t.snippets=o.parseSnippetFile(t.snippetText)),o.register(t.snippets||[],t.scope),t.includeScopes)&&(o.snippetMap[t.scope].includeScopes=t.includeScopes,t.includeScopes.forEach((function(e){f("ace/mode/"+e)})))})))};u=e("../editor").Editor,e("../config").defineOptions(u.prototype,"editor",{enableBasicAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:p),this.commands.addCommand(s.startCommand)):this.commands.removeCommand(s.startCommand)},value:!1},enableLiveAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:p),this.commands.on("afterExec",r)):this.commands.removeListener("afterExec",r)},value:!1},enableSnippets:{set:function(e){e?(this.commands.addCommand(g),this.on("changeMode",i),i(0,this)):(this.commands.removeCommand(g),this.off("changeMode",i))},value:!1}})})),ace.require(["ace/ext/language_tools"],(function(t){e&&(e.exports=t)}))},3330:function(e,t,n){e=n.nmd(e),ace.define("ace/ext/searchbox.css",["require","exports","module"],(function(e,t,n){n.exports='\n\n/* ------------------------------------------------------------------------------------------\n * Editor Search Form\n * --------------------------------------------------------------------------------------- */\n.ace_search {\n background-color: #ddd;\n color: #666;\n border: 1px solid #cbcbcb;\n border-top: 0 none;\n overflow: hidden;\n margin: 0;\n padding: 4px 6px 0 4px;\n position: absolute;\n top: 0;\n z-index: 99;\n white-space: normal;\n}\n.ace_search.left {\n border-left: 0 none;\n border-radius: 0px 0px 5px 0px;\n left: 0;\n}\n.ace_search.right {\n border-radius: 0px 0px 0px 5px;\n border-right: 0 none;\n right: 0;\n}\n\n.ace_search_form, .ace_replace_form {\n margin: 0 20px 4px 0;\n overflow: hidden;\n line-height: 1.9;\n}\n.ace_replace_form {\n margin-right: 0;\n}\n.ace_search_form.ace_nomatch {\n outline: 1px solid red;\n}\n\n.ace_search_field {\n border-radius: 3px 0 0 3px;\n background-color: white;\n color: black;\n border: 1px solid #cbcbcb;\n border-right: 0 none;\n outline: 0;\n padding: 0;\n font-size: inherit;\n margin: 0;\n line-height: inherit;\n padding: 0 6px;\n min-width: 17em;\n vertical-align: top;\n min-height: 1.8em;\n box-sizing: content-box;\n}\n.ace_searchbtn {\n border: 1px solid #cbcbcb;\n line-height: inherit;\n display: inline-block;\n padding: 0 6px;\n background: #fff;\n border-right: 0 none;\n border-left: 1px solid #dcdcdc;\n cursor: pointer;\n margin: 0;\n position: relative;\n color: #666;\n}\n.ace_searchbtn:last-child {\n border-radius: 0 3px 3px 0;\n border-right: 1px solid #cbcbcb;\n}\n.ace_searchbtn:disabled {\n background: none;\n cursor: default;\n}\n.ace_searchbtn:hover {\n background-color: #eef1f6;\n}\n.ace_searchbtn.prev, .ace_searchbtn.next {\n padding: 0px 0.7em\n}\n.ace_searchbtn.prev:after, .ace_searchbtn.next:after {\n content: "";\n border: solid 2px #888;\n width: 0.5em;\n height: 0.5em;\n border-width: 2px 0 0 2px;\n display:inline-block;\n transform: rotate(-45deg);\n}\n.ace_searchbtn.next:after {\n border-width: 0 2px 2px 0 ;\n}\n.ace_searchbtn_close {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;\n border-radius: 50%;\n border: 0 none;\n color: #656565;\n cursor: pointer;\n font: 16px/16px Arial;\n padding: 0;\n height: 14px;\n width: 14px;\n top: 9px;\n right: 7px;\n position: absolute;\n}\n.ace_searchbtn_close:hover {\n background-color: #656565;\n background-position: 50% 100%;\n color: white;\n}\n\n.ace_button {\n margin-left: 2px;\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n -o-user-select: none;\n -ms-user-select: none;\n user-select: none;\n overflow: hidden;\n opacity: 0.7;\n border: 1px solid rgba(100,100,100,0.23);\n padding: 1px;\n box-sizing: border-box!important;\n color: black;\n}\n\n.ace_button:hover {\n background-color: #eee;\n opacity:1;\n}\n.ace_button:active {\n background-color: #ddd;\n}\n\n.ace_button.checked {\n border-color: #3399ff;\n opacity:1;\n}\n\n.ace_search_options{\n margin-bottom: 3px;\n text-align: right;\n -webkit-user-select: none;\n -moz-user-select: none;\n -o-user-select: none;\n -ms-user-select: none;\n user-select: none;\n clear: both;\n}\n\n.ace_search_counter {\n float: left;\n font-family: arial;\n padding: 0 8px;\n}'})),ace.define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/ext/searchbox.css","ace/keyboard/hash_handler","ace/lib/keys","ace/config"],(function(e,t,n){"use strict";var i=e("../lib/dom"),r=e("../lib/lang"),o=e("../lib/event"),s=e("./searchbox.css"),a=e("../keyboard/hash_handler").HashHandler,l=e("../lib/keys"),c=e("../config").nls,u=(i.importCssString(s,"ace_searchbox",!1),h.prototype.setEditor=function(e){e.searchBox=this,e.renderer.scroller.appendChild(this.element),this.editor=e},h.prototype.setSession=function(e){this.searchRange=null,this.$syncOptions(!0)},h.prototype.$initElements=function(e){this.searchBox=e.querySelector(".ace_search_form"),this.replaceBox=e.querySelector(".ace_replace_form"),this.searchOption=e.querySelector("[action=searchInSelection]"),this.replaceOption=e.querySelector("[action=toggleReplace]"),this.regExpOption=e.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=e.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=e.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field"),this.searchCounter=e.querySelector(".ace_search_counter")},h.prototype.$init=function(){var e=this.element,t=(this.$initElements(e),this);o.addListener(e,"mousedown",(function(e){setTimeout((function(){t.activeInput.focus()}),0),o.stopPropagation(e)})),o.addListener(e,"click",(function(e){var n=(e.target||e.srcElement).getAttribute("action");n&&t[n]?t[n]():t.$searchBarKb.commands[n]&&t.$searchBarKb.commands[n].exec(t),o.stopPropagation(e)})),o.addCommandKeyListener(e,(function(e,n,i){i=l.keyCodeToString(i),(n=t.$searchBarKb.findKeyCommand(n,i))&&n.exec&&(n.exec(t),o.stopEvent(e))})),this.$onChange=r.delayedCall((function(){t.find(!1,!1)})),o.addListener(this.searchInput,"input",(function(){t.$onChange.schedule(20)})),o.addListener(this.searchInput,"focus",(function(){t.activeInput=t.searchInput,t.searchInput.value&&t.highlight()})),o.addListener(this.replaceInput,"focus",(function(){t.activeInput=t.replaceInput,t.searchInput.value&&t.highlight()}))},h.prototype.setSearchRange=function(e){(this.searchRange=e)?this.searchRangeMarker=this.editor.session.addMarker(e,"ace_active-line"):this.searchRangeMarker&&(this.editor.session.removeMarker(this.searchRangeMarker),this.searchRangeMarker=null)},h.prototype.$syncOptions=function(e){i.setCssClass(this.replaceOption,"checked",this.searchRange),i.setCssClass(this.searchOption,"checked",this.searchOption.checked),this.replaceOption.textContent=this.replaceOption.checked?"-":"+",i.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),i.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),i.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked);var t=this.editor.getReadOnly();this.replaceOption.style.display=t?"none":"",this.replaceBox.style.display=this.replaceOption.checked&&!t?"":"none",this.find(!1,!1,e)},h.prototype.highlight=function(e){this.editor.session.highlight(e||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},h.prototype.find=function(e,t,n){e=!this.editor.find(this.searchInput.value,{skipCurrent:e,backwards:t,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked,preventScroll:n,range:this.searchRange})&&this.searchInput.value,i.setCssClass(this.searchBox,"ace_nomatch",e),this.editor._emit("findSearchBox",{match:!e}),this.highlight(),this.updateCounter()},h.prototype.updateCounter=function(){var e=this.editor,t=e.$search.$options.re,n=0,i=0;if(t){var r,o,s=this.searchRange?e.session.getTextRange(this.searchRange):e.getValue(),a=e.session.doc.positionToIndex(e.selection.anchor);for(this.searchRange&&(a-=e.session.doc.positionToIndex(this.searchRange.start)),t.lastIndex=0;(o=t.exec(s))&&((r=o.index)<=a&&i++,!(999<++n))&&(o[0]||(t.lastIndex=r+=1,!(r>=s.length))););}this.searchCounter.textContent=c("$0 of $1",[i,999<n?"999+":n])},h.prototype.findNext=function(){this.find(!0,!1)},h.prototype.findPrev=function(){this.find(!0,!0)},h.prototype.findAll=function(){var e=!this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked})&&this.searchInput.value;i.setCssClass(this.searchBox,"ace_nomatch",e),this.editor._emit("findSearchBox",{match:!e}),this.highlight(),this.hide()},h.prototype.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},h.prototype.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},h.prototype.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},h.prototype.hide=function(){this.active=!1,this.setSearchRange(null),this.editor.off("changeSession",this.setSession),this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},h.prototype.show=function(e,t){this.active=!0,this.editor.on("changeSession",this.setSession),this.element.style.display="",this.replaceOption.checked=t,e&&(this.searchInput.value=e),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},h.prototype.isFocused=function(){var e=document.activeElement;return e==this.searchInput||e==this.replaceInput},h);function h(e,t,n){var r=i.createElement("div");i.buildDom(["div",{class:"ace_search right"},["span",{action:"hide",class:"ace_searchbtn_close"}],["div",{class:"ace_search_form"},["input",{class:"ace_search_field",placeholder:c("Search for"),spellcheck:"false"}],["span",{action:"findPrev",class:"ace_searchbtn prev"},"\u200b"],["span",{action:"findNext",class:"ace_searchbtn next"},"\u200b"],["span",{action:"findAll",class:"ace_searchbtn",title:"Alt-Enter"},c("All")]],["div",{class:"ace_replace_form"},["input",{class:"ace_search_field",placeholder:c("Replace with"),spellcheck:"false"}],["span",{action:"replaceAndFindNext",class:"ace_searchbtn"},c("Replace")],["span",{action:"replaceAll",class:"ace_searchbtn"},c("All")]],["div",{class:"ace_search_options"},["span",{action:"toggleReplace",class:"ace_button",title:c("Toggle Replace mode"),style:"float:left;margin-top:-2px;padding:0 5px;"},"+"],["span",{class:"ace_search_counter"}],["span",{action:"toggleRegexpMode",class:"ace_button",title:c("RegExp Search")},".*"],["span",{action:"toggleCaseSensitive",class:"ace_button",title:c("CaseSensitive Search")},"Aa"],["span",{action:"toggleWholeWords",class:"ace_button",title:c("Whole Word Search")},"\\b"],["span",{action:"searchInSelection",class:"ace_button",title:c("Search In Selection")},"S"]]],r),this.element=r.firstChild,this.setSession=this.setSession.bind(this),this.$init(),this.setEditor(e),i.importCssString(s,"ace_searchbox",e.container)}(e=new a).bindKeys({"Ctrl-f|Command-f":function(e){var t=e.isReplace=!e.isReplace;e.replaceBox.style.display=t?"":"none",e.replaceOption.checked=!1,e.$syncOptions(),e.searchInput.focus()},"Ctrl-H|Command-Option-F":function(e){e.editor.getReadOnly()||(e.replaceOption.checked=!0,e.$syncOptions(),e.replaceInput.focus())},"Ctrl-G|Command-G":function(e){e.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(e){e.findPrev()},esc:function(e){setTimeout((function(){e.hide()}))},Return:function(e){e.activeInput==e.replaceInput&&e.replace(),e.findNext()},"Shift-Return":function(e){e.activeInput==e.replaceInput&&e.replace(),e.findPrev()},"Alt-Return":function(e){e.activeInput==e.replaceInput&&e.replaceAll(),e.findAll()},Tab:function(e){(e.activeInput==e.replaceInput?e.searchInput:e.replaceInput).focus()}}),e.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(e){e.regExpOption.checked=!e.regExpOption.checked,e.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(e){e.caseSensitiveOption.checked=!e.caseSensitiveOption.checked,e.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(e){e.wholeWordOption.checked=!e.wholeWordOption.checked,e.$syncOptions()}},{name:"toggleReplace",exec:function(e){e.replaceOption.checked=!e.replaceOption.checked,e.$syncOptions()}},{name:"searchInSelection",exec:function(e){e.searchOption.checked=!e.searchRange,e.setSearchRange(e.searchOption.checked&&e.editor.getSelectionRange()),e.$syncOptions()}}]),a=new a([{bindKey:"Esc",name:"closeSearchBar",exec:function(e){e.searchBox.hide()}}]),u.prototype.$searchBarKb=e,u.prototype.$closeSearchBarKb=a,t.SearchBox=u,t.Search=function(e,t){(e.searchBox||new u(e)).show(e.session.getTextRange(),t)}})),ace.require(["ace/ext/searchbox"],(function(t){e&&(e.exports=t)}))},4091:function(e,t,n){e=n.nmd(e),ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],(function(e,t,n){"use strict";function i(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"text",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"punctuation.operator",regex:/[,]/},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}}var r=e("../lib/oop");e=e("./text_highlight_rules").TextHighlightRules,r.inherits(i,e),t.JsonHighlightRules=i})),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],(function(e,t,n){"use strict";function i(){}var r=e("../range").Range;(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n,i=e.getLine(t).match(/^(\s*\})/);return i&&(i=i[1].length,n=e.findMatchingBracket({row:t,column:i}))&&n.row!=t?(n=this.$getIndent(e.getLine(n.row)),void e.replace(new r(t,0,t,i-1),n)):0},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i})),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],(function(e,t,n){"use strict";var i=e("../../lib/oop"),r=e("../../range").Range;e=e("./fold_mode").FoldMode,t=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))},i.inherits(t,e),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var i=e.getLine(n);return!this.singleLineBlockCommentRe.test(i)||this.startRegionRe.test(i)||this.tripleStarBlockCommentRe.test(i)?!(e=this._getFoldWidgetBase(e,t,n))&&this.startRegionRe.test(i)?"start":e:""},this.getFoldWidgetRange=function(e,t,n,i){var r,o,s,a=e.getLine(n);return this.startRegionRe.test(a)?this.getCommentRegionBlock(e,a,n):(o=a.match(this.foldingStartMarker))?(s=o.index,o[1]?this.openingBracketBlock(e,o[1],n,s):((r=e.getCommentFoldRange(n,s+o[0].length,1))&&!r.isMultiLine()&&(i?r=this.getSectionRange(e,n):"all"!=t&&(r=null)),r)):"markbegin"!==t&&(o=a.match(this.foldingStopMarker))?(s=o.index+o[0].length,o[1]?this.closingBracketBlock(e,o[1],n,s):e.getCommentFoldRange(n,s,-1)):void 0},this.getSectionRange=function(e,t){for(var n=(l=e.getLine(t)).search(/\S/),i=t,o=l.length,s=t+=1,a=e.getLength();++t<a;){var l,c=(l=e.getLine(t)).search(/\S/);if(-1!==c){if(c<n)break;var u=this.getFoldWidgetRange(e,"all",t);if(u){if(u.start.row<=i)break;if(u.isMultiLine())t=u.end.row;else if(n==c)break}s=t}}return new r(i,o,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var i=t.search(/\s*$/),o=e.getLength(),s=n,a=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,l=1;++n<o;){t=e.getLine(n);var c=a.exec(t);if(c&&(c[1]?l--:l++,!l))break}if(s<n)return new r(s,i,n,t.length)}}.call(t.prototype)})),ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/worker/worker_client"],(function(e,t,n){"use strict";function i(){this.HighlightRules=s,this.$outdent=new a,this.$behaviour=new l,this.foldingRules=new c}var r=e("../lib/oop"),o=e("./text").Mode,s=e("./json_highlight_rules").JsonHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,l=e("./behaviour/cstyle").CstyleBehaviour,c=e("./folding/cstyle").FoldMode,u=e("../worker/worker_client").WorkerClient;r.inherits(i,o),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var i=this.$getIndent(t);return"start"==e&&t.match(/^.*[\{\(\[]\s*$/)&&(i+=n),i},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new u(["ace"],"ace/mode/json_worker","JsonWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",(function(t){e.setAnnotations(t.data)})),t.on("terminate",(function(){e.clearAnnotations()})),t},this.$id="ace/mode/json"}.call(i.prototype),t.Mode=i})),ace.require(["ace/mode/json"],(function(t){e&&(e.exports=t)}))},8903:function(e,t,n){"use strict";var i=n(5689),r=n(3969),o=n(5255),s=n(4293),a=n(3508),l=n(3368),c=n(742),u=n(9394),h=n(3724),d=((e.exports=f).prototype.validate=function(e,t){var n;if("string"==typeof e){if(!(n=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else n=(e=this._addSchema(e)).validate||this._compile(e);return e=n(t),!0!==n.$async&&(this.errors=n.errors),e},f.prototype.compile=function(e,t){return(e=this._addSchema(e,void 0,t)).validate||this._compile(e)},f.prototype.addSchema=function(e,t,n,i){if(Array.isArray(e))for(var o=0;o<e.length;o++)this.addSchema(e[o],void 0,n,i);else{var s=this._getId(e);if(void 0!==s&&"string"!=typeof s)throw new Error("schema id must be string");I(this,t=r.normalizeId(t||s)),this._schemas[t]=this._addSchema(e,n,i,!0)}return this},f.prototype.addMetaSchema=function(e,t,n){return this.addSchema(e,t,n,!0),this},f.prototype.validateSchema=function(e,t){var n=e.$schema;if(void 0!==n&&"string"!=typeof n)throw new Error("$schema must be a string");if(!(n=n||this._opts.defaultMeta||function(e){var t=e._opts.meta;return e._opts.defaultMeta="object"==typeof t?e._getId(t)||t:e.getSchema(d)?d:void 0,e._opts.defaultMeta}(this)))return this.logger.warn("meta-schema not available"),!(this.errors=null);if(!(n=this.validate(n,e))&&t){if(e="schema is invalid: "+this.errorsText(),"log"!=this._opts.validateSchema)throw new Error(e);this.logger.error(e)}return n},f.prototype.getSchema=function(e){var t=m(this,e);switch(typeof t){case"object":return t.validate||this._compile(t);case"string":return this.getSchema(t);case"undefined":return function(e,t){var n,o,a,l=r.schema.call(e,{schema:{}},t);if(l)return n=l.schema,o=l.root,l=l.baseId,a=i.call(e,n,o,void 0,l),e._fragments[t]=new s({ref:t,fragment:!0,schema:n,root:o,baseId:l,validate:a}),a}(this,e)}},f.prototype.removeSchema=function(e){if(e instanceof RegExp)v(this,this._schemas,e),v(this,this._refs,e);else switch(typeof e){case"undefined":return v(this,this._schemas),v(this,this._refs),this._cache.clear(),this;case"string":var t=m(this,e);return t&&this._cache.del(t.cacheKey),delete this._schemas[e],delete this._refs[e],this;case"object":t=(t=this._opts.serialize)?t(e):e,this._cache.del(t),(t=this._getId(e))&&(t=r.normalizeId(t),delete this._schemas[t],delete this._refs[t])}return this},f.prototype.addFormat=function(e,t){return"string"==typeof t&&(t=new RegExp(t)),this._formats[e]=t,this},f.prototype.errorsText=function(e,t){if(!(e=e||this.errors))return"No errors";for(var n=void 0===(t=t||{}).separator?", ":t.separator,i=void 0===t.dataVar?"data":t.dataVar,r="",o=0;o<e.length;o++){var s=e[o];s&&(r+=i+s.dataPath+" "+s.message+n)}return r.slice(0,-n.length)},f.prototype._addSchema=function(e,t,n,i){if("object"!=typeof e&&"boolean"!=typeof e)throw new Error("schema should be object or boolean");var o,a=(a=this._opts.serialize)?a(e):e,l=this._cache.get(a);if(l)return l;i=i||!1!==this._opts.addUsedSchema,(l=r.normalizeId(this._getId(e)))&&i&&I(this,l),(t=!1!==this._opts.validateSchema&&!t)&&!(o=l&&l==r.normalizeId(e.$schema))&&this.validateSchema(e,!0);var c=r.ids.call(this,e);return c=new s({id:l,schema:e,localRefs:c,cacheKey:a,meta:n}),"#"!=l[0]&&i&&(this._refs[l]=c),this._cache.put(a,c),t&&o&&this.validateSchema(e,!0),c},f.prototype._compile=function(e,t){if(e.compiling)return(e.validate=o).schema=e.schema,o.errors=null,o.root=t||o,!0===e.schema.$async&&(o.$async=!0),o;var n,r;e.compiling=!0,e.meta&&(n=this._opts,this._opts=this._metaOpts);try{r=i.call(this,e.schema,t,e.localRefs)}catch(t){throw delete e.validate,t}finally{e.compiling=!1,e.meta&&(this._opts=n)}return e.validate=r,e.refs=r.refs,e.refVal=r.refVal,e.root=r.root,r;function o(){var t=e.validate,n=t.apply(this,arguments);return o.errors=t.errors,n}},f.prototype.compileAsync=n(9677),e=n(7931),f.prototype.addKeyword=e.add,f.prototype.getKeyword=e.get,f.prototype.removeKeyword=e.remove,f.prototype.validateKeyword=e.validate,e=n(5359),f.ValidationError=e.Validation,f.MissingRefError=e.MissingRef,f.$dataMetaSchema=u,"http://json-schema.org/draft-07/schema"),p=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],g=["/properties"];function f(e){if(!(this instanceof f))return new f(e);e=this._opts=h.copy(e)||{};var t=(x=this)._opts.logger;if(!1===t)x.logger={log:A,warn:A,error:A};else{if(!("object"==typeof(t=void 0===t?console:t)&&t.log&&t.warn&&t.error))throw new Error("logger must implement log, warn and error methods");x.logger=t}if(this._schemas={},this._refs={},this._fragments={},this._formats=l(e.format),this._cache=e.cache||new o,this._loadingSchemas={},this._compilations=[],this.RULES=c(),this._getId=function(e){switch(e.schemaId){case"auto":return b;case"id":return y;default:return C}}(e),e.loopRequired=e.loopRequired||1/0,"property"==e.errorDataPath&&(e._errorDataPathProperty=!0),void 0===e.serialize&&(e.serialize=a),this._metaOpts=function(e){for(var t=h.copy(e._opts),n=0;n<p.length;n++)delete t[p[n]];return t}(this),e.formats){var i,r=this;for(i in r._opts.formats){var s=r._opts.formats[i];r.addFormat(i,s)}}if(e.keywords){var m,v=this;for(m in v._opts.keywords){var I=v._opts.keywords[m];v.addKeyword(m,I)}}var w,x,S=((x=this)._opts.$data&&(w=n(894),x.addMetaSchema(w,w.$id,!0)),!1!==x._opts.meta&&(w=n(6680),x._opts.$data&&(w=u(w,g)),x.addMetaSchema(w,d,!0),x._refs["http://json-schema.org/schema"]=d),"object"==typeof e.meta&&this.addMetaSchema(e.meta),e.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),this),k=S._opts.schemas;if(k)if(Array.isArray(k))S.addSchema(k);else for(var E in k)S.addSchema(k[E],E)}function m(e,t){return t=r.normalizeId(t),e._schemas[t]||e._refs[t]||e._fragments[t]}function v(e,t,n){for(var i in t){var r=t[i];r.meta||n&&!n.test(i)||(e._cache.del(r.cacheKey),delete t[i])}}function y(e){return e.$id&&this.logger.warn("schema $id ignored",e.$id),e.id}function C(e){return e.id&&this.logger.warn("schema id ignored",e.id),e.$id}function b(e){if(e.$id&&e.id&&e.$id!=e.id)throw new Error("schema $id is different from id");return e.$id||e.id}function I(e,t){if(e._schemas[t]||e._refs[t])throw new Error('schema with key or id "'+t+'" already exists')}function A(){}},5255:function(e){"use strict";(e=e.exports=function(){this._cache={}}).prototype.put=function(e,t){this._cache[e]=t},e.prototype.get=function(e){return this._cache[e]},e.prototype.del=function(e){delete this._cache[e]},e.prototype.clear=function(){this._cache={}}},9677:function(e,t,n){"use strict";var i=n(5359).MissingRef;function r(e,t,n){var o=this;if("function"!=typeof this._opts.loadSchema)throw new Error("options.loadSchema should be a function");"function"==typeof t&&(n=t,t=void 0);var s=a(e).then((function(){var n=o._addSchema(e,void 0,t);return n.validate||function e(r){try{return o._compile(r)}catch(n){if(n instanceof i)return s(n);throw n}function s(n){var i=n.missingSchema;if(l(i))throw new Error("Schema "+i+" is loaded but "+n.missingRef+" cannot be resolved");return(n=o._loadingSchemas[i])||(n=o._loadingSchemas[i]=o._opts.loadSchema(i)).then(s,s),n.then((function(e){if(!l(i))return a(e).then((function(){l(i)||o.addSchema(e,i,void 0,t)}))})).then((function(){return e(r)}));function s(){delete o._loadingSchemas[i]}function l(e){return o._refs[e]||o._schemas[e]}}}(n)}));return n&&s.then((function(e){n(null,e)}),n),s;function a(e){return(e=e.$schema)&&!o.getSchema(e)?r.call(o,{$ref:e},!0):Promise.resolve()}}e.exports=r},5359:function(e,t,n){"use strict";var i=n(3969);function r(e,t,n){this.message=n||r.message(e,t),this.missingRef=i.url(e,t),this.missingSchema=i.normalizeId(i.fullPath(this.missingRef))}function o(e){return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e}e.exports={Validation:o((function(e){this.message="validation failed",this.errors=e,this.ajv=this.validation=!0})),MissingRef:o(r)},r.message=function(e,t){return"can't resolve reference "+t+" from id "+e}},3368:function(e,t,n){"use strict";var i=n(3724),r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,o=[0,31,28,31,30,31,30,31,31,30,31,30,31],s=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,a=(n=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i),l=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,c=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,u=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,h=/^(?:\/(?:[^~/]|~0|~1)*)*$/,d=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,p=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function g(e){return i.copy(g[e="full"==e?"full":"fast"])}function f(e){var t,n;return!!(e=e.match(r))&&(t=+e[1],n=+e[2],e=+e[3],1<=n)&&n<=12&&1<=e&&e<=(2!=n||(e=t)%4!=0||e%100==0&&e%400!=0?o[n]:29)}function m(e,t){var n,i,r;return!!(e=e.match(s))&&(n=e[1],i=e[2],r=e[3],e=e[5],n<=23&&i<=59&&r<=59||23==n&&59==i&&60==r)&&(!t||e)}(e.exports=g).fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":l,url:c,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:n,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:b,uuid:u,"json-pointer":h,"json-pointer-uri-fragment":d,"relative-json-pointer":p},g.full={date:f,time:m,"date-time":function(e){return 2==(e=e.split(v)).length&&f(e[0])&&m(e[1],!0)},uri:function(e){return y.test(e)&&a.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":l,url:c,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:n,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:b,uuid:u,"json-pointer":h,"json-pointer-uri-fragment":d,"relative-json-pointer":p};var v=/t|\s/i,y=/\/|:/,C=/[^\\]\\Z/;function b(e){if(C.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}},5689:function(e,t,n){"use strict";var i=n(3969),r=n(3724),o=n(5359),s=n(3508),a=n(1869),l=r.ucs2length,c=n(2303),u=o.Validation;function h(e,t,n,y){var C=this,b=this._opts,I=[void 0],A={},w=[],x={},S=[],k={},E=[],T=function(e,t,n){var i=d.call(this,e,t,n);return 0<=i?{index:i,compiling:!0}:(i=this._compilations.length,this._compilations[i]={schema:e,root:t,baseId:n},{index:i,compiling:!1})}.call(this,e,t=t||{schema:e,refVal:I,refs:A},y),R=this._compilations[T.index];if(T.compiling)return R.callValidate=M;var _=this._formats,$=this.RULES;try{var L=P(e,t,n,y),N=(R.validate=L,R.callValidate);return N&&(N.schema=L.schema,N.errors=null,N.refs=L.refs,N.refVal=L.refVal,N.root=L.root,N.$async=L.$async,b.sourceCode)&&(N.source=L.source),L}finally{(function(e,t,n){0<=(e=d.call(this,e,t,n))&&this._compilations.splice(e,1)}).call(this,e,t,y)}function M(){var e=R.validate,t=e.apply(this,arguments);return M.errors=e.errors,t}function P(e,n,s,d){var y=!n||n.schema==e;if(n.schema!=t.schema)return h.call(C,e,n,s,d);s=!0===e.$async,d=a({isTop:!0,schema:e,isRoot:y,baseId:d,root:n,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:o.MissingRef,RULES:$,validate:a,util:r,resolve:i,resolveRef:O,usePattern:F,useDefault:H,useCustomRule:D,opts:b,formats:_,logger:C.logger,self:C}),d=v(I,f)+v(w,p)+v(S,g)+v(E,m)+d,b.processCode&&(d=b.processCode(d,e));try{var x=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",d)(C,$,_,t,I,S,E,c,l,u);I[0]=x}catch(e){throw C.logger.error("Error compiling schema, function code:",d),e}return x.schema=e,x.errors=null,x.refs=A,x.refVal=I,x.root=y?x:n,s&&(x.$async=!0),!0===b.sourceCode&&(x.source={code:d,patterns:w,defaults:S}),x}function O(e,r,o){r=i.url(e,r);var s=A[r];if(void 0!==s)return W(a=I[s],l="refVal["+s+"]");if(!o&&t.refs&&void 0!==(s=t.refs[r]))return W(a=t.refVal[s],l=B(r,a));var a,l=B(r);if(void 0!==(o=void 0===(o=i.call(C,P,t,r))&&(s=n&&n[r])?i.inlineRef(s,b.inlineRefs)?s:h.call(C,s,t,n,e):o))return a=o,s=A[s=r],I[s]=a,W(o,l);delete A[r]}function B(e,t){var n=I.length;return I[n]=t,"refVal"+(A[e]=n)}function W(e,t){return"object"==typeof e||"boolean"==typeof e?{code:t,schema:e,inline:!0}:{code:t,$async:e&&!!e.$async}}function F(e){var t=x[e];return void 0===t&&(t=x[e]=w.length,w[t]=e),"pattern"+t}function H(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return r.toQuotedString(e);case"object":var t,n;return null===e?"null":(t=s(e),void 0===(n=k[t])&&(n=k[t]=S.length,S[n]=e),"default"+n)}}function D(e,t,n,i){if(!1!==C._opts.validateSchema){if((o=e.definition.dependencies)&&!o.every((function(e){return Object.prototype.hasOwnProperty.call(n,e)})))throw new Error("parent schema must have all required keywords: "+o.join(","));if((o=e.definition.validateSchema)&&!o(t)){if(o="keyword schema is invalid: "+C.errorsText(o.errors),"log"!=C._opts.validateSchema)throw new Error(o);C.logger.error(o)}}var r,o=e.definition.compile,s=e.definition.inline,a=e.definition.macro;if(o)r=o.call(C,t,n,i);else if(a)r=a.call(C,t,n,i),!1!==b.validateSchema&&C.validateSchema(r,!0);else if(s)r=s.call(C,i,e.keyword,t,n);else if(!(r=e.definition.validate))return;if(void 0===r)throw new Error('custom keyword "'+e.keyword+'"failed to compile');return{code:"customRule"+(o=E.length),validate:E[o]=r}}}function d(e,t,n){for(var i=0;i<this._compilations.length;i++){var r=this._compilations[i];if(r.schema==e&&r.root==t&&r.baseId==n)return i}return-1}function p(e,t){return"var pattern"+e+" = new RegExp("+r.toQuotedString(t[e])+");"}function g(e){return"var default"+e+" = defaults["+e+"];"}function f(e,t){return void 0===t[e]?"":"var refVal"+e+" = refVal["+e+"];"}function m(e){return"var customRule"+e+" = customRules["+e+"];"}function v(e,t){if(!e.length)return"";for(var n="",i=0;i<e.length;i++)n+=t(i,e);return n}e.exports=h},3969:function(e,t,n){"use strict";var i=n(7533),r=n(2303),o=n(3724),s=n(4293),a=n(500);function l(e,t,n){var i,r,o,a=this._refs[n];if("string"==typeof a){if(!this._refs[a])return l.call(this,e,t,a);a=this._refs[a]}return(a=a||this._schemas[n])instanceof s?p(a.schema,this._opts.inlineRefs)?a.schema:a.validate||this._compile(a):((a=c.call(this,t,n))&&(i=a.schema,t=a.root,o=a.baseId),i instanceof s?r=i.validate||e.call(this,i.schema,t,void 0,o):void 0!==i&&(r=p(i,this._opts.inlineRefs)?i:e.call(this,i,t,void 0,o)),r)}function c(e,t){var n=i.parse(t),r=f(n),o=g(this._getId(e.schema));if(0===Object.keys(e.schema).length||r!==o){r=v(r);var a=this._refs[r];if("string"==typeof a)return function(e,t,n){var i,r;if(t=c.call(this,e,t))return i=t.schema,r=t.baseId,e=t.root,(t=this._getId(i))&&(r=y(r,t)),h.call(this,n,r,i,e)}.call(this,e,a,n);if(a instanceof s)a.validate||this._compile(a);else{if(!((a=this._schemas[r])instanceof s))return;if(a.validate||this._compile(a),r==v(t))return{schema:a,root:e,baseId:o}}if(!(e=a).schema)return;o=g(this._getId(e.schema))}return h.call(this,n,o,e.schema,e)}(e.exports=l).normalizeId=v,l.fullPath=g,l.url=y,l.ids=function(e){var t=v(this._getId(e)),n={"":t},s={"":g(t,!1)},l={},c=this;return a(e,{allKeys:!0},(function(e,t,a,u,h,d,p){if(""!==t){var g=c._getId(e),f=n[u];if(u=s[u]+"/"+h,void 0!==p&&(u+="/"+("number"==typeof p?p:o.escapeFragment(p))),"string"==typeof g)if(g=f=v(f?i.resolve(f,g):g),(h="string"==typeof(h=c._refs[g])?c._refs[h]:h)&&h.schema){if(!r(e,h.schema))throw new Error('id "'+g+'" resolves to more than one schema')}else if(g!=v(u))if("#"==g[0]){if(l[g]&&!r(e,l[g]))throw new Error('id "'+g+'" resolves to more than one schema');l[g]=e}else c._refs[g]=u;n[t]=f,s[t]=u}})),l},l.inlineRef=p,l.schema=c;var u=o.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function h(e,t,n,i){if(e.fragment=e.fragment||"","/"==e.fragment.slice(0,1)){for(var r=e.fragment.split("/"),s=1;s<r.length;s++){var a=r[s];if(a){if(void 0===(n=n[a=o.unescapeFragment(a)]))break;u[a]||((a=this._getId(n))&&(t=y(t,a)),n.$ref&&(a=y(t,n.$ref),a=c.call(this,i,a))&&(n=a.schema,i=a.root,t=a.baseId))}}return void 0!==n&&n!==i.schema?{schema:n,root:i,baseId:t}:void 0}}var d=o.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function p(e,t){return!1!==t&&(void 0===t||!0===t?function e(t){var n;if(Array.isArray(t)){for(var i=0;i<t.length;i++)if("object"==typeof(n=t[i])&&!e(n))return!1}else for(var r in t){if("$ref"==r)return!1;if("object"==typeof(n=t[r])&&!e(n))return!1}return!0}(e):t?function e(t){var n,i=0;if(Array.isArray(t)){for(var r=0;r<t.length;r++)if("object"==typeof(n=t[r])&&(i+=e(n)),i==1/0)return 1/0}else for(var o in t){if("$ref"==o)return 1/0;if(d[o])i++;else if("object"==typeof(n=t[o])&&(i+=e(n)+1),i==1/0)return 1/0}return i}(e)<=t:void 0)}function g(e,t){return!1!==t&&(e=v(e)),f(i.parse(e))}function f(e){return i.serialize(e).split("#")[0]+"#"}var m=/#\/?$/;function v(e){return e?e.replace(m,""):""}function y(e,t){return t=v(t),i.resolve(e,t)}},742:function(e,t,n){"use strict";var i=n(9646),r=n(3724).toHash;e.exports=function(){var e=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}],t=["type","$comment"];return e.all=r(t),e.types=r(["number","integer","string","array","object","boolean","null"]),e.forEach((function(n){n.rules=n.rules.map((function(n){var r,o;return"object"==typeof n&&(o=n[r=Object.keys(n)[0]],n=r,o.forEach((function(n){t.push(n),e.all[n]=!0}))),t.push(n),e.all[n]={keyword:n,code:i[n],implements:o}})),e.all.$comment={keyword:"$comment",code:i.$comment},n.type&&(e.types[n.type]=n)})),e.keywords=r(t.concat(["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"])),e.custom={},e}},4293:function(e,t,n){"use strict";var i=n(3724);e.exports=function(e){i.copy(e,this)}},6887:function(e){"use strict";e.exports=function(e){for(var t,n=0,i=e.length,r=0;r<i;)n++,55296<=(t=e.charCodeAt(r++))&&t<=56319&&r<i&&56320==(64512&e.charCodeAt(r))&&r++;return n}},3724:function(e,t,n){"use strict";function i(e,t,n,i){var r=i?" !== ":" === ",o=i?" || ":" && ",s=i?"!":"",a=i?"":"!";switch(e){case"null":return t+r+"null";case"array":return s+"Array.isArray("+t+")";case"object":return"("+s+t+o+"typeof "+t+r+'"object"'+o+a+"Array.isArray("+t+"))";case"integer":return"(typeof "+t+r+'"number"'+o+a+"("+t+" % 1)"+o+t+r+t+(n?o+s+"isFinite("+t+")":"")+")";case"number":return"(typeof "+t+r+'"'+e+'"'+(n?o+s+"isFinite("+t+")":"")+")";default:return"typeof "+t+r+'"'+e+'"'}}e.exports={copy:function(e,t){for(var n in t=t||{},e)t[n]=e[n];return t},checkDataType:i,checkDataTypes:function(e,t,n){if(1===e.length)return i(e[0],t,n,!0);var r,s="";for(r in(e=o(e)).array&&e.object&&(s=e.null?"(":"(!"+t+" || ",s+="typeof "+t+' !== "object")',delete e.null,delete e.array,delete e.object),e.number&&delete e.integer,e)s+=(s?" && ":"")+i(r,t,n,!0);return s},coerceToTypes:function(e,t){if(!Array.isArray(t))return r[t]?[t]:"array"===e&&"array"===t?["array"]:void 0;for(var n=[],i=0;i<t.length;i++){var o=t[i];(r[o]||"array"===e&&"array"===o)&&(n[n.length]=o)}return n.length?n:void 0},toHash:o,getProperty:l,escapeQuotes:c,equal:n(2303),ucs2length:n(6887),varOccurences:function(e,t){return t+="[^0-9]",(e=e.match(new RegExp(t,"g")))?e.length:0},varReplace:function(e,t,n){return t+="([^0-9])",n=n.replace(/\$/g,"$$$$"),e.replace(new RegExp(t,"g"),n+"$1")},schemaHasRules:function(e,t){if("boolean"==typeof e)return!e;for(var n in e)if(t[n])return!0},schemaHasRulesExcept:function(e,t,n){if("boolean"==typeof e)return!e&&"not"!=n;for(var i in e)if(i!=n&&t[i])return!0},schemaUnknownRules:function(e,t){if("boolean"!=typeof e)for(var n in e)if(!t[n])return n},toQuotedString:u,getPathExpr:function(e,t,n,i){return p(e,n?"'/' + "+t+(i?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):i?"'[' + "+t+" + ']'":"'[\\'' + "+t+" + '\\']'")},getPath:function(e,t,n){return p(e,n=u(n?"/"+g(t):l(t)))},getData:function(e,t,n){var i,r,o;if(""===e)return"rootData";if("/"==e[0]){if(!h.test(e))throw new Error("Invalid JSON-pointer: "+e);i=e,r="rootData"}else{if(!(o=e.match(d)))throw new Error("Invalid JSON-pointer: "+e);if(e=+o[1],"#"==(i=o[2])){if(t<=e)throw new Error("Cannot access property/index "+e+" levels up, current level is "+t);return n[t-e]}if(t<e)throw new Error("Cannot access data "+e+" levels up, current level is "+t);if(r="data"+(t-e||""),!i)return r}for(var s=r,a=i.split("/"),c=0;c<a.length;c++){var u=a[c];u&&(s+=" && "+(r+=l(f(u))))}return s},unescapeFragment:function(e){return f(decodeURIComponent(e))},unescapeJsonPointer:f,escapeFragment:function(e){return encodeURIComponent(g(e))},escapeJsonPointer:g};var r=o(["string","number","integer","boolean","null"]);function o(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=!0;return t}var s=/^[a-z$_][a-z$_0-9]*$/i,a=/'|\\/g;function l(e){return"number"==typeof e?"["+e+"]":s.test(e)?"."+e:"['"+c(e)+"']"}function c(e){return e.replace(a,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function u(e){return"'"+c(e)+"'"}var h=/^\/(?:[^~]|~0|~1)*$/,d=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function p(e,t){return'""'==e?t:(e+" + "+t).replace(/([^\\])' \+ '/g,"$1")}function g(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function f(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}},9394:function(e){"use strict";var t=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];e.exports=function(e,n){for(var i=0;i<n.length;i++){e=JSON.parse(JSON.stringify(e));for(var r=n[i].split("/"),o=e,s=1;s<r.length;s++)o=o[r[s]];for(s=0;s<t.length;s++){var a=t[s],l=o[a];l&&(o[a]={anyOf:[l,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]})}}return e}},5868:function(e,t,n){"use strict";n=n(6680),e.exports={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:n.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:n.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}}},1796:function(e){"use strict";e.exports=function(e,t,n){var i,r,o,s,a,l=" ",c=e.level,u=e.dataLevel,h=e.schema[t],d=e.schemaPath+e.util.getProperty(t),p=e.errSchemaPath+"/"+t,g=!e.opts.allErrors,f="data"+(u||""),m=e.opts.$data&&h&&h.$data,v=m?(l+=" var schema"+c+" = "+e.util.getData(h.$data,u,e.dataPathArr)+"; ","schema"+c):h,y="maximum"==t,C=y?"exclusiveMaximum":"exclusiveMinimum",b=e.schema[C],I=e.opts.$data&&b&&b.$data,A=y?"<":">",w=y?">":"<",x=void 0;if(!m&&"number"!=typeof h&&void 0!==h)throw new Error(t+" must be number");if(!I&&void 0!==b&&"number"!=typeof b&&"boolean"!=typeof b)throw new Error(C+" must be number or boolean");I?(u=e.util.getData(b.$data,u,e.dataPathArr),o="exclIsNumber"+c,s="' + "+(a="op"+c)+" + '",x=C,(S=S||[]).push(l=l+" var schemaExcl"+c+" = "+u+"; var "+(i="exclusive"+c)+"; var "+(r="exclType"+c)+" = typeof "+(u="schemaExcl"+c)+"; if ("+r+" != 'boolean' && "+r+" != 'undefined' && "+r+" != 'number') { "),l="",!1!==e.createErrors?(l+=" { keyword: '"+(x||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: {} ",!1!==e.opts.messages&&(l+=" , message: '"+C+" should be boolean' "),e.opts.verbose&&(l+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),l+=" } "):l+=" {} ",k=l,l=S.pop(),!e.compositeRule&&g?e.async?l+=" throw new ValidationError(["+k+"]); ":l+=" validate.errors = ["+k+"]; return false; ":l+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l+=" } else if ( ",m&&(l+=" ("+v+" !== undefined && typeof "+v+" != 'number') || "),l+=" "+r+" == 'number' ? ( ("+i+" = "+v+" === undefined || "+u+" "+A+"= "+v+") ? "+f+" "+w+"= "+u+" : "+f+" "+w+" "+v+" ) : ( ("+i+" = "+u+" === true) ? "+f+" "+w+"= "+v+" : "+f+" "+w+" "+v+" ) || "+f+" !== "+f+") { var op"+c+" = "+i+" ? '"+A+"' : '"+A+"='; ",void 0===h&&(p=e.errSchemaPath+"/"+(x=C),v=u,m=I)):(s=A,(o="number"==typeof b)&&m?(a="'"+s+"'",l+=" if ( ",m&&(l+=" ("+v+" !== undefined && typeof "+v+" != 'number') || "),l+=" ( "+v+" === undefined || "+b+" "+A+"= "+v+" ? "+f+" "+w+"= "+b+" : "+f+" "+w+" "+v+" ) || "+f+" !== "+f+") { "):(o&&void 0===h?(i=!0,p=e.errSchemaPath+"/"+(x=C),v=b,w+="="):(o&&(v=Math[y?"min":"max"](b,h)),b===(!o||v)?(i=!0,p=e.errSchemaPath+"/"+(x=C),w+="="):(i=!1,s+="=")),a="'"+s+"'",l+=" if ( ",m&&(l+=" ("+v+" !== undefined && typeof "+v+" != 'number') || "),l+=" "+f+" "+w+" "+v+" || "+f+" !== "+f+") { ")),x=x||t,(S=S||[]).push(l),l="",!1!==e.createErrors?(l+=" { keyword: '"+(x||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(p)+" , params: { comparison: "+a+", limit: "+v+", exclusive: "+i+" } ",!1!==e.opts.messages&&(l=l+" , message: 'should be "+s+" "+(m?"' + "+v:v+"'")),e.opts.verbose&&(l=(l+=" , schema: ")+(m?"validate.schema"+d:""+h)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+f+" "),l+=" } "):l+=" {} ";var S,k=l;return l=S.pop(),!e.compositeRule&&g?e.async?l+=" throw new ValidationError(["+k+"]); ":l+=" validate.errors = ["+k+"]; return false; ":l+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l+=" } ",g&&(l+=" else { "),l}},2407:function(e){"use strict";e.exports=function(e,t,n){var i,r=" ",o=e.level,s=e.dataLevel,a=e.schema[t],l=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,h="data"+(s||""),d=e.opts.$data&&a&&a.$data;if(s=d?(r+=" var schema"+o+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ","schema"+o):a,d||"number"==typeof a)return r+="if ( ",d&&(r+=" ("+s+" !== undefined && typeof "+s+" != 'number') || "),(o=[]).push(r+=" "+h+".length "+("maxItems"==(i=t)?">":"<")+" "+s+") { "),r="",!1!==e.createErrors?(r+=" { keyword: '"+(i||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+s+" } ",!1!==e.opts.messages&&(r=(r=(r+=" , message: 'should NOT have ")+("maxItems"==t?"more":"fewer")+" than ")+(d?"' + "+s+" + '":""+a)+" items' "),e.opts.verbose&&(r=(r+=" , schema: ")+(d?"validate.schema"+l:""+a)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),r+=" } "):r+=" {} ",i=r,r=o.pop(),!e.compositeRule&&u?e.async?r+=" throw new ValidationError(["+i+"]); ":r+=" validate.errors = ["+i+"]; return false; ":r+=" var err = "+i+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+="} ",u&&(r+=" else { "),r;throw new Error(t+" must be number")}},1250:function(e){"use strict";e.exports=function(e,t,n){var i,r=" ",o=e.level,s=e.dataLevel,a=e.schema[t],l=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,h="data"+(s||""),d=e.opts.$data&&a&&a.$data;if(s=d?(r+=" var schema"+o+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ","schema"+o):a,d||"number"==typeof a)return r+="if ( ",d&&(r+=" ("+s+" !== undefined && typeof "+s+" != 'number') || "),!1===e.opts.unicode?r+=" "+h+".length ":r+=" ucs2length("+h+") ",(o=[]).push(r+=" "+("maxLength"==(i=t)?">":"<")+" "+s+") { "),r="",!1!==e.createErrors?(r+=" { keyword: '"+(i||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+s+" } ",!1!==e.opts.messages&&(r=(r=(r+=" , message: 'should NOT be ")+("maxLength"==t?"longer":"shorter")+" than ")+(d?"' + "+s+" + '":""+a)+" characters' "),e.opts.verbose&&(r=(r+=" , schema: ")+(d?"validate.schema"+l:""+a)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),r+=" } "):r+=" {} ",i=r,r=o.pop(),!e.compositeRule&&u?e.async?r+=" throw new ValidationError(["+i+"]); ":r+=" validate.errors = ["+i+"]; return false; ":r+=" var err = "+i+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+="} ",u&&(r+=" else { "),r;throw new Error(t+" must be number")}},2596:function(e){"use strict";e.exports=function(e,t,n){var i,r=" ",o=e.level,s=e.dataLevel,a=e.schema[t],l=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,h="data"+(s||""),d=e.opts.$data&&a&&a.$data;if(s=d?(r+=" var schema"+o+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ","schema"+o):a,d||"number"==typeof a)return r+="if ( ",d&&(r+=" ("+s+" !== undefined && typeof "+s+" != 'number') || "),(o=[]).push(r+=" Object.keys("+h+").length "+("maxProperties"==(i=t)?">":"<")+" "+s+") { "),r="",!1!==e.createErrors?(r+=" { keyword: '"+(i||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+s+" } ",!1!==e.opts.messages&&(r=(r=(r+=" , message: 'should NOT have ")+("maxProperties"==t?"more":"fewer")+" than ")+(d?"' + "+s+" + '":""+a)+" properties' "),e.opts.verbose&&(r=(r+=" , schema: ")+(d?"validate.schema"+l:""+a)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),r+=" } "):r+=" {} ",i=r,r=o.pop(),!e.compositeRule&&u?e.async?r+=" throw new ValidationError(["+i+"]); ":r+=" validate.errors = ["+i+"]; return false; ":r+=" var err = "+i+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+="} ",u&&(r+=" else { "),r;throw new Error(t+" must be number")}},9486:function(e){"use strict";e.exports=function(e,t,n){var i=" ",r=e.schema[t],o=e.schemaPath+e.util.getProperty(t),s=e.errSchemaPath+"/"+t,a=!e.opts.allErrors,l=e.util.copy(e),c="",u=(l.level++,"valid"+l.level),h=l.baseId,d=!0,p=r;if(p)for(var g,f=-1,m=p.length-1;f<m;)g=p[f+=1],(e.opts.strictKeywords?"object"==typeof g&&0<Object.keys(g).length||!1===g:e.util.schemaHasRules(g,e.RULES.all))&&(d=!1,l.schema=g,l.schemaPath=o+"["+f+"]",l.errSchemaPath=s+"/"+f,i+=" "+e.validate(l)+" ",l.baseId=h,a)&&(i+=" if ("+u+") { ",c+="}");return a&&(i+=d?" if (true) { ":" "+c.slice(0,-1)+" "),i}},5347:function(e){"use strict";e.exports=function(e,t,n){var i=" ",r=e.level,o=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=(t=!e.opts.allErrors,o="data"+(o||""),"valid"+r),u=(r="errs__"+r,e.util.copy(e)),h="",d=(u.level++,"valid"+u.level);if(s.every((function(t){return e.opts.strictKeywords?"object"==typeof t&&0<Object.keys(t).length||!1===t:e.util.schemaHasRules(t,e.RULES.all)}))){var p=u.baseId,g=(i+=" var "+r+" = errors; var "+c+" = false; ",e.compositeRule),f=(e.compositeRule=u.compositeRule=!0,s);if(f)for(var m,v=-1,y=f.length-1;v<y;)m=f[v+=1],u.schema=m,u.schemaPath=a+"["+v+"]",u.errSchemaPath=l+"/"+v,i+=" "+e.validate(u)+" ",u.baseId=p,i+=" "+c+" = "+c+" || "+d+"; if (!"+c+") { ",h+="}";e.compositeRule=u.compositeRule=g,i+=" "+h+" if (!"+c+") { var err = ",!1!==e.createErrors?(i+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(i+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(i+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+o+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&t&&(e.async?i+=" throw new ValidationError(vErrors); ":i+=" validate.errors = vErrors; return false; "),i+=" } else { errors = "+r+"; if (vErrors !== null) { if ("+r+") vErrors.length = "+r+"; else vErrors = null; } ",e.opts.allErrors&&(i+=" } ")}else t&&(i+=" if (true) { ");return i}},923:function(e){"use strict";e.exports=function(e,t,n){var i=" ",r=e.schema[t];return t=e.errSchemaPath+"/"+t,e.opts.allErrors,r=e.util.toQuotedString(r),!0===e.opts.$comment?i+=" console.log("+r+");":"function"==typeof e.opts.$comment&&(i+=" self._opts.$comment("+r+", "+e.util.toQuotedString(t)+", validate.root.schema);"),i}},2617:function(e){"use strict";e.exports=function(e,t,n){var i=" ",r=e.level,o=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=(t=e.errSchemaPath+"/"+t,!e.opts.allErrors),c="data"+(o||""),u="valid"+r,h=e.opts.$data&&s&&s.$data;return(h&&(i+=" var schema"+r+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; "),h||(i+=" var schema"+r+" = validate.schema"+a+";"),s=[]).push(i+="var "+u+" = equal("+c+", schema"+r+"); if (!"+u+") { "),i="",!1!==e.createErrors?(i+=" { keyword: 'const' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(t)+" , params: { allowedValue: schema"+r+" } ",!1!==e.opts.messages&&(i+=" , message: 'should be equal to constant' "),e.opts.verbose&&(i+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),i+=" } "):i+=" {} ",o=i,i=s.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+o+"]); ":i+=" validate.errors = ["+o+"]; return false; ":i+=" var err = "+o+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" }",l&&(i+=" else { "),i}},2119:function(e){"use strict";e.exports=function(e,t,n){var i=" ",r=e.level,o=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=(t=e.errSchemaPath+"/"+t,!e.opts.allErrors),c=(o="data"+(o||""),"valid"+r),u="errs__"+r,h=e.util.copy(e),d=(h.level++,"valid"+h.level),p=(r="i"+r,h.dataLevel=e.dataLevel+1),g="data"+p,f=e.baseId,m=e.opts.strictKeywords?"object"==typeof s&&0<Object.keys(s).length||!1===s:e.util.schemaHasRules(s,e.RULES.all);return(i+="var "+u+" = errors;var "+c+";",m?(c=e.compositeRule,e.compositeRule=h.compositeRule=!0,h.schema=s,h.schemaPath=a,h.errSchemaPath=t,i+=" var "+d+" = false; for (var "+r+" = 0; "+r+" < "+o+".length; "+r+"++) { ",h.errorPath=e.util.getPathExpr(e.errorPath,r,e.opts.jsonPointers,!0),s=o+"["+r+"]",h.dataPathArr[p]=r,p=e.validate(h),h.baseId=f,e.util.varOccurences(p,g)<2?i+=" "+e.util.varReplace(p,g,s)+" ":i+=" var "+g+" = "+s+"; "+p+" ",i+=" if ("+d+") break; } ",e.compositeRule=h.compositeRule=c,i+=" if (!"+d+") {"):i+=" if ("+o+".length == 0) {",r=[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(t)+" , params: {} ",!1!==e.opts.messages&&(i+=" , message: 'should contain a valid item' "),e.opts.verbose&&(i+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+o+" "),i+=" } "):i+=" {} ",f=i,i=r.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+f+"]); ":i+=" validate.errors = ["+f+"]; return false; ":i+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else { ",m&&(i+=" errors = "+u+"; if (vErrors !== null) { if ("+u+") vErrors.length = "+u+"; else vErrors = null; } "),e.opts.allErrors&&(i+=" } "),i}},1793:function(e){"use strict";e.exports=function(e,t,n){var i,r,o,s=" ",a=e.level,l=e.dataLevel,c=e.schema[t],u=e.schemaPath+e.util.getProperty(t),h=e.errSchemaPath+"/"+t,d=!e.opts.allErrors,p="data"+(l||""),g="valid"+a,f="errs__"+a,m=e.opts.$data&&c&&c.$data,v=m?(s+=" var schema"+a+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; ","schema"+a):c,y="definition"+a,C=this.definition,b="";if(m&&C.$data){var I="keywordValidate"+a,A=C.validateSchema;s+=" var "+y+" = RULES.custom['"+t+"'].definition; var "+I+" = "+y+".validate;"}else{if(!(k=e.useCustomRule(this,c,e.schema,e)))return;v="validate.schema"+u,I=k.code,i=C.compile,r=C.inline,o=C.macro}t=I+".errors",c="i"+a;var w,x,S,k,E,T="ruleErr"+a,R=C.async;if(R&&!e.async)throw new Error("async keyword in sync schema");return r||o||(s+=t+" = null;"),s+="var "+f+" = errors;var "+g+";",m&&C.$data&&(b+="}",s+=" if ("+v+" === undefined) { "+g+" = true; } else { ",A)&&(b+="}",s+=" "+g+" = "+y+".validateSchema("+v+"); if ("+g+") { "),r?C.statements?s+=" "+k.validate+" ":s+=" "+g+" = "+k.validate+"; ":o?(b="",(m=e.util.copy(e)).level++,w="valid"+m.level,m.schema=k.validate,m.schemaPath="",A=e.compositeRule,e.compositeRule=m.compositeRule=!0,y=e.validate(m).replace(/validate\.schema/g,I),e.compositeRule=m.compositeRule=A,s+=" "+y):((E=E||[]).push(s),s="",s+=" "+I+".call( ",e.opts.passContext?s+="this":s+="self",i||!1===C.schema?s+=" , "+p+" ":s+=" , "+v+" , "+p+" , validate.schema"+e.schemaPath+" ",s+=" , (dataPath || '')",'""'!=e.errorPath&&(s+=" + "+e.errorPath),k=s+=" , "+(x=l?"data"+(l-1||""):"parentData")+" , "+(S=l?e.dataPathArr[l]:"parentDataProperty")+" , rootData ) ",s=E.pop(),!1===C.errors?(s+=" "+g+" = ",R&&(s+="await "),s+=k+"; "):s+=R?" var "+(t="customErrors"+a)+" = null; try { "+g+" = await "+k+"; } catch (e) { "+g+" = false; if (e instanceof ValidationError) "+t+" = e.errors; else throw e; } ":" "+t+" = null; "+g+" = "+k+"; "),C.modifying&&(s+=" if ("+x+") "+p+" = "+x+"["+S+"];"),s+=""+b,C.valid?d&&(s+=" if (true) { "):(s+=" if ( ",void 0===C.valid?s=s+" !"+(o?""+w:g):s+=" "+!C.valid+" ",m=this.keyword,(E=E||[]).push(s+=") { "),(E=E||[]).push(s=""),s="",!1!==e.createErrors?(s+=" { keyword: '"+(m||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(s+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(s+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),s+=" } "):s+=" {} ",A=s,s=E.pop(),!e.compositeRule&&d?e.async?s+=" throw new ValidationError(["+A+"]); ":s+=" validate.errors = ["+A+"]; return false; ":s+=" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",y=s,s=E.pop(),r?C.errors?"full"!=C.errors&&(s+=" for (var "+c+"="+f+"; "+c+"<errors; "+c+"++) { var "+T+" = vErrors["+c+"]; if ("+T+".dataPath === undefined) "+T+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+T+".schemaPath === undefined) { "+T+'.schemaPath = "'+h+'"; } ',e.opts.verbose&&(s+=" "+T+".schema = "+v+"; "+T+".data = "+p+"; "),s+=" } "):!1===C.errors?s+=" "+y+" ":(s+=" if ("+f+" == errors) { "+y+" } else { for (var "+c+"="+f+"; "+c+"<errors; "+c+"++) { var "+T+" = vErrors["+c+"]; if ("+T+".dataPath === undefined) "+T+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+T+".schemaPath === undefined) { "+T+'.schemaPath = "'+h+'"; } ',e.opts.verbose&&(s+=" "+T+".schema = "+v+"; "+T+".data = "+p+"; "),s+=" } } "):o?(s+=" var err = ",!1!==e.createErrors?(s+=" { keyword: '"+(m||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { keyword: '"+this.keyword+"' } ",!1!==e.opts.messages&&(s+=" , message: 'should pass \""+this.keyword+"\" keyword validation' "),e.opts.verbose&&(s+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),s+=" } "):s+=" {} ",s+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&d&&(e.async?s+=" throw new ValidationError(vErrors); ":s+=" validate.errors = vErrors; return false; ")):!1===C.errors?s+=" "+y+" ":(s+=" if (Array.isArray("+t+")) { if (vErrors === null) vErrors = "+t+"; else vErrors = vErrors.concat("+t+"); errors = vErrors.length; for (var "+c+"="+f+"; "+c+"<errors; "+c+"++) { var "+T+" = vErrors["+c+"]; if ("+T+".dataPath === undefined) "+T+".dataPath = (dataPath || '') + "+e.errorPath+"; "+T+'.schemaPath = "'+h+'"; ',e.opts.verbose&&(s+=" "+T+".schema = "+v+"; "+T+".data = "+p+"; "),s+=" } } else { "+y+" } "),s+=" } ",d&&(s+=" else { ")),s}},9115:function(e){"use strict";e.exports=function(e,t,n){var i,r=" ",o=e.level,s=e.dataLevel,a=e.schema[t],l=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,h="data"+(s||""),d=(t="errs__"+o,e.util.copy(e)),p="",g=(d.level++,"valid"+d.level),f={},m={},v=e.opts.ownProperties;for($ in a)"__proto__"!=$&&(N=a[$],(i=Array.isArray(N)?m:f)[$]=N);var y=e.errorPath;for($ in r=r+"var "+t+" = errors;var missing"+o+";",m)if((i=m[$]).length){if(r+=" if ( "+h+e.util.getProperty($)+" !== undefined ",v&&(r+=" && Object.prototype.hasOwnProperty.call("+h+", '"+e.util.escapeQuotes($)+"') "),u){r+=" && ( ";var C=i;if(C)for(var b=-1,I=C.length-1;b<I;)k=C[b+=1],b&&(r+=" || "),r+=" ( ( "+(_=h+(R=e.util.getProperty(k)))+" === undefined ",v&&(r+=" || ! Object.prototype.hasOwnProperty.call("+h+", '"+e.util.escapeQuotes(k)+"') "),r+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?k:R)+") ) ";r+=")) { ";var A="' + "+(x="missing"+o)+" + '",w=(e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(y,x,!0):y+" + "+x),w||[]),x=(w.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { property: '"+e.util.escapeQuotes($)+"', missingProperty: '"+A+"', depsCount: "+i.length+", deps: '"+e.util.escapeQuotes(1==i.length?i[0]:i.join(", "))+"' } ",!1!==e.opts.messages&&(r+=" , message: 'should have ",1==i.length?r+="property "+e.util.escapeQuotes(i[0]):r+="properties "+e.util.escapeQuotes(i.join(", ")),r+=" when property "+e.util.escapeQuotes($)+" is present' "),e.opts.verbose&&(r+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),r+=" } "):r+=" {} ",r);r=w.pop(),!e.compositeRule&&u?e.async?r+=" throw new ValidationError(["+x+"]); ":r+=" validate.errors = ["+x+"]; return false; ":r+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{r+=" ) { ";var S=i;if(S)for(var k,E=-1,T=S.length-1;E<T;){k=S[E+=1];var R=e.util.getProperty(k),_=(A=e.util.escapeQuotes(k),h+R);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(y,k,e.opts.jsonPointers)),r+=" if ( "+_+" === undefined ",v&&(r+=" || ! Object.prototype.hasOwnProperty.call("+h+", '"+e.util.escapeQuotes(k)+"') "),r+=") { var err = ",!1!==e.createErrors?(r+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { property: '"+e.util.escapeQuotes($)+"', missingProperty: '"+A+"', depsCount: "+i.length+", deps: '"+e.util.escapeQuotes(1==i.length?i[0]:i.join(", "))+"' } ",!1!==e.opts.messages&&(r+=" , message: 'should have ",1==i.length?r+="property "+e.util.escapeQuotes(i[0]):r+="properties "+e.util.escapeQuotes(i.join(", ")),r+=" when property "+e.util.escapeQuotes($)+" is present' "),e.opts.verbose&&(r+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),r+=" } "):r+=" {} ",r+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}r+=" } ",u&&(p+="}",r+=" else { ")}e.errorPath=y;var $,L=d.baseId;for($ in f){var N=f[$];(e.opts.strictKeywords?"object"==typeof N&&0<Object.keys(N).length||!1===N:e.util.schemaHasRules(N,e.RULES.all))&&(r+=" "+g+" = true; if ( "+h+e.util.getProperty($)+" !== undefined ",v&&(r+=" && Object.prototype.hasOwnProperty.call("+h+", '"+e.util.escapeQuotes($)+"') "),r+=") { ",d.schema=N,d.schemaPath=l+e.util.getProperty($),d.errSchemaPath=c+"/"+e.util.escapeFragment($),r+=" "+e.validate(d)+" ",d.baseId=L,r+=" } ",u)&&(r+=" if ("+g+") { ",p+="}")}return u&&(r+=" "+p+" if ("+t+" == errors) {"),r}},9317:function(e){"use strict";e.exports=function(e,t,n){var i=" ",r=e.level,o=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=(t=e.errSchemaPath+"/"+t,!e.opts.allErrors),c="data"+(o||""),u="valid"+r,h=e.opts.$data&&s&&s.$data;return h&&(i+=" var schema"+r+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; "),o="schema"+r,(h||(i+=" var "+o+" = validate.schema"+a+";"),i+="var "+u+";",h&&(i+=" if (schema"+r+" === undefined) "+u+" = true; else if (!Array.isArray(schema"+r+")) "+u+" = false; else {"),i+=u+" = false;for (var "+(s="i"+r)+"=0; "+s+"<"+o+".length; "+s+"++) if (equal("+c+", "+o+"["+s+"])) { "+u+" = true; break; }",h&&(i+=" } "),o=[]).push(i+=" if (!"+u+") { "),i="",!1!==e.createErrors?(i+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(t)+" , params: { allowedValues: schema"+r+" } ",!1!==e.opts.messages&&(i+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(i+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),i+=" } "):i+=" {} ",s=i,i=o.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+s+"]); ":i+=" validate.errors = ["+s+"]; return false; ":i+=" var err = "+s+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" }",l&&(i+=" else { "),i}},8327:function(e){"use strict";e.exports=function(e,t,n){var i=" ",r=e.level,o=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=(t=e.errSchemaPath+"/"+t,!e.opts.allErrors),c="data"+(o||"");if(!1===e.opts.format)l&&(i+=" if (true) { ");else{var u,h=e.opts.$data&&s&&s.$data,d=(o=h?(i+=" var schema"+r+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ","schema"+r):s,e.opts.unknownFormats),p=Array.isArray(d);if(h)i+=" var "+(u="format"+r)+" = formats["+o+"]; var "+(g="isObject"+r)+" = typeof "+u+" == 'object' && !("+u+" instanceof RegExp) && "+u+".validate; var "+(m="formatType"+r)+" = "+g+" && "+u+".type || 'string'; if ("+g+") { ",e.async&&(i+=" var async"+r+" = "+u+".async; "),i+=" "+u+" = "+u+".validate; } if ( ",h&&(i+=" ("+o+" !== undefined && typeof "+o+" != 'string') || "),i+=" (","ignore"!=d&&(i+=" ("+o+" && !"+u+" ",p&&(i+=" && self._opts.unknownFormats.indexOf("+o+") == -1 "),i+=") || "),i+=" ("+u+" && "+m+" == '"+n+"' && !(typeof "+u+" == 'function' ? ",e.async?i+=" (async"+r+" ? await "+u+"("+c+") : "+u+"("+c+")) ":i+=" "+u+"("+c+") ",i+=" : "+u+".test("+c+"))))) {";else{if(!(u=e.formats[s])){if("ignore"==d)return e.logger.warn('unknown format "'+s+'" ignored in schema at path "'+e.errSchemaPath+'"'),l&&(i+=" if (true) { "),i;if(p&&0<=d.indexOf(s))return l&&(i+=" if (true) { "),i;throw new Error('unknown format "'+s+'" is used in schema at path "'+e.errSchemaPath+'"')}var g,f,m=(g="object"==typeof u&&!(u instanceof RegExp)&&u.validate)&&u.type||"string";if(g&&(f=!0===u.async,u=u.validate),m!=n)return l&&(i+=" if (true) { "),i;if(f){if(!e.async)throw new Error("async format in sync schema");i+=" if (!(await "+(v="formats"+e.util.getProperty(s)+".validate")+"("+c+"))) { "}else{i+=" if (! ";var v="formats"+e.util.getProperty(s);g&&(v+=".validate"),i=i+("function"==typeof u?" "+v+"("+c+") ":" "+v+".test("+c+") ")+") { "}}(r=[]).push(i),i="",!1!==e.createErrors?(i=(i+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(t)+" , params: { format: ")+(h?""+o:""+e.util.toQuotedString(s))+" } ",!1!==e.opts.messages&&(i=(i+=" , message: 'should match format \"")+(h?"' + "+o+" + '":""+e.util.escapeQuotes(s))+"\"' "),e.opts.verbose&&(i=(i=(i+=" , schema: ")+(h?"validate.schema"+a:""+e.util.toQuotedString(s)))+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),i+=" } "):i+=" {} ",p=i,i=r.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+p+"]); ":i+=" validate.errors = ["+p+"]; return false; ":i+=" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",l&&(i+=" else { ")}return i}},5926:function(e){"use strict";e.exports=function(e,t,n){var i,r=" ",o=e.level,s=e.dataLevel,a=e.schema[t],l=e.schemaPath+e.util.getProperty(t),c=(t=e.errSchemaPath+"/"+t,!e.opts.allErrors),u=(s="data"+(s||""),"valid"+o),h="errs__"+o,d=e.util.copy(e),p=(d.level++,"valid"+d.level),g=e.schema.then,f=e.schema.else,m=(g=void 0!==g&&(e.opts.strictKeywords?"object"==typeof g&&0<Object.keys(g).length||!1===g:e.util.schemaHasRules(g,e.RULES.all)),f=void 0!==f&&(e.opts.strictKeywords?"object"==typeof f&&0<Object.keys(f).length||!1===f:e.util.schemaHasRules(f,e.RULES.all)),d.baseId);return g||f?(d.createErrors=!1,d.schema=a,d.schemaPath=l,d.errSchemaPath=t,r+=" var "+h+" = errors; var "+u+" = true; ",a=e.compositeRule,e.compositeRule=d.compositeRule=!0,r+=" "+e.validate(d)+" ",d.baseId=m,d.createErrors=!0,r+=" errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } ",e.compositeRule=d.compositeRule=a,g?(r+=" if ("+p+") { ",d.schema=e.schema.then,d.schemaPath=e.schemaPath+".then",d.errSchemaPath=e.errSchemaPath+"/then",r+=" "+e.validate(d)+" ",d.baseId=m,r+=" "+u+" = "+p+"; ",g&&f?r+=" var "+(i="ifClause"+o)+" = 'then'; ":i="'then'",r+=" } ",f&&(r+=" else { ")):r+=" if (!"+p+") { ",f&&(d.schema=e.schema.else,d.schemaPath=e.schemaPath+".else",d.errSchemaPath=e.errSchemaPath+"/else",r+=" "+e.validate(d)+" ",d.baseId=m,r+=" "+u+" = "+p+"; ",g&&f?r+=" var "+(i="ifClause"+o)+" = 'else'; ":i="'else'",r+=" } "),r+=" if (!"+u+") { var err = ",!1!==e.createErrors?(r+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(t)+" , params: { failingKeyword: "+i+" } ",!1!==e.opts.messages&&(r+=" , message: 'should match \"' + "+i+" + '\" schema' "),e.opts.verbose&&(r+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+s+" "),r+=" } "):r+=" {} ",r+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?r+=" throw new ValidationError(vErrors); ":r+=" validate.errors = vErrors; return false; "),r+=" } ",c&&(r+=" else { ")):c&&(r+=" if (true) { "),r}},9646:function(e,t,n){"use strict";e.exports={$ref:n(2331),allOf:n(9486),anyOf:n(5347),$comment:n(923),const:n(2617),contains:n(2119),dependencies:n(9115),enum:n(9317),format:n(8327),if:n(5926),items:n(392),maximum:n(1796),minimum:n(1796),maxItems:n(2407),minItems:n(2407),maxLength:n(1250),minLength:n(1250),maxProperties:n(2596),minProperties:n(2596),multipleOf:n(6039),not:n(7946),oneOf:n(9344),pattern:n(9737),properties:n(2537),propertyNames:n(2127),required:n(1204),uniqueItems:n(1985),validate:n(1869)}},392:function(e){"use strict";e.exports=function(e,t,n){var i=" ",r=e.level,o=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(o||""),h=(t="valid"+r,o="errs__"+r,e.util.copy(e)),d="",p=(h.level++,"valid"+h.level),g=(r="i"+r,h.dataLevel=e.dataLevel+1),f="data"+g,m=e.baseId;if(i+="var "+o+" = errors;var "+t+";",Array.isArray(s)){var v,y,C=e.schema.additionalItems,b=(!1===C&&(i+=" "+t+" = "+u+".length <= "+s.length+"; ",v=l,l=e.errSchemaPath+"/additionalItems",(y=y||[]).push(i+=" if (!"+t+") { "),i="",!1!==e.createErrors?(i+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+s.length+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have more than "+s.length+" items' "),e.opts.verbose&&(i+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ",t=i,i=y.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+t+"]); ":i+=" validate.errors = ["+t+"]; return false; ":i+=" var err = "+t+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",l=v,c)&&(d+="}",i+=" else { "),s);if(b)for(var I=-1,A=b.length-1;I<A;){var w,x,S=b[I+=1];(e.opts.strictKeywords?"object"==typeof S&&0<Object.keys(S).length||!1===S:e.util.schemaHasRules(S,e.RULES.all))&&(i+=" "+p+" = true; if ("+u+".length > "+I+") { ",w=u+"["+I+"]",h.schema=S,h.schemaPath=a+"["+I+"]",h.errSchemaPath=l+"/"+I,h.errorPath=e.util.getPathExpr(e.errorPath,I,e.opts.jsonPointers,!0),h.dataPathArr[g]=I,x=e.validate(h),h.baseId=m,e.util.varOccurences(x,f)<2?i+=" "+e.util.varReplace(x,f,w)+" ":i+=" var "+f+" = "+w+"; "+x+" ",i+=" } ",c)&&(i+=" if ("+p+") { ",d+="}")}"object"==typeof C&&(e.opts.strictKeywords?"object"==typeof C&&0<Object.keys(C).length||!1===C:e.util.schemaHasRules(C,e.RULES.all))&&(h.schema=C,h.schemaPath=e.schemaPath+".additionalItems",h.errSchemaPath=e.errSchemaPath+"/additionalItems",i+=" "+p+" = true; if ("+u+".length > "+s.length+") { for (var "+r+" = "+s.length+"; "+r+" < "+u+".length; "+r+"++) { ",h.errorPath=e.util.getPathExpr(e.errorPath,r,e.opts.jsonPointers,!0),w=u+"["+r+"]",h.dataPathArr[g]=r,x=e.validate(h),h.baseId=m,e.util.varOccurences(x,f)<2?i+=" "+e.util.varReplace(x,f,w)+" ":i+=" var "+f+" = "+w+"; "+x+" ",c&&(i+=" if (!"+p+") break; "),i+=" } } ",c)&&(i+=" if ("+p+") { ",d+="}")}else(e.opts.strictKeywords?"object"==typeof s&&0<Object.keys(s).length||!1===s:e.util.schemaHasRules(s,e.RULES.all))&&(h.schema=s,h.schemaPath=a,h.errSchemaPath=l,i+=" for (var "+r+" = 0; "+r+" < "+u+".length; "+r+"++) { ",h.errorPath=e.util.getPathExpr(e.errorPath,r,e.opts.jsonPointers,!0),w=u+"["+r+"]",h.dataPathArr[g]=r,x=e.validate(h),h.baseId=m,e.util.varOccurences(x,f)<2?i+=" "+e.util.varReplace(x,f,w)+" ":i+=" var "+f+" = "+w+"; "+x+" ",c&&(i+=" if (!"+p+") break; "),i+=" }");return c&&(i+=" "+d+" if ("+o+" == errors) {"),i}},6039:function(e){"use strict";e.exports=function(e,t,n){var i=" ",r=e.level,o=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(o||""),h=e.opts.$data&&s&&s.$data;if(o=h?(i+=" var schema"+r+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ","schema"+r):s,!h&&"number"!=typeof s)throw new Error(t+" must be number");return i+="var division"+r+";if (",h&&(i+=" "+o+" !== undefined && ( typeof "+o+" != 'number' || "),i+=" (division"+r+" = "+u+" / "+o+", ",e.opts.multipleOfPrecision?i+=" Math.abs(Math.round(division"+r+") - division"+r+") > 1e-"+e.opts.multipleOfPrecision+" ":i+=" division"+r+" !== parseInt(division"+r+") ",i+=" ) ",h&&(i+=" ) "),(t=[]).push(i+=" ) { "),i="",!1!==e.createErrors?(i+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { multipleOf: "+o+" } ",!1!==e.opts.messages&&(i=i+" , message: 'should be multiple of "+(h?"' + "+o:o+"'")),e.opts.verbose&&(i=(i+=" , schema: ")+(h?"validate.schema"+a:""+s)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ",r=i,i=t.pop(),!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+r+"]); ":i+=" validate.errors = ["+r+"]; return false; ":i+=" var err = "+r+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}},7946:function(e){"use strict";e.exports=function(e,t,n){var i,r,o=" ",s=e.level,a=e.dataLevel,l=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=(t=e.errSchemaPath+"/"+t,!e.opts.allErrors),h=(a="data"+(a||""),s="errs__"+s,e.util.copy(e)),d=(h.level++,"valid"+h.level);return(e.opts.strictKeywords?"object"==typeof l&&0<Object.keys(l).length||!1===l:e.util.schemaHasRules(l,e.RULES.all))?(h.schema=l,h.schemaPath=c,h.errSchemaPath=t,o+=" var "+s+" = errors; ",l=e.compositeRule,e.compositeRule=h.compositeRule=!0,h.createErrors=!1,h.opts.allErrors&&(r=h.opts.allErrors,h.opts.allErrors=!1),o+=" "+e.validate(h)+" ",h.createErrors=!0,r&&(h.opts.allErrors=r),e.compositeRule=h.compositeRule=l,(i=i||[]).push(o+=" if ("+d+") { "),o="",!1!==e.createErrors?(o+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(t)+" , params: {} ",!1!==e.opts.messages&&(o+=" , message: 'should NOT be valid' "),e.opts.verbose&&(o+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+a+" "),o+=" } "):o+=" {} ",r=o,o=i.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+r+"]); ":o+=" validate.errors = ["+r+"]; return false; ":o+=" var err = "+r+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } else { errors = "+s+"; if (vErrors !== null) { if ("+s+") vErrors.length = "+s+"; else vErrors = null; } ",e.opts.allErrors&&(o+=" } ")):(o+=" var err = ",!1!==e.createErrors?(o+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(t)+" , params: {} ",!1!==e.opts.messages&&(o+=" , message: 'should NOT be valid' "),e.opts.verbose&&(o+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+a+" "),o+=" } "):o+=" {} ",o+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u&&(o+=" if (false) { ")),o}},9344:function(e){"use strict";e.exports=function(e,t,n){var i=" ",r=e.level,o=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=(t=!e.opts.allErrors,o="data"+(o||""),"valid"+r),u="errs__"+r,h=e.util.copy(e),d="",p=(h.level++,"valid"+h.level),g=h.baseId,f="prevValid"+r,m="passingSchemas"+r,v=(i+="var "+u+" = errors , "+f+" = false , "+c+" = false , "+m+" = null; ",r=e.compositeRule,e.compositeRule=h.compositeRule=!0,s);if(v)for(var y,C=-1,b=v.length-1;C<b;)y=v[C+=1],(e.opts.strictKeywords?"object"==typeof y&&0<Object.keys(y).length||!1===y:e.util.schemaHasRules(y,e.RULES.all))?(h.schema=y,h.schemaPath=a+"["+C+"]",h.errSchemaPath=l+"/"+C,i+=" "+e.validate(h)+" ",h.baseId=g):i+=" var "+p+" = true; ",C&&(i+=" if ("+p+" && "+f+") { "+c+" = false; "+m+" = ["+m+", "+C+"]; } else { ",d+="}"),i+=" if ("+p+") { "+c+" = "+f+" = true; "+m+" = "+C+"; }";return e.compositeRule=h.compositeRule=r,i+=d+"if (!"+c+") { var err = ",!1!==e.createErrors?(i+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { passingSchemas: "+m+" } ",!1!==e.opts.messages&&(i+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(i+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+o+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&t&&(e.async?i+=" throw new ValidationError(vErrors); ":i+=" validate.errors = vErrors; return false; "),i+="} else { errors = "+u+"; if (vErrors !== null) { if ("+u+") vErrors.length = "+u+"; else vErrors = null; }",e.opts.allErrors&&(i+=" } "),i}},9737:function(e){"use strict";e.exports=function(e,t,n){var i=" ",r=e.level,o=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=(t=e.errSchemaPath+"/"+t,!e.opts.allErrors),c="data"+(o||""),u=e.opts.$data&&s&&s.$data,h=(o=u?(i+=" var schema"+r+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ","schema"+r):s,r=u?"(new RegExp("+o+"))":e.usePattern(s),i+="if ( ",u&&(i+=" ("+o+" !== undefined && typeof "+o+" != 'string') || "),[]);return h.push(i+=" !"+r+".test("+c+") ) { "),i="",!1!==e.createErrors?(i=(i+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(t)+" , params: { pattern: ")+(u?""+o:""+e.util.toQuotedString(s))+" } ",!1!==e.opts.messages&&(i=(i+=" , message: 'should match pattern \"")+(u?"' + "+o+" + '":""+e.util.escapeQuotes(s))+"\"' "),e.opts.verbose&&(i=(i=(i+=" , schema: ")+(u?"validate.schema"+a:""+e.util.toQuotedString(s)))+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),i+=" } "):i+=" {} ",r=i,i=h.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+r+"]); ":i+=" validate.errors = ["+r+"]; return false; ":i+=" var err = "+r+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i}},2537:function(e){"use strict";e.exports=function(e,t,n){var i,r=" ",o=e.level,s=e.dataLevel,a=e.schema[t],l=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,h="data"+(s||""),d=(t="errs__"+o,e.util.copy(e)),p="",g=(d.level++,"valid"+d.level),f="key"+o,m="idx"+o,v=d.dataLevel=e.dataLevel+1,y="data"+v,C="dataProperties"+o,b=(s=Object.keys(a||{}).filter($),e.schema.patternProperties||{}),I=Object.keys(b).filter($),A=e.schema.additionalProperties,w=s.length||I.length,x=!1===A,S="object"==typeof A&&Object.keys(A).length,k=e.opts.removeAdditional,E=x||S||k,T=e.opts.ownProperties,R=e.baseId,_=e.schema.required;function $(e){return"__proto__"!==e}if(_&&(!e.opts.$data||!_.$data)&&_.length<e.opts.loopRequired&&(i=e.util.toHash(_)),r+="var "+t+" = errors;var "+g+" = true;",T&&(r+=" var "+C+" = undefined;"),E){if(r+=T?" "+C+" = "+C+" || Object.keys("+h+"); for (var "+m+"=0; "+m+"<"+C+".length; "+m+"++) { var "+f+" = "+C+"["+m+"]; ":" for (var "+f+" in "+h+") { ",w){if(r+=" var isAdditional"+o+" = !(false ",s.length)if(8<s.length)r+=" || validate.schema"+l+".hasOwnProperty("+f+") ";else{var L=s;if(L)for(var N=-1,M=L.length-1;N<M;)H=L[N+=1],r+=" || "+f+" == "+e.util.toQuotedString(H)+" "}if(I.length){var P=I;if(P)for(var O=-1,B=P.length-1;O<B;)Q=P[O+=1],r+=" || "+e.usePattern(Q)+".test("+f+") "}r+=" ); if (isAdditional"+o+") { "}"all"==k?r+=" delete "+h+"["+f+"]; ":(Z=e.errorPath,_="' + "+f+" + '",e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers)),x?k?r+=" delete "+h+"["+f+"]; ":(z=c,c=e.errSchemaPath+"/additionalProperties",(X=X||[]).push(r+=" "+g+" = false; "),r="",!1!==e.createErrors?(r+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { additionalProperty: '"+_+"' } ",!1!==e.opts.messages&&(r+=" , message: '",e.opts._errorDataPathProperty?r+="is an invalid additional property":r+="should NOT have additional properties",r+="' "),e.opts.verbose&&(r+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),r+=" } "):r+=" {} ",U=r,r=X.pop(),!e.compositeRule&&u?e.async?r+=" throw new ValidationError(["+U+"]); ":r+=" validate.errors = ["+U+"]; return false; ":r+=" var err = "+U+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c=z,u&&(r+=" break; ")):S&&("failing"==k?(r+=" var "+t+" = errors; ",E=e.compositeRule,e.compositeRule=d.compositeRule=!0,d.schema=A,d.schemaPath=e.schemaPath+".additionalProperties",d.errSchemaPath=e.errSchemaPath+"/additionalProperties",d.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers),te=h+"["+f+"]",d.dataPathArr[v]=f,ne=e.validate(d),d.baseId=R,e.util.varOccurences(ne,y)<2?r+=" "+e.util.varReplace(ne,y,te)+" ":r+=" var "+y+" = "+te+"; "+ne+" ",r+=" if (!"+g+") { errors = "+t+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+h+"["+f+"]; } ",e.compositeRule=d.compositeRule=E):(d.schema=A,d.schemaPath=e.schemaPath+".additionalProperties",d.errSchemaPath=e.errSchemaPath+"/additionalProperties",d.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers),te=h+"["+f+"]",d.dataPathArr[v]=f,ne=e.validate(d),d.baseId=R,e.util.varOccurences(ne,y)<2?r+=" "+e.util.varReplace(ne,y,te)+" ":r+=" var "+y+" = "+te+"; "+ne+" ",u&&(r+=" if (!"+g+") break; "))),e.errorPath=Z),w&&(r+=" } "),r+=" } ",u&&(r+=" if ("+g+") { ",p+="}")}var W=e.opts.useDefaults&&!e.compositeRule;if(s.length){var F=s;if(F)for(var H,D=-1,G=F.length-1;D<G;){var V,j,Z,z,K,X,U,J=a[H=F[D+=1]];(e.opts.strictKeywords?"object"==typeof J&&0<Object.keys(J).length||!1===J:e.util.schemaHasRules(J,e.RULES.all))&&(te=h+(K=e.util.getProperty(H)),V=W&&void 0!==J.default,d.schema=J,d.schemaPath=l+K,d.errSchemaPath=c+"/"+e.util.escapeFragment(H),d.errorPath=e.util.getPath(e.errorPath,H,e.opts.jsonPointers),d.dataPathArr[v]=e.util.toQuotedString(H),ne=e.validate(d),d.baseId=R,e.util.varOccurences(ne,y)<2?(ne=e.util.varReplace(ne,y,te),j=te):r+=" var "+(j=y)+" = "+te+"; ",V?r+=" "+ne+" ":(i&&i[H]?(r+=" if ( "+j+" === undefined ",T&&(r+=" || ! Object.prototype.hasOwnProperty.call("+h+", '"+e.util.escapeQuotes(H)+"') "),r+=") { "+g+" = false; ",Z=e.errorPath,z=c,K=e.util.escapeQuotes(H),e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(Z,H,e.opts.jsonPointers)),c=e.errSchemaPath+"/required",(X=X||[]).push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { missingProperty: '"+K+"' } ",!1!==e.opts.messages&&(r+=" , message: '",e.opts._errorDataPathProperty?r+="is a required property":r+="should have required property \\'"+K+"\\'",r+="' "),e.opts.verbose&&(r+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),r+=" } "):r+=" {} ",U=r,r=X.pop(),!e.compositeRule&&u?e.async?r+=" throw new ValidationError(["+U+"]); ":r+=" validate.errors = ["+U+"]; return false; ":r+=" var err = "+U+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c=z,e.errorPath=Z,r+=" } else { "):u?(r+=" if ( "+j+" === undefined ",T&&(r+=" || ! Object.prototype.hasOwnProperty.call("+h+", '"+e.util.escapeQuotes(H)+"') "),r+=") { "+g+" = true; } else { "):(r+=" if ("+j+" !== undefined ",T&&(r+=" && Object.prototype.hasOwnProperty.call("+h+", '"+e.util.escapeQuotes(H)+"') "),r+=" ) { "),r+=" "+ne+" } ")),u&&(r+=" if ("+g+") { ",p+="}")}}if(I.length){var Y=I;if(Y)for(var Q,q=-1,ee=Y.length-1;q<ee;){var te,ne;J=b[Q=Y[q+=1]],(e.opts.strictKeywords?"object"==typeof J&&0<Object.keys(J).length||!1===J:e.util.schemaHasRules(J,e.RULES.all))&&(d.schema=J,d.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(Q),d.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(Q),r=(r+=T?" "+C+" = "+C+" || Object.keys("+h+"); for (var "+m+"=0; "+m+"<"+C+".length; "+m+"++) { var "+f+" = "+C+"["+m+"]; ":" for (var "+f+" in "+h+") { ")+" if ("+e.usePattern(Q)+".test("+f+")) { ",d.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers),te=h+"["+f+"]",d.dataPathArr[v]=f,ne=e.validate(d),d.baseId=R,e.util.varOccurences(ne,y)<2?r+=" "+e.util.varReplace(ne,y,te)+" ":r+=" var "+y+" = "+te+"; "+ne+" ",u&&(r+=" if (!"+g+") break; "),r+=" } ",u&&(r+=" else "+g+" = true; "),r+=" } ",u)&&(r+=" if ("+g+") { ",p+="}")}}return u&&(r+=" "+p+" if ("+t+" == errors) {"),r}},2127:function(e){"use strict";e.exports=function(e,t,n){var i,r,o,s,a,l,c,u=" ",h=e.level,d=e.dataLevel,p=e.schema[t],g=e.schemaPath+e.util.getProperty(t),f=(t=e.errSchemaPath+"/"+t,!e.opts.allErrors),m=(d="data"+(d||""),"errs__"+h),v=e.util.copy(e),y=(v.level++,"valid"+v.level);return u+="var "+m+" = errors;",(e.opts.strictKeywords?"object"==typeof p&&0<Object.keys(p).length||!1===p:e.util.schemaHasRules(p,e.RULES.all))&&(v.schema=p,v.schemaPath=g,v.errSchemaPath=t,p="idx"+h,r="i"+h,o="' + "+(i="key"+h)+" + '",s="data"+(v.dataLevel=e.dataLevel+1),c="dataProperties"+h,l=e.opts.ownProperties,a=e.baseId,l&&(u+=" var "+c+" = undefined; "),u=u+(l?" "+c+" = "+c+" || Object.keys("+d+"); for (var "+p+"=0; "+p+"<"+c+".length; "+p+"++) { var "+i+" = "+c+"["+p+"]; ":" for (var "+i+" in "+d+") { ")+" var startErrs"+h+" = errors; ",l=i,c=e.compositeRule,e.compositeRule=v.compositeRule=!0,p=e.validate(v),v.baseId=a,e.util.varOccurences(p,s)<2?u+=" "+e.util.varReplace(p,s,l)+" ":u+=" var "+s+" = "+l+"; "+p+" ",e.compositeRule=v.compositeRule=c,u+=" if (!"+y+") { for (var "+r+"=startErrs"+h+"; "+r+"<errors; "+r+"++) { vErrors["+r+"].propertyName = "+i+"; } var err = ",!1!==e.createErrors?(u+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(t)+" , params: { propertyName: '"+o+"' } ",!1!==e.opts.messages&&(u+=" , message: 'property name \\'"+o+"\\' is invalid' "),e.opts.verbose&&(u+=" , schema: validate.schema"+g+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),u+=" } "):u+=" {} ",u+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&f&&(e.async?u+=" throw new ValidationError(vErrors); ":u+=" validate.errors = vErrors; return false; "),f&&(u+=" break; "),u+=" } }"),f&&(u+=" if ("+m+" == errors) {"),u}},2331:function(e){"use strict";e.exports=function(e,t,n){var i,r,o,s=" ",a=e.level,l=e.dataLevel,c=e.schema[t],u=(t=e.errSchemaPath+"/"+t,!e.opts.allErrors),h="data"+(l||"");if(a="valid"+a,"#"==c||"#/"==c)r=e.isRoot?(i=e.async,"validate"):(i=!0===e.root.schema.$async,"root.refVal[0]");else{var d=e.resolveRef(e.baseId,c,e.isRoot);if(void 0===d){var p=e.MissingRefError.message(e.baseId,c);if("fail"==e.opts.missingRefs)e.logger.error(p),(o=o||[]).push(s),s="",!1!==e.createErrors?(s+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(t)+" , params: { ref: '"+e.util.escapeQuotes(c)+"' } ",!1!==e.opts.messages&&(s+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(c)+"' "),e.opts.verbose&&(s+=" , schema: "+e.util.toQuotedString(c)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ",t=s,s=o.pop(),!e.compositeRule&&u?e.async?s+=" throw new ValidationError(["+t+"]); ":s+=" validate.errors = ["+t+"]; return false; ":s+=" var err = "+t+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u&&(s+=" if (false) { ");else{if("ignore"!=e.opts.missingRefs)throw new e.MissingRefError(e.baseId,c,p);e.logger.warn(p),u&&(s+=" if (true) { ")}}else d.inline?((t=e.util.copy(e)).level++,p="valid"+t.level,t.schema=d.schema,t.schemaPath="",t.errSchemaPath=c,s+=" "+e.validate(t).replace(/validate\.schema/g,d.code)+" ",u&&(s+=" if ("+p+") { ")):(i=!0===d.$async||e.async&&!1!==d.$async,r=d.code)}if(r)if((o=o||[]).push(s),s="",e.opts.passContext?s+=" "+r+".call(this, ":s+=" "+r+"( ",s+=" "+h+", (dataPath || '')",'""'!=e.errorPath&&(s+=" + "+e.errorPath),t=s+=" , "+(c=l?"data"+(l-1||""):"parentData")+" , "+(l?e.dataPathArr[l]:"parentDataProperty")+", rootData) ",s=o.pop(),i){if(!e.async)throw new Error("async schema referenced by sync schema");u&&(s+=" var "+a+"; "),s+=" try { await "+t+"; ",u&&(s+=" "+a+" = true; "),s+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",u&&(s+=" "+a+" = false; "),s+=" } ",u&&(s+=" if ("+a+") { ")}else s+=" if (!"+t+") { if (vErrors === null) vErrors = "+r+".errors; else vErrors = vErrors.concat("+r+".errors); errors = vErrors.length; } ",u&&(s+=" else { ");return s}},1204:function(e){"use strict";e.exports=function(e,t,n){var i=" ",r=e.level,o=e.dataLevel,s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=(t=!e.opts.allErrors,"data"+(o||"")),u="valid"+r,h=e.opts.$data&&s&&s.$data;if(h&&(i+=" var schema"+r+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; "),o="schema"+r,!h)if(s.length<e.opts.loopRequired&&e.schema.properties&&Object.keys(e.schema.properties).length){var d=[],p=s;if(p)for(var g=-1,f=p.length-1;g<f;){var m=p[g+=1],v=e.schema.properties[m];v&&(e.opts.strictKeywords?"object"==typeof v&&0<Object.keys(v).length||!1===v:e.util.schemaHasRules(v,e.RULES.all))||(d[d.length]=m)}}else d=s;if(h||d.length){var y=e.errorPath,C=(s=h||d.length>=e.opts.loopRequired,e.opts.ownProperties);if(t){if(i+=" var missing"+r+"; ",s){h||(i+=" var "+o+" = validate.schema"+a+"; ");var b="' + "+(k="schema"+r+"["+(x="i"+r)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(y,k,e.opts.jsonPointers)),i+=" var "+u+" = true; ",h&&(i+=" if (schema"+r+" === undefined) "+u+" = true; else if (!Array.isArray(schema"+r+")) "+u+" = false; else {"),i+=" for (var "+x+" = 0; "+x+" < "+o+".length; "+x+"++) { "+u+" = "+c+"["+o+"["+x+"]] !== undefined ",C&&(i+=" && Object.prototype.hasOwnProperty.call("+c+", "+o+"["+x+"]) "),i+="; if (!"+u+") break; } ",h&&(i+=" } "),(A=A||[]).push(i+=" if (!"+u+") { "),i="",!1!==e.createErrors?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+b+"' } ",!1!==e.opts.messages&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+b+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),i+=" } "):i+=" {} ";var I=i;i=A.pop()}else{i+=" if ( ";var A,w=d;if(w)for(var x=-1,S=w.length-1;x<S;)T=w[x+=1],x&&(i+=" || "),i+=" ( ( "+(L=c+($=e.util.getProperty(T)))+" === undefined ",C&&(i+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(T)+"') "),i+=") && (missing"+r+" = "+e.util.toQuotedString(e.opts.jsonPointers?T:$)+") ) ";i+=") { ",b="' + "+(k="missing"+r)+" + '",e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(y,k,!0):y+" + "+k),(A=A||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+b+"' } ",!1!==e.opts.messages&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+b+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),i+=" } "):i+=" {} ",I=i,i=A.pop()}!e.compositeRule&&t?e.async?i+=" throw new ValidationError(["+I+"]); ":i+=" validate.errors = ["+I+"]; return false; ":i+=" var err = "+I+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else { "}else if(s){var k;h||(i+=" var "+o+" = validate.schema"+a+"; "),b="' + "+(k="schema"+r+"["+(x="i"+r)+"]")+" + '",e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(y,k,e.opts.jsonPointers)),h&&(i+=" if ("+o+" && !Array.isArray("+o+")) { var err = ",!1!==e.createErrors?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+b+"' } ",!1!==e.opts.messages&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+b+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+o+" !== undefined) { "),i+=" for (var "+x+" = 0; "+x+" < "+o+".length; "+x+"++) { if ("+c+"["+o+"["+x+"]] === undefined ",C&&(i+=" || ! Object.prototype.hasOwnProperty.call("+c+", "+o+"["+x+"]) "),i+=") { var err = ",!1!==e.createErrors?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+b+"' } ",!1!==e.opts.messages&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+b+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",h&&(i+=" } ")}else{var E=d;if(E)for(var T,R=-1,_=E.length-1;R<_;){T=E[R+=1];var $=e.util.getProperty(T),L=(b=e.util.escapeQuotes(T),c+$);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(y,T,e.opts.jsonPointers)),i+=" if ( "+L+" === undefined ",C&&(i+=" || ! Object.prototype.hasOwnProperty.call("+c+", '"+e.util.escapeQuotes(T)+"') "),i+=") { var err = ",!1!==e.createErrors?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+b+"' } ",!1!==e.opts.messages&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+b+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=y}else t&&(i+=" if (true) {");return i}},1985:function(e){"use strict";e.exports=function(e,t,n){var i,r=" ",o=e.level,s=e.dataLevel,a=e.schema[t],l=e.schemaPath+e.util.getProperty(t),c=(t=e.errSchemaPath+"/"+t,!e.opts.allErrors),u="data"+(s||""),h="valid"+o,d=e.opts.$data&&a&&a.$data;return s=d?(r+=" var schema"+o+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ","schema"+o):a,(a||d)&&!1!==e.opts.uniqueItems?(d&&(r+=" var "+h+"; if ("+s+" === false || "+s+" === undefined) "+h+" = true; else if (typeof "+s+" != 'boolean') "+h+" = false; else { "),r+=" var i = "+u+".length , "+h+" = true , j; if (i > 1) { ",o=e.schema.items&&e.schema.items.type,s=Array.isArray(o),!o||"object"==o||"array"==o||s&&(0<=o.indexOf("object")||0<=o.indexOf("array"))?r+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+u+"[i], "+u+"[j])) { "+h+" = false; break outer; } } } ":(r=(r+=" var itemIndices = {}, item; for (;i--;) { var item = "+u+"[i]; ")+" if ("+e.util["checkDataType"+(s?"s":"")](o,"item",e.opts.strictNumbers,!0)+") continue; ",s&&(r+=" if (typeof item == 'string') item = '\"' + item; "),r+=" if (typeof itemIndices[item] == 'number') { "+h+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "),r+=" } ",d&&(r+=" } "),(i=i||[]).push(r+=" if (!"+h+") { "),r="",!1!==e.createErrors?(r+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(t)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(r+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(r=(r+=" , schema: ")+(d?"validate.schema"+l:""+a)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ",o=r,r=i.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+o+"]); ":r+=" validate.errors = ["+o+"]; return false; ":r+=" var err = "+o+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } ",c&&(r+=" else { ")):c&&(r+=" if (true) { "),r}},1869:function(e){"use strict";e.exports=function(e,t,n){var i="",r=!0===e.schema.$async,o=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),s=e.self._getId(e.schema);if(e.opts.strictKeywords&&(R=e.util.schemaUnknownRules(e.schema,e.RULES.keywords))){if(R="unknown keyword: "+R,"log"!==e.opts.strictKeywords)throw new Error(R);e.logger.warn(R)}if(e.isTop&&(i+=" var validate = ",r&&(e.async=!0,i+="async "),i+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",s)&&(e.opts.sourceCode||e.opts.processCode)&&(i+=" /*# sourceURL="+s+" */ "),"boolean"==typeof e.schema||!o&&!e.schema.$ref)l=e.level,c=e.dataLevel,N=e.schema[t="false schema"],b=e.schemaPath+e.util.getProperty(t),I=e.errSchemaPath+"/"+t,p=!e.opts.allErrors,u="data"+(c||""),d="valid"+l,!1===e.schema?(e.isTop?p=!0:i+=" var "+d+" = false; ",(G=G||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(I)+" , params: {} ",!1!==e.opts.messages&&(i+=" , message: 'boolean schema is false' "),e.opts.verbose&&(i+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ",T=i,i=G.pop(),!e.compositeRule&&p?e.async?i+=" throw new ValidationError(["+T+"]); ":i+=" validate.errors = ["+T+"]; return false; ":i+=" var err = "+T+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "):e.isTop?i+=r?" return data; ":" validate.errors = null; return true; ":i+=" var "+d+" = true; ",e.isTop&&(i+=" }; return validate; ");else{if(e.isTop){var a=e.isTop,l=e.level=0,c=e.dataLevel=0,u="data";if(e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema)),e.baseId=e.baseId||e.rootId,delete e.isTop,e.dataPathArr=[""],void 0!==e.schema.default&&e.opts.useDefaults&&e.opts.strictDefaults){var h="default is ignored in the schema root";if("log"!==e.opts.strictDefaults)throw new Error(h);e.logger.warn(h)}i=(i+=" var vErrors = null; ")+" var errors = 0; if (rootData === undefined) rootData = data; "}else{if(l=e.level,u="data"+((c=e.dataLevel)||""),s&&(e.baseId=e.resolve.url(e.baseId,s)),r&&!e.async)throw new Error("async schema in sync schema");i+=" var errs_"+l+" = errors;"}var d="valid"+l,p=!e.opts.allErrors,g="",f="",m=e.schema.type,v=Array.isArray(m);if(m&&e.opts.nullable&&!0===e.schema.nullable&&(v?-1==m.indexOf("null")&&(m=m.concat("null")):"null"!=m&&(m=[m,"null"],v=!0)),v&&1==m.length&&(m=m[0],v=!1),e.schema.$ref&&o){if("fail"==e.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)');!0!==e.opts.extendRefs&&(o=!1,e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"'))}if(e.schema.$comment&&e.opts.$comment&&(i+=" "+e.RULES.all.$comment.code(e,"$comment")),m){e.opts.coerceTypes&&(y=e.util.coerceToTypes(e.opts.coerceTypes,m));var y,C=e.RULES.types[m];if(y||v||!0===C||C&&!K(C)){var b=e.schemaPath+".type",I=e.errSchemaPath+"/type";if(b=e.schemaPath+".type",I=e.errSchemaPath+"/type",i+=" if ("+e.util[v?"checkDataTypes":"checkDataType"](m,u,e.opts.strictNumbers,!0)+") { ",y){var A="dataType"+l,w="coerced"+l,x=(i+=" var "+A+" = typeof "+u+"; var "+w+" = undefined; ","array"==e.opts.coerceTypes&&(i+=" if ("+A+" == 'object' && Array.isArray("+u+") && "+u+".length == 1) { "+u+" = "+u+"[0]; "+A+" = typeof "+u+"; if ("+e.util.checkDataType(e.schema.type,u,e.opts.strictNumbers)+") "+w+" = "+u+"; } "),i+=" if ("+w+" !== undefined) ; ",y);if(x)for(var S,k=-1,E=x.length-1;k<E;)"string"==(S=x[k+=1])?i+=" else if ("+A+" == 'number' || "+A+" == 'boolean') "+w+" = '' + "+u+"; else if ("+u+" === null) "+w+" = ''; ":"number"==S||"integer"==S?(i+=" else if ("+A+" == 'boolean' || "+u+" === null || ("+A+" == 'string' && "+u+" && "+u+" == +"+u+" ","integer"==S&&(i+=" && !("+u+" % 1)"),i+=")) "+w+" = +"+u+"; "):"boolean"==S?i+=" else if ("+u+" === 'false' || "+u+" === 0 || "+u+" === null) "+w+" = false; else if ("+u+" === 'true' || "+u+" === 1) "+w+" = true; ":"null"==S?i+=" else if ("+u+" === '' || "+u+" === 0 || "+u+" === false) "+w+" = null; ":"array"==e.opts.coerceTypes&&"array"==S&&(i+=" else if ("+A+" == 'string' || "+A+" == 'number' || "+A+" == 'boolean' || "+u+" == null) "+w+" = ["+u+"]; ");(G=G||[]).push(i+=" else { "),i="",!1!==e.createErrors?(i=(i+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(I)+" , params: { type: '")+(v?""+m.join(","):""+m)+"' } ",!1!==e.opts.messages&&(i=(i+=" , message: 'should be ")+(v?""+m.join(","):""+m)+"' "),e.opts.verbose&&(i+=" , schema: validate.schema"+b+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ";var T=i,R=(i=G.pop(),!e.compositeRule&&p?e.async?i+=" throw new ValidationError(["+T+"]); ":i+=" validate.errors = ["+T+"]; return false; ":i+=" var err = "+T+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c?"data"+(c-1||""):"parentData");i=i+" } if ("+w+" !== undefined) { "+u+" = "+w+"; ",c||(i+="if ("+R+" !== undefined)"),i+=" "+R+"["+(c?e.dataPathArr[c]:"parentDataProperty")+"] = "+w+"; } "}else(G=G||[]).push(i),i="",!1!==e.createErrors?(i=(i+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(I)+" , params: { type: '")+(v?""+m.join(","):""+m)+"' } ",!1!==e.opts.messages&&(i=(i+=" , message: 'should be ")+(v?""+m.join(","):""+m)+"' "),e.opts.verbose&&(i+=" , schema: validate.schema"+b+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ",T=i,i=G.pop(),!e.compositeRule&&p?e.async?i+=" throw new ValidationError(["+T+"]); ":i+=" validate.errors = ["+T+"]; return false; ":i+=" var err = "+T+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";i+=" } "}}if(e.schema.$ref&&!o)i+=" "+e.RULES.all.$ref.code(e,"$ref")+" ",p&&(i=(i+=" } if (errors === ")+(a?"0":"errs_"+l)+") { ",f+="}");else{var _=e.RULES;if(_)for(var $=-1,L=_.length-1;$<L;)if(K(C=_[$+=1])){if(C.type&&(i+=" if ("+e.util.checkDataType(C.type,u,e.opts.strictNumbers)+") { "),e.opts.useDefaults)if("object"==C.type&&e.schema.properties){var N=e.schema.properties,M=Object.keys(N);if(M)for(var P,O=-1,B=M.length-1;O<B;)if(void 0!==(H=N[P=M[O+=1]]).default){var W=u+e.util.getProperty(P);if(e.compositeRule){if(e.opts.strictDefaults){if(h="default is ignored for: "+W,"log"!==e.opts.strictDefaults)throw new Error(h);e.logger.warn(h)}}else i+=" if ("+W+" === undefined ","empty"==e.opts.useDefaults&&(i+=" || "+W+" === null || "+W+" === '' "),i+=" ) "+W+" = ","shared"==e.opts.useDefaults?i+=" "+e.useDefault(H.default)+" ":i+=" "+JSON.stringify(H.default)+" ",i+="; "}}else if("array"==C.type&&Array.isArray(e.schema.items)){var F=e.schema.items;if(F){k=-1;for(var H,D=F.length-1;k<D;)if(void 0!==(H=F[k+=1]).default)if(W=u+"["+k+"]",e.compositeRule){if(e.opts.strictDefaults){if(h="default is ignored for: "+W,"log"!==e.opts.strictDefaults)throw new Error(h);e.logger.warn(h)}}else i+=" if ("+W+" === undefined ","empty"==e.opts.useDefaults&&(i+=" || "+W+" === null || "+W+" === '' "),i+=" ) "+W+" = ","shared"==e.opts.useDefaults?i+=" "+e.useDefault(H.default)+" ":i+=" "+JSON.stringify(H.default)+" ",i+="; "}}var G,V=C.rules;if(V)for(var j,Z=-1,z=V.length-1;Z<z;)X(j=V[Z+=1])&&(j=j.code(e,j.keyword,C.type))&&(i+=" "+j+" ",p)&&(g+="}");p&&(i+=" "+g+" ",g=""),C.type&&(i+=" } ",m)&&m===C.type&&!y&&(i+=" else { ",b=e.schemaPath+".type",I=e.errSchemaPath+"/type",(G=G||[]).push(i),i="",!1!==e.createErrors?(i=(i+=" { keyword: 'type' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(I)+" , params: { type: '")+(v?""+m.join(","):""+m)+"' } ",!1!==e.opts.messages&&(i=(i+=" , message: 'should be ")+(v?""+m.join(","):""+m)+"' "),e.opts.verbose&&(i+=" , schema: validate.schema"+b+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),i+=" } "):i+=" {} ",T=i,i=G.pop(),!e.compositeRule&&p?e.async?i+=" throw new ValidationError(["+T+"]); ":i+=" validate.errors = ["+T+"]; return false; ":i+=" var err = "+T+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } "),p&&(i=(i+=" if (errors === ")+(a?"0":"errs_"+l)+") { ",f+="}")}}p&&(i+=" "+f+" "),a?i=i+(r?" if (errors === 0) return data; else throw new ValidationError(vErrors); ":" validate.errors = vErrors; return errors === 0; ")+" }; return validate;":i+=" var "+d+" = errors === errs_"+l+";"}return i;function K(e){for(var t=e.rules,n=0;n<t.length;n++)if(X(t[n]))return 1}function X(t){return void 0!==e.schema[t.keyword]||t.implements&&function(t){for(var n=t.implements,i=0;i<n.length;i++)if(void 0!==e.schema[n[i]])return 1}(t)}}},7931:function(e,t,n){"use strict";var i=/^[a-z_$][a-z0-9_$-]*$/i,r=n(1793),o=n(5868);function s(e,t){s.errors=null;var n=this._validateKeyword=this._validateKeyword||this.compile(o,!0);if(n(e))return!0;if(s.errors=n.errors,t)throw new Error("custom keyword definition is invalid: "+this.errorsText(n.errors));return!1}e.exports={add:function(e,t){var n=this.RULES;if(n.keywords[e])throw new Error("Keyword "+e+" is already defined");if(!i.test(e))throw new Error("Keyword "+e+" is not a valid identifier");if(t){this.validateKeyword(t,!0);var o=t.type;if(Array.isArray(o))for(var s=0;s<o.length;s++)l(e,o[s],t);else l(e,o,t);var a=t.metaSchema;a&&(t.$data&&this._opts.$data&&(a={anyOf:[a,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}),t.validateSchema=this.compile(a,!0))}function l(e,t,i){for(var o,s=0;s<n.length;s++){var a=n[s];if(a.type==t){o=a;break}}o||n.push(o={type:t,rules:[]}),i={keyword:e,definition:i,custom:!0,code:r,implements:i.implements},o.rules.push(i),n.custom[e]=i}return n.keywords[e]=n.all[e]=!0,this},get:function(e){var t=this.RULES.custom[e];return t?t.definition:this.RULES.keywords[e]||!1},remove:function(e){var t=this.RULES;delete t.keywords[e],delete t.all[e],delete t.custom[e];for(var n=0;n<t.length;n++)for(var i=t[n].rules,r=0;r<i.length;r++)if(i[r].keyword==e){i.splice(r,1);break}return this},validate:s}},2303:function(e){"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var i,r,o;if(Array.isArray(t)){if((i=t.length)!=n.length)return!1;for(r=i;0!=r--;)if(!e(t[r],n[r]))return!1}else{if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((i=(o=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(r=i;0!=r--;)if(!Object.prototype.hasOwnProperty.call(n,o[r]))return!1;for(r=i;0!=r--;){var s=o[r];if(!e(t[s],n[s]))return!1}}return!0}return t!=t&&n!=n}},3508:function(e){"use strict";e.exports=function(e,t){var n,i="boolean"==typeof(t="function"==typeof(t=t||{})?{cmp:t}:t).cycles&&t.cycles,r=t.cmp&&(n=t.cmp,function(e){return function(t,i){return t={key:t,value:e[t]},i={key:i,value:e[i]},n(t,i)}}),o=[];return function e(t){if(void 0!==(t=t&&t.toJSON&&"function"==typeof t.toJSON?t.toJSON():t)){if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);if(Array.isArray(t)){for(a="[",l=0;l<t.length;l++)l&&(a+=","),a+=e(t[l])||"null";return a+"]"}if(null===t)return"null";if(-1!==o.indexOf(t)){if(i)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}for(var n=o.push(t)-1,s=Object.keys(t).sort(r&&r(t)),a="",l=0;l<s.length;l++){var c=s[l],u=e(t[c]);u&&(a&&(a+=","),a+=JSON.stringify(c)+":"+u)}return o.splice(n,1),"{"+a+"}"}}(e)}},233:function(e){e.exports=function e(t,n){"use strict";function i(t){return e.insensitive&&(""+t).toLowerCase()||""+t}var r,o,s=/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,a=/(^[ ]*|[ ]*$)/g,l=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,c=/^0x[0-9a-f]+$/i,u=/^0/,h=(t=i(t).replace(a,"")||"",n=i(n).replace(a,"")||"",t.replace(s,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0")),d=n.replace(s,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0");if(a=parseInt(t.match(c),16)||1!==h.length&&t.match(l)&&Date.parse(t),s=parseInt(n.match(c),16)||a&&n.match(l)&&Date.parse(n)||null){if(a<s)return-1;if(s<a)return 1}for(var p=0,g=Math.max(h.length,d.length);p<g;p++){if(r=!(h[p]||"").match(u)&&parseFloat(h[p])||h[p]||0,o=!(d[p]||"").match(u)&&parseFloat(d[p])||d[p]||0,isNaN(r)!==isNaN(o))return isNaN(r)?1:-1;if(typeof r!=typeof o&&(r+="",o+=""),r<o)return-1;if(o<r)return 1}return 0}},5156:function(e,t){!function(e){"use strict";function t(e){return null!==e&&"[object Array]"===Object.prototype.toString.call(e)}function n(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)}function i(e,r){if(e!==r){if(Object.prototype.toString.call(e)!==Object.prototype.toString.call(r))return!1;if(!0===t(e)){if(e.length!==r.length)return!1;for(var o=0;o<e.length;o++)if(!1===i(e[o],r[o]))return!1}else{if(!0!==n(e))return!1;var s,a,l={};for(s in e)if(hasOwnProperty.call(e,s)){if(!1===i(e[s],r[s]))return!1;l[s]=!0}for(a in r)if(hasOwnProperty.call(r,a)&&!0!==l[a])return!1}}return!0}function r(e){if(""===e||!1===e||null===e)return!0;if(t(e)&&0===e.length)return!0;if(n(e)){for(var i in e)if(e.hasOwnProperty(i))return!1;return!0}return!1}var o="function"==typeof String.prototype.trimLeft?function(e){return e.trimLeft()}:function(e){return e.match(/^\s*(.*)/)[1]},s={0:"number",1:"any",2:"string",3:"array",4:"object",5:"boolean",6:"expression",7:"null",8:"Array<number>",9:"Array<string>"},a="UnquotedIdentifier",l="QuotedIdentifier",c="Rbracket",u="Rparen",h="Comma",d="Colon",p="Rbrace",g="Number",f="Current",m="Expref",v="Pipe",y="Flatten",C="Star",b="Filter",I="Lbrace",A="Lbracket",w="Lparen",x="Literal",S={".":"Dot","*":C,",":h,":":d,"{":I,"}":p,"]":c,"(":w,")":u,"@":f},k={"<":!0,">":!0,"=":!0,"!":!0},E={" ":!0,"\t":!0,"\n":!0};function T(e){return"0"<=e&&e<="9"||"-"===e}function R(){}R.prototype={tokenize:function(e){var t,n,i=[];for(this._current=0;this._current<e.length;)if("a"<=(o=e[this._current])&&o<="z"||"A"<=o&&o<="Z"||"_"===o)r=this._current,t=this._consumeUnquotedIdentifier(e),i.push({type:a,value:t,start:r});else if(void 0!==S[e[this._current]])i.push({type:S[e[this._current]],value:e[this._current],start:this._current}),this._current++;else if(T(e[this._current]))n=this._consumeNumber(e),i.push(n);else if("["===e[this._current])n=this._consumeLBracket(e),i.push(n);else if('"'===e[this._current])r=this._current,t=this._consumeQuotedIdentifier(e),i.push({type:l,value:t,start:r});else if("'"===e[this._current])r=this._current,t=this._consumeRawStringLiteral(e),i.push({type:x,value:t,start:r});else if("`"===e[this._current]){var r=this._current,o=this._consumeLiteral(e);i.push({type:x,value:o,start:r})}else if(void 0!==k[e[this._current]])i.push(this._consumeOperator(e));else if(void 0!==E[e[this._current]])this._current++;else if("&"===e[this._current])r=this._current,this._current++,"&"===e[this._current]?(this._current++,i.push({type:"And",value:"&&",start:r})):i.push({type:m,value:"&",start:r});else{if("|"!==e[this._current])throw(o=new Error("Unknown character:"+e[this._current])).name="LexerError",o;r=this._current,this._current++,"|"===e[this._current]?(this._current++,i.push({type:"Or",value:"||",start:r})):i.push({type:v,value:"|",start:r})}return i},_consumeUnquotedIdentifier:function(e){var t,n=this._current;for(this._current++;this._current<e.length&&("a"<=(t=e[this._current])&&t<="z"||"A"<=t&&t<="Z"||"0"<=t&&t<="9"||"_"===t);)this._current++;return e.slice(n,this._current)},_consumeQuotedIdentifier:function(e){for(var t=this._current,n=(this._current++,e.length);'"'!==e[this._current]&&this._current<n;){var i=this._current;"\\"!==e[i]||"\\"!==e[i+1]&&'"'!==e[i+1]?i++:i+=2,this._current=i}return this._current++,JSON.parse(e.slice(t,this._current))},_consumeRawStringLiteral:function(e){for(var t=this._current,n=(this._current++,e.length);"'"!==e[this._current]&&this._current<n;){var i=this._current;"\\"!==e[i]||"\\"!==e[i+1]&&"'"!==e[i+1]?i++:i+=2,this._current=i}return this._current++,e.slice(t+1,this._current-1).replace("\\'","'")},_consumeNumber:function(e){for(var t=this._current,n=(this._current++,e.length);T(e[this._current])&&this._current<n;)this._current++;var i=parseInt(e.slice(t,this._current));return{type:g,value:i,start:t}},_consumeLBracket:function(e){var t=this._current;return this._current++,"?"===e[this._current]?(this._current++,{type:b,value:"[?",start:t}):"]"===e[this._current]?(this._current++,{type:y,value:"[]",start:t}):{type:A,value:"[",start:t}},_consumeOperator:function(e){var t=this._current,n=e[t];return this._current++,"!"===n?"="===e[this._current]?(this._current++,{type:"NE",value:"!=",start:t}):{type:"Not",value:"!",start:t}:"<"===n?"="===e[this._current]?(this._current++,{type:"LTE",value:"<=",start:t}):{type:"LT",value:"<",start:t}:">"===n?"="===e[this._current]?(this._current++,{type:"GTE",value:">=",start:t}):{type:"GT",value:">",start:t}:"="===n&&"="===e[this._current]?(this._current++,{type:"EQ",value:"==",start:t}):void 0},_consumeLiteral:function(e){this._current++;for(var t=this._current,n=e.length;"`"!==e[this._current]&&this._current<n;){var i=this._current;"\\"!==e[i]||"\\"!==e[i+1]&&"`"!==e[i+1]?i++:i+=2,this._current=i}return t=(t=o(e.slice(t,this._current))).replace("\\`","`"),t=this._looksLikeJSON(t)?JSON.parse(t):JSON.parse('"'+t+'"'),this._current++,t},_looksLikeJSON:function(e){if(""===e)return!1;if(0<='[{"'.indexOf(e[0]))return!0;if(0<=["true","false","null"].indexOf(e))return!0;if(!(0<="-0123456789".indexOf(e[0])))return!1;try{return JSON.parse(e),!0}catch(e){return!1}}};var _={};function $(){}function L(e){this.runtime=e}function N(e){this._interpreter=e,this.functionTable={abs:{_func:this._functionAbs,_signature:[{types:[0]}]},avg:{_func:this._functionAvg,_signature:[{types:[8]}]},ceil:{_func:this._functionCeil,_signature:[{types:[0]}]},contains:{_func:this._functionContains,_signature:[{types:[2,3]},{types:[1]}]},ends_with:{_func:this._functionEndsWith,_signature:[{types:[2]},{types:[2]}]},floor:{_func:this._functionFloor,_signature:[{types:[0]}]},length:{_func:this._functionLength,_signature:[{types:[2,3,4]}]},map:{_func:this._functionMap,_signature:[{types:[6]},{types:[3]}]},max:{_func:this._functionMax,_signature:[{types:[8,9]}]},merge:{_func:this._functionMerge,_signature:[{types:[4],variadic:!0}]},max_by:{_func:this._functionMaxBy,_signature:[{types:[3]},{types:[6]}]},sum:{_func:this._functionSum,_signature:[{types:[8]}]},starts_with:{_func:this._functionStartsWith,_signature:[{types:[2]},{types:[2]}]},min:{_func:this._functionMin,_signature:[{types:[8,9]}]},min_by:{_func:this._functionMinBy,_signature:[{types:[3]},{types:[6]}]},type:{_func:this._functionType,_signature:[{types:[1]}]},keys:{_func:this._functionKeys,_signature:[{types:[4]}]},values:{_func:this._functionValues,_signature:[{types:[4]}]},sort:{_func:this._functionSort,_signature:[{types:[9,8]}]},sort_by:{_func:this._functionSortBy,_signature:[{types:[3]},{types:[6]}]},join:{_func:this._functionJoin,_signature:[{types:[2]},{types:[9]}]},reverse:{_func:this._functionReverse,_signature:[{types:[2,3]}]},to_array:{_func:this._functionToArray,_signature:[{types:[1]}]},to_string:{_func:this._functionToString,_signature:[{types:[1]}]},to_number:{_func:this._functionToNumber,_signature:[{types:[1]}]},not_null:{_func:this._functionNotNull,_signature:[{types:[1],variadic:!0}]}}}_.EOF=0,_[a]=0,_[l]=0,_[c]=0,_[u]=0,_[h]=0,_[p]=0,_[g]=0,_[f]=0,_[m]=0,_.Pipe=1,_.Or=2,_.And=3,_.EQ=5,_.GT=5,_.LT=5,_.GTE=5,_.LTE=5,_.NE=5,_[y]=9,_.Star=20,_[b]=21,_.Dot=40,_.Not=45,_[I]=50,_[A]=55,_[w]=60,$.prototype={parse:function(e){var t;if(this._loadTokens(e),this.index=0,e=this.expression(0),"EOF"!==this._lookahead(0))throw t=this._lookaheadToken(0),(t=new Error("Unexpected token type: "+t.type+", value: "+t.value)).name="ParserError",t;return e},_loadTokens:function(e){var t=(new R).tokenize(e);t.push({type:"EOF",value:"",start:e.length}),this.tokens=t},expression:function(e){for(var t=this._lookaheadToken(0),n=(this._advance(),this.nud(t)),i=this._lookahead(0);e<_[i];)this._advance(),n=this.led(i,n),i=this._lookahead(0);return n},_lookahead:function(e){return this.tokens[this.index+e].type},_lookaheadToken:function(e){return this.tokens[this.index+e]},_advance:function(){this.index++},nud:function(e){var t,n;switch(e.type){case x:return{type:"Literal",value:e.value};case a:return{type:"Field",name:e.value};case l:var i={type:"Field",name:e.value};if(this._lookahead(0)===w)throw new Error("Quoted identifier not allowed for function names.");return i;case"Not":return{type:"NotExpression",children:[t=this.expression(_.Not)]};case C:return t=null,{type:"ValueProjection",children:[{type:"Identity"},t=this._lookahead(0)===c?{type:"Identity"}:this._parseProjectionRHS(_.Star)]};case b:return this.led(e.type,{type:"Identity"});case I:return this._parseMultiselectHash();case y:return{type:"Projection",children:[{type:y,children:[{type:"Identity"}]},t=this._parseProjectionRHS(_.Flatten)]};case A:return this._lookahead(0)===g||this._lookahead(0)===d?(t=this._parseIndexExpression(),this._projectIfSlice({type:"Identity"},t)):this._lookahead(0)===C&&this._lookahead(1)===c?(this._advance(),this._advance(),{type:"Projection",children:[{type:"Identity"},t=this._parseProjectionRHS(_.Star)]}):this._parseMultiselectList();case f:return{type:f};case m:return{type:"ExpressionReference",children:[n=this.expression(_.Expref)]};case w:for(var r=[];this._lookahead(0)!==u;)this._lookahead(0)===f?(n={type:f},this._advance()):n=this.expression(0),r.push(n);return this._match(u),r[0];default:this._errorToken(e)}},led:function(e,t){var n;switch(e){case"Dot":var i=_.Dot;return this._lookahead(0)!==C?{type:"Subexpression",children:[t,n=this._parseDotRHS(i)]}:(this._advance(),{type:"ValueProjection",children:[t,n=this._parseProjectionRHS(i)]});case v:return n=this.expression(_.Pipe),{type:v,children:[t,n]};case"Or":return{type:"OrExpression",children:[t,n=this.expression(_.Or)]};case"And":return{type:"AndExpression",children:[t,n=this.expression(_.And)]};case w:i=t.name;for(var r,o=[];this._lookahead(0)!==u;)this._lookahead(0)===f?(r={type:f},this._advance()):r=this.expression(0),this._lookahead(0)===h&&this._match(h),o.push(r);return this._match(u),{type:"Function",name:i,children:o};case b:return i=this.expression(0),this._match(c),{type:"FilterProjection",children:[t,n=this._lookahead(0)===y?{type:"Identity"}:this._parseProjectionRHS(_.Filter),i]};case y:return{type:"Projection",children:[{type:y,children:[t]},this._parseProjectionRHS(_.Flatten)]};case"EQ":case"NE":case"GT":case"GTE":case"LT":case"LTE":return this._parseComparator(t,e);case A:return(i=this._lookaheadToken(0)).type===g||i.type===d?(n=this._parseIndexExpression(),this._projectIfSlice(t,n)):(this._match(C),this._match(c),{type:"Projection",children:[t,n=this._parseProjectionRHS(_.Star)]});default:this._errorToken(this._lookaheadToken(0))}},_match:function(e){var t;if(this._lookahead(0)!==e)throw t=this._lookaheadToken(0),(e=new Error("Expected "+e+", got: "+t.type)).name="ParserError",e;this._advance()},_errorToken:function(e){throw(e=new Error("Invalid token ("+e.type+'): "'+e.value+'"')).name="ParserError",e},_parseIndexExpression:function(){var e;return this._lookahead(0)===d||this._lookahead(1)===d?this._parseSliceExpression():(e={type:"Index",value:this._lookaheadToken(0).value},this._advance(),this._match(c),e)},_projectIfSlice:function(e,t){return e={type:"IndexExpression",children:[e,t]},"Slice"===t.type?{type:"Projection",children:[e,this._parseProjectionRHS(_.Star)]}:e},_parseSliceExpression:function(){for(var e,t=[null,null,null],n=0,i=this._lookahead(0);i!==c&&n<3;){if(i===d)n++;else{if(i!==g)throw e=this._lookahead(0),(e=new Error("Syntax error, unexpected token: "+e.value+"("+e.type+")")).name="Parsererror",e;t[n]=this._lookaheadToken(0).value}this._advance(),i=this._lookahead(0)}return this._match(c),{type:"Slice",children:t}},_parseComparator:function(e,t){return{type:"Comparator",name:t,children:[e,this.expression(_[t])]}},_parseDotRHS:function(e){var t=this._lookahead(0);return 0<=[a,l,C].indexOf(t)?this.expression(e):t===A?(this._match(A),this._parseMultiselectList()):t===I?(this._match(I),this._parseMultiselectHash()):void 0},_parseProjectionRHS:function(e){var t,n;if(_[this._lookahead(0)]<10)t={type:"Identity"};else if(this._lookahead(0)===A)t=this.expression(e);else if(this._lookahead(0)===b)t=this.expression(e);else{if("Dot"!==this._lookahead(0))throw n=this._lookaheadToken(0),(n=new Error("Sytanx error, unexpected token: "+n.value+"("+n.type+")")).name="ParserError",n;this._match("Dot"),t=this._parseDotRHS(e)}return t},_parseMultiselectList:function(){for(var e=[];this._lookahead(0)!==c;){var t=this.expression(0);if(e.push(t),this._lookahead(0)===h&&(this._match(h),this._lookahead(0)===c))throw new Error("Unexpected token Rbracket")}return this._match(c),{type:"MultiSelectList",children:e}},_parseMultiselectHash:function(){for(var e,t,n=[],i=[a,l];;){if(e=this._lookaheadToken(0),i.indexOf(e.type)<0)throw new Error("Expecting an identifier token, got: "+e.type);if(e=e.value,this._advance(),this._match(d),t=this.expression(0),n.push({type:"KeyValuePair",name:e,value:t}),this._lookahead(0)===h)this._match(h);else if(this._lookahead(0)===p){this._match(p);break}}return{type:"MultiSelectHash",children:n}}},L.prototype={search:function(e,t){return this.visit(e,t)},visit:function(e,o){var s,a,l,c,u,h;switch(e.type){case"Field":return null!==o&&n(o)?void 0===(d=o[e.name])?null:d:null;case"Subexpression":for(b=this.visit(e.children[0],o),x=1;x<e.children.length;x++)if(null===(b=this.visit(e.children[1],b)))return null;return b;case"IndexExpression":return u=this.visit(e.children[0],o),this.visit(e.children[1],u);case"Index":return t(o)?void 0===(b=o[d=(d=e.value)<0?o.length+d:d])?null:b:null;case"Slice":if(!t(o))return null;var d=e.children.slice(0),p=(d=this.computeSliceParams(o.length,d))[0],g=d[1],C=d[2],b=[];if(0<C)for(x=p;x<g;x+=C)b.push(o[x]);else for(x=p;g<x;x+=C)b.push(o[x]);return b;case"Projection":var I=this.visit(e.children[0],o);if(!t(I))return null;for(A=[],x=0;x<I.length;x++)null!==(a=this.visit(e.children[1],I[x]))&&A.push(a);return A;case"ValueProjection":if(!n(I=this.visit(e.children[0],o)))return null;for(var A=[],w=function(e){for(var t=Object.keys(e),n=[],i=0;i<t.length;i++)n.push(e[t[i]]);return n}(I),x=0;x<w.length;x++)null!==(a=this.visit(e.children[1],w[x]))&&A.push(a);return A;case"FilterProjection":if(!t(I=this.visit(e.children[0],o)))return null;var S=[],k=[];for(x=0;x<I.length;x++)r(s=this.visit(e.children[2],I[x]))||S.push(I[x]);for(var E=0;E<S.length;E++)null!==(a=this.visit(e.children[1],S[E]))&&k.push(a);return k;case"Comparator":switch(l=this.visit(e.children[0],o),c=this.visit(e.children[1],o),e.name){case"EQ":b=i(l,c);break;case"NE":b=!i(l,c);break;case"GT":b=c<l;break;case"GTE":b=c<=l;break;case"LT":b=l<c;break;case"LTE":b=l<=c;break;default:throw new Error("Unknown comparator: "+e.name)}return b;case y:var T=this.visit(e.children[0],o);if(!t(T))return null;var R=[];for(x=0;x<T.length;x++)t(a=T[x])?R.push.apply(R,a):R.push(a);return R;case"Identity":return o;case"MultiSelectList":if(null===o)return null;for(A=[],x=0;x<e.children.length;x++)A.push(this.visit(e.children[x],o));return A;case"MultiSelectHash":if(null===o)return null;for(A={},x=0;x<e.children.length;x++)A[(h=e.children[x]).name]=this.visit(h.value,o);return A;case"OrExpression":return r(s=this.visit(e.children[0],o))?this.visit(e.children[1],o):s;case"AndExpression":return!0===r(l=this.visit(e.children[0],o))?l:this.visit(e.children[1],o);case"NotExpression":return r(l=this.visit(e.children[0],o));case"Literal":return e.value;case v:return u=this.visit(e.children[0],o),this.visit(e.children[1],u);case f:return o;case"Function":var _=[];for(x=0;x<e.children.length;x++)_.push(this.visit(e.children[x],o));return this.runtime.callFunction(e.name,_);case"ExpressionReference":return(d=e.children[0]).jmespathType=m,d;default:throw new Error("Unknown node type: "+e.type)}},computeSliceParams:function(e,t){var n=t[0],i=t[1],r=[null,null,null];if(null===(t=t[2]))t=1;else if(0===t)throw(o=new Error("Invalid slice, step cannot be 0")).name="RuntimeError",o;var o=t<0;return n=null===n?o?e-1:0:this.capSliceRange(e,n,t),i=null===i?o?-1:e:this.capSliceRange(e,i,t),r[0]=n,r[1]=i,r[2]=t,r},capSliceRange:function(e,t,n){return t<0?(t+=e)<0&&(t=n<0?-1:0):e<=t&&(t=n<0?e-1:e),t}},N.prototype={callFunction:function(e,t){var n=this.functionTable[e];if(void 0===n)throw new Error("Unknown function: "+e+"()");return this._validateArgs(e,t,n._signature),n._func.call(this,t)},_validateArgs:function(e,t,n){var i;if(n[n.length-1].variadic){if(t.length<n.length)throw i=1===n.length?" argument":" arguments",new Error("ArgumentError: "+e+"() takes at least"+n.length+i+" but received "+t.length)}else if(t.length!==n.length)throw i=1===n.length?" argument":" arguments",new Error("ArgumentError: "+e+"() takes "+n.length+i+" but received "+t.length);for(var r=0;r<n.length;r++){for(var o,a=!1,l=n[r].types,c=this._getTypeName(t[r]),u=0;u<l.length;u++)if(this._typeMatches(c,l[u],t[r])){a=!0;break}if(!a)throw o=l.map((function(e){return s[e]})).join(","),new Error("TypeError: "+e+"() expected argument "+(r+1)+" to be type "+o+" but received type "+s[c]+" instead.")}},_typeMatches:function(e,t,n){if(1===t)return!0;if(9!==t&&8!==t&&3!==t)return e===t;if(3===t)return 3===e;if(3===e){var i;8===t?i=0:9===t&&(i=2);for(var r=0;r<n.length;r++)if(!this._typeMatches(this._getTypeName(n[r]),i,n[r]))return!1;return!0}},_getTypeName:function(e){switch(Object.prototype.toString.call(e)){case"[object String]":return 2;case"[object Number]":return 0;case"[object Array]":return 3;case"[object Boolean]":return 5;case"[object Null]":return 7;case"[object Object]":return e.jmespathType===m?6:4}},_functionStartsWith:function(e){return 0===e[0].lastIndexOf(e[1])},_functionEndsWith:function(e){var t=e[0];return e=e[1],-1!==t.indexOf(e,t.length-e.length)},_functionReverse:function(e){var t;if(2!==this._getTypeName(e[0]))return(t=e[0].slice(0)).reverse(),t;for(var n=e[0],i="",r=n.length-1;0<=r;r--)i+=n[r];return i},_functionAbs:function(e){return Math.abs(e[0])},_functionCeil:function(e){return Math.ceil(e[0])},_functionAvg:function(e){for(var t=0,n=e[0],i=0;i<n.length;i++)t+=n[i];return t/n.length},_functionContains:function(e){return 0<=e[0].indexOf(e[1])},_functionFloor:function(e){return Math.floor(e[0])},_functionLength:function(e){return(n(e[0])?Object.keys(e[0]):e[0]).length},_functionMap:function(e){for(var t=[],n=this._interpreter,i=e[0],r=e[1],o=0;o<r.length;o++)t.push(n.visit(i,r[o]));return t},_functionMerge:function(e){for(var t={},n=0;n<e.length;n++){var i,r=e[n];for(i in r)t[i]=r[i]}return t},_functionMax:function(e){if(0<e[0].length){if(0===this._getTypeName(e[0][0]))return Math.max.apply(Math,e[0]);for(var t=e[0],n=t[0],i=1;i<t.length;i++)n.localeCompare(t[i])<0&&(n=t[i]);return n}return null},_functionMin:function(e){if(0<e[0].length){if(0===this._getTypeName(e[0][0]))return Math.min.apply(Math,e[0]);for(var t=e[0],n=t[0],i=1;i<t.length;i++)t[i].localeCompare(n)<0&&(n=t[i]);return n}return null},_functionSum:function(e){for(var t=0,n=e[0],i=0;i<n.length;i++)t+=n[i];return t},_functionType:function(e){switch(this._getTypeName(e[0])){case 0:return"number";case 2:return"string";case 3:return"array";case 4:return"object";case 5:return"boolean";case 6:return"expref";case 7:return"null"}},_functionKeys:function(e){return Object.keys(e[0])},_functionValues:function(e){for(var t=e[0],n=Object.keys(t),i=[],r=0;r<n.length;r++)i.push(t[n[r]]);return i},_functionJoin:function(e){var t=e[0];return e[1].join(t)},_functionToArray:function(e){return 3===this._getTypeName(e[0])?e[0]:[e[0]]},_functionToString:function(e){return 2===this._getTypeName(e[0])?e[0]:JSON.stringify(e[0])},_functionToNumber:function(e){var t=this._getTypeName(e[0]);return 0===t?e[0]:2!==t||(t=+e[0],isNaN(t))?null:t},_functionNotNull:function(e){for(var t=0;t<e.length;t++)if(7!==this._getTypeName(e[t]))return e[t];return null},_functionSort:function(e){return(e=e[0].slice(0)).sort(),e},_functionSortBy:function(e){var t=e[0].slice(0);if(0!==t.length){var n=this._interpreter,i=e[1],r=this._getTypeName(n.visit(i,t[0]));if([0,2].indexOf(r)<0)throw new Error("TypeError");for(var o=this,s=[],a=0;a<t.length;a++)s.push([a,t[a]]);s.sort((function(e,t){var s=n.visit(i,e[1]),a=n.visit(i,t[1]);if(o._getTypeName(s)!==r)throw new Error("TypeError: expected "+r+", received "+o._getTypeName(s));if(o._getTypeName(a)!==r)throw new Error("TypeError: expected "+r+", received "+o._getTypeName(a));return a<s?1:s<a?-1:e[0]-t[0]}));for(var l=0;l<s.length;l++)t[l]=s[l][1]}return t},_functionMaxBy:function(e){for(var t,n,i=e[1],r=e[0],o=this.createKeyFunction(i,[0,2]),s=-1/0,a=0;a<r.length;a++)s<(n=o(r[a]))&&(s=n,t=r[a]);return t},_functionMinBy:function(e){for(var t,n,i=e[1],r=e[0],o=this.createKeyFunction(i,[0,2]),s=1/0,a=0;a<r.length;a++)(n=o(r[a]))<s&&(s=n,t=r[a]);return t},createKeyFunction:function(e,t){var n=this,i=this._interpreter;return function(r){var o;if(r=i.visit(e,r),t.indexOf(n._getTypeName(r))<0)throw o="TypeError: expected one of "+t+", received "+n._getTypeName(r),new Error(o);return r}}},e.tokenize=function(e){return(new R).tokenize(e)},e.compile=function(e){return(new $).parse(e)},e.search=function(e,t){var n=new $,i=new L(r=new N),r=(r._interpreter=i,n.parse(t));return i.search(r,e)},e.strictDeepEqual=i}(t)},500:function(e){"use strict";var t=e.exports=function(e,i,r){"function"==typeof i&&(r=i,i={}),function e(i,r,o,s,a,l,c,u,h,d){if(s&&"object"==typeof s&&!Array.isArray(s)){for(var p in r(s,a,l,c,u,h,d),s){var g=s[p];if(Array.isArray(g)){if(p in t.arrayKeywords)for(var f=0;f<g.length;f++)e(i,r,o,g[f],a+"/"+p+"/"+f,l,a,p,s,f)}else if(p in t.propsKeywords){if(g&&"object"==typeof g)for(var m in g)e(i,r,o,g[m],a+"/"+p+"/"+n(m),l,a,p,s,m)}else(p in t.keywords||i.allKeys&&!(p in t.skipKeywords))&&e(i,r,o,g,a+"/"+p,l,a,p,s)}o(s,a,l,c,u,h,d)}}(i,"function"==typeof(r=i.cb||r)?r:r.pre||function(){},r.post||function(){},e,"",e)};function n(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}t.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0},t.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},t.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},t.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}},7026:function(e,t){"use strict";var n={b:"\b",f:"\f",n:"\n",r:"\r",t:"\t",'"':'"',"/":"/","\\":"\\"},i="a".charCodeAt(),r=(t.parse=function(e,t,r){var o={},s=0,a=0,l=0,c=r&&r.bigint&&"undefined"!=typeof BigInt;return{data:u("",!0),pointers:o};function u(t,n){h(),y(t,"value");var i,r=g();switch(r){case"t":p("rue"),i=!0;break;case"f":p("alse"),i=!1;break;case"n":p("ull"),i=null;break;case'"':i=d();break;case"[":i=function(e){h();var t=[],n=0;if("]"!=g())for(m();;){t.push(u(e+"/"+n)),h();var i=g();if("]"==i)break;","!=i&&A(),h(),n++}return t}(t);break;case"{":i=function(e){h();var t={};if("}"!=g())for(m();;){var n=b(),i=('"'!=g()&&A(),d()),r=e+"/"+f(i);if("}"==(C(r,"key",n),y(r,"keyEnd"),h(),":"!=g()&&A(),h(),t[i]=u(r),h(),n=g()))break;","!=n&&A(),h()}return t}(t);break;default:m(),0<="-0123456789".indexOf(r)?i=function(){var t="",n=!0;"-"==e[l]&&(t+=g()),t+=("0"==e[l]?g:v)(),"."==e[l]&&(t+=g()+v(),n=!1),"e"!=e[l]&&"E"!=e[l]||(t+=g(),"+"!=e[l]&&"-"!=e[l]||(t+=g()),t+=v(),n=!1);var i=+t;return c&&n&&(i>Number.MAX_SAFE_INTEGER||i<Number.MIN_SAFE_INTEGER)?BigInt(t):i}():I()}return y(t,"valueEnd"),h(),n&&l<e.length&&I(),i}function h(){e:for(;l<e.length;){switch(e[l]){case" ":a++;break;case"\t":a+=4;break;case"\r":a=0;break;case"\n":a=0,s++;break;default:break e}l++}}function d(){for(var e,t="";'"'!=(e=g());)"\\"==e?(e=g())in n?t+=n[e]:"u"==e?t+=function(){for(var e=4,t=0;e--;){t<<=4;var n=g().toLowerCase();"a"<=n&&n<="f"?t+=n.charCodeAt()-i+10:"0"<=n&&n<="9"?t+=+n:A()}return String.fromCharCode(t)}():A():t+=e;return t}function p(e){for(var t=0;t<e.length;t++)g()!==e[t]&&A()}function g(){w();var t=e[l];return l++,a++,t}function m(){l--,a--}function v(){for(var t="";"0"<=e[l]&&e[l]<="9";)t+=g();if(t.length)return t;w(),I()}function y(e,t){C(e,t,b())}function C(e,t,n){o[e]=o[e]||{},o[e][t]=n}function b(){return{line:s,column:a,pos:l}}function I(){throw new SyntaxError("Unexpected token "+e[l]+" in JSON at position "+l)}function A(){m(),I()}function w(){if(l>=e.length)throw new SyntaxError("Unexpected end of JSON input")}},t.stringify=function(e,t,n){if(o(e)){var i=0;switch(typeof(s="object"==typeof n?n.space:n)){case"number":var r=10<s?10:s<0?0:Math.floor(s),s=r&&I(r," "),a=r,l=r;break;case"string":s=s.slice(0,10);for(var c=l=a=0;c<s.length;c++){switch(s[c]){case" ":l++;break;case"\t":l+=4;break;case"\r":l=0;break;case"\n":l=0,i++;break;default:throw new Error("whitespace characters not allowed in JSON")}a++}break;default:s=void 0}var u="",h={},p=0,g=0,m=0,v=n&&n.es6&&"function"==typeof Map;return function e(t,n,i){switch(b(i,"value"),typeof t){case"number":case"bigint":case"boolean":y(""+t);break;case"string":y(d(t));break;case"object":null===t?y("null"):"function"==typeof t.toJSON?y(d(t.toJSON())):Array.isArray(t)?r():v?t.constructor.BYTES_PER_ELEMENT?r():t instanceof Map?l():t instanceof Set?l(!0):a():a()}function r(){if(t.length){y("[");for(var r=n+1,s=0;s<t.length;s++){s&&y(","),C(r);var a=o(t[s])?t[s]:null;e(a,r,i+"/"+s)}C(n),y("]")}else y("[]")}function a(){var r=Object.keys(t);if(r.length){y("{");for(var a=n+1,l=0;l<r.length;l++){var c,u=r[l],h=t[u];o(h)&&(l&&y(","),c=i+"/"+f(u),C(a),b(c,"key"),y(d(u)),b(c,"keyEnd"),y(":"),s&&y(" "),e(h,a,c))}C(n),y("}")}else y("{}")}function l(r){if(t.size){y("{");for(var a=n+1,l=!0,c=t.entries(),u=c.next();!u.done;){var h,p,g=(p=u.value)[0];o(p=!!r||p[1])&&(l||y(","),l=!1,h=i+"/"+f(g),C(a),b(h,"key"),y(d(g)),b(h,"keyEnd"),y(":"),s&&y(" "),e(p,a,h)),u=c.next()}C(n),y("}")}else y("{}")}b(i,"valueEnd")}(e,0,""),{json:u,pointers:h}}function y(e){g+=e.length,m+=e.length,u+=e}function C(e){if(s){for(u+="\n"+I(e,s),p++,g=0;e--;)i?(p+=i,g=l):g+=l,m+=a;m+=1}}function b(e,t){h[e]=h[e]||{},h[e][t]={line:p,column:g,pos:m}}function I(e,t){return Array(e+1).join(t)}},["number","bigint","boolean","string","object"]);function o(e){return 0<=r.indexOf(typeof e)}var s=/"|\\/g,a=/[\b]/g,l=/\f/g,c=/\n/g,u=/\r/g,h=/\t/g;function d(e){return'"'+(e=e.replace(s,"\\$&").replace(l,"\\f").replace(a,"\\b").replace(c,"\\n").replace(u,"\\r").replace(h,"\\t"))+'"'}var p=/~/g,g=/\//g;function f(e){return e.replace(p,"~0").replace(g,"~1")}},483:function(e,t){var n,i;!function(){"use strict";i=[],void 0!==(i="function"==typeof(n=function(){function e(e){return"object"===typeof Node?e instanceof Node:e&&"object"===typeof e&&"number"===typeof e.nodeType}function t(e){return"string"===typeof e}function n(){var e=[];return{watch:e.push.bind(e),trigger:function(t,n){for(var i=!0,r={detail:n,preventDefault:function(){i=!1}},o=0;o<e.length;o++)e[o](t,r);return i}}}function i(e){return"none"===window.getComputedStyle(e).display}function r(e){this.elem=e}function o(e,t){return r.make(e("parent")).clazz("pico-overlay").clazz(e("overlayClass","")).stylize({display:"none",position:"fixed",top:"0px",left:"0px",height:"100%",width:"100%",zIndex:1e4}).stylize(e("overlayStyles",{opacity:.5,background:"#000"})).onClick((function(){e("overlayClose",!0)&&t()}))}r.make=function(e,t){"string"===typeof e&&(e=document.querySelector(e));var n=document.createElement(t||"div");return(e||document.body).appendChild(n),new r(n)},r.prototype={child:function(e){return r.make(this.elem,e)},stylize:function(e){for(var t in"undefined"!==typeof(e=e||{}).opacity&&(e.filter="alpha(opacity="+100*e.opacity+")"),e)e.hasOwnProperty(t)&&(this.elem.style[t]=e[t]);return this},clazz:function(e){return this.elem.className+=" "+e,this},html:function(t){return e(t)?this.elem.appendChild(t):this.elem.innerHTML=t,this},onClick:function(e){return this.elem.addEventListener("click",e),this},destroy:function(){this.elem.parentNode.removeChild(this.elem)},hide:function(){this.elem.style.display="none"},show:function(){this.elem.style.display="block"},attr:function(e,t){return void 0!==t&&this.elem.setAttribute(e,t),this},anyAncestor:function(e){for(var t=this.elem;t;){if(e(new r(t)))return!0;t=t.parentNode}return!1},isVisible:function(){return!i(this.elem)}};var s=1;function a(e,t){var n=e("width","auto");"number"===typeof n&&(n+="px");var i=e("modalId","pico-"+s++);return r.make(e("parent")).clazz("pico-content").clazz(e("modalClass","")).stylize({display:"none",position:"fixed",zIndex:10001,left:"50%",top:"38.1966%",maxHeight:"90%",boxSizing:"border-box",width:n,"-ms-transform":"translate(-50%,-38.1966%)","-moz-transform":"translate(-50%,-38.1966%)","-webkit-transform":"translate(-50%,-38.1966%)","-o-transform":"translate(-50%,-38.1966%)",transform:"translate(-50%,-38.1966%)"}).stylize(e("modalStyles",{overflow:"auto",backgroundColor:"white",padding:"20px",borderRadius:"5px"})).html(e("content")).attr("id",i).attr("role","dialog").attr("aria-labelledby",e("ariaLabelledBy")).attr("aria-describedby",e("ariaDescribedBy",i)).onClick((function(e){new r(e.target).anyAncestor((function(e){return/\bpico-close\b/.test(e.elem.className)}))&&t()}))}function l(e,t){if(t("closeButton",!0))return e.child("button").html(t("closeHtml","×")).clazz("pico-close").clazz(t("closeClass","")).stylize(t("closeStyles",{borderRadius:"2px",border:0,padding:0,cursor:"pointer",height:"15px",width:"15px",position:"absolute",top:"5px",right:"5px",fontSize:"16px",textAlign:"center",lineHeight:"15px",background:"#CCC"})).attr("aria-label",t("close-label","Close"))}function c(e){return function(){return e().elem}}var u=n(),h=n();function d(e,t){function n(e,t){return(e.msMatchesSelector||e.webkitMatchesSelector||e.matches).call(e,t)}function r(e){return!(i(e)||n(e,":disabled")||e.hasAttribute("contenteditable"))&&(e.hasAttribute("tabindex")||n(e,"input,select,textarea,button,a[href],area[href],iframe"))}function o(e){for(var t=e.getElementsByTagName("*"),n=0;n<t.length;n++)if(r(t[n]))return t[n]}function s(e){for(var t=e.getElementsByTagName("*"),n=t.length;n--;)if(r(t[n]))return t[n]}var a;e.beforeShow((function(){a=document.activeElement})),e.afterShow((function(){if(t()){var n=o(e.modalElem());n&&n.focus()}})),e.afterClose((function(){t()&&a&&a.focus(),a=null})),h.watch((function(n){if(t()&&e.isVisible()){var i=o(e.modalElem()),r=s(e.modalElem());(n.shiftKey?i:r)===document.activeElement&&((n.shiftKey?r:i).focus(),n.preventDefault())}}))}function p(e,t){var n,i=new r(document.body);e.beforeShow((function(){n=i.elem.style.overflow,t()&&i.stylize({overflow:"hidden"})})),e.afterClose((function(){i.stylize({overflow:n})}))}return document.documentElement.addEventListener("keydown",(function(e){var t=e.which||e.keyCode;27===t?u.trigger():9===t&&h.trigger(e)})),function(i){(t(i)||e(i))&&(i={content:i});var r=n(),s=n(),h=n(),g=n(),f=n();function m(e,t){var n=i[e];return"function"===typeof n&&(n=n(t)),void 0===n?t:n}var v,y,C=S.bind(window,"modal"),b=S.bind(window,"overlay"),I=S.bind(window,"close");function A(e){b().hide(),C().hide(),f.trigger(v,e)}function w(e){g.trigger(v,e)&&A(e)}function x(e){return function(){return e.apply(this,arguments),v}}function S(e,t){if(!y){var n=a(m,w);y={modal:n,overlay:o(m,w),close:l(n,m)},r.trigger(v,t)}return y[e]}return v={modalElem:c(C),closeElem:c(I),overlayElem:c(b),buildDom:x(S.bind(null,null)),isVisible:function(){return!!(y&&C&&C().isVisible())},show:function(e){return s.trigger(v,e)&&(b().show(),I(),C().show(),h.trigger(v,e)),this},close:x(w),forceClose:x(A),destroy:function(){C().destroy(),b().destroy(),b=C=I=void 0},options:function(e){Object.keys(e).map((function(t){i[t]=e[t]}))},afterCreate:x(r.watch),beforeShow:x(s.watch),afterShow:x(h.watch),beforeClose:x(g.watch),afterClose:x(f.watch)},d(v,m.bind(null,"focus",!0)),p(v,m.bind(null,"bodyOverflow",!0)),u.watch((function(){m("escCloses",!0)&&v.isVisible()&&v.close()})),v}})?n.apply(t,i):n)&&(e.exports=i)}()},7533:function(e,t){!function(e){"use strict";function t(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length>1){t[0]=t[0].slice(0,-1);for(var i=t.length-1,r=1;r<i;++r)t[r]=t[r].slice(1,-1);return t[i]=t[i].slice(1),t.join("")}return t[0]}function n(e){return"(?:"+e+")"}function i(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function r(e){return e.toUpperCase()}function o(e){return void 0!==e&&null!==e?e instanceof Array?e:"number"!==typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function s(e,t){var n=e;if(t)for(var i in t)n[i]=t[i];return n}function a(e){var i="[A-Za-z]",r="[0-9]",o=t(r,"[A-Fa-f]"),s=n(n("%[EFef]"+o+"%"+o+o+"%"+o+o)+"|"+n("%[89A-Fa-f]"+o+"%"+o+o)+"|"+n("%"+o+o)),a="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",l=t("[\\:\\/\\?\\#\\[\\]\\@]",a),c=e?"[\\uE000-\\uF8FF]":"[]",u=t(i,r,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]"),h=n(i+t(i,r,"[\\+\\-\\.]")+"*"),d=n(n(s+"|"+t(u,a,"[\\:]"))+"*"),p=(n(n("25[0-5]")+"|"+n("2[0-4]"+r)+"|"+n("1"+r+r)+"|"+n("[1-9]"+r)+"|"+r),n(n("25[0-5]")+"|"+n("2[0-4]"+r)+"|"+n("1"+r+r)+"|"+n("0?[1-9]"+r)+"|0?0?"+r)),g=n(p+"\\."+p+"\\."+p+"\\."+p),f=n(o+"{1,4}"),m=n(n(f+"\\:"+f)+"|"+g),v=n(n(f+"\\:")+"{6}"+m),y=n("\\:\\:"+n(f+"\\:")+"{5}"+m),C=n(n(f)+"?\\:\\:"+n(f+"\\:")+"{4}"+m),b=n(n(n(f+"\\:")+"{0,1}"+f)+"?\\:\\:"+n(f+"\\:")+"{3}"+m),I=n(n(n(f+"\\:")+"{0,2}"+f)+"?\\:\\:"+n(f+"\\:")+"{2}"+m),A=n(n(n(f+"\\:")+"{0,3}"+f)+"?\\:\\:"+f+"\\:"+m),w=n(n(n(f+"\\:")+"{0,4}"+f)+"?\\:\\:"+m),x=n(n(n(f+"\\:")+"{0,5}"+f)+"?\\:\\:"+f),S=n(n(n(f+"\\:")+"{0,6}"+f)+"?\\:\\:"),k=n([v,y,C,b,I,A,w,x,S].join("|")),E=n(n(u+"|"+s)+"+"),T=(n(k+"\\%25"+E),n(k+n("\\%25|\\%(?!"+o+"{2})")+E)),R=n("[vV]"+o+"+\\."+t(u,a,"[\\:]")+"+"),_=n("\\["+n(T+"|"+k+"|"+R)+"\\]"),$=n(n(s+"|"+t(u,a))+"*"),L=n(_+"|"+g+"(?!"+$+")|"+$),N=n(r+"*"),M=n(n(d+"@")+"?"+L+n("\\:"+N)+"?"),P=n(s+"|"+t(u,a,"[\\:\\@]")),O=n(P+"*"),B=n(P+"+"),W=n(n(s+"|"+t(u,a,"[\\@]"))+"+"),F=n(n("\\/"+O)+"*"),H=n("\\/"+n(B+F)+"?"),D=n(W+F),G=n(B+F),V="(?!"+P+")",j=(n(F+"|"+H+"|"+D+"|"+G+"|"+V),n(n(P+"|"+t("[\\/\\?]",c))+"*")),Z=n(n(P+"|[\\/\\?]")+"*"),z=n(n("\\/\\/"+M+F)+"|"+H+"|"+G+"|"+V),K=n(h+"\\:"+z+n("\\?"+j)+"?"+n("\\#"+Z)+"?"),X=n(n("\\/\\/"+M+F)+"|"+H+"|"+D+"|"+V),U=n(X+n("\\?"+j)+"?"+n("\\#"+Z)+"?");return n(K+"|"+U),n(h+"\\:"+z+n("\\?"+j)+"?"),n(n("\\/\\/("+n("("+d+")@")+"?("+L+")"+n("\\:("+N+")")+"?)")+"?("+F+"|"+H+"|"+G+"|"+V+")"),n("\\?("+j+")"),n("\\#("+Z+")"),n(n("\\/\\/("+n("("+d+")@")+"?("+L+")"+n("\\:("+N+")")+"?)")+"?("+F+"|"+H+"|"+D+"|"+V+")"),n("\\?("+j+")"),n("\\#("+Z+")"),n(n("\\/\\/("+n("("+d+")@")+"?("+L+")"+n("\\:("+N+")")+"?)")+"?("+F+"|"+H+"|"+G+"|"+V+")"),n("\\?("+j+")"),n("\\#("+Z+")"),n("("+d+")@"),n("\\:("+N+")"),{NOT_SCHEME:new RegExp(t("[^]",i,r,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(t("[^\\%\\:]",u,a),"g"),NOT_HOST:new RegExp(t("[^\\%\\[\\]\\:]",u,a),"g"),NOT_PATH:new RegExp(t("[^\\%\\/\\:\\@]",u,a),"g"),NOT_PATH_NOSCHEME:new RegExp(t("[^\\%\\/\\@]",u,a),"g"),NOT_QUERY:new RegExp(t("[^\\%]",u,a,"[\\:\\@\\/\\?]",c),"g"),NOT_FRAGMENT:new RegExp(t("[^\\%]",u,a,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(t("[^]",u,a),"g"),UNRESERVED:new RegExp(u,"g"),OTHER_CHARS:new RegExp(t("[^\\%]",u,l),"g"),PCT_ENCODED:new RegExp(s,"g"),IPV4ADDRESS:new RegExp("^("+g+")$"),IPV6ADDRESS:new RegExp("^\\[?("+k+")"+n(n("\\%25|\\%(?!"+o+"{2})")+"("+E+")")+"?\\]?$")}}var l=a(!1),c=a(!0),u=function(){function e(e,t){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);i=!0);}catch(e){r=!0,o=e}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),h=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)},d=2147483647,p=36,g=1,f=26,m=38,v=700,y=72,C=128,b="-",I=/^xn--/,A=/[^\0-\x7E]/,w=/[\x2E\u3002\uFF0E\uFF61]/g,x={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},S=p-g,k=Math.floor,E=String.fromCharCode;function T(e){throw new RangeError(x[e])}function R(e,t){for(var n=[],i=e.length;i--;)n[i]=t(e[i]);return n}function _(e,t){var n=e.split("@"),i="";return n.length>1&&(i=n[0]+"@",e=n[1]),i+R((e=e.replace(w,".")).split("."),t).join(".")}function $(e){for(var t=[],n=0,i=e.length;n<i;){var r=e.charCodeAt(n++);if(r>=55296&&r<=56319&&n<i){var o=e.charCodeAt(n++);56320==(64512&o)?t.push(((1023&r)<<10)+(1023&o)+65536):(t.push(r),n--)}else t.push(r)}return t}var L=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:p},N=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},M=function(e,t,n){var i=0;for(e=n?k(e/v):e>>1,e+=k(e/t);e>S*f>>1;i+=p)e=k(e/S);return k(i+(S+1)*e/(e+m))},P=function(e){var t=[],n=e.length,i=0,r=C,o=y,s=e.lastIndexOf(b);s<0&&(s=0);for(var a=0;a<s;++a)e.charCodeAt(a)>=128&&T("not-basic"),t.push(e.charCodeAt(a));for(var l=s>0?s+1:0;l<n;){for(var c=i,u=1,h=p;;h+=p){l>=n&&T("invalid-input");var m=L(e.charCodeAt(l++));(m>=p||m>k((d-i)/u))&&T("overflow"),i+=m*u;var v=h<=o?g:h>=o+f?f:h-o;if(m<v)break;var I=p-v;u>k(d/I)&&T("overflow"),u*=I}var A=t.length+1;o=M(i-c,A,0==c),k(i/A)>d-r&&T("overflow"),r+=k(i/A),i%=A,t.splice(i++,0,r)}return String.fromCodePoint.apply(String,t)},O=function e(t){var n=[],i=(t=$(t)).length,r=C,o=0,s=y,a=!0,l=!1,c=void 0;try{for(var u,h=t[Symbol.iterator]();!(a=(u=h.next()).done);a=!0){var m=u.value;m<128&&n.push(E(m))}}catch(e){l=!0,c=e}finally{try{!a&&h.return&&h.return()}finally{if(l)throw c}}var v=n.length,I=v;for(v&&n.push(b);I<i;){var A=d,w=!0,x=!1,S=void 0;try{for(var R,_=t[Symbol.iterator]();!(w=(R=_.next()).done);w=!0){var L=R.value;L>=r&&L<A&&(A=L)}}catch(e){x=!0,S=e}finally{try{!w&&_.return&&_.return()}finally{if(x)throw S}}var P=I+1;A-r>k((d-o)/P)&&T("overflow"),o+=(A-r)*P,r=A;var O=!0,B=!1,W=void 0;try{for(var F,H=t[Symbol.iterator]();!(O=(F=H.next()).done);O=!0){var D=F.value;if(D<r&&++o>d&&T("overflow"),D==r){for(var G=o,V=p;;V+=p){var j=V<=s?g:V>=s+f?f:V-s;if(G<j)break;var Z=G-j,z=p-j;n.push(E(N(j+Z%z,0))),G=k(Z/z)}n.push(E(N(G,0))),s=M(o,P,I==v),o=0,++I}}}catch(e){B=!0,W=e}finally{try{!O&&H.return&&H.return()}finally{if(B)throw W}}++o,++r}return n.join("")},B={version:"2.1.0",ucs2:{decode:$,encode:function(e){return String.fromCodePoint.apply(String,h(e))}},decode:P,encode:O,toASCII:function(e){return _(e,(function(e){return A.test(e)?"xn--"+O(e):e}))},toUnicode:function(e){return _(e,(function(e){return I.test(e)?P(e.slice(4).toLowerCase()):e}))}},W={};function F(e){var t=e.charCodeAt(0);return t<16?"%0"+t.toString(16).toUpperCase():t<128?"%"+t.toString(16).toUpperCase():t<2048?"%"+(t>>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function H(e){for(var t="",n=0,i=e.length;n<i;){var r=parseInt(e.substr(n+1,2),16);if(r<128)t+=String.fromCharCode(r),n+=3;else if(r>=194&&r<224){if(i-n>=6){var o=parseInt(e.substr(n+4,2),16);t+=String.fromCharCode((31&r)<<6|63&o)}else t+=e.substr(n,6);n+=6}else if(r>=224){if(i-n>=9){var s=parseInt(e.substr(n+4,2),16),a=parseInt(e.substr(n+7,2),16);t+=String.fromCharCode((15&r)<<12|(63&s)<<6|63&a)}else t+=e.substr(n,9);n+=9}else t+=e.substr(n,3),n+=3}return t}function D(e,t){function n(e){var n=H(e);return n.match(t.UNRESERVED)?n:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,n).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,n).replace(t.NOT_USERINFO,F).replace(t.PCT_ENCODED,r)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,n).toLowerCase().replace(t.NOT_HOST,F).replace(t.PCT_ENCODED,r)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,n).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,F).replace(t.PCT_ENCODED,r)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,n).replace(t.NOT_QUERY,F).replace(t.PCT_ENCODED,r)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,n).replace(t.NOT_FRAGMENT,F).replace(t.PCT_ENCODED,r)),e}function G(e){return e.replace(/^0*(.*)/,"$1")||"0"}function V(e,t){var n=e.match(t.IPV4ADDRESS)||[],i=u(n,2)[1];return i?i.split(".").map(G).join("."):e}function j(e,t){var n=e.match(t.IPV6ADDRESS)||[],i=u(n,3),r=i[1],o=i[2];if(r){for(var s=r.toLowerCase().split("::").reverse(),a=u(s,2),l=a[0],c=a[1],h=c?c.split(":").map(G):[],d=l.split(":").map(G),p=t.IPV4ADDRESS.test(d[d.length-1]),g=p?7:8,f=d.length-g,m=Array(g),v=0;v<g;++v)m[v]=h[v]||d[f+v]||"";p&&(m[g-1]=V(m[g-1],t));var y=m.reduce((function(e,t,n){if(!t||"0"===t){var i=e[e.length-1];i&&i.index+i.length===n?i.length++:e.push({index:n,length:1})}return e}),[]),C=y.sort((function(e,t){return t.length-e.length}))[0],b=void 0;if(C&&C.length>1){var I=m.slice(0,C.index),A=m.slice(C.index+C.length);b=I.join(":")+"::"+A.join(":")}else b=m.join(":");return o&&(b+="%"+o),b}return e}var Z=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,z=void 0==="".match(/(){0}/)[1];function K(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={},i=!1!==t.iri?c:l;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var r=e.match(Z);if(r){z?(n.scheme=r[1],n.userinfo=r[3],n.host=r[4],n.port=parseInt(r[5],10),n.path=r[6]||"",n.query=r[7],n.fragment=r[8],isNaN(n.port)&&(n.port=r[5])):(n.scheme=r[1]||void 0,n.userinfo=-1!==e.indexOf("@")?r[3]:void 0,n.host=-1!==e.indexOf("//")?r[4]:void 0,n.port=parseInt(r[5],10),n.path=r[6]||"",n.query=-1!==e.indexOf("?")?r[7]:void 0,n.fragment=-1!==e.indexOf("#")?r[8]:void 0,isNaN(n.port)&&(n.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?r[4]:void 0)),n.host&&(n.host=j(V(n.host,i),i)),void 0!==n.scheme||void 0!==n.userinfo||void 0!==n.host||void 0!==n.port||n.path||void 0!==n.query?void 0===n.scheme?n.reference="relative":void 0===n.fragment?n.reference="absolute":n.reference="uri":n.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==n.reference&&(n.error=n.error||"URI is not a "+t.reference+" reference.");var o=W[(t.scheme||n.scheme||"").toLowerCase()];if(t.unicodeSupport||o&&o.unicodeSupport)D(n,i);else{if(n.host&&(t.domainHost||o&&o.domainHost))try{n.host=B.toASCII(n.host.replace(i.PCT_ENCODED,H).toLowerCase())}catch(e){n.error=n.error||"Host's domain name can not be converted to ASCII via punycode: "+e}D(n,l)}o&&o.parse&&o.parse(n,t)}else n.error=n.error||"URI can not be parsed.";return n}function X(e,t){var n=!1!==t.iri?c:l,i=[];return void 0!==e.userinfo&&(i.push(e.userinfo),i.push("@")),void 0!==e.host&&i.push(j(V(String(e.host),n),n).replace(n.IPV6ADDRESS,(function(e,t,n){return"["+t+(n?"%25"+n:"")+"]"}))),"number"!==typeof e.port&&"string"!==typeof e.port||(i.push(":"),i.push(String(e.port))),i.length?i.join(""):void 0}var U=/^\.\.?\//,J=/^\/\.(\/|$)/,Y=/^\/\.\.(\/|$)/,Q=/^\/?(?:.|\n)*?(?=\/|$)/;function q(e){for(var t=[];e.length;)if(e.match(U))e=e.replace(U,"");else if(e.match(J))e=e.replace(J,"/");else if(e.match(Y))e=e.replace(Y,"/"),t.pop();else if("."===e||".."===e)e="";else{var n=e.match(Q);if(!n)throw new Error("Unexpected dot segment condition");var i=n[0];e=e.slice(i.length),t.push(i)}return t.join("")}function ee(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.iri?c:l,i=[],r=W[(t.scheme||e.scheme||"").toLowerCase()];if(r&&r.serialize&&r.serialize(e,t),e.host)if(n.IPV6ADDRESS.test(e.host));else if(t.domainHost||r&&r.domainHost)try{e.host=t.iri?B.toUnicode(e.host):B.toASCII(e.host.replace(n.PCT_ENCODED,H).toLowerCase())}catch(n){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+n}D(e,n),"suffix"!==t.reference&&e.scheme&&(i.push(e.scheme),i.push(":"));var o=X(e,t);if(void 0!==o&&("suffix"!==t.reference&&i.push("//"),i.push(o),e.path&&"/"!==e.path.charAt(0)&&i.push("/")),void 0!==e.path){var s=e.path;t.absolutePath||r&&r.absolutePath||(s=q(s)),void 0===o&&(s=s.replace(/^\/\//,"/%2F")),i.push(s)}return void 0!==e.query&&(i.push("?"),i.push(e.query)),void 0!==e.fragment&&(i.push("#"),i.push(e.fragment)),i.join("")}function te(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i={};return arguments[3]||(e=K(ee(e,n),n),t=K(ee(t,n),n)),!(n=n||{}).tolerant&&t.scheme?(i.scheme=t.scheme,i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=q(t.path||""),i.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(i.userinfo=t.userinfo,i.host=t.host,i.port=t.port,i.path=q(t.path||""),i.query=t.query):(t.path?("/"===t.path.charAt(0)?i.path=q(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?i.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:i.path=t.path:i.path="/"+t.path,i.path=q(i.path)),i.query=t.query):(i.path=e.path,void 0!==t.query?i.query=t.query:i.query=e.query),i.userinfo=e.userinfo,i.host=e.host,i.port=e.port),i.scheme=e.scheme),i.fragment=t.fragment,i}function ne(e,t,n){var i=s({scheme:"null"},n);return ee(te(K(e,i),K(t,i),i,!0),i)}function ie(e,t){return"string"===typeof e?e=ee(K(e,t),t):"object"===i(e)&&(e=K(ee(e,t),t)),e}function re(e,t,n){return"string"===typeof e?e=ee(K(e,n),n):"object"===i(e)&&(e=ee(e,n)),"string"===typeof t?t=ee(K(t,n),n):"object"===i(t)&&(t=ee(t,n)),e===t}function oe(e,t){return e&&e.toString().replace(t&&t.iri?c.ESCAPE:l.ESCAPE,F)}function se(e,t){return e&&e.toString().replace(t&&t.iri?c.PCT_ENCODED:l.PCT_ENCODED,H)}var ae={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){var n="https"===String(e.scheme).toLowerCase();return e.port!==(n?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},le={scheme:"https",domainHost:ae.domainHost,parse:ae.parse,serialize:ae.serialize};function ce(e){return"boolean"===typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var ue={scheme:"ws",domainHost:!0,parse:function(e,t){var n=e;return n.secure=ce(n),n.resourceName=(n.path||"/")+(n.query?"?"+n.query:""),n.path=void 0,n.query=void 0,n},serialize:function(e,t){if(e.port!==(ce(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"===typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var n=e.resourceName.split("?"),i=u(n,2),r=i[0],o=i[1];e.path=r&&"/"!==r?r:void 0,e.query=o,e.resourceName=void 0}return e.fragment=void 0,e}},he={scheme:"wss",domainHost:ue.domainHost,parse:ue.parse,serialize:ue.serialize},de={},pe="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ge="[0-9A-Fa-f]",fe=n(n("%[EFef]"+ge+"%"+ge+ge+"%"+ge+ge)+"|"+n("%[89A-Fa-f]"+ge+"%"+ge+ge)+"|"+n("%"+ge+ge)),me="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",ve=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),ye="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Ce=new RegExp(pe,"g"),be=new RegExp(fe,"g"),Ie=new RegExp(t("[^]",me,"[\\.]",'[\\"]',ve),"g"),Ae=new RegExp(t("[^]",pe,ye),"g"),we=Ae;function xe(e){var t=H(e);return t.match(Ce)?t:e}var Se={scheme:"mailto",parse:function e(t,n){var i=t,r=i.to=i.path?i.path.split(","):[];if(i.path=void 0,i.query){for(var o=!1,s={},a=i.query.split("&"),l=0,c=a.length;l<c;++l){var u=a[l].split("=");switch(u[0]){case"to":for(var h=u[1].split(","),d=0,p=h.length;d<p;++d)r.push(h[d]);break;case"subject":i.subject=se(u[1],n);break;case"body":i.body=se(u[1],n);break;default:o=!0,s[se(u[0],n)]=se(u[1],n)}}o&&(i.headers=s)}i.query=void 0;for(var g=0,f=r.length;g<f;++g){var m=r[g].split("@");if(m[0]=se(m[0]),n.unicodeSupport)m[1]=se(m[1],n).toLowerCase();else try{m[1]=B.toASCII(se(m[1],n).toLowerCase())}catch(e){i.error=i.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}r[g]=m.join("@")}return i},serialize:function e(t,n){var i=t,s=o(t.to);if(s){for(var a=0,l=s.length;a<l;++a){var c=String(s[a]),u=c.lastIndexOf("@"),h=c.slice(0,u).replace(be,xe).replace(be,r).replace(Ie,F),d=c.slice(u+1);try{d=n.iri?B.toUnicode(d):B.toASCII(se(d,n).toLowerCase())}catch(e){i.error=i.error||"Email address's domain name can not be converted to "+(n.iri?"Unicode":"ASCII")+" via punycode: "+e}s[a]=h+"@"+d}i.path=s.join(",")}var p=t.headers=t.headers||{};t.subject&&(p.subject=t.subject),t.body&&(p.body=t.body);var g=[];for(var f in p)p[f]!==de[f]&&g.push(f.replace(be,xe).replace(be,r).replace(Ae,F)+"="+p[f].replace(be,xe).replace(be,r).replace(we,F));return g.length&&(i.query=g.join("&")),i}},ke=/^([^\:]+)\:(.*)/,Ee={scheme:"urn",parse:function(e,t){var n=e.path&&e.path.match(ke),i=e;if(n){var r=t.scheme||i.scheme||"urn",o=n[1].toLowerCase(),s=n[2],a=r+":"+(t.nid||o),l=W[a];i.nid=o,i.nss=s,i.path=void 0,l&&(i=l.parse(i,t))}else i.error=i.error||"URN can not be parsed.";return i},serialize:function(e,t){var n=t.scheme||e.scheme||"urn",i=e.nid,r=n+":"+(t.nid||i),o=W[r];o&&(e=o.serialize(e,t));var s=e,a=e.nss;return s.path=(i||t.nid)+":"+a,s}},Te=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,Re={scheme:"urn:uuid",parse:function(e,t){var n=e;return n.uuid=n.nss,n.nss=void 0,t.tolerant||n.uuid&&n.uuid.match(Te)||(n.error=n.error||"UUID is not valid."),n},serialize:function(e,t){var n=e;return n.nss=(e.uuid||"").toLowerCase(),n}};W[ae.scheme]=ae,W[le.scheme]=le,W[ue.scheme]=ue,W[he.scheme]=he,W[Se.scheme]=Se,W[Ee.scheme]=Ee,W[Re.scheme]=Re,e.SCHEMES=W,e.pctEncChar=F,e.pctDecChars=H,e.parse=K,e.removeDotSegments=q,e.serialize=ee,e.resolveComponents=te,e.resolve=ne,e.normalize=ie,e.equal=re,e.escapeComponent=oe,e.unescapeComponent=se,Object.defineProperty(e,"__esModule",{value:!0})}(t)},4049:function(e){e.exports=function(){"use strict";var e=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},t=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),n=function(){function e(e,t){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);i=!0);}catch(e){r=!0,o=e}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=(String.prototype.startsWith=String.prototype.startsWith||function(e){return 0===this.indexOf(e)},String.prototype.padStart=String.prototype.padStart||function(e,t){for(var n=this;n.length<e;)n=t+n;return n},{cb:"0f8ff",tqw:"aebd7",q:"-ffff",qmrn:"7fffd4",zr:"0ffff",bg:"5f5dc",bsq:"e4c4",bck:"---",nch:"ebcd",b:"--ff",bvt:"8a2be2",brwn:"a52a2a",brw:"deb887",ctb:"5f9ea0",hrt:"7fff-",chcT:"d2691e",cr:"7f50",rnw:"6495ed",crns:"8dc",crms:"dc143c",cn:"-ffff",Db:"--8b",Dcn:"-8b8b",Dgnr:"b8860b",Dgr:"a9a9a9",Dgrn:"-64-",Dkhk:"bdb76b",Dmgn:"8b-8b",Dvgr:"556b2f",Drng:"8c-",Drch:"9932cc",Dr:"8b--",Dsmn:"e9967a",Dsgr:"8fbc8f",DsTb:"483d8b",DsTg:"2f4f4f",Dtrq:"-ced1",Dvt:"94-d3",ppnk:"1493",pskb:"-bfff",mgr:"696969",grb:"1e90ff",rbrc:"b22222",rwht:"af0",stg:"228b22",chs:"-ff",gnsb:"dcdcdc",st:"8f8ff",g:"d7-",gnr:"daa520",gr:"808080",grn:"-8-0",grnw:"adff2f",hnw:"0fff0",htpn:"69b4",nnr:"cd5c5c",ng:"4b-82",vr:"0",khk:"0e68c",vnr:"e6e6fa",nrb:"0f5",wngr:"7cfc-",mnch:"acd",Lb:"add8e6",Lcr:"08080",Lcn:"e0ffff",Lgnr:"afad2",Lgr:"d3d3d3",Lgrn:"90ee90",Lpnk:"b6c1",Lsmn:"a07a",Lsgr:"20b2aa",Lskb:"87cefa",LsTg:"778899",Lstb:"b0c4de",Lw:"e0",m:"-ff-",mgrn:"32cd32",nn:"af0e6",mgnt:"-ff",mrn:"8--0",mqm:"66cdaa",mmb:"--cd",mmrc:"ba55d3",mmpr:"9370db",msg:"3cb371",mmsT:"7b68ee","":"-fa9a",mtr:"48d1cc",mmvt:"c71585",mnLb:"191970",ntc:"5fffa",mstr:"e4e1",mccs:"e4b5",vjw:"dead",nv:"--80",c:"df5e6",v:"808-0",vrb:"6b8e23",rng:"a5-",rngr:"45-",rch:"da70d6",pgnr:"eee8aa",pgrn:"98fb98",ptrq:"afeeee",pvtr:"db7093",ppwh:"efd5",pchp:"dab9",pr:"cd853f",pnk:"c0cb",pm:"dda0dd",pwrb:"b0e0e6",prp:"8-080",cc:"663399",r:"--",sbr:"bc8f8f",rb:"4169e1",sbrw:"8b4513",smn:"a8072",nbr:"4a460",sgrn:"2e8b57",ssh:"5ee",snn:"a0522d",svr:"c0c0c0",skb:"87ceeb",sTb:"6a5acd",sTgr:"708090",snw:"afa",n:"-ff7f",stb:"4682b4",tn:"d2b48c",t:"-8080",thst:"d8bfd8",tmT:"6347",trqs:"40e0d0",vt:"ee82ee",whT:"5deb3",wht:"",hts:"5f5f5",w:"-",wgrn:"9acd32"});function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return(t>0?e.toFixed(t).replace(/0+$/,"").replace(/\.$/,""):e.toString())||"0"}var o=function(){function o(t,i,r,s){e(this,o);var a=this;function l(e){if(e.startsWith("hsl")){var t=e.match(/([\-\d\.e]+)/g).map(Number),i=n(t,4),r=i[0],s=i[1],l=i[2],c=i[3];void 0===c&&(c=1),r/=360,s/=100,l/=100,a.hsla=[r,s,l,c]}else if(e.startsWith("rgb")){var u=e.match(/([\-\d\.e]+)/g).map(Number),h=n(u,4),d=h[0],p=h[1],g=h[2],f=h[3];void 0===f&&(f=1),a.rgba=[d,p,g,f]}else e.startsWith("#")?a.rgba=o.hexToRgb(e):a.rgba=o.nameToRgb(e)||o.hexToRgb(e)}if(void 0===t);else if(Array.isArray(t))this.rgba=t;else if(void 0===r){var c=t&&""+t;c&&l(c.toLowerCase())}else this.rgba=[t,i,r,void 0===s?1:s]}return t(o,[{key:"printRGB",value:function(e){var t=(e?this.rgba:this.rgba.slice(0,3)).map((function(e,t){return r(e,3===t?3:0)}));return e?"rgba("+t+")":"rgb("+t+")"}},{key:"printHSL",value:function(e){var t=[360,100,100,1],n=["","%","%",""],i=(e?this.hsla:this.hsla.slice(0,3)).map((function(e,i){return r(e*t[i],3===i?3:1)+n[i]}));return e?"hsla("+i+")":"hsl("+i+")"}},{key:"printHex",value:function(e){var t=this.hex;return e?t:t.substring(0,7)}},{key:"rgba",get:function(){if(this._rgba)return this._rgba;if(!this._hsla)throw new Error("No color is set");return this._rgba=o.hslToRgb(this._hsla)},set:function(e){3===e.length&&(e[3]=1),this._rgba=e,this._hsla=null}},{key:"rgbString",get:function(){return this.printRGB()}},{key:"rgbaString",get:function(){return this.printRGB(!0)}},{key:"hsla",get:function(){if(this._hsla)return this._hsla;if(!this._rgba)throw new Error("No color is set");return this._hsla=o.rgbToHsl(this._rgba)},set:function(e){3===e.length&&(e[3]=1),this._hsla=e,this._rgba=null}},{key:"hslString",get:function(){return this.printHSL()}},{key:"hslaString",get:function(){return this.printHSL(!0)}},{key:"hex",get:function(){var e=this.rgba.map((function(e,t){return t<3?e.toString(16):Math.round(255*e).toString(16)}));return"#"+e.map((function(e){return e.padStart(2,"0")})).join("")},set:function(e){this.rgba=o.hexToRgb(e)}}],[{key:"hexToRgb",value:function(e){var t=(e.startsWith("#")?e.slice(1):e).replace(/^(\w{3})$/,"$1F").replace(/^(\w)(\w)(\w)(\w)$/,"$1$1$2$2$3$3$4$4").replace(/^(\w{6})$/,"$1FF");if(!t.match(/^([0-9a-fA-F]{8})$/))throw new Error("Unknown hex color; "+e);var n=t.match(/^(\w\w)(\w\w)(\w\w)(\w\w)$/).slice(1).map((function(e){return parseInt(e,16)}));return n[3]=n[3]/255,n}},{key:"nameToRgb",value:function(e){var t=e.toLowerCase().replace("at","T").replace(/[aeiouyldf]/g,"").replace("ght","L").replace("rk","D").slice(-5,4),n=i[t];return void 0===n?n:o.hexToRgb(n.replace(/\-/g,"00").padStart(6,"f"))}},{key:"rgbToHsl",value:function(e){var t=n(e,4),i=t[0],r=t[1],o=t[2],s=t[3];i/=255,r/=255,o/=255;var a=Math.max(i,r,o),l=Math.min(i,r,o),c=void 0,u=void 0,h=(a+l)/2;if(a===l)c=u=0;else{var d=a-l;switch(u=h>.5?d/(2-a-l):d/(a+l),a){case i:c=(r-o)/d+(r<o?6:0);break;case r:c=(o-i)/d+2;break;case o:c=(i-r)/d+4}c/=6}return[c,u,h,s]}},{key:"hslToRgb",value:function(e){var t=n(e,4),i=t[0],r=t[1],o=t[2],s=t[3],a=void 0,l=void 0,c=void 0;if(0===r)a=l=c=o;else{var u=function(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e},h=o<.5?o*(1+r):o+r-o*r,d=2*o-h;a=u(d,h,i+1/3),l=u(d,h,i),c=u(d,h,i-1/3)}var p=[255*a,255*l,255*c].map(Math.round);return p[3]=s,p}}]),o}(),s=function(){function n(){e(this,n),this._events=[]}return t(n,[{key:"add",value:function(e,t,n){e.addEventListener(t,n,!1),this._events.push({target:e,type:t,handler:n})}},{key:"remove",value:function(e,t,i){this._events=this._events.filter((function(r){var o=!0;return e&&e!==r.target&&(o=!1),t&&t!==r.type&&(o=!1),i&&i!==r.handler&&(o=!1),o&&n._doRemove(r.target,r.type,r.handler),!o}))}},{key:"destroy",value:function(){this._events.forEach((function(e){return n._doRemove(e.target,e.type,e.handler)})),this._events=[]}}],[{key:"_doRemove",value:function(e,t,n){e.removeEventListener(t,n,!1)}}]),n}();function a(e){var t=document.createElement("div");return t.innerHTML=e,t.firstElementChild}function l(e,t,n){var i=!1;function r(e,t,n){return Math.max(t,Math.min(e,n))}function o(e,o,s){if(s&&(i=!0),i){e.preventDefault();var a=t.getBoundingClientRect(),l=a.width,c=a.height,u=o.clientX,h=o.clientY,d=r(u-a.left,0,l),p=r(h-a.top,0,c);n(d/l,p/c)}}function s(e,t){1===(void 0===e.buttons?e.which:e.buttons)?o(e,e,t):i=!1}function a(e,t){1===e.touches.length?o(e,e.touches[0],t):i=!1}e.add(t,"mousedown",(function(e){s(e,!0)})),e.add(t,"touchstart",(function(e){a(e,!0)})),e.add(window,"mousemove",s),e.add(t,"touchmove",a),e.add(window,"mouseup",(function(e){i=!1})),e.add(t,"touchend",(function(e){i=!1})),e.add(t,"touchcancel",(function(e){i=!1}))}var c="linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0 / 2em 2em,\n linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em / 2em 2em",u=360,h="keydown",d="mousedown",p="focusin";function g(e,t){return(t||document).querySelector(e)}function f(e){e.preventDefault(),e.stopPropagation()}function m(e,t,n,i,r){e.add(t,h,(function(e){n.indexOf(e.key)>=0&&(r&&f(e),i(e))}))}var v=function(){function n(t){e(this,n),this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex",cancelButton:!1,defaultColor:"#0cf"},this._events=new s,this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,this.setOptions(t)}return t(n,[{key:"setOptions",value:function(e){var t=this;if(e){var n=this.settings;if(e instanceof HTMLElement)n.parent=e;else{n.parent&&e.parent&&n.parent!==e.parent&&(this._events.remove(n.parent),this._popupInited=!1),s(e,n),e.onChange&&(this.onChange=e.onChange),e.onDone&&(this.onDone=e.onDone),e.onOpen&&(this.onOpen=e.onOpen),e.onClose&&(this.onClose=e.onClose);var i=e.color||e.colour;i&&this._setColor(i)}var r=n.parent;if(r&&n.popup&&!this._popupInited){var o=function(e){return t.openHandler(e)};this._events.add(r,"click",o),m(this._events,r,[" ","Spacebar","Enter"],o),this._popupInited=!0}else e.parent&&!n.popup&&this.show()}function s(e,t,n){for(var i in e)n&&n.indexOf(i)>=0||(t[i]=e[i])}}},{key:"openHandler",value:function(e){if(this.show()){e&&e.preventDefault(),this.settings.parent.style.pointerEvents="none";var t=e&&e.type===h?this._domEdit:this.domElement;setTimeout((function(){return t.focus()}),100),this.onOpen&&this.onOpen(this.colour)}}},{key:"closeHandler",value:function(e){var t=e&&e.type,n=!1;if(e)if(t===d||t===p){var i=(this.__containedEvent||0)+100;e.timeStamp>i&&(n=!0)}else f(e),n=!0;else n=!0;n&&this.hide()&&(this.settings.parent.style.pointerEvents="",t!==d&&this.settings.parent.focus(),this.onClose&&this.onClose(this.colour))}},{key:"movePopup",value:function(e,t){this.closeHandler(),this.setOptions(e),t&&this.openHandler()}},{key:"setColor",value:function(e,t){this._setColor(e,{silent:t})}},{key:"_setColor",value:function e(t,n){if("string"===typeof t&&(t=t.trim()),t){n=n||{};var i=void 0;try{i=new o(t)}catch(e){if(n.failSilently)return;throw e}if(!this.settings.alpha){var r=i.hsla;r[3]=1,i.hsla=r}this.colour=this.color=i,this._setHSLA(null,null,null,null,n)}}},{key:"setColour",value:function(e,t){this.setColor(e,t)}},{key:"show",value:function(){if(!this.settings.parent)return!1;if(this.domElement){var e=this._toggleDOM(!0);return this._setPosition(),e}var t=a(this.settings.template||'<div class="picker_wrapper" tabindex="-1"><div class="picker_arrow"></div><div class="picker_hue picker_slider"><div class="picker_selector"></div></div><div class="picker_sl"><div class="picker_selector"></div></div><div class="picker_alpha picker_slider"><div class="picker_selector"></div></div><div class="picker_editor"><input aria-label="Type a color name or hex value"/></div><div class="picker_sample"></div><div class="picker_done"><button>Ok</button></div><div class="picker_cancel"><button>Cancel</button></div></div>');return this.domElement=t,this._domH=g(".picker_hue",t),this._domSL=g(".picker_sl",t),this._domA=g(".picker_alpha",t),this._domEdit=g(".picker_editor input",t),this._domSample=g(".picker_sample",t),this._domOkay=g(".picker_done button",t),this._domCancel=g(".picker_cancel button",t),t.classList.add("layout_"+this.settings.layout),this.settings.alpha||t.classList.add("no_alpha"),this.settings.editor||t.classList.add("no_editor"),this.settings.cancelButton||t.classList.add("no_cancel"),this._ifPopup((function(){return t.classList.add("popup")})),this._setPosition(),this.colour?this._updateUI():this._setColor(this.settings.defaultColor),this._bindEvents(),!0}},{key:"hide",value:function(){return this._toggleDOM(!1)}},{key:"destroy",value:function(){this._events.destroy(),this.domElement&&this.settings.parent.removeChild(this.domElement)}},{key:"_bindEvents",value:function(){var e=this,t=this,n=this.domElement,i=this._events;function r(e,t,n){i.add(e,t,n)}r(n,"click",(function(e){return e.preventDefault()})),l(i,this._domH,(function(e,n){return t._setHSLA(e)})),l(i,this._domSL,(function(e,n){return t._setHSLA(null,e,1-n)})),this.settings.alpha&&l(i,this._domA,(function(e,n){return t._setHSLA(null,null,null,1-n)}));var o=this._domEdit;r(o,"input",(function(e){t._setColor(this.value,{fromEditor:!0,failSilently:!0})})),r(o,"focus",(function(e){var t=this;t.selectionStart===t.selectionEnd&&t.select()})),this._ifPopup((function(){var t=function(t){return e.closeHandler(t)};r(window,d,t),r(window,p,t),m(i,n,["Esc","Escape"],t);var o=function(t){e.__containedEvent=t.timeStamp};r(n,d,o),r(n,p,o),r(e._domCancel,"click",t)}));var s=function(t){e._ifPopup((function(){return e.closeHandler(t)})),e.onDone&&e.onDone(e.colour)};r(this._domOkay,"click",s),m(i,n,["Enter"],s)}},{key:"_setPosition",value:function(){var e=this.settings.parent,t=this.domElement;e!==t.parentNode&&e.appendChild(t),this._ifPopup((function(n){"static"===getComputedStyle(e).position&&(e.style.position="relative");var i=!0===n?"popup_right":"popup_"+n;["popup_top","popup_bottom","popup_left","popup_right"].forEach((function(e){e===i?t.classList.add(e):t.classList.remove(e)})),t.classList.add(i)}))}},{key:"_setHSLA",value:function(e,t,n,i,r){r=r||{};var o=this.colour,s=o.hsla;[e,t,n,i].forEach((function(e,t){(e||0===e)&&(s[t]=e)})),o.hsla=s,this._updateUI(r),this.onChange&&!r.silent&&this.onChange(o)}},{key:"_updateUI",value:function(e){if(this.domElement){e=e||{};var t=this.colour,n=t.hsla,i="hsl("+n[0]*u+", 100%, 50%)",r=t.hslString,o=t.hslaString,s=this._domH,a=this._domSL,l=this._domA,h=g(".picker_selector",s),d=g(".picker_selector",a),p=g(".picker_selector",l);I(s,h,n[0]),this._domSL.style.backgroundColor=this._domH.style.color=i,I(a,d,n[1]),A(a,d,1-n[2]),a.style.color=r,A(l,p,1-n[3]);var f=r,m=f.replace("hsl","hsla").replace(")",", 0)"),v="linear-gradient("+[f,m]+")";if(this._domA.style.background=v+", "+c,!e.fromEditor){var y=this.settings.editorFormat,C=this.settings.alpha,b=void 0;switch(y){case"rgb":b=t.printRGB(C);break;case"hsl":b=t.printHSL(C);break;default:b=t.printHex(C)}this._domEdit.value=b}this._domSample.style.color=o}function I(e,t,n){t.style.left=100*n+"%"}function A(e,t,n){t.style.top=100*n+"%"}}},{key:"_ifPopup",value:function(e,t){this.settings.parent&&this.settings.popup?e&&e(this.settings.popup):t&&t()}},{key:"_toggleDOM",value:function(e){var t=this.domElement;if(!t)return!1;var n=e?"":"none",i=t.style.display!==n;return i&&(t.style.display=n),i}}]),n}(),y=document.createElement("style");return y.textContent='.picker_wrapper.no_alpha .picker_alpha{display:none}.picker_wrapper.no_editor .picker_editor{position:absolute;z-index:-1;opacity:0}.picker_wrapper.no_cancel .picker_cancel{display:none}.layout_default.picker_wrapper{display:flex;flex-flow:row wrap;justify-content:space-between;align-items:stretch;font-size:10px;width:25em;padding:.5em}.layout_default.picker_wrapper input,.layout_default.picker_wrapper button{font-size:1rem}.layout_default.picker_wrapper>*{margin:.5em}.layout_default.picker_wrapper::before{content:"";display:block;width:100%;height:0;order:1}.layout_default .picker_slider,.layout_default .picker_selector{padding:1em}.layout_default .picker_hue{width:100%}.layout_default .picker_sl{flex:1 1 auto}.layout_default .picker_sl::before{content:"";display:block;padding-bottom:100%}.layout_default .picker_editor{order:1;width:6.5rem}.layout_default .picker_editor input{width:100%;height:100%}.layout_default .picker_sample{order:1;flex:1 1 auto}.layout_default .picker_done,.layout_default .picker_cancel{order:1}.picker_wrapper{box-sizing:border-box;background:#f2f2f2;box-shadow:0 0 0 1px silver;cursor:default;font-family:sans-serif;color:#444;pointer-events:auto}.picker_wrapper:focus{outline:none}.picker_wrapper button,.picker_wrapper input{box-sizing:border-box;border:none;box-shadow:0 0 0 1px silver;outline:none}.picker_wrapper button:focus,.picker_wrapper button:active,.picker_wrapper input:focus,.picker_wrapper input:active{box-shadow:0 0 2px 1px #1e90ff}.picker_wrapper button{padding:.4em .6em;cursor:pointer;background-color:#f5f5f5;background-image:linear-gradient(0deg, gainsboro, transparent)}.picker_wrapper button:active{background-image:linear-gradient(0deg, transparent, gainsboro)}.picker_wrapper button:hover{background-color:#fff}.picker_selector{position:absolute;z-index:1;display:block;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);border:2px solid #fff;border-radius:100%;box-shadow:0 0 3px 1px #67b9ff;background:currentColor;cursor:pointer}.picker_slider .picker_selector{border-radius:2px}.picker_hue{position:relative;background-image:linear-gradient(90deg, red, yellow, lime, cyan, blue, magenta, red);box-shadow:0 0 0 1px silver}.picker_sl{position:relative;box-shadow:0 0 0 1px silver;background-image:linear-gradient(180deg, white, rgba(255, 255, 255, 0) 50%),linear-gradient(0deg, black, rgba(0, 0, 0, 0) 50%),linear-gradient(90deg, #808080, rgba(128, 128, 128, 0))}.picker_alpha,.picker_sample{position:relative;background:linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0/2em 2em,linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em/2em 2em;box-shadow:0 0 0 1px silver}.picker_alpha .picker_selector,.picker_sample .picker_selector{background:none}.picker_editor input{font-family:monospace;padding:.2em .4em}.picker_sample::before{content:"";position:absolute;display:block;width:100%;height:100%;background:currentColor}.picker_arrow{position:absolute;z-index:-1}.picker_wrapper.popup{position:absolute;z-index:2;margin:1.5em}.picker_wrapper.popup,.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{background:#f2f2f2;box-shadow:0 0 10px 1px rgba(0,0,0,.4)}.picker_wrapper.popup .picker_arrow{width:3em;height:3em;margin:0}.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{content:"";display:block;position:absolute;top:0;left:0;z-index:-99}.picker_wrapper.popup .picker_arrow::before{width:100%;height:100%;-webkit-transform:skew(45deg);transform:skew(45deg);-webkit-transform-origin:0 100%;transform-origin:0 100%}.picker_wrapper.popup .picker_arrow::after{width:150%;height:150%;box-shadow:none}.popup.popup_top{bottom:100%;left:0}.popup.popup_top .picker_arrow{bottom:0;left:0;-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.popup.popup_bottom{top:100%;left:0}.popup.popup_bottom .picker_arrow{top:0;left:0;-webkit-transform:rotate(90deg) scale(1, -1);transform:rotate(90deg) scale(1, -1)}.popup.popup_left{top:0;right:100%}.popup.popup_left .picker_arrow{top:0;right:0;-webkit-transform:scale(-1, 1);transform:scale(-1, 1)}.popup.popup_right{top:0;left:100%}.popup.popup_right .picker_arrow{top:0;left:0}',document.documentElement.firstElementChild.appendChild(y),v.StyleElement=y,v}()},1262:function(e,t,n){"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,function(e){return e=function(e,t){if("object"!==i(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if("object"!==i(n=n.call(e,t||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string"),"symbol"===i(e)?e:String(e)}(r.key),r)}}function o(e){var t=l();return function(){var n,r=u(e);if(n=t?(n=u(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this,n&&("object"===i(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function s(e){var t="function"==typeof Map?new Map:void 0;return function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return a(e,arguments,u(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),c(n,e)}(e)}function a(e,t,n){return(a=l()?Reflect.construct.bind():function(e,t,n){var i=[null];return i.push.apply(i,t),t=new(Function.bind.apply(e,i)),n&&c(t,n.prototype),t}).apply(null,arguments)}function l(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function c(e,t){return(c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,{K:function(){return me}});var h=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e);var n,i,s=o(a);function a(e,t){if(this instanceof a)return(e=s.call(this,e+" at position "+t)).position=t,e;throw new TypeError("Cannot call a class as a function")}return t=a,n&&r(t.prototype,n),i&&r(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}(s(Error)),d=92,p=47,g=42,f=123,m=125,v=91,y=93,C=40,b=41,I=32,A=10,w=9,x=13,S=8,k=12,E=34,T=43,R=45,_=39,$=48,L=49,N=57,M=44,P=46,O=58,B=59,W=65,F=97,H=69,D=101,G=70,V=102,j=160,Z=8192,z=8202,K=8239,X=8287,U=12288,J=8220,Y=8221,Q=8216,q=8217,ee=96,te=180;function ne(e){return $<=e&&e<=N||W<=e&&e<=G||F<=e&&e<=V}function ie(e){return $<=e&&e<=N}var re=/^[,:[\]{}()\n]$/;function oe(e){return se.test(e)||e&&le(e.charCodeAt(0))}var se=/^[[{\w-]$/;function ae(e){return e===I||e===A||e===w||e===x}function le(e){return ce(e)||he(e)}function ce(e){return e===E||e===J||e===Y}function ue(e){return e===E}function he(e){return e===_||e===Q||e===q||e===ee||e===te}function de(e,t,n){return n=2<arguments.length&&void 0!==n&&n,-1!==(t=e.lastIndexOf(t))?e.substring(0,t)+(n?"":e.substring(t+1)):e}function pe(e,t){var n=e.length;if(!ae(e.charCodeAt(n-1)))return e+t;for(;ae(e.charCodeAt(n-1));)n--;return e.substring(0,n)+t+e.substring(n)}var ge={"\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},fe={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"};function me(e){var t=0,n="";if(!s())throw new h("Unexpected end of json string",e.length);var i=c(M);if(i&&a(),oe(e[t])&&/[,\n][ \t\r]*$/.test(n)){i||(n=pe(n,","));for(var r=!0,o=!0;o;)r?r=!1:c(M)||(n=pe(n,",")),o=s();o||(n=de(n,",")),n="[\n".concat(n,"\n]")}else i&&(n=de(n,","));if(t>=e.length)return n;throw new h("Unexpected character "+JSON.stringify(e[t]),t);function s(){a();var i=function(){if(e.charCodeAt(t)!==f)return!1;n+="{",t++,a();for(var i=!0;t<e.length&&e.charCodeAt(t)!==m;){if(i?i=!1:(c(M)||(n=pe(n,",")),a()),!I()&&!W()){e.charCodeAt(t)===m||e.charCodeAt(t)===f||e.charCodeAt(t)===y||e.charCodeAt(t)===v||void 0===e[t]?n=de(n,","):function(){throw new h("Object key expected",t)}();break}a();var r=c(O);r||(oe(e[t])?n=pe(n,":"):V()),s()||(r?function(){throw new h("Object value expected",t)}:V)()}return e.charCodeAt(t)===m?(n+="}",t++):n=pe(n,"}"),!0}()||function(){if(e.charCodeAt(t)!==v)return!1;n+="[",t++,a();for(var i=!0;t<e.length&&e.charCodeAt(t)!==y;)if(i?i=!1:c(M)||(n=pe(n,",")),!s()){n=de(n,",");break}return e.charCodeAt(t)===y?(n+="]",t++):n=pe(n,"]"),!0}()||I()||function(){var i=t;if(e.charCodeAt(t)===R&&(t++,G(i)))return!0;if(e.charCodeAt(t)===$)t++;else if(function(e){return L<=e&&e<=N}(e.charCodeAt(t)))for(t++;ie(e.charCodeAt(t));)t++;if(e.charCodeAt(t)===P){if(t++,G(i))return!0;for(;ie(e.charCodeAt(t));)t++}if(e.charCodeAt(t)===D||e.charCodeAt(t)===H){if(t++,e.charCodeAt(t)!==R&&e.charCodeAt(t)!==T||t++,G(i))return!0;for(;ie(e.charCodeAt(t));)t++}return i<t&&(n+=e.slice(i,t),!0)}()||_("true","true")||_("false","false")||_("null","null")||_("True","true")||_("False","false")||_("None","null")||W();return a(),i}function a(){for(l();function(){if(e.charCodeAt(t)===p&&e.charCodeAt(t+1)===g){for(;t<e.length&&!function(e,t){return"*"===e[t]&&"/"===e[t+1]}(e,t);)t++;t+=2}else{if(e.charCodeAt(t)!==p||e.charCodeAt(t+1)!==p)return!1;for(;t<e.length&&e.charCodeAt(t)!==A;)t++}return!0}()&&l(););}function l(){for(var i,r,o="";(i=ae(e.charCodeAt(t)))||(r=e.charCodeAt(t))===j||Z<=r&&r<=z||r===K||r===X||r===U;)o+=i?e[t]:" ",t++;return 0<o.length&&(n+=o,!0)}function c(i){return e.charCodeAt(t)===i&&(n+=e[t],t++,!0)}function u(){return n=d,e.charCodeAt(t)===n&&(t++,!0);var n}function I(){var i,r=e.charCodeAt(t)===d;if(r&&(t++,r=!0),le(e.charCodeAt(t))){var o=he(e.charCodeAt(t))?he:ue(e.charCodeAt(t))?ue:ce;for(n+='"',t++;t<e.length&&!o(e.charCodeAt(t));){if(e.charCodeAt(t)===d){var s=e[t+1];if(void 0!==fe[s])n+=e.slice(t,t+2),t+=2;else if("u"===s){if(!(ne(e.charCodeAt(t+2))&&ne(e.charCodeAt(t+3))&&ne(e.charCodeAt(t+4))&&ne(e.charCodeAt(t+5)))){c=l=void 0;for(var l=t,c=l+2;/\w/.test(e[c]);)c++;throw l=e.slice(l,c),new h('Invalid unicode character "'.concat(l,'"'),t)}n+=e.slice(t,t+6),t+=6}else n+=s,t+=2}else{if(l=e[t],(s=e.charCodeAt(t))===E&&e.charCodeAt(t-1)!==d)n+="\\"+l;else if((i=s)===A||i===x||i===w||i===S||i===k)n+=ge[l];else{if(!(32<=(i=s)&&i<=1114111))throw new h("Invalid character "+JSON.stringify(l),t);n+=l}t++}r&&u()}for(le(e.charCodeAt(t))?(e.charCodeAt(t),n+='"',t++):n+='"',a();e.charCodeAt(t)===T;){t++,a();var p=(n=de(n,'"',!0)).length;I(),n=function(e,t,n){return e.substring(0,t)+e.substring(t+n)}(n,p,1)}return!0}return!1}function _(i,r){return e.slice(t,t+i.length)===i&&(n+=r,t+=i.length,!0)}function W(){for(var i,r=t;t<e.length&&(i=e[t],!(re.test(i)||i&&le(i.charCodeAt(0))));)t++;if(r<t){if(e.charCodeAt(t)===C)t++,s(),e.charCodeAt(t)===b&&(t++,e.charCodeAt(t)===B)&&t++;else{for(;ae(e.charCodeAt(t-1))&&0<t;)t--;r=e.slice(r,t),n+=JSON.stringify(r)}return!0}}function F(n){if(!ie(e.charCodeAt(t)))throw n=e.slice(n,t),new h("Invalid number '".concat(n,"', expecting a digit ").concat(e[t]?"but got '".concat(e[t],"'"):"but reached end of input"),2)}function G(i){if(t>=e.length)return n+=e.slice(i,t)+"0",1;F(i)}function V(){throw new h("Colon expected",t)}}},894:function(e){"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON Schema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},7171:function(e){"use strict";e.exports=JSON.parse('{"id":"http://json-schema.org/draft-04/schema#","$schema":"http://json-schema.org/draft-04/schema#","description":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"positiveInteger":{"type":"integer","minimum":0},"positiveIntegerDefault0":{"allOf":[{"$ref":"#/definitions/positiveInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"minItems":1,"uniqueItems":true}},"type":"object","properties":{"id":{"type":"string"},"$schema":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":{},"multipleOf":{"type":"number","minimum":0,"exclusiveMinimum":true},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"boolean","default":false},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"boolean","default":false},"maxLength":{"$ref":"#/definitions/positiveInteger"},"minLength":{"$ref":"#/definitions/positiveIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"anyOf":[{"type":"boolean"},{"$ref":"#"}],"default":{}},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":{}},"maxItems":{"$ref":"#/definitions/positiveInteger"},"minItems":{"$ref":"#/definitions/positiveIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"maxProperties":{"$ref":"#/definitions/positiveInteger"},"minProperties":{"$ref":"#/definitions/positiveIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"anyOf":[{"type":"boolean"},{"$ref":"#"}],"default":{}},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"enum":{"type":"array","minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"dependencies":{"exclusiveMaximum":["maximum"],"exclusiveMinimum":["minimum"]},"default":{}}')},6273:function(e){"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-06/schema#","$id":"http://json-schema.org/draft-06/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"title":{"type":"string"},"description":{"type":"string"},"default":{},"examples":{"type":"array","items":{}},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":{}},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":{},"enum":{"type":"array","minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":{}}')},6680:function(e){"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')}},n={},e.amdD=function(){throw new Error("define cannot be used indirect")},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,{a:n}),n},e.d=function(t,n){for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},e.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},e.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},e.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},e(3161);function e(i){var r=n[i];return void 0!==r||(r=n[i]={id:i,loaded:!1,exports:{}},t[i].call(r.exports,r,r.exports,e),r.loaded=!0),r.exports}var t,n}()},463:function(e,t,n){"use strict";var i=n(791),r=n(296);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=new Set,a={};function l(e,t){c(e,t),c(e+"Capture",t)}function c(e,t){for(a[e]=t,e=0;e<t.length;e++)s.add(t[e])}var u=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),h=Object.prototype.hasOwnProperty,d=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},g={};function f(e,t,n,i,r,o,s){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=i,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var m={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){m[e]=new f(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];m[t]=new f(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){m[e]=new f(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){m[e]=new f(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){m[e]=new f(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){m[e]=new f(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){m[e]=new f(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){m[e]=new f(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){m[e]=new f(e,5,!1,e.toLowerCase(),null,!1,!1)}));var v=/[\-:]([a-z])/g;function y(e){return e[1].toUpperCase()}function C(e,t,n,i){var r=m.hasOwnProperty(t)?m[t]:null;(null!==r?0!==r.type:i||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,i){if(null===t||"undefined"===typeof t||function(e,t,n,i){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!i&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,i))return!0;if(i)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,r,i)&&(n=null),i||null===r?function(e){return!!h.call(g,e)||!h.call(p,e)&&(d.test(e)?g[e]=!0:(p[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):r.mustUseProperty?e[r.propertyName]=null===n?3!==r.type&&"":n:(t=r.attributeName,i=r.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(r=r.type)||4===r&&!0===n?"":""+n,i?e.setAttributeNS(i,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(v,y);m[t]=new f(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(v,y);m[t]=new f(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(v,y);m[t]=new f(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){m[e]=new f(e,1,!1,e.toLowerCase(),null,!1,!1)})),m.xlinkHref=new f("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){m[e]=new f(e,1,!1,e.toLowerCase(),null,!0,!0)}));var b=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,I=Symbol.for("react.element"),A=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),k=Symbol.for("react.provider"),E=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),L=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var N=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var M=Symbol.iterator;function P(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=M&&e[M]||e["@@iterator"])?e:null}var O,B=Object.assign;function W(e){if(void 0===O)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);O=t&&t[1]||""}return"\n"+O+e}var F=!1;function H(e,t){if(!e||F)return"";F=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var i=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){i=c}e.call(t.prototype)}else{try{throw Error()}catch(c){i=c}e()}}catch(c){if(c&&i&&"string"===typeof c.stack){for(var r=c.stack.split("\n"),o=i.stack.split("\n"),s=r.length-1,a=o.length-1;1<=s&&0<=a&&r[s]!==o[a];)a--;for(;1<=s&&0<=a;s--,a--)if(r[s]!==o[a]){if(1!==s||1!==a)do{if(s--,0>--a||r[s]!==o[a]){var l="\n"+r[s].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=s&&0<=a);break}}}finally{F=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?W(e):""}function D(e){switch(e.tag){case 5:return W(e.type);case 16:return W("Lazy");case 13:return W("Suspense");case 19:return W("SuspenseList");case 0:case 2:case 15:return e=H(e.type,!1);case 11:return e=H(e.type.render,!1);case 1:return e=H(e.type,!0);default:return""}}function G(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case w:return"Fragment";case A:return"Portal";case S:return"Profiler";case x:return"StrictMode";case R:return"Suspense";case _:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case E:return(e.displayName||"Context")+".Consumer";case k:return(e._context.displayName||"Context")+".Provider";case T:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case $:return null!==(t=e.displayName||null)?t:G(e.type)||"Memo";case L:t=e._payload,e=e._init;try{return G(e(t))}catch(n){}}return null}function V(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return G(t);case 8:return t===x?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"===typeof t)return t.displayName||t.name||null;if("string"===typeof t)return t}return null}function j(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function Z(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function z(e){e._valueTracker||(e._valueTracker=function(e){var t=Z(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var r=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(e){i=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return i},setValue:function(e){i=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function K(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),i="";return e&&(i=Z(e)?e.checked?"true":"false":e.value),(e=i)!==n&&(t.setValue(e),!0)}function X(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function U(e,t){var n=t.checked;return B({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function J(e,t){var n=null==t.defaultValue?"":t.defaultValue,i=null!=t.checked?t.checked:t.defaultChecked;n=j(null!=t.value?t.value:n),e._wrapperState={initialChecked:i,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Y(e,t){null!=(t=t.checked)&&C(e,"checked",t,!1)}function Q(e,t){Y(e,t);var n=j(t.value),i=t.type;if(null!=n)"number"===i?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===i||"reset"===i)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,j(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function q(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var i=t.type;if(!("submit"!==i&&"reset"!==i||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&X(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,i){if(e=e.options,t){t={};for(var r=0;r<n.length;r++)t["$"+n[r]]=!0;for(n=0;n<e.length;n++)r=t.hasOwnProperty("$"+e[n].value),e[n].selected!==r&&(e[n].selected=r),r&&i&&(e[n].defaultSelected=!0)}else{for(n=""+j(n),t=null,r=0;r<e.length;r++){if(e[r].value===n)return e[r].selected=!0,void(i&&(e[r].defaultSelected=!0));null!==t||e[r].disabled||(t=e[r])}null!==t&&(t.selected=!0)}}function ie(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(o(91));return B({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function re(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(o(92));if(te(n)){if(1<n.length)throw Error(o(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:j(n)}}function oe(e,t){var n=j(t.value),i=j(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=i&&(e.defaultValue=""+i)}function se(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function ae(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function le(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?ae(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ce,ue,he=(ue=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ce=ce||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ce.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,i){MSApp.execUnsafeLocalFunction((function(){return ue(e,t)}))}:ue);function de(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var pe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ge=["Webkit","ms","Moz","O"];function fe(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||pe.hasOwnProperty(e)&&pe[e]?(""+t).trim():t+"px"}function me(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var i=0===n.indexOf("--"),r=fe(n,t[n],i);"float"===n&&(n="cssFloat"),i?e.setProperty(n,r):e[n]=r}}Object.keys(pe).forEach((function(e){ge.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),pe[t]=pe[e]}))}));var ve=B({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ye(e,t){if(t){if(ve[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(o(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(o(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(o(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(o(62))}}function Ce(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var be=null;function Ie(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Ae=null,we=null,xe=null;function Se(e){if(e=Cr(e)){if("function"!==typeof Ae)throw Error(o(280));var t=e.stateNode;t&&(t=Ir(t),Ae(e.stateNode,e.type,t))}}function ke(e){we?xe?xe.push(e):xe=[e]:we=e}function Ee(){if(we){var e=we,t=xe;if(xe=we=null,Se(e),t)for(e=0;e<t.length;e++)Se(t[e])}}function Te(e,t){return e(t)}function Re(){}var _e=!1;function $e(e,t,n){if(_e)return e(t,n);_e=!0;try{return Te(e,t,n)}finally{_e=!1,(null!==we||null!==xe)&&(Re(),Ee())}}function Le(e,t){var n=e.stateNode;if(null===n)return null;var i=Ir(n);if(null===i)return null;n=i[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(i=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!i;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(o(231,t,typeof n));return n}var Ne=!1;if(u)try{var Me={};Object.defineProperty(Me,"passive",{get:function(){Ne=!0}}),window.addEventListener("test",Me,Me),window.removeEventListener("test",Me,Me)}catch(ue){Ne=!1}function Pe(e,t,n,i,r,o,s,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var Oe=!1,Be=null,We=!1,Fe=null,He={onError:function(e){Oe=!0,Be=e}};function De(e,t,n,i,r,o,s,a,l){Oe=!1,Be=null,Pe.apply(He,arguments)}function Ge(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Ve(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function je(e){if(Ge(e)!==e)throw Error(o(188))}function Ze(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ge(e)))throw Error(o(188));return t!==e?null:e}for(var n=e,i=t;;){var r=n.return;if(null===r)break;var s=r.alternate;if(null===s){if(null!==(i=r.return)){n=i;continue}break}if(r.child===s.child){for(s=r.child;s;){if(s===n)return je(r),e;if(s===i)return je(r),t;s=s.sibling}throw Error(o(188))}if(n.return!==i.return)n=r,i=s;else{for(var a=!1,l=r.child;l;){if(l===n){a=!0,n=r,i=s;break}if(l===i){a=!0,i=r,n=s;break}l=l.sibling}if(!a){for(l=s.child;l;){if(l===n){a=!0,n=s,i=r;break}if(l===i){a=!0,i=s,n=r;break}l=l.sibling}if(!a)throw Error(o(189))}}if(n.alternate!==i)throw Error(o(190))}if(3!==n.tag)throw Error(o(188));return n.stateNode.current===n?e:t}(e))?ze(e):null}function ze(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=ze(e);if(null!==t)return t;e=e.sibling}return null}var Ke=r.unstable_scheduleCallback,Xe=r.unstable_cancelCallback,Ue=r.unstable_shouldYield,Je=r.unstable_requestPaint,Ye=r.unstable_now,Qe=r.unstable_getCurrentPriorityLevel,qe=r.unstable_ImmediatePriority,et=r.unstable_UserBlockingPriority,tt=r.unstable_NormalPriority,nt=r.unstable_LowPriority,it=r.unstable_IdlePriority,rt=null,ot=null;var st=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(at(e)/lt|0)|0},at=Math.log,lt=Math.LN2;var ct=64,ut=4194304;function ht(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function dt(e,t){var n=e.pendingLanes;if(0===n)return 0;var i=0,r=e.suspendedLanes,o=e.pingedLanes,s=268435455&n;if(0!==s){var a=s&~r;0!==a?i=ht(a):0!==(o&=s)&&(i=ht(o))}else 0!==(s=n&~r)?i=ht(s):0!==o&&(i=ht(o));if(0===i)return 0;if(0!==t&&t!==i&&0===(t&r)&&((r=i&-i)>=(o=t&-t)||16===r&&0!==(4194240&o)))return t;if(0!==(4&i)&&(i|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=i;0<t;)r=1<<(n=31-st(t)),i|=e[n],t&=~r;return i}function pt(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function gt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function ft(){var e=ct;return 0===(4194240&(ct<<=1))&&(ct=64),e}function mt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function vt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-st(t)]=n}function yt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var i=31-st(n),r=1<<i;r&t|e[i]&t&&(e[i]|=t),n&=~r}}var Ct=0;function bt(e){return 1<(e&=-e)?4<e?0!==(268435455&e)?16:536870912:4:1}var It,At,wt,xt,St,kt=!1,Et=[],Tt=null,Rt=null,_t=null,$t=new Map,Lt=new Map,Nt=[],Mt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Pt(e,t){switch(e){case"focusin":case"focusout":Tt=null;break;case"dragenter":case"dragleave":Rt=null;break;case"mouseover":case"mouseout":_t=null;break;case"pointerover":case"pointerout":$t.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Lt.delete(t.pointerId)}}function Ot(e,t,n,i,r,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:i,nativeEvent:o,targetContainers:[r]},null!==t&&(null!==(t=Cr(t))&&At(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,null!==r&&-1===t.indexOf(r)&&t.push(r),e)}function Bt(e){var t=yr(e.target);if(null!==t){var n=Ge(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Ve(n)))return e.blockedOn=t,void St(e.priority,(function(){wt(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Wt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ut(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=Cr(n))&&At(t),e.blockedOn=n,!1;var i=new(n=e.nativeEvent).constructor(n.type,n);be=i,n.target.dispatchEvent(i),be=null,t.shift()}return!0}function Ft(e,t,n){Wt(e)&&n.delete(t)}function Ht(){kt=!1,null!==Tt&&Wt(Tt)&&(Tt=null),null!==Rt&&Wt(Rt)&&(Rt=null),null!==_t&&Wt(_t)&&(_t=null),$t.forEach(Ft),Lt.forEach(Ft)}function Dt(e,t){e.blockedOn===t&&(e.blockedOn=null,kt||(kt=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,Ht)))}function Gt(e){function t(t){return Dt(t,e)}if(0<Et.length){Dt(Et[0],e);for(var n=1;n<Et.length;n++){var i=Et[n];i.blockedOn===e&&(i.blockedOn=null)}}for(null!==Tt&&Dt(Tt,e),null!==Rt&&Dt(Rt,e),null!==_t&&Dt(_t,e),$t.forEach(t),Lt.forEach(t),n=0;n<Nt.length;n++)(i=Nt[n]).blockedOn===e&&(i.blockedOn=null);for(;0<Nt.length&&null===(n=Nt[0]).blockedOn;)Bt(n),null===n.blockedOn&&Nt.shift()}var Vt=b.ReactCurrentBatchConfig,jt=!0;function Zt(e,t,n,i){var r=Ct,o=Vt.transition;Vt.transition=null;try{Ct=1,Kt(e,t,n,i)}finally{Ct=r,Vt.transition=o}}function zt(e,t,n,i){var r=Ct,o=Vt.transition;Vt.transition=null;try{Ct=4,Kt(e,t,n,i)}finally{Ct=r,Vt.transition=o}}function Kt(e,t,n,i){if(jt){var r=Ut(e,t,n,i);if(null===r)ji(e,t,i,Xt,n),Pt(e,i);else if(function(e,t,n,i,r){switch(t){case"focusin":return Tt=Ot(Tt,e,t,n,i,r),!0;case"dragenter":return Rt=Ot(Rt,e,t,n,i,r),!0;case"mouseover":return _t=Ot(_t,e,t,n,i,r),!0;case"pointerover":var o=r.pointerId;return $t.set(o,Ot($t.get(o)||null,e,t,n,i,r)),!0;case"gotpointercapture":return o=r.pointerId,Lt.set(o,Ot(Lt.get(o)||null,e,t,n,i,r)),!0}return!1}(r,e,t,n,i))i.stopPropagation();else if(Pt(e,i),4&t&&-1<Mt.indexOf(e)){for(;null!==r;){var o=Cr(r);if(null!==o&&It(o),null===(o=Ut(e,t,n,i))&&ji(e,t,i,Xt,n),o===r)break;r=o}null!==r&&i.stopPropagation()}else ji(e,t,i,null,n)}}var Xt=null;function Ut(e,t,n,i){if(Xt=null,null!==(e=yr(e=Ie(i))))if(null===(t=Ge(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=Ve(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Xt=e,null}function Jt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Qe()){case qe:return 1;case et:return 4;case tt:case nt:return 16;case it:return 536870912;default:return 16}default:return 16}}var Yt=null,Qt=null,qt=null;function en(){if(qt)return qt;var e,t,n=Qt,i=n.length,r="value"in Yt?Yt.value:Yt.textContent,o=r.length;for(e=0;e<i&&n[e]===r[e];e++);var s=i-e;for(t=1;t<=s&&n[i-t]===r[o-t];t++);return qt=r.slice(e,1<t?1-t:void 0)}function tn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function nn(){return!0}function rn(){return!1}function on(e){function t(t,n,i,r,o){for(var s in this._reactName=t,this._targetInst=i,this.type=n,this.nativeEvent=r,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(s)&&(t=e[s],this[s]=t?t(r):r[s]);return this.isDefaultPrevented=(null!=r.defaultPrevented?r.defaultPrevented:!1===r.returnValue)?nn:rn,this.isPropagationStopped=rn,this}return B(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var sn,an,ln,cn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},un=on(cn),hn=B({},cn,{view:0,detail:0}),dn=on(hn),pn=B({},hn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Sn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ln&&(ln&&"mousemove"===e.type?(sn=e.screenX-ln.screenX,an=e.screenY-ln.screenY):an=sn=0,ln=e),sn)},movementY:function(e){return"movementY"in e?e.movementY:an}}),gn=on(pn),fn=on(B({},pn,{dataTransfer:0})),mn=on(B({},hn,{relatedTarget:0})),vn=on(B({},cn,{animationName:0,elapsedTime:0,pseudoElement:0})),yn=B({},cn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Cn=on(yn),bn=on(B({},cn,{data:0})),In={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},An={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},wn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=wn[e])&&!!t[e]}function Sn(){return xn}var kn=B({},hn,{key:function(e){if(e.key){var t=In[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?An[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Sn,charCode:function(e){return"keypress"===e.type?tn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),En=on(kn),Tn=on(B({},pn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Rn=on(B({},hn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Sn})),_n=on(B({},cn,{propertyName:0,elapsedTime:0,pseudoElement:0})),$n=B({},pn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Ln=on($n),Nn=[9,13,27,32],Mn=u&&"CompositionEvent"in window,Pn=null;u&&"documentMode"in document&&(Pn=document.documentMode);var On=u&&"TextEvent"in window&&!Pn,Bn=u&&(!Mn||Pn&&8<Pn&&11>=Pn),Wn=String.fromCharCode(32),Fn=!1;function Hn(e,t){switch(e){case"keyup":return-1!==Nn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Dn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Gn=!1;var Vn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function jn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Vn[e.type]:"textarea"===t}function Zn(e,t,n,i){ke(i),0<(t=zi(t,"onChange")).length&&(n=new un("onChange","change",null,n,i),e.push({event:n,listeners:t}))}var zn=null,Kn=null;function Xn(e){Wi(e,0)}function Un(e){if(K(br(e)))return e}function Jn(e,t){if("change"===e)return t}var Yn=!1;if(u){var Qn;if(u){var qn="oninput"in document;if(!qn){var ei=document.createElement("div");ei.setAttribute("oninput","return;"),qn="function"===typeof ei.oninput}Qn=qn}else Qn=!1;Yn=Qn&&(!document.documentMode||9<document.documentMode)}function ti(){zn&&(zn.detachEvent("onpropertychange",ni),Kn=zn=null)}function ni(e){if("value"===e.propertyName&&Un(Kn)){var t=[];Zn(t,Kn,e,Ie(e)),$e(Xn,t)}}function ii(e,t,n){"focusin"===e?(ti(),Kn=n,(zn=t).attachEvent("onpropertychange",ni)):"focusout"===e&&ti()}function ri(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Un(Kn)}function oi(e,t){if("click"===e)return Un(t)}function si(e,t){if("input"===e||"change"===e)return Un(t)}var ai="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t};function li(e,t){if(ai(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(i=0;i<n.length;i++){var r=n[i];if(!h.call(t,r)||!ai(e[r],t[r]))return!1}return!0}function ci(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ui(e,t){var n,i=ci(e);for(e=0;i;){if(3===i.nodeType){if(n=e+i.textContent.length,e<=t&&n>=t)return{node:i,offset:t-e};e=n}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=ci(i)}}function hi(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?hi(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function di(){for(var e=window,t=X();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(i){n=!1}if(!n)break;t=X((e=t.contentWindow).document)}return t}function pi(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function gi(e){var t=di(),n=e.focusedElem,i=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&hi(n.ownerDocument.documentElement,n)){if(null!==i&&pi(n))if(t=i.start,void 0===(e=i.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var r=n.textContent.length,o=Math.min(i.start,r);i=void 0===i.end?o:Math.min(i.end,r),!e.extend&&o>i&&(r=i,i=o,o=r),r=ui(n,o);var s=ui(n,i);r&&s&&(1!==e.rangeCount||e.anchorNode!==r.node||e.anchorOffset!==r.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&((t=t.createRange()).setStart(r.node,r.offset),e.removeAllRanges(),o>i?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"===typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var fi=u&&"documentMode"in document&&11>=document.documentMode,mi=null,vi=null,yi=null,Ci=!1;function bi(e,t,n){var i=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;Ci||null==mi||mi!==X(i)||("selectionStart"in(i=mi)&&pi(i)?i={start:i.selectionStart,end:i.selectionEnd}:i={anchorNode:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset},yi&&li(yi,i)||(yi=i,0<(i=zi(vi,"onSelect")).length&&(t=new un("onSelect","select",null,t,n),e.push({event:t,listeners:i}),t.target=mi)))}function Ii(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ai={animationend:Ii("Animation","AnimationEnd"),animationiteration:Ii("Animation","AnimationIteration"),animationstart:Ii("Animation","AnimationStart"),transitionend:Ii("Transition","TransitionEnd")},wi={},xi={};function Si(e){if(wi[e])return wi[e];if(!Ai[e])return e;var t,n=Ai[e];for(t in n)if(n.hasOwnProperty(t)&&t in xi)return wi[e]=n[t];return e}u&&(xi=document.createElement("div").style,"AnimationEvent"in window||(delete Ai.animationend.animation,delete Ai.animationiteration.animation,delete Ai.animationstart.animation),"TransitionEvent"in window||delete Ai.transitionend.transition);var ki=Si("animationend"),Ei=Si("animationiteration"),Ti=Si("animationstart"),Ri=Si("transitionend"),_i=new Map,$i="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Li(e,t){_i.set(e,t),l(t,[e])}for(var Ni=0;Ni<$i.length;Ni++){var Mi=$i[Ni];Li(Mi.toLowerCase(),"on"+(Mi[0].toUpperCase()+Mi.slice(1)))}Li(ki,"onAnimationEnd"),Li(Ei,"onAnimationIteration"),Li(Ti,"onAnimationStart"),Li("dblclick","onDoubleClick"),Li("focusin","onFocus"),Li("focusout","onBlur"),Li(Ri,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Pi="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Oi=new Set("cancel close invalid load scroll toggle".split(" ").concat(Pi));function Bi(e,t,n){var i=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,i,r,s,a,l,c){if(De.apply(this,arguments),Oe){if(!Oe)throw Error(o(198));var u=Be;Oe=!1,Be=null,We||(We=!0,Fe=u)}}(i,t,void 0,e),e.currentTarget=null}function Wi(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var i=e[n],r=i.event;i=i.listeners;e:{var o=void 0;if(t)for(var s=i.length-1;0<=s;s--){var a=i[s],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==o&&r.isPropagationStopped())break e;Bi(r,a,c),o=l}else for(s=0;s<i.length;s++){if(l=(a=i[s]).instance,c=a.currentTarget,a=a.listener,l!==o&&r.isPropagationStopped())break e;Bi(r,a,c),o=l}}}if(We)throw e=Fe,We=!1,Fe=null,e}function Fi(e,t){var n=t[fr];void 0===n&&(n=t[fr]=new Set);var i=e+"__bubble";n.has(i)||(Vi(t,e,2,!1),n.add(i))}function Hi(e,t,n){var i=0;t&&(i|=4),Vi(n,e,i,t)}var Di="_reactListening"+Math.random().toString(36).slice(2);function Gi(e){if(!e[Di]){e[Di]=!0,s.forEach((function(t){"selectionchange"!==t&&(Oi.has(t)||Hi(t,!1,e),Hi(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Di]||(t[Di]=!0,Hi("selectionchange",!1,t))}}function Vi(e,t,n,i){switch(Jt(t)){case 1:var r=Zt;break;case 4:r=zt;break;default:r=Kt}n=r.bind(null,t,n,e),r=void 0,!Ne||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(r=!0),i?void 0!==r?e.addEventListener(t,n,{capture:!0,passive:r}):e.addEventListener(t,n,!0):void 0!==r?e.addEventListener(t,n,{passive:r}):e.addEventListener(t,n,!1)}function ji(e,t,n,i,r){var o=i;if(0===(1&t)&&0===(2&t)&&null!==i)e:for(;;){if(null===i)return;var s=i.tag;if(3===s||4===s){var a=i.stateNode.containerInfo;if(a===r||8===a.nodeType&&a.parentNode===r)break;if(4===s)for(s=i.return;null!==s;){var l=s.tag;if((3===l||4===l)&&((l=s.stateNode.containerInfo)===r||8===l.nodeType&&l.parentNode===r))return;s=s.return}for(;null!==a;){if(null===(s=yr(a)))return;if(5===(l=s.tag)||6===l){i=o=s;continue e}a=a.parentNode}}i=i.return}$e((function(){var i=o,r=Ie(n),s=[];e:{var a=_i.get(e);if(void 0!==a){var l=un,c=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":l=En;break;case"focusin":c="focus",l=mn;break;case"focusout":c="blur",l=mn;break;case"beforeblur":case"afterblur":l=mn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=gn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=fn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Rn;break;case ki:case Ei:case Ti:l=vn;break;case Ri:l=_n;break;case"scroll":l=dn;break;case"wheel":l=Ln;break;case"copy":case"cut":case"paste":l=Cn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Tn}var u=0!==(4&t),h=!u&&"scroll"===e,d=u?null!==a?a+"Capture":null:a;u=[];for(var p,g=i;null!==g;){var f=(p=g).stateNode;if(5===p.tag&&null!==f&&(p=f,null!==d&&(null!=(f=Le(g,d))&&u.push(Zi(g,f,p)))),h)break;g=g.return}0<u.length&&(a=new l(a,c,null,n,r),s.push({event:a,listeners:u}))}}if(0===(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(a="mouseover"===e||"pointerover"===e)||n===be||!(c=n.relatedTarget||n.fromElement)||!yr(c)&&!c[gr])&&(l||a)&&(a=r.window===r?r:(a=r.ownerDocument)?a.defaultView||a.parentWindow:window,l?(l=i,null!==(c=(c=n.relatedTarget||n.toElement)?yr(c):null)&&(c!==(h=Ge(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=i),l!==c)){if(u=gn,f="onMouseLeave",d="onMouseEnter",g="mouse","pointerout"!==e&&"pointerover"!==e||(u=Tn,f="onPointerLeave",d="onPointerEnter",g="pointer"),h=null==l?a:br(l),p=null==c?a:br(c),(a=new u(f,g+"leave",l,n,r)).target=h,a.relatedTarget=p,f=null,yr(r)===i&&((u=new u(d,g+"enter",c,n,r)).target=p,u.relatedTarget=h,f=u),h=f,l&&c)e:{for(d=c,g=0,p=u=l;p;p=Ki(p))g++;for(p=0,f=d;f;f=Ki(f))p++;for(;0<g-p;)u=Ki(u),g--;for(;0<p-g;)d=Ki(d),p--;for(;g--;){if(u===d||null!==d&&u===d.alternate)break e;u=Ki(u),d=Ki(d)}u=null}else u=null;null!==l&&Xi(s,a,l,u,!1),null!==c&&null!==h&&Xi(s,h,c,u,!0)}if("select"===(l=(a=i?br(i):window).nodeName&&a.nodeName.toLowerCase())||"input"===l&&"file"===a.type)var m=Jn;else if(jn(a))if(Yn)m=si;else{m=ri;var v=ii}else(l=a.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===a.type||"radio"===a.type)&&(m=oi);switch(m&&(m=m(e,i))?Zn(s,m,n,r):(v&&v(e,a,i),"focusout"===e&&(v=a._wrapperState)&&v.controlled&&"number"===a.type&&ee(a,"number",a.value)),v=i?br(i):window,e){case"focusin":(jn(v)||"true"===v.contentEditable)&&(mi=v,vi=i,yi=null);break;case"focusout":yi=vi=mi=null;break;case"mousedown":Ci=!0;break;case"contextmenu":case"mouseup":case"dragend":Ci=!1,bi(s,n,r);break;case"selectionchange":if(fi)break;case"keydown":case"keyup":bi(s,n,r)}var y;if(Mn)e:{switch(e){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else Gn?Hn(e,n)&&(C="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(C="onCompositionStart");C&&(Bn&&"ko"!==n.locale&&(Gn||"onCompositionStart"!==C?"onCompositionEnd"===C&&Gn&&(y=en()):(Qt="value"in(Yt=r)?Yt.value:Yt.textContent,Gn=!0)),0<(v=zi(i,C)).length&&(C=new bn(C,e,null,n,r),s.push({event:C,listeners:v}),y?C.data=y:null!==(y=Dn(n))&&(C.data=y))),(y=On?function(e,t){switch(e){case"compositionend":return Dn(t);case"keypress":return 32!==t.which?null:(Fn=!0,Wn);case"textInput":return(e=t.data)===Wn&&Fn?null:e;default:return null}}(e,n):function(e,t){if(Gn)return"compositionend"===e||!Mn&&Hn(e,t)?(e=en(),qt=Qt=Yt=null,Gn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Bn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(i=zi(i,"onBeforeInput")).length&&(r=new bn("onBeforeInput","beforeinput",null,n,r),s.push({event:r,listeners:i}),r.data=y))}Wi(s,t)}))}function Zi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function zi(e,t){for(var n=t+"Capture",i=[];null!==e;){var r=e,o=r.stateNode;5===r.tag&&null!==o&&(r=o,null!=(o=Le(e,n))&&i.unshift(Zi(e,o,r)),null!=(o=Le(e,t))&&i.push(Zi(e,o,r))),e=e.return}return i}function Ki(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Xi(e,t,n,i,r){for(var o=t._reactName,s=[];null!==n&&n!==i;){var a=n,l=a.alternate,c=a.stateNode;if(null!==l&&l===i)break;5===a.tag&&null!==c&&(a=c,r?null!=(l=Le(n,o))&&s.unshift(Zi(n,l,a)):r||null!=(l=Le(n,o))&&s.push(Zi(n,l,a))),n=n.return}0!==s.length&&e.push({event:t,listeners:s})}var Ui=/\r\n?/g,Ji=/\u0000|\uFFFD/g;function Yi(e){return("string"===typeof e?e:""+e).replace(Ui,"\n").replace(Ji,"")}function Qi(e,t,n){if(t=Yi(t),Yi(e)!==t&&n)throw Error(o(425))}function qi(){}var er=null,tr=null;function nr(e,t){return"textarea"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ir="function"===typeof setTimeout?setTimeout:void 0,rr="function"===typeof clearTimeout?clearTimeout:void 0,or="function"===typeof Promise?Promise:void 0,sr="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof or?function(e){return or.resolve(null).then(e).catch(ar)}:ir;function ar(e){setTimeout((function(){throw e}))}function lr(e,t){var n=t,i=0;do{var r=n.nextSibling;if(e.removeChild(n),r&&8===r.nodeType)if("/$"===(n=r.data)){if(0===i)return e.removeChild(r),void Gt(t);i--}else"$"!==n&&"$?"!==n&&"$!"!==n||i++;n=r}while(n);Gt(t)}function cr(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function ur(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var hr=Math.random().toString(36).slice(2),dr="__reactFiber$"+hr,pr="__reactProps$"+hr,gr="__reactContainer$"+hr,fr="__reactEvents$"+hr,mr="__reactListeners$"+hr,vr="__reactHandles$"+hr;function yr(e){var t=e[dr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[gr]||n[dr]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=ur(e);null!==e;){if(n=e[dr])return n;e=ur(e)}return t}n=(e=n).parentNode}return null}function Cr(e){return!(e=e[dr]||e[gr])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function br(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(o(33))}function Ir(e){return e[pr]||null}var Ar=[],wr=-1;function xr(e){return{current:e}}function Sr(e){0>wr||(e.current=Ar[wr],Ar[wr]=null,wr--)}function kr(e,t){wr++,Ar[wr]=e.current,e.current=t}var Er={},Tr=xr(Er),Rr=xr(!1),_r=Er;function $r(e,t){var n=e.type.contextTypes;if(!n)return Er;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===t)return i.__reactInternalMemoizedMaskedChildContext;var r,o={};for(r in n)o[r]=t[r];return i&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Lr(e){return null!==(e=e.childContextTypes)&&void 0!==e}function Nr(){Sr(Rr),Sr(Tr)}function Mr(e,t,n){if(Tr.current!==Er)throw Error(o(168));kr(Tr,t),kr(Rr,n)}function Pr(e,t,n){var i=e.stateNode;if(t=t.childContextTypes,"function"!==typeof i.getChildContext)return n;for(var r in i=i.getChildContext())if(!(r in t))throw Error(o(108,V(e)||"Unknown",r));return B({},n,i)}function Or(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Er,_r=Tr.current,kr(Tr,e),kr(Rr,Rr.current),!0}function Br(e,t,n){var i=e.stateNode;if(!i)throw Error(o(169));n?(e=Pr(e,t,_r),i.__reactInternalMemoizedMergedChildContext=e,Sr(Rr),Sr(Tr),kr(Tr,e)):Sr(Rr),kr(Rr,n)}var Wr=null,Fr=!1,Hr=!1;function Dr(e){null===Wr?Wr=[e]:Wr.push(e)}function Gr(){if(!Hr&&null!==Wr){Hr=!0;var e=0,t=Ct;try{var n=Wr;for(Ct=1;e<n.length;e++){var i=n[e];do{i=i(!0)}while(null!==i)}Wr=null,Fr=!1}catch(r){throw null!==Wr&&(Wr=Wr.slice(e+1)),Ke(qe,Gr),r}finally{Ct=t,Hr=!1}}return null}var Vr=[],jr=0,Zr=null,zr=0,Kr=[],Xr=0,Ur=null,Jr=1,Yr="";function Qr(e,t){Vr[jr++]=zr,Vr[jr++]=Zr,Zr=e,zr=t}function qr(e,t,n){Kr[Xr++]=Jr,Kr[Xr++]=Yr,Kr[Xr++]=Ur,Ur=e;var i=Jr;e=Yr;var r=32-st(i)-1;i&=~(1<<r),n+=1;var o=32-st(t)+r;if(30<o){var s=r-r%5;o=(i&(1<<s)-1).toString(32),i>>=s,r-=s,Jr=1<<32-st(t)+r|n<<r|i,Yr=o+e}else Jr=1<<o|n<<r|i,Yr=e}function eo(e){null!==e.return&&(Qr(e,1),qr(e,1,0))}function to(e){for(;e===Zr;)Zr=Vr[--jr],Vr[jr]=null,zr=Vr[--jr],Vr[jr]=null;for(;e===Ur;)Ur=Kr[--Xr],Kr[Xr]=null,Yr=Kr[--Xr],Kr[Xr]=null,Jr=Kr[--Xr],Kr[Xr]=null}var no=null,io=null,ro=!1,oo=null;function so(e,t){var n=Lc(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function ao(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,no=e,io=cr(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,no=e,io=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Ur?{id:Jr,overflow:Yr}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Lc(18,null,null,0)).stateNode=t,n.return=e,e.child=n,no=e,io=null,!0);default:return!1}}function lo(e){return 0!==(1&e.mode)&&0===(128&e.flags)}function co(e){if(ro){var t=io;if(t){var n=t;if(!ao(e,t)){if(lo(e))throw Error(o(418));t=cr(n.nextSibling);var i=no;t&&ao(e,t)?so(i,n):(e.flags=-4097&e.flags|2,ro=!1,no=e)}}else{if(lo(e))throw Error(o(418));e.flags=-4097&e.flags|2,ro=!1,no=e}}}function uo(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;no=e}function ho(e){if(e!==no)return!1;if(!ro)return uo(e),ro=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!nr(e.type,e.memoizedProps)),t&&(t=io)){if(lo(e))throw po(),Error(o(418));for(;t;)so(e,t),t=cr(t.nextSibling)}if(uo(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(o(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){io=cr(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}io=null}}else io=no?cr(e.stateNode.nextSibling):null;return!0}function po(){for(var e=io;e;)e=cr(e.nextSibling)}function go(){io=no=null,ro=!1}function fo(e){null===oo?oo=[e]:oo.push(e)}var mo=b.ReactCurrentBatchConfig;function vo(e,t){if(e&&e.defaultProps){for(var n in t=B({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var yo=xr(null),Co=null,bo=null,Io=null;function Ao(){Io=bo=Co=null}function wo(e){var t=yo.current;Sr(yo),e._currentValue=t}function xo(e,t,n){for(;null!==e;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==i&&(i.childLanes|=t)):null!==i&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===n)break;e=e.return}}function So(e,t){Co=e,Io=bo=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(ba=!0),e.firstContext=null)}function ko(e){var t=e._currentValue;if(Io!==e)if(e={context:e,memoizedValue:t,next:null},null===bo){if(null===Co)throw Error(o(308));bo=e,Co.dependencies={lanes:0,firstContext:e}}else bo=bo.next=e;return t}var Eo=null;function To(e){null===Eo?Eo=[e]:Eo.push(e)}function Ro(e,t,n,i){var r=t.interleaved;return null===r?(n.next=n,To(t)):(n.next=r.next,r.next=n),t.interleaved=n,_o(e,i)}function _o(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var $o=!1;function Lo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function No(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Mo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Po(e,t,n){var i=e.updateQueue;if(null===i)return null;if(i=i.shared,0!==(2&Rl)){var r=i.pending;return null===r?t.next=t:(t.next=r.next,r.next=t),i.pending=t,_o(e,n)}return null===(r=i.interleaved)?(t.next=t,To(i)):(t.next=r.next,r.next=t),i.interleaved=t,_o(e,n)}function Oo(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!==(4194240&n))){var i=t.lanes;n|=i&=e.pendingLanes,t.lanes=n,yt(e,n)}}function Bo(e,t){var n=e.updateQueue,i=e.alternate;if(null!==i&&n===(i=i.updateQueue)){var r=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?r=o=s:o=o.next=s,n=n.next}while(null!==n);null===o?r=o=t:o=o.next=t}else r=o=t;return n={baseState:i.baseState,firstBaseUpdate:r,lastBaseUpdate:o,shared:i.shared,effects:i.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Wo(e,t,n,i){var r=e.updateQueue;$o=!1;var o=r.firstBaseUpdate,s=r.lastBaseUpdate,a=r.shared.pending;if(null!==a){r.shared.pending=null;var l=a,c=l.next;l.next=null,null===s?o=c:s.next=c,s=l;var u=e.alternate;null!==u&&((a=(u=u.updateQueue).lastBaseUpdate)!==s&&(null===a?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(null!==o){var h=r.baseState;for(s=0,u=c=l=null,a=o;;){var d=a.lane,p=a.eventTime;if((i&d)===d){null!==u&&(u=u.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var g=e,f=a;switch(d=t,p=n,f.tag){case 1:if("function"===typeof(g=f.payload)){h=g.call(p,h,d);break e}h=g;break e;case 3:g.flags=-65537&g.flags|128;case 0:if(null===(d="function"===typeof(g=f.payload)?g.call(p,h,d):g)||void 0===d)break e;h=B({},h,d);break e;case 2:$o=!0}}null!==a.callback&&0!==a.lane&&(e.flags|=64,null===(d=r.effects)?r.effects=[a]:d.push(a))}else p={eventTime:p,lane:d,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===u?(c=u=p,l=h):u=u.next=p,s|=d;if(null===(a=a.next)){if(null===(a=r.shared.pending))break;a=(d=a).next,d.next=null,r.lastBaseUpdate=d,r.shared.pending=null}}if(null===u&&(l=h),r.baseState=l,r.firstBaseUpdate=c,r.lastBaseUpdate=u,null!==(t=r.shared.interleaved)){r=t;do{s|=r.lane,r=r.next}while(r!==t)}else null===o&&(r.shared.lanes=0);Bl|=s,e.lanes=s,e.memoizedState=h}}function Fo(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var i=e[t],r=i.callback;if(null!==r){if(i.callback=null,i=n,"function"!==typeof r)throw Error(o(191,r));r.call(i)}}}var Ho=(new i.Component).refs;function Do(e,t,n,i){n=null===(n=n(i,t=e.memoizedState))||void 0===n?t:B({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var Go={isMounted:function(e){return!!(e=e._reactInternals)&&Ge(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var i=tc(),r=nc(e),o=Mo(i,r);o.payload=t,void 0!==n&&null!==n&&(o.callback=n),null!==(t=Po(e,o,r))&&(ic(t,e,r,i),Oo(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var i=tc(),r=nc(e),o=Mo(i,r);o.tag=1,o.payload=t,void 0!==n&&null!==n&&(o.callback=n),null!==(t=Po(e,o,r))&&(ic(t,e,r,i),Oo(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=tc(),i=nc(e),r=Mo(n,i);r.tag=2,void 0!==t&&null!==t&&(r.callback=t),null!==(t=Po(e,r,i))&&(ic(t,e,i,n),Oo(t,e,i))}};function Vo(e,t,n,i,r,o,s){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(i,o,s):!t.prototype||!t.prototype.isPureReactComponent||(!li(n,i)||!li(r,o))}function jo(e,t,n){var i=!1,r=Er,o=t.contextType;return"object"===typeof o&&null!==o?o=ko(o):(r=Lr(t)?_r:Tr.current,o=(i=null!==(i=t.contextTypes)&&void 0!==i)?$r(e,r):Er),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=Go,e.stateNode=t,t._reactInternals=e,i&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=r,e.__reactInternalMemoizedMaskedChildContext=o),t}function Zo(e,t,n,i){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,i),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,i),t.state!==e&&Go.enqueueReplaceState(t,t.state,null)}function zo(e,t,n,i){var r=e.stateNode;r.props=n,r.state=e.memoizedState,r.refs=Ho,Lo(e);var o=t.contextType;"object"===typeof o&&null!==o?r.context=ko(o):(o=Lr(t)?_r:Tr.current,r.context=$r(e,o)),r.state=e.memoizedState,"function"===typeof(o=t.getDerivedStateFromProps)&&(Do(e,t,o,n),r.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof r.getSnapshotBeforeUpdate||"function"!==typeof r.UNSAFE_componentWillMount&&"function"!==typeof r.componentWillMount||(t=r.state,"function"===typeof r.componentWillMount&&r.componentWillMount(),"function"===typeof r.UNSAFE_componentWillMount&&r.UNSAFE_componentWillMount(),t!==r.state&&Go.enqueueReplaceState(r,r.state,null),Wo(e,n,r,i),r.state=e.memoizedState),"function"===typeof r.componentDidMount&&(e.flags|=4194308)}function Ko(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(o(309));var i=n.stateNode}if(!i)throw Error(o(147,e));var r=i,s=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===s?t.ref:(t=function(e){var t=r.refs;t===Ho&&(t=r.refs={}),null===e?delete t[s]:t[s]=e},t._stringRef=s,t)}if("string"!==typeof e)throw Error(o(284));if(!n._owner)throw Error(o(290,e))}return e}function Xo(e,t){throw e=Object.prototype.toString.call(t),Error(o(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Uo(e){return(0,e._init)(e._payload)}function Jo(e){function t(t,n){if(e){var i=t.deletions;null===i?(t.deletions=[n],t.flags|=16):i.push(n)}}function n(n,i){if(!e)return null;for(;null!==i;)t(n,i),i=i.sibling;return null}function i(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function r(e,t){return(e=Mc(e,t)).index=0,e.sibling=null,e}function s(t,n,i){return t.index=i,e?null!==(i=t.alternate)?(i=i.index)<n?(t.flags|=2,n):i:(t.flags|=2,n):(t.flags|=1048576,n)}function a(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,n,i){return null===t||6!==t.tag?((t=Wc(n,e.mode,i)).return=e,t):((t=r(t,n)).return=e,t)}function c(e,t,n,i){var o=n.type;return o===w?h(e,t,n.props.children,i,n.key):null!==t&&(t.elementType===o||"object"===typeof o&&null!==o&&o.$$typeof===L&&Uo(o)===t.type)?((i=r(t,n.props)).ref=Ko(e,t,n),i.return=e,i):((i=Pc(n.type,n.key,n.props,null,e.mode,i)).ref=Ko(e,t,n),i.return=e,i)}function u(e,t,n,i){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Fc(n,e.mode,i)).return=e,t):((t=r(t,n.children||[])).return=e,t)}function h(e,t,n,i,o){return null===t||7!==t.tag?((t=Oc(n,e.mode,i,o)).return=e,t):((t=r(t,n)).return=e,t)}function d(e,t,n){if("string"===typeof t&&""!==t||"number"===typeof t)return(t=Wc(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case I:return(n=Pc(t.type,t.key,t.props,null,e.mode,n)).ref=Ko(e,null,t),n.return=e,n;case A:return(t=Fc(t,e.mode,n)).return=e,t;case L:return d(e,(0,t._init)(t._payload),n)}if(te(t)||P(t))return(t=Oc(t,e.mode,n,null)).return=e,t;Xo(e,t)}return null}function p(e,t,n,i){var r=null!==t?t.key:null;if("string"===typeof n&&""!==n||"number"===typeof n)return null!==r?null:l(e,t,""+n,i);if("object"===typeof n&&null!==n){switch(n.$$typeof){case I:return n.key===r?c(e,t,n,i):null;case A:return n.key===r?u(e,t,n,i):null;case L:return p(e,t,(r=n._init)(n._payload),i)}if(te(n)||P(n))return null!==r?null:h(e,t,n,i,null);Xo(e,n)}return null}function g(e,t,n,i,r){if("string"===typeof i&&""!==i||"number"===typeof i)return l(t,e=e.get(n)||null,""+i,r);if("object"===typeof i&&null!==i){switch(i.$$typeof){case I:return c(t,e=e.get(null===i.key?n:i.key)||null,i,r);case A:return u(t,e=e.get(null===i.key?n:i.key)||null,i,r);case L:return g(e,t,n,(0,i._init)(i._payload),r)}if(te(i)||P(i))return h(t,e=e.get(n)||null,i,r,null);Xo(t,i)}return null}function f(r,o,a,l){for(var c=null,u=null,h=o,f=o=0,m=null;null!==h&&f<a.length;f++){h.index>f?(m=h,h=null):m=h.sibling;var v=p(r,h,a[f],l);if(null===v){null===h&&(h=m);break}e&&h&&null===v.alternate&&t(r,h),o=s(v,o,f),null===u?c=v:u.sibling=v,u=v,h=m}if(f===a.length)return n(r,h),ro&&Qr(r,f),c;if(null===h){for(;f<a.length;f++)null!==(h=d(r,a[f],l))&&(o=s(h,o,f),null===u?c=h:u.sibling=h,u=h);return ro&&Qr(r,f),c}for(h=i(r,h);f<a.length;f++)null!==(m=g(h,r,f,a[f],l))&&(e&&null!==m.alternate&&h.delete(null===m.key?f:m.key),o=s(m,o,f),null===u?c=m:u.sibling=m,u=m);return e&&h.forEach((function(e){return t(r,e)})),ro&&Qr(r,f),c}function m(r,a,l,c){var u=P(l);if("function"!==typeof u)throw Error(o(150));if(null==(l=u.call(l)))throw Error(o(151));for(var h=u=null,f=a,m=a=0,v=null,y=l.next();null!==f&&!y.done;m++,y=l.next()){f.index>m?(v=f,f=null):v=f.sibling;var C=p(r,f,y.value,c);if(null===C){null===f&&(f=v);break}e&&f&&null===C.alternate&&t(r,f),a=s(C,a,m),null===h?u=C:h.sibling=C,h=C,f=v}if(y.done)return n(r,f),ro&&Qr(r,m),u;if(null===f){for(;!y.done;m++,y=l.next())null!==(y=d(r,y.value,c))&&(a=s(y,a,m),null===h?u=y:h.sibling=y,h=y);return ro&&Qr(r,m),u}for(f=i(r,f);!y.done;m++,y=l.next())null!==(y=g(f,r,m,y.value,c))&&(e&&null!==y.alternate&&f.delete(null===y.key?m:y.key),a=s(y,a,m),null===h?u=y:h.sibling=y,h=y);return e&&f.forEach((function(e){return t(r,e)})),ro&&Qr(r,m),u}return function e(i,o,s,l){if("object"===typeof s&&null!==s&&s.type===w&&null===s.key&&(s=s.props.children),"object"===typeof s&&null!==s){switch(s.$$typeof){case I:e:{for(var c=s.key,u=o;null!==u;){if(u.key===c){if((c=s.type)===w){if(7===u.tag){n(i,u.sibling),(o=r(u,s.props.children)).return=i,i=o;break e}}else if(u.elementType===c||"object"===typeof c&&null!==c&&c.$$typeof===L&&Uo(c)===u.type){n(i,u.sibling),(o=r(u,s.props)).ref=Ko(i,u,s),o.return=i,i=o;break e}n(i,u);break}t(i,u),u=u.sibling}s.type===w?((o=Oc(s.props.children,i.mode,l,s.key)).return=i,i=o):((l=Pc(s.type,s.key,s.props,null,i.mode,l)).ref=Ko(i,o,s),l.return=i,i=l)}return a(i);case A:e:{for(u=s.key;null!==o;){if(o.key===u){if(4===o.tag&&o.stateNode.containerInfo===s.containerInfo&&o.stateNode.implementation===s.implementation){n(i,o.sibling),(o=r(o,s.children||[])).return=i,i=o;break e}n(i,o);break}t(i,o),o=o.sibling}(o=Fc(s,i.mode,l)).return=i,i=o}return a(i);case L:return e(i,o,(u=s._init)(s._payload),l)}if(te(s))return f(i,o,s,l);if(P(s))return m(i,o,s,l);Xo(i,s)}return"string"===typeof s&&""!==s||"number"===typeof s?(s=""+s,null!==o&&6===o.tag?(n(i,o.sibling),(o=r(o,s)).return=i,i=o):(n(i,o),(o=Wc(s,i.mode,l)).return=i,i=o),a(i)):n(i,o)}}var Yo=Jo(!0),Qo=Jo(!1),qo={},es=xr(qo),ts=xr(qo),ns=xr(qo);function is(e){if(e===qo)throw Error(o(174));return e}function rs(e,t){switch(kr(ns,t),kr(ts,e),kr(es,qo),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:le(null,"");break;default:t=le(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Sr(es),kr(es,t)}function os(){Sr(es),Sr(ts),Sr(ns)}function ss(e){is(ns.current);var t=is(es.current),n=le(t,e.type);t!==n&&(kr(ts,e),kr(es,n))}function as(e){ts.current===e&&(Sr(es),Sr(ts))}var ls=xr(0);function cs(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var us=[];function hs(){for(var e=0;e<us.length;e++)us[e]._workInProgressVersionPrimary=null;us.length=0}var ds=b.ReactCurrentDispatcher,ps=b.ReactCurrentBatchConfig,gs=0,fs=null,ms=null,vs=null,ys=!1,Cs=!1,bs=0,Is=0;function As(){throw Error(o(321))}function ws(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ai(e[n],t[n]))return!1;return!0}function xs(e,t,n,i,r,s){if(gs=s,fs=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ds.current=null===e||null===e.memoizedState?aa:la,e=n(i,r),Cs){s=0;do{if(Cs=!1,bs=0,25<=s)throw Error(o(301));s+=1,vs=ms=null,t.updateQueue=null,ds.current=ca,e=n(i,r)}while(Cs)}if(ds.current=sa,t=null!==ms&&null!==ms.next,gs=0,vs=ms=fs=null,ys=!1,t)throw Error(o(300));return e}function Ss(){var e=0!==bs;return bs=0,e}function ks(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===vs?fs.memoizedState=vs=e:vs=vs.next=e,vs}function Es(){if(null===ms){var e=fs.alternate;e=null!==e?e.memoizedState:null}else e=ms.next;var t=null===vs?fs.memoizedState:vs.next;if(null!==t)vs=t,ms=e;else{if(null===e)throw Error(o(310));e={memoizedState:(ms=e).memoizedState,baseState:ms.baseState,baseQueue:ms.baseQueue,queue:ms.queue,next:null},null===vs?fs.memoizedState=vs=e:vs=vs.next=e}return vs}function Ts(e,t){return"function"===typeof t?t(e):t}function Rs(e){var t=Es(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var i=ms,r=i.baseQueue,s=n.pending;if(null!==s){if(null!==r){var a=r.next;r.next=s.next,s.next=a}i.baseQueue=r=s,n.pending=null}if(null!==r){s=r.next,i=i.baseState;var l=a=null,c=null,u=s;do{var h=u.lane;if((gs&h)===h)null!==c&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),i=u.hasEagerState?u.eagerState:e(i,u.action);else{var d={lane:h,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===c?(l=c=d,a=i):c=c.next=d,fs.lanes|=h,Bl|=h}u=u.next}while(null!==u&&u!==s);null===c?a=i:c.next=l,ai(i,t.memoizedState)||(ba=!0),t.memoizedState=i,t.baseState=a,t.baseQueue=c,n.lastRenderedState=i}if(null!==(e=n.interleaved)){r=e;do{s=r.lane,fs.lanes|=s,Bl|=s,r=r.next}while(r!==e)}else null===r&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function _s(e){var t=Es(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var i=n.dispatch,r=n.pending,s=t.memoizedState;if(null!==r){n.pending=null;var a=r=r.next;do{s=e(s,a.action),a=a.next}while(a!==r);ai(s,t.memoizedState)||(ba=!0),t.memoizedState=s,null===t.baseQueue&&(t.baseState=s),n.lastRenderedState=s}return[s,i]}function $s(){}function Ls(e,t){var n=fs,i=Es(),r=t(),s=!ai(i.memoizedState,r);if(s&&(i.memoizedState=r,ba=!0),i=i.queue,js(Ps.bind(null,n,i,e),[e]),i.getSnapshot!==t||s||null!==vs&&1&vs.memoizedState.tag){if(n.flags|=2048,Fs(9,Ms.bind(null,n,i,r,t),void 0,null),null===_l)throw Error(o(349));0!==(30&gs)||Ns(n,t,r)}return r}function Ns(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=fs.updateQueue)?(t={lastEffect:null,stores:null},fs.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Ms(e,t,n,i){t.value=n,t.getSnapshot=i,Os(t)&&Bs(e)}function Ps(e,t,n){return n((function(){Os(t)&&Bs(e)}))}function Os(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ai(e,n)}catch(i){return!0}}function Bs(e){var t=_o(e,1);null!==t&&ic(t,e,1,-1)}function Ws(e){var t=ks();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ts,lastRenderedState:e},t.queue=e,e=e.dispatch=na.bind(null,fs,e),[t.memoizedState,e]}function Fs(e,t,n,i){return e={tag:e,create:t,destroy:n,deps:i,next:null},null===(t=fs.updateQueue)?(t={lastEffect:null,stores:null},fs.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(i=n.next,n.next=e,e.next=i,t.lastEffect=e),e}function Hs(){return Es().memoizedState}function Ds(e,t,n,i){var r=ks();fs.flags|=e,r.memoizedState=Fs(1|t,n,void 0,void 0===i?null:i)}function Gs(e,t,n,i){var r=Es();i=void 0===i?null:i;var o=void 0;if(null!==ms){var s=ms.memoizedState;if(o=s.destroy,null!==i&&ws(i,s.deps))return void(r.memoizedState=Fs(t,n,o,i))}fs.flags|=e,r.memoizedState=Fs(1|t,n,o,i)}function Vs(e,t){return Ds(8390656,8,e,t)}function js(e,t){return Gs(2048,8,e,t)}function Zs(e,t){return Gs(4,2,e,t)}function zs(e,t){return Gs(4,4,e,t)}function Ks(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Xs(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Gs(4,4,Ks.bind(null,t,e),n)}function Us(){}function Js(e,t){var n=Es();t=void 0===t?null:t;var i=n.memoizedState;return null!==i&&null!==t&&ws(t,i[1])?i[0]:(n.memoizedState=[e,t],e)}function Ys(e,t){var n=Es();t=void 0===t?null:t;var i=n.memoizedState;return null!==i&&null!==t&&ws(t,i[1])?i[0]:(e=e(),n.memoizedState=[e,t],e)}function Qs(e,t,n){return 0===(21&gs)?(e.baseState&&(e.baseState=!1,ba=!0),e.memoizedState=n):(ai(n,t)||(n=ft(),fs.lanes|=n,Bl|=n,e.baseState=!0),t)}function qs(e,t){var n=Ct;Ct=0!==n&&4>n?n:4,e(!0);var i=ps.transition;ps.transition={};try{e(!1),t()}finally{Ct=n,ps.transition=i}}function ea(){return Es().memoizedState}function ta(e,t,n){var i=nc(e);if(n={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null},ia(e))ra(t,n);else if(null!==(n=Ro(e,t,n,i))){ic(n,e,i,tc()),oa(n,t,i)}}function na(e,t,n){var i=nc(e),r={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null};if(ia(e))ra(t,r);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var s=t.lastRenderedState,a=o(s,n);if(r.hasEagerState=!0,r.eagerState=a,ai(a,s)){var l=t.interleaved;return null===l?(r.next=r,To(t)):(r.next=l.next,l.next=r),void(t.interleaved=r)}}catch(c){}null!==(n=Ro(e,t,r,i))&&(ic(n,e,i,r=tc()),oa(n,t,i))}}function ia(e){var t=e.alternate;return e===fs||null!==t&&t===fs}function ra(e,t){Cs=ys=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function oa(e,t,n){if(0!==(4194240&n)){var i=t.lanes;n|=i&=e.pendingLanes,t.lanes=n,yt(e,n)}}var sa={readContext:ko,useCallback:As,useContext:As,useEffect:As,useImperativeHandle:As,useInsertionEffect:As,useLayoutEffect:As,useMemo:As,useReducer:As,useRef:As,useState:As,useDebugValue:As,useDeferredValue:As,useTransition:As,useMutableSource:As,useSyncExternalStore:As,useId:As,unstable_isNewReconciler:!1},aa={readContext:ko,useCallback:function(e,t){return ks().memoizedState=[e,void 0===t?null:t],e},useContext:ko,useEffect:Vs,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Ds(4194308,4,Ks.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ds(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ds(4,2,e,t)},useMemo:function(e,t){var n=ks();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var i=ks();return t=void 0!==n?n(t):t,i.memoizedState=i.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},i.queue=e,e=e.dispatch=ta.bind(null,fs,e),[i.memoizedState,e]},useRef:function(e){return e={current:e},ks().memoizedState=e},useState:Ws,useDebugValue:Us,useDeferredValue:function(e){return ks().memoizedState=e},useTransition:function(){var e=Ws(!1),t=e[0];return e=qs.bind(null,e[1]),ks().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=fs,r=ks();if(ro){if(void 0===n)throw Error(o(407));n=n()}else{if(n=t(),null===_l)throw Error(o(349));0!==(30&gs)||Ns(i,t,n)}r.memoizedState=n;var s={value:n,getSnapshot:t};return r.queue=s,Vs(Ps.bind(null,i,s,e),[e]),i.flags|=2048,Fs(9,Ms.bind(null,i,s,n,t),void 0,null),n},useId:function(){var e=ks(),t=_l.identifierPrefix;if(ro){var n=Yr;t=":"+t+"R"+(n=(Jr&~(1<<32-st(Jr)-1)).toString(32)+n),0<(n=bs++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=Is++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},la={readContext:ko,useCallback:Js,useContext:ko,useEffect:js,useImperativeHandle:Xs,useInsertionEffect:Zs,useLayoutEffect:zs,useMemo:Ys,useReducer:Rs,useRef:Hs,useState:function(){return Rs(Ts)},useDebugValue:Us,useDeferredValue:function(e){return Qs(Es(),ms.memoizedState,e)},useTransition:function(){return[Rs(Ts)[0],Es().memoizedState]},useMutableSource:$s,useSyncExternalStore:Ls,useId:ea,unstable_isNewReconciler:!1},ca={readContext:ko,useCallback:Js,useContext:ko,useEffect:js,useImperativeHandle:Xs,useInsertionEffect:Zs,useLayoutEffect:zs,useMemo:Ys,useReducer:_s,useRef:Hs,useState:function(){return _s(Ts)},useDebugValue:Us,useDeferredValue:function(e){var t=Es();return null===ms?t.memoizedState=e:Qs(t,ms.memoizedState,e)},useTransition:function(){return[_s(Ts)[0],Es().memoizedState]},useMutableSource:$s,useSyncExternalStore:Ls,useId:ea,unstable_isNewReconciler:!1};function ua(e,t){try{var n="",i=t;do{n+=D(i),i=i.return}while(i);var r=n}catch(o){r="\nError generating stack: "+o.message+"\n"+o.stack}return{value:e,source:t,stack:r,digest:null}}function ha(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function da(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}var pa="function"===typeof WeakMap?WeakMap:Map;function ga(e,t,n){(n=Mo(-1,n)).tag=3,n.payload={element:null};var i=t.value;return n.callback=function(){Zl||(Zl=!0,zl=i),da(0,t)},n}function fa(e,t,n){(n=Mo(-1,n)).tag=3;var i=e.type.getDerivedStateFromError;if("function"===typeof i){var r=t.value;n.payload=function(){return i(r)},n.callback=function(){da(0,t)}}var o=e.stateNode;return null!==o&&"function"===typeof o.componentDidCatch&&(n.callback=function(){da(0,t),"function"!==typeof i&&(null===Kl?Kl=new Set([this]):Kl.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function ma(e,t,n){var i=e.pingCache;if(null===i){i=e.pingCache=new pa;var r=new Set;i.set(t,r)}else void 0===(r=i.get(t))&&(r=new Set,i.set(t,r));r.has(n)||(r.add(n),e=kc.bind(null,e,t,n),t.then(e,e))}function va(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function ya(e,t,n,i,r){return 0===(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Mo(-1,1)).tag=2,Po(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=r,e)}var Ca=b.ReactCurrentOwner,ba=!1;function Ia(e,t,n,i){t.child=null===e?Qo(t,null,n,i):Yo(t,e.child,n,i)}function Aa(e,t,n,i,r){n=n.render;var o=t.ref;return So(t,r),i=xs(e,t,n,i,o,r),n=Ss(),null===e||ba?(ro&&n&&eo(t),t.flags|=1,Ia(e,t,i,r),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r,Za(e,t,r))}function wa(e,t,n,i,r){if(null===e){var o=n.type;return"function"!==typeof o||Nc(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Pc(n.type,null,i,t,t.mode,r)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,xa(e,t,o,i,r))}if(o=e.child,0===(e.lanes&r)){var s=o.memoizedProps;if((n=null!==(n=n.compare)?n:li)(s,i)&&e.ref===t.ref)return Za(e,t,r)}return t.flags|=1,(e=Mc(o,i)).ref=t.ref,e.return=t,t.child=e}function xa(e,t,n,i,r){if(null!==e){var o=e.memoizedProps;if(li(o,i)&&e.ref===t.ref){if(ba=!1,t.pendingProps=i=o,0===(e.lanes&r))return t.lanes=e.lanes,Za(e,t,r);0!==(131072&e.flags)&&(ba=!0)}}return Ea(e,t,n,i,r)}function Sa(e,t,n){var i=t.pendingProps,r=i.children,o=null!==e?e.memoizedState:null;if("hidden"===i.mode)if(0===(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},kr(Ml,Nl),Nl|=n;else{if(0===(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,kr(Ml,Nl),Nl|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=null!==o?o.baseLanes:n,kr(Ml,Nl),Nl|=i}else null!==o?(i=o.baseLanes|n,t.memoizedState=null):i=n,kr(Ml,Nl),Nl|=i;return Ia(e,t,r,n),t.child}function ka(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ea(e,t,n,i,r){var o=Lr(n)?_r:Tr.current;return o=$r(t,o),So(t,r),n=xs(e,t,n,i,o,r),i=Ss(),null===e||ba?(ro&&i&&eo(t),t.flags|=1,Ia(e,t,n,r),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r,Za(e,t,r))}function Ta(e,t,n,i,r){if(Lr(n)){var o=!0;Or(t)}else o=!1;if(So(t,r),null===t.stateNode)ja(e,t),jo(t,n,i),zo(t,n,i,r),i=!0;else if(null===e){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,c=n.contextType;"object"===typeof c&&null!==c?c=ko(c):c=$r(t,c=Lr(n)?_r:Tr.current);var u=n.getDerivedStateFromProps,h="function"===typeof u||"function"===typeof s.getSnapshotBeforeUpdate;h||"function"!==typeof s.UNSAFE_componentWillReceiveProps&&"function"!==typeof s.componentWillReceiveProps||(a!==i||l!==c)&&Zo(t,s,i,c),$o=!1;var d=t.memoizedState;s.state=d,Wo(t,i,s,r),l=t.memoizedState,a!==i||d!==l||Rr.current||$o?("function"===typeof u&&(Do(t,n,u,i),l=t.memoizedState),(a=$o||Vo(t,n,a,i,d,l,c))?(h||"function"!==typeof s.UNSAFE_componentWillMount&&"function"!==typeof s.componentWillMount||("function"===typeof s.componentWillMount&&s.componentWillMount(),"function"===typeof s.UNSAFE_componentWillMount&&s.UNSAFE_componentWillMount()),"function"===typeof s.componentDidMount&&(t.flags|=4194308)):("function"===typeof s.componentDidMount&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=l),s.props=i,s.state=l,s.context=c,i=a):("function"===typeof s.componentDidMount&&(t.flags|=4194308),i=!1)}else{s=t.stateNode,No(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:vo(t.type,a),s.props=c,h=t.pendingProps,d=s.context,"object"===typeof(l=n.contextType)&&null!==l?l=ko(l):l=$r(t,l=Lr(n)?_r:Tr.current);var p=n.getDerivedStateFromProps;(u="function"===typeof p||"function"===typeof s.getSnapshotBeforeUpdate)||"function"!==typeof s.UNSAFE_componentWillReceiveProps&&"function"!==typeof s.componentWillReceiveProps||(a!==h||d!==l)&&Zo(t,s,i,l),$o=!1,d=t.memoizedState,s.state=d,Wo(t,i,s,r);var g=t.memoizedState;a!==h||d!==g||Rr.current||$o?("function"===typeof p&&(Do(t,n,p,i),g=t.memoizedState),(c=$o||Vo(t,n,c,i,d,g,l)||!1)?(u||"function"!==typeof s.UNSAFE_componentWillUpdate&&"function"!==typeof s.componentWillUpdate||("function"===typeof s.componentWillUpdate&&s.componentWillUpdate(i,g,l),"function"===typeof s.UNSAFE_componentWillUpdate&&s.UNSAFE_componentWillUpdate(i,g,l)),"function"===typeof s.componentDidUpdate&&(t.flags|=4),"function"===typeof s.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!==typeof s.componentDidUpdate||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!==typeof s.getSnapshotBeforeUpdate||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=g),s.props=i,s.state=g,s.context=l,i=c):("function"!==typeof s.componentDidUpdate||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!==typeof s.getSnapshotBeforeUpdate||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),i=!1)}return Ra(e,t,n,i,o,r)}function Ra(e,t,n,i,r,o){ka(e,t);var s=0!==(128&t.flags);if(!i&&!s)return r&&Br(t,n,!1),Za(e,t,o);i=t.stateNode,Ca.current=t;var a=s&&"function"!==typeof n.getDerivedStateFromError?null:i.render();return t.flags|=1,null!==e&&s?(t.child=Yo(t,e.child,null,o),t.child=Yo(t,null,a,o)):Ia(e,t,a,o),t.memoizedState=i.state,r&&Br(t,n,!0),t.child}function _a(e){var t=e.stateNode;t.pendingContext?Mr(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Mr(0,t.context,!1),rs(e,t.containerInfo)}function $a(e,t,n,i,r){return go(),fo(r),t.flags|=256,Ia(e,t,n,i),t.child}var La,Na,Ma,Pa,Oa={dehydrated:null,treeContext:null,retryLane:0};function Ba(e){return{baseLanes:e,cachePool:null,transitions:null}}function Wa(e,t,n){var i,r=t.pendingProps,s=ls.current,a=!1,l=0!==(128&t.flags);if((i=l)||(i=(null===e||null!==e.memoizedState)&&0!==(2&s)),i?(a=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(s|=1),kr(ls,1&s),null===e)return co(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0===(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(l=r.children,e=r.fallback,a?(r=t.mode,a=t.child,l={mode:"hidden",children:l},0===(1&r)&&null!==a?(a.childLanes=0,a.pendingProps=l):a=Bc(l,r,0,null),e=Oc(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Ba(n),t.memoizedState=Oa,e):Fa(t,l));if(null!==(s=e.memoizedState)&&null!==(i=s.dehydrated))return function(e,t,n,i,r,s,a){if(n)return 256&t.flags?(t.flags&=-257,Ha(e,t,a,i=ha(Error(o(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(s=i.fallback,r=t.mode,i=Bc({mode:"visible",children:i.children},r,0,null),(s=Oc(s,r,a,null)).flags|=2,i.return=t,s.return=t,i.sibling=s,t.child=i,0!==(1&t.mode)&&Yo(t,e.child,null,a),t.child.memoizedState=Ba(a),t.memoizedState=Oa,s);if(0===(1&t.mode))return Ha(e,t,a,null);if("$!"===r.data){if(i=r.nextSibling&&r.nextSibling.dataset)var l=i.dgst;return i=l,Ha(e,t,a,i=ha(s=Error(o(419)),i,void 0))}if(l=0!==(a&e.childLanes),ba||l){if(null!==(i=_l)){switch(a&-a){case 4:r=2;break;case 16:r=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:r=32;break;case 536870912:r=268435456;break;default:r=0}0!==(r=0!==(r&(i.suspendedLanes|a))?0:r)&&r!==s.retryLane&&(s.retryLane=r,_o(e,r),ic(i,e,r,-1))}return mc(),Ha(e,t,a,i=ha(Error(o(421))))}return"$?"===r.data?(t.flags|=128,t.child=e.child,t=Tc.bind(null,e),r._reactRetry=t,null):(e=s.treeContext,io=cr(r.nextSibling),no=t,ro=!0,oo=null,null!==e&&(Kr[Xr++]=Jr,Kr[Xr++]=Yr,Kr[Xr++]=Ur,Jr=e.id,Yr=e.overflow,Ur=t),t=Fa(t,i.children),t.flags|=4096,t)}(e,t,l,r,i,s,n);if(a){a=r.fallback,l=t.mode,i=(s=e.child).sibling;var c={mode:"hidden",children:r.children};return 0===(1&l)&&t.child!==s?((r=t.child).childLanes=0,r.pendingProps=c,t.deletions=null):(r=Mc(s,c)).subtreeFlags=14680064&s.subtreeFlags,null!==i?a=Mc(i,a):(a=Oc(a,l,n,null)).flags|=2,a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,l=null===(l=e.child.memoizedState)?Ba(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},a.memoizedState=l,a.childLanes=e.childLanes&~n,t.memoizedState=Oa,r}return e=(a=e.child).sibling,r=Mc(a,{mode:"visible",children:r.children}),0===(1&t.mode)&&(r.lanes=n),r.return=t,r.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Fa(e,t){return(t=Bc({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Ha(e,t,n,i){return null!==i&&fo(i),Yo(t,e.child,null,n),(e=Fa(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Da(e,t,n){e.lanes|=t;var i=e.alternate;null!==i&&(i.lanes|=t),xo(e.return,t,n)}function Ga(e,t,n,i,r){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:n,tailMode:r}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=i,o.tail=n,o.tailMode=r)}function Va(e,t,n){var i=t.pendingProps,r=i.revealOrder,o=i.tail;if(Ia(e,t,i.children,n),0!==(2&(i=ls.current)))i=1&i|2,t.flags|=128;else{if(null!==e&&0!==(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Da(e,n,t);else if(19===e.tag)Da(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}i&=1}if(kr(ls,i),0===(1&t.mode))t.memoizedState=null;else switch(r){case"forwards":for(n=t.child,r=null;null!==n;)null!==(e=n.alternate)&&null===cs(e)&&(r=n),n=n.sibling;null===(n=r)?(r=t.child,t.child=null):(r=n.sibling,n.sibling=null),Ga(t,!1,r,n,o);break;case"backwards":for(n=null,r=t.child,t.child=null;null!==r;){if(null!==(e=r.alternate)&&null===cs(e)){t.child=r;break}e=r.sibling,r.sibling=n,n=r,r=e}Ga(t,!0,n,null,o);break;case"together":Ga(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ja(e,t){0===(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Za(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Bl|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(o(153));if(null!==t.child){for(n=Mc(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Mc(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function za(e,t){if(!ro)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var i=null;null!==n;)null!==n.alternate&&(i=n),n=n.sibling;null===i?t||null===e.tail?e.tail=null:e.tail.sibling=null:i.sibling=null}}function Ka(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,i=0;if(t)for(var r=e.child;null!==r;)n|=r.lanes|r.childLanes,i|=14680064&r.subtreeFlags,i|=14680064&r.flags,r.return=e,r=r.sibling;else for(r=e.child;null!==r;)n|=r.lanes|r.childLanes,i|=r.subtreeFlags,i|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=i,e.childLanes=n,t}function Xa(e,t,n){var i=t.pendingProps;switch(to(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ka(t),null;case 1:case 17:return Lr(t.type)&&Nr(),Ka(t),null;case 3:return i=t.stateNode,os(),Sr(Rr),Sr(Tr),hs(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),null!==e&&null!==e.child||(ho(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0===(256&t.flags)||(t.flags|=1024,null!==oo&&(ac(oo),oo=null))),Na(e,t),Ka(t),null;case 5:as(t);var r=is(ns.current);if(n=t.type,null!==e&&null!=t.stateNode)Ma(e,t,n,i,r),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(null===t.stateNode)throw Error(o(166));return Ka(t),null}if(e=is(es.current),ho(t)){i=t.stateNode,n=t.type;var s=t.memoizedProps;switch(i[dr]=t,i[pr]=s,e=0!==(1&t.mode),n){case"dialog":Fi("cancel",i),Fi("close",i);break;case"iframe":case"object":case"embed":Fi("load",i);break;case"video":case"audio":for(r=0;r<Pi.length;r++)Fi(Pi[r],i);break;case"source":Fi("error",i);break;case"img":case"image":case"link":Fi("error",i),Fi("load",i);break;case"details":Fi("toggle",i);break;case"input":J(i,s),Fi("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!s.multiple},Fi("invalid",i);break;case"textarea":re(i,s),Fi("invalid",i)}for(var l in ye(n,s),r=null,s)if(s.hasOwnProperty(l)){var c=s[l];"children"===l?"string"===typeof c?i.textContent!==c&&(!0!==s.suppressHydrationWarning&&Qi(i.textContent,c,e),r=["children",c]):"number"===typeof c&&i.textContent!==""+c&&(!0!==s.suppressHydrationWarning&&Qi(i.textContent,c,e),r=["children",""+c]):a.hasOwnProperty(l)&&null!=c&&"onScroll"===l&&Fi("scroll",i)}switch(n){case"input":z(i),q(i,s,!0);break;case"textarea":z(i),se(i);break;case"select":case"option":break;default:"function"===typeof s.onClick&&(i.onclick=qi)}i=r,t.updateQueue=i,null!==i&&(t.flags|=4)}else{l=9===r.nodeType?r:r.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=ae(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof i.is?e=l.createElement(n,{is:i.is}):(e=l.createElement(n),"select"===n&&(l=e,i.multiple?l.multiple=!0:i.size&&(l.size=i.size))):e=l.createElementNS(e,n),e[dr]=t,e[pr]=i,La(e,t,!1,!1),t.stateNode=e;e:{switch(l=Ce(n,i),n){case"dialog":Fi("cancel",e),Fi("close",e),r=i;break;case"iframe":case"object":case"embed":Fi("load",e),r=i;break;case"video":case"audio":for(r=0;r<Pi.length;r++)Fi(Pi[r],e);r=i;break;case"source":Fi("error",e),r=i;break;case"img":case"image":case"link":Fi("error",e),Fi("load",e),r=i;break;case"details":Fi("toggle",e),r=i;break;case"input":J(e,i),r=U(e,i),Fi("invalid",e);break;case"option":default:r=i;break;case"select":e._wrapperState={wasMultiple:!!i.multiple},r=B({},i,{value:void 0}),Fi("invalid",e);break;case"textarea":re(e,i),r=ie(e,i),Fi("invalid",e)}for(s in ye(n,r),c=r)if(c.hasOwnProperty(s)){var u=c[s];"style"===s?me(e,u):"dangerouslySetInnerHTML"===s?null!=(u=u?u.__html:void 0)&&he(e,u):"children"===s?"string"===typeof u?("textarea"!==n||""!==u)&&de(e,u):"number"===typeof u&&de(e,""+u):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(a.hasOwnProperty(s)?null!=u&&"onScroll"===s&&Fi("scroll",e):null!=u&&C(e,s,u,l))}switch(n){case"input":z(e),q(e,i,!1);break;case"textarea":z(e),se(e);break;case"option":null!=i.value&&e.setAttribute("value",""+j(i.value));break;case"select":e.multiple=!!i.multiple,null!=(s=i.value)?ne(e,!!i.multiple,s,!1):null!=i.defaultValue&&ne(e,!!i.multiple,i.defaultValue,!0);break;default:"function"===typeof r.onClick&&(e.onclick=qi)}switch(n){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}}i&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Ka(t),null;case 6:if(e&&null!=t.stateNode)Pa(e,t,e.memoizedProps,i);else{if("string"!==typeof i&&null===t.stateNode)throw Error(o(166));if(n=is(ns.current),is(es.current),ho(t)){if(i=t.stateNode,n=t.memoizedProps,i[dr]=t,(s=i.nodeValue!==n)&&null!==(e=no))switch(e.tag){case 3:Qi(i.nodeValue,n,0!==(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Qi(i.nodeValue,n,0!==(1&e.mode))}s&&(t.flags|=4)}else(i=(9===n.nodeType?n:n.ownerDocument).createTextNode(i))[dr]=t,t.stateNode=i}return Ka(t),null;case 13:if(Sr(ls),i=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(ro&&null!==io&&0!==(1&t.mode)&&0===(128&t.flags))po(),go(),t.flags|=98560,s=!1;else if(s=ho(t),null!==i&&null!==i.dehydrated){if(null===e){if(!s)throw Error(o(318));if(!(s=null!==(s=t.memoizedState)?s.dehydrated:null))throw Error(o(317));s[dr]=t}else go(),0===(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Ka(t),s=!1}else null!==oo&&(ac(oo),oo=null),s=!0;if(!s)return 65536&t.flags?t:null}return 0!==(128&t.flags)?(t.lanes=n,t):((i=null!==i)!==(null!==e&&null!==e.memoizedState)&&i&&(t.child.flags|=8192,0!==(1&t.mode)&&(null===e||0!==(1&ls.current)?0===Pl&&(Pl=3):mc())),null!==t.updateQueue&&(t.flags|=4),Ka(t),null);case 4:return os(),Na(e,t),null===e&&Gi(t.stateNode.containerInfo),Ka(t),null;case 10:return wo(t.type._context),Ka(t),null;case 19:if(Sr(ls),null===(s=t.memoizedState))return Ka(t),null;if(i=0!==(128&t.flags),null===(l=s.rendering))if(i)za(s,!1);else{if(0!==Pl||null!==e&&0!==(128&e.flags))for(e=t.child;null!==e;){if(null!==(l=cs(e))){for(t.flags|=128,za(s,!1),null!==(i=l.updateQueue)&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=n,n=t.child;null!==n;)e=i,(s=n).flags&=14680066,null===(l=s.alternate)?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=l.childLanes,s.lanes=l.lanes,s.child=l.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=l.memoizedProps,s.memoizedState=l.memoizedState,s.updateQueue=l.updateQueue,s.type=l.type,e=l.dependencies,s.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return kr(ls,1&ls.current|2),t.child}e=e.sibling}null!==s.tail&&Ye()>Vl&&(t.flags|=128,i=!0,za(s,!1),t.lanes=4194304)}else{if(!i)if(null!==(e=cs(l))){if(t.flags|=128,i=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),za(s,!0),null===s.tail&&"hidden"===s.tailMode&&!l.alternate&&!ro)return Ka(t),null}else 2*Ye()-s.renderingStartTime>Vl&&1073741824!==n&&(t.flags|=128,i=!0,za(s,!1),t.lanes=4194304);s.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=s.last)?n.sibling=l:t.child=l,s.last=l)}return null!==s.tail?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Ye(),t.sibling=null,n=ls.current,kr(ls,i?1&n|2:1&n),t):(Ka(t),null);case 22:case 23:return dc(),i=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==i&&(t.flags|=8192),i&&0!==(1&t.mode)?0!==(1073741824&Nl)&&(Ka(t),6&t.subtreeFlags&&(t.flags|=8192)):Ka(t),null;case 24:case 25:return null}throw Error(o(156,t.tag))}function Ua(e,t){switch(to(t),t.tag){case 1:return Lr(t.type)&&Nr(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return os(),Sr(Rr),Sr(Tr),hs(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 5:return as(t),null;case 13:if(Sr(ls),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(o(340));go()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Sr(ls),null;case 4:return os(),null;case 10:return wo(t.type._context),null;case 22:case 23:return dc(),null;default:return null}}La=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Na=function(){},Ma=function(e,t,n,i){var r=e.memoizedProps;if(r!==i){e=t.stateNode,is(es.current);var o,s=null;switch(n){case"input":r=U(e,r),i=U(e,i),s=[];break;case"select":r=B({},r,{value:void 0}),i=B({},i,{value:void 0}),s=[];break;case"textarea":r=ie(e,r),i=ie(e,i),s=[];break;default:"function"!==typeof r.onClick&&"function"===typeof i.onClick&&(e.onclick=qi)}for(u in ye(n,i),n=null,r)if(!i.hasOwnProperty(u)&&r.hasOwnProperty(u)&&null!=r[u])if("style"===u){var l=r[u];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(a.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in i){var c=i[u];if(l=null!=r?r[u]:void 0,i.hasOwnProperty(u)&&c!==l&&(null!=c||null!=l))if("style"===u)if(l){for(o in l)!l.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in c)c.hasOwnProperty(o)&&l[o]!==c[o]&&(n||(n={}),n[o]=c[o])}else n||(s||(s=[]),s.push(u,n)),n=c;else"dangerouslySetInnerHTML"===u?(c=c?c.__html:void 0,l=l?l.__html:void 0,null!=c&&l!==c&&(s=s||[]).push(u,c)):"children"===u?"string"!==typeof c&&"number"!==typeof c||(s=s||[]).push(u,""+c):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(a.hasOwnProperty(u)?(null!=c&&"onScroll"===u&&Fi("scroll",e),s||l===c||(s=[])):(s=s||[]).push(u,c))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}},Pa=function(e,t,n,i){n!==i&&(t.flags|=4)};var Ja=!1,Ya=!1,Qa="function"===typeof WeakSet?WeakSet:Set,qa=null;function el(e,t){var n=e.ref;if(null!==n)if("function"===typeof n)try{n(null)}catch(i){Sc(e,t,i)}else n.current=null}function tl(e,t,n){try{n()}catch(i){Sc(e,t,i)}}var nl=!1;function il(e,t,n){var i=t.updateQueue;if(null!==(i=null!==i?i.lastEffect:null)){var r=i=i.next;do{if((r.tag&e)===e){var o=r.destroy;r.destroy=void 0,void 0!==o&&tl(t,n,o)}r=r.next}while(r!==i)}}function rl(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var i=n.create;n.destroy=i()}n=n.next}while(n!==t)}}function ol(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"===typeof t?t(e):t.current=e}}function sl(e){var t=e.alternate;null!==t&&(e.alternate=null,sl(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[dr],delete t[pr],delete t[fr],delete t[mr],delete t[vr])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function al(e){return 5===e.tag||3===e.tag||4===e.tag}function ll(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||al(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function cl(e,t,n){var i=e.tag;if(5===i||6===i)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=qi));else if(4!==i&&null!==(e=e.child))for(cl(e,t,n),e=e.sibling;null!==e;)cl(e,t,n),e=e.sibling}function ul(e,t,n){var i=e.tag;if(5===i||6===i)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==i&&null!==(e=e.child))for(ul(e,t,n),e=e.sibling;null!==e;)ul(e,t,n),e=e.sibling}var hl=null,dl=!1;function pl(e,t,n){for(n=n.child;null!==n;)gl(e,t,n),n=n.sibling}function gl(e,t,n){if(ot&&"function"===typeof ot.onCommitFiberUnmount)try{ot.onCommitFiberUnmount(rt,n)}catch(a){}switch(n.tag){case 5:Ya||el(n,t);case 6:var i=hl,r=dl;hl=null,pl(e,t,n),dl=r,null!==(hl=i)&&(dl?(e=hl,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):hl.removeChild(n.stateNode));break;case 18:null!==hl&&(dl?(e=hl,n=n.stateNode,8===e.nodeType?lr(e.parentNode,n):1===e.nodeType&&lr(e,n),Gt(e)):lr(hl,n.stateNode));break;case 4:i=hl,r=dl,hl=n.stateNode.containerInfo,dl=!0,pl(e,t,n),hl=i,dl=r;break;case 0:case 11:case 14:case 15:if(!Ya&&(null!==(i=n.updateQueue)&&null!==(i=i.lastEffect))){r=i=i.next;do{var o=r,s=o.destroy;o=o.tag,void 0!==s&&(0!==(2&o)||0!==(4&o))&&tl(n,t,s),r=r.next}while(r!==i)}pl(e,t,n);break;case 1:if(!Ya&&(el(n,t),"function"===typeof(i=n.stateNode).componentWillUnmount))try{i.props=n.memoizedProps,i.state=n.memoizedState,i.componentWillUnmount()}catch(a){Sc(n,t,a)}pl(e,t,n);break;case 21:pl(e,t,n);break;case 22:1&n.mode?(Ya=(i=Ya)||null!==n.memoizedState,pl(e,t,n),Ya=i):pl(e,t,n);break;default:pl(e,t,n)}}function fl(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Qa),t.forEach((function(t){var i=Rc.bind(null,e,t);n.has(t)||(n.add(t),t.then(i,i))}))}}function ml(e,t){var n=t.deletions;if(null!==n)for(var i=0;i<n.length;i++){var r=n[i];try{var s=e,a=t,l=a;e:for(;null!==l;){switch(l.tag){case 5:hl=l.stateNode,dl=!1;break e;case 3:case 4:hl=l.stateNode.containerInfo,dl=!0;break e}l=l.return}if(null===hl)throw Error(o(160));gl(s,a,r),hl=null,dl=!1;var c=r.alternate;null!==c&&(c.return=null),r.return=null}catch(u){Sc(r,t,u)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)vl(t,e),t=t.sibling}function vl(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ml(t,e),yl(e),4&i){try{il(3,e,e.return),rl(3,e)}catch(m){Sc(e,e.return,m)}try{il(5,e,e.return)}catch(m){Sc(e,e.return,m)}}break;case 1:ml(t,e),yl(e),512&i&&null!==n&&el(n,n.return);break;case 5:if(ml(t,e),yl(e),512&i&&null!==n&&el(n,n.return),32&e.flags){var r=e.stateNode;try{de(r,"")}catch(m){Sc(e,e.return,m)}}if(4&i&&null!=(r=e.stateNode)){var s=e.memoizedProps,a=null!==n?n.memoizedProps:s,l=e.type,c=e.updateQueue;if(e.updateQueue=null,null!==c)try{"input"===l&&"radio"===s.type&&null!=s.name&&Y(r,s),Ce(l,a);var u=Ce(l,s);for(a=0;a<c.length;a+=2){var h=c[a],d=c[a+1];"style"===h?me(r,d):"dangerouslySetInnerHTML"===h?he(r,d):"children"===h?de(r,d):C(r,h,d,u)}switch(l){case"input":Q(r,s);break;case"textarea":oe(r,s);break;case"select":var p=r._wrapperState.wasMultiple;r._wrapperState.wasMultiple=!!s.multiple;var g=s.value;null!=g?ne(r,!!s.multiple,g,!1):p!==!!s.multiple&&(null!=s.defaultValue?ne(r,!!s.multiple,s.defaultValue,!0):ne(r,!!s.multiple,s.multiple?[]:"",!1))}r[pr]=s}catch(m){Sc(e,e.return,m)}}break;case 6:if(ml(t,e),yl(e),4&i){if(null===e.stateNode)throw Error(o(162));r=e.stateNode,s=e.memoizedProps;try{r.nodeValue=s}catch(m){Sc(e,e.return,m)}}break;case 3:if(ml(t,e),yl(e),4&i&&null!==n&&n.memoizedState.isDehydrated)try{Gt(t.containerInfo)}catch(m){Sc(e,e.return,m)}break;case 4:default:ml(t,e),yl(e);break;case 13:ml(t,e),yl(e),8192&(r=e.child).flags&&(s=null!==r.memoizedState,r.stateNode.isHidden=s,!s||null!==r.alternate&&null!==r.alternate.memoizedState||(Gl=Ye())),4&i&&fl(e);break;case 22:if(h=null!==n&&null!==n.memoizedState,1&e.mode?(Ya=(u=Ya)||h,ml(t,e),Ya=u):ml(t,e),yl(e),8192&i){if(u=null!==e.memoizedState,(e.stateNode.isHidden=u)&&!h&&0!==(1&e.mode))for(qa=e,h=e.child;null!==h;){for(d=qa=h;null!==qa;){switch(g=(p=qa).child,p.tag){case 0:case 11:case 14:case 15:il(4,p,p.return);break;case 1:el(p,p.return);var f=p.stateNode;if("function"===typeof f.componentWillUnmount){i=p,n=p.return;try{t=i,f.props=t.memoizedProps,f.state=t.memoizedState,f.componentWillUnmount()}catch(m){Sc(i,n,m)}}break;case 5:el(p,p.return);break;case 22:if(null!==p.memoizedState){Al(d);continue}}null!==g?(g.return=p,qa=g):Al(d)}h=h.sibling}e:for(h=null,d=e;;){if(5===d.tag){if(null===h){h=d;try{r=d.stateNode,u?"function"===typeof(s=r.style).setProperty?s.setProperty("display","none","important"):s.display="none":(l=d.stateNode,a=void 0!==(c=d.memoizedProps.style)&&null!==c&&c.hasOwnProperty("display")?c.display:null,l.style.display=fe("display",a))}catch(m){Sc(e,e.return,m)}}}else if(6===d.tag){if(null===h)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(m){Sc(e,e.return,m)}}else if((22!==d.tag&&23!==d.tag||null===d.memoizedState||d===e)&&null!==d.child){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;null===d.sibling;){if(null===d.return||d.return===e)break e;h===d&&(h=null),d=d.return}h===d&&(h=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:ml(t,e),yl(e),4&i&&fl(e);case 21:}}function yl(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(al(n)){var i=n;break e}n=n.return}throw Error(o(160))}switch(i.tag){case 5:var r=i.stateNode;32&i.flags&&(de(r,""),i.flags&=-33),ul(e,ll(e),r);break;case 3:case 4:var s=i.stateNode.containerInfo;cl(e,ll(e),s);break;default:throw Error(o(161))}}catch(a){Sc(e,e.return,a)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function Cl(e,t,n){qa=e,bl(e,t,n)}function bl(e,t,n){for(var i=0!==(1&e.mode);null!==qa;){var r=qa,o=r.child;if(22===r.tag&&i){var s=null!==r.memoizedState||Ja;if(!s){var a=r.alternate,l=null!==a&&null!==a.memoizedState||Ya;a=Ja;var c=Ya;if(Ja=s,(Ya=l)&&!c)for(qa=r;null!==qa;)l=(s=qa).child,22===s.tag&&null!==s.memoizedState?wl(r):null!==l?(l.return=s,qa=l):wl(r);for(;null!==o;)qa=o,bl(o,t,n),o=o.sibling;qa=r,Ja=a,Ya=c}Il(e)}else 0!==(8772&r.subtreeFlags)&&null!==o?(o.return=r,qa=o):Il(e)}}function Il(e){for(;null!==qa;){var t=qa;if(0!==(8772&t.flags)){var n=t.alternate;try{if(0!==(8772&t.flags))switch(t.tag){case 0:case 11:case 15:Ya||rl(5,t);break;case 1:var i=t.stateNode;if(4&t.flags&&!Ya)if(null===n)i.componentDidMount();else{var r=t.elementType===t.type?n.memoizedProps:vo(t.type,n.memoizedProps);i.componentDidUpdate(r,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;null!==s&&Fo(t,s,i);break;case 3:var a=t.updateQueue;if(null!==a){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Fo(t,a,n)}break;case 5:var l=t.stateNode;if(null===n&&4&t.flags){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var u=t.alternate;if(null!==u){var h=u.memoizedState;if(null!==h){var d=h.dehydrated;null!==d&&Gt(d)}}}break;default:throw Error(o(163))}Ya||512&t.flags&&ol(t)}catch(p){Sc(t,t.return,p)}}if(t===e){qa=null;break}if(null!==(n=t.sibling)){n.return=t.return,qa=n;break}qa=t.return}}function Al(e){for(;null!==qa;){var t=qa;if(t===e){qa=null;break}var n=t.sibling;if(null!==n){n.return=t.return,qa=n;break}qa=t.return}}function wl(e){for(;null!==qa;){var t=qa;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{rl(4,t)}catch(l){Sc(t,n,l)}break;case 1:var i=t.stateNode;if("function"===typeof i.componentDidMount){var r=t.return;try{i.componentDidMount()}catch(l){Sc(t,r,l)}}var o=t.return;try{ol(t)}catch(l){Sc(t,o,l)}break;case 5:var s=t.return;try{ol(t)}catch(l){Sc(t,s,l)}}}catch(l){Sc(t,t.return,l)}if(t===e){qa=null;break}var a=t.sibling;if(null!==a){a.return=t.return,qa=a;break}qa=t.return}}var xl,Sl=Math.ceil,kl=b.ReactCurrentDispatcher,El=b.ReactCurrentOwner,Tl=b.ReactCurrentBatchConfig,Rl=0,_l=null,$l=null,Ll=0,Nl=0,Ml=xr(0),Pl=0,Ol=null,Bl=0,Wl=0,Fl=0,Hl=null,Dl=null,Gl=0,Vl=1/0,jl=null,Zl=!1,zl=null,Kl=null,Xl=!1,Ul=null,Jl=0,Yl=0,Ql=null,ql=-1,ec=0;function tc(){return 0!==(6&Rl)?Ye():-1!==ql?ql:ql=Ye()}function nc(e){return 0===(1&e.mode)?1:0!==(2&Rl)&&0!==Ll?Ll&-Ll:null!==mo.transition?(0===ec&&(ec=ft()),ec):0!==(e=Ct)?e:e=void 0===(e=window.event)?16:Jt(e.type)}function ic(e,t,n,i){if(50<Yl)throw Yl=0,Ql=null,Error(o(185));vt(e,n,i),0!==(2&Rl)&&e===_l||(e===_l&&(0===(2&Rl)&&(Wl|=n),4===Pl&&lc(e,Ll)),rc(e,i),1===n&&0===Rl&&0===(1&t.mode)&&(Vl=Ye()+500,Fr&&Gr()))}function rc(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,i=e.pingedLanes,r=e.expirationTimes,o=e.pendingLanes;0<o;){var s=31-st(o),a=1<<s,l=r[s];-1===l?0!==(a&n)&&0===(a&i)||(r[s]=pt(a,t)):l<=t&&(e.expiredLanes|=a),o&=~a}}(e,t);var i=dt(e,e===_l?Ll:0);if(0===i)null!==n&&Xe(n),e.callbackNode=null,e.callbackPriority=0;else if(t=i&-i,e.callbackPriority!==t){if(null!=n&&Xe(n),1===t)0===e.tag?function(e){Fr=!0,Dr(e)}(cc.bind(null,e)):Dr(cc.bind(null,e)),sr((function(){0===(6&Rl)&&Gr()})),n=null;else{switch(bt(i)){case 1:n=qe;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=it}n=_c(n,oc.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function oc(e,t){if(ql=-1,ec=0,0!==(6&Rl))throw Error(o(327));var n=e.callbackNode;if(wc()&&e.callbackNode!==n)return null;var i=dt(e,e===_l?Ll:0);if(0===i)return null;if(0!==(30&i)||0!==(i&e.expiredLanes)||t)t=vc(e,i);else{t=i;var r=Rl;Rl|=2;var s=fc();for(_l===e&&Ll===t||(jl=null,Vl=Ye()+500,pc(e,t));;)try{Cc();break}catch(l){gc(e,l)}Ao(),kl.current=s,Rl=r,null!==$l?t=0:(_l=null,Ll=0,t=Pl)}if(0!==t){if(2===t&&(0!==(r=gt(e))&&(i=r,t=sc(e,r))),1===t)throw n=Ol,pc(e,0),lc(e,i),rc(e,Ye()),n;if(6===t)lc(e,i);else{if(r=e.current.alternate,0===(30&i)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var i=0;i<n.length;i++){var r=n[i],o=r.getSnapshot;r=r.value;try{if(!ai(o(),r))return!1}catch(a){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(r)&&(2===(t=vc(e,i))&&(0!==(s=gt(e))&&(i=s,t=sc(e,s))),1===t))throw n=Ol,pc(e,0),lc(e,i),rc(e,Ye()),n;switch(e.finishedWork=r,e.finishedLanes=i,t){case 0:case 1:throw Error(o(345));case 2:case 5:Ac(e,Dl,jl);break;case 3:if(lc(e,i),(130023424&i)===i&&10<(t=Gl+500-Ye())){if(0!==dt(e,0))break;if(((r=e.suspendedLanes)&i)!==i){tc(),e.pingedLanes|=e.suspendedLanes&r;break}e.timeoutHandle=ir(Ac.bind(null,e,Dl,jl),t);break}Ac(e,Dl,jl);break;case 4:if(lc(e,i),(4194240&i)===i)break;for(t=e.eventTimes,r=-1;0<i;){var a=31-st(i);s=1<<a,(a=t[a])>r&&(r=a),i&=~s}if(i=r,10<(i=(120>(i=Ye()-i)?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Sl(i/1960))-i)){e.timeoutHandle=ir(Ac.bind(null,e,Dl,jl),i);break}Ac(e,Dl,jl);break;default:throw Error(o(329))}}}return rc(e,Ye()),e.callbackNode===n?oc.bind(null,e):null}function sc(e,t){var n=Hl;return e.current.memoizedState.isDehydrated&&(pc(e,t).flags|=256),2!==(e=vc(e,t))&&(t=Dl,Dl=n,null!==t&&ac(t)),e}function ac(e){null===Dl?Dl=e:Dl.push.apply(Dl,e)}function lc(e,t){for(t&=~Fl,t&=~Wl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-st(t),i=1<<n;e[n]=-1,t&=~i}}function cc(e){if(0!==(6&Rl))throw Error(o(327));wc();var t=dt(e,0);if(0===(1&t))return rc(e,Ye()),null;var n=vc(e,t);if(0!==e.tag&&2===n){var i=gt(e);0!==i&&(t=i,n=sc(e,i))}if(1===n)throw n=Ol,pc(e,0),lc(e,t),rc(e,Ye()),n;if(6===n)throw Error(o(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ac(e,Dl,jl),rc(e,Ye()),null}function uc(e,t){var n=Rl;Rl|=1;try{return e(t)}finally{0===(Rl=n)&&(Vl=Ye()+500,Fr&&Gr())}}function hc(e){null!==Ul&&0===Ul.tag&&0===(6&Rl)&&wc();var t=Rl;Rl|=1;var n=Tl.transition,i=Ct;try{if(Tl.transition=null,Ct=1,e)return e()}finally{Ct=i,Tl.transition=n,0===(6&(Rl=t))&&Gr()}}function dc(){Nl=Ml.current,Sr(Ml)}function pc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,rr(n)),null!==$l)for(n=$l.return;null!==n;){var i=n;switch(to(i),i.tag){case 1:null!==(i=i.type.childContextTypes)&&void 0!==i&&Nr();break;case 3:os(),Sr(Rr),Sr(Tr),hs();break;case 5:as(i);break;case 4:os();break;case 13:case 19:Sr(ls);break;case 10:wo(i.type._context);break;case 22:case 23:dc()}n=n.return}if(_l=e,$l=e=Mc(e.current,null),Ll=Nl=t,Pl=0,Ol=null,Fl=Wl=Bl=0,Dl=Hl=null,null!==Eo){for(t=0;t<Eo.length;t++)if(null!==(i=(n=Eo[t]).interleaved)){n.interleaved=null;var r=i.next,o=n.pending;if(null!==o){var s=o.next;o.next=r,i.next=s}n.pending=i}Eo=null}return e}function gc(e,t){for(;;){var n=$l;try{if(Ao(),ds.current=sa,ys){for(var i=fs.memoizedState;null!==i;){var r=i.queue;null!==r&&(r.pending=null),i=i.next}ys=!1}if(gs=0,vs=ms=fs=null,Cs=!1,bs=0,El.current=null,null===n||null===n.return){Pl=1,Ol=t,$l=null;break}e:{var s=e,a=n.return,l=n,c=t;if(t=Ll,l.flags|=32768,null!==c&&"object"===typeof c&&"function"===typeof c.then){var u=c,h=l,d=h.tag;if(0===(1&h.mode)&&(0===d||11===d||15===d)){var p=h.alternate;p?(h.updateQueue=p.updateQueue,h.memoizedState=p.memoizedState,h.lanes=p.lanes):(h.updateQueue=null,h.memoizedState=null)}var g=va(a);if(null!==g){g.flags&=-257,ya(g,a,l,0,t),1&g.mode&&ma(s,u,t),c=u;var f=(t=g).updateQueue;if(null===f){var m=new Set;m.add(c),t.updateQueue=m}else f.add(c);break e}if(0===(1&t)){ma(s,u,t),mc();break e}c=Error(o(426))}else if(ro&&1&l.mode){var v=va(a);if(null!==v){0===(65536&v.flags)&&(v.flags|=256),ya(v,a,l,0,t),fo(ua(c,l));break e}}s=c=ua(c,l),4!==Pl&&(Pl=2),null===Hl?Hl=[s]:Hl.push(s),s=a;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t,Bo(s,ga(0,c,t));break e;case 1:l=c;var y=s.type,C=s.stateNode;if(0===(128&s.flags)&&("function"===typeof y.getDerivedStateFromError||null!==C&&"function"===typeof C.componentDidCatch&&(null===Kl||!Kl.has(C)))){s.flags|=65536,t&=-t,s.lanes|=t,Bo(s,fa(s,l,t));break e}}s=s.return}while(null!==s)}Ic(n)}catch(b){t=b,$l===n&&null!==n&&($l=n=n.return);continue}break}}function fc(){var e=kl.current;return kl.current=sa,null===e?sa:e}function mc(){0!==Pl&&3!==Pl&&2!==Pl||(Pl=4),null===_l||0===(268435455&Bl)&&0===(268435455&Wl)||lc(_l,Ll)}function vc(e,t){var n=Rl;Rl|=2;var i=fc();for(_l===e&&Ll===t||(jl=null,pc(e,t));;)try{yc();break}catch(r){gc(e,r)}if(Ao(),Rl=n,kl.current=i,null!==$l)throw Error(o(261));return _l=null,Ll=0,Pl}function yc(){for(;null!==$l;)bc($l)}function Cc(){for(;null!==$l&&!Ue();)bc($l)}function bc(e){var t=xl(e.alternate,e,Nl);e.memoizedProps=e.pendingProps,null===t?Ic(e):$l=t,El.current=null}function Ic(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(32768&t.flags)){if(null!==(n=Xa(n,t,Nl)))return void($l=n)}else{if(null!==(n=Ua(n,t)))return n.flags&=32767,void($l=n);if(null===e)return Pl=6,void($l=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void($l=t);$l=t=e}while(null!==t);0===Pl&&(Pl=5)}function Ac(e,t,n){var i=Ct,r=Tl.transition;try{Tl.transition=null,Ct=1,function(e,t,n,i){do{wc()}while(null!==Ul);if(0!==(6&Rl))throw Error(o(327));n=e.finishedWork;var r=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(o(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var i=e.eventTimes;for(e=e.expirationTimes;0<n;){var r=31-st(n),o=1<<r;t[r]=0,i[r]=-1,e[r]=-1,n&=~o}}(e,s),e===_l&&($l=_l=null,Ll=0),0===(2064&n.subtreeFlags)&&0===(2064&n.flags)||Xl||(Xl=!0,_c(tt,(function(){return wc(),null}))),s=0!==(15990&n.flags),0!==(15990&n.subtreeFlags)||s){s=Tl.transition,Tl.transition=null;var a=Ct;Ct=1;var l=Rl;Rl|=4,El.current=null,function(e,t){if(er=jt,pi(e=di())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var i=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(i&&0!==i.rangeCount){n=i.anchorNode;var r=i.anchorOffset,s=i.focusNode;i=i.focusOffset;try{n.nodeType,s.nodeType}catch(I){n=null;break e}var a=0,l=-1,c=-1,u=0,h=0,d=e,p=null;t:for(;;){for(var g;d!==n||0!==r&&3!==d.nodeType||(l=a+r),d!==s||0!==i&&3!==d.nodeType||(c=a+i),3===d.nodeType&&(a+=d.nodeValue.length),null!==(g=d.firstChild);)p=d,d=g;for(;;){if(d===e)break t;if(p===n&&++u===r&&(l=a),p===s&&++h===i&&(c=a),null!==(g=d.nextSibling))break;p=(d=p).parentNode}d=g}n=-1===l||-1===c?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(tr={focusedElem:e,selectionRange:n},jt=!1,qa=t;null!==qa;)if(e=(t=qa).child,0!==(1028&t.subtreeFlags)&&null!==e)e.return=t,qa=e;else for(;null!==qa;){t=qa;try{var f=t.alternate;if(0!==(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==f){var m=f.memoizedProps,v=f.memoizedState,y=t.stateNode,C=y.getSnapshotBeforeUpdate(t.elementType===t.type?m:vo(t.type,m),v);y.__reactInternalSnapshotBeforeUpdate=C}break;case 3:var b=t.stateNode.containerInfo;1===b.nodeType?b.textContent="":9===b.nodeType&&b.documentElement&&b.removeChild(b.documentElement);break;default:throw Error(o(163))}}catch(I){Sc(t,t.return,I)}if(null!==(e=t.sibling)){e.return=t.return,qa=e;break}qa=t.return}f=nl,nl=!1}(e,n),vl(n,e),gi(tr),jt=!!er,tr=er=null,e.current=n,Cl(n,e,r),Je(),Rl=l,Ct=a,Tl.transition=s}else e.current=n;if(Xl&&(Xl=!1,Ul=e,Jl=r),s=e.pendingLanes,0===s&&(Kl=null),function(e){if(ot&&"function"===typeof ot.onCommitFiberRoot)try{ot.onCommitFiberRoot(rt,e,void 0,128===(128&e.current.flags))}catch(t){}}(n.stateNode),rc(e,Ye()),null!==t)for(i=e.onRecoverableError,n=0;n<t.length;n++)r=t[n],i(r.value,{componentStack:r.stack,digest:r.digest});if(Zl)throw Zl=!1,e=zl,zl=null,e;0!==(1&Jl)&&0!==e.tag&&wc(),s=e.pendingLanes,0!==(1&s)?e===Ql?Yl++:(Yl=0,Ql=e):Yl=0,Gr()}(e,t,n,i)}finally{Tl.transition=r,Ct=i}return null}function wc(){if(null!==Ul){var e=bt(Jl),t=Tl.transition,n=Ct;try{if(Tl.transition=null,Ct=16>e?16:e,null===Ul)var i=!1;else{if(e=Ul,Ul=null,Jl=0,0!==(6&Rl))throw Error(o(331));var r=Rl;for(Rl|=4,qa=e.current;null!==qa;){var s=qa,a=s.child;if(0!==(16&qa.flags)){var l=s.deletions;if(null!==l){for(var c=0;c<l.length;c++){var u=l[c];for(qa=u;null!==qa;){var h=qa;switch(h.tag){case 0:case 11:case 15:il(8,h,s)}var d=h.child;if(null!==d)d.return=h,qa=d;else for(;null!==qa;){var p=(h=qa).sibling,g=h.return;if(sl(h),h===u){qa=null;break}if(null!==p){p.return=g,qa=p;break}qa=g}}}var f=s.alternate;if(null!==f){var m=f.child;if(null!==m){f.child=null;do{var v=m.sibling;m.sibling=null,m=v}while(null!==m)}}qa=s}}if(0!==(2064&s.subtreeFlags)&&null!==a)a.return=s,qa=a;else e:for(;null!==qa;){if(0!==(2048&(s=qa).flags))switch(s.tag){case 0:case 11:case 15:il(9,s,s.return)}var y=s.sibling;if(null!==y){y.return=s.return,qa=y;break e}qa=s.return}}var C=e.current;for(qa=C;null!==qa;){var b=(a=qa).child;if(0!==(2064&a.subtreeFlags)&&null!==b)b.return=a,qa=b;else e:for(a=C;null!==qa;){if(0!==(2048&(l=qa).flags))try{switch(l.tag){case 0:case 11:case 15:rl(9,l)}}catch(A){Sc(l,l.return,A)}if(l===a){qa=null;break e}var I=l.sibling;if(null!==I){I.return=l.return,qa=I;break e}qa=l.return}}if(Rl=r,Gr(),ot&&"function"===typeof ot.onPostCommitFiberRoot)try{ot.onPostCommitFiberRoot(rt,e)}catch(A){}i=!0}return i}finally{Ct=n,Tl.transition=t}}return!1}function xc(e,t,n){e=Po(e,t=ga(0,t=ua(n,t),1),1),t=tc(),null!==e&&(vt(e,1,t),rc(e,t))}function Sc(e,t,n){if(3===e.tag)xc(e,e,n);else for(;null!==t;){if(3===t.tag){xc(t,e,n);break}if(1===t.tag){var i=t.stateNode;if("function"===typeof t.type.getDerivedStateFromError||"function"===typeof i.componentDidCatch&&(null===Kl||!Kl.has(i))){t=Po(t,e=fa(t,e=ua(n,e),1),1),e=tc(),null!==t&&(vt(t,1,e),rc(t,e));break}}t=t.return}}function kc(e,t,n){var i=e.pingCache;null!==i&&i.delete(t),t=tc(),e.pingedLanes|=e.suspendedLanes&n,_l===e&&(Ll&n)===n&&(4===Pl||3===Pl&&(130023424&Ll)===Ll&&500>Ye()-Gl?pc(e,0):Fl|=n),rc(e,t)}function Ec(e,t){0===t&&(0===(1&e.mode)?t=1:(t=ut,0===(130023424&(ut<<=1))&&(ut=4194304)));var n=tc();null!==(e=_o(e,t))&&(vt(e,t,n),rc(e,n))}function Tc(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Ec(e,n)}function Rc(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,r=e.memoizedState;null!==r&&(n=r.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(o(314))}null!==i&&i.delete(t),Ec(e,n)}function _c(e,t){return Ke(e,t)}function $c(e,t,n,i){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Lc(e,t,n,i){return new $c(e,t,n,i)}function Nc(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Mc(e,t){var n=e.alternate;return null===n?((n=Lc(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Pc(e,t,n,i,r,s){var a=2;if(i=e,"function"===typeof e)Nc(e)&&(a=1);else if("string"===typeof e)a=5;else e:switch(e){case w:return Oc(n.children,r,s,t);case x:a=8,r|=8;break;case S:return(e=Lc(12,n,t,2|r)).elementType=S,e.lanes=s,e;case R:return(e=Lc(13,n,t,r)).elementType=R,e.lanes=s,e;case _:return(e=Lc(19,n,t,r)).elementType=_,e.lanes=s,e;case N:return Bc(n,r,s,t);default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case k:a=10;break e;case E:a=9;break e;case T:a=11;break e;case $:a=14;break e;case L:a=16,i=null;break e}throw Error(o(130,null==e?e:typeof e,""))}return(t=Lc(a,n,t,r)).elementType=e,t.type=i,t.lanes=s,t}function Oc(e,t,n,i){return(e=Lc(7,e,i,t)).lanes=n,e}function Bc(e,t,n,i){return(e=Lc(22,e,i,t)).elementType=N,e.lanes=n,e.stateNode={isHidden:!1},e}function Wc(e,t,n){return(e=Lc(6,e,null,t)).lanes=n,e}function Fc(e,t,n){return(t=Lc(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Hc(e,t,n,i,r){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=mt(0),this.expirationTimes=mt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mt(0),this.identifierPrefix=i,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function Dc(e,t,n,i,r,o,s,a,l){return e=new Hc(e,t,n,a,l),1===t?(t=1,!0===o&&(t|=8)):t=0,o=Lc(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:i,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Lo(o),e}function Gc(e){if(!e)return Er;e:{if(Ge(e=e._reactInternals)!==e||1!==e.tag)throw Error(o(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Lr(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(o(171))}if(1===e.tag){var n=e.type;if(Lr(n))return Pr(e,n,t)}return t}function Vc(e,t,n,i,r,o,s,a,l){return(e=Dc(n,i,!0,e,0,o,0,a,l)).context=Gc(null),n=e.current,(o=Mo(i=tc(),r=nc(n))).callback=void 0!==t&&null!==t?t:null,Po(n,o,r),e.current.lanes=r,vt(e,r,i),rc(e,i),e}function jc(e,t,n,i){var r=t.current,o=tc(),s=nc(r);return n=Gc(n),null===t.context?t.context=n:t.pendingContext=n,(t=Mo(o,s)).payload={element:e},null!==(i=void 0===i?null:i)&&(t.callback=i),null!==(e=Po(r,t,s))&&(ic(e,r,s,o),Oo(e,r,s)),s}function Zc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function zc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Kc(e,t){zc(e,t),(e=e.alternate)&&zc(e,t)}xl=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Rr.current)ba=!0;else{if(0===(e.lanes&n)&&0===(128&t.flags))return ba=!1,function(e,t,n){switch(t.tag){case 3:_a(t),go();break;case 5:ss(t);break;case 1:Lr(t.type)&&Or(t);break;case 4:rs(t,t.stateNode.containerInfo);break;case 10:var i=t.type._context,r=t.memoizedProps.value;kr(yo,i._currentValue),i._currentValue=r;break;case 13:if(null!==(i=t.memoizedState))return null!==i.dehydrated?(kr(ls,1&ls.current),t.flags|=128,null):0!==(n&t.child.childLanes)?Wa(e,t,n):(kr(ls,1&ls.current),null!==(e=Za(e,t,n))?e.sibling:null);kr(ls,1&ls.current);break;case 19:if(i=0!==(n&t.childLanes),0!==(128&e.flags)){if(i)return Va(e,t,n);t.flags|=128}if(null!==(r=t.memoizedState)&&(r.rendering=null,r.tail=null,r.lastEffect=null),kr(ls,ls.current),i)break;return null;case 22:case 23:return t.lanes=0,Sa(e,t,n)}return Za(e,t,n)}(e,t,n);ba=0!==(131072&e.flags)}else ba=!1,ro&&0!==(1048576&t.flags)&&qr(t,zr,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;ja(e,t),e=t.pendingProps;var r=$r(t,Tr.current);So(t,n),r=xs(null,t,i,e,r,n);var s=Ss();return t.flags|=1,"object"===typeof r&&null!==r&&"function"===typeof r.render&&void 0===r.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Lr(i)?(s=!0,Or(t)):s=!1,t.memoizedState=null!==r.state&&void 0!==r.state?r.state:null,Lo(t),r.updater=Go,t.stateNode=r,r._reactInternals=t,zo(t,i,e,n),t=Ra(null,t,i,!0,s,n)):(t.tag=0,ro&&s&&eo(t),Ia(null,t,r,n),t=t.child),t;case 16:i=t.elementType;e:{switch(ja(e,t),e=t.pendingProps,i=(r=i._init)(i._payload),t.type=i,r=t.tag=function(e){if("function"===typeof e)return Nc(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===T)return 11;if(e===$)return 14}return 2}(i),e=vo(i,e),r){case 0:t=Ea(null,t,i,e,n);break e;case 1:t=Ta(null,t,i,e,n);break e;case 11:t=Aa(null,t,i,e,n);break e;case 14:t=wa(null,t,i,vo(i.type,e),n);break e}throw Error(o(306,i,""))}return t;case 0:return i=t.type,r=t.pendingProps,Ea(e,t,i,r=t.elementType===i?r:vo(i,r),n);case 1:return i=t.type,r=t.pendingProps,Ta(e,t,i,r=t.elementType===i?r:vo(i,r),n);case 3:e:{if(_a(t),null===e)throw Error(o(387));i=t.pendingProps,r=(s=t.memoizedState).element,No(e,t),Wo(t,i,null,n);var a=t.memoizedState;if(i=a.element,s.isDehydrated){if(s={element:i,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=s,t.memoizedState=s,256&t.flags){t=$a(e,t,i,n,r=ua(Error(o(423)),t));break e}if(i!==r){t=$a(e,t,i,n,r=ua(Error(o(424)),t));break e}for(io=cr(t.stateNode.containerInfo.firstChild),no=t,ro=!0,oo=null,n=Qo(t,null,i,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(go(),i===r){t=Za(e,t,n);break e}Ia(e,t,i,n)}t=t.child}return t;case 5:return ss(t),null===e&&co(t),i=t.type,r=t.pendingProps,s=null!==e?e.memoizedProps:null,a=r.children,nr(i,r)?a=null:null!==s&&nr(i,s)&&(t.flags|=32),ka(e,t),Ia(e,t,a,n),t.child;case 6:return null===e&&co(t),null;case 13:return Wa(e,t,n);case 4:return rs(t,t.stateNode.containerInfo),i=t.pendingProps,null===e?t.child=Yo(t,null,i,n):Ia(e,t,i,n),t.child;case 11:return i=t.type,r=t.pendingProps,Aa(e,t,i,r=t.elementType===i?r:vo(i,r),n);case 7:return Ia(e,t,t.pendingProps,n),t.child;case 8:case 12:return Ia(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(i=t.type._context,r=t.pendingProps,s=t.memoizedProps,a=r.value,kr(yo,i._currentValue),i._currentValue=a,null!==s)if(ai(s.value,a)){if(s.children===r.children&&!Rr.current){t=Za(e,t,n);break e}}else for(null!==(s=t.child)&&(s.return=t);null!==s;){var l=s.dependencies;if(null!==l){a=s.child;for(var c=l.firstContext;null!==c;){if(c.context===i){if(1===s.tag){(c=Mo(-1,n&-n)).tag=2;var u=s.updateQueue;if(null!==u){var h=(u=u.shared).pending;null===h?c.next=c:(c.next=h.next,h.next=c),u.pending=c}}s.lanes|=n,null!==(c=s.alternate)&&(c.lanes|=n),xo(s.return,n,t),l.lanes|=n;break}c=c.next}}else if(10===s.tag)a=s.type===t.type?null:s.child;else if(18===s.tag){if(null===(a=s.return))throw Error(o(341));a.lanes|=n,null!==(l=a.alternate)&&(l.lanes|=n),xo(a,n,t),a=s.sibling}else a=s.child;if(null!==a)a.return=s;else for(a=s;null!==a;){if(a===t){a=null;break}if(null!==(s=a.sibling)){s.return=a.return,a=s;break}a=a.return}s=a}Ia(e,t,r.children,n),t=t.child}return t;case 9:return r=t.type,i=t.pendingProps.children,So(t,n),i=i(r=ko(r)),t.flags|=1,Ia(e,t,i,n),t.child;case 14:return r=vo(i=t.type,t.pendingProps),wa(e,t,i,r=vo(i.type,r),n);case 15:return xa(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,r=t.pendingProps,r=t.elementType===i?r:vo(i,r),ja(e,t),t.tag=1,Lr(i)?(e=!0,Or(t)):e=!1,So(t,n),jo(t,i,r),zo(t,i,r,n),Ra(null,t,i,!0,e,n);case 19:return Va(e,t,n);case 22:return Sa(e,t,n)}throw Error(o(156,t.tag))};var Xc="function"===typeof reportError?reportError:function(e){console.error(e)};function Uc(e){this._internalRoot=e}function Jc(e){this._internalRoot=e}function Yc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Qc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function qc(){}function eu(e,t,n,i,r){var o=n._reactRootContainer;if(o){var s=o;if("function"===typeof r){var a=r;r=function(){var e=Zc(s);a.call(e)}}jc(t,s,e,r)}else s=function(e,t,n,i,r){if(r){if("function"===typeof i){var o=i;i=function(){var e=Zc(s);o.call(e)}}var s=Vc(t,i,e,0,null,!1,0,"",qc);return e._reactRootContainer=s,e[gr]=s.current,Gi(8===e.nodeType?e.parentNode:e),hc(),s}for(;r=e.lastChild;)e.removeChild(r);if("function"===typeof i){var a=i;i=function(){var e=Zc(l);a.call(e)}}var l=Dc(e,0,!1,null,0,!1,0,"",qc);return e._reactRootContainer=l,e[gr]=l.current,Gi(8===e.nodeType?e.parentNode:e),hc((function(){jc(t,l,n,i)})),l}(n,t,e,r,i);return Zc(s)}Jc.prototype.render=Uc.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(o(409));jc(e,t,null,null)},Jc.prototype.unmount=Uc.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;hc((function(){jc(null,e,null,null)})),t[gr]=null}},Jc.prototype.unstable_scheduleHydration=function(e){if(e){var t=xt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Nt.length&&0!==t&&t<Nt[n].priority;n++);Nt.splice(n,0,e),0===n&&Bt(e)}},It=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ht(t.pendingLanes);0!==n&&(yt(t,1|n),rc(t,Ye()),0===(6&Rl)&&(Vl=Ye()+500,Gr()))}break;case 13:hc((function(){var t=_o(e,1);if(null!==t){var n=tc();ic(t,e,1,n)}})),Kc(e,1)}},At=function(e){if(13===e.tag){var t=_o(e,134217728);if(null!==t)ic(t,e,134217728,tc());Kc(e,134217728)}},wt=function(e){if(13===e.tag){var t=nc(e),n=_o(e,t);if(null!==n)ic(n,e,t,tc());Kc(e,t)}},xt=function(){return Ct},St=function(e,t){var n=Ct;try{return Ct=e,t()}finally{Ct=n}},Ae=function(e,t,n){switch(t){case"input":if(Q(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var r=Ir(i);if(!r)throw Error(o(90));K(i),Q(i,r)}}}break;case"textarea":oe(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Te=uc,Re=hc;var tu={usingClientEntryPoint:!1,Events:[Cr,br,Ir,ke,Ee,uc]},nu={findFiberByHostInstance:yr,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},iu={bundleType:nu.bundleType,version:nu.version,rendererPackageName:nu.rendererPackageName,rendererConfig:nu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:b.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ze(e))?null:e.stateNode},findFiberByHostInstance:nu.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var ru=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ru.isDisabled&&ru.supportsFiber)try{rt=ru.inject(iu),ot=ru}catch(ue){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tu,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Yc(t))throw Error(o(200));return function(e,t,n){var i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:A,key:null==i?null:""+i,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.createRoot=function(e,t){if(!Yc(e))throw Error(o(299));var n=!1,i="",r=Xc;return null!==t&&void 0!==t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(i=t.identifierPrefix),void 0!==t.onRecoverableError&&(r=t.onRecoverableError)),t=Dc(e,1,!1,null,0,n,0,i,r),e[gr]=t.current,Gi(8===e.nodeType?e.parentNode:e),new Uc(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(o(188));throw e=Object.keys(e).join(","),Error(o(268,e))}return e=null===(e=Ze(t))?null:e.stateNode},t.flushSync=function(e){return hc(e)},t.hydrate=function(e,t,n){if(!Qc(t))throw Error(o(200));return eu(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Yc(e))throw Error(o(405));var i=null!=n&&n.hydratedSources||null,r=!1,s="",a=Xc;if(null!==n&&void 0!==n&&(!0===n.unstable_strictMode&&(r=!0),void 0!==n.identifierPrefix&&(s=n.identifierPrefix),void 0!==n.onRecoverableError&&(a=n.onRecoverableError)),t=Vc(t,null,e,1,null!=n?n:null,r,0,s,a),e[gr]=t.current,Gi(e),i)for(e=0;e<i.length;e++)r=(r=(n=i[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,r]:t.mutableSourceEagerHydrationData.push(n,r);return new Jc(t)},t.render=function(e,t,n){if(!Qc(t))throw Error(o(200));return eu(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Qc(e))throw Error(o(40));return!!e._reactRootContainer&&(hc((function(){eu(null,null,e,!1,(function(){e._reactRootContainer=null,e[gr]=null}))})),!0)},t.unstable_batchedUpdates=uc,t.unstable_renderSubtreeIntoContainer=function(e,t,n,i){if(!Qc(n))throw Error(o(200));if(null==e||void 0===e._reactInternals)throw Error(o(38));return eu(e,t,n,!1,i)},t.version="18.2.0-next-9e3b772b8-20220608"},250:function(e,t,n){"use strict";var i=n(164);t.createRoot=i.createRoot,t.hydrateRoot=i.hydrateRoot},164:function(e,t,n){"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(463)},374:function(e,t,n){"use strict";var i=n(791),r=Symbol.for("react.element"),o=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,a=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var i,o={},c=null,u=null;for(i in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)s.call(t,i)&&!l.hasOwnProperty(i)&&(o[i]=t[i]);if(e&&e.defaultProps)for(i in t=e.defaultProps)void 0===o[i]&&(o[i]=t[i]);return{$$typeof:r,type:e,key:c,ref:u,props:o,_owner:a.current}}t.Fragment=o,t.jsx=c,t.jsxs=c},117:function(e,t){"use strict";var n=Symbol.for("react.element"),i=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),p=Symbol.iterator;var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},f=Object.assign,m={};function v(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||g}function y(){}function C(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||g}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=v.prototype;var b=C.prototype=new y;b.constructor=C,f(b,v.prototype),b.isPureReactComponent=!0;var I=Array.isArray,A=Object.prototype.hasOwnProperty,w={current:null},x={key:!0,ref:!0,__self:!0,__source:!0};function S(e,t,i){var r,o={},s=null,a=null;if(null!=t)for(r in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(s=""+t.key),t)A.call(t,r)&&!x.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(1===l)o.children=i;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];o.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps)void 0===o[r]&&(o[r]=l[r]);return{$$typeof:n,type:e,key:s,ref:a,props:o,_owner:w.current}}function k(e){return"object"===typeof e&&null!==e&&e.$$typeof===n}var E=/\/+/g;function T(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function R(e,t,r,o,s){var a=typeof e;"undefined"!==a&&"boolean"!==a||(e=null);var l=!1;if(null===e)l=!0;else switch(a){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case n:case i:l=!0}}if(l)return s=s(l=e),e=""===o?"."+T(l,0):o,I(s)?(r="",null!=e&&(r=e.replace(E,"$&/")+"/"),R(s,t,r,"",(function(e){return e}))):null!=s&&(k(s)&&(s=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(s,r+(!s.key||l&&l.key===s.key?"":(""+s.key).replace(E,"$&/")+"/")+e)),t.push(s)),1;if(l=0,o=""===o?".":o+":",I(e))for(var c=0;c<e.length;c++){var u=o+T(a=e[c],c);l+=R(a,t,r,u,s)}else if(u=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=p&&e[p]||e["@@iterator"])?e:null}(e),"function"===typeof u)for(e=u.call(e),c=0;!(a=e.next()).done;)l+=R(a=a.value,t,r,u=o+T(a,c++),s);else if("object"===a)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function _(e,t,n){if(null==e)return e;var i=[],r=0;return R(e,i,"","",(function(e){return t.call(n,e,r++)})),i}function $(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var L={current:null},N={transition:null},M={ReactCurrentDispatcher:L,ReactCurrentBatchConfig:N,ReactCurrentOwner:w};t.Children={map:_,forEach:function(e,t,n){_(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return _(e,(function(){t++})),t},toArray:function(e){return _(e,(function(e){return e}))||[]},only:function(e){if(!k(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=v,t.Fragment=r,t.Profiler=s,t.PureComponent=C,t.StrictMode=o,t.Suspense=u,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=M,t.cloneElement=function(e,t,i){if(null===e||void 0===e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=f({},e.props),o=e.key,s=e.ref,a=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,a=w.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)A.call(t,c)&&!x.hasOwnProperty(c)&&(r[c]=void 0===t[c]&&void 0!==l?l[c]:t[c])}var c=arguments.length-2;if(1===c)r.children=i;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:n,type:e.type,key:o,ref:s,props:r,_owner:a}},t.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},t.createElement=S,t.createFactory=function(e){var t=S.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:c,render:e}},t.isValidElement=k,t.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:$}},t.memo=function(e,t){return{$$typeof:h,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=N.transition;N.transition={};try{e()}finally{N.transition=t}},t.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},t.useCallback=function(e,t){return L.current.useCallback(e,t)},t.useContext=function(e){return L.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return L.current.useDeferredValue(e)},t.useEffect=function(e,t){return L.current.useEffect(e,t)},t.useId=function(){return L.current.useId()},t.useImperativeHandle=function(e,t,n){return L.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return L.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return L.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return L.current.useMemo(e,t)},t.useReducer=function(e,t,n){return L.current.useReducer(e,t,n)},t.useRef=function(e){return L.current.useRef(e)},t.useState=function(e){return L.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return L.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return L.current.useTransition()},t.version="18.2.0"},791:function(e,t,n){"use strict";e.exports=n(117)},184:function(e,t,n){"use strict";e.exports=n(374)},813:function(e,t){"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var i=n-1>>>1,r=e[i];if(!(0<o(r,t)))break e;e[i]=t,e[n]=r,n=i}}function i(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var i=0,r=e.length,s=r>>>1;i<s;){var a=2*(i+1)-1,l=e[a],c=a+1,u=e[c];if(0>o(l,n))c<r&&0>o(u,l)?(e[i]=u,e[c]=n,i=c):(e[i]=l,e[a]=n,i=a);else{if(!(c<r&&0>o(u,n)))break e;e[i]=u,e[c]=n,i=c}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"===typeof performance&&"function"===typeof performance.now){var s=performance;t.unstable_now=function(){return s.now()}}else{var a=Date,l=a.now();t.unstable_now=function(){return a.now()-l}}var c=[],u=[],h=1,d=null,p=3,g=!1,f=!1,m=!1,v="function"===typeof setTimeout?setTimeout:null,y="function"===typeof clearTimeout?clearTimeout:null,C="undefined"!==typeof setImmediate?setImmediate:null;function b(e){for(var t=i(u);null!==t;){if(null===t.callback)r(u);else{if(!(t.startTime<=e))break;r(u),t.sortIndex=t.expirationTime,n(c,t)}t=i(u)}}function I(e){if(m=!1,b(e),!f)if(null!==i(c))f=!0,N(A);else{var t=i(u);null!==t&&M(I,t.startTime-e)}}function A(e,n){f=!1,m&&(m=!1,y(k),k=-1),g=!0;var o=p;try{for(b(n),d=i(c);null!==d&&(!(d.expirationTime>n)||e&&!R());){var s=d.callback;if("function"===typeof s){d.callback=null,p=d.priorityLevel;var a=s(d.expirationTime<=n);n=t.unstable_now(),"function"===typeof a?d.callback=a:d===i(c)&&r(c),b(n)}else r(c);d=i(c)}if(null!==d)var l=!0;else{var h=i(u);null!==h&&M(I,h.startTime-n),l=!1}return l}finally{d=null,p=o,g=!1}}"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var w,x=!1,S=null,k=-1,E=5,T=-1;function R(){return!(t.unstable_now()-T<E)}function _(){if(null!==S){var e=t.unstable_now();T=e;var n=!0;try{n=S(!0,e)}finally{n?w():(x=!1,S=null)}}else x=!1}if("function"===typeof C)w=function(){C(_)};else if("undefined"!==typeof MessageChannel){var $=new MessageChannel,L=$.port2;$.port1.onmessage=_,w=function(){L.postMessage(null)}}else w=function(){v(_,0)};function N(e){S=e,x||(x=!0,w())}function M(e,n){k=v((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){f||g||(f=!0,N(A))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):E=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return i(c)},t.unstable_next=function(e){switch(p){case 1:case 2:case 3:var t=3;break;default:t=p}var n=p;p=t;try{return e()}finally{p=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=p;p=e;try{return t()}finally{p=n}},t.unstable_scheduleCallback=function(e,r,o){var s=t.unstable_now();switch("object"===typeof o&&null!==o?o="number"===typeof(o=o.delay)&&0<o?s+o:s:o=s,e){case 1:var a=-1;break;case 2:a=250;break;case 5:a=1073741823;break;case 4:a=1e4;break;default:a=5e3}return e={id:h++,callback:r,priorityLevel:e,startTime:o,expirationTime:a=o+a,sortIndex:-1},o>s?(e.sortIndex=o,n(u,e),null===i(c)&&e===i(u)&&(m?(y(k),k=-1):m=!0,M(I,o-s))):(e.sortIndex=a,n(c,e),f||g||(f=!0,N(A))),e},t.unstable_shouldYield=R,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}},296:function(e,t,n){"use strict";e.exports=n(813)}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var o=t[i]={exports:{}};return e[i].call(o.exports,o,o.exports,n),o.exports}n.m=e,n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.f={},n.e=function(e){return Promise.all(Object.keys(n.f).reduce((function(t,i){return n.f[i](e,t),t}),[]))},n.u=function(e){return"static/js/"+e+".1ad89818.chunk.js"},n.miniCssF=function(e){},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={},t="@colyseus/playground:";n.l=function(i,r,o,s){if(e[i])e[i].push(r);else{var a,l;if(void 0!==o)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var h=c[u];if(h.getAttribute("src")==i||h.getAttribute("data-webpack")==t+o){a=h;break}}a||(l=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,n.nc&&a.setAttribute("nonce",n.nc),a.setAttribute("data-webpack",t+o),a.src=i),e[i]=[r];var d=function(t,n){a.onerror=a.onload=null,clearTimeout(p);var r=e[i];if(delete e[i],a.parentNode&&a.parentNode.removeChild(a),r&&r.forEach((function(e){return e(n)})),t)return t(n)},p=setTimeout(d.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=d.bind(null,a.onerror),a.onload=d.bind(null,a.onload),l&&document.head.appendChild(a)}}}(),n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.p="./",function(){var e={179:0};n.f.j=function(t,i){var r=n.o(e,t)?e[t]:void 0;if(0!==r)if(r)i.push(r[2]);else{var o=new Promise((function(n,i){r=e[t]=[n,i]}));i.push(r[2]=o);var s=n.p+n.u(t),a=new Error;n.l(s,(function(i){if(n.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=i&&("load"===i.type?"missing":i.type),s=i&&i.target&&i.target.src;a.message="Loading chunk "+t+" failed.\n("+o+": "+s+")",a.name="ChunkLoadError",a.type=o,a.request=s,r[1](a)}}),"chunk-"+t,t)}};var t=function(t,i){var r,o,s=i[0],a=i[1],l=i[2],c=0;if(s.some((function(t){return 0!==e[t]}))){for(r in a)n.o(a,r)&&(n.m[r]=a[r]);if(l)l(n)}for(t&&t(i);c<s.length;c++)o=s[c],n.o(e,o)&&e[o]&&e[o][0](),e[o]=0},i=self.webpackChunk_colyseus_playground=self.webpackChunk_colyseus_playground||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))}(),function(){"use strict";var e,t=n(791),i=n(250);function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function o(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function s(e,t){if(e){if("string"===typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}function a(e){return function(e){if(Array.isArray(e))return r(e)}(e)||o(e)||s(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function u(e){var t=function(e,t){if("object"!==c(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==c(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===c(t)?t:String(t)}function h(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,u(i.key),i)}}function d(e,t,n){return t&&h(e.prototype,t),n&&h(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function g(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function m(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function v(e,t){if(t&&("object"===c(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function y(e){var t=m();return function(){var n,i=f(e);if(t){var r=f(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return v(this,n)}}function C(e,t,n){return C=m()?Reflect.construct.bind():function(e,t,n){var i=[null];i.push.apply(i,t);var r=new(Function.bind.apply(e,i));return n&&p(r,n.prototype),r},C.apply(null,arguments)}function b(e){var t="function"===typeof Map?new Map:void 0;return b=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,i)}function i(){return C(e,arguments,f(this).constructor)}return i.prototype=Object.create(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),p(i,e)},b(e)}function I(e){if(Array.isArray(e))return e}function A(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function w(e,t){return I(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=o.call(n)).done)&&(a.push(i.value),a.length!==t);l=!0);}catch(u){c=!0,r=u}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw r}}return a}}(e,t)||s(e,t)||A()}function x(){return x=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},x.apply(this,arguments)}!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(e||(e={}));var S,k="popstate";function E(e,t){if(!1===e||null===e||"undefined"===typeof e)throw new Error(t)}function T(e,t){if(!e){"undefined"!==typeof console&&console.warn(t);try{throw new Error(t)}catch(n){}}}function R(e,t){return{usr:e.state,key:e.key,idx:t}}function _(e,t,n,i){return void 0===n&&(n=null),x({pathname:"string"===typeof e?e:e.pathname,search:"",hash:""},"string"===typeof t?L(t):t,{state:n,key:t&&t.key||i||Math.random().toString(36).substr(2,8)})}function $(e){var t=e.pathname,n=void 0===t?"/":t,i=e.search,r=void 0===i?"":i,o=e.hash,s=void 0===o?"":o;return r&&"?"!==r&&(n+="?"===r.charAt(0)?r:"?"+r),s&&"#"!==s&&(n+="#"===s.charAt(0)?s:"#"+s),n}function L(e){var t={};if(e){var n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));var i=e.indexOf("?");i>=0&&(t.search=e.substr(i),e=e.substr(0,i)),e&&(t.pathname=e)}return t}function N(t,n,i,r){void 0===r&&(r={});var o=r,s=o.window,a=void 0===s?document.defaultView:s,l=o.v5Compat,c=void 0!==l&&l,u=a.history,h=e.Pop,d=null,p=g();function g(){return(u.state||{idx:null}).idx}function f(){h=e.Pop;var t=g(),n=null==t?null:t-p;p=t,d&&d({action:h,location:v.location,delta:n})}function m(e){var t="null"!==a.location.origin?a.location.origin:a.location.href,n="string"===typeof e?e:$(e);return E(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==p&&(p=0,u.replaceState(x({},u.state,{idx:p}),""));var v={get action(){return h},get location(){return t(a,u)},listen:function(e){if(d)throw new Error("A history only accepts one active listener");return a.addEventListener(k,f),d=e,function(){a.removeEventListener(k,f),d=null}},createHref:function(e){return n(a,e)},createURL:m,encodeLocation:function(e){var t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(t,n){h=e.Push;var r=_(v.location,t,n);i&&i(r,t);var o=R(r,p=g()+1),s=v.createHref(r);try{u.pushState(o,"",s)}catch(l){a.location.assign(s)}c&&d&&d({action:h,location:v.location,delta:1})},replace:function(t,n){h=e.Replace;var r=_(v.location,t,n);i&&i(r,t);var o=R(r,p=g()),s=v.createHref(r);u.replaceState(o,"",s),c&&d&&d({action:h,location:v.location,delta:0})},go:function(e){return u.go(e)}};return v}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(S||(S={}));new Set(["lazy","caseSensitive","path","id","index","children"]);function M(e,t,n){void 0===n&&(n="/");var i=X(("string"===typeof t?L(t):t).pathname||"/",n);if(null==i)return null;var r=P(e);!function(e){e.sort((function(e,t){return e.score!==t.score?t.score-e.score:function(e,t){var n=e.length===t.length&&e.slice(0,-1).every((function(e,n){return e===t[n]}));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((function(e){return e.childrenIndex})),t.routesMeta.map((function(e){return e.childrenIndex})))}))}(r);for(var o=null,s=0;null==o&&s<r.length;++s)o=Z(r[s],K(i));return o}function P(e,t,n,i){void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===i&&(i="");var r=function(e,r,o){var s={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:r,route:e};s.relativePath.startsWith("/")&&(E(s.relativePath.startsWith(i),'Absolute route path "'+s.relativePath+'" nested under path "'+i+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),s.relativePath=s.relativePath.slice(i.length));var a=U([i,s.relativePath]),l=n.concat(s);e.children&&e.children.length>0&&(E(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+a+'".'),P(e.children,t,l,a)),(null!=e.path||e.index)&&t.push({path:a,score:j(a,e.index),routesMeta:l})};return e.forEach((function(e,t){var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?")){var i,o=function(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=s(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw o}}}}(O(e.path));try{for(o.s();!(i=o.n()).done;){var a=i.value;r(e,t,a)}}catch(l){o.e(l)}finally{o.f()}}else r(e,t)})),t}function O(e){var t=e.split("/");if(0===t.length)return[];var n,i=I(n=t)||o(n)||s(n)||A(),r=i[0],l=i.slice(1),c=r.endsWith("?"),u=r.replace(/\?$/,"");if(0===l.length)return c?[u,""]:[u];var h=O(l.join("/")),d=[];return d.push.apply(d,a(h.map((function(e){return""===e?u:[u,e].join("/")})))),c&&d.push.apply(d,a(h)),d.map((function(t){return e.startsWith("/")&&""===t?"/":t}))}var B=/^:\w+$/,W=3,F=2,H=1,D=10,G=-2,V=function(e){return"*"===e};function j(e,t){var n=e.split("/"),i=n.length;return n.some(V)&&(i+=G),t&&(i+=F),n.filter((function(e){return!V(e)})).reduce((function(e,t){return e+(B.test(t)?W:""===t?H:D)}),i)}function Z(e,t){for(var n=e.routesMeta,i={},r="/",o=[],s=0;s<n.length;++s){var a=n[s],l=s===n.length-1,c="/"===r?t:t.slice(r.length)||"/",u=z({path:a.relativePath,caseSensitive:a.caseSensitive,end:l},c);if(!u)return null;Object.assign(i,u.params);var h=a.route;o.push({params:i,pathname:U([r,u.pathname]),pathnameBase:J(U([r,u.pathnameBase])),route:h}),"/"!==u.pathnameBase&&(r=U([r,u.pathnameBase]))}return o}function z(e,t){"string"===typeof e&&(e={path:e,caseSensitive:!1,end:!0});var n=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=!0);T("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');var i=[],r="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(function(e,t){return i.push(t),"/([^\\/]+)"}));e.endsWith("*")?(i.push("*"),r+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?r+="\\/*$":""!==e&&"/"!==e&&(r+="(?:(?=\\/|$))");var o=new RegExp(r,t?void 0:"i");return[o,i]}(e.path,e.caseSensitive,e.end),i=w(n,2),r=i[0],o=i[1],s=t.match(r);if(!s)return null;var a=s[0],l=a.replace(/(.)\/+$/,"$1"),c=s.slice(1);return{params:o.reduce((function(e,t,n){if("*"===t){var i=c[n]||"";l=a.slice(0,a.length-i.length).replace(/(.)\/+$/,"$1")}return e[t]=function(e,t){try{return decodeURIComponent(e)}catch(n){return T(!1,'The value for the URL param "'+t+'" will not be decoded because the string "'+e+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+n+")."),e}}(c[n]||"",t),e}),{}),pathname:a,pathnameBase:l,pattern:e}}function K(e){try{return decodeURI(e)}catch(t){return T(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function X(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;var n=t.endsWith("/")?t.length-1:t.length,i=e.charAt(n);return i&&"/"!==i?null:e.slice(n)||"/"}var U=function(e){return e.join("/").replace(/\/\/+/g,"/")},J=function(e){return e.replace(/\/+$/,"").replace(/^\/*/,"/")},Y=function(e){g(n,e);var t=y(n);function n(){return l(this,n),t.apply(this,arguments)}return d(n)}(b(Error));function Q(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}var q=["post","put","patch","delete"],ee=(new Set(q),["get"].concat(q));new Set(ee),new Set([301,302,303,307,308]),new Set([307,308]),"undefined"!==typeof window&&"undefined"!==typeof window.document&&window.document.createElement;Symbol("deferred");function te(){return te=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},te.apply(this,arguments)}var ne=t.createContext(null);var ie=t.createContext(null);var re=t.createContext(null);var oe=t.createContext(null);var se=t.createContext(null);var ae=t.createContext({outlet:null,matches:[],isDataRoute:!1});var le=t.createContext(null);function ce(){return null!=t.useContext(se)}function ue(){return ce()||E(!1),t.useContext(se).location}function he(n,i,r){ce()||E(!1);var o,s=t.useContext(oe).navigator,a=t.useContext(ae).matches,l=a[a.length-1],c=l?l.params:{},u=(l&&l.pathname,l?l.pathnameBase:"/"),h=(l&&l.route,ue());if(i){var d,p="string"===typeof i?L(i):i;"/"===u||(null==(d=p.pathname)?void 0:d.startsWith(u))||E(!1),o=p}else o=h;var g=o.pathname||"/",f=M(n,{pathname:"/"===u?g:g.slice(u.length)||"/"});var m=ye(f&&f.map((function(e){return Object.assign({},e,{params:Object.assign({},c,e.params),pathname:U([u,s.encodeLocation?s.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?u:U([u,s.encodeLocation?s.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})})),a,r);return i&&m?t.createElement(se.Provider,{value:{location:te({pathname:"/",search:"",hash:"",state:null,key:"default"},o),navigationType:e.Pop}},m):m}function de(){var e=function(){var e,n=t.useContext(le),i=Ce(ge.UseRouteError),r=be(ge.UseRouteError);if(n)return n;return null==(e=i.errors)?void 0:e[r]}(),n=Q(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),i=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r};return t.createElement(t.Fragment,null,t.createElement("h2",null,"Unexpected Application Error!"),t.createElement("h3",{style:{fontStyle:"italic"}},n),i?t.createElement("pre",{style:o},i):null,null)}var pe,ge,fe=t.createElement(de,null),me=function(e){g(i,e);var n=y(i);function i(e){var t;return l(this,i),(t=n.call(this,e)).state={location:e.location,revalidation:e.revalidation,error:e.error},t}return d(i,[{key:"componentDidCatch",value:function(e,t){console.error("React Router caught the following error during render",e,t)}},{key:"render",value:function(){return this.state.error?t.createElement(ae.Provider,{value:this.props.routeContext},t.createElement(le.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{error:e}}},{key:"getDerivedStateFromProps",value:function(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error||t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}}]),i}(t.Component);function ve(e){var n=e.routeContext,i=e.match,r=e.children,o=t.useContext(ne);return o&&o.static&&o.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=i.route.id),t.createElement(ae.Provider,{value:n},r)}function ye(e,n,i){var r;if(void 0===n&&(n=[]),void 0===i&&(i=null),null==e){var o;if(null==(o=i)||!o.errors)return null;e=i.matches}var s=e,a=null==(r=i)?void 0:r.errors;if(null!=a){var l=s.findIndex((function(e){return e.route.id&&(null==a?void 0:a[e.route.id])}));l>=0||E(!1),s=s.slice(0,Math.min(s.length,l+1))}return s.reduceRight((function(e,r,o){var l=r.route.id?null==a?void 0:a[r.route.id]:null,c=null;i&&(c=r.route.errorElement||fe);var u=n.concat(s.slice(0,o+1)),h=function(){var n;return n=l?c:r.route.Component?t.createElement(r.route.Component,null):r.route.element?r.route.element:e,t.createElement(ve,{match:r,routeContext:{outlet:e,matches:u,isDataRoute:null!=i},children:n})};return i&&(r.route.ErrorBoundary||r.route.errorElement||0===o)?t.createElement(me,{location:i.location,revalidation:i.revalidation,component:c,error:l,children:h(),routeContext:{outlet:null,matches:u,isDataRoute:!0}}):h()}),null)}function Ce(e){var n=t.useContext(ie);return n||E(!1),n}function be(e){var n=function(e){var n=t.useContext(ae);return n||E(!1),n}(),i=n.matches[n.matches.length-1];return i.route.id||E(!1),i.route.id}!function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"}(pe||(pe={})),function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId"}(ge||(ge={}));var Ie;function Ae(e){E(!1)}function we(n){var i=n.basename,r=void 0===i?"/":i,o=n.children,s=void 0===o?null:o,a=n.location,l=n.navigationType,c=void 0===l?e.Pop:l,u=n.navigator,h=n.static,d=void 0!==h&&h;ce()&&E(!1);var p=r.replace(/^\/*/,"/"),g=t.useMemo((function(){return{basename:p,navigator:u,static:d}}),[p,u,d]);"string"===typeof a&&(a=L(a));var f=a,m=f.pathname,v=void 0===m?"/":m,y=f.search,C=void 0===y?"":y,b=f.hash,I=void 0===b?"":b,A=f.state,w=void 0===A?null:A,x=f.key,S=void 0===x?"default":x,k=t.useMemo((function(){var e=X(v,p);return null==e?null:{location:{pathname:e,search:C,hash:I,state:w,key:S},navigationType:c}}),[p,v,C,I,w,S,c]);return null==k?null:t.createElement(oe.Provider,{value:g},t.createElement(se.Provider,{children:s,value:k}))}function xe(e){var t=e.children,n=e.location;return function(e,t){return he(e,t)}(ke(t),n)}!function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"}(Ie||(Ie={}));var Se=new Promise((function(){}));t.Component;function ke(e,n){void 0===n&&(n=[]);var i=[];return t.Children.forEach(e,(function(e,r){if(t.isValidElement(e)){var o=[].concat(a(n),[r]);if(e.type!==t.Fragment){e.type!==Ae&&E(!1),e.props.index&&e.props.children&&E(!1);var s={id:e.props.id||o.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(s.children=ke(e.props.children,o)),i.push(s)}else i.push.apply(i,ke(e.props.children,o))}})),i}var Ee=n.p+"static/media/favicon.cad7290b5f48941db9f836712c091ae7.svg";function Te(){Te=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",s=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(R){l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof p?t:p,s=Object.create(o.prototype),a=new k(r||[]);return i(s,"_invoke",{value:A(e,n,a)}),s}function h(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(R){return{type:"throw",arg:R}}}e.wrap=u;var d={};function p(){}function g(){}function f(){}var m={};l(m,o,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(E([])));y&&y!==t&&n.call(y,o)&&(m=y);var C=f.prototype=p.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function I(e,t){function r(i,o,s,a){var l=h(e[i],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==c(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,s,a)}),(function(e){r("throw",e,s,a)})):t.resolve(d).then((function(e){u.value=e,s(u)}),(function(e){return r("throw",e,s,a)}))}a(l.arg)}var o;i(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,i){r(e,n,t,i)}))}return o=o?o.then(i,i):i()}})}function A(e,t,n){var i="suspendedStart";return function(r,o){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===r)throw o;return T()}for(n.method=r,n.arg=o;;){var s=n.delegate;if(s){var a=w(s,n);if(a){if(a===d)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===i)throw i="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i="executing";var l=h(e,t,n);if("normal"===l.type){if(i=n.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(i="completed",n.method="throw",n.arg=l.arg)}}}function w(e,t){var n=t.method,i=e.iterator[n];if(void 0===i)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var r=h(i,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,d;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function E(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,r=function t(){for(;++i<e.length;)if(n.call(e,i))return t.value=e[i],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:T}}function T(){return{value:void 0,done:!0}}return g.prototype=f,i(C,"constructor",{value:f,configurable:!0}),i(f,"constructor",{value:g,configurable:!0}),g.displayName=l(f,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,l(e,a,"GeneratorFunction")),e.prototype=Object.create(C),e},e.awrap=function(e){return{__await:e}},b(I.prototype),l(I.prototype,s,(function(){return this})),e.AsyncIterator=I,e.async=function(t,n,i,r,o){void 0===o&&(o=Promise);var s=new I(u(t,n,i,r),o);return e.isGeneratorFunction(n)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},b(C),l(C,a,"Generator"),l(C,o,(function(){return this})),l(C,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var i in t)n.push(i);return n.reverse(),function e(){for(;n.length;){var i=n.pop();if(i in t)return e.value=i,e.done=!1,e}return e.done=!0,e}},e.values=E,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function i(n,i){return s.type="throw",s.arg=e,t.next=n,i&&(t.method="next",t.arg=void 0),!!i}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var a=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(a&&l){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var i=this.tryEntries.length-1;i>=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=e,s.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),S(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var r=i.arg;S(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},e}function Re(e,t,n,i,r,o,s){try{var a=e[o](s),l=a.value}catch(c){return void n(c)}a.done?t(l):Promise.resolve(l).then(i,r)}function _e(e){return function(){var t=this,n=arguments;return new Promise((function(i,r){var o=e.apply(t,n);function s(e){Re(o,i,r,s,a,"next",e)}function a(e){Re(o,i,r,s,a,"throw",e)}s(void 0)}))}}function $e(e,t,n){return(t=u(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Le=n(366),Ne="http://localhost:2567",Me=new Le.Client(Ne),Pe={connections:[]},Oe={},Be={},We=-1,Fe=["cyan","blue","violet","fuchsia","green","rose"];function He(e){return De[e]||(We>=Fe.length&&(We=0),De[e]=Fe[We],We++),"bg-"+De[e]+"-800"}var De={},Ge={joinOrCreate:"Join or Create",create:"Create",join:"Join",joinById:"Join by ID"},Ve=n(184);function je(e){var t=e.date;return(0,Ve.jsxs)(Ve.Fragment,{children:[String(t.getHours()).padStart(2,"0"),":",String(t.getMinutes()).padStart(2,"0"),":",String(t.getSeconds()).padStart(2,"0"),".",String(t.getMilliseconds()).padStart(3,"0")]})}function Ze(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function ze(e,t){if(null==e)return{};var n,i,r=function(e,t){if(null==e)return{};var n,i,r={},o=Object.keys(e);for(i=0;i<o.length;i++)n=o[i],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var Ke,Xe=n(403),Ue=n.n(Xe),Je=["json","text","className","maxLines"];function Ye(e){var n=e.json,i=e.text,r=e.className,o=e.maxLines,s=ze(e,Je),a=(0,t.useRef)(null),l=(0,t.useRef)(null),c=function(){n?l.current.set(n):i&&l.current.updateText(i)};return(0,t.useEffect)((function(){var e;if(a.current){var t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ze(Object(n),!0).forEach((function(t){$e(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ze(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},s);l.current=new(Ue())(a.current,t),c()}var n=null===(e=l.current)||void 0===e?void 0:e.aceEditor;return n&&(n.setOptions({autoScrollEditorIntoView:!0,maxLines:o||5,showLineNumbers:!1,enableAutoIndent:!0}),n.resize()),function(){l.current&&l.current.destroy()}}),[]),(0,t.useEffect)((function(){l.current&&c()}),[n,i]),(0,Ve.jsx)("div",{className:"w-full "+(r||""),ref:a})}var Qe=function(e){return e.MESSAGES="messages",e.RAW="raw",e}(Qe||{}),qe=($e(Ke={},Qe.MESSAGES,{label:"Messages",icon:(0,Ve.jsx)("svg",{className:"w-4 mr-1 ",fill:"currentColor","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:(0,Ve.jsx)("path",{d:"M64 112c-8.8 0-16 7.2-16 16v22.1L220.5 291.7c20.7 17 50.4 17 71.1 0L464 150.1V128c0-8.8-7.2-16-16-16H64zM48 212.2V384c0 8.8 7.2 16 16 16H448c8.8 0 16-7.2 16-16V212.2L322 328.8c-38.4 31.5-93.7 31.5-132 0L48 212.2zM0 128C0 92.7 28.7 64 64 64H448c35.3 0 64 28.7 64 64V384c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V128z"})})}),$e(Ke,Qe.RAW,{label:"Raw Events",icon:(0,Ve.jsx)("svg",{className:"w-4 mr-1",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 512",children:(0,Ve.jsx)("path",{d:"M308.5 135.3c7.1-6.3 9.9-16.2 6.2-25c-2.3-5.3-4.8-10.5-7.6-15.5L304 89.4c-3-5-6.3-9.9-9.8-14.6c-5.7-7.6-15.7-10.1-24.7-7.1l-28.2 9.3c-10.7-8.8-23-16-36.2-20.9L199 27.1c-1.9-9.3-9.1-16.7-18.5-17.8C173.9 8.4 167.2 8 160.4 8h-.7c-6.8 0-13.5 .4-20.1 1.2c-9.4 1.1-16.6 8.6-18.5 17.8L115 56.1c-13.3 5-25.5 12.1-36.2 20.9L50.5 67.8c-9-3-19-.5-24.7 7.1c-3.5 4.7-6.8 9.6-9.9 14.6l-3 5.3c-2.8 5-5.3 10.2-7.6 15.6c-3.7 8.7-.9 18.6 6.2 25l22.2 19.8C32.6 161.9 32 168.9 32 176s.6 14.1 1.7 20.9L11.5 216.7c-7.1 6.3-9.9 16.2-6.2 25c2.3 5.3 4.8 10.5 7.6 15.6l3 5.2c3 5.1 6.3 9.9 9.9 14.6c5.7 7.6 15.7 10.1 24.7 7.1l28.2-9.3c10.7 8.8 23 16 36.2 20.9l6.1 29.1c1.9 9.3 9.1 16.7 18.5 17.8c6.7 .8 13.5 1.2 20.4 1.2s13.7-.4 20.4-1.2c9.4-1.1 16.6-8.6 18.5-17.8l6.1-29.1c13.3-5 25.5-12.1 36.2-20.9l28.2 9.3c9 3 19 .5 24.7-7.1c3.5-4.7 6.8-9.5 9.8-14.6l3.1-5.4c2.8-5 5.3-10.2 7.6-15.5c3.7-8.7 .9-18.6-6.2-25l-22.2-19.8c1.1-6.8 1.7-13.8 1.7-20.9s-.6-14.1-1.7-20.9l22.2-19.8zM112 176a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zM504.7 500.5c6.3 7.1 16.2 9.9 25 6.2c5.3-2.3 10.5-4.8 15.5-7.6l5.4-3.1c5-3 9.9-6.3 14.6-9.8c7.6-5.7 10.1-15.7 7.1-24.7l-9.3-28.2c8.8-10.7 16-23 20.9-36.2l29.1-6.1c9.3-1.9 16.7-9.1 17.8-18.5c.8-6.7 1.2-13.5 1.2-20.4s-.4-13.7-1.2-20.4c-1.1-9.4-8.6-16.6-17.8-18.5L583.9 307c-5-13.3-12.1-25.5-20.9-36.2l9.3-28.2c3-9 .5-19-7.1-24.7c-4.7-3.5-9.6-6.8-14.6-9.9l-5.3-3c-5-2.8-10.2-5.3-15.6-7.6c-8.7-3.7-18.6-.9-25 6.2l-19.8 22.2c-6.8-1.1-13.8-1.7-20.9-1.7s-14.1 .6-20.9 1.7l-19.8-22.2c-6.3-7.1-16.2-9.9-25-6.2c-5.3 2.3-10.5 4.8-15.6 7.6l-5.2 3c-5.1 3-9.9 6.3-14.6 9.9c-7.6 5.7-10.1 15.7-7.1 24.7l9.3 28.2c-8.8 10.7-16 23-20.9 36.2L315.1 313c-9.3 1.9-16.7 9.1-17.8 18.5c-.8 6.7-1.2 13.5-1.2 20.4s.4 13.7 1.2 20.4c1.1 9.4 8.6 16.6 17.8 18.5l29.1 6.1c5 13.3 12.1 25.5 20.9 36.2l-9.3 28.2c-3 9-.5 19 7.1 24.7c4.7 3.5 9.5 6.8 14.6 9.8l5.4 3.1c5 2.8 10.2 5.3 15.5 7.6c8.7 3.7 18.6 .9 25-6.2l19.8-22.2c6.8 1.1 13.8 1.7 20.9 1.7s14.1-.6 20.9-1.7l19.8 22.2zM464 304a48 48 0 1 1 0 96 48 48 0 1 1 0-96z"})})}),Ke),et=Qe.MESSAGES,tt=25;function nt(e){var n=e.client,i=e.connection,r=Oe[i.sessionId],o=Be[r.name];if(!o)throw new Error("messageTypes not found for room: "+r.name);var s=w((0,t.useState)("{}"),2),l=s[0],c=s[1],u=w((0,t.useState)(o[0]),2),h=u[0],d=u[1],p=w((0,t.useState)(!0),2),g=p[0],f=p[1],m=w((0,t.useState)(et),2),v=m[0],y=m[1],C=w((0,t.useState)(""),2),b=C[0],I=C[1],A=w((0,t.useState)(i.messages),2),x=A[0],S=A[1],k=w((0,t.useState)(i.events),2),E=k[0],T=k[1],R=o.indexOf("*")>=0,_=!i.isConnected,$=function(e){et=e.currentTarget.value,y(et)},L=function(e){I(e),setTimeout((function(){return I("")}),3e3)},N=function(){var e=_e(Te().mark((function e(){var t,i,o,s;return Te().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t=r.reconnectionToken.split(":"),i=w(t,2),o=i[0],s=i[1],e.next=4,n.createMatchMakeRequest("reconnect",o,{reconnectionToken:s},void 0,r);case 4:e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),L(e.t0.message);case 9:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(){return e.apply(this,arguments)}}();return(0,t.useEffect)((function(){i.events.onChange=function(){return T(a(i.events))},i.messages.onChange=function(){return S(a(i.messages))}}),[]),(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsxs)("div",{children:[(0,Ve.jsxs)("div",{className:"grid grid-cols-3 gap-2 my-2 text-sm",children:[(0,Ve.jsxs)("button",{className:"bg-red-500 enabled:hover:bg-red-600 disabled:opacity-50 disabled:cursor-not-allowed text-white font-bold px-4 rounded",disabled:_,onClick:function(){return r.connection.close()},children:[(0,Ve.jsx)("svg",{className:"w-4 mr-1 inline",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",children:(0,Ve.jsx)("path",{d:"M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"})}),"Drop"]}),(0,Ve.jsxs)("button",{className:"bg-red-500 enabled:hover:bg-red-600 disabled:opacity-50 disabled:cursor-not-allowed text-white font-bold px-4 rounded",disabled:_,onClick:function(){return r.leave()},children:[(0,Ve.jsx)("svg",{className:"w-4 mr-1 inline",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:(0,Ve.jsx)("path",{d:"M502.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-128-128c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L402.7 224 192 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l210.7 0-73.4 73.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l128-128zM160 96c17.7 0 32-14.3 32-32s-14.3-32-32-32L96 32C43 32 0 75 0 128L0 384c0 53 43 96 96 96l64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0c-17.7 0-32-14.3-32-32l0-256c0-17.7 14.3-32 32-32l64 0z"})}),"Leave"]}),(0,Ve.jsxs)("button",{className:"bg-green-500 enabled:hover:bg-green-600 disabled:opacity-50 disabled:cursor-not-allowed text-white font-bold py-1 px-4 rounded ",disabled:!_,onClick:N,children:[(0,Ve.jsx)("svg",{className:"w-4 mr-1 inline",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:(0,Ve.jsx)("path",{d:"M352 96l64 0c17.7 0 32 14.3 32 32l0 256c0 17.7-14.3 32-32 32l-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l64 0c53 0 96-43 96-96l0-256c0-53-43-96-96-96l-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32zm-9.4 182.6c12.5-12.5 12.5-32.8 0-45.3l-128-128c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L242.7 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l210.7 0-73.4 73.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l128-128z"})}),"Reconnect"]})]}),b&&(0,Ve.jsxs)("div",{className:"bg-red-500 text-white py-2 px-3 rounded text-sm my-2",children:[(0,Ve.jsx)("strong",{children:"Error:"})," ",b]}),(0,Ve.jsx)("p",{className:"mt-4",children:(0,Ve.jsx)("strong",{children:"Send a message:"})}),0!==o.length||R?(0,Ve.jsxs)("div",{className:"flex items-center",children:[(0,Ve.jsx)("div",{className:"flex mt-2",children:(0,Ve.jsx)("select",{placeholder:"Message type",className:"border p-2 rounded",value:h,onChange:function(e){return d(e.target.value)},children:o.map((function(e){return(0,Ve.jsx)("option",{value:e,children:e},e)}))})}),(0,Ve.jsx)("div",{className:"flex ml-2 mt-2 grow pr-2",children:(0,Ve.jsx)(Ye,{text:l,onChangeText:function(e){return c(e)},onValidationError:function(e){return f(0===e.length)},maxLines:2,mode:"code",search:!1,statusBar:!1,navigationBar:!1,mainMenuBar:!1,className:"h-10 overflow-hidden rounded border "+(g?"border-gray-300":"border-red-300")})}),(0,Ve.jsx)("div",{className:"flex mt-2",children:(0,Ve.jsx)("button",{className:"bg-purple-500 transition disabled:opacity-50 enabled:hover:bg-purple-700 text-white font-bold py-2 px-4 rounded",disabled:!g,onClick:function(){try{var e=new Date,t=JSON.parse(l||"{}"),n={type:h,message:t,out:!0,now:e};S([n].concat(a(x))),i.messages.unshift(n),r.send(h,t)}catch(o){L(o.message)}},children:"Send message"})})]}):(0,Ve.jsxs)("p",{className:"mt-2 mb-4 text-gray-500 text-italic",children:["(This room type does not listen to messages. See ",(0,Ve.jsx)("a",{href:"https://docs.colyseus.io/server/room/#onmessage-type-callback",target:"_blank",children:(0,Ve.jsx)("code",{className:"text-sm bg-gray-100 p-1 rounded",children:".onMessage()"})}),")"]})]}),(0,Ve.jsx)("div",{className:"border-b border-gray-200",children:(0,Ve.jsx)("ul",{className:"flex flex-wrap -mb-px text-sm font-medium text-center text-gray-500",children:Object.keys(qe).map((function(e){return(0,Ve.jsx)("li",{className:"mr-2",children:(0,Ve.jsxs)("button",{onClick:$,value:e,className:(v===e?"text-purple-600 border-purple-600 ":"")+"inline-flex p-4 border-b-2 rounded-t-lg active group","aria-current":"page",children:[qe[e].icon,qe[e].label]})},e)}))})}),(0,Ve.jsxs)("div",{className:"mt-4",children:[v===Qe.MESSAGES&&(0,Ve.jsxs)("table",{className:"table-auto w-full border-collapse text-center text-xs border-t border-l border-r",children:[(0,Ve.jsx)("thead",{children:(0,Ve.jsxs)("tr",{className:"border-b",children:[(0,Ve.jsx)("th",{colSpan:2,className:"p-3 border-r",children:"Type"}),(0,Ve.jsx)("th",{className:"p-3 w-full border-r",children:"Payload"}),(0,Ve.jsx)("th",{className:"p-3 w-full",children:"Time"})]})}),(0,Ve.jsxs)("tbody",{children:[0===x.length&&(0,Ve.jsx)("tr",{className:"p-2 border-b",children:(0,Ve.jsx)("td",{colSpan:3,className:"p-2",children:"No messages"})}),x.slice(0,tt).map((function(e,t){return(0,Ve.jsxs)("tr",{className:"border-b "+(e.in?"bg-red-100":"bg-green-100"),children:[(0,Ve.jsxs)("td",{className:"p-2",children:[e.in&&(0,Ve.jsx)("span",{className:"inline text-red-600 text-base",children:"\u2193"}),e.out&&(0,Ve.jsx)("span",{className:"inline text-green-600 text-base",children:"\u2191"})]}),(0,Ve.jsx)("td",{className:"p-2 border-r text-left",children:(0,Ve.jsxs)("code",{className:"ml-2 bg-gray-100 p-1 rounded",children:['"',e.type,'"']})}),(0,Ve.jsx)("td",{className:"p-2 border-r text-left",children:(0,Ve.jsx)("div",{className:"truncate w-80 ",children:(0,Ve.jsx)("code",{children:JSON.stringify(e.message)})})}),(0,Ve.jsx)("td",{className:"p-2 text-xs",children:(0,Ve.jsx)(je,{date:e.now})})]},t+"-"+e.now)}))]})]}),v===Qe.RAW&&(0,Ve.jsx)("div",{children:(0,Ve.jsxs)("table",{className:"table-auto w-full border-collapse text-center text-xs border-t border-l border-r",children:[(0,Ve.jsx)("thead",{children:(0,Ve.jsxs)("tr",{className:"border-b",children:[(0,Ve.jsx)("th",{colSpan:2,className:"p-3 border-r",children:"Event"}),(0,Ve.jsx)("th",{className:"p-3 w-full border-r",children:"Raw"}),(0,Ve.jsx)("th",{className:"p-3",children:"Time"})]})}),(0,Ve.jsxs)("tbody",{children:[0===E.length&&(0,Ve.jsx)("tr",{className:"p-2 border-b",children:(0,Ve.jsx)("td",{colSpan:3,className:"p-2",children:"No events"})}),E.slice(0,tt).map((function(e,t){return(0,Ve.jsxs)("tr",{className:"border-b "+("close"===e.eventType||"error"===e.eventType?"bg-yellow-100":"in"===e.eventType?"bg-red-100":"bg-green-100"),children:[(0,Ve.jsx)("td",{className:"p-2",children:"close"===e.eventType||"error"===e.eventType?(0,Ve.jsx)("span",{className:"inline text-red-600 text-base",children:"\ud83c\udd67"}):"in"===e.eventType?(0,Ve.jsx)("span",{className:"inline text-red-600 text-base",children:"\u2193"}):(0,Ve.jsx)("span",{className:"inline text-green-600 text-base",children:"\u2191"})}),(0,Ve.jsx)("td",{className:"p-2 border-r text-left",children:(0,Ve.jsxs)("code",{className:"ml-2 bg-gray-100 p-1 rounded",children:['"',e.type,'"']})}),(0,Ve.jsx)("td",{className:"p-2 border-r text-left",children:(0,Ve.jsx)("div",{className:"truncate w-60 overflow-hidden text-ellipsis",children:Array.isArray(e.message)?(0,Ve.jsxs)("code",{className:"italic",children:["(",e.message.length," bytes) ",JSON.stringify(e.message)]}):"string"===typeof e.message?(0,Ve.jsx)("code",{children:e.message}):(0,Ve.jsx)("code",{className:"italic",children:JSON.stringify(e.message)})})}),(0,Ve.jsx)("td",{className:"p-2 text-xs",children:(0,Ve.jsx)(je,{date:e.now})})]},t+"-"+e.now)}))]})]})})]})]})}function it(e){var t=e.name,n=e.roomId;return(0,Ve.jsxs)("span",{className:He(n)+" p-1.5 rounded text-xs text-white",children:[(0,Ve.jsx)("span",{className:"font-semibold",children:t}),(0,Ve.jsx)("code",{className:"ml-2 text-xs bg-gray-100 p-0.5 text-gray-700 rounded",children:(0,Ve.jsx)("span",{className:"ml-1 ",children:n})})]})}function rt(e){var t=e.connection,n=e.isSelected,i=e.onClick,r=Oe[t.sessionId];return(0,Ve.jsxs)("div",{className:"w-full p-2 text-sm rounded text-gray-500 transition "+(t.isConnected?" ":n?" bg-red-500":" bg-red-100")+(n?" opacity-100 bg-green-500 text-white shadow":" hover:bg-gray-100 cursor-pointer"),onClick:n?void 0:function(){return i(t)},children:[(0,Ve.jsx)(it,{name:r.name,roomId:r.roomId}),t.isConnected?(0,Ve.jsx)("span",{className:"ml-2 font-semibold bg-green-500 text-white rounded px-1.5 p-1",children:"\u2194"}):(0,Ve.jsx)("span",{className:"ml-2 font-semibold bg-red-500 text-white rounded px-1.5 p-1",children:"\ud83c\udd67"}),(0,Ve.jsxs)("code",{className:"ml-2 bg-gray-100 text-gray-700 p-1 rounded",children:["sessionId: ",t.sessionId]})]})}function ot(e){var t=e.connections,n=e.selectedConnection,i=e.clearConnections,r=e.setSelectedConnection,o=function(e){return r(e)};return(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsxs)("h2",{className:"text-xl font-semibold mb-2",children:["Client connections",t.length>0?(0,Ve.jsxs)("button",{className:"float-right text-sm bg-red-500 enabled:hover:bg-red-600 disabled:opacity-50 disabled:cursor-not-allowed text-white font-bold px-4 py-1 rounded",onClick:function(){for(var e in Oe)Oe[e].leave();i()},children:[(0,Ve.jsx)("svg",{className:"w-4 mr-1 inline",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",children:(0,Ve.jsx)("path",{d:"M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"})}),"Leave all + Clear"]}):null]}),(0,Ve.jsx)("span",{className:"bg-lime-800 bg-green-800 bg-emerald-800 bg-teal-800 bg-cyan-800 bg-sky-800 bg-blue-800 bg-indigo-800 bg-violet-800 bg-fuchsia-800 bg-pink-800 bg-rose-800"}),0===t.length?(0,Ve.jsx)("p",{children:(0,Ve.jsx)("em",{children:"No active client connections."})}):t.map((function(e,t){return(0,Ve.jsx)(rt,{connection:e,isSelected:e===n,onClick:o},e.sessionId||t.toString())}))]})}var st="$_raw",at="$_devmode",lt=function(e){return console.warn("roomConnectedCallback not set. use onRoomConnected() to set it up.")};var ct=Le.Room.prototype.connect;Le.Room.prototype.connect=function(e,t,n){ct.apply(this,arguments),n[st]=[];var i=n.connection.transport.send;n.connection.transport.send=function(e){var t=Array.from(new Uint8Array(e));n.onMessageHandlers.emit(st,["out",ht(t[0]),t]),i.call(n.connection.transport,e)};var r=n.connection.transport.ws,o=r.onerror;r.onerror=function(e){n.onMessageHandlers.emit(st,["error","ERROR",e.message]),o(e)};var s=r.onclose;r.onclose=function(e){delete n[st],4010===e.code?(n.onMessageHandlers.emit(at),n.onMessageHandlers.emit(st,["close","CLOSE_DEVMODE_RESTART",{code:e.code}])):n.onMessageHandlers.emit(st,["close","CLOSE",{code:e.code}]),s(e)},lt(n)};var ut=Le.Room.prototype.onMessageCallback;function ht(e){var t=Le.Protocol[e].replace("ROOM_","");return"DATA"===t&&(t="MESSAGE"),t}function dt(){return dt="undefined"!==typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=f(e)););return e}(e,t);if(i){var r=Object.getOwnPropertyDescriptor(i,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}},dt.apply(this,arguments)}Le.Room.prototype.onMessageCallback=function(e){var t=Array.from(new Uint8Array(e.data));this.onMessageHandlers.events[st]||this[st].unshift(["in",ht(t[0]),t,new Date]),this.onMessageHandlers.emit(st,["in",ht(t[0]),t]),ut.call(this,e)};var pt=function(e){g(n,e);var t=y(n);function n(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50;l(this,n);for(var r=arguments.length,o=new Array(r>1?r-1:0),s=1;s<r;s++)o[s-1]=arguments[s];return(e=t.call.apply(t,[this].concat(o))).maxItems=i,e.onChange=void 0,e}return d(n,[{key:"push",value:function(){for(var e,t=arguments.length,i=new Array(t),r=0;r<t;r++)i[r]=arguments[r];var o=(e=dt(f(n.prototype),"push",this)).call.apply(e,[this].concat(i));return this.length>this.maxItems&&this.shift(),this.onChange&&this.onChange(),o}},{key:"unshift",value:function(){for(var e,t=arguments.length,i=new Array(t),r=0;r<t;r++)i[r]=arguments[r];var o=(e=dt(f(n.prototype),"unshift",this)).call.apply(e,[this].concat(i));return this.length>this.maxItems&&this.pop(),this.onChange&&this.onChange(),o}}]),n}(b(Array));function gt(e){var n=e.roomNames,i=e.roomsById,r=e.roomsByType,o=e.onConnectionSuccessful,s=e.onDisconnection,l=w((0,t.useState)(n[0]),2),c=l[0],u=l[1],h=w((0,t.useState)(""),2),d=h[0],p=h[1],g=w((0,t.useState)(Object.keys(Ge)[0]),2),f=g[0],m=g[1],v=w((0,t.useState)("{}"),2),y=v[0],b=v[1],I=w((0,t.useState)(!1),2),A=I[0],x=I[1],S=w((0,t.useState)(""),2),k=S[0],E=S[1],T=w((0,t.useState)(!0),2),R=T[0],_=T[1],$=function(e){"joinById"===f?p(e.target.value):u(e.target.value)},L=function(e){var t=e.target.value;m(t),"joinById"!==t&&_(!0)},N=function(){var e=_e(Te().mark((function e(){var t,n,i,r;return Te().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="joinById"===(t=f)?d:c,E(""),x(!0),e.prev=4,e.next=7,Me[t](n,JSON.parse(y||"{}"));case 7:e.next=13;break;case 9:e.prev=9,e.t0=e.catch(4),r=(null===(i=e.t0.target)||void 0===i?void 0:i.statusText)||e.t0.message||"server is down.",E(r);case 13:return e.prev=13,x(!1),e.finish(13);case 16:case"end":return e.stop()}}),e,null,[[4,9,13,16]])})));return function(){return e.apply(this,arguments)}}();return lt=function(e){Oe[e.sessionId]=e;var t=Pe.connections.find((function(t){return t.sessionId===e.sessionId})),n=t&&0===Object.keys(e.onMessageHandlers.events).length;if(!t||n){var i=t||{sessionId:e.sessionId,isConnected:!0,messages:new pt,events:C(pt,a(e[st].map((function(e){return{eventType:e[0],type:e[1],message:e[2],now:e[3]}}))))};e.onMessage("*",(function(e,t){i.messages.unshift({type:e,message:t,in:!0,now:new Date})})),e.onMessage(st,(function(e){i.events.unshift({eventType:e[0],type:e[1],message:e[2],now:new Date})})),e.onLeave((function(t){return s(e.sessionId)})),e.onMessage(at,(function(t){return s(e.sessionId)})),e.onMessage("__playground_message_types",(function(t){Be[e.name]=t,o(i)}))}},(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)("h2",{className:"text-xl font-semibold",children:"Join a room"}),(0,Ve.jsx)("p",{className:"mt-4",children:(0,Ve.jsx)("strong",{children:"Method"})}),(0,Ve.jsx)("div",{className:"flex mt-2",children:Object.keys(Ge).map((function(e){return(0,Ve.jsxs)("div",{className:"flex items-center mr-4",children:[(0,Ve.jsx)("input",{id:e,type:"radio",name:"method",value:e,checked:f===e,onChange:L,className:"w-4 h-4 text-purple-600 bg-gray-100 border-gray-300 focus:ring-purple-500 focus:ring-2"}),(0,Ve.jsx)("label",{htmlFor:e,className:"ml-2 text-sm font-medium text-gray-900",children:Ge[e]})]},e)}))}),"joinById"!==f?(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)("p",{className:"mt-4",children:(0,Ve.jsx)("strong",{children:"Available room types:"})}),(0,Ve.jsxs)("div",{className:"flex mt-2 flex-wrap",children:[0===n.length&&(0,Ve.jsxs)("p",{children:["Your server does not define any room type. See ",(0,Ve.jsx)("a",{href:"https://docs.colyseus.io/server/api/#define-roomname-string-room-room-options-any",children:"documentation"}),"."]}),n.map((function(e){return(0,Ve.jsxs)("div",{className:"flex items-center mr-4 mb-2",children:[(0,Ve.jsx)("input",{id:"name_"+e,name:"room_name",type:"radio",value:e,checked:c===e,onChange:$,className:"w-4 h-4 text-purple-600 bg-gray-100 border-gray-300 focus:ring-purple-500 focus:ring-2"}),(0,Ve.jsxs)("label",{htmlFor:"name_"+e,className:"ml-2 text-sm font-medium text-gray-900 cursor-pointer",children:[(0,Ve.jsx)("code",{className:"bg-gray-100 p-1",children:e}),void 0!==r[e]&&(0,Ve.jsxs)("span",{className:"group relative ml-1 text-sm text-gray-500 cursor-help",children:["(",r[e],")",(0,Ve.jsx)("span",{className:"absolute left-8 w-32 scale-0 rounded bg-gray-800 p-2 text-xs text-white group-hover:scale-100",children:r[e]+" active room(s)"})]})]})]},e)}))]})]}):(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)("p",{className:"mt-4",children:(0,Ve.jsx)("strong",{children:"Available rooms by ID:"})}),(0,Ve.jsxs)("div",{className:"flex mt-2 flex-wrap",children:[0===Object.keys(i).length&&(0,Ve.jsx)("p",{children:(0,Ve.jsx)("em",{children:"No rooms available."})}),Object.keys(i).map((function(e){return(0,Ve.jsxs)("div",{className:"flex items-center w-full mr-4 mb-2",children:[(0,Ve.jsx)("input",{id:"roomid_"+e,name:"room_id",type:"radio",value:e,checked:d===e,onChange:$,className:"w-4 h-4 text-purple-600 bg-gray-100 border-gray-300 focus:ring-purple-500 focus:ring-2"}),(0,Ve.jsxs)("label",{htmlFor:"roomid_"+e,className:"ml-2 cursor-pointer text-sm transition"+(i[e].locked?" opacity-60":""),children:[(0,Ve.jsx)(it,{name:i[e].name,roomId:e}),(0,Ve.jsxs)("span",{className:"text-gray-500 text-sm ml-1",children:["(",i[e].locked?(0,Ve.jsx)("svg",{className:"inline text-xs mr-1",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 448 512",children:(0,Ve.jsx)("path",{d:"M144 144v48H304V144c0-44.2-35.8-80-80-80s-80 35.8-80 80zM80 192V144C80 64.5 144.5 0 224 0s144 64.5 144 144v48h16c35.3 0 64 28.7 64 64V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V256c0-35.3 28.7-64 64-64H80z"})}):(0,Ve.jsx)("svg",{className:"inline text-xs mr-1",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 576 512",children:(0,Ve.jsx)("path",{d:"M352 144c0-44.2 35.8-80 80-80s80 35.8 80 80v48c0 17.7 14.3 32 32 32s32-14.3 32-32V144C576 64.5 511.5 0 432 0S288 64.5 288 144v48H64c-35.3 0-64 28.7-64 64V448c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V256c0-35.3-28.7-64-64-64H352V144z"})}),"\xb7 ",i[e].clients," clients)"]})]})]},e)}))]})]}),"joinById"===f&&0===Object.keys(i).length?null:(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)("p",{className:"mt-4",children:(0,Ve.jsx)("strong",{children:"Join options"})}),(0,Ve.jsx)(Ye,{text:y,onChangeText:function(e){return b(e)},onValidationError:function(e){_(0===e.length)},mode:"code",search:!1,statusBar:!1,navigationBar:!1,mainMenuBar:!1,className:"mt-2 h-24 overflow-hidden rounded border "+(R?"border-gray-300":"border-red-300")}),(0,Ve.jsxs)("div",{className:"flex mt-4",children:[(0,Ve.jsx)("button",{className:"bg-purple-500 disabled:cursor-not-allowed disabled:opacity-50 enabled:hover:bg-purple-700 text-white font-bold py-2 px-4 rounded transition",onClick:N,disabled:!R,children:Ge[f]}),(0,Ve.jsxs)("div",{className:"ml-1 p-2 inline italic",children:[A&&"Connecting...",!A&&k&&(0,Ve.jsxs)("span",{className:"text-red-500",children:[(0,Ve.jsx)("strong",{children:"Error:"})," ",k]})]})]})]})]})}function ft(e){return(0,Ve.jsx)("svg",Object.assign({},e,{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:(0,Ve.jsx)("path",{d:"M4 6L8 10L12 6",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round"})}))}function mt(e){var n=e.text,i=w((0,t.useState)(!1),2),r=i[0],o=i[1];return r?(0,Ve.jsxs)("svg",Object.assign({className:"json-view--copy",style:{display:"inline-block"},xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},{children:[(0,Ve.jsx)("path",{stroke:"#A1E3CB",d:"m10.933 13.519-2.226-2.226-1.414 1.414 3.774 3.774 5.702-6.84-1.538-1.282z"}),(0,Ve.jsx)("path",{d:"M19 3H5c-1.103 0-2 .897-2 2v14c0 1.103.897 2 2 2h14c1.103 0 2-.897 2-2V5c0-1.103-.897-2-2-2zM5 19V5h14l.002 14H5z"})]})):(0,Ve.jsx)("svg",Object.assign({onClick:function(e){e.stopPropagation(),navigator.clipboard.writeText(n),o(!0),setTimeout((function(){return o(!1)}),3e3)},className:"json-view--copy",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},{children:(0,Ve.jsx)("path",{d:"M20 2H10c-1.103 0-2 .897-2 2v4H4c-1.103 0-2 .897-2 2v10c0 1.103.897 2 2 2h10c1.103 0 2-.897 2-2v-4h4c1.103 0 2-.897 2-2V4c0-1.103-.897-2-2-2zM4 20V10h10l.002 10H4zm16-6h-4v-4c0-1.103-.897-2-2-2h-4V4h10v10z"})}))}var vt=(0,t.createContext)({collapseStringsAfterLength:99,collapseObjectsAfterLength:20,enableClipboard:!0});function yt(e){var t=e.src,n=e.collapseStringsAfterLength,i=void 0===n?99:n,r=e.collapseObjectsAfterLength,o=void 0===r?20:r,s=e.enableClipboard,a=void 0===s||s;return(0,Ve.jsx)(vt.Provider,Object.assign({value:{collapseStringsAfterLength:i,collapseObjectsAfterLength:o,enableClipboard:a}},{children:(0,Ve.jsx)("code",Object.assign({className:"json-view"},{children:(0,Ve.jsx)(Ct,{node:t})}))}))}function Ct(e){var n=e.node,i=(0,t.useContext)(vt);return Array.isArray(n)||wt(n)?(0,Ve.jsx)(bt,{node:n}):"number"===typeof n?(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)("span",Object.assign({className:"json-view--number"},{children:n})),i.enableClipboard&&(0,Ve.jsx)(mt,{text:String(n)})]}):"string"===typeof n?n.length>i.collapseStringsAfterLength?(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)(It,{str:n}),i.enableClipboard&&(0,Ve.jsx)(mt,{text:String(n)})]}):(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsxs)("span",Object.assign({className:"json-view--string"},{children:['"',n,'"']})),i.enableClipboard&&(0,Ve.jsx)(mt,{text:String(n)})]}):"boolean"===typeof n?(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)("span",Object.assign({className:"json-view--boolean"},{children:String(n)})),i.enableClipboard&&(0,Ve.jsx)(mt,{text:String(n)})]}):null===n?(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)("span",Object.assign({className:"json-view--null"},{children:"null"})),i.enableClipboard&&(0,Ve.jsx)(mt,{text:String(n)})]}):(0,Ve.jsx)("span",Object.assign({className:"json-view--string"},{children:String(n)}))}function bt(e){var n=e.node,i=(0,t.useContext)(vt),r=w((0,t.useState)(!!(Array.isArray(n)&&n.length>i.collapseObjectsAfterLength)||!!(wt(n)&&Object.keys(n).length>i.collapseObjectsAfterLength)),2),o=r[0],s=r[1];return Array.isArray(n)?(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)("span",{children:"["}),!o&&(0,Ve.jsx)(ft,{onClick:function(){return s(!0)},className:"jv-chevron"}),!o&&i.enableClipboard&&(0,Ve.jsx)(mt,{text:JSON.stringify(n)}),o?(0,Ve.jsx)("button",Object.assign({onClick:function(){return s(!1)},className:"jv-button"},{children:"..."})):(0,Ve.jsx)("div",Object.assign({className:"jv-indent"},{children:n.map((function(e,t){return(0,Ve.jsx)(At,{name:t,value:e},t)}))})),(0,Ve.jsx)("span",{children:"]"})]}):wt(n)?(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsx)("span",{children:"{"}),!o&&(0,Ve.jsx)(ft,{onClick:function(){return s(!0)},className:"jv-chevron"}),!o&&i.enableClipboard&&(0,Ve.jsx)(mt,{text:JSON.stringify(n)}),o?(0,Ve.jsx)("button",Object.assign({onClick:function(){return s(!1)},className:"jv-button"},{children:"..."})):(0,Ve.jsx)("div",Object.assign({className:"jv-indent"},{children:Object.entries(n).map((function(e){var t=w(e,2),n=t[0],i=t[1];return(0,Ve.jsx)(At,{name:n,value:i},n)}))})),(0,Ve.jsx)("span",{children:"}"})]}):null}function It(e){var n=e.str;if(n.length<=10)return(0,Ve.jsxs)("span",Object.assign({className:"json-view--string"},{children:['"',n,'"']}));var i=w((0,t.useState)(!0),2),r=i[0],o=i[1];return(0,Ve.jsxs)("span",Object.assign({onClick:function(){return o(!r)},className:"json-view--string cursor-pointer"},{children:['"',r?n.slice(0,6)+"..."+n.slice(-4):n,'"']}))}function At(e){var t=e.name,n=e.value;return(0,Ve.jsxs)("div",Object.assign({className:"json-view--pair"},{children:[(0,Ve.jsx)("span",Object.assign({className:"number"===typeof t?"json-view--index":"json-view--property"},{children:t})),":"," ",(0,Ve.jsx)(Ct,{node:n})]}))}function wt(e){return"[object Object]"===Object.prototype.toString.call(e)}function xt(e){var n=e.connection,i=Oe[n.sessionId],r=w((0,t.useState)(i.state&&i.state.toJSON()),2),o=r[0],s=r[1];i.state;return console.log("RENDER STATE VIEW (bind onStateChange)"),i.onStateChange((function(e){return s(e.toJSON())})),(0,Ve.jsx)(yt,{src:o,enableClipboard:!1})}var St=function(e){return e.CONNECTING="connecting",e.CONNECTED="connected",e.OFFLINE="offline",e}(St||{});function kt(){var e=w((0,t.useState)(St.CONNECTING),2),n=e[0],i=e[1],r=w((0,t.useState)([]),2),o=r[0],s=r[1],l=w((0,t.useState)(void 0),2),c=l[0],u=l[1],h=w((0,t.useState)([]),2),d=h[0],p=h[1],g=w((0,t.useState)({}),2),f=g[0],m=g[1],v=w((0,t.useState)({}),2),y=v[0],C=v[1],b=function(){fetch("".concat(Ne,"/playground/rooms")).then((function(e){return e.json()})).then((function(e){i(St.CONNECTED),p(e.rooms),C(e.roomsByType),m(e.roomsById)})).catch((function(e){i(St.OFFLINE),console.error(e)}))};return(0,t.useEffect)((function(){b();var e=window.setInterval((function(){n===St.OFFLINE&&b()}),1e3);return function(){return window.clearInterval(e)}}),[]),(0,Ve.jsxs)(Ve.Fragment,{children:[(0,Ve.jsxs)("div",{className:"grid grid-cols-2 gap-6",children:[(0,Ve.jsxs)("div",{className:"bg-white shadow rounded p-6",children:[n===St.CONNECTING&&(0,Ve.jsx)("p",{children:"Connecting to server..."}),n===St.OFFLINE&&(0,Ve.jsx)("p",{children:"Server is offline."}),n===St.CONNECTED&&(0,Ve.jsx)(gt,{roomNames:d,roomsByType:y,roomsById:f,onConnectionSuccessful:function(e){-1!==Pe.connections.indexOf(e)?(e.isConnected=!0,s(Pe.connections)):(Pe.connections=[e].concat(a(Pe.connections)),s(Pe.connections),c&&c.isConnected||u(e)),b()},onDisconnection:function(e){var t=Pe.connections.find((function(t){return t.sessionId===e}));t&&(t.isConnected=!1,s(a(Pe.connections)),b())}})]}),(0,Ve.jsx)("div",{className:"bg-white shadow rounded p-6",children:(0,Ve.jsx)(ot,{connections:o,selectedConnection:c,clearConnections:function(){Pe.connections=[],b(),s(Pe.connections),u(void 0)},setSelectedConnection:u})})]}),(0,Ve.jsxs)("div",{className:"mt-6 bg-white shadow rounded grid grid-cols-2 min-h-screen",children:[(0,Ve.jsxs)("div",{className:"p-6",children:[(0,Ve.jsxs)("h2",{className:"text-xl font-semibold",children:["Inspect connection",c?(0,Ve.jsxs)("span",{children:[" (",(0,Ve.jsxs)("code",{className:"bg-gray-100 text-sm text-gray-700 p-1 rounded",children:["sessionId: ",c.sessionId]}),")"]}):null]}),c?(0,Ve.jsx)(nt,{client:Me,connection:c},c.sessionId):(0,Ve.jsx)("p",{children:(0,Ve.jsx)("em",{children:"(Please select an active client connection)"})})]}),(0,Ve.jsxs)("div",{className:"p-6",children:[(0,Ve.jsx)("h2",{className:"text-xl font-semibold mb-2",children:"State"}),c?(0,Ve.jsx)("div",{className:"text-sm",children:(0,Ve.jsx)(xt,{connection:c},c.sessionId)}):(0,Ve.jsx)("p",{children:(0,Ve.jsx)("em",{children:"(Please select an active client connection)"})})]})]})]})}var Et=[{path:"/",component:(0,Ve.jsx)(kt,{})}];function Tt(){return(0,Ve.jsx)("div",{className:"flex h-screen bg-gray-100 font-roboto",children:(0,Ve.jsx)("div",{className:"flex-1 flex flex-col",children:(0,Ve.jsx)("div",{className:"flex-1 overflow-y-auto bg-gray-100",children:(0,Ve.jsxs)("div",{className:"container mx-auto p-8",children:[(0,Ve.jsxs)("div",{className:"flex mt-4 justify-center",children:[(0,Ve.jsx)("img",{src:Ee,alt:"",className:"w-8 mr-2"}),(0,Ve.jsxs)("h1",{className:"text-3xl",children:[(0,Ve.jsx)("span",{className:"font-semibold",children:"Colyseus"})," ",(0,Ve.jsx)("span",{className:"font-extralight",children:"Playground"})]})]}),(0,Ve.jsx)("p",{className:"mt-0.5 mb-8 text-center text-gray-700 text-sm font-light italic",children:"(For client-side connection inspection.)"}),(0,Ve.jsx)(xe,{children:Et.map((function(e,t){return(0,Ve.jsx)(Ae,{path:e.path,element:e.component},t)}))}),(0,Ve.jsxs)("p",{className:"mt-8 text-center text-gray-700 text-sm font-light italic",children:[(0,Ve.jsx)("a",{href:"https://github.com/colyseus/playground",className:"text-purple-700 hover:text-purple-500",target:"_blank",children:"This playground tool is open-source"}),", and was made with React and TailwindCSS. ",(0,Ve.jsx)("br",{}),"Contributions are welcome!"]})]})})})})}function Rt(e){var n,i=e.basename,r=e.children,o=e.window,s=t.useRef();null==s.current&&(s.current=(void 0===(n={window:o,v5Compat:!0})&&(n={}),N((function(e,t){var n=e.location;return _("",{pathname:n.pathname,search:n.search,hash:n.hash},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){return"string"===typeof t?t:$(t)}),null,n)));var a=s.current,l=w(t.useState({action:a.action,location:a.location}),2),c=l[0],u=l[1];return t.useLayoutEffect((function(){return a.listen(u)}),[a]),t.createElement(we,{basename:i,children:r,location:c.location,navigationType:c.action,navigator:a})}"undefined"!==typeof window&&"undefined"!==typeof window.document&&window.document.createElement;var _t,$t;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(_t||(_t={})),function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}($t||($t={}));var Lt=function(e){e&&e instanceof Function&&n.e(787).then(n.bind(n,787)).then((function(t){var n=t.getCLS,i=t.getFID,r=t.getFCP,o=t.getLCP,s=t.getTTFB;n(e),i(e),r(e),o(e),s(e)}))};i.createRoot(document.getElementById("root")).render((0,Ve.jsx)(t.StrictMode,{children:(0,Ve.jsx)(Rt,{children:(0,Ve.jsx)(Tt,{})})})),Lt()}()}();
|
|
3
|
+
//# sourceMappingURL=main.52f8cf2a.js.map
|