UNPKG

@zklogic/draw.io

Version:

Draw.IO - Graph Editor integration in Angular-cli

1 lines 45.6 kB
Bridge.assembly("Bridge.Collections",(function(){"use strict";Bridge.define("System.Collections.BitArray",{inherits:[System.Collections.ICollection,System.ICloneable],statics:{BitsPerInt32:32,BytesPerInt32:4,BitsPerByte:8,_ShrinkThreshold:256,getArrayLength:function(e,t){return e>0?1+(0|Bridge.Int.div(e-1|0,t))|0:0}},m_array:null,m_length:0,_version:0,config:{alias:["getCount","System$Collections$ICollection$getCount","clone","System$ICloneable$clone","getIsReadOnly","System$Collections$ICollection$getIsReadOnly","getEnumerator","System$Collections$IEnumerable$getEnumerator"]},$ctor3:function(e){System.Collections.BitArray.$ctor4.call(this,e,!1)},$ctor4:function(e,t){var i,n;if(this.$initialize(),e<0)throw new System.ArgumentOutOfRangeException("length","Index is less than zero.");for(this.m_array=System.Array.init(System.Collections.BitArray.getArrayLength(e,System.Collections.BitArray.BitsPerInt32),0),this.m_length=e,i=t?-1:0,n=0;n<this.m_array.length;n=n+1|0)this.m_array[n]=i;this._version=0},$ctor1:function(e){var t,i,n;if(this.$initialize(),null==e)throw new System.ArgumentNullException("bytes");if(e.length>268435455)throw new System.ArgumentException(System.String.format("The input array length must not exceed Int32.MaxValue / {0}. Otherwise BitArray.Length would exceed Int32.MaxValue.",System.Collections.BitArray.BitsPerByte),"bytes");for(this.m_array=System.Array.init(System.Collections.BitArray.getArrayLength(e.length,System.Collections.BitArray.BytesPerInt32),0),this.m_length=e.length*System.Collections.BitArray.BitsPerByte|0,t=0,i=0;(e.length-i|0)>=4;)this.m_array[Bridge.identity(t,t=t+1|0)]=255&e[i]|(255&e[i+1|0])<<8|(255&e[i+2|0])<<16|(255&e[i+3|0])<<24,i=i+4|0;3==(n=e.length-i|0)&&(this.m_array[t]=(255&e[i+2|0])<<16,n=2),2===n&&(this.m_array[t]=this.m_array[t]|(255&e[i+1|0])<<8,n=1),1===n&&(this.m_array[t]=this.m_array[t]|255&e[i]),this._version=0},ctor:function(e){if(this.$initialize(),null==e)throw new System.ArgumentNullException("values");this.m_array=System.Array.init(System.Collections.BitArray.getArrayLength(e.length,System.Collections.BitArray.BitsPerInt32),0),this.m_length=e.length;for(var t=0;t<e.length;t=t+1|0)e[t]&&(this.m_array[0|Bridge.Int.div(t,32)]=this.m_array[0|Bridge.Int.div(t,32)]|1<<t%32);this._version=0},$ctor5:function(e){if(this.$initialize(),null==e)throw new System.ArgumentNullException("values");if(e.length>67108863)throw new System.ArgumentException(System.String.format("The input array length must not exceed Int32.MaxValue / {0}. Otherwise BitArray.Length would exceed Int32.MaxValue.",System.Collections.BitArray.BitsPerInt32),"values");this.m_array=System.Array.init(e.length,0),this.m_length=e.length*System.Collections.BitArray.BitsPerInt32|0,System.Array.copy(e,0,this.m_array,0,e.length),this._version=0},$ctor2:function(e){if(this.$initialize(),null==e)throw new System.ArgumentNullException("bits");var t=System.Collections.BitArray.getArrayLength(e.m_length,System.Collections.BitArray.BitsPerInt32);this.m_array=System.Array.init(t,0),this.m_length=e.m_length,System.Array.copy(e.m_array,0,this.m_array,0,t),this._version=e._version},getItem:function(e){return this.get(e)},setItem:function(e,t){this.set(e,t)},getLength:function(){return this.m_length},setLength:function(e){var t,i,n,r;if(e<0)throw new System.ArgumentOutOfRangeException("value","Non-negative number required.");((t=System.Collections.BitArray.getArrayLength(e,System.Collections.BitArray.BitsPerInt32))>this.m_array.length||(t+System.Collections.BitArray._ShrinkThreshold|0)<this.m_array.length)&&(i=System.Array.init(t,0),System.Array.copy(this.m_array,0,i,0,t>this.m_array.length?this.m_array.length:t),this.m_array=i),e>this.m_length&&(n=System.Collections.BitArray.getArrayLength(this.m_length,System.Collections.BitArray.BitsPerInt32)-1|0,(r=this.m_length%32)>0&&(this.m_array[n]=this.m_array[n]&((1<<r)-1|0)),System.Array.fill(this.m_array,0,n+1|0,(t-n|0)-1|0)),this.m_length=e,this._version=this._version+1|0},getCount:function(){return this.m_length},getIsReadOnly:function(){return!1},getIsSynchronized:function(){return!1},get:function(e){if(e<0||e>=this.getLength())throw new System.ArgumentOutOfRangeException("index","Index was out of range. Must be non-negative and less than the size of the collection.");return 0!=(this.m_array[0|Bridge.Int.div(e,32)]&1<<e%32)},set:function(e,t){if(e<0||e>=this.getLength())throw new System.ArgumentOutOfRangeException("index","Index was out of range. Must be non-negative and less than the size of the collection.");this.m_array[0|Bridge.Int.div(e,32)]=t?this.m_array[0|Bridge.Int.div(e,32)]|1<<e%32:this.m_array[0|Bridge.Int.div(e,32)]&~(1<<e%32),this._version=this._version+1|0},setAll:function(e){for(var t=e?-1:0,i=System.Collections.BitArray.getArrayLength(this.m_length,System.Collections.BitArray.BitsPerInt32),n=0;n<i;n=n+1|0)this.m_array[n]=t;this._version=this._version+1|0},and:function(e){var t,i;if(null==e)throw new System.ArgumentNullException("value");if(this.getLength()!==e.getLength())throw new System.ArgumentException("Array lengths must be the same.");for(t=System.Collections.BitArray.getArrayLength(this.m_length,System.Collections.BitArray.BitsPerInt32),i=0;i<t;i=i+1|0)this.m_array[i]=this.m_array[i]&e.m_array[i];return this._version=this._version+1|0,this},or:function(e){var t,i;if(null==e)throw new System.ArgumentNullException("value");if(this.getLength()!==e.getLength())throw new System.ArgumentException("Array lengths must be the same.");for(t=System.Collections.BitArray.getArrayLength(this.m_length,System.Collections.BitArray.BitsPerInt32),i=0;i<t;i=i+1|0)this.m_array[i]=this.m_array[i]|e.m_array[i];return this._version=this._version+1|0,this},xor:function(e){var t,i;if(null==e)throw new System.ArgumentNullException("value");if(this.getLength()!==e.getLength())throw new System.ArgumentException("Array lengths must be the same.");for(t=System.Collections.BitArray.getArrayLength(this.m_length,System.Collections.BitArray.BitsPerInt32),i=0;i<t;i=i+1|0)this.m_array[i]=this.m_array[i]^e.m_array[i];return this._version=this._version+1|0,this},not:function(){for(var e=System.Collections.BitArray.getArrayLength(this.m_length,System.Collections.BitArray.BitsPerInt32),t=0;t<e;t=t+1|0)this.m_array[t]=~this.m_array[t];return this._version=this._version+1|0,this},clone:function(){var e=new System.Collections.BitArray.$ctor5(this.m_array);return e._version=this._version,e.m_length=this.m_length,e},getEnumerator:function(){return new System.Collections.BitArray.BitArrayEnumeratorSimple(this)}}),Bridge.define("System.Collections.BitArray.BitArrayEnumeratorSimple",{inherits:[System.Collections.IEnumerator],bitarray:null,index:0,version:0,currentElement:!1,config:{alias:["moveNext","System$Collections$IEnumerator$moveNext","getCurrent","System$Collections$IEnumerator$getCurrent","reset","System$Collections$IEnumerator$reset"]},ctor:function(e){this.$initialize(),this.bitarray=e,this.index=-1,this.version=e._version},getCurrent:function(){if(-1===this.index)throw new System.InvalidOperationException("Enumeration has not started. Call MoveNext.");if(this.index>=this.bitarray.getCount())throw new System.InvalidOperationException("Enumeration already finished.");return this.currentElement},moveNext:function(){if(this.version!==this.bitarray._version)throw new System.InvalidOperationException("Collection was modified; enumeration operation may not execute.");return this.index<(this.bitarray.getCount()-1|0)?(this.index=this.index+1|0,this.currentElement=this.bitarray.get(this.index),!0):(this.index=this.bitarray.getCount(),!1)},reset:function(){if(this.version!==this.bitarray._version)throw new System.InvalidOperationException("Collection was modified; enumeration operation may not execute.");this.index=-1}}),Bridge.define("System.Collections.Generic.BitHelper",{statics:{MarkedBitFlag:1,IntSize:32,toIntArrayLength:function(e){return e>0?1+(0|Bridge.Int.div(e-1|0,System.Collections.Generic.BitHelper.IntSize))|0:0}},_length:0,_array:null,ctor:function(e,t){this.$initialize(),this._array=e,this._length=t},markBit:function(e){var t,i=0|Bridge.Int.div(e,System.Collections.Generic.BitHelper.IntSize);i<this._length&&i>=0&&(t=System.Collections.Generic.BitHelper.MarkedBitFlag<<e%System.Collections.Generic.BitHelper.IntSize,this._array[i]=this._array[i]|t)},isMarked:function(e){var t,i=0|Bridge.Int.div(e,System.Collections.Generic.BitHelper.IntSize);return i<this._length&&i>=0&&(t=System.Collections.Generic.BitHelper.MarkedBitFlag<<e%System.Collections.Generic.BitHelper.IntSize,0!=(this._array[i]&t))}}),Bridge.define("Bridge.Collections.EnumerableHelpers",{statics:{toArray:function(e,t){var i={},n={v:Bridge.Collections.EnumerableHelpers.toArray$1(e,t,i)};return System.Array.resize(n,i.v,Bridge.getDefaultValue(e)),n.v},toArray$1:function(e,t,i){var n,r,s,o,a=Bridge.getEnumerator(t,null,e);try{if(a.System$Collections$IEnumerator$moveNext()){for((n={v:System.Array.init(4,(function(){return Bridge.getDefaultValue(e)}))}).v[0]=a[Bridge.geti(a,"System$Collections$Generic$IEnumerator$1$"+Bridge.getTypeAlias(e)+"$getCurrent$1","getCurrent$1")](),r=1;a.System$Collections$IEnumerator$moveNext();)r===n.v.length&&((o=r<<1)>>>0>(s=2146435071)&&(o=s<=r?r+1|0:s),System.Array.resize(n,o,Bridge.getDefaultValue(e))),n.v[Bridge.identity(r,r=r+1|0)]=a[Bridge.geti(a,"System$Collections$Generic$IEnumerator$1$"+Bridge.getTypeAlias(e)+"$getCurrent$1","getCurrent$1")]();return i.v=r,n.v}}finally{Bridge.hasValue(a)&&a.dispose()}return i.v=0,System.Array.init(0,(function(){return Bridge.getDefaultValue(e)}))}}}),Bridge.define("System.Collections.Generic.HashSet$1",(function(e){return{inherits:[System.Collections.Generic.ICollection$1(e),System.Collections.Generic.ISet$1(e)],statics:{Lower31BitMask:2147483647,ShrinkThreshold:3,hashSetEquals:function(t,i,n){var r,s,o,a,l,u,h;if(null==t)return null==i;if(null==i)return!1;if(System.Collections.Generic.HashSet$1(e).areEqualityComparersEqual(t,i)){if(t.getCount()!==i.getCount())return!1;for(r=Bridge.getEnumerator(i);r.moveNext();)if(a=r.getCurrent(),!t.contains(a))return!1;return!0}for(s=Bridge.getEnumerator(i);s.moveNext();){for(l=s.getCurrent(),u=!1,o=Bridge.getEnumerator(t);o.moveNext();)if(h=o.getCurrent(),n["System$Collections$Generic$IEqualityComparer$1$"+Bridge.getTypeAlias(e)+"$equals2"](l,h)){u=!0;break}if(!u)return!1}return!0},areEqualityComparersEqual:function(e,t){return Bridge.equals(e.getComparer(),t.getComparer())}},_buckets:null,_slots:null,_count:0,_lastIndex:0,_freeList:0,_comparer:null,_version:0,config:{alias:["System$Collections$Generic$ICollection$1$T$add","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$add","clear","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$clear","contains","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$contains","copyTo","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$copyTo","remove","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$remove","getCount","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$getCount","getIsReadOnly","System$Collections$Generic$ICollection$1$"+Bridge.getTypeAlias(e)+"$getIsReadOnly","System$Collections$Generic$IEnumerable$1$T$getEnumerator","System$Collections$Generic$IEnumerable$1$"+Bridge.getTypeAlias(e)+"$getEnumerator","add","System$Collections$Generic$ISet$1$"+Bridge.getTypeAlias(e)+"$add","unionWith","System$Collections$Generic$ISet$1$"+Bridge.getTypeAlias(e)+"$unionWith","intersectWith","System$Collections$Generic$ISet$1$"+Bridge.getTypeAlias(e)+"$intersectWith","exceptWith","System$Collections$Generic$ISet$1$"+Bridge.getTypeAlias(e)+"$exceptWith","symmetricExceptWith","System$Collections$Generic$ISet$1$"+Bridge.getTypeAlias(e)+"$symmetricExceptWith","isSubsetOf","System$Collections$Generic$ISet$1$"+Bridge.getTypeAlias(e)+"$isSubsetOf","isProperSubsetOf","System$Collections$Generic$ISet$1$"+Bridge.getTypeAlias(e)+"$isProperSubsetOf","isSupersetOf","System$Collections$Generic$ISet$1$"+Bridge.getTypeAlias(e)+"$isSupersetOf","isProperSupersetOf","System$Collections$Generic$ISet$1$"+Bridge.getTypeAlias(e)+"$isProperSupersetOf","overlaps","System$Collections$Generic$ISet$1$"+Bridge.getTypeAlias(e)+"$overlaps","setEquals","System$Collections$Generic$ISet$1$"+Bridge.getTypeAlias(e)+"$setEquals"]},ctor:function(){System.Collections.Generic.HashSet$1(e).$ctor3.call(this,System.Collections.Generic.EqualityComparer$1(e).def)},$ctor3:function(t){this.$initialize(),null==t&&(t=System.Collections.Generic.EqualityComparer$1(e).def),this._comparer=t,this._lastIndex=0,this._count=0,this._freeList=-1,this._version=0},$ctor1:function(t){System.Collections.Generic.HashSet$1(e).$ctor2.call(this,t,System.Collections.Generic.EqualityComparer$1(e).def)},$ctor2:function(t,i){if(System.Collections.Generic.HashSet$1(e).$ctor3.call(this,i),null==t)throw new System.ArgumentNullException("collection");var n=0,r=Bridge.as(t,System.Collections.Generic.ICollection$1(e));null!=r&&(n=System.Array.getCount(r,e)),this.initialize(n),this.unionWith(t),(0===this._count&&this._slots.length>System.Collections.HashHelpers.getMinPrime()||this._count>0&&(0|Bridge.Int.div(this._slots.length,this._count))>System.Collections.Generic.HashSet$1(e).ShrinkThreshold)&&this.trimExcess()},getCount:function(){return this._count},getIsReadOnly:function(){return!1},getComparer:function(){return this._comparer},System$Collections$Generic$ICollection$1$T$add:function(e){this.addIfNotPresent(e)},add:function(e){return this.addIfNotPresent(e)},clear:function(){var t,i;if(this._lastIndex>0){for(t=0;t<this._lastIndex;t=t+1|0)this._slots[t]=new(System.Collections.Generic.HashSet$1.Slot(e));for(i=0;i<this._buckets.length;i=i+1|0)this._buckets[i]=0;this._lastIndex=0,this._count=0,this._freeList=-1}this._version=this._version+1|0},arrayClear:function(){},contains:function(t){var i,n;if(null!=this._buckets)for(i=this.internalGetHashCode(t),n=this._buckets[i%this._buckets.length]-1|0;n>=0;n=this._slots[n].next)if(this._slots[n].hashCode===i&&this._comparer["System$Collections$Generic$IEqualityComparer$1$"+Bridge.getTypeAlias(e)+"$equals2"](this._slots[n].value,t))return!0;return!1},copyTo:function(e,t){this.copyTo$2(e,t,this._count)},copyTo$1:function(e){this.copyTo$2(e,0,this._count)},copyTo$2:function(e,t,i){var n,r;if(null==e)throw new System.ArgumentNullException("array");if(t<0)throw new System.ArgumentOutOfRangeException("arrayIndex");if(i<0)throw new System.ArgumentOutOfRangeException("count");if(t>e.length||i>(e.length-t|0))throw new System.ArgumentException("Destination array is not long enough to copy all the items in the collection. Check array index and length.");for(n=0,r=0;r<this._lastIndex&&n<i;r=r+1|0)this._slots[r].hashCode>=0&&(e[t+n|0]=this._slots[r].value,n=n+1|0)},remove:function(t){var i;if(null!=this._buckets){var n=this.internalGetHashCode(t),r=n%this._buckets.length,s=-1;for(i=this._buckets[r]-1|0;i>=0;s=i,i=this._slots[i].next)if(this._slots[i].hashCode===n&&this._comparer["System$Collections$Generic$IEqualityComparer$1$"+Bridge.getTypeAlias(e)+"$equals2"](this._slots[i].value,t))return s<0?this._buckets[r]=this._slots[i].next+1|0:this._slots[s].next=this._slots[i].next,this._slots[i].hashCode=-1,this._slots[i].value=Bridge.getDefaultValue(e),this._slots[i].next=this._freeList,this._count=this._count-1|0,this._version=this._version+1|0,0===this._count?(this._lastIndex=0,this._freeList=-1):this._freeList=i,!0}return!1},getEnumerator:function(){return new(System.Collections.Generic.HashSet$1.Enumerator(e).$ctor1)(this)},System$Collections$Generic$IEnumerable$1$T$getEnumerator:function(){return new(System.Collections.Generic.HashSet$1.Enumerator(e).$ctor1)(this)},System$Collections$IEnumerable$getEnumerator:function(){return new(System.Collections.Generic.HashSet$1.Enumerator(e).$ctor1)(this)},unionWith:function(t){var i,n;if(null==t)throw new System.ArgumentNullException("other");for(i=Bridge.getEnumerator(t,null,e);i.moveNext();)n=i.getCurrent(),this.addIfNotPresent(n)},intersectWith:function(t){var i,n;if(null==t)throw new System.ArgumentNullException("other");if(0!==this._count){if(null!=(i=Bridge.as(t,System.Collections.Generic.ICollection$1(e)))){if(0===System.Array.getCount(i,e))return void this.clear();if(null!=(n=Bridge.as(t,System.Collections.Generic.HashSet$1(e)))&&System.Collections.Generic.HashSet$1(e).areEqualityComparersEqual(this,n))return void this.intersectWithHashSetWithSameEC(n)}this.intersectWithEnumerable(t)}},exceptWith:function(t){var i,n;if(null==t)throw new System.ArgumentNullException("other");if(0!==this._count){if(Bridge.referenceEquals(t,this))return void this.clear();for(i=Bridge.getEnumerator(t,null,e);i.moveNext();)n=i.getCurrent(),this.remove(n)}},symmetricExceptWith:function(t){if(null==t)throw new System.ArgumentNullException("other");if(0!==this._count)if(Bridge.referenceEquals(t,this))this.clear();else{var i=Bridge.as(t,System.Collections.Generic.HashSet$1(e));null!=i&&System.Collections.Generic.HashSet$1(e).areEqualityComparersEqual(this,i)?this.symmetricExceptWithUniqueHashSet(i):this.symmetricExceptWithEnumerable(t)}else this.unionWith(t)},isSubsetOf:function(t){var i,n;if(null==t)throw new System.ArgumentNullException("other");return 0===this._count||(null!=(i=Bridge.as(t,System.Collections.Generic.HashSet$1(e)))&&System.Collections.Generic.HashSet$1(e).areEqualityComparersEqual(this,i)?!(this._count>i.getCount())&&this.isSubsetOfHashSetWithSameEC(i):(n=this.checkUniqueAndUnfoundElements(t,!1).$clone()).uniqueCount===this._count&&n.unfoundCount>=0)},isProperSubsetOf:function(t){var i,n,r;if(null==t)throw new System.ArgumentNullException("other");if(null!=(i=Bridge.as(t,System.Collections.Generic.ICollection$1(e)))){if(0===this._count)return System.Array.getCount(i,e)>0;if(null!=(n=Bridge.as(t,System.Collections.Generic.HashSet$1(e)))&&System.Collections.Generic.HashSet$1(e).areEqualityComparersEqual(this,n))return!(this._count>=n.getCount())&&this.isSubsetOfHashSetWithSameEC(n)}return(r=this.checkUniqueAndUnfoundElements(t,!1).$clone()).uniqueCount===this._count&&r.unfoundCount>0},isSupersetOf:function(t){var i,n;if(null==t)throw new System.ArgumentNullException("other");if(null!=(i=Bridge.as(t,System.Collections.Generic.ICollection$1(e)))){if(0===System.Array.getCount(i,e))return!0;if(null!=(n=Bridge.as(t,System.Collections.Generic.HashSet$1(e)))&&System.Collections.Generic.HashSet$1(e).areEqualityComparersEqual(this,n)&&n.getCount()>this._count)return!1}return this.containsAllElements(t)},isProperSupersetOf:function(t){var i,n,r;if(null==t)throw new System.ArgumentNullException("other");if(0===this._count)return!1;if(null!=(i=Bridge.as(t,System.Collections.Generic.ICollection$1(e)))){if(0===System.Array.getCount(i,e))return!0;if(null!=(n=Bridge.as(t,System.Collections.Generic.HashSet$1(e)))&&System.Collections.Generic.HashSet$1(e).areEqualityComparersEqual(this,n))return!(n.getCount()>=this._count)&&this.containsAllElements(n)}return(r=this.checkUniqueAndUnfoundElements(t,!0).$clone()).uniqueCount<this._count&&0===r.unfoundCount},overlaps:function(t){var i,n;if(null==t)throw new System.ArgumentNullException("other");if(0===this._count)return!1;for(i=Bridge.getEnumerator(t,null,e);i.moveNext();)if(n=i.getCurrent(),this.contains(n))return!0;return!1},setEquals:function(t){var i,n,r;if(null==t)throw new System.ArgumentNullException("other");return null!=(i=Bridge.as(t,System.Collections.Generic.HashSet$1(e)))&&System.Collections.Generic.HashSet$1(e).areEqualityComparersEqual(this,i)?this._count===i.getCount()&&this.containsAllElements(i):!(null!=(n=Bridge.as(t,System.Collections.Generic.ICollection$1(e)))&&0===this._count&&System.Array.getCount(n,e)>0)&&(r=this.checkUniqueAndUnfoundElements(t,!0).$clone()).uniqueCount===this._count&&0===r.unfoundCount},removeWhere:function(e){var t,i,n;if(Bridge.staticEquals(e,null))throw new System.ArgumentNullException("match");for(t=0,i=0;i<this._lastIndex;i=i+1|0)this._slots[i].hashCode>=0&&e(n=this._slots[i].value)&&this.remove(n)&&(t=t+1|0);return t},trimExcess:function(){var t,i;if(0===this._count)this._buckets=null,this._slots=null,this._version=this._version+1|0;else{var n=System.Collections.HashHelpers.getPrime(this._count),r=System.Array.init(n,(function(){return new(System.Collections.Generic.HashSet$1.Slot(e))})),s=System.Array.init(n,0),o=0;for(t=0;t<this._lastIndex;t=t+1|0)this._slots[t].hashCode>=0&&(r[o]=this._slots[t].$clone(),i=r[o].hashCode%n,r[o].next=s[i]-1|0,s[i]=o+1|0,o=o+1|0);this._lastIndex=o,this._slots=r,this._buckets=s,this._freeList=-1}},initialize:function(t){var i=System.Collections.HashHelpers.getPrime(t);this._buckets=System.Array.init(i,0),this._slots=System.Array.init(i,(function(){return new(System.Collections.Generic.HashSet$1.Slot(e))}))},increaseCapacity:function(){var e=System.Collections.HashHelpers.expandPrime(this._count);if(e<=this._count)throw new System.ArgumentException("HashSet capacity is too big.");this.setCapacity(e,!1)},setCapacity:function(t,i){var n,r,s,o,a,l=System.Array.init(t,(function(){return new(System.Collections.Generic.HashSet$1.Slot(e))}));if(null!=this._slots)for(n=0;n<this._lastIndex;n=n+1|0)l[n]=this._slots[n].$clone();if(i)for(r=0;r<this._lastIndex;r=r+1|0)-1!==l[r].hashCode&&(l[r].hashCode=this.internalGetHashCode(l[r].value));for(s=System.Array.init(t,0),o=0;o<this._lastIndex;o=o+1|0)a=l[o].hashCode%t,l[o].next=s[a]-1|0,s[a]=o+1|0;this._slots=l,this._buckets=s},addIfNotPresent:function(t){var i,n,r,s;for(null==this._buckets&&this.initialize(0),n=(i=this.internalGetHashCode(t))%this._buckets.length,r=this._buckets[n]-1|0;r>=0;r=this._slots[r].next)if(this._slots[r].hashCode===i&&this._comparer["System$Collections$Generic$IEqualityComparer$1$"+Bridge.getTypeAlias(e)+"$equals2"](this._slots[r].value,t))return!1;return this._freeList>=0?(s=this._freeList,this._freeList=this._slots[s].next):(this._lastIndex===this._slots.length&&(this.increaseCapacity(),n=i%this._buckets.length),s=this._lastIndex,this._lastIndex=this._lastIndex+1|0),this._slots[s].hashCode=i,this._slots[s].value=t,this._slots[s].next=this._buckets[n]-1|0,this._buckets[n]=s+1|0,this._count=this._count+1|0,this._version=this._version+1|0,!0},containsAllElements:function(t){for(var i,n=Bridge.getEnumerator(t,null,e);n.moveNext();)if(i=n.getCurrent(),!this.contains(i))return!1;return!0},isSubsetOfHashSetWithSameEC:function(e){for(var t,i=Bridge.getEnumerator(this);i.moveNext();)if(t=i.getCurrent(),!e.contains(t))return!1;return!0},intersectWithHashSetWithSameEC:function(e){for(var t,i=0;i<this._lastIndex;i=i+1|0)this._slots[i].hashCode>=0&&(t=this._slots[i].value,e.contains(t)||this.remove(t))},intersectWithEnumerable:function(t){for(var i,n,r,s=this._lastIndex,o=System.Collections.Generic.BitHelper.toIntArrayLength(s),a=System.Array.init(o,0),l=new System.Collections.Generic.BitHelper(a,o),u=Bridge.getEnumerator(t,null,e);u.moveNext();)i=u.getCurrent(),(n=this.internalIndexOf(i))>=0&&l.markBit(n);for(r=0;r<s;r=r+1|0)this._slots[r].hashCode>=0&&!l.isMarked(r)&&this.remove(this._slots[r].value)},internalIndexOf:function(t){for(var i=this.internalGetHashCode(t),n=this._buckets[i%this._buckets.length]-1|0;n>=0;n=this._slots[n].next)if(this._slots[n].hashCode===i&&this._comparer["System$Collections$Generic$IEqualityComparer$1$"+Bridge.getTypeAlias(e)+"$equals2"](this._slots[n].value,t))return n;return-1},symmetricExceptWithUniqueHashSet:function(e){for(var t,i=Bridge.getEnumerator(e);i.moveNext();)t=i.getCurrent(),this.remove(t)||this.addIfNotPresent(t)},symmetricExceptWithEnumerable:function(t){var i,n,r,s,o,a=this._lastIndex,l=System.Collections.Generic.BitHelper.toIntArrayLength(a),u=System.Array.init(l,0);for(n=new System.Collections.Generic.BitHelper(u,l),s=System.Array.init(l,0),r=new System.Collections.Generic.BitHelper(s,l),i=Bridge.getEnumerator(t,null,e);i.moveNext();){var h=i.getCurrent(),c={v:0};this.addOrGetLocation(h,c)?r.markBit(c.v):c.v<a&&!r.isMarked(c.v)&&n.markBit(c.v)}for(o=0;o<a;o=o+1|0)n.isMarked(o)&&this.remove(this._slots[o].value)},addOrGetLocation:function(t,i){for(var n,r=this.internalGetHashCode(t),s=r%this._buckets.length,o=this._buckets[s]-1|0;o>=0;o=this._slots[o].next)if(this._slots[o].hashCode===r&&this._comparer["System$Collections$Generic$IEqualityComparer$1$"+Bridge.getTypeAlias(e)+"$equals2"](this._slots[o].value,t))return i.v=o,!1;return this._freeList>=0?(n=this._freeList,this._freeList=this._slots[n].next):(this._lastIndex===this._slots.length&&(this.increaseCapacity(),s=r%this._buckets.length),n=this._lastIndex,this._lastIndex=this._lastIndex+1|0),this._slots[n].hashCode=r,this._slots[n].value=t,this._slots[n].next=this._buckets[s]-1|0,this._buckets[s]=n+1|0,this._count=this._count+1|0,this._version=this._version+1|0,i.v=n,!0},checkUniqueAndUnfoundElements:function(t,i){var n,r,s,o,a,l,u,h=new(System.Collections.Generic.HashSet$1.ElementCount(e));if(0===this._count){for(s=0,n=Bridge.getEnumerator(t,null,e);n.moveNext();){n.getCurrent(),s=s+1|0;break}return h.uniqueCount=0,h.unfoundCount=s,h.$clone()}var c,m=this._lastIndex,y=System.Collections.Generic.BitHelper.toIntArrayLength(m),_=System.Array.init(y,0);for(c=new System.Collections.Generic.BitHelper(_,y),o=0,a=0,r=Bridge.getEnumerator(t,null,e);r.moveNext();)if(l=r.getCurrent(),(u=this.internalIndexOf(l))>=0)c.isMarked(u)||(c.markBit(u),a=a+1|0);else if(o=o+1|0,i)break;return h.uniqueCount=a,h.unfoundCount=o,h.$clone()},toArray:function(){var t=System.Array.init(this.getCount(),(function(){return Bridge.getDefaultValue(e)}));return this.copyTo$1(t),t},internalGetHashCode:function(t){return null==t?0:this._comparer["System$Collections$Generic$IEqualityComparer$1$"+Bridge.getTypeAlias(e)+"$getHashCode2"](t)&System.Collections.Generic.HashSet$1(e).Lower31BitMask}}})),Bridge.define("System.Collections.Generic.HashSet$1.ElementCount",(function(e){return{$kind:"struct",statics:{getDefaultValue:function(){return new(System.Collections.Generic.HashSet$1.ElementCount(e))}},uniqueCount:0,unfoundCount:0,ctor:function(){this.$initialize()},getHashCode:function(){return Bridge.addHash([4920463385,this.uniqueCount,this.unfoundCount])},equals:function(t){return!!Bridge.is(t,System.Collections.Generic.HashSet$1.ElementCount(e))&&Bridge.equals(this.uniqueCount,t.uniqueCount)&&Bridge.equals(this.unfoundCount,t.unfoundCount)},$clone:function(t){var i=t||new(System.Collections.Generic.HashSet$1.ElementCount(e));return i.uniqueCount=this.uniqueCount,i.unfoundCount=this.unfoundCount,i}}})),Bridge.define("System.Collections.Generic.HashSet$1.Enumerator",(function(e){return{inherits:[System.Collections.Generic.IEnumerator$1(e)],$kind:"struct",statics:{getDefaultValue:function(){return new(System.Collections.Generic.HashSet$1.Enumerator(e))}},_set:null,_index:0,_version:0,_current:Bridge.getDefaultValue(e),config:{alias:["dispose","System$IDisposable$dispose","moveNext","System$Collections$IEnumerator$moveNext","getCurrent","System$Collections$Generic$IEnumerator$1$"+Bridge.getTypeAlias(e)+"$getCurrent$1"]},$ctor1:function(t){this.$initialize(),this._set=t,this._index=0,this._version=t._version,this._current=Bridge.getDefaultValue(e)},ctor:function(){this.$initialize()},getCurrent:function(){return this._current},System$Collections$IEnumerator$getCurrent:function(){if(0===this._index||this._index===(this._set._lastIndex+1|0))throw new System.InvalidOperationException("Enumeration has either not started or has already finished.");return this.getCurrent()},dispose:function(){},moveNext:function(){if(this._version!==this._set._version)throw new System.InvalidOperationException("Collection was modified; enumeration operation may not execute.");for(;this._index<this._set._lastIndex;){if(this._set._slots[this._index].hashCode>=0)return this._current=this._set._slots[this._index].value,this._index=this._index+1|0,!0;this._index=this._index+1|0}return this._index=this._set._lastIndex+1|0,this._current=Bridge.getDefaultValue(e),!1},System$Collections$IEnumerator$reset:function(){if(this._version!==this._set._version)throw new System.InvalidOperationException("Collection was modified; enumeration operation may not execute.");this._index=0,this._current=Bridge.getDefaultValue(e)},getHashCode:function(){return Bridge.addHash([3788985113,this._set,this._index,this._version,this._current])},equals:function(t){return!!Bridge.is(t,System.Collections.Generic.HashSet$1.Enumerator(e))&&Bridge.equals(this._set,t._set)&&Bridge.equals(this._index,t._index)&&Bridge.equals(this._version,t._version)&&Bridge.equals(this._current,t._current)},$clone:function(t){var i=t||new(System.Collections.Generic.HashSet$1.Enumerator(e));return i._set=this._set,i._index=this._index,i._version=this._version,i._current=this._current,i}}})),Bridge.define("System.Collections.Generic.HashSet$1.Slot",(function(e){return{$kind:"struct",statics:{getDefaultValue:function(){return new(System.Collections.Generic.HashSet$1.Slot(e))}},hashCode:0,value:Bridge.getDefaultValue(e),next:0,ctor:function(){this.$initialize()},getHashCode:function(){return Bridge.addHash([1953459283,this.hashCode,this.value,this.next])},equals:function(t){return!!Bridge.is(t,System.Collections.Generic.HashSet$1.Slot(e))&&Bridge.equals(this.hashCode,t.hashCode)&&Bridge.equals(this.value,t.value)&&Bridge.equals(this.next,t.next)},$clone:function(t){var i=t||new(System.Collections.Generic.HashSet$1.Slot(e));return i.hashCode=this.hashCode,i.value=this.value,i.next=this.next,i}}})),Bridge.define("System.Collections.Generic.Queue$1",(function(e){return{inherits:[System.Collections.Generic.IEnumerable$1(e),System.Collections.ICollection],statics:{MinimumGrow:4,GrowFactor:200,DefaultCapacity:4},_array:null,_head:0,_tail:0,_size:0,_version:0,config:{alias:["getCount","System$Collections$ICollection$getCount","getIsReadOnly","System$Collections$ICollection$getIsReadOnly","System$Collections$Generic$IEnumerable$1$T$getEnumerator","System$Collections$Generic$IEnumerable$1$"+Bridge.getTypeAlias(e)+"$getEnumerator"]},ctor:function(){this.$initialize(),this._array=System.Array.init(0,(function(){return Bridge.getDefaultValue(e)}))},$ctor2:function(t){if(this.$initialize(),t<0)throw new System.ArgumentOutOfRangeException("capacity","Non-negative number required.");this._array=System.Array.init(t,(function(){return Bridge.getDefaultValue(e)}))},$ctor1:function(t){if(this.$initialize(),null==t)throw new System.ArgumentNullException("collection");this._array=System.Array.init(System.Collections.Generic.Queue$1(e).DefaultCapacity,(function(){return Bridge.getDefaultValue(e)}));var i=Bridge.getEnumerator(t,null,e);try{for(;i.System$Collections$IEnumerator$moveNext();)this.enqueue(i[Bridge.geti(i,"System$Collections$Generic$IEnumerator$1$"+Bridge.getTypeAlias(e)+"$getCurrent$1","getCurrent$1")]())}finally{Bridge.hasValue(i)&&i.dispose()}},getCount:function(){return this._size},getIsReadOnly:function(){return!1},clear:function(){this._head<this._tail?System.Array.fill(this._array,Bridge.getDefaultValue(e),this._head,this._size):(System.Array.fill(this._array,Bridge.getDefaultValue(e),this._head,this._array.length-this._head|0),System.Array.fill(this._array,Bridge.getDefaultValue(e),0,this._tail)),this._head=0,this._tail=0,this._size=0,this._version=this._version+1|0},copyTo:function(e,t){var i,n,r;if(null==e)throw new System.ArgumentNullException("array");if(t<0||t>e.length)throw new System.ArgumentOutOfRangeException("arrayIndex","Index was out of range. Must be non-negative and less than the size of the collection.");if(((i=e.length)-t|0)<this._size)throw new System.ArgumentException("Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.");0!==(n=(i-t|0)<this._size?i-t|0:this._size)&&(r=(this._array.length-this._head|0)<n?this._array.length-this._head|0:n,System.Array.copy(this._array,this._head,e,t,r),(n=n-r|0)>0&&System.Array.copy(this._array,0,e,(t+this._array.length|0)-this._head|0,n))},enqueue:function(t){if(this._size===this._array.length){var i=0|Bridge.Int.div(this._array.length*System.Collections.Generic.Queue$1(e).GrowFactor|0,100);i<(this._array.length+System.Collections.Generic.Queue$1(e).MinimumGrow|0)&&(i=this._array.length+System.Collections.Generic.Queue$1(e).MinimumGrow|0),this.setCapacity(i)}this._array[this._tail]=t,this._tail=this.moveNext(this._tail),this._size=this._size+1|0,this._version=this._version+1|0},getEnumerator:function(){return new(System.Collections.Generic.Queue$1.Enumerator(e).$ctor1)(this)},System$Collections$Generic$IEnumerable$1$T$getEnumerator:function(){return new(System.Collections.Generic.Queue$1.Enumerator(e).$ctor1)(this)},System$Collections$IEnumerable$getEnumerator:function(){return new(System.Collections.Generic.Queue$1.Enumerator(e).$ctor1)(this)},dequeue:function(){if(0===this._size)throw new System.InvalidOperationException("Queue empty.");var t=this._array[this._head];return this._array[this._head]=Bridge.getDefaultValue(e),this._head=this.moveNext(this._head),this._size=this._size-1|0,this._version=this._version+1|0,t},peek:function(){if(0===this._size)throw new System.InvalidOperationException("Queue empty.");return this._array[this._head]},contains:function(t){for(var i=this._head,n=this._size,r=System.Collections.Generic.EqualityComparer$1(e).def;Bridge.identity(n,n=n-1|0)>0;){if(null==t){if(null==this._array[i])return!0}else if(null!=this._array[i]&&r.equals2(this._array[i],t))return!0;i=this.moveNext(i)}return!1},getElement:function(e){return this._array[(this._head+e|0)%this._array.length]},toArray:function(){var t=System.Array.init(this._size,(function(){return Bridge.getDefaultValue(e)}));return 0===this._size||(this._head<this._tail?System.Array.copy(this._array,this._head,t,0,this._size):(System.Array.copy(this._array,this._head,t,0,this._array.length-this._head|0),System.Array.copy(this._array,0,t,this._array.length-this._head|0,this._tail))),t},setCapacity:function(t){var i=System.Array.init(t,(function(){return Bridge.getDefaultValue(e)}));this._size>0&&(this._head<this._tail?System.Array.copy(this._array,this._head,i,0,this._size):(System.Array.copy(this._array,this._head,i,0,this._array.length-this._head|0),System.Array.copy(this._array,0,i,this._array.length-this._head|0,this._tail))),this._array=i,this._head=0,this._tail=this._size===t?0:this._size,this._version=this._version+1|0},moveNext:function(e){var t=e+1|0;return t===this._array.length?0:t},trimExcess:function(){var e=Bridge.Int.clip32(.9*this._array.length);this._size<e&&this.setCapacity(this._size)}}})),Bridge.define("System.Collections.Generic.Queue$1.Enumerator",(function(e){return{inherits:[System.Collections.Generic.IEnumerator$1(e),System.Collections.IEnumerator],$kind:"struct",statics:{getDefaultValue:function(){return new(System.Collections.Generic.Queue$1.Enumerator(e))}},_q:null,_index:0,_version:0,_currentElement:Bridge.getDefaultValue(e),config:{alias:["dispose","System$IDisposable$dispose","moveNext","System$Collections$IEnumerator$moveNext","getCurrent","System$Collections$Generic$IEnumerator$1$"+Bridge.getTypeAlias(e)+"$getCurrent$1"]},$ctor1:function(t){this.$initialize(),this._q=t,this._version=this._q._version,this._index=-1,this._currentElement=Bridge.getDefaultValue(e)},ctor:function(){this.$initialize()},getCurrent:function(){if(this._index<0)throw-1===this._index?new System.InvalidOperationException("Enumeration has not started. Call MoveNext."):new System.InvalidOperationException("Enumeration already finished.");return this._currentElement},System$Collections$IEnumerator$getCurrent:function(){return this.getCurrent()},dispose:function(){this._index=-2,this._currentElement=Bridge.getDefaultValue(e)},moveNext:function(){if(this._version!==this._q._version)throw new System.InvalidOperationException("Collection was modified; enumeration operation may not execute.");return-2!==this._index&&(this._index=this._index+1|0,this._index===this._q._size?(this._index=-2,this._currentElement=Bridge.getDefaultValue(e),!1):(this._currentElement=this._q.getElement(this._index),!0))},System$Collections$IEnumerator$reset:function(){if(this._version!==this._q._version)throw new System.InvalidOperationException("Collection was modified; enumeration operation may not execute.");this._index=-1,this._currentElement=Bridge.getDefaultValue(e)},getHashCode:function(){return Bridge.addHash([3788985113,this._q,this._index,this._version,this._currentElement])},equals:function(t){return!!Bridge.is(t,System.Collections.Generic.Queue$1.Enumerator(e))&&Bridge.equals(this._q,t._q)&&Bridge.equals(this._index,t._index)&&Bridge.equals(this._version,t._version)&&Bridge.equals(this._currentElement,t._currentElement)},$clone:function(t){var i=t||new(System.Collections.Generic.Queue$1.Enumerator(e));return i._q=this._q,i._index=this._index,i._version=this._version,i._currentElement=this._currentElement,i}}})),Bridge.define("System.Collections.Generic.Stack$1",(function(e){return{inherits:[System.Collections.Generic.IEnumerable$1(e),System.Collections.ICollection],statics:{DefaultCapacity:4},_array:null,_size:0,_version:0,config:{alias:["getCount","System$Collections$ICollection$getCount","getIsReadOnly","System$Collections$ICollection$getIsReadOnly","System$Collections$Generic$IEnumerable$1$T$getEnumerator","System$Collections$Generic$IEnumerable$1$"+Bridge.getTypeAlias(e)+"$getEnumerator"]},ctor:function(){this.$initialize(),this._array=System.Array.init(0,(function(){return Bridge.getDefaultValue(e)}))},$ctor2:function(t){if(this.$initialize(),t<0)throw new System.ArgumentOutOfRangeException("capacity","Non-negative number required.");this._array=System.Array.init(t,(function(){return Bridge.getDefaultValue(e)}))},$ctor1:function(t){if(this.$initialize(),null==t)throw new System.ArgumentNullException("collection");var i={};this._array=Bridge.Collections.EnumerableHelpers.toArray$1(e,t,i),this._size=i.v},getCount:function(){return this._size},getIsReadOnly:function(){return!1},clear:function(){System.Array.fill(this._array,Bridge.getDefaultValue(e),0,this._size),this._size=0,this._version=this._version+1|0},contains:function(t){for(var i=this._size,n=System.Collections.Generic.EqualityComparer$1(e).def;Bridge.identity(i,i=i-1|0)>0;)if(null==t){if(null==this._array[i])return!0}else if(null!=this._array[i]&&n.equals2(this._array[i],t))return!0;return!1},copyTo:function(e,t){var i,n,r;if(null==e)throw new System.ArgumentNullException("array");if(t<0||t>e.length)throw new System.ArgumentOutOfRangeException("arrayIndex","Non-negative number required.");if((e.length-t|0)<this._size)throw new System.ArgumentException("Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.");if(Bridge.referenceEquals(e,this._array))System.Array.copy(this._array,0,e,t,this._size),System.Array.reverse(e,t,this._size);else for(i=0,n=t+this._size|0,r=0;r<this._size;r=r+1|0)e[n=n-1|0]=this._array[Bridge.identity(i,i=i+1|0)]},copyTo$1:function(e,t){if(null==e)throw new System.ArgumentNullException("array");if(1!==System.Array.getRank(e))throw new System.ArgumentException("Only single dimensional arrays are supported for the requested action.");if(0!==System.Array.getLower(e,0))throw new System.ArgumentException("The lower bound of target array must be zero.");if(t<0||t>e.length)throw new System.ArgumentOutOfRangeException("arrayIndex","Non-negative number required.");if((e.length-t|0)<this._size)throw new System.ArgumentException("Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.");try{System.Array.copy(this._array,0,e,t,this._size),System.Array.reverse(e,t,this._size)}catch(e){throw e=System.Exception.create(e),new System.ArgumentException("Target array type is not compatible with the type of items in the collection.")}},getEnumerator:function(){return new(System.Collections.Generic.Stack$1.Enumerator(e).$ctor1)(this)},System$Collections$Generic$IEnumerable$1$T$getEnumerator:function(){return new(System.Collections.Generic.Stack$1.Enumerator(e).$ctor1)(this)},System$Collections$IEnumerable$getEnumerator:function(){return new(System.Collections.Generic.Stack$1.Enumerator(e).$ctor1)(this)},trimExcess:function(){var t,i=Bridge.Int.clip32(.9*this._array.length);this._size<i&&(t={v:this._array},System.Array.resize(t,this._size,Bridge.getDefaultValue(e)),this._array=t.v,this._version=this._version+1|0)},peek:function(){if(0===this._size)throw new System.InvalidOperationException("Stack empty.");return this._array[this._size-1|0]},pop:function(){if(0===this._size)throw new System.InvalidOperationException("Stack empty.");this._version=this._version+1|0;var t=this._array[this._size=this._size-1|0];return this._array[this._size]=Bridge.getDefaultValue(e),t},push:function(t){if(this._size===this._array.length){var i={v:this._array};System.Array.resize(i,0===this._array.length?System.Collections.Generic.Stack$1(e).DefaultCapacity:2*this._array.length|0,Bridge.getDefaultValue(e)),this._array=i.v}this._array[Bridge.identity(this._size,this._size=this._size+1|0)]=t,this._version=this._version+1|0},toArray:function(){for(var t=System.Array.init(this._size,(function(){return Bridge.getDefaultValue(e)})),i=0;i<this._size;)t[i]=this._array[(this._size-i|0)-1|0],i=i+1|0;return t}}})),Bridge.define("System.Collections.Generic.Stack$1.Enumerator",(function(e){return{inherits:[System.Collections.Generic.IEnumerator$1(e),System.Collections.IEnumerator],$kind:"struct",statics:{getDefaultValue:function(){return new(System.Collections.Generic.Stack$1.Enumerator(e))}},_stack:null,_index:0,_version:0,_currentElement:Bridge.getDefaultValue(e),config:{alias:["dispose","System$IDisposable$dispose","moveNext","System$Collections$IEnumerator$moveNext","getCurrent","System$Collections$Generic$IEnumerator$1$"+Bridge.getTypeAlias(e)+"$getCurrent$1"]},$ctor1:function(t){this.$initialize(),this._stack=t,this._version=this._stack._version,this._index=-2,this._currentElement=Bridge.getDefaultValue(e)},ctor:function(){this.$initialize()},getCurrent:function(){if(-2===this._index)throw new System.InvalidOperationException("Enumeration has not started. Call MoveNext.");if(-1===this._index)throw new System.InvalidOperationException("Enumeration already finished.");return this._currentElement},System$Collections$IEnumerator$getCurrent:function(){if(-2===this._index)throw new System.InvalidOperationException("Enumeration has not started. Call MoveNext.");if(-1===this._index)throw new System.InvalidOperationException("Enumeration already finished.");return this._currentElement},dispose:function(){this._index=-1},moveNext:function(){var t;if(this._version!==this._stack._version)throw new System.InvalidOperationException("Collection was modified; enumeration operation may not execute.");return-2===this._index?(this._index=this._stack._size-1|0,(t=this._index>=0)&&(this._currentElement=this._stack._array[this._index]),t):-1!==this._index&&(t=(this._index=this._index-1|0)>=0,this._currentElement=t?this._stack._array[this._index]:Bridge.getDefaultValue(e),t)},System$Collections$IEnumerator$reset:function(){if(this._version!==this._stack._version)throw new System.InvalidOperationException("Collection was modified; enumeration operation may not execute.");this._index=-2,this._currentElement=Bridge.getDefaultValue(e)},getHashCode:function(){return Bridge.addHash([3788985113,this._stack,this._index,this._version,this._currentElement])},equals:function(t){return!!Bridge.is(t,System.Collections.Generic.Stack$1.Enumerator(e))&&Bridge.equals(this._stack,t._stack)&&Bridge.equals(this._index,t._index)&&Bridge.equals(this._version,t._version)&&Bridge.equals(this._currentElement,t._currentElement)},$clone:function(t){var i=t||new(System.Collections.Generic.Stack$1.Enumerator(e));return i._stack=this._stack,i._index=this._index,i._version=this._version,i._currentElement=this._currentElement,i}}})),Bridge.define("System.Collections.HashHelpers",{statics:{HashPrime:101,primes:null,MaxPrimeArrayLength:2146435069,config:{init:function(){this.primes=[3,7,11,17,23,29,37,47,59,71,89,107,131,163,197,239,293,353,431,521,631,761,919,1103,1327,1597,1931,2333,2801,3371,4049,4861,5839,7013,8419,10103,12143,14591,17519,21023,25229,30293,36353,43627,52361,62851,75431,90523,108631,130363,156437,187751,225307,270371,324449,389357,467237,560689,672827,807403,968897,1162687,1395263,1674319,2009191,2411033,2893249,3471899,4166287,4999559,5999471,7199369]}},isPrime:function(e){var t,i;if(0!=(1&e)){for(t=Bridge.Int.clip32(Math.sqrt(e)),i=3;i<=t;i=i+2|0)if(e%i==0)return!1;return!0}return 2===e},getPrime:function(e){var t,i,n;if(e<0)throw new System.ArgumentException("Hashtable's capacity overflowed and went negative. Check load factor, capacity and the current size of the table.");for(t=0;t<System.Collections.HashHelpers.primes.length;t=t+1|0)if((i=System.Collections.HashHelpers.primes[t])>=e)return i;for(n=1|e;n<2147483647;n=n+2|0)if(System.Collections.HashHelpers.isPrime(n)&&(n-1|0)%System.Collections.HashHelpers.HashPrime!=0)return n;return e},getMinPrime:function(){return System.Collections.HashHelpers.primes[0]},expandPrime:function(e){var t=2*e|0;return t>>>0>System.Collections.HashHelpers.MaxPrimeArrayLength&&System.Collections.HashHelpers.MaxPrimeArrayLength>e?System.Collections.HashHelpers.MaxPrimeArrayLength:System.Collections.HashHelpers.getPrime(t)}}})}));