UNPKG

@alexanderzobnin/monaco-kusto

Version:

CSL, KQL plugin for the Monaco Editor

7 lines 726 kB
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.monaco=t():e.monaco=t()}(self,function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=12)}([function(e,t){e.exports={import:function(){throw new Error("System.import cannot be used indirectly")}}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},,function(e,t){},,,,,,,,,function(e,t,n){(function(i,r,o){var s; /** * @version : 17.1.1 - Bridge.NET * @author : Object.NET, Inc. http://bridge.net/ * @copyright : Copyright 2008-2018 Object.NET, Inc. http://object.net/ * @license : See license.txt and https://github.com/bridgedotnet/Bridge/blob/master/LICENSE.md */!function(a){"use strict";e.exports&&(a=i);var u={global:a,isNode:"[object process]"===Object.prototype.toString.call(void 0!==r?r:0),emptyFn:function(){},identity:function(e){return e},Deconstruct:function(e){for(var t=Array.prototype.slice.call(arguments,1),n=0;n<t.length;n++)t[n].v=7==n?e.Rest:e["Item"+(n+1)]},toString:function(e){if(null==e)throw new o.ArgumentNullException;var t=Bridge.$toStringGuard[Bridge.$toStringGuard.length-1];if(e.toString===Object.prototype.toString||t&&t===e)return Bridge.Reflection.getTypeFullName(e);Bridge.$toStringGuard.push(e);var n=e.toString();return Bridge.$toStringGuard.pop(),n},geti:function(e,t,n){if(Bridge.hasValue(e[t]))return t;if(n&&Bridge.hasValue(e[n]))return n;var i=n||t,r=i.lastIndexOf("$");return/\$\d+$/g.test(i)&&(r=i.lastIndexOf("$",r-1)),i.substr(r+1)},box:function(e,t,n,i){return e&&e.$boxed?e:null==e?e:(e.$clone&&(e=e.$clone()),{$boxed:!0,fn:{toString:n,getHashCode:i},v:e,type:t,constructor:t,getHashCode:function(){return this.fn.getHashCode?this.fn.getHashCode(this.v):Bridge.getHashCode(this.v)},equals:function(e){if(this===e)return!0;var t=this.equals;this.equals=null;var n=Bridge.equals(this.v,e);return this.equals=t,n},valueOf:function(){return this.v},toString:function(){return this.fn.toString?this.fn.toString(this.v):this.v.toString()}})},unbox:function(e,t){if(e&&e.$boxed){var n=e.v;return!t&&n&&n.$clone&&(n=n.$clone()),n}if(Bridge.isArray(e))for(var i=0;i<e.length;i++){var r=e[i];r&&r.$boxed?(r=r.v).$clone&&(r=r.$clone()):!t&&r&&r.$clone&&(r=r.$clone()),e[i]=r}return e&&!t&&e.$clone&&(e=e.$clone()),e},virtualc:function(e){return Bridge.virtual(e,!0)},virtual:function(e,t){var n=Bridge.unroll(e);if(!n||!Bridge.isFunction(n)){var i=Bridge.Class.staticInitAllow;n=t?Bridge.define(e):Bridge.definei(e),Bridge.Class.staticInitAllow=!0,n.$staticInit&&n.$staticInit(),Bridge.Class.staticInitAllow=i}return n},safe:function(e){try{return e()}catch(e){}return!1},literal:function(e,t){return t.$getType=function(){return e},t},isJSObject:function(e){return"[object Object]"===Object.prototype.toString.call(e)},isPlainObject:function(e){if("object"!=typeof e||null===e)return!1;if("function"!=typeof Object.getPrototypeOf)return"[object Object]"===Object.prototype.toString.call(e);var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t},toPlain:function(e){if(!e||Bridge.isPlainObject(e)||"object"!=typeof e)return e;if("function"==typeof e.toJSON)return e.toJSON();if(Bridge.isArray(e)){for(var t=[],n=0;n<e.length;n++)t.push(Bridge.toPlain(e[n]));return t}var i,r={};for(var o in e)i=e[o],Bridge.isFunction(i)||(r[o]=i);return r},ref:function(e,t){Bridge.isArray(t)&&(t=o.Array.toIndex(e,t));var n={};return Object.defineProperty(n,"v",{get:function(){return null==t?e:e[t]},set:function(n){null==t&&(n&&n.$clone?n.$clone(e):e=n),e[t]=n}}),n},ensureBaseProperty:function(e,t,n){var i=Bridge.getType(e),r=i.$descriptors||[];if(e.$propMap=e.$propMap||{},e.$propMap[t])return e;if(i.$descriptors&&0!==i.$descriptors.length||!n)for(var o=0;o<r.length;o++){var s=r[o];s.name===t&&(a={},u="$"+Bridge.getTypeAlias(s.cls)+"$"+t,s.get&&(a.get=s.get),s.set&&(a.set=s.set),Bridge.property(e,u,a,!1,i,!0))}else{var a,u="$"+n+"$"+t;(a={}).get=function(){return e[t]},a.set=function(n){e[t]=n},Bridge.property(e,u,a,!1,i,!0)}return e.$propMap[t]=!0,e},property:function(e,t,n,i,r,o){var s,a,u,l={enumerable:!o,configurable:!0};if(n&&n.get&&(l.get=n.get),n&&n.set&&(l.set=n.set),!n||!n.get&&!n.set){var c=Bridge.getTypeAlias(r)+"$"+t;r.$init=r.$init||{},i&&(r.$init[c]=n),a=c,u=n,(s=l).get=function(){var e=this.$init[a];return void 0===e?u:e},s.set=function(e){this.$init[a]=e}}return Object.defineProperty(e,t,l),l},event:function(e,t,n,i){e[t]=n;var r,o,s,a,u="$"===t.charAt(0)?t.slice(1):t,l="add"+u,c="remove"+u,h=t.lastIndexOf("$");0<h&&0<t.length-h-1&&!isNaN(parseInt(t.substr(h+1)))&&(h=t.substring(0,h-1).lastIndexOf("$")),0<h&&h!==t.length-1&&(l=t.substring(0,h)+"add"+t.substr(h+1),c=t.substring(0,h)+"remove"+t.substr(h+1)),e[l]=(r=t,o=e,i?function(e){o[r]=Bridge.fn.combine(o[r],e)}:function(e){this[r]=Bridge.fn.combine(this[r],e)}),e[c]=(s=t,a=e,i?function(e){a[s]=Bridge.fn.remove(a[s],e)}:function(e){this[s]=Bridge.fn.remove(this[s],e)})},createInstance:function(e,t){return e===o.Decimal?o.Decimal.Zero:e===o.Int64?o.Int64.Zero:e===o.UInt64?o.UInt64.Zero:e===o.Double||e===o.Single||e===o.Byte||e===o.SByte||e===o.Int16||e===o.UInt16||e===o.Int32||e===o.UInt32||e===Bridge.Int?0:"function"==typeof e.createInstance?e.createInstance():"function"==typeof e.getDefaultValue?e.getDefaultValue():e!==Boolean&&e!==o.Boolean&&(e===o.DateTime?o.DateTime.getDefaultValue():e===Date?new Date:e===Number?0:e===String||e===o.String?"":e&&e.$literal?e.ctor():t&&0<t.length?Bridge.Reflection.applyConstructor(e,t):new e)},clone:function(e){return null==e?e:Bridge.isArray(e)?o.Array.clone(e):Bridge.isString(e)?e:Bridge.isFunction(Bridge.getProperty(e,"System$ICloneable$clone"))?e.System$ICloneable$clone():Bridge.is(e,o.ICloneable)?e.clone():Bridge.isFunction(e.$clone)?e.$clone():null},copy:function(e,t,n,i){"string"==typeof n&&(n=n.split(/[,;\s]+/));for(var r,s=0,a=n?n.length:0;s<a;s++)r=n[s],!0===i&&null!=e[r]||(Bridge.is(t[r],o.ICloneable)?e[r]=Bridge.clone(t[r]):e[r]=t[r]);return e},get:function(e){return e&&null!==e.$staticInit&&e.$staticInit(),e},ns:function(e,t){var n=e.split("."),i=0;for(t||(t=Bridge.global),i=0;i<n.length;i++)void 0===t[n[i]]&&(t[n[i]]={}),t=t[n[i]];return t},ready:function(e,t){var n=function(){t?e.apply(t):e()};void 0!==Bridge.global.jQuery?Bridge.global.jQuery(n):void 0===Bridge.global.document||"complete"===Bridge.global.document.readyState||"loaded"===Bridge.global.document.readyState||"interactive"===Bridge.global.document.readyState?n():Bridge.on("DOMContentLoaded",Bridge.global.document,n)},on:function(e,t,n,i){t.addEventListener?t.addEventListener(e,function(e){var t=n.apply(i||this,arguments);return!1===t&&(e.stopPropagation(),e.preventDefault()),t},!1):t.attachEvent("on"+e,function(){var e=n.call(i||t,Bridge.global.event);return!1===e&&(Bridge.global.event.returnValue=!1,Bridge.global.event.cancelBubble=!0),e})},addHash:function(e,t,n){if(isNaN(t)&&(t=17),isNaN(n)&&(n=23),Bridge.isArray(e)){for(var i=0;i<e.length;i++)t=t+((t*n|0)+(null==e[i]?0:Bridge.getHashCode(e[i])))|0;return t}return t+((t*n|0)+(null==e?0:Bridge.getHashCode(e)))|0},getHashCode:function(e,t,n){if(e&&e.$boxed&&e.type.getHashCode)return e.type.getHashCode(Bridge.unbox(e,!0));if(e=Bridge.unbox(e,!0),Bridge.isEmpty(e,!0)){if(t)return 0;throw new o.InvalidOperationException.$ctor1("HashCode cannot be calculated for empty value")}if(!1!==n&&e.hasOwnProperty("Item1")&&Bridge.isPlainObject(e)&&(n=!0),e.getHashCode&&Bridge.isFunction(e.getHashCode)&&!e.__insideHashCode&&0===e.getHashCode.length){e.__insideHashCode=!0;var i=e.getHashCode();return delete e.__insideHashCode,i}if(Bridge.isBoolean(e))return e?1:0;if(Bridge.isDate(e))return 4294967295&e.valueOf();if(e===Number.POSITIVE_INFINITY)return 2146435072;if(e===Number.NEGATIVE_INFINITY)return 4293918720;if(Bridge.isNumber(e)){if(Math.floor(e)===e)return e;e=e.toExponential()}if(Bridge.isString(e)){var r,s=0;for(r=0;r<e.length;r++)s=(s<<5)-s+e.charCodeAt(r)&4294967295;return s}if(e.$$hashCode)return e.$$hashCode;if(n&&"object"==typeof e){var a=0;for(var u in e)e.hasOwnProperty(u)&&(a=29*a+(Bridge.isEmpty(e[u],!0)?0:Bridge.getHashCode(e[u])));if(0!==a)return e.$$hashCode=a}return e.$$hashCode=4294967296*Math.random()|0,e.$$hashCode},getDefaultValue:function(e){if(null==e)throw new o.ArgumentNullException.$ctor1("type");return e.getDefaultValue&&0===e.getDefaultValue.length?e.getDefaultValue():Bridge.Reflection.isEnum(e)?o.Enum.parse(e,0):e!==Boolean&&e!==o.Boolean&&(e===o.DateTime?o.DateTime.getDefaultValue():e===Date?new Date:e===Number?0:null)},$$aliasCache:[],getTypeAlias:function(e){if(e.$$alias)return e.$$alias;var t,n=e.$$name||"function"==typeof e?e:Bridge.getType(e);return n.$$alias?n.$$alias:((t=Bridge.$$aliasCache[n])||(t=n.$isArray?Bridge.getTypeAlias(n.$elementType)+"$Array"+(1<n.$rank?"$"+n.$rank:""):(e.$$name||Bridge.getTypeName(e)).replace(/[\.\(\)\,\+]/g,"$"),n.$$name?n.$$alias=t:Bridge.$$aliasCache[n]=t),t)},getTypeName:function(e){return Bridge.Reflection.getTypeFullName(e)},hasValue:function(e){return null!=Bridge.unbox(e,!0)},hasValue$1:function(){if(0===arguments.length)return!1;for(var e=0;e<arguments.length;e++)if(null==Bridge.unbox(arguments[e],!0))return!1;return!0},isObject:function(e){return e===Object||e===o.Object},is:function(e,t,n,i){if(null==e)return!!i;t===o.Object&&(t=Object);var r=typeof t;if("boolean"===r)return t;if(e.$boxed){if("enum"===e.type.$kind&&(e.type.prototype.$utype===t||t===o.Enum||t===o.IFormattable||t===o.IComparable))return!0;if("interface"!==t.$kind&&!t.$nullable)return e.type===t||Bridge.isObject(t);if(!0!==n&&t.$is)return t.$is(Bridge.unbox(e,!0));if(Bridge.Reflection.isAssignableFrom(t,e.type))return!0;e=Bridge.unbox(e,!0)}var s=e.constructor===Object&&e.$getType?e.$getType():Bridge.Reflection.convertType(e.constructor);if(t.constructor===Function&&e instanceof t||s===t||Bridge.isObject(t))return!0;var a=s.$kind||s.$$inherits,u=t.$kind;if(a||u){if(t.$isInterface){if(a)return s.$isArrayEnumerator?o.Array.is(e,t):t.isAssignableFrom?t.isAssignableFrom(s):0<=Bridge.Reflection.getInterfaces(s).indexOf(t);if(Bridge.isArray(e,s))return o.Array.is(e,t)}return!0!==n&&t.$is?t.$is(e):!(!t.$literal||!Bridge.isPlainObject(e))&&(!e.$getType||Bridge.Reflection.isAssignableFrom(t,e.$getType()))}if("string"===r&&(t=Bridge.unroll(t)),"function"===r&&Bridge.getType(e).prototype instanceof t)return!0;if(!0!==n){if("function"==typeof t.$is)return t.$is(e);if("function"==typeof t.isAssignableFrom)return t.isAssignableFrom(Bridge.getType(e))}return Bridge.isArray(e)?o.Array.is(e,t):"object"===r&&(s===t||e instanceof t)},as:function(e,t,n){return Bridge.is(e,t,!1,n)?null!=e&&e.$boxed&&t!==Object&&t!==o.Object?e.v:e:null},cast:function(e,t,n){if(null==e)return e;var i=Bridge.is(e,t,!1,n)?e:null;if(null===i)throw new o.InvalidCastException.$ctor1("Unable to cast type "+(e?Bridge.getTypeName(e):"'null'")+" to type "+Bridge.getTypeName(t));return e.$boxed&&t!==Object&&t!==o.Object?e.v:i},apply:function(e,t,n){var i,r=Bridge.getPropertyNames(t,!0);for(i=0;i<r.length;i++){var o=r[i];"function"==typeof e[o]&&"function"!=typeof t[o]?e[o](t[o]):e[o]=t[o]}return n&&n.call(e,e),e},copyProperties:function(e,t){var n,i=Bridge.getPropertyNames(t,!1);for(n=0;n<i.length;n++){var r=i[n],o=t.hasOwnProperty(r),s=r.split("$").length;o&&(1===s||2===s&&r.match("$d+$"))&&(e[r]=t[r])}return e},merge:function(e,t,n,i){if(null==e)return t;if(e instanceof o.Decimal&&"number"==typeof t)return new o.Decimal(t);if(e instanceof o.Int64&&Bridge.isNumber(t))return new o.Int64(t);if(e instanceof o.UInt64&&Bridge.isNumber(t))return new o.UInt64(t);if(e instanceof Boolean||Bridge.isBoolean(e)||"number"==typeof e||e instanceof String||Bridge.isString(e)||e instanceof Function||Bridge.isFunction(e)||e instanceof Date||Bridge.isDate(e)||Bridge.getType(e).$number)return t;var r,s,a,u;if(Bridge.isArray(t)&&Bridge.isFunction(e.add||e.push))for(u=Bridge.isArray(e)?e.push:e.add,g=0;g<t.length;g++){var l=t[g];Bridge.isArray(l)||(l=[void 0===i?l:Bridge.merge(i(),l)]),u.apply(e,l)}else{var c=Bridge.getType(e),h=c&&c.$descriptors;if(!t)return n&&n.call(e,e),t;for(r in t){s=t[r];var f=null;if(h)for(var g=h.length-1;0<=g;g--)if(h[g].name===r){f=h[g];break}if(null!=f)f.set?e[r]=Bridge.merge(e[r],s):Bridge.merge(e[r],s);else if("function"==typeof e[r])r.match(/^\s*get[A-Z]/)?Bridge.merge(e[r](),s):e[r](s);else{var d,m="set"+r.charAt(0).toUpperCase()+r.slice(1),p="set"+r;if("function"==typeof e[m]&&"function"!=typeof s)"function"==typeof e[d="g"+m.slice(1)]?e[m](Bridge.merge(e[d](),s)):e[m](s);else if("function"==typeof e[p]&&"function"!=typeof s)"function"==typeof e[d="g"+p.slice(1)]?e[p](Bridge.merge(e[d](),s)):e[p](s);else if(s&&s.constructor===Object&&e[r])a=e[r],Bridge.merge(a,s);else{var y=Bridge.isNumber(t);if(e[r]instanceof o.Decimal&&y)return new o.Decimal(t);if(e[r]instanceof o.Int64&&y)return new o.Int64(t);if(e[r]instanceof o.UInt64&&y)return new o.UInt64(t);e[r]=s}}}}return n&&n.call(e,e),e},getEnumerator:function(e,t,n){if("string"==typeof e&&(e=o.String.toCharArray(e)),2===arguments.length&&Bridge.isFunction(t)&&(n=t,t=null),t&&e&&e[t])return e[t].call(e);if(!n&&e&&e.GetEnumerator)return e.GetEnumerator();var i;if(n&&Bridge.isFunction(Bridge.getProperty(e,i="System$Collections$Generic$IEnumerable$1$"+Bridge.getTypeAlias(n)+"$GetEnumerator")))return e[i]();if(n&&Bridge.isFunction(Bridge.getProperty(e,i="System$Collections$Generic$IEnumerable$1$GetEnumerator")))return e[i]();if(Bridge.isFunction(Bridge.getProperty(e,i="System$Collections$IEnumerable$GetEnumerator")))return e[i]();if(n&&e&&e.GetEnumerator)return e.GetEnumerator();if("[object Array]"===Object.prototype.toString.call(e)||e&&Bridge.isDefined(e.length))return new Bridge.ArrayEnumerator(e,n);throw new o.InvalidOperationException.$ctor1("Cannot create Enumerator.")},getPropertyNames:function(e,t){var n,i=[];for(n in e)(t||"function"!=typeof e[n])&&i.push(n);return i},getProperty:function(e,t){if(!Bridge.isHtmlAttributeCollection(e)||this.isValidHtmlAttributeName(t))return e[t]},isValidHtmlAttributeName:function(e){return!(!e||!e.length)&&/^[a-zA-Z_][\w\-]*$/.test(e)},isHtmlAttributeCollection:function(e){return void 0!==e&&"[object NamedNodeMap]"===Object.prototype.toString.call(e)},isDefined:function(e,t){return void 0!==e&&(!t||null!==e)},isEmpty:function(e,t){return null==e||!t&&""===e||!(t||!Bridge.isArray(e))&&0===e.length},toArray:function(e){var t,n,i,r=[];if(Bridge.isArray(e))for(t=0,i=e.length;t<i;++t)r.push(e[t]);else for(t=Bridge.getEnumerator(e);t.moveNext();)n=t.Current,r.push(n);return r},toList:function(e,t){return new(o.Collections.Generic.List$1(t||o.Object).$ctor1)(e)},arrayTypes:[a.Array,a.Uint8Array,a.Int8Array,a.Int16Array,a.Uint16Array,a.Int32Array,a.Uint32Array,a.Float32Array,a.Float64Array,a.Uint8ClampedArray],isArray:function(e,t){var n=t||(null!=e?e.constructor:null);return!!n&&(0<=Bridge.arrayTypes.indexOf(n)||n.$isArray||Array.isArray(e))},isFunction:function(e){return"function"==typeof e},isDate:function(e){return e instanceof Date},isNull:function(e){return null==e},isBoolean:function(e){return"boolean"==typeof e},isNumber:function(e){return"number"==typeof e&&isFinite(e)},isString:function(e){return"string"==typeof e},unroll:function(e,t){for(var n=e.split("."),i=(t||Bridge.global)[n[0]],r=1;r<n.length;r++){if(!i)return null;i=i[n[r]]}return i},referenceEquals:function(e,t){return Bridge.hasValue(e)?e===t:!Bridge.hasValue(t)},staticEquals:function(e,t){return Bridge.hasValue(e)?!!Bridge.hasValue(t)&&Bridge.equals(e,t):!Bridge.hasValue(t)},equals:function(e,t){if(null==e&&null==t)return!0;var n=Bridge.$equalsGuard[Bridge.$equalsGuard.length-1];if(n&&n.a===e&&n.b===t)return e===t;Bridge.$equalsGuard.push({a:e,b:t});var i=function(e,t){if(e&&e.$boxed&&e.type.equals&&2===e.type.equals.length)return e.type.equals(e,t);if(t&&t.$boxed&&t.type.equals&&2===t.type.equals.length)return t.type.equals(t,e);if(e&&Bridge.isFunction(e.equals)&&1===e.equals.length)return e.equals(t);if(t&&Bridge.isFunction(t.equals)&&1===t.equals.length)return t.equals(e);if(Bridge.isFunction(e)&&Bridge.isFunction(t))return Bridge.fn.equals.call(e,t);if(Bridge.isDate(e)&&Bridge.isDate(t))return void 0!==e.kind&&void 0!==e.ticks&&void 0!==t.kind&&void 0!==t.ticks?e.ticks.equals(t.ticks):e.valueOf()===t.valueOf();if(Bridge.isNull(e)&&Bridge.isNull(t))return!0;if(Bridge.isNull(e)!==Bridge.isNull(t))return!1;var n=e===t;return n||"object"!=typeof e||"object"!=typeof t||null===e||null===t||"struct"!==e.$kind||"struct"!==t.$kind||e.$$name!==t.$$name?!n&&e&&t&&e.hasOwnProperty("Item1")&&Bridge.isPlainObject(e)&&t.hasOwnProperty("Item1")&&Bridge.isPlainObject(t)?Bridge.objectEquals(e,t):n:Bridge.getHashCode(e)===Bridge.getHashCode(t)&&Bridge.objectEquals(e,t)}(e,t);return Bridge.$equalsGuard.pop(),i},objectEquals:function(e,t){Bridge.$$leftChain=[],Bridge.$$rightChain=[];var n=Bridge.deepEquals(e,t);return delete Bridge.$$leftChain,delete Bridge.$$rightChain,n},deepEquals:function(e,t){if("object"!=typeof e||"object"!=typeof t)return Bridge.equals(e,t);if(e===t)return!0;if(-1<Bridge.$$leftChain.indexOf(e)||-1<Bridge.$$rightChain.indexOf(t))return!1;var n;for(n in t){if(t.hasOwnProperty(n)!==e.hasOwnProperty(n))return!1;if(typeof t[n]!=typeof e[n])return!1}for(n in e){if(t.hasOwnProperty(n)!==e.hasOwnProperty(n))return!1;if(typeof e[n]!=typeof t[n])return!1;if(e[n]!==t[n])if("object"==typeof e[n]){if(Bridge.$$leftChain.push(e),Bridge.$$rightChain.push(t),!Bridge.deepEquals(e[n],t[n]))return!1;Bridge.$$leftChain.pop(),Bridge.$$rightChain.pop()}else if(!Bridge.equals(e[n],t[n]))return!1}return!0},numberCompare:function(e,t){return e<t?-1:t<e?1:e==t?0:isNaN(e)?isNaN(t)?0:-1:1},compare:function(e,t,n,i){if(e&&e.$boxed&&(e=Bridge.unbox(e,!0)),t&&t.$boxed&&(t=Bridge.unbox(t,!0)),"number"==typeof e&&"number"==typeof t)return Bridge.numberCompare(e,t);if(!Bridge.isDefined(e,!0)){if(n)return 0;throw new o.NullReferenceException}if(Bridge.isNumber(e)||Bridge.isString(e)||Bridge.isBoolean(e))return Bridge.isString(e)&&!Bridge.hasValue(t)?1:e<t?-1:t<e?1:0;if(Bridge.isDate(e))return void 0!==e.kind&&void 0!==e.ticks?Bridge.compare(e.ticks,t.ticks):Bridge.compare(e.valueOf(),t.valueOf());var r;if(i&&Bridge.isFunction(Bridge.getProperty(e,r="System$IComparable$1$"+Bridge.getTypeAlias(i)+"$compareTo")))return e[r](t);if(i&&Bridge.isFunction(Bridge.getProperty(e,r="System$IComparable$1$compareTo")))return e[r](t);if(Bridge.isFunction(Bridge.getProperty(e,r="System$IComparable$compareTo")))return e[r](t);if(Bridge.isFunction(e.compareTo))return e.compareTo(t);if(i&&Bridge.isFunction(Bridge.getProperty(t,r="System$IComparable$1$"+Bridge.getTypeAlias(i)+"$compareTo")))return-t[r](e);if(i&&Bridge.isFunction(Bridge.getProperty(t,r="System$IComparable$1$compareTo")))return-t[r](e);if(Bridge.isFunction(Bridge.getProperty(t,r="System$IComparable$compareTo")))return-t[r](e);if(Bridge.isFunction(t.compareTo))return-t.compareTo(e);if(n)return 0;throw new o.Exception("Cannot compare items")},equalsT:function(e,t,n){if(e&&e.$boxed&&e.type.equalsT&&2===e.type.equalsT.length)return e.type.equalsT(e,t);if(t&&t.$boxed&&t.type.equalsT&&2===t.type.equalsT.length)return t.type.equalsT(t,e);if(!Bridge.isDefined(e,!0))throw new o.NullReferenceException;return Bridge.isNumber(e)||Bridge.isString(e)||Bridge.isBoolean(e)?e===t:Bridge.isDate(e)?void 0!==e.kind&&void 0!==e.ticks?e.ticks.equals(t.ticks):e.valueOf()===t.valueOf():n&&null!=e&&Bridge.isFunction(Bridge.getProperty(e,i="System$IEquatable$1$"+Bridge.getTypeAlias(n)+"$equalsT"))?e[i](t):n&&null!=t&&Bridge.isFunction(Bridge.getProperty(t,i="System$IEquatable$1$"+Bridge.getTypeAlias(n)+"$equalsT"))?t[i](e):Bridge.isFunction(e)&&Bridge.isFunction(t)?Bridge.fn.equals.call(e,t):e.equalsT?e.equalsT(t):t.equalsT(e);var i},format:function(e,t,n){if(e&&e.$boxed){if("enum"===e.type.$kind)return o.Enum.format(e.type,e.v,t);if(e.type===o.Char)return o.Char.format(Bridge.unbox(e,!0),t,n);if(e.type.format)return e.type.format(Bridge.unbox(e,!0),t,n)}return Bridge.isNumber(e)?Bridge.Int.format(e,t,n):Bridge.isDate(e)?o.DateTime.format(e,t,n):Bridge.isFunction(Bridge.getProperty(e,"System$IFormattable$format"))?e.System$IFormattable$format(t,n):e.format(t,n)},getType:function(e,t){if(e&&e.$boxed)return e.type;if(null==e)throw new o.NullReferenceException.$ctor1("instance is null");if(t){var n=Bridge.getType(e);return Bridge.Reflection.isAssignableFrom(t,n)?n:t}if("number"==typeof e)return!isNaN(e)&&isFinite(e)&&Math.floor(e,0)===e?o.Int32:o.Double;if(e.$type)return e.$type;if(e.$getType)return e.$getType();var i=null;try{i=e.constructor}catch(e){i=Object}if(i===Object){var r=e.toString(),s=/\[object (.{1,})\]/.exec(r);"Object"!=(s&&1<s.length?s[1]:"Object")&&(i=e)}return Bridge.Reflection.convertType(i)},isLower:function(e){var t=String.fromCharCode(e);return t===t.toLowerCase()&&t!==t.toUpperCase()},isUpper:function(e){var t=String.fromCharCode(e);return t!==t.toLowerCase()&&t===t.toUpperCase()},coalesce:function(e,t){return Bridge.hasValue(e)?e:t},fn:{equals:function(e){return this===e||null!=e&&this.constructor===e.constructor&&this.equals&&this.equals===e.equals&&this.$method&&this.$method===e.$method&&this.$scope&&this.$scope===e.$scope},call:function(e,t){var n=Array.prototype.slice.call(arguments,2);return(e=e||Bridge.global)[t].apply(e,n)},makeFn:function(e,t){switch(t){case 0:return function(){return e.apply(this,arguments)};case 1:return function(t){return e.apply(this,arguments)};case 2:return function(t,n){return e.apply(this,arguments)};case 3:return function(t,n,i){return e.apply(this,arguments)};case 4:return function(t,n,i,r){return e.apply(this,arguments)};case 5:return function(t,n,i,r,o){return e.apply(this,arguments)};case 6:return function(t,n,i,r,o,s){return e.apply(this,arguments)};case 7:return function(t,n,i,r,o,s,a){return e.apply(this,arguments)};case 8:return function(t,n,i,r,o,s,a,u){return e.apply(this,arguments)};case 9:return function(t,n,i,r,o,s,a,u,l){return e.apply(this,arguments)};case 10:return function(t,n,i,r,o,s,a,u,l,c){return e.apply(this,arguments)};case 11:return function(t,n,i,r,o,s,a,u,l,c,h){return e.apply(this,arguments)};case 12:return function(t,n,i,r,o,s,a,u,l,c,h,f){return e.apply(this,arguments)};case 13:return function(t,n,i,r,o,s,a,u,l,c,h,f,g){return e.apply(this,arguments)};case 14:return function(t,n,i,r,o,s,a,u,l,c,h,f,g,d){return e.apply(this,arguments)};case 15:return function(t,n,i,r,o,s,a,u,l,c,h,f,g,d,m){return e.apply(this,arguments)};case 16:return function(t,n,i,r,o,s,a,u,l,c,h,f,g,d,m,p){return e.apply(this,arguments)};case 17:return function(t,n,i,r,o,s,a,u,l,c,h,f,g,d,m,p,y){return e.apply(this,arguments)};case 18:return function(t,n,i,r,o,s,a,u,l,c,h,f,g,d,m,p,y,$){return e.apply(this,arguments)};case 19:return function(t,n,i,r,o,s,a,u,l,c,h,f,g,d,m,p,y,$,C){return e.apply(this,arguments)};default:return function(t,n,i,r,o,s,a,u,l,c,h,f,g,d,m,p,y,$,C,x){return e.apply(this,arguments)}}},cacheBind:function(e,t,n,i){return Bridge.fn.bind(e,t,n,i,!0)},bind:function(e,t,n,i,r){if(t&&t.$method===t&&t.$scope===e)return t;if(e&&r&&e.$$bind)for(var o=0;o<e.$$bind.length;o++)if(e.$$bind[o].$method===t)return e.$$bind[o];var s;return s=2===arguments.length?Bridge.fn.makeFn(function(){Bridge.caller.unshift(this);var n=null;try{n=t.apply(e,arguments)}finally{Bridge.caller.shift(this)}return n},t.length):Bridge.fn.makeFn(function(){var r=n||arguments;!0===i?r=(r=Array.prototype.slice.call(arguments,0)).concat(n):"number"==typeof i&&(r=Array.prototype.slice.call(arguments,0),0===i?r.unshift.apply(r,n):i<r.length?r.splice.apply(r,[i,0].concat(n)):r.push.apply(r,n)),Bridge.caller.unshift(this);var o=null;try{o=t.apply(e,r)}finally{Bridge.caller.shift(this)}return o},t.length),e&&r&&(e.$$bind=e.$$bind||[],e.$$bind.push(s)),s.$method=t,s.$scope=e,s.equals=Bridge.fn.equals,s},bindScope:function(e,t){var n=Bridge.fn.makeFn(function(){var n=Array.prototype.slice.call(arguments,0);n.unshift.apply(n,[e]),Bridge.caller.unshift(this);var i=null;try{i=t.apply(e,n)}finally{Bridge.caller.shift(this)}return i},t.length);return n.$method=t,n.$scope=e,n.equals=Bridge.fn.equals,n},$build:function(e){if(!e||0===e.length)return null;var t=function(){var t,n=null;for(t=0;t<e.length;t++)n=e[t].apply(null,arguments);return n};return t.$invocationList=e?Array.prototype.slice.call(e,0):[],e=t.$invocationList.slice(),t},combine:function(e,t){if(!e||!t){var n=e||t;return n?Bridge.fn.$build([n]):n}var i=e.$invocationList?e.$invocationList:[e],r=t.$invocationList?t.$invocationList:[t];return Bridge.fn.$build(i.concat(r))},getInvocationList:function(e){if(null==e)throw new o.ArgumentNullException;return e.$invocationList||(e.$invocationList=[e]),e.$invocationList},remove:function(e,t){if(!e||!t)return e||null;var n,i,r,o=e.$invocationList?e.$invocationList:[e],s=t.$invocationList?t.$invocationList:[t];for(r=0;r<s.length;r++){for(n=-1,i=o.length-1;0<=i;i--)if(o[i]===s[r]||o[i].$method&&o[i].$method===s[r].$method&&o[i].$scope&&o[i].$scope===s[r].$scope){n=i;break}-1<n&&o.splice(n,1)}return Bridge.fn.$build(o)}},sleep:function(e,t){if(Bridge.hasValue(t)&&(e=t.getTotalMilliseconds()),isNaN(e)||e<-1||2147483647<e)throw new o.ArgumentOutOfRangeException.$ctor4("timeout","Number must be either non-negative and less than or equal to Int32.MaxValue or -1");-1==e&&(e=2147483647);for(var n=(new Date).getTime();(new Date).getTime()-n<e&&!(2147483647<(new Date).getTime()-n););},getMetadata:function(e){return e.$getMetadata?e.$getMetadata():e.$metadata},loadModule:function(e,t){var n=e.amd,i=e.cjs,r=e.fn,s=new o.Threading.Tasks.TaskCompletionSource,a=Bridge.global[r||"require"];if(n&&0<n.length)return a(n,function(){var e=Array.prototype.slice.call(arguments,0);if(i&&0<i.length)for(var n=0;n<i.length;n++)e.push(a(i[n]));t.apply(Bridge.global,e),s.setResult()}),s.task;if(i&&0<i.length){var u;(u=new o.Threading.Tasks.Task).status=o.Threading.Tasks.TaskStatus.ranToCompletion;for(var l=[],c=0;c<i.length;c++)l.push(a(i[c]));return t.apply(Bridge.global,l),u}return(u=new o.Threading.Tasks.Task).status=o.Threading.Tasks.TaskStatus.ranToCompletion,u}};a.setImmediate?u.setImmediate=a.setImmediate.bind(a):u.setImmediate=function(){var e={},t=e,n=Math.random();function i(t){if(t.data==n){var i=(e=e.next).func;delete e.func,i()}}return"undefined"!=typeof window&&(window.addEventListener?window.addEventListener("message",i):window.attachEvent("onmessage",i)),function(e){t=t.next={func:e},"undefined"!=typeof window&&window.postMessage(n,"*")}}(),a.Bridge=u,a.Bridge.caller=[],a.Bridge.$equalsGuard=[],a.Bridge.$toStringGuard=[],a.console&&(a.Bridge.Console=a.console),a.System={},o=a.System,a.System.Diagnostics={},a.System.Diagnostics.Contracts={},a.System.Threading={};var l=function(e){return Bridge.global.navigator&&e.test(Bridge.global.navigator.userAgent.toLowerCase())},c=Bridge.global.document&&"CSS1Compat"===Bridge.global.document.compatMode,h=function(e,t){var n;return Bridge.global.navigator&&e&&(n=t.exec(navigator.userAgent.toLowerCase()))?parseFloat(n[1]):0},f=Bridge.global.document?Bridge.global.document.documentMode:null,g=l(/opera/),d=g&&l(/version\/10\.5/),m=l(/\bchrome\b/),p=l(/webkit/),y=!m&&l(/safari/),$=y&&l(/applewebkit\/4/),C=y&&l(/version\/3/),x=y&&l(/version\/4/),E=y&&l(/version\/5\.0/),_=y&&l(/version\/5/),A=!g&&(l(/msie/)||l(/trident/)),I=A&&(l(/msie 7/)&&8!==f&&9!==f&&10!==f||7===f),v=A&&(l(/msie 8/)&&7!==f&&9!==f&&10!==f||8===f),B=A&&(l(/msie 9/)&&7!==f&&8!==f&&10!==f||9===f),w=A&&(l(/msie 10/)&&7!==f&&8!==f&&9!==f||10===f),S=A&&(l(/trident\/7\.0/)&&7!==f&&8!==f&&9!==f&&10!==f||11===f),b=A&&l(/msie 6/),T=!p&&!A&&l(/gecko/),D=T&&l(/rv:1\.9/),O=T&&l(/rv:2\.0/),R=T&&l(/rv:5\./),N=T&&l(/rv:10\./),F=D&&l(/rv:1\.9\.0/),k=D&&l(/rv:1\.9\.1/),G=D&&l(/rv:1\.9\.2/),M=l(/windows|win32/),P=l(/macintosh|mac os x/),L=l(/linux/),z=h(!0,/\bchrome\/(\d+\.\d+)/),V=h(!0,/\bfirefox\/(\d+\.\d+)/),q=h(A,/msie (\d+\.\d+)/),U=h(g,/version\/(\d+\.\d+)/),W=h(y,/version\/(\d+\.\d+)/),H=h(p,/webkit\/(\d+\.\d+)/),j=!!Bridge.global.location&&/^https/i.test(Bridge.global.location.protocol),K=Bridge.global.navigator&&/iPhone/i.test(Bridge.global.navigator.platform),Z=Bridge.global.navigator&&/iPod/i.test(Bridge.global.navigator.platform),Y=Bridge.global.navigator&&/iPad/i.test(Bridge.global.navigator.userAgent),J=Bridge.global.navigator&&/Blackberry/i.test(Bridge.global.navigator.userAgent),X=Bridge.global.navigator&&/Android/i.test(Bridge.global.navigator.userAgent),Q=P||M||L&&!X,ee={isStrict:c,isIEQuirks:A&&!c&&(b||I||v||B),isOpera:g,isOpera10_5:d,isWebKit:p,isChrome:m,isSafari:y,isSafari3:C,isSafari4:x,isSafari5:_,isSafari5_0:E,isSafari2:$,isIE:A,isIE6:b,isIE7:I,isIE7m:b||I,isIE7p:A&&!b,isIE8:v,isIE8m:b||I||v,isIE8p:A&&!(b||I),isIE9:B,isIE9m:b||I||v||B,isIE9p:A&&!(b||I||v),isIE10:w,isIE10m:b||I||v||B||w,isIE10p:A&&!(b||I||v||B),isIE11:S,isIE11m:b||I||v||B||w||S,isIE11p:A&&!(b||I||v||B||w),isGecko:T,isGecko3:D,isGecko4:O,isGecko5:R,isGecko10:N,isFF3_0:F,isFF3_5:k,isFF3_6:G,isFF4:4<=V&&V<5,isFF5:5<=V&&V<6,isFF10:10<=V&&V<11,isLinux:L,isWindows:M,isMac:P,chromeVersion:z,firefoxVersion:V,ieVersion:q,operaVersion:U,safariVersion:W,webKitVersion:H,isSecure:j,isiPhone:K,isiPod:Z,isiPad:Y,isBlackberry:J,isAndroid:X,isDesktop:Q,isTablet:Y,isPhone:!Q&&!Y,iOS:K||Y||Z,standalone:!!Bridge.global.navigator&&!!Bridge.global.navigator.standalone};Bridge.Browser=ee;var te={_initialize:function(){this.$init||(this.$init={},this.$staticInit&&this.$staticInit(),this.$initMembers&&this.$initMembers())},initConfig:function(e,t,n,i,r,o){var s,a,u=i?r:r.ctor,l=u.$descriptors,c=u.$aliases;if(n.fields)for(a in n.fields)r[a]=n.fields[a];var h=n.properties;if(h)for(a in h){var f,g,d=h[a];if(null!=d&&Bridge.isPlainObject(d)&&(!d.get||!d.set)){for(var m=0;m<l.length;m++)l[m].name===a&&(f=l[m]);f&&f.get&&!d.get&&(d.get=f.get),f&&f.set&&!d.set&&(d.set=f.set)}(g=Bridge.property(i?r:o,a,d,i,u)).name=a,g.cls=u,l.push(g)}if(n.events)for(a in n.events)Bridge.event(r,a,n.events[a],i);if(n.alias)for(var p=0;p<n.alias.length;p++)!function(e,t,n,i){for(var s=null,a=l.length-1;0<=a;a--)if(l[a].name===t){s=l[a];break}for(var u=Array.isArray(n)?n:[n],h=0;h<u.length;h++)if(n=u[h],null!=s)Object.defineProperty(e,n,s),c.push({alias:n,descriptor:s});else{var f=r[t];void 0===f&&o&&(f=o[t]),Bridge.isFunction(f)?(e[n]=f,c.push({fn:t,alias:n})):(s={get:function(){return this[t]},set:function(e){this[t]=e}},Object.defineProperty(e,n,s),c.push({alias:n,descriptor:s}))}}(i?r:o,n.alias[p],n.alias[p+1]),p++;n.init&&(s=n.init),(s||e&&!i&&t.$initMembers)&&(r.$initMembers=function(){e&&!i&&t.$initMembers&&t.$initMembers.call(this),s&&s.call(this)})},convertScheme:function(e){var t={},n=function(e,t){for(var n=["fields","methods","events","props","properties","alias","ctors"],i=Object.keys(e),r=0;r<i.length;r++){var o=i[r];-1===n.indexOf(o)&&(t[o]=e[o])}e.fields&&Bridge.apply(t,e.fields),e.methods&&Bridge.apply(t,e.methods);var s={},a=!1;e.props?(s.properties=e.props,a=!0):e.properties&&(s.properties=e.properties,a=!0),e.events&&(s.events=e.events,a=!0),e.alias&&(s.alias=e.alias,a=!0),e.ctors&&(e.ctors.init&&(s.init=e.ctors.init,a=!0,delete e.ctors.init),Bridge.apply(t,e.ctors)),a&&(t.$config=s)};return e.main&&(t.$main=e.main,delete e.main),n(e,t),(e.statics||e.$statics)&&(t.$statics={},n(e.statics||e.$statics,t.$statics)),t},definei:function(e,t,n){!0!==n&&n||!t?n?n.$kind="interface":t={$kind:"interface"}:t.$kind="interface";var i=Bridge.define(e,t,n);return i.$kind="interface",i.$isInterface=!0,i},define:function(e,t,n,i){var r,s=!1;if(!0===n?(s=!0,n=t,t=Bridge.global):n||(n=t,t=Bridge.global),Bridge.isFunction(n))return(r=function(){var t,i,o,s;return(i=Bridge.Class.getCachedType(r,arguments))?i.type:(t=Array.prototype.slice.call(arguments),o=n.apply(null,t),s=Bridge.define(Bridge.Class.genericName(e,t),o,!0,{fn:r,args:t}),Bridge.Class.staticInitAllow||Bridge.Class.queueIsBlocked||Bridge.Class.$queue.push(s),Bridge.get(s))}).$cache=[],Bridge.Class.generic(e,t,r,n);s||(Bridge.Class.staticInitAllow=!1),(n=n||{}).$kind=n.$kind||"class";var a=!1;null!==n.$kind.match("^nested ")&&(a=!0,n.$kind=n.$kind.substr(7)),"enum"!==n.$kind||n.inherits||(n.inherits=[o.IComparable,o.IFormattable]);var u=["fields","events","props","ctors","methods"],l=Bridge.isFunction(n.main)?0:1,c=function(e){if(e.config&&Bridge.isPlainObject(e.config)||e.$main&&Bridge.isFunction(e.$main)||e.hasOwnProperty("ctor")&&Bridge.isFunction(e.ctor))return!(l=1);if(e.alias&&Bridge.isArray(e.alias)&&0<e.alias.length&&e.alias.length%2==0)return!0;for(var t=0;t<u.length;t++)if(e[u[t]]&&Bridge.isPlainObject(e[u[t]]))return!0;return!1},h=c(n);!h&&n.statics&&(h=c(n.statics)),h||(h=0==l),h&&(n=Bridge.Class.convertScheme(n));var f,g,d,m,p,y,$,C,x=n.$inherits||n.inherits,E=n.$statics||n.statics,_=n.$entryPoint,A=n.$scope||t||Bridge.global,I=Bridge.global.System&&Bridge.global.System.Object||Object,v=!0;if("enum"===n.$kind&&(x=[o.Enum]),!0===n.$noRegister&&(v=!1,delete n.$noRegister),n.$inherits?delete n.$inherits:delete n.inherits,_&&delete n.$entryPoint,Bridge.isFunction(E)?E=null:n.$statics?delete n.$statics:delete n.statics,(S=n.hasOwnProperty("ctor")&&n.ctor)?C=S:(C=n.$literal?function(e){return(e=e||{}).$getType=function(){return C},e}:function(){this.$initialize(),C.$base&&(C.$$inherits&&0<C.$$inherits.length&&C.$$inherits[0].$staticInit&&C.$$inherits[0].$staticInit(),C.$base.ctor?C.$base.ctor.call(this):Bridge.isFunction(C.$base.constructor)&&C.$base.constructor.call(this))},n.ctor=C),n.$literal&&(E&&E.createInstance||(C.createInstance=function(){return{$getType:function(){return C}}}),C.$literal=!0,delete n.$literal),!s&&v&&(A=Bridge.Class.set(A,e,C)),i&&i.fn.$cache.push({type:C,args:i.args}),C.$$name=e,a){var B=C.$$name.lastIndexOf(".");C.$$name=C.$$name.substr(0,B)+"+"+C.$$name.substr(B+1)}if(C.$kind=n.$kind,n.$metadata&&(C.$metadata=n.$metadata),i&&s){C.$genericTypeDefinition=i.fn,C.$typeArguments=i.args,C.$assembly=i.fn.$assembly||Bridge.$currentAssembly;var w=Bridge.Reflection.getTypeFullName(i.fn);for(d=0;d<i.args.length;d++)w+=(0===d?"[":",")+"["+Bridge.Reflection.getTypeQName(i.args[d])+"]";w+="]",C.$$fullname=w}else C.$$fullname=C.$$name;if(x&&Bridge.isFunction(x)&&(x=x()),Bridge.Class.createInheritors(C,x),(!x||"interface"===x[0].$kind)&&(x=null),f=x?x[0].prototype:this.prototype,C.$base=f,x&&!x[0].$$initCtor){var S=x[0],b=function(){};(b.prototype=S.prototype).constructor=S,b.prototype.$$fullname=Bridge.Reflection.getTypeFullName(S),g=new b}else g=x?new x[0].$$initCtor:I.$$initCtor?new I.$$initCtor:new I;if(C.$$initCtor=function(){},C.$$initCtor.prototype=g,(C.$$initCtor.prototype.constructor=C).$$initCtor.prototype.$$fullname=i&&s?C.$$fullname:C.$$name,E){var T=E.$config||E.config;T&&!Bridge.isFunction(T)&&(Bridge.Class.initConfig(x,f,T,!0,C),E.$config?delete E.$config:delete E.config)}var D=n.$config||n.config;D&&!Bridge.isFunction(D)?(Bridge.Class.initConfig(x,f,D,!1,n,g),n.$config?delete n.$config:delete n.config):x&&f.$initMembers&&(n.$initMembers=function(){f.$initMembers.call(this)}),n.$initialize=Bridge.Class._initialize;var O=[];for($ in n)O.push($);for(d=0;d<O.length;d++){$=O[d],m=n[$],p="ctor"===$,y=$,Bridge.isFunction(m)&&(p||null!==$.match("^\\$ctor"))&&(p=!0);var R=n[$];g[y]=(p&&(C[y]=R,C[y].prototype=g,C[y].prototype.constructor=C),R)}if(g.$$name=e,g.toJSON||(g.toJSON=Bridge.Class.toJSON),E){for($ in E)R=E[$],"ctor"===$?C.$ctor=R:("enum"!==n.$kind||Bridge.isFunction(R)||"$"===$.charAt(0)||(C.$names=C.$names||[],C.$names.push({name:$,value:R})),C[$]=R);"enum"===n.$kind&&C.$names&&(C.$names=C.$names.sort(function(e,t){return Bridge.isFunction(e.value.eq)?e.value.sub(t.value).sign():e.value-t.value}).map(function(e){return e.name}))}if(x||(x=[I].concat(C.$interfaces)),Bridge.Class.setInheritors(C,x),r=function(){Bridge.Class.staticInitAllow&&!C.$isGenericTypeDefinition&&(C.$staticInit=null,C.$initMembers&&C.$initMembers(),C.$ctor&&C.$ctor())},_||Bridge.isFunction(g.$main)){if(g.$main){var N=g.$main.name||"Main";C[N]||(C[N]=g.$main)}Bridge.Class.$queueEntry.push(C)}return C.$staticInit=r,!s&&v&&Bridge.Class.registerType(e,C),Bridge.Reflection&&(C.$getMetadata=Bridge.Reflection.getMetadata),"enum"===C.$kind&&(C.prototype.$utype||(C.prototype.$utype=o.Int32),C.$is=function(e){var t=C.prototype.$utype;return t===String?"string"==typeof e:t&&t.$is?t.$is(e):"number"==typeof e},C.getDefaultValue=function(){var e=C.prototype.$utype;return e===String||e===o.String?null:0}),"interface"===C.$kind&&(C.prototype.$variance&&(C.isAssignableFrom=Bridge.Class.varianceAssignable),C.$isInterface=!0),C},toCtorString:function(){return Bridge.Reflection.getTypeName(this)},createInheritors:function(e,t){var n=[],i=[],r=[],o=[];if(t)for(var s=0;s<t.length;s++){var a=t[s],u=(a.$interfaces||[]).concat(a.$baseInterfaces||[]),l=a.$descriptors,c=a.$aliases;if(l&&0<l.length)for(var h=0;h<l.length;h++)r.push(l[h]);if(c&&0<c.length)for(h=0;h<c.length;h++)o.push(c[h]);if(0<u.length)for(var f=0;f<u.length;f++)i.indexOf(u[f])<0&&i.push(u[f]);"interface"===a.$kind&&n.push(a)}e.$descriptors=r,e.$aliases=o,e.$baseInterfaces=i,e.$interfaces=n,e.$allInterfaces=n.concat(i)},toJSON:function(){var e={},t=Bridge.getType(this).$descriptors||[];for(var n in this){var i=this.hasOwnProperty(n),r=null;if(!i)for(var o=t.length-1;0<=o;o--)if(t[o].name===n){r=t[o];break}var s=n.split("$").length;(i||null!=r)&&(1===s||2===s&&n.match("$d+$"))&&(e[n]=this[n])}return e},setInheritors:function(e,t){e.$$inherits=t;for(var n=0;n<t.length;n++){var i=t[n];i.$$inheritors||(i.$$inheritors=[]),i.$$inheritors.push(e)}},varianceAssignable:function(e){var t=function(e,t){if(t.$genericTypeDefinition!==e.$genericTypeDefinition||t.$typeArguments.length!==e.$typeArguments.length)return!1;for(var n=0;n<e.$typeArguments.length;n++){var i=e.prototype.$variance[n],r=e.$typeArguments[n],o=t.$typeArguments[n];switch(i){case 1:if(!Bridge.Reflection.isAssignableFrom(r,o))return!1;break;case 2:if(!Bridge.Reflection.isAssignableFrom(o,r))return!1;break;default:if(o!==r)return!1}}return!0};if("interface"===e.$kind&&t(this,e))return!0;for(var n=Bridge.Reflection.getInterfaces(e),i=0;i<n.length;i++)if(n[i]===this||t(this,n[i]))return!0;return!1},registerType:function(e,t){Bridge.$currentAssembly&&((Bridge.$currentAssembly.$types[e]=t).$assembly=Bridge.$currentAssembly)},addExtend:function(e,t){var n,i;for(Array.prototype.push.apply(e.$$inherits,t),e.$interfaces=e.$interfaces||[],e.$baseInterfaces=e.$baseInterfaces||[],n=0;n<t.length;n++){(i=t[n]).$$inheritors||(i.$$inheritors=[]),i.$$inheritors.push(e);var r=(i.$interfaces||[]).concat(i.$baseInterfaces||[]);if(0<r.length)for(var o=0;o<r.length;o++)e.$baseInterfaces.indexOf(r[o])<0&&e.$baseInterfaces.push(r[o]);"interface"===i.$kind&&e.$interfaces.push(i)}e.$allInterfaces=e.$interfaces.concat(e.$baseInterfaces)},set:function(e,t,n,i){var r,o,s,a,u,l,c,h=t.split(".");for(a=0;a<h.length-1;a++)void 0===e[h[a]]&&(e[h[a]]={}),e=e[h[a]];if(s=e[r=h[h.length-1]]){if(s.$$name===t)throw"Class '"+t+"' is already defined";for(o in s){var f=s[o];"function"==typeof f&&f.$$name&&function(e,t,n){Object.defineProperty(e,t,{get:function(){return Bridge.Class.staticInitAllow&&(n.$staticInit&&n.$staticInit(),Bridge.Class.defineProperty(e,t,n)),n},set:function(e){n=e},enumerable:!0,configurable:!0})}(n,o,f)}}return!0!==i?(u=e,l=r,c=n,Object.defineProperty(u,l,{get:function(){return Bridge.Class.staticInitAllow&&(c.$staticInit&&c.$staticInit(),Bridge.Class.defineProperty(u,l,c)),c},set:function(e){c=e},enumerable:!0,configurable:!0})):e[r]=n,e},defineProperty:function(e,t,n){Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0})},genericName:function(e,t){for(var n=e,i=0;i<t.length;i++){var r=t[i];n+="$"+(r.$$name||Bridge.getTypeName(r))}return n},getCachedType:function(e,t){var n,i,r,o,s=e.$cache,a=s.length;for(r=0;r<a;r++)if((n=s[r]).args.length===t.length){for(i=!0,o=0;o<n.args.length;o++)if(n.args[o]!==t[o]){i=!1;break}if(i)return n}return null},generic:function(e,t,n,i){return n.$$name=e,n.$kind="class",Bridge.Class.set(t,e,n,!0),Bridge.Class.registerType(e,n),n.$typeArgumentCount=i.length,n.$isGenericTypeDefinition=!0,n.$getMetadata=Bridge.Reflection.getMetadata,n.$staticInit=function(){n.$typeArguments=Bridge.Reflection.createTypeParams(i);var e=Bridge.Class.staticInitAllow,t=Bridge.Class.queueIsBlocked;Bridge.Class.staticInitAllow=!1,Bridge.Class.queueIsBlocked=!0;var r=i.apply(null,n.$typeArguments),o=r.$inherits||r.inherits;Bridge.Class.staticInitAllow=e,Bridge.Class.queueIsBlocked=t,o&&Bridge.isFunction(o)&&(o=o()),Bridge.Class.createInheritors(n,o);var s=Bridge.global.System&&Bridge.global.System.Object||Object;o||(o=[s].concat(n.$interfaces)),Bridge.Class.setInheritors(n,o);var a=o?o[0].$$initCtor?new o[0].$$initCtor:new o[0]:new s;n.prototype=a,n.prototype.constructor=n},Bridge.Class.$queue.push(n),n},init:function(e){if(Bridge.Reflection){var t=Bridge.Reflection.deferredMeta,n=t.length;if(0<n){Bridge.Reflection.deferredMeta=[];for(var i=0;i<n;i++){var r=t[i];Bridge.setMetadata(r.typeName,r.metadata)}}}if(e){var o=Bridge.Class.staticInitAllow;return Bridge.Class.staticInitAllow=!0,e(),void(Bridge.Class.staticInitAllow=o)}Bridge.Class.staticInitAllow=!0;var s=Bridge.Class.$queue.concat(Bridge.Class.$queueEntry);for(Bridge.Class.$queue.length=0,i=Bridge.Class.$queueEntry.length=0;i<s.length;i++){var a=s[i];a.$staticInit&&a.$staticInit(),a.prototype.$main&&(function(e,t){Bridge.ready(function(){e[t]()})}(a,a.prototype.$main.name||"Main"),a.prototype.$main=null)}}};Bridge.Class=te,Bridge.Class.$queue=[],Bridge.Class.$queueEntry=[],Bridge.define=Bridge.Class.define,Bridge.definei=Bridge.Class.definei,Bridge.init=Bridge.Class.init,Bridge.assembly=function(e,t,n,i){n||(n=t,t={}),e=e||"Bridge.$Unknown";var r=o.Reflection.Assembly.assemblies[e];r?Bridge.apply(r.res,t||{}):r=new o.Reflection.Assembly(e,t);var s=Bridge.$currentAssembly;if(Bridge.$currentAssembly=r,n){var a=Bridge.Class.staticInitAllow;Bridge.Class.staticInitAllow=!1,n.call(Bridge.global,r,Bridge.global),Bridge.Class.staticInitAllow=a}Bridge.init(),i&&(Bridge.$currentAssembly=s)},Bridge.define("System.Reflection.Assembly",{statics:{assemblies:{}},ctor:function(e,t){this.$initialize(),this.name=e,this.res=t||{},this.$types={},this.$={},o.Reflection.Assembly.assemblies[e]=this},toString:function(){return this.name},getManifestResourceNames:function(){return Object.keys(this.res)},getManifestResourceDataAsBase64:function(e,t){return 1===arguments.length&&(t=e,e=null),e&&(t=Bridge.Reflection.getTypeNamespace(e)+"."+t),this.res[t]||null},getManifestResourceData:function(e,t){1===arguments.length&&(t=e,e=null),e&&(t=Bridge.Reflection.getTypeNamespace(e)+"."+t);var n=this.res[t];return n?o.Convert.fromBase64String(n):null},getCustomAttributes:function(e){return this.attr&&e&&!Bridge.isBoolean(e)?this.attr.filter(function(t){return Bridge.is(t,e)}):this.attr||[]}}),Bridge.$currentAssembly=new o.Reflection.Assembly("mscorlib"),Bridge.SystemAssembly=Bridge.$currentAssembly,Bridge.SystemAssembly.$types["System.Reflection.Assembly"]=o.Reflection.Assembly,o.Reflection.Assembly.$assembly=Bridge.SystemAssembly;var ne=Bridge.$currentAssembly;Bridge.define("System.Object",{}),Bridge.define("System.Void",{$kind:"struct",statics:{methods:{getDefaultValue:function(){return new o.Void}}},methods:{$clone:function(e){return this}}}),Bridge.init(function(){Bridge.SystemAssembly.version="17.1.1",Bridge.SystemAssembly.compiler="17.1.1"}),Bridge.define("Bridge.Utils.SystemAssemblyVersion"),Bridge.Reflection={deferredMeta:[],setMetadata:function(e,t){if(Bridge.isString(e)){var n=e;if(null==(e=Bridge.unroll(n)))return void Bridge.Reflection.deferredMeta.push({typeName:n,metadata:t})}e.$getMetadata=Bridge.Reflection.getMetadata,e.$metadata=t},initMetaData:function(e,t){if(t.m)for(var n=0;n<t.m.length;n++){var i=t.m[n];if(i.td=e,i.ad&&(i.ad.td=e),i.r&&(i.r.td=e),i.g&&(i.g.td=e),i.s&&(i.s.td=e),i.tprm&&Bridge.isArray(i.tprm))for(var r=0;r<i.tprm.length;r++)i.tprm[r]=Bridge.Reflection.createTypeParam(i.tprm[r],e)}e.$metadata=t,e.$initMetaData=!0},getMetadata:function(){!this.$metadata&&this.$genericTypeDefinition&&(this.$metadata=this.$genericTypeDefinition.$factoryMetadata||this.$genericTypeDefinition.$metadata);var e=this.$metadata;if("function"==typeof e)if(this.$isGenericTypeDefinition&&!this.$factoryMetadata&&(this.$factoryMetadata=this.$metadata),this.$typeArguments)e=this.$metadata.apply(null,this.$typeArguments);else if(this.$isGenericTypeDefinition){var t=Bridge.Reflection.createTypeParams(this.$metadata);this.$typeArguments=t,e=this.$metadata.apply(null,t)}else e=this.$metadata();return!this.$initMetaData&&e&&Bridge.Reflection.initMetaData(this,e),e},createTypeParams:function(e,t){var n,i=[],r=e.toString();n=r.slice(r.indexOf("(")+1,r.indexOf(")")).match(/([^\s,]+)/g)||[];for(var o=0;o<n.length;o++)i.push(Bridge.Reflection.createTypeParam(n[o],t));return i},createTypeParam:function(e,t){var n=function(){};return n.$$name=e,n.$isTypeParameter=!0,t&&(n.td=t),n},load:function(e){return o.Reflection.Assembly.assemblies[e]||n(14)(e)},getGenericTypeDefinition:function(e){if(e.$isGenericTypeDefinition)return e;if(!e.$genericTypeDefinition)throw new o.InvalidOperationException.$ctor1("This operation is only valid on generic types.");return e.$genericTypeDefinition},getGenericParameterCount:function(e){return e.$typeArgumentCount||0},getGenericArguments:function(e){return e.$typeArguments||[]},getMethodGenericArguments:function(e){return e.tprm||[]},isGenericTypeDefinition:function(e){return e.$isGenericTypeDefinition||!1},isGenericType:function(e){return null!=e.$genericTypeDefinition||Bridge.Reflection.isGenericTypeDefinition(e)},convertType:function(e){return e===Boolean?o.Boolean:e===String?o.String:e===Object?o.Object:e===Date?o.DateTime:e},getBaseType:function(e){if(Bridge.isObject(e)||"interface"===e.$kind||null==e.prototype)return null;if(Object.getPrototypeOf)return Bridge.Reflection.convertType(Object.getPrototypeOf(e.prototype).constructor);var t,n=e.prototype;if(Object.prototype.hasOwnProperty.call(n,"constructor"))try{return t=n.constructor,delete n.constructor,Bridge.Reflection.convertType(n.constructor)}finally{n.constructor=t}return Bridge.Reflection.convertType(n.constructor)},getTypeFullName:function(e){var t;if(e.$$fullname?t=e.$$fullname:e.$$name&&(t=e.$$name),t){var n=Bridge.Reflection.getTypeNamespace(e,t);if(n){var i=t.indexOf("["),r=t.substring(n.length+1,-1===i?t.length:i);new RegExp(/[\.\$]/).test(r)&&(t=n+"."+r.replace(/\.|\$/g,function(e){return"."===e?"+":"`"})+(-1===i?"":t.substring(i)))}return t}if(e.constructor===Object){t=e.toString();var o=/\[object (.{1,})\]/.exec(t);return"Object"==(r=o&&1<o.length?o[1]:"Object")?"System.Object":r}t=e.constructor===Function?e.toString():e.constructor.toString();var s=/function (.{1,})\(/.exec(t);return s&&1<s.length?s[1]:"System.Object"},_makeQName:function(e,t){return e+(t?", "+t.name:"")},getTypeQName:function(e){return Bridge.Reflection._makeQName(Bridge.Reflection.getTypeFullName(e),e.$assembly)},getTypeName:function(e){var t=Bridge.Reflection.getTypeFullName(e),n=t.indexOf("["),i=t.lastIndexOf("+",0<=n?n:t.length),r=-1<i?i:t.lastIndexOf(".",0<=n?n:t.length),o=0<r?0<=n?t.substring(r+1,n):t.substr(r+1):t;return e.$isArray?o+"[]":o},getTypeNamespace:function(e,t){var n=t||Bridge.Reflection.getTypeFullName(e),i=n.indexOf("["),r=n.lastIndexOf(".",0<=i?i:n.length),o=0<r?n.substr(0,r):"";if(e.$assembly){var s=Bridge.Reflection._getAssemblyType(e.$assembly,o);s&&(o=Bridge.Reflection.getTypeNamespace(s))}return o},getTypeAssembly:function(e){return o.Array.contains([Date,Number,Boolean,String,Function,Array],e)||e.$isArray?Bridge.SystemAssembly:e.$assembly||Bridge.SystemAssembly},_extractArrayRank:function(e){var t=-1,n=/<(\d+)>$/g.exec(e);return n&&(e=e.substring(0,n.index),t=parseInt(n[1])),(n=/\[(,*)\]$/g.exec(e))&&(e=e.substring(0,n.index),t=n[1].length+1),{rank:t,name:e}},_getAssemblyType:function(e,t){var n,i=!1;new RegExp(/[\+\`]/).test(t)&&(t=t.replace(/\+|\`/g,function(e){return"+"===e?".":"$"})),e||(e=Bridge.SystemAssembly,i=!0);var r=Bridge.Reflection._extractArrayRank(t);if(n=r.rank,t=r.name,e.$types){var s=e.$types[t]||null;if(s)return-1<n?o.Array.type(s,n):s;if("mscorlib"!==e.name)return null;e=Bridge.global}for(var a=t.split("."),u=e,l=0;l<a.length;l++)if(!(u=u[a[l]]))return null;return"function"!=typeof u||!i&&u.$assembly&&e.name!==u.$assembly.name?null:-1<n?o.Array.type(u,n):u},getAssemblyTypes:function(e){var t=[];if(e.$types)for(var n in e.$types)e.$types.hasOwnProperty(n)&&t.push(e.$types[n]);else{var i=function(e,n){for(var r in e)e.hasOwnProperty(r)&&i(e[r],r);"function"==typeof e&&Bridge.isUpper(n.charCodeAt(0))&&t.push(e)};i(e,"")}return t},createAssemblyInstance:function(e,t){var n=Bridge.Reflection.getType(t,e);return n?Bridge.createInstance(n):null},getInterfaces:function(e){var t;return e.$allInterfaces?e.$allInterfaces:e===Date?[o.IComparable$1(Date),o.IEq