gojs
Version:
Interactive diagrams, charts, and graphs, such as trees, flowcharts, orgcharts, UML, BPMN, or business diagrams
123 lines • 997 kB
JavaScript
/*
* GoJS v2.2.22 JavaScript Library for HTML Diagrams, https://gojs.net
* GoJS and Northwoods Software are registered trademarks of Northwoods Software Corporation, https://www.nwoods.com.
* Copyright (C) 1998-2022 by Northwoods Software Corporation. All Rights Reserved.
* THIS SOFTWARE IS LICENSED. THE LICENSE AGREEMENT IS AT: https://gojs.net/2.2.22/license.html.
* DO NOT MODIFY THIS FILE. DO NOT DISTRIBUTE A MODIFIED COPY OF THE CONTENTS OF THIS FILE.
*/
(function() { var t;function ba(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}function ca(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:ba(a)}}function da(a){for(var b,c=[];!(b=a.next()).done;)c.push(b.value);return c}var ea="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ha;
if("function"==typeof Object.setPrototypeOf)ha=Object.setPrototypeOf;else{var ia;a:{var ja={a:!0},la={};try{la.__proto__=ja;ia=la.a;break a}catch(a){}ia=!1}ha=ia?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var ma=ha;
function na(a,b){a.prototype=ea(b.prototype);a.prototype.constructor=a;if(ma)ma(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.wA=b.prototype}
var oa="undefined"!=typeof global&&null!=global?global:self,pa="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Object.prototype.hasOwnProperty.call(d,e)&&(a[e]=d[e])}return a},qa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
function ra(a,b){if(b){var c=oa;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&qa(c,a,{configurable:!0,writable:!0,value:b})}}ra("Object.assign",function(a){return a||pa});
ra("String.prototype.startsWith",function(a){return a?a:function(a,c){if(null==this)throw new TypeError("The 'this' value for String.prototype.startsWith must not be null or undefined");if(a instanceof RegExp)throw new TypeError("First argument to String.prototype.startsWith must not be a regular expression");var b=this.length,e=a.length;c=Math.max(0,Math.min(c|0,this.length));for(var f=0;f<e&&c<b;)if(this[c++]!=a[f++])return!1;return f>=e}});
ra("Array.prototype.fill",function(a){return a?a:function(a,c,d){var b=this.length||0;0>c&&(c=Math.max(0,b+c));if(null==d||d>b)d=b;d=Number(d);0>d&&(d=Math.max(0,b+d));for(c=Number(c||0);c<d;c++)this[c]=a;return this}});var sa="object"===typeof globalThis&&globalThis||"object"===typeof global&&global.global===global&&global||"object"===typeof self&&self.self===self&&self||{};void 0===sa.requestAnimationFrame&&(void 0===sa.setImmediate?sa.requestAnimationFrame=function(a){sa.setTimeout(a,0)}:sa.requestAnimationFrame=sa.setImmediate);function ta(){}function ua(a,b){var c=-1;return function(){var d=this,e=arguments;-1!==c&&sa.clearTimeout(c);c=va(function(){c=-1;a.apply(d,e)},b)}}
function va(a,b){return sa.setTimeout(a,b)}function wa(a){return sa.document.createElement(a)}function v(a){throw Error(a);}function xa(a,b){a="The object is frozen, so its properties cannot be set: "+a.toString();void 0!==b&&(a+=" to value: "+b);v(a)}function x(a,b,c,d){a instanceof b||(c=za(c),void 0!==d&&(c+="."+d),Aa(a,b,c))}function B(a,b,c,d){typeof a!==b&&(c=za(c),void 0!==d&&(c+="."+d),Aa(a,b,c))}
function E(a,b,c){"number"===typeof a&&isFinite(a)||(b=za(b),void 0!==c&&(b+="."+c),v(b+" must be a real number type, and not NaN or Infinity: "+a))}function Aa(a,b,c,d){b=" value is not an instance of "+za(b)+": ";c=za(c);void 0!==d&&(c+="."+d);"string"===typeof a&&(a='"'+a+'"');v(c+b+a)}function Ba(a,b,c,d){c=za(c);void 0!==d&&(c+="."+d);v(c+" is not in the range "+b+": "+a)}function Ca(a){v(("string"===typeof a.className?a.className:"")+" constructor cannot take any arguments.")}
function Da(a){v("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.")}function Ea(a,b){v("No property to set for this enum value: "+b+" on "+a.toString())}function Fa(a){sa.console&&sa.console.log(a)}function Ga(a){return"object"===typeof a&&null!==a}
function Ha(a){return Array.isArray(a)||sa.NodeList&&a instanceof sa.NodeList||sa.HTMLCollection&&a instanceof sa.HTMLCollection}function Ia(a,b,c){Ha(a)||Aa(a,"Array or NodeList or HTMLCollection",b,c)}function Ja(a){return Array.prototype.slice.call(a)}function La(a,b,c){Array.isArray(a)?b>=a.length?a.push(c):a.splice(b,0,c):v("Cannot insert an object into an HTMLCollection or NodeList: "+c+" at "+b)}
function Ma(a,b){Array.isArray(a)?b>=a.length?a.pop():a.splice(b,1):v("Cannot remove an object from an HTMLCollection or NodeList at "+b)}function Na(){var a=Oa.pop();return void 0===a?[]:a}function Pa(a){a.length=0;Oa.push(a)}function za(a){return null===a?"*":"string"===typeof a?a:"function"===typeof a&&"string"===typeof a.className?a.className:""}
function Qa(a){if("function"===typeof a){if(a.className)return a.className;if(a.name)return a.name;var b=a.toString();b=b.substring(9,b.indexOf("(")).trim();if(""!==b)return a._className=b}else if(Ga(a)&&a.constructor)return Qa(a.constructor);return typeof a}
function Ra(a){var b=a;Ga(a)&&(a.text?b=a.text:a.name?b=a.name:void 0!==a.key?b=a.key:void 0!==a.id?b=a.id:a.constructor===Object&&(a.Text?b=a.Text:a.Name?b=a.Name:void 0!==a.Key?b=a.Key:void 0!==a.Id?b=a.Id:void 0!==a.ID&&(b=a.ID)));return void 0===b?"undefined":null===b?"null":b.toString()}function Sa(a,b){if(a.hasOwnProperty(b))return!0;for(a=Object.getPrototypeOf(a);a&&a!==Function;){if(a.hasOwnProperty(b))return!0;var c=a.mA;if(c&&c[b])return!0;a=Object.getPrototypeOf(a)}return!1}
function Ta(a,b,c){Object.defineProperty(Ua.prototype,a,{get:b,set:c})}
function Va(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);c=[];for(var d=0,e=0;e<a.length;e+=2)c[d++]=b[a.substr(e,2)];a=c.join("");a=""===a?"0":a;b=[];for(c=0;256>c;c++)b[c]=c;for(c=d=0;256>c;c++)d=(d+b[c]+119)%256,e=b[c],b[c]=b[d],b[d]=e;d=c=0;for(var f="",g=0;g<a.length;g++)c=(c+1)%256,d=(d+b[c])%256,e=b[c],b[c]=b[d],b[d]=e,f+=String.fromCharCode(a.charCodeAt(g)^b[(b[c]+b[d])%256]);return f}
var Wa=void 0!==sa.navigator&&0<sa.navigator.userAgent.indexOf("Trident/7"),Xa=void 0!==sa.navigator&&0<sa.navigator.userAgent.indexOf("Edge/"),Ya=void 0!==sa.navigator&&void 0!==sa.navigator.platform&&null!==sa.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i),Oa=[];Object.freeze([]);ta.className="Util";ta.Dx="32ab5ff3b26f42dc0ed90f21462913b5";ta.adym="gojs.net";ta.vfo="28e644fdb164";ta.className="Util";function F(a,b,c){Za(this);this.j=a;this.Ca=b;this.m=c}
F.prototype.toString=function(){return"EnumValue."+this.Ca};function $a(a,b){return void 0===b||null===b||""===b?null:a[b]}function ab(a,b,c,d){a.classType!==b&&(c=za(c),void 0!==d&&(c+="."+d),Aa(a,"function"==="a constant of class "+typeof b.className?b.className:"",c))}oa.Object.defineProperties(F.prototype,{classType:{configurable:!0,get:function(){return this.j}},name:{configurable:!0,get:function(){return this.Ca}},value:{configurable:!0,get:function(){return this.m}}});
F.className="EnumValue";function bb(){this.Nv=[]}bb.prototype.toString=function(){return this.Nv.join("")};bb.prototype.add=function(a){""!==a&&this.Nv.push(a)};bb.className="StringBuilder";function db(){}db.className="PropertyCollection";
var G={ul:!1,Ww:!1,oA:!1,qA:!1,uA:!1,mx:!1,Vw:!1,nA:null,trace:function(a){sa.console&&sa.console.log(a)},pA:function(a,b,c,d){a.strokeStyle="red";a.fillStyle="red";a.font="8px sans-serif";a.beginPath();a.moveTo(-10,0);a.lineTo(10,0);a.moveTo(0,-10);a.lineTo(0,10);a.stroke();a.setTransform(1,0,0,1,0,0);a.scale(c,c);a.transform(b.m11,b.m12,b.m21,b.m22,b.dx,b.dy);a.lineWidth=2;a.beginPath();a.moveTo(d.left,d.top+20);a.lineTo(d.left,d.top);a.lineTo(d.left+20,d.top);a.moveTo(d.right,d.bottom-20);a.lineTo(d.right,
d.bottom);a.lineTo(d.right-20,d.bottom);a.stroke();a.fillText("DB: "+Math.round(d.x)+", "+Math.round(d.y)+", "+Math.round(d.width)+", "+Math.round(d.height),d.left,d.top-5)},xy:function(a){var b={},c;for(c in a){b.x=c;if("licenseKey"!==b.x){var d=a[b.x];if(void 0!==d.prototype){b.Ll=Object.getOwnPropertyNames(d.prototype);for(var e={Qj:0};e.Qj<b.Ll.length;e={Qj:e.Qj},e.Qj++){var f=Object.getOwnPropertyDescriptor(d.prototype,b.Ll[e.Qj]);void 0!==f.get&&void 0===f.set&&Object.defineProperty(d.prototype,
b.Ll[e.Qj],{set:function(a,b){return function(){throw Error("Property "+a.Ll[b.Qj]+" of "+a.x+" is read-only.");}}(b,e)})}}}b={Ll:b.Ll,x:b.x}}}};function eb(){}eb.prototype.reset=function(){};eb.prototype.next=function(){return!1};eb.prototype.xd=function(){return!1};eb.prototype.first=function(){return null};eb.prototype.any=function(){return!1};eb.prototype.all=function(){return!0};eb.prototype.each=function(){return this};eb.prototype.map=function(){return this};eb.prototype.filter=function(){return this};
eb.prototype.Zd=function(){};eb.prototype.toString=function(){return"EmptyIterator"};oa.Object.defineProperties(eb.prototype,{iterator:{configurable:!0,get:function(){return this}},count:{configurable:!0,get:function(){return 0}}});eb.prototype.first=eb.prototype.first;eb.prototype.hasNext=eb.prototype.xd;eb.prototype.next=eb.prototype.next;eb.prototype.reset=eb.prototype.reset;var fb=null;eb.className="EmptyIterator";fb=new eb;function gb(a){this.key=-1;this.value=a}
gb.prototype.reset=function(){this.key=-1};gb.prototype.next=function(){return-1===this.key?(this.key=0,!0):!1};gb.prototype.xd=function(){return this.next()};gb.prototype.first=function(){this.key=0;return this.value};gb.prototype.any=function(a){this.key=-1;return a(this.value)};gb.prototype.all=function(a){this.key=-1;return a(this.value)};gb.prototype.each=function(a){this.key=-1;a(this.value);return this};gb.prototype.map=function(a){return new gb(a(this.value))};
gb.prototype.filter=function(a){return a(this.value)?new gb(this.value):fb};gb.prototype.Zd=function(){this.value=null};gb.prototype.toString=function(){return"SingletonIterator("+this.value+")"};oa.Object.defineProperties(gb.prototype,{iterator:{configurable:!0,get:function(){return this}},count:{configurable:!0,get:function(){return 1}}});gb.prototype.first=gb.prototype.first;gb.prototype.hasNext=gb.prototype.xd;gb.prototype.next=gb.prototype.next;
gb.prototype.reset=gb.prototype.reset;gb.className="SingletonIterator";function hb(a){this.Cb=a;this.mf=null;a.Ua=null;this.ta=a.A;this.cb=-1}hb.prototype.reset=function(){var a=this.Cb;a.Ua=null;this.ta=a.A;this.cb=-1};hb.prototype.next=function(){var a=this.Cb;if(a.A!==this.ta){if(0>this.key)return!1;Da(a)}a=a.s;var b=a.length,c=++this.cb,d=this.mf;if(null!==d)for(;c<b;){var e=a[c];if(d(e))return this.key=this.cb=c,this.value=e,!0;c++}else{if(c<b)return this.key=c,this.value=a[c],!0;this.Zd()}return!1};
hb.prototype.xd=function(){return this.next()};hb.prototype.first=function(){var a=this.Cb;this.ta=a.A;this.cb=0;a=a.s;var b=a.length,c=this.mf;if(null!==c){for(var d=0;d<b;){var e=a[d];if(c(e))return this.key=this.cb=d,this.value=e;d++}return null}return 0<b?(a=a[0],this.key=0,this.value=a):null};hb.prototype.any=function(a){var b=this.Cb;b.Ua=null;var c=b.A;this.cb=-1;for(var d=b.s,e=d.length,f=this.mf,g=0;g<e;g++){var h=d[g];if(null===f||f(h)){if(a(h))return!0;b.A!==c&&Da(b)}}return!1};
hb.prototype.all=function(a){var b=this.Cb;b.Ua=null;var c=b.A;this.cb=-1;for(var d=b.s,e=d.length,f=this.mf,g=0;g<e;g++){var h=d[g];if(null===f||f(h)){if(!a(h))return!1;b.A!==c&&Da(b)}}return!0};hb.prototype.each=function(a){var b=this.Cb;b.Ua=null;var c=b.A;this.cb=-1;for(var d=b.s,e=d.length,f=this.mf,g=0;g<e;g++){var h=d[g];if(null===f||f(h))a(h),b.A!==c&&Da(b)}return this};
hb.prototype.map=function(a){var b=this.Cb;b.Ua=null;var c=b.A;this.cb=-1;for(var d=[],e=b.s,f=e.length,g=this.mf,h=0;h<f;h++){var k=e[h];if(null===g||g(k))d.push(a(k)),b.A!==c&&Da(b)}a=new H;a.s=d;a.xb();return a.iterator};hb.prototype.filter=function(a){var b=this.Cb;b.Ua=null;var c=b.A;this.cb=-1;for(var d=[],e=b.s,f=e.length,g=this.mf,h=0;h<f;h++){var k=e[h];if(null===g||g(k))a(k)&&d.push(k),b.A!==c&&Da(b)}a=new H;a.s=d;a.xb();return a.iterator};
hb.prototype.Zd=function(){this.key=-1;this.value=null;this.ta=-1;this.mf=null;this.Cb.Ua=this};hb.prototype.toString=function(){return"ListIterator@"+this.cb+"/"+this.Cb.count};
oa.Object.defineProperties(hb.prototype,{iterator:{configurable:!0,get:function(){return this}},predicate:{configurable:!0,get:function(){return this.mf},set:function(a){this.mf=a}},count:{configurable:!0,get:function(){var a=this.mf;if(null!==a){for(var b=0,c=this.Cb.s,d=c.length,e=0;e<d;e++)a(c[e])&&b++;return b}return this.Cb.s.length}}});hb.prototype.first=hb.prototype.first;hb.prototype.hasNext=hb.prototype.xd;hb.prototype.next=hb.prototype.next;
hb.prototype.reset=hb.prototype.reset;hb.className="ListIterator";function kb(a){this.Cb=a;a.Fg=null;this.ta=a.A;this.cb=a.s.length}kb.prototype.reset=function(){var a=this.Cb;a.Fg=null;this.ta=a.A;this.cb=a.s.length};kb.prototype.next=function(){var a=this.Cb;if(a.A!==this.ta){if(0>this.key)return!1;Da(a)}var b=--this.cb;if(0<=b)return this.key=b,this.value=a.s[b],!0;this.Zd();return!1};kb.prototype.xd=function(){return this.next()};
kb.prototype.first=function(){var a=this.Cb;this.ta=a.A;var b=a.s;this.cb=a=b.length-1;return 0<=a?(b=b[a],this.key=a,this.value=b):null};kb.prototype.any=function(a){var b=this.Cb;b.Fg=null;var c=b.A,d=b.s,e=d.length;this.cb=e;for(--e;0<=e;e--){if(a(d[e]))return!0;b.A!==c&&Da(b)}return!1};kb.prototype.all=function(a){var b=this.Cb;b.Fg=null;var c=b.A,d=b.s,e=d.length;this.cb=e;for(--e;0<=e;e--){if(!a(d[e]))return!1;b.A!==c&&Da(b)}return!0};
kb.prototype.each=function(a){var b=this.Cb;b.Fg=null;var c=b.A,d=b.s,e=d.length;this.cb=e;for(--e;0<=e;e--)a(d[e]),b.A!==c&&Da(b);return this};kb.prototype.map=function(a){var b=this.Cb;b.Fg=null;var c=b.A,d=[],e=b.s,f=e.length;this.cb=f;for(--f;0<=f;f--)d.push(a(e[f])),b.A!==c&&Da(b);a=new H;a.s=d;a.xb();return a.iterator};
kb.prototype.filter=function(a){var b=this.Cb;b.Fg=null;var c=b.A,d=[],e=b.s,f=e.length;this.cb=f;for(--f;0<=f;f--){var g=e[f];a(g)&&d.push(g);b.A!==c&&Da(b)}a=new H;a.s=d;a.xb();return a.iterator};kb.prototype.Zd=function(){this.key=-1;this.value=null;this.ta=-1;this.Cb.Fg=this};kb.prototype.toString=function(){return"ListIteratorBackwards("+this.cb+"/"+this.Cb.count+")"};
oa.Object.defineProperties(kb.prototype,{iterator:{configurable:!0,get:function(){return this}},count:{configurable:!0,get:function(){return this.Cb.s.length}}});kb.prototype.first=kb.prototype.first;kb.prototype.hasNext=kb.prototype.xd;kb.prototype.next=kb.prototype.next;kb.prototype.reset=kb.prototype.reset;kb.className="ListIteratorBackwards";
function H(a){Za(this);this._isFrozen=!1;this.s=[];this.A=0;this.Fg=this.Ua=null;(G&&"function"===typeof a||"string"===typeof a)&&v("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type.");void 0!==a&&this.addAll(a)}t=H.prototype;t.xb=function(){var a=this.A;a++;999999999<a&&(a=0);this.A=a};t.freeze=function(){this._isFrozen=!0;return this};t.pa=function(){this._isFrozen=!1;return this};t.toString=function(){return"List()#"+lb(this)};
t.add=function(a){if(null===a)return this;this._isFrozen&&xa(this,a);this.s.push(a);this.xb();return this};t.push=function(a){this.add(a)};t.addAll=function(a){if(null===a)return this;this._isFrozen&&xa(this);var b=this.s;if(Ha(a))for(var c=a.length,d=0;d<c;d++)b.push(a[d]);else for(a=a.iterator;a.next();)b.push(a.value);this.xb();return this};t.clear=function(){this._isFrozen&&xa(this);this.s.length=0;this.xb()};t.contains=function(a){return null===a?!1:-1!==this.s.indexOf(a)};t.has=function(a){return this.contains(a)};
t.indexOf=function(a){return null===a?-1:this.s.indexOf(a)};t.O=function(a){G&&E(a,H,"elt:i");var b=this.s;(0>a||a>=b.length)&&Ba(a,"0 <= i < length",H,"elt:i");return b[a]};t.get=function(a){return this.O(a)};t.Zc=function(a,b){G&&E(a,H,"setElt:i");var c=this.s;(0>a||a>=c.length)&&Ba(a,"0 <= i < length",H,"setElt:i");this._isFrozen&&xa(this,a);c[a]=b};t.set=function(a,b){this.Zc(a,b)};t.first=function(){var a=this.s;return 0===a.length?null:a[0]};
t.kc=function(){var a=this.s,b=a.length;return 0<b?a[b-1]:null};t.pop=function(){this._isFrozen&&xa(this);var a=this.s;return 0<a.length?a.pop():null};H.prototype.any=function(a){for(var b=this.s,c=this.A,d=b.length,e=0;e<d;e++){if(a(b[e]))return!0;this.A!==c&&Da(this)}return!1};H.prototype.all=function(a){for(var b=this.s,c=this.A,d=b.length,e=0;e<d;e++){if(!a(b[e]))return!1;this.A!==c&&Da(this)}return!0};
H.prototype.each=function(a){for(var b=this.s,c=this.A,d=b.length,e=0;e<d;e++)a(b[e]),this.A!==c&&Da(this);return this};H.prototype.map=function(a){for(var b=new H,c=[],d=this.s,e=this.A,f=d.length,g=0;g<f;g++)c.push(a(d[g])),this.A!==e&&Da(this);b.s=c;b.xb();return b};H.prototype.filter=function(a){for(var b=new H,c=[],d=this.s,e=this.A,f=d.length,g=0;g<f;g++){var h=d[g];a(h)&&c.push(h);this.A!==e&&Da(this)}b.s=c;b.xb();return b};t=H.prototype;
t.Hb=function(a,b){G&&E(a,H,"insertAt:i");0>a&&Ba(a,">= 0",H,"insertAt:i");this._isFrozen&&xa(this,a);var c=this.s;a>=c.length?c.push(b):c.splice(a,0,b);this.xb()};t.remove=function(a){if(null===a)return!1;this._isFrozen&&xa(this,a);var b=this.s;a=b.indexOf(a);if(-1===a)return!1;a===b.length-1?b.pop():b.splice(a,1);this.xb();return!0};t.delete=function(a){return this.remove(a)};
t.rb=function(a){G&&E(a,H,"removeAt:i");var b=this.s;(0>a||a>=b.length)&&Ba(a,"0 <= i < length",H,"removeAt:i");this._isFrozen&&xa(this,a);a===b.length-1?b.pop():b.splice(a,1);this.xb()};t.removeRange=function(a,b){G&&(E(a,H,"removeRange:from"),E(b,H,"removeRange:to"));var c=this.s,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._isFrozen&&xa(this);for(var e=a,f=b+1;f<d;)c[e++]=c[f++];c.length=d-(b-a+1);this.xb();return this};
H.prototype.copy=function(){var a=new H,b=this.s;0<b.length&&(a.s=Array.prototype.slice.call(b));return a};t=H.prototype;t.Ja=function(){for(var a=this.s,b=this.count,c=Array(b),d=0;d<b;d++)c[d]=a[d];return c};t.qv=function(){for(var a=new I,b=this.s,c=this.count,d=0;d<c;d++)a.add(b[d]);return a};t.sort=function(a){G&&B(a,"function",H,"sort:sortfunc");this._isFrozen&&xa(this);this.s.sort(a);this.xb();return this};
t.xi=function(a,b,c){var d=this.s,e=d.length;void 0===b&&(b=0);void 0===c&&(c=e);G&&(B(a,"function",H,"sortRange:sortfunc"),E(b,H,"sortRange:from"),E(c,H,"sortRange:to"));this._isFrozen&&xa(this);var f=c-b;if(1>=f)return this;(0>b||b>=e-1)&&Ba(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.xb()),this;if(0===b)if(c>=e)d.sort(a);else for(b=d.slice(0,c),b.sort(a),a=0;a<c;a++)d[a]=b[a];else if(c>=e)for(c=d.slice(b),c.sort(a),a=b;a<e;a++)d[a]=
c[a-b];else for(e=d.slice(b,c),e.sort(a),a=b;a<c;a++)d[a]=e[a-b];this.xb();return this};t.reverse=function(){this._isFrozen&&xa(this);this.s.reverse();this.xb();return this};
oa.Object.defineProperties(H.prototype,{_dataArray:{configurable:!0,get:function(){return this.s}},count:{configurable:!0,get:function(){return this.s.length}},size:{configurable:!0,get:function(){return this.s.length}},length:{configurable:!0,get:function(){return this.s.length}},iterator:{configurable:!0,get:function(){if(0>=this.s.length)return fb;var a=this.Ua;return null!==a?(a.reset(),a):new hb(this)}},iteratorBackwards:{configurable:!0,
enumerable:!0,get:function(){if(0>=this.s.length)return fb;var a=this.Fg;return null!==a?(a.reset(),a):new kb(this)}}});H.prototype.reverse=H.prototype.reverse;H.prototype.sortRange=H.prototype.xi;H.prototype.sort=H.prototype.sort;H.prototype.toSet=H.prototype.qv;H.prototype.toArray=H.prototype.Ja;H.prototype.removeRange=H.prototype.removeRange;H.prototype.removeAt=H.prototype.rb;H.prototype["delete"]=H.prototype.delete;H.prototype.remove=H.prototype.remove;H.prototype.insertAt=H.prototype.Hb;
H.prototype.pop=H.prototype.pop;H.prototype.last=H.prototype.kc;H.prototype.first=H.prototype.first;H.prototype.set=H.prototype.set;H.prototype.setElt=H.prototype.Zc;H.prototype.get=H.prototype.get;H.prototype.elt=H.prototype.O;H.prototype.indexOf=H.prototype.indexOf;H.prototype.has=H.prototype.has;H.prototype.contains=H.prototype.contains;H.prototype.clear=H.prototype.clear;H.prototype.addAll=H.prototype.addAll;H.prototype.push=H.prototype.push;H.prototype.add=H.prototype.add;H.prototype.thaw=H.prototype.pa;
H.prototype.freeze=H.prototype.freeze;H.className="List";function mb(a){this.eg=a;a.Ua=null;this.ta=a.A;this.xa=null}mb.prototype.reset=function(){var a=this.eg;a.Ua=null;this.ta=a.A;this.xa=null};mb.prototype.next=function(){var a=this.eg;if(a.A!==this.ta){if(null===this.key)return!1;Da(a)}var b=this.xa;b=null===b?a.ja:b.Aa;if(null!==b)return this.xa=b,this.value=b.value,this.key=b.key,!0;this.Zd();return!1};mb.prototype.xd=function(){return this.next()};
mb.prototype.first=function(){var a=this.eg;this.ta=a.A;a=a.ja;if(null!==a){this.xa=a;var b=a.value;this.key=a.key;return this.value=b}return null};mb.prototype.any=function(a){var b=this.eg;b.Ua=null;var c=b.A;this.xa=null;for(var d=b.ja;null!==d;){if(a(d.value))return!0;b.A!==c&&Da(b);d=d.Aa}return!1};mb.prototype.all=function(a){var b=this.eg;b.Ua=null;var c=b.A;this.xa=null;for(var d=b.ja;null!==d;){if(!a(d.value))return!1;b.A!==c&&Da(b);d=d.Aa}return!0};
mb.prototype.each=function(a){var b=this.eg;b.Ua=null;var c=b.A;this.xa=null;for(var d=b.ja;null!==d;)a(d.value),b.A!==c&&Da(b),d=d.Aa;return this};mb.prototype.map=function(a){var b=this.eg;b.Ua=null;for(var c=new H,d=b.A,e=b.ja;null!==e;)c.add(a(e.value)),b.A!==d&&Da(b),e=e.Aa;return c.iterator};mb.prototype.filter=function(a){var b=this.eg;b.Ua=null;for(var c=new H,d=b.A,e=b.ja;null!==e;){var f=e.value;a(f)&&c.add(f);b.A!==d&&Da(b);e=e.Aa}return c.iterator};
mb.prototype.Zd=function(){this.value=this.key=null;this.ta=-1;this.eg.Ua=this};mb.prototype.toString=function(){return null!==this.xa?"SetIterator@"+this.xa.value:"SetIterator"};oa.Object.defineProperties(mb.prototype,{iterator:{configurable:!0,get:function(){return this}},count:{configurable:!0,get:function(){return this.eg.Sb}}});mb.prototype.first=mb.prototype.first;mb.prototype.hasNext=mb.prototype.xd;mb.prototype.next=mb.prototype.next;mb.prototype.reset=mb.prototype.reset;
mb.className="SetIterator";function I(a){Za(this);this._isFrozen=!1;this.Tb={};this.Sb=0;this.Ua=null;this.A=0;this.gf=this.ja=null;(G&&"function"===typeof a||"string"===typeof a)&&v("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type.");void 0!==a&&this.addAll(a)}t=I.prototype;t.xb=function(){var a=this.A;a++;999999999<a&&(a=0);this.A=a};t.freeze=function(){this._isFrozen=!0;return this};t.pa=function(){this._isFrozen=!1;return this};
t.toString=function(){return"Set()#"+lb(this)};t.add=function(a){if(null===a)return this;this._isFrozen&&xa(this,a);var b=a;Ga(a)&&(b=nb(a));void 0===this.Tb[b]&&(this.Sb++,a=new ob(a,a),this.Tb[b]=a,b=this.gf,null===b?this.ja=a:(a.dl=b,b.Aa=a),this.gf=a,this.xb());return this};t.addAll=function(a){if(null===a)return this;this._isFrozen&&xa(this);if(Ha(a))for(var b=a.length,c=0;c<b;c++)this.add(a[c]);else for(a=a.iterator;a.next();)this.add(a.value);return this};
t.contains=function(a){if(null===a)return!1;var b=a;return Ga(a)&&(b=lb(a),void 0===b)?!1:void 0!==this.Tb[b]};t.has=function(a){return this.contains(a)};t.Dy=function(a){if(null===a)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0};t.Ey=function(a){if(null===a)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1};t.first=function(){var a=this.ja;return null===a?null:a.value};
I.prototype.any=function(a){for(var b=this.A,c=this.ja;null!==c;){if(a(c.value))return!0;this.A!==b&&Da(this);c=c.Aa}return!1};I.prototype.all=function(a){for(var b=this.A,c=this.ja;null!==c;){if(!a(c.value))return!1;this.A!==b&&Da(this);c=c.Aa}return!0};I.prototype.each=function(a){for(var b=this.A,c=this.ja;null!==c;)a(c.value),this.A!==b&&Da(this),c=c.Aa;return this};I.prototype.map=function(a){for(var b=new I,c=this.A,d=this.ja;null!==d;)b.add(a(d.value)),this.A!==c&&Da(this),d=d.Aa;return b};
I.prototype.filter=function(a){for(var b=new I,c=this.A,d=this.ja;null!==d;){var e=d.value;a(e)&&b.add(e);this.A!==c&&Da(this);d=d.Aa}return b};t=I.prototype;t.remove=function(a){if(null===a)return!1;this._isFrozen&&xa(this,a);var b=a;if(Ga(a)&&(b=lb(a),void 0===b))return!1;a=this.Tb[b];if(void 0===a)return!1;var c=a.Aa,d=a.dl;null!==c&&(c.dl=d);null!==d&&(d.Aa=c);this.ja===a&&(this.ja=c);this.gf===a&&(this.gf=d);delete this.Tb[b];this.Sb--;this.xb();return!0};t.delete=function(a){return this.remove(a)};
t.Oo=function(a){if(null===a)return this;this._isFrozen&&xa(this);if(Ha(a))for(var b=a.length,c=0;c<b;c++)this.remove(a[c]);else for(a=a.iterator;a.next();)this.remove(a.value);return this};t.$z=function(a){if(null===a||0===this.count)return this;this._isFrozen&&xa(this);var b=new I;b.addAll(a);a=[];for(var c=this.iterator;c.next();){var d=c.value;b.contains(d)||a.push(d)}this.Oo(a);return this};
t.clear=function(){this._isFrozen&&xa(this);this.Tb={};this.Sb=0;null!==this.Ua&&this.Ua.reset();this.gf=this.ja=null;this.xb()};I.prototype.copy=function(){var a=new I,b=this.Tb,c;for(c in b)a.add(b[c].value);return a};I.prototype.Ja=function(){var a=Array(this.Sb),b=this.Tb,c=0,d;for(d in b)a[c]=b[d].value,c++;return a};I.prototype.pv=function(){var a=new H,b=this.Tb,c;for(c in b)a.add(b[c].value);return a};function Za(a){a.__gohashid=pb++}
function nb(a){var b=a.__gohashid;void 0===b&&(b=pb++,a.__gohashid=b);return b}function lb(a){return a.__gohashid}oa.Object.defineProperties(I.prototype,{count:{configurable:!0,get:function(){return this.Sb}},size:{configurable:!0,get:function(){return this.Sb}},iterator:{configurable:!0,get:function(){if(0>=this.Sb)return fb;var a=this.Ua;return null!==a?(a.reset(),a):new mb(this)}}});I.prototype.toList=I.prototype.pv;I.prototype.toArray=I.prototype.Ja;
I.prototype.clear=I.prototype.clear;I.prototype.retainAll=I.prototype.$z;I.prototype.removeAll=I.prototype.Oo;I.prototype["delete"]=I.prototype.delete;I.prototype.remove=I.prototype.remove;I.prototype.first=I.prototype.first;I.prototype.containsAny=I.prototype.Ey;I.prototype.containsAll=I.prototype.Dy;I.prototype.has=I.prototype.has;I.prototype.contains=I.prototype.contains;I.prototype.addAll=I.prototype.addAll;I.prototype.add=I.prototype.add;I.prototype.thaw=I.prototype.pa;I.prototype.freeze=I.prototype.freeze;
var pb=1;I.className="Set";I.uniqueHash=Za;I.hashIdUnique=nb;I.hashId=lb;function qb(a){this.ra=a;this.ta=a.A;this.xa=null}qb.prototype.reset=function(){this.ta=this.ra.A;this.xa=null};qb.prototype.next=function(){var a=this.ra;if(a.A!==this.ta){if(null===this.key)return!1;Da(a)}var b=this.xa;b=null===b?a.ja:b.Aa;if(null!==b)return this.xa=b,this.value=this.key=a=b.key,!0;this.Zd();return!1};qb.prototype.xd=function(){return this.next()};
qb.prototype.first=function(){var a=this.ra;this.ta=a.A;a=a.ja;return null!==a?(this.xa=a,this.value=this.key=a=a.key):null};qb.prototype.any=function(a){var b=this.ra,c=b.A;this.xa=null;for(var d=b.ja;null!==d;){if(a(d.key))return!0;b.A!==c&&Da(b);d=d.Aa}return!1};qb.prototype.all=function(a){var b=this.ra,c=b.A;this.xa=null;for(var d=b.ja;null!==d;){if(!a(d.key))return!1;b.A!==c&&Da(b);d=d.Aa}return!0};
qb.prototype.each=function(a){var b=this.ra,c=b.A;this.xa=null;for(var d=b.ja;null!==d;)a(d.key),b.A!==c&&Da(b),d=d.Aa;return this};qb.prototype.map=function(a){var b=this.ra,c=b.A;this.xa=null;for(var d=new H,e=b.ja;null!==e;)d.add(a(e.key)),b.A!==c&&Da(b),e=e.Aa;return d.iterator};qb.prototype.filter=function(a){var b=this.ra,c=b.A;this.xa=null;for(var d=new H,e=b.ja;null!==e;){var f=e.key;a(f)&&d.add(f);b.A!==c&&Da(b);e=e.Aa}return d.iterator};
qb.prototype.Zd=function(){this.value=this.key=null;this.ta=-1};qb.prototype.toString=function(){return null!==this.xa?"MapKeySetIterator@"+this.xa.value:"MapKeySetIterator"};oa.Object.defineProperties(qb.prototype,{iterator:{configurable:!0,get:function(){return this}},count:{configurable:!0,get:function(){return this.ra.Sb}}});qb.prototype.first=qb.prototype.first;qb.prototype.hasNext=qb.prototype.xd;qb.prototype.next=qb.prototype.next;qb.prototype.reset=qb.prototype.reset;
qb.className="MapKeySetIterator";function rb(a){I.call(this);Za(this);this._isFrozen=!0;this.ra=a}na(rb,I);t=rb.prototype;t.freeze=function(){return this};t.pa=function(){return this};t.toString=function(){return"MapKeySet("+this.ra.toString()+")"};t.add=function(){v("This Set is read-only: "+this.toString())};t.contains=function(a){return this.ra.contains(a)};t.has=function(a){return this.contains(a)};t.remove=function(){v("This Set is read-only: "+this.toString())};t.delete=function(a){return this.remove(a)};
t.clear=function(){v("This Set is read-only: "+this.toString())};t.first=function(){var a=this.ra.ja;return null!==a?a.key:null};rb.prototype.any=function(a){for(var b=this.ra.ja;null!==b;){if(a(b.key))return!0;b=b.Aa}return!1};rb.prototype.all=function(a){for(var b=this.ra.ja;null!==b;){if(!a(b.key))return!1;b=b.Aa}return!0};rb.prototype.each=function(a){for(var b=this.ra.ja;null!==b;)a(b.key),b=b.Aa;return this};
rb.prototype.map=function(a){for(var b=new I,c=this.ra.ja;null!==c;)b.add(a(c.key)),c=c.Aa;return b};rb.prototype.filter=function(a){for(var b=new I,c=this.ra.ja;null!==c;){var d=c.key;a(d)&&b.add(d);c=c.Aa}return b};rb.prototype.copy=function(){return new rb(this.ra)};rb.prototype.qv=function(){var a=new I,b=this.ra.Tb,c;for(c in b)a.add(b[c].key);return a};rb.prototype.Ja=function(){var a=this.ra.Tb,b=Array(this.ra.Sb),c=0,d;for(d in a)b[c]=a[d].key,c++;return b};
rb.prototype.pv=function(){var a=new H,b=this.ra.Tb,c;for(c in b)a.add(b[c].key);return a};oa.Object.defineProperties(rb.prototype,{count:{configurable:!0,get:function(){return this.ra.Sb}},size:{configurable:!0,get:function(){return this.ra.Sb}},iterator:{configurable:!0,get:function(){return 0>=this.ra.Sb?fb:new qb(this.ra)}}});rb.prototype.toList=rb.prototype.pv;rb.prototype.toArray=rb.prototype.Ja;rb.prototype.toSet=rb.prototype.qv;
rb.prototype.first=rb.prototype.first;rb.prototype.clear=rb.prototype.clear;rb.prototype["delete"]=rb.prototype.delete;rb.prototype.remove=rb.prototype.remove;rb.prototype.has=rb.prototype.has;rb.prototype.contains=rb.prototype.contains;rb.prototype.add=rb.prototype.add;rb.prototype.thaw=rb.prototype.pa;rb.prototype.freeze=rb.prototype.freeze;rb.className="MapKeySet";function ub(a){this.ra=a;a.ff=null;this.ta=a.A;this.xa=null}
ub.prototype.reset=function(){var a=this.ra;a.ff=null;this.ta=a.A;this.xa=null};ub.prototype.next=function(){var a=this.ra;if(a.A!==this.ta){if(null===this.key)return!1;Da(a)}var b=this.xa;b=null===b?a.ja:b.Aa;if(null!==b)return this.xa=b,this.value=b.value,this.key=b.key,!0;this.Zd();return!1};ub.prototype.xd=function(){return this.next()};ub.prototype.first=function(){var a=this.ra;this.ta=a.A;a=a.ja;if(null!==a){this.xa=a;var b=a.value;this.key=a.key;return this.value=b}return null};
ub.prototype.any=function(a){var b=this.ra;b.ff=null;var c=b.A;this.xa=null;for(var d=b.ja;null!==d;){if(a(d.value))return!0;b.A!==c&&Da(b);d=d.Aa}return!1};ub.prototype.all=function(a){var b=this.ra;b.ff=null;var c=b.A;this.xa=null;for(var d=b.ja;null!==d;){if(!a(d.value))return!1;b.A!==c&&Da(b);d=d.Aa}return!0};ub.prototype.each=function(a){var b=this.ra;b.ff=null;var c=b.A;this.xa=null;for(var d=b.ja;null!==d;)a(d.value),b.A!==c&&Da(b),d=d.Aa;return this};
ub.prototype.map=function(a){var b=this.ra;b.ff=null;var c=b.A;this.xa=null;for(var d=new H,e=b.ja;null!==e;)d.add(a(e.value)),b.A!==c&&Da(b),e=e.Aa;return d.iterator};ub.prototype.filter=function(a){var b=this.ra;b.ff=null;var c=b.A;this.xa=null;for(var d=new H,e=b.ja;null!==e;){var f=e.value;a(f)&&d.add(f);b.A!==c&&Da(b);e=e.Aa}return d.iterator};ub.prototype.Zd=function(){this.value=this.key=null;this.ta=-1;this.ra.ff=this};
ub.prototype.toString=function(){return null!==this.xa?"MapValueSetIterator@"+this.xa.value:"MapValueSetIterator"};oa.Object.defineProperties(ub.prototype,{iterator:{configurable:!0,get:function(){return this}},count:{configurable:!0,get:function(){return this.ra.Sb}}});ub.prototype.first=ub.prototype.first;ub.prototype.hasNext=ub.prototype.xd;ub.prototype.next=ub.prototype.next;ub.prototype.reset=ub.prototype.reset;ub.className="MapValueSetIterator";
function ob(a,b){this.key=a;this.value=b;this.dl=this.Aa=null}ob.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"};ob.className="KeyValuePair";function xb(a){this.ra=a;a.Ua=null;this.ta=a.A;this.xa=null}xb.prototype.reset=function(){var a=this.ra;a.Ua=null;this.ta=a.A;this.xa=null};
xb.prototype.next=function(){var a=this.ra;if(a.A!==this.ta){if(null===this.key)return!1;Da(a)}var b=this.xa;b=null===b?a.ja:b.Aa;if(null!==b)return this.xa=b,this.key=b.key,this.value=b.value,!0;this.Zd();return!1};xb.prototype.xd=function(){return this.next()};xb.prototype.first=function(){var a=this.ra;this.ta=a.A;a=a.ja;return null!==a?(this.xa=a,this.key=a.key,this.value=a.value,a):null};
xb.prototype.any=function(a){var b=this.ra;b.Ua=null;var c=b.A;this.xa=null;for(var d=b.ja;null!==d;){if(a(d))return!0;b.A!==c&&Da(b);d=d.Aa}return!1};xb.prototype.all=function(a){var b=this.ra;b.Ua=null;var c=b.A;this.xa=null;for(var d=b.ja;null!==d;){if(!a(d))return!1;b.A!==c&&Da(b);d=d.Aa}return!0};xb.prototype.each=function(a){var b=this.ra;b.Ua=null;var c=b.A;this.xa=null;for(var d=b.ja;null!==d;)a(d),b.A!==c&&Da(b),d=d.Aa;return this};
xb.prototype.map=function(a){var b=this.ra;b.Ua=null;var c=b.A;this.xa=null;for(var d=new H,e=b.ja;null!==e;)d.add(a(e)),b.A!==c&&Da(b),e=e.Aa;return d.iterator};xb.prototype.filter=function(a){var b=this.ra;b.Ua=null;var c=b.A;this.xa=null;for(var d=new H,e=b.ja;null!==e;)a(e)&&d.add(e),b.A!==c&&Da(b),e=e.Aa;return d.iterator};xb.prototype.Zd=function(){this.value=this.key=null;this.ta=-1;this.ra.Ua=this};xb.prototype.toString=function(){return null!==this.xa?"MapIterator@"+this.xa:"MapIterator"};
oa.Object.defineProperties(xb.prototype,{iterator:{configurable:!0,get:function(){return this}},count:{configurable:!0,get:function(){return this.ra.Sb}}});xb.prototype.first=xb.prototype.first;xb.prototype.hasNext=xb.prototype.xd;xb.prototype.next=xb.prototype.next;xb.prototype.reset=xb.prototype.reset;xb.className="MapIterator";
function yb(a){Za(this);this._isFrozen=!1;this.Tb={};this.Sb=0;this.ff=this.Ua=null;this.A=0;this.gf=this.ja=null;(G&&"function"===typeof a||"string"===typeof a)&&v("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type.");void 0!==a&&this.addAll(a)}t=yb.prototype;t.xb=function(){var a=this.A;a++;999999999<a&&(a=0);this.A=a};t.freeze=function(){this._isFrozen=!0;return this};t.pa=function(){this._isFrozen=!1;return this};t.toString=function(){return"Map()#"+lb(this)};
t.add=function(a,b){this._isFrozen&&xa(this,a);var c=a;Ga(a)&&(c=nb(a));var d=this.Tb[c];void 0===d?(this.Sb++,a=new ob(a,b),this.Tb[c]=a,c=this.gf,null===c?this.ja=a:(a.dl=c,c.Aa=a),this.gf=a,this.xb()):d.value=b;return this};t.set=function(a,b){return this.add(a,b)};
t.addAll=function(a){if(null===a)return this;if(Ha(a))for(var b=a.length,c=0;c<b;c++){var d=a[c];this.add(d.key,d.value)}else if(a instanceof yb)for(a=a.iterator;a.next();)this.add(a.key,a.value);else for(a=a.iterator;a.next();)b=a.value,this.add(b.key,b.value);return this};t.first=function(){return this.ja};yb.prototype.any=function(a){for(var b=this.A,c=this.ja;null!==c;){if(a(c))return!0;this.A!==b&&Da(this);c=c.Aa}return!1};
yb.prototype.all=function(a){for(var b=this.A,c=this.ja;null!==c;){if(!a(c))return!1;this.A!==b&&Da(this);c=c.Aa}return!0};yb.prototype.each=function(a){for(var b=this.A,c=this.ja;null!==c;)a(c),this.A!==b&&Da(this),c=c.Aa;return this};yb.prototype.map=function(a){for(var b=new yb,c=this.A,d=this.ja;null!==d;)b.add(d.key,a(d)),this.A!==c&&Da(this),d=d.Aa;return b};yb.prototype.filter=function(a){for(var b=new yb,c=this.A,d=this.ja;null!==d;)a(d)&&b.add(d.key,d.value),this.A!==c&&Da(this),d=d.Aa;return b};
t=yb.prototype;t.contains=function(a){var b=a;return Ga(a)&&(b=lb(a),void 0===b)?!1:void 0!==this.Tb[b]};t.has=function(a){return this.contains(a)};t.L=function(a){var b=a;if(Ga(a)&&(b=lb(a),void 0===b))return null;a=this.Tb[b];return void 0===a?null:a.value};t.get=function(a){return this.L(a)};
t.remove=function(a){if(null===a)return!1;this._isFrozen&&xa(this,a);var b=a;if(Ga(a)&&(b=lb(a),void 0===b))return!1;a=this.Tb[b];if(void 0===a)return!1;var c=a.Aa,d=a.dl;null!==c&&(c.dl=d);null!==d&&(d.Aa=c);this.ja===a&&(this.ja=c);this.gf===a&&(this.gf=d);delete this.Tb[b];this.Sb--;this.xb();return!0};t.delete=function(a){return this.remove(a)};
t.clear=function(){this._isFrozen&&xa(this);this.Tb={};this.Sb=0;null!==this.Ua&&this.Ua.reset();null!==this.ff&&this.ff.reset();this.gf=this.ja=null;this.xb()};yb.prototype.copy=function(){var a=new yb,b=this.Tb,c;for(c in b){var d=b[c];a.add(d.key,d.value)}return a};yb.prototype.Ja=function(){var a=this.Tb,b=Array(this.Sb),c=0,d;for(d in a){var e=a[d];b[c]=new ob(e.key,e.value);c++}return b};yb.prototype.Kf=function(){return new rb(this)};
oa.Object.defineProperties(yb.prototype,{count:{configurable:!0,get:function(){return this.Sb}},size:{configurable:!0,get:function(){return this.Sb}},iterator:{configurable:!0,get:function(){if(0>=this.count)return fb;var a=this.Ua;return null!==a?(a.reset(),a):new xb(this)}},iteratorKeys:{configurable:!0,get:function(){return 0>=this.count?fb:new qb(this)}},iteratorValues:{configurable:!0,get:function(){if(0>=this.count)return fb;
var a=this.ff;return null!==a?(a.reset(),a):new ub(this)}}});yb.prototype.toKeySet=yb.prototype.Kf;yb.prototype.toArray=yb.prototype.Ja;yb.prototype.clear=yb.prototype.clear;yb.prototype["delete"]=yb.prototype.delete;yb.prototype.remove=yb.prototype.remove;yb.prototype.get=yb.prototype.get;yb.prototype.getValue=yb.prototype.L;yb.prototype.has=yb.prototype.has;yb.prototype.contains=yb.prototype.contains;yb.prototype.first=yb.prototype.first;yb.prototype.addAll=yb.prototype.addAll;
yb.prototype.set=yb.prototype.set;yb.prototype.add=yb.prototype.add;yb.prototype.thaw=yb.prototype.pa;yb.prototype.freeze=yb.prototype.freeze;yb.className="Map";function K(a,b){void 0===a?this.K=this.J=0:"number"===typeof a&&"number"===typeof b?(this.J=a,this.K=b):v("Invalid arguments to Point constructor: "+a+", "+b);this._isFrozen=!1}var zb,Ab,Bb,Cb,Db;K.prototype.assign=function(a){this.J=a.J;this.K=a.K;return this};K.prototype.h=function(a,b){this.J=a;this.K=b;return this};
K.prototype.qg=function(a,b){G&&(B(a,"number",K,"setTo:x"),B(b,"number",K,"setTo:y"),this.la());this.J=a;this.K=b;return this};K.prototype.set=function(a){G&&(x(a,K,K,"set:p"),this.la());this.J=a.J;this.K=a.K;return this};K.prototype.copy=function(){var a=new K;a.J=this.J;a.K=this.K;return a};t=K.prototype;t.na=function(){this._isFrozen=!0;Object.freeze(this);return this};t.M=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this};
t.pa=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this._isFrozen=!1;return this};t.la=function(a){if(G&&this._isFrozen){var b="The Point is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}};function Eb(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 K(c,e)}return new K}
function Fb(a){G&&x(a,K);return a.x.toString()+" "+a.y.toString()}t.toString=function(){return"Point("+this.x+","+this.y+")"};t.D=function(a){return a instanceof K?this.J===a.x&&this.K===a.y:!1};t.gi=function(a,b){return this.J===a&&this.K===b};t.fb=function(a){return L.C(this.J,a.x)&&L.C(this.K,a.y)};t.add=function(a){G&&(x(a,K,K,"add:p"),this.la());this.J+=a.x;this.K+=a.y;return this};t.oe=function(a){G&&(x(a,K,K,"subtract:p"),this.la());this.J-=a.x;this.K-=a.y;return this};
t.offset=function(a,b){G&&(E(a,K,"offset:dx"),E(b,K,"offset:dy"),this.la());this.J+=a;this.K+=b;return this};K.prototype.rotate=function(a){G&&(E(a,K,"rotate:angle"),this.la());if(0===a)return this;var b=this.J,c=this.K;if(0===b&&0===c)return this;360<=a?a-=360:0>a&&(a+=360);if(90===a){a=0;var d=1}else 180===a?(a=-1,d=0):270===a?(a=0,d=-1):(d=a*Math.PI/180,a=Math.cos(d),d=Math.sin(d));this.J=a*b-d*c;this.K=d*b+a*c;return this};t=K.prototype;
t.scale=function(a,b){G&&(E(a,K,"scale:sx"),E(b,K,"scale:sy"),this.la());this.J*=a;this.K*=b;return this};t.zf=function(a){G&&x(a,K,K,"distanceSquaredPoint:p");var b=a.x-this.J;a=a.y-this.K;return b*b+a*a};t.wd=function(a,b){G&&(E(a,K,"distanceSquared:px"),E(b,K,"distanceSquared:py"));a-=this.J;b-=this.K;return a*a+b*b};t.normalize=function(){G&&this.la();var a=this.J,b=this.K,c=Math.sqrt(a*a+b*b);0<c&&(this.J=a/c,this.K=b/c);return this};
t.eb=function(a){G&&x(a,K,K,"directionPoint:p");return Gb(a.x-this.J,a.y-this.K)};t.direction=function(a,b){G&&(E(a,K,"direction:px"),E(b,K,"direction:py"));return Gb(a-this.J,b-this.K)};function Gb(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}
t.Cy=function(a,b){G&&(x(a,K,K,"compareWithLineSegmentPoint:p"),x(b,K,K,"compareWithLineSegmentPoint:q"));return L.wl(a.x,a.y,b.x,b.y,this.x,this.y)};t.Qz=function(a,b,c,d){G&&(E(a,K,"projectOntoLineSegment:px"),E(b,K,"projectOntoLineSegment:py"),E(c,K,"projectOntoLineSegment:qx"),E(d,K,"projectOntoLineSegment:qy"));L.lh(a,b,c,d,this.J,this.K,this);return this};
t.Rz=function(a,b){G&&(x(a,K,K,"projectOntoLineSegmentPoint:p"),x(b,K,K,"projectOntoLineSegmentPoint:q"));L.lh(a.x,a.y,b.x,b.y,this.J,this.K,this);return this};t.eA=function(a,b,c,d){G&&(E(a,K,"snapToGrid:originx"),E(b,K,"snapToGrid:originy"),E(c,K,"snapToGrid:cellwidth"),E(d,K,"snapToGrid:cellheight"));L.vo(this.J,this.K,a,b,c,d,this);return this};t.fA=function(a,b){G&&(x(a,K,K,"snapToGridPoint:p"),x(b,Hb,K,"snapToGridPoint:q"));L.vo(this.J,this.K,a.x,a.y,b.width,b.height,this);return this};
t.vi=function(a,b){G&&(x(a,M,K,"setRectSpot:r"),x(b,Ib,K,"setRectSpot:spot"),this.la());this.J=a.x+b.x*a.width+b.offsetX;this.K=a.y+b.y*a.height+b.offsetY;return this};t.wi=function(a,b,c,d,e){G&&(E(a,K,"setSpot:x"),E(b,K,"setSpot:y"),E(c,K,"setSpot:w"),E(d,K,"setSpot:h"),(0>c||0>d)&&v("Point.setSpot:Width and height cannot be negative"),x(e,Ib,K,"setSpot:spot"),this.la());this.J=a+e.x*c+e.offsetX;this.K=b+e.y*d+e.offsetY;return this};
t.transform=function(a){G&&x(a,Jb,K,"transform:t");a.Ka(this);return this};function Kb(a,b){G&&x(b,Jb,K,"transformInverted:t");b.Nd(a);return a}
function Lb(a,b,c,d,e,f){G&&(E(a,K,"distanceLineSegmentSquared:px"),E(b,K,"distanceLineSegmentSquared:py"),E(c,K,"distanceLineSegmentSquared:ax"),E(d,K,"distanceLineSegmentSquared:ay"),E(e,K,"distanceLineSegmentSquared:bx"),E(f,K,"distanceLineSegmentSquared:by"));var g=e-c,h=f-d,k=g*g+h*h;c-=a;d-=b;var l=-c*g-d*h;if(0>=l||l>=k)return g=e-a,h=f-b,Math.min(c*c+d*d,g*g+h*h);a=g*d-h*c;return a*a/k}
function Mb(a,b,c,d){G&&(E(a,K,"distanceSquared:px"),E(b,K,"distanceSquared:py"),E(c,K,"distanceSquared:qx"),E(d,K,"distanceSquared:qy"));a=c-a;b=d-b;return a*a+b*b}function Nb(a,b,c,d){G&&(E(a,K,"direction:px"),E(b,K,"direction:py"),E(c,K,"direction:qx"),E(d,K,"direction:qy"));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}
t.u=function(){return isFinite(this.x)&&isFinite(this.y)};K.alloc=function(){var a=Ob.pop();return void 0===a?new K:a};K.allocAt=function(a,b){var c=Ob.pop();if(void 0===c)return new K(a,b);c.x=a;c.y=b;return c};K.free=function(a){Ob.push(a)};
oa.Object.defineProperties(K.prototype,{x:{configurable:!0,get:function(){return this.J},set:function(a){G&&(B(a,"number",K,"x"),this.la(a));this.J=a}},y:{configurable:!0,get:function(){return this.K},set:function(a){G&&(B(a,"number",K,"y"),this.la(a));this.K=a}}});K.prototype.isReal=K.prototype.u;K.prototype.setSpot=K.prototype.wi;K.prototype.setRectSpot=K.prototype.vi;K.prototype.snapToGridPoint=K.prototype.fA;K.prototype.snapToGrid=K.prototype.eA;
K.prototype.projectOntoLineSegmentPoint=K.prototype.Rz;K.prototype.projectOntoLineSegment=K.prototype.Qz;K.intersectingLineSegments=function(a,b,c,d,e,f,g,h){G&&(E(a,K,"intersectingLineSegments:a1x"),E(b,K,"intersectingLineSegments:a1y"),E(c,K,"intersectingLineSegments:a2x"),E(d,K,"intersectingLineSegments:a2y"),E(e,K,"intersectingLineSegments:b1x"),E(f,K,"intersectingLineSegments:b1y"),E(g,K,"intersectingLineSegments:b2x"),E(h,K,"intersectingLineSegments:b2y"));return L.El(a,b,c,d,e,f,g,h)};
K.prototype.compareWithLineSegmentPoint=K.prototype.Cy;K.compareWithLineSegment=function(a,b,c,d,e,f){G&&(E(a,K,"compareWithLineSegment:a1x"),E(b,K,"compareWithLineSegment:a1y"),E(c,K,"compareWithLineSegment:a2x"),E(d,K,"compareWithLineSegment:a2y"),E(e,K,"compareWithLineSegment:b1x"),E(f,K,"compareWithLineSegment:b1y"));return L.wl(a,b,c,d,e,f)};K.prototype.direction=K.prototype.direction;K.prototype.directionPoint=K.prototype.eb;K.prototype.normalize=K.prototype.normalize;
K.prototype.distanceSquared=K.prototype.wd;K.prototype.distanceSquaredPoint=K.prototype.zf;K.prototype.scale=K.prototype.scale;K.prototype.rotate=K.prototype.rotate;K.prototype.offset=K.prototype.offset;K.prototype.subtract=K.prototype.oe;K.prototype.add=K.prototype.add;K.prototype.equalsApprox=K.prototype.fb;K.prototype.equalTo=K.prototype.gi;K.prototype.equals=K.prototype.D;K.prototype.set=K.prototype.set;K.prototype.setTo=K.prototype.qg;var Ob=[];K.className="Point";K.parse=Eb;K.stringify=Fb;
K.distanceLineSegmentSquared=Lb;K.distanceSquared=Mb;K.direction=Nb;K.Origin=zb=(new K(0,0)).na();K.InfiniteTopLeft=Ab=(new K(-Infinity,-Infinity)).na();K.InfiniteBottomRight=Bb=(new K(Infinity,Infinity)).na();K.SixPoint=Cb=(new K(6,6)).na();K.NoPoint=Db=(new K(NaN,NaN)).na();K.parse=Eb;K.stringify=Fb;K.distanceLineSegmentSquared=Lb;K.distanceSquared=Mb;K.direction=Nb;
function Hb(a,b){void 0===a?this.da=this.fa=0:"number"===typeof a&&(0<=a||isNaN(a))&&"number"===typeof b&&(0<=b||isNaN(b))?(this.fa=a,this.da=b):v("Invalid arguments to Size constructor: "+a+", "+b);this._isFrozen=!1}var Pb,Qb,Rb,Sb,Tb,Ub,Yb;Hb.prototype.assign=function(a){this.fa=a.fa;this.da=a.da;return this};Hb.prototype.h=function(a,b){this.fa=a;this.da=b;return this};
Hb.prototype.qg=function(a,b){G&&(B(a,"number",Hb,"setTo:w"),B(b,"number",Hb,"setTo:h"),0>a&&Ba(a,">= 0",Hb,"setTo:w"),0>b&&Ba(b,">= 0",Hb,"setTo:h"),this.la());this.fa=a;this.da=b;return this};Hb.prototype.set=function(a){G&&(x(a,Hb,Hb,"set:s"),this.la());this.fa=a.fa;this.da=a.da;return this};Hb.prototype.copy=function(){var a=new Hb;a.fa=this.fa;a.da=this.da;return a};t=Hb.prototype;t.na=function(){this._isFrozen=!0;Object.freeze(this);return this};
t.M=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()};t.freeze=function(){this._isFrozen=!0;return this};t.pa=function(){Object.isFrozen(this)&&v("cannot thaw constant: "+this);this._isFrozen=!1;return this};t.la=function(a){if(G&&this._isFrozen){var b="The Size is frozen, so its properties cannot be set: "+this.toString();void 0!==a&&(b+=" to value: "+a);v(b)}};
function Zb(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 Hb(c,e)}return new Hb}function $b(a){G&&x(a,Hb);return a.width.toString()+" "+a.height.toString()}t.toString=function(){return"Size("+this.width+","+this.height+")"};t.D=function(a){return a instanceof Hb?this.fa===a.width&&this.da===a.height:!1};t.gi=function(a,b){return this.fa===a&&this.da===b};
t.fb=function(a){return L.C(this.fa,a.width)&&L.C(this.da,a.height)};t.Bc=function(a,b){G&&(E(a,Hb,"inflate:w"),E(b,Hb,"inflate:h"));a=this.width+a;this.fa=0<=a?a:0;b=this.height+b;this.da=0<=b?b:0;return this};t.u=function(){return isFinite(this.width)&&isFinite(this.height)};Hb.alloc=function(){var a=ac.pop();return void 0===a?new Hb:a};Hb.free=function(a){ac.push(a)};
oa.Object.defineProperties(Hb.prototype,{width:{configurable:!0,get:function(){return this.fa},set:function(a){G&&(B(a,"number",Hb,"width"),this.la(a));0>a&&Ba(a,">= 0",Hb,"width");this.fa=a}},height:{configurable:!0,get:function(){return this.da},set:function(a){G&&(B(a,"number",Hb,"height"),this.la(a));0>a&&Ba(a,">= 0",Hb,"height");this.da=a}}});Hb.prototype.isReal=Hb.prototype.u;Hb.prototype.inflate=Hb.prototype.Bc;Hb.prototype.equalsApprox=Hb.prototype.fb;
Hb.prototype.equalTo=Hb.prototype.gi;Hb.prototype.equals=Hb.prototype.D;Hb.prototype.set=Hb.prototype.set;Hb.prototype.setTo=Hb.prototype.qg;var ac=[];Hb.className="Size";Hb.parse=Zb;Hb.stringify=$b;Hb.ZeroSize=Pb=(new Hb(0,0)).na();Hb.OneSize=Qb=(new Hb(1,1)).na();Hb.SixSize=Rb=(new Hb(6,6)).na();Hb.EightSize=Sb=(new Hb(8,8)).na();Hb.TenSize=Tb=(new Hb(10,10)).na();Hb.InfiniteSize=Ub=(new Hb(Infinity,Infinity)).na();Hb.NoSize=Yb=(new Hb(NaN,NaN)).na();Hb.parse=Zb;Hb.stringify=$b;
function M(a,b,c,d){void 0===a?this.da=this.fa=this.K=this.J=0:"number"===typeof a&&"number"===typeof b&&"number"===typeof c&&(0<=c||isNaN(c))&&"number"===typeof d&&(0<=d||isNaN(d))?(this.J=a,this.K=b,this.fa=c,this.da=d):a instanceof K?(c=a.x,a=a.y,b in