From e6757e29e787b45de23d2a1db766f4e2de9d4f9c Mon Sep 17 00:00:00 2001 From: Rico Sonntag Date: Sat, 16 Apr 2022 19:14:34 +0200 Subject: [PATCH] Release 2.3.0 --- package.json | 2 +- resources/js/fan-chart.min.js | 2 +- src/Module.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 5f83529..0038803 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webtrees-fan-chart", - "version": "2.2.3-dev", + "version": "2.3.0", "license": "GPL-3.0", "repository": { "type": "git", diff --git a/resources/js/fan-chart.min.js b/resources/js/fan-chart.min.js index 1f0d23b..86788da 100644 --- a/resources/js/fan-chart.min.js +++ b/resources/js/fan-chart.min.js @@ -1 +1 @@ -var t,e;t=this,e=function(t){var e="http://www.w3.org/1999/xhtml",n={svg:"http://www.w3.org/2000/svg",xhtml:e,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function r(t){var e=t+="",r=e.indexOf(":");return r>=0&&"xmlns"!==(e=t.slice(0,r))&&(t=t.slice(r+1)),n.hasOwnProperty(e)?{space:n[e],local:t}:t}function i(t){return function(){var n=this.ownerDocument,r=this.namespaceURI;return r===e&&n.documentElement.namespaceURI===e?n.createElement(t):n.createElementNS(r,t)}}function a(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function o(t){var e=r(t);return(e.local?a:i)(e)}function s(){}function u(t){return null==t?s:function(){return this.querySelector(t)}}function l(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function h(){return[]}function c(t){return null==t?h:function(){return this.querySelectorAll(t)}}function f(t){return function(){return this.matches(t)}}function d(t){return function(e){return e.matches(t)}}var p=Array.prototype.find;function g(){return this.firstElementChild}var m=Array.prototype.filter;function v(){return Array.from(this.children)}function _(t){return new Array(t.length)}function y(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function w(t){return function(){return t}}function x(t,e,n,r,i,a){for(var o,s=0,u=e.length,l=a.length;se?1:t>=e?0:NaN}function k(t){return function(){this.removeAttribute(t)}}function S(t){return function(){this.removeAttributeNS(t.space,t.local)}}function E(t,e){return function(){this.setAttribute(t,e)}}function P(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function T(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function z(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function C(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function R(t){return function(){this.style.removeProperty(t)}}function D(t,e,n){return function(){this.style.setProperty(t,e,n)}}function I(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function O(t,e){return t.style.getPropertyValue(e)||C(t).getComputedStyle(t,null).getPropertyValue(e)}function L(t){return function(){delete this[t]}}function B(t,e){return function(){this[t]=e}}function q(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function X(t){return t.trim().split(/^|\s+/)}function j(t){return t.classList||new G(t)}function G(t){this._node=t,this._names=X(t.getAttribute("class")||"")}function H(t,e){for(var n=j(t),r=-1,i=e.length;++r=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function st(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var ft=[null];function dt(t,e){this._groups=t,this._parents=e}function pt(){return new dt([[document.documentElement]],ft)}function gt(t){return"string"==typeof t?new dt([[document.querySelector(t)]],[document.documentElement]):new dt([[t]],ft)}function mt(t,e){if(t=function(t){let e;for(;e=t.sourceEvent;)t=e;return t}(t),void 0===e&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,[(r=r.matrixTransform(e.getScreenCTM().inverse())).x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}dt.prototype=pt.prototype={constructor:dt,select:function(t){"function"!=typeof t&&(t=u(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i=k&&(k=N+1);!(y=m[k])&&++k=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=N);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a1?this.each((null==e?R:"function"==typeof e?I:D)(t,e,null==n?"":n)):O(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?L:"function"==typeof e?q:B)(t,e)):this.node()[t]},classed:function(t,e){var n=X(t+"");if(arguments.length<2){for(var r=j(this.node()),i=-1,a=n.length;++i{}};function _t(){for(var t,e=0,n=arguments.length,r={};e=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function xt(t,e){for(var n,r=0,i=t.length;r0)for(var n,r,i=new Array(n),a=0;a=0&&e._call.call(void 0,t),e=e._next;--Nt}()}finally{Nt=0,function(){for(var t,e,n=Mt,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Mt=e);At=t,qt(r)}(),Pt=0}}function Bt(){var t=zt.now(),e=t-Et;e>1e3&&(Tt-=e,Et=t)}function qt(t){Nt||(kt&&(kt=clearTimeout(kt)),t-Pt>24?(t<1/0&&(kt=setTimeout(Lt,t-zt.now()-Tt)),St&&(St=clearInterval(St))):(St||(Et=zt.now(),St=setInterval(Bt,1e3)),Nt=1,Ct(Lt)))}function Xt(t,e,n){var r=new It;return e=null==e?0:+e,r.restart((n=>{r.stop(),t(n+e)}),e,n),r}It.prototype=Ot.prototype={constructor:It,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Rt():+n)+(null==e?0:+e),this._next||At===this||(At?At._next=this:Mt=this,At=this),this._call=t,this._time=n,qt()},stop:function(){this._call&&(this._call=null,this._time=1/0,qt())}};var jt=_t("start","end","cancel","interrupt"),Gt=[];function Ht(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(t){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=t&&o(t-n.delay)}function o(a){var l,h,c,f;if(1!==n.state)return u();for(l in i)if((f=i[l]).name===n.name){if(3===f.state)return Xt(o);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[l]):+l0)throw new Error("too late; already scheduled");return n}function Vt(t,e){var n=Ft(t,e);if(n.state>3)throw new Error("too late; already running");return n}function Ft(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Ut(t,e){var n,r,i,a=t.__transition,o=!0;if(a){for(i in e=null==e?null:e+"",a)(n=a[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[i]):o=!1;o&&delete t.__transition}}function $t(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Wt(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Kt(){}var Qt=.7,Zt=1/Qt,Jt="\\s*([+-]?\\d+)\\s*",te="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",ee="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ne=/^#([0-9a-f]{3,8})$/,re=new RegExp("^rgb\\("+[Jt,Jt,Jt]+"\\)$"),ie=new RegExp("^rgb\\("+[ee,ee,ee]+"\\)$"),ae=new RegExp("^rgba\\("+[Jt,Jt,Jt,te]+"\\)$"),oe=new RegExp("^rgba\\("+[ee,ee,ee,te]+"\\)$"),se=new RegExp("^hsl\\("+[te,ee,ee]+"\\)$"),ue=new RegExp("^hsla\\("+[te,ee,ee,te]+"\\)$"),le={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function he(){return this.rgb().formatHex()}function ce(){return this.rgb().formatRgb()}function fe(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=ne.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?de(e):3===n?new ve(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?pe(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?pe(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=re.exec(t))?new ve(e[1],e[2],e[3],1):(e=ie.exec(t))?new ve(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=ae.exec(t))?pe(e[1],e[2],e[3],e[4]):(e=oe.exec(t))?pe(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=se.exec(t))?xe(e[1],e[2]/100,e[3]/100,1):(e=ue.exec(t))?xe(e[1],e[2]/100,e[3]/100,e[4]):le.hasOwnProperty(t)?de(le[t]):"transparent"===t?new ve(NaN,NaN,NaN,0):null}function de(t){return new ve(t>>16&255,t>>8&255,255&t,1)}function pe(t,e,n,r){return r<=0&&(t=e=n=NaN),new ve(t,e,n,r)}function ge(t){return t instanceof Kt||(t=fe(t)),t?new ve((t=t.rgb()).r,t.g,t.b,t.opacity):new ve}function me(t,e,n,r){return 1===arguments.length?ge(t):new ve(t,e,n,null==r?1:r)}function ve(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function _e(){return"#"+we(this.r)+we(this.g)+we(this.b)}function ye(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function we(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function xe(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Me(t,e,n,r)}function be(t){if(t instanceof Me)return new Me(t.h,t.s,t.l,t.opacity);if(t instanceof Kt||(t=fe(t)),!t)return new Me;if(t instanceof Me)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,u=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n0&&u<1?0:o,new Me(o,s,u,t.opacity)}function Me(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Ae(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}$t(Kt,fe,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:he,formatHex:he,formatHsl:function(){return be(this).formatHsl()},formatRgb:ce,toString:ce}),$t(ve,me,Wt(Kt,{brighter:function(t){return t=null==t?Zt:Math.pow(Zt,t),new ve(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?Qt:Math.pow(Qt,t),new ve(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:_e,formatHex:_e,formatRgb:ye,toString:ye})),$t(Me,(function(t,e,n,r){return 1===arguments.length?be(t):new Me(t,e,n,null==r?1:r)}),Wt(Kt,{brighter:function(t){return t=null==t?Zt:Math.pow(Zt,t),new Me(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?Qt:Math.pow(Qt,t),new Me(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new ve(Ae(t>=240?t-240:t+120,i,r),Ae(t,i,r),Ae(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var Ne=t=>()=>t;function ke(t){return 1==(t=+t)?Se:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Ne(isNaN(e)?n:e)}}function Se(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):Ne(isNaN(t)?e:t)}var Ee=function t(e){var n=ke(e);function r(t,e){var r=n((t=me(t)).r,(e=me(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=Se(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function Pe(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(a){for(n=0;na&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,u.push({i:o,x:Ce(n,r)})),a=Ie.lastIndex;return a180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Ce(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,s,u),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Ce(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,s,u),function(t,e,n,r,a,o){if(t!==n||e!==r){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:Ce(t,n)},{i:s-2,x:Ce(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,u),a=o=null,function(t){for(var e,n=-1,r=u.length;++n=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?Yt:Vt;return function(){var o=a(this,t),s=o.on;s!==r&&(i=(r=s).copy()).on(e,n),o.on=i}}var gn=pt.prototype.constructor;function mn(t){return function(){this.style.removeProperty(t)}}function vn(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function _n(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&vn(t,a,n)),r}return a._value=e,a}function yn(t){return function(e){this.textContent=t.call(this,e)}}function wn(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&yn(r)),e}return r._value=t,r}var xn=0;function bn(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Mn(t){return pt().transition(t)}function An(){return++xn}var Nn=pt.prototype;bn.prototype=Mn.prototype={constructor:bn,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=u(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;oe?1:t>=e?0:NaN}function Pn(t){let e=t,n=t,r=t;function i(t,e,i=0,a=t.length){if(i>>1;r(t[n],e)<0?i=n+1:a=n}while(it(e)-n,n=En,r=(e,n)=>En(t(e),n)),{left:i,center:function(t,n,r=0,a=t.length){const o=i(t,n,r,a-1);return o>r&&e(t[o-1],n)>-e(t[o],n)?o-1:o},right:function(t,e,i=0,a=t.length){if(i>>1;r(t[n],e)<=0?i=n+1:a=n}while(i=0?(a>=Cn?10:a>=Rn?5:a>=Dn?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=Cn?10:a>=Rn?5:a>=Dn?2:1)}function On(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function Ln(t){return+t}var Bn=[0,1];function qn(t){return t}function Xn(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:(n=isNaN(e)?NaN:.5,function(){return n});var n}function jn(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return ie&&(n=t,t=e,e=n),l=function(n){return Math.max(t,Math.min(e,n))}),r=u>2?Gn:jn,i=a=null,c}function c(e){return null==e||isNaN(e=+e)?n:(i||(i=r(o.map(t),s,u)))(t(l(e)))}return c.invert=function(n){return l(e((a||(a=r(s,o.map(t),Ce)))(n)))},c.domain=function(t){return arguments.length?(o=Array.from(t,Ln),h()):o.slice()},c.range=function(t){return arguments.length?(s=Array.from(t),h()):s.slice()},c.rangeRound=function(t){return s=Array.from(t),u=Be,h()},c.clamp=function(t){return arguments.length?(l=!!t||qn,h()):l!==qn},c.interpolate=function(t){return arguments.length?(u=t,h()):u},c.unknown=function(t){return arguments.length?(n=t,c):n},function(n,r){return t=n,e=r,h()}}function Vn(){return Yn()(qn,qn)}function Fn(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Un(t){return(t=Fn(Math.abs(t)))?t[1]:NaN}var $n,Wn=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Kn(t){if(!(e=Wn.exec(t)))throw new Error("invalid format: "+t);var e;return new Qn({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function Qn(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Zn(t,e){var n=Fn(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}Kn.prototype=Qn.prototype,Qn.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Jn={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Zn(100*t,e),r:Zn,s:function(t,e){var n=Fn(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-($n=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+Fn(t,Math.max(0,e+a-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function tr(t){return t}var er,nr,rr,ir=Array.prototype.map,ar=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function or(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?tr:(e=ir.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,a=[],o=0,s=e[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),a.push(t.substring(i-=s,i+s)),!((u+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?tr:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(ir.call(t.numerals,String)),u=void 0===t.percent?"%":t.percent+"",l=void 0===t.minus?"−":t.minus+"",h=void 0===t.nan?"NaN":t.nan+"";function c(t){var e=(t=Kn(t)).fill,n=t.align,c=t.sign,f=t.symbol,d=t.zero,p=t.width,g=t.comma,m=t.precision,v=t.trim,_=t.type;"n"===_?(g=!0,_="g"):Jn[_]||(void 0===m&&(m=12),v=!0,_="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var y="$"===f?i:"#"===f&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",w="$"===f?a:/[%p]/.test(_)?u:"",x=Jn[_],b=/[defgprs%]/.test(_);function M(t){var i,a,u,f=y,M=w;if("c"===_)M=x(t)+M,t="";else{var A=(t=+t)<0||1/t<0;if(t=isNaN(t)?h:x(Math.abs(t),m),v&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),A&&0==+t&&"+"!==c&&(A=!1),f=(A?"("===c?c:l:"-"===c||"("===c?"":c)+f,M=("s"===_?ar[8+$n/3]:"")+M+(A&&"("===c?")":""),b)for(i=-1,a=t.length;++i(u=t.charCodeAt(i))||u>57){M=(46===u?o+t.slice(i+1):t.slice(i))+M,t=t.slice(0,i);break}}g&&!d&&(t=r(t,1/0));var N=f.length+t.length+M.length,k=N>1)+f+t+M+k.slice(N);break;default:t=k+f+t+M}return s(t)}return m=void 0===m?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),M.toString=function(){return t+""},M}return{format:c,formatPrefix:function(t,e){var n=c(((t=Kn(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Un(e)/3))),i=Math.pow(10,-r),a=ar[8+r/3];return function(t){return n(i*t)+a}}}}function sr(t,e,n,r){var i,a=function(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=Cn?i*=10:a>=Rn?i*=5:a>=Dn&&(i*=2),e0)return[t];if((r=e0){let n=Math.round(t/o),r=Math.round(e/o);for(n*oe&&--r,a=new Array(i=r-n+1);++se&&--r,a=new Array(i=r-n+1);++s0;){if((i=In(u,l,n))===r)return a[o]=u,a[s]=l,e(a);if(i>0)u=Math.floor(u/i)*i,l=Math.ceil(l/i)*i;else{if(!(i<0))break;u=Math.ceil(u*i)/i,l=Math.floor(l*i)/i}r=i}return t},t}function lr(){var t=Vn();return t.copy=function(){return Hn(t,lr())},On.apply(t,arguments),ur(t)}er=or({thousands:",",grouping:[3],currency:["$",""]}),nr=er.format,rr=er.formatPrefix;const hr={capture:!0,passive:!1};function cr(t){t.preventDefault(),t.stopImmediatePropagation()}function fr(t){var e=t.document.documentElement,n=gt(t).on("dragstart.drag",cr,hr);"onselectstart"in e?n.on("selectstart.drag",cr,hr):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function dr(t,e){var n=t.document.documentElement,r=gt(t).on("dragstart.drag",null);e&&(r.on("click.drag",cr,hr),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var pr=t=>()=>t;function gr(t,{sourceEvent:e,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function mr(t,e,n){this.k=t,this.x=e,this.y=n}mr.prototype={constructor:mr,scale:function(t){return 1===t?this:new mr(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new mr(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var vr=new mr(1,0,0);function _r(t){for(;!t.__zoom;)if(!(t=t.parentNode))return vr;return t.__zoom}function yr(t){t.stopImmediatePropagation()}function wr(t){t.preventDefault(),t.stopImmediatePropagation()}function xr(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function br(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function Mr(){return this.__zoom||vr}function Ar(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function Nr(){return navigator.maxTouchPoints||"ontouchstart"in this}function kr(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],a=t.invertY(e[0][1])-n[0][1],o=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function Sr(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function Er(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=Tr)):void 0===e&&(e=Pr);for(var n,r,i,a,o,s=new Rr(t),u=[s];n=u.pop();)if((i=e(n.data))&&(o=(i=Array.from(i)).length))for(n.children=i,a=o-1;a>=0;--a)u.push(r=i[a]=new Rr(i[a])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Cr)}function Pr(t){return t.children}function Tr(t){return Array.isArray(t)?t[1]:null}function zr(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function Cr(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function Rr(t){this.data=t,this.depth=this.height=0,this.parent=null}function Dr(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function Ir(){var t=1,e=1,n=0,r=!1;function i(i){var a=i.height+1;return i.x0=i.y0=n,i.x1=t,i.y1=e/a,i.eachBefore(function(t,e){return function(r){r.children&&function(t,e,n,r,i){for(var a,o=t.children,s=-1,u=o.length,l=t.value&&(r-e)/t.value;++s=0;--r)a.push(n[r]);return this},find:function(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return Er(this).eachBefore(zr)},[Symbol.iterator]:function*(){var t,e,n,r,i=this,a=[i];do{for(t=a.reverse(),a=[];i=t.pop();)if(yield i,e=i.children)for(n=0,r=e.length;nBr)if(Math.abs(h*s-u*l)>Br&&i){var f=n-a,d=r-o,p=s*s+u*u,g=f*f+d*d,m=Math.sqrt(p),v=Math.sqrt(c),_=i*Math.tan((Or-Math.acos((p+c-g)/(2*m*v)))/2),y=_/v,w=_/m;Math.abs(y-1)>Br&&(this._+="L"+(t+y*l)+","+(e+y*h)),this._+="A"+i+","+i+",0,0,"+ +(h*f>l*d)+","+(this._x1=t+w*s)+","+(this._y1=e+w*u)}else this._+="L"+(this._x1=t)+","+(this._y1=e)},arc:function(t,e,n,r,i,a){t=+t,e=+e,a=!!a;var o=(n=+n)*Math.cos(r),s=n*Math.sin(r),u=t+o,l=e+s,h=1^a,c=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+u+","+l:(Math.abs(this._x1-u)>Br||Math.abs(this._y1-l)>Br)&&(this._+="L"+u+","+l),n&&(c<0&&(c=c%Lr+Lr),c>qr?this._+="A"+n+","+n+",0,1,"+h+","+(t-o)+","+(e-s)+"A"+n+","+n+",0,1,"+h+","+(this._x1=u)+","+(this._y1=l):c>Br&&(this._+="A"+n+","+n+",0,"+ +(c>=Or)+","+h+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};const Hr=Math.abs,Yr=Math.atan2,Vr=Math.cos,Fr=Math.max,Ur=Math.min,$r=Math.sin,Wr=Math.sqrt,Kr=1e-12,Qr=Math.PI,Zr=Qr/2,Jr=2*Qr;function ti(t){return t>1?0:t<-1?Qr:Math.acos(t)}function ei(t){return t>=1?Zr:t<=-1?-Zr:Math.asin(t)}function ni(t){return t.innerRadius}function ri(t){return t.outerRadius}function ii(t){return t.startAngle}function ai(t){return t.endAngle}function oi(t){return t&&t.padAngle}function si(t,e,n,r,i,a,o,s){var u=n-t,l=r-e,h=o-i,c=s-a,f=c*u-h*l;if(!(f*fT*T+z*z&&(A=k,N=S),{cx:A,cy:N,x01:-h,y01:-c,x11:A*(i/x-1),y11:N*(i/x-1)}}function li(){var t=ni,e=ri,n=Gr(0),r=null,i=ii,a=ai,o=oi,s=null;function u(){var u,l,h=+t.apply(this,arguments),c=+e.apply(this,arguments),f=i.apply(this,arguments)-Zr,d=a.apply(this,arguments)-Zr,p=Hr(d-f),g=d>f;if(s||(s=u=jr()),cKr)if(p>Jr-Kr)s.moveTo(c*Vr(f),c*$r(f)),s.arc(0,0,c,f,d,!g),h>Kr&&(s.moveTo(h*Vr(d),h*$r(d)),s.arc(0,0,h,d,f,g));else{var m,v,_=f,y=d,w=f,x=d,b=p,M=p,A=o.apply(this,arguments)/2,N=A>Kr&&(r?+r.apply(this,arguments):Wr(h*h+c*c)),k=Ur(Hr(c-h)/2,+n.apply(this,arguments)),S=k,E=k;if(N>Kr){var P=ei(N/h*$r(A)),T=ei(N/c*$r(A));(b-=2*P)>Kr?(w+=P*=g?1:-1,x-=P):(b=0,w=x=(f+d)/2),(M-=2*T)>Kr?(_+=T*=g?1:-1,y-=T):(M=0,_=y=(f+d)/2)}var z=c*Vr(_),C=c*$r(_),R=h*Vr(x),D=h*$r(x);if(k>Kr){var I,O=c*Vr(y),L=c*$r(y),B=h*Vr(w),q=h*$r(w);if(pKr?E>Kr?(m=ui(B,q,z,C,c,E,g),v=ui(O,L,R,D,c,E,g),s.moveTo(m.cx+m.x01,m.cy+m.y01),EKr&&b>Kr?S>Kr?(m=ui(R,D,O,L,h,-S,g),v=ui(z,C,B,q,h,-S,g),s.lineTo(m.cx+m.x01,m.cy+m.y01),S{let t=1;return function(e=!1){return e&&(t=0),t++}})()}get generations(){return this._generations}set generations(t){this._generations=t}get fanDegree(){return this._fanDegree}set fanDegree(t){this._fanDegree=t}get fontScale(){return this._fontScale}set fontScale(t){this._fontScale=t}get hideEmptySegments(){return this._hideEmptySegments}set hideEmptySegments(t){this._hideEmptySegments=t}get showColorGradients(){return this._showColorGradients}set showColorGradients(t){this._showColorGradients=t}get showParentMarriageDates(){return this._showParentMarriageDates}set showParentMarriageDates(t){this._showParentMarriageDates=t}get showImages(){return this._showImages}get showSilhouettes(){return this._showSilhouettes}get numberOfInnerCircles(){return this._numberOfInnerCircles}set numberOfInnerCircles(t){this._numberOfInnerCircles=t}get fontSize(){return this._fontSize}}const di="M",pi="F";class gi{constructor(t){this._configuration=t,this._nodes=null}init(t){let e=Er(t,(t=>(!t.children&&t.generation{t.data.id=this._configuration.id()})),this._configuration.id(!0)}get nodes(){return this._nodes}createEmptyNode(t,e){return{id:0,xref:"",url:"",updateUrl:"",generation:t,name:"",firstNames:[],lastNames:[],preferredName:"",alternativeNames:[],isAltRtl:!1,sex:e,timespan:"",color:this._configuration.defaultColor,colors:[[],[]]}}}class mi{constructor(t){this._element=t.append("div").attr("class","overlay").style("opacity",1e-6)}show(t,e=0,n=null){this._element.select("p").remove(),this._element.append("p").attr("class","tooltip").text(t),this._element.transition().duration(e).style("opacity",1).on("end",(()=>{"function"==typeof n&&n()}))}hide(t=0,e=0){this._element.transition().delay(t).duration(e).style("opacity",1e-6)}get(){return this._element}}class vi{constructor(t){this._element=t.append("defs")}get(){return this._element}}class _i{constructor(t){this._zoom=null,this._parent=t,this.init()}init(){this._zoom=function(){var t,e,n,r=xr,i=br,a=kr,o=Ar,s=Nr,u=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],h=250,c=Ue,f=_t("start","zoom","end"),d=500,p=0,g=10;function m(t){t.property("__zoom",Mr).on("wheel.zoom",M,{passive:!1}).on("mousedown.zoom",A).on("dblclick.zoom",N).filter(s).on("touchstart.zoom",k).on("touchmove.zoom",S).on("touchend.zoom touchcancel.zoom",E).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function v(t,e){return(e=Math.max(u[0],Math.min(u[1],e)))===t.k?t:new mr(e,t.x,t.y)}function _(t,e,n){var r=e[0]-n[0]*t.k,i=e[1]-n[1]*t.k;return r===t.x&&i===t.y?t:new mr(t.k,r,i)}function y(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function w(t,e,n,r){t.on("start.zoom",(function(){x(this,arguments).event(r).start()})).on("interrupt.zoom end.zoom",(function(){x(this,arguments).event(r).end()})).tween("zoom",(function(){var t=this,a=arguments,o=x(t,a).event(r),s=i.apply(t,a),u=null==n?y(s):"function"==typeof n?n.apply(t,a):n,l=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),h=t.__zoom,f="function"==typeof e?e.apply(t,a):e,d=c(h.invert(u).concat(l/h.k),f.invert(u).concat(l/f.k));return function(t){if(1===t)t=f;else{var e=d(t),n=l/e[2];t=new mr(n,u[0]-e[0]*n,u[1]-e[1]*n)}o.zoom(null,t)}}))}function x(t,e,n){return!n&&t.__zooming||new b(t,e)}function b(t,e){this.that=t,this.args=e,this.active=0,this.sourceEvent=null,this.extent=i.apply(t,e),this.taps=0}function M(t,...e){if(r.apply(this,arguments)){var n=x(this,e).event(t),i=this.__zoom,s=Math.max(u[0],Math.min(u[1],i.k*Math.pow(2,o.apply(this,arguments)))),h=mt(t);if(n.wheel)n.mouse[0][0]===h[0]&&n.mouse[0][1]===h[1]||(n.mouse[1]=i.invert(n.mouse[0]=h)),clearTimeout(n.wheel);else{if(i.k===s)return;n.mouse=[h,i.invert(h)],Ut(this),n.start()}wr(t),n.wheel=setTimeout(c,150),n.zoom("mouse",a(_(v(i,s),n.mouse[0],n.mouse[1]),n.extent,l))}function c(){n.wheel=null,n.end()}}function A(t,...e){if(!n&&r.apply(this,arguments)){var i=t.currentTarget,o=x(this,e,!0).event(t),s=gt(t.view).on("mousemove.zoom",f,!0).on("mouseup.zoom",d,!0),u=mt(t,i),h=t.clientX,c=t.clientY;fr(t.view),yr(t),o.mouse=[u,this.__zoom.invert(u)],Ut(this),o.start()}function f(t){if(wr(t),!o.moved){var e=t.clientX-h,n=t.clientY-c;o.moved=e*e+n*n>p}o.event(t).zoom("mouse",a(_(o.that.__zoom,o.mouse[0]=mt(t,i),o.mouse[1]),o.extent,l))}function d(t){s.on("mousemove.zoom mouseup.zoom",null),dr(t.view,o.moved),wr(t),o.event(t).end()}}function N(t,...e){if(r.apply(this,arguments)){var n=this.__zoom,o=mt(t.changedTouches?t.changedTouches[0]:t,this),s=n.invert(o),u=n.k*(t.shiftKey?.5:2),c=a(_(v(n,u),o,s),i.apply(this,e),l);wr(t),h>0?gt(this).transition().duration(h).call(w,c,o,t):gt(this).call(m.transform,c,o,t)}}function k(n,...i){if(r.apply(this,arguments)){var a,o,s,u,l=n.touches,h=l.length,c=x(this,i,n.changedTouches.length===h).event(n);for(yr(n),o=0;o{this._parent.attr("transform",t.transform)})),this._zoom.wheelDelta((t=>-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002))),this._zoom.filter((t=>{if("wheel"===t.type){if(!t.ctrlKey)return!1;var e=_r(this);if(e.k){if(e.k<=.5&&t.deltaY>0)return t.preventDefault(),!1;if(e.k>=5&&t.deltaY<0)return t.preventDefault(),!1}return!0}return t.button||"touchstart"!==t.type?!(t.ctrlKey&&"wheel"!==t.type||t.button):2===t.touches.length}))}get(){return this._zoom}}class yi{constructor(t){this._element=t,this._element.append("filter").attr("id","drop-shadow").append("feDropShadow").attr("stdDeviation","7 7").attr("dx","0").attr("dy","0").attr("flood-opacity","0.3").attr("flood-color","rgb(0,0,0)")}get(){return this._element}}class wi{triggerDownload(t,e){let n=new MouseEvent("click",{view:window,bubbles:!1,cancelable:!0}),r=document.createElement("a");r.setAttribute("download",e),r.setAttribute("href",t),r.setAttribute("target","_blank"),r.dispatchEvent(n)}}class xi extends wi{copyStylesInline(t,e){let n=["svg","g","text","textPath"];for(let r=0;r{let i=(new XMLSerializer).serializeToString(t),a=window.URL||window.webkitURL||window,o=new Blob([i],{type:"image/svg+xml;charset=utf-8"}),s=a.createObjectURL(o),u=new Image;u.onload=()=>{let t=this.createCanvas(e,n),i=t.getContext("2d");i.fillStyle="rgb(255,255,255)",i.fillRect(0,0,t.width,t.height),i.drawImage(u,0,0),a.revokeObjectURL(s);let o=t.toDataURL("image/png").replace("image/png","image/octet-stream");r(o)},u.src=s}))}cloneSvg(t){return new Promise((e=>{e(t.cloneNode(!0))}))}svgToImage(t,e){const n=[3508,2480];this.cloneSvg(t.get().node()).then((r=>{this.copyStylesInline(t.get().node(),r);const i=this.calculateViewBox(t.get().node()),a=Math.max(n[0],i[2]),o=Math.max(n[1],i[3]);r.setAttribute("width",a),r.setAttribute("height",o),r.setAttribute("viewBox",i),this.convertToDataUrl(r,a,o).then((t=>this.triggerDownload(t,e))).catch((()=>{console.log("Failed to save chart as PNG image")}))}))}}class bi extends wi{copyStylesInline(t,e){return new Promise((n=>{(function(t,e){return fetch(t,e).then(hi)})(t).then((t=>{t=t.replace(/#webtrees-fan-chart-container /g,"");let r=document.createElementNS("http://www.w3.org/2000/svg","style");r.appendChild(document.createTextNode(t)),e.prepend(r),n(e)}))}))}convertToObjectUrl(t){return new Promise((e=>{let n=(new XMLSerializer).serializeToString(t),r=window.URL||window.webkitURL||window,i=new Blob([n],{type:"image/svg+xml;charset=utf-8"}),a=r.createObjectURL(i),o=new Image;o.onload=()=>{e(a)},o.src=a}))}cloneSvg(t){return new Promise((e=>{e(t.cloneNode(!0))}))}svgToImage(t,e,n){this.cloneSvg(t.get().node()).then((t=>this.copyStylesInline(e,t))).then((t=>this.convertToObjectUrl(t))).then((t=>this.triggerDownload(t,n))).catch((()=>{console.log("Failed to save chart as SVG image")}))}}class Mi{constructor(){this._exportClass=null}setExportClass(t){switch(t){case"png":this._exportClass=xi;break;case"svg":this._exportClass=bi}}createExport(t){switch(this.setExportClass(t),t){case"png":case"svg":return new this._exportClass}}}class Ai{constructor(t,e){this._element=t.append("svg"),this._defs=new vi(this._element),this._visual=null,this._zoom=null,this._div=null,this._configuration=e,this.init()}init(){this._element.attr("width","100%").attr("height","100%").attr("text-rendering","geometricPrecision").attr("text-anchor","middle").attr("xmlns:xlink","https://www.w3.org/1999/xlink"),new yi(this._defs.get())}initEvents(t){this._element.on("contextmenu",(t=>t.preventDefault())).on("wheel",(e=>{e.ctrlKey||t.show(this._configuration.labels.zoom,300,(()=>{t.hide(700,800)}))})).on("touchend",(e=>{e.touches.length<2&&t.hide(0,800)})).on("touchmove",(e=>{e.touches.length>=2?t.hide():t.show(this._configuration.labels.move)})).on("click",(t=>this.doStopPropagation(t)),!0),this._configuration.rtl&&this._element.classed("rtl",!0);const e=gt("div.tooltip");e.empty()?this._div=gt("body").append("div").attr("class","tooltip").style("opacity",0):this._div=e.style("opacity",0),this._visual=this._element.append("g"),this._visual.append("g").attr("class","personGroup"),this._zoom=new _i(this._visual),this._element.call(this._zoom.get())}doStopPropagation(t){t.defaultPrevented&&t.stopPropagation()}export(t){return(new Mi).createExport(t)}get defs(){return this._defs}get zoom(){return this._zoom}get visual(){return this._visual}get(){return this._element}get div(){return this._div}}const Ni=Math.PI/180,ki=180/Math.PI,Si=2*Math.PI;class Ei{constructor(t){this._configuration=t}get startPi(){return 90===this._configuration.fanDegree?0:-this._configuration.fanDegree/2*Ni}get endPi(){return 90===this._configuration.fanDegree?this._configuration.fanDegree*Ni:this._configuration.fanDegree/2*Ni}get scale(){return lr().range([this.startPi,this.endPi])}innerRadius(t){return 0===t?0:t<=this._configuration.numberOfInnerCircles?(t-1)*this._configuration.innerArcHeight+this._configuration.centerCircleRadius+this._configuration.circlePadding:this._configuration.numberOfInnerCircles*this._configuration.innerArcHeight+(t-this._configuration.numberOfInnerCircles-1)*this._configuration.outerArcHeight+this._configuration.centerCircleRadius+this._configuration.circlePadding}outerRadius(t){return 0===t?this._configuration.centerCircleRadius:t<=this._configuration.numberOfInnerCircles?(t-1)*this._configuration.innerArcHeight+this._configuration.centerCircleRadius+this._configuration.innerArcHeight:this._configuration.numberOfInnerCircles*this._configuration.innerArcHeight+(t-this._configuration.numberOfInnerCircles-1)*this._configuration.outerArcHeight+this._configuration.centerCircleRadius+this._configuration.outerArcHeight}centerRadius(t){return(this.innerRadius(t)+this.outerRadius(t))/2}relativeRadius(t,e){const n=this.outerRadius(t);return n-(100-e)*(n-this.innerRadius(t))/100}calcAngle(t){return Math.max(this.startPi,Math.min(this.endPi,this.scale(t)))}startAngle(t,e){return 0===t?0:this.calcAngle(e)}endAngle(t,e){return 0===t?Si:this.calcAngle(e)}arcLength(t,e){return(this.endAngle(t.depth,t.x1)-this.startAngle(t.depth,t.x0))*this.relativeRadius(t.depth,e)}}class Pi{constructor(t,e){this._svg=t,this._configuration=e,this._geometry=new Ei(this._configuration)}createLabels(t,e){if(this.isInnerLabel(e)){let n=gt(t.node().parentNode).attr("id");if(e.data.firstNames.length){let r=this.createPathDefinition(n,0,e),i=t.append("text").append("textPath").attr("xlink:href","#"+r).attr("startOffset","25%");this.addFirstNames(i,e),this.truncateNames(i,e,0)}if(e.data.lastNames.length){let r=this.createPathDefinition(n,1,e),i=t.append("text").append("textPath").attr("xlink:href","#"+r).attr("startOffset","25%");this.addLastNames(i,e),this.truncateNames(i,e,1)}if(!e.data.firstNames.length&&!e.data.lastNames.length){let r=this.createPathDefinition(n,0,e),i=t.append("text").append("textPath").attr("xlink:href","#"+r).attr("startOffset","25%");i.append("tspan").text(e.data.name),this.truncateNames(i,e,0)}if(e.data.alternativeNames.length){let r=this.createPathDefinition(n,2,e),i=t.append("text").append("textPath").attr("xlink:href","#"+r).attr("startOffset","25%").attr("class","alternativeName").classed("rtl",e.data.isAltRtl);this.addAlternativeNames(i,e),this.truncateNames(i,e,2)}let r=this.createPathDefinition(n,3,e),i=t.append("text").append("textPath").attr("xlink:href","#"+r).attr("startOffset","25%").attr("class","date");i.append("title").text(e.data.timespan);let a=i.append("tspan").text(e.data.timespan),o=this.getAvailableWidth(e,3);this.getTextLength(i)>o&&(i.selectAll("tspan").each(this.truncateDate(i,o)),a.text(a.text()+"…"))}else{if(e.depth>=7){let n=t.append("text").attr("dy","2px");e.data.firstNames.length&&this.addFirstNames(n,e),e.data.lastNames.length&&this.addLastNames(n,e,.25),e.data.firstNames.length||e.data.lastNames.length||n.append("tspan").text(e.data.name),this.truncateNames(n,e,0)}else{if(e.data.firstNames.length){let n=t.append("text").attr("dy","2px");this.addFirstNames(n,e),this.truncateNames(n,e,0)}if(e.data.lastNames.length){let n=t.append("text").attr("dy","2px");this.addLastNames(n,e),this.truncateNames(n,e,1)}if(!e.data.firstNames.length&&!e.data.lastNames.length){let n=t.append("text").attr("dy","2px");n.append("tspan").text(e.data.name),this.truncateNames(n,e,0)}if(e.depth<6){let n=t.append("text").attr("class","date").attr("dy","2px");n.append("title").text(e.data.timespan);let r=n.append("tspan").text(e.data.timespan),i=this.getAvailableWidth(e,2);this.getTextLength(n)>i&&(n.selectAll("tspan").each(this.truncateDate(n,i)),r.text(r.text()+"…"))}}this.transformOuterText(t,e)}if(this._configuration.showParentMarriageDates&&e.children&&e.depth<5){let n=gt(t.node().parentNode).attr("id"),r=this.createPathDefinition(n,4,e),i=t.append("text").append("textPath").attr("xlink:href","#"+r).attr("startOffset","25%").attr("class","marriage-date");this.addMarriageDate(i,e)}}addFirstNames(t,e){let n=0;for(let r of e.data.firstNames){let i=t.append("tspan").text(r);r===e.data.preferredName&&i.attr("class","preferred"),0!==n&&i.attr("dx","0.25em"),++n}}addLastNames(t,e,n=0){let r=0;for(let i of e.data.lastNames){let e=t.append("tspan").attr("class","lastName").text(i);0!==r&&e.attr("dx","0.25em"),0!==n&&e.attr("dx",n+"em"),++r}}addAlternativeNames(t,e,n=0){let r=0;for(let n of e.data.alternativeNames){let i=t.append("tspan").text(n);0!==r&&i.attr("dx",(e.data.isAltRtl?-.25:.25)+"em"),++r}}addMarriageDate(t,e){e.data.parentMarriage&&t.append("tspan").text("⚭ "+e.data.parentMarriage)}truncateNames(t,e,n){let r=this.getAvailableWidth(e,n);t.selectAll("tspan:not(.preferred):not(.lastName)").nodes().reverse().forEach((e=>{gt(e).each(this.truncateText(t,r))})),t.selectAll("tspan.preferred").each(this.truncateText(t,r)),t.selectAll("tspan.lastName").each(this.truncateText(t,r))}truncateText(t,e){let n=this;return function(){let r=n.getTextLength(t),i=gt(this),a=i.text().split(/\s+/);for(let o=a.length-1;o>=0;--o)r>e&&(a[o]=a[o].slice(0,1)+".",i.text(a.join(" ")),r=n.getTextLength(t))}}truncateDate(t,e){let n=this;return function(){let r=n.getTextLength(t),i=gt(this),a=i.text();for(;r>e&&a.length>1;)a=a.slice(0,-1).trim(),i.text(a),r=n.getTextLength(t);"."===a[a.length-1]&&i.text(a.slice(0,-1).trim())}}getTextLength(t){let e=0;return t.selectAll("tspan").each((function(){e+=this.getComputedTextLength()})),e}isInnerLabel(t){return t.depth>0&&t.depth<=this._configuration.numberOfInnerCircles}createPathDefinition(t,e,n){let r="path-"+t+"-"+e;if(this._svg.defs.get().select("path#"+r).node())return r;let i=this.isPositionFlipped(n.depth,n.x0,n.x1),a=this._geometry.startAngle(n.depth,n.x0),o=this._geometry.endAngle(n.depth,n.x1),s=this._geometry.relativeRadius(n.depth,this.getTextOffset(i,e));this._configuration.showParentMarriageDates&&4===e&&n.depth<1&&(a=this._geometry.calcAngle(n.x0),o=this._geometry.calcAngle(n.x1));let u=li().startAngle(i?o:a).endAngle(i?a:o).innerRadius(s).outerRadius(s);return u.padAngle(this._configuration.padAngle).padRadius(this._configuration.padRadius).cornerRadius(this._configuration.cornerRadius),this._svg.defs.get().append("path").attr("id",r).attr("d",u),r}isPositionFlipped(t,e,n){if(360!==this._configuration.fanDegree||t<=1)return!1;const r=this._geometry.startAngle(t,e),i=this._geometry.endAngle(t,n);return r>=90*Ni&&i<=180*Ni||r>=-180*Ni&&i<=-90*Ni}getTextOffset(t,e){return t?[23,42,61,84,125][e]:[73,54,35,12,120][e]}getAvailableWidth(t,e){if(t.depth>this._configuration.numberOfInnerCircles)return this._configuration.outerArcHeight-2*this._configuration.textPadding-this._configuration.circlePadding;let n=2*this._configuration.centerCircleRadius-.15*this._configuration.centerCircleRadius;if(t.depth>=1){let r=this.isPositionFlipped(t.depth,t.x0,t.x1);n=this._geometry.arcLength(t,this.getTextOffset(r,e))}return n-2*this._configuration.textPadding-this._configuration.padDistance/2}transformOuterText(t,e){let n=this,r=t.selectAll("text"),i=r.size(),a=1;switch(e.depth){case 0:case 5:a=1.5;break;case 1:a=6.5;break;case 2:a=3.5;break;case 3:a=2.2;break;case 4:a=1.9;break;case 6:a=.5}let o=lr().domain([0,i-1]).range([-a,a]);r.each((function(t,r){const i=o(r)*n._configuration.fontScale/100;0===e.depth?gt(this).attr("dy",14*i+7+"px"):gt(this).attr("transform",(function(){let t=e.x1-e.x0,r=n._geometry.scale(e.x0+t/2)*ki,a=r-i*(r>0?-1:1),o=n._geometry.centerRadius(e.depth)-n._configuration.colorArcWidth/2;return r>0?a-=90:(o=-o,a+=90),"rotate("+a+") translate("+o+")"}))}))}}class Ti{constructor(t,e,n,r){this._svg=t,this._configuration=e,this._geometry=new Ei(this._configuration),this.init(n,r)}init(t,e){if(t.classed("new")&&this._configuration.hideEmptySegments?this.addArcToPerson(t,e):t.classed("new")||t.classed("update")||t.classed("remove")||""===e.data.xref&&this._configuration.hideEmptySegments||this.addArcToPerson(t,e),""!==e.data.xref){this.addTitleToPerson(t,e.data.name);let n=new Pi(this._svg,this._configuration),r=this.addLabelToPerson(t,e);n.createLabels(r,e),this.addColorGroup(t,e),t.on("contextmenu",((t,e)=>{this._svg.div.property("active")?(this._svg.div.transition().duration(200).style("opacity",0),this._svg.div.property("active",!1),t.preventDefault()):(this._svg.div.property("active",!0),this.setTooltipHtml(e),t.preventDefault())})).on("mouseenter",((t,e)=>{""===e.data.xref&&this._svg.div.style("opacity",0),this.setTooltipHtml(e)})).on("mouseleave",((t,e)=>{""===e.data.xref&&this._svg.div.style("opacity",0)})).on("mousemove",((t,e)=>{this._svg.div.style("left",t.pageX+"px").style("top",t.pageY-30+"px")})).on("mouseover",(function(e,n){const r=t.nodes(),i=r.indexOf(this);gt(r[i]).classed("hover",!0).raise()})).on("mouseout",(function(e,n){const r=t.nodes(),i=r.indexOf(this);gt(r[i]).classed("hover",!1)}))}}setTooltipHtml(t){if(""===t.data.xref)return;let e="";this._configuration.showImages&&(t.data.thumbnail?(e='
',e+='',e+="
"):this._configuration.showSilhouettes&&(e='
',e+='',e+="
"));const n=t.data.birth||t.data.marriage||t.data.death;this._svg.div.html(e+'
'+t.data.name+"
"+(n?""+(t.data.birth?'":"")+(t.data.marriage?'":"")+(t.data.death?'":"")+"
'+t.data.birth+"
'+t.data.marriage+"
'+t.data.death+"
":"")+"
").style("left",event.pageX+"px").style("top",event.pageY-30+"px"),this._svg.div.property("active")&&this._svg.div.transition().duration(200).style("opacity",1)}addColorGroup(t,e){let n=li().startAngle(this._geometry.startAngle(e.depth,e.x0)).endAngle(this._geometry.endAngle(e.depth,e.x1)).innerRadius(this._geometry.outerRadius(e.depth)-this._configuration.colorArcWidth).outerRadius(this._geometry.outerRadius(e.depth)+1);n.padAngle(this._configuration.padAngle).padRadius(this._configuration.padRadius),t.append("g").attr("class","color").append("path").attr("fill",(()=>this._configuration.showColorGradients?e.depth?"url(#grad-"+e.data.id+")":"rgb(225, 225, 225)":e.data.color)).attr("d",n)}addArcToPerson(t,e){let n=li().startAngle(this._geometry.startAngle(e.depth,e.x0)).endAngle(this._geometry.endAngle(e.depth,e.x1)).innerRadius(this._geometry.innerRadius(e.depth)).outerRadius(this._geometry.outerRadius(e.depth));n.padAngle(this._configuration.padAngle).padRadius(this._configuration.padRadius).cornerRadius(this._configuration.cornerRadius);let r=t.append("g").attr("class","arc").append("path").attr("d",n);t.classed("new")&&r.style("opacity",1e-6)}addTitleToPerson(t,e){t.insert("title",":first-child").text(e)}addLabelToPerson(t,e){return t.append("g").attr("class","name").style("font-size",this.getFontSize(e)+"px").style("fill",this._configuration.fontColor)}getFontSize(t){let e=this._configuration.fontSize;return t.depth>=this._configuration.numberOfInnerCircles+1&&(e+=1),(e-t.depth)*this._configuration.fontScale/100}}class zi{constructor(t,e){this._svg=t,this._configuration=e,this._geometry=new Ei(this._configuration)}init(t){if(t.depth<1)return;if(1===t.depth){let e=[64,143,222],n=[161,219,117];t.data.sex===pi&&(e=[218,102,13],n=[235,201,33]),t.data.colors=[e,n]}else{let e=[Math.ceil((t.parent.data.colors[0][0]+t.parent.data.colors[1][0])/2),Math.ceil((t.parent.data.colors[0][1]+t.parent.data.colors[1][1])/2),Math.ceil((t.parent.data.colors[0][2]+t.parent.data.colors[1][2])/2)];t.data.sex===di&&(t.data.colors[0]=t.parent.data.colors[0],t.data.colors[1]=e),t.data.sex===pi&&(t.data.colors[0]=e,t.data.colors[1]=t.parent.data.colors[1])}let e=this._svg.defs.get().append("svg:linearGradient").attr("id","grad-"+t.data.id);e.append("svg:stop").attr("offset","0%").attr("stop-color","rgb("+t.data.colors[0].join(",")+")"),e.append("svg:stop").attr("offset","100%").attr("stop-color","rgb("+t.data.colors[1].join(",")+")")}}class Ci{constructor(t,e,n){this._svg=t,this._configuration=e,this._hierarchy=n}update(t,e){let n=this;this._svg.get().selectAll("g.person").classed("hover",!1).on("click",null).on("mouseover",null).on("mouseout",null),function(t,e){return fetch(t,e).then(ci)}(t).then((t=>{this._hierarchy.init(t),this._svg.get().selectAll("g.person").data(this._hierarchy.nodes,(t=>t.data.id)).each((function(t){let e=""===t.data.xref,r=gt(this);r.classed("remove",e).classed("update",!e&&r.classed("available")).classed("new",!e&&!r.classed("available")),r.classed("new")||r.selectAll("g.name, g.color, title").classed("old",!0),new Ti(n._svg,n._configuration,r,t)})),this._svg.get().selectAll("g.person:not(.remove)").selectAll("g.name:not(.old), g.color:not(.old)").style("opacity",1e-6);let r=Mn().duration(this._configuration.updateDuration).call(this.endAll,(()=>this.updateDone(e)));this._svg.get().selectAll("g.person.remove g.arc path").transition(r).style("fill",(()=>this._configuration.hideEmptySegments?null:"rgb(235, 235, 235)")).style("opacity",(()=>this._configuration.hideEmptySegments?1e-6:null)),this._svg.get().selectAll("g.person.new g.arc path").transition(r).style("fill","rgb(250, 250, 250)").style("opacity",(()=>this._configuration.hideEmptySegments?1:null)),this._svg.get().selectAll("g.person.update, g.person.remove").selectAll("g.name.old, g.color.old").transition(r).style("opacity",1e-6),this._svg.get().selectAll("g.person:not(.remove)").selectAll("g.name:not(.old), g.color:not(.old)").transition(r).style("opacity",1)}))}updateDone(t){this._configuration.hideEmptySegments&&this._svg.get().selectAll("g.person.remove").selectAll("g.arc").remove();let e=Ot((()=>{this._svg.get().selectAll("g.person g.arc path").attr("style",null),this._svg.get().selectAll("g.person g.name, g.person g.color").style("opacity",null),e.stop()}),10);this._svg.get().selectAll("g.person.new, g.person.update, g.person.remove").classed("new",!1).classed("update",!1).classed("remove",!1).selectAll("g.name.old, g.color.old, title.old").remove(),this._svg.get().selectAll("g.person.available").classed("available",!1),t()}endAll(t,e){let n=0;t.on("start",(()=>++n)).on("end",(()=>{--n||e.apply(t)}))}}class Ri{constructor(t,e){this._configuration=e,this._parent=t,this._hierarchy=new gi(this._configuration),this._data={}}get svg(){return this._svg}updateViewBox(){let t=this._svg.visual.node().getBBox(),e=this._parent.node().getBoundingClientRect(),n=Math.max(e.width,t.width),r=Math.max(e.height,t.height,500),i=(n-t.width)/2,a=(r-t.height)/2,o=Math.ceil(t.x-i-10),s=Math.ceil(t.y-a-10);n=Math.ceil(n+20),r=Math.ceil(r+20),this._svg.get().attr("viewBox",[o,s,n,r])}get data(){return this._data}set data(t){this._data=t,this._hierarchy.init(this._data)}draw(){this._parent.html(""),this._svg=new Ai(this._parent,this._configuration),this._overlay=new mi(this._parent),this._svg.initEvents(this._overlay);let t=this._svg.get().select("g.personGroup"),e=new zi(this._svg,this._configuration),n=this;t.selectAll("g.person").data(this._hierarchy.nodes,(t=>t.data.id)).enter().append("g").attr("class",(t=>"person depth-"+t.depth)).attr("id",(t=>"person-"+t.data.id)),t.selectAll("g.person").each((function(t){let r=gt(this);n._configuration.showColorGradients&&e.init(t),new Ti(n._svg,n._configuration,r,t)})),this.bindClickEventListener(),this.updateViewBox()}bindClickEventListener(){this._svg.get().select("g.personGroup").selectAll("g.person").filter((t=>""!==t.data.xref)).classed("available",!0).on("click",this.personClick.bind(this))}personClick(t,e){0===e.depth?this.redirectToIndividual(e.data.url):this.update(e.data.updateUrl)}redirectToIndividual(t){window.location=t}update(t){new Ci(this._svg,this._configuration,this._hierarchy).update(t,(()=>this.bindClickEventListener()))}}t.FanChart=class{constructor(t,e){this._selector=t,this._parent=gt(this._selector),this._configuration=new fi(e.labels,e.generations,e.fanDegree,e.defaultColor,e.fontScale,e.fontColor,e.hideEmptySegments,e.showColorGradients,e.showParentMarriageDates,e.showImages,e.showSilhouettes,e.rtl,e.innerArcs),this._chart=new Ri(this._parent,this._configuration),this.init()}init(){gt("#centerButton").on("click",(()=>this.center())),gt("#exportPNG").on("click",(()=>this.exportPNG())),gt("#exportSVG").on("click",(()=>this.exportSVG()))}center(){this._chart.svg.get().transition().duration(750).call(this._chart.svg.zoom.get().transform,vr)}get configuration(){return this._configuration}set cssFile(t){this._cssFile=t}draw(t){this._chart.data=t,this._chart.draw()}exportPNG(){this._chart.svg.export("png").svgToImage(this._chart.svg,"fan-chart.png")}exportSVG(){this._chart.svg.export("svg").svgToImage(this._chart.svg,this._cssFile,"fan-chart.svg")}},t.Storage=class{constructor(t){this._name=t,this._storage=JSON.parse(localStorage.getItem(this._name))||{}}register(t){let e=document.getElementById(t),n=this.read(t);n?e.type&&"checkbox"===e.type?e.checked=n:e.value=n:this.onInput(e),e.addEventListener("input",(t=>{this.onInput(t.target)}))}onInput(t){t.type&&"checkbox"===t.type?this.write(t.name,t.checked):this.write(t.name,t.value)}read(t){return this._storage[t]}write(t,e){this._storage[t]=e,localStorage.setItem(this._name,JSON.stringify(this._storage))}},Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).WebtreesFanChart={}); +var t,e;t=this,e=function(t){var e="http://www.w3.org/1999/xhtml",n={svg:"http://www.w3.org/2000/svg",xhtml:e,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function r(t){var e=t+="",r=e.indexOf(":");return r>=0&&"xmlns"!==(e=t.slice(0,r))&&(t=t.slice(r+1)),n.hasOwnProperty(e)?{space:n[e],local:t}:t}function i(t){return function(){var n=this.ownerDocument,r=this.namespaceURI;return r===e&&n.documentElement.namespaceURI===e?n.createElement(t):n.createElementNS(r,t)}}function a(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function o(t){var e=r(t);return(e.local?a:i)(e)}function s(){}function u(t){return null==t?s:function(){return this.querySelector(t)}}function l(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function h(){return[]}function c(t){return null==t?h:function(){return this.querySelectorAll(t)}}function f(t){return function(){return this.matches(t)}}function d(t){return function(e){return e.matches(t)}}var p=Array.prototype.find;function g(){return this.firstElementChild}var m=Array.prototype.filter;function v(){return Array.from(this.children)}function _(t){return new Array(t.length)}function y(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function w(t){return function(){return t}}function x(t,e,n,r,i,a){for(var o,s=0,u=e.length,l=a.length;se?1:t>=e?0:NaN}function k(t){return function(){this.removeAttribute(t)}}function S(t){return function(){this.removeAttributeNS(t.space,t.local)}}function E(t,e){return function(){this.setAttribute(t,e)}}function P(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function T(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function z(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function C(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function R(t){return function(){this.style.removeProperty(t)}}function D(t,e,n){return function(){this.style.setProperty(t,e,n)}}function I(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function O(t,e){return t.style.getPropertyValue(e)||C(t).getComputedStyle(t,null).getPropertyValue(e)}function L(t){return function(){delete this[t]}}function $(t,e){return function(){this[t]=e}}function B(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function q(t){return t.trim().split(/^|\s+/)}function X(t){return t.classList||new j(t)}function j(t){this._node=t,this._names=q(t.getAttribute("class")||"")}function H(t,e){for(var n=X(t),r=-1,i=e.length;++r=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function st(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var ft=[null];function dt(t,e){this._groups=t,this._parents=e}function pt(){return new dt([[document.documentElement]],ft)}function gt(t){return"string"==typeof t?new dt([[document.querySelector(t)]],[document.documentElement]):new dt([[t]],ft)}function mt(t,e){if(t=function(t){let e;for(;e=t.sourceEvent;)t=e;return t}(t),void 0===e&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,[(r=r.matrixTransform(e.getScreenCTM().inverse())).x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}dt.prototype=pt.prototype={constructor:dt,select:function(t){"function"!=typeof t&&(t=u(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i=k&&(k=N+1);!(y=m[k])&&++k=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=N);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a1?this.each((null==e?R:"function"==typeof e?I:D)(t,e,null==n?"":n)):O(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?L:"function"==typeof e?B:$)(t,e)):this.node()[t]},classed:function(t,e){var n=q(t+"");if(arguments.length<2){for(var r=X(this.node()),i=-1,a=n.length;++i{}};function _t(){for(var t,e=0,n=arguments.length,r={};e=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function xt(t,e){for(var n,r=0,i=t.length;r0)for(var n,r,i=new Array(n),a=0;a=0&&e._call.call(void 0,t),e=e._next;--Nt}()}finally{Nt=0,function(){for(var t,e,n=Mt,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Mt=e);At=t,Bt(r)}(),Pt=0}}function $t(){var t=zt.now(),e=t-Et;e>1e3&&(Tt-=e,Et=t)}function Bt(t){Nt||(kt&&(kt=clearTimeout(kt)),t-Pt>24?(t<1/0&&(kt=setTimeout(Lt,t-zt.now()-Tt)),St&&(St=clearInterval(St))):(St||(Et=zt.now(),St=setInterval($t,1e3)),Nt=1,Ct(Lt)))}function qt(t,e,n){var r=new It;return e=null==e?0:+e,r.restart((n=>{r.stop(),t(n+e)}),e,n),r}It.prototype=Ot.prototype={constructor:It,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Rt():+n)+(null==e?0:+e),this._next||At===this||(At?At._next=this:Mt=this,At=this),this._call=t,this._time=n,Bt()},stop:function(){this._call&&(this._call=null,this._time=1/0,Bt())}};var Xt=_t("start","end","cancel","interrupt"),jt=[];function Ht(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(t){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=t&&o(t-n.delay)}function o(a){var l,h,c,f;if(1!==n.state)return u();for(l in i)if((f=i[l]).name===n.name){if(3===f.state)return qt(o);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[l]):+l0)throw new Error("too late; already scheduled");return n}function Yt(t,e){var n=Vt(t,e);if(n.state>3)throw new Error("too late; already running");return n}function Vt(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Ft(t,e){var n,r,i,a=t.__transition,o=!0;if(a){for(i in e=null==e?null:e+"",a)(n=a[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[i]):o=!1;o&&delete t.__transition}}function Ut(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Wt(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Kt(){}var Qt=.7,Zt=1/Qt,Jt="\\s*([+-]?\\d+)\\s*",te="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ee="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ne=/^#([0-9a-f]{3,8})$/,re=new RegExp(`^rgb\\(${Jt},${Jt},${Jt}\\)$`),ie=new RegExp(`^rgb\\(${ee},${ee},${ee}\\)$`),ae=new RegExp(`^rgba\\(${Jt},${Jt},${Jt},${te}\\)$`),oe=new RegExp(`^rgba\\(${ee},${ee},${ee},${te}\\)$`),se=new RegExp(`^hsl\\(${te},${ee},${ee}\\)$`),ue=new RegExp(`^hsla\\(${te},${ee},${ee},${te}\\)$`),le={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function he(){return this.rgb().formatHex()}function ce(){return this.rgb().formatRgb()}function fe(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=ne.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?de(e):3===n?new ve(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?pe(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?pe(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=re.exec(t))?new ve(e[1],e[2],e[3],1):(e=ie.exec(t))?new ve(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=ae.exec(t))?pe(e[1],e[2],e[3],e[4]):(e=oe.exec(t))?pe(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=se.exec(t))?Me(e[1],e[2]/100,e[3]/100,1):(e=ue.exec(t))?Me(e[1],e[2]/100,e[3]/100,e[4]):le.hasOwnProperty(t)?de(le[t]):"transparent"===t?new ve(NaN,NaN,NaN,0):null}function de(t){return new ve(t>>16&255,t>>8&255,255&t,1)}function pe(t,e,n,r){return r<=0&&(t=e=n=NaN),new ve(t,e,n,r)}function ge(t){return t instanceof Kt||(t=fe(t)),t?new ve((t=t.rgb()).r,t.g,t.b,t.opacity):new ve}function me(t,e,n,r){return 1===arguments.length?ge(t):new ve(t,e,n,null==r?1:r)}function ve(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function _e(){return`#${be(this.r)}${be(this.g)}${be(this.b)}`}function ye(){const t=we(this.opacity);return`${1===t?"rgb(":"rgba("}${xe(this.r)}, ${xe(this.g)}, ${xe(this.b)}${1===t?")":`, ${t})`}`}function we(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function xe(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function be(t){return((t=xe(t))<16?"0":"")+t.toString(16)}function Me(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ne(t,e,n,r)}function Ae(t){if(t instanceof Ne)return new Ne(t.h,t.s,t.l,t.opacity);if(t instanceof Kt||(t=fe(t)),!t)return new Ne;if(t instanceof Ne)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,u=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n0&&u<1?0:o,new Ne(o,s,u,t.opacity)}function Ne(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function ke(t){return(t=(t||0)%360)<0?t+360:t}function Se(t){return Math.max(0,Math.min(1,t||0))}function Ee(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}Ut(Kt,fe,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:he,formatHex:he,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Ae(this).formatHsl()},formatRgb:ce,toString:ce}),Ut(ve,me,Wt(Kt,{brighter(t){return t=null==t?Zt:Math.pow(Zt,t),new ve(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?Qt:Math.pow(Qt,t),new ve(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ve(xe(this.r),xe(this.g),xe(this.b),we(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:_e,formatHex:_e,formatHex8:function(){return`#${be(this.r)}${be(this.g)}${be(this.b)}${be(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:ye,toString:ye})),Ut(Ne,(function(t,e,n,r){return 1===arguments.length?Ae(t):new Ne(t,e,n,null==r?1:r)}),Wt(Kt,{brighter(t){return t=null==t?Zt:Math.pow(Zt,t),new Ne(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?Qt:Math.pow(Qt,t),new Ne(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new ve(Ee(t>=240?t-240:t+120,i,r),Ee(t,i,r),Ee(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Ne(ke(this.h),Se(this.s),Se(this.l),we(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=we(this.opacity);return`${1===t?"hsl(":"hsla("}${ke(this.h)}, ${100*Se(this.s)}%, ${100*Se(this.l)}%${1===t?")":`, ${t})`}`}}));var Pe=t=>()=>t;function Te(t){return 1==(t=+t)?ze:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Pe(isNaN(e)?n:e)}}function ze(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):Pe(isNaN(t)?e:t)}var Ce=function t(e){var n=Te(e);function r(t,e){var r=n((t=me(t)).r,(e=me(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=ze(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function Re(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(a){for(n=0;na&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,u.push({i:o,x:Oe(n,r)})),a=Be.lastIndex;return a180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Oe(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,s,u),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Oe(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,s,u),function(t,e,n,r,a,o){if(t!==n||e!==r){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:Oe(t,n)},{i:s-2,x:Oe(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,u),a=o=null,function(t){for(var e,n=-1,r=u.length;++n=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?Gt:Yt;return function(){var o=a(this,t),s=o.on;s!==r&&(i=(r=s).copy()).on(e,n),o.on=i}}var yn=pt.prototype.constructor;function wn(t){return function(){this.style.removeProperty(t)}}function xn(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function bn(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&xn(t,a,n)),r}return a._value=e,a}function Mn(t){return function(e){this.textContent=t.call(this,e)}}function An(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Mn(r)),e}return r._value=t,r}var Nn=0;function kn(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Sn(t){return pt().transition(t)}function En(){return++Nn}var Pn=pt.prototype;kn.prototype=Sn.prototype={constructor:kn,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=u(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;oe?1:t>=e?0:NaN}function Rn(t,e){return null==t||null==e?NaN:et?1:e>=t?0:NaN}function Dn(t){let e,n,r;function i(t,r,i=0,a=t.length){if(i>>1;n(t[e],r)<0?i=e+1:a=e}while(iCn(t(e),n),r=(e,n)=>t(e)-n):(e=t===Cn||t===Rn?t:In,n=t,r=t),{left:i,center:function(t,e,n=0,a=t.length){const o=i(t,e,n,a-1);return o>n&&r(t[o-1],e)>-r(t[o],e)?o-1:o},right:function(t,r,i=0,a=t.length){if(i>>1;n(t[e],r)<=0?i=e+1:a=e}while(i=0?(a>=$n?10:a>=Bn?5:a>=qn?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=$n?10:a>=Bn?5:a>=qn?2:1)}function jn(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function Hn(t){return+t}var Gn=[0,1];function Yn(t){return t}function Vn(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:(n=isNaN(e)?NaN:.5,function(){return n});var n}function Fn(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return ie&&(n=t,t=e,e=n),l=function(n){return Math.max(t,Math.min(e,n))}),r=u>2?Un:Fn,i=a=null,c}function c(e){return null==e||isNaN(e=+e)?n:(i||(i=r(o.map(t),s,u)))(t(l(e)))}return c.invert=function(n){return l(e((a||(a=r(s,o.map(t),Oe)))(n)))},c.domain=function(t){return arguments.length?(o=Array.from(t,Hn),h()):o.slice()},c.range=function(t){return arguments.length?(s=Array.from(t),h()):s.slice()},c.rangeRound=function(t){return s=Array.from(t),u=je,h()},c.clamp=function(t){return arguments.length?(l=!!t||Yn,h()):l!==Yn},c.interpolate=function(t){return arguments.length?(u=t,h()):u},c.unknown=function(t){return arguments.length?(n=t,c):n},function(n,r){return t=n,e=r,h()}}function Qn(){return Kn()(Yn,Yn)}function Zn(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Jn(t){return(t=Zn(Math.abs(t)))?t[1]:NaN}var tr,er=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function nr(t){if(!(e=er.exec(t)))throw new Error("invalid format: "+t);var e;return new rr({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function rr(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function ir(t,e){var n=Zn(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}nr.prototype=rr.prototype,rr.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var ar={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>ir(100*t,e),r:ir,s:function(t,e){var n=Zn(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(tr=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+Zn(t,Math.max(0,e+a-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function or(t){return t}var sr,ur,lr,hr=Array.prototype.map,cr=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function fr(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?or:(e=hr.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,a=[],o=0,s=e[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),a.push(t.substring(i-=s,i+s)),!((u+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?or:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(hr.call(t.numerals,String)),u=void 0===t.percent?"%":t.percent+"",l=void 0===t.minus?"−":t.minus+"",h=void 0===t.nan?"NaN":t.nan+"";function c(t){var e=(t=nr(t)).fill,n=t.align,c=t.sign,f=t.symbol,d=t.zero,p=t.width,g=t.comma,m=t.precision,v=t.trim,_=t.type;"n"===_?(g=!0,_="g"):ar[_]||(void 0===m&&(m=12),v=!0,_="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var y="$"===f?i:"#"===f&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",w="$"===f?a:/[%p]/.test(_)?u:"",x=ar[_],b=/[defgprs%]/.test(_);function M(t){var i,a,u,f=y,M=w;if("c"===_)M=x(t)+M,t="";else{var A=(t=+t)<0||1/t<0;if(t=isNaN(t)?h:x(Math.abs(t),m),v&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),A&&0==+t&&"+"!==c&&(A=!1),f=(A?"("===c?c:l:"-"===c||"("===c?"":c)+f,M=("s"===_?cr[8+tr/3]:"")+M+(A&&"("===c?")":""),b)for(i=-1,a=t.length;++i(u=t.charCodeAt(i))||u>57){M=(46===u?o+t.slice(i+1):t.slice(i))+M,t=t.slice(0,i);break}}g&&!d&&(t=r(t,1/0));var N=f.length+t.length+M.length,k=N>1)+f+t+M+k.slice(N);break;default:t=k+f+t+M}return s(t)}return m=void 0===m?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),M.toString=function(){return t+""},M}return{format:c,formatPrefix:function(t,e){var n=c(((t=nr(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Jn(e)/3))),i=Math.pow(10,-r),a=cr[8+r/3];return function(t){return n(i*t)+a}}}}function dr(t,e,n,r){var i,a=function(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=$n?i*=10:a>=Bn?i*=5:a>=qn&&(i*=2),e0)return[t];if((r=e0){let n=Math.round(t/o),r=Math.round(e/o);for(n*oe&&--r,a=new Array(i=r-n+1);++se&&--r,a=new Array(i=r-n+1);++s0;){if((i=Xn(u,l,n))===r)return a[o]=u,a[s]=l,e(a);if(i>0)u=Math.floor(u/i)*i,l=Math.ceil(l/i)*i;else{if(!(i<0))break;u=Math.ceil(u*i)/i,l=Math.floor(l*i)/i}r=i}return t},t}function gr(){var t=Qn();return t.copy=function(){return Wn(t,gr())},jn.apply(t,arguments),pr(t)}sr=fr({thousands:",",grouping:[3],currency:["$",""]}),ur=sr.format,lr=sr.formatPrefix;const mr={capture:!0,passive:!1};function vr(t){t.preventDefault(),t.stopImmediatePropagation()}function _r(t){var e=t.document.documentElement,n=gt(t).on("dragstart.drag",vr,mr);"onselectstart"in e?n.on("selectstart.drag",vr,mr):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function yr(t,e){var n=t.document.documentElement,r=gt(t).on("dragstart.drag",null);e&&(r.on("click.drag",vr,mr),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var wr=t=>()=>t;function xr(t,{sourceEvent:e,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function br(t,e,n){this.k=t,this.x=e,this.y=n}br.prototype={constructor:br,scale:function(t){return 1===t?this:new br(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new br(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Mr=new br(1,0,0);function Ar(t){for(;!t.__zoom;)if(!(t=t.parentNode))return Mr;return t.__zoom}function Nr(t){t.stopImmediatePropagation()}function kr(t){t.preventDefault(),t.stopImmediatePropagation()}function Sr(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function Er(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function Pr(){return this.__zoom||Mr}function Tr(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function zr(){return navigator.maxTouchPoints||"ontouchstart"in this}function Cr(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],a=t.invertY(e[0][1])-n[0][1],o=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function Rr(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function Dr(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=Or)):void 0===e&&(e=Ir);for(var n,r,i,a,o,s=new Br(t),u=[s];n=u.pop();)if((i=e(n.data))&&(o=(i=Array.from(i)).length))for(n.children=i,a=o-1;a>=0;--a)u.push(r=i[a]=new Br(i[a])),r.parent=n,r.depth=n.depth+1;return s.eachBefore($r)}function Ir(t){return t.children}function Or(t){return Array.isArray(t)?t[1]:null}function Lr(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function $r(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function Br(t){this.data=t,this.depth=this.height=0,this.parent=null}function qr(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function Xr(){var t=1,e=1,n=0,r=!1;function i(i){var a=i.height+1;return i.x0=i.y0=n,i.x1=t,i.y1=e/a,i.eachBefore(function(t,e){return function(r){r.children&&function(t,e,n,r,i){for(var a,o=t.children,s=-1,u=o.length,l=t.value&&(r-e)/t.value;++s=0;--r)a.push(n[r]);return this},find:function(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return Dr(this).eachBefore(Lr)},[Symbol.iterator]:function*(){var t,e,n,r,i=this,a=[i];do{for(t=a.reverse(),a=[];i=t.pop();)if(yield i,e=i.children)for(n=0,r=e.length;nGr)if(Math.abs(h*s-u*l)>Gr&&i){var f=n-a,d=r-o,p=s*s+u*u,g=f*f+d*d,m=Math.sqrt(p),v=Math.sqrt(c),_=i*Math.tan((jr-Math.acos((p+c-g)/(2*m*v)))/2),y=_/v,w=_/m;Math.abs(y-1)>Gr&&(this._+="L"+(t+y*l)+","+(e+y*h)),this._+="A"+i+","+i+",0,0,"+ +(h*f>l*d)+","+(this._x1=t+w*s)+","+(this._y1=e+w*u)}else this._+="L"+(this._x1=t)+","+(this._y1=e)},arc:function(t,e,n,r,i,a){t=+t,e=+e,a=!!a;var o=(n=+n)*Math.cos(r),s=n*Math.sin(r),u=t+o,l=e+s,h=1^a,c=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+u+","+l:(Math.abs(this._x1-u)>Gr||Math.abs(this._y1-l)>Gr)&&(this._+="L"+u+","+l),n&&(c<0&&(c=c%Hr+Hr),c>Yr?this._+="A"+n+","+n+",0,1,"+h+","+(t-o)+","+(e-s)+"A"+n+","+n+",0,1,"+h+","+(this._x1=u)+","+(this._y1=l):c>Gr&&(this._+="A"+n+","+n+",0,"+ +(c>=jr)+","+h+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};const Wr=Math.abs,Kr=Math.atan2,Qr=Math.cos,Zr=Math.max,Jr=Math.min,ti=Math.sin,ei=Math.sqrt,ni=1e-12,ri=Math.PI,ii=ri/2,ai=2*ri;function oi(t){return t>1?0:t<-1?ri:Math.acos(t)}function si(t){return t>=1?ii:t<=-1?-ii:Math.asin(t)}function ui(t){return t.innerRadius}function li(t){return t.outerRadius}function hi(t){return t.startAngle}function ci(t){return t.endAngle}function fi(t){return t&&t.padAngle}function di(t,e,n,r,i,a,o,s){var u=n-t,l=r-e,h=o-i,c=s-a,f=c*u-h*l;if(!(f*fT*T+z*z&&(A=k,N=S),{cx:A,cy:N,x01:-h,y01:-c,x11:A*(i/x-1),y11:N*(i/x-1)}}function gi(){var t=ui,e=li,n=Ur(0),r=null,i=hi,a=ci,o=fi,s=null;function u(){var u,l,h=+t.apply(this,arguments),c=+e.apply(this,arguments),f=i.apply(this,arguments)-ii,d=a.apply(this,arguments)-ii,p=Wr(d-f),g=d>f;if(s||(s=u=Fr()),cni)if(p>ai-ni)s.moveTo(c*Qr(f),c*ti(f)),s.arc(0,0,c,f,d,!g),h>ni&&(s.moveTo(h*Qr(d),h*ti(d)),s.arc(0,0,h,d,f,g));else{var m,v,_=f,y=d,w=f,x=d,b=p,M=p,A=o.apply(this,arguments)/2,N=A>ni&&(r?+r.apply(this,arguments):ei(h*h+c*c)),k=Jr(Wr(c-h)/2,+n.apply(this,arguments)),S=k,E=k;if(N>ni){var P=si(N/h*ti(A)),T=si(N/c*ti(A));(b-=2*P)>ni?(w+=P*=g?1:-1,x-=P):(b=0,w=x=(f+d)/2),(M-=2*T)>ni?(_+=T*=g?1:-1,y-=T):(M=0,_=y=(f+d)/2)}var z=c*Qr(_),C=c*ti(_),R=h*Qr(x),D=h*ti(x);if(k>ni){var I,O=c*Qr(y),L=c*ti(y),$=h*Qr(w),B=h*ti(w);if(pni?E>ni?(m=pi($,B,z,C,c,E,g),v=pi(O,L,R,D,c,E,g),s.moveTo(m.cx+m.x01,m.cy+m.y01),Eni&&b>ni?S>ni?(m=pi(R,D,O,L,h,-S,g),v=pi(z,C,$,B,h,-S,g),s.lineTo(m.cx+m.x01,m.cy+m.y01),S{let t=1;return function(e=!1){return e&&(t=0),t++}})()}get generations(){return this._generations}set generations(t){this._generations=t}get fanDegree(){return this._fanDegree}set fanDegree(t){this._fanDegree=t}get fontScale(){return this._fontScale}set fontScale(t){this._fontScale=t}get hideEmptySegments(){return this._hideEmptySegments}set hideEmptySegments(t){this._hideEmptySegments=t}get showColorGradients(){return this._showColorGradients}set showColorGradients(t){this._showColorGradients=t}get showParentMarriageDates(){return this._showParentMarriageDates}set showParentMarriageDates(t){this._showParentMarriageDates=t}get showImages(){return this._showImages}get showSilhouettes(){return this._showSilhouettes}get numberOfInnerCircles(){return this._numberOfInnerCircles}set numberOfInnerCircles(t){this._numberOfInnerCircles=t}get fontSize(){return this._fontSize}}const yi="M",wi="F";class xi{constructor(t){this._configuration=t,this._nodes=null}init(t){let e=Dr(t,(t=>(!t.children&&t.generation{t.data.id=this._configuration.id()})),this._configuration.id(!0)}get nodes(){return this._nodes}createEmptyNode(t,e){return{id:0,xref:"",url:"",updateUrl:"",generation:t,name:"",firstNames:[],lastNames:[],preferredName:"",alternativeNames:[],isAltRtl:!1,sex:e,timespan:"",color:this._configuration.defaultColor,colors:[[],[]]}}}class bi{constructor(t){this._element=t.append("div").attr("class","overlay").style("opacity",1e-6)}show(t,e=0,n=null){this._element.select("p").remove(),this._element.append("p").attr("class","tooltip").text(t),this._element.transition().duration(e).style("opacity",1).on("end",(()=>{"function"==typeof n&&n()}))}hide(t=0,e=0){this._element.transition().delay(t).duration(e).style("opacity",1e-6)}get(){return this._element}}class Mi{constructor(t){this._element=t.append("defs")}get(){return this._element}}class Ai{constructor(t){this._zoom=null,this._parent=t,this.init()}init(){this._zoom=function(){var t,e,n,r=Sr,i=Er,a=Cr,o=Tr,s=zr,u=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],h=250,c=Qe,f=_t("start","zoom","end"),d=500,p=0,g=10;function m(t){t.property("__zoom",Pr).on("wheel.zoom",M,{passive:!1}).on("mousedown.zoom",A).on("dblclick.zoom",N).filter(s).on("touchstart.zoom",k).on("touchmove.zoom",S).on("touchend.zoom touchcancel.zoom",E).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function v(t,e){return(e=Math.max(u[0],Math.min(u[1],e)))===t.k?t:new br(e,t.x,t.y)}function _(t,e,n){var r=e[0]-n[0]*t.k,i=e[1]-n[1]*t.k;return r===t.x&&i===t.y?t:new br(t.k,r,i)}function y(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function w(t,e,n,r){t.on("start.zoom",(function(){x(this,arguments).event(r).start()})).on("interrupt.zoom end.zoom",(function(){x(this,arguments).event(r).end()})).tween("zoom",(function(){var t=this,a=arguments,o=x(t,a).event(r),s=i.apply(t,a),u=null==n?y(s):"function"==typeof n?n.apply(t,a):n,l=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),h=t.__zoom,f="function"==typeof e?e.apply(t,a):e,d=c(h.invert(u).concat(l/h.k),f.invert(u).concat(l/f.k));return function(t){if(1===t)t=f;else{var e=d(t),n=l/e[2];t=new br(n,u[0]-e[0]*n,u[1]-e[1]*n)}o.zoom(null,t)}}))}function x(t,e,n){return!n&&t.__zooming||new b(t,e)}function b(t,e){this.that=t,this.args=e,this.active=0,this.sourceEvent=null,this.extent=i.apply(t,e),this.taps=0}function M(t,...e){if(r.apply(this,arguments)){var n=x(this,e).event(t),i=this.__zoom,s=Math.max(u[0],Math.min(u[1],i.k*Math.pow(2,o.apply(this,arguments)))),h=mt(t);if(n.wheel)n.mouse[0][0]===h[0]&&n.mouse[0][1]===h[1]||(n.mouse[1]=i.invert(n.mouse[0]=h)),clearTimeout(n.wheel);else{if(i.k===s)return;n.mouse=[h,i.invert(h)],Ft(this),n.start()}kr(t),n.wheel=setTimeout(c,150),n.zoom("mouse",a(_(v(i,s),n.mouse[0],n.mouse[1]),n.extent,l))}function c(){n.wheel=null,n.end()}}function A(t,...e){if(!n&&r.apply(this,arguments)){var i=t.currentTarget,o=x(this,e,!0).event(t),s=gt(t.view).on("mousemove.zoom",f,!0).on("mouseup.zoom",d,!0),u=mt(t,i),h=t.clientX,c=t.clientY;_r(t.view),Nr(t),o.mouse=[u,this.__zoom.invert(u)],Ft(this),o.start()}function f(t){if(kr(t),!o.moved){var e=t.clientX-h,n=t.clientY-c;o.moved=e*e+n*n>p}o.event(t).zoom("mouse",a(_(o.that.__zoom,o.mouse[0]=mt(t,i),o.mouse[1]),o.extent,l))}function d(t){s.on("mousemove.zoom mouseup.zoom",null),yr(t.view,o.moved),kr(t),o.event(t).end()}}function N(t,...e){if(r.apply(this,arguments)){var n=this.__zoom,o=mt(t.changedTouches?t.changedTouches[0]:t,this),s=n.invert(o),u=n.k*(t.shiftKey?.5:2),c=a(_(v(n,u),o,s),i.apply(this,e),l);kr(t),h>0?gt(this).transition().duration(h).call(w,c,o,t):gt(this).call(m.transform,c,o,t)}}function k(n,...i){if(r.apply(this,arguments)){var a,o,s,u,l=n.touches,h=l.length,c=x(this,i,n.changedTouches.length===h).event(n);for(Nr(n),o=0;o{this._parent.attr("transform",t.transform)})),this._zoom.wheelDelta((t=>-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002))),this._zoom.filter((t=>{if("wheel"===t.type){if(!t.ctrlKey)return!1;var e=Ar(this);if(e.k){if(e.k<=.5&&t.deltaY>0)return t.preventDefault(),!1;if(e.k>=5&&t.deltaY<0)return t.preventDefault(),!1}return!0}return t.button||"touchstart"!==t.type?!(t.ctrlKey&&"wheel"!==t.type||t.button):2===t.touches.length}))}get(){return this._zoom}}class Ni{constructor(t){this._element=t,this._element.append("filter").attr("id","drop-shadow").append("feDropShadow").attr("stdDeviation","7 7").attr("dx","0").attr("dy","0").attr("flood-opacity","0.3").attr("flood-color","rgb(0,0,0)")}get(){return this._element}}class ki{triggerDownload(t,e){let n=new MouseEvent("click",{view:window,bubbles:!1,cancelable:!0}),r=document.createElement("a");r.setAttribute("download",e),r.setAttribute("href",t),r.setAttribute("target","_blank"),r.dispatchEvent(n)}}class Si extends ki{copyStylesInline(t,e){let n=["svg","g","text","textPath"];for(let r=0;r{let i=(new XMLSerializer).serializeToString(t),a=window.URL||window.webkitURL||window,o=new Blob([i],{type:"image/svg+xml;charset=utf-8"}),s=a.createObjectURL(o),u=new Image;u.onload=()=>{let t=this.createCanvas(e,n),i=t.getContext("2d");i.fillStyle="rgb(255,255,255)",i.fillRect(0,0,t.width,t.height),i.drawImage(u,0,0),a.revokeObjectURL(s);let o=t.toDataURL("image/png").replace("image/png","image/octet-stream");r(o)},u.src=s}))}cloneSvg(t){return new Promise((e=>{e(t.cloneNode(!0))}))}svgToImage(t,e){const n=[3508,2480];this.cloneSvg(t.get().node()).then((r=>{this.copyStylesInline(t.get().node(),r);const i=this.calculateViewBox(t.get().node()),a=Math.max(n[0],i[2]),o=Math.max(n[1],i[3]);r.setAttribute("width",a),r.setAttribute("height",o),r.setAttribute("viewBox",i),this.convertToDataUrl(r,a,o).then((t=>this.triggerDownload(t,e))).catch((()=>{console.log("Failed to save chart as PNG image")}))}))}}class Ei extends ki{copyStylesInline(t,e){return new Promise((n=>{(function(t,e){return fetch(t,e).then(mi)})(t).then((t=>{t=t.replace(/#webtrees-fan-chart-container /g,"");let r=document.createElementNS("http://www.w3.org/2000/svg","style");r.appendChild(document.createTextNode(t)),e.prepend(r),n(e)}))}))}convertToObjectUrl(t){return new Promise((e=>{let n=(new XMLSerializer).serializeToString(t),r=window.URL||window.webkitURL||window,i=new Blob([n],{type:"image/svg+xml;charset=utf-8"}),a=r.createObjectURL(i),o=new Image;o.onload=()=>{e(a)},o.src=a}))}cloneSvg(t){return new Promise((e=>{e(t.cloneNode(!0))}))}svgToImage(t,e,n){this.cloneSvg(t.get().node()).then((t=>this.copyStylesInline(e,t))).then((t=>this.convertToObjectUrl(t))).then((t=>this.triggerDownload(t,n))).catch((()=>{console.log("Failed to save chart as SVG image")}))}}class Pi{constructor(){this._exportClass=null}setExportClass(t){switch(t){case"png":this._exportClass=Si;break;case"svg":this._exportClass=Ei}}createExport(t){switch(this.setExportClass(t),t){case"png":case"svg":return new this._exportClass}}}class Ti{constructor(t,e){this._element=t.append("svg"),this._defs=new Mi(this._element),this._visual=null,this._zoom=null,this._div=null,this._configuration=e,this.init()}init(){this._element.attr("width","100%").attr("height","100%").attr("text-rendering","geometricPrecision").attr("text-anchor","middle").attr("xmlns:xlink","https://www.w3.org/1999/xlink"),new Ni(this._defs.get())}initEvents(t){this._element.on("contextmenu",(t=>t.preventDefault())).on("wheel",(e=>{e.ctrlKey||t.show(this._configuration.labels.zoom,300,(()=>{t.hide(700,800)}))})).on("touchend",(e=>{e.touches.length<2&&t.hide(0,800)})).on("touchmove",(e=>{e.touches.length>=2?t.hide():t.show(this._configuration.labels.move)})).on("click",(t=>this.doStopPropagation(t)),!0),this._configuration.rtl&&this._element.classed("rtl",!0);const e=gt("div.tooltip");e.empty()?this._div=gt("body").append("div").attr("class","tooltip").style("opacity",0):this._div=e.style("opacity",0),this._visual=this._element.append("g"),this._visual.append("g").attr("class","personGroup"),this._zoom=new Ai(this._visual),this._element.call(this._zoom.get())}doStopPropagation(t){t.defaultPrevented&&t.stopPropagation()}export(t){return(new Pi).createExport(t)}get defs(){return this._defs}get zoom(){return this._zoom}get visual(){return this._visual}get(){return this._element}get div(){return this._div}}const zi=Math.PI/180,Ci=180/Math.PI,Ri=2*Math.PI;class Di{constructor(t){this._configuration=t}get startPi(){return 90===this._configuration.fanDegree?0:-this._configuration.fanDegree/2*zi}get endPi(){return 90===this._configuration.fanDegree?this._configuration.fanDegree*zi:this._configuration.fanDegree/2*zi}get scale(){return gr().range([this.startPi,this.endPi])}innerRadius(t){return 0===t?0:t<=this._configuration.numberOfInnerCircles?(t-1)*this._configuration.innerArcHeight+this._configuration.centerCircleRadius+this._configuration.circlePadding:this._configuration.numberOfInnerCircles*this._configuration.innerArcHeight+(t-this._configuration.numberOfInnerCircles-1)*this._configuration.outerArcHeight+this._configuration.centerCircleRadius+this._configuration.circlePadding}outerRadius(t){return 0===t?this._configuration.centerCircleRadius:t<=this._configuration.numberOfInnerCircles?(t-1)*this._configuration.innerArcHeight+this._configuration.centerCircleRadius+this._configuration.innerArcHeight:this._configuration.numberOfInnerCircles*this._configuration.innerArcHeight+(t-this._configuration.numberOfInnerCircles-1)*this._configuration.outerArcHeight+this._configuration.centerCircleRadius+this._configuration.outerArcHeight}centerRadius(t){return(this.innerRadius(t)+this.outerRadius(t))/2}relativeRadius(t,e){const n=this.outerRadius(t);return n-(100-e)*(n-this.innerRadius(t))/100}calcAngle(t){return Math.max(this.startPi,Math.min(this.endPi,this.scale(t)))}startAngle(t,e){return 0===t?0:this.calcAngle(e)}endAngle(t,e){return 0===t?Ri:this.calcAngle(e)}arcLength(t,e){return(this.endAngle(t.depth,t.x1)-this.startAngle(t.depth,t.x0))*this.relativeRadius(t.depth,e)}}class Ii{constructor(t,e){this._svg=t,this._configuration=e,this._geometry=new Di(this._configuration)}createLabels(t,e){if(this.isInnerLabel(e)){let n=gt(t.node().parentNode).attr("id");if(e.data.firstNames.length){let r=this.createPathDefinition(n,0,e),i=t.append("text").append("textPath").attr("xlink:href","#"+r).attr("startOffset","25%");this.addFirstNames(i,e),this.truncateNames(i,e,0)}if(e.data.lastNames.length){let r=this.createPathDefinition(n,1,e),i=t.append("text").append("textPath").attr("xlink:href","#"+r).attr("startOffset","25%");this.addLastNames(i,e),this.truncateNames(i,e,1)}if(!e.data.firstNames.length&&!e.data.lastNames.length){let r=this.createPathDefinition(n,0,e),i=t.append("text").append("textPath").attr("xlink:href","#"+r).attr("startOffset","25%");i.append("tspan").text(e.data.name),this.truncateNames(i,e,0)}if(e.data.alternativeNames.length){let r=this.createPathDefinition(n,2,e),i=t.append("text").append("textPath").attr("xlink:href","#"+r).attr("startOffset","25%").attr("class","alternativeName").classed("rtl",e.data.isAltRtl);this.addAlternativeNames(i,e),this.truncateNames(i,e,2)}let r=this.createPathDefinition(n,3,e),i=t.append("text").append("textPath").attr("xlink:href","#"+r).attr("startOffset","25%").attr("class","date");i.append("title").text(e.data.timespan);let a=i.append("tspan").text(e.data.timespan),o=this.getAvailableWidth(e,3);this.getTextLength(i)>o&&(i.selectAll("tspan").each(this.truncateDate(i,o)),a.text(a.text()+"…"))}else{if(e.depth>=7){let n=t.append("text").attr("dy","2px");e.data.firstNames.length&&this.addFirstNames(n,e),e.data.lastNames.length&&this.addLastNames(n,e,.25),e.data.firstNames.length||e.data.lastNames.length||n.append("tspan").text(e.data.name),this.truncateNames(n,e,0)}else{if(e.data.firstNames.length){let n=t.append("text").attr("dy","2px");this.addFirstNames(n,e),this.truncateNames(n,e,0)}if(e.data.lastNames.length){let n=t.append("text").attr("dy","2px");this.addLastNames(n,e),this.truncateNames(n,e,1)}if(!e.data.firstNames.length&&!e.data.lastNames.length){let n=t.append("text").attr("dy","2px");n.append("tspan").text(e.data.name),this.truncateNames(n,e,0)}if(e.depth<6){let n=t.append("text").attr("class","date").attr("dy","2px");n.append("title").text(e.data.timespan);let r=n.append("tspan").text(e.data.timespan),i=this.getAvailableWidth(e,2);this.getTextLength(n)>i&&(n.selectAll("tspan").each(this.truncateDate(n,i)),r.text(r.text()+"…"))}}this.transformOuterText(t,e)}if(this._configuration.showParentMarriageDates&&e.children&&e.depth<5){let n=gt(t.node().parentNode).attr("id"),r=this.createPathDefinition(n,4,e),i=t.append("text").append("textPath").attr("xlink:href","#"+r).attr("startOffset","25%").attr("class","marriage-date");this.addMarriageDate(i,e)}}addFirstNames(t,e){let n=0;for(let r of e.data.firstNames){let i=t.append("tspan").text(r);r===e.data.preferredName&&i.attr("class","preferred"),0!==n&&i.attr("dx","0.25em"),++n}}addLastNames(t,e,n=0){let r=0;for(let i of e.data.lastNames){let e=t.append("tspan").attr("class","lastName").text(i);0!==r&&e.attr("dx","0.25em"),0!==n&&e.attr("dx",n+"em"),++r}}addAlternativeNames(t,e,n=0){let r=0;for(let n of e.data.alternativeNames){let i=t.append("tspan").text(n);0!==r&&i.attr("dx",(e.data.isAltRtl?-.25:.25)+"em"),++r}}addMarriageDate(t,e){e.data.parentMarriage&&t.append("tspan").text("⚭ "+e.data.parentMarriage)}truncateNames(t,e,n){let r=this.getAvailableWidth(e,n);t.selectAll("tspan:not(.preferred):not(.lastName)").nodes().reverse().forEach((e=>{gt(e).each(this.truncateText(t,r))})),t.selectAll("tspan.preferred").each(this.truncateText(t,r)),t.selectAll("tspan.lastName").each(this.truncateText(t,r))}truncateText(t,e){let n=this;return function(){let r=n.getTextLength(t),i=gt(this),a=i.text().split(/\s+/);for(let o=a.length-1;o>=0;--o)r>e&&(a[o]=a[o].slice(0,1)+".",i.text(a.join(" ")),r=n.getTextLength(t))}}truncateDate(t,e){let n=this;return function(){let r=n.getTextLength(t),i=gt(this),a=i.text();for(;r>e&&a.length>1;)a=a.slice(0,-1).trim(),i.text(a),r=n.getTextLength(t);"."===a[a.length-1]&&i.text(a.slice(0,-1).trim())}}getTextLength(t){let e=0;return t.selectAll("tspan").each((function(){e+=this.getComputedTextLength()})),e}isInnerLabel(t){return t.depth>0&&t.depth<=this._configuration.numberOfInnerCircles}createPathDefinition(t,e,n){let r="path-"+t+"-"+e;if(this._svg.defs.get().select("path#"+r).node())return r;let i=this.isPositionFlipped(n.depth,n.x0,n.x1),a=this._geometry.startAngle(n.depth,n.x0),o=this._geometry.endAngle(n.depth,n.x1),s=this._geometry.relativeRadius(n.depth,this.getTextOffset(i,e));this._configuration.showParentMarriageDates&&4===e&&n.depth<1&&(a=this._geometry.calcAngle(n.x0),o=this._geometry.calcAngle(n.x1));let u=gi().startAngle(i?o:a).endAngle(i?a:o).innerRadius(s).outerRadius(s);return u.padAngle(this._configuration.padAngle).padRadius(this._configuration.padRadius).cornerRadius(this._configuration.cornerRadius),this._svg.defs.get().append("path").attr("id",r).attr("d",u),r}isPositionFlipped(t,e,n){if(360!==this._configuration.fanDegree||t<=1)return!1;const r=this._geometry.startAngle(t,e),i=this._geometry.endAngle(t,n);return r>=90*zi&&i<=180*zi||r>=-180*zi&&i<=-90*zi}getTextOffset(t,e){return t?[23,42,61,84,125][e]:[73,54,35,12,120][e]}getAvailableWidth(t,e){if(t.depth>this._configuration.numberOfInnerCircles)return this._configuration.outerArcHeight-2*this._configuration.textPadding-this._configuration.circlePadding;let n=2*this._configuration.centerCircleRadius-.15*this._configuration.centerCircleRadius;if(t.depth>=1){let r=this.isPositionFlipped(t.depth,t.x0,t.x1);n=this._geometry.arcLength(t,this.getTextOffset(r,e))}return n-2*this._configuration.textPadding-this._configuration.padDistance/2}transformOuterText(t,e){let n=this,r=t.selectAll("text"),i=r.size(),a=1;switch(e.depth){case 0:case 5:a=1.5;break;case 1:a=6.5;break;case 2:a=3.5;break;case 3:a=2.2;break;case 4:a=1.9;break;case 6:a=.5}let o=gr().domain([0,i-1]).range([-a,a]);r.each((function(t,r){const i=o(r)*n._configuration.fontScale/100;0===e.depth?gt(this).attr("dy",14*i+7+"px"):gt(this).attr("transform",(function(){let t=e.x1-e.x0,r=n._geometry.scale(e.x0+t/2)*Ci,a=r-i*(r>0?-1:1),o=n._geometry.centerRadius(e.depth)-n._configuration.colorArcWidth/2;return r>0?a-=90:(o=-o,a+=90),"rotate("+a+") translate("+o+")"}))}))}}class Oi{constructor(t,e,n,r){this._svg=t,this._configuration=e,this._geometry=new Di(this._configuration),this.init(n,r)}init(t,e){if(t.classed("new")&&this._configuration.hideEmptySegments?this.addArcToPerson(t,e):t.classed("new")||t.classed("update")||t.classed("remove")||""===e.data.xref&&this._configuration.hideEmptySegments||this.addArcToPerson(t,e),""!==e.data.xref){this.addTitleToPerson(t,e.data.name);let n=new Ii(this._svg,this._configuration),r=this.addLabelToPerson(t,e);n.createLabels(r,e),this.addColorGroup(t,e),t.on("contextmenu",((t,e)=>{this._svg.div.property("active")?(this._svg.div.transition().duration(200).style("opacity",0),this._svg.div.property("active",!1),t.preventDefault()):(this._svg.div.property("active",!0),this.setTooltipHtml(e),t.preventDefault())})).on("mouseenter",((t,e)=>{""===e.data.xref&&this._svg.div.style("opacity",0),this.setTooltipHtml(e)})).on("mouseleave",((t,e)=>{""===e.data.xref&&this._svg.div.style("opacity",0)})).on("mousemove",((t,e)=>{this._svg.div.style("left",t.pageX+"px").style("top",t.pageY-30+"px")})).on("mouseover",(function(e,n){const r=t.nodes(),i=r.indexOf(this);gt(r[i]).classed("hover",!0).raise()})).on("mouseout",(function(e,n){const r=t.nodes(),i=r.indexOf(this);gt(r[i]).classed("hover",!1)}))}}setTooltipHtml(t){if(""===t.data.xref)return;let e="";this._configuration.showImages&&(t.data.thumbnail?(e='
',e+='',e+="
"):this._configuration.showSilhouettes&&(e='
',e+='',e+="
"));const n=t.data.birth||t.data.marriage||t.data.death;this._svg.div.html(e+'
'+t.data.name+"
"+(n?""+(t.data.birth?'":"")+(t.data.marriage?'":"")+(t.data.death?'":"")+"
'+t.data.birth+"
'+t.data.marriage+"
'+t.data.death+"
":"")+"
").style("left",event.pageX+"px").style("top",event.pageY-30+"px"),this._svg.div.property("active")&&this._svg.div.transition().duration(200).style("opacity",1)}addColorGroup(t,e){let n=gi().startAngle(this._geometry.startAngle(e.depth,e.x0)).endAngle(this._geometry.endAngle(e.depth,e.x1)).innerRadius(this._geometry.outerRadius(e.depth)-this._configuration.colorArcWidth).outerRadius(this._geometry.outerRadius(e.depth)+1);n.padAngle(this._configuration.padAngle).padRadius(this._configuration.padRadius),t.append("g").attr("class","color").append("path").attr("fill",(()=>this._configuration.showColorGradients?e.depth?"url(#grad-"+e.data.id+")":"rgb(225, 225, 225)":e.data.color)).attr("d",n)}addArcToPerson(t,e){let n=gi().startAngle(this._geometry.startAngle(e.depth,e.x0)).endAngle(this._geometry.endAngle(e.depth,e.x1)).innerRadius(this._geometry.innerRadius(e.depth)).outerRadius(this._geometry.outerRadius(e.depth));n.padAngle(this._configuration.padAngle).padRadius(this._configuration.padRadius).cornerRadius(this._configuration.cornerRadius);let r=t.append("g").attr("class","arc").append("path").attr("d",n);t.classed("new")&&r.style("opacity",1e-6)}addTitleToPerson(t,e){t.insert("title",":first-child").text(e)}addLabelToPerson(t,e){return t.append("g").attr("class","name").style("font-size",this.getFontSize(e)+"px").style("fill",this._configuration.fontColor)}getFontSize(t){let e=this._configuration.fontSize;return t.depth>=this._configuration.numberOfInnerCircles+1&&(e+=1),(e-t.depth)*this._configuration.fontScale/100}}class Li{constructor(t,e){this._svg=t,this._configuration=e,this._geometry=new Di(this._configuration)}init(t){if(t.depth<1)return;if(1===t.depth){let e=[64,143,222],n=[161,219,117];t.data.sex===wi&&(e=[218,102,13],n=[235,201,33]),t.data.colors=[e,n]}else{let e=[Math.ceil((t.parent.data.colors[0][0]+t.parent.data.colors[1][0])/2),Math.ceil((t.parent.data.colors[0][1]+t.parent.data.colors[1][1])/2),Math.ceil((t.parent.data.colors[0][2]+t.parent.data.colors[1][2])/2)];t.data.sex===yi&&(t.data.colors[0]=t.parent.data.colors[0],t.data.colors[1]=e),t.data.sex===wi&&(t.data.colors[0]=e,t.data.colors[1]=t.parent.data.colors[1])}let e=this._svg.defs.get().append("svg:linearGradient").attr("id","grad-"+t.data.id);e.append("svg:stop").attr("offset","0%").attr("stop-color","rgb("+t.data.colors[0].join(",")+")"),e.append("svg:stop").attr("offset","100%").attr("stop-color","rgb("+t.data.colors[1].join(",")+")")}}class $i{constructor(t,e,n){this._svg=t,this._configuration=e,this._hierarchy=n}update(t,e){let n=this;this._svg.get().selectAll("g.person").classed("hover",!1).on("click",null).on("mouseover",null).on("mouseout",null),function(t,e){return fetch(t,e).then(vi)}(t).then((t=>{this._hierarchy.init(t),this._svg.get().selectAll("g.person").data(this._hierarchy.nodes,(t=>t.data.id)).each((function(t){let e=""===t.data.xref,r=gt(this);r.classed("remove",e).classed("update",!e&&r.classed("available")).classed("new",!e&&!r.classed("available")),r.classed("new")||r.selectAll("g.name, g.color, title").classed("old",!0),new Oi(n._svg,n._configuration,r,t)})),this._svg.get().selectAll("g.person:not(.remove)").selectAll("g.name:not(.old), g.color:not(.old)").style("opacity",1e-6);let r=Sn().duration(this._configuration.updateDuration).call(this.endAll,(()=>this.updateDone(e)));this._svg.get().selectAll("g.person.remove g.arc path").transition(r).style("fill",(()=>this._configuration.hideEmptySegments?null:"rgb(235, 235, 235)")).style("opacity",(()=>this._configuration.hideEmptySegments?1e-6:null)),this._svg.get().selectAll("g.person.new g.arc path").transition(r).style("fill","rgb(250, 250, 250)").style("opacity",(()=>this._configuration.hideEmptySegments?1:null)),this._svg.get().selectAll("g.person.update, g.person.remove").selectAll("g.name.old, g.color.old").transition(r).style("opacity",1e-6),this._svg.get().selectAll("g.person:not(.remove)").selectAll("g.name:not(.old), g.color:not(.old)").transition(r).style("opacity",1)}))}updateDone(t){this._configuration.hideEmptySegments&&this._svg.get().selectAll("g.person.remove").selectAll("g.arc").remove();let e=Ot((()=>{this._svg.get().selectAll("g.person g.arc path").attr("style",null),this._svg.get().selectAll("g.person g.name, g.person g.color").style("opacity",null),e.stop()}),10);this._svg.get().selectAll("g.person.new, g.person.update, g.person.remove").classed("new",!1).classed("update",!1).classed("remove",!1).selectAll("g.name.old, g.color.old, title.old").remove(),this._svg.get().selectAll("g.person.available").classed("available",!1),t()}endAll(t,e){let n=0;t.on("start",(()=>++n)).on("end",(()=>{--n||e.apply(t)}))}}class Bi{constructor(t,e){this._configuration=e,this._parent=t,this._hierarchy=new xi(this._configuration),this._data={}}get svg(){return this._svg}updateViewBox(){let t=this._svg.visual.node().getBBox(),e=this._parent.node().getBoundingClientRect(),n=Math.max(e.width,t.width),r=Math.max(e.height,t.height,500),i=(n-t.width)/2,a=(r-t.height)/2,o=Math.ceil(t.x-i-10),s=Math.ceil(t.y-a-10);n=Math.ceil(n+20),r=Math.ceil(r+20),this._svg.get().attr("viewBox",[o,s,n,r])}get data(){return this._data}set data(t){this._data=t,this._hierarchy.init(this._data)}draw(){this._parent.html(""),this._svg=new Ti(this._parent,this._configuration),this._overlay=new bi(this._parent),this._svg.initEvents(this._overlay);let t=this._svg.get().select("g.personGroup"),e=new Li(this._svg,this._configuration),n=this;t.selectAll("g.person").data(this._hierarchy.nodes,(t=>t.data.id)).enter().append("g").attr("class",(t=>"person depth-"+t.depth)).attr("id",(t=>"person-"+t.data.id)),t.selectAll("g.person").each((function(t){let r=gt(this);n._configuration.showColorGradients&&e.init(t),new Oi(n._svg,n._configuration,r,t)})),this.bindClickEventListener(),this.updateViewBox()}bindClickEventListener(){this._svg.get().select("g.personGroup").selectAll("g.person").filter((t=>""!==t.data.xref)).classed("available",!0).on("click",this.personClick.bind(this))}personClick(t,e){0===e.depth?this.redirectToIndividual(e.data.url):this.update(e.data.updateUrl)}redirectToIndividual(t){window.location=t}update(t){new $i(this._svg,this._configuration,this._hierarchy).update(t,(()=>this.bindClickEventListener()))}}t.FanChart=class{constructor(t,e){this._selector=t,this._parent=gt(this._selector),this._configuration=new _i(e.labels,e.generations,e.fanDegree,e.defaultColor,e.fontScale,e.fontColor,e.hideEmptySegments,e.showColorGradients,e.showParentMarriageDates,e.showImages,e.showSilhouettes,e.rtl,e.innerArcs),this._chart=new Bi(this._parent,this._configuration),this.init()}init(){gt("#centerButton").on("click",(()=>this.center())),gt("#exportPNG").on("click",(()=>this.exportPNG())),gt("#exportSVG").on("click",(()=>this.exportSVG()))}center(){this._chart.svg.get().transition().duration(750).call(this._chart.svg.zoom.get().transform,Mr)}get configuration(){return this._configuration}set cssFile(t){this._cssFile=t}draw(t){this._chart.data=t,this._chart.draw()}exportPNG(){this._chart.svg.export("png").svgToImage(this._chart.svg,"fan-chart.png")}exportSVG(){this._chart.svg.export("svg").svgToImage(this._chart.svg,this._cssFile,"fan-chart.svg")}},t.Storage=class{constructor(t){this._name=t,this._storage=JSON.parse(localStorage.getItem(this._name))||{}}register(t){let e=document.getElementById(t),n=this.read(t);n?e.type&&"checkbox"===e.type?e.checked=n:e.value=n:this.onInput(e),e.addEventListener("input",(t=>{this.onInput(t.target)}))}onInput(t){t.type&&"checkbox"===t.type?this.write(t.name,t.checked):this.write(t.name,t.value)}read(t){return this._storage[t]}write(t,e){this._storage[t]=e,localStorage.setItem(this._name,JSON.stringify(this._storage))}},Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).WebtreesFanChart={}); diff --git a/src/Module.php b/src/Module.php index 7df48ae..b30f28d 100644 --- a/src/Module.php +++ b/src/Module.php @@ -60,7 +60,7 @@ class Module extends AbstractModule implements ModuleCustomInterface, ModuleChar /** * @var string */ - public const CUSTOM_VERSION = '2.2.3-dev'; + public const CUSTOM_VERSION = '2.3.0'; /** * @var string