UNPKG

gojs

Version:

Interactive diagrams, charts, and graphs, such as trees, flowcharts, orgcharts, UML, BPMN, or business diagrams

120 lines 877 kB
/* * GoJS v1.7.19 JavaScript Library for HTML Diagrams * Northwoods Software, https://www.nwoods.com/ * GoJS and Northwoods Software are registered trademarks of Northwoods Software Corporation. * Copyright (C) 1998-2017 by Northwoods Software Corporation. All Rights Reserved. * THIS SOFTWARE IS LICENSED. THE LICENSE AGREEMENT IS AT: https://gojs.net/1.7.19/doc/license.html. */ (function(window) { var g,da={};if(!window.document||void 0===window.document.createElement("canvas").getContext)throw window.console&&window.console.log("The HTML Canvas element is not supported in this browser,or this browser is in Compatibility mode."),Error("The HTML Canvas element is not supported in this browser,or this browser is in Compatibility mode.");if(!Object.defineProperty)throw Error("GoJS requires a newer version of JavaScript"); Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return f.apply(a,e.concat(d.call(arguments)))}function c(){}var d=Array.prototype.slice,e=d.call(arguments,1),f=this;c.prototype=this.prototype;b.prototype=new c;return b}); (function(){for(var a=0,b=["ms","moz","webkit","o"],c=0;c<b.length&&!window.requestAnimationFrame;++c)window.requestAnimationFrame=window[b[c]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[b[c]+"CancelAnimationFrame"]||window[b[c]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(b){var c=(new Date).getTime(),f=Math.max(8,16-(c-a)),h=window.setTimeout(function(){b(c+f)},f);a=c+f;return h});window.cancelAnimationFrame||(window.cancelAnimationFrame= function(a){window.clearTimeout(a)})})();da.Debug=null; var w={ld:1,Sc:2,bd:4,ad:8,Fn:void 0!==window.navigator&&0<window.navigator.userAgent.indexOf("534.30")&&0<window.navigator.userAgent.indexOf("Android"),xI:void 0!==window.navigator&&0<window.navigator.userAgent.indexOf("MSIE 9.0"),qF:void 0!==window.navigator&&0<window.navigator.userAgent.indexOf("MSIE 10.0"),rF:void 0!==window.navigator&&0<window.navigator.userAgent.indexOf("Trident/7"),cL:void 0!==window.navigator&&0<window.navigator.userAgent.indexOf("Edge/"),Hk:void 0!==window.navigator&&void 0!== window.navigator.platform&&0<=window.navigator.platform.toUpperCase().indexOf("MAC"),sF:void 0!==window.navigator&&void 0!==window.navigator.platform&&null!==window.navigator.platform.match(/(iPhone|iPod|iPad)/i),CE:function(a,b,c){var d=-1;return function(){var e=this,f=arguments;-1!==d&&w.clearTimeout(d);d=w.setTimeout(function(){d=-1;c||a.apply(e,f)},b);c&&!d&&a.apply(e,f)}},setTimeout:function(a,b){return window.setTimeout(a,b)},clearTimeout:function(a){window.clearTimeout(a)},createElement:function(a){return window.document.createElement(a)}, k:function(a){throw Error(a);},la:function(a,b){var c="The object is frozen, so its properties cannot be set: "+a.toString();void 0!==b&&(c+=" to value: "+b);w.k(c)},G:function(a,b,c,d){a instanceof b||(c=w.getTypeName(c),void 0!==d&&(c+="."+d),w.Bd(a,b,c))},j:function(a,b,c,d){typeof a!==b&&(c=w.getTypeName(c),void 0!==d&&(c+="."+d),w.Bd(a,b,c))},vd:function(a,b,c){"number"===typeof a&&isFinite(a)||(b=w.getTypeName(b),void 0!==c&&(b+="."+c),w.k(b+" must be a real number type, and not NaN or Infinity: "+ a))},mb:function(a,b,c,d){a instanceof ea&&a.Ee===b||(c=w.getTypeName(c),void 0!==d&&(c+="."+d),w.Bd(a,"a constant of class "+w.kf(b),c))},BK:function(a,b){"string"===typeof a?fa(a)||w.k('Color "'+a+'" is not a valid color string for '+b):a instanceof ha||w.k("Value for "+b+" must be a color string or a Brush, not "+a)},Bd:function(a,b,c,d){b=w.getTypeName(b);c=w.getTypeName(c);void 0!==d&&(c+="."+d);"string"===typeof a?w.k(c+" value is not an instance of "+b+': "'+a+'"'):w.k(c+" value is not an instance of "+ b+": "+a)},Fa:function(a,b,c,d){c=w.getTypeName(c);void 0!==d&&(c+="."+d);w.k(c+" is not in the range "+b+": "+a)},jd:function(a){w.k(w.kf(a)+" constructor cannot take any arguments.")},Ma:function(a){w.k("Collection was modified during iteration: "+a.toString()+"\n Perhaps you should iterate over a copy of the collection,\n or you could collect items to be removed from the collection after the iteration.")},Fj:function(a,b){w.k("No property to set for this enum value: "+b+" on "+a.toString())}, trace:function(a){window.console&&window.console.log(a)},hx:{},It:function(a,b){!0!==w.hx[a]&&(w.hx[a]=!0,window.console&&window.console.log(a+" is deprecated in "+b+", see the GoJS change log for more information."))},Pa:function(a){return"object"===typeof a&&null!==a},isArray:function(a){return Array.isArray(a)||a instanceof NodeList||a instanceof HTMLCollection},zI:function(a){return Array.isArray(a)},Wz:function(a,b,c){w.isArray(a)||w.Bd(a,"Array or NodeList or HTMLCollection",b,c)},Za:function(a){return a.length}, Kl:function(a){return Array.prototype.slice.call(a)},Ba:function(a,b){Array.isArray(a);return a[b]},sE:function(a,b,c){Array.isArray(a)?a[b]=c:w.k("Cannot replace an object in an HTMLCollection or NodeList at "+b)},Hl:function(a,b){if(Array.isArray(a))return a.indexOf(b);for(var c=a.length,d=0;d<c;d++)if(a[d]===b)return d;return-1},sh:function(a,b,c){Array.isArray(a)?b>=a.length?a.push(c):a.splice(b,0,c):w.k("Cannot insert an object into an HTMLCollection or NodeList: "+c+" at "+b)},Kg:function(a, b){Array.isArray(a)?b>=a.length?a.pop():a.splice(b,1):w.k("Cannot remove an object from an HTMLCollection or NodeList at "+b)},zy:[],K:function(){var a=w.zy.pop();return void 0===a?new z:a},xb:function(a,b){var c=w.zy.pop();if(void 0===c)return new z(a,b);c.x=a;c.y=b;return c},v:function(a){w.zy.push(a)},OB:[],jm:function(){var a=w.OB.pop();return void 0===a?new ia:a},Ck:function(a){w.OB.push(a)},Ay:[],Jf:function(){var a=w.Ay.pop();return void 0===a?new B:a},jg:function(a,b,c,d){var e=w.Ay.pop(); if(void 0===e)return new B(a,b,c,d);e.x=a;e.y=b;e.width=c;e.height=d;return e},Db:function(a){w.Ay.push(a)},PB:[],Kf:function(){var a=w.PB.pop();return void 0===a?new ja:a},we:function(a){w.PB.push(a)},By:null,s:function(){var a=w.By;return null!==a?(w.By=null,a):new ka},q:function(a){a.reset();w.By=a},NB:[],cb:function(){var a=w.NB.pop();return void 0===a?[]:a},ua:function(a){a.length=0;w.NB.push(a)},io:Object.freeze([]),nm:1,nc:function(a){a.__gohashid=w.nm++},Vp:function(a){var b=a.__gohashid; void 0===b&&(b=w.nm++,a.__gohashid=b);return b},Od:function(a){return a.__gohashid},ga:function(a,b){b.Ky=a;da[a]=b},Ka:function(a,b){function c(){}c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a},ni:function(a){a.XG=!0},defineProperty:function(a,b,c,d,e){w.j(a,"function","Util.defineProperty:classfunc");w.j(b,"object","Util.defineProperty:propobj");w.j(c,"function","Util.defineProperty:getter");w.j(d,"function","Util.defineProperty:setter");for(var f in b){b=b[f];c={get:c,set:d, enumerable:!0};if(void 0!==e)for(var h in e)c[h]=e[h];Object.defineProperty(a.prototype,f,c);e=Object.getOwnPropertyDescriptor(a.prototype,f);b&&e&&Object.defineProperty(a.prototype,b,e);break}},aK:!1,u:function(a,b,c,d){w.j(a,"function","Util.defineReadOnlyProperty:classfunc");w.j(b,"object","Util.defineReadOnlyProperty:propobj");w.j(c,"function","Util.defineReadOnlyProperty:getter");for(var e in b){var f=b[e];b={get:c,set:function(a){w.k('The property "'+f+'" is read-only and cannot be set to '+ a)},enumerable:!0};if(void 0!==d)for(var h in d)b[h]=d[h];Object.defineProperty(a.prototype,e,b);d=Object.getOwnPropertyDescriptor(a.prototype,e);f&&d&&Object.defineProperty(a.prototype,f,d);break}},de:function(a,b){for(var c in b)b[c]=!0;a.prototype.TG=b},getTypeName:function(a){return void 0===a?"":"string"===typeof a?a:"function"===typeof a?w.kf(a):null===a?"*":""},kf:function(a){if("function"===typeof a){if(a.Ky)return a.Ky;if(a.name)return a.name;var b=a.toString(),c=b.indexOf("("),b=b.substring(9, c).trim();if(""!==b)return a.Ky=b}else if("object"===typeof a&&a.constructor)return w.kf(a.constructor);return typeof a},p:function(a,b,c){w.j(a,"function","Util.defineEnumValue:classfunc");w.j(b,"string","Util.defineEnumValue:name");w.j(c,"number","Util.defineEnumValue:num");c=new ea(a,b,c);Object.freeze(c);a[b]=c;var d=a.Uu;d instanceof la||(d=new la("string",ea),a.Uu=d);d.add(b,c);return c},tb:function(a,b){if(!a||!b)return null;var c=void 0;try{"function"===typeof b?c=b(a):"function"===typeof a.getAttribute? (c=a.getAttribute(b),null===c&&(c=void 0)):c=a[b]}catch(d){}return c},La:function(a,b,c){if(a&&b)try{"function"===typeof b?b(a,c):"function"===typeof a.setAttribute?a.setAttribute(b,c):a[b]=c}catch(d){}},Ju:function(a,b){w.j(a,"object","Setting properties requires Objects as arguments");w.j(b,"object","Setting properties requires Objects as arguments");var c=a instanceof C,d=a instanceof D,e;for(e in b){""===e&&w.k("Setting properties requires non-empty property names");var f=a,h=e;if(c||d){var k= e.indexOf(".");if(0<k){var l=e.substring(0,k);if(c)f=a.xd(l);else if(f=a[l],void 0===f||null===f)f=a.eb[l];w.Pa(f)?h=e.substr(k+1):w.k("Unable to find object named: "+l+" in "+a.toString()+" when trying to set property: "+e)}}if("_"!==h[0]&&!w.hF(f,h))if(d&&"ModelChanged"===h){a.iH(b[h]);continue}else if(d&&"Changed"===h){a.gn(b[h]);continue}else if(d&&w.hF(a.eb,h))f=a.eb;else if(d&&oa(a,h)){a.Nw(h,b[h]);continue}else if(a instanceof F&&"Changed"===h){a.gn(b[h]);continue}else w.k('Trying to set undefined property "'+ h+'" on object: '+f.toString());f[h]=b[e];"_"===h[0]&&f instanceof G&&f.fH(h)}},hF:function(a,b){if(a.hasOwnProperty(b))return!0;for(var c=Object.getPrototypeOf(a);c&&c!==Function;){if(c.hasOwnProperty(b))return!0;var d=c.TG;if(d&&d[b])return!0;c=Object.getPrototypeOf(c)}return!1},lJ:function(a){for(var b=[],c=0;256>c;c++)b[c]=c;for(var d=0,e=0,c=0;256>c;c++)d=(d+b[c]+119)%256,e=b[c],b[c]=b[d],b[d]=e;for(var d=c=0,f="",h=0;h<a.length;h++)c=(c+1)%256,d=(d+b[c])%256,e=b[c],b[c]=b[d],b[d]=e,f+=String.fromCharCode(a.charCodeAt(h)^ b[(b[c]+b[d])%256]);return f},lI:function(a){for(var b={},c=0;256>c;c++)b["0123456789abcdef".charAt(c>>4)+"0123456789abcdef".charAt(c&15)]=String.fromCharCode(c);a.length%2&&(a="0"+a);for(var d=[],e=0,c=0;c<a.length;c+=2)d[e++]=b[a.substr(c,2)];a=d.join("");return""===a?"0":a},Lg:function(a){return w.lJ(w.lI(a))},lm:null,adym:"7da71ca0ad381e90",vfo:"2be641fdb26f",uH:"@COLOR1",vH:"@COLOR2",DE:!1,Ft:null,Gt:null}; w.lm=function(){var a=window.document.createElement("canvas"),b=a.getContext("2d");b[w.Lg("7ca11abfd022028846")]=w.Lg("398c3597c01238");for(var c=["5da73c80a36755d3038e4972187c3cae51fd22","32ab5ff3b26f42dc0ed90f22432913b54ae6247590da4bb21c324ba3a84e385776","54a702f3e53909c447824c6706603faf4cfb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387","74bf19bce72555874c86"],d=1;5>d;d++)b[w.Lg("7ca11abfd7330390")](w.Lg(c[d-1]),10,15*d+0);b[w.Lg("7ca11abfd022028846")]=w.Lg("39f046ebb36e4b");for(d=1;5>d;d++)b[w.Lg("7ca11abfd7330390")](w.Lg(c[d- 1]),10,15*d+0);if(4!==c.length||"5"!==c[0][0]||"7"!==c[3][0])w.p=function(a,b){var c=new ea(a,b,2);Object.freeze(c);a[b]=c;var d=a.Uu;d instanceof la||(d=new la("string",ea),a.Uu=d);d.add(b,c);return c};return a}();function ea(a,b,c){w.nc(this);this.bC=a;this.Sb=b;this.aH=c}w.ga("EnumValue",ea);ea.prototype.toString=function(){return w.kf(this.bC)+"."+this.Sb};w.u(ea,{Ee:"classType"},function(){return this.bC});w.u(ea,{name:"name"},function(){return this.Sb});w.u(ea,{value:"value"},function(){return this.aH}); var pa;ea.findName=pa=function(a,b){if(void 0===b||null===b||""===b)return null;w.j(a,"function","findName:classfunc");w.j(b,"string","EnumValue.findName:name");var c=a.Uu;return c instanceof la?c.ja(b):null};function qa(){this.$B=[]}qa.prototype.toString=function(){return this.$B.join("")};qa.prototype.add=function(a){""!==a&&this.$B.push(a)};function ra(){} function sa(a){void 0===a&&(a=42);this.seed=a;this.vy=48271;this.Tu=2147483647;this.MB=this.Tu/this.vy;this.IG=this.Tu%this.vy;this.HG=1/this.Tu;this.random()}sa.prototype.random=function(){var a=this.seed%this.MB*this.vy-this.seed/this.MB*this.IG;this.seed=0<a?a:a+this.Tu;return this.seed*this.HG};function ta(){}w.u(ta,{i:"iterator"},function(){return this});ta.prototype.reset=ta.prototype.reset=function(){};ta.prototype.next=ta.prototype.next=function(){return!1};ta.prototype.hasNext=function(){return!1}; ta.prototype.first=ta.prototype.first=function(){return null};ta.prototype.any=function(){return!1};ta.prototype.all=function(){return!0};ta.prototype.each=function(){return this};ta.prototype.map=function(){return this};ta.prototype.filter=function(){return this};ta.prototype.concat=function(a){return a.i};w.u(ta,{count:"count"},function(){return 0});ta.prototype.Mf=function(){};ta.prototype.toString=function(){return"EmptyIterator"};var ua=new ta;function va(a){this.key=-1;this.value=a} w.de(va,{key:!0,value:!0});w.u(va,{i:"iterator"},function(){return this});va.prototype.reset=va.prototype.reset=function(){this.key=-1};va.prototype.next=va.prototype.next=function(){return-1===this.key?(this.key=0,!0):!1};va.prototype.hasNext=function(){return this.next()};va.prototype.first=va.prototype.first=function(){this.key=0;return this.value};va.prototype.any=function(a){this.key=-1;return a(this.value)};va.prototype.all=function(a){this.key=-1;return a(this.value)}; va.prototype.each=function(a){this.key=-1;a(this.value);return this};va.prototype.map=function(a){return new va(a(this.value))};va.prototype.filter=function(a){return a(this.value)?new va(this.value):ua};va.prototype.concat=function(a){return new wa(this,a.i)};w.u(va,{count:"count"},function(){return 1});va.prototype.Mf=function(){this.value=null};va.prototype.toString=function(){return"SingletonIterator("+this.value+")"};function wa(a,b){this.ll=a;this.ml=b;this.Vu=!1}w.de(wa,{key:!0,value:!0}); w.u(wa,{i:"iterator"},function(){return this});wa.prototype.reset=wa.prototype.reset=function(){this.ll.reset();this.ml.reset();this.Vu=!1};wa.prototype.next=wa.prototype.next=function(){if(!this.Vu){var a=this.ll;if(a.next())return this.key=a.key,this.value=a.value,!0;this.Vu=!0}return this.Vu&&(a=this.ml,a.next())?(this.key=a.key,this.value=a.value,!0):!1};wa.prototype.hasNext=function(){return this.next()}; wa.prototype.first=wa.prototype.first=function(){this.reset();return this.next()?this.value:null};wa.prototype.any=function(a){return this.ll.any(a)||this.ml.any(a)?!0:!1};wa.prototype.all=function(a){return this.ll.all(a)&&this.ml.all(a)?!0:!1};wa.prototype.each=function(a){this.ll.each(a);this.ml.each(a);return this};wa.prototype.map=function(a){return new wa(this.ll.map(a),this.ml.map(a))};wa.prototype.filter=function(a){return new wa(this.ll.filter(a),this.ml.filter(a))}; wa.prototype.concat=function(a){return new wa(this,a.i)};w.u(wa,{count:"count"},function(){return this.ll.count+this.ml.count});wa.prototype.Mf=function(){this.value=this.key=null};wa.prototype.toString=function(){return"ConcatIterator()"};function xa(a){this.xc=a;this.$h=null;a.Qb=null;this.Sa=a.F;this.wc=-1}w.de(xa,{key:!0,value:!0});w.u(xa,{i:"iterator"},function(){return this});w.defineProperty(xa,{iq:"predicate"},function(){return this.$h},function(a){this.$h=a}); xa.prototype.reset=xa.prototype.reset=function(){var a=this.xc;a.Qb=null;this.Sa=a.F;this.wc=-1};xa.prototype.next=xa.prototype.next=function(){var a=this.xc;if(a.F!==this.Sa){if(0>this.key)return!1;w.Ma(a)}var a=a.n,b=a.length,c=++this.wc,d=this.$h;if(null!==d)for(;c<b;){var e=a[c];if(d(e))return this.key=this.wc=c,this.value=e,!0;c++}else{if(c<b)return this.key=c,this.value=a[c],!0;this.Mf()}return!1};xa.prototype.hasNext=function(){return this.next()}; xa.prototype.first=xa.prototype.first=function(){var a=this.xc;this.Sa=a.F;this.wc=0;var a=a.n,b=a.length,c=this.$h;if(null!==c){for(var d=0;d<b;){var e=a[d];if(c(e))return this.key=this.wc=d,this.value=e;d++}return null}return 0<b?(e=a[0],this.key=0,this.value=e):null};xa.prototype.any=function(a){var b=this.xc;b.Qb=null;var c=b.F;this.wc=-1;for(var d=b.n,e=d.length,f=this.$h,h=0;h<e;h++){var k=d[h];if(null===f||f(k)){if(a(k))return!0;b.F!==c&&w.Ma(b)}}return!1}; xa.prototype.all=function(a){var b=this.xc;b.Qb=null;var c=b.F;this.wc=-1;for(var d=b.n,e=d.length,f=this.$h,h=0;h<e;h++){var k=d[h];if(null===f||f(k)){if(!a(k))return!1;b.F!==c&&w.Ma(b)}}return!0};xa.prototype.each=function(a){var b=this.xc;b.Qb=null;var c=b.F;this.wc=-1;for(var d=b.n,e=d.length,f=this.$h,h=0;h<e;h++){var k=d[h];if(null===f||f(k))a(k),b.F!==c&&w.Ma(b)}return this}; xa.prototype.map=function(a){var b=this.xc;b.Qb=null;var c=b.F;this.wc=-1;for(var d=[],e=b.n,f=e.length,h=this.$h,k=0;k<f;k++){var l=e[k];if(null===h||h(l))d.push(a(l)),b.F!==c&&w.Ma(b)}a=new H;a.n=d;a.Hc();return a.i};xa.prototype.filter=function(a){var b=this.xc;b.Qb=null;var c=b.F;this.wc=-1;for(var d=[],e=b.n,f=e.length,h=this.$h,k=0;k<f;k++){var l=e[k];if(null===h||h(l))a(l)&&d.push(l),b.F!==c&&w.Ma(b)}a=new H(b.ma);a.n=d;a.Hc();return a.i}; xa.prototype.concat=function(a){this.xc.Qb=null;return new wa(this,a.i)};w.u(xa,{count:"count"},function(){var a=this.$h;if(null!==a){for(var b=0,c=this.xc.n,d=c.length,e=0;e<d;e++)a(c[e])&&b++;return b}return this.xc.n.length});xa.prototype.Mf=function(){this.key=-1;this.value=null;this.Sa=-1;this.$h=null;this.xc.Qb=this};xa.prototype.toString=function(){return"ListIterator@"+this.wc+"/"+this.xc.count};function ya(a){this.xc=a;a.Ni=null;this.Sa=a.F;this.wc=a.n.length}w.de(ya,{key:!0,value:!0}); w.u(ya,{i:"iterator"},function(){return this});ya.prototype.reset=ya.prototype.reset=function(){var a=this.xc;a.Ni=null;this.Sa=a.F;this.wc=a.n.length};ya.prototype.next=ya.prototype.next=function(){var a=this.xc;if(a.F!==this.Sa){if(0>this.key)return!1;w.Ma(a)}var b=--this.wc;if(0<=b)return this.key=b,this.value=a.n[b],!0;this.Mf();return!1};ya.prototype.hasNext=function(){return this.next()}; ya.prototype.first=ya.prototype.first=function(){var a=this.xc;this.Sa=a.F;var b=a.n;this.wc=a=b.length-1;return 0<=a?(b=b[a],this.key=a,this.value=b):null};ya.prototype.any=function(a){var b=this.xc;b.Ni=null;var c=b.F,d=b.n,e=d.length;this.wc=e;for(e-=1;0<=e;e--){if(a(d[e]))return!0;b.F!==c&&w.Ma(b)}return!1};ya.prototype.all=function(a){var b=this.xc;b.Ni=null;var c=b.F,d=b.n,e=d.length;this.wc=e;for(e-=1;0<=e;e--){if(!a(d[e]))return!1;b.F!==c&&w.Ma(b)}return!0}; ya.prototype.each=function(a){var b=this.xc;b.Ni=null;var c=b.F,d=b.n,e=d.length;this.wc=e;for(e-=1;0<=e;e--)a(d[e]),b.F!==c&&w.Ma(b);return this};ya.prototype.map=function(a){var b=this.xc;b.Ni=null;var c=b.F,d=[],e=b.n,f=e.length;this.wc=f;for(f-=1;0<=f;f--)d.push(a(e[f])),b.F!==c&&w.Ma(b);a=new H;a.n=d;a.Hc();return a.i}; ya.prototype.filter=function(a){var b=this.xc;b.Ni=null;var c=b.F,d=[],e=b.n,f=e.length;this.wc=f;for(f-=1;0<=f;f--){var h=e[f];a(h)&&d.push(h);b.F!==c&&w.Ma(b)}a=new H(b.ma);a.n=d;a.Hc();return a.i};ya.prototype.concat=function(a){this.xc.Ni=null;return new wa(this,a.i)};w.u(ya,{count:"count"},function(){return this.xc.n.length});ya.prototype.Mf=function(){this.key=-1;this.value=null;this.Sa=-1;this.xc.Ni=this}; ya.prototype.toString=function(){return"ListIteratorBackwards("+this.wc+"/"+this.xc.count+")"}; function H(a){w.nc(this);this.Q=!1;this.n=[];this.F=0;this.Ni=this.Qb=null;void 0===a||null===a?this.ma=null:"string"===typeof a?"object"===a||"string"===a||"number"===a||"boolean"===a||"function"===a?this.ma=a:w.Fa(a,"the string 'object', 'number', 'string', 'boolean', or 'function'","List constructor: type"):"function"===typeof a?this.ma=a===Object?"object":a===String?"string":a===Number?"number":a===Boolean?"boolean":a===Function?"function":a:w.Fa(a,"null, a primitive type name, or a class type", "List constructor: type")}w.ga("List",H);H.prototype.Hc=function(){var a=this.F;a++;999999999<a&&(a=0);this.F=a};H.prototype.freeze=H.prototype.freeze=function(){this.Q=!0;return this};H.prototype.thaw=H.prototype.Qa=function(){this.Q=!1;return this};H.prototype.toString=function(){return"List("+w.getTypeName(this.ma)+")#"+w.Od(this)};H.prototype.add=H.prototype.add=function(a){null!==a&&(this.Q&&w.la(this,a),this.n.push(a),this.Hc())};H.prototype.push=H.prototype.push=function(a){this.add(a)}; H.prototype.addAll=H.prototype.Jc=function(a){if(null===a)return this;this.Q&&w.la(this);var b=this.n;if(w.isArray(a))for(var c=w.Za(a),d=0;d<c;d++){var e=w.Ba(a,d);b.push(e)}else for(a=a.i;a.next();)e=a.value,b.push(e);this.Hc();return this};H.prototype.clear=H.prototype.clear=function(){this.Q&&w.la(this);this.n.length=0;this.Hc()};H.prototype.contains=H.prototype.contains=function(a){return null===a?!1:-1!==this.n.indexOf(a)};H.prototype.has=H.prototype.has=function(a){return this.contains(a)}; H.prototype.indexOf=H.prototype.indexOf=function(a){return null===a?-1:this.n.indexOf(a)};H.prototype.elt=H.prototype.ea=function(a){var b=this.n;(0>a||a>=b.length)&&w.Fa(a,"0 <= i < length",H,"elt:i");return b[a]};H.prototype.get=H.prototype.get=function(a){return this.ea(a)};H.prototype.setElt=H.prototype.ig=function(a,b){var c=this.n;(0>a||a>=c.length)&&w.Fa(a,"0 <= i < length",H,"setElt:i");this.Q&&w.la(this,a);c[a]=b};H.prototype.set=H.prototype.set=function(a,b){this.ig(a,b)}; H.prototype.first=H.prototype.first=function(){var a=this.n;return 0===a.length?null:a[0]};H.prototype.last=H.prototype.ge=function(){var a=this.n,b=a.length;return 0<b?a[b-1]:null};H.prototype.pop=H.prototype.pop=function(){this.Q&&w.la(this);var a=this.n;return 0<a.length?a.pop():null};H.prototype.any=function(a){for(var b=this.n,c=this.F,d=b.length,e=0;e<d;e++){if(a(b[e]))return!0;this.F!==c&&w.Ma(this)}return!1}; H.prototype.all=function(a){for(var b=this.n,c=this.F,d=b.length,e=0;e<d;e++){if(!a(b[e]))return!1;this.F!==c&&w.Ma(this)}return!0};H.prototype.each=function(a){for(var b=this.n,c=this.F,d=b.length,e=0;e<d;e++)a(b[e]),this.F!==c&&w.Ma(this);return this};H.prototype.map=function(a){for(var b=new H,c=[],d=this.n,e=this.F,f=d.length,h=0;h<f;h++)c.push(a(d[h])),this.F!==e&&w.Ma(this);b.n=c;b.Hc();return b}; H.prototype.filter=function(a){for(var b=new H(this.ma),c=[],d=this.n,e=this.F,f=d.length,h=0;h<f;h++){var k=d[h];a(k)&&c.push(k);this.F!==e&&w.Ma(this)}b.n=c;b.Hc();return b};H.prototype.concat=function(a){return this.copy().Jc(a)};H.prototype.insertAt=H.prototype.Qd=function(a,b){0>a&&w.Fa(a,">= 0",H,"insertAt:i");this.Q&&w.la(this,a);var c=this.n;a>=c.length?c.push(b):c.splice(a,0,b);this.Hc();return!0}; H.prototype.remove=H.prototype["delete"]=H.prototype.remove=function(a){if(null===a)return!1;this.Q&&w.la(this,a);var b=this.n;a=b.indexOf(a);if(-1===a)return!1;a===b.length-1?b.pop():b.splice(a,1);this.Hc();return!0};H.prototype.removeAt=H.prototype.$c=function(a){var b=this.n;(0>a||a>=b.length)&&w.Fa(a,"0 <= i < length",H,"removeAt:i");this.Q&&w.la(this,a);a===b.length-1?b.pop():b.splice(a,1);this.Hc()}; H.prototype.removeRange=H.prototype.removeRange=function(a,b){var c=this.n,d=c.length;if(0>a)a=0;else if(a>=d)return this;if(0>b)return this;b>=d&&(b=d-1);if(a>b)return this;this.Q&&w.la(this);for(var e=a,f=b+1;f<d;)c[e++]=c[f++];c.length=d-(b-a+1);this.Hc();return this};H.prototype.copy=function(){var a=new H(this.ma),b=this.n;0<b.length&&(a.n=Array.prototype.slice.call(b));return a};H.prototype.toArray=H.prototype.gc=function(){for(var a=this.n,b=this.count,c=Array(b),d=0;d<b;d++)c[d]=a[d];return c}; H.prototype.toSet=H.prototype.wG=function(){for(var a=new I(this.ma),b=this.n,c=this.count,d=0;d<c;d++)a.add(b[d]);return a};H.prototype.sort=H.prototype.sort=function(a){this.Q&&w.la(this);this.n.sort(a);this.Hc();return this}; H.prototype.sortRange=H.prototype.wq=function(a,b,c){var d=this.n,e=d.length;void 0===b&&(b=0);void 0===c&&(c=e);this.Q&&w.la(this);var f=c-b;if(1>=f)return this;(0>b||b>=e-1)&&w.Fa(b,"0 <= from < length",H,"sortRange:from");if(2===f)return c=d[b],e=d[b+1],0<a(c,e)&&(d[b]=e,d[b+1]=c,this.Hc()),this;if(0===b)if(c>=e)d.sort(a);else for(f=d.slice(0,c),f.sort(a),a=0;a<c;a++)d[a]=f[a];else if(c>=e)for(f=d.slice(b),f.sort(a),a=b;a<e;a++)d[a]=f[a-b];else for(f=d.slice(b,c),f.sort(a),a=b;a<c;a++)d[a]=f[a- b];this.Hc();return this};H.prototype.reverse=H.prototype.reverse=function(){this.Q&&w.la(this);this.n.reverse();this.Hc();return this};w.u(H,{count:"count"},function(){return this.n.length});w.u(H,{size:"size"},function(){return this.n.length});w.u(H,{length:"length"},function(){return this.n.length});w.u(H,{i:"iterator"},function(){if(0>=this.n.length)return ua;var a=this.Qb;return null!==a?(a.reset(),a):new xa(this)}); w.u(H,{In:"iteratorBackwards"},function(){if(0>=this.n.length)return ua;var a=this.Ni;return null!==a?(a.reset(),a):new ya(this)});function za(a){this.bi=a;a.Qb=null;this.Sa=a.F;this.Va=null}w.de(za,{key:!0,value:!0});w.u(za,{i:"iterator"},function(){return this});za.prototype.reset=za.prototype.reset=function(){var a=this.bi;a.Qb=null;this.Sa=a.F;this.Va=null}; za.prototype.next=za.prototype.next=function(){var a=this.bi;if(a.F!==this.Sa){if(null===this.key)return!1;w.Ma(a)}var b=this.Va,b=null===b?a.Ea:b.Xa;if(null!==b)return this.Va=b,this.value=b.value,this.key=b.key,!0;this.Mf();return!1};za.prototype.hasNext=function(){return this.next()};za.prototype.first=za.prototype.first=function(){var a=this.bi;this.Sa=a.F;a=a.Ea;if(null!==a){this.Va=a;var b=a.value;this.key=a.key;return this.value=b}return null}; za.prototype.any=function(a){var b=this.bi;b.Qb=null;var c=b.F;this.Va=null;for(var d=b.Ea;null!==d;){if(a(d.value))return!0;b.F!==c&&w.Ma(b);d=d.Xa}return!1};za.prototype.all=function(a){var b=this.bi;b.Qb=null;var c=b.F;this.Va=null;for(var d=b.Ea;null!==d;){if(!a(d.value))return!1;b.F!==c&&w.Ma(b);d=d.Xa}return!0};za.prototype.each=function(a){var b=this.bi;b.Qb=null;var c=b.F;this.Va=null;for(var d=b.Ea;null!==d;)a(d.value),b.F!==c&&w.Ma(b),d=d.Xa;return this}; za.prototype.map=function(a){var b=this.bi;b.Qb=null;for(var c=new H,d=b.F,e=b.Ea;null!==e;)c.add(a(e.value)),b.F!==d&&w.Ma(b),e=e.Xa;return c.i};za.prototype.filter=function(a){var b=this.bi;b.Qb=null;for(var c=new H(b.ma),d=b.F,e=b.Ea;null!==e;){var f=e.value;a(f)&&c.add(f);b.F!==d&&w.Ma(b);e=e.Xa}return c.i};za.prototype.concat=function(a){this.bi.Qb=null;return new wa(this,a.i)};w.u(za,{count:"count"},function(){return this.bi.od}); za.prototype.Mf=function(){this.value=this.key=null;this.Sa=-1;this.bi.Qb=this};za.prototype.toString=function(){return null!==this.Va?"SetIterator@"+this.Va.value:"SetIterator"}; function I(a){w.nc(this);this.Q=!1;void 0===a||null===a?this.ma=null:"string"===typeof a?"object"===a||"string"===a||"number"===a?this.ma=a:w.Fa(a,"the string 'object', 'number' or 'string'","Set constructor: type"):"function"===typeof a?this.ma=a===Object?"object":a===String?"string":a===Number?"number":a:w.Fa(a,"null, a primitive type name, or a class type","Set constructor: type");this.pd={};this.od=0;this.Qb=null;this.F=0;this.Vh=this.Ea=null}w.ga("Set",I); I.prototype.Hc=function(){var a=this.F;a++;999999999<a&&(a=0);this.F=a};I.prototype.freeze=I.prototype.freeze=function(){this.Q=!0;return this};I.prototype.thaw=I.prototype.Qa=function(){this.Q=!1;return this};I.prototype.toString=function(){return"Set("+w.getTypeName(this.ma)+")#"+w.Od(this)}; I.prototype.add=I.prototype.add=function(a){if(null===a)return!1;this.Q&&w.la(this,a);var b=a;w.Pa(a)&&(b=w.Vp(a));return void 0===this.pd[b]?(this.od++,a=new Aa(a,a),this.pd[b]=a,b=this.Vh,null===b?this.Ea=a:(a.hp=b,b.Xa=a),this.Vh=a,this.Hc(),!0):!1};I.prototype.addAll=I.prototype.Jc=function(a){if(null===a)return this;this.Q&&w.la(this);if(w.isArray(a))for(var b=w.Za(a),c=0;c<b;c++)this.add(w.Ba(a,c));else for(a=a.i;a.next();)this.add(a.value);return this}; I.prototype.contains=I.prototype.contains=function(a){if(null===a)return!1;var b=a;return w.Pa(a)&&(b=w.Od(a),void 0===b)?!1:void 0!==this.pd[b]};I.prototype.has=I.prototype.has=function(a){return this.contains(a)};I.prototype.containsAll=function(a){if(null===a)return!0;for(a=a.i;a.next();)if(!this.contains(a.value))return!1;return!0};I.prototype.containsAny=function(a){if(null===a)return!0;for(a=a.i;a.next();)if(this.contains(a.value))return!0;return!1}; I.prototype.first=I.prototype.first=function(){var a=this.Ea;return null===a?null:a.value};I.prototype.any=function(a){for(var b=this.F,c=this.Ea;null!==c;){if(a(c.value))return!0;this.F!==b&&w.Ma(this);c=c.Xa}return!1};I.prototype.all=function(a){for(var b=this.F,c=this.Ea;null!==c;){if(!a(c.value))return!1;this.F!==b&&w.Ma(this);c=c.Xa}return!0};I.prototype.each=function(a){for(var b=this.F,c=this.Ea;null!==c;)a(c.value),this.F!==b&&w.Ma(this),c=c.Xa;return this}; I.prototype.map=function(a){for(var b=new I,c=this.F,d=this.Ea;null!==d;)b.add(a(d.value)),this.F!==c&&w.Ma(this),d=d.Xa;return b};I.prototype.filter=function(a){for(var b=new I(this.ma),c=this.F,d=this.Ea;null!==d;){var e=d.value;a(e)&&b.add(e);this.F!==c&&w.Ma(this);d=d.Xa}return b};I.prototype.concat=function(a){return this.copy().Jc(a)}; I.prototype.remove=I.prototype["delete"]=I.prototype.remove=function(a){if(null===a)return!1;this.Q&&w.la(this,a);var b=a;if(w.Pa(a)&&(b=w.Od(a),void 0===b))return!1;a=this.pd[b];if(void 0===a)return!1;var c=a.Xa,d=a.hp;null!==c&&(c.hp=d);null!==d&&(d.Xa=c);this.Ea===a&&(this.Ea=c);this.Vh===a&&(this.Vh=d);delete this.pd[b];this.od--;this.Hc();return!0}; I.prototype.removeAll=I.prototype.Zx=function(a){if(null===a)return this;this.Q&&w.la(this);if(w.isArray(a))for(var b=w.Za(a),c=0;c<b;c++)this.remove(w.Ba(a,c));else for(a=a.i;a.next();)this.remove(a.value);return this};I.prototype.retainAll=function(a){if(null===a||0===this.count)return this;this.Q&&w.la(this);var b=new I(this.ma);b.Jc(a);a=[];for(var c=this.i;c.next();){var d=c.value;b.contains(d)||a.push(d)}this.Zx(a);return this}; I.prototype.clear=I.prototype.clear=function(){this.Q&&w.la(this);this.pd={};this.od=0;this.Vh=this.Ea=null;this.Hc()};I.prototype.copy=function(){var a=new I(this.ma),b=this.pd,c;for(c in b)a.add(b[c].value);return a};I.prototype.toArray=I.prototype.gc=function(){var a=Array(this.od),b=this.pd,c=0,d;for(d in b)a[c]=b[d].value,c++;return a};I.prototype.toList=function(){var a=new H(this.ma),b=this.pd,c;for(c in b)a.add(b[c].value);return a};w.u(I,{count:"count"},function(){return this.od}); w.u(I,{size:"size"},function(){return this.od});w.u(I,{i:"iterator"},function(){if(0>=this.od)return ua;var a=this.Qb;return null!==a?(a.reset(),a):new za(this)});function Ca(a){this.Ga=a;this.Sa=a.F;this.Va=null}w.de(Ca,{key:!0,value:!0});w.u(Ca,{i:"iterator"},function(){return this});Ca.prototype.reset=Ca.prototype.reset=function(){this.Sa=this.Ga.F;this.Va=null}; Ca.prototype.next=Ca.prototype.next=function(){var a=this.Ga;if(a.F!==this.Sa){if(null===this.key)return!1;w.Ma(a)}var b=this.Va,b=null===b?a.Ea:b.Xa;if(null!==b)return this.Va=b,this.value=this.key=a=b.key,!0;this.Mf();return!1};Ca.prototype.hasNext=function(){return this.next()};Ca.prototype.first=Ca.prototype.first=function(){var a=this.Ga;this.Sa=a.F;a=a.Ea;return null!==a?(this.Va=a,this.value=this.key=a=a.key):null}; Ca.prototype.any=function(a){var b=this.Ga,c=b.F;this.Va=null;for(var d=b.Ea;null!==d;){if(a(d.key))return!0;b.F!==c&&w.Ma(b);d=d.Xa}return!1};Ca.prototype.all=function(a){var b=this.Ga,c=b.F;this.Va=null;for(var d=b.Ea;null!==d;){if(!a(d.key))return!1;b.F!==c&&w.Ma(b);d=d.Xa}return!0};Ca.prototype.each=function(a){var b=this.Ga,c=b.F;this.Va=null;for(var d=b.Ea;null!==d;)a(d.key),b.F!==c&&w.Ma(b),d=d.Xa;return this}; Ca.prototype.map=function(a){var b=this.Ga,c=b.F;this.Va=null;for(var d=new H,e=b.Ea;null!==e;)d.add(a(e.key)),b.F!==c&&w.Ma(b),e=e.Xa;return d.i};Ca.prototype.filter=function(a){var b=this.Ga,c=b.F;this.Va=null;for(var d=new H(b.Uh),e=b.Ea;null!==e;){var f=e.key;a(f)&&d.add(f);b.F!==c&&w.Ma(b);e=e.Xa}return d.i};Ca.prototype.concat=function(a){return new wa(this,a.i)};w.u(Ca,{count:"count"},function(){return this.Ga.od});Ca.prototype.Mf=function(){this.value=this.key=null;this.Sa=-1}; Ca.prototype.toString=function(){return null!==this.Va?"MapKeySetIterator@"+this.Va.value:"MapKeySetIterator"};function Da(a){w.nc(this);this.Q=!0;this.Ga=a}w.Ka(Da,I);Da.prototype.freeze=function(){return this};Da.prototype.Qa=function(){return this};Da.prototype.toString=function(){return"MapKeySet("+this.Ga.toString()+")"};Da.prototype.add=Da.prototype.add=function(){w.k("This Set is read-only: "+this.toString());return!1}; Da.prototype.set=Da.prototype.set=function(){w.k("This Set is read-only: "+this.toString());return!1};Da.prototype.contains=Da.prototype.contains=function(a){return this.Ga.contains(a)};Da.prototype.has=Da.prototype.has=function(a){return this.contains(a)};Da.prototype.remove=Da.prototype["delete"]=Da.prototype.remove=function(){w.k("This Set is read-only: "+this.toString());return!1};Da.prototype.clear=Da.prototype.clear=function(){w.k("This Set is read-only: "+this.toString())}; Da.prototype.first=Da.prototype.first=function(){var a=this.Ga.Ea;return null!==a?a.key:null};Da.prototype.any=function(a){for(var b=this.Ga.Ea;null!==b;){if(a(b.key))return!0;b=b.Xa}return!1};Da.prototype.all=function(a){for(var b=this.Ga.Ea;null!==b;){if(!a(b.key))return!1;b=b.Xa}return!0};Da.prototype.each=function(a){for(var b=this.Ga.Ea;null!==b;)a(b.key),b=b.Xa;return this};Da.prototype.map=function(a){for(var b=new I,c=this.Ga.Ea;null!==c;)b.add(a(c.key)),c=c.Xa;return b}; Da.prototype.filter=function(a){for(var b=new I(this.Ga.Uh),c=this.Ga.Ea;null!==c;){var d=c.key;a(d)&&b.add(d);c=c.Xa}return b};Da.prototype.concat=function(a){return this.wG().Jc(a)};Da.prototype.copy=function(){return new Da(this.Ga)};Da.prototype.toSet=Da.prototype.wG=function(){var a=new I(this.Ga.Uh),b=this.Ga.pd,c;for(c in b)a.add(b[c].key);return a};Da.prototype.toArray=Da.prototype.gc=function(){var a=this.Ga.pd,b=Array(this.Ga.od),c=0,d;for(d in a)b[c]=a[d].key,c++;return b}; Da.prototype.toList=function(){var a=new H(this.Ga.Uh),b=this.Ga.pd,c;for(c in b)a.add(b[c].key);return a};w.u(Da,{count:"count"},function(){return this.Ga.od});w.u(Da,{size:"size"},function(){return this.Ga.od});w.u(Da,{i:"iterator"},function(){return 0>=this.Ga.od?ua:new Ca(this.Ga)});function Ga(a){this.Ga=a;a.Oi=null;this.Sa=a.F;this.Va=null}w.de(Ga,{key:!0,value:!0});w.u(Ga,{i:"iterator"},function(){return this}); Ga.prototype.reset=Ga.prototype.reset=function(){var a=this.Ga;a.Oi=null;this.Sa=a.F;this.Va=null};Ga.prototype.next=Ga.prototype.next=function(){var a=this.Ga;if(a.F!==this.Sa){if(null===this.key)return!1;w.Ma(a)}var b=this.Va,b=null===b?a.Ea:b.Xa;if(null!==b)return this.Va=b,this.value=b.value,this.key=b.key,!0;this.Mf();return!1};Ga.prototype.hasNext=function(){return this.next()}; Ga.prototype.first=Ga.prototype.first=function(){var a=this.Ga;this.Sa=a.F;a=a.Ea;if(null!==a){this.Va=a;var b=a.value;this.key=a.key;return this.value=b}return null};Ga.prototype.any=function(a){var b=this.Ga;b.Oi=null;var c=b.F;this.Va=null;for(var d=b.Ea;null!==d;){if(a(d.value))return!0;b.F!==c&&w.Ma(b);d=d.Xa}return!1};Ga.prototype.all=function(a){var b=this.Ga;b.Oi=null;var c=b.F;this.Va=null;for(var d=b.Ea;null!==d;){if(!a(d.value))return!1;b.F!==c&&w.Ma(b);d=d.Xa}return!0}; Ga.prototype.each=function(a){var b=this.Ga;b.Oi=null;var c=b.F;this.Va=null;for(var d=b.Ea;null!==d;)a(d.value),b.F!==c&&w.Ma(b),d=d.Xa;return this};Ga.prototype.map=function(a){var b=this.Ga;b.Oi=null;var c=b.F;this.Va=null;for(var d=new H,e=b.Ea;null!==e;)d.add(a(e.value)),b.F!==c&&w.Ma(b),e=e.Xa;return d.i};Ga.prototype.filter=function(a){var b=this.Ga;b.Oi=null;var c=b.F;this.Va=null;for(var d=new H(b.Uh),e=b.Ea;null!==e;){var f=e.value;a(f)&&d.add(f);b.F!==c&&w.Ma(b);e=e.Xa}return d.i}; Ga.prototype.concat=function(a){this.Ga.Oi=null;return new wa(this,a.i)};w.u(Ga,{count:"count"},function(){return this.Ga.od});Ga.prototype.Mf=function(){this.value=this.key=null;this.Sa=-1;this.Ga.Oi=this};Ga.prototype.toString=function(){return null!==this.Va?"MapValueSetIterator@"+this.Va.value:"MapValueSetIterator"};function Aa(a,b){this.key=a;this.value=b;this.hp=this.Xa=null}w.de(Aa,{key:!0,value:!0});Aa.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"}; function Ia(a){this.Ga=a;a.Qb=null;this.Sa=a.F;this.Va=null}w.de(Ia,{key:!0,value:!0});w.u(Ia,{i:"iterator"},function(){return this});Ia.prototype.reset=Ia.prototype.reset=function(){var a=this.Ga;a.Qb=null;this.Sa=a.F;this.Va=null};Ia.prototype.next=Ia.prototype.next=function(){var a=this.Ga;if(a.F!==this.Sa){if(null===this.key)return!1;w.Ma(a)}var b=this.Va,b=null===b?a.Ea:b.Xa;if(null!==b)return this.Va=b,this.key=b.key,this.value=b.value,!0;this.Mf();return!1};Ia.prototype.hasNext=function(){return this.next()}; Ia.prototype.first=Ia.prototype.first=function(){var a=this.Ga;this.Sa=a.F;a=a.Ea;return null!==a?(this.Va=a,this.key=a.key,this.value=a.value,a):null};Ia.prototype.any=function(a){var b=this.Ga;b.Qb=null;var c=b.F;this.Va=null;for(var d=b.Ea;null!==d;){if(a(d))return!0;b.F!==c&&w.Ma(b);d=d.Xa}return!1};Ia.prototype.all=function(a){var b=this.Ga;b.Qb=null;var c=b.F;this.Va=null;for(var d=b.Ea;null!==d;){if(!a(d))return!1;b.F!==c&&w.Ma(b);d=d.Xa}return!0}; Ia.prototype.each=function(a){var b=this.Ga;b.Qb=null;var c=b.F;this.Va=null;for(var d=b.Ea;null!==d;)a(d),b.F!==c&&w.Ma(b),d=d.Xa;return this};Ia.prototype.map=function(a){var b=this.Ga;b.Qb=null;var c=b.F;this.Va=null;for(var d=new H,e=b.Ea;null!==e;)d.add(a(e)),b.F!==c&&w.Ma(b),e=e.Xa;return d.i};Ia.prototype.filter=function(a){var b=this.Ga;b.Qb=null;var c=b.F;this.Va=null;for(var d=new H,e=b.Ea;null!==e;)a(e)&&d.add(e),b.F!==c&&w.Ma(b),e=e.Xa;return d.i}; Ia.prototype.concat=function(a){this.Ga.Qb=null;return new wa(this,a.i)};w.u(Ia,{count:"count"},function(){return this.Ga.od});Ia.prototype.Mf=function(){this.value=this.key=null;this.Sa=-1;this.Ga.Qb=this};Ia.prototype.toString=function(){return null!==this.Va?"MapIterator@"+this.Va:"MapIterator"}; function la(a,b){w.nc(this);this.Q=!1;void 0===a||null===a?this.Uh=null:"string"===typeof a?"object"===a||"string"===a||"number"===a?this.Uh=a:w.Fa(a,"the string 'object', 'number' or 'string'","Map constructor: keytype"):"function"===typeof a?this.Uh=a===Object?"object":a===String?"string":a===Number?"number":a:w.Fa(a,"null, a primitive type name, or a class type","Map constructor: keytype");void 0===b||null===b?this.st=null:"string"===typeof b?"object"===b||"string"===b||"boolean"===b||"number"=== b||"function"===b?this.st=b:w.Fa(b,"the string 'object', 'number', 'string', 'boolean', or 'function'","Map constructor: valtype"):"function"===typeof b?this.st=b===Object?"object":b===String?"string":b===Number?"number":b===Boolean?"boolean":b===Function?"function":b:w.Fa(b,"null, a primitive type name, or a class type","Map constructor: valtype");this.pd={};this.od=0;this.Oi=this.Qb=null;this.F=0;this.Vh=this.Ea=null}w.ga("Map",la); la.prototype.Hc=function(){var a=this.F;a++;999999999<a&&(a=0);this.F=a};la.prototype.freeze=la.prototype.freeze=function(){this.Q=!0;return this};la.prototype.thaw=la.prototype.Qa=function(){this.Q=!1;return this};la.prototype.toString=function(){return"Map("+w.getTypeName(this.Uh)+","+w.getTypeName(this.st)+")#"+w.Od(this)}; la.prototype.add=la.prototype.add=function(a,b){this.Q&&w.la(this,a);var c=a;w.Pa(a)&&(c=w.Vp(a));var d=this.pd[c];if(void 0===d)return this.od++,d=new Aa(a,b),this.pd[c]=d,c=this.Vh,null===c?this.Ea=d:(d.hp=c,c.Xa=d),this.Vh=d,this.Hc(),!0;d.value=b;return!1};la.prototype.set=la.prototype.set=function(a,b){return this.add(a,b)}; la.prototype.addAll=la.prototype.Jc=function(a){if(null===a)return this;if(w.isArray(a))for(var b=w.Za(a),c=0;c<b;c++){var d=w.Ba(a,c);this.add(d.key,d.value)}else for(a=a.i;a.next();)this.add(a.key,a.value);return this};la.prototype.first=la.prototype.first=function(){return this.Ea};la.prototype.any=function(a){for(var b=this.F,c=this.Ea;null!==c;){if(a(c))return!0;this.F!==b&&w.Ma(this);c=c.Xa}return!1}; la.prototype.all=function(a){for(var b=this.F,c=this.Ea;null!==c;){if(!a(c))return!1;this.F!==b&&w.Ma(this);c=c.Xa}return!0};la.prototype.each=function(a){for(var b=this.F,c=this.Ea;null!==c;)a(c),this.F!==b&&w.Ma(this),c=c.Xa;return this};la.prototype.map=function(a){for(var b=new la(this.Uh),c=this.F,d=this.Ea;null!==d;)b.add(d.key,a(d)),this.F!==c&&w.Ma(this),d=d.Xa;return b}; la.prototype.filter=function(a){for(var b=new la(this.Uh,this.st),c=this.F,d=this.Ea;null!==d;)a(d)&&b.add(d.key,d.value),this.F!==c&&w.Ma(this),d=d.Xa;return b};la.prototype.concat=function(a){return this.copy().Jc(a)};la.prototype.contains=la.prototype.contains=function(a){var b=a;return w.Pa(a)&&(b=w.Od(a),void 0===b)?!1:void 0!==this.pd[b]};la.prototype.has=la.prototype.has=function(a){return this.contains(a)}; la.prototype.getValue=la.prototype.ja=function(a){var b=a;if(w.Pa(a)&&(b=w.Od(a),void 0===b))return null;a=this.pd[b];return void 0===a?null:a.value};la.prototype.get=la.prototype.get=function(a){return this.ja(a)}; la.prototype.remove=la.prototype["delete"]=la.prototype.remove=function(a){if(null===a)return!1;this.Q&&w.la(this,a);var b=a;if(w.Pa(a)&&(b=w.Od(a),void 0===b))return!1;a=this.pd[b];if(void 0===a)return!1;var c=a.Xa,d=a.hp;null!==c&&(c.hp=d);null!==d&&(d.Xa=c);this.Ea===a&&(this.Ea=c);this.Vh===a&&(this.Vh=d);delete this.pd[b];this.od--;this.Hc();return!0};la.prototype.clear=la.prototype.clear=function(){this.Q&&w.la(this);this.pd={};this.od=0;this.Vh=this.Ea=null;this.Hc()}; la.prototype.copy=function(){var a=new la(this.Uh,this.st),b=this.pd,c;for(c in b){var d=b[c];a.add(d.key,d.value)}return a};la.prototype.toArray=la.prototype.gc=function(){var a=this.pd,b=Array(this.od),c=0,d;for(d in a){var e=a[d];b[c]=new Aa(e.key,e.value);c++}return b};la.prototype.toKeySet=la.prototype.Gj=function(){return new Da(this)};w.u(la,{count:"count"},function(){return this.od});w.u(la,{size:"size"},function(){return this.od}); w.u(la,{i:"iterator"},function(){if(0>=this.count)return ua;var a=this.Qb;return null!==a?(a.reset(),a):new Ia(this)});w.u(la,{zF:"iteratorKeys"},function(){return 0>=this.count?ua:new Ca(this)});w.u(la,{AF:"iteratorValues"},function(){if(0>=this.count)return ua;var a=this.Oi;return null!==a?(a.reset(),a):new Ga(this)});function z(a,b){void 0===a?this.y=this.x=0:(this.x=a,this.y=b)}w.ga("Point",z);w.ni(z);w.de(z,{x:!0,y:!0});z.prototype.assign=function(a){this.x=a.x;this.y=a.y}; z.prototype.setTo=z.prototype.m=function(a,b){this.x=a;this.y=b;return this};z.prototype.set=z.prototype.set=function(a){this.x=a.x;this.y=a.y;return this};z.prototype.copy=function(){var a=new z;a.x=this.x;a.y=this.y;return a};z.prototype.Ha=function(){Object.freeze(this);return this};z.prototype.S=function(){return Object.isFrozen(this)?this:this.copy().freeze()};z.prototype.freeze=function(){return this};z.prototype.Qa=function(){Object.isFrozen(this)&&w.k("cannot thaw constant: "+this);return this}; z.parse=function(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));return new z(c,e)}return new z};z.stringify=function(a){return a.x.toString()+" "+a.y.toString()};z.prototype.toString=function(){return"Point("+this.x+","+this.y+")"};z.prototype.equals=z.prototype.L=function(a){return a instanceof z?this.x===a.x&&this.y===a.y:!1}; z.prototype.equalTo=z.prototype.kx=function(a,b){return this.x===a&&this.y===b};z.prototype.equalsApprox=z.prototype.Kc=function(a){return J(this.x,a.x)&&J(this.y,a.y)};z.prototype.add=z.prototype.add=function(a){this.x+=a.x;this.y+=a.y;return this};z.prototype.subtract=z.prototype.$n=function(a){this.x-=a.x;this.y-=a.y;return this};z.prototype.offset=z.prototype.offset=function(a,b){this.x+=a;this.y+=b;return this}; z.prototype.rotate=z.prototype.rotate=function(a){if(0===a)return this;var b=this.x,c=this.y;if(0===b&&0===c)return this;var d=0,e=0;360<=a?a-=360:0>a&&(a+=360);90===a?(d=0,e=1):180===a?(d=-1,e=0):270===a?(d=0,e=-1):(a=a*Math.PI/180,d=Math.cos(a),e=Math.sin(a));this.x=d*b-e*c;this.y=e*b+d*c;return this};z.prototype.scale=z.prototype.scale=function(a,b){this.x*=a;this.y*=b;return this};z.prototype.distanceSquaredPoint=z.prototype.xf=function(a){var b=a.x-this.x;a=a.y-this.y;return b*b+a*a}; z.prototype.distanceSquared=z.prototype.Pp=function(a,b){var c=a-this.x,d=b-this.y;return c*c+d*d};z.prototype.normalize=z.prototype.normalize=function(){var a=this.x,b=this.y,c=Math.sqrt(a*a+b*b);0<c&&(this.x=a/c,this.y=b/c);return this};z.prototype.directionPoint=z.prototype.Ob=function(a){return Ja(a.x-this.x,a.y-this.y)};z.prototype.direction=z.prototype.direction=function(a,b){return Ja(a-this.x,b-this.y)}; function Ja(a,b){if(0===a)return 0<b?90:0>b?270:0;if(0===b)return 0<a?0:180;if(isNaN(a)||isNaN(b))return 0;var c=180*Math.atan(Math.abs(b/a))/Math.PI;0>a?c=0>b?c+180:180-c:0>b&&(c=360-c);return c}z.prototype.projectOntoLineSegment=function(a,b,c,d){La(a,b,c,d,this.x,this.y,this);return this};z.prototype.projectOntoLineSegmentPoint=function(a,b){La(a.x,a.y,b.x,b.y,this.x,this.y,this);return this};z.prototype.snapToGrid=function(a,b,c,d){Ma(this.x,this.y,a,b,c,d,this);return this}; z.prototype.snapToGridPoint=function(a,b){Ma(this.x,this.y,a.x,a.y,b.width,b.height,this);return this};z.prototype.setRectSpot=z.prototype.Xn=function(a,b){this.x=a.x+b.x*a.width+b.offsetX;this.y=a.y+b.y*a.height+b.offsetY;return this};z.prototype.setSpot=z.prototype.Lu=function(a,b,c,d,e){this.x=a+e.x*c+e.offsetX;this.y=b+e.y*d+e.offsetY;return this};z.prototype.transform=function(a){a.nb(this);return this};function Na(a,b){b.pi(a);return a}var Oa; z.distanceLineSegmentSquared=Oa=function(a,b,c,d,e,f){var h=e-c,k=f-d,l=h*h+k*k;c-=a;d-=b;var m=-c*h-d*k;if(0>=m||m>=l)return h=e-a,k=f-b,Math.min(c*c+d*d,h*h+k*k);a=h*d-k*c;return a*a/l};var Pa;z.distanceSquared=Pa=function(a,b,c,d){a=c-a;b=d-b;return a*a+b*b};var Qa;z.direction=Qa=function(a,b,c,d){a=c-a;b=d-b;if(0===a)return 0<b?90:0>b?270:0;if(0===b)return 0<a?0:180;if(isNaN(a)||isNaN(b))return 0;d=180*Math.atan(Math.abs(b/a))/Math.PI;0>a?d=0>b?d+180:180-d:0>b&&(d=360-d);return d}; z.prototype.isReal=z.prototype.I=function(){return isFinite(this.x)&&isFinite(this.y)};function ia(a,b){void 0===a?this.height=this.width=0:(this.width=a,this.height=b)}w.ga("Size",ia);w.ni(ia);w.de(ia,{width:!0,height:!0});ia.prototype.assign=function(a){this.width=a.width;this.height=a.height};ia.prototype.setTo=ia.prototype.m=function(a,b){this.width=a;this.height=b;return this};ia.prototype.set=ia.prototype.set=function(a){this.width=a.width;this.height=a.height;return this}; ia.prototype.copy=function(){var a=new ia;a.width=this.width;a.height=this.height;return a};ia.prototype.Ha=function(){Object.freeze(this);return this};ia.prototype.S=function(){return Object.isFrozen(this)?this:this.copy().freeze()};ia.prototype.freeze=function(){return this};ia.prototype.Qa=function(){Object.isFrozen(this)&&w.k("cannot thaw constant: "+this);return this}; ia.parse=function(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));return new ia(c,e)}return new ia};ia.stringify=function(a){return a.width.toString()+" "+a.height.toString()};ia.prototype.toString=function(){return"Size("+this.width+","+this.height+")"};ia.prototype.equals=ia.prototype.L=function(a){return a instanceof ia?this.width===a.width&&this.height===a.height:!1}; ia.prototype.equalTo=ia.prototype.kx=function(a,b){return this.width===a&&this.height===b};ia.prototype.equalsApprox=ia.prototype.Kc=function(a){return J(this.width,a.width)&&J(this.height,a.height)};ia.prototype.isReal=ia.prototype.I=function(){return isFinite(this.width)&&isFinite(this.height)}; function B(a,b,c,d){void 0===a?this.height=this.width=this.y=this.x=0:a instanceof z?b instanceof z?(this.x=Math.min(a.x,b.x),this.y=Math.min(a.y,b.y),this.width=Math.abs(a.x-b.x),this.height=Math.abs(a.y-b.y)):b instanceof ia?(this.x=a.x,this.y=a.y,this.width=b.width,this.height=b.height):w.k("Incorrect arguments supplied to Rect constructor"):(this.x=a,this.y=b,this.width=c,this.height=d)}w.ga("Rect",B);w.ni(B);w.de(B,{x:!0,y:!0,width:!0,height:!0}); B.prototype.assign=function(a){this.x=a.x;this.y=a.y;this.width=a.width;this.height=a.height};function Ra(a,b,c){a.width=b;a.height=c}B.prototype.setTo=B.prototype.m=function(a,b,c,d){this.x=a;this.y=b;this.width=c;this.height=d;return this};B.prototype.set=B.prototype.set=function(a){this.x=a.x;this.y=a.y;this.width=a.width;this.height=a.height;return this};B.prototype.setPoint=B.prototype.Xg=function(a){this.x=a.x;this.y=a.y;return this}; B.prototype.setSize=function(a){this.width=a.width;this.height=a.height;return this};B.prototype.copy=function(){var a=new B;a.x=this.x;a.y=this.y;a.width=this.width;a.height=this.height;return a};B.prototype.Ha=function(){Object.freeze(this);return this};B.prototype.S=function(){return Object.isFrozen(this)?this:this.copy().freeze()};B.prototype.freeze=function(){return this};B.prototype.Qa=function(){Object.isFrozen(this)&&w.k("cannot thaw constant: "+this);return this}; B.parse=function(a){if("string"===typeof a){a=a.split(" ");for(var b=0,c=0;""===a[b];)b++;var d=a[b++];d&&(c=parseFloat(d));for(var e=0;""===a[b];)b++;(d=a[b++])&&(e=parseFloat(d));for(var f=0;""===a[b];)b++;(d=a[b++])&&(f=parseFloat(d));for(var h=0;""===a[b];)b++;(d=a[b++])&&(h=parseFloat(d));return new B(c,e,f,h)}return new B};B.stringify=function(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}; B.prototype.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"};B.prototype.equals=B.prototype.L=function(a){return a instanceof B?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1};B.prototype.equalTo=B.prototype.kx=function(a,b,c,d){return this.x===a&&this.y===b&&this.width===c&&this.height===d};B.prototype.equalsApprox=B.prototype.Kc=function(a){return J(this.x,a.x)&&J(this.y,a.y)&&J(this.width,a.width)&&J(this.height,a.height)}; function Sa(a,b){return Va(a.x,b.x)&&Va(a.y,b.y)&&Va(a.width,b.width)&&Va(a.height,b.height)}B.prototype.containsPoint=B.prototype.Ia=function(a){return this.x<=a.x&&this.x+th