You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

2 lines
35 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[2255],{62255:function(F,B){"use strict";var l={Identity:function(t){return t},True:function(){return!0},Blank:function(){}},p={Boolean:"boolean",Number:"number",String:"string",Object:typeof{},Undefined:"undefined",Function:"function"},L={"":l.Identity},o={createLambda:function(t){if(t==null)return l.Identity;if(typeof t===p.String){var n=L[t];if(n!=null)return n;if(t.indexOf("=>")===-1){for(var e=new RegExp("[$]+","g"),r=0,i;(i=e.exec(t))!=null;){var a=i[0].length;a>r&&(r=a)}for(var f=[],c=1;c<=r;c++){for(var v="",h=0;h<c;h++)v+="$";f.push(v)}var d=Array.prototype.join.call(f,",");return n=new Function(d,"return "+t),L[t]=n,n}else{var m=t.match(/^[(\s]*([^()]*?)[)\s]*=>(.*)/);return n=new Function(m[1],m[2].match(/\breturn\b/)?m[2]:"return "+m[2]),L[t]=n,n}}return t},isIEnumerable:function(t){if(typeof Enumerator!==p.Undefined)try{return new Enumerator(t),!0}catch(n){}return!1},defineProperty:Object.defineProperties!=null?function(t,n,e){Object.defineProperty(t,n,{enumerable:!1,configurable:!0,writable:!0,value:e})}:function(t,n,e){t[n]=e},compare:function(t,n){return t===n?0:t>n?1:-1},dispose:function(t){t!=null&&t.dispose()},hasNativeIteratorSupport:function(){return typeof Symbol!="undefined"&&typeof Symbol.iterator!="undefined"}},g={Before:0,Running:1,After:2},s=function(t,n,e){var r=new O,i=g.Before;this.current=r.current,this.moveNext=function(){try{switch(i){case g.Before:i=g.Running,t();case g.Running:return n.apply(r)?!0:(this.dispose(),!1);case g.After:return!1}}catch(a){throw this.dispose(),a}},this.dispose=function(){if(i==g.Running)try{e()}finally{i=g.After}}},O=function(){var t=null;this.current=function(){return t},this.yieldReturn=function(n){return t=n,!0},this.yieldBreak=function(){return!1}},u=function(t){this.getEnumerator=t};u.Utils={},u.Utils.createLambda=function(t){return o.createLambda(t)},u.Utils.createEnumerable=function(t){return new u(t)},u.Utils.createEnumerator=function(t,n,e){return new s(t,n,e)},u.Utils.extendTo=function(t){var n=t.prototype,e;t===Array?(e=y.prototype,o.defineProperty(n,"getSource",function(){return this})):(e=u.prototype,o.defineProperty(n,"getEnumerator",function(){return u.from(this).getEnumerator()}));for(var r in e){var i=e[r];n[r]!=i&&(n[r]!=null&&(r=r+"ByLinq",n[r]==i)||i instanceof Function&&o.defineProperty(n,r,i))}},u.Utils.recallFrom=function(t){var n=t.prototype,e;t===Array?(e=y.prototype,delete n.getSource):(e=u.prototype,delete n.getEnumerator);for(var r in e){var i=e[r];n[r+"ByLinq"]?delete n[r+"ByLinq"]:n[r]==i&&i instanceof Function&&delete n[r]}},u.choice=function(){var t=arguments;return new u(function(){return new s(function(){t=t[0]instanceof Array?t[0]:t[0].getEnumerator!=null?t[0].toArray():t},function(){return this.yieldReturn(t[Math.floor(Math.random()*t.length)])},l.Blank)})},u.cycle=function(){var t=arguments;return new u(function(){var n=0;return new s(function(){t=t[0]instanceof Array?t[0]:t[0].getEnumerator!=null?t[0].toArray():t},function(){return n>=t.length&&(n=0),this.yieldReturn(t[n++])},l.Blank)})},u.empty=function(){return new u(function(){return new s(l.Blank,function(){return!1},l.Blank)})},u.from=function(t){if(t==null)return u.empty();if(t instanceof u)return t;if(typeof t==p.Number||typeof t==p.Boolean)return u.repeat(t,1);if(typeof t==p.String)return new u(function(){var n=0;return new s(l.Blank,function(){return n<t.length?this.yieldReturn(t.charAt(n++)):!1},l.Blank)});if(typeof t!=p.Function){if(typeof t.length==p.Number)return new y(t);if(typeof Symbol!="undefined"&&typeof t[Symbol.iterator]!="undefined")return new u(function(){return new s(l.Blank,function(){var n=t.next();return n.done?!1:this.yieldReturn(n.value)},l.Blank)});if(!(t instanceof Object)&&o.isIEnumerable(t))return new u(function(){var n=!0,e;return new s(function(){e=new Enumerator(t)},function(){return n?n=!1:e.moveNext(),e.atEnd()?!1:this.yieldReturn(e.item())},l.Blank)});if(typeof Windows===p.Object&&typeof t.first===p.Function)return new u(function(){var n=!0,e;return new s(function(){e=t.first()},function(){return n?n=!1:e.moveNext(),e.hasCurrent?this.yieldReturn(e.current):this.yieldBreak()},l.Blank)})}return new u(function(){var n=[],e=0;return new s(function(){for(var r in t){var i=t[r];!(i instanceof Function)&&Object.prototype.hasOwnProperty.call(t,r)&&n.push({key:r,value:i})}},function(){return e<n.length?this.yieldReturn(n[e++]):!1},l.Blank)})},u.make=function(t){return u.repeat(t,1)},u.matches=function(t,n,e){return e==null&&(e=""),n instanceof RegExp&&(e+=n.ignoreCase?"i":"",e+=n.multiline?"m":"",n=n.source),e.indexOf("g")===-1&&(e+="g"),new u(function(){var r;return new s(function(){r=new RegExp(n,e)},function(){var i=r.exec(t);return i?this.yieldReturn(i):!1},l.Blank)})},u.range=function(t,n,e){return e==null&&(e=1),new u(function(){var r,i=0;return new s(function(){r=t-e},function(){return i++<n?this.yieldReturn(r+=e):this.yieldBreak()},l.Blank)})},u.rangeDown=function(t,n,e){return e==null&&(e=1),new u(function(){var r,i=0;return new s(function(){r=t+e},function(){return i++<n?this.yieldReturn(r-=e):this.yieldBreak()},l.Blank)})},u.rangeTo=function(t,n,e){return e==null&&(e=1),t<n?new u(function(){var r;return new s(function(){r=t-e},function(){var i=r+=e;return i<=n?this.yieldReturn(i):this.yieldBreak()},l.Blank)}):new u(function(){var r;return new s(function(){r=t+e},function(){var i=r-=e;return i>=n?this.yieldReturn(i):this.yieldBreak()},l.Blank)})},u.repeat=function(t,n){return n!=null?u.repeat(t).take(n):new u(function(){return new s(l.Blank,function(){return this.yieldReturn(t)},l.Blank)})},u.repeatWithFinalize=function(t,n){return t=o.createLambda(t),n=o.createLambda(n),new u(function(){var e;return new s(function(){e=t()},function(){return this.yieldReturn(e)},function(){e!=null&&(n(e),e=null)})})},u.generate=function(t,n){return n!=null?u.generate(t).take(n):(t=o.createLambda(t),new u(function(){return new s(l.Blank,function(){return this.yieldReturn(t())},l.Blank)}))},u.toInfinity=function(t,n){return t==null&&(t=0),n==null&&(n=1),new u(function(){var e;return new s(function(){e=t-n},function(){return this.yieldReturn(e+=n)},l.Blank)})},u.toNegativeInfinity=function(t,n){return t==null&&(t=0),n==null&&(n=1),new u(function(){var e;return new s(function(){e=t+n},function(){return this.yieldReturn(e-=n)},l.Blank)})},u.unfold=function(t,n){return n=o.createLambda(n),new u(function(){var e=!0,r;return new s(l.Blank,function(){return e?(e=!1,r=t,this.yieldReturn(r)):(r=n(r),this.yieldReturn(r))},l.Blank)})},u.defer=function(t){return new u(function(){var n;return new s(function(){n=u.from(t()).getEnumerator()},function(){return n.moveNext()?this.yieldReturn(n.current()):this.yieldBreak()},function(){o.dispose(n)})})},u.prototype.traverseBreadthFirst=function(t,n){var e=this;return t=o.createLambda(t),n=o.createLambda(n),new u(function(){var r,i=0,a=[];return new s(function(){r=e.getEnumerator()},function(){for(;;){if(r.moveNext())return a.push(r.current()),this.yieldReturn(n(r.current(),i));var f=u.from(a).selectMany(function(c){return t(c)});if(f.any())i++,a=[],o.dispose(r),r=f.getEnumerator();else return!1}},function(){o.dispose(r)})})},u.prototype.traverseDepthFirst=function(t,n){var e=this;return t=o.createLambda(t),n=o.createLambda(n),new u(function(){var r=[],i;return new s(function(){i=e.getEnumerator()},function(){for(;;){if(i.moveNext()){var a=n(i.current(),r.length);return r.push(i),i=u.from(t(i.current())).getEnumerator(),this.yieldReturn(a)}if(r.length<=0)return!1;o.dispose(i),i=r.pop()}},function(){try{o.dispose(i)}finally{u.from(r).forEach(function(a){a.dispose()})}})})},u.prototype.flatten=function(){var t=this;return new u(function(){var n,e=null;return new s(function(){n=t.getEnumerator()},function(){for(;;){if(e!=null){if(e.moveNext())return this.yieldReturn(e.current());e=null}if(n.moveNext())if(n.current()instanceof Array){o.dispose(e),e=u.from(n.current()).selectMany(l.Identity).flatten().getEnumerator();continue}else return this.yieldReturn(n.current());return!1}},function(){try{o.dispose(n)}finally{o.dispose(e)}})})},u.prototype.pairwise=function(t){var n=this;return t=o.createLambda(t),new u(function(){var e;return new s(function(){e=n.getEnumerator(),e.moveNext()},function(){var r=e.current();return e.moveNext()?this.yieldReturn(t(r,e.current())):!1},function(){o.dispose(e)})})},u.prototype.scan=function(t,n){var e;n==null?(n=o.createLambda(t),e=!1):(n=o.createLambda(n),e=!0);var r=this;return new u(function(){var i,a,f=!0;return new s(function(){i=r.getEnumerator()},function(){if(f){if(f=!1,e)return this.yieldReturn(a=t);if(i.moveNext())return this.yieldReturn(a=i.current())}return i.moveNext()?this.yieldReturn(a=n(a,i.current())):!1},function(){o.dispose(i)})})},u.prototype.select=function(t){if(t=o.createLambda(t),t.length<=1)return new b(this,null,t);var n=this;return new u(function(){var e,r=0;return new s(function(){e=n.getEnumerator()},function(){return e.moveNext()?this.yieldReturn(t(e.current(),r++)):!1},function(){o.dispose(e)})})},u.prototype.selectMany=function(t,n){var e=this;return t=o.createLambda(t),n==null&&(n=function(r,i){return i}),n=o.createLambda(n),new u(function(){var r,i=void 0,a=0;return new s(function(){r=e.getEnumerator()},function(){if(i===void 0&&!r.moveNext())return!1;do{if(i==null){var f=t(r.current(),a++);i=u.from(f).getEnumerator()}if(i.moveNext())return this.yieldReturn(n(r.current(),i.current()));o.dispose(i),i=null}while(r.moveNext());return!1},function(){try{o.dispose(r)}finally{o.dispose(i)}})})},u.prototype.where=function(t){if(t=o.createLambda(t),t.length<=1)return new E(this,t);var n=this;return new u(function(){var e,r=0;return new s(function(){e=n.getEnumerator()},function(){for(;e.moveNext();)if(t(e.current(),r++))return this.yieldReturn(e.current());return!1},function(){o.dispose(e)})})},u.prototype.choose=function(t){t=o.createLambda(t);var n=this;return new u(function(){var e,r=0;return new s(function(){e=n.getEnumerator()},function(){for(;e.moveNext();){var i=t(e.current(),r++);if(i!=null)return this.yieldReturn(i)}return this.yieldBreak()},function(){o.dispose(e)})})},u.prototype.ofType=function(t){var n;switch(t){case Number:n=p.Number;break;case String:n=p.String;break;case Boolean:n=p.Boolean;break;case Function:n=p.Function;break;default:n=null;break}return n===null?this.where(function(e){return e instanceof t}):this.where(function(e){return typeof e===n})},u.prototype.zip=function(){var t=arguments,n=o.createLambda(arguments[arguments.length-1]),e=this;if(arguments.length==2){var r=arguments[0];return new u(function(){var i,a,f=0;return new s(function(){i=e.getEnumerator(),a=u.from(r).getEnumerator()},function(){return i.moveNext()&&a.moveNext()?this.yieldReturn(n(i.current(),a.current(),f++)):!1},function(){try{o.dispose(i)}finally{o.dispose(a)}})})}else return new u(function(){var i,a=0;return new s(function(){var f=u.make(e).concat(u.from(t).takeExceptLast().select(u.from)).select(function(c){return c.getEnumerator()}).toArray();i=u.from(f)},function(){if(i.all(function(c){return c.moveNext()})){var f=i.select(function(c){return c.current()}).toArray();return f.push(a++),this.yieldReturn(n.apply(null,f))}else return this.yieldBreak()},function(){u.from(i).forEach(o.dispose)})})},u.prototype.merge=function(){var t=arguments,n=this;return new u(function(){var e,r=-1;return new s(function(){e=u.make(n).concat(u.from(t).select(u.from)).select(function(i){return i.getEnumerator()}).toArray()},function(){for(;e.length>0;){r=r>=e.length-1?0:r+1;var i=e[r];if(i.moveNext())return this.yieldReturn(i.current());i.dispose(),e.splice(r--,1)}return this.yieldBreak()},function(){u.from(e).forEach(o.dispose)})})},u.prototype.join=function(t,n,e,r,i){n=o.createLambda(n),e=o.createLambda(e),r=o.createLambda(r),i=o.createLambda(i);var a=this;return new u(function(){var f,c,v=null,h=0;return new s(function(){f=a.getEnumerator(),c=u.from(t).toLookup(e,l.Identity,i)},function(){for(;;){if(v!=null){var d=v[h++];if(d!==void 0)return this.yieldReturn(r(f.current(),d));d=null,h=0}if(f.moveNext()){var m=n(f.current());v=c.get(m).toArray()}else return!1}},function(){o.dispose(f)})})},u.prototype.groupJoin=function(t,n,e,r,i){n=o.createLambda(n),e=o.createLambda(e),r=o.createLambda(r),i=o.createLambda(i);var a=this;return new u(function(){var f=a.getEnumerator(),c=null;return new s(function(){f=a.getEnumerator(),c=u.from(t).toLookup(e,l.Identity,i)},function(){if(f.moveNext()){var v=c.get(n(f.current()));return this.yieldReturn(r(f.current(),v))}return!1},function(){o.dispose(f)})})},u.prototype.all=function(t){t=o.createLambda(t);var n=!0;return this.forEach(function(e){if(!t(e))return n=!1,!1}),n},u.prototype.any=function(t){t=o.createLambda(t);var n=this.getEnumerator();try{if(arguments.length==0)return n.moveNext();for(;n.moveNext();)if(t(n.current()))return!0;return!1}finally{o.dispose(n)}},u.prototype.isEmpty=function(){return!this.any()},u.prototype.concat=function(){var t=this;if(arguments.length==1){var n=arguments[0];return new u(function(){var r,i;return new s(function(){r=t.getEnumerator()},function(){if(i==null){if(r.moveNext())return this.yieldReturn(r.current());i=u.from(n).getEnumerator()}return i.moveNext()?this.yieldReturn(i.current()):!1},function(){try{o.dispose(r)}finally{o.dispose(i)}})})}else{var e=arguments;return new u(function(){var r;return new s(function(){r=u.make(t).concat(u.from(e).select(u.from)).select(function(i){return i.getEnumerator()}).toArray()},function(){for(;r.length>0;){var i=r[0];if(i.moveNext())return this.yieldReturn(i.current());i.dispose(),r.splice(0,1)}return this.yieldBreak()},function(){u.from(r).forEach(o.dispose)})})}},u.prototype.insert=function(t,n){var e=this;return new u(function(){var r,i,a=0,f=!1;return new s(function(){r=e.getEnumerator(),i=u.from(n).getEnumerator()},function(){return a==t&&i.moveNext()?(f=!0,this.yieldReturn(i.current())):r.moveNext()?(a++,this.yieldReturn(r.current())):!f&&i.moveNext()?this.yieldReturn(i.current()):!1},function(){try{o.dispose(r)}finally{o.dispose(i)}})})},u.prototype.alternate=function(t){var n=this;return new u(function(){var e,r,i,a;return new s(function(){t instanceof Array||t.getEnumerator!=null?i=u.from(u.from(t).toArray()):i=u.make(t),r=n.getEnumerator(),r.moveNext()&&(e=r.current())},function(){for(;;){if(a!=null){if(a.moveNext())return this.yieldReturn(a.current());a=null}if(e==null&&r.moveNext()){e=r.current(),a=i.getEnumerator();continue}else if(e!=null){var f=e;return e=null,this.yieldReturn(f)}return this.yieldBreak()}},function(){try{o.dispose(r)}finally{o.dispose(a)}})})},u.prototype.contains=function(t,n){n=o.createLambda(n);var e=this.getEnumerator();try{for(;e.moveNext();)if(n(e.current())===t)return!0;return!1}finally{o.dispose(e)}},u.prototype.defaultIfEmpty=function(t){var n=this;return t===void 0&&(t=null),new u(function(){var e,r=!0;return new s(function(){e=n.getEnumerator()},function(){return e.moveNext()?(r=!1,this.yieldReturn(e.current())):r?(r=!1,this.yieldReturn(t)):!1},function(){o.dispose(e)})})},u.prototype.distinct=function(t){return this.except(u.empty(),t)},u.prototype.distinctUntilChanged=function(t){t=o.createLambda(t);var n=this;return new u(function(){var e,r,i;return new s(function(){e=n.getEnumerator()},function(){for(;e.moveNext();){var a=t(e.current());if(i)return i=!1,r=a,this.yieldReturn(e.current());if(r!==a)return r=a,this.yieldReturn(e.current())}return this.yieldBreak()},function(){o.dispose(e)})})},u.prototype.except=function(t,n){n=o.createLambda(n);var e=this;return new u(function(){var r,i;return new s(function(){r=e.getEnumerator(),i=new x(n),u.from(t).forEach(function(a){i.add(a)})},function(){for(;r.moveNext();){var a=r.current();if(!i.contains(a))return i.add(a),this.yieldReturn(a)}return!1},function(){o.dispose(r)})})},u.prototype.intersect=function(t,n){n=o.createLambda(n);var e=this;return new u(function(){var r,i,a;return new s(function(){r=e.getEnumerator(),i=new x(n),u.from(t).forEach(function(f){i.add(f)}),a=new x(n)},function(){for(;r.moveNext();){var f=r.current();if(!a.contains(f)&&i.contains(f))return a.add(f),this.yieldReturn(f)}return!1},function(){o.dispose(r)})})},u.prototype.sequenceEqual=function(t,n){n=o.createLambda(n);var e=this.getEnumerator();try{var r=u.from(t).getEnumerator();try{for(;e.moveNext();)if(!r.moveNext()||n(e.current())!==n(r.current()))return!1;return!r.moveNext()}finally{o.dispose(r)}}finally{o.dispose(e)}},u.prototype.union=function(t,n){n=o.createLambda(n);var e=this;return new u(function(){var r,i,a;return new s(function(){r=e.getEnumerator(),a=new x(n)},function(){var f;if(i===void 0){for(;r.moveNext();)if(f=r.current(),!a.contains(f))return a.add(f),this.yieldReturn(f);i=u.from(t).getEnumerator()}for(;i.moveNext();)if(f=i.current(),!a.contains(f))return a.add(f),this.yieldReturn(f);return!1},function(){try{o.dispose(r)}finally{o.dispose(i)}})})},u.prototype.orderBy=function(t,n){return new w(this,t,n,!1)},u.prototype.orderByDescending=function(t,n){return new w(this,t,n,!0)},u.prototype.reverse=function(){var t=this;return new u(function(){var n,e;return new s(function(){n=t.toArray(),e=n.length},function(){return e>0?this.yieldReturn(n[--e]):!1},l.Blank)})},u.prototype.shuffle=function(){var t=this;return new u(function(){var n;return new s(function(){n=t.toArray()},function(){if(n.length>0){var e=Math.floor(Math.random()*n.length);return this.yieldReturn(n.splice(e,1)[0])}return!1},l.Blank)})},u.prototype.weightedSample=function(t){t=o.createLambda(t);var n=this;return new u(function(){var e,r=0;return new s(function(){e=n.choose(function(i){var a=t(i);return a<=0?null:(r+=a,{value:i,bound:r})}).toArray()},function(){if(e.length>0){for(var i=Math.floor(Math.random()*r)+1,a=-1,f=e.length;f-a>1;){var c=Math.floor((a+f)/2);e[c].bound>=i?f=c:a=c}return this.yieldReturn(e[f].value)}return this.yieldBreak()},l.Blank)})},u.prototype.groupBy=function(t,n,e,r){var i=this;return t=o.createLambda(t),n=o.createLambda(n),e!=null&&(e=o.createLambda(e)),r=o.createLambda(r),new u(function(){var a;return new s(function(){a=i.toLookup(t,n,r).toEnumerable().getEnumerator()},function(){for(;a.moveNext();)return e==null?this.yieldReturn(a.current()):this.yieldReturn(e(a.current().key(),a.current()));return!1},function(){o.dispose(a)})})},u.prototype.partitionBy=function(t,n,e,r){var i=this;t=o.createLambda(t),n=o.createLambda(n),r=o.createLambda(r);var a;return e==null?(a=!1,e=function(f,c){return new N(f,c)}):(a=!0,e=o.createLambda(e)),new u(function(){var f,c,v,h=[];return new s(function(){f=i.getEnumerator(),f.moveNext()&&(c=t(f.current()),v=r(c),h.push(n(f.current())))},function(){for(var d;(d=f.moveNext())==!0&&v===r(t(f.current()));)h.push(n(f.current()));if(h.length>0){var m=a?e(c,u.from(h)):e(c,h);return d?(c=t(f.current()),v=r(c),h=[n(f.current())]):h=[],this.yieldReturn(m)}return!1},function(){o.dispose(f)})})},u.prototype.buffer=function(t){var n=this;return new u(function(){var e;return new s(function(){e=n.getEnumerator()},function(){for(var r=[],i=0;e.moveNext();)if(r.push(e.current()),++i>=t)return this.yieldReturn(r);return r.length>0?this.yieldReturn(r):!1},function(){o.dispose(e)})})},u.prototype.aggregate=function(t,n,e){return e=o.createLambda(e),e(this.scan(t,n,e).last())},u.prototype.average=function(t){t=o.createLambda(t);var n=0,e=0;return this.forEach(function(r){n+=t(r),++e}),n/e},u.prototype.count=function(t){t=t==null?l.True:o.createLambda(t);var n=0;return this.forEach(function(e,r){t(e,r)&&++n}),n},u.prototype.max=function(t){return t==null&&(t=l.Identity),this.select(t).aggregate(function(n,e){return n>e?n:e})},u.prototype.min=function(t){return t==null&&(t=l.Identity),this.select(t).aggregate(function(n,e){return n<e?n:e})},u.prototype.maxBy=function(t){return t=o.createLambda(t),this.aggregate(function(n,e){return t(n)>t(e)?n:e})},u.prototype.minBy=function(t){return t=o.createLambda(t),this.aggregate(function(n,e){return t(n)<t(e)?n:e})},u.prototype.sum=function(t){return t==null&&(t=l.Identity),this.select(t).aggregate(0,function(n,e){return n+e})},u.prototype.elementAt=function(t){var n,e=!1;if(this.forEach(function(r,i){if(i==t)return n=r,e=!0,!1}),!e)throw new Error("index is less than 0 or greater than or equal to the number of elements in source.");return n},u.prototype.elementAtOrDefault=function(t,n){n===void 0&&(n=null);var e,r=!1;return this.forEach(function(i,a){if(a==t)return e=i,r=!0,!1}),r?e:n},u.prototype.first=function(t){if(t!=null)return this.where(t).first();var n,e=!1;if(this.forEach(function(r){return n=r,e=!0,!1}),!e)throw new Error("first:No element satisfies the condition.");return n},u.prototype.firstOrDefault=function(t,n){if(t!==void 0){if(typeof t===p.Function||typeof o.createLambda(t)===p.Function)return this.where(t).firstOrDefault(void 0,n);n=t}var e,r=!1;return this.forEach(function(i){return e=i,r=!0,!1}),r?e:n},u.prototype.last=function(t){if(t!=null)return this.where(t).last();var n,e=!1;if(this.forEach(function(r){e=!0,n=r}),!e)throw new Error("last:No element satisfies the condition.");return n},u.prototype.lastOrDefault=function(t,n){if(t!==void 0){if(typeof t===p.Function||typeof o.createLambda(t)===p.Function)return this.where(t).lastOrDefault(void 0,n);n=t}var e,r=!1;return this.forEach(function(i){r=!0,e=i}),r?e:n},u.prototype.single=function(t){if(t!=null)return this.where(t).single();var n,e=!1;if(this.forEach(function(r){if(!e)e=!0,n=r;else throw new Error("single:sequence contains more than one element.")}),!e)throw new Error("single:No element satisfies the condition.");return n},u.prototype.singleOrDefault=function(t,n){if(n===void 0&&(n=null),t!=null)return this.where(t).singleOrDefault(null,n);var e,r=!1;return this.forEach(function(i){if(!r)r=!0,e=i;else throw new Error("single:sequence contains more than one element.")}),r?e:n},u.prototype.skip=function(t){var n=this;return new u(function(){var e,r=0;return new s(function(){for(e=n.getEnumerator();r++<t&&e.moveNext(););},function(){return e.moveNext()?this.yieldReturn(e.current()):!1},function(){o.dispose(e)})})},u.prototype.skipWhile=function(t){t=o.createLambda(t);var n=this;return new u(function(){var e,r=0,i=!1;return new s(function(){e=n.getEnumerator()},function(){for(;!i;)if(e.moveNext()){if(!t(e.current(),r++))return i=!0,this.yieldReturn(e.current());continue}else return!1;return e.moveNext()?this.yieldReturn(e.current()):!1},function(){o.dispose(e)})})},u.prototype.take=function(t){var n=this;return new u(function(){var e,r=0;return new s(function(){e=n.getEnumerator()},function(){return r++<t&&e.moveNext()?this.yieldReturn(e.current()):!1},function(){o.dispose(e)})})},u.prototype.takeWhile=function(t){t=o.createLambda(t);var n=this;return new u(function(){var e,r=0;return new s(function(){e=n.getEnumerator()},function(){return e.moveNext()&&t(e.current(),r++)?this.yieldReturn(e.current()):!1},function(){o.dispose(e)})})},u.prototype.takeExceptLast=function(t){t==null&&(t=1);var n=this;return new u(function(){if(t<=0)return n.getEnumerator();var e,r=[];return new s(function(){e=n.getEnumerator()},function(){for(;e.moveNext();){if(r.length==t)return r.push(e.current()),this.yieldReturn(r.shift());r.push(e.current())}return!1},function(){o.dispose(e)})})},u.prototype.takeFromLast=function(t){if(t<=0||t==null)return u.empty();var n=this;return new u(function(){var e,r,i=[];return new s(function(){e=n.getEnumerator()},function(){for(;e.moveNext();)i.length==t&&i.shift(),i.push(e.current());return r==null&&(r=u.from(i).getEnumerator()),r.moveNext()?this.yieldReturn(r.current()):!1},function(){o.dispose(r)})})},u.prototype.indexOf=function(t){var n=null;return typeof t===p.Function?this.forEach(function(e,r){if(t(e,r))return n=r,!1}):this.forEach(function(e,r){if(e===t)return n=r,!1}),n!==null?n:-1},u.prototype.lastIndexOf=function(t){var n=-1;return typeof t===p.Function?this.forEach(function(e,r){t(e,r)&&(n=r)}):this.forEach(function(e,r){e===t&&(n=r)}),n},u.prototype.cast=function(){return this},u.prototype.asEnumerable=function(){return u.from(this)},u.prototype.toArray=function(){var t=[];return this.forEach(function(n){t.push(n)}),t},u.prototype.toLookup=function(t,n,e){t=o.createLambda(t),n=o.createLambda(n),e=o.createLambda(e);var r=new x(e);return this.forEach(function(i){var a=t(i),f=n(i),c=r.get(a);c!==void 0?c.push(f):r.add(a,[f])}),new A(r)},u.prototype.toObject=function(t,n){t=o.createLambda(t),n=o.createLambda(n);var e={};return this.forEach(function(r){e[t(r)]=n(r)}),e},u.prototype.toDictionary=function(t,n,e){t=o.createLambda(t),n=o.createLambda(n),e=o.createLambda(e);var r=new x(e);return this.forEach(function(i){r.add(t(i),n(i))}),r},u.prototype.toJSONString=function(t,n){if(typeof JSON===p.Undefined||JSON.stringify==null)throw new Error("toJSONString can't find JSON.stringify. This works native JSON support Browser or include json2.js");return JSON.stringify(this.toArray(),t,n)},u.prototype.toJoinedString=function(t,n){return t==null&&(t=""),n==null&&(n=l.Identity),this.select(n).toArray().join(t)},u.prototype.doAction=function(t){var n=this;return t=o.createLambda(t),new u(function(){var e,r=0;return new s(function(){e=n.getEnumerator()},function(){return e.moveNext()?(t(e.current(),r++),this.yieldReturn(e.current())):!1},function(){o.dispose(e)})})},u.prototype.forEach=function(t){t=o.createLambda(t);var n=0,e=this.getEnumerator();try{for(;e.moveNext()&&t(e.current(),n++)!==!1;);}finally{o.dispose(e)}},u.prototype.write=function(t,n){t==null&&(t=""),n=o.createLambda(n);var e=!0;this.forEach(function(r){e?e=!1:document.write(t),document.write(n(r))})},u.prototype.writeLine=function(t){t=o.createLambda(t),this.forEach(function(n){document.writeln(t(n)+"<br />")})},u.prototype.force=function(){var t=this.getEnumerator();try{for(;t.moveNext(););}finally{o.dispose(t)}},u.prototype.letBind=function(t){t=o.createLambda(t);var n=this;return new u(function(){var e;return new s(function(){e=u.from(t(n)).getEnumerator()},function(){return e.moveNext()?this.yieldReturn(e.current()):!1},function(){o.dispose(e)})})},u.prototype.share=function(){var t=this,n,e=!1;return new R(function(){return new s(function(){n==null&&(n=t.getEnumerator())},function(){if(e)throw new Error("enumerator is disposed");return n.moveNext()?this.yieldReturn(n.current()):!1},l.Blank)},function(){e=!0,o.dispose(n)})},u.prototype.memoize=function(){var t=this,n,e,r=!1;return new R(function(){var i=-1;return new s(function(){e==null&&(e=t.getEnumerator(),n=[])},function(){if(r)throw new Error("enumerator is disposed");return i++,n.length<=i?e.moveNext()?this.yieldReturn(n[i]=e.current()):!1:this.yieldReturn(n[i])},l.Blank)},function(){r=!0,o.dispose(e),n=null})},o.hasNativeIteratorSupport()&&(u.prototype[Symbol.iterator]=function(){return{enumerator:this.getEnumerator(),next:function(){return this.enumerator.moveNext()?{done:!1,value:this.enumerator.current()}:{done:!0}}}}),u.prototype.catchError=function(t){t=o.createLambda(t);var n=this;return new u(function(){var e;return new s(function(){e=n.getEnumerator()},function(){try{return e.moveNext()?this.yieldReturn(e.current()):!1}catch(r){return t(r),!1}},function(){o.dispose(e)})})},u.prototype.finallyAction=function(t){t=o.createLambda(t);var n=this;return new u(function(){var e;return new s(function(){e=n.getEnumerator()},function(){return e.moveNext()?this.yieldReturn(e.current()):!1},function(){try{o.dispose(e)}finally{t()}})})},u.prototype.log=function(t){return t=o.createLambda(t),this.doAction(function(n){typeof console!==p.Undefined&&console.log(t(n))})},u.prototype.trace=function(t,n){return t==null&&(t="Trace"),n=o.createLambda(n),this.doAction(function(e){typeof console!==p.Undefined&&console.log(t,n(e))})};var w=function(t,n,e,r,i){this.source=t,this.keySelector=o.createLambda(n),this.descending=r,this.parent=i,e&&(this.comparer=o.createLambda(e))};w.prototype=new u,w.prototype.createOrderedEnumerable=function(t,n,e){return new w(this.source,t,n,e,this)},w.prototype.thenBy=function(t,n){return this.createOrderedEnumerable(t,n,!1)},w.prototype.thenByDescending=function(t,n){return this.createOrderedEnumerable(t,n,!0)},w.prototype.getEnumerator=function(){var t=this,n,e,r=0;return new s(function(){n=[],e=[],t.source.forEach(function(a,f){n.push(a),e.push(f)});var i=k.create(t,null);i.GenerateKeys(n),e.sort(function(a,f){return i.compare(a,f)})},function(){return r<e.length?this.yieldReturn(n[e[r++]]):!1},l.Blank)};var k=function(t,n,e,r){this.keySelector=t,this.descending=e,this.child=r,this.comparer=n,this.keys=null};k.create=function(t,n){var e=new k(t.keySelector,t.comparer,t.descending,n);return t.parent!=null?k.create(t.parent,e):e},k.prototype.GenerateKeys=function(t){for(var n=t.length,e=this.keySelector,r=new Array(n),i=0;i<n;i++)r[i]=e(t[i]);this.keys=r,this.child!=null&&this.child.GenerateKeys(t)},k.prototype.compare=function(t,n){var e=this.comparer?this.comparer(this.keys[t],this.keys[n]):o.compare(this.keys[t],this.keys[n]);return e==0?this.child!=null?this.child.compare(t,n):o.compare(t,n):this.descending?-e:e};var R=function(t,n){this.dispose=n,u.call(this,t)};R.prototype=new u;var y=function(t){this.getSource=function(){return t}};y.prototype=new u,y.prototype.any=function(t){return t==null?this.getSource().length>0:u.prototype.any.apply(this,arguments)},y.prototype.count=function(t){return t==null?this.getSource().length:u.prototype.count.apply(this,arguments)},y.prototype.elementAt=function(t){var n=this.getSource();return 0<=t&&t<n.length?n[t]:u.prototype.elementAt.apply(this,arguments)},y.prototype.elementAtOrDefault=function(t,n){n===void 0&&(n=null);var e=this.getSource();return 0<=t&&t<e.length?e[t]:n},y.prototype.first=function(t){var n=this.getSource();return t==null&&n.length>0?n[0]:u.prototype.first.apply(this,arguments)},y.prototype.firstOrDefault=function(t,n){if(t!==void 0)return u.prototype.firstOrDefault.apply(this,arguments);n=t;var e=this.getSource();return e.length>0?e[0]:n},y.prototype.last=function(t){var n=this.getSource();return t==null&&n.length>0?n[n.length-1]:u.prototype.last.apply(this,arguments)},y.prototype.lastOrDefault=function(t,n){if(t!==void 0)return u.prototype.lastOrDefault.apply(this,arguments);n=t;var e=this.getSource();return e.length>0?e[e.length-1]:n},y.prototype.skip=function(t){var n=this.getSource();return new u(function(){var e;return new s(function(){e=t<0?0:t},function(){return e<n.length?this.yieldReturn(n[e++]):!1},l.Blank)})},y.prototype.takeExceptLast=function(t){return t==null&&(t=1),this.take(this.getSource().length-t)},y.prototype.takeFromLast=function(t){return this.skip(this.getSource().length-t)},y.prototype.reverse=function(){var t=this.getSource();return new u(function(){var n;return new s(function(){n=t.length},function(){return n>0?this.yieldReturn(t[--n]):!1},l.Blank)})},y.prototype.sequenceEqual=function(t,n){return(t instanceof y||t instanceof Array)&&n==null&&u.from(t).count()!=this.count()?!1:u.prototype.sequenceEqual.apply(this,arguments)},y.prototype.toJoinedString=function(t,n){var e=this.getSource();return n!=null||!(e instanceof Array)?u.prototype.toJoinedString.apply(this,arguments):(t==null&&(t=""),e.join(t))},y.prototype.getEnumerator=function(){var t=this.getSource(),n=-1;return{current:function(){return t[n]},moveNext:function(){return++n<t.length},dispose:l.Blank}};var E=function(t,n){this.prevSource=t,this.prevPredicate=n};E.prototype=new u,E.prototype.where=function(t){if(t=o.createLambda(t),t.length<=1){var n=this.prevPredicate,e=function(r){return n(r)&&t(r)};return new E(this.prevSource,e)}else return u.prototype.where.call(this,t)},E.prototype.select=function(t){return t=o.createLambda(t),t.length<=1?new b(this.prevSource,this.prevPredicate,t):u.prototype.select.call(this,t)},E.prototype.getEnumerator=function(){var t=this.prevPredicate,n=this.prevSource,e;return new s(function(){e=n.getEnumerator()},function(){for(;e.moveNext();)if(t(e.current()))return this.yieldReturn(e.current());return!1},function(){o.dispose(e)})};var b=function(t,n,e){this.prevSource=t,this.prevPredicate=n,this.prevSelector=e};b.prototype=new u,b.prototype.where=function(t){return t=o.createLambda(t),t.length<=1?new E(this,t):u.prototype.where.call(this,t)},b.prototype.select=function(t){if(t=o.createLambda(t),t.length<=1){var n=this.prevSelector,e=function(r){return t(n(r))};return new b(this.prevSource,this.prevPredicate,e)}else return u.prototype.select.call(this,t)},b.prototype.getEnumerator=function(){var t=this.prevPredicate,n=this.prevSelector,e=this.prevSource,r;return new s(function(){r=e.getEnumerator()},function(){for(;r.moveNext();)if(t==null||t(r.current()))return this.yieldReturn(n(r.current()));return!1},function(){o.dispose(r)})};var x=function(){var t=function(a,f){return Object.prototype.hasOwnProperty.call(a,f)},n=function(a){return a===null?"null":a===void 0?"undefined":typeof a.toString===p.Function?a.toString():Object.prototype.toString.call(a)},e=function(a,f){this.key=a,this.value=f,this.prev=null,this.next=null},r=function(){this.first=null,this.last=null};r.prototype={addLast:function(a){this.last!=null?(this.last.next=a,a.prev=this.last,this.last=a):this.first=this.last=a},replace:function(a,f){a.prev!=null?(a.prev.next=f,f.prev=a.prev):this.first=f,a.next!=null?(a.next.prev=f,f.next=a.next):this.last=f},remove:function(a){a.prev!=null?a.prev.next=a.next:this.first=a.next,a.next!=null?a.next.prev=a.prev:this.last=a.prev}};var i=function(a){this.countField=0,this.entryList=new r,this.buckets={},this.compareSelector=a==null?l.Identity:a};return i.prototype={add:function(a,f){var c=this.compareSelector(a),v=n(c),h=new e(a,f);if(t(this.buckets,v)){for(var d=this.buckets[v],m=0;m<d.length;m++)if(this.compareSelector(d[m].key)===c){this.entryList.replace(d[m],h),d[m]=h;return}d.push(h)}else this.buckets[v]=[h];this.countField++,this.entryList.addLast(h)},get:function(a){var f=this.compareSelector(a),c=n(f);if(!!t(this.buckets,c))for(var v=this.buckets[c],h=0;h<v.length;h++){var d=v[h];if(this.compareSelector(d.key)===f)return d.value}},set:function(a,f){var c=this.compareSelector(a),v=n(c);if(t(this.buckets,v)){for(var h=this.buckets[v],d=0;d<h.length;d++)if(this.compareSelector(h[d].key)===c){var m=new e(a,f);return this.entryList.replace(h[d],m),h[d]=m,!0}}return!1},contains:function(a){var f=this.compareSelector(a),c=n(f);if(!t(this.buckets,c))return!1;for(var v=this.buckets[c],h=0;h<v.length;h++)if(this.compareSelector(v[h].key)===f)return!0;return!1},clear:function(){this.countField=0,this.buckets={},this.entryList=new r},remove:function(a){var f=this.compareSelector(a),c=n(f);if(!!t(this.buckets,c)){for(var v=this.buckets[c],h=0;h<v.length;h++)if(this.compareSelector(v[h].key)===f){this.entryList.remove(v[h]),v.splice(h,1),v.length==0&&delete this.buckets[c],this.countField--;return}}},count:function(){return this.countField},toEnumerable:function(){var a=this;return new u(function(){var f;return new s(function(){f=a.entryList.first},function(){if(f!=null){var c={key:f.key,value:f.value};return f=f.next,this.yieldReturn(c)}return!1},l.Blank)})}},i}(),A=function(t){this.count=function(){return t.count()},this.get=function(n){return u.from(t.get(n))},this.contains=function(n){return t.contains(n)},this.toEnumerable=function(){return t.toEnumerable().select(function(n){return new N(n.key,n.value)})}},N=function(t,n){this.key=function(){return t},y.call(this,n)};N.prototype=new y,B.Z=u}}]);