@antv/g-canvas 1.9.46 → 1.9.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@antv/g-lite")):"function"==typeof define&&define.amd?define(["exports","@antv/g-lite"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).G=t.G||{},t.G.Canvas2D={}),t.window.G)}(this,(function(t,e){"use strict";function r(){r=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=Object.create((e&&e.prototype instanceof p?e:p).prototype),a=new M(n||[]);return o(i,"_invoke",{value:E(t,r,a)}),i}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=h;var f={};function p(){}function v(){}function d(){}var y={};u(y,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(S([])));m&&m!==e&&n.call(m,a)&&(y=m);var w=d.prototype=p.prototype=Object.create(y);function x(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(o,i,a,c){var s=l(t[o],t,i);if("throw"!==s.type){var u=s.arg,h=u.value;return h&&"object"==typeof h&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(h).then((function(t){u.value=t,a(u)}),(function(t){return r("throw",t,a,c)}))}c(s.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return k()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=L(a,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=l(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===f)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}function L(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,L(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=l(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function M(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function S(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return v.prototype=d,o(w,"constructor",{value:d,configurable:!0}),o(d,"constructor",{value:v,configurable:!0}),v.displayName=u(d,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,u(t,s,"GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},x(b.prototype),u(b.prototype,c,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new b(h(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},x(w),u(w,s,"Generator"),u(w,a,(function(){return this})),u(w,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=S,M.prototype={constructor:M,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(this.prev>=i.tryLoc){var c=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(c&&s){if(i.catchLoc>this.prev)return r(i.catchLoc,!0);if(i.finallyLoc>this.prev)return r(i.finallyLoc)}else if(c){if(i.catchLoc>this.prev)return r(i.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(i.finallyLoc>this.prev)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(this.prev>=o.tryLoc&&n.call(o,"finallyLoc")&&o.finallyLoc>this.prev){var i=o;break}}i&&("break"===t||"continue"===t)&&e>=i.tryLoc&&i.finallyLoc>=e&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:S(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function n(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(o,i){var a=t.apply(e,r);function c(t){n(a,o,i,c,s,"next",t)}function s(t){n(a,o,i,c,s,"throw",t)}c(void 0)}))}}function i(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,a(t,e)}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}var c="undefined"!=typeof Float32Array?Float32Array:Array;function s(){var t=new c(16);return c!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function u(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function h(t,e,r){var n=e[0],o=e[1],i=e[2],a=e[3],c=e[4],s=e[5],u=e[6],h=e[7],l=e[8],f=e[9],p=e[10],v=e[11],d=e[12],y=e[13],g=e[14],m=e[15],w=r[0],x=r[1],b=r[2],E=r[3];return t[0]=w*n+x*c+b*l+E*d,t[1]=w*o+x*s+b*f+E*y,t[2]=w*i+x*u+b*p+E*g,t[3]=w*a+x*h+b*v+E*m,t[4]=(w=r[4])*n+(x=r[5])*c+(b=r[6])*l+(E=r[7])*d,t[5]=w*o+x*s+b*f+E*y,t[6]=w*i+x*u+b*p+E*g,t[7]=w*a+x*h+b*v+E*m,t[8]=(w=r[8])*n+(x=r[9])*c+(b=r[10])*l+(E=r[11])*d,t[9]=w*o+x*s+b*f+E*y,t[10]=w*i+x*u+b*p+E*g,t[11]=w*a+x*h+b*v+E*m,t[12]=(w=r[12])*n+(x=r[13])*c+(b=r[14])*l+(E=r[15])*d,t[13]=w*o+x*s+b*f+E*y,t[14]=w*i+x*u+b*p+E*g,t[15]=w*a+x*h+b*v+E*m,t}function l(t,e,r){var n,o,i,a,c,s,u,h,l,f,p,v,d=r[0],y=r[1],g=r[2];return e===t?(t[12]=e[0]*d+e[4]*y+e[8]*g+e[12],t[13]=e[1]*d+e[5]*y+e[9]*g+e[13],t[14]=e[2]*d+e[6]*y+e[10]*g+e[14],t[15]=e[3]*d+e[7]*y+e[11]*g+e[15]):(o=e[1],i=e[2],a=e[3],c=e[4],s=e[5],u=e[6],h=e[7],l=e[8],f=e[9],p=e[10],v=e[11],t[0]=n=e[0],t[1]=o,t[2]=i,t[3]=a,t[4]=c,t[5]=s,t[6]=u,t[7]=h,t[8]=l,t[9]=f,t[10]=p,t[11]=v,t[12]=n*d+c*y+l*g+e[12],t[13]=o*d+s*y+f*g+e[13],t[14]=i*d+u*y+p*g+e[14],t[15]=a*d+h*y+v*g+e[15]),t}function f(){var t=new c(3);return c!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function p(t,e,r,n){return t[0]=e,t[1]=r,t[2]=n,t}function v(t,e,r){var n=e[0],o=e[1],i=e[2],a=r[3]*n+r[7]*o+r[11]*i+r[15];return t[0]=(r[0]*n+r[4]*o+r[8]*i+r[12])/(a=a||1),t[1]=(r[1]*n+r[5]*o+r[9]*i+r[13])/a,t[2]=(r[2]*n+r[6]*o+r[10]*i+r[14])/a,t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var d;d=f();!function(){var t,e=(t=new c(2),c!=Float32Array&&(t[0]=0,t[1]=0),t)}();function y(t,e,r){return{x:t*Math.cos(r)-e*Math.sin(r),y:t*Math.sin(r)+e*Math.cos(r)}}function g(t,e,r,n,o,i,a,c,s,u){var h,l,f,p,v,d=t,m=e,w=r,x=n,b=c,E=s,L=120*Math.PI/180,O=Math.PI/180*(+o||0),P=[];if(u)l=u[0],f=u[1],p=u[2],v=u[3];else{m=(h=y(d,m,-O)).y;var M=((d=h.x)-(b=(h=y(b,E,-O)).x))/2,S=(m-(E=h.y))/2,k=M*M/(w*w)+S*S/(x*x);k>1&&(w*=k=Math.sqrt(k),x*=k);var A=w*w,T=x*x,_=(i===a?-1:1)*Math.sqrt(Math.abs((A*T-A*S*S-T*M*M)/(A*S*S+T*M*M)));p=_*w*S/x+(d+b)/2,l=Math.asin(((m-(v=_*-x*M/w+(m+E)/2))/x*1e9>>0)/1e9),f=Math.asin(((E-v)/x*1e9>>0)/1e9),0>(l=p>d?Math.PI-l:l)&&(l=2*Math.PI+l),0>(f=p>b?Math.PI-f:f)&&(f=2*Math.PI+f),a&&l>f&&(l-=2*Math.PI),!a&&f>l&&(f-=2*Math.PI)}var C=f-l;if(Math.abs(C)>L){var j=f,N=b,R=E;P=g(b=p+w*Math.cos(f=l+L*(a&&f>l?1:-1)),E=v+x*Math.sin(f),w,x,o,0,a,N,R,[f,j,p,v])}C=f-l;var I=Math.cos(l),G=Math.sin(l),F=Math.cos(f),D=Math.sin(f),B=Math.tan(C/4),$=4/3*w*B,H=4/3*x*B,Y=[d,m],W=[d+$*G,m-H*I],U=[b+$*D,E-H*F],X=[b,E];if(W[0]=2*Y[0]-W[0],W[1]=2*Y[1]-W[1],u)return W.concat(U,X,P);for(var z=[],q=0,Q=(P=W.concat(U,X,P)).length;Q>q;q+=1)z[q]=q%2?y(P[q-1],P[q],O).y:y(P[q],P[q+1],O).x;return z}var m=function(t){return null==t},w={}.toString,x=function(t,e){return w.call(t)==="[object "+e+"]"},b=function(t){return x(t,"String")},E=function(t,e,r){return e>t?e:t>r?r:t},L=function(t){return x(t,"Number")};function O(t,e){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},O(t,e)}function P(t,e){var r=e.r;t.arc(r,r,r,0,2*Math.PI,!1)}function M(t,e){var r=e.rx,n=e.ry;if(t.ellipse)t.ellipse(r,n,r,n,0,0,2*Math.PI,!1);else{var o=r>n?r:n,i=r>n?1:r/n,a=r>n?n/r:1;t.save(),t.scale(i,a),t.arc(0,0,o,0,2*Math.PI)}}function S(t,r){var n=r.x1,o=r.y1,i=r.x2,a=r.y2,c=r.defX,s=void 0===c?0:c,u=r.defY,h=void 0===u?0:u,l=r.markerStart,f=r.markerEnd,p=r.markerStartOffset,v=r.markerEndOffset,d=0,y=0,g=0,m=0,w=0;l&&e.isDisplayObject(l)&&p&&(d=Math.cos(w=Math.atan2(a-o,i-n))*(p||0),y=Math.sin(w)*(p||0)),f&&e.isDisplayObject(f)&&v&&(g=Math.cos(w=Math.atan2(o-a,n-i))*(v||0),m=Math.sin(w)*(v||0)),t.moveTo(n-s+d,o-h+y),t.lineTo(i-s+g,a-h+m)}function k(t,r){var n=r.defX,o=void 0===n?0:n,i=r.defY,a=void 0===i?0:i,c=r.markerStart,s=r.markerEnd,u=r.markerStartOffset,h=r.markerEndOffset,l=r.path,f=l.absolutePath,p=l.segments,v=0,d=0,y=0,g=0,m=0;if(c&&e.isDisplayObject(c)&&u){var w=c.parentNode.getStartTangent(),x=w[0],b=w[1];v=Math.cos(m=Math.atan2(x[1]-b[1],x[0]-b[0]))*(u||0),d=Math.sin(m)*(u||0)}if(s&&e.isDisplayObject(s)&&h){var E=s.parentNode.getEndTangent(),L=E[0],O=E[1];y=Math.cos(m=Math.atan2(L[1]-O[1],L[0]-O[0]))*(h||0),g=Math.sin(m)*(h||0)}for(var P=0;f.length>P;P++){var M=f[P],S=f[P+1],k=0===P&&(0!==v||0!==d),A=(P===f.length-1||S&&("M"===S[0]||"Z"===S[0]))&&0!==y&&0!==g;switch(M[0]){case"M":k?(t.moveTo(M[1]-o+v,M[2]-a+d),t.lineTo(M[1]-o,M[2]-a)):t.moveTo(M[1]-o,M[2]-a);break;case"L":A?t.lineTo(M[1]-o+y,M[2]-a+g):t.lineTo(M[1]-o,M[2]-a);break;case"Q":t.quadraticCurveTo(M[1]-o,M[2]-a,M[3]-o,M[4]-a),A&&t.lineTo(M[3]-o+y,M[4]-a+g);break;case"C":t.bezierCurveTo(M[1]-o,M[2]-a,M[3]-o,M[4]-a,M[5]-o,M[6]-a),A&&t.lineTo(M[5]-o+y,M[6]-a+g);break;case"A":var T=p[P].arcParams,_=T.cx,C=T.cy,j=T.rx,N=T.ry,R=T.startAngle,I=T.endAngle,G=T.xRotation,F=T.sweepFlag;if(t.ellipse)t.ellipse(_-o,C-a,j,N,G,R,I,!!(1-F));else{var D=j>N?j:N,B=j>N?1:j/N,$=j>N?N/j:1;t.translate(_-o,C-a),t.rotate(G),t.scale(B,$),t.arc(0,0,D,R,I,!!(1-F)),t.scale(1/B,1/$),t.rotate(-G),t.translate(-(_-o),-(C-a))}A&&t.lineTo(M[6]-o+y,M[7]-a+g);break;case"Z":t.closePath()}}}function A(t,r){var n=r.defX,o=void 0===n?0:n,i=r.defY,a=void 0===i?0:i,c=r.markerStart,s=r.markerEnd,u=r.markerStartOffset,h=r.markerEndOffset,l=r.points.points,f=l.length,p=l[0][0]-o,v=l[0][1]-a,d=l[f-1][0]-o,y=l[f-1][1]-a,g=0,m=0,w=0,x=0,b=0;c&&e.isDisplayObject(c)&&u&&(g=Math.cos(b=Math.atan2(l[1][1]-l[0][1],l[1][0]-l[0][0]))*(u||0),m=Math.sin(b)*(u||0)),s&&e.isDisplayObject(s)&&h&&(w=Math.cos(b=Math.atan2(l[f-1][1]-l[0][1],l[f-1][0]-l[0][0]))*(h||0),x=Math.sin(b)*(h||0)),t.moveTo(p+(g||w),v+(m||x));for(var E=1;f-1>E;E++){var L=l[E];t.lineTo(L[0]-o,L[1]-a)}t.lineTo(d,y)}function T(t,r){var n=r.defX,o=void 0===n?0:n,i=r.defY,a=void 0===i?0:i,c=r.markerStart,s=r.markerEnd,u=r.markerStartOffset,h=r.markerEndOffset,l=r.points.points,f=l.length,p=l[0][0]-o,v=l[0][1]-a,d=l[f-1][0]-o,y=l[f-1][1]-a,g=0,m=0,w=0,x=0,b=0;c&&e.isDisplayObject(c)&&u&&(g=Math.cos(b=Math.atan2(l[1][1]-l[0][1],l[1][0]-l[0][0]))*(u||0),m=Math.sin(b)*(u||0)),s&&e.isDisplayObject(s)&&h&&(w=Math.cos(b=Math.atan2(l[f-2][1]-l[f-1][1],l[f-2][0]-l[f-1][0]))*(h||0),x=Math.sin(b)*(h||0)),t.moveTo(p+g,v+m);for(var E=1;f-1>E;E++){var L=l[E];t.lineTo(L[0]-o,L[1]-a)}t.lineTo(d+w,y+x)}function _(t,e){var r=e.radius,n=e.width,o=e.height,i=n,a=o;if(r&&r.some((function(t){return 0!==t}))){var c=n>0?1:-1,s=o>0?1:-1,u=c+s===0,h=r.map((function(t){return E(t,0,Math.min(Math.abs(i)/2,Math.abs(a)/2))})),l=h[0],f=h[1],p=h[2],v=h[3];t.moveTo(c*l,0),t.lineTo(i-c*f,0),0!==f&&t.arc(i-c*f,s*f,f,-s*Math.PI/2,c>0?0:Math.PI,u),t.lineTo(i,a-s*p),0!==p&&t.arc(i-c*p,a-s*p,p,c>0?0:Math.PI,s>0?Math.PI/2:1.5*Math.PI,u),t.lineTo(c*v,a),0!==v&&t.arc(c*v,a-s*v,v,s>0?Math.PI/2:-Math.PI/2,c>0?Math.PI:0,u),t.lineTo(0,s*l),0!==l&&t.arc(c*l,s*l,l,c>0?Math.PI:0,s>0?1.5*Math.PI:Math.PI/2,u)}else t.rect(0,0,i,a)}var C=function(t){var r,n;function o(){for(var e,r=arguments.length,n=Array(r),o=0;r>o;o++)n[o]=arguments[o];return(e=t.call.apply(t,[this].concat(n))||this).name="canvas-path-generator",e}(r=o).prototype=Object.create((n=t).prototype),r.prototype.constructor=r,O(r,n);var i=o.prototype;return i.init=function(){var t,r=((t={})[e.Shape.CIRCLE]=P,t[e.Shape.ELLIPSE]=M,t[e.Shape.RECT]=_,t[e.Shape.LINE]=S,t[e.Shape.POLYLINE]=T,t[e.Shape.POLYGON]=A,t[e.Shape.PATH]=k,t[e.Shape.TEXT]=void 0,t[e.Shape.GROUP]=void 0,t[e.Shape.IMAGE]=void 0,t[e.Shape.HTML]=void 0,t[e.Shape.MESH]=void 0,t);this.context.pathGeneratorFactory=r},i.destroy=function(){delete this.context.pathGeneratorFactory},o}(e.AbstractRendererPlugin),j=Object.freeze({__proto__:null,Plugin:C});function N(){N=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function u(t,e,r,o){var i=Object.create((e&&e.prototype instanceof f?e:f).prototype),a=new P(o||[]);return n(i,"_invoke",{value:b(t,r,a)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function f(){}function p(){}function v(){}var d={};s(d,i,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(M([])));g&&g!==e&&r.call(g,i)&&(d=g);var m=v.prototype=f.prototype=Object.create(d);function w(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function o(n,i,a,c){var s=h(t[n],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){o("next",t,a,c)}),(function(t){o("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return o("throw",t,a,c)}))}c(s.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}})}function b(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return S()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=E(a,r);if(c){if(c===l)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=h(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}function E(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),l;var o=h(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,l;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function M(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=v,n(m,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:p,configurable:!0}),p.displayName=s(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,s(t,c,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},w(x.prototype),s(x.prototype,a,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new x(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(m),s(m,c,"Generator"),s(m,i,(function(){return this})),s(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=M,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(O),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(this.prev>=i.tryLoc){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(i.catchLoc>this.prev)return n(i.catchLoc,!0);if(i.finallyLoc>this.prev)return n(i.finallyLoc)}else if(c){if(i.catchLoc>this.prev)return n(i.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(i.finallyLoc>this.prev)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(this.prev>=o.tryLoc&&r.call(o,"finallyLoc")&&o.finallyLoc>this.prev){var i=o;break}}i&&("break"===t||"continue"===t)&&e>=i.tryLoc&&i.finallyLoc>=e&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;O(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:M(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function R(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function I(t,e){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},I(t,e)}function G(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);e>r;r++)n[r]=t[r];return n}function F(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return G(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?G(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0;return function(){return t.length>n?{done:!1,value:t[n++]}:{done:!0}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var D=f(),B=f(),$=f(),H=s(),Y=function(){function t(){var t=this;this.canvasConfig=void 0,this.pathGeneratorFactory=void 0,this.pointInPathPickerFactory=void 0,this.isHit=function(r,n,o,i,a){var c,s,u,h,l,f,d,y,g,m,w,x,b,E,L,O,P,M,S,k,A,T,_,C,j,N,R,I,G,F,D,Y=t.pointInPathPickerFactory[r.nodeName];if(Y){var W=(c=H,(D=(S=(u=(s=o)[0])*(y=s[5])-(h=s[1])*(d=s[4]))*(F=(b=s[10])*(M=s[15])-(E=s[11])*(P=s[14]))-(k=u*(g=s[6])-(l=s[2])*d)*(G=(x=s[9])*M-E*(O=s[13]))+(A=u*(m=s[7])-(f=s[3])*d)*(I=x*P-b*O)+(T=h*g-l*y)*(R=(w=s[8])*M-E*(L=s[12]))-(_=h*m-f*y)*(N=w*P-b*L)+(C=l*m-f*g)*(j=w*O-x*L))?(c[0]=(y*F-g*G+m*I)*(D=1/D),c[1]=(l*G-h*F-f*I)*D,c[2]=(O*C-P*_+M*T)*D,c[3]=(b*_-x*C-E*T)*D,c[4]=(g*R-d*F-m*N)*D,c[5]=(u*F-l*R+f*N)*D,c[6]=(P*A-L*C-M*k)*D,c[7]=(w*C-b*A+E*k)*D,c[8]=(d*G-y*R+m*j)*D,c[9]=(h*R-u*G-f*j)*D,c[10]=(L*_-O*A+M*S)*D,c[11]=(x*A-w*_-E*S)*D,c[12]=(y*N-d*I-g*j)*D,c[13]=(u*I-h*N+l*j)*D,c[14]=(O*k-L*T-P*S)*D,c[15]=(w*T-x*k+b*S)*D,c):null),U=v(B,p($,n[0],n[1],0),W),X=r.getGeometryBounds().halfExtents,z=r.parsedStyle.anchor;if(U[0]+=(z&&z[0]||0)*X[0]*2,U[1]+=(z&&z[1]||0)*X[1]*2,Y(r,new e.Point(U[0],U[1]),i,t.isPointInPath,a))return!0}return!1},this.isPointInPath=function(e,r,n){var o=e.offscreenCanvas.getOrCreateContext(t.canvasConfig.offscreenCanvas),i=t.pathGeneratorFactory[r.nodeName];return i&&(o.beginPath(),i(o,r.parsedStyle),o.closePath()),o.isPointInPath(n.x,n.y)}}var r=t.prototype;return r.apply=function(e,r){var n,o=this,i=e.renderingService,a=e.renderingContext,c=e.pathGeneratorFactory,s=e.pointInPathPickerFactory;this.canvasConfig=e.config,this.pathGeneratorFactory=c,this.pointInPathPickerFactory=s;var u=null===(n=a.root)||void 0===n?void 0:n.ownerDocument;i.hooks.pick.tapPromise(t.tag,function(){var t,e=(t=N().mark((function t(e){return N().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o.pick(u,e,r));case 1:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){R(i,n,o,a,c,"next",t)}function c(t){R(i,n,o,a,c,"throw",t)}a(void 0)}))});return function(t){return e.apply(this,arguments)}}()),i.hooks.pickSync.tap(t.tag,(function(t){return o.pick(u,t,r)}))},r.pick=function(t,r,n){for(var o,i=r.topmost,a=r.position,c=p(D,a.x,a.y,0),s=[],u=F(t.elementsFromBBox(c[0],c[1],c[0],c[1]));!(o=u()).done;){var h=o.value,l=h.getWorldTransform();if(this.isHit(h,c,l,!1,n)){var f=e.findClosestClipPathTarget(h);if(f){var v=f.parsedStyle.clipPath;if(this.isHit(v,c,v.getWorldTransform(),!0,n)){if(i)return r.picked=[h],r;s.push(h)}}else{if(i)return r.picked=[h],r;s.push(h)}}}return r.picked=s,r},t}();function W(t,e,r,n){var o=t-r,i=e-n;return Math.sqrt(o*o+i*i)}function U(t,e){return.001>Math.abs(t-e)}function X(t,e){var r=Math.min.apply(Math,t),n=Math.min.apply(Math,e);return{x:r,y:n,width:Math.max.apply(Math,t)-r,height:Math.max.apply(Math,e)-n}}function z(t){return(t+2*Math.PI)%(2*Math.PI)}Y.tag="CanvasPicker";var q={box:function(t,e,r,n){return X([t,r],[e,n])},length:function(t,e,r,n){return W(t,e,r,n)},pointAt:function(t,e,r,n,o){return{x:(1-o)*t+o*r,y:(1-o)*e+o*n}},pointDistance:function(t,e,r,n,o,i){var a=(r-t)*(o-t)+(n-e)*(i-e);return 0>a?W(t,e,o,i):a>(r-t)*(r-t)+(n-e)*(n-e)?W(r,n,o,i):this.pointToLine(t,e,r,n,o,i)},pointToLine:function(t,e,r,n,o,i){var a=[r-t,n-e];if(function(t,e){return t[0]===e[0]&&t[1]===e[1]}(a,[0,0]))return Math.sqrt((o-t)*(o-t)+(i-e)*(i-e));var c=[-a[1],a[0]];return function(t,e){var r=e[0],n=e[1],o=r*r+n*n;o>0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o}(c,c),Math.abs(function(t,e){return t[0]*e[0]+t[1]*e[1]}([o-t,i-e],c))},tangentAngle:function(t,e,r,n){return Math.atan2(n-e,r-t)}};function Q(t,e,r,n,o,i){var a=-1,c=1/0,s=[r,n],u=20;i&&i>200&&(u=i/10);for(var h=1/u,l=h/10,f=0;u>=f;f++){var p=f*h,v=[o.apply(void 0,t.concat([p])),o.apply(void 0,e.concat([p]))],d=W(s[0],s[1],v[0],v[1]);c>d&&(a=p,c=d)}if(0===a)return{x:t[0],y:e[0]};if(1===a){var y=t.length;return{x:t[y-1],y:e[y-1]}}c=1/0;for(var g=0;32>g&&1e-4<=l;g++){var m=a-l,w=a+l,x=[o.apply(void 0,t.concat([m])),o.apply(void 0,e.concat([m]))],b=W(s[0],s[1],x[0],x[1]);if(m>=0&&c>b)a=m,c=b;else{var E=[o.apply(void 0,t.concat([w])),o.apply(void 0,e.concat([w]))],L=W(s[0],s[1],E[0],E[1]);1>=w&&c>L?(a=w,c=L):l*=.5}}return{x:o.apply(void 0,t.concat([a])),y:o.apply(void 0,e.concat([a]))}}function V(t,e,r,n){var o=1-n;return o*o*t+2*n*o*e+n*n*r}function Z(t,e,r){var n=t+r-2*e;if(U(n,0))return[.5];var o=(t-e)/n;return o>1||0>o?[]:[o]}function J(t,e,r,n){return 2*(1-n)*(e-t)+2*n*(r-e)}function K(t,e,r,n,o,i,a){var c=V(t,r,o,a),s=V(e,n,i,a),u=q.pointAt(t,e,r,n,a),h=q.pointAt(r,n,o,i,a);return[[t,e,u.x,u.y,c,s],[c,s,h.x,h.y,o,i]]}function tt(t,e,r,n,o,i,a){if(0===a)return(W(t,e,r,n)+W(r,n,o,i)+W(t,e,o,i))/2;var c=K(t,e,r,n,o,i,.5),s=c[0],u=c[1];return s.push(a-1),u.push(a-1),tt.apply(void 0,s)+tt.apply(void 0,u)}var et={box:function(t,e,r,n,o,i){var a=Z(t,r,o)[0],c=Z(e,n,i)[0],s=[t,o],u=[e,i];return void 0!==a&&s.push(V(t,r,o,a)),void 0!==c&&u.push(V(e,n,i,c)),X(s,u)},length:function(t,e,r,n,o,i){return tt(t,e,r,n,o,i,3)},nearestPoint:function(t,e,r,n,o,i,a,c){return Q([t,r,o],[e,n,i],a,c,V)},pointDistance:function(t,e,r,n,o,i,a,c){var s=this.nearestPoint(t,e,r,n,o,i,a,c);return W(s.x,s.y,a,c)},interpolationAt:V,pointAt:function(t,e,r,n,o,i,a){return{x:V(t,r,o,a),y:V(e,n,i,a)}},divide:function(t,e,r,n,o,i,a){return K(t,e,r,n,o,i,a)},tangentAngle:function(t,e,r,n,o,i,a){var c=J(t,r,o,a),s=J(e,n,i,a);return z(Math.atan2(s,c))}};function rt(t,e,r,n,o){var i=1-o;return i*i*i*t+3*e*o*i*i+3*r*o*o*i+n*o*o*o}function nt(t,e,r,n,o){var i=1-o;return 3*(i*i*(e-t)+2*i*o*(r-e)+o*o*(n-r))}function ot(t,e,r,n){var o,i,a,c=-3*t+9*e-9*r+3*n,s=6*t-12*e+6*r,u=3*e-3*t,h=[];if(U(c,0))U(s,0)||0>(o=-u/s)||o>1||h.push(o);else{var l=s*s-4*c*u;U(l,0)?h.push(-s/(2*c)):l>0&&(i=(-s-(a=Math.sqrt(l)))/(2*c),0>(o=(-s+a)/(2*c))||o>1||h.push(o),0>i||i>1||h.push(i))}return h}function it(t,e,r,n,o,i,a,c,s){var u=rt(t,r,o,a,s),h=rt(e,n,i,c,s),l=q.pointAt(t,e,r,n,s),f=q.pointAt(r,n,o,i,s),p=q.pointAt(o,i,a,c,s),v=q.pointAt(l.x,l.y,f.x,f.y,s),d=q.pointAt(f.x,f.y,p.x,p.y,s);return[[t,e,l.x,l.y,v.x,v.y,u,h],[u,h,d.x,d.y,p.x,p.y,a,c]]}function at(t,e,r,n,o,i,a,c,s){if(0===s)return function(t,e){for(var r=0,n=t.length,o=0;n>o;o++)r+=W(t[o],e[o],t[(o+1)%n],e[(o+1)%n]);return r/2}([t,r,o,a],[e,n,i,c]);var u=it(t,e,r,n,o,i,a,c,.5),h=[].concat(u[0],[s-1]),l=[].concat(u[1],[s-1]);return at.apply(void 0,h)+at.apply(void 0,l)}var ct={extrema:ot,box:function(t,e,r,n,o,i,a,c){for(var s=[t,a],u=[e,c],h=ot(t,r,o,a),l=ot(e,n,i,c),f=0;h.length>f;f++)s.push(rt(t,r,o,a,h[f]));for(var p=0;l.length>p;p++)u.push(rt(e,n,i,c,l[p]));return X(s,u)},length:function(t,e,r,n,o,i,a,c){return at(t,e,r,n,o,i,a,c,3)},nearestPoint:function(t,e,r,n,o,i,a,c,s,u,h){return Q([t,r,o,a],[e,n,i,c],s,u,rt,h)},pointDistance:function(t,e,r,n,o,i,a,c,s,u,h){var l=this.nearestPoint(t,e,r,n,o,i,a,c,s,u,h);return W(l.x,l.y,s,u)},interpolationAt:rt,pointAt:function(t,e,r,n,o,i,a,c,s){return{x:rt(t,r,o,a,s),y:rt(e,n,i,c,s)}},divide:function(t,e,r,n,o,i,a,c,s){return it(t,e,r,n,o,i,a,c,s)},tangentAngle:function(t,e,r,n,o,i,a,c,s){var u=nt(t,r,o,a,s),h=nt(e,n,i,c,s);return z(Math.atan2(h,u))}};function st(t,e,r,n){var o=t-r,i=e-n;return Math.sqrt(o*o+i*i)}function ut(t,e,r,n,o,i){return!(t>o||o>t+r||e>i||i>e+n)}function ht(t,e,r,n,o,i,a,c){var s=(Math.atan2(c-e,a-t)+2*Math.PI)%(2*Math.PI),u={x:t+r*Math.cos(s),y:e+r*Math.sin(s)};return st(u.x,u.y,a,c)<=i/2}function lt(t,e,r,n,o,i,a){var c=o/2;return!(Math.min(t,r)-c>i||i>Math.max(t,r)+c||Math.min(e,n)-c>a||a>Math.max(e,n)+c)&&q.pointToLine(t,e,r,n,i,a)<=o/2}function ft(t,e,r,n,o){var i=t.length;if(2>i)return!1;for(var a=0;i-1>a;a++){if(lt(t[a][0],t[a][1],t[a+1][0],t[a+1][1],e,r,n))return!0}if(o){var c=t[0],s=t[i-1];if(lt(c[0],c[1],s[0],s[1],e,r,n))return!0}return!1}var pt=1e-6;function vt(t){return pt>Math.abs(t)?0:0>t?-1:1}function dt(t,e,r){return!((r[0]-t[0])*(e[1]-t[1])!=(e[0]-t[0])*(r[1]-t[1])||Math.min(t[0],e[0])>r[0]||r[0]>Math.max(t[0],e[0])||Math.min(t[1],e[1])>r[1]||r[1]>Math.max(t[1],e[1]))}function yt(t,e,r){var n=!1,o=t.length;if(2>=o)return!1;for(var i=0;o>i;i++){var a=t[i],c=t[(i+1)%o];if(dt(a,c,[e,r]))return!0;vt(a[1]-r)>0!=vt(c[1]-r)>0&&0>vt(e-(r-a[1])*(a[0]-c[0])/(a[1]-c[1])-a[0])&&(n=!n)}return n}function gt(t,e,r){for(var n=!1,o=0;t.length>o;o++){if(n=yt(t[o],e,r))break}return n}function mt(t,r,n){var o=t.parsedStyle,i=o.r,a=o.fill,c=o.stroke,s=o.pointerEvents,u=((o.lineWidth||0)+(o.increasedLineWidthForHitTesting||0))/2,h=st(i,i,r.x,r.y),l=e.isFillOrStrokeAffected(s,a,c),f=l[0],p=l[1];return f&&p||n?i+u>=h:f?i>=h:!!p&&(h>=i-u&&i+u>=h)}function wt(t,e,r,n){return t/(r*r)+e/(n*n)}function xt(t,r,n){var o=t.parsedStyle,i=o.rx,a=o.ry,c=o.lineWidth,s=o.increasedLineWidthForHitTesting,u=r.x,h=r.y,l=e.isFillOrStrokeAffected(o.pointerEvents,o.fill,o.stroke),f=l[0],p=l[1],v=((c||0)+(s||0))/2,d=(u-i)*(u-i),y=(h-a)*(h-a);return f&&p||n?1>=wt(d,y,i+v,a+v):f?1>=wt(d,y,i,a):!!p&&(wt(d,y,i-v,a-v)>=1&&1>=wt(d,y,i+v,a+v))}function bt(t,r,n){var o=t.parsedStyle,i=o.x1,a=o.y1,c=o.x2,s=o.y2,u=o.lineWidth,h=o.increasedLineWidthForHitTesting,l=o.defX,f=void 0===l?0:l,p=o.defY,v=void 0===p?0:p;return!(!e.isFillOrStrokeAffected(o.pointerEvents,o.fill,o.stroke)[1]&&!n||!u)&&lt(i,a,c,s,(u||0)+(h||0),r.x+f,r.y+v)}function Et(t,r,n,o,i){var a=t.parsedStyle,c=a.lineWidth,s=a.increasedLineWidthForHitTesting,u=a.defX,h=void 0===u?0:u,l=a.defY,f=void 0===l?0:l,p=a.path,v=p.segments,d=p.hasArc,y=p.polylines,m=p.polygons,w=e.isFillOrStrokeAffected(a.pointerEvents,(null==m?void 0:m.length)&&a.fill,a.stroke),x=w[0],b=w[1],E=e.getOrCalculatePathTotalLength(t),L=!1;return x||n?L=d?o(i,t,r):gt(m,r.x+h,r.y+f)||gt(y,r.x+h,r.y+f):((b||n)&&(L=function(t,e,r,n,o){for(var i=!1,a=e/2,c=0;t.length>c;c++){var s=t[c],u=s.currentPoint,h=s.params,l=s.prePoint,f=s.box;if(!f||ut(f.x-a,f.y-a,f.width+e,f.height+e,r,n))switch(s.command){case"L":case"Z":if(i=lt(l[0],l[1],u[0],u[1],e,r,n))return!0;break;case"Q":if(i=e/2>=et.pointDistance(l[0],l[1],h[1],h[2],h[3],h[4],r,n))return!0;break;case"C":if(i=e/2>=ct.pointDistance(l[0],l[1],h[1],h[2],h[3],h[4],h[5],h[6],r,n,o))return!0;break;case"A":s.cubicParams||(s.cubicParams=g(l[0],l[1],h[1],h[2],h[3],h[4],h[5],h[6],h[7],void 0));for(var p=s.cubicParams,v=l,d=0;p.length>d;d+=6){var y=ct.pointDistance(v[0],v[1],p[d],p[d+1],p[d+2],p[d+3],p[d+4],p[d+5],r,n,o);if(v=[p[d+4],p[d+5]],i=e/2>=y)return!0}}}return i}(v,(c||0)+(s||0),r.x+h,r.y+f,E)),L)}function Lt(t,r,n){var o=t.parsedStyle,i=o.lineWidth,a=o.increasedLineWidthForHitTesting,c=o.points,s=o.defX,u=void 0===s?0:s,h=o.defY,l=void 0===h?0:h,f=e.isFillOrStrokeAffected(o.pointerEvents,o.fill,o.stroke),p=f[0],v=!1;return(f[1]||n)&&(v=ft(c.points,(i||0)+(a||0),r.x+u,r.y+l,!0)),v||!p&&!n||(v=yt(c.points,r.x+u,r.y+l)),v}function Ot(t,r,n){var o=t.parsedStyle,i=o.lineWidth,a=o.increasedLineWidthForHitTesting,c=o.points,s=o.defX,u=void 0===s?0:s,h=o.defY,l=void 0===h?0:h;return!(!e.isFillOrStrokeAffected(o.pointerEvents,o.fill,o.stroke)[1]&&!n||!i)&&ft(c.points,(i||0)+(a||0),r.x+u,r.y+l,!1)}function Pt(t,r,n,o,i){var a=t.parsedStyle,c=a.radius,s=a.lineWidth,u=a.increasedLineWidthForHitTesting,h=a.width,l=a.height,f=e.isFillOrStrokeAffected(a.pointerEvents,a.fill,a.stroke),p=f[0],v=f[1],d=(s||0)+(u||0);if(c&&c.some((function(t){return 0!==t}))){var y=!1;return(v||n)&&(y=function(t,e,r,n,o,i,a,c){var s=o[0],u=o[1],h=o[2],l=o[3];return lt(t+s,e,t+r-u,e,i,a,c)||lt(t+r,e+u,t+r,e+n-h,i,a,c)||lt(t+r-h,e+n,t+l,e+n,i,a,c)||lt(t,e+n-l,t,e+s,i,a,c)||ht(t+r-u,e+u,u,0,0,i,a,c)||ht(t+r-h,e+n-h,h,0,0,i,a,c)||ht(t+l,e+n-l,l,0,0,i,a,c)||ht(t+s,e+s,s,0,0,i,a,c)}(0,0,h,l,c.map((function(t){return E(t,0,Math.min(Math.abs(h)/2,Math.abs(l)/2))})),d,r.x,r.y)),y||!p&&!n||(y=o(i,t,r)),y}var g=d/2;return p&&v||n?ut(0-g,0-g,h+g,l+g,r.x,r.y):p?ut(0,0,h,l,r.x,r.y):!!v&&function(t,e,r,n,o,i,a){var c=o/2;return ut(t-c,e-c,r,o,i,a)||ut(t+r-c,e-c,o,n,i,a)||ut(t+c,e+n-c,r,o,i,a)||ut(t-c,e+c,o,n,i,a)}(0,0,h,l,d,r.x,r.y)}var Mt=function(t){var r,n;function o(){for(var e,r=arguments.length,n=Array(r),o=0;r>o;o++)n[o]=arguments[o];return(e=t.call.apply(t,[this].concat(n))||this).name="canvas-picker",e}(r=o).prototype=Object.create((n=t).prototype),r.prototype.constructor=r,I(r,n);var i=o.prototype;return i.init=function(){var t,r=function(){return!0},n=((t={})[e.Shape.CIRCLE]=mt,t[e.Shape.ELLIPSE]=xt,t[e.Shape.RECT]=Pt,t[e.Shape.LINE]=bt,t[e.Shape.POLYLINE]=Ot,t[e.Shape.POLYGON]=Lt,t[e.Shape.PATH]=Et,t[e.Shape.TEXT]=r,t[e.Shape.GROUP]=null,t[e.Shape.IMAGE]=r,t[e.Shape.HTML]=null,t[e.Shape.MESH]=null,t);this.context.pointInPathPickerFactory=n,this.addRenderingPlugin(new Y)},i.destroy=function(){delete this.context.pointInPathPickerFactory,this.removeAllRenderingPlugins()},o}(e.AbstractRendererPlugin),St=Object.freeze({__proto__:null,Plugin:Mt});function kt(){kt=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function u(t,e,r,o){var i=Object.create((e&&e.prototype instanceof f?e:f).prototype),a=new P(o||[]);return n(i,"_invoke",{value:b(t,r,a)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function f(){}function p(){}function v(){}var d={};s(d,i,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(M([])));g&&g!==e&&r.call(g,i)&&(d=g);var m=v.prototype=f.prototype=Object.create(d);function w(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function o(n,i,a,c){var s=h(t[n],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){o("next",t,a,c)}),(function(t){o("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return o("throw",t,a,c)}))}c(s.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}})}function b(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return S()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=E(a,r);if(c){if(c===l)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=h(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}function E(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),l;var o=h(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,l;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function M(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=v,n(m,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:p,configurable:!0}),p.displayName=s(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,s(t,c,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},w(x.prototype),s(x.prototype,a,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new x(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(m),s(m,c,"Generator"),s(m,i,(function(){return this})),s(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=M,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(O),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(this.prev>=i.tryLoc){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(i.catchLoc>this.prev)return n(i.catchLoc,!0);if(i.finallyLoc>this.prev)return n(i.finallyLoc)}else if(c){if(i.catchLoc>this.prev)return n(i.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(i.finallyLoc>this.prev)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(this.prev>=o.tryLoc&&r.call(o,"finallyLoc")&&o.finallyLoc>this.prev){var i=o;break}}i&&("break"===t||"continue"===t)&&e>=i.tryLoc&&i.finallyLoc>=e&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;O(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:M(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function At(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function Tt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){At(i,n,o,a,c,"next",t)}function c(t){At(i,n,o,a,c,"throw",t)}a(void 0)}))}}function _t(){return _t=Object.assign?Object.assign.bind():function(t){for(var e=1;arguments.length>e;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},_t.apply(this,arguments)}function Ct(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,jt(t,e)}function jt(t,e){return jt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},jt(t,e)}var Nt=function(){function t(t){this.canvasRendererPluginOptions=void 0,this.context=void 0,this.pathGeneratorFactory=void 0,this.rBush=void 0,this.removedRBushNodeAABBs=[],this.renderQueue=[],this.restoreStack=[],this.clearFullScreen=!1,this.vpMatrix=s(),this.dprMatrix=s(),this.tmpMat4=s(),this.vec3a=f(),this.vec3b=f(),this.vec3c=f(),this.vec3d=f(),this.canvasRendererPluginOptions=t}var r=t.prototype;return r.apply=function(r,n){var o=this;this.context=r;var i=r.config,a=r.camera,c=r.renderingService,s=r.renderingContext,u=r.pathGeneratorFactory;this.rBush=r.rBushRoot,this.pathGeneratorFactory=u;var l=r.contextService,f=s.root.ownerDocument.defaultView,p=function(t){var e=t.target.rBushNode;e.aabb&&o.removedRBushNodeAABBs.push(e.aabb)},d=function(t){var e=t.target.rBushNode;e.aabb&&o.removedRBushNodeAABBs.push(e.aabb)};c.hooks.init.tapPromise(t.tag,Tt(kt().mark((function t(){var r,n,a,c;return kt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:f.addEventListener(e.ElementEvent.UNMOUNTED,p),f.addEventListener(e.ElementEvent.CULLED,d),r=l.getDPR(),n=i.width,a=i.height,c=l.getContext(),o.clearRect(c,0,0,n*r,a*r,i.background);case 6:case"end":return t.stop()}}),t)})))),c.hooks.destroy.tap(t.tag,(function(){f.removeEventListener(e.ElementEvent.UNMOUNTED,p),f.removeEventListener(e.ElementEvent.CULLED,d)})),c.hooks.beginFrame.tap(t.tag,(function(){var t=l.getContext(),e=l.getDPR(),r=i.width,n=i.height,a=o.canvasRendererPluginOptions,s=a.dirtyObjectNumThreshold,u=a.dirtyObjectRatioThreshold,h=c.getStats(),f=h.rendered,p=f/h.total;o.clearFullScreen=c.disableDirtyRectangleRendering()||f>s&&p>u,t&&(t.resetTransform?t.resetTransform():t.setTransform(1,0,0,1,0,0),o.clearFullScreen&&o.clearRect(t,0,0,r*e,n*e,i.background))}));var y=function t(e,r){e.isVisible()&&!e.isCulled()&&(o.renderDisplayObject(e,r,o.context,o.restoreStack,n),o.saveDirtyAABB(e)),(e.sortable.sorted||e.childNodes).forEach((function(e){t(e,r)}))};c.hooks.endFrame.tap(t.tag,(function(){var t,r,c=l.getContext(),u=l.getDPR();if((t=o.dprMatrix)[0]=(r=[u,u,1])[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=r[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,h(o.vpMatrix,o.dprMatrix,a.getOrthoMatrix()),o.clearFullScreen)y(s.root,c);else{var p=o.safeMergeAABB.apply(o,[o.mergeDirtyAABBs(o.renderQueue)].concat(o.removedRBushNodeAABBs.map((function(t){var r=t.minX,n=t.minY,o=t.maxX,i=t.maxY,a=new e.AABB;return a.setMinMax([r,n,0],[o,i,0]),a}))));if(o.removedRBushNodeAABBs=[],e.AABB.isEmpty(p))return void(o.renderQueue=[]);var d=o.convertAABB2Rect(p),g=d.x,m=d.y,w=d.width,x=d.height,b=v(o.vec3a,[g,m,0],o.vpMatrix),E=v(o.vec3b,[g+w,m,0],o.vpMatrix),L=v(o.vec3c,[g,m+x,0],o.vpMatrix),O=v(o.vec3d,[g+w,m+x,0],o.vpMatrix),P=Math.min(b[0],E[0],O[0],L[0]),M=Math.min(b[1],E[1],O[1],L[1]),S=Math.max(b[0],E[0],O[0],L[0]),k=Math.max(b[1],E[1],O[1],L[1]),A=Math.floor(P),T=Math.floor(M),_=Math.ceil(S-P),C=Math.ceil(k-M);c.save(),o.clearRect(c,A,T,_,C,i.background),c.beginPath(),c.rect(A,T,_,C),c.clip(),c.setTransform(o.vpMatrix[0],o.vpMatrix[1],o.vpMatrix[4],o.vpMatrix[5],o.vpMatrix[12],o.vpMatrix[13]),i.renderer.getConfig().enableDirtyRectangleRenderingDebug&&f.dispatchEvent(new e.CustomEvent(e.CanvasEvent.DIRTY_RECTANGLE,{dirtyRect:{x:A,y:T,width:_,height:C}})),o.searchDirtyObjects(p).sort((function(t,e){return t.sortable.renderOrder-e.sortable.renderOrder})).forEach((function(t){t&&t.isVisible()&&!t.isCulled()&&o.renderDisplayObject(t,c,o.context,o.restoreStack,n)})),c.restore(),o.renderQueue.forEach((function(t){o.saveDirtyAABB(t)})),o.renderQueue=[]}o.restoreStack.forEach((function(){c.restore()})),o.restoreStack=[]})),c.hooks.render.tap(t.tag,(function(t){o.clearFullScreen||o.renderQueue.push(t)}))},r.clearRect=function(t,e,r,n,o,i){t.clearRect(e,r,n,o),i&&(t.fillStyle=i,t.fillRect(e,r,n,o))},r.renderDisplayObject=function(t,r,n,o,i){var a=t.nodeName,c=o[o.length-1];!c||t.compareDocumentPosition(c)&Node.DOCUMENT_POSITION_CONTAINS||(r.restore(),o.pop());var s=this.context.styleRendererFactory[a],u=this.pathGeneratorFactory[a],h=t.parsedStyle.clipPath;if(h){this.applyWorldTransform(r,h);var l=this.pathGeneratorFactory[h.nodeName];l&&(r.save(),o.push(t),r.beginPath(),l(r,h.parsedStyle),r.closePath(),r.clip())}s&&(this.applyWorldTransform(r,t),r.save(),this.applyAttributesToContext(r,t)),u&&(r.beginPath(),u(r,t.parsedStyle),t.nodeName!==e.Shape.LINE&&t.nodeName!==e.Shape.PATH&&t.nodeName!==e.Shape.POLYLINE&&r.closePath()),s&&(s.render(r,t.parsedStyle,t,n,this,i),r.restore()),t.renderable.dirty=!1},r.convertAABB2Rect=function(t){var e=t.getMin(),r=t.getMax(),n=Math.floor(e[0]),o=Math.floor(e[1]);return{x:n,y:o,width:Math.ceil(r[0])-n,height:Math.ceil(r[1])-o}},r.mergeDirtyAABBs=function(t){var r=new e.AABB;return t.forEach((function(t){var e=t.getRenderBounds();r.add(e);var n=t.renderable.dirtyRenderBounds;n&&r.add(n)})),r},r.searchDirtyObjects=function(t){var e=t.getMin(),r=e[0],n=e[1],o=t.getMax();return this.rBush.search({minX:r,minY:n,maxX:o[0],maxY:o[1]}).map((function(t){return t.displayObject}))},r.saveDirtyAABB=function(t){var r=t.renderable;r.dirtyRenderBounds||(r.dirtyRenderBounds=new e.AABB);var n=t.getRenderBounds();n&&r.dirtyRenderBounds.update(n.center,n.halfExtents)},r.applyAttributesToContext=function(t,e){var r=e.parsedStyle,n=r.stroke,o=r.fill,i=r.opacity,a=r.lineDash,c=r.lineDashOffset;a&&t.setLineDash(a),m(c)||(t.lineDashOffset=c),m(i)||(t.globalAlpha*=i),m(n)||Array.isArray(n)||n.isNone||(t.strokeStyle=e.attributes.stroke),m(o)||Array.isArray(o)||o.isNone||(t.fillStyle=e.attributes.fill)},r.applyWorldTransform=function(t,e,r){var n=0,o=0,i=(e.parsedStyle||{}).anchor,a=i&&i[0]||0,c=i&&i[1]||0;if(0!==a||0!==c){var s=e.geometry.contentBounds;n=-a*(s&&2*s.halfExtents[0]||0),o=-c*(s&&2*s.halfExtents[1]||0)}r?(u(this.tmpMat4,e.getLocalTransform()),this.vec3a[0]=n,this.vec3a[1]=o,this.vec3a[2]=0,l(this.tmpMat4,this.tmpMat4,this.vec3a),h(this.tmpMat4,r,this.tmpMat4),h(this.tmpMat4,this.vpMatrix,this.tmpMat4)):(u(this.tmpMat4,e.getWorldTransform()),this.vec3a[0]=n,this.vec3a[1]=o,this.vec3a[2]=0,l(this.tmpMat4,this.tmpMat4,this.vec3a),h(this.tmpMat4,this.vpMatrix,this.tmpMat4)),t.setTransform(this.tmpMat4[0],this.tmpMat4[1],this.tmpMat4[4],this.tmpMat4[5],this.tmpMat4[12],this.tmpMat4[13])},r.safeMergeAABB=function(){for(var t=new e.AABB,r=arguments.length,n=Array(r),o=0;r>o;o++)n[o]=arguments[o];return n.forEach((function(e){t.add(e)})),t},t}();Nt.tag="CanvasRenderer";var Rt=function(){function t(t){this.imagePool=void 0,this.imagePool=t}var r=t.prototype;return r.render=function(t,r,n,o,i,a){var c=r.fill,s=r.fillRule,u=r.opacity,h=r.fillOpacity,l=r.stroke,f=r.strokeOpacity,p=r.lineWidth,v=r.lineCap,d=r.lineJoin,y=r.shadowType,g=r.shadowColor,w=r.shadowBlur,x=r.filter,b=r.miterLimit,E=!m(c)&&!c.isNone,L=!m(l)&&!l.isNone&&p>0,O=0===c.alpha,P=!(!x||!x.length),M=!m(g)&&w>0,S=n.nodeName,k="inner"===y,A=L&&M&&(S===e.Shape.PATH||S===e.Shape.LINE||S===e.Shape.POLYLINE||O||k);E&&(t.globalAlpha=u*h,A||It(n,t,M),this.fill(t,n,c,s,o,i,a),A||this.clearShadowAndFilter(t,P,M)),L&&(t.globalAlpha=u*f,t.lineWidth=p,m(b)||(t.miterLimit=b),m(v)||(t.lineCap=v),m(d)||(t.lineJoin=d),A&&(k&&(t.globalCompositeOperation="source-atop"),It(n,t,!0),k&&(this.stroke(t,n,l,o,i,a),t.globalCompositeOperation="source-over",this.clearShadowAndFilter(t,P,!0))),this.stroke(t,n,l,o,i,a))},r.clearShadowAndFilter=function(t,e,r){if(r&&(t.shadowColor="transparent",t.shadowBlur=0),e){var n=t.filter;!m(n)&&n.indexOf("drop-shadow")>-1&&(t.filter=n.replace(/drop-shadow\([^)]*\)/,"").trim()||"none")}},r.fill=function(t,r,n,o,i,a,c){var s=this;Array.isArray(n)?n.forEach((function(e){t.fillStyle=s.getColor(e,r,t),o?t.fill(o):t.fill()})):(e.isPattern(n)&&(t.fillStyle=this.getPattern(n,r,t,i,a,c)),o?t.fill(o):t.fill())},r.stroke=function(t,r,n,o,i,a){var c=this;Array.isArray(n)?n.forEach((function(e){t.strokeStyle=c.getColor(e,r,t),t.stroke()})):(e.isPattern(n)&&(t.strokeStyle=this.getPattern(n,r,t,o,i,a)),t.stroke())},r.getPattern=function(t,e,r,n,o,i){var a,c;if("rect"===t.image.nodeName){var s=t.image.parsedStyle,u=s.width,h=s.height;c=n.contextService.getDPR();var l=n.config.offscreenCanvas;(a=i.offscreenCanvas.getOrCreateCanvas(l)).width=u*c,a.height=h*c;var f=i.offscreenCanvas.getOrCreateContext(l),p=[];t.image.forEach((function(t){o.renderDisplayObject(t,f,n,p,i)})),p.forEach((function(){f.restore()}))}return this.imagePool.getOrCreatePatternSync(t,r,a,c,(function(){e.renderable.dirty=!0,n.renderingService.dirtify()}))},r.getColor=function(t,r,n){var o;if(t.type===e.GradientType.LinearGradient||t.type===e.GradientType.RadialGradient){var i=r.getGeometryBounds();o=this.imagePool.getOrCreateGradient(_t({type:t.type},t.value,{width:i&&2*i.halfExtents[0]||1,height:i&&2*i.halfExtents[1]||1}),n)}return o},t}();function It(t,e,r){var n=t.parsedStyle,o=n.filter,i=n.shadowColor,a=n.shadowBlur,c=n.shadowOffsetX,s=n.shadowOffsetY;o&&o.length&&(e.filter=t.style.filter),r&&(e.shadowColor=""+i,e.shadowBlur=a||0,e.shadowOffsetX=c||0,e.shadowOffsetY=s||0)}var Gt=function(){function t(t){this.imagePool=void 0,this.imagePool=t}return t.prototype.render=function(t,e,r){var n,o=e.img,i=e.shadowColor,a=e.shadowBlur,c=e.width,s=e.height;if(b(o)?n=this.imagePool.getImageSync(o):(c||(c=o.width),s||(s=o.height),n=o),n){It(r,t,!m(i)&&a>0);try{t.drawImage(n,0,0,c,s)}catch(t){}}},t}(),Ft=function(){function t(){}var r=t.prototype;return r.render=function(t,r,n){var o=r.lineWidth,i=r.textAlign,a=r.textBaseline,c=r.lineJoin,s=r.miterLimit,u=r.letterSpacing,h=r.stroke,l=r.fill,f=r.fillOpacity,p=r.strokeOpacity,v=r.opacity,d=r.metrics,y=r.dx,g=r.dy,w=r.shadowColor,x=r.shadowBlur,b=d.lines,E=d.height,L=d.lineHeight,O=d.lineMetrics;t.font=d.font,t.lineWidth=o,t.textAlign="middle"===i?"center":i;var P=a;e.runtime.enableCSSParsing||"alphabetic"!==P||(P="bottom"),t.lineJoin=c,m(s)||(t.miterLimit=s);var M=0;"middle"===a?M=-E/2-L/2:"bottom"===a||"alphabetic"===a||"ideographic"===a?M=-E:"top"!==a&&"hanging"!==a||(M=-L);var S=y||0;M+=g||0,1===b.length&&("bottom"===P?(P="middle",M-=.5*E):"top"===P&&(P="middle",M+=.5*E)),t.textBaseline=P,It(n,t,!m(w)&&x>0);for(var k=0;b.length>k;k++){var A=o/2+S;M+=L,m(h)||h.isNone||!o||this.drawLetterSpacing(t,b[k],O[k],i,A,M,u,f,p,v,!0),m(l)||this.drawLetterSpacing(t,b[k],O[k],i,A,M,u,f,p,v)}},r.drawLetterSpacing=function(t,e,r,n,o,i,a,c,s,u,h){if(void 0===h&&(h=!1),0!==a){var l=t.textAlign;t.textAlign="left";var f=o;"center"===n||"middle"===n?f=o-r.width/2:"right"!==n&&"end"!==n||(f=o-r.width);for(var p=Array.from(e),v=t.measureText(e).width,d=0,y=0;p.length>y;++y){var g=p[y];h?this.strokeText(t,g,f,i,s):this.fillText(t,g,f,i,c,u),f+=v-(d=t.measureText(e.substring(y+1)).width)+a,v=d}t.textAlign=l}else h?this.strokeText(t,e,o,i,s):this.fillText(t,e,o,i,c,u)},r.fillText=function(t,e,r,n,o,i){var a,c=!m(o)&&1!==o;c&&(a=t.globalAlpha,t.globalAlpha=o*i),t.fillText(e,r,n),c&&(t.globalAlpha=a)},r.strokeText=function(t,e,r,n,o){var i,a=!m(o)&&1!==o;a&&(i=t.globalAlpha,t.globalAlpha=o),t.strokeText(e,r,n),a&&(t.globalAlpha=i)},t}(),Dt=function(t){function e(){return t.apply(this,arguments)||this}return Ct(e,t),e}(Rt),Bt=function(t){function e(){return t.apply(this,arguments)||this}return Ct(e,t),e}(Rt),$t=function(t){function e(){return t.apply(this,arguments)||this}return Ct(e,t),e}(Rt),Ht=function(t){function e(){return t.apply(this,arguments)||this}return Ct(e,t),e}(Rt),Yt=function(t){function e(){return t.apply(this,arguments)||this}return Ct(e,t),e}(Rt),Wt=function(t){function e(){return t.apply(this,arguments)||this}return Ct(e,t),e}(Rt),Ut=function(t){function e(){return t.apply(this,arguments)||this}return Ct(e,t),e}(Rt),Xt=function(t){function r(e){var r;return void 0===e&&(e={}),(r=t.call(this)||this).options=void 0,r.name="canvas-renderer",r.options=e,r}Ct(r,t);var n=r.prototype;return n.init=function(){var t,r=_t({dirtyObjectNumThreshold:500,dirtyObjectRatioThreshold:.8},this.options),n=this.context.imagePool,o=new Rt(n),i=((t={})[e.Shape.CIRCLE]=o,t[e.Shape.ELLIPSE]=o,t[e.Shape.RECT]=o,t[e.Shape.IMAGE]=new Gt(n),t[e.Shape.TEXT]=new Ft,t[e.Shape.LINE]=o,t[e.Shape.POLYLINE]=o,t[e.Shape.POLYGON]=o,t[e.Shape.PATH]=o,t[e.Shape.GROUP]=void 0,t[e.Shape.HTML]=void 0,t[e.Shape.MESH]=void 0,t);this.context.defaultStyleRendererFactory=i,this.context.styleRendererFactory=i,this.addRenderingPlugin(new Nt(r))},n.destroy=function(){this.removeAllRenderingPlugins(),delete this.context.defaultStyleRendererFactory,delete this.context.styleRendererFactory},r}(e.AbstractRendererPlugin),zt=Object.freeze({__proto__:null,CircleRenderer:Bt,EllipseRenderer:$t,ImageRenderer:Gt,LineRenderer:Ht,PathRenderer:Ut,Plugin:Xt,PolygonRenderer:Wt,PolylineRenderer:Yt,RectRenderer:Dt,TextRenderer:Ft});function qt(){qt=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function u(t,e,r,o){var i=Object.create((e&&e.prototype instanceof f?e:f).prototype),a=new P(o||[]);return n(i,"_invoke",{value:b(t,r,a)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function f(){}function p(){}function v(){}var d={};s(d,i,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(M([])));g&&g!==e&&r.call(g,i)&&(d=g);var m=v.prototype=f.prototype=Object.create(d);function w(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function o(n,i,a,c){var s=h(t[n],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){o("next",t,a,c)}),(function(t){o("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return o("throw",t,a,c)}))}c(s.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}})}function b(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return S()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=E(a,r);if(c){if(c===l)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=h(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}function E(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),l;var o=h(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,l;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function M(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=v,n(m,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:p,configurable:!0}),p.displayName=s(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,s(t,c,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},w(x.prototype),s(x.prototype,a,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new x(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(m),s(m,c,"Generator"),s(m,i,(function(){return this})),s(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=M,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(O),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(this.prev>=i.tryLoc){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(i.catchLoc>this.prev)return n(i.catchLoc,!0);if(i.finallyLoc>this.prev)return n(i.finallyLoc)}else if(c){if(i.catchLoc>this.prev)return n(i.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(i.finallyLoc>this.prev)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(this.prev>=o.tryLoc&&r.call(o,"finallyLoc")&&o.finallyLoc>this.prev){var i=o;break}}i&&("break"===t||"continue"===t)&&e>=i.tryLoc&&i.finallyLoc>=e&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;O(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:M(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function Qt(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function Vt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Qt(i,n,o,a,c,"next",t)}function c(t){Qt(i,n,o,a,c,"throw",t)}a(void 0)}))}}function Zt(t,e){return Zt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Zt(t,e)}var Jt=function(){function t(){this.context=void 0}return t.prototype.apply=function(e,r){var n=this,o=e.renderingService,i=e.renderingContext,a=e.config;this.context=e;var c=i.root.ownerDocument.defaultView,s=function(t){o.hooks.pointerMove.call(t)},u=function(t){o.hooks.pointerUp.call(t)},h=function(t){o.hooks.pointerDown.call(t)},l=function(t){o.hooks.pointerOver.call(t)},f=function(t){o.hooks.pointerOut.call(t)},p=function(t){o.hooks.pointerCancel.call(t)},v=function(t){o.hooks.pointerWheel.call(t)},d=function(t){o.hooks.click.call(t)},y=function(t){r.globalThis.document.addEventListener("pointermove",s,!0),t.addEventListener("pointerdown",h,!0),t.addEventListener("pointerleave",f,!0),t.addEventListener("pointerover",l,!0),r.globalThis.addEventListener("pointerup",u,!0),r.globalThis.addEventListener("pointercancel",p,!0)},g=function(t){t.addEventListener("touchstart",h,!0),t.addEventListener("touchend",u,!0),t.addEventListener("touchmove",s,!0),t.addEventListener("touchcancel",p,!0)},m=function(t){r.globalThis.document.addEventListener("mousemove",s,!0),t.addEventListener("mousedown",h,!0),t.addEventListener("mouseout",f,!0),t.addEventListener("mouseover",l,!0),r.globalThis.addEventListener("mouseup",u,!0)};o.hooks.init.tapPromise(t.tag,Vt(qt().mark((function t(){var e;return qt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=n.context.contextService.getDomElement(),r.globalThis.navigator.msPointerEnabled?(e.style.msContentZooming="none",e.style.msTouchAction="none"):c.supportsPointerEvents&&(e.style.touchAction="none"),c.supportsPointerEvents?y(e):m(e),c.supportsTouchEvents&&g(e),a.useNativeClickEvent&&e.addEventListener("click",d,!0),e.addEventListener("wheel",v,{passive:!0,capture:!0});case 6:case"end":return t.stop()}}),t)})))),o.hooks.destroy.tap(t.tag,(function(){var t=n.context.contextService.getDomElement();r.globalThis.navigator.msPointerEnabled?(t.style.msContentZooming="",t.style.msTouchAction=""):c.supportsPointerEvents&&(t.style.touchAction=""),c.supportsPointerEvents?function(t){r.globalThis.document.removeEventListener("pointermove",s,!0),t.removeEventListener("pointerdown",h,!0),t.removeEventListener("pointerleave",f,!0),t.removeEventListener("pointerover",l,!0),r.globalThis.removeEventListener("pointerup",u,!0)}(t):function(t){r.globalThis.document.removeEventListener("mousemove",s,!0),t.removeEventListener("mousedown",h,!0),t.removeEventListener("mouseout",f,!0),t.removeEventListener("mouseover",l,!0),r.globalThis.removeEventListener("mouseup",u,!0)}(t),c.supportsTouchEvents&&function(t){t.removeEventListener("touchstart",h,!0),t.removeEventListener("touchend",u,!0),t.removeEventListener("touchmove",s,!0),t.removeEventListener("touchcancel",p,!0)}(t),a.useNativeClickEvent&&t.removeEventListener("click",d,!0),t.removeEventListener("wheel",v,!0)}))},t}();Jt.tag="DOMInteraction";var Kt=function(t){var e,r;function n(){for(var e,r=arguments.length,n=Array(r),o=0;r>o;o++)n[o]=arguments[o];return(e=t.call.apply(t,[this].concat(n))||this).name="dom-interaction",e}(e=n).prototype=Object.create((r=t).prototype),e.prototype.constructor=e,Zt(e,r);var o=n.prototype;return o.init=function(){this.addRenderingPlugin(new Jt)},o.destroy=function(){this.removeAllRenderingPlugins()},n}(e.AbstractRendererPlugin),te=Object.freeze({__proto__:null,Plugin:Kt});function ee(){ee=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function u(t,e,r,o){var i=Object.create((e&&e.prototype instanceof f?e:f).prototype),a=new P(o||[]);return n(i,"_invoke",{value:b(t,r,a)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function f(){}function p(){}function v(){}var d={};s(d,i,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(M([])));g&&g!==e&&r.call(g,i)&&(d=g);var m=v.prototype=f.prototype=Object.create(d);function w(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function o(n,i,a,c){var s=h(t[n],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){o("next",t,a,c)}),(function(t){o("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return o("throw",t,a,c)}))}c(s.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}})}function b(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return S()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=E(a,r);if(c){if(c===l)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=h(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}function E(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),l;var o=h(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,l;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function M(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=v,n(m,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:p,configurable:!0}),p.displayName=s(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,s(t,c,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},w(x.prototype),s(x.prototype,a,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new x(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(m),s(m,c,"Generator"),s(m,i,(function(){return this})),s(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=M,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(O),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(this.prev>=i.tryLoc){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(i.catchLoc>this.prev)return n(i.catchLoc,!0);if(i.finallyLoc>this.prev)return n(i.finallyLoc)}else if(c){if(i.catchLoc>this.prev)return n(i.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(i.finallyLoc>this.prev)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(this.prev>=o.tryLoc&&r.call(o,"finallyLoc")&&o.finallyLoc>this.prev){var i=o;break}}i&&("break"===t||"continue"===t)&&e>=i.tryLoc&&i.finallyLoc>=e&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;O(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:M(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function re(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function ne(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){re(i,n,o,a,c,"next",t)}function c(t){re(i,n,o,a,c,"throw",t)}a(void 0)}))}}function oe(t,e){return oe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},oe(t,e)}var ie=function(){function t(){this.context=void 0,this.$camera=void 0}var r=t.prototype;return r.joinTransformMatrix=function(t){return"matrix("+[t[0],t[1],t[4],t[5],t[12],t[13]].join(",")+")"},r.apply=function(r){var n=this,o=r.camera,i=r.renderingContext,a=r.renderingService;this.context=r;var c=i.root.ownerDocument.defaultView,s=function(t,e){e.style.transform=n.joinTransformMatrix(t.getWorldTransform())},u=function(t){var r=t.target;if(r.nodeName===e.Shape.HTML){n.$camera||(n.$camera=n.createCamera(o));var i=n.getOrCreateEl(r);n.$camera.appendChild(i);var a=r.ownerDocument.documentElement.attributes;Object.keys(a).forEach((function(t){i.style[t]=a[t]})),Object.keys(r.attributes).forEach((function(t){n.updateAttribute(t,r)})),s(r,i),e.runtime.nativeHTMLMap.set(i,r)}},h=function(t){var r=t.target;if(r.nodeName===e.Shape.HTML&&n.$camera){var o=n.getOrCreateEl(r);o&&(o.remove(),e.runtime.nativeHTMLMap.delete(o))}},l=function(t){var r=t.target;r.nodeName===e.Shape.HTML&&n.updateAttribute(t.attrName,r)},f=function(t){var r=t.target;if(r.nodeName===e.Shape.HTML){var o=n.getOrCreateEl(r);s(r,o)}},p=function(){if(n.$camera){var t=n.context.config,e=t.height;n.$camera.style.width=(t.width||0)+"px",n.$camera.style.height=(e||0)+"px"}};a.hooks.init.tapPromise(t.tag,ne(ee().mark((function t(){return ee().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:c.addEventListener(e.CanvasEvent.RESIZE,p),c.addEventListener(e.ElementEvent.MOUNTED,u),c.addEventListener(e.ElementEvent.UNMOUNTED,h),c.addEventListener(e.ElementEvent.ATTR_MODIFIED,l),c.addEventListener(e.ElementEvent.BOUNDS_CHANGED,f);case 5:case"end":return t.stop()}}),t)})))),a.hooks.endFrame.tap(t.tag,(function(){n.$camera&&i.renderReasons.has(e.RenderReason.CAMERA_CHANGED)&&(n.$camera.style.transform=n.joinTransformMatrix(o.getOrthoMatrix()))})),a.hooks.destroy.tap(t.tag,(function(){n.$camera&&n.$camera.remove(),c.removeEventListener(e.CanvasEvent.RESIZE,p),c.removeEventListener(e.ElementEvent.MOUNTED,u),c.removeEventListener(e.ElementEvent.UNMOUNTED,h),c.removeEventListener(e.ElementEvent.ATTR_MODIFIED,l),c.removeEventListener(e.ElementEvent.BOUNDS_CHANGED,f)}))},r.getId=function(t){return t.id||"g-html-"+t.entity},r.createCamera=function(t){var e=this.context.config,r=e.document,n=e.width,o=e.height,i=this.context.contextService.getDomElement(),a=i.parentNode;if(a){var c="g-canvas-camera",s=a.querySelector("#"+c);if(!s){var u=(r||document).createElement("div");s=u,u.id=c,u.style.position="absolute",u.style.left=(i.offsetLeft||0)+"px",u.style.top=(i.offsetTop||0)+"px",u.style.transformOrigin="left top",u.style.transform=this.joinTransformMatrix(t.getOrthoMatrix()),u.style.overflow="hidden",u.style.pointerEvents="none",u.style.width=(n||0)+"px",u.style.height=(o||0)+"px",a.appendChild(u)}return s}return null},r.getOrCreateEl=function(t){var e=this.context.config.document,r=this.getId(t),n=this.$camera.querySelector("#"+r);return n||(n=(e||document).createElement("div"),t.parsedStyle.$el=n,n.id=r,t.name&&n.setAttribute("name",t.name),t.className&&(n.className=t.className),n.style.position="absolute",n.style.left="0px",n.style.top="0px",n.style["will-change"]="transform",n.style.transform=this.joinTransformMatrix(t.getWorldTransform())),n},r.updateAttribute=function(t,r){var n=this.getOrCreateEl(r);switch(t){case"innerHTML":var o=r.parsedStyle.innerHTML;b(o)?n.innerHTML=o:(n.innerHTML="",n.appendChild(o));break;case"transformOrigin":var i=r.parsedStyle.transformOrigin;n.style["transform-origin"]=i[0].value+" "+i[1].value;break;case"width":if(e.runtime.enableCSSParsing){var a=r.computedStyleMap().get("width");n.style.width=""+a}else{var c=r.parsedStyle.width;n.style.width=L(c)?c+"px":""+c}break;case"height":if(e.runtime.enableCSSParsing){var s=r.computedStyleMap().get("height");n.style.height=""+s}else{var u=r.parsedStyle.height;n.style.height=L(u)?u+"px":""+u}break;case"zIndex":n.style["z-index"]=""+r.parsedStyle.zIndex;break;case"visibility":n.style.visibility=r.parsedStyle.visibility;break;case"pointerEvents":n.style.pointerEvents=r.parsedStyle.pointerEvents;break;case"opacity":n.style.opacity=""+r.parsedStyle.opacity;break;case"fill":var h=r.parsedStyle.fill,l="";e.isCSSRGB(h)?l=h.isNone?"transparent":r.getAttribute("fill"):Array.isArray(h)?l=r.getAttribute("fill"):e.isPattern(h),n.style.background=l;break;case"stroke":var f=r.parsedStyle.stroke,p="";e.isCSSRGB(f)?p=f.isNone?"transparent":r.getAttribute("stroke"):Array.isArray(f)?p=r.getAttribute("stroke"):e.isPattern(f),n.style["border-color"]=p,n.style["border-style"]="solid";break;case"lineWidth":n.style["border-width"]=(r.parsedStyle.lineWidth||0)+"px";break;case"lineDash":n.style["border-style"]="dashed";break;case"filter":n.style.filter=r.style.filter}},t}();ie.tag="HTMLRendering";var ae=function(t){var e,r;function n(){for(var e,r=arguments.length,n=Array(r),o=0;r>o;o++)n[o]=arguments[o];return(e=t.call.apply(t,[this].concat(n))||this).name="html-renderer",e}(e=n).prototype=Object.create((r=t).prototype),e.prototype.constructor=e,oe(e,r);var o=n.prototype;return o.init=function(){this.addRenderingPlugin(new ie)},o.destroy=function(){this.removeAllRenderingPlugins()},n}(e.AbstractRendererPlugin),ce=Object.freeze({__proto__:null,Plugin:ae});function se(){se=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function u(t,e,r,o){var i=Object.create((e&&e.prototype instanceof f?e:f).prototype),a=new P(o||[]);return n(i,"_invoke",{value:b(t,r,a)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function f(){}function p(){}function v(){}var d={};s(d,i,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(M([])));g&&g!==e&&r.call(g,i)&&(d=g);var m=v.prototype=f.prototype=Object.create(d);function w(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function o(n,i,a,c){var s=h(t[n],t,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){o("next",t,a,c)}),(function(t){o("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return o("throw",t,a,c)}))}c(s.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}})}function b(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return S()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=E(a,r);if(c){if(c===l)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=h(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}function E(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),l;var o=h(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,l;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function M(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=v,n(m,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:p,configurable:!0}),p.displayName=s(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,s(t,c,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},w(x.prototype),s(x.prototype,a,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new x(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(m),s(m,c,"Generator"),s(m,i,(function(){return this})),s(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=M,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(O),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(this.prev>=i.tryLoc){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(i.catchLoc>this.prev)return n(i.catchLoc,!0);if(i.finallyLoc>this.prev)return n(i.finallyLoc)}else if(c){if(i.catchLoc>this.prev)return n(i.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(i.finallyLoc>this.prev)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(this.prev>=o.tryLoc&&r.call(o,"finallyLoc")&&o.finallyLoc>this.prev){var i=o;break}}i&&("break"===t||"continue"===t)&&e>=i.tryLoc&&i.finallyLoc>=e&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;O(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:M(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}function ue(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function he(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){ue(i,n,o,a,c,"next",t)}function c(t){ue(i,n,o,a,c,"throw",t)}a(void 0)}))}}function le(t,e){return le=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},le(t,e)}var fe="undefined"!=typeof Float32Array?Float32Array:Array;Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var pe=function(){function t(t){this.canvasConfig=void 0,this.imageCache={},this.gradientCache={},this.patternCache={},this.canvasConfig=t}var r=t.prototype;return r.getImageSync=function(t,e){return this.imageCache[t]?e&&e():this.getOrCreateImage(t).then((function(){e&&e()})),this.imageCache[t]},r.getOrCreateImage=function(t){var r=this;if(this.imageCache[t])return Promise.resolve(this.imageCache[t]);var n=this.canvasConfig.createImage;return new Promise((function(o,i){var a;n?a=n(t):e.isBrowser&&(a=new window.Image),a&&(a.onload=function(){o(a)},a.onerror=function(t){i(t)},a.crossOrigin="Anonymous",a.src=t,r.imageCache[t]=a)}))},r.getOrCreatePatternSync=function(t,r,n,o,i){var a=this.generatePatternKey(t);if(a&&this.patternCache[a])return this.patternCache[a];var c,s=t.image,u=t.repetition,h=t.transform,l=!1;b(s)?c=this.getImageSync(s,i):n?(c=n,l=!0):c=s;var f,p,v=c&&r.createPattern(c,u);v&&(f=h?e.parsedTransformToMat4(e.parseTransform(h)):function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}((p=new fe(16),fe!=Float32Array&&(p[1]=0,p[2]=0,p[3]=0,p[4]=0,p[6]=0,p[7]=0,p[8]=0,p[9]=0,p[11]=0,p[12]=0,p[13]=0,p[14]=0),p[0]=1,p[5]=1,p[10]=1,p[15]=1,p)),l&&function(t,e,r){var n=r[0],o=r[1],i=r[2];t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*o,t[5]=e[5]*o,t[6]=e[6]*o,t[7]=e[7]*o,t[8]=e[8]*i,t[9]=e[9]*i,t[10]=e[10]*i,t[11]=e[11]*i,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]}(f,f,[1/o,1/o,1]),v.setTransform({a:f[0],b:f[1],c:f[4],d:f[5],e:f[12],f:f[13]}));return a&&v&&(this.patternCache[a]=v),v},r.getOrCreateGradient=function(t,r){var n=this.generateGradientKey(t),o=t.type,i=t.steps,a=t.width,c=t.height,s=t.cx,u=t.cy,h=t.size;if(this.gradientCache[n])return this.gradientCache[n];var l=null;if(o===e.GradientType.LinearGradient){var f=e.computeLinearGradient(a,c,t.angle);l=r.createLinearGradient(f.x1,f.y1,f.x2,f.y2)}else if(o===e.GradientType.RadialGradient){var p=e.computeRadialGradient(a,c,s,u,h),v=p.x,d=p.y;l=r.createRadialGradient(v,d,0,v,d,p.r)}return l&&(i.forEach((function(t){var r,n=t.offset;n.unit===e.UnitType.kPercentage&&(null===(r=l)||void 0===r||r.addColorStop(n.value/100,""+t.color))})),this.gradientCache[n]=l),this.gradientCache[n]},r.generateGradientKey=function(t){var e=t.angle,r=t.cx,n=t.cy,o=t.size;return"gradient-"+t.type+"-"+((null==e?void 0:""+e)||0)+"-"+((null==r?void 0:""+r)||0)+"-"+((null==n?void 0:""+n)||0)+"-"+((null==o?void 0:""+o)||0)+"-"+t.width+"-"+t.height+"-"+t.steps.map((function(t){return""+t.offset+t.color})).join("-")},r.generatePatternKey=function(t){var e=t.image,r=t.repetition;return b(e)?"pattern-"+e+"-"+r:"rect"===e.nodeName?"pattern-"+e.entity+"-"+r:void 0},t}(),ve=function(){function t(){}return t.prototype.apply=function(r){var n=r.renderingService,o=r.imagePool,i=r.renderingContext.root.ownerDocument.defaultView,a=function(t){var r=t.target;if(r.nodeName===e.Shape.IMAGE){var i=r.attributes.img;b(i)&&o.getImageSync(i,(function(){r.renderable.dirty=!0,n.dirtify()}))}},c=function(t){var r=t.target,i=t.newValue;r.nodeName===e.Shape.IMAGE&&"img"===t.attrName&&b(i)&&o.getOrCreateImage(i).then((function(){r.renderable.dirty=!0,n.dirtify()}))};n.hooks.init.tapPromise(t.tag,he(se().mark((function t(){return se().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i.addEventListener(e.ElementEvent.MOUNTED,a),i.addEventListener(e.ElementEvent.ATTR_MODIFIED,c);case 2:case"end":return t.stop()}}),t)})))),n.hooks.destroy.tap(t.tag,(function(){i.removeEventListener(e.ElementEvent.MOUNTED,a),i.removeEventListener(e.ElementEvent.ATTR_MODIFIED,c)}))},t}();ve.tag="LoadImage";var de=function(t){var e,r;function n(){for(var e,r=arguments.length,n=Array(r),o=0;r>o;o++)n[o]=arguments[o];return(e=t.call.apply(t,[this].concat(n))||this).name="image-loader",e}(e=n).prototype=Object.create((r=t).prototype),e.prototype.constructor=e,le(e,r);var o=n.prototype;return o.init=function(){this.context.imagePool=new pe(this.context.config),this.addRenderingPlugin(new ve)},o.destroy=function(){this.removeAllRenderingPlugins()},n}(e.AbstractRendererPlugin),ye=Object.freeze({__proto__:null,ImagePool:pe,Plugin:de}),ge=function(){function t(t){this.$container=void 0,this.$canvas=void 0,this.dpr=void 0,this.context=void 0,this.canvasConfig=void 0,this.renderingContext=void 0,this.renderingContext=t.renderingContext,this.canvasConfig=t.config}var n=t.prototype;return n.init=function(){var t=o(r().mark((function t(){var e,n,o,i;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=(e=this.canvasConfig).container,(o=e.canvas)?(this.$canvas=o,n&&o.parentElement!==n&&n.appendChild(o),this.$container=o.parentElement,this.canvasConfig.container=this.$container):n&&(this.$container=b(n)?document.getElementById(n):n,this.$container&&(i=document.createElement("canvas"),this.$container.appendChild(i),this.$container.style.position||(this.$container.style.position="relative"),this.$canvas=i)),this.context=this.$canvas.getContext("2d"),this.resize(this.canvasConfig.width,this.canvasConfig.height);case 4:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}(),n.getContext=function(){return this.context},n.getDomElement=function(){return this.$canvas},n.getDPR=function(){return this.dpr},n.getBoundingClientRect=function(){if(this.$canvas.getBoundingClientRect)return this.$canvas.getBoundingClientRect()},n.destroy=function(){this.$container&&this.$canvas&&this.$canvas.parentNode&&this.$container.removeChild(this.$canvas)},n.resize=function(t,r){var n=this.canvasConfig.devicePixelRatio||e.isBrowser&&window.devicePixelRatio||1;this.dpr=n=1>n?1:Math.ceil(n),this.$canvas&&(this.$canvas.width=this.dpr*t,this.$canvas.height=this.dpr*r,e.setDOMSize(this.$canvas,t,r)),this.renderingContext.renderReasons.add(e.RenderReason.CAMERA_CHANGED)},n.applyCursorStyle=function(t){this.$container&&this.$container.style&&(this.$container.style.cursor=t)},n.toDataURL=function(){var t=o(r().mark((function t(e){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return void 0===e&&(e={}),t.abrupt("return",this.context.canvas.toDataURL((n=e).type,n.encoderOptions));case 3:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),t}(),me=function(t){function e(){for(var e,r=arguments.length,n=Array(r),o=0;r>o;o++)n[o]=arguments[o];return(e=t.call.apply(t,[this].concat(n))||this).name="canvas-context-register",e}i(e,t);var r=e.prototype;return r.init=function(){this.context.ContextService=ge},r.destroy=function(){delete this.context.ContextService},e}(e.AbstractRendererPlugin),we=function(t){function e(e){var r;return(r=t.call(this,e)||this).registerPlugin(new me),r.registerPlugin(new de),r.registerPlugin(new C),r.registerPlugin(new Xt),r.registerPlugin(new Kt),r.registerPlugin(new Mt),r.registerPlugin(new ae),r}return i(e,t),e}(e.AbstractRenderer);t.CanvasPathGenerator=j,t.CanvasPicker=St,t.CanvasRenderer=zt,t.DomInteraction=te,t.HTMLRenderer=ce,t.ImageLoader=ye,t.Renderer=we,Object.defineProperty(t,"__esModule",{value:!0})}));
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@antv/g-lite")):"function"==typeof define&&define.amd?define(["exports","@antv/g-lite"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).G=t.G||{},t.G.Canvas2D={}),t.window.G)}(this,(function(t,e){"use strict";function r(){r=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var o=Object.create((e&&e.prototype instanceof d?e:d).prototype),a=new O(n||[]);return i(o,"_invoke",{value:M(t,r,a)}),o}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var f={};function d(){}function p(){}function v(){}var y={};u(y,a,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(L([])));m&&m!==e&&n.call(m,a)&&(y=m);var x=v.prototype=d.prototype=Object.create(y);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(i,o,a,s){var c=h(t[i],t,o);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return r("throw",t,a,s)}))}s(c.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}})}function M(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return A()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=w(a,r);if(s){if(s===f)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=h(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function w(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var i=h(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,f;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function L(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return p.prototype=v,i(x,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:p,configurable:!0}),p.displayName=u(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,u(t,c,"GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},b(E.prototype),u(E.prototype,s,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new E(l(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(x),u(x,c,"Generator"),u(x,a,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=L,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(this.prev>=o.tryLoc){var s=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(s&&c){if(o.catchLoc>this.prev)return r(o.catchLoc,!0);if(o.finallyLoc>this.prev)return r(o.finallyLoc)}else if(s){if(o.catchLoc>this.prev)return r(o.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(o.finallyLoc>this.prev)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(this.prev>=i.tryLoc&&n.call(i,"finallyLoc")&&i.finallyLoc>this.prev){var o=i;break}}o&&("break"===t||"continue"===t)&&e>=o.tryLoc&&o.finallyLoc>=e&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;S(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:L(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function n(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function i(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,o(t,e)}function o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}var a="undefined"!=typeof Float32Array?Float32Array:Array;function s(){var t=new a(16);return a!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function c(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function u(t,e,r){var n=e[0],i=e[1],o=e[2],a=e[3],s=e[4],c=e[5],u=e[6],l=e[7],h=e[8],f=e[9],d=e[10],p=e[11],v=e[12],y=e[13],g=e[14],m=e[15],x=r[0],b=r[1],E=r[2],M=r[3];return t[0]=x*n+b*s+E*h+M*v,t[1]=x*i+b*c+E*f+M*y,t[2]=x*o+b*u+E*d+M*g,t[3]=x*a+b*l+E*p+M*m,t[4]=(x=r[4])*n+(b=r[5])*s+(E=r[6])*h+(M=r[7])*v,t[5]=x*i+b*c+E*f+M*y,t[6]=x*o+b*u+E*d+M*g,t[7]=x*a+b*l+E*p+M*m,t[8]=(x=r[8])*n+(b=r[9])*s+(E=r[10])*h+(M=r[11])*v,t[9]=x*i+b*c+E*f+M*y,t[10]=x*o+b*u+E*d+M*g,t[11]=x*a+b*l+E*p+M*m,t[12]=(x=r[12])*n+(b=r[13])*s+(E=r[14])*h+(M=r[15])*v,t[13]=x*i+b*c+E*f+M*y,t[14]=x*o+b*u+E*d+M*g,t[15]=x*a+b*l+E*p+M*m,t}function l(t,e,r){var n,i,o,a,s,c,u,l,h,f,d,p,v=r[0],y=r[1],g=r[2];return e===t?(t[12]=e[0]*v+e[4]*y+e[8]*g+e[12],t[13]=e[1]*v+e[5]*y+e[9]*g+e[13],t[14]=e[2]*v+e[6]*y+e[10]*g+e[14],t[15]=e[3]*v+e[7]*y+e[11]*g+e[15]):(i=e[1],o=e[2],a=e[3],s=e[4],c=e[5],u=e[6],l=e[7],h=e[8],f=e[9],d=e[10],p=e[11],t[0]=n=e[0],t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=c,t[6]=u,t[7]=l,t[8]=h,t[9]=f,t[10]=d,t[11]=p,t[12]=n*v+s*y+h*g+e[12],t[13]=i*v+c*y+f*g+e[13],t[14]=o*v+u*y+d*g+e[14],t[15]=a*v+l*y+p*g+e[15]),t}function h(){var t=new a(3);return a!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function f(t,e,r,n){return t[0]=e,t[1]=r,t[2]=n,t}function d(t,e,r){var n=e[0],i=e[1],o=e[2],a=r[3]*n+r[7]*i+r[11]*o+r[15];return t[0]=(r[0]*n+r[4]*i+r[8]*o+r[12])/(a=a||1),t[1]=(r[1]*n+r[5]*i+r[9]*o+r[13])/a,t[2]=(r[2]*n+r[6]*i+r[10]*o+r[14])/a,t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var p;p=h();!function(){var t,e=(t=new a(2),a!=Float32Array&&(t[0]=0,t[1]=0),t)}();function v(t,e,r){return{x:t*Math.cos(r)-e*Math.sin(r),y:t*Math.sin(r)+e*Math.cos(r)}}function y(t,e,r,n,i,o,a,s,c,u){var l,h,f,d,p,g=t,m=e,x=r,b=n,E=s,M=c,w=120*Math.PI/180,P=Math.PI/180*(+i||0),S=[];if(u)h=u[0],f=u[1],d=u[2],p=u[3];else{m=(l=v(g,m,-P)).y;var O=((g=l.x)-(E=(l=v(E,M,-P)).x))/2,L=(m-(M=l.y))/2,A=O*O/(x*x)+L*L/(b*b);A>1&&(x*=A=Math.sqrt(A),b*=A);var T=x*x,C=b*b,k=(o===a?-1:1)*Math.sqrt(Math.abs((T*C-T*L*L-C*O*O)/(T*L*L+C*O*O)));d=k*x*L/b+(g+E)/2,h=Math.asin(((m-(p=k*-b*O/x+(m+M)/2))/b*1e9>>0)/1e9),f=Math.asin(((M-p)/b*1e9>>0)/1e9),0>(h=d>g?Math.PI-h:h)&&(h=2*Math.PI+h),0>(f=d>E?Math.PI-f:f)&&(f=2*Math.PI+f),a&&h>f&&(h-=2*Math.PI),!a&&f>h&&(f-=2*Math.PI)}var R=f-h;if(Math.abs(R)>w){var I=f,N=E,_=M;S=y(E=d+x*Math.cos(f=h+w*(a&&f>h?1:-1)),M=p+b*Math.sin(f),x,b,i,0,a,N,_,[f,I,d,p])}R=f-h;var j=Math.cos(h),D=Math.sin(h),B=Math.cos(f),F=Math.sin(f),G=Math.tan(R/4),$=4/3*x*G,H=4/3*b*G,W=[g,m],Y=[g+$*D,m-H*j],U=[E+$*F,M-H*B],X=[E,M];if(Y[0]=2*W[0]-Y[0],Y[1]=2*W[1]-Y[1],u)return Y.concat(U,X,S);for(var z=[],q=0,Q=(S=Y.concat(U,X,S)).length;Q>q;q+=1)z[q]=q%2?v(S[q-1],S[q],P).y:v(S[q],S[q+1],P).x;return z}var g=function(t){return null==t},m={}.toString,x=function(t,e){return m.call(t)==="[object "+e+"]"},b=function(t){return x(t,"String")},E=function(t,e,r){return e>t?e:t>r?r:t},M=function(t){return x(t,"Number")};function w(t,e){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},w(t,e)}function P(t,e){var r=e.r;t.arc(r,r,r,0,2*Math.PI,!1)}function S(t,e){var r=e.rx,n=e.ry;if(t.ellipse)t.ellipse(r,n,r,n,0,0,2*Math.PI,!1);else{var i=r>n?r:n,o=r>n?1:r/n,a=r>n?n/r:1;t.save(),t.scale(o,a),t.arc(0,0,i,0,2*Math.PI)}}function O(t,r){var n=r.x1,i=r.y1,o=r.x2,a=r.y2,s=r.defX,c=void 0===s?0:s,u=r.defY,l=void 0===u?0:u,h=r.markerStart,f=r.markerEnd,d=r.markerStartOffset,p=r.markerEndOffset,v=0,y=0,g=0,m=0,x=0;h&&e.isDisplayObject(h)&&d&&(v=Math.cos(x=Math.atan2(a-i,o-n))*(d||0),y=Math.sin(x)*(d||0)),f&&e.isDisplayObject(f)&&p&&(g=Math.cos(x=Math.atan2(i-a,n-o))*(p||0),m=Math.sin(x)*(p||0)),t.moveTo(n-c+v,i-l+y),t.lineTo(o-c+g,a-l+m)}function L(t,r){var n=r.defX,i=void 0===n?0:n,o=r.defY,a=void 0===o?0:o,s=r.markerStart,c=r.markerEnd,u=r.markerStartOffset,l=r.markerEndOffset,h=r.path,f=h.absolutePath,d=h.segments,p=0,v=0,y=0,g=0,m=0;if(s&&e.isDisplayObject(s)&&u){var x=s.parentNode.getStartTangent(),b=x[0],E=x[1];p=Math.cos(m=Math.atan2(b[1]-E[1],b[0]-E[0]))*(u||0),v=Math.sin(m)*(u||0)}if(c&&e.isDisplayObject(c)&&l){var M=c.parentNode.getEndTangent(),w=M[0],P=M[1];y=Math.cos(m=Math.atan2(w[1]-P[1],w[0]-P[0]))*(l||0),g=Math.sin(m)*(l||0)}for(var S=0;f.length>S;S++){var O=f[S],L=f[S+1],A=0===S&&(0!==p||0!==v),T=(S===f.length-1||L&&("M"===L[0]||"Z"===L[0]))&&0!==y&&0!==g;switch(O[0]){case"M":A?(t.moveTo(O[1]-i+p,O[2]-a+v),t.lineTo(O[1]-i,O[2]-a)):t.moveTo(O[1]-i,O[2]-a);break;case"L":T?t.lineTo(O[1]-i+y,O[2]-a+g):t.lineTo(O[1]-i,O[2]-a);break;case"Q":t.quadraticCurveTo(O[1]-i,O[2]-a,O[3]-i,O[4]-a),T&&t.lineTo(O[3]-i+y,O[4]-a+g);break;case"C":t.bezierCurveTo(O[1]-i,O[2]-a,O[3]-i,O[4]-a,O[5]-i,O[6]-a),T&&t.lineTo(O[5]-i+y,O[6]-a+g);break;case"A":var C=d[S].arcParams,k=C.cx,R=C.cy,I=C.rx,N=C.ry,_=C.startAngle,j=C.endAngle,D=C.xRotation,B=C.sweepFlag;if(t.ellipse)t.ellipse(k-i,R-a,I,N,D,_,j,!!(1-B));else{var F=I>N?I:N,G=I>N?1:I/N,$=I>N?N/I:1;t.translate(k-i,R-a),t.rotate(D),t.scale(G,$),t.arc(0,0,F,_,j,!!(1-B)),t.scale(1/G,1/$),t.rotate(-D),t.translate(-(k-i),-(R-a))}T&&t.lineTo(O[6]-i+y,O[7]-a+g);break;case"Z":t.closePath()}}}function A(t,r){var n=r.defX,i=void 0===n?0:n,o=r.defY,a=void 0===o?0:o,s=r.markerStart,c=r.markerEnd,u=r.markerStartOffset,l=r.markerEndOffset,h=r.points.points,f=h.length,d=h[0][0]-i,p=h[0][1]-a,v=h[f-1][0]-i,y=h[f-1][1]-a,g=0,m=0,x=0,b=0,E=0;s&&e.isDisplayObject(s)&&u&&(g=Math.cos(E=Math.atan2(h[1][1]-h[0][1],h[1][0]-h[0][0]))*(u||0),m=Math.sin(E)*(u||0)),c&&e.isDisplayObject(c)&&l&&(x=Math.cos(E=Math.atan2(h[f-1][1]-h[0][1],h[f-1][0]-h[0][0]))*(l||0),b=Math.sin(E)*(l||0)),t.moveTo(d+(g||x),p+(m||b));for(var M=1;f-1>M;M++){var w=h[M];t.lineTo(w[0]-i,w[1]-a)}t.lineTo(v,y)}function T(t,r){var n=r.defX,i=void 0===n?0:n,o=r.defY,a=void 0===o?0:o,s=r.markerStart,c=r.markerEnd,u=r.markerStartOffset,l=r.markerEndOffset,h=r.points.points,f=h.length,d=h[0][0]-i,p=h[0][1]-a,v=h[f-1][0]-i,y=h[f-1][1]-a,g=0,m=0,x=0,b=0,E=0;s&&e.isDisplayObject(s)&&u&&(g=Math.cos(E=Math.atan2(h[1][1]-h[0][1],h[1][0]-h[0][0]))*(u||0),m=Math.sin(E)*(u||0)),c&&e.isDisplayObject(c)&&l&&(x=Math.cos(E=Math.atan2(h[f-2][1]-h[f-1][1],h[f-2][0]-h[f-1][0]))*(l||0),b=Math.sin(E)*(l||0)),t.moveTo(d+g,p+m);for(var M=1;f-1>M;M++){var w=h[M];t.lineTo(w[0]-i,w[1]-a)}t.lineTo(v+x,y+b)}function C(t,e){var r=e.radius,n=e.width,i=e.height,o=n,a=i;if(r&&r.some((function(t){return 0!==t}))){var s=n>0?1:-1,c=i>0?1:-1,u=s+c===0,l=r.map((function(t){return E(t,0,Math.min(Math.abs(o)/2,Math.abs(a)/2))})),h=l[0],f=l[1],d=l[2],p=l[3];t.moveTo(s*h,0),t.lineTo(o-s*f,0),0!==f&&t.arc(o-s*f,c*f,f,-c*Math.PI/2,s>0?0:Math.PI,u),t.lineTo(o,a-c*d),0!==d&&t.arc(o-s*d,a-c*d,d,s>0?0:Math.PI,c>0?Math.PI/2:1.5*Math.PI,u),t.lineTo(s*p,a),0!==p&&t.arc(s*p,a-c*p,p,c>0?Math.PI/2:-Math.PI/2,s>0?Math.PI:0,u),t.lineTo(0,c*h),0!==h&&t.arc(s*h,c*h,h,s>0?Math.PI:0,c>0?1.5*Math.PI:Math.PI/2,u)}else t.rect(0,0,o,a)}var k=function(t){var r,n;function i(){for(var e,r=arguments.length,n=Array(r),i=0;r>i;i++)n[i]=arguments[i];return(e=t.call.apply(t,[this].concat(n))||this).name="canvas-path-generator",e}(r=i).prototype=Object.create((n=t).prototype),r.prototype.constructor=r,w(r,n);var o=i.prototype;return o.init=function(){var t,r=((t={})[e.Shape.CIRCLE]=P,t[e.Shape.ELLIPSE]=S,t[e.Shape.RECT]=C,t[e.Shape.LINE]=O,t[e.Shape.POLYLINE]=T,t[e.Shape.POLYGON]=A,t[e.Shape.PATH]=L,t[e.Shape.TEXT]=void 0,t[e.Shape.GROUP]=void 0,t[e.Shape.IMAGE]=void 0,t[e.Shape.HTML]=void 0,t[e.Shape.MESH]=void 0,t);this.context.pathGeneratorFactory=r},o.destroy=function(){delete this.context.pathGeneratorFactory},i}(e.AbstractRendererPlugin),R=Object.freeze({__proto__:null,Plugin:k});function I(){I=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function u(t,e,r,i){var o=Object.create((e&&e.prototype instanceof f?e:f).prototype),a=new S(i||[]);return n(o,"_invoke",{value:E(t,r,a)}),o}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var h={};function f(){}function d(){}function p(){}var v={};c(v,o,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(O([])));g&&g!==e&&r.call(g,o)&&(v=g);var m=p.prototype=f.prototype=Object.create(v);function x(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function i(n,o,a,s){var c=l(t[n],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==typeof h&&r.call(h,"__await")?e.resolve(h.__await).then((function(t){i("next",t,a,s)}),(function(t){i("throw",t,a,s)})):e.resolve(h).then((function(t){u.value=t,a(u)}),(function(t){return i("throw",t,a,s)}))}s(c.arg)}var o;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){i(t,r,e,n)}))}return o=o?o.then(n,n):n()}})}function E(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return L()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=M(a,r);if(s){if(s===h)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=l(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function M(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,M(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var i=l(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,h;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function O(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:L}}function L(){return{value:void 0,done:!0}}return d.prototype=p,n(m,"constructor",{value:p,configurable:!0}),n(p,"constructor",{value:d,configurable:!0}),d.displayName=c(p,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,c(t,s,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},x(b.prototype),c(b.prototype,a,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new b(u(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},x(m),c(m,s,"Generator"),c(m,o,(function(){return this})),c(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=O,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(this.prev>=o.tryLoc){var s=r.call(o,"catchLoc"),c=r.call(o,"finallyLoc");if(s&&c){if(o.catchLoc>this.prev)return n(o.catchLoc,!0);if(o.finallyLoc>this.prev)return n(o.finallyLoc)}else if(s){if(o.catchLoc>this.prev)return n(o.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(o.finallyLoc>this.prev)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(this.prev>=i.tryLoc&&r.call(i,"finallyLoc")&&i.finallyLoc>this.prev){var o=i;break}}o&&("break"===t||"continue"===t)&&e>=o.tryLoc&&o.finallyLoc>=e&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function N(t,e,r,n,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,i)}function _(t,e){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_(t,e)}function j(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);e>r;r++)n[r]=t[r];return n}function D(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return j(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?j(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0;return function(){return t.length>n?{done:!1,value:t[n++]}:{done:!0}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var B=h(),F=h(),G=h(),$=s(),H=function(){function t(){var t=this;this.context=void 0,this.runtime=void 0,this.isHit=function(r,n,i,o){var a,s,c,u,l,h,p,v,y,g,m,x,b,E,M,w,P,S,O,L,A,T,C,k,R,I,N,_,j,D,B,H=t.context.pointInPathPickerFactory[r.nodeName];if(H){var W=(a=$,(B=(O=(c=(s=i)[0])*(v=s[5])-(u=s[1])*(p=s[4]))*(D=(b=s[10])*(S=s[15])-(E=s[11])*(P=s[14]))-(L=c*(y=s[6])-(l=s[2])*p)*(j=(x=s[9])*S-E*(w=s[13]))+(A=c*(g=s[7])-(h=s[3])*p)*(_=x*P-b*w)+(T=u*y-l*v)*(N=(m=s[8])*S-E*(M=s[12]))-(C=u*g-h*v)*(I=m*P-b*M)+(k=l*g-h*y)*(R=m*w-x*M))?(a[0]=(v*D-y*j+g*_)*(B=1/B),a[1]=(l*j-u*D-h*_)*B,a[2]=(w*k-P*C+S*T)*B,a[3]=(b*C-x*k-E*T)*B,a[4]=(y*N-p*D-g*I)*B,a[5]=(c*D-l*N+h*I)*B,a[6]=(P*A-M*k-S*L)*B,a[7]=(m*k-b*A+E*L)*B,a[8]=(p*j-v*N+g*R)*B,a[9]=(u*N-c*j-h*R)*B,a[10]=(M*C-w*A+S*O)*B,a[11]=(x*A-m*C-E*O)*B,a[12]=(v*I-p*_-y*R)*B,a[13]=(c*_-u*I+l*R)*B,a[14]=(w*L-M*T-P*O)*B,a[15]=(m*T-x*L+b*O)*B,a):null),Y=d(F,f(G,n[0],n[1],0),W),U=r.getGeometryBounds().halfExtents,X=r.parsedStyle.anchor;if(Y[0]+=(X&&X[0]||0)*U[0]*2,Y[1]+=(X&&X[1]||0)*U[1]*2,H(r,new e.Point(Y[0],Y[1]),o,t.isPointInPath,t.context,t.runtime))return!0}return!1},this.isPointInPath=function(e,r){var n=t.runtime.offscreenCanvas.getOrCreateContext(t.context.config.offscreenCanvas),i=t.context.pathGeneratorFactory[e.nodeName];return i&&(n.beginPath(),i(n,e.parsedStyle),n.closePath()),n.isPointInPath(r.x,r.y)}}var r=t.prototype;return r.apply=function(e,r){var n,i=this,o=e.renderingService,a=e.renderingContext;this.context=e,this.runtime=r;var s=null===(n=a.root)||void 0===n?void 0:n.ownerDocument;o.hooks.pick.tapPromise(t.tag,function(){var t,e=(t=I().mark((function t(e){return I().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",i.pick(s,e));case 1:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){N(o,n,i,a,s,"next",t)}function s(t){N(o,n,i,a,s,"throw",t)}a(void 0)}))});return function(t){return e.apply(this,arguments)}}()),o.hooks.pickSync.tap(t.tag,(function(t){return i.pick(s,t)}))},r.pick=function(t,r){for(var n,i=r.topmost,o=r.position,a=f(B,o.x,o.y,0),s=[],c=D(t.elementsFromBBox(a[0],a[1],a[0],a[1]));!(n=c()).done;){var u=n.value,l=u.getWorldTransform();if(this.isHit(u,a,l,!1)){var h=e.findClosestClipPathTarget(u);if(h){var d=h.parsedStyle.clipPath;if(this.isHit(d,a,d.getWorldTransform(),!0)){if(i)return r.picked=[u],r;s.push(u)}}else{if(i)return r.picked=[u],r;s.push(u)}}}return r.picked=s,r},t}();function W(t,e,r,n){var i=t-r,o=e-n;return Math.sqrt(i*i+o*o)}function Y(t,e){return.001>Math.abs(t-e)}function U(t,e){var r=Math.min.apply(Math,t),n=Math.min.apply(Math,e);return{x:r,y:n,width:Math.max.apply(Math,t)-r,height:Math.max.apply(Math,e)-n}}function X(t){return(t+2*Math.PI)%(2*Math.PI)}H.tag="CanvasPicker";var z={box:function(t,e,r,n){return U([t,r],[e,n])},length:function(t,e,r,n){return W(t,e,r,n)},pointAt:function(t,e,r,n,i){return{x:(1-i)*t+i*r,y:(1-i)*e+i*n}},pointDistance:function(t,e,r,n,i,o){var a=(r-t)*(i-t)+(n-e)*(o-e);return 0>a?W(t,e,i,o):a>(r-t)*(r-t)+(n-e)*(n-e)?W(r,n,i,o):this.pointToLine(t,e,r,n,i,o)},pointToLine:function(t,e,r,n,i,o){var a=[r-t,n-e];if(function(t,e){return t[0]===e[0]&&t[1]===e[1]}(a,[0,0]))return Math.sqrt((i-t)*(i-t)+(o-e)*(o-e));var s=[-a[1],a[0]];return function(t,e){var r=e[0],n=e[1],i=r*r+n*n;i>0&&(i=1/Math.sqrt(i)),t[0]=e[0]*i,t[1]=e[1]*i}(s,s),Math.abs(function(t,e){return t[0]*e[0]+t[1]*e[1]}([i-t,o-e],s))},tangentAngle:function(t,e,r,n){return Math.atan2(n-e,r-t)}};function q(t,e,r,n,i,o){var a=-1,s=1/0,c=[r,n],u=20;o&&o>200&&(u=o/10);for(var l=1/u,h=l/10,f=0;u>=f;f++){var d=f*l,p=[i.apply(void 0,t.concat([d])),i.apply(void 0,e.concat([d]))],v=W(c[0],c[1],p[0],p[1]);s>v&&(a=d,s=v)}if(0===a)return{x:t[0],y:e[0]};if(1===a){var y=t.length;return{x:t[y-1],y:e[y-1]}}s=1/0;for(var g=0;32>g&&1e-4<=h;g++){var m=a-h,x=a+h,b=[i.apply(void 0,t.concat([m])),i.apply(void 0,e.concat([m]))],E=W(c[0],c[1],b[0],b[1]);if(m>=0&&s>E)a=m,s=E;else{var M=[i.apply(void 0,t.concat([x])),i.apply(void 0,e.concat([x]))],w=W(c[0],c[1],M[0],M[1]);1>=x&&s>w?(a=x,s=w):h*=.5}}return{x:i.apply(void 0,t.concat([a])),y:i.apply(void 0,e.concat([a]))}}function Q(t,e,r,n){var i=1-n;return i*i*t+2*n*i*e+n*n*r}function V(t,e,r){var n=t+r-2*e;if(Y(n,0))return[.5];var i=(t-e)/n;return i>1||0>i?[]:[i]}function Z(t,e,r,n){return 2*(1-n)*(e-t)+2*n*(r-e)}function J(t,e,r,n,i,o,a){var s=Q(t,r,i,a),c=Q(e,n,o,a),u=z.pointAt(t,e,r,n,a),l=z.pointAt(r,n,i,o,a);return[[t,e,u.x,u.y,s,c],[s,c,l.x,l.y,i,o]]}function K(t,e,r,n,i,o,a){if(0===a)return(W(t,e,r,n)+W(r,n,i,o)+W(t,e,i,o))/2;var s=J(t,e,r,n,i,o,.5),c=s[0],u=s[1];return c.push(a-1),u.push(a-1),K.apply(void 0,c)+K.apply(void 0,u)}var tt={box:function(t,e,r,n,i,o){var a=V(t,r,i)[0],s=V(e,n,o)[0],c=[t,i],u=[e,o];return void 0!==a&&c.push(Q(t,r,i,a)),void 0!==s&&u.push(Q(e,n,o,s)),U(c,u)},length:function(t,e,r,n,i,o){return K(t,e,r,n,i,o,3)},nearestPoint:function(t,e,r,n,i,o,a,s){return q([t,r,i],[e,n,o],a,s,Q)},pointDistance:function(t,e,r,n,i,o,a,s){var c=this.nearestPoint(t,e,r,n,i,o,a,s);return W(c.x,c.y,a,s)},interpolationAt:Q,pointAt:function(t,e,r,n,i,o,a){return{x:Q(t,r,i,a),y:Q(e,n,o,a)}},divide:function(t,e,r,n,i,o,a){return J(t,e,r,n,i,o,a)},tangentAngle:function(t,e,r,n,i,o,a){var s=Z(t,r,i,a),c=Z(e,n,o,a);return X(Math.atan2(c,s))}};function et(t,e,r,n,i){var o=1-i;return o*o*o*t+3*e*i*o*o+3*r*i*i*o+n*i*i*i}function rt(t,e,r,n,i){var o=1-i;return 3*(o*o*(e-t)+2*o*i*(r-e)+i*i*(n-r))}function nt(t,e,r,n){var i,o,a,s=-3*t+9*e-9*r+3*n,c=6*t-12*e+6*r,u=3*e-3*t,l=[];if(Y(s,0))Y(c,0)||0>(i=-u/c)||i>1||l.push(i);else{var h=c*c-4*s*u;Y(h,0)?l.push(-c/(2*s)):h>0&&(o=(-c-(a=Math.sqrt(h)))/(2*s),0>(i=(-c+a)/(2*s))||i>1||l.push(i),0>o||o>1||l.push(o))}return l}function it(t,e,r,n,i,o,a,s,c){var u=et(t,r,i,a,c),l=et(e,n,o,s,c),h=z.pointAt(t,e,r,n,c),f=z.pointAt(r,n,i,o,c),d=z.pointAt(i,o,a,s,c),p=z.pointAt(h.x,h.y,f.x,f.y,c),v=z.pointAt(f.x,f.y,d.x,d.y,c);return[[t,e,h.x,h.y,p.x,p.y,u,l],[u,l,v.x,v.y,d.x,d.y,a,s]]}function ot(t,e,r,n,i,o,a,s,c){if(0===c)return function(t,e){for(var r=0,n=t.length,i=0;n>i;i++)r+=W(t[i],e[i],t[(i+1)%n],e[(i+1)%n]);return r/2}([t,r,i,a],[e,n,o,s]);var u=it(t,e,r,n,i,o,a,s,.5),l=[].concat(u[0],[c-1]),h=[].concat(u[1],[c-1]);return ot.apply(void 0,l)+ot.apply(void 0,h)}var at={extrema:nt,box:function(t,e,r,n,i,o,a,s){for(var c=[t,a],u=[e,s],l=nt(t,r,i,a),h=nt(e,n,o,s),f=0;l.length>f;f++)c.push(et(t,r,i,a,l[f]));for(var d=0;h.length>d;d++)u.push(et(e,n,o,s,h[d]));return U(c,u)},length:function(t,e,r,n,i,o,a,s){return ot(t,e,r,n,i,o,a,s,3)},nearestPoint:function(t,e,r,n,i,o,a,s,c,u,l){return q([t,r,i,a],[e,n,o,s],c,u,et,l)},pointDistance:function(t,e,r,n,i,o,a,s,c,u,l){var h=this.nearestPoint(t,e,r,n,i,o,a,s,c,u,l);return W(h.x,h.y,c,u)},interpolationAt:et,pointAt:function(t,e,r,n,i,o,a,s,c){return{x:et(t,r,i,a,c),y:et(e,n,o,s,c)}},divide:function(t,e,r,n,i,o,a,s,c){return it(t,e,r,n,i,o,a,s,c)},tangentAngle:function(t,e,r,n,i,o,a,s,c){var u=rt(t,r,i,a,c),l=rt(e,n,o,s,c);return X(Math.atan2(l,u))}};function st(t,e,r,n){var i=t-r,o=e-n;return Math.sqrt(i*i+o*o)}function ct(t,e,r,n,i,o){return!(t>i||i>t+r||e>o||o>e+n)}function ut(t,e,r,n,i,o,a,s){var c=(Math.atan2(s-e,a-t)+2*Math.PI)%(2*Math.PI),u={x:t+r*Math.cos(c),y:e+r*Math.sin(c)};return st(u.x,u.y,a,s)<=o/2}function lt(t,e,r,n,i,o,a){var s=i/2;return!(Math.min(t,r)-s>o||o>Math.max(t,r)+s||Math.min(e,n)-s>a||a>Math.max(e,n)+s)&&z.pointToLine(t,e,r,n,o,a)<=i/2}function ht(t,e,r,n,i){var o=t.length;if(2>o)return!1;for(var a=0;o-1>a;a++){if(lt(t[a][0],t[a][1],t[a+1][0],t[a+1][1],e,r,n))return!0}if(i){var s=t[0],c=t[o-1];if(lt(s[0],s[1],c[0],c[1],e,r,n))return!0}return!1}var ft=1e-6;function dt(t){return ft>Math.abs(t)?0:0>t?-1:1}function pt(t,e,r){return!((r[0]-t[0])*(e[1]-t[1])!=(e[0]-t[0])*(r[1]-t[1])||Math.min(t[0],e[0])>r[0]||r[0]>Math.max(t[0],e[0])||Math.min(t[1],e[1])>r[1]||r[1]>Math.max(t[1],e[1]))}function vt(t,e,r){var n=!1,i=t.length;if(2>=i)return!1;for(var o=0;i>o;o++){var a=t[o],s=t[(o+1)%i];if(pt(a,s,[e,r]))return!0;dt(a[1]-r)>0!=dt(s[1]-r)>0&&0>dt(e-(r-a[1])*(a[0]-s[0])/(a[1]-s[1])-a[0])&&(n=!n)}return n}function yt(t,e,r){for(var n=!1,i=0;t.length>i;i++){if(n=vt(t[i],e,r))break}return n}function gt(t,r,n){var i=t.parsedStyle,o=i.r,a=i.fill,s=i.stroke,c=i.pointerEvents,u=((i.lineWidth||0)+(i.increasedLineWidthForHitTesting||0))/2,l=st(o,o,r.x,r.y),h=e.isFillOrStrokeAffected(c,a,s),f=h[0],d=h[1];return f&&d||n?o+u>=l:f?o>=l:!!d&&(l>=o-u&&o+u>=l)}function mt(t,e,r,n){return t/(r*r)+e/(n*n)}function xt(t,r,n){var i=t.parsedStyle,o=i.rx,a=i.ry,s=i.lineWidth,c=i.increasedLineWidthForHitTesting,u=r.x,l=r.y,h=e.isFillOrStrokeAffected(i.pointerEvents,i.fill,i.stroke),f=h[0],d=h[1],p=((s||0)+(c||0))/2,v=(u-o)*(u-o),y=(l-a)*(l-a);return f&&d||n?1>=mt(v,y,o+p,a+p):f?1>=mt(v,y,o,a):!!d&&(mt(v,y,o-p,a-p)>=1&&1>=mt(v,y,o+p,a+p))}function bt(t,r,n){var i=t.parsedStyle,o=i.x1,a=i.y1,s=i.x2,c=i.y2,u=i.lineWidth,l=i.increasedLineWidthForHitTesting,h=i.defX,f=void 0===h?0:h,d=i.defY,p=void 0===d?0:d;return!(!e.isFillOrStrokeAffected(i.pointerEvents,i.fill,i.stroke)[1]&&!n||!u)&&lt(o,a,s,c,(u||0)+(l||0),r.x+f,r.y+p)}function Et(t,r,n,i,o,a){var s=t.parsedStyle,c=s.lineWidth,u=s.increasedLineWidthForHitTesting,l=s.defX,h=void 0===l?0:l,f=s.defY,d=void 0===f?0:f,p=s.path,v=p.segments,g=p.hasArc,m=p.polylines,x=p.polygons,b=e.isFillOrStrokeAffected(s.pointerEvents,(null==x?void 0:x.length)&&s.fill,s.stroke),E=b[0],M=b[1],w=e.getOrCalculatePathTotalLength(t),P=!1;return E||n?P=g?i(t,r):yt(x,r.x+h,r.y+d)||yt(m,r.x+h,r.y+d):((M||n)&&(P=function(t,e,r,n,i){for(var o=!1,a=e/2,s=0;t.length>s;s++){var c=t[s],u=c.currentPoint,l=c.params,h=c.prePoint,f=c.box;if(!f||ct(f.x-a,f.y-a,f.width+e,f.height+e,r,n))switch(c.command){case"L":case"Z":if(o=lt(h[0],h[1],u[0],u[1],e,r,n))return!0;break;case"Q":if(o=e/2>=tt.pointDistance(h[0],h[1],l[1],l[2],l[3],l[4],r,n))return!0;break;case"C":if(o=e/2>=at.pointDistance(h[0],h[1],l[1],l[2],l[3],l[4],l[5],l[6],r,n,i))return!0;break;case"A":c.cubicParams||(c.cubicParams=y(h[0],h[1],l[1],l[2],l[3],l[4],l[5],l[6],l[7],void 0));for(var d=c.cubicParams,p=h,v=0;d.length>v;v+=6){var g=at.pointDistance(p[0],p[1],d[v],d[v+1],d[v+2],d[v+3],d[v+4],d[v+5],r,n,i);if(p=[d[v+4],d[v+5]],o=e/2>=g)return!0}}}return o}(v,(c||0)+(u||0),r.x+h,r.y+d,w)),P)}function Mt(t,r,n){var i=t.parsedStyle,o=i.lineWidth,a=i.increasedLineWidthForHitTesting,s=i.points,c=i.defX,u=void 0===c?0:c,l=i.defY,h=void 0===l?0:l,f=e.isFillOrStrokeAffected(i.pointerEvents,i.fill,i.stroke),d=f[0],p=!1;return(f[1]||n)&&(p=ht(s.points,(o||0)+(a||0),r.x+u,r.y+h,!0)),p||!d&&!n||(p=vt(s.points,r.x+u,r.y+h)),p}function wt(t,r,n){var i=t.parsedStyle,o=i.lineWidth,a=i.increasedLineWidthForHitTesting,s=i.points,c=i.defX,u=void 0===c?0:c,l=i.defY,h=void 0===l?0:l;return!(!e.isFillOrStrokeAffected(i.pointerEvents,i.fill,i.stroke)[1]&&!n||!o)&&ht(s.points,(o||0)+(a||0),r.x+u,r.y+h,!1)}function Pt(t,r,n,i,o){var a=t.parsedStyle,s=a.radius,c=a.lineWidth,u=a.increasedLineWidthForHitTesting,l=a.width,h=a.height,f=e.isFillOrStrokeAffected(a.pointerEvents,a.fill,a.stroke),d=f[0],p=f[1],v=(c||0)+(u||0);if(s&&s.some((function(t){return 0!==t}))){var y=!1;return(p||n)&&(y=function(t,e,r,n,i,o,a,s){var c=i[0],u=i[1],l=i[2],h=i[3];return lt(t+c,e,t+r-u,e,o,a,s)||lt(t+r,e+u,t+r,e+n-l,o,a,s)||lt(t+r-l,e+n,t+h,e+n,o,a,s)||lt(t,e+n-h,t,e+c,o,a,s)||ut(t+r-u,e+u,u,0,0,o,a,s)||ut(t+r-l,e+n-l,l,0,0,o,a,s)||ut(t+h,e+n-h,h,0,0,o,a,s)||ut(t+c,e+c,c,0,0,o,a,s)}(0,0,l,h,s.map((function(t){return E(t,0,Math.min(Math.abs(l)/2,Math.abs(h)/2))})),v,r.x,r.y)),y||!d&&!n||(y=i(t,r)),y}var g=v/2;return d&&p||n?ct(0-g,0-g,l+g,h+g,r.x,r.y):d?ct(0,0,l,h,r.x,r.y):!!p&&function(t,e,r,n,i,o,a){var s=i/2;return ct(t-s,e-s,r,i,o,a)||ct(t+r-s,e-s,i,n,o,a)||ct(t+s,e+n-s,r,i,o,a)||ct(t-s,e+s,i,n,o,a)}(0,0,l,h,v,r.x,r.y)}function St(t,r,n,i,o,a){var s=t.parsedStyle,c=s.width,u=s.height;if("non-transparent-pixel"===s.pointerEvents){var l=o.config.offscreenCanvas,h=a.offscreenCanvas.getOrCreateCanvas(l),f=a.offscreenCanvas.getOrCreateContext(l,{willReadFrequently:!0});return h.width=c,h.height=u,o.defaultStyleRendererFactory[e.Shape.IMAGE].render(f,t.parsedStyle,t,void 0,void 0,void 0),f.getImageData(r.x,r.y,1,1).data.every((function(t){return 0!==t}))}return!0}var Ot=function(t){var r,n;function i(){for(var e,r=arguments.length,n=Array(r),i=0;r>i;i++)n[i]=arguments[i];return(e=t.call.apply(t,[this].concat(n))||this).name="canvas-picker",e}(r=i).prototype=Object.create((n=t).prototype),r.prototype.constructor=r,_(r,n);var o=i.prototype;return o.init=function(){var t,r=((t={})[e.Shape.CIRCLE]=gt,t[e.Shape.ELLIPSE]=xt,t[e.Shape.RECT]=Pt,t[e.Shape.LINE]=bt,t[e.Shape.POLYLINE]=wt,t[e.Shape.POLYGON]=Mt,t[e.Shape.PATH]=Et,t[e.Shape.TEXT]=function(){return!0},t[e.Shape.GROUP]=null,t[e.Shape.IMAGE]=St,t[e.Shape.HTML]=null,t[e.Shape.MESH]=null,t);this.context.pointInPathPickerFactory=r,this.addRenderingPlugin(new H)},o.destroy=function(){delete this.context.pointInPathPickerFactory,this.removeAllRenderingPlugins()},i}(e.AbstractRendererPlugin),Lt=Object.freeze({__proto__:null,Plugin:Ot});function At(){return At=Object.assign?Object.assign.bind():function(t){for(var e=1;arguments.length>e;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},At.apply(this,arguments)}function Tt(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Ct(t,e)}function Ct(t,e){return Ct=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ct(t,e)}var kt=function(){function t(t){this.canvasRendererPluginOptions=void 0,this.context=void 0,this.pathGeneratorFactory=void 0,this.rBush=void 0,this.removedRBushNodeAABBs=[],this.renderQueue=[],this.restoreStack=[],this.clearFullScreen=!1,this.vpMatrix=s(),this.dprMatrix=s(),this.tmpMat4=s(),this.vec3a=h(),this.vec3b=h(),this.vec3c=h(),this.vec3d=h(),this.canvasRendererPluginOptions=t}var r=t.prototype;return r.apply=function(r,n){var i=this;this.context=r;var o=r.config,a=r.camera,s=r.renderingService,c=r.renderingContext,l=r.pathGeneratorFactory;this.rBush=r.rBushRoot,this.pathGeneratorFactory=l;var h=r.contextService,f=c.root.ownerDocument.defaultView,p=function(t){var e=t.target.rBushNode;e.aabb&&i.removedRBushNodeAABBs.push(e.aabb)},v=function(t){var e=t.target.rBushNode;e.aabb&&i.removedRBushNodeAABBs.push(e.aabb)};s.hooks.init.tap(t.tag,(function(){f.addEventListener(e.ElementEvent.UNMOUNTED,p),f.addEventListener(e.ElementEvent.CULLED,v);var t=h.getDPR(),r=o.width,n=o.height,a=h.getContext();i.clearRect(a,0,0,r*t,n*t,o.background)})),s.hooks.destroy.tap(t.tag,(function(){f.removeEventListener(e.ElementEvent.UNMOUNTED,p),f.removeEventListener(e.ElementEvent.CULLED,v)})),s.hooks.beginFrame.tap(t.tag,(function(){var t=h.getContext(),e=h.getDPR(),r=o.width,n=o.height,a=i.canvasRendererPluginOptions,c=a.dirtyObjectNumThreshold,u=a.dirtyObjectRatioThreshold,l=s.getStats(),f=l.rendered,d=f/l.total;i.clearFullScreen=s.disableDirtyRectangleRendering()||f>c&&d>u,t&&(t.resetTransform?t.resetTransform():t.setTransform(1,0,0,1,0,0),i.clearFullScreen&&i.clearRect(t,0,0,r*e,n*e,o.background))}));var y=function t(e,r){e.isVisible()&&!e.isCulled()&&(i.renderDisplayObject(e,r,i.context,i.restoreStack,n),i.saveDirtyAABB(e)),(e.sortable.sorted||e.childNodes).forEach((function(e){t(e,r)}))};s.hooks.endFrame.tap(t.tag,(function(){var t,r,s=h.getContext(),l=h.getDPR();if((t=i.dprMatrix)[0]=(r=[l,l,1])[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=r[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,u(i.vpMatrix,i.dprMatrix,a.getOrthoMatrix()),i.clearFullScreen)y(c.root,s);else{var p=i.safeMergeAABB.apply(i,[i.mergeDirtyAABBs(i.renderQueue)].concat(i.removedRBushNodeAABBs.map((function(t){var r=t.minX,n=t.minY,i=t.maxX,o=t.maxY,a=new e.AABB;return a.setMinMax([r,n,0],[i,o,0]),a}))));if(i.removedRBushNodeAABBs=[],e.AABB.isEmpty(p))return void(i.renderQueue=[]);var v=i.convertAABB2Rect(p),g=v.x,m=v.y,x=v.width,b=v.height,E=d(i.vec3a,[g,m,0],i.vpMatrix),M=d(i.vec3b,[g+x,m,0],i.vpMatrix),w=d(i.vec3c,[g,m+b,0],i.vpMatrix),P=d(i.vec3d,[g+x,m+b,0],i.vpMatrix),S=Math.min(E[0],M[0],P[0],w[0]),O=Math.min(E[1],M[1],P[1],w[1]),L=Math.max(E[0],M[0],P[0],w[0]),A=Math.max(E[1],M[1],P[1],w[1]),T=Math.floor(S),C=Math.floor(O),k=Math.ceil(L-S),R=Math.ceil(A-O);s.save(),i.clearRect(s,T,C,k,R,o.background),s.beginPath(),s.rect(T,C,k,R),s.clip(),s.setTransform(i.vpMatrix[0],i.vpMatrix[1],i.vpMatrix[4],i.vpMatrix[5],i.vpMatrix[12],i.vpMatrix[13]),o.renderer.getConfig().enableDirtyRectangleRenderingDebug&&f.dispatchEvent(new e.CustomEvent(e.CanvasEvent.DIRTY_RECTANGLE,{dirtyRect:{x:T,y:C,width:k,height:R}})),i.searchDirtyObjects(p).sort((function(t,e){return t.sortable.renderOrder-e.sortable.renderOrder})).forEach((function(t){t&&t.isVisible()&&!t.isCulled()&&i.renderDisplayObject(t,s,i.context,i.restoreStack,n)})),s.restore(),i.renderQueue.forEach((function(t){i.saveDirtyAABB(t)})),i.renderQueue=[]}i.restoreStack.forEach((function(){s.restore()})),i.restoreStack=[]})),s.hooks.render.tap(t.tag,(function(t){i.clearFullScreen||i.renderQueue.push(t)}))},r.clearRect=function(t,e,r,n,i,o){t.clearRect(e,r,n,i),o&&(t.fillStyle=o,t.fillRect(e,r,n,i))},r.renderDisplayObject=function(t,r,n,i,o){var a=t.nodeName,s=i[i.length-1];!s||t.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_CONTAINS||(r.restore(),i.pop());var c=this.context.styleRendererFactory[a],u=this.pathGeneratorFactory[a],l=t.parsedStyle.clipPath;if(l){this.applyWorldTransform(r,l);var h=this.pathGeneratorFactory[l.nodeName];h&&(r.save(),i.push(t),r.beginPath(),h(r,l.parsedStyle),r.closePath(),r.clip())}c&&(this.applyWorldTransform(r,t),r.save(),this.applyAttributesToContext(r,t)),u&&(r.beginPath(),u(r,t.parsedStyle),t.nodeName!==e.Shape.LINE&&t.nodeName!==e.Shape.PATH&&t.nodeName!==e.Shape.POLYLINE&&r.closePath()),c&&(c.render(r,t.parsedStyle,t,n,this,o),r.restore()),t.renderable.dirty=!1},r.convertAABB2Rect=function(t){var e=t.getMin(),r=t.getMax(),n=Math.floor(e[0]),i=Math.floor(e[1]);return{x:n,y:i,width:Math.ceil(r[0])-n,height:Math.ceil(r[1])-i}},r.mergeDirtyAABBs=function(t){var r=new e.AABB;return t.forEach((function(t){var e=t.getRenderBounds();r.add(e);var n=t.renderable.dirtyRenderBounds;n&&r.add(n)})),r},r.searchDirtyObjects=function(t){var e=t.getMin(),r=e[0],n=e[1],i=t.getMax();return this.rBush.search({minX:r,minY:n,maxX:i[0],maxY:i[1]}).map((function(t){return t.displayObject}))},r.saveDirtyAABB=function(t){var r=t.renderable;r.dirtyRenderBounds||(r.dirtyRenderBounds=new e.AABB);var n=t.getRenderBounds();n&&r.dirtyRenderBounds.update(n.center,n.halfExtents)},r.applyAttributesToContext=function(t,e){var r=e.parsedStyle,n=r.stroke,i=r.fill,o=r.opacity,a=r.lineDash,s=r.lineDashOffset;a&&t.setLineDash(a),g(s)||(t.lineDashOffset=s),g(o)||(t.globalAlpha*=o),g(n)||Array.isArray(n)||n.isNone||(t.strokeStyle=e.attributes.stroke),g(i)||Array.isArray(i)||i.isNone||(t.fillStyle=e.attributes.fill)},r.applyWorldTransform=function(t,e,r){var n=0,i=0,o=(e.parsedStyle||{}).anchor,a=o&&o[0]||0,s=o&&o[1]||0;if(0!==a||0!==s){var h=e.geometry.contentBounds;n=-a*(h&&2*h.halfExtents[0]||0),i=-s*(h&&2*h.halfExtents[1]||0)}r?(c(this.tmpMat4,e.getLocalTransform()),this.vec3a[0]=n,this.vec3a[1]=i,this.vec3a[2]=0,l(this.tmpMat4,this.tmpMat4,this.vec3a),u(this.tmpMat4,r,this.tmpMat4),u(this.tmpMat4,this.vpMatrix,this.tmpMat4)):(c(this.tmpMat4,e.getWorldTransform()),this.vec3a[0]=n,this.vec3a[1]=i,this.vec3a[2]=0,l(this.tmpMat4,this.tmpMat4,this.vec3a),u(this.tmpMat4,this.vpMatrix,this.tmpMat4)),t.setTransform(this.tmpMat4[0],this.tmpMat4[1],this.tmpMat4[4],this.tmpMat4[5],this.tmpMat4[12],this.tmpMat4[13])},r.safeMergeAABB=function(){for(var t=new e.AABB,r=arguments.length,n=Array(r),i=0;r>i;i++)n[i]=arguments[i];return n.forEach((function(e){t.add(e)})),t},t}();kt.tag="CanvasRenderer";var Rt=function(){function t(t){this.imagePool=void 0,this.imagePool=t}var r=t.prototype;return r.render=function(t,r,n,i,o,a){var s=r.fill,c=r.fillRule,u=r.opacity,l=r.fillOpacity,h=r.stroke,f=r.strokeOpacity,d=r.lineWidth,p=r.lineCap,v=r.lineJoin,y=r.shadowType,m=r.shadowColor,x=r.shadowBlur,b=r.filter,E=r.miterLimit,M=!g(s)&&!s.isNone,w=!g(h)&&!h.isNone&&d>0,P=0===s.alpha,S=!(!b||!b.length),O=!g(m)&&x>0,L=n.nodeName,A="inner"===y,T=w&&O&&(L===e.Shape.PATH||L===e.Shape.LINE||L===e.Shape.POLYLINE||P||A);M&&(t.globalAlpha=u*l,T||It(n,t,O),this.fill(t,n,s,c,i,o,a),T||this.clearShadowAndFilter(t,S,O)),w&&(t.globalAlpha=u*f,t.lineWidth=d,g(E)||(t.miterLimit=E),g(p)||(t.lineCap=p),g(v)||(t.lineJoin=v),T&&(A&&(t.globalCompositeOperation="source-atop"),It(n,t,!0),A&&(this.stroke(t,n,h,i,o,a),t.globalCompositeOperation="source-over",this.clearShadowAndFilter(t,S,!0))),this.stroke(t,n,h,i,o,a))},r.clearShadowAndFilter=function(t,e,r){if(r&&(t.shadowColor="transparent",t.shadowBlur=0),e){var n=t.filter;!g(n)&&n.indexOf("drop-shadow")>-1&&(t.filter=n.replace(/drop-shadow\([^)]*\)/,"").trim()||"none")}},r.fill=function(t,r,n,i,o,a,s){var c=this;Array.isArray(n)?n.forEach((function(e){t.fillStyle=c.getColor(e,r,t),i?t.fill(i):t.fill()})):(e.isPattern(n)&&(t.fillStyle=this.getPattern(n,r,t,o,a,s)),i?t.fill(i):t.fill())},r.stroke=function(t,r,n,i,o,a){var s=this;Array.isArray(n)?n.forEach((function(e){t.strokeStyle=s.getColor(e,r,t),t.stroke()})):(e.isPattern(n)&&(t.strokeStyle=this.getPattern(n,r,t,i,o,a)),t.stroke())},r.getPattern=function(t,e,r,n,i,o){var a,s;if("rect"===t.image.nodeName){var c=t.image.parsedStyle,u=c.width,l=c.height;s=n.contextService.getDPR();var h=n.config.offscreenCanvas;(a=o.offscreenCanvas.getOrCreateCanvas(h)).width=u*s,a.height=l*s;var f=o.offscreenCanvas.getOrCreateContext(h),d=[];t.image.forEach((function(t){i.renderDisplayObject(t,f,n,d,o)})),d.forEach((function(){f.restore()}))}return this.imagePool.getOrCreatePatternSync(t,r,a,s,(function(){e.renderable.dirty=!0,n.renderingService.dirtify()}))},r.getColor=function(t,r,n){var i;if(t.type===e.GradientType.LinearGradient||t.type===e.GradientType.RadialGradient){var o=r.getGeometryBounds();i=this.imagePool.getOrCreateGradient(At({type:t.type},t.value,{width:o&&2*o.halfExtents[0]||1,height:o&&2*o.halfExtents[1]||1}),n)}return i},t}();function It(t,e,r){var n=t.parsedStyle,i=n.filter,o=n.shadowColor,a=n.shadowBlur,s=n.shadowOffsetX,c=n.shadowOffsetY;i&&i.length&&(e.filter=t.style.filter),r&&(e.shadowColor=""+o,e.shadowBlur=a||0,e.shadowOffsetX=s||0,e.shadowOffsetY=c||0)}var Nt=function(){function t(t){this.imagePool=void 0,this.imagePool=t}return t.prototype.render=function(t,e,r){var n,i=e.img,o=e.shadowColor,a=e.shadowBlur,s=e.width,c=e.height;if(b(i)?n=this.imagePool.getImageSync(i):(s||(s=i.width),c||(c=i.height),n=i),n){It(r,t,!g(o)&&a>0);try{t.drawImage(n,0,0,s,c)}catch(t){}}},t}(),_t=function(){function t(){}var r=t.prototype;return r.render=function(t,r,n){var i=r.lineWidth,o=r.textAlign,a=r.textBaseline,s=r.lineJoin,c=r.miterLimit,u=r.letterSpacing,l=r.stroke,h=r.fill,f=r.fillOpacity,d=r.strokeOpacity,p=r.opacity,v=r.metrics,y=r.dx,m=r.dy,x=r.shadowColor,b=r.shadowBlur,E=v.lines,M=v.height,w=v.lineHeight,P=v.lineMetrics;t.font=v.font,t.lineWidth=i,t.textAlign="middle"===o?"center":o;var S=a;e.runtime.enableCSSParsing||"alphabetic"!==S||(S="bottom"),t.lineJoin=s,g(c)||(t.miterLimit=c);var O=0;"middle"===a?O=-M/2-w/2:"bottom"===a||"alphabetic"===a||"ideographic"===a?O=-M:"top"!==a&&"hanging"!==a||(O=-w);var L=y||0;O+=m||0,1===E.length&&("bottom"===S?(S="middle",O-=.5*M):"top"===S&&(S="middle",O+=.5*M)),t.textBaseline=S,It(n,t,!g(x)&&b>0);for(var A=0;E.length>A;A++){var T=i/2+L;O+=w,g(l)||l.isNone||!i||this.drawLetterSpacing(t,E[A],P[A],o,T,O,u,f,d,p,!0),g(h)||this.drawLetterSpacing(t,E[A],P[A],o,T,O,u,f,d,p)}},r.drawLetterSpacing=function(t,e,r,n,i,o,a,s,c,u,l){if(void 0===l&&(l=!1),0!==a){var h=t.textAlign;t.textAlign="left";var f=i;"center"===n||"middle"===n?f=i-r.width/2:"right"!==n&&"end"!==n||(f=i-r.width);for(var d=Array.from(e),p=t.measureText(e).width,v=0,y=0;d.length>y;++y){var g=d[y];l?this.strokeText(t,g,f,o,c):this.fillText(t,g,f,o,s,u),f+=p-(v=t.measureText(e.substring(y+1)).width)+a,p=v}t.textAlign=h}else l?this.strokeText(t,e,i,o,c):this.fillText(t,e,i,o,s,u)},r.fillText=function(t,e,r,n,i,o){var a,s=!g(i)&&1!==i;s&&(a=t.globalAlpha,t.globalAlpha=i*o),t.fillText(e,r,n),s&&(t.globalAlpha=a)},r.strokeText=function(t,e,r,n,i){var o,a=!g(i)&&1!==i;a&&(o=t.globalAlpha,t.globalAlpha=i),t.strokeText(e,r,n),a&&(t.globalAlpha=o)},t}(),jt=function(t){function e(){return t.apply(this,arguments)||this}return Tt(e,t),e}(Rt),Dt=function(t){function e(){return t.apply(this,arguments)||this}return Tt(e,t),e}(Rt),Bt=function(t){function e(){return t.apply(this,arguments)||this}return Tt(e,t),e}(Rt),Ft=function(t){function e(){return t.apply(this,arguments)||this}return Tt(e,t),e}(Rt),Gt=function(t){function e(){return t.apply(this,arguments)||this}return Tt(e,t),e}(Rt),$t=function(t){function e(){return t.apply(this,arguments)||this}return Tt(e,t),e}(Rt),Ht=function(t){function e(){return t.apply(this,arguments)||this}return Tt(e,t),e}(Rt),Wt=function(t){function r(e){var r;return void 0===e&&(e={}),(r=t.call(this)||this).options=void 0,r.name="canvas-renderer",r.options=e,r}Tt(r,t);var n=r.prototype;return n.init=function(){var t,r=At({dirtyObjectNumThreshold:500,dirtyObjectRatioThreshold:.8},this.options),n=this.context.imagePool,i=new Rt(n),o=((t={})[e.Shape.CIRCLE]=i,t[e.Shape.ELLIPSE]=i,t[e.Shape.RECT]=i,t[e.Shape.IMAGE]=new Nt(n),t[e.Shape.TEXT]=new _t,t[e.Shape.LINE]=i,t[e.Shape.POLYLINE]=i,t[e.Shape.POLYGON]=i,t[e.Shape.PATH]=i,t[e.Shape.GROUP]=void 0,t[e.Shape.HTML]=void 0,t[e.Shape.MESH]=void 0,t);this.context.defaultStyleRendererFactory=o,this.context.styleRendererFactory=o,this.addRenderingPlugin(new kt(r))},n.destroy=function(){this.removeAllRenderingPlugins(),delete this.context.defaultStyleRendererFactory,delete this.context.styleRendererFactory},r}(e.AbstractRendererPlugin),Yt=Object.freeze({__proto__:null,CircleRenderer:Dt,EllipseRenderer:Bt,ImageRenderer:Nt,LineRenderer:Ft,PathRenderer:Ht,Plugin:Wt,PolygonRenderer:$t,PolylineRenderer:Gt,RectRenderer:jt,TextRenderer:_t});function Ut(t,e){return Ut=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ut(t,e)}var Xt=function(){function t(){this.context=void 0}return t.prototype.apply=function(e,r){var n=this,i=e.renderingService,o=e.renderingContext,a=e.config;this.context=e;var s=o.root.ownerDocument.defaultView,c=function(t){i.hooks.pointerMove.call(t)},u=function(t){i.hooks.pointerUp.call(t)},l=function(t){i.hooks.pointerDown.call(t)},h=function(t){i.hooks.pointerOver.call(t)},f=function(t){i.hooks.pointerOut.call(t)},d=function(t){i.hooks.pointerCancel.call(t)},p=function(t){i.hooks.pointerWheel.call(t)},v=function(t){i.hooks.click.call(t)};i.hooks.init.tap(t.tag,(function(){var t=n.context.contextService.getDomElement();r.globalThis.navigator.msPointerEnabled?(t.style.msContentZooming="none",t.style.msTouchAction="none"):s.supportsPointerEvents&&(t.style.touchAction="none"),s.supportsPointerEvents?function(t){r.globalThis.document.addEventListener("pointermove",c,!0),t.addEventListener("pointerdown",l,!0),t.addEventListener("pointerleave",f,!0),t.addEventListener("pointerover",h,!0),r.globalThis.addEventListener("pointerup",u,!0),r.globalThis.addEventListener("pointercancel",d,!0)}(t):function(t){r.globalThis.document.addEventListener("mousemove",c,!0),t.addEventListener("mousedown",l,!0),t.addEventListener("mouseout",f,!0),t.addEventListener("mouseover",h,!0),r.globalThis.addEventListener("mouseup",u,!0)}(t),s.supportsTouchEvents&&function(t){t.addEventListener("touchstart",l,!0),t.addEventListener("touchend",u,!0),t.addEventListener("touchmove",c,!0),t.addEventListener("touchcancel",d,!0)}(t),a.useNativeClickEvent&&t.addEventListener("click",v,!0),t.addEventListener("wheel",p,{passive:!0,capture:!0})})),i.hooks.destroy.tap(t.tag,(function(){var t=n.context.contextService.getDomElement();r.globalThis.navigator.msPointerEnabled?(t.style.msContentZooming="",t.style.msTouchAction=""):s.supportsPointerEvents&&(t.style.touchAction=""),s.supportsPointerEvents?function(t){r.globalThis.document.removeEventListener("pointermove",c,!0),t.removeEventListener("pointerdown",l,!0),t.removeEventListener("pointerleave",f,!0),t.removeEventListener("pointerover",h,!0),r.globalThis.removeEventListener("pointerup",u,!0)}(t):function(t){r.globalThis.document.removeEventListener("mousemove",c,!0),t.removeEventListener("mousedown",l,!0),t.removeEventListener("mouseout",f,!0),t.removeEventListener("mouseover",h,!0),r.globalThis.removeEventListener("mouseup",u,!0)}(t),s.supportsTouchEvents&&function(t){t.removeEventListener("touchstart",l,!0),t.removeEventListener("touchend",u,!0),t.removeEventListener("touchmove",c,!0),t.removeEventListener("touchcancel",d,!0)}(t),a.useNativeClickEvent&&t.removeEventListener("click",v,!0),t.removeEventListener("wheel",p,!0)}))},t}();Xt.tag="DOMInteraction";var zt=function(t){var e,r;function n(){for(var e,r=arguments.length,n=Array(r),i=0;r>i;i++)n[i]=arguments[i];return(e=t.call.apply(t,[this].concat(n))||this).name="dom-interaction",e}(e=n).prototype=Object.create((r=t).prototype),e.prototype.constructor=e,Ut(e,r);var i=n.prototype;return i.init=function(){this.addRenderingPlugin(new Xt)},i.destroy=function(){this.removeAllRenderingPlugins()},n}(e.AbstractRendererPlugin),qt=Object.freeze({__proto__:null,Plugin:zt});function Qt(t,e){return Qt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Qt(t,e)}var Vt=function(){function t(){this.context=void 0,this.$camera=void 0}var r=t.prototype;return r.joinTransformMatrix=function(t){return"matrix("+[t[0],t[1],t[4],t[5],t[12],t[13]].join(",")+")"},r.apply=function(r){var n=this,i=r.camera,o=r.renderingContext,a=r.renderingService;this.context=r;var s=o.root.ownerDocument.defaultView,c=function(t,e){e.style.transform=n.joinTransformMatrix(t.getWorldTransform())},u=function(t){var r=t.target;if(r.nodeName===e.Shape.HTML){n.$camera||(n.$camera=n.createCamera(i));var o=n.getOrCreateEl(r);n.$camera.appendChild(o);var a=r.ownerDocument.documentElement.attributes;Object.keys(a).forEach((function(t){o.style[t]=a[t]})),Object.keys(r.attributes).forEach((function(t){n.updateAttribute(t,r)})),c(r,o),e.runtime.nativeHTMLMap.set(o,r)}},l=function(t){var r=t.target;if(r.nodeName===e.Shape.HTML&&n.$camera){var i=n.getOrCreateEl(r);i&&(i.remove(),e.runtime.nativeHTMLMap.delete(i))}},h=function(t){var r=t.target;r.nodeName===e.Shape.HTML&&n.updateAttribute(t.attrName,r)},f=function(t){var r=t.target;if(r.nodeName===e.Shape.HTML){var i=n.getOrCreateEl(r);c(r,i)}},d=function(){if(n.$camera){var t=n.context.config,e=t.height;n.$camera.style.width=(t.width||0)+"px",n.$camera.style.height=(e||0)+"px"}};a.hooks.init.tap(t.tag,(function(){s.addEventListener(e.CanvasEvent.RESIZE,d),s.addEventListener(e.ElementEvent.MOUNTED,u),s.addEventListener(e.ElementEvent.UNMOUNTED,l),s.addEventListener(e.ElementEvent.ATTR_MODIFIED,h),s.addEventListener(e.ElementEvent.BOUNDS_CHANGED,f)})),a.hooks.endFrame.tap(t.tag,(function(){n.$camera&&o.renderReasons.has(e.RenderReason.CAMERA_CHANGED)&&(n.$camera.style.transform=n.joinTransformMatrix(i.getOrthoMatrix()))})),a.hooks.destroy.tap(t.tag,(function(){n.$camera&&n.$camera.remove(),s.removeEventListener(e.CanvasEvent.RESIZE,d),s.removeEventListener(e.ElementEvent.MOUNTED,u),s.removeEventListener(e.ElementEvent.UNMOUNTED,l),s.removeEventListener(e.ElementEvent.ATTR_MODIFIED,h),s.removeEventListener(e.ElementEvent.BOUNDS_CHANGED,f)}))},r.getId=function(t){return t.id||"g-html-"+t.entity},r.createCamera=function(t){var e=this.context.config,r=e.document,n=e.width,i=e.height,o=this.context.contextService.getDomElement(),a=o.parentNode;if(a){var s="g-canvas-camera",c=a.querySelector("#"+s);if(!c){var u=(r||document).createElement("div");c=u,u.id=s,u.style.position="absolute",u.style.left=(o.offsetLeft||0)+"px",u.style.top=(o.offsetTop||0)+"px",u.style.transformOrigin="left top",u.style.transform=this.joinTransformMatrix(t.getOrthoMatrix()),u.style.overflow="hidden",u.style.pointerEvents="none",u.style.width=(n||0)+"px",u.style.height=(i||0)+"px",a.appendChild(u)}return c}return null},r.getOrCreateEl=function(t){var e=this.context.config.document,r=this.getId(t),n=this.$camera.querySelector("#"+r);return n||(n=(e||document).createElement("div"),t.parsedStyle.$el=n,n.id=r,t.name&&n.setAttribute("name",t.name),t.className&&(n.className=t.className),n.style.position="absolute",n.style.left="0px",n.style.top="0px",n.style["will-change"]="transform",n.style.transform=this.joinTransformMatrix(t.getWorldTransform())),n},r.updateAttribute=function(t,r){var n=this.getOrCreateEl(r);switch(t){case"innerHTML":var i=r.parsedStyle.innerHTML;b(i)?n.innerHTML=i:(n.innerHTML="",n.appendChild(i));break;case"transformOrigin":var o=r.parsedStyle.transformOrigin;n.style["transform-origin"]=o[0].value+" "+o[1].value;break;case"width":if(e.runtime.enableCSSParsing){var a=r.computedStyleMap().get("width");n.style.width=""+a}else{var s=r.parsedStyle.width;n.style.width=M(s)?s+"px":""+s}break;case"height":if(e.runtime.enableCSSParsing){var c=r.computedStyleMap().get("height");n.style.height=""+c}else{var u=r.parsedStyle.height;n.style.height=M(u)?u+"px":""+u}break;case"zIndex":n.style["z-index"]=""+r.parsedStyle.zIndex;break;case"visibility":n.style.visibility=r.parsedStyle.visibility;break;case"pointerEvents":n.style.pointerEvents=r.parsedStyle.pointerEvents;break;case"opacity":n.style.opacity=""+r.parsedStyle.opacity;break;case"fill":var l=r.parsedStyle.fill,h="";e.isCSSRGB(l)?h=l.isNone?"transparent":r.getAttribute("fill"):Array.isArray(l)?h=r.getAttribute("fill"):e.isPattern(l),n.style.background=h;break;case"stroke":var f=r.parsedStyle.stroke,d="";e.isCSSRGB(f)?d=f.isNone?"transparent":r.getAttribute("stroke"):Array.isArray(f)?d=r.getAttribute("stroke"):e.isPattern(f),n.style["border-color"]=d,n.style["border-style"]="solid";break;case"lineWidth":n.style["border-width"]=(r.parsedStyle.lineWidth||0)+"px";break;case"lineDash":n.style["border-style"]="dashed";break;case"filter":n.style.filter=r.style.filter}},t}();Vt.tag="HTMLRendering";var Zt=function(t){var e,r;function n(){for(var e,r=arguments.length,n=Array(r),i=0;r>i;i++)n[i]=arguments[i];return(e=t.call.apply(t,[this].concat(n))||this).name="html-renderer",e}(e=n).prototype=Object.create((r=t).prototype),e.prototype.constructor=e,Qt(e,r);var i=n.prototype;return i.init=function(){this.addRenderingPlugin(new Vt)},i.destroy=function(){this.removeAllRenderingPlugins()},n}(e.AbstractRendererPlugin),Jt=Object.freeze({__proto__:null,Plugin:Zt});function Kt(t,e){return Kt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Kt(t,e)}var te="undefined"!=typeof Float32Array?Float32Array:Array;Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var ee=function(){function t(t){this.canvasConfig=void 0,this.imageCache={},this.gradientCache={},this.patternCache={},this.canvasConfig=t}var r=t.prototype;return r.getImageSync=function(t,e){return this.imageCache[t]?e&&e():this.getOrCreateImage(t).then((function(){e&&e()})),this.imageCache[t]},r.getOrCreateImage=function(t){var r=this;if(this.imageCache[t])return Promise.resolve(this.imageCache[t]);var n=this.canvasConfig.createImage;return new Promise((function(i,o){var a;n?a=n(t):e.isBrowser&&(a=new window.Image),a&&(a.onload=function(){r.imageCache[t]=a,i(a)},a.onerror=function(t){o(t)},a.crossOrigin="Anonymous",a.src=t)}))},r.getOrCreatePatternSync=function(t,r,n,i,o){var a=this.generatePatternKey(t);if(a&&this.patternCache[a])return this.patternCache[a];var s,c=t.image,u=t.repetition,l=t.transform,h=!1;b(c)?s=this.getImageSync(c,o):n?(s=n,h=!0):s=c;var f,d,p=s&&r.createPattern(s,u);p&&(f=l?e.parsedTransformToMat4(e.parseTransform(l)):function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}((d=new te(16),te!=Float32Array&&(d[1]=0,d[2]=0,d[3]=0,d[4]=0,d[6]=0,d[7]=0,d[8]=0,d[9]=0,d[11]=0,d[12]=0,d[13]=0,d[14]=0),d[0]=1,d[5]=1,d[10]=1,d[15]=1,d)),h&&function(t,e,r){var n=r[0],i=r[1],o=r[2];t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]}(f,f,[1/i,1/i,1]),p.setTransform({a:f[0],b:f[1],c:f[4],d:f[5],e:f[12],f:f[13]}));return a&&p&&(this.patternCache[a]=p),p},r.getOrCreateGradient=function(t,r){var n=this.generateGradientKey(t),i=t.type,o=t.steps,a=t.width,s=t.height,c=t.cx,u=t.cy,l=t.size;if(this.gradientCache[n])return this.gradientCache[n];var h=null;if(i===e.GradientType.LinearGradient){var f=e.computeLinearGradient(a,s,t.angle);h=r.createLinearGradient(f.x1,f.y1,f.x2,f.y2)}else if(i===e.GradientType.RadialGradient){var d=e.computeRadialGradient(a,s,c,u,l),p=d.x,v=d.y;h=r.createRadialGradient(p,v,0,p,v,d.r)}return h&&(o.forEach((function(t){var r,n=t.offset;n.unit===e.UnitType.kPercentage&&(null===(r=h)||void 0===r||r.addColorStop(n.value/100,""+t.color))})),this.gradientCache[n]=h),this.gradientCache[n]},r.generateGradientKey=function(t){var e=t.angle,r=t.cx,n=t.cy,i=t.size;return"gradient-"+t.type+"-"+((null==e?void 0:""+e)||0)+"-"+((null==r?void 0:""+r)||0)+"-"+((null==n?void 0:""+n)||0)+"-"+((null==i?void 0:""+i)||0)+"-"+t.width+"-"+t.height+"-"+t.steps.map((function(t){return""+t.offset+t.color})).join("-")},r.generatePatternKey=function(t){var e=t.image,r=t.repetition;return b(e)?"pattern-"+e+"-"+r:"rect"===e.nodeName?"pattern-"+e.entity+"-"+r:void 0},t}(),re=function(){function t(){}return t.prototype.apply=function(r){var n=r.renderingService,i=r.imagePool,o=r.renderingContext.root.ownerDocument.defaultView,a=function(t){var r=t.target;if(r.nodeName===e.Shape.IMAGE){var o=r.attributes.img;b(o)&&i.getImageSync(o,(function(){r.renderable.dirty=!0,n.dirtify()}))}},s=function(t){var r=t.target,o=t.newValue;r.nodeName===e.Shape.IMAGE&&"img"===t.attrName&&b(o)&&i.getOrCreateImage(o).then((function(){r.renderable.dirty=!0,n.dirtify()}))};n.hooks.init.tap(t.tag,(function(){o.addEventListener(e.ElementEvent.MOUNTED,a),o.addEventListener(e.ElementEvent.ATTR_MODIFIED,s)})),n.hooks.destroy.tap(t.tag,(function(){o.removeEventListener(e.ElementEvent.MOUNTED,a),o.removeEventListener(e.ElementEvent.ATTR_MODIFIED,s)}))},t}();re.tag="LoadImage";var ne=function(t){var e,r;function n(){for(var e,r=arguments.length,n=Array(r),i=0;r>i;i++)n[i]=arguments[i];return(e=t.call.apply(t,[this].concat(n))||this).name="image-loader",e}(e=n).prototype=Object.create((r=t).prototype),e.prototype.constructor=e,Kt(e,r);var i=n.prototype;return i.init=function(){this.context.imagePool=new ee(this.context.config),this.addRenderingPlugin(new re)},i.destroy=function(){this.removeAllRenderingPlugins()},n}(e.AbstractRendererPlugin),ie=Object.freeze({__proto__:null,ImagePool:ee,Plugin:ne}),oe=function(){function t(t){this.$container=void 0,this.$canvas=void 0,this.dpr=void 0,this.context=void 0,this.canvasConfig=void 0,this.renderingContext=void 0,this.renderingContext=t.renderingContext,this.canvasConfig=t.config}var i=t.prototype;return i.init=function(){var t=this.canvasConfig,e=t.container,r=t.canvas;if(r)this.$canvas=r,e&&r.parentElement!==e&&e.appendChild(r),this.$container=r.parentElement,this.canvasConfig.container=this.$container;else if(e&&(this.$container=b(e)?document.getElementById(e):e,this.$container)){var n=document.createElement("canvas");this.$container.appendChild(n),this.$container.style.position||(this.$container.style.position="relative"),this.$canvas=n}this.context=this.$canvas.getContext("2d"),this.resize(this.canvasConfig.width,this.canvasConfig.height)},i.getContext=function(){return this.context},i.getDomElement=function(){return this.$canvas},i.getDPR=function(){return this.dpr},i.getBoundingClientRect=function(){if(this.$canvas.getBoundingClientRect)return this.$canvas.getBoundingClientRect()},i.destroy=function(){this.$container&&this.$canvas&&this.$canvas.parentNode&&this.$container.removeChild(this.$canvas)},i.resize=function(t,r){var n=this.canvasConfig.devicePixelRatio||e.isBrowser&&window.devicePixelRatio||1;this.dpr=n=1>n?1:Math.ceil(n),this.$canvas&&(this.$canvas.width=this.dpr*t,this.$canvas.height=this.dpr*r,e.setDOMSize(this.$canvas,t,r)),this.renderingContext.renderReasons.add(e.RenderReason.CAMERA_CHANGED)},i.applyCursorStyle=function(t){this.$container&&this.$container.style&&(this.$container.style.cursor=t)},i.toDataURL=function(){var t,e=(t=r().mark((function t(e){var n;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return void 0===e&&(e={}),t.abrupt("return",this.context.canvas.toDataURL((n=e).type,n.encoderOptions));case 3:case"end":return t.stop()}}),t,this)})),function(){var e=this,r=arguments;return new Promise((function(i,o){var a=t.apply(e,r);function s(t){n(a,i,o,s,c,"next",t)}function c(t){n(a,i,o,s,c,"throw",t)}s(void 0)}))});return function(t){return e.apply(this,arguments)}}(),t}(),ae=function(t){function e(){for(var e,r=arguments.length,n=Array(r),i=0;r>i;i++)n[i]=arguments[i];return(e=t.call.apply(t,[this].concat(n))||this).name="canvas-context-register",e}i(e,t);var r=e.prototype;return r.init=function(){this.context.ContextService=oe},r.destroy=function(){delete this.context.ContextService},e}(e.AbstractRendererPlugin),se=function(t){function e(e){var r;return(r=t.call(this,e)||this).registerPlugin(new ae),r.registerPlugin(new ne),r.registerPlugin(new k),r.registerPlugin(new Wt),r.registerPlugin(new zt),r.registerPlugin(new Ot),r.registerPlugin(new Zt),r}return i(e,t),e}(e.AbstractRenderer);t.CanvasPathGenerator=R,t.CanvasPicker=Lt,t.CanvasRenderer=Yt,t.DomInteraction=qt,t.HTMLRenderer=Jt,t.ImageLoader=ie,t.Renderer=se,Object.defineProperty(t,"__esModule",{value:!0})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antv/g-canvas",
3
- "version": "1.9.46",
3
+ "version": "1.9.48",
4
4
  "description": "A renderer implemented by Canvas 2D API",
5
5
  "keywords": [
6
6
  "antv",
@@ -33,11 +33,11 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@antv/g-plugin-canvas-path-generator": "^1.1.51",
36
- "@antv/g-plugin-canvas-picker": "^1.8.50",
37
- "@antv/g-plugin-canvas-renderer": "^1.7.58",
38
- "@antv/g-plugin-dom-interaction": "^1.7.50",
39
- "@antv/g-plugin-html-renderer": "^1.7.54",
40
- "@antv/g-plugin-image-loader": "^1.1.52",
36
+ "@antv/g-plugin-canvas-picker": "^1.8.51",
37
+ "@antv/g-plugin-canvas-renderer": "^1.7.60",
38
+ "@antv/g-plugin-dom-interaction": "^1.7.52",
39
+ "@antv/g-plugin-html-renderer": "^1.7.56",
40
+ "@antv/g-plugin-image-loader": "^1.1.54",
41
41
  "@antv/util": "^3.3.1",
42
42
  "@types/offscreencanvas": "^2019.6.4",
43
43
  "tslib": "^2.3.1"
@@ -52,5 +52,5 @@
52
52
  "publishConfig": {
53
53
  "access": "public"
54
54
  },
55
- "gitHead": "53932c66ed9f2cbc28993e1e359c8df27703fc52"
55
+ "gitHead": "09b3114354c305562668f22159d9cc35d56c813a"
56
56
  }