Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@antv/g-plugin-canvas-picker

Package Overview
Dependencies
Maintainers
64
Versions
239
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@antv/g-plugin-canvas-picker - npm Package Compare versions

Comparing version 1.10.24-next.12 to 1.10.24-next.13

4

dist/index.esm.js

@@ -354,4 +354,4 @@ import { __awaiter, __generator, __values, __read, __assign, __extends, __spreadArray } from 'tslib';

function isPointInPath$4(displayObject, position, isClipPath, isPointInPath, renderingPluginContext, runtime) {
var _a = displayObject.parsedStyle, _b = _a.lineWidth, lineWidth = _b === void 0 ? 0 : _b, _c = _a.increasedLineWidthForHitTesting, increasedLineWidthForHitTesting = _c === void 0 ? 0 : _c, stroke = _a.stroke, fill = _a.fill, path = _a.path, pointerEvents = _a.pointerEvents;
var segments = path.segments, hasArc = path.hasArc, polylines = path.polylines, polygons = path.polygons;
var _a = displayObject.parsedStyle, _b = _a.lineWidth, lineWidth = _b === void 0 ? 0 : _b, _c = _a.increasedLineWidthForHitTesting, increasedLineWidthForHitTesting = _c === void 0 ? 0 : _c, stroke = _a.stroke, fill = _a.fill, d = _a.d, pointerEvents = _a.pointerEvents;
var segments = d.segments, hasArc = d.hasArc, polylines = d.polylines, polygons = d.polygons;
var _d = __read(isFillOrStrokeAffected(pointerEvents,

@@ -358,0 +358,0 @@ // Only a closed path can be filled.

@@ -356,4 +356,4 @@ 'use strict';

function isPointInPath$4(displayObject, position, isClipPath, isPointInPath, renderingPluginContext, runtime) {
var _a = displayObject.parsedStyle, _b = _a.lineWidth, lineWidth = _b === void 0 ? 0 : _b, _c = _a.increasedLineWidthForHitTesting, increasedLineWidthForHitTesting = _c === void 0 ? 0 : _c, stroke = _a.stroke, fill = _a.fill, path = _a.path, pointerEvents = _a.pointerEvents;
var segments = path.segments, hasArc = path.hasArc, polylines = path.polylines, polygons = path.polygons;
var _a = displayObject.parsedStyle, _b = _a.lineWidth, lineWidth = _b === void 0 ? 0 : _b, _c = _a.increasedLineWidthForHitTesting, increasedLineWidthForHitTesting = _c === void 0 ? 0 : _c, stroke = _a.stroke, fill = _a.fill, d = _a.d, pointerEvents = _a.pointerEvents;
var segments = d.segments, hasArc = d.hasArc, polylines = d.polylines, polygons = d.polygons;
var _d = tslib.__read(gLite.isFillOrStrokeAffected(pointerEvents,

@@ -360,0 +360,0 @@ // Only a closed path can be filled.

@@ -1,2 +0,2 @@

!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("@antv/g-lite")):"function"==typeof define&&define.amd?define(["exports","@antv/g-lite"],r):r(((t="undefined"!=typeof globalThis?globalThis:t||self).G=t.G||{},t.G.CanvasPicker={}),t.window.G)}(this,(function(t,r){"use strict";var n=function(t,r){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])},n(t,r)};var e=function(){return e=Object.assign||function(t){for(var r,n=1,e=arguments.length;e>n;n++)for(var i in r=arguments[n])Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i]);return t},e.apply(this,arguments)};function i(t,r,n,e){return new(n||(n=Promise))((function(i,o){function a(t){try{u(e.next(t))}catch(t){o(t)}}function c(t){try{u(e.throw(t))}catch(t){o(t)}}function u(t){var r;t.done?i(t.value):(r=t.value,r instanceof n?r:new n((function(t){t(r)}))).then(a,c)}u((e=e.apply(t,r||[])).next())}))}function o(t,r){var n,e,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(c){return function(u){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(a=0)),a;)try{if(n=1,e&&(i=2&c[0]?e.return:c[0]?e.throw||((i=e.return)&&i.call(e),0):e.next)&&!(i=i.call(e,c[1])).done)return i;switch(e=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,e=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&i[3]>c[1])){a.label=c[1];break}if(6===c[0]&&i[1]>a.label){a.label=i[1],i=c;break}if(i&&i[2]>a.label){a.label=i[2],a.ops.push(c);break}i[2]&&a.ops.pop(),a.trys.pop();continue}c=r.call(t,a)}catch(t){c=[6,t],e=0}finally{n=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}}function a(t,r){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var e,i,o=n.call(t),a=[];try{for(;(void 0===r||r-- >0)&&!(e=o.next()).done;)a.push(e.value)}catch(t){i={error:t}}finally{try{e&&!e.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function c(t,r,n){if(n||2===arguments.length)for(var e,i=0,o=r.length;o>i;i++)!e&&i in r||(e||(e=Array.prototype.slice.call(r,0,i)),e[i]=r[i]);return t.concat(e||Array.prototype.slice.call(r))}var u="undefined"!=typeof Float32Array?Float32Array:Array;function f(){var t=new u(3);return u!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function l(t,r,n,e){return t[0]=r,t[1]=n,t[2]=e,t}Math.hypot||(Math.hypot=function(){for(var t=0,r=arguments.length;r--;)t+=arguments[r]*arguments[r];return Math.sqrt(t)}),f(),function(){var t,r=(t=new u(2),u!=Float32Array&&(t[0]=0,t[1]=0),t)}();var s,h=f(),v=f(),p=f(),d=(s=new u(16),u!=Float32Array&&(s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[11]=0,s[12]=0,s[13]=0,s[14]=0),s[0]=1,s[5]=1,s[10]=1,s[15]=1,s),y=function(){function t(){var t=this;this.isHit=function(n,e,i,o){var a=t.context.pointInPathPickerFactory[n.nodeName];if(a){var c=function(t,r){var n=r[0],e=r[1],i=r[2],o=r[3],a=r[4],c=r[5],u=r[6],f=r[7],l=r[8],s=r[9],h=r[10],v=r[11],p=r[12],d=r[13],y=r[14],x=r[15],g=n*c-e*a,M=n*u-i*a,P=n*f-o*a,b=e*u-i*c,m=e*f-o*c,S=i*f-o*u,k=l*d-s*p,w=l*y-h*p,F=l*x-v*p,C=s*y-h*d,O=s*x-v*d,A=h*x-v*y,I=g*A-M*O+P*C+b*F-m*w+S*k;return I?(t[0]=(c*A-u*O+f*C)*(I=1/I),t[1]=(i*O-e*A-o*C)*I,t[2]=(d*S-y*m+x*b)*I,t[3]=(h*m-s*S-v*b)*I,t[4]=(u*F-a*A-f*w)*I,t[5]=(n*A-i*F+o*w)*I,t[6]=(y*P-p*S-x*M)*I,t[7]=(l*S-h*P+v*M)*I,t[8]=(a*O-c*F+f*k)*I,t[9]=(e*F-n*O-o*k)*I,t[10]=(p*m-d*P+x*g)*I,t[11]=(s*P-l*m-v*g)*I,t[12]=(c*w-a*C-u*k)*I,t[13]=(n*C-e*w+i*k)*I,t[14]=(d*M-p*b-y*g)*I,t[15]=(l*b-s*M+h*g)*I,t):null}(d,i),u=function(t,r,n){var e=r[0],i=r[1],o=r[2],a=n[3]*e+n[7]*i+n[11]*o+n[15];return t[0]=(n[0]*e+n[4]*i+n[8]*o+n[12])/(a=a||1),t[1]=(n[1]*e+n[5]*i+n[9]*o+n[13])/a,t[2]=(n[2]*e+n[6]*i+n[10]*o+n[14])/a,t}(v,l(p,e[0],e[1],0),c);if(a(n,new r.Point(u[0],u[1]),o,t.isPointInPath,t.context,t.runtime))return!0}return!1},this.isPointInPath=function(r,n){var e=t.runtime.offscreenCanvasCreator.getOrCreateContext(t.context.config.offscreenCanvas),i=t.context.pathGeneratorFactory[r.nodeName];return i&&(e.beginPath(),i(e,r.parsedStyle),e.closePath()),e.isPointInPath(n.x,n.y)}}return t.prototype.apply=function(r,n){var e,a=this,c=r.renderingService,u=r.renderingContext;this.context=r,this.runtime=n;var f=null===(e=u.root)||void 0===e?void 0:e.ownerDocument;c.hooks.pick.tapPromise(t.tag,(function(t){return i(a,void 0,void 0,(function(){return o(this,(function(r){return[2,this.pick(f,t)]}))}))})),c.hooks.pickSync.tap(t.tag,(function(t){return a.pick(f,t)}))},t.prototype.pick=function(t,n){var e,i,o=n.topmost,a=n.position,c=l(h,a.x,a.y,0),u=t.elementsFromBBox(c[0],c[1],c[0],c[1]),f=[];try{for(var s=function(t){var r="function"==typeof Symbol&&Symbol.iterator,n=r&&t[r],e=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&e>=t.length&&(t=void 0),{value:t&&t[e++],done:!t}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}(u),v=s.next();!v.done;v=s.next()){var p=v.value,d=p.getWorldTransform();if(this.isHit(p,c,d,!1)){var y=r.findClosestClipPathTarget(p);if(y){var x=y.parsedStyle.clipPath;if(this.isHit(x,c,x.getWorldTransform(),!0)){if(o)return n.picked=[p],n;f.push(p)}}else{if(o)return n.picked=[p],n;f.push(p)}}}}catch(t){e={error:t}}finally{try{v&&!v.done&&(i=s.return)&&i.call(s)}finally{if(e)throw e.error}}return n.picked=f,n},t.tag="CanvasPicker",t}();function x(t,r,n){return{x:t*Math.cos(n)-r*Math.sin(n),y:t*Math.sin(n)+r*Math.cos(n)}}function g(t,r,n,e,i,o,a,c,u,f){var l,s,h,v,p,d=t,y=r,M=n,P=e,b=c,m=u,S=120*Math.PI/180,k=Math.PI/180*(+i||0),w=[];if(f)s=f[0],h=f[1],v=f[2],p=f[3];else{y=(l=x(d,y,-k)).y;var F=((d=l.x)-(b=(l=x(b,m,-k)).x))/2,C=(y-(m=l.y))/2,O=F*F/(M*M)+C*C/(P*P);O>1&&(M*=O=Math.sqrt(O),P*=O);var A=M*M,I=P*P,E=(o===a?-1:1)*Math.sqrt(Math.abs((A*I-A*C*C-I*F*F)/(A*C*C+I*F*F)));v=E*M*C/P+(d+b)/2,s=Math.asin(((y-(p=E*-P*F/M+(y+m)/2))/P*1e9>>0)/1e9),h=Math.asin(((m-p)/P*1e9>>0)/1e9),0>(s=v>d?Math.PI-s:s)&&(s=2*Math.PI+s),0>(h=v>b?Math.PI-h:h)&&(h=2*Math.PI+h),a&&s>h&&(s-=2*Math.PI),!a&&h>s&&(h-=2*Math.PI)}var T=h-s;if(Math.abs(T)>S){var L=h,W=b,H=m;w=g(b=v+M*Math.cos(h=s+S*(a&&h>s?1:-1)),m=p+P*Math.sin(h),M,P,i,0,a,W,H,[h,L,v,p])}T=h-s;var G=Math.cos(s),q=Math.sin(s),R=Math.cos(h),_=Math.sin(h),j=Math.tan(T/4),N=4/3*M*j,B=4/3*P*j,D=[d,y],Y=[d+N*q,y-B*G],Q=[b+N*_,m-B*R],U=[b,m];if(Y[0]=2*D[0]-Y[0],Y[1]=2*D[1]-Y[1],f)return Y.concat(Q,U,w);for(var X=[],Z=0,z=(w=Y.concat(Q,U,w)).length;z>Z;Z+=1)X[Z]=Z%2?x(w[Z-1],w[Z],k).y:x(w[Z],w[Z+1],k).x;return X}var M=function(t,r,n){return r>t?r:t>n?n:t};function P(t,r,n,e){var i=t-n,o=r-e;return Math.sqrt(i*i+o*o)}var b=1e-4;function m(t,r,n,e,i,o){var u=-1,f=1/0,l=[n,e],s=20;o&&o>200&&(s=o/10);for(var h=1/s,v=h/10,p=0;s>=p;p++){var d=p*h,y=[i.apply(void 0,c([],a(t.concat([d])),!1)),i.apply(void 0,c([],a(r.concat([d])),!1))];f>(m=P(l[0],l[1],y[0],y[1]))&&(u=d,f=m)}if(0===u)return{x:t[0],y:r[0]};if(1===u){var x=t.length;return{x:t[x-1],y:r[x-1]}}f=1/0;for(p=0;32>p&&b<=v;p++){var g=u-v,M=u+v,m=(y=[i.apply(void 0,c([],a(t.concat([g])),!1)),i.apply(void 0,c([],a(r.concat([g])),!1))],P(l[0],l[1],y[0],y[1]));if(g>=0&&f>m)u=g,f=m;else{var S=[i.apply(void 0,c([],a(t.concat([M])),!1)),i.apply(void 0,c([],a(r.concat([M])),!1))],k=P(l[0],l[1],S[0],S[1]);1>=M&&f>k?(u=M,f=k):v*=.5}}return{x:i.apply(void 0,c([],a(t.concat([u])),!1)),y:i.apply(void 0,c([],a(r.concat([u])),!1))}}function S(t,r,n,e,i,o){var a=[n-t,e-r];if(function(t,r){return t[0]===r[0]&&t[1]===r[1]}(a,[0,0]))return Math.sqrt((i-t)*(i-t)+(o-r)*(o-r));var c=[-a[1],a[0]];return function(t,r){var n=r[0],e=r[1],i=n*n+e*e;i>0&&(i=1/Math.sqrt(i)),t[0]=r[0]*i,t[1]=r[1]*i}(c,c),Math.abs(function(t,r){return t[0]*r[0]+t[1]*r[1]}([i-t,o-r],c))}function k(t,r,n,e,i){var o=1-i;return o*o*o*t+3*r*i*o*o+3*n*i*i*o+e*i*i*i}function w(t,r,n,e,i,o,a,c,u,f,l){var s=function(t,r,n,e,i,o,a,c,u,f,l){return m([t,n,i,a],[r,e,o,c],u,f,k,l)}(t,r,n,e,i,o,a,c,u,f,l);return P(s.x,s.y,u,f)}function F(t,r,n,e){var i=1-e;return i*i*t+2*e*i*r+e*e*n}function C(t,r,n,e,i,o,a,c){var u=function(t,r,n,e,i,o,a,c){return m([t,n,i],[r,e,o],a,c,F)}(t,r,n,e,i,o,a,c);return P(u.x,u.y,a,c)}function O(t,n,e){var i=t.parsedStyle,o=i.cx,c=i.cy,u=i.r,f=i.fill,l=i.stroke,s=i.lineWidth,h=i.increasedLineWidthForHitTesting,v=i.pointerEvents,p=((void 0===s?0:s)+(void 0===h?0:h))/2,d=P(void 0===o?0:o,void 0===c?0:c,n.x,n.y),y=a(r.isFillOrStrokeAffected(v,f,l),2),x=y[0],g=y[1];return x&&g||e?u+p>=d:x?u>=d:!!g&&(d>=u-p&&u+p>=d)}function A(t,r,n,e){return t/(n*n)+r/(e*e)}function I(t,n,e){var i=t.parsedStyle,o=i.cx,c=void 0===o?0:o,u=i.cy,f=void 0===u?0:u,l=i.rx,s=i.ry,h=i.lineWidth,v=void 0===h?0:h,p=i.increasedLineWidthForHitTesting,d=void 0===p?0:p,y=n.x,x=n.y,g=a(r.isFillOrStrokeAffected(i.pointerEvents,i.fill,i.stroke),2),M=g[0],P=g[1],b=(v+d)/2,m=(y-c)*(y-c),S=(x-f)*(x-f);return M&&P||e?1>=A(m,S,l+b,s+b):M?1>=A(m,S,l,s):!!P&&(A(m,S,l-b,s-b)>=1&&1>=A(m,S,l+b,s+b))}function E(t,r,n,e,i,o){return!(t>i||i>t+n||r>o||o>r+e)}function T(t,r,n,e,i,o,a,c){var u=(Math.atan2(c-r,a-t)+2*Math.PI)%(2*Math.PI),f={x:t+n*Math.cos(u),y:r+n*Math.sin(u)};return P(f.x,f.y,a,c)<=o/2}function L(t,r,n,e,i,o,a){var c=i/2;return!(Math.min(t,n)-c>o||o>Math.max(t,n)+c||Math.min(r,e)-c>a||a>Math.max(r,e)+c)&&S(t,r,n,e,o,a)<=i/2}function W(t,r,n,e,i){var o=t.length;if(2>o)return!1;for(var a=0;o-1>a;a++){if(L(t[a][0],t[a][1],t[a+1][0],t[a+1][1],r,n,e))return!0}if(i){var c=t[0],u=t[o-1];if(L(c[0],c[1],u[0],u[1],r,n,e))return!0}return!1}var H=1e-6;function G(t){return H>Math.abs(t)?0:0>t?-1:1}function q(t,r,n){return!((n[0]-t[0])*(r[1]-t[1])!=(r[0]-t[0])*(n[1]-t[1])||Math.min(t[0],r[0])>n[0]||n[0]>Math.max(t[0],r[0])||Math.min(t[1],r[1])>n[1]||n[1]>Math.max(t[1],r[1]))}function R(t,r,n){var e=!1,i=t.length;if(2>=i)return!1;for(var o=0;i>o;o++){var a=t[o],c=t[(o+1)%i];if(q(a,c,[r,n]))return!0;G(a[1]-n)>0!=G(c[1]-n)>0&&0>G(r-(n-a[1])*(a[0]-c[0])/(a[1]-c[1])-a[0])&&(e=!e)}return e}function _(t,r,n){for(var e=!1,i=0;t.length>i;i++){if(e=R(t[i],r,n))break}return e}function j(t,n,e){var i=t.parsedStyle,o=i.x1,c=i.y1,u=i.x2,f=i.y2,l=i.lineWidth,s=void 0===l?0:l,h=i.increasedLineWidthForHitTesting,v=void 0===h?0:h;return!(!a(r.isFillOrStrokeAffected(i.pointerEvents,i.fill,i.stroke),2)[1]&&!e||!s)&&L(o,c,u,f,s+v,n.x,n.y)}function N(t,n,e,i,o,c){var u=t.parsedStyle,f=u.lineWidth,l=void 0===f?0:f,s=u.increasedLineWidthForHitTesting,h=void 0===s?0:s,v=u.path,p=v.segments,d=v.hasArc,y=v.polylines,x=v.polygons,M=a(r.isFillOrStrokeAffected(u.pointerEvents,(null==x?void 0:x.length)&&u.fill,u.stroke),2),P=M[0],b=M[1],m=r.getOrCalculatePathTotalLength(t),S=!1;return P||e?S=d?i(t,n):_(x,n.x,n.y)||_(y,n.x,n.y):((b||e)&&(S=function(t,r,n,e,i){for(var o=!1,a=r/2,c=0;t.length>c;c++){var u=t[c],f=u.currentPoint,l=u.params,s=u.prePoint,h=u.box;if(!h||E(h.x-a,h.y-a,h.width+r,h.height+r,n,e))switch(u.command){case"L":case"Z":if(o=L(s[0],s[1],f[0],f[1],r,n,e))return!0;break;case"Q":if(o=r/2>=C(s[0],s[1],l[1],l[2],l[3],l[4],n,e))return!0;break;case"C":if(o=r/2>=w(s[0],s[1],l[1],l[2],l[3],l[4],l[5],l[6],n,e,i))return!0;break;case"A":u.cubicParams||(u.cubicParams=g(s[0],s[1],l[1],l[2],l[3],l[4],l[5],l[6],l[7],void 0));for(var v=u.cubicParams,p=s,d=0;v.length>d;d+=6){var y=w(p[0],p[1],v[d],v[d+1],v[d+2],v[d+3],v[d+4],v[d+5],n,e,i);if(p=[v[d+4],v[d+5]],o=r/2>=y)return!0}}}return o}(p,l+h,n.x,n.y,m)),S)}function B(t,n,e){var i=t.parsedStyle,o=i.lineWidth,c=void 0===o?0:o,u=i.increasedLineWidthForHitTesting,f=void 0===u?0:u,l=i.points,s=a(r.isFillOrStrokeAffected(i.pointerEvents,i.fill,i.stroke),2),h=s[0],v=!1;return(s[1]||e)&&(v=W(l.points,c+f,n.x,n.y,!0)),v||!h&&!e||(v=R(l.points,n.x,n.y)),v}function D(t,n,e){var i=t.parsedStyle,o=i.lineWidth,c=void 0===o?0:o,u=i.increasedLineWidthForHitTesting,f=void 0===u?0:u,l=i.points;return!(!a(r.isFillOrStrokeAffected(i.pointerEvents,i.fill,i.stroke),2)[1]&&!e||!c)&&W(l.points,c+f,n.x,n.y,!1)}function Y(t,n,e,i,o){var c=t.parsedStyle,u=c.radius,f=c.lineWidth,l=void 0===f?0:f,s=c.increasedLineWidthForHitTesting,h=void 0===s?0:s,v=c.x,p=void 0===v?0:v,d=c.y,y=void 0===d?0:d,x=c.width,g=c.height,P=a(r.isFillOrStrokeAffected(c.pointerEvents,c.fill,c.stroke),2),b=P[0],m=P[1],S=l+h;if(u&&u.some((function(t){return 0!==t}))){var k=!1;return(m||e)&&(k=function(t,r,n,e,i,o,c,u){var f=a(i,4),l=f[0],s=f[1],h=f[2],v=f[3];return L(t+l,r,t+n-s,r,o,c,u)||L(t+n,r+s,t+n,r+e-h,o,c,u)||L(t+n-h,r+e,t+v,r+e,o,c,u)||L(t,r+e-v,t,r+l,o,c,u)||T(t+n-s,r+s,s,0,0,o,c,u)||T(t+n-h,r+e-h,h,0,0,o,c,u)||T(t+v,r+e-v,v,0,0,o,c,u)||T(t+l,r+l,l,0,0,o,c,u)}(p,y,x,g,u.map((function(t){return M(t,0,Math.min(Math.abs(x)/2,Math.abs(g)/2))})),S,n.x,n.y)),k||!b&&!e||(k=i(t,n)),k}var w=S/2;return b&&m||e?E(p-w,y-w,x+w,g+w,n.x,n.y):b?E(p,y,x,g,n.x,n.y):!!m&&function(t,r,n,e,i,o,a){var c=i/2;return E(t-c,r-c,n,i,o,a)||E(t+n-c,r-c,i,e,o,a)||E(t+c,r+e-c,n,i,o,a)||E(t-c,r+c,i,e,o,a)}(p,y,x,g,S,n.x,n.y)}function Q(t,n,i,o,a,c){var u=t.parsedStyle,f=u.x,l=void 0===f?0:f,s=u.y,h=void 0===s?0:s,v=u.width,p=u.height;if("non-transparent-pixel"===u.pointerEvents){var d=a.config.offscreenCanvas,y=c.offscreenCanvasCreator.getOrCreateCanvas(d),x=c.offscreenCanvasCreator.getOrCreateContext(d,{willReadFrequently:!0});return y.width=v,y.height=p,a.defaultStyleRendererFactory[r.Shape.IMAGE].render(x,e(e({},t.parsedStyle),{x:0,y:0}),t,void 0,void 0,void 0),x.getImageData(n.x-l,n.y-h,1,1).data.every((function(t){return 0!==t}))}return!0}var U=function(t){function e(){var r=t.apply(this,c([],a(arguments),!1))||this;return r.name="canvas-picker",r}return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+r+" is not a constructor or null");function e(){this.constructor=t}n(t,r),t.prototype=null===r?Object.create(r):(e.prototype=r.prototype,new e)}(e,t),e.prototype.init=function(){var t,n=((t={})[r.Shape.CIRCLE]=O,t[r.Shape.ELLIPSE]=I,t[r.Shape.RECT]=Y,t[r.Shape.LINE]=j,t[r.Shape.POLYLINE]=D,t[r.Shape.POLYGON]=B,t[r.Shape.PATH]=N,t[r.Shape.TEXT]=function(){return!0},t[r.Shape.GROUP]=null,t[r.Shape.IMAGE]=Q,t[r.Shape.HTML]=null,t[r.Shape.MESH]=null,t);this.context.pointInPathPickerFactory=n,this.addRenderingPlugin(new y)},e.prototype.destroy=function(){delete this.context.pointInPathPickerFactory,this.removeAllRenderingPlugins()},e}(r.AbstractRendererPlugin);t.Plugin=U}));
!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("@antv/g-lite")):"function"==typeof define&&define.amd?define(["exports","@antv/g-lite"],r):r(((t="undefined"!=typeof globalThis?globalThis:t||self).G=t.G||{},t.G.CanvasPicker={}),t.window.G)}(this,(function(t,r){"use strict";var n=function(t,r){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])},n(t,r)};var e=function(){return e=Object.assign||function(t){for(var r,n=1,e=arguments.length;e>n;n++)for(var i in r=arguments[n])Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i]);return t},e.apply(this,arguments)};function i(t,r,n,e){return new(n||(n=Promise))((function(i,o){function a(t){try{u(e.next(t))}catch(t){o(t)}}function c(t){try{u(e.throw(t))}catch(t){o(t)}}function u(t){var r;t.done?i(t.value):(r=t.value,r instanceof n?r:new n((function(t){t(r)}))).then(a,c)}u((e=e.apply(t,r||[])).next())}))}function o(t,r){var n,e,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(c){return function(u){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(a=0)),a;)try{if(n=1,e&&(i=2&c[0]?e.return:c[0]?e.throw||((i=e.return)&&i.call(e),0):e.next)&&!(i=i.call(e,c[1])).done)return i;switch(e=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,e=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&i[3]>c[1])){a.label=c[1];break}if(6===c[0]&&i[1]>a.label){a.label=i[1],i=c;break}if(i&&i[2]>a.label){a.label=i[2],a.ops.push(c);break}i[2]&&a.ops.pop(),a.trys.pop();continue}c=r.call(t,a)}catch(t){c=[6,t],e=0}finally{n=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}}function a(t,r){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var e,i,o=n.call(t),a=[];try{for(;(void 0===r||r-- >0)&&!(e=o.next()).done;)a.push(e.value)}catch(t){i={error:t}}finally{try{e&&!e.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function c(t,r,n){if(n||2===arguments.length)for(var e,i=0,o=r.length;o>i;i++)!e&&i in r||(e||(e=Array.prototype.slice.call(r,0,i)),e[i]=r[i]);return t.concat(e||Array.prototype.slice.call(r))}var u="undefined"!=typeof Float32Array?Float32Array:Array;function f(){var t=new u(3);return u!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function l(t,r,n,e){return t[0]=r,t[1]=n,t[2]=e,t}Math.hypot||(Math.hypot=function(){for(var t=0,r=arguments.length;r--;)t+=arguments[r]*arguments[r];return Math.sqrt(t)}),f(),function(){var t,r=(t=new u(2),u!=Float32Array&&(t[0]=0,t[1]=0),t)}();var s,h=f(),v=f(),p=f(),d=(s=new u(16),u!=Float32Array&&(s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[11]=0,s[12]=0,s[13]=0,s[14]=0),s[0]=1,s[5]=1,s[10]=1,s[15]=1,s),y=function(){function t(){var t=this;this.isHit=function(n,e,i,o){var a=t.context.pointInPathPickerFactory[n.nodeName];if(a){var c=function(t,r){var n=r[0],e=r[1],i=r[2],o=r[3],a=r[4],c=r[5],u=r[6],f=r[7],l=r[8],s=r[9],h=r[10],v=r[11],p=r[12],d=r[13],y=r[14],x=r[15],g=n*c-e*a,M=n*u-i*a,P=n*f-o*a,b=e*u-i*c,m=e*f-o*c,S=i*f-o*u,k=l*d-s*p,w=l*y-h*p,F=l*x-v*p,C=s*y-h*d,O=s*x-v*d,A=h*x-v*y,I=g*A-M*O+P*C+b*F-m*w+S*k;return I?(t[0]=(c*A-u*O+f*C)*(I=1/I),t[1]=(i*O-e*A-o*C)*I,t[2]=(d*S-y*m+x*b)*I,t[3]=(h*m-s*S-v*b)*I,t[4]=(u*F-a*A-f*w)*I,t[5]=(n*A-i*F+o*w)*I,t[6]=(y*P-p*S-x*M)*I,t[7]=(l*S-h*P+v*M)*I,t[8]=(a*O-c*F+f*k)*I,t[9]=(e*F-n*O-o*k)*I,t[10]=(p*m-d*P+x*g)*I,t[11]=(s*P-l*m-v*g)*I,t[12]=(c*w-a*C-u*k)*I,t[13]=(n*C-e*w+i*k)*I,t[14]=(d*M-p*b-y*g)*I,t[15]=(l*b-s*M+h*g)*I,t):null}(d,i),u=function(t,r,n){var e=r[0],i=r[1],o=r[2],a=n[3]*e+n[7]*i+n[11]*o+n[15];return t[0]=(n[0]*e+n[4]*i+n[8]*o+n[12])/(a=a||1),t[1]=(n[1]*e+n[5]*i+n[9]*o+n[13])/a,t[2]=(n[2]*e+n[6]*i+n[10]*o+n[14])/a,t}(v,l(p,e[0],e[1],0),c);if(a(n,new r.Point(u[0],u[1]),o,t.isPointInPath,t.context,t.runtime))return!0}return!1},this.isPointInPath=function(r,n){var e=t.runtime.offscreenCanvasCreator.getOrCreateContext(t.context.config.offscreenCanvas),i=t.context.pathGeneratorFactory[r.nodeName];return i&&(e.beginPath(),i(e,r.parsedStyle),e.closePath()),e.isPointInPath(n.x,n.y)}}return t.prototype.apply=function(r,n){var e,a=this,c=r.renderingService,u=r.renderingContext;this.context=r,this.runtime=n;var f=null===(e=u.root)||void 0===e?void 0:e.ownerDocument;c.hooks.pick.tapPromise(t.tag,(function(t){return i(a,void 0,void 0,(function(){return o(this,(function(r){return[2,this.pick(f,t)]}))}))})),c.hooks.pickSync.tap(t.tag,(function(t){return a.pick(f,t)}))},t.prototype.pick=function(t,n){var e,i,o=n.topmost,a=n.position,c=l(h,a.x,a.y,0),u=t.elementsFromBBox(c[0],c[1],c[0],c[1]),f=[];try{for(var s=function(t){var r="function"==typeof Symbol&&Symbol.iterator,n=r&&t[r],e=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&e>=t.length&&(t=void 0),{value:t&&t[e++],done:!t}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}(u),v=s.next();!v.done;v=s.next()){var p=v.value,d=p.getWorldTransform();if(this.isHit(p,c,d,!1)){var y=r.findClosestClipPathTarget(p);if(y){var x=y.parsedStyle.clipPath;if(this.isHit(x,c,x.getWorldTransform(),!0)){if(o)return n.picked=[p],n;f.push(p)}}else{if(o)return n.picked=[p],n;f.push(p)}}}}catch(t){e={error:t}}finally{try{v&&!v.done&&(i=s.return)&&i.call(s)}finally{if(e)throw e.error}}return n.picked=f,n},t.tag="CanvasPicker",t}();function x(t,r,n){return{x:t*Math.cos(n)-r*Math.sin(n),y:t*Math.sin(n)+r*Math.cos(n)}}function g(t,r,n,e,i,o,a,c,u,f){var l,s,h,v,p,d=t,y=r,M=n,P=e,b=c,m=u,S=120*Math.PI/180,k=Math.PI/180*(+i||0),w=[];if(f)s=f[0],h=f[1],v=f[2],p=f[3];else{y=(l=x(d,y,-k)).y;var F=((d=l.x)-(b=(l=x(b,m,-k)).x))/2,C=(y-(m=l.y))/2,O=F*F/(M*M)+C*C/(P*P);O>1&&(M*=O=Math.sqrt(O),P*=O);var A=M*M,I=P*P,E=(o===a?-1:1)*Math.sqrt(Math.abs((A*I-A*C*C-I*F*F)/(A*C*C+I*F*F)));v=E*M*C/P+(d+b)/2,s=Math.asin(((y-(p=E*-P*F/M+(y+m)/2))/P*1e9>>0)/1e9),h=Math.asin(((m-p)/P*1e9>>0)/1e9),0>(s=v>d?Math.PI-s:s)&&(s=2*Math.PI+s),0>(h=v>b?Math.PI-h:h)&&(h=2*Math.PI+h),a&&s>h&&(s-=2*Math.PI),!a&&h>s&&(h-=2*Math.PI)}var T=h-s;if(Math.abs(T)>S){var L=h,W=b,H=m;w=g(b=v+M*Math.cos(h=s+S*(a&&h>s?1:-1)),m=p+P*Math.sin(h),M,P,i,0,a,W,H,[h,L,v,p])}T=h-s;var G=Math.cos(s),q=Math.sin(s),R=Math.cos(h),_=Math.sin(h),j=Math.tan(T/4),N=4/3*M*j,B=4/3*P*j,D=[d,y],Y=[d+N*q,y-B*G],Q=[b+N*_,m-B*R],U=[b,m];if(Y[0]=2*D[0]-Y[0],Y[1]=2*D[1]-Y[1],f)return Y.concat(Q,U,w);for(var X=[],Z=0,z=(w=Y.concat(Q,U,w)).length;z>Z;Z+=1)X[Z]=Z%2?x(w[Z-1],w[Z],k).y:x(w[Z],w[Z+1],k).x;return X}var M=function(t,r,n){return r>t?r:t>n?n:t};function P(t,r,n,e){var i=t-n,o=r-e;return Math.sqrt(i*i+o*o)}var b=1e-4;function m(t,r,n,e,i,o){var u=-1,f=1/0,l=[n,e],s=20;o&&o>200&&(s=o/10);for(var h=1/s,v=h/10,p=0;s>=p;p++){var d=p*h,y=[i.apply(void 0,c([],a(t.concat([d])),!1)),i.apply(void 0,c([],a(r.concat([d])),!1))];f>(m=P(l[0],l[1],y[0],y[1]))&&(u=d,f=m)}if(0===u)return{x:t[0],y:r[0]};if(1===u){var x=t.length;return{x:t[x-1],y:r[x-1]}}f=1/0;for(p=0;32>p&&b<=v;p++){var g=u-v,M=u+v,m=(y=[i.apply(void 0,c([],a(t.concat([g])),!1)),i.apply(void 0,c([],a(r.concat([g])),!1))],P(l[0],l[1],y[0],y[1]));if(g>=0&&f>m)u=g,f=m;else{var S=[i.apply(void 0,c([],a(t.concat([M])),!1)),i.apply(void 0,c([],a(r.concat([M])),!1))],k=P(l[0],l[1],S[0],S[1]);1>=M&&f>k?(u=M,f=k):v*=.5}}return{x:i.apply(void 0,c([],a(t.concat([u])),!1)),y:i.apply(void 0,c([],a(r.concat([u])),!1))}}function S(t,r,n,e,i,o){var a=[n-t,e-r];if(function(t,r){return t[0]===r[0]&&t[1]===r[1]}(a,[0,0]))return Math.sqrt((i-t)*(i-t)+(o-r)*(o-r));var c=[-a[1],a[0]];return function(t,r){var n=r[0],e=r[1],i=n*n+e*e;i>0&&(i=1/Math.sqrt(i)),t[0]=r[0]*i,t[1]=r[1]*i}(c,c),Math.abs(function(t,r){return t[0]*r[0]+t[1]*r[1]}([i-t,o-r],c))}function k(t,r,n,e,i){var o=1-i;return o*o*o*t+3*r*i*o*o+3*n*i*i*o+e*i*i*i}function w(t,r,n,e,i,o,a,c,u,f,l){var s=function(t,r,n,e,i,o,a,c,u,f,l){return m([t,n,i,a],[r,e,o,c],u,f,k,l)}(t,r,n,e,i,o,a,c,u,f,l);return P(s.x,s.y,u,f)}function F(t,r,n,e){var i=1-e;return i*i*t+2*e*i*r+e*e*n}function C(t,r,n,e,i,o,a,c){var u=function(t,r,n,e,i,o,a,c){return m([t,n,i],[r,e,o],a,c,F)}(t,r,n,e,i,o,a,c);return P(u.x,u.y,a,c)}function O(t,n,e){var i=t.parsedStyle,o=i.cx,c=i.cy,u=i.r,f=i.fill,l=i.stroke,s=i.lineWidth,h=i.increasedLineWidthForHitTesting,v=i.pointerEvents,p=((void 0===s?0:s)+(void 0===h?0:h))/2,d=P(void 0===o?0:o,void 0===c?0:c,n.x,n.y),y=a(r.isFillOrStrokeAffected(v,f,l),2),x=y[0],g=y[1];return x&&g||e?u+p>=d:x?u>=d:!!g&&(d>=u-p&&u+p>=d)}function A(t,r,n,e){return t/(n*n)+r/(e*e)}function I(t,n,e){var i=t.parsedStyle,o=i.cx,c=void 0===o?0:o,u=i.cy,f=void 0===u?0:u,l=i.rx,s=i.ry,h=i.lineWidth,v=void 0===h?0:h,p=i.increasedLineWidthForHitTesting,d=void 0===p?0:p,y=n.x,x=n.y,g=a(r.isFillOrStrokeAffected(i.pointerEvents,i.fill,i.stroke),2),M=g[0],P=g[1],b=(v+d)/2,m=(y-c)*(y-c),S=(x-f)*(x-f);return M&&P||e?1>=A(m,S,l+b,s+b):M?1>=A(m,S,l,s):!!P&&(A(m,S,l-b,s-b)>=1&&1>=A(m,S,l+b,s+b))}function E(t,r,n,e,i,o){return!(t>i||i>t+n||r>o||o>r+e)}function T(t,r,n,e,i,o,a,c){var u=(Math.atan2(c-r,a-t)+2*Math.PI)%(2*Math.PI),f={x:t+n*Math.cos(u),y:r+n*Math.sin(u)};return P(f.x,f.y,a,c)<=o/2}function L(t,r,n,e,i,o,a){var c=i/2;return!(Math.min(t,n)-c>o||o>Math.max(t,n)+c||Math.min(r,e)-c>a||a>Math.max(r,e)+c)&&S(t,r,n,e,o,a)<=i/2}function W(t,r,n,e,i){var o=t.length;if(2>o)return!1;for(var a=0;o-1>a;a++){if(L(t[a][0],t[a][1],t[a+1][0],t[a+1][1],r,n,e))return!0}if(i){var c=t[0],u=t[o-1];if(L(c[0],c[1],u[0],u[1],r,n,e))return!0}return!1}var H=1e-6;function G(t){return H>Math.abs(t)?0:0>t?-1:1}function q(t,r,n){return!((n[0]-t[0])*(r[1]-t[1])!=(r[0]-t[0])*(n[1]-t[1])||Math.min(t[0],r[0])>n[0]||n[0]>Math.max(t[0],r[0])||Math.min(t[1],r[1])>n[1]||n[1]>Math.max(t[1],r[1]))}function R(t,r,n){var e=!1,i=t.length;if(2>=i)return!1;for(var o=0;i>o;o++){var a=t[o],c=t[(o+1)%i];if(q(a,c,[r,n]))return!0;G(a[1]-n)>0!=G(c[1]-n)>0&&0>G(r-(n-a[1])*(a[0]-c[0])/(a[1]-c[1])-a[0])&&(e=!e)}return e}function _(t,r,n){for(var e=!1,i=0;t.length>i;i++){if(e=R(t[i],r,n))break}return e}function j(t,n,e){var i=t.parsedStyle,o=i.x1,c=i.y1,u=i.x2,f=i.y2,l=i.lineWidth,s=void 0===l?0:l,h=i.increasedLineWidthForHitTesting,v=void 0===h?0:h;return!(!a(r.isFillOrStrokeAffected(i.pointerEvents,i.fill,i.stroke),2)[1]&&!e||!s)&&L(o,c,u,f,s+v,n.x,n.y)}function N(t,n,e,i,o,c){var u=t.parsedStyle,f=u.lineWidth,l=void 0===f?0:f,s=u.increasedLineWidthForHitTesting,h=void 0===s?0:s,v=u.d,p=v.segments,d=v.hasArc,y=v.polylines,x=v.polygons,M=a(r.isFillOrStrokeAffected(u.pointerEvents,(null==x?void 0:x.length)&&u.fill,u.stroke),2),P=M[0],b=M[1],m=r.getOrCalculatePathTotalLength(t),S=!1;return P||e?S=d?i(t,n):_(x,n.x,n.y)||_(y,n.x,n.y):((b||e)&&(S=function(t,r,n,e,i){for(var o=!1,a=r/2,c=0;t.length>c;c++){var u=t[c],f=u.currentPoint,l=u.params,s=u.prePoint,h=u.box;if(!h||E(h.x-a,h.y-a,h.width+r,h.height+r,n,e))switch(u.command){case"L":case"Z":if(o=L(s[0],s[1],f[0],f[1],r,n,e))return!0;break;case"Q":if(o=r/2>=C(s[0],s[1],l[1],l[2],l[3],l[4],n,e))return!0;break;case"C":if(o=r/2>=w(s[0],s[1],l[1],l[2],l[3],l[4],l[5],l[6],n,e,i))return!0;break;case"A":u.cubicParams||(u.cubicParams=g(s[0],s[1],l[1],l[2],l[3],l[4],l[5],l[6],l[7],void 0));for(var v=u.cubicParams,p=s,d=0;v.length>d;d+=6){var y=w(p[0],p[1],v[d],v[d+1],v[d+2],v[d+3],v[d+4],v[d+5],n,e,i);if(p=[v[d+4],v[d+5]],o=r/2>=y)return!0}}}return o}(p,l+h,n.x,n.y,m)),S)}function B(t,n,e){var i=t.parsedStyle,o=i.lineWidth,c=void 0===o?0:o,u=i.increasedLineWidthForHitTesting,f=void 0===u?0:u,l=i.points,s=a(r.isFillOrStrokeAffected(i.pointerEvents,i.fill,i.stroke),2),h=s[0],v=!1;return(s[1]||e)&&(v=W(l.points,c+f,n.x,n.y,!0)),v||!h&&!e||(v=R(l.points,n.x,n.y)),v}function D(t,n,e){var i=t.parsedStyle,o=i.lineWidth,c=void 0===o?0:o,u=i.increasedLineWidthForHitTesting,f=void 0===u?0:u,l=i.points;return!(!a(r.isFillOrStrokeAffected(i.pointerEvents,i.fill,i.stroke),2)[1]&&!e||!c)&&W(l.points,c+f,n.x,n.y,!1)}function Y(t,n,e,i,o){var c=t.parsedStyle,u=c.radius,f=c.lineWidth,l=void 0===f?0:f,s=c.increasedLineWidthForHitTesting,h=void 0===s?0:s,v=c.x,p=void 0===v?0:v,d=c.y,y=void 0===d?0:d,x=c.width,g=c.height,P=a(r.isFillOrStrokeAffected(c.pointerEvents,c.fill,c.stroke),2),b=P[0],m=P[1],S=l+h;if(u&&u.some((function(t){return 0!==t}))){var k=!1;return(m||e)&&(k=function(t,r,n,e,i,o,c,u){var f=a(i,4),l=f[0],s=f[1],h=f[2],v=f[3];return L(t+l,r,t+n-s,r,o,c,u)||L(t+n,r+s,t+n,r+e-h,o,c,u)||L(t+n-h,r+e,t+v,r+e,o,c,u)||L(t,r+e-v,t,r+l,o,c,u)||T(t+n-s,r+s,s,0,0,o,c,u)||T(t+n-h,r+e-h,h,0,0,o,c,u)||T(t+v,r+e-v,v,0,0,o,c,u)||T(t+l,r+l,l,0,0,o,c,u)}(p,y,x,g,u.map((function(t){return M(t,0,Math.min(Math.abs(x)/2,Math.abs(g)/2))})),S,n.x,n.y)),k||!b&&!e||(k=i(t,n)),k}var w=S/2;return b&&m||e?E(p-w,y-w,x+w,g+w,n.x,n.y):b?E(p,y,x,g,n.x,n.y):!!m&&function(t,r,n,e,i,o,a){var c=i/2;return E(t-c,r-c,n,i,o,a)||E(t+n-c,r-c,i,e,o,a)||E(t+c,r+e-c,n,i,o,a)||E(t-c,r+c,i,e,o,a)}(p,y,x,g,S,n.x,n.y)}function Q(t,n,i,o,a,c){var u=t.parsedStyle,f=u.x,l=void 0===f?0:f,s=u.y,h=void 0===s?0:s,v=u.width,p=u.height;if("non-transparent-pixel"===u.pointerEvents){var d=a.config.offscreenCanvas,y=c.offscreenCanvasCreator.getOrCreateCanvas(d),x=c.offscreenCanvasCreator.getOrCreateContext(d,{willReadFrequently:!0});return y.width=v,y.height=p,a.defaultStyleRendererFactory[r.Shape.IMAGE].render(x,e(e({},t.parsedStyle),{x:0,y:0}),t,void 0,void 0,void 0),x.getImageData(n.x-l,n.y-h,1,1).data.every((function(t){return 0!==t}))}return!0}var U=function(t){function e(){var r=t.apply(this,c([],a(arguments),!1))||this;return r.name="canvas-picker",r}return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+r+" is not a constructor or null");function e(){this.constructor=t}n(t,r),t.prototype=null===r?Object.create(r):(e.prototype=r.prototype,new e)}(e,t),e.prototype.init=function(){var t,n=((t={})[r.Shape.CIRCLE]=O,t[r.Shape.ELLIPSE]=I,t[r.Shape.RECT]=Y,t[r.Shape.LINE]=j,t[r.Shape.POLYLINE]=D,t[r.Shape.POLYGON]=B,t[r.Shape.PATH]=N,t[r.Shape.TEXT]=function(){return!0},t[r.Shape.GROUP]=null,t[r.Shape.IMAGE]=Q,t[r.Shape.HTML]=null,t[r.Shape.MESH]=null,t);this.context.pointInPathPickerFactory=n,this.addRenderingPlugin(new y)},e.prototype.destroy=function(){delete this.context.pointInPathPickerFactory,this.removeAllRenderingPlugins()},e}(r.AbstractRendererPlugin);t.Plugin=U}));
//# sourceMappingURL=index.umd.min.js.map
{
"name": "@antv/g-plugin-canvas-picker",
"version": "1.10.24-next.12",
"version": "1.10.24-next.13",
"description": "A G plugin for picking in canvas",

@@ -38,6 +38,6 @@ "keywords": [

"tslib": "^2.5.3",
"@antv/g-lite": "1.3.0-next.13",
"@antv/g-math": "2.0.2",
"@antv/g-plugin-canvas-renderer": "1.10.0-next.12",
"@antv/g-lite": "1.3.0-next.12",
"@antv/g-plugin-canvas-path-generator": "1.3.22-next.12"
"@antv/g-plugin-canvas-path-generator": "1.3.22-next.13",
"@antv/g-plugin-canvas-renderer": "1.10.0-next.13"
},

@@ -44,0 +44,0 @@ "publishConfig": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc