victory-shared-events 36.8.2 → 36.8.3
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.
- package/CHANGELOG.md +8 -0
- package/dist/victory-shared-events.js +1008 -8795
- package/dist/victory-shared-events.min.js +1 -1
- package/es/index.d.ts +2 -23
- package/es/index.js +1 -1
- package/es/victory-shared-events.d.ts +48 -0
- package/es/victory-shared-events.js +16 -39
- package/lib/index.d.ts +2 -23
- package/lib/index.js +11 -8
- package/lib/victory-shared-events.d.ts +48 -0
- package/lib/victory-shared-events.js +14 -36
- package/package.json +2 -2
- package/src/index.ts +1 -0
- package/src/{victory-shared-events.js → victory-shared-events.tsx} +39 -73
- package/src/index.d.ts +0 -23
- package/src/index.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("react")):"function"==typeof define&&define.amd?define(["react"],r):"object"==typeof exports?exports.VictorySharedEvents=r(require("react")):t.VictorySharedEvents=r(t.React)}(self,(t=>(()=>{var r={2516:(t,r)=>{function e(t,r){var e=[],n=[];return null==r&&(r=function(t,r){return e[0]===r?"[Circular ~]":"[Circular ~."+n.slice(0,e.indexOf(r)).join(".")+"]"}),function(o,i){if(e.length>0){var a=e.indexOf(this);~a?e.splice(a+1):e.push(this),~a?n.splice(a,1/0,o):n.push(o),~e.indexOf(i)&&(i=r.call(this,o,i))}else e.push(i);return null==t?i:t.call(this,o,i)}}(t.exports=function(t,r,n,o){return JSON.stringify(t,e(r,o),n)}).getSerialize=e},3273:(t,r,e)=>{var n=e(163);t.exports=function(){if(!arguments.length)return[];var t=arguments[0];return n(t)?t:[t]}},8708:(t,r,e)=>{var n=e(1171),o=e(7838),i=e(4859),a=e(4073),u=e(8541);function c(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}c.prototype.clear=n,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=u,t.exports=c},2596:(t,r,e)=>{var n=e(2373).Symbol;t.exports=n},6082:t=>{t.exports=function(t,r,e){switch(e.length){case 0:return t.call(r);case 1:return t.call(r,e[0]);case 2:return t.call(r,e[0],e[1]);case 3:return t.call(r,e[0],e[1],e[2])}return t.apply(r,e)}},5510:(t,r,e)=>{var n=e(6123);t.exports=function(t,r){return!(null==t||!t.length)&&n(t,r,0)>-1}},9955:t=>{t.exports=function(t,r,e){for(var n=-1,o=null==t?0:t.length;++n<o;)if(e(r,t[n]))return!0;return!1}},8644:t=>{t.exports=function(t,r){for(var e=-1,n=null==t?0:t.length,o=Array(n);++e<n;)o[e]=r(t[e],e,t);return o}},9559:t=>{t.exports=function(t,r){for(var e=-1,n=r.length,o=t.length;++e<n;)t[o+e]=r[e];return t}},1634:t=>{t.exports=function(t,r){for(var e=-1,n=null==t?0:t.length;++e<n;)if(r(t[e],e,t))return!0;return!1}},4132:(t,r,e)=>{var n=e(8347),o=e(788),i=Object.prototype.hasOwnProperty;t.exports=function(t,r,e){var a=t[r];i.call(t,r)&&o(a,e)&&(void 0!==e||r in t)||n(t,r,e)}},3162:(t,r,e)=>{var n=e(788);t.exports=function(t,r){for(var e=t.length;e--;)if(n(t[e][0],r))return e;return-1}},8347:(t,r,e)=>{var n=e(5525);t.exports=function(t,r,e){"__proto__"==r&&n?n(t,r,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[r]=e}},1377:(t,r,e)=>{var n=e(3273),o=e(5510),i=e(9955),a=e(8644),u=e(9110),c=e(9914);t.exports=function(t,r,e,s){var f=-1,l=o,p=!0,v=t.length,y=[],h=r.length;if(!v)return y;e&&(r=a(r,u(e))),s?(l=i,p=!1):r.length>=200&&(l=c,p=!1,r=new n(r));t:for(;++f<v;){var d=t[f],b=null==e?d:e(d);if(d=s||0!==d?d:0,p&&b==b){for(var g=h;g--;)if(r[g]===b)continue t;y.push(d)}else l(r,b,s)||y.push(d)}return y}},3705:t=>{t.exports=function(t,r,e,n){for(var o=t.length,i=e+(n?1:-1);n?i--:++i<o;)if(r(t[i],i,t))return i;return-1}},6457:(t,r,e)=>{var n=e(9559),o=e(3608);t.exports=function t(r,e,i,a,u){var c=-1,s=r.length;for(i||(i=o),u||(u=[]);++c<s;){var f=r[c];e>0&&i(f)?e>1?t(f,e-1,i,a,u):n(u,f):a||(u[u.length]=f)}return u}},4432:(t,r,e)=>{var n=e(9026),o=e(3110);t.exports=function(t,r){for(var e=0,i=(r=n(r,t)).length;null!=t&&e<i;)t=t[o(r[e++])];return e&&e==i?t:void 0}},563:t=>{var r=Object.prototype.toString;t.exports=function(t){return r.call(t)}},6776:t=>{t.exports=function(t,r){return null!=t&&r in Object(t)}},6123:t=>{t.exports=function(t,r,e){for(var n=e-1,o=t.length;++n<o;)if(t[n]===r)return n;return-1}},9070:(t,r,e)=>{var n=e(7028),o=e(3474);t.exports=function t(r,e,i,a,u){return r===e||(null==r||null==e||!o(r)&&!o(e)?r!=r&&e!=e:n(r,e,i,a,t,u))}},7028:(t,r,e)=>{var n=e(8708),o=e(8705),i=e(2813),a=e(6682),u=e(9667),c=e(163),s=e(4801),f=e(4289),l="[object Arguments]",p="[object Array]",v="[object Object]",y=Object.prototype.hasOwnProperty;t.exports=function(t,r,e,h,d,b){var g=c(t),m=c(r),x=g?p:u(t),E=m?p:u(r),O=(x=x==l?v:x)==v,w=(E=E==l?v:E)==v,j=x==E;if(j&&s(t)){if(!s(r))return!1;g=!0,O=!1}if(j&&!O)return b||(b=new n),g||f(t)?o(t,r,e,h,d,b):i(t,r,x,e,h,d,b);if(!(1&e)){var A=O&&y.call(t,"__wrapped__"),_=w&&y.call(r,"__wrapped__");if(A||_){var S=A?t.value():t,k=_?r.value():r;return b||(b=new n),d(S,k,e,h,b)}}return!!j&&(b||(b=new n),a(t,r,e,h,d,b))}},9548:(t,r,e)=>{var n=e(8708),o=e(9070);t.exports=function(t,r,e,i){var a=e.length,u=a,c=!i;if(null==t)return!u;for(t=Object(t);a--;){var s=e[a];if(c&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++a<u;){var f=(s=e[a])[0],l=t[f],p=s[1];if(c&&s[2]){if(void 0===l&&!(f in t))return!1}else{var v=new n;if(i)var y=i(l,p,f,t,r,v);if(!(void 0===y?o(p,l,3,i,v):y))return!1}}return!0}},2229:(t,r,e)=>{var n=e(563),o=e(3474);t.exports=function(t){return o(t)&&"[object RegExp]"==n(t)}},3472:(t,r,e)=>{var n=e(758),o=e(5223),i=e(5346),a=e(163),u=e(8532);t.exports=function(t){return"function"==typeof t?t:null==t?i:"object"==typeof t?a(t)?o(t[0],t[1]):n(t):u(t)}},7190:(t,r,e)=>{var n=e(5125)(Object.keys,Object);t.exports=n},758:(t,r,e)=>{var n=e(9548),o=e(597),i=e(6878);t.exports=function(t){var r=o(t);return 1==r.length&&r[0][2]?i(r[0][0],r[0][1]):function(e){return e===t||n(e,t,r)}}},5223:(t,r,e)=>{var n=e(9070),o=e(9201),i=e(5066),a=e(726),u=e(5385),c=e(6878),s=e(3110);t.exports=function(t,r){return a(t)&&u(r)?c(s(t),r):function(e){var a=o(e,t);return void 0===a&&a===r?i(e,t):n(r,a,3)}}},5436:(t,r,e)=>{var n=e(6371),o=e(5066);t.exports=function(t,r){return n(t,r,(function(r,e){return o(t,e)}))}},6371:(t,r,e)=>{var n=e(4432),o=e(6539),i=e(9026);t.exports=function(t,r,e){for(var a=-1,u=r.length,c={};++a<u;){var s=r[a],f=n(t,s);e(f,s)&&o(c,i(s,t),f)}return c}},1600:t=>{t.exports=function(t){return function(r){return null==r?void 0:r[t]}}},3301:(t,r,e)=>{var n=e(4432);t.exports=function(t){return function(r){return n(r,t)}}},6317:(t,r,e)=>{var n=e(5346),o=e(4280),i=e(201);t.exports=function(t,r){return i(o(t,r,n),t+"")}},6539:(t,r,e)=>{var n=e(4132),o=e(9026),i=e(9099),a=e(7709),u=e(3110);t.exports=function(t,r,e,c){if(!a(t))return t;for(var s=-1,f=(r=o(r,t)).length,l=f-1,p=t;null!=p&&++s<f;){var v=u(r[s]),y=e;if("__proto__"===v||"constructor"===v||"prototype"===v)return t;if(s!=l){var h=p[v];void 0===(y=c?c(h,v,p):void 0)&&(y=a(h)?h:i(r[s+1])?[]:{})}n(p,v,y),p=p[v]}return t}},6316:(t,r,e)=>{var n=e(2596),o=e(8644),i=e(163),a=e(1995),u=n?n.prototype:void 0,c=u?u.toString:void 0;t.exports=function t(r){if("string"==typeof r)return r;if(i(r))return o(r,t)+"";if(a(r))return c?c.call(r):"";var e=r+"";return"0"==e&&1/r==-1/0?"-0":e}},1367:(t,r,e)=>{var n=e(4120),o=/^\s+/;t.exports=function(t){return t?t.slice(0,n(t)+1).replace(o,""):t}},9110:t=>{t.exports=function(t){return function(r){return t(r)}}},946:(t,r,e)=>{var n=e(3273),o=e(5510),i=e(9955),a=e(9914),u=e(6602),c=e(6226);t.exports=function(t,r,e){var s=-1,f=o,l=t.length,p=!0,v=[],y=v;if(e)p=!1,f=i;else if(l>=200){var h=r?null:u(t);if(h)return c(h);p=!1,f=a,y=new n}else y=r?[]:v;t:for(;++s<l;){var d=t[s],b=r?r(d):d;if(d=e||0!==d?d:0,p&&b==b){for(var g=y.length;g--;)if(y[g]===b)continue t;r&&y.push(b),v.push(d)}else f(y,b,e)||(y!==v&&y.push(b),v.push(d))}return v}},9914:(t,r,e)=>{var n=e(6123);t.exports=function(t,r){return!(null==t||!t.length)&&n(t,r,0)>-1}},9026:(t,r,e)=>{var n=e(163),o=e(726),i=e(7801),a=e(7010);t.exports=function(t,r){return n(t)?t:o(t,r)?[t]:i(a(t))}},9021:(t,r,e)=>{var n=e(4132),o=e(8347);t.exports=function(t,r,e,i){var a=!e;e||(e={});for(var u=-1,c=r.length;++u<c;){var s=r[u],f=i?i(e[s],t[s],s,e,t):void 0;void 0===f&&(f=t[s]),a?o(e,s,f):n(e,s,f)}return e}},6092:(t,r,e)=>{var n=e(6317),o=e(8286);t.exports=function(t){return n((function(r,e){var n=-1,i=e.length,a=i>1?e[i-1]:void 0,u=i>2?e[2]:void 0;for(a=t.length>3&&"function"==typeof a?(i--,a):void 0,u&&o(e[0],e[1],u)&&(a=i<3?void 0:a,i=1),r=Object(r);++n<i;){var c=e[n];c&&t(r,c,n,a)}return r}))}},4499:(t,r,e)=>{var n=e(3472),o=e(981),i=e(7747);t.exports=function(t){return function(r,e,a){var u=Object(r);if(!o(r)){var c=n(e,3);r=i(r),e=function(t){return c(u[t],t,u)}}var s=t(r,e,a);return s>-1?u[c?r[s]:s]:void 0}}},6602:t=>{t.exports=function(){}},5525:(t,r,e)=>{var n=e(3743),o=function(){try{var t=n(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},8705:(t,r,e)=>{var n=e(3273),o=e(1634),i=e(9914);t.exports=function(t,r,e,a,u,c){var s=1&e,f=t.length,l=r.length;if(f!=l&&!(s&&l>f))return!1;var p=c.get(t),v=c.get(r);if(p&&v)return p==r&&v==t;var y=-1,h=!0,d=2&e?new n:void 0;for(c.set(t,r),c.set(r,t);++y<f;){var b=t[y],g=r[y];if(a)var m=s?a(g,b,y,r,t,c):a(b,g,y,t,r,c);if(void 0!==m){if(m)continue;h=!1;break}if(d){if(!o(r,(function(t,r){if(!i(d,r)&&(b===t||u(b,t,e,a,c)))return d.push(r)}))){h=!1;break}}else if(b!==g&&!u(b,g,e,a,c)){h=!1;break}}return c.delete(t),c.delete(r),h}},2813:t=>{t.exports=function(t,r){return t===r||t!=t&&r!=r}},6682:(t,r,e)=>{var n=e(8143),o=Object.prototype.hasOwnProperty;t.exports=function(t,r,e,i,a,u){var c=1&e,s=n(t),f=s.length;if(f!=n(r).length&&!c)return!1;for(var l=f;l--;){var p=s[l];if(!(c?p in r:o.call(r,p)))return!1}var v=u.get(t),y=u.get(r);if(v&&y)return v==r&&y==t;var h=!0;u.set(t,r),u.set(r,t);for(var d=c;++l<f;){var b=t[p=s[l]],g=r[p];if(i)var m=c?i(g,b,p,r,t,u):i(b,g,p,t,r,u);if(!(void 0===m?b===g||a(b,g,e,i,u):m)){h=!1;break}d||(d="constructor"==p)}if(h&&!d){var x=t.constructor,E=r.constructor;x==E||!("constructor"in t)||!("constructor"in r)||"function"==typeof x&&x instanceof x&&"function"==typeof E&&E instanceof E||(h=!1)}return u.delete(t),u.delete(r),h}},5557:(t,r,e)=>{var n=e(2645),o=e(4280),i=e(201);t.exports=function(t){return i(o(t,void 0,n),t+"")}},2117:(t,r,e)=>{var n="object"==typeof e.g&&e.g&&e.g.Object===Object&&e.g;t.exports=n},8143:(t,r,e)=>{var n=e(5125)(Object.keys,Object);t.exports=n},7271:t=>{t.exports=function(t){var r=[];if(null!=t)for(var e in Object(t))r.push(e);return r}},597:(t,r,e)=>{var n=e(5385),o=e(7747);t.exports=function(t){for(var r=o(t),e=r.length;e--;){var i=r[e],a=t[i];r[e]=[i,a,n(a)]}return r}},3743:t=>{t.exports=function(t,r){return null==t?void 0:t[r]}},9817:(t,r,e)=>{var n=e(5125)(Object.getPrototypeOf,Object);t.exports=n},9667:t=>{var r=Object.prototype.toString;t.exports=function(t){return r.call(t)}},3096:(t,r,e)=>{var n=e(9026),o=e(5075),i=e(163),a=e(9099),u=e(8454),c=e(3110);t.exports=function(t,r,e){for(var s=-1,f=(r=n(r,t)).length,l=!1;++s<f;){var p=c(r[s]);if(!(l=null!=t&&e(t,p)))break;t=t[p]}return l||++s!=f?l:!!(f=null==t?0:t.length)&&u(f)&&a(p,f)&&(i(t)||o(t))}},3608:(t,r,e)=>{var n=e(2596),o=e(5075),i=e(163),a=n?n.isConcatSpreadable:void 0;t.exports=function(t){return i(t)||o(t)||!!(a&&t&&t[a])}},9099:t=>{var r=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&r.test(t))&&t>-1&&t%1==0&&t<e}},8286:t=>{t.exports=function(){return!1}},726:(t,r,e)=>{var n=e(163),o=e(1995),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;t.exports=function(t,r){if(n(t))return!1;var e=typeof t;return!("number"!=e&&"symbol"!=e&&"boolean"!=e&&null!=t&&!o(t))||a.test(t)||!i.test(t)||null!=r&&t in Object(r)}},5782:t=>{t.exports=function(){return!1}},5385:(t,r,e)=>{var n=e(7709);t.exports=function(t){return t==t&&!n(t)}},1171:t=>{t.exports=function(){this.__data__=[],this.size=0}},7838:(t,r,e)=>{var n=e(3162),o=Array.prototype.splice;t.exports=function(t){var r=this.__data__,e=n(r,t);return!(e<0||(e==r.length-1?r.pop():o.call(r,e,1),--this.size,0))}},4859:(t,r,e)=>{var n=e(3162);t.exports=function(t){var r=this.__data__,e=n(r,t);return e<0?void 0:r[e][1]}},4073:(t,r,e)=>{var n=e(3162);t.exports=function(t){return n(this.__data__,t)>-1}},8541:(t,r,e)=>{var n=e(3162);t.exports=function(t,r){var e=this.__data__,o=n(e,t);return o<0?(++this.size,e.push([t,r])):e[o][1]=r,this}},6878:t=>{t.exports=function(t,r){return function(e){return null!=e&&e[t]===r&&(void 0!==r||t in Object(e))}}},2453:t=>{t.exports=function(t){return t}},2348:(t,r,e)=>{t=e.nmd(t);var n=e(2117),o=r&&!r.nodeType&&r,i=o&&t&&!t.nodeType&&t,a=i&&i.exports===o&&n.process,u=function(){try{return i&&i.require&&i.require("util").types||a&&a.binding&&a.binding("util")}catch(t){}}();t.exports=u},5125:t=>{t.exports=function(t,r){return function(e){return t(r(e))}}},4280:(t,r,e)=>{var n=e(6082),o=Math.max;t.exports=function(t,r,e){return r=o(void 0===r?t.length-1:r,0),function(){for(var i=arguments,a=-1,u=o(i.length-r,0),c=Array(u);++a<u;)c[a]=i[r+a];a=-1;for(var s=Array(r+1);++a<r;)s[a]=i[a];return s[r]=e(c),n(t,this,s)}}},2373:(t,r,e)=>{var n=e(2117),o="object"==typeof self&&self&&self.Object===Object&&self,i=n||o||Function("return this")();t.exports=i},6226:t=>{t.exports=function(){return[]}},201:t=>{t.exports=function(t){return t}},7801:(t,r,e)=>{var n=e(2453),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,a=n((function(t){var r=[];return 46===t.charCodeAt(0)&&r.push(""),t.replace(o,(function(t,e,n,o){r.push(n?o.replace(i,"$1"):e||t)})),r}));t.exports=a},3110:(t,r,e)=>{var n=e(1995);t.exports=function(t){if("string"==typeof t||n(t))return t;var r=t+"";return"0"==r&&1/t==-1/0?"-0":r}},4120:t=>{var r=/\s/;t.exports=function(t){for(var e=t.length;e--&&r.test(t.charAt(e)););return e}},156:(t,r,e)=>{var n=e(4132),o=e(9021),i=e(6092),a=e(981),u=e(5782),c=e(7747),s=Object.prototype.hasOwnProperty,f=i((function(t,r){if(u(r)||a(r))o(r,c(r),t);else for(var e in r)s.call(r,e)&&n(t,e,r[e])}));t.exports=f},1893:(t,r,e)=>{var n=e(6317),o=e(788),i=e(8286),a=e(8855),u=Object.prototype,c=u.hasOwnProperty,s=n((function(t,r){t=Object(t);var e=-1,n=r.length,s=n>2?r[2]:void 0;for(s&&i(r[0],r[1],s)&&(n=1);++e<n;)for(var f=r[e],l=a(f),p=-1,v=l.length;++p<v;){var y=l[p],h=t[y];(void 0===h||o(h,u[y])&&!c.call(t,y))&&(t[y]=f[y])}return t}));t.exports=s},6354:(t,r,e)=>{var n=e(1377),o=e(6457),i=e(6317),a=e(7605),u=i((function(t,r){return a(t)?n(t,o(r,1,a,!0)):[]}));t.exports=u},788:t=>{t.exports=function(t,r){return t===r||t!=t&&r!=r}},9992:(t,r,e)=>{var n=e(4499)(e(5541));t.exports=n},5541:(t,r,e)=>{var n=e(3705),o=e(3472),i=e(982),a=Math.max;t.exports=function(t,r,e){var u=null==t?0:t.length;if(!u)return-1;var c=null==e?0:i(e);return c<0&&(c=a(u+c,0)),n(t,o(r,3),c)}},2645:(t,r,e)=>{var n=e(6457);t.exports=function(t){return null!=t&&t.length?n(t,1):[]}},7314:t=>{t.exports=function(t){for(var r=-1,e=null==t?0:t.length,n={};++r<e;){var o=t[r];n[o[0]]=o[1]}return n}},9201:(t,r,e)=>{var n=e(4432);t.exports=function(t,r,e){var o=null==t?void 0:n(t,r);return void 0===o?e:o}},5066:(t,r,e)=>{var n=e(6776),o=e(3096);t.exports=function(t,r){return null!=t&&o(t,r,n)}},5346:t=>{t.exports=function(t){return t}},6149:(t,r,e)=>{var n=e(6123);t.exports=function(t,r){return!(null==t||!t.length)&&n(t,r,0)>-1}},5075:t=>{t.exports=function(){return!1}},163:t=>{var r=Array.isArray;t.exports=r},981:(t,r,e)=>{var n=e(9642),o=e(8454);t.exports=function(t){return null!=t&&o(t.length)&&!n(t)}},7605:(t,r,e)=>{var n=e(981),o=e(3474);t.exports=function(t){return o(t)&&n(t)}},4801:t=>{t.exports=function(){return!1}},4155:(t,r,e)=>{var n=e(7190),o=e(9667),i=e(5075),a=e(163),u=e(981),c=e(4801),s=e(5782),f=e(4289),l=Object.prototype.hasOwnProperty;t.exports=function(t){if(null==t)return!0;if(u(t)&&(a(t)||"string"==typeof t||"function"==typeof t.splice||c(t)||f(t)||i(t)))return!t.length;var r=o(t);if("[object Map]"==r||"[object Set]"==r)return!t.size;if(s(t))return!n(t).length;for(var e in t)if(l.call(t,e))return!1;return!0}},9642:(t,r,e)=>{var n=e(563),o=e(7709);t.exports=function(t){if(!o(t))return!1;var r=n(t);return"[object Function]"==r||"[object GeneratorFunction]"==r||"[object AsyncFunction]"==r||"[object Proxy]"==r}},8454:t=>{t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},7709:t=>{t.exports=function(t){var r=typeof t;return null!=t&&("object"==r||"function"==r)}},3474:t=>{t.exports=function(t){return null!=t&&"object"==typeof t}},3849:(t,r,e)=>{var n=e(563),o=e(9817),i=e(3474),a=Function.prototype,u=Object.prototype,c=a.toString,s=u.hasOwnProperty,f=c.call(Object);t.exports=function(t){if(!i(t)||"[object Object]"!=n(t))return!1;var r=o(t);if(null===r)return!0;var e=s.call(r,"constructor")&&r.constructor;return"function"==typeof e&&e instanceof e&&c.call(e)==f}},5395:(t,r,e)=>{var n=e(2229),o=e(9110),i=e(2348),a=i&&i.isRegExp,u=a?o(a):n;t.exports=u},1995:t=>{t.exports=function(){return!1}},4289:t=>{t.exports=function(){return!1}},7747:(t,r,e)=>{var n=e(5125)(Object.keys,Object);t.exports=n},8855:t=>{t.exports=function(t){var r=[];if(null!=t)for(var e in Object(t))r.push(e);return r}},6051:t=>{t.exports=function(t){if("function"!=typeof t)throw new TypeError("Expected a function");return function(){var r=arguments;switch(r.length){case 0:return!t.call(this);case 1:return!t.call(this,r[0]);case 2:return!t.call(this,r[0],r[1]);case 3:return!t.call(this,r[0],r[1],r[2])}return!t.apply(this,r)}}},1616:(t,r,e)=>{var n=e(3472),o=e(6051),i=e(4912);t.exports=function(t,r){return i(t,o(n(r)))}},9082:(t,r,e)=>{var n=e(5436),o=e(5557)((function(t,r){return null==t?{}:n(t,r)}));t.exports=o},4912:(t,r,e)=>{var n=e(8644),o=e(3472),i=e(6371),a=e(7271);t.exports=function(t,r){if(null==t)return{};var e=n(a(t),(function(t){return[t]}));return r=o(r),i(t,e,(function(t,e){return r(t,e[0])}))}},8532:(t,r,e)=>{var n=e(1600),o=e(3301),i=e(726),a=e(3110);t.exports=function(t){return i(t)?n(a(t)):o(t)}},9139:(t,r,e)=>{var n=e(5812);t.exports=function(t){return t?Infinity===(t=n(t))||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}},982:(t,r,e)=>{var n=e(9139);t.exports=function(t){var r=n(t),e=r%1;return r==r?e?r-e:r:0}},5812:(t,r,e)=>{var n=e(1367),o=e(7709),i=e(1995),a=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,c=/^0o[0-7]+$/i,s=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(i(t))return NaN;if(o(t)){var r="function"==typeof t.valueOf?t.valueOf():t;t=o(r)?r+"":r}if("string"!=typeof t)return 0===t?t:+t;t=n(t);var e=u.test(t);return e||c.test(t)?s(t.slice(2),e?2:8):a.test(t)?NaN:+t}},7010:(t,r,e)=>{var n=e(6316);t.exports=function(t){return null==t?"":n(t)}},9602:(t,r,e)=>{var n=e(946);t.exports=function(t){return t&&t.length?n(t):[]}},4882:(t,r,e)=>{var n=e(1377),o=e(6317),i=e(7605),a=o((function(t,r){return i(t)?n(t,r):[]}));t.exports=a},2504:(t,r,e)=>{"use strict";var n=e(2265);function o(){}function i(){}i.resetWarningCache=o,t.exports=function(){function t(t,r,e,o,i,a){if(a!==n){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function r(){return t}t.isRequired=t;var e={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:r,element:t,elementType:t,instanceOf:r,node:t,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:i,resetWarningCache:o};return e.PropTypes=e,e}},3698:(t,r,e)=>{t.exports=e(2504)()},2265:t=>{"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},7491:t=>{var r="undefined"!=typeof Element,e="function"==typeof Map,n="function"==typeof Set,o="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function i(t,a){if(t===a)return!0;if(t&&a&&"object"==typeof t&&"object"==typeof a){if(t.constructor!==a.constructor)return!1;var u,c,s,f;if(Array.isArray(t)){if((u=t.length)!=a.length)return!1;for(c=u;0!=c--;)if(!i(t[c],a[c]))return!1;return!0}if(e&&t instanceof Map&&a instanceof Map){if(t.size!==a.size)return!1;for(f=t.entries();!(c=f.next()).done;)if(!a.has(c.value[0]))return!1;for(f=t.entries();!(c=f.next()).done;)if(!i(c.value[1],a.get(c.value[0])))return!1;return!0}if(n&&t instanceof Set&&a instanceof Set){if(t.size!==a.size)return!1;for(f=t.entries();!(c=f.next()).done;)if(!a.has(c.value[0]))return!1;return!0}if(o&&ArrayBuffer.isView(t)&&ArrayBuffer.isView(a)){if((u=t.length)!=a.length)return!1;for(c=u;0!=c--;)if(t[c]!==a[c])return!1;return!0}if(t.constructor===RegExp)return t.source===a.source&&t.flags===a.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===a.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===a.toString();if((u=(s=Object.keys(t)).length)!==Object.keys(a).length)return!1;for(c=u;0!=c--;)if(!Object.prototype.hasOwnProperty.call(a,s[c]))return!1;if(r&&t instanceof Element)return!1;for(c=u;0!=c--;)if(("_owner"!==s[c]&&"__v"!==s[c]&&"__o"!==s[c]||!t.$$typeof)&&!i(t[s[c]],a[s[c]]))return!1;return!0}return t!=t&&a!=a}t.exports=function(t,r){try{return i(t,r)}catch(t){if((t.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw t}}},9787:r=>{"use strict";r.exports=t}},e={};function n(t){var o=e[t];if(void 0!==o)return o.exports;var i=e[t]={id:t,loaded:!1,exports:{}};return r[t](i,i.exports,n),i.loaded=!0,i.exports}n.n=t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return n.d(r,{a:r}),r},n.d=(t,r)=>{for(var e in r)n.o(r,e)&&!n.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:r[e]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var o={};return(()=>{"use strict";n.r(o),n.d(o,{VictorySharedEvents:()=>Nt});var t=n(6354),r=n.n(t),e=n(7747),i=n.n(e),a=n(7314),u=n.n(a),c=n(4155),s=n.n(c),f=n(1893),l=n.n(f),p=n(9642),v=n.n(p),y=n(156),h=n.n(y),d=n(9787),b=n.n(d),g=n(3698),m=n.n(g),x=n(6149),E=n.n(x),O=n(9602),w=n.n(O),j=n(1616),A=n.n(j),_=n(4912),S=n.n(_),k=n(4882),P=n.n(k);function T(t,r,e){return r in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}function C(t){return function(t){if(Array.isArray(t))return N(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,r){if(t){if("string"==typeof t)return N(t,r);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?N(t,r):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function N(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e<r;e++)n[e]=t[e];return n}var M=/^onGlobal(.*)$/;function K(t,r,e,n){var o,i=this,a=function(t){var n,o=(n=t.reduce((function(t,e){return void 0!==e.target?(Array.isArray(e.target)?E()(e.target,r):"".concat(e.target)==="".concat(r))?t.concat(e):t:t.concat(e)}),[]),void 0!==e&&"parent"!==r?n.filter((function(t){var r=t.eventKey,n=function(t){return!t||"".concat(t)==="".concat(e)};return Array.isArray(r)?r.some((function(t){return n(t)})):n(r)})):n);return Array.isArray(o)&&o.reduce((function(t,r){return r?h()(t,r.eventHandlers):t}),{})},u=Array.isArray(i.componentEvents)?Array.isArray(t.events)?(o=i.componentEvents).concat.apply(o,C(t.events)):i.componentEvents:t.events,c=u&&v()(n)?n(a(u),r):void 0;if(!t.sharedEvents)return c;var s=t.sharedEvents.getEvents,f=t.sharedEvents.events&&s(a(t.sharedEvents.events),r);return h()({},f,c)}function G(t,r,e,n){var o=this;if(s()(t))return{};n=n||this.baseProps;var a=function(t,r){var e=t.childName,i=t.target,a=t.key,u="props"===r?n:o.state||{},c=null!=e&&u[e]?u[e]:u;return"parent"===a?c.parent:c[a]&&c[a][i]},u=function(t,u){var c="parent"===r?t.childName:t.childName||e,s=t.target||r,f=function(r,e){var u=o.state||{};if(!v()(t.mutation))return u;var c=a({childName:e,key:r,target:s},"props"),f=a({childName:e,key:r,target:s},"state"),l=t.mutation(h()({},c,f),n),p=u[e]||{},y=function(t){return l?function(t){return"parent"===s?h()(t,T({},r,h()(t[r],l))):h()(t,T({},r,h()(t[r],T({},s,l))))}(t):function(t){return t[r]&&t[r][s]&&delete t[r][s],t[r]&&!i()(t[r]).length&&delete t[r],t}(t)};return null!=e?h()(u,T({},e,y(p))):y(u)},l=function(r){var e=function(r){return"parent"===s?"parent":"all"===t.eventKey?n[r]?P()(i()(n[r]),"parent"):P()(i()(n),"parent"):void 0===t.eventKey&&"parent"===u?n[r]?i()(n[r]):i()(n):void 0!==t.eventKey?t.eventKey:u}(r);return Array.isArray(e)?e.reduce((function(t,e){return h()(t,f(e,r))}),{}):f(e,r)},p="all"===c?P()(i()(n),"parent"):c;return Array.isArray(p)?p.reduce((function(t,r){return h()(t,l(r))}),{}):l(p)},c=function(r,e,n,i){var a=t[i](r,e,n,o);if(!s()(a)){var c=function(t){var r=function(t){return v()(t.callback)&&t.callback},e=(Array.isArray(t)?t.map((function(t){return r(t)})):[r(t)]).filter((function(t){return!1!==t}));return e.length?function(){return e.forEach((function(t){return t()}))}:void 0}(a);o.setState(function(t,r){return Array.isArray(t)?t.reduce((function(t,e){return h()({},t,u(e,r))}),{}):u(t,r)}(a,n),c)}};return i()(t).reduce((function(t,r){return t[r]=c,t}),{})}function R(t,r,e){var n=this.state||{};return e?n[e]&&n[e][t]&&n[e][t][r]:"parent"===t?n[t]&&n[t][r]||n[t]:n[t]&&n[t][r]}function I(t,r,e,n){var o=function(t,r){if("string"==typeof t[r])return"all"===t[r]||t[r]===n[r];if(Array.isArray(t[r])){var e=t[r].map((function(t){return"".concat(t)}));return E()(e,n[r])}return!1},i=t=Array.isArray(t)?t:[t];n.childName&&(i=t.filter((function(t){return o(t,"childName")})));var a=i.filter((function(t){return o(t,"target")}));if(!s()(a)){var u=a.filter((function(t){return o(t,"eventKey")}));if(!s()(u))return u.reduce((function(t,n){var o=(n&&v()(n.mutation)?n.mutation:function(){})(h()({},r,e));return h()({},t,o)}),{})}}function B(t){var r=t.match(M);return r&&r[1]&&r[1].toLowerCase()}var L=n(9082),$=n.n(L);n(8532);var q=n(5395),z=n.n(q),F=n(9992),V=n.n(F),D=(n(3849),["linear","time","log","sqrt"]);var U=function(t){var r=function(r){return function(e,n,o){var i=e[n];if(null==i)return r?new Error("Required `".concat(n,"` was not specified in `").concat(o,"`.")):null;for(var a=arguments.length,u=new Array(a>3?a-3:0),c=3;c<a;c++)u[c-3]=arguments[c];return t.apply(void 0,[e,n,o].concat(u))}};return Object.assign(r(!1),{isRequired:r(!0)})},W=function(){return null},H=function(){},J=function(t){return void 0===t?H:null===t?W:t.constructor},Y=function(t){return void 0===t?"undefined":null===t?"null":Object.prototype.toString.call(t).slice(8,-1)};function Q(t){return U((function(r,e,n){for(var o=arguments.length,i=new Array(o>3?o-3:0),a=3;a<o;a++)i[a-3]=arguments[a];return t.reduce((function(t,o){return t||o.apply(void 0,[r,e,n].concat(i))}),null)}))}var X,Z,tt=U((function(t,r,e){var n=t[r];return"number"!=typeof n||n<0?new Error("`".concat(r,"` in `").concat(e,"` must be a non-negative number.")):null})),rt=U((function(t,r,e){var n=t[r];return"number"!=typeof n||n%1!=0?new Error("`".concat(r,"` in `").concat(e,"` must be an integer.")):null})),et=(U((function(t,r,e){var n=t[r];return"number"!=typeof n||n<=0?new Error("`".concat(r,"` in `").concat(e,"` must be a number greater than zero.")):null})),U((function(t,r,e){var n=t[r];return Array.isArray(n)&&2===n.length&&n[1]!==n[0]?null:new Error("`".concat(r,"` in `").concat(e,"` must be an array of two unique numeric values."))})),U((function(t,r,e){return("function"==typeof(n=t[r])?v()(n.copy)&&v()(n.domain)&&v()(n.range):"string"==typeof n&&E()(D,n))?null:new Error("`".concat(r,"` in `").concat(e,"` must be a d3 scale."));var n})),U((function(t,r,e){var n=t[r];if(!Array.isArray(n))return new Error("`".concat(r,"` in `").concat(e,"` must be an array."));if(n.length<2)return null;var o=J(n[0]),i=V()(n,(function(t){return o!==J(t)}));if(i){var a=Y(n[0]),u=Y(i);return new Error("Expected `".concat(r,"` in `").concat(e,"` to be a ")+"homogeneous array, but found types `".concat(a,"` and ")+"`".concat(u,"`."))}return null})),U((function(t,r){return t[r]&&Array.isArray(t[r])&&t[r].length!==t.data.length?new Error("Length of data and ".concat(r," arrays must match.")):null})),U((function(t,r,e){return t[r]&&!z()(t[r])?new Error("`".concat(r,"` in `").concat(e,"` must be a regular expression.")):null})),0),nt=0,ot=0,it=0,at=0,ut=0,ct="object"==typeof performance&&performance.now?performance:Date,st="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function ft(){return at||(st(lt),at=ct.now()+ut)}function lt(){at=0}function pt(){this._call=this._time=this._next=null}function vt(t,r,e){var n=new pt;return n.restart(t,r,e),n}function yt(){at=(it=ct.now())+ut,et=nt=0;try{!function(){ft(),++et;for(var t,r=X;r;)(t=at-r._time)>=0&&r._call.call(void 0,t),r=r._next;--et}()}finally{et=0,function(){for(var t,r,e=X,n=1/0;e;)e._call?(n>e._time&&(n=e._time),t=e,e=e._next):(r=e._next,e._next=null,e=t?t._next=r:X=r);Z=t,dt(n)}(),at=0}}function ht(){var t=ct.now(),r=t-it;r>1e3&&(ut-=r,it=t)}function dt(t){et||(nt&&(nt=clearTimeout(nt)),t-at>24?(t<1/0&&(nt=setTimeout(yt,t-ct.now()-ut)),ot&&(ot=clearInterval(ot))):(ot||(it=ct.now(),ot=setInterval(ht,1e3)),et=1,st(yt)))}function bt(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}pt.prototype=vt.prototype={constructor:pt,restart:function(t,r,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?ft():+e)+(null==r?0:+r),this._next||Z===this||(Z?Z._next=this:X=this,Z=this),this._call=t,this._time=e,dt()},stop:function(){this._call&&(this._call=null,this._time=1/0,dt())}};var gt=function(){function t(){var r=this;!function(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,t),this.shouldAnimate=void 0,this.subscribers=void 0,this.activeSubscriptions=void 0,this.timer=void 0,this.loop=function(){r.subscribers.forEach((function(t){t.callback(ft()-t.startTime,t.duration)}))},this.shouldAnimate=!0,this.subscribers=[],this.timer=null,this.activeSubscriptions=0}var r,e;return r=t,(e=[{key:"bypassAnimation",value:function(){this.shouldAnimate=!1}},{key:"resumeAnimation",value:function(){this.shouldAnimate=!0}},{key:"start",value:function(){this.timer||(this.timer=vt(this.loop))}},{key:"stop",value:function(){this.timer&&(this.timer.stop(),this.timer=null)}},{key:"subscribe",value:function(t,r){r=this.shouldAnimate?r:0;var e=this.subscribers.push({startTime:ft(),callback:t,duration:r});return this.activeSubscriptions++,this.start(),e}},{key:"unsubscribe",value:function(t){null!==t&&this.subscribers[t-1]&&(delete this.subscribers[t-1],this.activeSubscriptions--),0===this.activeSubscriptions&&this.stop()}}])&&bt(r.prototype,e),Object.defineProperty(r,"prototype",{writable:!1}),t}(),mt=b().createContext({transitionTimer:new gt,animationTimer:new gt});mt.displayName="TimerContext";const xt=mt;var Et=n(7491),Ot=n.n(Et),wt=n(2516),jt=n.n(wt);function At(t,r){if(t){if("string"==typeof t)return _t(t,r);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?_t(t,r):void 0}}function _t(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e<r;e++)n[e]=t[e];return n}function St(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function kt(t,r){return kt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,r){return t.__proto__=r,t},kt(t,r)}function Pt(t,r){if(r&&("object"==typeof r||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return Tt(t)}function Tt(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ct(t){return Ct=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ct(t)}var Nt=function(t){!function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),r&&kt(t,r)}(f,t);var e,n,o,a,c=(o=f,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=Ct(o);if(a){var e=Ct(this).constructor;t=Reflect.construct(r,arguments,e)}else t=r.apply(this,arguments);return Pt(this,t)});function f(t){var r;return function(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,f),(r=c.call(this,t)).state=r.state||{},r.getScopedEvents=G.bind(Tt(r)),r.getEventState=R.bind(Tt(r)),r.baseProps=r.getBaseProps(t),r.sharedEventsCache={},r.globalEvents={},r.prevGlobalEventKeys=[],r.boundGlobalEvents={},r}return e=f,n=[{key:"shouldComponentUpdate",value:function(t){if(!Ot()(this.props,t)){this.baseProps=this.getBaseProps(t);var r=this.getExternalMutations(t,this.baseProps);this.applyExternalMutations(t,r)}return!0}},{key:"componentDidMount",value:function(){var t=this,r=i()(this.globalEvents);r.forEach((function(r){return t.addGlobalListener(r)})),this.prevGlobalEventKeys=r}},{key:"componentDidUpdate",value:function(){var t=this,e=i()(this.globalEvents);r()(this.prevGlobalEventKeys,e).forEach((function(r){return t.removeGlobalListener(r)})),r()(e,this.prevGlobalEventKeys).forEach((function(r){return t.addGlobalListener(r)})),this.prevGlobalEventKeys=e}},{key:"componentWillUnmount",value:function(){var t=this;this.prevGlobalEventKeys.forEach((function(r){return t.removeGlobalListener(r)}))}},{key:"addGlobalListener",value:function(t){var r=this,e=function(e){var n=r.globalEvents[t];return n&&n(function(t){return h()(t,{nativeEvent:t})}(e))};this.boundGlobalEvents[t]=e,window.addEventListener(B(t),e)}},{key:"removeGlobalListener",value:function(t){window.removeEventListener(B(t),this.boundGlobalEvents[t])}},{key:"getAllEvents",value:function(t){var r,e=function(t,r){var e=Array.isArray(r)&&r.reduce((function(r,e){var n,o=t[e],i=o&&o.type&&o.type.defaultEvents,a=v()(i)?i(o.props):i;return Array.isArray(a)?(n=r).concat.apply(n,C(a)):r}),[]);return e&&e.length?e:void 0}(t,["container","groupComponent"]);return Array.isArray(e)?Array.isArray(t.events)?e.concat.apply(e,function(t){if(Array.isArray(t))return _t(t)}(r=t.events)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(r)||At(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()):e:t.events}},{key:"applyExternalMutations",value:function(t,r){if(!s()(r)){var e=t.externalEventMutations.reduce((function(t,r){return v()(r.callback)?t.concat(r.callback):t}),[]),n=e.length?function(){e.forEach((function(t){return t()}))}:void 0;this.setState(r,n)}}},{key:"getExternalMutations",value:function(t,r){return s()(t.externalEventMutations)?void 0:function(t,r,e,n){return r=r||{},e=e||{},n.reduce((function(n,o){var a=e[o],u=function(t,r,e,n){return r=r||{},e=e||{},i()(r).reduce((function(o,a){var u=e[a]||{},c=r[a]||{};if("parent"===a){var f=I(t,c,u,{eventKey:a,target:"parent"});o[a]=void 0!==f?h()({},u,f):u}else{var l=w()(i()(c).concat(i()(u)));o[a]=l.reduce((function(r,e){var o={eventKey:a,target:e,childName:n},i=I(t,c[e],u[e],o);return r[e]=void 0!==i?h()({},u[e],i):u[e],S()(r,(function(t){return!s()(t)}))}),{})}return S()(o,(function(t){return!s()(t)}))}),{})}(t,r[o],e[o],o);return n[o]=u||a,S()(n,(function(t){return!s()(t)}))}),{})}(t.externalEventMutations,r,this.state,i()(r))}},{key:"cacheSharedEvents",value:function(t,r,e){this.sharedEventsCache[t]=[r,e]}},{key:"getCachedSharedEvents",value:function(t,r){var e,n,o=(e=this.sharedEventsCache[t]||[],n=2,function(t){if(Array.isArray(t))return t}(e)||function(t,r){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var n,o,i=[],a=!0,u=!1;try{for(e=e.call(t);!(a=(n=e.next()).done)&&(i.push(n.value),!r||i.length!==r);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==e.return||e.return()}finally{if(u)throw o}}return i}}(e,n)||At(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=o[0],a=o[1];if(i&&Ot()(r,a))return i}},{key:"getBaseProps",value:function(t){var r=t.container,e=b().Children.toArray(this.props.children),n=this.getBasePropsFromChildren(e),o=r?r.props:{};return h()({},n,{parent:o})}},{key:"getBasePropsFromChildren",value:function(t){var r=function(t,r){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(t,r){return t.concat(r)},i=["data","domain","categories","polar","startAngle","endAngle","minDomain","maxDomain","horizontal"],a=function(t,u,c){return t.reduce((function(t,n,s){var f=n.type&&n.type.role,l=n.props.name||"".concat(f,"-").concat(u[s]);if(n.props&&n.props.children){var p=h()({},n.props,$()(e,i)),y=n.type&&"stack"===n.type.role&&v()(n.type.getChildren)?n.type.getChildren(p):b().Children.toArray(n.props.children).map((function(t){var r=h()({},t.props,$()(p,i));return b().cloneElement(t,r)})),d=y.map((function(t,r){return"".concat(l,"-").concat(r)})),g=a(y,d,n);t=o(t,g)}else{var m=r(n,l,c);m&&(t=o(t,m))}return t}),n)},u=t.filter(d.isValidElement),c=u.map((function(t,r){return r}));return a(u,c)}(t,(function(t,r){if(t.type&&v()(t.type.getBaseProps)){var e=t.props&&t.type.getBaseProps(t.props);return e?[[r,e]]:null}return null}));return u()(r)}},{key:"getNewChildren",value:function(t,r){var e=this,n=t.events,o=t.eventKey,a=function(t,i){return t.reduce((function(t,u,c){if(u.props.children){var s=b().Children.toArray(u.props.children),f=i.slice(c,c+s.length),l=b().cloneElement(u,u.props,a(s,f));return t.concat(l)}if("parent"!==i[c]&&u.type&&v()(u.type.getBaseProps)){var p=u.props.name||i[c],y=Array.isArray(n)&&n.filter((function(t){return"parent"!==t.target&&(Array.isArray(t.childName)?t.childName.indexOf(p)>-1:t.childName===p||"all"===t.childName)})),d=[p,r,y,jt()(e.state[p])],g=e.getCachedSharedEvents(p,d)||{events:y,getEvents:function(t,n){return e.getScopedEvents(t,n,p,r)},getEventState:function(t,r){return e.getEventState(t,r,p)}};return e.cacheSharedEvents(p,g,d),t.concat(b().cloneElement(u,h()({key:"events-".concat(p),sharedEvents:g,eventKey:o,name:p},u.props)))}return t.concat(u)}),[])},u=i()(r),c=b().Children.toArray(t.children);return a(c,u)}},{key:"getContainer",value:function(t,r,e){var n=this,o=this.getNewChildren(t,r),a=Array.isArray(e)&&e.filter((function(t){return"parent"===t.target})),u=a.length>0?{events:a,getEvents:function(t,e){return n.getScopedEvents(t,e,null,r)},getEventState:this.getEventState}:null,c=t.container||t.groupComponent,s=c.type&&c.type.role,f=c.props||{},p=K.bind(this),v=u&&p({sharedEvents:u},"parent"),y=l()({},this.getEventState("parent","parent"),f,r.parent,{children:o}),d=l()({},function(t,r,e){return t?i()(t).reduce((function(r,n){return r[n]=function(r){return t[n](r,e,"parent",n)},r}),{}):{}}(v,0,y),f.events);this.globalEvents=function(t){return S()(t,(function(t,r){return M.test(r)}))}(d);var g=function(t){return A()(t,(function(t,r){return M.test(r)}))}(d);return"container"===s?b().cloneElement(c,h()({},y,{events:g})):b().cloneElement(c,g,o)}},{key:"render",value:function(){var t=this.getAllEvents(this.props);return t?this.getContainer(this.props,this.baseProps,t):b().cloneElement(this.props.container,{children:this.props.children})}}],n&&St(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),f}(b().Component);Nt.displayName="VictorySharedEvents",Nt.role="shared-event-wrapper",Nt.propTypes={children:m().oneOfType([m().arrayOf(m().node),m().node]),container:m().node,eventKey:m().oneOfType([m().array,m().func,Q([rt,tt]),m().string]),events:m().arrayOf(m().shape({childName:m().oneOfType([m().string,m().array]),eventHandlers:m().object,eventKey:m().oneOfType([m().array,m().func,Q([rt,tt]),m().string]),target:m().string})),externalEventMutations:m().arrayOf(m().shape({callback:m().func,childName:m().oneOfType([m().string,m().array]),eventKey:m().oneOfType([m().array,Q([rt,tt]),m().string]),mutation:m().func,target:m().oneOfType([m().string,m().array])})),groupComponent:m().node},Nt.defaultProps={groupComponent:b().createElement("g",null)},Nt.contextType=xt})(),o})()));
|
|
1
|
+
!function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("react")):"function"==typeof define&&define.amd?define(["react"],r):"object"==typeof exports?exports.VictorySharedEvents=r(require("react")):t.VictorySharedEvents=r(t.React)}(self,(t=>(()=>{var r={2516:(t,r)=>{function e(t,r){var e=[],n=[];return null==r&&(r=function(t,r){return e[0]===r?"[Circular ~]":"[Circular ~."+n.slice(0,e.indexOf(r)).join(".")+"]"}),function(o,i){if(e.length>0){var u=e.indexOf(this);~u?e.splice(u+1):e.push(this),~u?n.splice(u,1/0,o):n.push(o),~e.indexOf(i)&&(i=r.call(this,o,i))}else e.push(i);return null==t?i:t.call(this,o,i)}}(t.exports=function(t,r,n,o){return JSON.stringify(t,e(r,o),n)}).getSerialize=e},3273:(t,r,e)=>{var n=e(163);t.exports=function(){if(!arguments.length)return[];var t=arguments[0];return n(t)?t:[t]}},8708:(t,r,e)=>{var n=e(1171),o=e(7838),i=e(4859),u=e(4073),a=e(8541);function c(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}c.prototype.clear=n,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=u,c.prototype.set=a,t.exports=c},2596:(t,r,e)=>{var n=e(2373).Symbol;t.exports=n},6082:t=>{t.exports=function(t,r,e){switch(e.length){case 0:return t.call(r);case 1:return t.call(r,e[0]);case 2:return t.call(r,e[0],e[1]);case 3:return t.call(r,e[0],e[1],e[2])}return t.apply(r,e)}},5510:(t,r,e)=>{var n=e(6123);t.exports=function(t,r){return!(null==t||!t.length)&&n(t,r,0)>-1}},9955:t=>{t.exports=function(t,r,e){for(var n=-1,o=null==t?0:t.length;++n<o;)if(e(r,t[n]))return!0;return!1}},8644:t=>{t.exports=function(t,r){for(var e=-1,n=null==t?0:t.length,o=Array(n);++e<n;)o[e]=r(t[e],e,t);return o}},9559:t=>{t.exports=function(t,r){for(var e=-1,n=r.length,o=t.length;++e<n;)t[o+e]=r[e];return t}},1634:t=>{t.exports=function(t,r){for(var e=-1,n=null==t?0:t.length;++e<n;)if(r(t[e],e,t))return!0;return!1}},4132:(t,r,e)=>{var n=e(8347),o=e(788),i=Object.prototype.hasOwnProperty;t.exports=function(t,r,e){var u=t[r];i.call(t,r)&&o(u,e)&&(void 0!==e||r in t)||n(t,r,e)}},3162:(t,r,e)=>{var n=e(788);t.exports=function(t,r){for(var e=t.length;e--;)if(n(t[e][0],r))return e;return-1}},8347:(t,r,e)=>{var n=e(5525);t.exports=function(t,r,e){"__proto__"==r&&n?n(t,r,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[r]=e}},1377:(t,r,e)=>{var n=e(3273),o=e(5510),i=e(9955),u=e(8644),a=e(9110),c=e(9914);t.exports=function(t,r,e,s){var l=-1,f=o,p=!0,v=t.length,h=[],y=r.length;if(!v)return h;e&&(r=u(r,a(e))),s?(f=i,p=!1):r.length>=200&&(f=c,p=!1,r=new n(r));t:for(;++l<v;){var d=t[l],b=null==e?d:e(d);if(d=s||0!==d?d:0,p&&b==b){for(var g=y;g--;)if(r[g]===b)continue t;h.push(d)}else f(r,b,s)||h.push(d)}return h}},6457:(t,r,e)=>{var n=e(9559),o=e(3608);t.exports=function t(r,e,i,u,a){var c=-1,s=r.length;for(i||(i=o),a||(a=[]);++c<s;){var l=r[c];e>0&&i(l)?e>1?t(l,e-1,i,u,a):n(a,l):u||(a[a.length]=l)}return a}},4432:(t,r,e)=>{var n=e(9026),o=e(3110);t.exports=function(t,r){for(var e=0,i=(r=n(r,t)).length;null!=t&&e<i;)t=t[o(r[e++])];return e&&e==i?t:void 0}},563:t=>{var r=Object.prototype.toString;t.exports=function(t){return r.call(t)}},6776:t=>{t.exports=function(t,r){return null!=t&&r in Object(t)}},6123:t=>{t.exports=function(t,r,e){for(var n=e-1,o=t.length;++n<o;)if(t[n]===r)return n;return-1}},9070:(t,r,e)=>{var n=e(7028),o=e(3474);t.exports=function t(r,e,i,u,a){return r===e||(null==r||null==e||!o(r)&&!o(e)?r!=r&&e!=e:n(r,e,i,u,t,a))}},7028:(t,r,e)=>{var n=e(8708),o=e(8705),i=e(2813),u=e(6682),a=e(9667),c=e(163),s=e(4801),l=e(4289),f="[object Arguments]",p="[object Array]",v="[object Object]",h=Object.prototype.hasOwnProperty;t.exports=function(t,r,e,y,d,b){var g=c(t),m=c(r),x=g?p:a(t),E=m?p:a(r),w=(x=x==f?v:x)==v,A=(E=E==f?v:E)==v,j=x==E;if(j&&s(t)){if(!s(r))return!1;g=!0,w=!1}if(j&&!w)return b||(b=new n),g||l(t)?o(t,r,e,y,d,b):i(t,r,x,e,y,d,b);if(!(1&e)){var O=w&&h.call(t,"__wrapped__"),_=A&&h.call(r,"__wrapped__");if(O||_){var S=O?t.value():t,k=_?r.value():r;return b||(b=new n),d(S,k,e,y,b)}}return!!j&&(b||(b=new n),u(t,r,e,y,d,b))}},9548:(t,r,e)=>{var n=e(8708),o=e(9070);t.exports=function(t,r,e,i){var u=e.length,a=u,c=!i;if(null==t)return!a;for(t=Object(t);u--;){var s=e[u];if(c&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++u<a;){var l=(s=e[u])[0],f=t[l],p=s[1];if(c&&s[2]){if(void 0===f&&!(l in t))return!1}else{var v=new n;if(i)var h=i(f,p,l,t,r,v);if(!(void 0===h?o(p,f,3,i,v):h))return!1}}return!0}},3472:(t,r,e)=>{var n=e(758),o=e(5223),i=e(5346),u=e(163),a=e(8532);t.exports=function(t){return"function"==typeof t?t:null==t?i:"object"==typeof t?u(t)?o(t[0],t[1]):n(t):a(t)}},7190:(t,r,e)=>{var n=e(5125)(Object.keys,Object);t.exports=n},758:(t,r,e)=>{var n=e(9548),o=e(597),i=e(6878);t.exports=function(t){var r=o(t);return 1==r.length&&r[0][2]?i(r[0][0],r[0][1]):function(e){return e===t||n(e,t,r)}}},5223:(t,r,e)=>{var n=e(9070),o=e(9201),i=e(5066),u=e(726),a=e(5385),c=e(6878),s=e(3110);t.exports=function(t,r){return u(t)&&a(r)?c(s(t),r):function(e){var u=o(e,t);return void 0===u&&u===r?i(e,t):n(r,u,3)}}},5436:(t,r,e)=>{var n=e(6371),o=e(5066);t.exports=function(t,r){return n(t,r,(function(r,e){return o(t,e)}))}},6371:(t,r,e)=>{var n=e(4432),o=e(6539),i=e(9026);t.exports=function(t,r,e){for(var u=-1,a=r.length,c={};++u<a;){var s=r[u],l=n(t,s);e(l,s)&&o(c,i(s,t),l)}return c}},1600:t=>{t.exports=function(t){return function(r){return null==r?void 0:r[t]}}},3301:(t,r,e)=>{var n=e(4432);t.exports=function(t){return function(r){return n(r,t)}}},6317:(t,r,e)=>{var n=e(5346),o=e(4280),i=e(201);t.exports=function(t,r){return i(o(t,r,n),t+"")}},6539:(t,r,e)=>{var n=e(4132),o=e(9026),i=e(9099),u=e(7709),a=e(3110);t.exports=function(t,r,e,c){if(!u(t))return t;for(var s=-1,l=(r=o(r,t)).length,f=l-1,p=t;null!=p&&++s<l;){var v=a(r[s]),h=e;if("__proto__"===v||"constructor"===v||"prototype"===v)return t;if(s!=f){var y=p[v];void 0===(h=c?c(y,v,p):void 0)&&(h=u(y)?y:i(r[s+1])?[]:{})}n(p,v,h),p=p[v]}return t}},6316:(t,r,e)=>{var n=e(2596),o=e(8644),i=e(163),u=e(1995),a=n?n.prototype:void 0,c=a?a.toString:void 0;t.exports=function t(r){if("string"==typeof r)return r;if(i(r))return o(r,t)+"";if(u(r))return c?c.call(r):"";var e=r+"";return"0"==e&&1/r==-1/0?"-0":e}},9110:t=>{t.exports=function(t){return function(r){return t(r)}}},946:(t,r,e)=>{var n=e(3273),o=e(5510),i=e(9955),u=e(9914),a=e(6602),c=e(6226);t.exports=function(t,r,e){var s=-1,l=o,f=t.length,p=!0,v=[],h=v;if(e)p=!1,l=i;else if(f>=200){var y=r?null:a(t);if(y)return c(y);p=!1,l=u,h=new n}else h=r?[]:v;t:for(;++s<f;){var d=t[s],b=r?r(d):d;if(d=e||0!==d?d:0,p&&b==b){for(var g=h.length;g--;)if(h[g]===b)continue t;r&&h.push(b),v.push(d)}else l(h,b,e)||(h!==v&&h.push(b),v.push(d))}return v}},9914:(t,r,e)=>{var n=e(6123);t.exports=function(t,r){return!(null==t||!t.length)&&n(t,r,0)>-1}},9026:(t,r,e)=>{var n=e(163),o=e(726),i=e(7801),u=e(7010);t.exports=function(t,r){return n(t)?t:o(t,r)?[t]:i(u(t))}},9021:(t,r,e)=>{var n=e(4132),o=e(8347);t.exports=function(t,r,e,i){var u=!e;e||(e={});for(var a=-1,c=r.length;++a<c;){var s=r[a],l=i?i(e[s],t[s],s,e,t):void 0;void 0===l&&(l=t[s]),u?o(e,s,l):n(e,s,l)}return e}},6092:(t,r,e)=>{var n=e(6317),o=e(8286);t.exports=function(t){return n((function(r,e){var n=-1,i=e.length,u=i>1?e[i-1]:void 0,a=i>2?e[2]:void 0;for(u=t.length>3&&"function"==typeof u?(i--,u):void 0,a&&o(e[0],e[1],a)&&(u=i<3?void 0:u,i=1),r=Object(r);++n<i;){var c=e[n];c&&t(r,c,n,u)}return r}))}},6602:t=>{t.exports=function(){}},5525:(t,r,e)=>{var n=e(3743),o=function(){try{var t=n(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},8705:(t,r,e)=>{var n=e(3273),o=e(1634),i=e(9914);t.exports=function(t,r,e,u,a,c){var s=1&e,l=t.length,f=r.length;if(l!=f&&!(s&&f>l))return!1;var p=c.get(t),v=c.get(r);if(p&&v)return p==r&&v==t;var h=-1,y=!0,d=2&e?new n:void 0;for(c.set(t,r),c.set(r,t);++h<l;){var b=t[h],g=r[h];if(u)var m=s?u(g,b,h,r,t,c):u(b,g,h,t,r,c);if(void 0!==m){if(m)continue;y=!1;break}if(d){if(!o(r,(function(t,r){if(!i(d,r)&&(b===t||a(b,t,e,u,c)))return d.push(r)}))){y=!1;break}}else if(b!==g&&!a(b,g,e,u,c)){y=!1;break}}return c.delete(t),c.delete(r),y}},2813:t=>{t.exports=function(t,r){return t===r||t!=t&&r!=r}},6682:(t,r,e)=>{var n=e(8143),o=Object.prototype.hasOwnProperty;t.exports=function(t,r,e,i,u,a){var c=1&e,s=n(t),l=s.length;if(l!=n(r).length&&!c)return!1;for(var f=l;f--;){var p=s[f];if(!(c?p in r:o.call(r,p)))return!1}var v=a.get(t),h=a.get(r);if(v&&h)return v==r&&h==t;var y=!0;a.set(t,r),a.set(r,t);for(var d=c;++f<l;){var b=t[p=s[f]],g=r[p];if(i)var m=c?i(g,b,p,r,t,a):i(b,g,p,t,r,a);if(!(void 0===m?b===g||u(b,g,e,i,a):m)){y=!1;break}d||(d="constructor"==p)}if(y&&!d){var x=t.constructor,E=r.constructor;x==E||!("constructor"in t)||!("constructor"in r)||"function"==typeof x&&x instanceof x&&"function"==typeof E&&E instanceof E||(y=!1)}return a.delete(t),a.delete(r),y}},5557:(t,r,e)=>{var n=e(2645),o=e(4280),i=e(201);t.exports=function(t){return i(o(t,void 0,n),t+"")}},2117:(t,r,e)=>{var n="object"==typeof e.g&&e.g&&e.g.Object===Object&&e.g;t.exports=n},8143:(t,r,e)=>{var n=e(5125)(Object.keys,Object);t.exports=n},7271:t=>{t.exports=function(t){var r=[];if(null!=t)for(var e in Object(t))r.push(e);return r}},597:(t,r,e)=>{var n=e(5385),o=e(7747);t.exports=function(t){for(var r=o(t),e=r.length;e--;){var i=r[e],u=t[i];r[e]=[i,u,n(u)]}return r}},3743:t=>{t.exports=function(t,r){return null==t?void 0:t[r]}},9667:t=>{var r=Object.prototype.toString;t.exports=function(t){return r.call(t)}},3096:(t,r,e)=>{var n=e(9026),o=e(5075),i=e(163),u=e(9099),a=e(8454),c=e(3110);t.exports=function(t,r,e){for(var s=-1,l=(r=n(r,t)).length,f=!1;++s<l;){var p=c(r[s]);if(!(f=null!=t&&e(t,p)))break;t=t[p]}return f||++s!=l?f:!!(l=null==t?0:t.length)&&a(l)&&u(p,l)&&(i(t)||o(t))}},3608:(t,r,e)=>{var n=e(2596),o=e(5075),i=e(163),u=n?n.isConcatSpreadable:void 0;t.exports=function(t){return i(t)||o(t)||!!(u&&t&&t[u])}},9099:t=>{var r=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&r.test(t))&&t>-1&&t%1==0&&t<e}},8286:t=>{t.exports=function(){return!1}},726:(t,r,e)=>{var n=e(163),o=e(1995),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/;t.exports=function(t,r){if(n(t))return!1;var e=typeof t;return!("number"!=e&&"symbol"!=e&&"boolean"!=e&&null!=t&&!o(t))||u.test(t)||!i.test(t)||null!=r&&t in Object(r)}},5782:t=>{t.exports=function(){return!1}},5385:(t,r,e)=>{var n=e(7709);t.exports=function(t){return t==t&&!n(t)}},1171:t=>{t.exports=function(){this.__data__=[],this.size=0}},7838:(t,r,e)=>{var n=e(3162),o=Array.prototype.splice;t.exports=function(t){var r=this.__data__,e=n(r,t);return!(e<0||(e==r.length-1?r.pop():o.call(r,e,1),--this.size,0))}},4859:(t,r,e)=>{var n=e(3162);t.exports=function(t){var r=this.__data__,e=n(r,t);return e<0?void 0:r[e][1]}},4073:(t,r,e)=>{var n=e(3162);t.exports=function(t){return n(this.__data__,t)>-1}},8541:(t,r,e)=>{var n=e(3162);t.exports=function(t,r){var e=this.__data__,o=n(e,t);return o<0?(++this.size,e.push([t,r])):e[o][1]=r,this}},6878:t=>{t.exports=function(t,r){return function(e){return null!=e&&e[t]===r&&(void 0!==r||t in Object(e))}}},2453:t=>{t.exports=function(t){return t}},5125:t=>{t.exports=function(t,r){return function(e){return t(r(e))}}},4280:(t,r,e)=>{var n=e(6082),o=Math.max;t.exports=function(t,r,e){return r=o(void 0===r?t.length-1:r,0),function(){for(var i=arguments,u=-1,a=o(i.length-r,0),c=Array(a);++u<a;)c[u]=i[r+u];u=-1;for(var s=Array(r+1);++u<r;)s[u]=i[u];return s[r]=e(c),n(t,this,s)}}},2373:(t,r,e)=>{var n=e(2117),o="object"==typeof self&&self&&self.Object===Object&&self,i=n||o||Function("return this")();t.exports=i},6226:t=>{t.exports=function(){return[]}},201:t=>{t.exports=function(t){return t}},7801:(t,r,e)=>{var n=e(2453),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,u=n((function(t){var r=[];return 46===t.charCodeAt(0)&&r.push(""),t.replace(o,(function(t,e,n,o){r.push(n?o.replace(i,"$1"):e||t)})),r}));t.exports=u},3110:(t,r,e)=>{var n=e(1995);t.exports=function(t){if("string"==typeof t||n(t))return t;var r=t+"";return"0"==r&&1/t==-1/0?"-0":r}},156:(t,r,e)=>{var n=e(4132),o=e(9021),i=e(6092),u=e(981),a=e(5782),c=e(7747),s=Object.prototype.hasOwnProperty,l=i((function(t,r){if(a(r)||u(r))o(r,c(r),t);else for(var e in r)s.call(r,e)&&n(t,e,r[e])}));t.exports=l},1893:(t,r,e)=>{var n=e(6317),o=e(788),i=e(8286),u=e(8855),a=Object.prototype,c=a.hasOwnProperty,s=n((function(t,r){t=Object(t);var e=-1,n=r.length,s=n>2?r[2]:void 0;for(s&&i(r[0],r[1],s)&&(n=1);++e<n;)for(var l=r[e],f=u(l),p=-1,v=f.length;++p<v;){var h=f[p],y=t[h];(void 0===y||o(y,a[h])&&!c.call(t,h))&&(t[h]=l[h])}return t}));t.exports=s},6354:(t,r,e)=>{var n=e(1377),o=e(6457),i=e(6317),u=e(7605),a=i((function(t,r){return u(t)?n(t,o(r,1,u,!0)):[]}));t.exports=a},788:t=>{t.exports=function(t,r){return t===r||t!=t&&r!=r}},2645:(t,r,e)=>{var n=e(6457);t.exports=function(t){return null!=t&&t.length?n(t,1):[]}},7314:t=>{t.exports=function(t){for(var r=-1,e=null==t?0:t.length,n={};++r<e;){var o=t[r];n[o[0]]=o[1]}return n}},9201:(t,r,e)=>{var n=e(4432);t.exports=function(t,r,e){var o=null==t?void 0:n(t,r);return void 0===o?e:o}},5066:(t,r,e)=>{var n=e(6776),o=e(3096);t.exports=function(t,r){return null!=t&&o(t,r,n)}},5346:t=>{t.exports=function(t){return t}},6149:(t,r,e)=>{var n=e(6123);t.exports=function(t,r){return!(null==t||!t.length)&&n(t,r,0)>-1}},5075:t=>{t.exports=function(){return!1}},163:t=>{var r=Array.isArray;t.exports=r},981:(t,r,e)=>{var n=e(9642),o=e(8454);t.exports=function(t){return null!=t&&o(t.length)&&!n(t)}},7605:(t,r,e)=>{var n=e(981),o=e(3474);t.exports=function(t){return o(t)&&n(t)}},4801:t=>{t.exports=function(){return!1}},4155:(t,r,e)=>{var n=e(7190),o=e(9667),i=e(5075),u=e(163),a=e(981),c=e(4801),s=e(5782),l=e(4289),f=Object.prototype.hasOwnProperty;t.exports=function(t){if(null==t)return!0;if(a(t)&&(u(t)||"string"==typeof t||"function"==typeof t.splice||c(t)||l(t)||i(t)))return!t.length;var r=o(t);if("[object Map]"==r||"[object Set]"==r)return!t.size;if(s(t))return!n(t).length;for(var e in t)if(f.call(t,e))return!1;return!0}},9642:(t,r,e)=>{var n=e(563),o=e(7709);t.exports=function(t){if(!o(t))return!1;var r=n(t);return"[object Function]"==r||"[object GeneratorFunction]"==r||"[object AsyncFunction]"==r||"[object Proxy]"==r}},8454:t=>{t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},7709:t=>{t.exports=function(t){var r=typeof t;return null!=t&&("object"==r||"function"==r)}},3474:t=>{t.exports=function(t){return null!=t&&"object"==typeof t}},1995:t=>{t.exports=function(){return!1}},4289:t=>{t.exports=function(){return!1}},7747:(t,r,e)=>{var n=e(5125)(Object.keys,Object);t.exports=n},8855:t=>{t.exports=function(t){var r=[];if(null!=t)for(var e in Object(t))r.push(e);return r}},6051:t=>{t.exports=function(t){if("function"!=typeof t)throw new TypeError("Expected a function");return function(){var r=arguments;switch(r.length){case 0:return!t.call(this);case 1:return!t.call(this,r[0]);case 2:return!t.call(this,r[0],r[1]);case 3:return!t.call(this,r[0],r[1],r[2])}return!t.apply(this,r)}}},1616:(t,r,e)=>{var n=e(3472),o=e(6051),i=e(4912);t.exports=function(t,r){return i(t,o(n(r)))}},9082:(t,r,e)=>{var n=e(5436),o=e(5557)((function(t,r){return null==t?{}:n(t,r)}));t.exports=o},4912:(t,r,e)=>{var n=e(8644),o=e(3472),i=e(6371),u=e(7271);t.exports=function(t,r){if(null==t)return{};var e=n(u(t),(function(t){return[t]}));return r=o(r),i(t,e,(function(t,e){return r(t,e[0])}))}},8532:(t,r,e)=>{var n=e(1600),o=e(3301),i=e(726),u=e(3110);t.exports=function(t){return i(t)?n(u(t)):o(t)}},7010:(t,r,e)=>{var n=e(6316);t.exports=function(t){return null==t?"":n(t)}},9602:(t,r,e)=>{var n=e(946);t.exports=function(t){return t&&t.length?n(t):[]}},4882:(t,r,e)=>{var n=e(1377),o=e(6317),i=e(7605),u=o((function(t,r){return i(t)?n(t,r):[]}));t.exports=u},7491:t=>{var r="undefined"!=typeof Element,e="function"==typeof Map,n="function"==typeof Set,o="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function i(t,u){if(t===u)return!0;if(t&&u&&"object"==typeof t&&"object"==typeof u){if(t.constructor!==u.constructor)return!1;var a,c,s,l;if(Array.isArray(t)){if((a=t.length)!=u.length)return!1;for(c=a;0!=c--;)if(!i(t[c],u[c]))return!1;return!0}if(e&&t instanceof Map&&u instanceof Map){if(t.size!==u.size)return!1;for(l=t.entries();!(c=l.next()).done;)if(!u.has(c.value[0]))return!1;for(l=t.entries();!(c=l.next()).done;)if(!i(c.value[1],u.get(c.value[0])))return!1;return!0}if(n&&t instanceof Set&&u instanceof Set){if(t.size!==u.size)return!1;for(l=t.entries();!(c=l.next()).done;)if(!u.has(c.value[0]))return!1;return!0}if(o&&ArrayBuffer.isView(t)&&ArrayBuffer.isView(u)){if((a=t.length)!=u.length)return!1;for(c=a;0!=c--;)if(t[c]!==u[c])return!1;return!0}if(t.constructor===RegExp)return t.source===u.source&&t.flags===u.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===u.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===u.toString();if((a=(s=Object.keys(t)).length)!==Object.keys(u).length)return!1;for(c=a;0!=c--;)if(!Object.prototype.hasOwnProperty.call(u,s[c]))return!1;if(r&&t instanceof Element)return!1;for(c=a;0!=c--;)if(("_owner"!==s[c]&&"__v"!==s[c]&&"__o"!==s[c]||!t.$$typeof)&&!i(t[s[c]],u[s[c]]))return!1;return!0}return t!=t&&u!=u}t.exports=function(t,r){try{return i(t,r)}catch(t){if((t.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw t}}},9787:r=>{"use strict";r.exports=t}},e={};function n(t){var o=e[t];if(void 0!==o)return o.exports;var i=e[t]={exports:{}};return r[t](i,i.exports,n),i.exports}n.n=t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return n.d(r,{a:r}),r},n.d=(t,r)=>{for(var e in r)n.o(r,e)&&!n.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:r[e]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};return(()=>{"use strict";n.r(o),n.d(o,{VictorySharedEvents:()=>gt});var t=n(6354),r=n.n(t),e=n(7747),i=n.n(e),u=n(7314),a=n.n(u),c=n(4155),s=n.n(c),l=n(1893),f=n.n(l),p=n(9642),v=n.n(p),h=n(156),y=n.n(h),d=n(9787),b=n.n(d),g=n(6149),m=n.n(g),x=n(9602),E=n.n(x),w=n(1616),A=n.n(w),j=n(4912),O=n.n(j),_=n(4882),S=n.n(_);function k(t,r,e){return r in t?Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[r]=e,t}function P(t){return function(t){if(Array.isArray(t))return C(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,r){if(t){if("string"==typeof t)return C(t,r);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?C(t,r):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e<r;e++)n[e]=t[e];return n}var T=/^onGlobal(.*)$/;function G(t,r,e,n){var o,i=this,u=function(t){var n,o=(n=t.reduce((function(t,e){return void 0!==e.target?(Array.isArray(e.target)?m()(e.target,r):"".concat(e.target)==="".concat(r))?t.concat(e):t:t.concat(e)}),[]),void 0!==e&&"parent"!==r?n.filter((function(t){var r=t.eventKey,n=function(t){return!t||"".concat(t)==="".concat(e)};return Array.isArray(r)?r.some((function(t){return n(t)})):n(r)})):n);return Array.isArray(o)&&o.reduce((function(t,r){return r?y()(t,r.eventHandlers):t}),{})},a=Array.isArray(i.componentEvents)?Array.isArray(t.events)?(o=i.componentEvents).concat.apply(o,P(t.events)):i.componentEvents:t.events,c=a&&v()(n)?n(u(a),r):void 0;if(!t.sharedEvents)return c;var s=t.sharedEvents.getEvents,l=t.sharedEvents.events&&s(u(t.sharedEvents.events),r);return y()({},l,c)}function M(t,r,e,n){var o=this;if(s()(t))return{};var u=n||this.baseProps,a=function(t,r){var e=t.childName,n=t.target,i=t.key,a="props"===r?u:o.state||{},c=null!=e&&a[e]?a[e]:a;return"parent"===i?c.parent:c[i]&&c[i][n]},c=function(t,u){var c="parent"===r?t.childName:t.childName||e,s=t.target||r,l=function(r,e){var u=o.state||{};if(!v()(t.mutation))return u;var c=a({childName:e,key:r,target:s},"props"),l=a({childName:e,key:r,target:s},"state"),f=t.mutation(y()({},c,l),n),p=u[e]||{},h=function(t){return f?function(t){return"parent"===s?y()(t,k({},r,y()(t[r],f))):y()(t,k({},r,y()(t[r],k({},s,f))))}(t):function(t){return t[r]&&t[r][s]&&delete t[r][s],t[r]&&!i()(t[r]).length&&delete t[r],t}(t)};return null!=e?y()(u,k({},e,h(p))):h(u)},f=function(r){var e=function(r){return"parent"===s?"parent":"all"===t.eventKey?n[r]?S()(i()(n[r]),"parent"):S()(i()(n),"parent"):void 0===t.eventKey&&"parent"===u?n[r]?i()(n[r]):i()(n):void 0!==t.eventKey?t.eventKey:u}(r);return Array.isArray(e)?e.reduce((function(t,e){return y()(t,l(e,r))}),{}):l(e,r)},p="all"===c?S()(i()(n),"parent"):c;return Array.isArray(p)?p.reduce((function(t,r){return y()(t,f(r))}),{}):f(p)},l=function(r,e,n,i){var u=t[i](r,e,n,o);if(!s()(u)){var a=function(t){var r=function(t){return v()(t.callback)&&t.callback},e=(Array.isArray(t)?t.map((function(t){return r(t)})):[r(t)]).filter((function(t){return!1!==t}));return e.length?function(){return e.forEach((function(t){return t()}))}:void 0}(u);o.setState(function(t,r){return Array.isArray(t)?t.reduce((function(t,e){return y()({},t,c(e,r))}),{}):c(t,r)}(u,n),a)}};return i()(t).reduce((function(t,r){return t[r]=l,t}),{})}function K(t,r,e){var n=this.state||{};return e?n[e]&&n[e][t]&&n[e][t][r]:"parent"===t?n[t]&&n[t][r]||n[t]:n[t]&&n[t][r]}function N(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3?arguments[3]:void 0,o=i()(r);return o.reduce((function(o,u){var a=e[u]||{},c=r[u]||{};if("parent"===u){var l=B(t,c,a,{eventKey:u,target:"parent"});o[u]=void 0!==l?y()({},a,l):a}else{var f=E()(i()(c).concat(i()(a)));o[u]=f.reduce((function(r,e){var o={eventKey:u,target:e,childName:n},i=B(t,c[e],a[e],o);return r[e]=void 0!==i?y()({},a[e],i):a[e],O()(r,(function(t){return!s()(t)}))}),{})}return O()(o,(function(t){return!s()(t)}))}),{})}function B(t,r,e,n){var o=function(t,r){if("string"==typeof t[r])return"all"===t[r]||t[r]===n[r];if(Array.isArray(t[r])){var e=t[r].map((function(t){return"".concat(t)}));return m()(e,n[r])}return!1},i=Array.isArray(t)?t:[t];n.childName&&(i=t.filter((function(t){return o(t,"childName")})));var u=i.filter((function(t){return o(t,"target")}));if(!s()(u)){var a=u.filter((function(t){return o(t,"eventKey")}));if(!s()(a))return a.reduce((function(t,n){var o=(n&&v()(n.mutation)?n.mutation:function(){})(y()({},r,e));return y()({},t,o)}),{})}}function z(t){var r=t.match(T);return r&&r[1]&&r[1].toLowerCase()}var I=n(9082),F=n.n(I);n(8532);var L,$,R=0,V=0,D=0,U=0,q=0,H=0,J="object"==typeof performance&&performance.now?performance:Date,W="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Q(){return q||(W(X),q=J.now()+H)}function X(){q=0}function Y(){this._call=this._time=this._next=null}function Z(t,r,e){var n=new Y;return n.restart(t,r,e),n}function tt(){q=(U=J.now())+H,R=V=0;try{!function(){Q(),++R;for(var t,r=L;r;)(t=q-r._time)>=0&&r._call.call(void 0,t),r=r._next;--R}()}finally{R=0,function(){for(var t,r,e=L,n=1/0;e;)e._call?(n>e._time&&(n=e._time),t=e,e=e._next):(r=e._next,e._next=null,e=t?t._next=r:L=r);$=t,et(n)}(),q=0}}function rt(){var t=J.now(),r=t-U;r>1e3&&(H-=r,U=t)}function et(t){R||(V&&(V=clearTimeout(V)),t-q>24?(t<1/0&&(V=setTimeout(tt,t-J.now()-H)),D&&(D=clearInterval(D))):(D||(U=J.now(),D=setInterval(rt,1e3)),R=1,W(tt)))}function nt(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}Y.prototype=Z.prototype={constructor:Y,restart:function(t,r,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?Q():+e)+(null==r?0:+r),this._next||$===this||($?$._next=this:L=this,$=this),this._call=t,this._time=e,et()},stop:function(){this._call&&(this._call=null,this._time=1/0,et())}};var ot=function(){function t(){var r=this;!function(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,t),this.shouldAnimate=void 0,this.subscribers=void 0,this.activeSubscriptions=void 0,this.timer=void 0,this.loop=function(){r.subscribers.forEach((function(t){t.callback(Q()-t.startTime,t.duration)}))},this.shouldAnimate=!0,this.subscribers=[],this.timer=null,this.activeSubscriptions=0}var r,e;return r=t,(e=[{key:"bypassAnimation",value:function(){this.shouldAnimate=!1}},{key:"resumeAnimation",value:function(){this.shouldAnimate=!0}},{key:"start",value:function(){this.timer||(this.timer=Z(this.loop))}},{key:"stop",value:function(){this.timer&&(this.timer.stop(),this.timer=null)}},{key:"subscribe",value:function(t,r){var e=this.subscribers.push({startTime:Q(),callback:t,duration:this.shouldAnimate?r:0});return this.activeSubscriptions++,this.start(),e}},{key:"unsubscribe",value:function(t){null!==t&&this.subscribers[t-1]&&(delete this.subscribers[t-1],this.activeSubscriptions--),0===this.activeSubscriptions&&this.stop()}}])&&nt(r.prototype,e),Object.defineProperty(r,"prototype",{writable:!1}),t}(),it=b().createContext({transitionTimer:new ot,animationTimer:new ot});it.displayName="TimerContext";const ut=it;var at=n(7491),ct=n.n(at),st=n(2516),lt=n.n(st);function ft(t,r){if(t){if("string"==typeof t)return pt(t,r);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?pt(t,r):void 0}}function pt(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e<r;e++)n[e]=t[e];return n}function vt(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ht(t,r){return ht=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,r){return t.__proto__=r,t},ht(t,r)}function yt(t,r){if(r&&("object"==typeof r||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return dt(t)}function dt(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function bt(t){return bt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},bt(t)}var gt=function(t){!function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),r&&ht(t,r)}(l,t);var e,n,o,u,c=(o=l,u=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=bt(o);if(u){var e=bt(this).constructor;t=Reflect.construct(r,arguments,e)}else t=r.apply(this,arguments);return yt(this,t)});function l(t){var r;return function(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,l),(r=c.call(this,t)).getScopedEvents=void 0,r.getEventState=void 0,r.baseProps=void 0,r.sharedEventsCache=void 0,r.globalEvents=void 0,r.prevGlobalEventKeys=void 0,r.boundGlobalEvents=void 0,r.getScopedEvents=M.bind(dt(r)),r.getEventState=K.bind(dt(r)),r.state=r.state||{},r.sharedEventsCache={},r.globalEvents={},r.prevGlobalEventKeys=[],r.boundGlobalEvents={},r.baseProps=r.getBaseProps(t),r}return e=l,n=[{key:"shouldComponentUpdate",value:function(t){if(!ct()(this.props,t)){this.baseProps=this.getBaseProps(t);var r=this.getExternalMutations(t,this.baseProps);this.applyExternalMutations(t,r)}return!0}},{key:"componentDidMount",value:function(){var t=this,r=i()(this.globalEvents);r.forEach((function(r){return t.addGlobalListener(r)})),this.prevGlobalEventKeys=r}},{key:"componentDidUpdate",value:function(){var t=this,e=i()(this.globalEvents);r()(this.prevGlobalEventKeys,e).forEach((function(r){return t.removeGlobalListener(r)})),r()(e,this.prevGlobalEventKeys).forEach((function(r){return t.addGlobalListener(r)})),this.prevGlobalEventKeys=e}},{key:"componentWillUnmount",value:function(){var t=this;this.prevGlobalEventKeys.forEach((function(r){return t.removeGlobalListener(r)}))}},{key:"addGlobalListener",value:function(t){var r=this,e=function(e){var n=r.globalEvents[t];return n&&n(function(t){return y()(t,{nativeEvent:t})}(e))};this.boundGlobalEvents[t]=e,window.addEventListener(z(t),e)}},{key:"removeGlobalListener",value:function(t){window.removeEventListener(z(t),this.boundGlobalEvents[t])}},{key:"getAllEvents",value:function(t){var r,e=function(t,r){var e=Array.isArray(r)&&r.reduce((function(r,e){var n=t[e],o=n&&n.type&&n.type.defaultEvents,i=v()(o)?o(n.props):o;return Array.isArray(i)?r.concat.apply(r,P(i)):r}),[]);return e&&e.length?e:void 0}(t,["container","groupComponent"]);return Array.isArray(e)?Array.isArray(t.events)?e.concat.apply(e,function(t){if(Array.isArray(t))return pt(t)}(r=t.events)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(r)||ft(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()):e:t.events}},{key:"applyExternalMutations",value:function(t,r){if(!s()(r)){var e=t.externalEventMutations.reduce((function(t,r){return v()(r.callback)?t.concat(r.callback):t}),[]),n=e.length?function(){e.forEach((function(t){return t()}))}:void 0;this.setState(r,n)}}},{key:"getExternalMutations",value:function(t,r){return s()(t.externalEventMutations)?void 0:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return(arguments.length>3?arguments[3]:void 0).reduce((function(n,o){var i=e[o],u=N(t,r[o],e[o],o);return n[o]=u||i,O()(n,(function(t){return!s()(t)}))}),{})}(t.externalEventMutations,r,this.state,i()(r))}},{key:"cacheSharedEvents",value:function(t,r,e){this.sharedEventsCache[t]=[r,e]}},{key:"getCachedSharedEvents",value:function(t,r){var e,n,o=(e=this.sharedEventsCache[t]||[],n=2,function(t){if(Array.isArray(t))return t}(e)||function(t,r){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var n,o,i=[],u=!0,a=!1;try{for(e=e.call(t);!(u=(n=e.next()).done)&&(i.push(n.value),!r||i.length!==r);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==e.return||e.return()}finally{if(a)throw o}}return i}}(e,n)||ft(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=o[0],u=o[1];if(i&&ct()(r,u))return i}},{key:"getBaseProps",value:function(t){var r=t.container,e=b().Children.toArray(this.props.children),n=this.getBasePropsFromChildren(e),o=r?r.props:{};return y()({},n,{parent:o})}},{key:"getBasePropsFromChildren",value:function(t){var r=function(t,r){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(t,r){return t.concat(r)},i=["data","domain","categories","polar","startAngle","endAngle","minDomain","maxDomain","horizontal"],u=function(t,a,c){return t.reduce((function(t,n,s){var l=t,f=n.type&&n.type.role,p=n.props.name||"".concat(f,"-").concat(a[s]);if(n.props&&n.props.children){var h=y()({},n.props,F()(e,i)),d=n.type&&"stack"===n.type.role&&v()(n.type.getChildren)?n.type.getChildren(h):b().Children.toArray(n.props.children).map((function(t){var r=y()({},t.props,F()(h,i));return b().cloneElement(t,r)})),g=d.map((function(t,r){return"".concat(p,"-").concat(r)})),m=u(d,g,n);l=o(l,m)}else{var x=r(n,p,c);x&&(l=o(l,x))}return l}),n)},a=t.filter(d.isValidElement),c=a.map((function(t,r){return r}));return u(a,c)}(t,(function(t,r){if(t.type&&v()(t.type.getBaseProps)){var e=t.props&&t.type.getBaseProps(t.props);return e?[[r,e]]:null}return null}));return a()(r)}},{key:"getNewChildren",value:function(t,r){var e=this,n=t.events,o=t.eventKey,u=function(t,i){return t.reduce((function(t,a,c){if(a.props.children){var s=b().Children.toArray(a.props.children),l=i.slice(c,c+s.length),f=b().cloneElement(a,a.props,u(s,l));return t.concat(f)}if("parent"!==i[c]&&a.type&&v()(a.type.getBaseProps)){var p=a.props.name||i[c],h=Array.isArray(n)&&n.filter((function(t){return"parent"!==t.target&&(Array.isArray(t.childName)?t.childName.indexOf(p)>-1:t.childName===p||"all"===t.childName)})),d=[p,r,h,lt()(e.state[p])],g=e.getCachedSharedEvents(p,d)||{events:h,getEvents:function(t,n){return e.getScopedEvents(t,n,p,r)},getEventState:function(t,r){return e.getEventState(t,r,p)}};return e.cacheSharedEvents(p,g,d),t.concat(b().cloneElement(a,y()({key:"events-".concat(p),sharedEvents:g,eventKey:o,name:p},a.props)))}return t.concat(a)}),[])},a=i()(r),c=b().Children.toArray(t.children);return u(c,a)}},{key:"getContainer",value:function(t,r,e){var n=this,o=this.getNewChildren(t,r),u=Array.isArray(e)?e.filter((function(t){return"parent"===t.target})):[],a=u.length>0?{events:u,getEvents:function(t,e){return n.getScopedEvents(t,e,null,r)},getEventState:this.getEventState}:null,c=t.container||t.groupComponent,s=c.type&&c.type.role,l=c.props||{},p=G.bind(this),v=a&&p({sharedEvents:a},"parent"),h=f()({},this.getEventState("parent","parent"),l,r.parent,{children:o}),d=f()({},function(t,r,e){return t?i()(t).reduce((function(r,n){return r[n]=function(r){return t[n](r,e,"parent",n)},r}),{}):{}}(v,0,h),l.events);this.globalEvents=function(t){return O()(t,(function(t,r){return T.test(r)}))}(d);var g=function(t){return A()(t,(function(t,r){return T.test(r)}))}(d);return"container"===s?b().cloneElement(c,y()({},h,{events:g})):b().cloneElement(c,g,o)}},{key:"render",value:function(){var t=this.getAllEvents(this.props);return t?this.getContainer(this.props,this.baseProps,t):b().cloneElement(this.props.container,{children:this.props.children})}}],n&&vt(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),l}(b().Component);gt.displayName="VictorySharedEvents",gt.role="shared-event-wrapper",gt.contextType=ut})(),o})()));
|
|
2
2
|
//# sourceMappingURL=victory-shared-events.min.js.map
|
package/es/index.d.ts
CHANGED
|
@@ -1,23 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
EventCallbackInterface,
|
|
4
|
-
EventPropTypeInterface,
|
|
5
|
-
StringOrNumberOrCallback,
|
|
6
|
-
} from "victory-core";
|
|
7
|
-
|
|
8
|
-
export type VictorySharedEventsProps = {
|
|
9
|
-
children?: React.ReactElement | React.ReactElement[];
|
|
10
|
-
container?: React.ReactElement;
|
|
11
|
-
groupComponent?: React.ReactElement;
|
|
12
|
-
events?: EventPropTypeInterface<string, StringOrNumberOrCallback>[];
|
|
13
|
-
eventKey?: StringOrNumberOrCallback;
|
|
14
|
-
externalEventMutations?: EventCallbackInterface<
|
|
15
|
-
string | string[],
|
|
16
|
-
string | number | (string | number)[]
|
|
17
|
-
>[];
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export class VictorySharedEvents extends React.Component<
|
|
21
|
-
VictorySharedEventsProps,
|
|
22
|
-
any
|
|
23
|
-
> {}
|
|
1
|
+
export * from "./victory-shared-events";
|
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
package/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from "./victory-shared-events";
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/// <reference types="lodash" />
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { EventCallbackInterface, EventMixinCalculatedValues, EventPropTypeInterface, StringOrNumberOrCallback } from "victory-core";
|
|
4
|
+
export declare type VictorySharedEventsProps = {
|
|
5
|
+
children?: React.ReactElement | React.ReactElement[];
|
|
6
|
+
container?: React.ReactElement;
|
|
7
|
+
groupComponent?: React.ReactElement;
|
|
8
|
+
events?: EventPropTypeInterface<string, StringOrNumberOrCallback>[];
|
|
9
|
+
eventKey?: StringOrNumberOrCallback;
|
|
10
|
+
externalEventMutations?: EventCallbackInterface<string | string[], string | number | (string | number)[]>[];
|
|
11
|
+
};
|
|
12
|
+
export interface VictorySharedEvents extends EventMixinCalculatedValues {
|
|
13
|
+
}
|
|
14
|
+
export declare class VictorySharedEvents extends React.Component<VictorySharedEventsProps> {
|
|
15
|
+
static displayName: string;
|
|
16
|
+
static role: string;
|
|
17
|
+
static contextType: React.Context<{
|
|
18
|
+
transitionTimer: import("victory-core").Timer;
|
|
19
|
+
animationTimer: import("victory-core").Timer;
|
|
20
|
+
}>;
|
|
21
|
+
getScopedEvents: any;
|
|
22
|
+
getEventState: any;
|
|
23
|
+
baseProps: any;
|
|
24
|
+
sharedEventsCache: any;
|
|
25
|
+
globalEvents: any;
|
|
26
|
+
prevGlobalEventKeys: any;
|
|
27
|
+
boundGlobalEvents: any;
|
|
28
|
+
constructor(props: VictorySharedEventsProps);
|
|
29
|
+
shouldComponentUpdate(nextProps: any): boolean;
|
|
30
|
+
componentDidMount(): void;
|
|
31
|
+
componentDidUpdate(): void;
|
|
32
|
+
componentWillUnmount(): void;
|
|
33
|
+
addGlobalListener(key: any): void;
|
|
34
|
+
removeGlobalListener(key: any): void;
|
|
35
|
+
getAllEvents(props: any): any;
|
|
36
|
+
applyExternalMutations(props: any, externalMutations: any): void;
|
|
37
|
+
getExternalMutations(props: any, baseProps: any): any;
|
|
38
|
+
cacheSharedEvents(name: any, sharedEvents: any, cacheValues: any): void;
|
|
39
|
+
getCachedSharedEvents(name: any, cacheValues: any): any;
|
|
40
|
+
getBaseProps(props: any): import("lodash").Dictionary<any> & {
|
|
41
|
+
parent: any;
|
|
42
|
+
};
|
|
43
|
+
getBasePropsFromChildren(childComponents: any): import("lodash").Dictionary<any>;
|
|
44
|
+
getNewChildren(props: any, baseProps: any): any;
|
|
45
|
+
getContainer(props: any, baseProps: any, events: any): React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
46
|
+
render(): React.ReactElement;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=victory-shared-events.d.ts.map
|
|
@@ -47,15 +47,10 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
47
47
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
48
48
|
|
|
49
49
|
import React from "react";
|
|
50
|
-
import
|
|
51
|
-
import { PropTypes as CustomPropTypes, Events, Helpers, TimerContext } from "victory-core";
|
|
50
|
+
import { Events, Helpers, TimerContext } from "victory-core";
|
|
52
51
|
import isEqual from "react-fast-compare";
|
|
53
|
-
import stringify from "json-stringify-safe";
|
|
54
|
-
|
|
55
|
-
// to refactor in our current refactoring effort. Please do not make changes
|
|
56
|
-
// to this file without manual testing and/or refactoring and adding tests.
|
|
57
|
-
|
|
58
|
-
var VictorySharedEvents = /*#__PURE__*/function (_React$Component) {
|
|
52
|
+
import stringify from "json-stringify-safe";
|
|
53
|
+
export var VictorySharedEvents = /*#__PURE__*/function (_React$Component) {
|
|
59
54
|
_inherits(VictorySharedEvents, _React$Component);
|
|
60
55
|
|
|
61
56
|
var _super = _createSuper(VictorySharedEvents);
|
|
@@ -66,14 +61,21 @@ var VictorySharedEvents = /*#__PURE__*/function (_React$Component) {
|
|
|
66
61
|
_classCallCheck(this, VictorySharedEvents);
|
|
67
62
|
|
|
68
63
|
_this = _super.call(this, props);
|
|
69
|
-
_this.
|
|
64
|
+
_this.getScopedEvents = void 0;
|
|
65
|
+
_this.getEventState = void 0;
|
|
66
|
+
_this.baseProps = void 0;
|
|
67
|
+
_this.sharedEventsCache = void 0;
|
|
68
|
+
_this.globalEvents = void 0;
|
|
69
|
+
_this.prevGlobalEventKeys = void 0;
|
|
70
|
+
_this.boundGlobalEvents = void 0;
|
|
70
71
|
_this.getScopedEvents = Events.getScopedEvents.bind(_assertThisInitialized(_this));
|
|
71
72
|
_this.getEventState = Events.getEventState.bind(_assertThisInitialized(_this));
|
|
72
|
-
_this.
|
|
73
|
+
_this.state = _this.state || {};
|
|
73
74
|
_this.sharedEventsCache = {};
|
|
74
75
|
_this.globalEvents = {};
|
|
75
76
|
_this.prevGlobalEventKeys = [];
|
|
76
77
|
_this.boundGlobalEvents = {};
|
|
78
|
+
_this.baseProps = _this.getBaseProps(props);
|
|
77
79
|
return _this;
|
|
78
80
|
}
|
|
79
81
|
|
|
@@ -164,8 +166,7 @@ var VictorySharedEvents = /*#__PURE__*/function (_React$Component) {
|
|
|
164
166
|
value: function applyExternalMutations(props, externalMutations) {
|
|
165
167
|
if (!_isEmpty(externalMutations)) {
|
|
166
168
|
var callbacks = props.externalEventMutations.reduce(function (memo, mutation) {
|
|
167
|
-
|
|
168
|
-
return memo;
|
|
169
|
+
return _isFunction(mutation.callback) ? memo.concat(mutation.callback) : memo;
|
|
169
170
|
}, []);
|
|
170
171
|
var compiledCallbacks = callbacks.length ? function () {
|
|
171
172
|
callbacks.forEach(function (c) {
|
|
@@ -288,9 +289,9 @@ var VictorySharedEvents = /*#__PURE__*/function (_React$Component) {
|
|
|
288
289
|
var _this7 = this;
|
|
289
290
|
|
|
290
291
|
var children = this.getNewChildren(props, baseProps);
|
|
291
|
-
var parents = Array.isArray(events)
|
|
292
|
+
var parents = Array.isArray(events) ? events.filter(function (event) {
|
|
292
293
|
return event.target === "parent";
|
|
293
|
-
});
|
|
294
|
+
}) : [];
|
|
294
295
|
var sharedEvents = parents.length > 0 ? {
|
|
295
296
|
events: parents,
|
|
296
297
|
// partially apply childName (null) and baseProps,
|
|
@@ -336,30 +337,6 @@ var VictorySharedEvents = /*#__PURE__*/function (_React$Component) {
|
|
|
336
337
|
|
|
337
338
|
return VictorySharedEvents;
|
|
338
339
|
}(React.Component);
|
|
339
|
-
|
|
340
340
|
VictorySharedEvents.displayName = "VictorySharedEvents";
|
|
341
341
|
VictorySharedEvents.role = "shared-event-wrapper";
|
|
342
|
-
VictorySharedEvents.
|
|
343
|
-
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),
|
|
344
|
-
container: PropTypes.node,
|
|
345
|
-
eventKey: PropTypes.oneOfType([PropTypes.array, PropTypes.func, CustomPropTypes.allOfType([CustomPropTypes.integer, CustomPropTypes.nonNegative]), PropTypes.string]),
|
|
346
|
-
events: PropTypes.arrayOf(PropTypes.shape({
|
|
347
|
-
childName: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),
|
|
348
|
-
eventHandlers: PropTypes.object,
|
|
349
|
-
eventKey: PropTypes.oneOfType([PropTypes.array, PropTypes.func, CustomPropTypes.allOfType([CustomPropTypes.integer, CustomPropTypes.nonNegative]), PropTypes.string]),
|
|
350
|
-
target: PropTypes.string
|
|
351
|
-
})),
|
|
352
|
-
externalEventMutations: PropTypes.arrayOf(PropTypes.shape({
|
|
353
|
-
callback: PropTypes.func,
|
|
354
|
-
childName: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),
|
|
355
|
-
eventKey: PropTypes.oneOfType([PropTypes.array, CustomPropTypes.allOfType([CustomPropTypes.integer, CustomPropTypes.nonNegative]), PropTypes.string]),
|
|
356
|
-
mutation: PropTypes.func,
|
|
357
|
-
target: PropTypes.oneOfType([PropTypes.string, PropTypes.array])
|
|
358
|
-
})),
|
|
359
|
-
groupComponent: PropTypes.node
|
|
360
|
-
};
|
|
361
|
-
VictorySharedEvents.defaultProps = {
|
|
362
|
-
groupComponent: /*#__PURE__*/React.createElement("g", null)
|
|
363
|
-
};
|
|
364
|
-
VictorySharedEvents.contextType = TimerContext;
|
|
365
|
-
export { VictorySharedEvents as default };
|
|
342
|
+
VictorySharedEvents.contextType = TimerContext;
|
package/lib/index.d.ts
CHANGED
|
@@ -1,23 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
EventCallbackInterface,
|
|
4
|
-
EventPropTypeInterface,
|
|
5
|
-
StringOrNumberOrCallback,
|
|
6
|
-
} from "victory-core";
|
|
7
|
-
|
|
8
|
-
export type VictorySharedEventsProps = {
|
|
9
|
-
children?: React.ReactElement | React.ReactElement[];
|
|
10
|
-
container?: React.ReactElement;
|
|
11
|
-
groupComponent?: React.ReactElement;
|
|
12
|
-
events?: EventPropTypeInterface<string, StringOrNumberOrCallback>[];
|
|
13
|
-
eventKey?: StringOrNumberOrCallback;
|
|
14
|
-
externalEventMutations?: EventCallbackInterface<
|
|
15
|
-
string | string[],
|
|
16
|
-
string | number | (string | number)[]
|
|
17
|
-
>[];
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export class VictorySharedEvents extends React.Component<
|
|
21
|
-
VictorySharedEventsProps,
|
|
22
|
-
any
|
|
23
|
-
> {}
|
|
1
|
+
export * from "./victory-shared-events";
|
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.js
CHANGED
|
@@ -3,13 +3,16 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
Object.defineProperty(exports, "VictorySharedEvents", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _victorySharedEvents.default;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
6
|
|
|
13
|
-
var _victorySharedEvents =
|
|
7
|
+
var _victorySharedEvents = require("./victory-shared-events");
|
|
14
8
|
|
|
15
|
-
function
|
|
9
|
+
Object.keys(_victorySharedEvents).forEach(function (key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
if (key in exports && exports[key] === _victorySharedEvents[key]) return;
|
|
12
|
+
Object.defineProperty(exports, key, {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _victorySharedEvents[key];
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
});
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/// <reference types="lodash" />
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { EventCallbackInterface, EventMixinCalculatedValues, EventPropTypeInterface, StringOrNumberOrCallback } from "victory-core";
|
|
4
|
+
export declare type VictorySharedEventsProps = {
|
|
5
|
+
children?: React.ReactElement | React.ReactElement[];
|
|
6
|
+
container?: React.ReactElement;
|
|
7
|
+
groupComponent?: React.ReactElement;
|
|
8
|
+
events?: EventPropTypeInterface<string, StringOrNumberOrCallback>[];
|
|
9
|
+
eventKey?: StringOrNumberOrCallback;
|
|
10
|
+
externalEventMutations?: EventCallbackInterface<string | string[], string | number | (string | number)[]>[];
|
|
11
|
+
};
|
|
12
|
+
export interface VictorySharedEvents extends EventMixinCalculatedValues {
|
|
13
|
+
}
|
|
14
|
+
export declare class VictorySharedEvents extends React.Component<VictorySharedEventsProps> {
|
|
15
|
+
static displayName: string;
|
|
16
|
+
static role: string;
|
|
17
|
+
static contextType: React.Context<{
|
|
18
|
+
transitionTimer: import("victory-core").Timer;
|
|
19
|
+
animationTimer: import("victory-core").Timer;
|
|
20
|
+
}>;
|
|
21
|
+
getScopedEvents: any;
|
|
22
|
+
getEventState: any;
|
|
23
|
+
baseProps: any;
|
|
24
|
+
sharedEventsCache: any;
|
|
25
|
+
globalEvents: any;
|
|
26
|
+
prevGlobalEventKeys: any;
|
|
27
|
+
boundGlobalEvents: any;
|
|
28
|
+
constructor(props: VictorySharedEventsProps);
|
|
29
|
+
shouldComponentUpdate(nextProps: any): boolean;
|
|
30
|
+
componentDidMount(): void;
|
|
31
|
+
componentDidUpdate(): void;
|
|
32
|
+
componentWillUnmount(): void;
|
|
33
|
+
addGlobalListener(key: any): void;
|
|
34
|
+
removeGlobalListener(key: any): void;
|
|
35
|
+
getAllEvents(props: any): any;
|
|
36
|
+
applyExternalMutations(props: any, externalMutations: any): void;
|
|
37
|
+
getExternalMutations(props: any, baseProps: any): any;
|
|
38
|
+
cacheSharedEvents(name: any, sharedEvents: any, cacheValues: any): void;
|
|
39
|
+
getCachedSharedEvents(name: any, cacheValues: any): any;
|
|
40
|
+
getBaseProps(props: any): import("lodash").Dictionary<any> & {
|
|
41
|
+
parent: any;
|
|
42
|
+
};
|
|
43
|
+
getBasePropsFromChildren(childComponents: any): import("lodash").Dictionary<any>;
|
|
44
|
+
getNewChildren(props: any, baseProps: any): any;
|
|
45
|
+
getContainer(props: any, baseProps: any, events: any): React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
46
|
+
render(): React.ReactElement;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=victory-shared-events.d.ts.map
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.VictorySharedEvents = void 0;
|
|
7
7
|
|
|
8
8
|
var _difference2 = _interopRequireDefault(require("lodash/difference"));
|
|
9
9
|
|
|
@@ -21,8 +21,6 @@ var _assign2 = _interopRequireDefault(require("lodash/assign"));
|
|
|
21
21
|
|
|
22
22
|
var _react = _interopRequireDefault(require("react"));
|
|
23
23
|
|
|
24
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
25
|
-
|
|
26
24
|
var _victoryCore = require("victory-core");
|
|
27
25
|
|
|
28
26
|
var _reactFastCompare = _interopRequireDefault(require("react-fast-compare"));
|
|
@@ -71,10 +69,6 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
71
69
|
|
|
72
70
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
73
71
|
|
|
74
|
-
// DISCLAIMER:
|
|
75
|
-
// This file is not currently tested, and it is first on the list of files
|
|
76
|
-
// to refactor in our current refactoring effort. Please do not make changes
|
|
77
|
-
// to this file without manual testing and/or refactoring and adding tests.
|
|
78
72
|
var VictorySharedEvents = /*#__PURE__*/function (_React$Component) {
|
|
79
73
|
_inherits(VictorySharedEvents, _React$Component);
|
|
80
74
|
|
|
@@ -86,14 +80,21 @@ var VictorySharedEvents = /*#__PURE__*/function (_React$Component) {
|
|
|
86
80
|
_classCallCheck(this, VictorySharedEvents);
|
|
87
81
|
|
|
88
82
|
_this = _super.call(this, props);
|
|
89
|
-
_this.
|
|
83
|
+
_this.getScopedEvents = void 0;
|
|
84
|
+
_this.getEventState = void 0;
|
|
85
|
+
_this.baseProps = void 0;
|
|
86
|
+
_this.sharedEventsCache = void 0;
|
|
87
|
+
_this.globalEvents = void 0;
|
|
88
|
+
_this.prevGlobalEventKeys = void 0;
|
|
89
|
+
_this.boundGlobalEvents = void 0;
|
|
90
90
|
_this.getScopedEvents = _victoryCore.Events.getScopedEvents.bind(_assertThisInitialized(_this));
|
|
91
91
|
_this.getEventState = _victoryCore.Events.getEventState.bind(_assertThisInitialized(_this));
|
|
92
|
-
_this.
|
|
92
|
+
_this.state = _this.state || {};
|
|
93
93
|
_this.sharedEventsCache = {};
|
|
94
94
|
_this.globalEvents = {};
|
|
95
95
|
_this.prevGlobalEventKeys = [];
|
|
96
96
|
_this.boundGlobalEvents = {};
|
|
97
|
+
_this.baseProps = _this.getBaseProps(props);
|
|
97
98
|
return _this;
|
|
98
99
|
}
|
|
99
100
|
|
|
@@ -180,8 +181,7 @@ var VictorySharedEvents = /*#__PURE__*/function (_React$Component) {
|
|
|
180
181
|
value: function applyExternalMutations(props, externalMutations) {
|
|
181
182
|
if (!(0, _isEmpty2.default)(externalMutations)) {
|
|
182
183
|
var callbacks = props.externalEventMutations.reduce(function (memo, mutation) {
|
|
183
|
-
|
|
184
|
-
return memo;
|
|
184
|
+
return (0, _isFunction2.default)(mutation.callback) ? memo.concat(mutation.callback) : memo;
|
|
185
185
|
}, []);
|
|
186
186
|
var compiledCallbacks = callbacks.length ? function () {
|
|
187
187
|
callbacks.forEach(function (c) {
|
|
@@ -311,9 +311,9 @@ var VictorySharedEvents = /*#__PURE__*/function (_React$Component) {
|
|
|
311
311
|
var _this7 = this;
|
|
312
312
|
|
|
313
313
|
var children = this.getNewChildren(props, baseProps);
|
|
314
|
-
var parents = Array.isArray(events)
|
|
314
|
+
var parents = Array.isArray(events) ? events.filter(function (event) {
|
|
315
315
|
return event.target === "parent";
|
|
316
|
-
});
|
|
316
|
+
}) : [];
|
|
317
317
|
var sharedEvents = parents.length > 0 ? {
|
|
318
318
|
events: parents,
|
|
319
319
|
// partially apply childName (null) and baseProps,
|
|
@@ -361,29 +361,7 @@ var VictorySharedEvents = /*#__PURE__*/function (_React$Component) {
|
|
|
361
361
|
return VictorySharedEvents;
|
|
362
362
|
}(_react.default.Component);
|
|
363
363
|
|
|
364
|
-
exports.
|
|
364
|
+
exports.VictorySharedEvents = VictorySharedEvents;
|
|
365
365
|
VictorySharedEvents.displayName = "VictorySharedEvents";
|
|
366
366
|
VictorySharedEvents.role = "shared-event-wrapper";
|
|
367
|
-
VictorySharedEvents.propTypes = {
|
|
368
|
-
children: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.node), _propTypes.default.node]),
|
|
369
|
-
container: _propTypes.default.node,
|
|
370
|
-
eventKey: _propTypes.default.oneOfType([_propTypes.default.array, _propTypes.default.func, _victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer, _victoryCore.PropTypes.nonNegative]), _propTypes.default.string]),
|
|
371
|
-
events: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
372
|
-
childName: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.array]),
|
|
373
|
-
eventHandlers: _propTypes.default.object,
|
|
374
|
-
eventKey: _propTypes.default.oneOfType([_propTypes.default.array, _propTypes.default.func, _victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer, _victoryCore.PropTypes.nonNegative]), _propTypes.default.string]),
|
|
375
|
-
target: _propTypes.default.string
|
|
376
|
-
})),
|
|
377
|
-
externalEventMutations: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
378
|
-
callback: _propTypes.default.func,
|
|
379
|
-
childName: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.array]),
|
|
380
|
-
eventKey: _propTypes.default.oneOfType([_propTypes.default.array, _victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer, _victoryCore.PropTypes.nonNegative]), _propTypes.default.string]),
|
|
381
|
-
mutation: _propTypes.default.func,
|
|
382
|
-
target: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.array])
|
|
383
|
-
})),
|
|
384
|
-
groupComponent: _propTypes.default.node
|
|
385
|
-
};
|
|
386
|
-
VictorySharedEvents.defaultProps = {
|
|
387
|
-
groupComponent: /*#__PURE__*/_react.default.createElement("g", null)
|
|
388
|
-
};
|
|
389
367
|
VictorySharedEvents.contextType = _victoryCore.TimerContext;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "victory-shared-events",
|
|
3
|
-
"version": "36.8.
|
|
3
|
+
"version": "36.8.3",
|
|
4
4
|
"description": "Shared Event Helper for Victory",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"data visualization",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"lodash": "^4.17.19",
|
|
25
25
|
"prop-types": "^15.8.1",
|
|
26
26
|
"react-fast-compare": "^3.2.0",
|
|
27
|
-
"victory-core": "^36.8.
|
|
27
|
+
"victory-core": "^36.8.3"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"react": ">=16.6.0"
|
package/src/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./victory-shared-events";
|