Files
Yajbir Singh f1b860b25c
Some checks failed
check / markdownlint (push) Has been cancelled
check / spellchecker (push) Has been cancelled
updated
2025-12-11 19:03:17 +05:30

173 lines
69 KiB
JavaScript

/*
* (c) Copyright Ascensio System SIA 2010-2023
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at 20A-6 Ernesta Birznieka-Upish
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
function fa(B){var x=0;return function(){return x<B.length?{done:!1,value:B[x++]}:{done:!0}}}function ha(B){var x="undefined"!=typeof Symbol&&Symbol.iterator&&B[Symbol.iterator];if(x)return x.call(B);if("number"==typeof B.length)return{next:fa(B)};throw Error(String(B)+" is not an iterable or ArrayLike");}var ka="function"==typeof Object.defineProperties?Object.defineProperty:function(B,x,t){if(B==Array.prototype||B==Object.prototype)return B;B[x]=t.value;return B};
function la(B){B=["object"==typeof globalThis&&globalThis,B,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var x=0;x<B.length;++x){var t=B[x];if(t&&t.Math==Math)return t}throw Error("Cannot find global object");}var pa=la(this);function U(B,x){if(x)a:{var t=pa;B=B.split(".");for(var u=0;u<B.length-1;u++){var F=B[u];if(!(F in t))break a;t=t[F]}B=B[B.length-1];u=t[B];x=x(u);x!=u&&null!=x&&ka(t,B,{configurable:!0,writable:!0,value:x})}}
U("Object.is",function(B){return B?B:function(x,t){return x===t?0!==x||1/x===1/t:x!==x&&t!==t}});U("Array.prototype.includes",function(B){return B?B:function(x,t){var u=this;u instanceof String&&(u=String(u));var F=u.length;t=t||0;for(0>t&&(t=Math.max(t+F,0));t<F;t++){var p=u[t];if(p===x||Object.is(p,x))return!0}return!1}});
U("String.prototype.includes",function(B){return B?B:function(x,t){if(null==this)throw new TypeError("The 'this' value for String.prototype.includes must not be null or undefined");if(x instanceof RegExp)throw new TypeError("First argument to String.prototype.includes must not be a regular expression");return-1!==(this+"").indexOf(x,t||0)}});
U("Symbol",function(B){function x(p){if(this instanceof x)throw new TypeError("Symbol is not a constructor");return new t(u+(p||"")+"_"+F++,p)}function t(p,G){this.wd=p;ka(this,"description",{configurable:!0,writable:!0,value:G})}if(B)return B;t.prototype.toString=function(){return this.wd};var u="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",F=0;return x});
U("Symbol.iterator",function(B){if(B)return B;B=Symbol("Symbol.iterator");for(var x="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),t=0;t<x.length;t++){var u=pa[x[t]];"function"===typeof u&&"function"!=typeof u.prototype[B]&&ka(u.prototype,B,{configurable:!0,writable:!0,value:function(){return qa(fa(this))}})}return B});function qa(B){B={next:B};B[Symbol.iterator]=function(){return this};return B}
function ra(B,x){B instanceof String&&(B+="");var t=0,u=!1,F={next:function(){if(!u&&t<B.length){var p=t++;return{value:x(p,B[p]),done:!1}}u=!0;return{done:!0,value:void 0}}};F[Symbol.iterator]=function(){return F};return F}U("Array.prototype.keys",function(B){return B?B:function(){return ra(this,function(x){return x})}});function sa(B,x){return Object.prototype.hasOwnProperty.call(B,x)}
var ta="function"==typeof Object.assign?Object.assign:function(B,x){for(var t=1;t<arguments.length;t++){var u=arguments[t];if(u)for(var F in u)sa(u,F)&&(B[F]=u[F])}return B};U("Object.assign",function(B){return B||ta});U("Array.prototype.fill",function(B){return B?B:function(x,t,u){var F=this.length||0;0>t&&(t=Math.max(0,F+t));if(null==u||u>F)u=F;u=Number(u);0>u&&(u=Math.max(0,F+u));for(t=Number(t||0);t<u;t++)this[t]=x;return this}});function ua(B){return B?B:Array.prototype.fill}
U("Int8Array.prototype.fill",ua);U("Uint8Array.prototype.fill",ua);U("Uint8ClampedArray.prototype.fill",ua);U("Int16Array.prototype.fill",ua);U("Uint16Array.prototype.fill",ua);U("Int32Array.prototype.fill",ua);U("Uint32Array.prototype.fill",ua);U("Float32Array.prototype.fill",ua);U("Float64Array.prototype.fill",ua);
U("WeakMap",function(B){function x(z){this.nb=(v+=Math.random()+1).toString();if(z){z=ha(z);for(var C;!(C=z.next()).done;)C=C.value,this.set(C[0],C[1])}}function t(){}function u(z){var C=typeof z;return"object"===C&&null!==z||"function"===C}function F(z){if(!sa(z,G)){var C=new t;ka(z,G,{value:C})}}function p(z){var C=Object[z];C&&(Object[z]=function(D){if(D instanceof t)return D;Object.isExtensible(D)&&F(D);return C(D)})}if(function(){if(!B||!Object.seal)return!1;try{var z=Object.seal({}),C=Object.seal({}),
D=new B([[z,2],[C,3]]);if(2!=D.get(z)||3!=D.get(C))return!1;D.delete(z);D.set(C,4);return!D.has(z)&&4==D.get(C)}catch(y){return!1}}())return B;var G="$jscomp_hidden_"+Math.random();p("freeze");p("preventExtensions");p("seal");var v=0;x.prototype.set=function(z,C){if(!u(z))throw Error("Invalid WeakMap key");F(z);if(!sa(z,G))throw Error("WeakMap key fail: "+z);z[G][this.nb]=C;return this};x.prototype.get=function(z){return u(z)&&sa(z,G)?z[G][this.nb]:void 0};x.prototype.has=function(z){return u(z)&&
sa(z,G)&&sa(z[G],this.nb)};x.prototype.delete=function(z){return u(z)&&sa(z,G)&&sa(z[G],this.nb)?delete z[G][this.nb]:!1};return x});
U("Map",function(B){function x(){var v={};return v.xa=v.next=v.head=v}function t(v,z){var C=v.wa;return qa(function(){if(C){for(;C.head!=v.wa;)C=C.xa;for(;C.next!=C.head;)return C=C.next,{done:!1,value:z(C)};C=null}return{done:!0,value:void 0}})}function u(v,z){var C=z&&typeof z;"object"==C||"function"==C?p.has(z)?C=p.get(z):(C=""+ ++G,p.set(z,C)):C="p_"+z;var D=v.hb[C];if(D&&sa(v.hb,C))for(v=0;v<D.length;v++){var y=D[v];if(z!==z&&y.key!==y.key||z===y.key)return{id:C,list:D,index:v,U:y}}return{id:C,
list:D,index:-1,U:void 0}}function F(v){this.hb={};this.wa=x();this.size=0;if(v){v=ha(v);for(var z;!(z=v.next()).done;)z=z.value,this.set(z[0],z[1])}}if(function(){if(!B||"function"!=typeof B||!B.prototype.entries||"function"!=typeof Object.seal)return!1;try{var v=Object.seal({x:4}),z=new B(ha([[v,"s"]]));if("s"!=z.get(v)||1!=z.size||z.get({x:4})||z.set({x:4},"t")!=z||2!=z.size)return!1;var C=z.entries(),D=C.next();if(D.done||D.value[0]!=v||"s"!=D.value[1])return!1;D=C.next();return D.done||4!=D.value[0].x||
"t"!=D.value[1]||!C.next().done?!1:!0}catch(y){return!1}}())return B;var p=new WeakMap;F.prototype.set=function(v,z){v=0===v?0:v;var C=u(this,v);C.list||(C.list=this.hb[C.id]=[]);C.U?C.U.value=z:(C.U={next:this.wa,xa:this.wa.xa,head:this.wa,key:v,value:z},C.list.push(C.U),this.wa.xa.next=C.U,this.wa.xa=C.U,this.size++);return this};F.prototype.delete=function(v){v=u(this,v);return v.U&&v.list?(v.list.splice(v.index,1),v.list.length||delete this.hb[v.id],v.U.xa.next=v.U.next,v.U.next.xa=v.U.xa,v.U.head=
null,this.size--,!0):!1};F.prototype.clear=function(){this.hb={};this.wa=this.wa.xa=x();this.size=0};F.prototype.has=function(v){return!!u(this,v).U};F.prototype.get=function(v){return(v=u(this,v).U)&&v.value};F.prototype.entries=function(){return t(this,function(v){return[v.key,v.value]})};F.prototype.keys=function(){return t(this,function(v){return v.key})};F.prototype.values=function(){return t(this,function(v){return v.value})};F.prototype.forEach=function(v,z){for(var C=this.entries(),D;!(D=
C.next()).done;)D=D.value,v.call(z,D[1],D[0],this)};F.prototype[Symbol.iterator]=F.prototype.entries;var G=0;return F});
U("Set",function(B){function x(t){this.oa=new Map;if(t){t=ha(t);for(var u;!(u=t.next()).done;)this.add(u.value)}this.size=this.oa.size}if(function(){if(!B||"function"!=typeof B||!B.prototype.entries||"function"!=typeof Object.seal)return!1;try{var t=Object.seal({x:4}),u=new B(ha([t]));if(!u.has(t)||1!=u.size||u.add(t)!=u||1!=u.size||u.add({x:4})!=u||2!=u.size)return!1;var F=u.entries(),p=F.next();if(p.done||p.value[0]!=t||p.value[1]!=t)return!1;p=F.next();return p.done||p.value[0]==t||4!=p.value[0].x||
p.value[1]!=p.value[0]?!1:F.next().done}catch(G){return!1}}())return B;x.prototype.add=function(t){t=0===t?0:t;this.oa.set(t,t);this.size=this.oa.size;return this};x.prototype.delete=function(t){t=this.oa.delete(t);this.size=this.oa.size;return t};x.prototype.clear=function(){this.oa.clear();this.size=0};x.prototype.has=function(t){return this.oa.has(t)};x.prototype.entries=function(){return this.oa.entries()};x.prototype.values=function(){return this.oa.values()};x.prototype.keys=x.prototype.values;
x.prototype[Symbol.iterator]=x.prototype.values;x.prototype.forEach=function(t,u){var F=this;this.oa.forEach(function(p){return t.call(u,p,p,F)})};return x});U("Array.prototype.flatMap",function(B){return B?B:function(x,t){var u=[];Array.prototype.forEach.call(this,function(F,p){F=x.call(t,F,p,this);Array.isArray(F)?u.push.apply(u,F):u.push(F)});return u}});
(function(B){function x(a){this.g=[];this.wc(a)||this.gb(Array.isArray(a)?a:arguments)}function t(a){this.F=!1;this.i=[];this.fb=0;var b=Array.isArray(a),c=b&&"object"===typeof a[0],d=a&&void 0===a.size&&(void 0!==a.x||void 0!==a.jd);(b=b?c?a:arguments:d?arguments:null)&&0<b.length?this.kc(b):this.O=void 0;this.wc(!b&&a)}function u(){}function F(a,b,c,d,f){if(.99999999<=b){var e=a.ca();e&&(b=0,a=e)}this.Mb(a);this.la=b;this.j=c||a.Yc(b);this.za=d;this.Bd=f;this.v=this.Ga=this.Wa=null}function p(a,
b,c,d,f,e,g,h){var l=arguments.length;if(3===l){this.h=a;var k=b;var q=c}else if(l)if(1===l)if(a.te)k=new G(a.te),q=new G(a.Le);else if(a.pe){var m=a.pe;var r=a.Ge;var n=a.He;var w=a.Je}else Array.isArray(a)&&(m=[a[0],a[1]],w=[a[6],a[7]],r=[a[2]-a[0],a[3]-a[1]],n=[a[4]-a[6],a[5]-a[7]]);else 2===l?(k=new G(a),q=new G(b)):4===l?(m=a,r=b,n=c,w=d):8===l&&(m=[a,b],w=[g,h],r=[c-a,d-b],n=[f-g,e-h]);else k=new G,q=new G;this.s=k||new G(m,null,r);this.M=q||new G(w,n,null)}function G(a,b,c,d,f,e){for(var g=
0,h=arguments.length;g<h;g++){var l=arguments[g];l&&Object.assign(this,l)}g=arguments.length;if(0<g)if(null==a||"object"===typeof a)if(1===g&&a&&a.jd){var k=a.jd;var q=a.ad;var m=a.Ie}else k=a,q=b,m=c;else k=[a,b],q=void 0!==c?[c,d]:null,m=void 0!==f?[f,e]:null;this.j=new y(k,this);this.A=new y(q,this);this.H=new y(m,this)}function v(){}function z(a,b,c,d,f){if(4<=arguments.length){this.Xa=a;this.Ya=b;this.ra=c;this.sa=d;var e=f}else this.Xa=a.x,this.Ya=a.y,this.ra=b.x,this.sa=b.y,e=c;e||(this.ra-=
this.Xa,this.sa-=this.Ya)}function C(a,b){var c=arguments.length;6<=c?this.I.apply(this,arguments):1===c||2===c?a instanceof C?this.I(a.B,a.C,a.D,a.G,a.J,a.K,b):Array.isArray(a)&&this.I.apply(this,b?a.concat([b]):a):c||this.reset();return this}function D(a,b,c,d){var f=typeof a;if("number"===f){this.I(a,b,c,d);var e=4}else if("undefined"===f||null===a)this.I(0,0,0,0),e=null===a?1:0;this.Ua&&(this.Ua=e);return this}function y(a,b,c){var d=typeof a,f=this.Ua,e=0;"number"===d?(d="number"===typeof b,
this.I(a,d?b:a),f&&(e=d?2:1)):"undefined"===d||null===a?(this.I(0,0),f&&(e=null===a?1:0)):(e=1,Array.isArray(a)?this.I(+a[0],+(1<a.length?a[1]:a[0])):(b=a.x,"number"===typeof b&&!isNaN(b)&&isFinite(b)?this.I(a.x||0,a.y||0):(this.I(0,0),e=0)));f&&(this.Ua=e);c&&(this.qa=c);return this}function K(){}function ba(a,b){a.prototype=Object.create(b.prototype);a.prototype.constructor=a;Object.getOwnPropertyNames(b).forEach(function(c){["prototype","name","length"].includes(c)||Function.prototype.hasOwnProperty(c)||
Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});a.prototype.initialize=a}var ma={Oc:function(a,b,c){function d(e){for(var g=Array(e.length),h=0;h<e.length;h++){var l=e[h].X();g[h]=[l.$a(),l.ab(),l.ce(),l.Qd()]}return g}var f=d(a);a=b&&b!==a?d(b):f;return this.zb(f,a,c)},Nc:function(a,b,c,d){function f(g){for(var h=Array(g.length),l=0;l<g.length;l++){var k=g[l];h[l]=[Math.min(k[0],k[2],k[4],k[6]),Math.min(k[1],k[3],k[5],k[7]),Math.max(k[0],k[2],k[4],k[6]),Math.max(k[1],k[3],k[5],
k[7])]}return h}var e=f(a);a=b&&b!==a?f(b):e;if(d){d=this.zb(e,a,c||0,!1,!0);c=this.zb(e,a,c||0,!0,!0);e=[];a=0;for(b=d.length;a<b;a++)e[a]={Zb:d[a],mc:c[a]};return e}return this.zb(e,a,c||0)},zb:function(a,b,c,d,f){function e(W,ca,Y){for(var da=0,R=W.length;da<R;){var S=R+da>>>1;h[W[S]][ca]<Y?da=S+1:R=S}return da-1}var g=!b||a===b,h=g?a:a.concat(b),l=d?1:0,k=l+2,q=d?0:1,m=q+2,r=Array(h.length);for(d=0;d<h.length;d++)r[d]=d;r.sort(function(W,ca){return h[W][l]-h[ca][l]});var n=[];d=Array(a.length);
for(var w=0;w<h.length;w++){var A=r[w],E=h[A],H=g?A:A-a.length,I=A<a.length,P=g||!I,V=I?[]:null;if(n.length){var Q=e(n,k,E[l]-c)+1;n.splice(0,Q);if(g&&f)for(V=V.concat(n),P=0;P<n.length;P++)d[n[P]].push(H);else for(Q=0;Q<n.length;Q++){var L=n[Q],M=h[L],O=L<a.length,N=g||L>=a.length;N=I&&N;O=P&&O;M=E[m]>=M[q]-c&&E[q]<=M[m]+c;if(f||(N||O)&&M)N&&V.push(g?L:L-a.length),O&&d[L].push(H)}}I&&(a===b&&V.push(A),d[A]=V);n.length?(E=e(n,k,E[k]),n.splice(E+1,0,A)):n.push(A)}for(a=0;a<d.length;a++)(b=d[a])&&b.sort(function(W,
ca){return W-ca});return d}},J=new function(){function a(e,g,h){return e<g?g:e>h?h:e}function b(e,g,h){function l(r){var n=134217729*r;n=r-n+n;return[n,r-n]}var k=g*g-e*h;if(3*Math.abs(k)<g*g+e*h){k=l(e);var q=l(g),m=l(h);g*=g;e*=h;k=g-e+(q[0]*q[0]-g+2*q[0]*q[1]+q[1]*q[1]-(k[0]*m[0]-e+k[0]*m[1]+k[1]*m[0]+k[1]*m[1]))}return k}function c(){var e=Math.max.apply(Math,arguments);return e&&(1E-8>e||1E8<e)?Math.pow(2,-Math.round(Math.log(e)*Math.LOG2E)):0}var d=[[.5773502691896257],[0,.7745966692414834],
[.33998104358485626,.8611363115940526],[0,.5384693101056831,.906179845938664],[.2386191860831969,.6612093864662645,.932469514203152],[0,.4058451513773972,.7415311855993945,.9491079123427585],[.1834346424956498,.525532409916329,.7966664774136267,.9602898564975363],[0,.3242534234038089,.6133714327005904,.8360311073266358,.9681602395076261],[.14887433898163122,.4333953941292472,.6794095682990244,.8650633666889845,.9739065285171717],[0,.26954315595234496,.5190961292068118,.7301520055740494,.8870625997680953,
.978228658146057],[.1252334085114689,.3678314989981802,.5873179542866175,.7699026741943047,.9041172563704749,.9815606342467192],[0,.2304583159551348,.44849275103644687,.6423493394403402,.8015780907333099,.9175983992229779,.9841830547185881],[.10805494870734367,.31911236892788974,.5152486363581541,.6872929048116855,.827201315069765,.9284348836635735,.9862838086968123],[0,.20119409399743451,.3941513470775634,.5709721726085388,.7244177313601701,.8482065834104272,.937273392400706,.9879925180204854],[.09501250983763744,
.2816035507792589,.45801677765722737,.6178762444026438,.755404408355003,.8656312023878318,.9445750230732326,.9894009349916499]],f=[[1],[.8888888888888888,.5555555555555556],[.6521451548625461,.34785484513745385],[.5688888888888889,.47862867049936647,.23692688505618908],[.46791393457269104,.3607615730481386,.17132449237917036],[.4179591836734694,.3818300505051189,.27970539148927664,.1294849661688697],[.362683783378362,.31370664587788727,.22238103445337448,.10122853629037626],[.3302393550012598,.31234707704000286,
.26061069640293544,.1806481606948574,.08127438836157441],[.29552422471475287,.26926671930999635,.21908636251598204,.1494513491505806,.06667134430868814],[.2729250867779006,.26280454451024665,.23319376459199048,.18629021092773426,.1255803694649046,.05566856711617366],[.24914704581340277,.2334925365383548,.20316742672306592,.16007832854334622,.10693932599531843,.04717533638651183],[.2325515532308739,.22628318026289723,.2078160475368885,.17814598076194574,.13887351021978725,.09212149983772845,.04048400476531588],
[.2152638534631578,.2051984637212956,.18553839747793782,.15720316715819355,.12151857068790319,.08015808715976021,.03511946033175186],[.2025782419255613,.19843148532711158,.1861610000155622,.16626920581699392,.13957067792615432,.10715922046717194,.07036604748810812,.03075324199611727],[.1894506104550685,.18260341504492358,.16915651939500254,.14959598881657674,.12462897125553388,.09515851168249279,.062253523938647894,.027152459411754096]];return{EPSILON:1E-12,Be:1.12E-16,Ae:1E-8,pa:1E-7,u:function(e){return-1E-12<=
e&&1E-12>=e},le:function(e){return-1.12E-16<=e&&1.12E-16>=e},Kd:a,dd:function(e,g,h,l){var k=d[l-2],q=f[l-2];h=.5*(h-g);g=h+g;var m=l+1>>1,r=0;for(l=l&1?q[r++]*e(g):0;r<m;){var n=h*k[r];l+=q[r++]*(e(g+n)+e(g-n))}return h*l},Od:function(e,g,h,l,k,q,m){for(var r=0;r<q;r++){var n=e(h),w=n/g(h),A=h-w;if(Math.abs(w)<m){h=A;break}0<n?(k=h,h=A<=l?.5*(l+k):A):(l=h,h=A>=k?.5*(l+k):A)}return a(h,l,k)},lc:function(e,g,h,l,k,q){var m=Infinity;if(1E-12>Math.abs(e)){if(1E-12>Math.abs(g))return 1E-12>Math.abs(h)?
-1:0;var r=-h/g}else{g*=-.5;var n=b(e,g,h);if(n&&1.12E-16>Math.abs(n)){var w=c(Math.abs(e),Math.abs(g),Math.abs(h));w&&(e*=w,g*=w,h*=w,n=b(e,g,h))}-1.12E-16<=n&&(r=0>n?0:Math.sqrt(n),m=g+(0>g?-r:r),r=0===m?h/e:m/e,m=0===m?-r:h/m)}e=0;h=null==k;g=k-1E-12;n=q+1E-12;isFinite(r)&&(h||r>g&&r<n)&&(l[e++]=h?r:a(r,k,q));m!==r&&isFinite(m)&&(h||m>g&&m<n)&&(l[e++]=h?m:a(m,k,q));return e},Sa:function(e,g,h,l,k,q,m){function r(Q){I=Q;Q=e*I;E=Q+g;H=E*I+h;w=(Q+E)*I+H;A=H*I+l}var n=c(Math.abs(e),Math.abs(g),Math.abs(h),
Math.abs(l));n&&(e*=n,g*=n,h*=n,l*=n);var w,A;if(1E-12>Math.abs(e)){e=g;var E=h;var H=l;var I=Infinity}else if(1E-12>Math.abs(l))E=g,H=h,I=0;else{r(-(g/e)/3);var P=A/e;n=Math.pow(Math.abs(P),1/3);P=0>P?-1:1;var V=-w/e;n=I-P*(0<V?1.324717957244746*Math.max(n,Math.sqrt(V)):n);if(n!==I){do r(n),n=0===w?I:I-A/w/(1+1.12E-16);while(P*n>P*I);Math.abs(e)*I*I>Math.abs(l/I)&&(H=-l/I,E=(H-h)/I)}}n=J.lc(e,E,H,k,q,m);P=null==q;V=0===n||0<n&&I!==k[0]&&I!==k[1];isFinite(I)&&V&&(P||I>q-1E-12&&I<m+1E-12)&&(k[n++]=
P?I:a(I,q,m));return n}}},va={id:1,kd:{},get:function(a){if(a){var b=this.kd[a];b||(b=this.kd[a]={T:1});return b.T++}return this.id++}};K.Mc=function(a,b,c){if(a){var d=Object.getOwnPropertyDescriptor(a,"length"),f=function(e,g){for(var h in this)this.hasOwnProperty(h)&&e.call(g,this[h],h,this)};(d&&"number"===typeof d.value?Array.prototype.forEach:f).call(a,b,c=c||a)}return c};K.gd=function(a){return(a=null!=a&&a.constructor)&&(a===Object||a===K||"Object"===a.name)};K.Fb=function(a,b){return void 0!==
a?a:b};K.slice=function(a,b,c){return Array.prototype.slice.call(a,b,c)};K.L=function(a,b){if(a===b)return!0;if(a&&a.L)return a.L(b);if(b&&b.L)return b.L(a);if(a&&b&&"object"===typeof a&&"object"===typeof b){if(Array.isArray(a)&&Array.isArray(b)){var c=a.length;if(c!==b.length)return!1;for(;c--;)if(!K.L(a[c],b[c]))return!1}else{c=Object.keys(a);var d=c.length;if(d!==Object.keys(b).length)return!1;for(;d--;){var f=c[d];if(!b.hasOwnProperty(f)||!K.L(a[f],b[f]))return!1}}return!0}return!1};K.read=function(a,
b,c,d){if(this===K)return c=a[a.cb=b||a.cb||0],a.cb++,c;var f=this===y||this===D;b=b||f&&a.cb||0;var e=a[b];d=d||a.length-b;if(e instanceof this||c&&c.nd&&null==e&&1>=d)return f&&(a.cb=b+1),e&&c&&c.clone?e.clone():e;e=Object.create(this.prototype);f&&(e.Ua=!0);e=e.initialize.apply(e,0<b||b+d<a.length?K.slice(a,b,b+d):a)||e;f&&(a.cb=b+e.Ua,e.Ua=void 0);return e};K.fc=function(a,b,c,d){var f=[];b=b||0;for(d=d?b+d:a.length;b<d;b++){var e=a[b];f.push(Array.isArray(e)?this.read(e,0,c):this.read(a,b,c,
1))}return f};K.filter=function(a,b,c,d){function f(q){if(!(c&&q in c||k&&q in k)){var m=b[q];void 0!==m&&(a[q]=m)}}if(d){for(var e={},g=0,h=d.length;g<h;g++){var l=d[g];l in b&&(f(l),e[l]=!0)}var k=e}Object.keys(b).forEach(f);return a};K.me=function(a){return K.gd(a)||Array.isArray(a)||void 0};K.splice=function(a,b,c,d){var f=b&&b.length,e=void 0===c;c=e?a.length:c;c>a.length&&(c=a.length);for(var g=0;g<f;g++)b[g].m=c+g;if(e)return a.push.apply(a,b),[];d=[c,d];b&&d.push.apply(d,b);b=a.splice.apply(a,
d);d=0;for(e=b.length;d<e;d++)b[d].m=void 0;c+=f;for(f=a.length;c<f;c++)a[c].m=c;return b};ba(y,K);y.prototype.set=y;y.prototype.I=function(a,b){this.x=a;this.y=b;this.qa&&this.qa.l(this);return this};y.prototype.Na=function(){return this.x};y.prototype.Oa=function(){return this.y};y.prototype.L=function(a){return this===a||a&&(this.x===a.x&&this.y===a.y||Array.isArray(a)&&this.x===a[0]&&this.y===a[1])};y.prototype.clone=function(){return new y(this.x,this.y)};y.prototype.N=function(){return Math.sqrt(this.x*
this.x+this.y*this.y)};y.prototype.Ab=function(){return 180*this.Pd.apply(this,arguments)/Math.PI};y.prototype.Pd=function(){if(arguments.length){var a=y.read(arguments),b=this.N()*a.N();if(J.u(b))return NaN;a=this.Ja(a)/b;return Math.acos(-1>a?-1:1<a?1:a)}return this.u()?this.Ib||0:this.Ib=Math.atan2(this.y,this.x)};y.prototype.W=function(){var a=y.read(arguments),b=a.x-this.x;a=a.y-this.y;b=b*b+a*a;return K.read(arguments)?b:Math.sqrt(b)};y.prototype.normalize=function(a){void 0===a&&(a=1);var b=
this.N();a=0!==b?a/b:0;b=new y(this.x*a,this.y*a);0<=a&&(b.Ib=this.Ib);return b};y.prototype.rotate=function(a,b){if(0===a)return this.clone();a=a*Math.PI/180;var c=b?this.R(b):this,d=Math.sin(a);a=Math.cos(a);c=new y(c.x*a-c.y*d,c.x*d+c.y*a);return b?c.add(b):c};y.prototype.transform=function(a){return a?a.eb(this):this};y.prototype.add=function(){var a=y.read(arguments);return new y(this.x+a.x,this.y+a.y)};y.prototype.R=function(){var a=y.read(arguments);return new y(this.x-a.x,this.y-a.y)};y.prototype.multiply=
function(){var a=y.read(arguments);return new y(this.x*a.x,this.y*a.y)};y.prototype.ib=function(){var a=y.read(arguments);return new y(this.x/a.x,this.y/a.y)};y.prototype.ec=function(){return new y(-this.x,-this.y)};y.prototype.bc=function(){return D.read(arguments).contains(this)};y.prototype.ea=function(){var a=y.read(arguments),b=K.read(arguments);return this.W(a)<=b};y.prototype.fa=function(){var a=y.read(arguments);return y.fa(this.x,this.y,a.x,a.y)};y.prototype.u=function(){return J.u(this.x)&&
J.u(this.y)};y.prototype.isNaN=function(){return isNaN(this.x)||isNaN(this.y)};y.prototype.Ja=function(){var a=y.read(arguments);return this.x*a.x+this.y*a.y};y.fa=function(a,b,c,d){return Math.abs(a*d-b*c)<=1E-8*Math.sqrt((a*a+b*b)*(c*c+d*d))};ba(D,K);D.prototype.I=function(a,b,c,d){this.x=a;this.y=b;this.width=c;this.height=d;return this};D.prototype.clone=function(){return new D(this.x,this.y,this.width,this.height)};D.prototype.L=function(a){var b=K.me(a)?D.read(arguments):a;return b===this||
b&&this.x===b.x&&this.y===b.y&&this.width===b.width&&this.height===b.height};D.prototype.S=function(){return new y(this.x,this.y,this)};D.prototype.$a=D.prototype.Na=function(){return this.x};D.prototype.ab=D.prototype.Oa=function(){return this.y};D.prototype.ce=function(){return this.x+this.width};D.prototype.Qd=function(){return this.y+this.height};D.prototype.Wb=function(){return this.width};D.prototype.Qb=function(){return this.height};D.prototype.Rd=function(){return this.$a()+this.Wb()/2};D.prototype.Sd=
function(){return this.ab()+this.Qb()/2};D.prototype.Pc=function(){return new y(this.Rd(),this.Sd())};D.prototype.fe=function(){return new y(this.$a(),this.ab())};D.prototype.ba=function(){return this.width*this.height};D.prototype.ia=function(){return 0===this.width||0===this.height};D.prototype.contains=function(a){return a&&void 0!==a.width||4===(Array.isArray(a)?a:arguments).length?this.zd(D.read(arguments)):this.yd(y.read(arguments))};D.prototype.yd=function(a){var b=a.x;a=a.y;return b>=this.x&&
a>=this.y&&b<=this.x+this.width&&a<=this.y+this.height};D.prototype.zd=function(a){var b=a.x,c=a.y;return b>=this.x&&c>=this.y&&b+a.width<=this.x+this.width&&c+a.height<=this.y+this.height};D.prototype.ke=function(){var a=D.read(arguments),b=K.read(arguments)||0;return a.x+a.width>this.x-b&&a.y+a.height>this.y-b&&a.x<this.x+this.width+b&&a.y<this.y+this.height+b};ba(C,K);C.prototype.set=C;C.prototype.I=function(a,b,c,d,f,e,g){this.B=a;this.C=b;this.D=c;this.G=d;this.J=f;this.K=e;g||this.l();return this};
C.prototype.l=function(){this.qa&&(this.qa.Va?this.qa.transform(null,!0):this.qa.l(25))};C.prototype.clone=function(){return new C(this.B,this.C,this.D,this.G,this.J,this.K)};C.prototype.L=function(a){return a===this||a&&this.B===a.B&&this.C===a.C&&this.D===a.D&&this.G===a.G&&this.J===a.J&&this.K===a.K};C.prototype.reset=function(a){this.B=this.G=1;this.C=this.D=this.J=this.K=0;a||this.l();return this};C.prototype.apply=function(a,b){if(!this.qa)return!1;this.qa.transform(null,K.Fb(a,!0),b);return this.isIdentity()};
C.prototype.translate=function(){var a=y.read(arguments);this.J+=a.x*this.B+a.y*this.D;this.K+=a.x*this.C+a.y*this.G;this.l();return this};C.prototype.scale=function(){var a=y.read(arguments),b=y.read(arguments,0,{nd:!0});b&&this.translate(b);this.B*=a.x;this.C*=a.x;this.D*=a.y;this.G*=a.y;b&&this.translate(b.ec());this.l();return this};C.prototype.rotate=function(a){a*=Math.PI/180;var b=y.read(arguments,1),c=Math.cos(a),d=Math.sin(a),f=b.x-b.x*c+b.y*d;b=b.y-b.x*d-b.y*c;var e=this.B,g=this.C,h=this.D,
l=this.G;this.B=c*e+d*h;this.C=c*g+d*l;this.D=-d*e+c*h;this.G=-d*g+c*l;this.J+=f*e+b*h;this.K+=f*g+b*l;this.l();return this};C.prototype.append=function(a,b){if(a){var c=this.B,d=this.C,f=this.D,e=this.G,g=a.B,h=a.D,l=a.C,k=a.G,q=a.J;a=a.K;this.B=g*c+l*f;this.D=h*c+k*f;this.C=g*d+l*e;this.G=h*d+k*e;this.J+=q*c+a*f;this.K+=q*d+a*e;b||this.l()}return this};C.prototype.prepend=function(a,b){if(a){var c=this.B,d=this.C,f=this.D,e=this.G,g=a.B,h=a.D,l=a.C,k=a.G,q=this.J,m=this.K,r=a.J;a=a.K;this.B=g*c+
h*d;this.D=g*f+h*e;this.C=l*c+k*d;this.G=l*f+k*e;this.J=g*q+h*m+r;this.K=l*q+k*m+a;b||this.l()}return this};C.prototype.Jd=function(a){return this.clone().append(a)};C.prototype.sb=function(){return this.isIdentity()?null:this};C.prototype.isIdentity=function(){return 1===this.B&&0===this.C&&0===this.D&&1===this.G&&0===this.J&&0===this.K};C.prototype.cc=function(){var a=this.B*this.G-this.D*this.C;return a&&!isNaN(a)&&isFinite(this.J)&&isFinite(this.K)};C.prototype.transform=function(a,b,c){return 3>
arguments.length?this.eb(y.read(arguments)):this.ma(a,b,c)};C.prototype.eb=function(a,b,c){b||(b=new y);return b.I(a.x*this.B+a.y*this.D+this.J,a.x*this.C+a.y*this.G+this.K,c)};C.prototype.ma=function(a,b,c){var d=0;for(c*=2;d<c;d+=2){var f=a[d],e=a[d+1];b[d]=f*this.B+e*this.D+this.J;b[d+1]=f*this.C+e*this.G+this.K}return b};C.prototype.Gd=function(a){var b=a.x,c=a.y,d=b+a.width;a=c+a.height;b=[b,c,d,c,d,a,b,a];return this.ma(b,b,4)};C.prototype.Fd=function(a,b){a=this.Gd(a);for(var c=a.slice(0,2),
d=c.slice(),f=2;8>f;f++){var e=a[f],g=f&1;e<c[g]?c[g]=e:e>d[g]&&(d[g]=e)}b||(b=new D);b.I(c[0],c[1],d[0]-c[0],d[1]-c[1],void 0)};C.prototype.Ed=function(a){var b,c=this.B,d=this.C,f=this.D,e=this.G,g=this.J,h=this.K,l=c*e-d*f,k=null;l&&!isNaN(l)&&isFinite(g)&&isFinite(h)&&(g=a.x-this.J,a=a.y-this.K,b||(b=new y),k=b.I((g*e-a*f)/l,(a*c-g*d)/l,void 0));return k};C.prototype.Md=function(){var a=this.B,b=this.C,c=this.D,d=this.G,f=a*d-b*c,e=180/Math.PI;if(0!==a||0!==b){var g=Math.sqrt(a*a+b*b);var h=Math.acos(a/
g)*(0<b?1:-1);f=[g,f/g];a=[Math.atan2(a*c+b*d,g*g),0]}else 0!==c||0!==d?(g=Math.sqrt(c*c+d*d),h=Math.asin(c/g)*(0<d?1:-1),f=[f/g,g],a=[0,Math.atan2(a*c+b*d,g*g)]):(h=0,a=f=[0,0]);return{Ne:this.ge(),rotation:h*e,Ke:new y(f),we:new y(a[0]*e,a[1]*e)}};C.prototype.o=function(){return[this.B,this.C,this.D,this.G,this.J,this.K]};C.prototype.ge=function(){return new y(this.J,this.K)};ba(z,K);z.prototype.S=function(){return new y(this.Xa,this.Ya)};z.prototype.he=function(){return new y(this.ra,this.sa)};
z.prototype.N=function(){return this.he().N()};z.prototype.ha=function(a,b){return z.ha(this.Xa,this.Ya,this.ra,this.sa,a.Xa,a.Ya,a.ra,a.sa,!0,b)};z.prototype.W=function(a){return Math.abs(this.na(a))};z.prototype.na=function(a){return z.na(this.Xa,this.Ya,this.ra,this.sa,a.x,a.y,!0)};z.prototype.fa=function(a){return y.fa(this.ra,this.sa,a.ra,a.sa)};z.ha=function(a,b,c,d,f,e,g,h,l,k){l||(c-=a,d-=b,g-=f,h-=e);l=c*h-d*g;if(!J.le(l)&&(f=a-f,e=b-e,g=(g*e-h*f)/l,h=(c*e-d*f)/l,l=-J.EPSILON,e=1+J.EPSILON,
k||l<g&&g<e&&l<h&&h<e))return k||(g=0>=g?0:1<=g?1:g),new y(a+g*c,b+g*d)};z.na=function(a,b,c,d,f,e,g){g||(c-=a,d-=b);return 0===c?0<d?f-a:a-f:0===d?0>c?e-b:b-e:((f-a)*d-(e-b)*c)/(d>c?d*Math.sqrt(1+c*c/(d*d)):c*Math.sqrt(1+d*d/(c*c)))};z.W=function(a,b,c,d,f,e,g){return Math.abs(z.na(a,b,c,d,f,e,g))};ba(v,K);v.prototype.Va=!0;v.prototype.qb=!0;v.prototype.Ba=null;v.prototype.wc=function(a){var b=a&&K.gd(a);a=b&&!0===a.Eb;var c=this.aa=new C;this.T=a?null:va.get();this.Aa=this.m=null;this.Va=this.qb&&
!0;c.qa=this;return b};v.prototype.l=function(a){a&8&&(this.Z=this.Ca=void 0);this.Aa&&a&72&&v.Kb(this.Aa);a&2&&v.Kb(this)};v.prototype.Ub=function(){var a=this.Ca||(this.Ca=this.uc());return new y(a.x,a.y,this)};v.prototype.setPosition=function(){this.translate(y.read(arguments).R(this.Ub(!0)))};v.prototype.uc=function(a){return this.Ba?this.aa.eb(this.Ba):(a||this.X()).Pc()};v.prototype.ve=function(){this.Ba=y.read(arguments,0,{clone:!0,nd:!0});this.Ca=void 0};v.prototype.X=function(a){var b=Object.assign({},
a);b.Gc=this;b=this.sc(!1,b).rect;return arguments.length?b:new D(b.x,b.y,b.width,b.height)};v.prototype.rb=function(a,b){if(!this.g||!this.g.length)return new D;v.Dc(this,b.Gc);return v.rb(this.g,a,b)};v.prototype.Cd=function(a,b){return[a.stroke?1:0,a.handle?1:0,b?1:0].join("")};v.prototype.sc=function(a,b,c){a=a&&a.sb();c=b.Eb&&!c;var d=b.Gc,f=c?null:this.aa.sb(),e=d&&(!a||a.L(f))&&this.Cd(b,c);v.Dc(this.Aa,d);if(e&&this.Z&&e in this.Z)return c=this.Z[e],{rect:c.rect.clone(),Ra:c.Ra};b=this.rb(a||
f,b);a=b.rect||b;b=b.Ra;e&&(this.Z||(this.Z={}),this.Z[e]={rect:a.clone(),Ra:b,Eb:c});return{rect:a,Ra:b}};v.prototype.ue=function(a){(this.Va=this.qb&&!!a)&&this.transform(null,!0)};v.prototype.tc=v.prototype.getParent=function(){return this.Aa};v.prototype.Qc=function(){return this.g};v.prototype.rd=function(a){this.hc();this.gb(a)};v.prototype.Wd=function(){return this.g&&this.g[0]||null};v.prototype.Uc=function(){return this.g&&this.g[this.g.length-1]||null};v.prototype.ua=function(){return this.m};
v.prototype.L=function(a){return a===this||a&&this.aa.L(a.aa)&&this.rc(a)};v.prototype.rc=function(a){return K.L(this.g,a.g)};v.prototype.clone=function(a){var b=new this.constructor({da:!1});this.g&&b.Za(this);var c=K.Fb(a?a.Ee:void 0,!0);this.g&&!c||b.Kc(this);this.g||b.Za(this);K.Fb(a?a.da:void 0,void 0===a||!0===a)&&b.$b(this);return b};v.prototype.Kc=function(a){for(var b=0,c=a.g&&a.g.length;b<c;b++)this.Fc(a.g[b].clone(!1))};v.prototype.Za=function(a,b){b||this.aa.set(a.aa,!0);this.ue(a.Va);
this.ve(a.Ba);this.Ad=(a=a.Ad)?Object.assign(new a.constructor,a):null};v.prototype.contains=function(){return this.aa.cc()&&!!this.pc(this.aa.Ed(y.read(arguments)))};v.prototype.pc=function(a){if(this.g){for(var b=this.g.length-1;0<=b;b--)if(this.g[b].contains(a))return!0;return!1}return a.bc(this.Fe())};v.prototype.bc=function(){return D.read(arguments).contains(this.X())};v.prototype.Fc=function(a){this.je(a)};v.prototype.je=function(a){a&&this.ob(void 0,[a])};v.prototype.gb=function(a){this.ob(this.g.length,
a)};v.prototype.ob=function(a,b){if(this.g&&b&&0<b.length){b=K.slice(b);for(var c={},d=b.length-1;0<=d;d--){var f=b[d],e=f&&f.T;!f||c[e]?b.splice(d,1):(f.tb(!0),c[e]=!0)}K.splice(this.g,b,a,0);a=0;for(c=b.length;a<c;a++)b[a].Aa=this;this.l(11)}else b=null;return b};v.prototype.xc=function(a,b){var c=a&&a.tc(),d=a!==this&&c?this:null;d&&(d.tb(!0),c.Dd(a.m+b,d));return d};v.prototype.Dd=function(a,b){b&&this.ob(a,[b])};v.prototype.$b=function(a){this.xc(a,1)};v.prototype.ie=function(a){return this.xc(a,
0)};v.prototype.reduce=function(a){return this.g&&1===this.g.length?(a=this.g[0].reduce(a),this.Aa?(a.$b(this),this.remove()):a.remove(),a):this};v.prototype.tb=function(a){var b=this.tc();return b?(null!=this.m&&K.splice(b.g,null,this.m,1),a&&b.l(11),this.Aa=null,!0):!1};v.prototype.remove=function(){return this.tb(!0)};v.prototype.replaceWith=function(a){(a=a&&a.ie(this))&&this.remove();return a};v.prototype.clear=v.prototype.hc=function(a,b){if(!this.g)return null;a=a||0;b=K.Fb(b,this.g.length);
a=K.splice(this.g,null,a,b-a);for(b=a.length-1;0<=b;b--)a[b].tb(!1);0<a.length&&this.l(11);return a};v.prototype.ia=function(a){var b=this.g?this.g.length:0;if(a){for(var c=0;c<b;c++)if(!this.g[c].ia(a))return!1;return!0}return!b};v.prototype.translate=function(){var a=new C;return this.transform(a.translate.apply(a,arguments))};v.prototype.transform=function(a,b,c){var d=this.aa,f=a&&!a.isIdentity(),e=c&&this.qb||this.Va&&(f||!d.isIdentity()||b&&this.g);if(!f&&!e)return this;f&&(!a.cc()&&d.cc()&&
(d.Ce=d.o()),d.prepend(a,!0));e&&(e=this.Cc(d,b,c))&&(this.Ba&&d.eb(this.Ba,this.Ba,!0),d.reset(!0),c&&this.qb&&(this.Va=!0));b=this.Z;c=this.Ca;(f||e)&&this.l(25);if((d=f&&b&&a.Md())&&d.we.u()&&0===d.rotation%90){for(var g in b)f=b[g],f.Ra?delete b[g]:(e||!f.Eb)&&a.Fd(f.rect,f.rect);this.Z=b;if(a=b["000"])this.Ca=this.uc(a.rect)}else f&&c&&this.Ba&&(this.Ca=a.eb(c,c));return this};v.prototype.Cc=function(a,b,c){var d=this.g;if(d){for(var f=0,e=d.length;f<e;f++)d[f].transform(a,b,c);return!0}};v.Dc=
function(a,b){if(a&&b){var c=b.T;a=a.pb=a.pb||{cd:{},list:[]};a.cd[c]||(a.list.push(b),a.cd[c]=b)}};v.Kb=function(a){var b=a.pb;if(b){a.Z=a.Ca=a.pb=void 0;var c=0;b=b.list;for(var d=b.length;c<d;c++){var f=b[c];f!==a&&(f.Z=f.Ca=void 0,f.pb&&v.Kb(f))}}};v.rb=function(a,b,c){var d=Infinity,f=-d,e=d,g=f,h=!1;c=c||{};for(var l=0,k=a.length;l<k;l++){var q=a[l];q.ia(!0)||(q=q.sc(b&&b.Jd(q.aa),c,!0),d=Math.min(q.rect.x,d),e=Math.min(q.rect.y,e),f=Math.max(q.rect.x+q.rect.width,f),g=Math.max(q.rect.y+q.rect.height,
g),q.Ra&&(h=!0))}return{rect:isFinite(d)?new D(d,e,f-d,g-e):new D,Ra:h}};ba(G,K);G.prototype.l=function(a){if(this.h){var b=this.h.O,c=this.m,d;b&&(a&&a!==this.j&&a!==this.A||!(d=0<c?b[c-1]:this.h.F?b[b.length-1]:null)||d.l(),a&&a!==this.j&&a!==this.H||!(d=b[c])||d.l());this.h.l(41)}};G.prototype.S=function(){return this.j};G.prototype.Yd=function(){return this.A};G.prototype.Gb=function(){this.A.set(y.read(arguments))};G.prototype.Zd=function(){return this.H};G.prototype.jc=function(){var a=y.read(arguments);
this.H.set(a)};G.prototype.Pa=function(){return!this.A.u()||!this.H.u()};G.prototype.wb=function(){this.A.I(0,0);this.H.I(0,0)};G.prototype.ua=function(){return void 0!==this.m?this.m:null};G.prototype.La=function(){return this.h||null};G.prototype.P=function(){var a=this.h,b=this.m;return a?(0<b&&!a.F&&b===a.i.length-1&&b--,a.V()[b]||null):null};G.prototype.ca=function(){var a=this.h&&this.h.i;return a&&(a[this.m+1]||this.h.F&&a[0])||null};G.prototype.Da=function(){var a=this.h&&this.h.i;return a&&
(a[this.m-1]||this.h.F&&a[a.length-1])||null};G.prototype.ac=function(){return!this.m};G.prototype.dc=function(){return this.h&&this.m===this.h.i.length-1||!1};G.prototype.reverse=function(){var a=this.A,b=this.H,c=a.clone();a.set(b);b.set(c)};G.prototype.remove=function(){return this.h?!!this.h.od(this.m):!1};G.prototype.clone=function(){return new G(this.j,this.A,this.H)};G.prototype.L=function(a){return a===this||a&&this.j.L(a.j)&&this.A.L(a.A)&&this.H.L(a.H)||!1};G.prototype.transform=function(a){this.ma(a,
Array(6),!0);this.l()};G.prototype.ma=function(a,b,c){var d=c&&this.A.u()?null:this.A,f=c&&this.H.u()?null:this.H,e=this.j.Na(),g=this.j.Oa(),h=2;b[0]=e;b[1]=g;d&&(b[h++]=d.Na()+e,b[h++]=d.Oa()+g);f&&(b[h++]=f.Na()+e,b[h++]=f.Oa()+g);a&&(a.ma(b,b,h/2),e=b[0],g=b[1],c?(this.j.x=e,this.j.y=g,h=2,d&&(d.x=b[h++]-e,d.y=b[h++]-g),f&&(f.x=b[h++]-e,f.y=b[h++]-g)):(d||(b[h++]=e,b[h++]=g),f||(b[h++]=e,b[h++]=g)));return b};ba(p,K);p.prototype.l=function(){this.Fa=this.Z=void 0};p.prototype.clone=function(){return new p(this.s,
this.M)};p.prototype.vb=function(){return p.vb(this.o())};p.prototype.remove=function(){var a=!1;if(this.h){a=this.M;var b=a.H;(a=a.remove())&&this.s.H.set(b)}return a};p.prototype.La=function(){return this.h};p.prototype.ua=function(){return this.s.m};p.prototype.ca=function(){var a=this.h&&this.h.O;return a&&(a[this.s.m+1]||this.h.F&&a[0])||null};p.prototype.Da=function(){var a=this.h&&this.h.O;return a&&(a[this.s.m-1]||this.h.F&&a[a.length-1])||null};p.prototype.ac=function(){return!this.s.m};
p.prototype.dc=function(){var a=this.h;return a&&this.s.m===a.O.length-1||!1};p.prototype.o=function(a){return p.o(this.s,this.M,a)};p.prototype.N=function(){null==this.Fa&&(this.Fa=p.N(this.o(),0,1));return this.Fa};p.prototype.ba=function(){return p.ba(this.o())};p.prototype.Cb=function(){return new z(this.s.j,this.M.j)};p.prototype.lb=function(a,b){return new p(p.lb(this.o(),a,b))};p.prototype.Sb=function(a,b){return p.N(this.o(),a,b)};p.prototype.Nb=function(a,b){var c=null;if(1E-8<=a&&.99999999>=
a){c=p.ya(this.o(),a);a=c[0];c=c[1];var d=b||this.Pa();b=this.s;var f=this.M,e=this.h;d&&(b.H.I(a[2]-a[0],a[3]-a[1]),f.A.I(c[4]-c[6],c[5]-c[7]));var g=a[6],h=a[7];a=new G(new y(g,h),d&&new y(a[4]-g,a[5]-h),d&&new y(c[2]-g,c[3]-h));e?(e.da(b.m+1,a),c=this.ca()):(this.M=a,this.l(),c=new p(a,f))}return c};p.prototype.ib=function(a,b){return this.Nb(void 0===a?.5:b?a:this.Ma(a))};p.prototype.wb=function(){this.s.H.I(0,0);this.M.A.I(0,0)};p.prototype.Pa=function(){return!this.s.H.u()||!this.M.A.u()};p.prototype.bd=
function(a){return(!this.s.j.L(this.M.j)||this.Pa())&&this.N()>(a||0)};p.prototype.fa=function(a){return a&&this.ja()&&a.ja()&&this.Cb().fa(a.Cb())};p.prototype.ja=function(){a:{var a=this.s.j,b=this.s.H;var c=this.M.A;var d=this.M.j;if(b.u()&&c.u())c=!0;else{var f=d.R(a);if(!f.u()&&f.fa(b)&&f.fa(c)){var e=new z(a,d);if(1E-7>e.W(a.add(b))&&1E-7>e.W(d.add(c))){a=f.Ja(f);b=f.Ja(b)/a;c=f.Ja(c)/a;c=0<=b&&1>=b&&0>=c&&-1<=c;break a}}c=!1}}return c};p.prototype.Db=function(a){return this.ae(this.Ma(a))};
p.prototype.ae=function(a){return null!=a&&0<=a&&1>=a?new F(this,a):null};p.prototype.Ma=function(a,b){return p.Ma(this.o(),a,b)};p.prototype.va=function(){return p.va(this.o(),y.read(arguments))};p.prototype.mb=function(a){var b=this.o();return p.S(b,p.Ma(b,a))};p.prototype.Yc=function(a){return p.S(this.o(),a)};p.prototype.$c=function(a,b){var c=this.o();return p.Ea(c,b?a:p.Ma(c,a))};p.prototype.Vb=function(a){return p.Ea(this.o(),a)};p.prototype.kb=function(a){var b=this.o(),c=a&&a!==this&&a.o();
return c?p.Sc(b,c,this,a,[]):p.Zc(b,this,[])};p.o=function(a,b,c,d){var f=a.j;a=a.H;var e=b.A,g=b.j;b=f.x;f=f.y;var h=g.x;g=g.y;d=d?[b,f,b,f,h,g,h,g]:[b,f,b+a.Na(),f+a.Oa(),h+e.Na(),g+e.Oa(),h,g];c&&c.ma(d,d,4);return d};p.ya=function(a,b){void 0===b&&(b=.5);var c=a[0],d=a[1],f=a[2],e=a[3],g=a[4],h=a[5],l=a[6];a=a[7];var k=1-b,q=k*c+b*f,m=k*d+b*e,r=k*f+b*g,n=k*e+b*h;g=k*g+b*l;h=k*h+b*a;e=k*q+b*r;f=k*m+b*n;r=k*r+b*g;n=k*n+b*h;var w=k*e+b*r;b=k*f+b*n;return[[c,d,q,m,e,f,w,b],[w,b,r,n,g,h,l,a]]};p.Wc=
function(a,b){var c=[];b=b?0:1;var d=a[b+0],f=a[b+2],e=a[b+4],g=a[b+6];d>=f===f>=e&&f>=e===e>=g||p.ja(a)?c.push(a):(b=[],(d=J.lc(3*(f-e)-d+g,2*(d+e)-4*f,f-d,b,1E-8,.99999999))?(b.sort(),f=b[0],a=p.ya(a,f),c.push(a[0]),1<d&&(f=(b[1]-f)/(1-f),a=p.ya(a[1],f),c.push(a[0])),c.push(a[1])):c.push(a));return c};p.Sa=function(a,b,c,d,f,e){var g=a[b],h=a[b+2],l=a[b+4];a=a[b+6];b=0;g<c&&a<c&&h<c&&l<c||g>c&&a>c&&h>c&&l>c||(b=3*(h-g),h=3*(l-h)-b,b=J.Sa(a-g-b-h,h,b,g-c,d,f,e));return b};p.va=function(a,b){var c=
new y(a[0],a[1]),d=new y(a[6],a[7]);if(null===(b.ea(c,J.EPSILON)?0:b.ea(d,J.EPSILON)?1:null))for(var f=[b.x,b.y],e=[],g=0;2>g;g++)for(var h=p.Sa(a,g,f[g],e,0,1),l=0;l<h;l++){var k=e[l];if(b.ea(p.S(a,k),J.pa))return k}return b.ea(c,J.pa)?0:b.ea(d,J.pa)?1:null};p.lb=function(a,b,c){var d=b>c;if(d){var f=b;b=c;c=f}0<b&&(a=p.ya(a,b)[1]);1>c&&(a=p.ya(a,(c-b)/(1-b))[0]);return d?[a[6],a[7],a[4],a[5],a[2],a[3],a[0],a[1]]:a};p.ba=function(a){var b=a[0],c=a[1],d=a[2],f=a[3],e=a[4],g=a[5],h=a[6];a=a[7];return 3*
((a-c)*(d+e)-(h-b)*(f+g)+f*(b-e)-d*(c-g)+a*(e+b/3)-h*(g+c/3))/20};p.X=function(a){for(var b=a.slice(0,2),c=b.slice(),d=[0,0],f=0;2>f;f++)p.nc(a[f],a[f+2],a[f+4],a[f+6],f,b,c,d);return new D(b[0],b[1],c[0]-b[0],c[1]-b[1])};p.nc=function(a,b,c,d,f,e,g,h){function l(w,A){var E=w-A;w+=A;E<e[f]&&(e[f]=E);w>g[f]&&(g[f]=w)}var k=0;var q=e[f]+k,m=g[f]-k;if(a<q||b<q||c<q||d<q||a>m||b>m||c>m||d>m)if(b<a!=b<d&&c<a!=c<d)l(a,0),l(d,0);else for(q=J.lc(3*(b-c)-a+d,2*(a+c)-4*b,b-a,h),l(d,0),m=0;m<q;m++){var r=h[m],
n=1-r;1E-8<=r&&.99999999>=r&&l(n*n*n*a+3*n*n*r*b+3*n*r*r*c+r*r*r*d,k)}};p.ja=function(a){var b=a[0],c=a[1],d=a[6],f=a[7];a:{var e=new y(b,c);b=new y(a[2]-b,a[3]-c);a=new y(a[4]-d,a[5]-f);f=new y(d,f);if(b.u()&&a.u())e=!0;else{d=f.R(e);if(!d.u()&&d.fa(b)&&d.fa(a)&&(c=new z(e,f),c.W(e.add(b))<J.pa&&c.W(f.add(a))<J.pa)){e=d.Ja(d);b=d.Ja(b)/e;e=d.Ja(a)/e;e=0<=b&&1>=b&&0>=e&&-1<=e;break a}e=!1}}return e};p.Vc=function(a){var b=a[0],c=a[1],d=a[2],f=a[3],e=a[4],g=a[5],h=9*(d-e)+3*(a[6]-b),l=6*(b+e)-12*d,
k=3*(d-b),q=9*(f-g)+3*(a[7]-c),m=6*(c+g)-12*f,r=3*(f-c);return function(n){var w=(h*n+l)*n+k;n=(q*n+m)*n+r;return Math.sqrt(w*w+n*n)}};p.Tc=function(a,b){return Math.max(2,Math.min(16,Math.ceil(32*Math.abs(b-a))))};p.evaluate=function(a,b,c,d){if(null==b||0>b||1<b)return null;var f=a[0],e=a[1],g=a[2],h=a[3],l=a[4],k=a[5],q=a[6],m=a[7];J.u(g-f)&&J.u(h-e)&&(g=f,h=e);J.u(l-q)&&J.u(k-m)&&(l=q,k=m);var r=3*(g-f);a=3*(l-g)-r;var n=q-f-r-a,w=3*(h-e),A=3*(k-h)-w,E=m-e-w-A;0===c?(f=0===b?f:1===b?q:((n*b+a)*
b+r)*b+f,e=0===b?e:1===b?m:((E*b+A)*b+w)*b+e):(1E-8>b?(f=r,e=w):.99999999<b?(f=3*(q-l),e=3*(m-k)):(f=(3*n*b+2*a)*b+r,e=(3*E*b+2*A)*b+w),d&&(0===f&&0===e&&(1E-8>b||.99999999<b)&&(f=l-g,e=k-h),d=Math.sqrt(f*f+e*e))&&(f/=d,e/=d),3===c&&(d=Math.pow(f*f+e*e,1.5),f=0!==d?(f*(6*E*b+2*A)-e*(6*n*b+2*a))/d:0,e=0));return 2===c?new y(e,-f):new y(f,e)};p.vb=function(a){function b(q,m,r){var n=void 0!==m,w=n&&0<m&&1>m,A=n&&0<r&&1>r;!n||(w||A)&&(1!==q||w&&A)||(q=2,w=A=!1);return{type:q,qd:w||A?w&&A?m<r?[m,r]:[r,
m]:[w?m:r]:null}}var c=a[0],d=a[1],f=a[2],e=a[3],g=a[4],h=a[5],l=a[6];a=a[7];var k=f*(d-a)+e*(l-c)+c*a-d*l;e=3*(g*(e-d)+h*(c-f)+f*d-e*c);f=e-k;c=f-k+(c*(a-h)+d*(g-l)+l*h-a*g);d=Math.sqrt(c*c+f*f+e*e);d=0!==d?1/d:0;c*=d;f*=d;e*=d;if(J.u(c))return J.u(f)?b(J.u(e)?3:4):b(0,e/(3*f));d=3*f*f-4*c*e;if(J.u(d))return b(5,f/(2*c));g=0<d?Math.sqrt(d/3):Math.sqrt(-d);c*=2;return b(0<d?0:1,(f+g)/c,(f-g)/c)};p.N=function(a,b,c,d){void 0===b&&(b=0);void 0===c&&(c=1);return p.ja(a)?(1>c&&(a=p.ya(a,c)[0],b/=c),0<
b&&(a=p.ya(a,b)[1]),b=a[6]-a[0],c=a[7]-a[1],Math.sqrt(b*b+c*c)):J.dd(d||p.Vc(a),b,c,p.Tc(b,c))};p.Ma=function(a,b,c){void 0===c&&(c=0>b?1:0);if(0===b)return c;var d=0<b,f=d?c:0,e=d?1:c,g=p.Vc(a);a=p.N(a,f,e,g);var h=Math.abs(b)-a;if(Math.abs(h)<J.EPSILON)return d?e:f;if(h>J.EPSILON)return null;var l=0;return J.Od(function(k){l+=J.dd(g,c,k,p.Tc(c,k));c=k;return l-b},g,c+b/a,f,e,32,J.EPSILON)};p.S=function(a,b){return p.evaluate(a,b,0,!1)};p.Ea=function(a,b){return p.evaluate(a,b,1,!0)};p.be=function(a){var b=
a[0],c=a[1],d=a[2],f=a[3],e=a[4],g=a[5],h=-b+3*d-3*e+a[6];e=3*b-6*d+3*e;b=-3*b+3*d;a=-c+3*f-3*g+a[7];g=3*c-6*f+3*g;c=-3*c+3*f;f=[];J.Sa(9*(h*h+a*a),9*(h*e+g*a),2*(e*e+g*g)+3*(b*h+c*a),b*e+g*c,f,1E-8,.99999999);return f.sort()};p.Ia=function(a,b,c,d,f,e,g){var h=!g&&c.Da()===f,l=!g&&c!==f&&c.ca()===f;null!==d&&d>=(h?1E-8:0)&&d<=(l?.99999999:1)&&null!==e&&e>=(l?1E-8:0)&&e<=(h?.99999999:1)&&(c=new F(c,d,null,g),f=new F(f,e,null,g),c.v=f,f.v=c,b&&!b(c)||F.da(a,c,!0))};p.Ha=function(a,b,c,d,f,e,g,h,l,
k,q,m,r){if(4096<=++l||40<=++h)return l;var n=b[0],w=b[1],A=b[6],E=b[7],H=z.na(n,w,A,E,b[2],b[3]),I=z.na(n,w,A,E,b[4],b[5]),P=0<H*I?.75:4/9,V=P*Math.min(0,H,I);P*=Math.max(0,H,I);var Q=z.na(n,w,A,E,a[0],a[1]),L=z.na(n,w,A,E,a[2],a[3]),M=z.na(n,w,A,E,a[4],a[5]);n=z.na(n,w,A,E,a[6],a[7]);A=p.Td(Q,L,M,n);w=A[0];A=A[1];var O,N;if(0===H&&0===I&&0===Q&&0===L&&0===M&&0===n||null==(O=p.Ic(w,A,V,P))||null==(N=p.Ic(w.reverse(),A.reverse(),V,P)))return l;H=k+(q-k)*O;k+=(q-k)*N;1E-9>Math.max(r-m,k-H)?(h=(H+k)/
2,m=(m+r)/2,p.Ia(f,e,g?d:c,g?m:h,g?c:d,g?h:m)):(a=p.lb(a,O,N),q=r-m,.8<N-O?k-H>q?(a=p.ya(a,.5),O=(H+k)/2,l=p.Ha(b,a[0],d,c,f,e,!g,h,l,m,r,H,O),l=p.Ha(b,a[1],d,c,f,e,!g,h,l,m,r,O,k)):(b=p.ya(b,.5),O=(m+r)/2,l=p.Ha(b[0],a,d,c,f,e,!g,h,l,m,O,H,k),l=p.Ha(b[1],a,d,c,f,e,!g,h,l,O,r,H,k)):l=0===q||1E-9<=q?p.Ha(b,a,d,c,f,e,!g,h,l,m,r,H,k):p.Ha(a,b,c,d,f,e,g,h,l,H,k,m,r));return l};p.Td=function(a,b,c,d){var f=[0,a],e=[1/3,b],g=[2/3,c],h=[1,d];b-=(2*a+d)/3;a=c-(a+2*d)/3;0>b*a?f=[[f,e,h],[f,g,h]]:(c=b/a,f=
[2<=c?[f,e,h]:.5>=c?[f,g,h]:[f,e,g,h],[f,h]]);return 0>(b||a)?f.reverse():f};p.Ic=function(a,b,c,d){return a[0][1]<c?p.Jc(a,!0,c):b[0][1]>d?p.Jc(b,!1,d):a[0][0]};p.Jc=function(a,b,c){for(var d=a[0][0],f=a[0][1],e=1,g=a.length;e<g;e++){var h=a[e][0],l=a[e][1];if(b?l>=c:l<=c)return l===c?h:d+(c-f)*(h-d)/(l-f);d=h;f=l}return null};p.Ud=function(a,b,c,d,f){if(J.u(d)&&J.u(f))return a=p.va(a,new y(b,c)),null===a?[]:[a];f=Math.atan2(-f,d);d=Math.sin(f);f=Math.cos(f);for(var e=[],g=[],h=0;8>h;h+=2){var l=
a[h]-b,k=a[h+1]-c;e.push(l*f-k*d,l*d+k*f)}p.Sa(e,1,0,g,0,1);return g};p.Hd=function(a,b,c,d,f,e,g){var h=b[0],l=b[1];h=p.Ud(a,h,l,b[6]-h,b[7]-l);l=0;for(var k=h.length;l<k;l++){var q=h[l],m=p.S(a,q);m=p.va(b,m);null!==m&&(g?p.Ia(f,e,d,m,c,q):p.Ia(f,e,c,q,d,m))}};p.Id=function(a,b,c,d,f,e){var g=z.ha(a[0],a[1],a[6],a[7],b[0],b[1],b[6],b[7]);g&&p.Ia(f,e,c,p.va(a,g),d,p.va(b,g))};p.Sc=function(a,b,c,d,f,e){if(Math.max(a[0],a[2],a[4],a[6])+J.EPSILON>Math.min(b[0],b[2],b[4],b[6])&&Math.min(a[0],a[2],a[4],
a[6])-J.EPSILON<Math.max(b[0],b[2],b[4],b[6])&&Math.max(a[1],a[3],a[5],a[7])+J.EPSILON>Math.min(b[1],b[3],b[5],b[7])&&Math.min(a[1],a[3],a[5],a[7])-J.EPSILON<Math.max(b[1],b[3],b[5],b[7])){var g=p.Rb(a,b);if(g)for(a=0;2>a;a++)b=g[a],p.Ia(f,e,c,b[0],d,b[1],!0);else{var h=p.ja(a),l=p.ja(b);g=h&&l;var k=h&&!l,q=f.length;h=g?p.Id:h||l?p.Hd:p.Ha;k?h(b,a,d,c,f,e,k,0,0,0,1,0,1):h(a,b,c,d,f,e,k,0,0,0,1,0,1);if(!g||f.length===q)for(g=0;4>g;g++)k=g>>1,q=g&1,l=6*k,h=6*q,l=new y(a[l],a[l+1]),h=new y(b[h],b[h+
1]),l.ea(h,J.EPSILON)&&p.Ia(f,e,c,k,d,q)}}return f};p.Zc=function(a,b,c,d){a=p.vb(a);1===a.type&&(a=a.qd,p.Ia(c,d,b,a[0],b,a[1]));return c};p.kb=function(a,b,c,d,f,e){var g=!b;g&&(b=a);for(var h=Array(a.length),l=g?h:Array(b.length),k=[],q=0;q<a.length;q++)h[q]=a[q].o(d);if(!g)for(d=0;d<b.length;d++)l[d]=b[d].o(f);f=ma.Nc(h,l,1E-7);for(d=0;d<a.length;d++){q=a[d];var m=h[d];g&&p.Zc(m,q,k,c);var r=f[d];if(r)for(var n=0;n<r.length;n++){if(e&&k.length)return k;var w=r[n];(!g||w>d)&&p.Sc(m,l[w],q,b[w],
k,c)}}return k};p.Rb=function(a,b){function c(r){var n=r[6]-r[0];r=r[7]-r[1];return n*n+r*r}var d=p.ja(a),f=p.ja(b),e=d&&f,g=c(a)<c(b),h=g?b:a;g=g?a:b;var l=h[0],k=h[1],q=h[6]-l,m=h[7]-k;if(1E-7>z.W(l,k,q,m,g[0],g[1],!0)&&1E-7>z.W(l,k,q,m,g[6],g[7],!0))!e&&1E-7>z.W(l,k,q,m,h[2],h[3],!0)&&1E-7>z.W(l,k,q,m,h[4],h[5],!0)&&1E-7>z.W(l,k,q,m,g[2],g[3],!0)&&1E-7>z.W(l,k,q,m,g[4],g[5],!0)&&(d=f=e=!0);else if(e)return null;if(d^f)return null;f=[a,b];d=[];for(h=0;4>h&&2>d.length&&(g=h&1,k=g^1,l=h>>1,k=p.va(f[g],
new y(f[k][l?6:0],f[k][l?7:1])),null!=k&&(g=g?[l,k]:[k,l],(!d.length||1E-8<Math.abs(g[0]-d[0][0])&&1E-8<Math.abs(g[1]-d[0][1]))&&d.push(g)),!(2<h)||d.length);h++);2!==d.length?d=null:!e&&(a=p.lb(a,d[0][0],d[1][0]),b=p.lb(b,d[0][1],d[1][1]),1E-7<Math.abs(b[2]-a[2])||1E-7<Math.abs(b[3]-a[3])||1E-7<Math.abs(b[4]-a[4])||1E-7<Math.abs(b[5]-a[5]))&&(d=null);return d};ba(F,K);F.prototype.Ac=function(a){this.fb=(this.h=a)?a.fb:0};F.prototype.Mb=function(a){this.Ac(a.h);this.$=a;this.ka=null;this.s=a.s;this.M=
a.M};F.prototype.Bc=function(a){var b=a.P();b?this.Mb(b):(this.Ac(a.h),this.s=a,this.M=null);this.ka=a;this.la=a===this.s?0:1;this.j=a.j.clone()};F.prototype.de=function(){var a=this.ka;if(!a){var b=this.P(),c=this.getTime();0===c?a=b.s:1===c?a=b.M:null!=c&&(a=b.Sb(0,c)<b.Sb(c,1)?b.s:b.M);this.ka=a}return a};F.prototype.P=function(){function a(c){if((c=c&&c.P())&&null!=(b.la=c.va(b.j)))return b.Mb(c),c}this.h&&this.h.fb!==this.fb&&(this.la=this.yc=this.qc=this.$=null);var b=this;return this.$||a(this.ka)||
a(this.s)||a(this.M.Da())};F.prototype.La=function(){var a=this.P();return a&&a.h};F.prototype.ua=function(){var a=this.P();return a&&a.ua()};F.prototype.getTime=function(){var a=this.P();return a&&null==this.la?this.la=a.va(this.j):this.la};F.prototype.S=function(){return this.j};F.prototype.Xc=function(){var a=this.yc;if(null==a){a=0;var b=this.La(),c=this.ua();if(b&&null!=c){b=b.V();for(var d=0;d<c;d++)a+=b[d].N()}this.yc=a+=this.Vd()}return a};F.prototype.Vd=function(){var a=this.qc;if(null==
a){a=this.P();var b=this.getTime();this.qc=a=null!=b&&a&&a.Sb(0,b)}return a};F.prototype.W=function(){return this.Bd};F.prototype.ib=function(){var a=this.P();(a=a&&a.Nb(this.getTime()))&&this.Bc(a.s);return a};F.prototype.L=function(a,b){if(this===a)return!0;if(!(a instanceof F))return!1;var c=this.P(),d=a.P();if(c.h!==d.h)return!1;d=Math.abs(this.Xc()-a.Xc());c=d<J.pa||c.h&&Math.abs(c.h.N()-d)<J.pa;d=!b&&this.v;a=!b&&a.v;a=!d&&!a||d&&a&&d.L(a,!0);return c&&a};F.prototype.ne=function(){if(this.v&&
this.Ea().fa(this.v.Ea())){var a=this.P(),b=this.v.P();return!(a.ja()&&b.ja()&&a.Cb().ha(b.Cb()))}return!1};F.prototype.fd=function(){function a(n,w){var A=n.o(),E=p.vb(A).qd||p.be(A);n=E.length;w=p.N(A,w&&n?E[n-1]:0,!w&&n?E[0]:1);q.push(n?w:w/32)}function b(n,w,A){return w<A?n>w&&n<A:n>w||n<A}if(!this.v)return!1;var c=this.getTime(),d=this.v.getTime(),f=1E-8<=c&&.99999999>=c,e=1E-8<=d&&.99999999>=d;if(f&&e)return!this.ne();var g=this.P(),h=g&&1E-8>c?g.Da():g,l=this.v.P(),k=l&&1E-8>d?l.Da():l;.99999999<
c&&(g=g.ca());.99999999<d&&(l=l.ca());if(!(h&&g&&k&&l))return!1;var q=[];f||(a(h,!0),a(g,!1));e||(a(k,!0),a(l,!1));var m=this.S(),r=Math.min.apply(Math,q);c=f?g.Vb(c):g.mb(r).R(m);h=f?c.ec():h.mb(-r).R(m);d=e?l.Vb(d):l.mb(r).R(m);k=e?d.ec():k.mb(-r).R(m);e=h.Ab();m=c.Ab();k=k.Ab();r=d.Ab();return!!(f?b(e,k,r)^b(m,k,r)&&b(e,r,k)^b(m,r,k):b(k,e,m)^b(r,e,m)&&b(k,m,e)^b(r,m,e))};F.prototype.Yb=function(){return!!this.za};F.prototype.Ea=function(){var a=this.P(),b=this.getTime();return null!=b&&a&&a.$c(b,
!0)};F.da=function(a,b,c){function d(m,r){for(m+=r;-1<=m&&m<=f;m+=r){var n=a[(m%f+f)%f];if(!b.S().ea(n.S(),1E-7))break;if(b.L(n))return n}return null}for(var f=a.length,e=0,g=f-1;e<=g;){var h=e+g>>>1,l=a[h],k=void 0;if(c&&(k=b.L(l)?l:d(h,-1)||d(h,1)))return b.za&&(k.za=k.v.za=!0),k;k=b.La();var q=l.La();0>(k!==q?k.T-q.T:b.ua()+b.getTime()-(l.ua()+l.getTime()))?g=h-1:e=h+1}a.splice(e,0,b);return b};F.expand=function(a){for(var b=a.slice(),c=a.length-1;0<=c;c--)F.da(b,a[c].v,!1);return b};ba(u,v);u.prototype.Qa=
function(){return 0<=this.ba()};u.prototype.sd=function(a){this.Qa()!=!!a&&this.reverse()};u.prototype.pc=function(a){a=a.bc(this.X({Eb:!0,handle:!0}))?this.vc(a):{};return a.oe||!!a.ga};u.prototype.kb=function(a,b,c,d){var f=this===a||!a,e=this.aa.sb();c=f?e:(c||a.aa).sb();return f||this.X(e).ke(a.X(c),1E-12)?p.kb(this.V(),!f&&a.V(),b,e,c,d):[]};u.prototype.compare=function(a){if(!a)return!1;var b=this.g||[this];a=a.g?a.g.slice():[a];var c=b.length,d=a.length,f=ma.Oc(b,a,J.pa),e=Array(d).fill(!1),
g=0,h=!0;for(--c;0<=c&&h;c--){var l=b[c],k=f[c],q=!1;if(k)for(var m=k.length-1;0<=m&&!q;m--){var r=k[m];l.compare(a[r])&&(e[r]||(e[r]=!0,g++),q=!0)}q||(h=!1)}return h&&g===d};u.prototype.vc=function(a,b,c){return u.Xb(a,this.V(),b,c)};u.prototype.vd=function(a){return u.Hb(this,a,1)};u.prototype.ha=function(a){return u.Hb(this,a,2)};u.prototype.R=function(a){return u.Hb(this,a,3)};u.prototype.Pb=function(a){return u.Hb(this,a,4)};u.prototype.ib=function(a){function b(k){function q(w){var A=[w];w=
[];for(var E={};A.length;)E.Ta=A.pop(),n.has(E.Ta)||(n.add(E.Ta),w.push(E.Ta),r.forEach(function(H){return function(I){n.has(I)||H.Ta.ha(I).ia()||A.push(I)}}(E))),E={Ta:E.Ta};return w}var m=[],r=k.Qc().slice(),n=new Set;r.forEach(function(w){if(!n.has(w))if(w=q(w),1===w.length)m.push(w[0]);else{var A=new x;A.gb(w);A=A.reduce();A.Za(w[0]);m.push(A)}});return m}if(!Array.isArray(a))return u.Lc([this.Pb(a),this.ha(a)],this);var c=function(k){var q=k.map(function(n){return n.X()});k=Math.min.apply(null,
q.map(function(n){return n.$a()}));var m=Math.min.apply(null,q.map(function(n){return n.ab()})),r=Math.max.apply(null,q.map(function(n){return n.$a()+n.Wb()}));q=Math.max.apply(null,q.map(function(n){return n.ab()+n.Qb()}));return[k,m,r,q]}(a);c=new t.xd(c[0]-1,c[1]-1,c[2]+1,c[3]+1);for(var d=[],f=1,e=Math.pow(2,a.length);f<e;f++){for(var g=c,h=0;h<a.length;h++){var l=a[h];g=0!==(f&1<<h)?g.ha(l):g.ha(c.R(l))}g.ia()||(g.De=f,d.push(g))}return d.flatMap(function(k){if(k instanceof t)return[k];if(k instanceof
x)return b(k)})};u.prototype.re=function(){function a(n,w){return(n=n&&n.v)&&n.za&&n.h===w}var b=this.g||[this],c=!1,d=!1,f=this.kb(null,function(n){return n.Yb()&&(c=!0)||n.fd()&&(d=!0)}),e=c&&d?[]:null;f=F.expand(f);if(c)for(var g=u.Ob(f,function(n){return n.Yb()},e),h=g.length-1;0<=h;h--){var l=g[h],k=l.h;l=l.ka;var q=l.Da(),m=l.ca();a(q,k)&&a(m,k)&&(l.remove(),q.H.I(0,0),m.A.I(0,0),q===l||q.P().bd()||(m.A.set(q.A),q.remove()))}d&&(u.Ob(f,c&&function(n){var w=n.P(),A=n.de(),E=n.v;n=E.$;E=E.ka;
if(w&&n&&w.h&&n.h)return!0;A&&(A.v=null);E&&(E.v=null)},e),e&&u.Hc(e),b=u.ud(K.Mc(b,function(n){this.push.apply(this,n.i)},[])));f=b.length;if(1<f&&this.g){b!==this.g&&this.rd(b);var r=this}else 1!==f||this.g||(b[0]!==this&&this.kc(b[0].ic()),r=this);r||(r=new x({da:!1}),r.gb(b),r=r.reduce(),r.Za(this),this.replaceWith(r));return r};u.prototype.qe=function(){if(this.g&&this.g.length){var a=u.pd(this.hc(),function(b){return!!b},!0);this.rd(a)}else this.sd(!0);return this};u.prototype.$d=function(){var a=
this.X().Pc();if(this.contains(a))return a;var b=this.V(),c=a.y,d=[],f=[];b.forEach(function(e){e=e.o();var g=ha([e[1],e[3],e[5],e[7]]),h=g.next().value,l=g.next().value,k=g.next().value;g=g.next().value;c>=Math.min(h,l,k,g)&&c<=Math.max(h,l,k,g)&&p.Wc(e).forEach(function(q){var m=q[1],r=q[7];m!==r&&c>=Math.min(m,r)&&c<=Math.max(m,r)&&(q=c===m?q[0]:c===r?q[6]:1===p.Sa(q,1,c,f,0,1)?p.S(q,f[0]).x:(q[0]+q[6])/2,d.push(q))})});1<d.length&&(d.sort(function(e,g){return e-g}),a.x=(d[0]+d[1])/2);return a};
u.Tb=function(a){return a.g||[a]};u.ld=function(a){a=a.clone(!1).reduce({td:!0}).transform(null,!0,!0);for(var b=u.Tb(a),c=0,d=b.length;c<d;c++){var f=b[c];f.F||f.ia()||(f.closePath(J.EPSILON),f.ta().Gb(0,0),f.Ka().jc(0,0))}return a.re().qe()};u.Lc=function(a,b){var c=new x({da:!1});c.gb(a);c=c.reduce({td:!0});c.Za(b,!0);return c};u.Nd=function(a){return a.Yb()||a.fd()};u.Hb=function(a,b,c){function d(w){for(var A=0,E=w.length;A<E;A++){var H=w[A];k.push.apply(k,H.i);q.push.apply(q,H.V());H.zc=!0}}
function f(w){for(var A=[],E=0,H=w&&w.length;E<H;E++)A.push(q[w[E]]);return A}var e={1:{1:!0,2:!0,unite:!0},2:{2:!0,intersect:!0},3:{1:!0,subtract:!0},4:{1:!0,"-1":!0,exclude:!0}}[c];c=u.ld(a);(b=b&&a!==b?u.ld(b):null)&&(e.subtract||e.exclude)^b.Qa()^c.Qa()&&b.reverse();var g=u.Ob(F.expand(c.kb(b,u.Nd))),h=u.Tb(c),l=b?u.Tb(b):null,k=[],q=[];if(g.length){d(h);l&&d(l);h=Array(q.length);l=0;for(var m=q.length;l<m;l++)h[l]=q[l].o();l=ma.Nc(h,h,0,!0);h={};for(m=0;m<q.length;m++){var r=q[m],n=r.h.T;(h[n]=
h[n]||{})[r.ua()]={Zb:f(l[m].Zb),mc:f(l[m].mc)}}l=0;for(m=g.length;l<m;l++)u.md(g[l].ka,c,b,h,e);g=0;for(l=k.length;g<l;g++)m=k[g],r=m.v,m.Ec||u.md(m,c,b,h,e),r&&r.za||(m.h.zc=!1);c=u.ud(k,e)}else c=u.pd(l?h.concat(l):h.slice(),function(w){return!!e[w]});return u.Lc(c,a)};u.hd=function(a,b){for(var c=a;c;){if(c===b)return;c=c.Wa}for(;a.Ga&&a.Ga!==b;)a=a.Ga;if(!a.Ga){for(;b.Wa;)b=b.Wa;a.Ga=b;b.Wa=a}};u.Hc=function(a){for(var b=a.length-1;0<=b;b--)a[b].wb()};u.pd=function(a,b,c){var d=a?a.length:0;
if(!d)return a;var f=K.Mc(a,function(A,E){this[A.T]={xb:null,ga:A.Qa()?1:-1,index:E}},{}),e=a.slice().sort(function(A,E){return Math.abs(E.ba())-Math.abs(A.ba())}),g=e[0];null==c&&(c=g.Qa());g=ma.Oc(e,null,J.pa);for(var h=0;h<d;h++){var l=e[h],k=f[l.T],q=0,m=g[h];if(m)for(var r=null,n=m.length-1;0<=n;n--)if(m[n]<h){r=r||l.$d();var w=e[m[n]];if(w.contains(r)){m=f[w.T];q=m.ga;k.ga+=q;k.xb=m.exclude?m.xb:w;break}}b(k.ga)===b(q)?(k.exclude=!0,a[k.index]=null):l.sd(k.xb?!k.xb.Qa():c)}return a};u.Ob=function(a,
b,c){for(var d=b&&[],f=c||[],e=c&&{},g=!1,h,l,k,q=(c&&c.length)-1;0<=q;q--){var m=c[q];m.h&&(e[m.h.T+"."+m.s.m]=!0)}for(q=a.length-1;0<=q;q--){m=a[q];var r=m.la,n=m.la;m.$&&(m.$!==l?(!(g=!m.$.Pa())&&(g=e)&&(g=m.$,g=e[g.h.T+"."+g.s.m]),h=[],k=null,l=m.$):1E-8<=k&&(n/=k));if(b&&!b(m))h&&h.push(m);else{b&&d.unshift(m);k=r;if(1E-8>n)r=m.$.s;else if(.99999999<n)r=m.$.M;else{r=m.$.Nb(n,!0);g&&f.push(m.$,r);r=r.s;for(var w=h.length-1;0<=w;w--){var A=h[w];A.la=(A.la-n)/(1-n)}}m.Bc(r);n=r.v;m=m.v;if(n)for(u.hd(n,
m),m=n;m;)u.hd(m.v,n),m=m.Ga;else r.v=m}}c||u.Hc(f);return d||a};u.Xb=function(a,b,c,d,f){function e(R){var S=R[l+0],ea=R[l+2],T=R[l+4],aa=R[l+6];if(m<=Math.max(S,ea,T,aa)&&m>=Math.min(S,ea,T,aa))for(S=R[h+0],ea=R[h+2],T=R[h+4],aa=R[h+6],R=r>Math.max(S,ea,T,aa)||n<Math.min(S,ea,T,aa)?[R]:p.Wc(R,c),S=0,ea=R.length;S<ea;S++){a:{T=R[S];aa=T[l+0];var Z=T[l+6];if(!(m<Math.min(aa,Z)||m>Math.max(aa,Z))){var ja=T[h+0],ia=T[h+2],na=T[h+4],X=T[h+6];if(aa===Z){if(ja<n&&X>r||X<n&&ja>r)H=!0}else{ia=m===aa?0:m===
Z?1:r>Math.max(ja,ia,na,X)||n<Math.min(ja,ia,na,X)?1:0<p.Sa(T,l,m,V,0,1)?V[0]:1;X=0===ia?ja:1===ia?X:c?p.S(T,ia).y:p.S(T,ia).x;Z=aa>Z?1:-1;na=Q[l]>Q[l+6]?1:-1;var oa=Q[h+6];m!==aa?(X<r?A+=Z:X>n?E+=Z:H=!0,X>q-1E-6&&X<q+1E-6&&(P/=2)):(Z!==na?ja<r?A+=Z:ja>n&&(E+=Z):ja!=oa&&(oa<n&&X>n?(E+=Z,H=!0):oa>r&&X<r&&(A+=Z,H=!0)),P/=4);Q=T;T=!f&&X>r&&X<n&&(c?0===p.Ea(T,ia).x:0===p.Ea(T,ia).y)&&u.Xb(a,b,!c,d,!0);break a}}T=void 0}if(T)return T}}for(var g=Array.isArray(b)?b:c?b.Zb:b.mc,h=c?1:0,l=h^1,k=[a.x,a.y],
q=k[h],m=k[l],r=q-1E-9,n=q+1E-9,w=k=0,A=0,E=0,H=!1,I=!1,P=1,V=[],Q,L,M=0,O=g.length;M<O;M++){var N=g[M],W=N.h,ca=N.o();if(!M||g[M-1].h!==W)if(Q=null,W.F||(L=p.o(W.Bb().M,N.s,null,!d),L[l]!==L[l+6]&&(Q=L)),!Q){Q=ca;for(var Y=W.Bb();Y&&Y!==N;){var da=Y.o();if(da[l]!==da[l+6]){Q=da;break}Y=Y.Da()}}N=void 0;if(N=e(ca))return N;if(M+1===O||g[M+1].h!==W){if(L&&(N=e(L)))return N;!H||A||E||(A=E=W.Qa()^c?1:-1);k+=A;w+=E;A=E=0;H&&(I=!0,H=!1);L=null}}k=Math.abs(k);w=Math.abs(w);return{ga:Math.max(k,w),ye:k,
ze:w,quality:P,oe:I}};u.md=function(a,b,c,d,f){var e=[],g=a,h=0,l={ga:0,quality:-1};do{var k=a.P();if(k){var q=k.N();e.push({se:a,curve:k,length:q});h+=q}a=a.ca()}while(a&&!a.v&&a!==g);a=[.5,.25,.75];for(g=0;g<a.length&&.5>l.quality;g++){k=h*a[g];q=0;for(var m=e.length;q<m;q++){var r=e[q],n=r.length;if(k<=n){r=r.curve;n=r.h;var w=n.Aa;w=w instanceof x?w:n;var A=J.Kd(r.Ma(k),.001,.999),E=r.Yc(A);A=Math.abs(r.Vb(A).y)<Math.SQRT1_2;var H=null;if(f.subtract&&c){var I=(w===b?c:b).vc(E,A,!0);if(w===b&&
I.ga||w===c&&!I.ga)if(1>I.quality)continue;else H={ga:0,quality:1}}H=H||u.Xb(E,d[n.T][r.ua()],A,!0);H.quality>l.quality&&(l=H);break}k-=n}}for(b=e.length-1;0<=b;b--)e[b].se.Ec=l};u.ud=function(a,b){function c(L){var M;return!(!L||L.ub||b&&(!b[(M=L.Ec||{}).ga]||b.unite&&2===M.ga&&M.ye&&M.ze))}function d(L){if(L)for(var M=0,O=h.length;M<O;M++)if(L===h[M])return!0;return!1}function f(L){for(var M=0,O=L.i.length;M<O;M++)L.i[M].ub=!0}function e(L,M){function O(Y,da){for(;Y&&Y!==da;){var R=Y.ka,S=R&&R.h;
if(S){S=R.ca()||S.ta();var ea=S.v;S=d(R)||d(S)||S&&c(R)&&(c(S)||ea&&c(ea.ka));R!==L&&S&&ca.push(R);M&&h.push(R)}Y=Y.Ga}}var N=L.v,W=N,ca=[];M&&(h=[L]);if(N){for(O(N);N&&N.Wa;)N=N.Wa;O(N,W)}return ca}var g=[],h;a.sort(function(L,M){var O=L.v,N=M.v,W=O?O.za:!1;return W^(N?N.za:0)?W?1:-1:!O^!N?O?1:-1:L.h!==M.h?L.h.T-M.h.T:L.m-M.m});for(var l=0;l<a.length;l++){var k=a[l],q=c(k);if(q&&k.h.zc){var m=k.h,r=k.v.ka.h;m.compare(r)&&(m.ba()&&g.push(m.clone(!1)),f(m),f(r),q=!1)}m=void 0;r=[];for(var n=null,w=
!1,A=!0,E=void 0,H=void 0;q;){var I=!n,P=e(k,I),V=P.shift();w=!I&&(d(k)||d(V));var Q=!w&&V;I&&(n=new t({da:!1}),E=null);if(w){if(k.ac()||k.dc())A=k.h.F;k.ub=!0;break}Q&&E&&(r.push(E),E=null);E||(Q&&P.push(k),E={start:n.i.length,Ld:P,xe:m=[],ad:H});Q&&(k=V);if(!c(k)){n.ic(E.start);m.forEach(function(L){L.ub=!1});m.length=0;do if(k=E&&E.Ld.shift(),!k||!k.h)if(k=null,E=r.pop())m=E.xe,H=E.ad;while(E&&!c(k));if(!k)break}I=k.ca();n.add(new G(k.j,H,I&&k.H));k.ub=!0;m.push(k);k=I||k.h.ta();H=I&&I.A}w&&A&&
(n.ta().Gb(H),n.bb(A));w&&0!==n.ba()&&g.push(n)}return g};ba(t,u);t.prototype.rc=function(a){return this.F===a.F&&K.L(this.i,a.i)};t.prototype.Kc=function(a){this.kc(a.i);this.F=a.F};t.prototype.l=function(a){v.prototype.l.call(this,a);if(a&8)if(this.Fa=this.Jb=void 0,a&32)this.fb++;else{if(this.O){a=0;for(var b=this.O.length;a<b;a++)this.O[a].l()}}else a&64&&(this.Z=void 0)};t.prototype.ee=function(){return this.i};t.prototype.kc=function(a){this.i.length=0;this.O=void 0;var b=a&&a.length;if(b){var c=
a[b-1];"boolean"===typeof c&&(this.bb(c),b--);this.Y(G.fc(a,0,{},b))}};t.prototype.ta=function(){return this.i[0]};t.prototype.Ka=function(){return this.i[this.i.length-1]};t.prototype.V=function(){var a=this.O,b=this.i;if(!a){var c=this.Lb();a=this.O=Array(c);for(var d=0;d<c;d++)a[d]=new p(this,b[d],b[d+1]||b[0])}return a};t.prototype.Bb=function(){var a=this.V();return a[a.length-1]};t.prototype.ed=function(){return this.F};t.prototype.bb=function(a){if(this.F!=(a=!!a)){this.F=a;if(this.O){var b=
this.O.length=this.Lb();a&&(this.O[b-1]=new p(this,this.i[b-1],this.i[0]))}this.l(41)}};t.prototype.ia=function(){return!this.i.length};t.prototype.Cc=function(a){for(var b=this.i,c=Array(6),d=0,f=b.length;d<f;d++)b[d].ma(a,c,!0);return!0};t.prototype.Y=function(a,b){var c=this.i,d=this.O,f=a.length,e=null==b;b=e?c.length:b;for(var g=0;g<f;g++){var h=a[g];h.h&&(h=a[g]=h.clone());h.h=this;h.m=b+g}if(e)c.push.apply(c,a);else for(c.splice.apply(c,[b,0].concat(a)),e=b+f,g=c.length;e<g;e++)c[e].m=e;if(d){c=
this.Lb();e=b=0<b&&b+f-1===c?b-1:b;f=Math.min(b+f,c);a.O&&(d.splice.apply(d,[b,0].concat(a.O)),e+=a.O.length);for(c=e;c<f;c++)d.splice(c,0,new p(this,null,null));this.oc(b,f)}this.l(41);return a};t.prototype.oc=function(a,b){for(var c=this.i,d=this.O,f,e=a;e<b;e++)f=d[e],f.h=this,f.s=c[e],f.M=c[e+1]||c[0],f.l();if(f=d[this.F&&!a?c.length-1:a-1])f.M=c[a]||c[0],f.l();if(f=d[b])f.s=c[b],f.l()};t.prototype.Lb=function(){var a=this.i.length;return!this.F&&0<a?a-1:a};t.prototype.add=function(a){return 1<
arguments.length&&"number"!==typeof a?this.Y(G.fc(arguments)):this.Y([G.read(arguments)])[0]};t.prototype.da=function(a,b){return 2<arguments.length&&"number"!==typeof b?this.Y(G.fc(arguments,1),a):this.Y([G.read(arguments,1)],a)[0]};t.prototype.od=function(a){return this.ic(a,a+1)[0]||null};t.prototype.ic=function(a,b){null==a&&(a=0);null==b&&(b=this.i.length);var c=this.i,d=this.O,f=c.length,e=c.splice(a,b-a),g=e.length;if(!g)return e;for(var h=0;h<g;h++)e[h].m=e[h].h=null;h=a;for(var l=c.length;h<
l;h++)c[h].m=h;if(d){a=0<a&&b===f+(this.F?1:0)?a-1:a;for(d=d.splice(a,g).length-1;0<=d;d--);this.oc(a,a)}this.l(41);return e};t.prototype.Pa=function(){for(var a=0,b=this.i.length;a<b;a++)if(this.i[a].Pa())return!0;return!1};t.prototype.wb=function(){for(var a=0,b=this.i.length;a<b;a++)this.i[a].wb()};t.prototype.N=function(){if(null==this.Fa){for(var a=this.V(),b=0,c=0,d=a.length;c<d;c++)b+=a[c].N();this.Fa=b}return this.Fa};t.prototype.ba=function(){if(null!=this.Jb)return this.Jb;for(var a=0,b=
this.i.length,c=0;c<b;c++){var d=(c+1)%b,f=c===b-1;a+=p.ba(p.o(this.i[c],this.i[f?0:d],null,f&&!this.F))}return this.Jb=a};t.prototype.join=function(a,b){b=b||0;if(a&&a!==this){var c=this.Ka(),d=a.Ka();if(!d)return this;c&&c.j.ea(d.j,b)&&a.reverse();d=a.ta();c&&c.j.ea(d.j,b)?(c.jc(d.H),this.Y(a.i.slice(1))):((c=this.ta())&&c.j.ea(d.j,b)&&a.reverse(),d=a.Ka(),c&&c.j.ea(d.j,b)?(c.Gb(d.A),this.Y(a.i.slice(0,a.i.length-1),0)):this.Y(a.i.slice()));a.F&&this.Y([a.i[0]]);a.remove()}a=this.ta();c=this.Ka();
a!==c&&a.j.ea(c.j,b)&&(a.Gb(c.A),c.remove(),this.bb(!0));return this};t.prototype.reduce=function(a){for(var b=this.V(),c=(a=a&&a.td)?1E-7:0,d=b.length-1;0<=d;d--){var f=b[d];!f.Pa()&&(!f.bd(c)||a&&f.fa(f.ca()))&&f.remove()}return this};t.prototype.reverse=function(){this.i.reverse();for(var a=0,b=this.i.length;a<b;a++){var c=this.i[a],d=c.A;c.A=c.H;c.H=d;c.m=a}this.O=null;this.l(9)};t.prototype.compare=function(a){if(!a||a instanceof x)return u.prototype.compare.call(this,a);var b=this.V();a=a.V();
if(!b.length||!a.length)return b.length==a.length;for(var c=b[0].o(),d=[],f=0,e,g=0,h,l=0;l<a.length;l++){var k=a[l].o();d.push(k);if(k=p.Rb(c,k)){e=!l&&0<k[0][0]?a.length-1:l;h=k[0][1];break}}l=d[e];for(var q;c&&l;){if((k=p.Rb(c,l))&&1E-8>Math.abs(k[0][0]-g)){g=k[1][0];1===g&&(c=++f<b.length?b[f].o():null,g=0);var m=k[0][1];if(1E-8>Math.abs(m-h)){q||(q=[e,m]);h=k[1][1];1===h&&(++e>=a.length&&(e=0),l=d[e]||a[e].o(),h=0);if(!c)return q[0]===e&&q[1]===h;continue}}break}return!1};t.prototype.Db=function(a){if("number"===
typeof a){for(var b=this.V(),c=0,d=0,f=b.length;d<f;d++){var e=c,g=b[d];c+=g.N();if(c>a)return g.Db(a-e)}if(0<b.length&&a<=this.N())return new F(b[b.length-1],1)}else if(a&&a.La&&a.La()===this)return a;return null};t.prototype.mb=function(a){return(a=this.Db(a))&&a.S()};t.prototype.$c=function(a){return(a=this.Db(a))&&a.Ea()};t.prototype.moveTo=function(){1===this.i.length&&this.od(0);this.i.length||this.Y([new G(y.read(arguments))])};t.prototype.lineTo=function(){this.Y([new G(y.read(arguments))])};
t.prototype.yb=function(){var a=y.read(arguments),b=y.read(arguments),c=y.read(arguments),d=t.Rc(this);d.jc(a.R(d.j));this.Y([new G(c,b.R(c))])};t.prototype.quadraticCurveTo=function(){var a=y.read(arguments),b=y.read(arguments),c=t.Rc(this).j;this.yb(a.add(c.R(a).multiply(1/3)),a.add(b.R(a).multiply(1/3)),b)};t.prototype.closePath=function(a){this.bb(!0);this.join(this,a)};t.prototype.rb=function(a,b){return b.handle?t.Xd(this.i,a):t.X(this.i,this.F,this,a,b)};t.Rc=function(a){a=a.i;if(!a.length)throw Error("Use a moveTo() command first");
return a[a.length-1]};t.X=function(a,b,c,d){function f(r){r.ma(d,e);for(r=0;2>r;r++)p.nc(g[r],g[r+4],e[r+2],e[r],r,h,l,k);r=g;g=e;e=r}c=a[0];if(!c)return new D;for(var e=Array(6),g=c.ma(d,Array(6)),h=g.slice(0,2),l=h.slice(),k=Array(2),q=1,m=a.length;q<m;q++)f(a[q]);b&&f(c);return new D(h[0],h[1],l[0]-h[0],l[1]-h[1])};t.Xd=function(a,b){for(var c=Array(6),d=Infinity,f=-d,e=d,g=f,h=0,l=a.length;h<l;h++){a[h].ma(b,c);for(var k=0;6>k;k+=2){var q=c[k],m=c[k+1];q<d&&(d=q);q>f&&(f=q);m<e&&(e=m);m>g&&(g=
m)}}return new D(d,e,f-d,g-e)};t.xd=function(a,b,c,d){var f=new t;f.moveTo(a,b);f.lineTo(c,b);f.lineTo(c,d);f.lineTo(a,d);f.closePath();return f};ba(x,u);x.prototype.ob=function(a,b){var c=b,d=c[0];d&&"number"===typeof d[0]&&(c=[c]);for(d=b.length-1;0<=d;d--){var f=c[d];c!==b||f instanceof t||(c=K.slice(c));Array.isArray(f)?c[d]=new t({Me:f,da:!1}):f instanceof x&&(c.splice.apply(c,[d,1].concat(f.hc())),f.remove())}return v.prototype.ob.call(this,a,c)};x.prototype.reduce=function(a){for(var b=this.g.length-
1;0<=b;b--){var c=this.g[b].reduce(a);c.ia()&&c.remove()}return this.g.length?v.prototype.reduce.call(this):(a=new t({da:!1}),a.Za(this),a.$b(this),this.remove(),a)};x.prototype.ed=function(){for(var a=0,b=this.g.length;a<b;a++)if(!this.g[a].F)return!1;return!0};x.prototype.bb=function(a){for(var b=0,c=this.g.length;b<c;b++)this.g[b].bb(a)};x.prototype.ta=function(){var a=this.Wd();return a&&a.ta()};x.prototype.Ka=function(){var a=this.Uc();return a&&a.Ka()};x.prototype.V=function(){for(var a=[],
b=0,c=this.g.length;b<c;b++)a.push.apply(a,this.g[b].V());return a};x.prototype.Bb=function(){var a=this.Uc();return a&&a.Bb()};x.prototype.ba=function(){for(var a=0,b=0,c=this.g.length;b<c;b++)a+=this.g[b].ba();return a};x.prototype.ia=function(){for(var a=!0,b=0,c=this.g.length;b<c;b++)a*=this.g[b].ia();return a};x.prototype.N=function(){for(var a=0,b=0,c=this.g.length;b<c;b++)a+=this.g[b].N();return a};x.prototype.moveTo=function(){var a=x.jb(this),b=a&&a.ia()?a:new t({da:!1});b!==a&&this.Fc(b);
b.moveTo.apply(b,arguments)};x.prototype.closePath=function(a){x.jb(this,!0).closePath(a)};x.prototype.lineTo=function(){var a=x.jb(this,!0);a.lineTo.apply(a,arguments)};x.prototype.yb=function(){var a=x.jb(this,!0);a.yb.apply(a,arguments)};x.prototype.quadraticCurveTo=function(){var a=x.jb(this,!0);a.quadraticCurveTo.apply(a,arguments)};x.prototype.reverse=function(a){for(var b,c=0,d=this.g.length;c<d;c++)b=this.g[c].reverse(a)||b;return b};x.jb=function(a,b){if(b&&!a.g.length)throw Error("Use a moveTo() command first");
return a.g[a.g.length-1]};B.AscCommon=B.AscCommon||{};B.AscCommon.PathBoolean={};B.AscCommon.PathBoolean.CompoundPath=x;x.prototype.divide=u.prototype.ib;x.prototype.unite=u.prototype.vd;x.prototype.intersect=u.prototype.ha;x.prototype.subtract=u.prototype.R;x.prototype.exclude=u.prototype.Pb;t.prototype.divide=u.prototype.ib;t.prototype.unite=u.prototype.vd;t.prototype.intersect=u.prototype.ha;t.prototype.subtract=u.prototype.R;t.prototype.exclude=u.prototype.Pb;x.prototype.moveTo=x.prototype.moveTo;
x.prototype.lineTo=x.prototype.lineTo;x.prototype.cubicCurveTo=x.prototype.yb;x.prototype.closePath=x.prototype.closePath;x.prototype.getChildren=v.prototype.Qc;x.prototype.getBounds=v.prototype.X;x.prototype.getPosition=v.prototype.Ub;x.prototype.setPosition=v.prototype.setPosition;t.prototype.getSegments=t.prototype.ee;t.prototype.isClosed=t.prototype.ed;t.prototype.getBounds=v.prototype.X;t.prototype.getPosition=v.prototype.Ub;t.prototype.setPosition=v.prototype.setPosition;G.prototype.isFirst=
G.prototype.ac;G.prototype.isLast=G.prototype.dc;G.prototype.getPrevious=G.prototype.Da;G.prototype.getNext=G.prototype.ca;G.prototype.getPoint=G.prototype.S;G.prototype.getHandleOut=G.prototype.Zd;G.prototype.getHandleIn=G.prototype.Yd;D.prototype.getTopLeft=D.prototype.fe;D.prototype.getWidth=D.prototype.Wb;D.prototype.getHeight=D.prototype.Qb;D.prototype.getLeft=D.prototype.$a;D.prototype.getTop=D.prototype.ab;y.prototype.subtract=y.prototype.R;y.prototype.getX=y.prototype.Na;y.prototype.getY=
y.prototype.Oa})(window);