UNPKG

yasgui

Version:

Yet Another SPARQL GUI

2 lines 1.48 MB
(function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this;t.YASGUI=e()}})(function(){var define,module,exports;return function e(t,n,i){function r(s,a){if(!n[s]){if(!t[s]){var l="function"==typeof require&&require;if(!a&&l)return l(s,!0);if(o)return o(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[s]={exports:{}};t[s][0].call(c.exports,function(e){var n=t[s][1][e];return r(n?n:e)},c,c.exports,e,t,n,i)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;s<i.length;s++)r(i[s]);return r}({1:[function(e,t,n){"use strict";function i(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function r(e){return 3*e.length/4-i(e)}function o(e){var t,n,r,o,s,a=e.length;o=i(e);s=new f(3*a/4-o);n=o>0?a-4:a;var l=0;for(t=0;t<n;t+=4){r=c[e.charCodeAt(t)]<<18|c[e.charCodeAt(t+1)]<<12|c[e.charCodeAt(t+2)]<<6|c[e.charCodeAt(t+3)];s[l++]=r>>16&255;s[l++]=r>>8&255;s[l++]=255&r}if(2===o){r=c[e.charCodeAt(t)]<<2|c[e.charCodeAt(t+1)]>>4;s[l++]=255&r}else if(1===o){r=c[e.charCodeAt(t)]<<10|c[e.charCodeAt(t+1)]<<4|c[e.charCodeAt(t+2)]>>2;s[l++]=r>>8&255;s[l++]=255&r}return s}function s(e){return u[e>>18&63]+u[e>>12&63]+u[e>>6&63]+u[63&e]}function a(e,t,n){for(var i,r=[],o=t;o<n;o+=3){i=(e[o]<<16)+(e[o+1]<<8)+e[o+2];r.push(s(i))}return r.join("")}function l(e){for(var t,n=e.length,i=n%3,r="",o=[],s=16383,l=0,c=n-i;l<c;l+=s)o.push(a(e,l,l+s>c?c:l+s));if(1===i){t=e[n-1];r+=u[t>>2];r+=u[t<<4&63];r+="=="}else if(2===i){t=(e[n-2]<<8)+e[n-1];r+=u[t>>10];r+=u[t>>4&63];r+=u[t<<2&63];r+="="}o.push(r);return o.join("")}n.byteLength=r;n.toByteArray=o;n.fromByteArray=l;for(var u=[],c=[],f="undefined"!=typeof Uint8Array?Uint8Array:Array,p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=0,d=p.length;h<d;++h){u[h]=p[h];c[p.charCodeAt(h)]=h}c["-".charCodeAt(0)]=62;c["_".charCodeAt(0)]=63},{}],2:[function(e,t,n){(function(e){"use strict";function n(e,t){var n=(65535&e)+(65535&t),i=(e>>16)+(t>>16)+(n>>16);return i<<16|65535&n}function i(e,t){return e<<t|e>>>32-t}function r(e,t,r,o,s,a){return n(i(n(n(t,e),n(o,a)),s),r)}function o(e,t,n,i,o,s,a){return r(t&n|~t&i,e,t,o,s,a)}function s(e,t,n,i,o,s,a){return r(t&i|n&~i,e,t,o,s,a)}function a(e,t,n,i,o,s,a){return r(t^n^i,e,t,o,s,a)}function l(e,t,n,i,o,s,a){return r(n^(t|~i),e,t,o,s,a)}function u(e,t){e[t>>5]|=128<<t%32;e[(t+64>>>9<<4)+14]=t;var i,r,u,c,f,p=1732584193,h=-271733879,d=-1732584194,g=271733878;for(i=0;i<e.length;i+=16){r=p;u=h;c=d;f=g;p=o(p,h,d,g,e[i],7,-680876936);g=o(g,p,h,d,e[i+1],12,-389564586);d=o(d,g,p,h,e[i+2],17,606105819);h=o(h,d,g,p,e[i+3],22,-1044525330);p=o(p,h,d,g,e[i+4],7,-176418897);g=o(g,p,h,d,e[i+5],12,1200080426);d=o(d,g,p,h,e[i+6],17,-1473231341);h=o(h,d,g,p,e[i+7],22,-45705983);p=o(p,h,d,g,e[i+8],7,1770035416);g=o(g,p,h,d,e[i+9],12,-1958414417);d=o(d,g,p,h,e[i+10],17,-42063);h=o(h,d,g,p,e[i+11],22,-1990404162);p=o(p,h,d,g,e[i+12],7,1804603682);g=o(g,p,h,d,e[i+13],12,-40341101);d=o(d,g,p,h,e[i+14],17,-1502002290);h=o(h,d,g,p,e[i+15],22,1236535329);p=s(p,h,d,g,e[i+1],5,-165796510);g=s(g,p,h,d,e[i+6],9,-1069501632);d=s(d,g,p,h,e[i+11],14,643717713);h=s(h,d,g,p,e[i],20,-373897302);p=s(p,h,d,g,e[i+5],5,-701558691);g=s(g,p,h,d,e[i+10],9,38016083);d=s(d,g,p,h,e[i+15],14,-660478335);h=s(h,d,g,p,e[i+4],20,-405537848);p=s(p,h,d,g,e[i+9],5,568446438);g=s(g,p,h,d,e[i+14],9,-1019803690);d=s(d,g,p,h,e[i+3],14,-187363961);h=s(h,d,g,p,e[i+8],20,1163531501);p=s(p,h,d,g,e[i+13],5,-1444681467);g=s(g,p,h,d,e[i+2],9,-51403784);d=s(d,g,p,h,e[i+7],14,1735328473);h=s(h,d,g,p,e[i+12],20,-1926607734);p=a(p,h,d,g,e[i+5],4,-378558);g=a(g,p,h,d,e[i+8],11,-2022574463);d=a(d,g,p,h,e[i+11],16,1839030562);h=a(h,d,g,p,e[i+14],23,-35309556);p=a(p,h,d,g,e[i+1],4,-1530992060);g=a(g,p,h,d,e[i+4],11,1272893353);d=a(d,g,p,h,e[i+7],16,-155497632);h=a(h,d,g,p,e[i+10],23,-1094730640);p=a(p,h,d,g,e[i+13],4,681279174);g=a(g,p,h,d,e[i],11,-358537222);d=a(d,g,p,h,e[i+3],16,-722521979);h=a(h,d,g,p,e[i+6],23,76029189);p=a(p,h,d,g,e[i+9],4,-640364487);g=a(g,p,h,d,e[i+12],11,-421815835);d=a(d,g,p,h,e[i+15],16,530742520);h=a(h,d,g,p,e[i+2],23,-995338651);p=l(p,h,d,g,e[i],6,-198630844);g=l(g,p,h,d,e[i+7],10,1126891415);d=l(d,g,p,h,e[i+14],15,-1416354905);h=l(h,d,g,p,e[i+5],21,-57434055);p=l(p,h,d,g,e[i+12],6,1700485571);g=l(g,p,h,d,e[i+3],10,-1894986606);d=l(d,g,p,h,e[i+10],15,-1051523);h=l(h,d,g,p,e[i+1],21,-2054922799);p=l(p,h,d,g,e[i+8],6,1873313359);g=l(g,p,h,d,e[i+15],10,-30611744);d=l(d,g,p,h,e[i+6],15,-1560198380);h=l(h,d,g,p,e[i+13],21,1309151649);p=l(p,h,d,g,e[i+4],6,-145523070);g=l(g,p,h,d,e[i+11],10,-1120210379);d=l(d,g,p,h,e[i+2],15,718787259);h=l(h,d,g,p,e[i+9],21,-343485551);p=n(p,r);h=n(h,u);d=n(d,c);g=n(g,f)}return[p,h,d,g]}function c(e){var t,n="",i=32*e.length;for(t=0;t<i;t+=8)n+=String.fromCharCode(e[t>>5]>>>t%32&255);return n}function f(e){var t,n=[];n[(e.length>>2)-1]=void 0;for(t=0;t<n.length;t+=1)n[t]=0;var i=8*e.length;for(t=0;t<i;t+=8)n[t>>5]|=(255&e.charCodeAt(t/8))<<t%32;return n}function p(e){return c(u(f(e),8*e.length))}function h(e,t){var n,i,r=f(e),o=[],s=[];o[15]=s[15]=void 0;r.length>16&&(r=u(r,8*e.length));for(n=0;n<16;n+=1){o[n]=909522486^r[n];s[n]=1549556828^r[n]}i=u(o.concat(f(t)),512+8*t.length);return c(u(s.concat(i),640))}function d(e){var t,n,i="0123456789abcdef",r="";for(n=0;n<e.length;n+=1){t=e.charCodeAt(n);r+=i.charAt(t>>>4&15)+i.charAt(15&t)}return r}function g(e){return unescape(encodeURIComponent(e))}function m(e){return p(g(e))}function v(e){return d(m(e))}function y(e,t){return h(g(e),g(t))}function b(e,t){return d(y(e,t))}function x(e,t,n){return t?n?y(t,e):b(t,e):n?m(e):v(e)}"function"==typeof define&&define.amd?define(function(){return x}):"object"==typeof t&&t.exports?t.exports=x:e.md5=x})(this)},{}],3:[function(e,t,n){},{}],4:[function(e,t,n){arguments[4][3][0].apply(n,arguments)},{dup:3}],5:[function(e,t,n){(function(t){"use strict";function i(){try{var e=new Uint8Array(1);e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}};return 42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(t){return!1}}function r(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(e,t){if(r()<t)throw new RangeError("Invalid typed array length");if(s.TYPED_ARRAY_SUPPORT){e=new Uint8Array(t);e.__proto__=s.prototype}else{null===e&&(e=new s(t));e.length=t}return e}function s(e,t,n){if(!(s.TYPED_ARRAY_SUPPORT||this instanceof s))return new s(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return c(this,e)}return a(this,e,t,n)}function a(e,t,n,i){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?h(e,t,n,i):"string"==typeof t?f(e,t,n):d(e,t)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function u(e,t,n,i){l(t);return t<=0?o(e,t):void 0!==n?"string"==typeof i?o(e,t).fill(n,i):o(e,t).fill(n):o(e,t)}function c(e,t){l(t);e=o(e,t<0?0:0|g(t));if(!s.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function f(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!s.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var i=0|v(t,n);e=o(e,i);var r=e.write(t,n);r!==i&&(e=e.slice(0,r));return e}function p(e,t){var n=t.length<0?0:0|g(t.length);e=o(e,n);for(var i=0;i<n;i+=1)e[i]=255&t[i];return e}function h(e,t,n,i){t.byteLength;if(n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(i||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===i?new Uint8Array(t):void 0===i?new Uint8Array(t,n):new Uint8Array(t,n,i);if(s.TYPED_ARRAY_SUPPORT){e=t;e.__proto__=s.prototype}else e=p(e,t);return e}function d(e,t){if(s.isBuffer(t)){var n=0|g(t.length);e=o(e,n);if(0===e.length)return e;t.copy(e,0,0,n);return e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||K(t.length)?o(e,0):p(e,t);if("Buffer"===t.type&&J(t.data))return p(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function g(e){if(e>=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|e}function m(e){+e!=e&&(e=0);return s.alloc(+e)}function v(e,t){if(s.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Z(e).length;default:if(i)return V(e).length;t=(""+t).toLowerCase();i=!0}}function y(e,t,n){var i=!1;(void 0===t||t<0)&&(t=0);if(t>this.length)return"";(void 0===n||n>this.length)&&(n=this.length);if(n<=0)return"";n>>>=0;t>>>=0;if(n<=t)return"";e||(e="utf8");for(;;)switch(e){case"hex":return P(this,t,n);case"utf8":case"utf-8":return I(this,t,n);case"ascii":return R(this,t,n);case"latin1":case"binary":return O(this,t,n);case"base64":return N(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,n);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase();i=!0}}function b(e,t,n){var i=e[t];e[t]=e[n];e[n]=i}function x(e,t,n,i,r){if(0===e.length)return-1;if("string"==typeof n){i=n;n=0}else n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648);n=+n;isNaN(n)&&(n=r?0:e.length-1);n<0&&(n=e.length+n);if(n>=e.length){if(r)return-1;n=e.length-1}else if(n<0){if(!r)return-1;n=0}"string"==typeof t&&(t=s.from(t,i));if(s.isBuffer(t))return 0===t.length?-1:_(e,t,n,i,r);if("number"==typeof t){t=255&t;return s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):_(e,[t],n,i,r)}throw new TypeError("val must be string, number or Buffer")}function _(e,t,n,i,r){function o(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}var s=1,a=e.length,l=t.length;if(void 0!==i){i=String(i).toLowerCase();if("ucs2"===i||"ucs-2"===i||"utf16le"===i||"utf-16le"===i){if(e.length<2||t.length<2)return-1;s=2;a/=2;l/=2;n/=2}}var u;if(r){var c=-1;for(u=n;u<a;u++)if(o(e,u)===o(t,c===-1?0:u-c)){c===-1&&(c=u);if(u-c+1===l)return c*s}else{c!==-1&&(u-=u-c);c=-1}}else{n+l>a&&(n=a-l);for(u=n;u>=0;u--){for(var f=!0,p=0;p<l;p++)if(o(e,u+p)!==o(t,p)){f=!1;break}if(f)return u}}return-1}function E(e,t,n,i){n=Number(n)||0;var r=e.length-n;if(i){i=Number(i);i>r&&(i=r)}else i=r;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");i>o/2&&(i=o/2);for(var s=0;s<i;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[n+s]=a}return s}function w(e,t,n,i){return $(V(t,e.length-n),e,n,i)}function T(e,t,n,i){return $(W(t),e,n,i)}function S(e,t,n,i){return T(e,t,n,i)}function C(e,t,n,i){return $(Z(t),e,n,i)}function L(e,t,n,i){return $(Y(t,e.length-n),e,n,i)}function N(e,t,n){return 0===t&&n===e.length?X.fromByteArray(e):X.fromByteArray(e.slice(t,n))}function I(e,t,n){n=Math.min(e.length,n);for(var i=[],r=t;r<n;){var o=e[r],s=null,a=o>239?4:o>223?3:o>191?2:1;if(r+a<=n){var l,u,c,f;switch(a){case 1:o<128&&(s=o);break;case 2:l=e[r+1];if(128===(192&l)){f=(31&o)<<6|63&l;f>127&&(s=f)}break;case 3:l=e[r+1];u=e[r+2];if(128===(192&l)&&128===(192&u)){f=(15&o)<<12|(63&l)<<6|63&u;f>2047&&(f<55296||f>57343)&&(s=f)}break;case 4:l=e[r+1];u=e[r+2];c=e[r+3];if(128===(192&l)&&128===(192&u)&&128===(192&c)){f=(15&o)<<18|(63&l)<<12|(63&u)<<6|63&c;f>65535&&f<1114112&&(s=f)}}}if(null===s){s=65533;a=1}else if(s>65535){s-=65536;i.push(s>>>10&1023|55296);s=56320|1023&s}i.push(s);r+=a}return A(i)}function A(e){var t=e.length;if(t<=ee)return String.fromCharCode.apply(String,e);for(var n="",i=0;i<t;)n+=String.fromCharCode.apply(String,e.slice(i,i+=ee));return n}function R(e,t,n){var i="";n=Math.min(e.length,n);for(var r=t;r<n;++r)i+=String.fromCharCode(127&e[r]);return i}function O(e,t,n){var i="";n=Math.min(e.length,n);for(var r=t;r<n;++r)i+=String.fromCharCode(e[r]);return i}function P(e,t,n){var i=e.length;(!t||t<0)&&(t=0);(!n||n<0||n>i)&&(n=i);for(var r="",o=t;o<n;++o)r+=H(e[o]);return r}function k(e,t,n){for(var i=e.slice(t,n),r="",o=0;o<i.length;o+=2)r+=String.fromCharCode(i[o]+256*i[o+1]);return r}function M(e,t,n){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,n,i,r,o){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>r||t<o)throw new RangeError('"value" argument is out of bounds');if(n+i>e.length)throw new RangeError("Index out of range")}function j(e,t,n,i){t<0&&(t=65535+t+1);for(var r=0,o=Math.min(e.length-n,2);r<o;++r)e[n+r]=(t&255<<8*(i?r:1-r))>>>8*(i?r:1-r)}function B(e,t,n,i){t<0&&(t=4294967295+t+1);for(var r=0,o=Math.min(e.length-n,4);r<o;++r)e[n+r]=t>>>8*(i?r:3-r)&255}function q(e,t,n,i,r,o){if(n+i>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function U(e,t,n,i,r){r||q(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38);Q.write(e,t,n,i,23,4);return n+4}function F(e,t,n,i,r){r||q(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308);Q.write(e,t,n,i,52,8);return n+8}function G(e){e=z(e).replace(te,"");if(e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function z(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function H(e){return e<16?"0"+e.toString(16):e.toString(16)}function V(e,t){t=t||1/0;for(var n,i=e.length,r=null,o=[],s=0;s<i;++s){n=e.charCodeAt(s);if(n>55295&&n<57344){if(!r){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===i){(t-=3)>-1&&o.push(239,191,189);continue}r=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189);r=n;continue}n=(r-55296<<10|n-56320)+65536}else r&&(t-=3)>-1&&o.push(239,191,189);r=null;if(n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function W(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function Y(e,t){for(var n,i,r,o=[],s=0;s<e.length&&!((t-=2)<0);++s){n=e.charCodeAt(s);i=n>>8;r=n%256;o.push(r);o.push(i)}return o}function Z(e){return X.toByteArray(G(e))}function $(e,t,n,i){for(var r=0;r<i&&!(r+n>=t.length||r>=e.length);++r)t[r+n]=e[r];return r}function K(e){return e!==e}var X=e("base64-js"),Q=e("ieee754"),J=e("isarray");n.Buffer=s;n.SlowBuffer=m;n.INSPECT_MAX_BYTES=50;s.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:i();n.kMaxLength=r();s.poolSize=8192;s._augment=function(e){e.__proto__=s.prototype;return e};s.from=function(e,t,n){return a(null,e,t,n)};if(s.TYPED_ARRAY_SUPPORT){s.prototype.__proto__=Uint8Array.prototype;s.__proto__=Uint8Array;"undefined"!=typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0})}s.alloc=function(e,t,n){return u(null,e,t,n)};s.allocUnsafe=function(e){return c(null,e)};s.allocUnsafeSlow=function(e){return c(null,e)};s.isBuffer=function(e){return!(null==e||!e._isBuffer)};s.compare=function(e,t){if(!s.isBuffer(e)||!s.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,i=t.length,r=0,o=Math.min(n,i);r<o;++r)if(e[r]!==t[r]){n=e[r];i=t[r];break}return n<i?-1:i<n?1:0};s.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};s.concat=function(e,t){if(!J(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return s.alloc(0);var n;if(void 0===t){t=0;for(n=0;n<e.length;++n)t+=e[n].length}var i=s.allocUnsafe(t),r=0;for(n=0;n<e.length;++n){var o=e[n];if(!s.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(i,r);r+=o.length}return i};s.byteLength=v;s.prototype._isBuffer=!0;s.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)b(this,t,t+1);return this};s.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4){b(this,t,t+3);b(this,t+1,t+2)}return this};s.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8){b(this,t,t+7);b(this,t+1,t+6);b(this,t+2,t+5);b(this,t+3,t+4)}return this};s.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?I(this,0,e):y.apply(this,arguments)};s.prototype.equals=function(e){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===s.compare(this,e)};s.prototype.inspect=function(){var e="",t=n.INSPECT_MAX_BYTES;if(this.length>0){e=this.toString("hex",0,t).match(/.{2}/g).join(" ");this.length>t&&(e+=" ... ")}return"<Buffer "+e+">"};s.prototype.compare=function(e,t,n,i,r){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");void 0===t&&(t=0);void 0===n&&(n=e?e.length:0);void 0===i&&(i=0);void 0===r&&(r=this.length);if(t<0||n>e.length||i<0||r>this.length)throw new RangeError("out of range index");if(i>=r&&t>=n)return 0;if(i>=r)return-1;if(t>=n)return 1;t>>>=0;n>>>=0;i>>>=0;r>>>=0;if(this===e)return 0;for(var o=r-i,a=n-t,l=Math.min(o,a),u=this.slice(i,r),c=e.slice(t,n),f=0;f<l;++f)if(u[f]!==c[f]){o=u[f];a=c[f];break}return o<a?-1:a<o?1:0};s.prototype.includes=function(e,t,n){return this.indexOf(e,t,n)!==-1};s.prototype.indexOf=function(e,t,n){return x(this,e,t,n,!0)};s.prototype.lastIndexOf=function(e,t,n){return x(this,e,t,n,!1)};s.prototype.write=function(e,t,n,i){if(void 0===t){i="utf8";n=this.length;t=0}else if(void 0===n&&"string"==typeof t){i=t;n=this.length;t=0}else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t=0|t;if(isFinite(n)){n=0|n;void 0===i&&(i="utf8")}else{i=n;n=void 0}}var r=this.length-t;(void 0===n||n>r)&&(n=r);if(e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var o=!1;;)switch(i){case"hex":return E(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":return T(this,e,t,n);case"latin1":case"binary":return S(this,e,t,n);case"base64":return C(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase();o=!0}};s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ee=4096;s.prototype.slice=function(e,t){var n=this.length;e=~~e;t=void 0===t?n:~~t;if(e<0){e+=n;e<0&&(e=0)}else e>n&&(e=n);if(t<0){t+=n;t<0&&(t=0)}else t>n&&(t=n);t<e&&(t=e);var i;if(s.TYPED_ARRAY_SUPPORT){i=this.subarray(e,t);i.__proto__=s.prototype}else{var r=t-e;i=new s(r,(void 0));for(var o=0;o<r;++o)i[o]=this[o+e]}return i};s.prototype.readUIntLE=function(e,t,n){e=0|e;t=0|t;n||M(e,t,this.length);for(var i=this[e],r=1,o=0;++o<t&&(r*=256);)i+=this[e+o]*r;return i};s.prototype.readUIntBE=function(e,t,n){e=0|e;t=0|t;n||M(e,t,this.length);for(var i=this[e+--t],r=1;t>0&&(r*=256);)i+=this[e+--t]*r;return i};s.prototype.readUInt8=function(e,t){t||M(e,1,this.length);return this[e]};s.prototype.readUInt16LE=function(e,t){t||M(e,2,this.length);return this[e]|this[e+1]<<8};s.prototype.readUInt16BE=function(e,t){t||M(e,2,this.length);return this[e]<<8|this[e+1]};s.prototype.readUInt32LE=function(e,t){t||M(e,4,this.length);return(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]};s.prototype.readUInt32BE=function(e,t){t||M(e,4,this.length);return 16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])};s.prototype.readIntLE=function(e,t,n){e=0|e;t=0|t;n||M(e,t,this.length);for(var i=this[e],r=1,o=0;++o<t&&(r*=256);)i+=this[e+o]*r;r*=128;i>=r&&(i-=Math.pow(2,8*t));return i};s.prototype.readIntBE=function(e,t,n){e=0|e;t=0|t;n||M(e,t,this.length);for(var i=t,r=1,o=this[e+--i];i>0&&(r*=256);)o+=this[e+--i]*r;r*=128;o>=r&&(o-=Math.pow(2,8*t));return o};s.prototype.readInt8=function(e,t){t||M(e,1,this.length);return 128&this[e]?(255-this[e]+1)*-1:this[e]};s.prototype.readInt16LE=function(e,t){t||M(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n};s.prototype.readInt16BE=function(e,t){t||M(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n};s.prototype.readInt32LE=function(e,t){t||M(e,4,this.length);return this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};s.prototype.readInt32BE=function(e,t){t||M(e,4,this.length);return this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};s.prototype.readFloatLE=function(e,t){t||M(e,4,this.length);return Q.read(this,e,!0,23,4)};s.prototype.readFloatBE=function(e,t){t||M(e,4,this.length);return Q.read(this,e,!1,23,4)};s.prototype.readDoubleLE=function(e,t){t||M(e,8,this.length);return Q.read(this,e,!0,52,8)};s.prototype.readDoubleBE=function(e,t){t||M(e,8,this.length);return Q.read(this,e,!1,52,8)};s.prototype.writeUIntLE=function(e,t,n,i){e=+e;t=0|t;n=0|n;if(!i){var r=Math.pow(2,8*n)-1;D(this,e,t,n,r,0)}var o=1,s=0;this[t]=255&e;for(;++s<n&&(o*=256);)this[t+s]=e/o&255;return t+n};s.prototype.writeUIntBE=function(e,t,n,i){e=+e;t=0|t;n=0|n;if(!i){var r=Math.pow(2,8*n)-1;D(this,e,t,n,r,0)}var o=n-1,s=1;this[t+o]=255&e;for(;--o>=0&&(s*=256);)this[t+o]=e/s&255;return t+n};s.prototype.writeUInt8=function(e,t,n){e=+e;t=0|t;n||D(this,e,t,1,255,0);s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e));this[t]=255&e;return t+1};s.prototype.writeUInt16LE=function(e,t,n){e=+e;t=0|t;n||D(this,e,t,2,65535,0);if(s.TYPED_ARRAY_SUPPORT){this[t]=255&e;this[t+1]=e>>>8}else j(this,e,t,!0);return t+2};s.prototype.writeUInt16BE=function(e,t,n){e=+e;t=0|t;n||D(this,e,t,2,65535,0);if(s.TYPED_ARRAY_SUPPORT){this[t]=e>>>8;this[t+1]=255&e}else j(this,e,t,!1);return t+2};s.prototype.writeUInt32LE=function(e,t,n){e=+e;t=0|t;n||D(this,e,t,4,4294967295,0);if(s.TYPED_ARRAY_SUPPORT){this[t+3]=e>>>24;this[t+2]=e>>>16;this[t+1]=e>>>8;this[t]=255&e}else B(this,e,t,!0);return t+4};s.prototype.writeUInt32BE=function(e,t,n){e=+e;t=0|t;n||D(this,e,t,4,4294967295,0);if(s.TYPED_ARRAY_SUPPORT){this[t]=e>>>24;this[t+1]=e>>>16;this[t+2]=e>>>8;this[t+3]=255&e}else B(this,e,t,!1);return t+4};s.prototype.writeIntLE=function(e,t,n,i){e=+e;t=0|t;if(!i){var r=Math.pow(2,8*n-1);D(this,e,t,n,r-1,-r)}var o=0,s=1,a=0;this[t]=255&e;for(;++o<n&&(s*=256);){e<0&&0===a&&0!==this[t+o-1]&&(a=1);this[t+o]=(e/s>>0)-a&255}return t+n};s.prototype.writeIntBE=function(e,t,n,i){e=+e;t=0|t;if(!i){var r=Math.pow(2,8*n-1);D(this,e,t,n,r-1,-r)}var o=n-1,s=1,a=0;this[t+o]=255&e;for(;--o>=0&&(s*=256);){e<0&&0===a&&0!==this[t+o+1]&&(a=1);this[t+o]=(e/s>>0)-a&255}return t+n};s.prototype.writeInt8=function(e,t,n){e=+e;t=0|t;n||D(this,e,t,1,127,-128);s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e));e<0&&(e=255+e+1);this[t]=255&e;return t+1};s.prototype.writeInt16LE=function(e,t,n){e=+e;t=0|t;n||D(this,e,t,2,32767,-32768);if(s.TYPED_ARRAY_SUPPORT){this[t]=255&e;this[t+1]=e>>>8}else j(this,e,t,!0);return t+2};s.prototype.writeInt16BE=function(e,t,n){e=+e;t=0|t;n||D(this,e,t,2,32767,-32768);if(s.TYPED_ARRAY_SUPPORT){this[t]=e>>>8;this[t+1]=255&e}else j(this,e,t,!1);return t+2};s.prototype.writeInt32LE=function(e,t,n){e=+e;t=0|t;n||D(this,e,t,4,2147483647,-2147483648);if(s.TYPED_ARRAY_SUPPORT){this[t]=255&e;this[t+1]=e>>>8;this[t+2]=e>>>16;this[t+3]=e>>>24}else B(this,e,t,!0);return t+4};s.prototype.writeInt32BE=function(e,t,n){e=+e;t=0|t;n||D(this,e,t,4,2147483647,-2147483648);e<0&&(e=4294967295+e+1);if(s.TYPED_ARRAY_SUPPORT){this[t]=e>>>24;this[t+1]=e>>>16;this[t+2]=e>>>8;this[t+3]=255&e}else B(this,e,t,!1);return t+4};s.prototype.writeFloatLE=function(e,t,n){return U(this,e,t,!0,n)};s.prototype.writeFloatBE=function(e,t,n){return U(this,e,t,!1,n)};s.prototype.writeDoubleLE=function(e,t,n){return F(this,e,t,!0,n)};s.prototype.writeDoubleBE=function(e,t,n){return F(this,e,t,!1,n)};s.prototype.copy=function(e,t,n,i){n||(n=0);i||0===i||(i=this.length);t>=e.length&&(t=e.length);t||(t=0);i>0&&i<n&&(i=n);if(i===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length);e.length-t<i-n&&(i=e.length-t+n);var r,o=i-n;if(this===e&&n<t&&t<i)for(r=o-1;r>=0;--r)e[r+t]=this[r+n];else if(o<1e3||!s.TYPED_ARRAY_SUPPORT)for(r=0;r<o;++r)e[r+t]=this[r+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o};s.prototype.fill=function(e,t,n,i){if("string"==typeof e){if("string"==typeof t){i=t;t=0;n=this.length}else if("string"==typeof n){i=n;n=this.length}if(1===e.length){var r=e.charCodeAt(0);r<256&&(e=r)}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!s.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"==typeof e&&(e=255&e);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;t>>>=0;n=void 0===n?this.length:n>>>0;e||(e=0);var o;if("number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var a=s.isBuffer(e)?e:V(new s(e,i).toString()),l=a.length;for(o=0;o<n-t;++o)this[o+t]=a[o%l]}return this};var te=/[^+\/0-9A-Za-z-_]/g}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"base64-js":1,ieee754:64,isarray:6}],6:[function(e,t,n){var i={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==i.call(e)}},{}],7:[function(e,t,n){t.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],8:[function(e,t,n){(function(i){"object"==typeof n&&"object"==typeof t?i(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)})(function(e){"use strict";function t(e){var t=e.getWrapperElement();e.state.fullScreenRestore={scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,width:t.style.width,height:t.style.height};t.style.width="";t.style.height="auto";t.className+=" CodeMirror-fullscreen";document.documentElement.style.overflow="hidden";e.refresh()}function n(e){var t=e.getWrapperElement();t.className=t.className.replace(/\s*CodeMirror-fullscreen\b/,"");document.documentElement.style.overflow="";var n=e.state.fullScreenRestore;t.style.width=n.width;t.style.height=n.height;window.scrollTo(n.scrollLeft,n.scrollTop);e.refresh()}e.defineOption("fullScreen",!1,function(i,r,o){o==e.Init&&(o=!1);!o!=!r&&(r?t(i):n(i))})})},{"../../lib/codemirror":17}],9:[function(e,t,n){(function(i){"object"==typeof n&&"object"==typeof t?i(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)})(function(e){function t(e,t,i,r){var o=e.getLineHandle(t.line),l=t.ch-1,u=l>=0&&a[o.text.charAt(l)]||a[o.text.charAt(++l)];if(!u)return null;var c=">"==u.charAt(1)?1:-1;if(i&&c>0!=(l==t.ch))return null;var f=e.getTokenTypeAt(s(t.line,l+1)),p=n(e,s(t.line,l+(c>0?1:0)),c,f||null,r);return null==p?null:{from:s(t.line,l),to:p&&p.pos,match:p&&p.ch==u.charAt(0),forward:c>0}}function n(e,t,n,i,r){for(var o=r&&r.maxScanLineLength||1e4,l=r&&r.maxScanLines||1e3,u=[],c=r&&r.bracketRegex?r.bracketRegex:/[(){}[\]]/,f=n>0?Math.min(t.line+l,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-l),p=t.line;p!=f;p+=n){var h=e.getLine(p);if(h){var d=n>0?0:h.length-1,g=n>0?h.length:-1;if(!(h.length>o)){p==t.line&&(d=t.ch-(n<0?1:0));for(;d!=g;d+=n){var m=h.charAt(d);if(c.test(m)&&(void 0===i||e.getTokenTypeAt(s(p,d+1))==i)){var v=a[m];if(">"==v.charAt(1)==n>0)u.push(m);else{if(!u.length)return{pos:s(p,d),ch:m};u.pop()}}}}}}return p-n!=(n>0?e.lastLine():e.firstLine())&&null}function i(e,n,i){for(var r=e.state.matchBrackets.maxHighlightLineLength||1e3,a=[],l=e.listSelections(),u=0;u<l.length;u++){var c=l[u].empty()&&t(e,l[u].head,!1,i);if(c&&e.getLine(c.from.line).length<=r){var f=c.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";a.push(e.markText(c.from,s(c.from.line,c.from.ch+1),{className:f}));c.to&&e.getLine(c.to.line).length<=r&&a.push(e.markText(c.to,s(c.to.line,c.to.ch+1),{className:f}))}}if(a.length){o&&e.state.focused&&e.focus();var p=function(){e.operation(function(){for(var e=0;e<a.length;e++)a[e].clear()})};if(!n)return p;setTimeout(p,800)}}function r(e){e.operation(function(){if(l){l();l=null}l=i(e,!1,e.state.matchBrackets)})}var o=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),s=e.Pos,a={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},l=null;e.defineOption("matchBrackets",!1,function(t,n,i){i&&i!=e.Init&&t.off("cursorActivity",r);if(n){t.state.matchBrackets="object"==typeof n?n:{};t.on("cursorActivity",r)}});e.defineExtension("matchBrackets",function(){i(this,!0)});e.defineExtension("findMatchingBracket",function(e,n,i){return t(this,e,n,i)});e.defineExtension("scanForBracket",function(e,t,i,r){return n(this,e,t,i,r)})})},{"../../lib/codemirror":17}],10:[function(e,t,n){(function(i){"object"==typeof n&&"object"==typeof t?i(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)})(function(e){"use strict";e.registerHelper("fold","brace",function(t,n){function i(i){for(var a=n.ch,l=0;;){var u=a<=0?-1:s.lastIndexOf(i,a-1);if(u!=-1){if(1==l&&u<n.ch)break;r=t.getTokenTypeAt(e.Pos(o,u+1));if(!/^(comment|string)/.test(r))return u+1;a=u-1}else{if(1==l)break;l=1;a=s.length}}}var r,o=n.line,s=t.getLine(o),a="{",l="}",u=i("{");if(null==u){a="[",l="]";u=i("[")}if(null!=u){var c,f,p=1,h=t.lastLine();e:for(var d=o;d<=h;++d)for(var g=t.getLine(d),m=d==o?u:0;;){var v=g.indexOf(a,m),y=g.indexOf(l,m);v<0&&(v=g.length);y<0&&(y=g.length);m=Math.min(v,y); if(m==g.length)break;if(t.getTokenTypeAt(e.Pos(d,m+1))==r)if(m==v)++p;else if(!--p){c=d;f=m;break e}++m}if(null!=c&&(o!=c||f!=u))return{from:e.Pos(o,u),to:e.Pos(c,f)}}});e.registerHelper("fold","import",function(t,n){function i(n){if(n<t.firstLine()||n>t.lastLine())return null;var i=t.getTokenAt(e.Pos(n,1));/\S/.test(i.string)||(i=t.getTokenAt(e.Pos(n,i.end+1)));if("keyword"!=i.type||"import"!=i.string)return null;for(var r=n,o=Math.min(t.lastLine(),n+10);r<=o;++r){var s=t.getLine(r),a=s.indexOf(";");if(a!=-1)return{startCh:i.end,end:e.Pos(r,a)}}}var r,o=n.line,s=i(o);if(!s||i(o-1)||(r=i(o-2))&&r.end.line==o-1)return null;for(var a=s.end;;){var l=i(a.line+1);if(null==l)break;a=l.end}return{from:t.clipPos(e.Pos(o,s.startCh+1)),to:a}});e.registerHelper("fold","include",function(t,n){function i(n){if(n<t.firstLine()||n>t.lastLine())return null;var i=t.getTokenAt(e.Pos(n,1));/\S/.test(i.string)||(i=t.getTokenAt(e.Pos(n,i.end+1)));return"meta"==i.type&&"#include"==i.string.slice(0,8)?i.start+8:void 0}var r=n.line,o=i(r);if(null==o||null!=i(r-1))return null;for(var s=r;;){var a=i(s+1);if(null==a)break;++s}return{from:e.Pos(r,o+1),to:t.clipPos(e.Pos(s))}})})},{"../../lib/codemirror":17}],11:[function(e,t,n){(function(i){"object"==typeof n&&"object"==typeof t?i(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)})(function(e){"use strict";function t(t,r,o,s){function a(e){var n=l(t,r);if(!n||n.to.line-n.from.line<u)return null;for(var i=t.findMarksAt(n.from),o=0;o<i.length;++o)if(i[o].__isFold&&"fold"!==s){if(!e)return null;n.cleared=!0;i[o].clear()}return n}if(o&&o.call){var l=o;o=null}else var l=i(t,o,"rangeFinder");"number"==typeof r&&(r=e.Pos(r,0));var u=i(t,o,"minFoldSize"),c=a(!0);if(i(t,o,"scanUp"))for(;!c&&r.line>t.firstLine();){r=e.Pos(r.line-1,0);c=a(!1)}if(c&&!c.cleared&&"unfold"!==s){var f=n(t,o);e.on(f,"mousedown",function(t){p.clear();e.e_preventDefault(t)});var p=t.markText(c.from,c.to,{replacedWith:f,clearOnEnter:i(t,o,"clearOnEnter"),__isFold:!0});p.on("clear",function(n,i){e.signal(t,"unfold",t,n,i)});e.signal(t,"fold",t,c.from,c.to)}}function n(e,t){var n=i(e,t,"widget");if("string"==typeof n){var r=document.createTextNode(n);n=document.createElement("span");n.appendChild(r);n.className="CodeMirror-foldmarker"}return n}function i(e,t,n){if(t&&void 0!==t[n])return t[n];var i=e.options.foldOptions;return i&&void 0!==i[n]?i[n]:r[n]}e.newFoldFunction=function(e,n){return function(i,r){t(i,r,{rangeFinder:e,widget:n})}};e.defineExtension("foldCode",function(e,n,i){t(this,e,n,i)});e.defineExtension("isFolded",function(e){for(var t=this.findMarksAt(e),n=0;n<t.length;++n)if(t[n].__isFold)return!0});e.commands.toggleFold=function(e){e.foldCode(e.getCursor())};e.commands.fold=function(e){e.foldCode(e.getCursor(),null,"fold")};e.commands.unfold=function(e){e.foldCode(e.getCursor(),null,"unfold")};e.commands.foldAll=function(t){t.operation(function(){for(var n=t.firstLine(),i=t.lastLine();n<=i;n++)t.foldCode(e.Pos(n,0),null,"fold")})};e.commands.unfoldAll=function(t){t.operation(function(){for(var n=t.firstLine(),i=t.lastLine();n<=i;n++)t.foldCode(e.Pos(n,0),null,"unfold")})};e.registerHelper("fold","combine",function(){var e=Array.prototype.slice.call(arguments,0);return function(t,n){for(var i=0;i<e.length;++i){var r=e[i](t,n);if(r)return r}}});e.registerHelper("fold","auto",function(e,t){for(var n=e.getHelpers(t,"fold"),i=0;i<n.length;i++){var r=n[i](e,t);if(r)return r}});var r={rangeFinder:e.fold.auto,widget:"↔",minFoldSize:0,scanUp:!1,clearOnEnter:!0};e.defineOption("foldOptions",null);e.defineExtension("foldOption",function(e,t){return i(this,e,t)})})},{"../../lib/codemirror":17}],12:[function(e,t,n){(function(i){"object"==typeof n&&"object"==typeof t?i(e("../../lib/codemirror"),e("./foldcode")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./foldcode"],i):i(CodeMirror)})(function(e){"use strict";function t(e){this.options=e;this.from=this.to=0}function n(e){e===!0&&(e={});null==e.gutter&&(e.gutter="CodeMirror-foldgutter");null==e.indicatorOpen&&(e.indicatorOpen="CodeMirror-foldgutter-open");null==e.indicatorFolded&&(e.indicatorFolded="CodeMirror-foldgutter-folded");return e}function i(e,t){for(var n=e.findMarks(f(t,0),f(t+1,0)),i=0;i<n.length;++i)if(n[i].__isFold&&n[i].find().from.line==t)return n[i]}function r(e){if("string"==typeof e){var t=document.createElement("div");t.className=e+" CodeMirror-guttermarker-subtle";return t}return e.cloneNode(!0)}function o(e,t,n){var o=e.state.foldGutter.options,s=t,a=e.foldOption(o,"minFoldSize"),l=e.foldOption(o,"rangeFinder");e.eachLine(t,n,function(t){var n=null;if(i(e,s))n=r(o.indicatorFolded);else{var u=f(s,0),c=l&&l(e,u);c&&c.to.line-c.from.line>=a&&(n=r(o.indicatorOpen))}e.setGutterMarker(t,o.gutter,n);++s})}function s(e){var t=e.getViewport(),n=e.state.foldGutter;if(n){e.operation(function(){o(e,t.from,t.to)});n.from=t.from;n.to=t.to}}function a(e,t,n){var r=e.state.foldGutter;if(r){var o=r.options;if(n==o.gutter){var s=i(e,t);s?s.clear():e.foldCode(f(t,0),o.rangeFinder)}}}function l(e){var t=e.state.foldGutter;if(t){var n=t.options;t.from=t.to=0;clearTimeout(t.changeUpdate);t.changeUpdate=setTimeout(function(){s(e)},n.foldOnChangeTimeSpan||600)}}function u(e){var t=e.state.foldGutter;if(t){var n=t.options;clearTimeout(t.changeUpdate);t.changeUpdate=setTimeout(function(){var n=e.getViewport();t.from==t.to||n.from-t.to>20||t.from-n.to>20?s(e):e.operation(function(){if(n.from<t.from){o(e,n.from,t.from);t.from=n.from}if(n.to>t.to){o(e,t.to,n.to);t.to=n.to}})},n.updateViewportTimeSpan||400)}}function c(e,t){var n=e.state.foldGutter;if(n){var i=t.line;i>=n.from&&i<n.to&&o(e,i,i+1)}}e.defineOption("foldGutter",!1,function(i,r,o){if(o&&o!=e.Init){i.clearGutter(i.state.foldGutter.options.gutter);i.state.foldGutter=null;i.off("gutterClick",a);i.off("change",l);i.off("viewportChange",u);i.off("fold",c);i.off("unfold",c);i.off("swapDoc",l)}if(r){i.state.foldGutter=new t(n(r));s(i);i.on("gutterClick",a);i.on("change",l);i.on("viewportChange",u);i.on("fold",c);i.on("unfold",c);i.on("swapDoc",l)}});var f=e.Pos})},{"../../lib/codemirror":17,"./foldcode":11}],13:[function(e,t,n){(function(i){"object"==typeof n&&"object"==typeof t?i(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)})(function(e){"use strict";function t(e,t){return e.line-t.line||e.ch-t.ch}function n(e,t,n,i){this.line=t;this.ch=n;this.cm=e;this.text=e.getLine(t);this.min=i?i.from:e.firstLine();this.max=i?i.to-1:e.lastLine()}function i(e,t){var n=e.cm.getTokenTypeAt(p(e.line,t));return n&&/\btag\b/.test(n)}function r(e){if(!(e.line>=e.max)){e.ch=0;e.text=e.cm.getLine(++e.line);return!0}}function o(e){if(!(e.line<=e.min)){e.text=e.cm.getLine(--e.line);e.ch=e.text.length;return!0}}function s(e){for(;;){var t=e.text.indexOf(">",e.ch);if(t==-1){if(r(e))continue;return}if(i(e,t+1)){var n=e.text.lastIndexOf("/",t),o=n>-1&&!/\S/.test(e.text.slice(n+1,t));e.ch=t+1;return o?"selfClose":"regular"}e.ch=t+1}}function a(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(t==-1){if(o(e))continue;return}if(i(e,t+1)){g.lastIndex=t;e.ch=t;var n=g.exec(e.text);if(n&&n.index==t)return n}else e.ch=t}}function l(e){for(;;){g.lastIndex=e.ch;var t=g.exec(e.text);if(!t){if(r(e))continue;return}if(i(e,t.index+1)){e.ch=t.index+t[0].length;return t}e.ch=t.index+1}}function u(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(t==-1){if(o(e))continue;return}if(i(e,t+1)){var n=e.text.lastIndexOf("/",t),r=n>-1&&!/\S/.test(e.text.slice(n+1,t));e.ch=t+1;return r?"selfClose":"regular"}e.ch=t}}function c(e,t){for(var n=[];;){var i,r=l(e),o=e.line,a=e.ch-(r?r[0].length:0);if(!r||!(i=s(e)))return;if("selfClose"!=i)if(r[1]){for(var u=n.length-1;u>=0;--u)if(n[u]==r[2]){n.length=u;break}if(u<0&&(!t||t==r[2]))return{tag:r[2],from:p(o,a),to:p(e.line,e.ch)}}else n.push(r[2])}}function f(e,t){for(var n=[];;){var i=u(e);if(!i)return;if("selfClose"!=i){var r=e.line,o=e.ch,s=a(e);if(!s)return;if(s[1])n.push(s[2]);else{for(var l=n.length-1;l>=0;--l)if(n[l]==s[2]){n.length=l;break}if(l<0&&(!t||t==s[2]))return{tag:s[2],from:p(e.line,e.ch),to:p(r,o)}}}else a(e)}}var p=e.Pos,h="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",d=h+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",g=new RegExp("<(/?)(["+h+"]["+d+"]*)","g");e.registerHelper("fold","xml",function(e,t){for(var i=new n(e,t.line,0);;){var r,o=l(i);if(!o||i.line!=t.line||!(r=s(i)))return;if(!o[1]&&"selfClose"!=r){var a=p(i.line,i.ch),u=c(i,o[2]);return u&&{from:a,to:u.from}}}});e.findMatchingTag=function(e,i,r){var o=new n(e,i.line,i.ch,r);if(o.text.indexOf(">")!=-1||o.text.indexOf("<")!=-1){var l=s(o),u=l&&p(o.line,o.ch),h=l&&a(o);if(l&&h&&!(t(o,i)>0)){var d={from:p(o.line,o.ch),to:u,tag:h[2]};if("selfClose"==l)return{open:d,close:null,at:"open"};if(h[1])return{open:f(o,h[2]),close:d,at:"close"};o=new n(e,u.line,u.ch,r);return{open:d,close:c(o,h[2]),at:"open"}}}};e.findEnclosingTag=function(e,t,i){for(var r=new n(e,t.line,t.ch,i);;){var o=f(r);if(!o)break;var s=new n(e,t.line,t.ch,i),a=c(s,o.tag);if(a)return{open:o,close:a}}};e.scanForClosingTag=function(e,t,i,r){var o=new n(e,t.line,t.ch,r?{from:0,to:r}:null);return c(o,i)}})},{"../../lib/codemirror":17}],14:[function(e,t,n){(function(i){"object"==typeof n&&"object"==typeof t?i(e("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)})(function(e){"use strict";function t(e,t){this.cm=e;this.options=t;this.widget=null;this.debounce=0;this.tick=0;this.startPos=this.cm.getCursor("start");this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length;var n=this;e.on("cursorActivity",this.activityFunc=function(){n.cursorActivity()})}function n(t,n){var i=e.cmpPos(n.from,t.from);return i>0&&t.to.ch-t.from.ch!=n.to.ch-n.from.ch}function i(e,t,n){var i=e.options.hintOptions,r={};for(var o in g)r[o]=g[o];if(i)for(var o in i)void 0!==i[o]&&(r[o]=i[o]);if(n)for(var o in n)void 0!==n[o]&&(r[o]=n[o]);r.hint.resolve&&(r.hint=r.hint.resolve(e,t));return r}function r(e){return"string"==typeof e?e:e.text}function o(e,t){function n(e,n){var r;r="string"!=typeof n?function(e){return n(e,t)}:i.hasOwnProperty(n)?i[n]:n;o[e]=r}var i={Up:function(){t.moveFocus(-1)},Down:function(){t.moveFocus(1)},PageUp:function(){t.moveFocus(-t.menuSize()+1,!0)},PageDown:function(){t.moveFocus(t.menuSize()-1,!0)},Home:function(){t.setFocus(0)},End:function(){t.setFocus(t.length-1)},Enter:t.pick,Tab:t.pick,Esc:t.close},r=e.options.customKeys,o=r?{}:i;if(r)for(var s in r)r.hasOwnProperty(s)&&n(s,r[s]);var a=e.options.extraKeys;if(a)for(var s in a)a.hasOwnProperty(s)&&n(s,a[s]);return o}function s(e,t){for(;t&&t!=e;){if("LI"===t.nodeName.toUpperCase()&&t.parentNode==e)return t;t=t.parentNode}}function a(t,n){this.completion=t;this.data=n;this.picked=!1;var i=this,a=t.cm,l=this.hints=document.createElement("ul");l.className="CodeMirror-hints";this.selectedHint=n.selectedHint||0;for(var u=n.list,c=0;c<u.length;++c){var h=l.appendChild(document.createElement("li")),d=u[c],g=f+(c!=this.selectedHint?"":" "+p);null!=d.className&&(g=d.className+" "+g);h.className=g;d.render?d.render(h,n,d):h.appendChild(document.createTextNode(d.displayText||r(d)));h.hintId=c}var m=a.cursorCoords(t.options.alignWithWord?n.from:null),v=m.left,y=m.bottom,b=!0;l.style.left=v+"px";l.style.top=y+"px";var x=window.innerWidth||Math.max(document.body.offsetWidth,document.documentElement.offsetWidth),_=window.innerHeight||Math.max(document.body.offsetHeight,document.documentElement.offsetHeight);(t.options.container||document.body).appendChild(l);var E=l.getBoundingClientRect(),w=E.bottom-_,T=l.scrollHeight>l.clientHeight+1,S=a.getScrollInfo();if(w>0){var C=E.bottom-E.top,L=m.top-(m.bottom-E.top);if(L-C>0){l.style.top=(y=m.top-C)+"px";b=!1}else if(C>_){l.style.height=_-5+"px";l.style.top=(y=m.bottom-E.top)+"px";var N=a.getCursor();if(n.from.ch!=N.ch){m=a.cursorCoords(N);l.style.left=(v=m.left)+"px";E=l.getBoundingClientRect()}}}var I=E.right-x;if(I>0){if(E.right-E.left>x){l.style.width=x-5+"px";I-=E.right-E.left-x}l.style.left=(v=m.left-I)+"px"}if(T)for(var A=l.firstChild;A;A=A.nextSibling)A.style.paddingRight=a.display.nativeBarWidth+"px";a.addKeyMap(this.keyMap=o(t,{moveFocus:function(e,t){i.changeActive(i.selectedHint+e,t)},setFocus:function(e){i.changeActive(e)},menuSize:function(){return i.screenAmount()},length:u.length,close:function(){t.close()},pick:function(){i.pick()},data:n}));if(t.options.closeOnUnfocus){var R;a.on("blur",this.onBlur=function(){R=setTimeout(function(){t.close()},100)});a.on("focus",this.onFocus=function(){clearTimeout(R)})}a.on("scroll",this.onScroll=function(){var e=a.getScrollInfo(),n=a.getWrapperElement().getBoundingClientRect(),i=y+S.top-e.top,r=i-(window.pageYOffset||(document.documentElement||document.body).scrollTop);b||(r+=l.offsetHeight);if(r<=n.top||r>=n.bottom)return t.close();l.style.top=i+"px";l.style.left=v+S.left-e.left+"px"});e.on(l,"dblclick",function(e){var t=s(l,e.target||e.srcElement);if(t&&null!=t.hintId){i.changeActive(t.hintId);i.pick()}});e.on(l,"click",function(e){var n=s(l,e.target||e.srcElement);if(n&&null!=n.hintId){i.changeActive(n.hintId);t.options.completeOnSingleClick&&i.pick()}});e.on(l,"mousedown",function(){setTimeout(function(){a.focus()},20)});e.signal(n,"select",u[0],l.firstChild);return!0}function l(e,t){if(!e.somethingSelected())return t;for(var n=[],i=0;i<t.length;i++)t[i].supportsSelection&&n.push(t[i]);return n}function u(e,t,n,i){if(e.async)e(t,i,n);else{var r=e(t,n);r&&r.then?r.then(i):i(r)}}function c(t,n){var i,r=t.getHelpers(n,"hint");if(r.length){var o=function(e,t,n){function i(r){if(r==o.length)return t(null);u(o[r],e,n,function(e){e&&e.list.length>0?t(e):i(r+1)})}var o=l(e,r);i(0)};o.async=!0;o.supportsSelection=!0;return o}return(i=t.getHelper(t.getCursor(),"hintWords"))?function(t){return e.hint.fromList(t,{words:i})}:e.hint.anyword?function(t,n){return e.hint.anyword(t,n)}:function(){}}var f="CodeMirror-hint",p="CodeMirror-hint-active";e.showHint=function(e,t,n){if(!t)return e.showHint(n);n&&n.async&&(t.async=!0);var i={hint:t};if(n)for(var r in n)i[r]=n[r];return e.showHint(i)};e.defineExtension("showHint",function(n){n=i(this,this.getCursor("start"),n);var r=this.listSelections();if(!(r.length>1)){if(this.somethingSelected()){if(!n.hint.supportsSelection)return;for(var o=0;o<r.length;o++)if(r[o].head.line!=r[o].anchor.line)return}this.state.completionActive&&this.state.completionActive.close();var s=this.state.completionActive=new t(this,n);if(s.options.hint){e.signal(this,"startCompletion",this);s.update(!0)}}});var h=window.requestAnimationFrame||function(e){return setTimeout(e,1e3/60)},d=window.cancelAnimationFrame||clearTimeout;t.prototype={close:function(){if(this.active()){this.cm.state.completionActive=null;this.tick=null;this.cm.off("cursorActivity",this.activityFunc);this.widget&&this.data&&e.signal(this.data,"close");this.widget&&this.widget.close();e.signal(this.cm,"endCompletion",this.cm)}},active:function(){return this.cm.state.completionActive==this},pick:function(t,n){var i=t.list[n];i.hint?i.hint(this.cm,t,i):this.cm.replaceRange(r(i),i.from||t.from,i.to||t.to,"complete");e.signal(t,"pick",i);this.close()},cursorActivity:function(){if(this.debounce){d(this.debounce);this.debounce=0}var e=this.cm.getCursor(),t=this.cm.getLine(e.line);if(e.line!=this.startPos.line||t.length-e.ch!=this.startLen-this.startPos.ch||e.ch<this.startPos.ch||this.cm.somethingSelected()||e.ch&&this.options.closeCharacters.test(t.charAt(e.ch-1)))this.close();else{var n=this;this.debounce=h(function(){n.update()});this.widget&&this.widget.disable()}},update:function(e){if(null!=this.tick){var t=this,n=++this.tick;u(this.options.hint,this.cm,this.options,function(i){t.tick==n&&t.finishUpdate(i,e)})}},finishUpdate:function(t,i){this.data&&e.signal(this.data,"update");var r=this.widget&&this.widget.picked||i&&this.options.completeSingle;this.widget&&this.widget.close();if(!(t&&this.data&&n(this.data,t))){this.data=t;if(t&&t.list.length)if(r&&1==t.list.length)this.pick(t,0);else{this.widget=new a(this,t);e.signal(t,"shown")}}}};a.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null;this.hints.parentNode.removeChild(this.hints);this.completion.cm.removeKeyMap(this.keyMap);var e=this.completion.cm;if(this.completion.options.closeOnUnfocus){e.off("blur",this.onBlur);e.off("focus",this.onFocus)}e.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var e=this;this.keyMap={Enter:function(){e.picked=!0}};this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(t,n){t>=this.data.list.length?t=n?this.data.list.length-1:0:t<0&&(t=n?0:this.data.list.length-1);if(this.selectedHint!=t){var i=this.hints.childNodes[this.selectedHint];i.className=i.className.replace(" "+p,"");i=this.hints.childNodes[this.selectedHint=t];i.className+=" "+p;i.offsetTop<this.hints.scrollTop?this.hints.scrollTop=i.offsetTop-3:i.offsetTop+i.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=i.offsetTop+i.offsetHeight-this.hints.clientHeight+3);e.signal(this.data,"select",this.data.list[this.selectedHint],i)}},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}};e.registerHelper("hint","auto",{resolve:c});e.registerHelper("hint","fromList",function(t,n){var i=t.getCursor(),r=t.getTokenAt(i),o=e.Pos(i.line,r.end);if(r.string&&/\w/.test(r.string[r.string.length-1]))var s=r.string,a=e.Pos(i.line,r.start);else var s="",a=o;for(var l=[],u=0;u<n.words.length;u++){var c=n.words[u];c.slice(0,s.length)==s&&l.push(c)}if(l.length)return