@nebula.js/sn-org-chart 1.3.0 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/core/esm/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  /*
2
- * @nebula.js/sn-org-chart v1.3.0
2
+ * @nebula.js/sn-org-chart v1.4.1
3
3
  * Copyright (c) 2025 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
6
6
 
7
7
  import{useState as e,useSelections as t,useLayout as n,useEffect as r,useAction as o,useElement as a,onTakeSnapshot as i,useImperativeHandle as l,useStaleLayout as s,useModel as u,useTheme as c,useOptions as d,useRect as h,useConstraints as p,useTranslator as f,useMemo as g,usePromise as m}from"@nebula.js/stardust";function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],s=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){u=!0,o=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return l}}(e,t)||x(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e){return function(e){if(Array.isArray(e))return b(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||x(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(e,t){if(e){if("string"==typeof e)return b(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?b(e,t):void 0}}var w=["American Typewriter, serif","Andalé Mono, monospace","Arial Black, sans-serif","Arial, sans-serif","Bradley Hand, cursive","Brush Script MT, cursive","Comic Sans MS, cursive","Courier, monospace","Didot, serif","Georgia, serif","Impact, sans-serif","Lucida Console, monospace","Luminari, fantasy","Monaco, monospace","QlikView Sans, sans-serif","Source Sans Pro, sans-serif","Tahoma, sans-serif","Times New Roman, serif","Trebuchet MS, sans-serif","Verdana, sans-serif"],_=["Abril Fatface, serif","Bangers, fantasy","Bebas Neue, sans serif","EB Garamond, serif","Fredoka One, fantasy","Graduate, fantasy","Gravitas One, serif","Indie Flower, fantasy","Inter, sans-serif","Lobster, fantasy","Montserrat, sans-serif","Nixie One, sans-serif","Noto Sans, sans-serif","Open Sans, sans-serif","PT Serif, serif","Pacifico, cursive","Permanent Marker, fantasy","QlikView Sans, sans-serif","Raleway, sans-serif","Rammetto One, fantasy","Roboto, sans-serif","Source Sans Pro, sans-serif","Titan One, fantasy","Yanone Kaffeesatz, sans-serif"];var C=function(e){return{value:e,label:e.charAt(0).toUpperCase()+e.slice(1),groupHeader:!1,disabled:!1,styles:{fontFamily:e}}};function O(e){var t=e.theme,n=e.translator,r=e.defaultValue,o=e.flags,a=[],i=t.getStyle("","","fontFamilies");return Array.isArray(i)&&i.length?a.push.apply(a,y(new Set([r].concat(y(i.map((function(e){return e.split(",").map((function(e){return e.trim()})).map((function(e){return e.replace(/\s+/g," ").trim()})).filter(Boolean).join(", ")}))))))):a.push(r),[{value:"ThemeHeader",label:n.get("properties.themeFonts"),metaText:n.get("properties.theme"),groupHeader:!0}].concat(y(a.map((function(e){return C(e)}))),[{value:"DefaultHeader",label:n.get("properties.allFonts"),metaText:n.get("properties.default"),groupHeader:!0}],y(function(e){return null!=e&&e.isEnabled("PS_20852_WYSIWYG_FONT_SUPPORT")?_:w}(o).map((function(e){return C(e)}))))}function k(e){var t=e.theme,n=e.translator,r=e.id,o=e.path,a=e.flags,i=function(){return t.getStyle(r,o,"fontFamily")};return{getDefaultValue:function(){return i()},getOptions:function(){return O({theme:t,translator:n,defaultValue:i(),flags:a})}}}var E,S,L=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],R=function(e){return{value:e,label:e,groupHeader:!1,disabled:!1}};function T(e){var t=e.theme,n=e.translator,r=e.id,o=e.path,a=function(){return t.getStyle(r,o,"fontSize")};return{getDefaultValue:function(){return a()},getOptions:function(){return function(e){var t=e.translator,n=e.defaultValue,r=[],o=e.theme.getStyle("","","fontSizes");return Array.isArray(o)&&o.length?r.push.apply(r,y(new Set([n].concat(y(o))))):r.push(n),[{value:"ThemeHeader",label:t.get("properties.themeFontSizes"),metaText:t.get("properties.theme"),groupHeader:!0}].concat(y(r.map((function(e){return R(e)}))),[{value:"DefaultHeader",label:t.get("properties.allFontSizes"),metaText:t.get("properties.default"),groupHeader:!0}],y(L.map((function(e){return R(e)}))))}({theme:t,translator:n,defaultValue:a()})}}}function A(e){var t=e.theme,n=e.translator,r=e.id,o=e.path;return{fontFamily:k({theme:t,translator:n,id:r,path:o,flags:e.flags}),fontSize:T({theme:t,translator:n,id:r,path:o})}}var N,z=function(){if(S)return E;S=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},a=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,o=e.call(n,"constructor"),a=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!o&&!a)return!1;for(r in n);return void 0===r||e.call(n,r)},i=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return E=function e(){var t,n,r,s,u,c,d=arguments[0],h=1,p=arguments.length,f=!1;for("boolean"==typeof d&&(f=d,d=arguments[1]||{},h=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});h<p;++h)if(null!=(t=arguments[h]))for(n in t)r=l(d,n),d!==(s=l(t,n))&&(f&&s&&(a(s)||(u=o(s)))?(u?(u=!1,c=r&&o(r)?r:[]):c=r&&a(r)?r:{},i(d,{name:n,newValue:e(f,c,s)})):void 0!==s&&i(d,{name:n,newValue:s}));return d},E}();function M(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function j(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function I(){}(N=z)&&N.__esModule&&Object.prototype.hasOwnProperty.call(N,"default")&&N.default;var D=1/.7,$="\\s*([+-]?\\d+)\\s*",B="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",P="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",q=/^#([0-9a-f]{3,8})$/,F=new RegExp(`^rgb\\(${$},${$},${$}\\)$`),V=new RegExp(`^rgb\\(${P},${P},${P}\\)$`),U=new RegExp(`^rgba\\(${$},${$},${$},${B}\\)$`),H=new RegExp(`^rgba\\(${P},${P},${P},${B}\\)$`),K=new RegExp(`^hsl\\(${B},${P},${P}\\)$`),G=new RegExp(`^hsla\\(${B},${P},${P},${B}\\)$`),Z={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 Y(){return this.rgb().formatHex()}function W(){return this.rgb().formatRgb()}function X(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=q.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?J(t):3===n?new ne(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Q(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Q(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=F.exec(e))?new ne(t[1],t[2],t[3],1):(t=V.exec(e))?new ne(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=U.exec(e))?Q(t[1],t[2],t[3],t[4]):(t=H.exec(e))?Q(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=K.exec(e))?se(t[1],t[2]/100,t[3]/100,1):(t=G.exec(e))?se(t[1],t[2]/100,t[3]/100,t[4]):Z.hasOwnProperty(e)?J(Z[e]):"transparent"===e?new ne(NaN,NaN,NaN,0):null}function J(e){return new ne(e>>16&255,e>>8&255,255&e,1)}function Q(e,t,n,r){return r<=0&&(e=t=n=NaN),new ne(e,t,n,r)}function ee(e){return e instanceof I||(e=X(e)),e?new ne((e=e.rgb()).r,e.g,e.b,e.opacity):new ne}function te(e,t,n,r){return 1===arguments.length?ee(e):new ne(e,t,n,null==r?1:r)}function ne(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function re(){return`#${le(this.r)}${le(this.g)}${le(this.b)}`}function oe(){const e=ae(this.opacity);return`${1===e?"rgb(":"rgba("}${ie(this.r)}, ${ie(this.g)}, ${ie(this.b)}${1===e?")":`, ${e})`}`}function ae(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ie(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function le(e){return((e=ie(e))<16?"0":"")+e.toString(16)}function se(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new ce(e,t,n,r)}function ue(e){if(e instanceof ce)return new ce(e.h,e.s,e.l,e.opacity);if(e instanceof I||(e=X(e)),!e)return new ce;if(e instanceof ce)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),a=Math.max(t,n,r),i=NaN,l=a-o,s=(a+o)/2;return l?(i=t===a?(n-r)/l+6*(n<r):n===a?(r-t)/l+2:(t-n)/l+4,l/=s<.5?a+o:2-a-o,i*=60):l=s>0&&s<1?0:i,new ce(i,l,s,e.opacity)}function ce(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function de(e){return(e=(e||0)%360)<0?e+360:e}function he(e){return Math.max(0,Math.min(1,e||0))}function pe(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}M(I,X,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Y,formatHex:Y,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return ue(this).formatHsl()},formatRgb:W,toString:W}),M(ne,te,j(I,{brighter(e){return e=null==e?D:Math.pow(D,e),new ne(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new ne(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ne(ie(this.r),ie(this.g),ie(this.b),ae(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:re,formatHex:re,formatHex8:function(){return`#${le(this.r)}${le(this.g)}${le(this.b)}${le(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:oe,toString:oe})),M(ce,(function(e,t,n,r){return 1===arguments.length?ue(e):new ce(e,t,n,null==r?1:r)}),j(I,{brighter(e){return e=null==e?D:Math.pow(D,e),new ce(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new ce(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new ne(pe(e>=240?e-240:e+120,o,r),pe(e,o,r),pe(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new ce(de(this.h),he(this.s),he(this.l),ae(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 e=ae(this.opacity);return`${1===e?"hsl(":"hsla("}${de(this.h)}, ${100*he(this.s)}%, ${100*he(this.l)}%${1===e?")":`, ${e})`}`}}));const fe=Math.PI/180,ge=180/Math.PI,me=4/29,be=6/29,ve=3*be*be;function ye(e){if(e instanceof xe)return new xe(e.l,e.a,e.b,e.opacity);if(e instanceof ke)return Ee(e);e instanceof ne||(e=ee(e));var t,n,r=Oe(e.r),o=Oe(e.g),a=Oe(e.b),i=we((.2225045*r+.7168786*o+.0606169*a)/1);return r===o&&o===a?t=n=i:(t=we((.4360747*r+.3850649*o+.1430804*a)/.96422),n=we((.0139322*r+.0971045*o+.7141733*a)/.82521)),new xe(116*i-16,500*(t-i),200*(i-n),e.opacity)}function xe(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function we(e){return e>.008856451679035631?Math.pow(e,1/3):e/ve+me}function _e(e){return e>be?e*e*e:ve*(e-me)}function Ce(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Oe(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function ke(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function Ee(e){if(isNaN(e.h))return new xe(e.l,0,0,e.opacity);var t=e.h*fe;return new xe(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}M(xe,(function(e,t,n,r){return 1===arguments.length?ye(e):new xe(e,t,n,null==r?1:r)}),j(I,{brighter(e){return new xe(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new xe(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new ne(Ce(3.1338561*(t=.96422*_e(t))-1.6168667*(e=1*_e(e))-.4906146*(n=.82521*_e(n))),Ce(-.9787684*t+1.9161415*e+.033454*n),Ce(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),M(ke,(function(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof ke)return new ke(e.h,e.c,e.l,e.opacity);if(e instanceof xe||(e=ye(e)),0===e.a&&0===e.b)return new ke(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*ge;return new ke(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new ke(e,t,n,null==r?1:r)}),j(I,{brighter(e){return new ke(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new ke(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return Ee(this).rgb()}}));var Se=e=>()=>e;function Le(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Se(isNaN(e)?t:e)}!function e(t){var n=function(e){return 1==(e=+e)?Le:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):Se(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=te(e)).r,(t=te(t)).r),o=n(e.g,t.g),a=n(e.b,t.b),i=Le(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=a(t),e.opacity=i(t),e+""}}return r.gamma=e,r}(1);var Re="center",Te="bottom";[{key:"NoDataExist",alignment:Re,condition:function(e){var t=e.layoutService;if(!t)return!1;var n=t.meta.size;return n.x*n.y==0}},{key:"OnlyNanDataMeasure",translationKey:"OnlyNanData",alignment:Re,condition:function(e){var t=e.layoutService;return!!t&&t.getHyperCubeValue("qMeasureInfo").every((function(e){return"NaN"===e.qMin&&"NaN"===e.qMax}))}},{key:"OnlyNanDataDimensionContinuous",translationKey:"OnlyNanData",alignment:Re,condition:function(e){var t=e.layoutService;if(!t)return!1;if(!t.meta.isContinuous)return!1;var n=t.getHyperCubeValue("qDimensionInfo.0");return n&&(n.qMax<n.qMin||"NaN"===n.qMax)}},{key:"OnlyNegativeOrZeroValues",alignment:Re},{key:"DataRangeIncludingZero",alignment:Te},{key:"LimitedData",alignment:Te},{key:"NegativeOrZeroValues",alignment:Te}].reduce((function(e,t){return e[t.key]=t,e}),{});var Ae,Ne=["__proto__","constructor"];function ze(e,t,n){if(void 0!==e&&void 0!==t){var r=t.split("."),o=r[r.length-1];if(!Ne.some((function(e){return r.includes(e)}))){for(var a=e,i=0;i<r.length-1;++i){var l=r[i];void 0===a[l]&&(a[l]=Number.isNaN(+r[i+1])?{}:[]),a=a[l]}void 0!==n?a[o]=n:delete a[o]}}}function Me(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function je(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=De)):void 0===t&&(t=Ie);for(var n,r,o,a,i,l=new Pe(e),s=[l];n=s.pop();)if((o=t(n.data))&&(i=(o=Array.from(o)).length))for(n.children=o,a=i-1;a>=0;--a)s.push(r=o[a]=new Pe(o[a])),r.parent=n,r.depth=n.depth+1;return l.eachBefore(Be)}function Ie(e){return e.children}function De(e){return Array.isArray(e)?e[1]:null}function $e(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function Be(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function Pe(e){this.data=e,this.depth=this.height=0,this.parent=null}Pe.prototype=je.prototype={constructor:Pe,count:function(){return this.eachAfter(Me)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,o,a=this,i=[a],l=[],s=-1;a=i.pop();)if(l.push(a),n=a.children)for(r=0,o=n.length;r<o;++r)i.push(n[r]);for(;a=l.pop();)e.call(t,a,++s,this);return this},eachBefore:function(e,t){for(var n,r,o=this,a=[o],i=-1;o=a.pop();)if(e.call(t,o,++i,this),n=o.children)for(r=n.length-1;r>=0;--r)a.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,o=r&&r.length;--o>=0;)n+=r[o].value;t.value=n}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),o=null;for(e=n.pop(),t=r.pop();e===t;)o=e,e=n.pop(),t=r.pop();return o}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var o=r.length;e!==n;)r.splice(o,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return je(this).eachBefore($e)},[Symbol.iterator]:function*(){var e,t,n,r,o=this,a=[o];do{for(e=a.reverse(),a=[];o=e.pop();)if(yield o,t=o.children)for(n=0,r=t.length;n<r;++n)a.push(t[n])}while(a.length)}},Ae=function(e){
8
8
  /*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
9
- e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,o,a,i,l,s,u,c,d,h=e.length,p=e.search(/[0-9\-\+#]/),f=p>0?e.substring(0,p):"",g=e.split("").reverse().join(""),m=g.search(/[0-9\-\+#]/),b=h-m,v=e.substring(b,b+1),y=b+("."===v||","===v?1:0),x=m>0?e.substring(y,h):"";if(n=(t="-"===(e=e.substring(p,y)).charAt(0)?-t:+t)<0?t=-t:0,o=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",a=r&&r[1]&&r[0]||",",e=e.split(o),t=+(t=t.toFixed(e[1]&&e[1].length))+"",l=e[1]&&e[1].lastIndexOf("0"),(!(u=t.split("."))[1]||u[1]&&u[1].length<=l)&&(t=(+t).toFixed(l+1)),c=e[0].split(a),e[0]=c.join(""),(i=e[0]&&e[0].indexOf("0"))>-1)for(;u[0].length<e[0].length-i;)u[0]="0"+u[0];else 0==+u[0]&&(u[0]="");if((t=t.split("."))[0]=u[0],s=c[1]&&c[c.length-1].length){for(g="",b=(d=t[0]).length%s,h=d.length,y=0;y<h;y++)g+=d.charAt(y),!((y-b+1)%s)&&y<h-s&&(g+=a);t[0]=g}return t[1]=e[1]&&t[1]?o+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),f+(n?"-":"")+r+x}},Ae({exports:{}});var qe="'Source Sans Pro', 'Arial', 'sans-serif'",Fe="#333333",Ve="#595959",Ue="#737373",He="#cccccc",Ke="#e6e6e6";function Ge(e){var t={};return[].concat(y(e),y([["","","color"],["object","","fontFamily"],["object","axis.label.name","color",Ve],["object","axis.label.name","fontFamily",qe],["object","axis.label.name","fontSize","12px"],["object","axis.line.major","color",He],["object","axis.line.minor","color",Ke],["object","axis.title","color"],["object","axis.title","fontFamily",qe],["object","axis.title","fontSize","13px"],["object","grid.line.highContrast","color",Ke],["object","grid.line.major","color",He],["object","grid.line.minor","color",Ke],["object","label.value","color",Ve],["object","label.value","fontFamily",qe],["object","label.value","fontSize","12px"],[!1,"label.value","darkColor",Ve],[!1,"label.value","lightColor",Ke],["object","outOfRange","color","#999"],["object","legend.title","color",Fe],["object","legend.title","fontFamily",qe],["object","legend.title","fontSize","15px"],["object","legend.label","color",Ve],["object","legend.label","fontFamily",qe],["object","legend.label","fontSize","13px"],["object","referenceLine.label.name","color",Fe],["object","referenceLine.label.name","fontFamily",qe],["object","referenceLine.label.name","fontSize","12px"],["object","referenceLine.outOfBounds","color",Ke],["object","referenceLine.outOfBounds","fontFamily",qe],["object","referenceLine.outOfBounds","fontSize","12px"],["object","referenceLine.outOfBounds","backgroundColor",Ue,function(e){return"transparent"===e?Ue:e}]])).reduce((function(e,n){var r="".concat(n[0],"-").concat(n[1],"-").concat(n[2],"}");return t[r]||(t[r]=!0,e.push(n)),e}),[]).sort((function(e,t){return(e[0].split?e[0].split(".").length:0)-(t[0].split?t[0].split(".").length:0)}))}var Ze=function(e){return e};function Ye(e){var t=e.theme,n=e.id,r=e.transform,o=e.extend,a=e.matrix,i={},l=r.reduce((function(e,t){var n=v(t,2),r=n[0],o=n[1];return e[r]=o,e}),{});return a.forEach((function(e){var r=v(e,5),o=r[0],a=r[1],s=r[2],u=r[3],c=r[4],d=void 0===c?function(e){return e}:c,h=function(e){var t=e.theme,n=e.base,r=e.path,o=e.attribute,a=e.defaultValue,i=void 0===a?void 0:a;if(!t||!1===n)return i;var l=t.getStyle(n,r,o);return void 0===l?i:l}({theme:t,base:"object"===o&&n?"".concat("object",".").concat(n):o,path:a,attribute:s,defaultValue:u}),p=(l["".concat(a,".").concat(s)]||Ze)(d(h));ze(i,[a,s].filter(Boolean).join("."),p)})),o.forEach((function(e){var t=v(e,2),n=t[0],r=t[1];ze(i,n,r)})),i}var We={targets:[{path:"/qHyperCubeDef",dimensions:{min:2,max:2},measures:{min:0,max:1}}]},Xe={CARD_TITLE_FONTSIZE:"14px",CARD_BODY_FONTSIZE:"11px",FONT_COLOR_TYPE:"auto",FONT_COLOR_DARK:{index:-1,color:"#484848"},FONT_COLOR_LIGHT:{color:"#e6e6e6"},BACKGROUND_COLOR_TYPE:"colorPicker",BACKGROUND_COLOR:{index:-1,color:"#ffffff"},BORDER_COLOR_TYPE:"auto",BORDER_COLOR:{index:-1,color:"#737373"},BORDER_FULL:!0,BORDER_TOP:!0,FONT_COLOR_USE_EXPRESSION:!1,BACKGROUND_USE_EXPRESSION:!1,BORDER_USE_EXPRESSION:!1,IMAGE_LOCATION:"both",IMAGE_ALIGNMENT:"left",IMAGE_SHAPE:"rectangle",IMAGE_CLIP:!0};var Je={getValue:function(e,t,n){const r=t.split(".");let o;if(void 0===e)return n;let a=e;for(o=0;o<r.length;++o){if(void 0===a[r[o]])return n;a=a[r[o]]}return a}};const Qe=[{value:!1,translation:"properties.colorMode.primary"},{value:!0,translation:"properties.colorMode.byExpression"}],et=e=>{var t;return null===(t=e.contrastTextColor)||void 0===t||t};function tt(e,t,n){const r=`${e}.${t}`,o=`${r}.fontFamily`,a=`${r}.fontSize`,i=`${r}.color`,l=`${r}.colorExpression`;return{fontFamilyItem:{component:"dropdown",ref:o,options:()=>n.getOptions(`card.${o}`),defaultValue:()=>n.getDefaultValue(`card.${o}`)},fontSizeItem:{component:"dropdown",ref:a,options:()=>n.getOptions(`card.${a}`),defaultValue:()=>n.getDefaultValue(`card.${a}`)},fontColorWrapperItem:{component:"inline-wrapper",items:{useColorExpression:{ref:`${r}.useColorExpression`,width:!0,component:"dropdown",defaultValue:Xe.FONT_COLOR_USE_EXPRESSION,options:Qe,show:e=>!et(e)},colorPicker:{component:"color-picker",ref:i,width:!1,dualOutput:!0,defaultValue:Xe.FONT_COLOR_DARK,show:n=>{var r;return!(et(n)||null!==(r=n[e])&&void 0!==r&&null!==(r=r[t])&&void 0!==r&&r.useColorExpression)}}}},colorExpression:{component:"input-field-expression",type:"string",ref:l,width:!0,expression:"optional",defaultValue:"",show:n=>{var r;return!et(n)&&(null===(r=n[e])||void 0===r||null===(r=r[t])||void 0===r?void 0:r.useColorExpression)}}}}const nt=[{value:!1,translation:"properties.colorMode.primary"},{value:!0,translation:"properties.colorMode.byExpression"}],rt=[{value:"card",translation:"Card only"},{value:"tooltip",translation:"Tooltip only"},{value:"both",translation:"Card and tooltip"}],ot=[{value:"left",translation:"Left"},{value:"right",translation:"Right"},{value:"top",translation:"Top"},{value:"bottom",translation:"Bottom"}],at=[{value:"rectangle",translation:"Rectangle"},{value:"round",translation:"Round"}];function it(e,t,n){const r=function(e){var t=e.theme,n=e.translator,r=e.config,o=void 0===r?{}:r,a=e.flags,i=function(e){var t=e.config,n=void 0===t?{}:t,r=n.id,o=n.paths;return{id:void 0===r?"object":"".concat("object",".").concat(r),paths:Array.isArray(o)?o:[]}}({config:o}),l=i.id,s=i.paths,u={};s.forEach((function(e){for(var r=e.split("."),o=u,i=0;i<r.length;i++){var s=r[i];i===r.length-1?o[s]=A({theme:t,translator:n,id:l,path:e,flags:a}):void 0===o[s]&&(o[s]={}),o=o[s]}}));var c=function(e){for(var t=e.split("."),n=u,r=0;r<t.length;r++){var o=t[r];if(void 0===n[o])throw new Error("font-resolver: Path '".concat(e,"' could not be resolved."));n=n[o]}return n};return u.getDefaultValue=function(e){return c(e).getDefaultValue()},u.getOptions=function(e){return c(e).getOptions()},u}({theme:e,translator:n,flags:t,config:{id:"orgChart",paths:["card.title.main","card.title.subTitle","card.label.description","card.label.measureLabel","card.label.measureValue"]}}),o=e=>{var t,n,r,o;return(null!==(t=null===(n=e.border)||void 0===n?void 0:n.topBar)&&void 0!==t?t:Xe.BORDER_TOP)||(null!==(r=null===(o=e.border)||void 0===o?void 0:o.fullBorder)&&void 0!==r?r:Xe.BORDER_FULL)},a=e=>{var t,n;return null===(t=null===(n=e.border)||void 0===n?void 0:n.contrastColor)||void 0===t||t};return{component:"styling-panel",show:!0,chartType:"orgchart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.OrgChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,useBackground:!0,items:{contrastTextColorSection:{translation:"Object.OrgChart.Card.TextColor",component:"panel-section",items:{contrastTextColorItems:{component:"items",ref:"components",key:"card",items:{useContrast:{component:"checkbox",type:"boolean",ref:"contrastTextColor",translation:"Object.OrgChart.Card.Contrast",defaultValue:!0}}}}},titleSection:{translation:"Object.OrgChart.Card.Title",component:"panel-section",items:{titleItems:{component:"items",ref:"components",key:"card",items:tt("title","main",r)}}},subtitleSection:{translation:"Object.OrgChart.Card.Subtitle",component:"panel-section",items:{subtitleItems:{component:"items",ref:"components",key:"card",items:tt("title","subTitle",r)}}},descriptionSection:{translation:"Object.OrgChart.Card.Description",component:"panel-section",items:{descriptionItems:{component:"items",ref:"components",key:"card",items:tt("label","description",r)}}},measureLabelSection:{translation:"Object.OrgChart.Card.MeasureLabel",component:"panel-section",items:{measureLabelItems:{component:"items",ref:"components",key:"card",items:tt("label","measureLabel",r)}}},measureValueSection:{translation:"Object.OrgChart.Card.MeasureValue",component:"panel-section",items:{measureValueItems:{component:"items",ref:"components",key:"card",items:tt("label","measureValue",r)}}},backgroundColorSection:{component:"panel-section",translation:"Object.OrgChart.ColorLabelExpression",items:{backgroundColorItems:{component:"items",ref:"components",key:"card",items:{fontColorWrapperItem:{component:"inline-wrapper",items:{useColorExpression:{ref:"background.useColorExpression",width:9,component:"dropdown",defaultValue:Xe.BACKGROUND_USE_EXPRESSION,options:nt},colorPicker:{component:"color-picker",type:"object",ref:"background.color",width:3,dualOutput:!0,defaultValue:Xe.BACKGROUND_COLOR,show:e=>{var t;return!(null!==(t=e.background)&&void 0!==t&&t.useColorExpression)}},colorExpression:{component:"input-field-expression",type:"string",ref:"background.colorExpression",expression:"optional",defaultValue:"",show:e=>{var t;return null===(t=e.background)||void 0===t?void 0:t.useColorExpression}}}}}}}},cardBorderSection:{component:"panel-section",translation:"Object.OrgChart.CardAppearance",items:{cardBorderItems:{component:"items",ref:"components",key:"card",items:{topBar:{component:"checkbox",ref:"border.topBar",translation:"Object.OrgChart.TopBar",defaultValue:Xe.BORDER_TOP},fullBorder:{component:"checkbox",ref:"border.fullBorder",translation:"properties.border",defaultValue:Xe.BORDER_FULL},contrastBorderColorSection:{component:"checkbox",type:"boolean",key:"card",ref:"border.contrastColor",translation:"Object.OrgChart.Card.Contrast",defaultValue:!0,show:e=>o(e)},borderColorWrapperItem:{component:"inline-wrapper",items:{useColorExpression:{component:"dropdown",ref:"border.useColorExpression",width:9,translation:"properties.border.color",defaultValue:Xe.BORDER_USE_EXPRESSION,options:nt,show:e=>o(e)&&!a(e)},colorPicker:{component:"color-picker",ref:"border.color",width:3,dualOutput:!0,defaultValue:Xe.BORDER_COLOR,show:e=>{var t;return o(e)&&!a(e)&&!(null!==(t=e.border)&&void 0!==t&&t.useColorExpression)}},colorExpression:{component:"input-field-expression",type:"string",ref:"border.colorExpression",expression:"optional",defaultValue:"",show:e=>{var t;return o(e)&&!a(e)&&(null===(t=e.border)||void 0===t?void 0:t.useColorExpression)}}}}}}}},...(null==t?void 0:t.isEnabled("IM_5036_ORGCHART_STYLING_IMAGE"))&&{imageSection:{component:"panel-section",translation:"Object.OrgChart.ImageOptions",items:{imageItems:{component:"items",ref:"components",key:"card",items:{location:{component:"dropdown",ref:"image.location",translation:"Object.OrgChart.ImageLocation",options:rt,defaultValue:Xe.IMAGE_LOCATION},alignment:{component:"dropdown",ref:"image.alignment",translation:"Object.OrgChart.ImageAlignment",options:ot,defaultValue:Xe.IMAGE_ALIGNMENT},shape:{component:"dropdown",ref:"image.shape",translation:"Object.OrgChart.ImageShape",options:at,defaultValue:Xe.IMAGE_SHAPE},clip:{component:"checkbox",ref:"image.clip",translation:"Object.OrgChart.ImageFit",defaultValue:Xe.IMAGE_CLIP,show:e=>{var t,n;return"rectangle"===(null!==(t=null===(n=e.image)||void 0===n?void 0:n.shape)&&void 0!==t?t:Xe.IMAGE_SHAPE)}}}}}}}}}}const lt=[{value:"auto",translation:"Common.Auto"},{value:"colorPicker",translation:"properties.colorMode.primary"},{value:"byExpression",translation:"properties.colorMode.byExpression"}],st=[{value:"free",translation:"Object.OrgChart.FreeMode"},{value:"expandAll",translation:"Object.OrgChart.ExpandAll"}],ut=e=>Je.getValue(e,"style.border.top")||Je.getValue(e,"style.border.fullBorder"),ct=e=>({uses:"data",items:{measures:{disabledRef:""},dimensions:{disabledRef:"",items:{dimensionLimits:{show:!1},attributes:{component:"attribute-expression-reference",defaultValue:[],show:(e,t)=>t.getDimensions()[0]===e,ref:"qAttributeExpressions",items:[{component:"expression",ref:"qExpression",translation:"Object.OrgChart.LabelExpression",defaultValue:"",id:"labelExpression",tid:"labelExpression"},{component:"expression",ref:"qExpression",translation:"Object.OrgChart.SubLabelExpression",defaultValue:"",id:"subLabelExpression",tid:"subLabelExpression"},{component:"expression",ref:"qExpression",translation:"Object.OrgChart.ExtraLabelExpression",defaultValue:"",id:"extraLabelExpression",tid:"extraLabelExpression"},...null!=e&&e.isEnabled("IM_5036_ORGCHART_STYLING")&&null!=e&&e.isEnabled("IM_5036_ORGCHART_STYLING_IMAGE")?[{component:"expression",ref:"qExpression",translation:"Object.OrgChart.ImageUrl",defaultValue:"",id:"imageExpression",tid:"imageExpression"}]:[],{component:"expression",ref:"qExpression",translation:"Object.OrgChart.ColorLabelExpression",defaultValue:"",id:"colorByExpression",tid:"nodeColorByExpression"}]},desc:{show:(e,t)=>t.getDimensions()[0]===e,component:"text",translation:"Object.OrgChart.ExtraLabelDesc",style:"hint"}}}}}),dt={uses:"sorting"},ht={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"},rowLimit:{type:"integer",translation:"$RowLimit",ref:"rowLimit",defaultValue:3e4,min:5e3,max:1e5,show:!1}}}}},pt=(e,t,n)=>{var r;const o=null==n||null===(r=n.sense)||void 0===r?void 0:r.theme,a={uses:"settings",items:{styling:{grouped:!0,translation:"properties.presentation",type:"items",items:{...(null==t?void 0:t.isEnabled("IM_5036_ORGCHART_STYLING"))&&{orgChartStyling:it(o,t,e)},navigation:{type:"items",items:{navigationMode:{ref:"navigationMode",type:"string",translation:"Object.OrgChart.NavigationMode",component:"dropdown",defaultValue:"free",options:st},resizeOnExpand:{ref:"resizeOnExpand",type:"boolean",defaultValue:!1,translation:"Object.OrgChart.resizeOnExpand",show:e=>"expandAll"!==Je.getValue(e,"navigationMode")}}},backgroundColor:{},fontColor:{},border:{}}}}};return null!=t&&t.isEnabled("IM_5036_ORGCHART_STYLING")||(a.items.styling.items.backgroundColor={type:"items",items:{useColorExpression:{ref:"style.backgroundColor.colorType",type:"string",translation:"Object.OrgChart.BackgroundColor",component:"dropdown",defaultValue:Xe.BACKGROUND_COLOR_TYPE,options:lt},colorPicker:{component:"color-picker",type:"object",ref:"style.backgroundColor.color",translation:"properties.color",dualOutput:!0,defaultValue:Xe.BACKGROUND_COLOR,show:e=>"colorPicker"===Je.getValue(e,"style.backgroundColor.colorType")},colorExpression:{component:"string",type:"string",ref:"style.backgroundColor.colorExpression",translation:"Common.Expression",expression:"optional",defaultValue:"",show:e=>"byExpression"===Je.getValue(e,"style.backgroundColor.colorType")}}},a.items.styling.items.fontColor={type:"items",items:{useColorExpression:{ref:"style.fontColor.colorType",type:"string",translation:"Object.OrgChart.FontColor",component:"dropdown",defaultValue:Xe.FONT_COLOR_TYPE,options:lt},colorPicker:{component:"color-picker",type:"object",ref:"style.fontColor.color",translation:"properties.color",dualOutput:!0,defaultValue:Xe.FONT_COLOR_DARK,show:e=>"colorPicker"===Je.getValue(e,"style.fontColor.colorType")},colorExpression:{component:"string",type:"string",ref:"style.fontColor.colorExpression",translation:"Common.Expression",expression:"optional",defaultValue:"",show:e=>"byExpression"===Je.getValue(e,"style.fontColor.colorType")}}},a.items.styling.items.border={type:"items",items:{appearanceHeader:{component:"text",translation:"Object.OrgChart.CardAppearance",style:"pp-nm-hcd__list-header"},topBar:{type:"boolean",ref:"style.border.top",translation:"Object.OrgChart.TopBar",defaultValue:Xe.BORDER_TOP},fullBorder:{type:"boolean",ref:"style.border.fullBorder",translation:"properties.border",defaultValue:Xe.BORDER_FULL},colorType:{component:"dropdown",type:"string",ref:"style.border.colorType",translation:"properties.border.color",defaultValue:Xe.BORDER_COLOR_TYPE,options:lt,show:e=>ut(e)},colorPicker:{component:"color-picker",type:"object",ref:"style.border.color",translation:"properties.color",dualOutput:!0,defaultValue:Xe.BORDER_COLOR,show:e=>ut(e)&&"colorPicker"===Je.getValue(e,"style.border.colorType")},colorExpression:{component:"string",type:"string",ref:"style.border.colorExpression",translation:"Common.Expression",expression:"optional",defaultValue:"",show:e=>ut(e)&&"byExpression"===Je.getValue(e,"style.border.colorType")}}}),a};function ft(e){return function({translator:e,flags:t,anything:n}){return{definition:{type:"items",component:"accordion",items:{data:ct(t),sorting:dt,addOns:ht,settings:pt(e,t,n)}},support:{export:!0,exportData:!0,snapshot:!0,viewData:!0},migrate:{properties:e=>null!=t&&t.isEnabled("IM_5036_ORGCHART_STYLING")?function(e){var t,n,r,o,a,i,l,s,u,c,d,h;if((null===(t=e.components)||void 0===t?void 0:t.length)>0)return e;function p(e){return{useColorExpression:"byExpression"===e.colorType,color:e.color,colorExpression:e.colorExpression,colorType:e.colorType}}function f(e){return"auto"===e.colorType}const g={key:"card",title:{main:{...p(null===(n=e.style)||void 0===n?void 0:n.fontColor)},subTitle:{...p(null===(r=e.style)||void 0===r?void 0:r.fontColor)}},label:{description:{...p(null===(o=e.style)||void 0===o?void 0:o.fontColor)},measureLabel:{...p(null===(a=e.style)||void 0===a?void 0:a.fontColor)},measureValue:{...p(null===(i=e.style)||void 0===i?void 0:i.fontColor)}},contrastTextColor:f(null===(l=e.style)||void 0===l?void 0:l.fontColor),background:{...p(null===(s=e.style)||void 0===s?void 0:s.backgroundColor)},border:{...p(null===(u=e.style)||void 0===u?void 0:u.border),fullBorder:null===(c=e.style)||void 0===c||null===(c=c.border)||void 0===c?void 0:c.fullBorder,topBar:null===(d=e.style)||void 0===d||null===(d=d.border)||void 0===d?void 0:d.top,contrastColor:f(null===(h=e.style)||void 0===h?void 0:h.border)}};return e.components=[g],e}(e):e}}}(e)}var gt={Object_OrgChart:{id:"Object.OrgChart",locale:{"de-DE":"Organisationsdiagramm","en-US":"Org chart","es-ES":"Organigrama","fr-FR":"Organigramme","it-IT":"Organigramma","ja-JP":"組織図","ko-KR":"조직도","nl-NL":"Organisatiediagram","pl-PL":"Wykres organizacyjny","pt-BR":"Quadro organizacional","ru-RU":"Организационная диаграмма","sv-SE":"Organisationsdiagram","tr-TR":"Kuruluş grafiği","zh-CN":"组织图","zh-TW":"組織圖"}},Object_OrgChart_BackgroundColor:{id:"Object.OrgChart.BackgroundColor",locale:{"de-DE":"Hintergrundfarbe","en-US":"Background color","es-ES":"Color de fondo","fr-FR":"Couleur d'arrière-plan","it-IT":"Colore sfondo","ja-JP":"背景色","ko-KR":"배경색","nl-NL":"Achtergrondkleur","pl-PL":"Kolor tła","pt-BR":"Cor de fundo","ru-RU":"Цвет фона","sv-SE":"Bakgrundsfärg","tr-TR":"Arka plan rengi","zh-CN":"背景颜色","zh-TW":"背景顏色"}},Object_OrgChart_CardAppearance:{id:"Object.OrgChart.CardAppearance",locale:{"de-DE":"Kartendarstellung","en-US":"Card appearance","es-ES":"Aspecto de la tarjeta","fr-FR":"Aspect de la carte","it-IT":"Aspetto scheda","ja-JP":"カード スタイル","ko-KR":"카드 모양","nl-NL":"Uiterlijk van de kaart","pl-PL":"Wygląd karty","pt-BR":"Aparência do cartão","ru-RU":"Вид карточки","sv-SE":"Kortets utseende","tr-TR":"Kart görünüşü","zh-CN":"卡外观","zh-TW":"卡片外觀"}},Object_OrgChart_ColorLabelExpression:{id:"Object.OrgChart.ColorLabelExpression",locale:{"de-DE":"Hintergrundfarbe der Karte","en-US":"Card background color","es-ES":"Color de fondo de la tarjeta","fr-FR":"Couleur d'arrière-plan de la carte","it-IT":"Colore sfondo scheda","ja-JP":"カードの背景色","ko-KR":"카드 배경색","nl-NL":"Achtergrondkleur kaart","pl-PL":"Kolor tła karty","pt-BR":"Cor de fundo do cartão","ru-RU":"Цвет фона карточки","sv-SE":"Kortets bakgrundsfärg","tr-TR":"Kart arka plan rengi","zh-CN":"卡背景颜色","zh-TW":"卡片背景顏色"}},Object_OrgChart_CycleWarning:{id:"Object.OrgChart.CycleWarning",locale:{"de-DE":"Die Daten enthalten Zirkelbezüge, Knoten werden ausgelassen.","en-US":"Data contains circular references, nodes are omitted.","es-ES":"Los datos contienen referencias circulares, se omiten los nodos.","fr-FR":"Les données contiennent des références circulaires. Les nœuds sont omis.","it-IT":"Impossibile visualizzare i nodi: i dati contengono riferimenti incrociati.","ja-JP":"データに循環参照が含まれています。ノードは省略されます。","ko-KR":"데이터가 순환 참조를 포함합니다. 노드는 생략됩니다.","nl-NL":"Gegevens bevatten cirkelreferenties, knooppunten worden weggelaten.","pl-PL":"Dane zawierają odwołania cykliczne, węzły są pomijane.","pt-BR":"Os dados contêm referências circulares, os nós são omitidos.","ru-RU":"В данных содержатся циклические ссылки, узлы опущены.","sv-SE":"Data innehåller cirkelreferenser. Noder utelämnas.","tr-TR":"Veriler döngüsel referanslar içeriyor; düğümler atlandı.","zh-CN":"数据包含循环引用,已省略节点。","zh-TW":"資料包含循環參照,已省略節點。"}},Object_OrgChart_Description:{id:"Object.OrgChart.Description",locale:{"de-DE":"Zeigt die Beziehungen einer Organisation oder ähnlich strukturierter Daten an. Startet oben und ermöglicht die Navigation durch die Hierarchie.","en-US":"Displays the relations of an organization or similarly structured data. Starts at the top and allows for navigation through the hierarchy.","es-ES":"Muestra las relaciones jerárquicas de una organización o datos estructurados de manera similar. Comienza en la parte superior y permite la navegación a través de la jerarquía.","fr-FR":"Affiche les relations d'une entreprise ou de données structurées de manière similaire. Démarre au sommet et permet la navigation à travers la hiérarchie.","it-IT":"Visualizza le relazioni di un'organizzazione o dati strutturati in modo analogo. Inizia dall'alto e consente la navigazione attraverso la gerarchia.","ja-JP":"組織の関係やそれに類似する構造のデータを表示します。上部から開始し、階層を移動できます。","ko-KR":"조직 또는 유사하게 구조화된 데이터의 관계를 표시합니다. 맨 위에서 시작하여 계층 구조를 탐색할 수 있습니다.","nl-NL":"Geeft de relaties van een organisatie of vergelijkbaar gestructureerde gegevens weer. Begint bovenaan en maakt navigatie door de hiërarchie mogelijk.","pl-PL":"Wyświetla relacje organizacji lub dane o podobnej strukturze. Zaczyna się od góry i umożliwia nawigację w hierarchii.","pt-BR":"Exibe as relações de uma organização ou dados estruturados de forma semelhante. Começa no topo e permite a navegação pela hierarquia.","ru-RU":"Отображает отношения организации или аналогично структурированные данные. Начинается сверху и позволяет перемещаться по иерархии.","sv-SE":"Visar relationerna i en organisation eller data som är strukturerat på liknande sätt. Startar högst upp och möjliggör navigering genom hierarkin.","tr-TR":"Bir kuruluşun ilişkilerini veya benzer yapılanan verileri gösterir. En üstte açılır ve hiyerarşide hareket etmenize olanak sağlar.","zh-CN":"显示组织或类似结构数据的关系。从顶部开始,并允许在层次结构中进行导航。","zh-TW":"顯示組織的關係或類似結構的資料。在頂端開始並允許瀏覽階層。"}},Object_OrgChart_DummyWarn:{id:"Object.OrgChart.DummyWarn",locale:{"de-DE":"Die Daten enthalten mehrere Root-Knoten.","en-US":"The data contains multiple root nodes.","es-ES":"Los datos contienen múltiples nodos raíz.","fr-FR":"Les données contiennent plusieurs nœuds racines.","it-IT":"I dati contengono più nodi principali.","ja-JP":"データには複数のルート ノードが含まれています。","ko-KR":"데이터가 여러 루트 노드를 포함합니다.","nl-NL":"De gegevens bevatten meerdere hoofdknooppunten.","pl-PL":"Dane zawierają wiele węzłów głównych.","pt-BR":"Os dados contêm vários nós raiz.","ru-RU":"В данных содержится несколько корневых узлов.","sv-SE":"Data innehåller flera rotnoder.","tr-TR":"Veriler birden çok kök düğümü içeriyor.","zh-CN":"数据包含多个根节点。","zh-TW":"資料包含多個根節點。"}},Object_OrgChart_ExpandAll:{id:"Object.OrgChart.ExpandAll",locale:{"de-DE":"Gesamte Struktur","en-US":"Entire tree","es-ES":"Árbol entero","fr-FR":"Arborescence complète","it-IT":"Intero albero","ja-JP":"ツリー全体","ko-KR":"전체 트리","nl-NL":"Volledige structuur","pl-PL":"Całe drzewo","pt-BR":"Árvore inteira","ru-RU":"Все дерево","sv-SE":"Hela trädet","tr-TR":"Tüm ağaç","zh-CN":"整个树","zh-TW":"整個樹狀結構"}},Object_OrgChart_ExtraLabelDesc:{id:"Object.OrgChart.ExtraLabelDesc",locale:{"de-DE":"Die Beschreibung wird nur angezeigt, wenn eine Kennzahl nicht verwendet wird","en-US":"Description is only visible when a measure is not used","es-ES":"La descripción solo está visible cuando no se usa una medida","fr-FR":"La description est visible uniquement lorsqu'une mesure n'est pas utilisée","it-IT":"È possibile visualizzare la descrizione solo se le misure non vengono utilizzate","ja-JP":"メジャーが使用されていない場合にのみ、説明が表示されます。","ko-KR":"측정값을 사용하지 않는 경우에만 설명을 볼 수 있습니다.","nl-NL":"Beschrijving is alleen zichtbaar wanneer een meting niet wordt gebruikt","pl-PL":"Opis jest widoczny tylko wtedy, gdy miara nie jest używana","pt-BR":"A descrição é visível apenas quando uma medida não é usada","ru-RU":"Описание отображается, только если мера не используется","sv-SE":"Beskrivning används bara när ett mått inte används","tr-TR":"Bir hesaplama kullanılmadığında yalnızca açıklama görünür","zh-CN":"描述仅在未使用度量时可用","zh-TW":"只有在不使用量值時才會顯示描述"}},Object_OrgChart_ExtraLabelExpression:{id:"Object.OrgChart.ExtraLabelExpression",locale:{"de-DE":"Beschreibung der Karte","en-US":"Card description","es-ES":"Descripción de la tarjeta","fr-FR":"Description de la carte","it-IT":"Descrizione scheda","ja-JP":"カードの説明","ko-KR":"카드 설명","nl-NL":"Beschrijving kaart","pl-PL":"Opis karty","pt-BR":"Descrição do cartão","ru-RU":"Описание карточки","sv-SE":"Kortets beskrivning","tr-TR":"Kart açıklaması","zh-CN":"卡描述","zh-TW":"卡片描述"}},Object_OrgChart_FontColor:{id:"Object.OrgChart.FontColor",locale:{"de-DE":"Schriftfarbe","en-US":"Font color","es-ES":"Color de fuente","fr-FR":"Couleur de police","it-IT":"Colore formato carattere","ja-JP":"フォントの色","ko-KR":"글꼴 색","nl-NL":"Tekstkleur","pl-PL":"Kolor czcionki","pt-BR":"Cor da fonte","ru-RU":"Цвет шрифта","sv-SE":"Teckenfärg","tr-TR":"Yazı tipi rengi","zh-CN":"字体颜色","zh-TW":"字型色彩"}},Object_OrgChart_FreeMode:{id:"Object.OrgChart.FreeMode",locale:{"de-DE":"Erweitern/reduzieren","en-US":"Expand/collapse","es-ES":"Expandir/contraer","fr-FR":"Développer/Réduire","it-IT":"Espandi/comprimi","ja-JP":"展開/折りたたむ","ko-KR":"확장/축소","nl-NL":"Uitvouwen/alles samenvouwen","pl-PL":"Rozwiń/zwiń","pt-BR":"Expandir/recolher","ru-RU":"Развернуть/свернуть","sv-SE":"Visa/dölj","tr-TR":"Genişlet/daralt","zh-CN":"展开/折叠","zh-TW":"展開/摺疊"}},Object_OrgChart_IncludeDescendants:{id:"Object.OrgChart.IncludeDescendants",locale:{"de-DE":"Alle untergeordneten Elemente einschließen","en-US":"Include all children","es-ES":"Incluir todos los nodos secundarios","fr-FR":"Inclure tous les enfants","it-IT":"Includi tutti i nodi secondari","ja-JP":"すべての子を含める","ko-KR":"모든 자식을 포함합니다.","nl-NL":"Alle onderliggende elementen opnemen","pl-PL":"Uwzględniaj wszystkie elementy podrzędne","pt-BR":"Incluir todos os filhos","ru-RU":"Включить все дочерние элементы","sv-SE":"Inkludera alla underordnade","tr-TR":"Tüm alt öğeleri dahil edin","zh-CN":"包含所有子项","zh-TW":"包括所有子項"}},Object_OrgChart_LabelExpression:{id:"Object.OrgChart.LabelExpression",locale:{"de-DE":"Titel der Karte","en-US":"Card title","es-ES":"Título de tarjeta","fr-FR":"Titre de la carte","it-IT":"Titolo scheda","ja-JP":"カード タイトル","ko-KR":"카드 제목","nl-NL":"Titel kaart","pl-PL":"Tytuł karty","pt-BR":"Título do cartão","ru-RU":"Заголовок карточки","sv-SE":"Kortets rubrik","tr-TR":"Kart başlığı","zh-CN":"卡标题","zh-TW":"卡片標題"}},Object_OrgChart_MaxChildren:{id:"Object.OrgChart.MaxChildren",locale:{"de-DE":"Maximale Anzahl an untergeordneten Knoten erreicht, Knoten werden ausgelassen.","en-US":"Maximum number of child nodes reached, nodes are omitted.","es-ES":"Se alcanzó el número máximo de nodos secundarios, se omiten los nodos.","fr-FR":"Nombre maximal de nœuds enfants atteint. Les nœuds sont omis.","it-IT":"Impossibile visualizzare i nodi: numero massimo di nodi secondari raggiunto.","ja-JP":"子ノードの最大数に達しました。ノードは省略されます。","ko-KR":"최대 자식 노드 수에 도달했습니다. 노드는 생략됩니다.","nl-NL":"Maximaal aantal onderliggende knooppunten bereikt, knooppunten worden weggelaten.","pl-PL":"Osiągnięto maksymalną liczbę węzłów podrzędnych, węzły są pomijane.","pt-BR":"Número máximo de nós filhos atingidos, os nós são omitidos.","ru-RU":"Достигнуто максимальное количество дочерних узлов, узлы опущены.","sv-SE":"Maximalt antal underordnade noder har uppnåtts. Noder utelämnas.","tr-TR":"Maksimum alt öğe düğüm sayısına ulaşıldı; düğümler atlandı.","zh-CN":"已达到子节点最大数目,将省略节点。","zh-TW":"已達子節點數量上限,已省略節點。"}},Object_OrgChart_MaxData:{id:"Object.OrgChart.MaxData",locale:{"de-DE":"Die Datenobergrenze ist erreicht. Die Struktur wird möglicherweise nicht korrekt dargestellt.","en-US":"The maximum data limit is reached. The tree may display incorrectly.","es-ES":"Se ha alcanzado el límite máximo de datos. Puede que el árbol se muestre incorrectamente.","fr-FR":"La limite de données maximale est atteinte. Il se peut que l'arborescence ne s'affiche pas correctement.","it-IT":"Limite massimo dati raggiunto. La visualizzazione del grafico potrebbe essere compromessa.","ja-JP":"最大データ制限に達しました。ツリーが正しく表示されない場合があります。","ko-KR":"최대 데이터 제한에 도달했습니다. 트리가 잘못 표시될 수 있습니다.","nl-NL":"Het maximale datalimiet is bereikt. De boom kan incorrect worden weergegeven.","pl-PL":"Osiągnięto maksymalny limit danych. Drzewo może wyświetlać się nieprawidłowo.","pt-BR":"O limite máximo de dados foi atingido. A árvore pode ser exibida incorretamente.","ru-RU":"Достигнут максимальный предел данных. Дерево может отображаться некорректно.","sv-SE":"Maxgränsen för data har nåtts. Trädet kanske inte visas på rätt sätt.","tr-TR":"Maksimum veri sınırına ulaşıldı. Ağaç grafik doğru görüntülenmeyebilir.","zh-CN":"已达到最大数据限制。树的显示可能不当。","zh-TW":"已達資料上限。樹狀目錄的顯示方式可能不正確。"}},Object_OrgChart_MissingRoot:{id:"Object.OrgChart.MissingRoot",locale:{"de-DE":"Kein Root-Knoten, prüfen Sie die Daten auf Zirkelbezüge.","en-US":"No root node, check data for circular references.","es-ES":"Sin nodo raíz, verifique los datos por si hay referencias circulares.","fr-FR":"Aucun nœud racine. Recherchez les références circulaires dans les données.","it-IT":"Impossibile utilizzare i nodi principali: verificare i riferimenti circolari.","ja-JP":"ルート ノードがありません。循環参照のデータを確認してください。","ko-KR":"루트 노드가 없습니다. 순환 참조에 대한 데이터를 확인하십시오.","nl-NL":"Geen hoofdknooppunt, controleer of de gegevens cirkelreferenties bevatten.","pl-PL":"Brak węzła głównego, sprawdź dane pod kątem odwołań cyklicznych.","pt-BR":"Nenhum nó raiz, verifique os dados para referências circulares.","ru-RU":"Нет корневых узлов, проверьте данные на предмет циклических ссылок.","sv-SE":"Ingen rotnod. Kontrollera om det finns cirkelreferenser i data.","tr-TR":"Kök düğümü yok, verileri döngüsel referanslar açısından kontrol edin.","zh-CN":"无根节点,请检查数据是否存在循环引用。","zh-TW":"沒有根節點,請檢查循環參照的資料。"}},Object_OrgChart_NavigationMode:{id:"Object.OrgChart.NavigationMode",locale:{"de-DE":"Präsentationsmodus","en-US":"Presentation mode","es-ES":"Modo presentación","fr-FR":"Mode présentation","it-IT":"Modalità presentazione","ja-JP":"プレゼンテーション モード","ko-KR":"프레젠테이션 모드","nl-NL":"Presentatiemodus","pl-PL":"Tryb prezentacji","pt-BR":"Modo de apresentação","ru-RU":"Режим представления","sv-SE":"Presentationsläge","tr-TR":"Sunum modu","zh-CN":"演示模式","zh-TW":"呈現模式"}},Object_OrgChart_SingleSelect:{id:"Object.OrgChart.SingleSelect",locale:{"de-DE":"Einzelnen Knoten auswählen","en-US":"Select single node","es-ES":"Seleccionar nodo único","fr-FR":"Sélectionner un seul nœud","it-IT":"Seleziona nodo singolo","ja-JP":"単一ノードを選択","ko-KR":"단일 노드 선택","nl-NL":"Enkel knooppunt selecteren","pl-PL":"Wybierz pojedynczy węzeł","pt-BR":"Selecionar nó único","ru-RU":"Выберите один узел","sv-SE":"Välj enskild nod","tr-TR":"Tek düğüm seç","zh-CN":"选择单个节点","zh-TW":"選取單一節點"}},Object_OrgChart_SubLabelExpression:{id:"Object.OrgChart.SubLabelExpression",locale:{"de-DE":"Untertitel der Karte","en-US":"Card sub-title","es-ES":"Subtítulo de tarjeta","fr-FR":"Sous-titre de la carte","it-IT":"Sottotitolo scheda","ja-JP":"カード サブタイトル","ko-KR":"카드 소제목","nl-NL":"Ondertitel kaart","pl-PL":"Podtytuł karty","pt-BR":"Subtítulo do cartão","ru-RU":"Подзаголовок карточки","sv-SE":"Kortets underrubrik","tr-TR":"Kart alt başlığı","zh-CN":"卡子标题","zh-TW":"卡片子標題"}},Object_OrgChart_TopBar:{id:"Object.OrgChart.TopBar",locale:{"de-DE":"Obere Leiste","en-US":"Top bar","es-ES":"Barra superior","fr-FR":"Barre supérieure","it-IT":"Barra superiore","ja-JP":"上部のバー","ko-KR":"상위 막대","nl-NL":"Bovenste balk","pl-PL":"Górny słupek","pt-BR":"Barra superior","ru-RU":"Верхняя полоса","sv-SE":"Övre fältet","tr-TR":"Üst çubuk","zh-CN":"顶部栏","zh-TW":"頂端列"}},Object_OrgChart_resizeOnExpand:{id:"Object.OrgChart.resizeOnExpand",locale:{"de-DE":"Beim Erweitern/Reduzieren Größe ändern","en-US":"Resize on expand/collapse","es-ES":"Cambiar el tamaño al expandir/contraer","fr-FR":"Redimensionner avec Développer/Réduire","it-IT":"Ridimensiona quando espandi/comprimi","ja-JP":"展開/折りたたみ時にサイズ変更","ko-KR":"확장/축소하여 크기 조정","nl-NL":"Formaat wijzigen bij uitvouwen/alles samenvouwen","pl-PL":"Zmień rozmiar przy rozwijaniu/zwijaniu","pt-BR":"Redimensionar em expandir/recolher","ru-RU":"Изменить размер при разворачивании/сворачивании","sv-SE":"Ändra storlek vid visa/dölj","tr-TR":"Genişletmede/daraltmada yeniden boyutlandır","zh-CN":"调整展开/折叠的大小","zh-TW":"調整展開/摺疊大小"}},Object_OrgChart_Card_TextColor:{id:"Object.OrgChart.Card.TextColor",locale:{"en-US":"Text Color"}},Object_OrgChart_Card_Title:{id:"Object.OrgChart.Card.Title",locale:{"en-US":"Title"}},Object_OrgChart_Card_Subtitle:{id:"Object.OrgChart.Card.Subtitle",locale:{"en-US":"Subtitle"}},Object_OrgChart_Card_Description:{id:"Object.OrgChart.Card.Description",locale:{"en-US":"Description"}},Object_OrgChart_Card_MeasureLabel:{id:"Object.OrgChart.Card.MeasureLabel",locale:{"en-US":"Measure label"}},Object_OrgChart_Card_MeasureValue:{id:"Object.OrgChart.Card.MeasureValue",locale:{"en-US":"Measure value"}},Object_OrgChart_Card_Contrast:{id:"Object.OrgChart.Card.Contrast",locale:{"en-US":"Auto contrast color"}}};function mt(e){if(e&&e.get&&e.add){const t="Object.OrgChart.MaxData";if(e.get(t)!==t)return;Object.keys(gt).forEach((t=>{e.add(gt[t])}))}}const bt={qHyperCubeDef:{qDimensions:[],qMeasures:[],qInitialDataFetch:[{qWidth:5,qHeight:500}],qSuppressZero:!1,qSuppressMissing:!0},showTitles:!0,title:"",subtitle:"",footnote:"",navigationMode:"free",resizeOnExpand:!1,style:{fontColor:{colorType:Xe.FONT_COLOR_TYPE,color:Xe.FONT_COLOR_DARK,colorExpression:""},backgroundColor:{colorType:Xe.BACKGROUND_COLOR_TYPE,color:Xe.BACKGROUND_COLOR,colorExpression:""},border:{top:Xe.BORDER_TOP,fullBorder:Xe.BORDER_FULL,colorType:Xe.BORDER_COLOR_TYPE,color:Xe.BORDER_COLOR,colorExpression:""}},components:[]};var vt={value:()=>{}};function yt(){for(var e,t=0,n=arguments.length,r={};t<n;++t){if(!(e=arguments[t]+"")||e in r||/[\s.]/.test(e))throw new Error("illegal type: "+e);r[e]=[]}return new xt(r)}function xt(e){this._=e}function wt(e,t){for(var n,r=0,o=e.length;r<o;++r)if((n=e[r]).name===t)return n.value}function _t(e,t,n){for(var r=0,o=e.length;r<o;++r)if(e[r].name===t){e[r]=vt,e=e.slice(0,r).concat(e.slice(r+1));break}return null!=n&&e.push({name:t,value:n}),e}xt.prototype=yt.prototype={constructor:xt,on:function(e,t){var n,r,o=this._,a=(r=o,(e+"").trim().split(/^|\s+/).map((function(e){var t="",n=e.indexOf(".");if(n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),e&&!r.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:t}}))),i=-1,l=a.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++i<l;)if(n=(e=a[i]).type)o[n]=_t(o[n],e.name,t);else if(null==t)for(n in o)o[n]=_t(o[n],e.name,null);return this}for(;++i<l;)if((n=(e=a[i]).type)&&(n=wt(o[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new xt(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,r,o=new Array(n),a=0;a<n;++a)o[a]=arguments[a+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=0,n=(r=this._[e]).length;a<n;++a)r[a].value.apply(t,o)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],o=0,a=r.length;o<a;++o)r[o].value.apply(t,n)}};var Ct="http://www.w3.org/1999/xhtml",Ot={svg:"http://www.w3.org/2000/svg",xhtml:Ct,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function kt(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),Ot.hasOwnProperty(t)?{space:Ot[t],local:e}:e}function Et(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Ct&&t.documentElement.namespaceURI===Ct?t.createElement(e):t.createElementNS(n,e)}}function St(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Lt(e){var t=kt(e);return(t.local?St:Et)(t)}function Rt(){}function Tt(e){return null==e?Rt:function(){return this.querySelector(e)}}function At(){return[]}function Nt(e){return null==e?At:function(){return this.querySelectorAll(e)}}function zt(e){return function(){return null==(t=e.apply(this,arguments))?[]:Array.isArray(t)?t:Array.from(t);var t}}function Mt(e){return function(){return this.matches(e)}}function jt(e){return function(t){return t.matches(e)}}var It=Array.prototype.find;function Dt(){return this.firstElementChild}var $t=Array.prototype.filter;function Bt(){return Array.from(this.children)}function Pt(e){return new Array(e.length)}function qt(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function Ft(e,t,n,r,o,a){for(var i,l=0,s=t.length,u=a.length;l<u;++l)(i=t[l])?(i.__data__=a[l],r[l]=i):n[l]=new qt(e,a[l]);for(;l<s;++l)(i=t[l])&&(o[l]=i)}function Vt(e,t,n,r,o,a,i){var l,s,u,c=new Map,d=t.length,h=a.length,p=new Array(d);for(l=0;l<d;++l)(s=t[l])&&(p[l]=u=i.call(s,s.__data__,l,t)+"",c.has(u)?o[l]=s:c.set(u,s));for(l=0;l<h;++l)u=i.call(e,a[l],l,a)+"",(s=c.get(u))?(r[l]=s,s.__data__=a[l],c.delete(u)):n[l]=new qt(e,a[l]);for(l=0;l<d;++l)(s=t[l])&&c.get(p[l])===s&&(o[l]=s)}function Ut(e){return e.__data__}function Ht(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function Kt(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Gt(e){return function(){this.removeAttribute(e)}}function Zt(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Yt(e,t){return function(){this.setAttribute(e,t)}}function Wt(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Xt(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function Jt(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function Qt(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function en(e){return function(){this.style.removeProperty(e)}}function tn(e,t,n){return function(){this.style.setProperty(e,t,n)}}function nn(e,t,n){return function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function rn(e,t){return e.style.getPropertyValue(t)||Qt(e).getComputedStyle(e,null).getPropertyValue(t)}function on(e){return function(){delete this[e]}}function an(e,t){return function(){this[e]=t}}function ln(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function sn(e){return e.trim().split(/^|\s+/)}function un(e){return e.classList||new cn(e)}function cn(e){this._node=e,this._names=sn(e.getAttribute("class")||"")}function dn(e,t){for(var n=un(e),r=-1,o=t.length;++r<o;)n.add(t[r])}function hn(e,t){for(var n=un(e),r=-1,o=t.length;++r<o;)n.remove(t[r])}function pn(e){return function(){dn(this,e)}}function fn(e){return function(){hn(this,e)}}function gn(e,t){return function(){(t.apply(this,arguments)?dn:hn)(this,e)}}function mn(){this.textContent=""}function bn(e){return function(){this.textContent=e}}function vn(e){return function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}}function yn(){this.innerHTML=""}function xn(e){return function(){this.innerHTML=e}}function wn(e){return function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}}function _n(){this.nextSibling&&this.parentNode.appendChild(this)}function Cn(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function On(){return null}function kn(){var e=this.parentNode;e&&e.removeChild(this)}function En(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Sn(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Ln(e){return function(){var t=this.__on;if(t){for(var n,r=0,o=-1,a=t.length;r<a;++r)n=t[r],e.type&&n.type!==e.type||n.name!==e.name?t[++o]=n:this.removeEventListener(n.type,n.listener,n.options);++o?t.length=o:delete this.__on}}}function Rn(e,t,n){return function(){var r,o=this.__on,a=function(e){return function(t){e.call(this,t,this.__data__)}}(t);if(o)for(var i=0,l=o.length;i<l;++i)if((r=o[i]).type===e.type&&r.name===e.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=a,r.options=n),void(r.value=t);this.addEventListener(e.type,a,n),r={type:e.type,name:e.name,value:t,listener:a,options:n},o?o.push(r):this.__on=[r]}}function Tn(e,t,n){var r=Qt(e),o=r.CustomEvent;"function"==typeof o?o=new o(t,n):(o=r.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function An(e,t){return function(){return Tn(this,e,t)}}function Nn(e,t){return function(){return Tn(this,e,t.apply(this,arguments))}}qt.prototype={constructor:qt,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}},cn.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};var zn=[null];function Mn(e,t){this._groups=e,this._parents=t}function jn(){return new Mn([[document.documentElement]],zn)}function In(e){return"string"==typeof e?new Mn([[document.querySelector(e)]],[document.documentElement]):new Mn([[e]],zn)}function Dn(e,t){if(e=function(e){let t;for(;t=e.sourceEvent;)e=t;return e}(e),void 0===t&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}Mn.prototype=jn.prototype={constructor:Mn,select:function(e){"function"!=typeof e&&(e=Tt(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var a,i,l=t[o],s=l.length,u=r[o]=new Array(s),c=0;c<s;++c)(a=l[c])&&(i=e.call(a,a.__data__,c,l))&&("__data__"in a&&(i.__data__=a.__data__),u[c]=i);return new Mn(r,this._parents)},selectAll:function(e){e="function"==typeof e?zt(e):Nt(e);for(var t=this._groups,n=t.length,r=[],o=[],a=0;a<n;++a)for(var i,l=t[a],s=l.length,u=0;u<s;++u)(i=l[u])&&(r.push(e.call(i,i.__data__,u,l)),o.push(i));return new Mn(r,o)},selectChild:function(e){return this.select(null==e?Dt:function(e){return function(){return It.call(this.children,e)}}("function"==typeof e?e:jt(e)))},selectChildren:function(e){return this.selectAll(null==e?Bt:function(e){return function(){return $t.call(this.children,e)}}("function"==typeof e?e:jt(e)))},filter:function(e){"function"!=typeof e&&(e=Mt(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var a,i=t[o],l=i.length,s=r[o]=[],u=0;u<l;++u)(a=i[u])&&e.call(a,a.__data__,u,i)&&s.push(a);return new Mn(r,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,Ut);var n,r=t?Vt:Ft,o=this._parents,a=this._groups;"function"!=typeof e&&(n=e,e=function(){return n});for(var i=a.length,l=new Array(i),s=new Array(i),u=new Array(i),c=0;c<i;++c){var d=o[c],h=a[c],p=h.length,f=Ht(e.call(d,d&&d.__data__,c,o)),g=f.length,m=s[c]=new Array(g),b=l[c]=new Array(g);r(d,h,m,b,u[c]=new Array(p),f,t);for(var v,y,x=0,w=0;x<g;++x)if(v=m[x]){for(x>=w&&(w=x+1);!(y=b[w])&&++w<g;);v._next=y||null}}return(l=new Mn(l,o))._enter=s,l._exit=u,l},enter:function(){return new Mn(this._enter||this._groups.map(Pt),this._parents)},exit:function(){return new Mn(this._exit||this._groups.map(Pt),this._parents)},join:function(e,t,n){var r=this.enter(),o=this,a=this.exit();return"function"==typeof e?(r=e(r))&&(r=r.selection()):r=r.append(e+""),null!=t&&(o=t(o))&&(o=o.selection()),null==n?a.remove():n(a),r&&o?r.merge(o).order():o},merge:function(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,o=n.length,a=r.length,i=Math.min(o,a),l=new Array(o),s=0;s<i;++s)for(var u,c=n[s],d=r[s],h=c.length,p=l[s]=new Array(h),f=0;f<h;++f)(u=c[f]||d[f])&&(p[f]=u);for(;s<o;++s)l[s]=n[s];return new Mn(l,this._parents)},selection:function(){return this},order:function(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r,o=e[t],a=o.length-1,i=o[a];--a>=0;)(r=o[a])&&(i&&4^r.compareDocumentPosition(i)&&i.parentNode.insertBefore(r,i),i=r);return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=Kt);for(var n=this._groups,r=n.length,o=new Array(r),a=0;a<r;++a){for(var i,l=n[a],s=l.length,u=o[a]=new Array(s),c=0;c<s;++c)(i=l[c])&&(u[c]=i);u.sort(t)}return new Mn(o,this._parents).order()},call:function(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,a=r.length;o<a;++o){var i=r[o];if(i)return i}return null},size:function(){let e=0;for(const t of this)++e;return e},empty:function(){return!this.node()},each:function(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var o,a=t[n],i=0,l=a.length;i<l;++i)(o=a[i])&&e.call(o,o.__data__,i,a);return this},attr:function(e,t){var n=kt(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==t?n.local?Zt:Gt:"function"==typeof t?n.local?Jt:Xt:n.local?Wt:Yt)(n,t))},style:function(e,t,n){return arguments.length>1?this.each((null==t?en:"function"==typeof t?nn:tn)(e,t,null==n?"":n)):rn(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?on:"function"==typeof t?ln:an)(e,t)):this.node()[e]},classed:function(e,t){var n=sn(e+"");if(arguments.length<2){for(var r=un(this.node()),o=-1,a=n.length;++o<a;)if(!r.contains(n[o]))return!1;return!0}return this.each(("function"==typeof t?gn:t?pn:fn)(n,t))},text:function(e){return arguments.length?this.each(null==e?mn:("function"==typeof e?vn:bn)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?yn:("function"==typeof e?wn:xn)(e)):this.node().innerHTML},raise:function(){return this.each(_n)},lower:function(){return this.each(Cn)},append:function(e){var t="function"==typeof e?e:Lt(e);return this.select((function(){return this.appendChild(t.apply(this,arguments))}))},insert:function(e,t){var n="function"==typeof e?e:Lt(e),r=null==t?On:"function"==typeof t?t:Tt(t);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(kn)},clone:function(e){return this.select(e?Sn:En)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,t,n){var r,o,a=function(e){return e.trim().split(/^|\s+/).map((function(e){var t="",n=e.indexOf(".");return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}}))}(e+""),i=a.length;if(!(arguments.length<2)){for(l=t?Rn:Ln,r=0;r<i;++r)this.each(l(a[r],t,n));return this}var l=this.node().__on;if(l)for(var s,u=0,c=l.length;u<c;++u)for(r=0,s=l[u];r<i;++r)if((o=a[r]).type===s.type&&o.name===s.name)return s.value},dispatch:function(e,t){return this.each(("function"==typeof t?Nn:An)(e,t))},[Symbol.iterator]:function*(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r,o=e[t],a=0,i=o.length;a<i;++a)(r=o[a])&&(yield r)}};const $n={capture:!0,passive:!1};function Bn(e){e.preventDefault(),e.stopImmediatePropagation()}function Pn(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function qn(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Fn(){}var Vn=.7,Un=1/Vn,Hn="\\s*([+-]?\\d+)\\s*",Kn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Gn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Zn=/^#([0-9a-f]{3,8})$/,Yn=new RegExp(`^rgb\\(${Hn},${Hn},${Hn}\\)$`),Wn=new RegExp(`^rgb\\(${Gn},${Gn},${Gn}\\)$`),Xn=new RegExp(`^rgba\\(${Hn},${Hn},${Hn},${Kn}\\)$`),Jn=new RegExp(`^rgba\\(${Gn},${Gn},${Gn},${Kn}\\)$`),Qn=new RegExp(`^hsl\\(${Kn},${Gn},${Gn}\\)$`),er=new RegExp(`^hsla\\(${Kn},${Gn},${Gn},${Kn}\\)$`),tr={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 nr(){return this.rgb().formatHex()}function rr(){return this.rgb().formatRgb()}function or(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Zn.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?ar(t):3===n?new sr(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?ir(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?ir(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Yn.exec(e))?new sr(t[1],t[2],t[3],1):(t=Wn.exec(e))?new sr(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Xn.exec(e))?ir(t[1],t[2],t[3],t[4]):(t=Jn.exec(e))?ir(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Qn.exec(e))?fr(t[1],t[2]/100,t[3]/100,1):(t=er.exec(e))?fr(t[1],t[2]/100,t[3]/100,t[4]):tr.hasOwnProperty(e)?ar(tr[e]):"transparent"===e?new sr(NaN,NaN,NaN,0):null}function ar(e){return new sr(e>>16&255,e>>8&255,255&e,1)}function ir(e,t,n,r){return r<=0&&(e=t=n=NaN),new sr(e,t,n,r)}function lr(e,t,n,r){return 1===arguments.length?((o=e)instanceof Fn||(o=or(o)),o?new sr((o=o.rgb()).r,o.g,o.b,o.opacity):new sr):new sr(e,t,n,null==r?1:r);var o}function sr(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function ur(){return`#${pr(this.r)}${pr(this.g)}${pr(this.b)}`}function cr(){const e=dr(this.opacity);return`${1===e?"rgb(":"rgba("}${hr(this.r)}, ${hr(this.g)}, ${hr(this.b)}${1===e?")":`, ${e})`}`}function dr(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function hr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function pr(e){return((e=hr(e))<16?"0":"")+e.toString(16)}function fr(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new mr(e,t,n,r)}function gr(e){if(e instanceof mr)return new mr(e.h,e.s,e.l,e.opacity);if(e instanceof Fn||(e=or(e)),!e)return new mr;if(e instanceof mr)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),a=Math.max(t,n,r),i=NaN,l=a-o,s=(a+o)/2;return l?(i=t===a?(n-r)/l+6*(n<r):n===a?(r-t)/l+2:(t-n)/l+4,l/=s<.5?a+o:2-a-o,i*=60):l=s>0&&s<1?0:i,new mr(i,l,s,e.opacity)}function mr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function br(e){return(e=(e||0)%360)<0?e+360:e}function vr(e){return Math.max(0,Math.min(1,e||0))}function yr(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Pn(Fn,or,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:nr,formatHex:nr,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return gr(this).formatHsl()},formatRgb:rr,toString:rr}),Pn(sr,lr,qn(Fn,{brighter(e){return e=null==e?Un:Math.pow(Un,e),new sr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?Vn:Math.pow(Vn,e),new sr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new sr(hr(this.r),hr(this.g),hr(this.b),dr(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:ur,formatHex:ur,formatHex8:function(){return`#${pr(this.r)}${pr(this.g)}${pr(this.b)}${pr(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:cr,toString:cr})),Pn(mr,(function(e,t,n,r){return 1===arguments.length?gr(e):new mr(e,t,n,null==r?1:r)}),qn(Fn,{brighter(e){return e=null==e?Un:Math.pow(Un,e),new mr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?Vn:Math.pow(Vn,e),new mr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new sr(yr(e>=240?e-240:e+120,o,r),yr(e,o,r),yr(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new mr(br(this.h),vr(this.s),vr(this.l),dr(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 e=dr(this.opacity);return`${1===e?"hsl(":"hsla("}${br(this.h)}, ${100*vr(this.s)}%, ${100*vr(this.l)}%${1===e?")":`, ${e})`}`}}));var xr=e=>()=>e;function wr(e){return 1==(e=+e)?_r:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):xr(isNaN(t)?n:t)}}function _r(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):xr(isNaN(e)?t:e)}var Cr=function e(t){var n=wr(t);function r(e,t){var r=n((e=lr(e)).r,(t=lr(t)).r),o=n(e.g,t.g),a=n(e.b,t.b),i=_r(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=a(t),e.opacity=i(t),e+""}}return r.gamma=e,r}(1);function Or(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var kr=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Er=new RegExp(kr.source,"g");function Sr(e,t){var n,r,o,a=kr.lastIndex=Er.lastIndex=0,i=-1,l=[],s=[];for(e+="",t+="";(n=kr.exec(e))&&(r=Er.exec(t));)(o=r.index)>a&&(o=t.slice(a,o),l[i]?l[i]+=o:l[++i]=o),(n=n[0])===(r=r[0])?l[i]?l[i]+=r:l[++i]=r:(l[++i]=null,s.push({i:i,x:Or(n,r)})),a=Er.lastIndex;return a<t.length&&(o=t.slice(a),l[i]?l[i]+=o:l[++i]=o),l.length<2?s[0]?function(e){return function(t){return e(t)+""}}(s[0].x):function(e){return function(){return e}}(t):(t=s.length,function(e){for(var n,r=0;r<t;++r)l[(n=s[r]).i]=n.x(e);return l.join("")})}var Lr,Rr=180/Math.PI,Tr={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ar(e,t,n,r,o,a){var i,l,s;return(i=Math.sqrt(e*e+t*t))&&(e/=i,t/=i),(s=e*n+t*r)&&(n-=e*s,r-=t*s),(l=Math.sqrt(n*n+r*r))&&(n/=l,r/=l,s/=l),e*r<t*n&&(e=-e,t=-t,s=-s,i=-i),{translateX:o,translateY:a,rotate:Math.atan2(t,e)*Rr,skewX:Math.atan(s)*Rr,scaleX:i,scaleY:l}}function Nr(e,t,n,r){function o(e){return e.length?e.pop()+" ":""}return function(a,i){var l=[],s=[];return a=e(a),i=e(i),function(e,r,o,a,i,l){if(e!==o||r!==a){var s=i.push("translate(",null,t,null,n);l.push({i:s-4,x:Or(e,o)},{i:s-2,x:Or(r,a)})}else(o||a)&&i.push("translate("+o+t+a+n)}(a.translateX,a.translateY,i.translateX,i.translateY,l,s),function(e,t,n,a){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),a.push({i:n.push(o(n)+"rotate(",null,r)-2,x:Or(e,t)})):t&&n.push(o(n)+"rotate("+t+r)}(a.rotate,i.rotate,l,s),function(e,t,n,a){e!==t?a.push({i:n.push(o(n)+"skewX(",null,r)-2,x:Or(e,t)}):t&&n.push(o(n)+"skewX("+t+r)}(a.skewX,i.skewX,l,s),function(e,t,n,r,a,i){if(e!==n||t!==r){var l=a.push(o(a)+"scale(",null,",",null,")");i.push({i:l-4,x:Or(e,n)},{i:l-2,x:Or(t,r)})}else 1===n&&1===r||a.push(o(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,i.scaleX,i.scaleY,l,s),a=i=null,function(e){for(var t,n=-1,r=s.length;++n<r;)l[(t=s[n]).i]=t.x(e);return l.join("")}}}var zr=Nr((function(e){const t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Tr:Ar(t.a,t.b,t.c,t.d,t.e,t.f)}),"px, ","px)","deg)"),Mr=Nr((function(e){return null==e?Tr:(Lr||(Lr=document.createElementNS("http://www.w3.org/2000/svg","g")),Lr.setAttribute("transform",e),(e=Lr.transform.baseVal.consolidate())?Ar((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):Tr)}),", ",")",")");function jr(e){return((e=Math.exp(e))+1/e)/2}var Ir,Dr,$r=function e(t,n,r){function o(e,o){var a,i,l=e[0],s=e[1],u=e[2],c=o[0],d=o[1],h=o[2],p=c-l,f=d-s,g=p*p+f*f;if(g<1e-12)i=Math.log(h/u)/t,a=function(e){return[l+e*p,s+e*f,u*Math.exp(t*e*i)]};else{var m=Math.sqrt(g),b=(h*h-u*u+r*g)/(2*u*n*m),v=(h*h-u*u-r*g)/(2*h*n*m),y=Math.log(Math.sqrt(b*b+1)-b),x=Math.log(Math.sqrt(v*v+1)-v);i=(x-y)/t,a=function(e){var r,o=e*i,a=jr(y),c=u/(n*m)*(a*(r=t*o+y,((r=Math.exp(2*r))-1)/(r+1))-function(e){return((e=Math.exp(e))-1/e)/2}(y));return[l+c*p,s+c*f,u*a/jr(t*o+y)]}}return a.duration=1e3*i*t/Math.SQRT2,a}return o.rho=function(t){var n=Math.max(.001,+t),r=n*n;return e(n,r,r*r)},o}(Math.SQRT2,2,4),Br=0,Pr=0,qr=0,Fr=0,Vr=0,Ur=0,Hr="object"==typeof performance&&performance.now?performance:Date,Kr="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Gr(){return Vr||(Kr(Zr),Vr=Hr.now()+Ur)}function Zr(){Vr=0}function Yr(){this._call=this._time=this._next=null}function Wr(e,t,n){var r=new Yr;return r.restart(e,t,n),r}function Xr(){Vr=(Fr=Hr.now())+Ur,Br=Pr=0;try{!function(){Gr(),++Br;for(var e,t=Ir;t;)(e=Vr-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Br}()}finally{Br=0,function(){var e,t,n=Ir,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:Ir=t);Dr=e,Qr(r)}(),Vr=0}}function Jr(){var e=Hr.now(),t=e-Fr;t>1e3&&(Ur-=t,Fr=e)}function Qr(e){Br||(Pr&&(Pr=clearTimeout(Pr)),e-Vr>24?(e<1/0&&(Pr=setTimeout(Xr,e-Hr.now()-Ur)),qr&&(qr=clearInterval(qr))):(qr||(Fr=Hr.now(),qr=setInterval(Jr,1e3)),Br=1,Kr(Xr)))}function eo(e,t,n){var r=new Yr;return t=null==t?0:+t,r.restart((n=>{r.stop(),e(n+t)}),t,n),r}Yr.prototype=Wr.prototype={constructor:Yr,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?Gr():+n)+(null==t?0:+t),this._next||Dr===this||(Dr?Dr._next=this:Ir=this,Dr=this),this._call=e,this._time=n,Qr()},stop:function(){this._call&&(this._call=null,this._time=1/0,Qr())}};var to=yt("start","end","cancel","interrupt"),no=[];function ro(e,t,n,r,o,a){var i=e.__transition;if(i){if(n in i)return}else e.__transition={};!function(e,t,n){var r,o=e.__transition;function a(e){n.state=1,n.timer.restart(i,n.delay,n.time),n.delay<=e&&i(e-n.delay)}function i(a){var u,c,d,h;if(1!==n.state)return s();for(u in o)if((h=o[u]).name===n.name){if(3===h.state)return eo(i);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete o[u]):+u<t&&(h.state=6,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete o[u])}if(eo((function(){3===n.state&&(n.state=4,n.timer.restart(l,n.delay,n.time),l(a))})),n.state=2,n.on.call("start",e,e.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(d=n.tween.length),u=0,c=-1;u<d;++u)(h=n.tween[u].value.call(e,e.__data__,n.index,n.group))&&(r[++c]=h);r.length=c+1}}function l(t){for(var o=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(s),n.state=5,1),a=-1,i=r.length;++a<i;)r[a].call(e,o);5===n.state&&(n.on.call("end",e,e.__data__,n.index,n.group),s())}function s(){for(var r in n.state=6,n.timer.stop(),delete o[t],o)return;delete e.__transition}o[t]=n,n.timer=Wr(a,0,n.time)}(e,n,{name:t,index:r,group:o,on:to,tween:no,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function oo(e,t){var n=io(e,t);if(n.state>0)throw new Error("too late; already scheduled");return n}function ao(e,t){var n=io(e,t);if(n.state>3)throw new Error("too late; already running");return n}function io(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function lo(e,t){var n,r,o,a=e.__transition,i=!0;if(a){for(o in t=null==t?null:t+"",a)(n=a[o]).name===t?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete a[o]):i=!1;i&&delete e.__transition}}function so(e,t){var n,r;return function(){var o=ao(this,e),a=o.tween;if(a!==n)for(var i=0,l=(r=n=a).length;i<l;++i)if(r[i].name===t){(r=r.slice()).splice(i,1);break}o.tween=r}}function uo(e,t,n){var r,o;if("function"!=typeof n)throw new Error;return function(){var a=ao(this,e),i=a.tween;if(i!==r){o=(r=i).slice();for(var l={name:t,value:n},s=0,u=o.length;s<u;++s)if(o[s].name===t){o[s]=l;break}s===u&&o.push(l)}a.tween=o}}function co(e,t,n){var r=e._id;return e.each((function(){var e=ao(this,r);(e.value||(e.value={}))[t]=n.apply(this,arguments)})),function(e){return io(e,r).value[t]}}function ho(e,t){var n;return("number"==typeof t?Or:t instanceof or?Cr:(n=or(t))?(t=n,Cr):Sr)(e,t)}function po(e){return function(){this.removeAttribute(e)}}function fo(e){return function(){this.removeAttributeNS(e.space,e.local)}}function go(e,t,n){var r,o,a=n+"";return function(){var i=this.getAttribute(e);return i===a?null:i===r?o:o=t(r=i,n)}}function mo(e,t,n){var r,o,a=n+"";return function(){var i=this.getAttributeNS(e.space,e.local);return i===a?null:i===r?o:o=t(r=i,n)}}function bo(e,t,n){var r,o,a;return function(){var i,l,s=n(this);if(null!=s)return(i=this.getAttribute(e))===(l=s+"")?null:i===r&&l===o?a:(o=l,a=t(r=i,s));this.removeAttribute(e)}}function vo(e,t,n){var r,o,a;return function(){var i,l,s=n(this);if(null!=s)return(i=this.getAttributeNS(e.space,e.local))===(l=s+"")?null:i===r&&l===o?a:(o=l,a=t(r=i,s));this.removeAttributeNS(e.space,e.local)}}function yo(e,t){var n,r;function o(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&function(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}(e,o)),n}return o._value=t,o}function xo(e,t){var n,r;function o(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&function(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}(e,o)),n}return o._value=t,o}function wo(e,t){return function(){oo(this,e).delay=+t.apply(this,arguments)}}function _o(e,t){return t=+t,function(){oo(this,e).delay=t}}function Co(e,t){return function(){ao(this,e).duration=+t.apply(this,arguments)}}function Oo(e,t){return t=+t,function(){ao(this,e).duration=t}}var ko=jn.prototype.constructor;function Eo(e){return function(){this.style.removeProperty(e)}}var So=0;function Lo(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Ro(){return++So}var To=jn.prototype;Lo.prototype={constructor:Lo,select:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=Tt(e));for(var r=this._groups,o=r.length,a=new Array(o),i=0;i<o;++i)for(var l,s,u=r[i],c=u.length,d=a[i]=new Array(c),h=0;h<c;++h)(l=u[h])&&(s=e.call(l,l.__data__,h,u))&&("__data__"in l&&(s.__data__=l.__data__),d[h]=s,ro(d[h],t,n,h,d,io(l,n)));return new Lo(a,this._parents,t,n)},selectAll:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=Nt(e));for(var r=this._groups,o=r.length,a=[],i=[],l=0;l<o;++l)for(var s,u=r[l],c=u.length,d=0;d<c;++d)if(s=u[d]){for(var h,p=e.call(s,s.__data__,d,u),f=io(s,n),g=0,m=p.length;g<m;++g)(h=p[g])&&ro(h,t,n,g,p,f);a.push(p),i.push(s)}return new Lo(a,i,t,n)},selectChild:To.selectChild,selectChildren:To.selectChildren,filter:function(e){"function"!=typeof e&&(e=Mt(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var a,i=t[o],l=i.length,s=r[o]=[],u=0;u<l;++u)(a=i[u])&&e.call(a,a.__data__,u,i)&&s.push(a);return new Lo(r,this._parents,this._name,this._id)},merge:function(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,o=n.length,a=Math.min(r,o),i=new Array(r),l=0;l<a;++l)for(var s,u=t[l],c=n[l],d=u.length,h=i[l]=new Array(d),p=0;p<d;++p)(s=u[p]||c[p])&&(h[p]=s);for(;l<r;++l)i[l]=t[l];return new Lo(i,this._parents,this._name,this._id)},selection:function(){return new ko(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,n=Ro(),r=this._groups,o=r.length,a=0;a<o;++a)for(var i,l=r[a],s=l.length,u=0;u<s;++u)if(i=l[u]){var c=io(i,t);ro(i,e,n,u,l,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Lo(r,this._parents,e,n)},call:To.call,nodes:To.nodes,node:To.node,size:To.size,empty:To.empty,each:To.each,on:function(e,t){var n=this._id;return arguments.length<2?io(this.node(),n).on.on(e):this.each(function(e,t,n){var r,o,a=function(e){return(e+"").trim().split(/^|\s+/).every((function(e){var t=e.indexOf(".");return t>=0&&(e=e.slice(0,t)),!e||"start"===e}))}(t)?oo:ao;return function(){var i=a(this,e),l=i.on;l!==r&&(o=(r=l).copy()).on(t,n),i.on=o}}(n,e,t))},attr:function(e,t){var n=kt(e),r="transform"===n?Mr:ho;return this.attrTween(e,"function"==typeof t?(n.local?vo:bo)(n,r,co(this,"attr."+e,t)):null==t?(n.local?fo:po)(n):(n.local?mo:go)(n,r,t))},attrTween:function(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;var r=kt(e);return this.tween(n,(r.local?yo:xo)(r,t))},style:function(e,t,n){var r="transform"==(e+="")?zr:ho;return null==t?this.styleTween(e,function(e,t){var n,r,o;return function(){var a=rn(this,e),i=(this.style.removeProperty(e),rn(this,e));return a===i?null:a===n&&i===r?o:o=t(n=a,r=i)}}(e,r)).on("end.style."+e,Eo(e)):"function"==typeof t?this.styleTween(e,function(e,t,n){var r,o,a;return function(){var i=rn(this,e),l=n(this),s=l+"";return null==l&&(this.style.removeProperty(e),s=l=rn(this,e)),i===s?null:i===r&&s===o?a:(o=s,a=t(r=i,l))}}(e,r,co(this,"style."+e,t))).each(function(e,t){var n,r,o,a,i="style."+t,l="end."+i;return function(){var s=ao(this,e),u=s.on,c=null==s.value[i]?a||(a=Eo(t)):void 0;u===n&&o===c||(r=(n=u).copy()).on(l,o=c),s.on=r}}(this._id,e)):this.styleTween(e,function(e,t,n){var r,o,a=n+"";return function(){var i=rn(this,e);return i===a?null:i===r?o:o=t(r=i,n)}}(e,r,t),n).on("end.style."+e,null)},styleTween:function(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==t)return this.tween(r,null);if("function"!=typeof t)throw new Error;return this.tween(r,function(e,t,n){var r,o;function a(){var a=t.apply(this,arguments);return a!==o&&(r=(o=a)&&function(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}(e,a,n)),r}return a._value=t,a}(e,t,null==n?"":n))},text:function(e){return this.tween("text","function"==typeof e?function(e){return function(){var t=e(this);this.textContent=null==t?"":t}}(co(this,"text",e)):function(e){return function(){this.textContent=e}}(null==e?"":e+""))},textTween:function(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(null==e)return this.tween(t,null);if("function"!=typeof e)throw new Error;return this.tween(t,function(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&function(e){return function(t){this.textContent=e.call(this,t)}}(r)),t}return r._value=e,r}(e))},remove:function(){return this.on("end.remove",function(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}(this._id))},tween:function(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r,o=io(this.node(),n).tween,a=0,i=o.length;a<i;++a)if((r=o[a]).name===e)return r.value;return null}return this.each((null==t?so:uo)(n,e,t))},delay:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?wo:_o)(t,e)):io(this.node(),t).delay},duration:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?Co:Oo)(t,e)):io(this.node(),t).duration},ease:function(e){var t=this._id;return arguments.length?this.each(function(e,t){if("function"!=typeof t)throw new Error;return function(){ao(this,e).ease=t}}(t,e)):io(this.node(),t).ease},easeVarying:function(e){if("function"!=typeof e)throw new Error;return this.each(function(e,t){return function(){var n=t.apply(this,arguments);if("function"!=typeof n)throw new Error;ao(this,e).ease=n}}(this._id,e))},end:function(){var e,t,n=this,r=n._id,o=n.size();return new Promise((function(a,i){var l={value:i},s={value:function(){0==--o&&a()}};n.each((function(){var n=ao(this,r),o=n.on;o!==e&&((t=(e=o).copy())._.cancel.push(l),t._.interrupt.push(l),t._.end.push(s)),n.on=t})),0===o&&a()}))},[Symbol.iterator]:To[Symbol.iterator]};var Ao={time:null,delay:0,duration:250,ease:function(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}};function No(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function zo(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function Mo(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=Io)):void 0===t&&(t=jo);for(var n,r,o,a,i,l=new Bo(e),s=[l];n=s.pop();)if((o=t(n.data))&&(i=(o=Array.from(o)).length))for(n.children=o,a=i-1;a>=0;--a)s.push(r=o[a]=new Bo(o[a])),r.parent=n,r.depth=n.depth+1;return l.eachBefore($o)}function jo(e){return e.children}function Io(e){return Array.isArray(e)?e[1]:null}function Do(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function $o(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function Bo(e){this.data=e,this.depth=this.height=0,this.parent=null}function Po(e,t){return e.parent===t.parent?1:2}function qo(e){var t=e.children;return t?t[0]:e.t}function Fo(e){var t=e.children;return t?t[t.length-1]:e.t}function Vo(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function Uo(e,t,n){return e.a.parent===t.parent?e.a:n}function Ho(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}function Ko(){var e=Po,t=1,n=1,r=null;function o(o){var s=function(e){for(var t,n,r,o,a,i=new Ho(e,0),l=[i];t=l.pop();)if(r=t._.children)for(t.children=new Array(a=r.length),o=a-1;o>=0;--o)l.push(n=t.children[o]=new Ho(r[o],o)),n.parent=t;return(i.parent=new Ho(null,0)).children=[i],i}(o);if(s.eachAfter(a),s.parent.m=-s.z,s.eachBefore(i),r)o.eachBefore(l);else{var u=o,c=o,d=o;o.eachBefore((function(e){e.x<u.x&&(u=e),e.x>c.x&&(c=e),e.depth>d.depth&&(d=e)}));var h=u===c?1:e(u,c)/2,p=h-u.x,f=t/(c.x+h+p),g=n/(d.depth||1);o.eachBefore((function(e){e.x=(e.x+p)*f,e.y=e.depth*g}))}return o}function a(t){var n=t.children,r=t.parent.children,o=t.i?r[t.i-1]:null;if(n){!function(e){for(var t,n=0,r=0,o=e.children,a=o.length;--a>=0;)(t=o[a]).z+=n,t.m+=n,n+=t.s+(r+=t.c)}(t);var a=(n[0].z+n[n.length-1].z)/2;o?(t.z=o.z+e(t._,o._),t.m=t.z-a):t.z=a}else o&&(t.z=o.z+e(t._,o._));t.parent.A=function(t,n,r){if(n){for(var o,a=t,i=t,l=n,s=a.parent.children[0],u=a.m,c=i.m,d=l.m,h=s.m;l=Fo(l),a=qo(a),l&&a;)s=qo(s),(i=Fo(i)).a=t,(o=l.z+d-a.z-u+e(l._,a._))>0&&(Vo(Uo(l,t,r),t,o),u+=o,c+=o),d+=l.m,u+=a.m,h+=s.m,c+=i.m;l&&!Fo(i)&&(i.t=l,i.m+=d-c),a&&!qo(s)&&(s.t=a,s.m+=u-h,r=t)}return r}(t,o,t.parent.A||r[0])}function i(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function l(e){e.x*=t,e.y=e.depth*n}return o.separation=function(t){return arguments.length?(e=t,o):e},o.size=function(e){return arguments.length?(r=!1,t=+e[0],n=+e[1],o):r?null:[t,n]},o.nodeSize=function(e){return arguments.length?(r=!0,t=+e[0],n=+e[1],o):r?[t,n]:null},o}jn.prototype.interrupt=function(e){return this.each((function(){lo(this,e)}))},jn.prototype.transition=function(e){var t,n;e instanceof Lo?(t=e._id,e=e._name):(t=Ro(),(n=Ao).time=Gr(),e=null==e?null:e+"");for(var r=this._groups,o=r.length,a=0;a<o;++a)for(var i,l=r[a],s=l.length,u=0;u<s;++u)(i=l[u])&&ro(i,e,t,u,l,n||No(i,t));return new Lo(r,this._parents,e,t)},Bo.prototype=Mo.prototype={constructor:Bo,count:function(){return this.eachAfter(zo)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,o,a=this,i=[a],l=[],s=-1;a=i.pop();)if(l.push(a),n=a.children)for(r=0,o=n.length;r<o;++r)i.push(n[r]);for(;a=l.pop();)e.call(t,a,++s,this);return this},eachBefore:function(e,t){for(var n,r,o=this,a=[o],i=-1;o=a.pop();)if(e.call(t,o,++i,this),n=o.children)for(r=n.length-1;r>=0;--r)a.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,o=r&&r.length;--o>=0;)n+=r[o].value;t.value=n}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),o=null;e=n.pop(),t=r.pop();for(;e===t;)o=e,e=n.pop(),t=r.pop();return o}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var o=r.length;e!==n;)r.splice(o,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return Mo(this).eachBefore(Do)},[Symbol.iterator]:function*(){var e,t,n,r,o=this,a=[o];do{for(e=a.reverse(),a=[];o=e.pop();)if(yield o,t=o.children)for(n=0,r=t.length;n<r;++n)a.push(t[n])}while(a.length)}},Ho.prototype=Object.create(Bo.prototype);var Go=e=>()=>e;function Zo(e,{sourceEvent:t,target:n,transform:r,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:o}})}function Yo(e,t,n){this.k=e,this.x=t,this.y=n}Yo.prototype={constructor:Yo,scale:function(e){return 1===e?this:new Yo(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new Yo(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Wo=new Yo(1,0,0);function Xo(e){e.stopImmediatePropagation()}function Jo(e){e.preventDefault(),e.stopImmediatePropagation()}function Qo(e){return!(e.ctrlKey&&"wheel"!==e.type||e.button)}function ea(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e).hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).x,e.y],[e.x+e.width,e.y+e.height]]:[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]:[[0,0],[e.clientWidth,e.clientHeight]]}function ta(){return this.__zoom||Wo}function na(e){return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function ra(){return navigator.maxTouchPoints||"ontouchstart"in this}function oa(e,t,n){var r=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],i=e.invertY(t[1][1])-n[1][1];return e.translate(o>r?(r+o)/2:Math.min(0,r)||Math.max(0,o),i>a?(a+i)/2:Math.min(0,a)||Math.max(0,i))}function aa(){var e,t,n,r=Qo,o=ea,a=oa,i=na,l=ra,s=[0,1/0],u=[[-1/0,-1/0],[1/0,1/0]],c=250,d=$r,h=yt("start","zoom","end"),p=0,f=10;function g(e){e.property("__zoom",ta).on("wheel.zoom",_,{passive:!1}).on("mousedown.zoom",C).on("dblclick.zoom",O).filter(l).on("touchstart.zoom",k).on("touchmove.zoom",E).on("touchend.zoom touchcancel.zoom",S).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(e,t){return(t=Math.max(s[0],Math.min(s[1],t)))===e.k?e:new Yo(t,e.x,e.y)}function b(e,t,n){var r=t[0]-n[0]*e.k,o=t[1]-n[1]*e.k;return r===e.x&&o===e.y?e:new Yo(e.k,r,o)}function v(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function y(e,t,n,r){e.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 e=this,a=arguments,i=x(e,a).event(r),l=o.apply(e,a),s=null==n?v(l):"function"==typeof n?n.apply(e,a):n,u=Math.max(l[1][0]-l[0][0],l[1][1]-l[0][1]),c=e.__zoom,h="function"==typeof t?t.apply(e,a):t,p=d(c.invert(s).concat(u/c.k),h.invert(s).concat(u/h.k));return function(e){if(1===e)e=h;else{var t=p(e),n=u/t[2];e=new Yo(n,s[0]-t[0]*n,s[1]-t[1]*n)}i.zoom(null,e)}}))}function x(e,t,n){return!n&&e.__zooming||new w(e,t)}function w(e,t){this.that=e,this.args=t,this.active=0,this.sourceEvent=null,this.extent=o.apply(e,t),this.taps=0}function _(e,...t){if(r.apply(this,arguments)){var n=x(this,t).event(e),o=this.__zoom,l=Math.max(s[0],Math.min(s[1],o.k*Math.pow(2,i.apply(this,arguments)))),c=Dn(e);if(n.wheel)n.mouse[0][0]===c[0]&&n.mouse[0][1]===c[1]||(n.mouse[1]=o.invert(n.mouse[0]=c)),clearTimeout(n.wheel);else{if(o.k===l)return;n.mouse=[c,o.invert(c)],lo(this),n.start()}Jo(e),n.wheel=setTimeout((function(){n.wheel=null,n.end()}),150),n.zoom("mouse",a(b(m(o,l),n.mouse[0],n.mouse[1]),n.extent,u))}}function C(e,...t){if(!n&&r.apply(this,arguments)){var o=e.currentTarget,i=x(this,t,!0).event(e),l=In(e.view).on("mousemove.zoom",(function(e){if(Jo(e),!i.moved){var t=e.clientX-c,n=e.clientY-d;i.moved=t*t+n*n>p}i.event(e).zoom("mouse",a(b(i.that.__zoom,i.mouse[0]=Dn(e,o),i.mouse[1]),i.extent,u))}),!0).on("mouseup.zoom",(function(e){l.on("mousemove.zoom mouseup.zoom",null),function(e,t){var n=e.document.documentElement,r=In(e).on("dragstart.drag",null);t&&(r.on("click.drag",Bn,$n),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}(e.view,i.moved),Jo(e),i.event(e).end()}),!0),s=Dn(e,o),c=e.clientX,d=e.clientY;!function(e){var t=e.document.documentElement,n=In(e).on("dragstart.drag",Bn,$n);"onselectstart"in t?n.on("selectstart.drag",Bn,$n):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}(e.view),Xo(e),i.mouse=[s,this.__zoom.invert(s)],lo(this),i.start()}}function O(e,...t){if(r.apply(this,arguments)){var n=this.__zoom,i=Dn(e.changedTouches?e.changedTouches[0]:e,this),l=n.invert(i),s=n.k*(e.shiftKey?.5:2),d=a(b(m(n,s),i,l),o.apply(this,t),u);Jo(e),c>0?In(this).transition().duration(c).call(y,d,i,e):In(this).call(g.transform,d,i,e)}}function k(n,...o){if(r.apply(this,arguments)){var a,i,l,s,u=n.touches,c=u.length,d=x(this,o,n.changedTouches.length===c).event(n);for(Xo(n),i=0;i<c;++i)s=[s=Dn(l=u[i],this),this.__zoom.invert(s),l.identifier],d.touch0?d.touch1||d.touch0[2]===s[2]||(d.touch1=s,d.taps=0):(d.touch0=s,a=!0,d.taps=1+!!e);e&&(e=clearTimeout(e)),a&&(d.taps<2&&(t=s[0],e=setTimeout((function(){e=null}),500)),lo(this),d.start())}}function E(e,...t){if(this.__zooming){var n,r,o,i,l=x(this,t).event(e),s=e.changedTouches,c=s.length;for(Jo(e),n=0;n<c;++n)o=Dn(r=s[n],this),l.touch0&&l.touch0[2]===r.identifier?l.touch0[0]=o:l.touch1&&l.touch1[2]===r.identifier&&(l.touch1[0]=o);if(r=l.that.__zoom,l.touch1){var d=l.touch0[0],h=l.touch0[1],p=l.touch1[0],f=l.touch1[1],g=(g=p[0]-d[0])*g+(g=p[1]-d[1])*g,v=(v=f[0]-h[0])*v+(v=f[1]-h[1])*v;r=m(r,Math.sqrt(g/v)),o=[(d[0]+p[0])/2,(d[1]+p[1])/2],i=[(h[0]+f[0])/2,(h[1]+f[1])/2]}else{if(!l.touch0)return;o=l.touch0[0],i=l.touch0[1]}l.zoom("touch",a(b(r,o,i),l.extent,u))}}function S(e,...r){if(this.__zooming){var o,a,i=x(this,r).event(e),l=e.changedTouches,s=l.length;for(Xo(e),n&&clearTimeout(n),n=setTimeout((function(){n=null}),500),o=0;o<s;++o)a=l[o],i.touch0&&i.touch0[2]===a.identifier?delete i.touch0:i.touch1&&i.touch1[2]===a.identifier&&delete i.touch1;if(i.touch1&&!i.touch0&&(i.touch0=i.touch1,delete i.touch1),i.touch0)i.touch0[1]=this.__zoom.invert(i.touch0[0]);else if(i.end(),2===i.taps&&(a=Dn(a,this),Math.hypot(t[0]-a[0],t[1]-a[1])<f)){var u=In(this).on("dblclick.zoom");u&&u.apply(this,arguments)}}}return g.transform=function(e,t,n,r){var o=e.selection?e.selection():e;o.property("__zoom",ta),e!==o?y(e,t,n,r):o.interrupt().each((function(){x(this,arguments).event(r).start().zoom(null,"function"==typeof t?t.apply(this,arguments):t).end()}))},g.scaleBy=function(e,t,n,r){g.scaleTo(e,(function(){return this.__zoom.k*("function"==typeof t?t.apply(this,arguments):t)}),n,r)},g.scaleTo=function(e,t,n,r){g.transform(e,(function(){var e=o.apply(this,arguments),r=this.__zoom,i=null==n?v(e):"function"==typeof n?n.apply(this,arguments):n,l=r.invert(i),s="function"==typeof t?t.apply(this,arguments):t;return a(b(m(r,s),i,l),e,u)}),n,r)},g.translateBy=function(e,t,n,r){g.transform(e,(function(){return a(this.__zoom.translate("function"==typeof t?t.apply(this,arguments):t,"function"==typeof n?n.apply(this,arguments):n),o.apply(this,arguments),u)}),null,r)},g.translateTo=function(e,t,n,r,i){g.transform(e,(function(){var e=o.apply(this,arguments),i=this.__zoom,l=null==r?v(e):"function"==typeof r?r.apply(this,arguments):r;return a(Wo.translate(l[0],l[1]).scale(i.k).translate("function"==typeof t?-t.apply(this,arguments):-t,"function"==typeof n?-n.apply(this,arguments):-n),e,u)}),r,i)},w.prototype={event:function(e){return e&&(this.sourceEvent=e),this},start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(e,t){return this.mouse&&"mouse"!==e&&(this.mouse[1]=t.invert(this.mouse[0])),this.touch0&&"touch"!==e&&(this.touch0[1]=t.invert(this.touch0[0])),this.touch1&&"touch"!==e&&(this.touch1[1]=t.invert(this.touch1[0])),this.that.__zoom=t,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(e){var t=In(this.that).datum();h.call(e,this.that,new Zo(e,{sourceEvent:this.sourceEvent,target:g,transform:this.that.__zoom,dispatch:h}),t)}},g.wheelDelta=function(e){return arguments.length?(i="function"==typeof e?e:Go(+e),g):i},g.filter=function(e){return arguments.length?(r="function"==typeof e?e:Go(!!e),g):r},g.touchable=function(e){return arguments.length?(l="function"==typeof e?e:Go(!!e),g):l},g.extent=function(e){return arguments.length?(o="function"==typeof e?e:Go([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),g):o},g.scaleExtent=function(e){return arguments.length?(s[0]=+e[0],s[1]=+e[1],g):[s[0],s[1]]},g.translateExtent=function(e){return arguments.length?(u[0][0]=+e[0][0],u[1][0]=+e[1][0],u[0][1]=+e[0][1],u[1][1]=+e[1][1],g):[[u[0][0],u[0][1]],[u[1][0],u[1][1]]]},g.constrain=function(e){return arguments.length?(a=e,g):a},g.duration=function(e){return arguments.length?(c=+e,g):c},g.interpolate=function(e){return arguments.length?(d=e,g):d},g.on=function(){var e=h.on.apply(h,arguments);return e===h?g:e},g.clickDistance=function(e){return arguments.length?(p=(e=+e)*e,g):Math.sqrt(p)},g.tapDistance=function(e){return arguments.length?(f=+e,g):f},g}Yo.prototype;const ia={cardWidth:152,cardHeight:64,cardHeightLarge:208,widthMargin:32,heightMargin:56,buttonMargin:16,leafMargin:16,cardPadding:8,buttonWidth:48,buttonHeight:24,rootDiameter:20,r:4,tooltipPadding:15,maxZoom:6,minZoom:.2},la={aliceblue:{r:240,g:248,b:255},antiquewhite:{r:250,g:235,b:215},aqua:{r:0,g:255,b:255},aquamarine:{r:127,g:255,b:212},azure:{r:240,g:255,b:255},beige:{r:245,g:245,b:220},bisque:{r:255,g:228,b:196},black:{r:0,g:0,b:0},blanchedalmond:{r:255,g:235,b:205},blue:{r:0,g:0,b:255},blueviolet:{r:138,g:43,b:226},brown:{r:165,g:42,b:42},burlywood:{r:222,g:184,b:135},cadetblue:{r:95,g:158,b:160},chartreuse:{r:127,g:255,b:0},chocolate:{r:210,g:105,b:30},coral:{r:255,g:127,b:80},cornflowerblue:{r:100,g:149,b:237},cornsilk:{r:255,g:248,b:220},crimson:{r:220,g:20,b:60},cyan:{r:0,g:255,b:255},darkblue:{r:0,g:0,b:139},darkcyan:{r:0,g:139,b:139},darkgoldenrod:{r:184,g:134,b:11},darkgray:{r:169,g:169,b:169},darkgreen:{r:0,g:100,b:0},darkgrey:{r:169,g:169,b:169},darkkhaki:{r:189,g:183,b:107},darkmagenta:{r:139,g:0,b:139},darkolivegreen:{r:85,g:107,b:47},darkorange:{r:255,g:140,b:0},darkorchid:{r:153,g:50,b:204},darkred:{r:139,g:0,b:0},darksalmon:{r:233,g:150,b:122},darkseagreen:{r:143,g:188,b:143},darkslateblue:{r:72,g:61,b:139},darkslategray:{r:47,g:79,b:79},darkslategrey:{r:47,g:79,b:79},darkturquoise:{r:0,g:206,b:209},darkviolet:{r:148,g:0,b:211},deeppink:{r:255,g:20,b:147},deepskyblue:{r:0,g:191,b:255},dimgray:{r:105,g:105,b:105},dimgrey:{r:105,g:105,b:105},dodgerblue:{r:30,g:144,b:255},firebrick:{r:178,g:34,b:34},floralwhite:{r:255,g:250,b:240},forestgreen:{r:34,g:139,b:34},fuchsia:{r:255,g:0,b:255},gainsboro:{r:220,g:220,b:220},ghostwhite:{r:248,g:248,b:255},gold:{r:255,g:215,b:0},goldenrod:{r:218,g:165,b:32},gray:{r:128,g:128,b:128},green:{r:0,g:128,b:0},greenyellow:{r:173,g:255,b:47},grey:{r:128,g:128,b:128},honeydew:{r:240,g:255,b:240},hotpink:{r:255,g:105,b:180},indianred:{r:205,g:92,b:92},indigo:{r:75,g:0,b:130},ivory:{r:255,g:255,b:240},khaki:{r:240,g:230,b:140},lavender:{r:230,g:230,b:250},lavenderblush:{r:255,g:240,b:245},lawngreen:{r:124,g:252,b:0},lemonchiffon:{r:255,g:250,b:205},lightblue:{r:173,g:216,b:230},lightcoral:{r:240,g:128,b:128},lightcyan:{r:224,g:255,b:255},lightgoldenrodyellow:{r:250,g:250,b:210},lightgray:{r:211,g:211,b:211},lightgreen:{r:144,g:238,b:144},lightgrey:{r:211,g:211,b:211},lightpink:{r:255,g:182,b:193},lightsalmon:{r:255,g:160,b:122},lightseagreen:{r:32,g:178,b:170},lightskyblue:{r:135,g:206,b:250},lightslategray:{r:119,g:136,b:153},lightslategrey:{r:119,g:136,b:153},lightsteelblue:{r:176,g:196,b:222},lightyellow:{r:255,g:255,b:224},lime:{r:0,g:255,b:0},limegreen:{r:50,g:205,b:50},linen:{r:250,g:240,b:230},magenta:{r:255,g:0,b:255},maroon:{r:128,g:0,b:0},mediumaquamarine:{r:102,g:205,b:170},mediumblue:{r:0,g:0,b:205},mediumorchid:{r:186,g:85,b:211},mediumpurple:{r:147,g:112,b:219},mediumseagreen:{r:60,g:179,b:113},mediumslateblue:{r:123,g:104,b:238},mediumspringgreen:{r:0,g:250,b:154},mediumturquoise:{r:72,g:209,b:204},mediumvioletred:{r:199,g:21,b:133},midnightblue:{r:25,g:25,b:112},mintcream:{r:245,g:255,b:250},mistyrose:{r:255,g:228,b:225},moccasin:{r:255,g:228,b:181},navajowhite:{r:255,g:222,b:173},navy:{r:0,g:0,b:128},oldlace:{r:253,g:245,b:230},olive:{r:128,g:128,b:0},olivedrab:{r:107,g:142,b:35},orange:{r:255,g:165,b:0},orangered:{r:255,g:69,b:0},orchid:{r:218,g:112,b:214},palegoldenrod:{r:238,g:232,b:170},palegreen:{r:152,g:251,b:152},paleturquoise:{r:175,g:238,b:238},palevioletred:{r:219,g:112,b:147},papayawhip:{r:255,g:239,b:213},peachpuff:{r:255,g:218,b:185},peru:{r:205,g:133,b:63},pink:{r:255,g:192,b:203},plum:{r:221,g:160,b:221},powderblue:{r:176,g:224,b:230},purple:{r:128,g:0,b:128},rebeccapurple:{r:102,g:51,b:153},red:{r:255,g:0,b:0},rosybrown:{r:188,g:143,b:143},royalblue:{r:65,g:105,b:225},saddlebrown:{r:139,g:69,b:19},salmon:{r:250,g:128,b:114},sandybrown:{r:244,g:164,b:96},seagreen:{r:46,g:139,b:87},seashell:{r:255,g:245,b:238},sienna:{r:160,g:82,b:45},silver:{r:192,g:192,b:192},skyblue:{r:135,g:206,b:235},slateblue:{r:106,g:90,b:205},slategray:{r:112,g:128,b:144},slategrey:{r:112,g:128,b:144},snow:{r:255,g:250,b:250},springgreen:{r:0,g:255,b:127},steelblue:{r:70,g:130,b:180},tan:{r:210,g:180,b:140},teal:{r:0,g:128,b:128},thistle:{r:216,g:191,b:216},tomato:{r:255,g:99,b:71},transparent:{r:255,g:255,b:255,a:0},turquoise:{r:64,g:224,b:208},violet:{r:238,g:130,b:238},wheat:{r:245,g:222,b:179},white:{r:255,g:255,b:255},whitesmoke:{r:245,g:245,b:245},yellow:{r:255,g:255,b:0},yellowgreen:{r:154,g:205,b:50}},sa={resolveExpression:e=>{let t=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e);if(t)return`rgb(${t[1]},${t[2]},${t[3]})`;if(t=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(e),t)return`rgba(${t[1]},${t[2]},${t[3]},${t[4]})`;if(t=/^argb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e),t){const e=Math.round(t[1]/2.55)/100;return`rgba(${t[2]},${t[3]},${t[4]},${e})`}if(t=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i.exec(e),t)return e;const n=e&&la[e.toLowerCase()];if(n){const e=void 0!==n.a?n.a:1;return`rgba(${n.r},${n.g},${n.b},${e})`}return"none"},getDarkColor(e){const t=.5;let n,r,o,a;if(e.length>7){n=e.split(",");const i=-1!==n[0].indexOf("a");return r=i?parseInt(n[0].slice(5),10):parseInt(n[0].slice(4),10),a=parseInt(n[1],10),o=parseInt(n[2],10),`${(i?"rgba(":"rgb(")+(Math.round((0-r)*t)+r)},${Math.round((0-a)*t)+a},${Math.round((0-o)*t)+o}${i?`,${n[3]}`:")"}`}return n=parseInt(e.slice(1),16),r=n>>16,a=n>>8&255,o=255&n,`#${(16777216+65536*(Math.round((0-r)*t)+r)+256*(Math.round((0-a)*t)+a)+(Math.round((0-o)*t)+o)).toString(16).slice(1)}`},isDarkColor(e){let t,n,r,o;return(o=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e))||(o=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(e))?(t=parseInt(o[1],10),n=parseInt(o[2],10),r=parseInt(o[3],10)):(o=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i.exec(e))&&(t=parseInt(o[1],16),n=parseInt(o[2],16),r=parseInt(o[3],16)),.299*t+.587*n+.114*r<125}};function ua(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ca(e,t,n){return t=fa(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ma()?Reflect.construct(t,n||[],fa(e).constructor):t.apply(e,n))}function da(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ha(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ya(r.key),r)}}function pa(e,t,n){return t&&ha(e.prototype,t),n&&ha(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function fa(e){return fa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},fa(e)}function ga(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ba(e,t)}function ma(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ma=function(){return!!e})()}function ba(e,t){return ba=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ba(e,t)}function va(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],s=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t);else for(;!(s=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){u=!0,o=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ua(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ua(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ya(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}function xa(e){return xa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xa(e)}var wa={fromSearchString:function(e){if(!e)return[];"?"===e[0]&&(e=e.substr(1));var t=[];return e.split("&").forEach((function(e){if(e){var n,r=e.indexOf("="),o="",a=!1;-1===r?n=e:(n=e.slice(0,r),o=e.slice(r+1),a=!0),t.push(function(e,t,n){return{key:_a(e),value:_a(t),useEqualSign:n}}(n,o,a))}})),t}};function _a(e){try{return decodeURIComponent(e)}catch(t){return e}}function Ca(e){if(!(this instanceof Ca))throw new Error("Url needs to be called with the new keyword");if(!e)throw new Error("Url needs a string to operate on");var t=function(e){var t={authorityAndPath:"",search:"",hash:""},n=e.indexOf("#");-1!==n&&(t.hash=e.substr(n),e=e.substr(0,n));n=e.indexOf("?"),-1!==n&&(t.search=e.substr(n),e=e.substr(0,n));return t.authorityAndPath=e,t}(e);Object.defineProperties(this,{authorityAndPath:{value:t.authorityAndPath},search:{value:t.search},hash:{value:t.hash},searchParams:{get:function(){return wa.fromSearchString(t.search)}}})}function Oa(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";")}Ca.encodeAuthorityAndPath=function(e){return encodeURI(e).replace(/%5B/gi,"[").replace(/%5D/gi,"]").replace(/%25/gi,"%")},Ca.encodeSearchParams=function(e){for(var t,n="",r=0;r<e.length;r++)n+=0===r?"?":"&",n+=Oa((t=e[r]).key),t.value?n+="=".concat(Oa(t.value)):n+=t.useEqualSign?"=":"";return n};var ka,Ea=function(){return pa((function e(t){da(this,e),this._input=t,this._pushback=null,this._temp=null,this._index=0,this._mark=0}),[{key:"_hasNext",value:function(){return null!=this._input&&(0!==this._input.length&&this._index<this._input.length)}},{key:"pushback",value:function(e){this._pushback=e}},{key:"index",value:function(){return this._index}},{key:"hasNext",value:function(){return null!=this._pushback||this._hasNext()}},{key:"next",value:function(){if(null!=this._pushback){var e=this._pushback;return this._pushback=null,e}return this._hasNext()?this._input.charAt(this._index++):null}},{key:"nextHex",value:function(){var e=this.next();return null==e?null:e.match(/[0-9A-Fa-f]/)?e:null}},{key:"peek",value:function(e){return e?!(!this._pushback||this._pushback!==e)||!!this._hasNext()&&this._input.charAt(this._index)===e:this._pushback?this._pushback:this._hasNext()?this._input.charAt(this._index):null}},{key:"mark",value:function(){this._temp=this._pushback,this._mark=this._index}},{key:"reset",value:function(){this._pushback=this._temp,this._index=this._mark}},{key:"remainder",value:function(){var e=this._input.substr(this._index);return null!=this._pushback&&(e=this._pushback+e),e}}])}(),Sa=function(){return pa((function e(){da(this,e)}),[{key:"decode",value:function(e){for(var t,n="",r=new Ea(e);r.hasNext();)n+=null!=(t=this.decodeCharacter(r))?t:r.next();return n}},{key:"decodeCharacter",value:function(e){return e.next()}}])}(),La=function(e){return e>=0&&e<=1114111},Ra=function(e){return e.match(/[\s]/)},Ta=function(){function e(){return da(this,e),ca(this,e,arguments)}return ga(e,Sa),pa(e,[{key:"decodeCharacter",value:function(e){e.mark();var t,n,r,o=e.next();if(null==o||"\\"!==o)return e.reset(),null;var a=e.next();if(null==a)return e.reset(),null;switch(a){case"\r":e.peek("\n")&&e.next();case"\n":case"\f":case"\0":return this.decodeCharacter(e)}if("NaN"===parseInt(a,16))return a;for(t=a,n=0;n<5&&(null!=(r=e.next())&&!Ra(r));n++){if("NaN"===parseInt(r,16)){e.pushback(r);break}t+=r}var i=parseInt(t,16);return La(i)?String.fromCharCode(i):"�"}}])}(),Aa=function(){function e(t,n){da(this,e),this._key=t,this._value=n}return pa(e,[{key:"getKey",value:function(){return this._key}},{key:"getValue",value:function(){return this._value}},{key:"equals",value:function(t){return t instanceof e&&(this._key===t._key&&this._value===t._value)}}],[{key:"newInstanceIfNeeded",value:function(){var t,n,r=arguments[0];return"string"==typeof arguments[1]?(t=arguments[1],n=r.length):(n=arguments[1],t=arguments[2]),t&&r?(r.length>n&&(r=r.substr(0,n)),new e(r,t)):null}}])}(),Na=function(){function e(){da(this,e)}return pa(e,[{key:"setValue",value:function(e){this._nextMap=null,this._value=e}},{key:"getNextNode",value:function(e){return this._nextMap?this._nextMap[e]:null}},{key:"put",value:function(t,n,r){var o,a;if(t.length===n)return a=this._value,this.setValue(r),a;var i=t.charAt(n);return this._nextMap?(o=this._nextMap[i])||(o=new e,this._nextMap[i]=o):(this._nextMap={},o=new e,this._nextMap[i]=o),o.put(t,n+1,r)}},{key:"get",value:function(e,t){if(e.length<=t)return this._value;var n=this.getNextNode(e.charAt(t));return n?n.get(e,t+1):null}},{key:"getLongestMatch",value:function(e,t){if(e.length<=t)return Aa.newInstanceIfNeeded(e,this._value);var n=this.getNextNode(e.charAt(t));if(!n)return Aa.newInstanceIfNeeded(e,t,this._value);var r=n.getLongestMatch(e,t+1);return r||Aa.newInstanceIfNeeded(e,t,this._value)}}])}(),za=function(){return pa((function e(){da(this,e),this.clear()}),[{key:"getLongestMatch",value:function(e){return this.root&&e?this.root.getLongestMatch(e,0):null}},{key:"getMaxKeyLength",value:function(){return this.maxKeyLen}},{key:"clear",value:function(){this.root=null,this.maxKeyLen=0,this.size=0}},{key:"put",value:function(e,t){this.root||(this.root=new Na);var n=this.root.put(e,0,t);return n||(e.length>this.maxKeyLen&&(this.maxKeyLen=e.length),this.size++,null)}}])}(),Ma=function(){var e,t,n,r=[],o=[],a=new za;for(e in r["&quot"]="34",r["&amp"]="38",r["&lt"]="60",r["&gt"]="62",r["&nbsp"]="160",r["&iexcl"]="161",r["&cent"]="162",r["&pound"]="163",r["&curren"]="164",r["&yen"]="165",r["&brvbar"]="166",r["&sect"]="167",r["&uml"]="168",r["&copy"]="169",r["&ordf"]="170",r["&laquo"]="171",r["&not"]="172",r["&shy"]="173",r["&reg"]="174",r["&macr"]="175",r["&deg"]="176",r["&plusmn"]="177",r["&sup2"]="178",r["&sup3"]="179",r["&acute"]="180",r["&micro"]="181",r["&para"]="182",r["&middot"]="183",r["&cedil"]="184",r["&sup1"]="185",r["&ordm"]="186",r["&raquo"]="187",r["&frac14"]="188",r["&frac12"]="189",r["&frac34"]="190",r["&iquest"]="191",r["&Agrave"]="192",r["&Aacute"]="193",r["&Acirc"]="194",r["&Atilde"]="195",r["&Auml"]="196",r["&Aring"]="197",r["&AElig"]="198",r["&Ccedil"]="199",r["&Egrave"]="200",r["&Eacute"]="201",r["&Ecirc"]="202",r["&Euml"]="203",r["&Igrave"]="204",r["&Iacute"]="205",r["&Icirc"]="206",r["&Iuml"]="207",r["&ETH"]="208",r["&Ntilde"]="209",r["&Ograve"]="210",r["&Oacute"]="211",r["&Ocirc"]="212",r["&Otilde"]="213",r["&Ouml"]="214",r["&times"]="215",r["&Oslash"]="216",r["&Ugrave"]="217",r["&Uacute"]="218",r["&Ucirc"]="219",r["&Uuml"]="220",r["&Yacute"]="221",r["&THORN"]="222",r["&szlig"]="223",r["&agrave"]="224",r["&aacute"]="225",r["&acirc"]="226",r["&atilde"]="227",r["&auml"]="228",r["&aring"]="229",r["&aelig"]="230",r["&ccedil"]="231",r["&egrave"]="232",r["&eacute"]="233",r["&ecirc"]="234",r["&euml"]="235",r["&igrave"]="236",r["&iacute"]="237",r["&icirc"]="238",r["&iuml"]="239",r["&eth"]="240",r["&ntilde"]="241",r["&ograve"]="242",r["&oacute"]="243",r["&ocirc"]="244",r["&otilde"]="245",r["&ouml"]="246",r["&divide"]="247",r["&oslash"]="248",r["&ugrave"]="249",r["&uacute"]="250",r["&ucirc"]="251",r["&uuml"]="252",r["&yacute"]="253",r["&thorn"]="254",r["&yuml"]="255",r["&OElig"]="338",r["&oelig"]="339",r["&Scaron"]="352",r["&scaron"]="353",r["&Yuml"]="376",r["&fnof"]="402",r["&circ"]="710",r["&tilde"]="732",r["&Alpha"]="913",r["&Beta"]="914",r["&Gamma"]="915",r["&Delta"]="916",r["&Epsilon"]="917",r["&Zeta"]="918",r["&Eta"]="919",r["&Theta"]="920",r["&Iota"]="921",r["&Kappa"]="922",r["&Lambda"]="923",r["&Mu"]="924",r["&Nu"]="925",r["&Xi"]="926",r["&Omicron"]="927",r["&Pi"]="928",r["&Rho"]="929",r["&Sigma"]="931",r["&Tau"]="932",r["&Upsilon"]="933",r["&Phi"]="934",r["&Chi"]="935",r["&Psi"]="936",r["&Omega"]="937",r["&alpha"]="945",r["&beta"]="946",r["&gamma"]="947",r["&delta"]="948",r["&epsilon"]="949",r["&zeta"]="950",r["&eta"]="951",r["&theta"]="952",r["&iota"]="953",r["&kappa"]="954",r["&lambda"]="955",r["&mu"]="956",r["&nu"]="957",r["&xi"]="958",r["&omicron"]="959",r["&pi"]="960",r["&rho"]="961",r["&sigmaf"]="962",r["&sigma"]="963",r["&tau"]="964",r["&upsilon"]="965",r["&phi"]="966",r["&chi"]="967",r["&psi"]="968",r["&omega"]="969",r["&thetasym"]="977",r["&upsih"]="978",r["&piv"]="982",r["&ensp"]="8194",r["&emsp"]="8195",r["&thinsp"]="8201",r["&zwnj"]="8204",r["&zwj"]="8205",r["&lrm"]="8206",r["&rlm"]="8207",r["&ndash"]="8211",r["&mdash"]="8212",r["&lsquo"]="8216",r["&rsquo"]="8217",r["&sbquo"]="8218",r["&ldquo"]="8220",r["&rdquo"]="8221",r["&bdquo"]="8222",r["&dagger"]="8224",r["&Dagger"]="8225",r["&bull"]="8226",r["&hellip"]="8230",r["&permil"]="8240",r["&prime"]="8242",r["&Prime"]="8243",r["&lsaquo"]="8249",r["&rsaquo"]="8250",r["&oline"]="8254",r["&frasl"]="8260",r["&euro"]="8364",r["&image"]="8365",r["&weierp"]="8472",r["&real"]="8476",r["&trade"]="8482",r["&alefsym"]="8501",r["&larr"]="8592",r["&uarr"]="8593",r["&rarr"]="8594",r["&darr"]="8595",r["&harr"]="8596",r["&crarr"]="8629",r["&lArr"]="8656",r["&uArr"]="8657",r["&rArr"]="8658",r["&dArr"]="8659",r["&hArr"]="8660",r["&forall"]="8704",r["&part"]="8706",r["&exist"]="8707",r["&empty"]="8709",r["&nabla"]="8711",r["&isin"]="8712",r["&notin"]="8713",r["&ni"]="8715",r["&prod"]="8719",r["&sum"]="8721",r["&minus"]="8722",r["&lowast"]="8727",r["&radic"]="8730",r["&prop"]="8733",r["&infin"]="8734",r["&ang"]="8736",r["&and"]="8743",r["&or"]="8744",r["&cap"]="8745",r["&cup"]="8746",r["&int"]="8747",r["&there4"]="8756",r["&sim"]="8764",r["&cong"]="8773",r["&asymp"]="8776",r["&ne"]="8800",r["&equiv"]="8801",r["&le"]="8804",r["&ge"]="8805",r["&sub"]="8834",r["&sup"]="8835",r["&nsub"]="8836",r["&sube"]="8838",r["&supe"]="8839",r["&oplus"]="8853",r["&otimes"]="8855",r["&perp"]="8869",r["&sdot"]="8901",r["&lceil"]="8968",r["&rceil"]="8969",r["&lfloor"]="8970",r["&rfloor"]="8971",r["&lang"]="9001",r["&rang"]="9002",r["&loz"]="9674",r["&spades"]="9824",r["&clubs"]="9827",r["&hearts"]="9829",r["&diams"]="9830",r)"function"!=typeof r[e]&&r.hasOwnProperty(e)&&(o[r[e]]=e);for(t in o)"function"!=typeof o[t]&&o.hasOwnProperty(t)&&(n=o[t].toLowerCase().substr(1),a.put(n,String.fromCharCode(t)));return a}(),ja=function(){function e(){return da(this,e),ca(this,e,arguments)}return ga(e,Sa),pa(e,[{key:"decodeCharacter",value:function(e){var t;e.mark();var n=e.next();if(null==n||"&"!==n)return e.reset(),null;var r=e.next();if(null==r)return e.reset(),null;if("#"===r){if(null!=(t=this._getNumericEntity(e)))return t}else if(r.match(/[A-Za-z]/)&&(e.pushback(r),null!=(t=this._getNamedEntity(e))))return t;return e.reset(),null}},{key:"_getNamedEntity",value:function(e){var t,n,r,o="";for(t=Math.min(e.remainder().length,Ma.getMaxKeyLength()),r=0;r<t;r++)o+=e.next().toLowerCase();var a=Ma.getLongestMatch(o);if(null==a)return null;for(e.reset(),e.next(),t=a.getKey().length,n=0;n<t;n++)e.next();return e.peek(";")&&e.next(),a.getValue()}},{key:"_getNumericEntity",value:function(e){var t=e.peek();return null==t?null:"x"===t||"X"===t?(e.next(),this._parseHex(e)):this._parseNumber(e)}},{key:"_parseHex",value:function(e){for(var t,n="";e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,16))){if(";"===t){e.next();break}break}n+=t,e.next()}var r=parseInt(n,16);return!Number.isNaN(+r)&&La(r)?String.fromCharCode(r):null}},{key:"_parseNumber",value:function(e){for(var t,n="";e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,10))){if(";"===t){e.next();break}break}n+=t,e.next()}var r=parseInt(n,10);return!Number.isNaN(+r)&&La(r)?String.fromCharCode(r):null}}])}(),Ia=function(){function e(){return da(this,e),ca(this,e,arguments)}return ga(e,Sa),pa(e,[{key:"decodeCharacter",value:function(e){e.mark();var t,n,r,o,a=e.next();if(null==a)return e.reset(),null;if("%"!==a)return e.reset(),null;for(t="",n=0;n<2;n++)null!=(r=e.nextHex())&&(t+=r);return 2===t.length&&(o=parseInt(t,16),La(o))?String.fromCharCode(o):(e.reset(),null)}}])}(),Da=/^data:(?<!\s)\s*(image\/[\w+-.]+)(?<!\s)\s*(;.*?){0,1}(?<!\s)\s*,(.*)/i;"undefined"!=typeof document&&(ka=document.createElement("div"));var $a=Array.prototype.indexOf,Ba=[",",".","_"," "],Pa=[",",".","-","_"," "],qa={width:["%"],height:["%"]},Fa={default:["-"," ","%"],color:["#"," ","(",")"],image:["(",")",":","/","?","&","-",".",'"',"="," "]},Va={background:["(",")",":","%","/","?","&","-"," ",".",'"',"=","#"],"background-image":Fa.image,"background-color":Fa.color,"border-color":Fa.color,"border-image":Fa.image,color:Fa.color,icon:Fa.image,"list-style-image":Fa.image,"outline-color":Fa.color},Ua={attr_name:["on[a-z]{1,}","style","href","src"],attr_val:["javascript:"],css_key:["behavior","-moz-behavior","-ms-behavior"],css_val:["expression"]};function Ha(e,t,n){var r;if(t){if($a)return $a.call(t,e,n);for(r=t.length,n=n?n<0?Math.max(0,r+n):n:0;n<r;n++)if(n in t&&t[n]===e)return n}return-1}function Ka(e){if(null==e)return"";var t,n=document.createTextNode(e);return ka.appendChild(n),t=ka.innerHTML,ka.removeChild(n),t}function Ga(e,t,n){var r,o,a,i,l,s,u,c,d;if(e=Ya(e).toLowerCase(),t=Ya(t),Ha(e,Ua.attr_name)>=0)throw new Error("Unsafe attribute name used: ".concat(e));for(a=0;a<Ua.attr_val;a++)if(t.toLowerCase().match(Ua.attr_val[a]))throw new Error("Unsafe attribute value used: ".concat(t));if((r=qa[e])||(r=Pa),o="",!n){for(i=0;i<e.length;i++){if(!(l=e.charAt(i)).match(/[a-zA-Z\-0-9]/))throw new Error("Invalid attribute name specified");o+=l}o+='="'}for(s=0;s<t.length;s++)u=t.charAt(s),c=t.charCodeAt(s),!u.match(/[a-zA-Z0-9]/)&&Ha(u,r)<0?(d=c.toString(16),o+="&#x".concat(d,";")):o+=u;return n||(o+='"'),o}function Za(e,t,n){var r,o,a,i,l,s,u,c,d,h;if(e=Ya(e).toLowerCase(),t=Ya(t),Ha(e,Ua.css_key)>=0)throw new Error("Unsafe property name used: ".concat(e));for(r=0;r<Ua.css_val.length;r++)if(t.toLowerCase().indexOf(Ua.css_val[r])>=0)throw new Error("Unsafe property value used: ".concat(t));if((o=Va[e])||(o=Fa.default),a="",!n){for(i=0;i<e.length;i++){if(!(l=e.charAt(i)).match(/[a-zA-Z-]/))throw new Error("Invalid Property Name specified");a+=l}a+=": "}for(s=0;s<t.length;s++)u=t.charAt(s),c=t.charCodeAt(s),!u.match(/[a-zA-Z0-9]/)&&Ha(u,o)<0?(d=c.toString(16),h="000000".substr(d.length),a+="\\".concat(h).concat(d)):a+=u;return a}function Ya(e,t){var n,r,o,a,i=!1;if(null===e)return null;n=e,r=e,o=0;for(var l=[new ja,new Ia,new Ta];!i;){r=n;for(var s=0;s<l.length;s++)(a=l[s].decode(n))!==n&&(o++,n=a);r!==n||(i=!0)}if(t&&o>1)throw new Error("Attack Detected - Multiple/Double Encodings used in input");return n}for(var Wa=[],Xa=0;Xa<255;Xa++)Wa[Xa]=Xa>=48&&Xa<=57||Xa>=65&&Xa<=90||Xa>=97&&Xa<=122?null:Xa.toString(16);var Ja=function(e){return Ka(e.unsafe)},Qa=function(e){var t,n=[],r=[],o={},a="";for(t in e.map?n=e.map:n[e.name]=e.unsafe,n)"function"!=typeof n[t]&&n.hasOwnProperty(t)&&(r[t]=Za(t,n[t],!0),a+=Za(t,n[t],!0),o[t]=r[t]);return e.map?o:a},ei=function(e){var t=[],n=[],r={},o="";for(var a in e.map?t=e.map:t[e.name]=e.unsafe,t)"function"!=typeof t[a]&&t.hasOwnProperty(a)&&(n[a]=Ga(a,t[a],!0),o+=Ga(a,t[a],!0),r[a]=n[a]);return e.map?r:o};function ti(e,t){throw new Error(t)}var ni={canonicalize:Ya,encode:function(){var e={context:"html",unsafe:null,name:null,map:null,setter:null,strict:!0};return 1===arguments.length&&"object"===xa(arguments[0])?function(){for(var e,t,n,r=arguments[0]||{},o=1,a=arguments.length;o<a;o++)if(null!=(e=arguments[o]))for(t in e)if(e.hasOwnProperty(t)){if(r===(n=e[t]))continue;void 0!==n&&(r[t]=n)}}(e,arguments[0]):(e.context=arguments[0],2===arguments.length?"html"===e.context?e.unsafe=arguments[1]:"attr"!==e.context&&"css"!==e.context||(e.map=arguments[1]):(e.name=arguments[2],e.unsafe=arguments[1])),"html"===e.context?Ja(e):"css"===e.context?(null!=e.map&&"object"!==xa(e.map)&&ti(this,"Invalid parameter type"),Qa(e)):"attr"===e.context?(null!=e.map&&"object"!==xa(e.map)&&ti(this,"Invalid parameter type"),ei(e)):void ti(this,"Invalid parameter type")},encodeForAttr:Ga,encodeForAttr2:function(e){return Ga("nonsens",e,!0)},encodeForCSS:Za,encodeForHref:function(e){Ya(e),0!==e.search("[a-zA-Z0-9]+:")&&(e="http://".concat(e));var t=new Ca(e),n=Ca.encodeAuthorityAndPath(decodeURI(t.authorityAndPath)),r=t.searchParams,o=(e=n+Ca.encodeSearchParams(r)+t.hash).toLowerCase();if(-1!==o.indexOf("javascript:"))throw new Error("Attack Detected - Javascript in input");if(-1!==o.indexOf("data:"))throw new Error("Attack Detected - data in input");return e},encodeForJS:function(e,t){var n,r,o,a,i,l;for(t||(t=Ba),l="",n=0;n<e.length;n++)o=e.charAt(n),a=e.charCodeAt(n),Ha(o,t)>=0||null==Wa[a]?l+=o:(r=a.toString(16),a<256?(i="00".substr(r.length),l+="\\x".concat(i).concat(r.toUpperCase())):(i="0000".substr(r.length),l+="\\u".concat(i).concat(r.toUpperCase())));return l},encodeForHTML:Ka,encodeForURL:function(e,t){var n="";return t&&(t.match(/^[A-Za-z\-0-9]{1,}$/)?n+=Ya(t).toLowerCase():ti(this,"Illegal Attribute Name Specified"),n+='="'),n+=encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A"),n+=t?'"':""},isSafeDataURL:function(e,t){var n=null!=t?t:{},r=n.maxByteSizeSvg,o=void 0===r?5e5:r,a=n.maxByteSizeImage,i=void 0===a?5e6:a,l=function(e){var t,n=va(null!==(t=Da.exec(e.trim()))&&void 0!==t?t:[],4),r=n[1];return{encoding:n[2],data:n[3],mimeType:null==r?void 0:r.toLocaleLowerCase()}}(e),s=l.mimeType,u=l.encoding,c=l.data;if(!c)return!0;var d=function(e,t,n){var r={type:e};if(null!=t&&t.includes(";base64"))try{return new Blob([atob(n)],r).size}catch(e){return new Blob([n],r).size}return"image/svg+xml"===e?new Blob([n],r).size:0}(s,u,c);return"image/svg+xml"===s?d<=o:d<=i},validateURI:function(e){if(""===e||function(e){if("canParse"in URL)return URL.canParse(e);try{return new URL(e),!0}catch(e){return!1}}(e))return!1;var t=e.replace(/%2E/gi,".");if(t.match(/[#&=: ]/))return!1;var n=function(e){for(var t=e,n="";t.length>0;)if(t.startsWith("../")||t.startsWith("./"))t=t.replace(/^\.\.?\//,"");else if(t.startsWith("/./"))t=t.replace(/^\/\.\//,"/");else if("/."===t)t="/";else if(t.startsWith("/../")){t=t.replace(/^\/\.\.\//,"/");var r=n.lastIndexOf("/");-1!==r&&(n=n.slice(0,r))}else if("/.."===t){t="/";var o=n.lastIndexOf("/");-1!==o&&(n=n.slice(0,o))}else if("."===t||".."===t)t="";else{var a=t.match(/^\/?[^/]*/),i=a?a[0]:"";t=t.slice(i.length),n+=i}return n}(t);return""!==n&&"/"!==n&&n}};const ri=["data:","http:","https:"],oi=e=>{try{return ni.encodeForAttr2(e)}catch(e){return""}},ai=e=>{const t=["#"," ","(",")"];let n="";for(let r=0;r<e.length;r++){const o=e.charAt(r),a=e.charCodeAt(r);if(!o.match(/[a-zA-Z0-9]/)&&t.indexOf(o)<0){const e=a.toString(16);n+=`\\${"000000".substr(e.length)}${e}`}else n+=o}return n},ii=e=>{try{var t;return(e=null===(t=e)||void 0===t?void 0:t.trim())&&(e=>{try{const t=new URL(e);return ri.includes(t.protocol)}catch(e){return!1}})(e)&&ni.isSafeDataURL(e)?/^data:/i.test(e)?encodeURI(ni.canonicalize(e)):ni.encodeForHref(e):""}catch(e){return""}};function li(e){const t=sa.resolveExpression(e);return"none"!==t?t:ai(e)}var si=(e,t,n)=>{const{api:r,state:o}=n,a=r&&r.isActive()&&-1!==o.indexOf(e.elemNo),i=function(e,t){if(e.attributes&&e.attributes.color){const t=sa.resolveExpression(e.attributes.color);if("none"!==t)return t}return li(t.backgroundColor)}(e,t),l=li(function(e,t){return"default"===e.fontColor?sa.isDarkColor(t)?Xe.FONT_COLOR_LIGHT.color:Xe.FONT_COLOR_DARK.color:e.fontColor}(t,i)),s=e.attributes||{};let u='<div class="sn-org-textbox">';if(u+=`<div class="sn-org-card-title">${oi(s.label||e.id)}</div>`,s.subLabel&&(u+=`<div class="sn-org-card-label">${oi(s.subLabel)}</div>`),e.measure){const n=t.measureLabel?`${t.measureLabel}: `:"";u+=`<div class="sn-org-card-label">${oi(n+e.measure)}</div>`}else s.extraLabel&&(u+=`<div class="sn-org-card-label">${oi(s.extraLabel)}</div>`);u+="</div>";const c=a?" selected":" not-selected",d=r&&r.isActive()?c:"",{top:h=Xe.BORDER_TOP,fullBorder:p=Xe.BORDER_FULL,colorType:f=Xe.BORDER_COLOR_TYPE}=t.border,g="auto"===f?sa.getDarkColor(i):li(t.borderColor);let m=ia.cardHeight;return a?m-=8:p?m-=4:h&&(m-=3),`<div class="sn-org-card-text${d}" style="background-color:${i};color:${l}; border:${p&&!a?`1px solid ${g}`:""}; border-top:${h&&!a?`3px solid ${g}`:""}; height:${m}px;">${u}</div>`};function ui(e){return[void 0,"left","right"].includes(e.cardImage.alignment)}function ci(e){const t=sa.resolveExpression(e);return"none"!==t?t:ai(e)}function di(e,t){return"default"===e?sa.isDarkColor(t)?Xe.FONT_COLOR_LIGHT.color:Xe.FONT_COLOR_DARK.color:e}const hi=(e,t)=>`font-family:${e.fontFamily}; font-size:${e.fontSize}; color:${t}`;function pi(e,t,n,r){const o=function(e,t){if(e.attributes&&e.attributes.color){const t=sa.resolveExpression(e.attributes.color);if("none"!==t)return t}return ci(t)}(e,t.cardBackgroundColor),a=ci(di(t.cardTitle.fontColor,o)),i=hi(t.cardTitle,a),l=ci(di(t.cardSubTitle.fontColor,o)),s=hi(t.cardSubTitle,l),u=ci(di(t.cardDescription.fontColor,o)),c=hi(t.cardDescription,u),d=ci(di(t.cardMeasureLabel.fontColor,o)),h=hi(t.cardMeasureLabel,d),p=ci(di(t.cardMeasureValue.fontColor,o)),f=hi(t.cardMeasureValue,p),{topBar:g=Xe.BORDER_TOP,fullBorder:m=Xe.BORDER_FULL,contrastColor:b=!0}=t.cardBorder,v=b?sa.getDarkColor(o):ci(t.cardBorder.borderColor);let y=n;r?y-=8:m?y-=4:g&&(y-=3);return{titleStyle:i,subTitleStyle:s,descriptionStyle:c,measureLabelStyle:h,measureValueStyle:f,cardStyle:`background-color:${o}; border:${m&&!r?`1px solid ${v}`:""}; border-top:${g&&!r?`3px solid ${v}`:""}; height:${y}px;`}}const fi=(e,t,n,r,o)=>{const a=function(e,t){var n;let r=!1,o="";return null!==(n=t.api)&&void 0!==n&&n.isActive()&&(r=-1!==t.state.indexOf(e.elemNo),o=r?" selected":" not-selected"),{isSelected:r,selectedClass:o}}(e,n),i=function(e,t,n){const r=e.attributes||{},o=t.measureLabel?`${t.measureLabel}: `:"";return{title:oi(r.label||e.id),subTitle:r.subLabel?oi(r.subLabel):void 0,description:r.extraLabel?oi(r.extraLabel):void 0,measureLabel:e.measure?oi(o):void 0,measureValue:e.measure?oi(e.measure):void 0,...(null==n?void 0:n.isEnabled("IM_5036_ORGCHART_STYLING_IMAGE"))&&{image:ii(r.image)}}}(e,t,r),l=pi(e,t,o,a.isSelected),s=function(e,t,n){return(null==t?void 0:t.image)&&"tooltip"!==e.cardImage.location&&(null==n?void 0:n.isEnabled("IM_5036_ORGCHART_STYLING_IMAGE"))}(t,e.attributes,r),u=s?function(e){let t=" has-image";return ui(e)?(t+=" horizontal",t+="right"===e.cardImage.alignment?" right":" left"):(t+=" vertical",t+="bottom"===e.cardImage.alignment?" bottom":"",t+="round"===e.cardImage.shape?" round":""),t}(t):"",c=a.selectedClass+(ui(t)?" horizontal":" vertical");let d="";if(s){const e=function(e){let t="";return t+=["right","bottom"].includes(e.cardImage.alignment)?" image-last":"",t+=ui(e)?"":" vertical",t}(t),n=function(e){let t="";return t+=e.cardImage.clip?" clip":"",t+=ui(e)?" horizontal":"",t+="round"===e.cardImage.shape?" round":"",t}(t);d+=`<div class="sn-image-wrapper${e}"><img src="${i.image}" class="sn-org-card-image${n}"/></div>`}return d+=`<div class="sn-org-textbox${u}">`,d+=`<div class="sn-org-card-title" style="${l.titleStyle};">${i.title}</div>`,i.subTitle&&(d+=`<div class="sn-org-card-label" style="${l.subTitleStyle};">${i.subTitle}</div>`),i.measureValue?d+=`<div class="sn-org-card-label"><span style="${l.measureLabelStyle};">${i.measureLabel}</span><span style="${l.measureValueStyle};">${i.measureValue}</span></div>`:i.description&&(d+=`<div class="sn-org-card-label" style="${l.descriptionStyle};">${i.description}</div>`),d+="</div>",`<div class="sn-org-card-text${c}" style="${l.cardStyle}">${d}</div>`},gi={colorByExpression:"color",labelExpression:"label",subLabelExpression:"subLabel",extraLabelExpression:"extraLabel",imageExpression:"image"},mi="max-data-limit";function bi(e){return e[0].qText}function vi(e){return e[1].qText}async function yi(e,t,n,r,o,a,i){return await n.getHyperCubeData("/qHyperCubeDef",[{qTop:o,qLeft:0,qWidth:3,qHeight:3300}]).then((n=>{e.push(n[0]),t.push(...n[0].qMatrix),o+=n[0].qArea.qHeight})),a>=i?mi:r>o?yi(e,t,n,r,o,a+1,i):""}const xi=async(e,t)=>{if(e.snapshotData)return{status:"",dataMatrix:e.snapshotData.dataMatrix};const n=e.qHyperCube&&e.qHyperCube.qDataPages,r=e.qHyperCube.qSize.qcy,o=n[0].qArea.qHeight,a=[...n[0].qMatrix];let i="";return r>o&&1===n.length&&t?i=await yi(e.qHyperCube.qDataPages,a,t,r,o,0,e.rowLimit/3300||10):n.forEach(((e,t)=>{t>0&&a.push(...e.qMatrix)})),{status:i,dataMatrix:a}};function wi(e,t){const n={};return e.forEach((e=>{"color"===e.prop?n[e.prop]=sa.resolveExpression(t.qValues[e.index].qText):n[e.prop]=t.qValues[e.index].qText})),n}function _i(e){if(!e)return!0;for(let t=0;t<e.length;++t)if(void 0!==e[t].children)return!1;return!0}function Ci(e,t){return(null==t?void 0:t.isEnabled("IM_5036_ORGCHART_STYLING_IMAGE"))&&["top","bottom"].includes(e.cardImage.alignment)&&"tooltip"!==e.cardImage.location?ia.cardHeightLarge:ia.cardHeight}async function Oi({layout:e,model:t,translator:n}){if(!e.qHyperCube)throw new Error("Require a hypercube");if(e.qHyperCube.qDimensionInfo.length<2)return!1;const{status:r,dataMatrix:o}=await xi(e,t),a=function(e){if(e&&e.length){const t=[];return e.forEach(((e,n)=>{gi[e.id]&&t.push({prop:gi[e.id],index:n})})),t}return[]}(e.qHyperCube.qDimensionInfo[0].qAttrExprInfo);return o?o.length<1?null:function(e,t,n,r,o){const a={},i=[];for(let n=0;n<e.length;++n){const r=e[n],o=bi(r),l={id:o,parentId:vi(r),children:[],elemNo:r[0].qElemNumber,attributes:wi(t,r[0].qAttrExps),measure:r[2]&&r[2].qText,rowNo:n};a[o]=l,i.push(l)}const l=[];let s=!1;for(let e=0;e<i.length;++e){const t=i[e],n=a[t.parentId];t.parent=n,n?n.children.length>98?s=!0:n.children.push({childNumber:n.children.length,...t}):l.length>98?s=!0:l.push(t)}if(0===l.length)return{error:"no_root",message:o.get("Object.OrgChart.MissingRoot")};const u=[];if(n===mi&&u.push(o.get("Object.OrgChart.MaxData")),s&&u.push(o.get("Object.OrgChart.MaxChildren")),function(e){const t={},n={};function r(e){t[e.id]=!0,n[e.id]=!0;for(let o=0;o<e.children.length;++o){if(!t[e.children[o].id]&&r(e.children[o]))return!0;if(n[e.children[o].id])return!0}return n[e.id]=!1,!1}for(let n=0;n<e.length;++n){const o=e[n];if(!t[o.id]&&r(o))return!0}return!1}(i)&&u.push(o.get("Object.OrgChart.CycleWarning")),1===l.length)return l[0].warn=u,l[0].navigationMode=r,l[0];u.push(o.get("Object.OrgChart.DummyWarn"));const c={id:"Root",name:o.get("Object.OrgChart.DummyRoot"),isDummy:!0,warn:u,children:l,navigationMode:r};return l.forEach(((e,t)=>{e.parentId="Root",e.parent=c,e.childNumber=t})),c}(o,a,r,e.navigationMode,n):null}var ki=(e,t)=>{const{api:n,state:r,singleSelect:o,setState:a}=t;if(e&&n){let t;if(e.data.elemNo<0&&-3!==e.data.elemNo)return;if(e.data.isLocked)return;n.isActive()&&r?t=r.concat():(n.begin("/qHyperCubeDef"),t=[]);const i=t.indexOf(e.data.elemNo),l=-1===i;let s=[];o||(s=function(e,t){const n=[],r=e=>{e.children.forEach((e=>{e.data.selected=t,n.push(e.data.elemNo),e.children&&e.children.length>0&&r(e)}))};return e.children&&r(e),n}(e,l)),l?(t.push(e.data.elemNo),s.forEach((e=>{-1===t.indexOf(e)&&t.push(e)}))):(t.splice(i,1),s.forEach((e=>{const n=t.indexOf(e);-1!==n&&t.splice(n,1)}))),0===t.length?n.clear():n.select({method:"selectHyperCubeValues",params:["/qHyperCubeDef",0,t,!1]}),a(t)}};function Ei(e){var t;e.tooltip.active=!0,e.tooltip.timeout=setTimeout((()=>{e.tooltip.active&&e.tooltip.html(function(e,t,n){const r=oi(e.data.attributes.label||e.data.id),o=e.data.attributes.subLabel?`${oi(e.data.attributes.subLabel)}<br />`:"",a=e.data.attributes.extraLabel?`${oi(e.data.attributes.extraLabel)}<br />`:"",i=oi(e.data.measure?`${t.measureLabel?`${t.measureLabel}: `:""}${e.data.measure}`:"");if(null!=n&&n.isEnabled("IM_5036_ORGCHART_STYLING_IMAGE")){let n=e.data.attributes.image&&"card"!==t.cardImage.location?e.data.attributes.image:"";if(n=ii(n),n){const e="right"===t.cardImage.alignment?'style="padding-right:5px"':'style="padding-left:5px"';return`<div class="sn-org-tooltip-inner" style="display:flex"><img src="${n}" class="sn-org-tooltip-image" ${"right"===t.cardImage.alignment?'style="order: 1"':""} /><div class="sn-org-tooltip-text" ${e}><div class="sn-org-tooltip-header">${r}</div>${o}${a}${i}</div></div>`}}return`<div class="sn-org-tooltip-inner"><div class="sn-org-tooltip-header">${r}</div>${o}${a}${i}</div>`}(e.node,e.styling,e.flags)).classed("sn-org-tooltip-visible",!0).attr("style",(()=>function(e,t,n,r,o){const{cardWidth:a,tooltipPadding:i}=ia,l=a/2;return`bottom:${t-(r(e)*o.zoom+o.y-i)}px;left:${n(e)*o.zoom+o.x+l*o.zoom}px;`}(e.node,e.containerHeight,e.x,e.y,e.transform)))}),null!==(t=e.delay)&&void 0!==t?t:250)}function Si(e){clearTimeout(e.timeout),e.active=!1,e.classed("sn-org-tooltip-visible",!1)}function Li({positioning:e,divBox:t,nodes:n,styling:r,setExpandedCallback:o,wrapperState:a,selectionObj:i,navigationMode:l,element:s,tooltip:u,flags:c,actualCardHeight:d}){const{x:h,y:p}=e,{cardWidth:f,buttonWidth:g,buttonHeight:m,cardPadding:b,rootDiameter:v}=ia,{topId:y}=a.expandedState,x=n.find((e=>e.data.id===y)),w=x&&x.parent?x.parent.ancestors().map((e=>e.data.id)):[],_=document.getElementsByTagName("html")[0].classList.contains("touch-on"),C={tooltip:u,containerHeight:s.clientHeight,styling:r,x:h,y:p,flags:c};t.selectAll(".sn-org-nodes").data(n.filter((e=>e.parent&&"Root"===e.parent.data.id))).enter().append("div").attr("class","sn-org-root").attr("style",(e=>`top:${p(e)-v-b}px;left:${h(e)+(f-v)/2}px`)).attr("id",(e=>e.data.id)),t.selectAll(".sn-org-nodes").data(n.filter((e=>"Root"!==e.data.id))).enter().append("div").attr("class","sn-org-card").attr("style",(e=>`width:${f}px;height:${d}px; top:${p(e)}px;left:${h(e)}px;`)).attr("id",(e=>e.data.id)).on("click",((e,t)=>{if(!a.constraints.active&&"Root"!==t.data.id){const e={...C,transform:a.transform,node:t,delay:0};_&&Ei(e),ki(t,i)}})).html((e=>null!=c&&c.isEnabled("IM_5036_ORGCHART_STYLING")?fi(e.data,r,i,c,d):si(e.data,r,i))).on("mouseenter",((e,t)=>{if(!_&&!a.constraints.active&&0===e.buttons){Ei({...C,transform:a.transform,node:t})}})).on("mouseleave",(()=>{!_&&Si(u)})).on("mousedown",(()=>{Si(u)})).on("touchmove",(()=>{Si(u)})).on("wheel",(()=>{Si(u)})),"expandAll"!==l&&t.selectAll(".sn-org-nodes").data(n.filter((e=>!!e.children&&"Root"!==e.data.id))).enter().append("div").attr("class","sn-org-traverse").attr("style",(e=>`width:${g}px;height:${m}px;top:${p(e)+d+b}px;left:${h(e)+(f-g)/2}px;`)).attr("id",(e=>`${e.data.id}-expand`)).on("mouseenter",(e=>{a.constraints.active||(e.target.style.cursor="pointer")})).on("click",((e,t)=>{a.constraints.active||(o(((e,{topId:t,isExpanded:n,expandedChildren:r},o)=>{if(e.data.id===t)n=!n,r=[];else if(o.includes(e.data.id))t=e.parent?e.parent.data.id:e.data.id,n=!!e.parent,r=[];else if(e.parent.data.id===t){const t=e.parent.children.filter((e=>r.includes(e.data.id))).every((e=>_i(e.children)));r.includes(e.data.id)?r.splice(r.indexOf(e.data.id),1):_i(e.children)&&t?r.push(e.data.id):r=[e.data.id]}else t=e.parent.data.id,n=!0,r=[e.data.id];return{topId:t,isExpanded:n,expandedChildren:r}})(t,a.expandedState,w)),e.stopPropagation())})).html((e=>`${((e,{topId:t,isExpanded:n,expandedChildren:r},o)=>e.data.id===t&&n||e.parent&&e.parent.data.id===t&&r.includes(e.data.id)||o.includes(e.data.id)?"-":"+")(e,a.expandedState,w)} ${e.data.children.length}`))}function Ri(e,t,n,r,o){e.append("path").attr("class","sn-org-path").attr("id",(e=>e.data.id)).attr("d",(e=>{let n="";const a=function(e,t,{depthSpacing:n,isVertical:r,x:o,y:a},i,l){const{cardWidth:s,buttonHeight:u,cardPadding:c,buttonMargin:d}=ia,h=[],p=s/2,f=l/2,g={x:e.xActual,y:e.yActual};if(e.parent&&"Root"!==e.parent.data.id){const t=n/2,s="expandAll"===i?l:l+c+u,m={x:o(e.parent)+p,y:a(e.parent)+s};"expandAll"!==i&&_i(e.parent.children)?h.push(r?[{x:g.x,y:g.y+f},{x:m.x-p,y:g.y+f},{x:m.x-p,y:m.y+d},{x:m.x,y:m.y+d},{x:m.x,y:m.y}]:[{x:g.x,y:g.y},{x:g.x,y:m.y-f},{x:m.x+t,y:m.y-f},{x:m.x+t,y:m.y},{x:m.x,y:m.y}]):g.x===o(e.parent)||g.y===a(e.parent)?h.push([{x:g.x+p,y:g.y},{x:m.x,y:m.y}]):h.push(r?[{x:g.x+p,y:g.y},{x:g.x+p,y:g.y-c},{x:m.x,y:g.y-c},{x:m.x,y:m.y}]:[{x:g.x,y:g.y},{x:g.x-c,y:g.y},{x:g.x-c,y:m.y},{x:m.x,y:m.y}])}else e.parent&&h.push([{x:g.x+p,y:g.y},{x:g.x+p,y:g.y-c}]);return e.children&&"Root"!==e.data.id&&h.push([{x:g.x+p,y:g.y+l},{x:g.x+p,y:g.y+l+c}]),h}(e,0,t,r,o);return a.forEach((e=>{n+=function(e){const{r:t}=ia;let n,r=`M ${e[0].x} ${e[0].y} `;const o=t=>{const r=e[t].x-e[t-1].x,o=e[t].y-e[t-1].y;n={x:(r>0)-(r<0)||+r,y:(o>0)-(o<0)||+o}};o(1);for(let a=1;a<e.length;++a){const i=e[a];a<e.length-1?(r+=`L ${i.x-n.x*t} ${i.y-n.y*t} `,o(a+1),r+=`Q ${i.x} ${i.y} ${i.x+n.x*t} ${i.y+n.y*t} `):r+=`L ${i.x} ${i.y} `}return r}(e).slice(0,-1)})),n}))}const Ti=(e,t,n,r,o,a)=>{const{buttonMargin:i}=ia,l=o&&o.initialX||0;return"expandAll"===a?(e[r]=e.x+l,e[r]):(e.parent?(e.parent[r]||(e.parent[r]=Ti(e.parent,t,n,r,o)),"Root"===e.parent.data.id?e[r]=e.parent[r]+(e.data.childNumber-(e.parent.children.length-1)/2)*t:e[r]=_i(e.parent.children)?e.parent[r]+i:e.parent[r]+(e.data.childNumber-(e.parent.children.length-1)/2)*t):e[r]=l,e[r])};function Ai(e,t,n,r,o){const{widthMargin:a,heightMargin:i,cardWidth:l,cardPadding:s}=ia;let u,c,d;if("ttb"===e)u=l+a,c="expandAll"===r?o+2*s:o+i,d={depthSpacing:c,isVertical:!0,x:e=>Ti(e,u,t,"xActual",n,r),y:e=>((e,t,n,r,o,a)=>{const{leafMargin:i}=ia,l=r&&r.initialY||0;return e.parent&&"Root"!==e.parent.data.id&&"expandAll"!==o&&_i(e.parent.children)?e[n]=e.parent.y+t+e.data.childNumber*(a+i)+l:e[n]=e.y+l,e[n]})(e,c,"yActual",n,r,o)};return d}const Ni=(e,t,n,r,o)=>{const a=e.k,i=`${e.x}px, ${e.y}px`;t.attr("transform",e),n.classed("org-disable-transition",!0),t.classed("org-disable-transition",!0),n.attr("style",`width:${r}px;height:${o}px; transform: translate(${i}) scale(${a})`)};const zi=({topId:e,isExpanded:t,expandedChildren:n},r,o,a)=>{if("expandAll"===a)return r.descendants();const i=r.descendants().find((t=>t.data.id===e))||r,l=[];if(t&&i.children&&i.children.forEach((e=>{l.push(e),e.children&&(-1!==n.indexOf(e.data.id)||o)&&e.children.forEach((t=>{l.push(t),-1!==n.indexOf(e.data.id)&&o&&t.children&&t.children.forEach((e=>{l.push(e)}))}))})),"free"===r.data.navigationMode&&i.parent){const e=i.parent.ancestors(),t=e.map((e=>e.data.id));e.forEach((e=>{o&&e.children.forEach((e=>{e.children&&-1===t.indexOf(e.data.id)&&e.data.id!==i.data.id&&l.unshift(...e.children)})),l.unshift(...e.children),e.parent||l.unshift(e)}))}else l.unshift(i);return l},Mi=({element:e,dataTree:t,selectionObj:n,wrapperState:r,setInitialZoom:o,setTransform:a,setExpandedState:i,viewState:l,setContainerData:s,layout:u,flags:c,actualCardHeight:d})=>{e.innerHTML="",e.className="sn-org-chart";const{navigationMode:h}=u;let p=Ai("ttb",e,{},h,d);const{width:f,height:g}=e.getBoundingClientRect(),m=In(e).append("span").attr("class","sn-org-zoomwrapper").on("click",(()=>{r.constraints.active||n.api.isActive()&&n.state||(n.api.begin("/qHyperCubeDef"),n.setState([]))})).node(),b=In(m).selectAll("svg").data([{}]).enter().append("svg").attr("class","sn-org-svg").attr("width","100%").attr("height","100%"),v=In(m).selectAll("div").data([{}]).enter().append("div").attr("class","sn-org-nodes"),y=In(e).append("button").attr("class","sn-org-homebutton disabled").on("click",(()=>{Mi({element:e,dataTree:t,selectionObj:n,wrapperState:r,setInitialZoom:o,setTransform:a,setExpandedState:i,viewState:l,setContainerData:s,layout:u,flags:c,actualCardHeight:d})})).html('<span class="lui-fade-button__icon sn-org-home-icon">\n <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="20" height="20" viewBox="0 0 16 16">\n <defs>\n <path id="home-a" d="M2,7.9 L8,3.4 L14,7.9 L14,16 L12,16 L12,11.2 C12,11.0895431 11.9104569,11 11.8,11 L9.2,11 C9.08954305,11 9,11.0895431 9,11.2 L9,16 L2,16 L2,7.9 Z M7,13.8 L7,11.2 C7,11.0895431 6.91045695,11 6.8,11 L4.2,11 C4.08954305,11 4,11.0895431 4,11.2 L4,13.8 C4,13.9104569 4.08954305,14 4.2,14 L6.8,14 C6.91045695,14 7,13.9104569 7,13.8 Z M13,4.1 L16,6.5 L15,7.5 L8,2 L1,7.5 L0,6.5 L8,0 L11,2.4 L11,1 L13,1 L13,4.1 Z"/>\n </defs>\n <use xlink:href="#home-a"/>\n </svg>\n </span>').node(),x=function(e){const t=In(e).append("div").attr("class","sn-org-tooltip").on("mousedown",(()=>{t.classed("sn-org-tooltip-visible",!1)}));return t}(e);if(t.error)return In(m).append("div").attr("class","sn-org-error").html(t.message),!1;t.warn&&t.warn.length&&In(m).append("span").attr("class","sn-org-warning").html(`*${t.warn.join(" ")}`);const w=b.append("g").attr("class","sn-org-paths"),_=Ko().size([f,g]).nodeSize([ia.cardWidth+ia.cardPadding,p.depthSpacing])(Mo(t)),C=!r.expandedState||!_.descendants().find((e=>e.data.id===r.expandedState.topId)),O=C?{topId:_.data.id,isExpanded:!0,expandedChildren:[],useTransitions:!1}:r.expandedState,k=zi(O,_,!1,h);k.forEach((e=>{e.xActual&&e.yActual||(p.x(e),p.y(e))}));const E=((e,t)=>{const{cardWidth:n,buttonHeight:r,buttonMargin:o}=ia,a={left:1/0,top:1/0,right:-1/0,bottom:-1/0};return e.forEach((e=>{a.left=Math.min(e.xActual,a.left),a.top=Math.min(e.yActual,a.top),a.right=Math.max(e.xActual,a.right),a.bottom=Math.max(e.yActual,a.bottom)})),{x:a.left,y:a.top-r-o,width:a.right-a.left+n,height:a.bottom-a.top+t+2*(r+o)}})(k,d),S=l&&l.initialZoom?l.initialZoom:((e,t,n,r)=>{const{widthMargin:o,minZoom:a}=ia,i="expandAll"===n?1/0:ia.maxZoom,{width:l,height:s}=e,{clientHeight:u,clientWidth:c}=t,d=l+2*o,h=s+r,p=Math.max(Math.min(d/c,i),a),f=Math.max(Math.min(h/u,i),a);return p>f?{initialX:-e.x+o,initialY:-e.y+(u*p-s)/2,initialZoom:p}:{initialX:-e.x+(c*f-l)/2,initialY:r/2,initialZoom:f}})(E,e,h,d);return o(S),p=Ai("ttb",e,S,h,d),function({containerData:e,setTransform:t,transformState:n,wrapperState:r,initialZoomState:o,navigationMode:a}){const{svg:i,divBox:l,width:s,height:u,zoomWrapper:c,element:d,tooltip:h,homeButton:p}=e,{x:f=0,y:g=0}=n,{minZoom:m,maxZoom:b}=ia,v=n&&1/n.zoom||o.initialZoom,y="expandAll"===a?v:Math.max(Math.min(b,v),m),x=()=>{const e=document.createEvent("MouseEvents");e.initEvent("mousedown",!0,!1),d.dispatchEvent(e)};In(c).call(aa().extent([[0,0],[s,u]]).filter((e=>!(r.constraints.active||"dblclick"===e.type||"mousedown"===e.type&&3===e.which))).scaleExtent(["expandAll"===a?.8:m*y,b*y]).on("start",x).on("zoom",(e=>{In(p).attr("class","sn-org-homebutton lui-fade-button lui-fade-button--large"),t({zoom:e.transform.k/y,x:e.transform.x,y:e.transform.y}),x(),Si(h),Ni(Wo.translate(e.transform.x,e.transform.y).scale(e.transform.k/y),i,l,s,u)}))),t({zoom:1/y,x:f,y:g}),Ni(Wo.translate(f,g).scale(1/y),i,l,s,u)}({containerData:{svg:w,divBox:v,width:f,height:g,zoomWrapper:m,element:e,tooltip:x,homeButton:y},setTransform:a,transformState:l&&l.transform||{},wrapperState:r,initialZoomState:S,navigationMode:h}),C&&i(O),s({svg:w,divBox:v,allNodes:_,positioning:p,width:f,height:g,element:e,zoomWrapper:m,tooltip:x,homeButton:y})},ji=(e,t,n,r)=>{const o={expandedState:e,transform:t,size:{w:r.clientWidth,h:r.clientHeight},initialZoom:n};return o.expandedState.useTransitions=!1,o};function Ii(e,t,n,r,o){const s=a();i((a=>{a.snapshotData||(a.snapshotData={}),n.snapshotData&&n.snapshotData.viewState||(a.snapshotData.viewState=ji(e,r,o,s)),a.snapshotData.dataMatrix=((e,t,n)=>{if(n.snapshotData&&n.snapshotData.dataMatrix)return n.snapshotData.dataMatrix;const{navigationMode:r}=n,o=zi(e,t,!0,r),a=[],{qDataPages:i}=n.qHyperCube,l=[];return i.forEach((e=>{l.push(...e.qMatrix)})),o.forEach((e=>{void 0!==e.data.rowNo&&a.push(l[e.data.rowNo])})),a})(e,t.allNodes,n)})),l((()=>({getViewState:()=>ji(e,r,o,s)})))}function Di(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}Di(".sn-org-chart .sn-org-homebutton {\n position: absolute;\n top: 20px;\n right: 20px;\n height: 20px;\n width: 20px;\n border-color: transparent;\n background-color: transparent;\n fill: rgba(89, 89, 89, 0.8);\n transition: fill 200ms ease-out;\n}\n.sn-org-chart .sn-org-homebutton:hover {\n fill: #595959;\n}\n.sn-org-chart .sn-org-homebutton.disabled {\n display: none;\n}\n");Di(".sn-org-chart {\n overflow: hidden;\n}\n.sn-org-chart .sn-org-nodes {\n position: absolute;\n transform-origin: 0% 0%;\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -khtml-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n backface-visibility: hidden;\n}\n.sn-org-chart .sn-org-nodes:not(.org-disable-transition) {\n transition-property: all;\n transition-duration: 0.5s;\n}\n.sn-org-chart .sn-org-nodes .sn-org-traverse {\n position: absolute;\n background-color: white;\n font-size: 20px;\n font-weight: bold;\n border-radius: 3px;\n border: 1px solid #8c8c8c;\n text-align: center;\n line-height: 24px;\n}\n.sn-org-chart .sn-org-nodes .sn-org-root {\n position: absolute;\n background-color: #8c8c8c;\n width: 20px;\n height: 20px;\n border-radius: 20px;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card {\n position: absolute;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-card-text {\n padding-left: 5px;\n padding-right: 5px;\n border-radius: 3px;\n display: flex;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-card-text.selected {\n border: 4px solid black;\n border-radius: 4px;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-card-text.not-selected {\n opacity: 0.5;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-card-text.horizontal {\n flex-direction: row;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-card-text.vertical {\n flex-direction: column;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-image-wrapper {\n order: 0;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-image-wrapper.image-last {\n order: 2;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-image-wrapper.vertical {\n margin: 0 auto;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-image-wrapper .sn-org-card-image {\n padding: 4px 4px;\n object-fit: contain;\n height: 130px;\n width: 130px;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-image-wrapper .sn-org-card-image.round {\n border-radius: 50%;\n object-fit: cover;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-image-wrapper .sn-org-card-image.clip {\n object-fit: cover;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-image-wrapper .sn-org-card-image.horizontal {\n padding: 4px 0px;\n height: 50px;\n width: 50px;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-textbox {\n order: 1;\n overflow: hidden;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-textbox.has-image {\n max-height: 60px;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-textbox.has-image.horizontal {\n width: 85px;\n height: fit-content;\n position: relative;\n top: 50%;\n transform: translate(0, -50%);\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-textbox.has-image.left {\n padding-left: 4px;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-textbox.has-image.right {\n padding-right: 4px;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-textbox.has-image.vertical {\n width: 143px;\n margin-bottom: 4px;\n margin: 0 auto;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-textbox.has-image.bottom {\n padding-top: 4px;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-textbox.has-image.round {\n max-height: 80px;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-textbox .sn-org-card-title {\n font-size: 14px;\n font-weight: bold;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-textbox .sn-org-card-label {\n font-size: 11px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n");Di(".sn-org-chart .sn-org-svg {\n position: absolute;\n /* For css only transitions, does not work in IE11 */\n}\n.sn-org-chart .sn-org-svg .sn-org-path {\n fill: none;\n stroke: #4c4c4c;\n stroke-width: 1;\n}\n.sn-org-chart .sn-org-svg .sn-org-paths:not(.org-disable-transition) {\n transform-origin: 0% 0%;\n transition-property: all;\n transition-duration: 0.5s;\n}\n");Di('.sn-org-chart {\n /* Tooltip arrow */\n}\n.sn-org-chart .sn-org-tooltip {\n visibility: hidden;\n opacity: 0;\n /* Unsupported in IE, so there we set width explicitly */\n width: max-content;\n /* Position the tooltip text */\n position: absolute;\n z-index: 1;\n}\n.sn-org-chart .sn-org-tooltip::after {\n content: "";\n position: absolute;\n top: 100%;\n left: 0%;\n margin-left: -10px;\n border-width: 10px;\n border-style: solid;\n border-color: #404040 transparent transparent transparent;\n}\n.sn-org-chart .sn-org-tooltip-visible {\n opacity: 0.9;\n visibility: visible;\n}\n.sn-org-chart .sn-org-tooltip-inner {\n max-width: 240px;\n right: 50%;\n font-family: "QlikView Sans", sans-serif;\n position: relative;\n max-height: 150px;\n background-color: #404040;\n color: #e6e6e6;\n text-align: left;\n font-size: 13px;\n line-height: 15px;\n padding: 10px 10px 10px 10px;\n border-radius: 6px;\n overflow-wrap: break-word;\n word-wrap: break-word;\n word-break: break-word;\n overflow: hidden;\n}\n.sn-org-chart .sn-org-tooltip-inner .sn-org-tooltip-image {\n height: 50px;\n}\n.sn-org-chart .sn-org-tooltip-inner .sn-org-tooltip-header {\n font-weight: bold;\n padding-bottom: 5px;\n}\n');function $i(e,t,n){let r;switch(e.colorType){case"byExpression":r=sa.resolveExpression(e.colorExpression);break;case"colorPicker":r=t.getColorPickerColor(e.color);break;default:r=n}return"none"===r?n:r}Di(".sn-org-chart .sn-org-warning {\n position: absolute;\n bottom: 0px;\n left: 0px;\n font-style: italic;\n font-size: 13px;\n color: #7b7a78;\n}\n.sn-org-chart .sn-org-error {\n margin: 0;\n position: absolute;\n top: 50%;\n left: 50%;\n font-size: 1.2em;\n transform: translate(-50%, -50%);\n}\n");const Bi=({Theme:e,layout:t})=>{const n=$i(t.style.backgroundColor,e,Xe.BACKGROUND_COLOR.color),r=$i(t.style.fontColor,e,"default"),o=t.qHyperCube.qMeasureInfo.length?t.qHyperCube.qMeasureInfo[0].qFallbackTitle:null,{border:a={colorType:Xe.BORDER_COLOR_TYPE}}=t.style;return{backgroundColor:n,fontColor:r,measureLabel:o,border:a,borderColor:"auto"!==a.colorType?$i(a,e,sa.getDarkColor(n)):sa.getDarkColor(n)}};function Pi(e,t,n,r){if(r||void 0===e.useColorExpression)return n;let o;return o=e.useColorExpression?sa.resolveExpression(e.colorExpression):t.getColorPickerColor(e.color),"none"===o?n:o}const qi=(e,t,n,r)=>void 0===e?n:null!=t?t:r,Fi=(e,t,n)=>{var r,o,a;return{useColorExpression:qi(e,null==t?void 0:t.useColorExpression,"byExpression"===(null==n||null===(r=n.style)||void 0===r||null===(r=r.fontColor)||void 0===r?void 0:r.colorType),Xe.FONT_COLOR_USE_EXPRESSION),color:qi(e,null==t?void 0:t.color,null==n||null===(o=n.style)||void 0===o||null===(o=o.fontColor)||void 0===o?void 0:o.color,Xe.FONT_COLOR_DARK),colorExpression:qi(e,null==t?void 0:t.colorExpression,null==n||null===(a=n.style)||void 0===a||null===(a=a.fontColor)||void 0===a?void 0:a.colorExpression,"")}},Vi=(e,t)=>{const{viewState:n}=e;return!n&&t.snapshotData&&t.snapshotData.viewState?t.snapshotData.viewState:n};function Ui(i){const{flags:l}=i;return{qae:{properties:bt,data:We},component:()=>{const i=s(),b=u(),v=a(),y=c(),x=d(),w=h(),_=p(),C=f(),[O,k]=e(null),[E,S]=e(null),[L,R]=e(null),[T,A]=e(null),[N,z]=e(null),[M]=e({transform:{},constraints:_,expandedState:L}),j=function(a){const[i,l]=e(!1),s=t(),u=!!n().qSelectionInfo.qInSelections,[c]=e({api:s,setState:e=>{c.state=e},state:[],singleSelect:!1});r((()=>{mt(a)}),[a]);const d=()=>{c.state=[]},h=()=>{c.state=[],l(!1)};return r((()=>c.api?(c.api=s,c.api.on("deactivated",d),c.api.on("canceled",h),c.api.on("confirmed",h),c.api.on("cleared",d),()=>{c.api.removeListener("deactivated",d),c.api.removeListener("canceled",h),c.api.removeListener("confirmed",h),c.api.removeListener("cleared",d)}):()=>{}),[s]),r((()=>{c.singleSelect=i}),[i]),o((()=>({action(){l(!i)},icon:{shapes:[{type:"path",attrs:{d:"M9.5,15 C9.77614237,15 10,15.2238576 10,15.5 C10,15.7761424 9.77614237,16 9.5,16 L6.5,16 C6.22385763,16 6,15.7761424 6,15.5 C6,15.2238576 6.22385763,15 6.5,15 L9.5,15 Z M15.5,13 C15.7761424,13 16,13.2238576 16,13.5 L16,15 C16,15.5522847 15.5522847,16 15,16 L13.5,16 C13.2238576,16 13,15.7761424 13,15.5 C13,15.2238576 13.2238576,15 13.5,15 L14.4,15 C14.7313708,15 15,14.7313708 15,14.4 L15,13.5 C15,13.2238576 15.2238576,13 15.5,13 Z M0.5,13 C0.776142375,13 1,13.2238576 1,13.5 L1,14.4 C1,14.7313708 1.26862915,15 1.6,15 L2.5,15 C2.77614237,15 3,15.2238576 3,15.5 C3,15.7761424 2.77614237,16 2.5,16 L1,16 C0.44771525,16 0,15.5522847 0,15 L0,13.5 C0,13.2238576 0.223857625,13 0.5,13 Z M6.8,9 C6.91045695,9 7,9.08954305 7,9.2 L7,12.8 C7,12.9104569 6.91045695,13 6.8,13 L3.2,13 C3.08954305,13 3,12.9104569 3,12.8 L3,9.2 C3,9.08954305 3.08954305,9 3.2,9 L6.8,9 Z M12.8,9 C12.9104569,9 13,9.08954305 13,9.2 L13,12.8 C13,12.9104569 12.9104569,13 12.8,13 L9.2,13 C9.08954305,13 9,12.9104569 9,12.8 L9,9.2 C9,9.08954305 9.08954305,9 9.2,9 L12.8,9 Z M6,10 L4,10 L4,12 L6,12 L6,10 Z M12,10 L10,10 L10,12 L12,12 L12,10 Z M15.5,6 C15.7761424,6 16,6.22385763 16,6.5 L16,9.5 C16,9.77614237 15.7761424,10 15.5,10 C15.2238576,10 15,9.77614237 15,9.5 L15,6.5 C15,6.22385763 15.2238576,6 15.5,6 Z M0.5,6 C0.776142375,6 1,6.22385763 1,6.5 L1,9.5 C1,9.77614237 0.776142375,10 0.5,10 C0.223857625,10 0,9.77614237 0,9.5 L0,6.5 C0,6.22385763 0.223857625,6 0.5,6 Z M6.8,3 C6.91045695,3 7,3.08954305 7,3.2 L7,6.8 C7,6.91045695 6.91045695,7 6.8,7 L3.2,7 C3.08954305,7 3,6.91045695 3,6.8 L3,3.2 C3,3.08954305 3.08954305,3 3.2,3 L6.8,3 Z M12.8,3 C12.9104569,3 13,3.08954305 13,3.2 L13,6.8 C13,6.91045695 12.9104569,7 12.8,7 L9.2,7 C9.08954305,7 9,6.91045695 9,6.8 L9,3.2 C9,3.08954305 9.08954305,3 9.2,3 L12.8,3 Z M12,4 L10,4 L10,6 L12,6 L12,4 Z M2.5,5.70654635e-14 C2.77614237,5.70654635e-14 3,0.223857625 3,0.5 C3,0.776142375 2.77614237,1 2.5,1 L1.6,1 C1.26862915,1 1,1.26862915 1,1.6 L1,2.5 C1,2.77614237 0.776142375,3 0.5,3 C0.223857625,3 0,2.77614237 0,2.5 L0,1 C0,0.44771525 0.44771525,5.70654635e-14 1,5.70654635e-14 L2.5,5.70654635e-14 Z M15,0 C15.5522847,0 16,0.44771525 16,1 L16,2.5 C16,2.77614237 15.7761424,3 15.5,3 C15.2238576,3 15,2.77614237 15,2.5 L15,1.6 C15,1.26862915 14.7313708,1 14.4,1 L13.5,1 C13.2238576,1 13,0.776142375 13,0.5 C13,0.223857625 13.2238576,0 13.5,0 L15,0 Z M9.5,5.67323966e-14 C9.77614237,5.67323966e-14 10,0.223857625 10,0.5 C10,0.776142375 9.77614237,1 9.5,1 L6.5,1 C6.22385763,1 6,0.776142375 6,0.5 C6,0.223857625 6.22385763,5.67323966e-14 6.5,5.67323966e-14 L9.5,5.67323966e-14 Z"}}]},active:i,hidden:!u,label:a.get("Object.OrgChart.SingleSelect")})),[i,u]),r((()=>{const e=e=>{"Shift"===e.key&&l(!0)},t=e=>{"Shift"===e.key&&l(!1)};return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}}),[]),c}(C);g((()=>{mt(C)}),[v,C.language()]),r((()=>{M.constraints=_}),[_]),r((()=>{M.transform=T}),[T]),r((()=>{M.expandedState=L}),[L]);const I=e=>{e.useTransitions=!0,R(e)},[D]=m((()=>{if(!i)return Promise.resolve();const e=function(e){var t=e.theme,n=e.config,r=void 0===n?{}:n,o=r.id,a=r.resolve,i=void 0===a?[]:a,l=r.transform,s=void 0===l?[]:l,u=r.extend,c=void 0===u?[]:u,d={theme:t,matrix:Ge(i),styles:void 0};return d.styles=Ye({theme:t,id:o,transform:s,extend:c,matrix:d.matrix}),{getStyles:function(){return d.styles},getTheme:function(){return d.theme},setTheme:function(e){d.theme=e,d.styles=Ye({theme:e,id:o,transform:s,extend:c,matrix:d.matrix})}}}({theme:y,config:{id:"orgChart",resolve:[["object.orgChart","card.title.main","fontSize",Xe.CARD_TITLE_FONTSIZE],["object.orgChart","card.title.subTitle","fontSize",Xe.CARD_BODY_FONTSIZE],["object.orgChart","card.label.description","fontSize",Xe.CARD_BODY_FONTSIZE],["object.orgChart","card.label.measureLabel","fontSize",Xe.CARD_BODY_FONTSIZE],["object.orgChart","card.label.measureValue","fontSize",Xe.CARD_BODY_FONTSIZE],["object.orgChart","card.title.main","fontFamily","'Source Sans Pro', 'Arial', 'sans-serif'"],["object.orgChart","card.title.subTitle","fontFamily","'Source Sans Pro', 'Arial', 'sans-serif'"],["object.orgChart","card.label.description","fontFamily","'Source Sans Pro', 'Arial', 'sans-serif'"],["object.orgChart","card.label.measureLabel","fontFamily","'Source Sans Pro', 'Arial', 'sans-serif'"],["object.orgChart","card.label.measureValue","fontFamily","'Source Sans Pro', 'Arial', 'sans-serif'"]]}}),t=Vi(x,i);return t&&t.expandedState&&R(t.expandedState),t&&t.transform&&A(t.transform),Oi({layout:i,model:b,translator:C}).then((t=>(S(null!=l&&l.isEnabled("IM_5036_ORGCHART_STYLING")?(({themeService:e,layout:t})=>{var n,r,o,a,i,l,s,u,c,d,h,p,f,g,m,b,v,y,x,w,_,C,O,k,E,S,L,R,T,A,N,z,M,j,I,D,$,B,P,q,F,V,U,H,K,G,Z;const Y=e.getStyles(),W=(X="card",null!==(J=null===(Q=t.components)||void 0===Q?void 0:Q.find((e=>e.key===X)))&&void 0!==J?J:void 0);var X,J,Q;const ee=e.getTheme(),te=Fi(W,null==W||null===(n=W.title)||void 0===n?void 0:n.main,t),ne=Fi(W,null==W||null===(r=W.title)||void 0===r?void 0:r.subTitle,t),re=Fi(W,null==W||null===(o=W.label)||void 0===o?void 0:o.description,t),oe=Fi(W,null==W||null===(a=W.label)||void 0===a?void 0:a.measureLabel,t),ae=Fi(W,null==W||null===(i=W.label)||void 0===i?void 0:i.measureValue,t),ie={useColorExpression:qi(W,null==W||null===(l=W.background)||void 0===l?void 0:l.useColorExpression,"byExpression"===(null==t||null===(s=t.style)||void 0===s||null===(s=s.backgroundColor)||void 0===s?void 0:s.colorType),Xe.BACKGROUND_USE_EXPRESSION),color:qi(W,null==W||null===(u=W.background)||void 0===u?void 0:u.color,null==t||null===(c=t.style)||void 0===c||null===(c=c.backgroundColor)||void 0===c?void 0:c.color,Xe.BACKGROUND_COLOR),colorExpression:qi(W,null==W||null===(d=W.background)||void 0===d?void 0:d.colorExpression,null==t||null===(h=t.style)||void 0===h||null===(h=h.backgroundColor)||void 0===h?void 0:h.colorExpression,"")},le={topBar:qi(W,null==W||null===(p=W.border)||void 0===p?void 0:p.topBar,null==t||null===(f=t.style)||void 0===f||null===(f=f.border)||void 0===f?void 0:f.top,Xe.BORDER_TOP),fullBorder:qi(W,null==W||null===(g=W.border)||void 0===g?void 0:g.fullBorder,null==t||null===(m=t.style)||void 0===m||null===(m=m.border)||void 0===m?void 0:m.fullBorder,Xe.BORDER_FULL),contrastColor:qi(W,null==W||null===(b=W.border)||void 0===b?void 0:b.contrastColor,"auto"===(null==t||null===(v=t.style)||void 0===v||null===(v=v.border)||void 0===v?void 0:v.colorType),!0),useColorExpression:qi(W,null==W||null===(y=W.border)||void 0===y?void 0:y.useColorExpression,"byExpression"===(null==t||null===(x=t.style)||void 0===x||null===(x=x.border)||void 0===x?void 0:x.colorType),Xe.BORDER_USE_EXPRESSION),color:qi(W,null==W||null===(w=W.border)||void 0===w?void 0:w.color,null==t||null===(_=t.style)||void 0===_||null===(_=_.border)||void 0===_?void 0:_.color,Xe.BORDER_COLOR),colorExpression:qi(W,null==W||null===(C=W.border)||void 0===C?void 0:C.colorExpression,null==t||null===(O=t.style)||void 0===O||null===(O=O.border)||void 0===O?void 0:O.colorExpression,"")},se=qi(W,null==W?void 0:W.contrastTextColor,"auto"===(null==t||null===(k=t.style)||void 0===k||null===(k=k.fontColor)||void 0===k?void 0:k.colorType),!0),ue=Pi(te,ee,"default",se),ce=Pi(ne,ee,"default",se),de=Pi(re,ee,"default",se),he=Pi(oe,ee,"default",se),pe=Pi(ae,ee,"default",se),fe=Pi(ie,ee,Xe.BACKGROUND_COLOR.color,!1),ge=Pi(le,ee,sa.getDarkColor(fe),le.contrastColor),me=t.qHyperCube.qMeasureInfo.length?t.qHyperCube.qMeasureInfo[0].qFallbackTitle:null;return{cardTitle:{fontSize:qi(W,null==W||null===(E=W.title)||void 0===E||null===(E=E.main)||void 0===E?void 0:E.fontSize,Xe.CARD_TITLE_FONTSIZE,Y.card.title.main.fontSize),fontFamily:null!==(S=null==W||null===(L=W.title)||void 0===L||null===(L=L.main)||void 0===L?void 0:L.fontFamily)&&void 0!==S?S:Y.card.title.main.fontFamily,fontColor:ue},cardSubTitle:{fontSize:qi(W,null==W||null===(R=W.title)||void 0===R||null===(R=R.subTitle)||void 0===R?void 0:R.fontSize,Xe.CARD_BODY_FONTSIZE,Y.card.title.subTitle.fontSize),fontFamily:null!==(T=null==W||null===(A=W.title)||void 0===A||null===(A=A.subTitle)||void 0===A?void 0:A.fontFamily)&&void 0!==T?T:Y.card.title.subTitle.fontFamily,fontColor:ce},cardDescription:{fontSize:qi(W,null==W||null===(N=W.label)||void 0===N||null===(N=N.description)||void 0===N?void 0:N.fontSize,Xe.CARD_TITLE_FONTSIZE,Y.card.label.description.fontSize),fontFamily:null!==(z=null==W||null===(M=W.label)||void 0===M||null===(M=M.description)||void 0===M?void 0:M.fontFamily)&&void 0!==z?z:Y.card.label.description.fontFamily,fontColor:de},cardMeasureLabel:{fontSize:qi(W,null==W||null===(j=W.label)||void 0===j||null===(j=j.measureLabel)||void 0===j?void 0:j.fontSize,Xe.CARD_BODY_FONTSIZE,Y.card.label.measureLabel.fontSize),fontFamily:null!==(I=null==W||null===(D=W.label)||void 0===D||null===(D=D.measureLabel)||void 0===D?void 0:D.fontFamily)&&void 0!==I?I:Y.card.label.measureLabel.fontFamily,fontColor:he},cardMeasureValue:{fontSize:qi(W,null==W||null===($=W.label)||void 0===$||null===($=$.measureValue)||void 0===$?void 0:$.fontSize,Xe.CARD_BODY_FONTSIZE,Y.card.label.measureValue.fontSize),fontFamily:null!==(B=null==W||null===(P=W.label)||void 0===P||null===(P=P.measureValue)||void 0===P?void 0:P.fontFamily)&&void 0!==B?B:Y.card.label.measureValue.fontFamily,fontColor:pe},cardContrastTextColor:se,cardBackgroundColor:fe,cardBorder:{topBar:le.topBar,fullBorder:le.fullBorder,contrastColor:le.contrastColor,borderColor:ge},cardImage:{location:null!==(q=null==W||null===(F=W.image)||void 0===F?void 0:F.location)&&void 0!==q?q:Xe.IMAGE_LOCATION,alignment:null!==(V=null==W||null===(U=W.image)||void 0===U?void 0:U.alignment)&&void 0!==V?V:Xe.IMAGE_ALIGNMENT,shape:null!==(H=null==W||null===(K=W.image)||void 0===K?void 0:K.shape)&&void 0!==H?H:Xe.IMAGE_SHAPE,clip:null!==(G=null==W||null===(Z=W.image)||void 0===Z?void 0:Z.clip)&&void 0!==G?G:Xe.IMAGE_CLIP},measureLabel:me}})({themeService:e,layout:i}):Bi({Theme:y,layout:i})),j.setState([]),t)))}),[i,b,C.language(),y.name()]),$=()=>{if(v&&D&&E){const e=Vi(x,i),t=Ci(E,l);Mi({element:v,dataTree:D,viewState:e,wrapperState:M,selectionObj:j,setInitialZoom:z,setTransform:A,setExpandedState:R,setContainerData:k,layout:i,flags:l,actualCardHeight:t})}},B=()=>{if(O&&L&&E){const e=Ci(E,l);(({containerData:e,styling:t,setExpandedCallback:n,wrapperState:r,selectionObj:o,element:a,flags:i,actualCardHeight:l})=>{const{svg:s,divBox:u,allNodes:c,positioning:d,tooltip:h}=e,{navigationMode:p}=c.data;u.selectAll("*").remove(),s.selectAll("*").remove();const f=zi(r.expandedState,c,!1,p);Li({positioning:d,divBox:u,nodes:f,styling:t,setExpandedCallback:n,wrapperState:r,selectionObj:o,navigationMode:p,element:a,tooltip:h,flags:i,actualCardHeight:l}),Ri(s.selectAll(".sn-org-paths").data(f).enter(),d,r.expandedState.topId,p,l)})({containerData:O,styling:E,setExpandedCallback:I,wrapperState:M,selectionObj:j,useTransitions:L.useTransitions,element:v,flags:l,actualCardHeight:e})}};r((()=>{B()}),[O,j.state]),r((()=>{$()}),[v,D,_]),r((()=>{i.resizeOnExpand?$():B()}),[L]),r((()=>{if(O&&i&&i.snapshotData){const e=((e,t,n)=>{if(!t)return Wo.translate(n.x,n.y).scale(n.zoom);const{size:r}=t,o=e.width/r.w>e.height/r.h?e.height/r.h:e.width/r.w,a=t.transform.x*o,i=t.transform.y*o,l=t.transform.zoom*o;return Wo.translate(a,i).scale(l)})(w,i.snapshotData.viewState,T);Ni(e,O.svg,O.divBox,w.width,w.height),O.divBox.classed("sn-org-chart-snapshot",!0)}}),[w,O]),Ii(L,O,i,T,N)},ext:ft(i)}}export{Ui as default};
9
+ e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,o,a,i,l,s,u,c,d,h=e.length,p=e.search(/[0-9\-\+#]/),f=p>0?e.substring(0,p):"",g=e.split("").reverse().join(""),m=g.search(/[0-9\-\+#]/),b=h-m,v=e.substring(b,b+1),y=b+("."===v||","===v?1:0),x=m>0?e.substring(y,h):"";if(n=(t="-"===(e=e.substring(p,y)).charAt(0)?-t:+t)<0?t=-t:0,o=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",a=r&&r[1]&&r[0]||",",e=e.split(o),t=+(t=t.toFixed(e[1]&&e[1].length))+"",l=e[1]&&e[1].lastIndexOf("0"),(!(u=t.split("."))[1]||u[1]&&u[1].length<=l)&&(t=(+t).toFixed(l+1)),c=e[0].split(a),e[0]=c.join(""),(i=e[0]&&e[0].indexOf("0"))>-1)for(;u[0].length<e[0].length-i;)u[0]="0"+u[0];else 0==+u[0]&&(u[0]="");if((t=t.split("."))[0]=u[0],s=c[1]&&c[c.length-1].length){for(g="",b=(d=t[0]).length%s,h=d.length,y=0;y<h;y++)g+=d.charAt(y),!((y-b+1)%s)&&y<h-s&&(g+=a);t[0]=g}return t[1]=e[1]&&t[1]?o+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),f+(n?"-":"")+r+x}},Ae({exports:{}});var qe="'Source Sans Pro', 'Arial', 'sans-serif'",Fe="#333333",Ve="#595959",Ue="#737373",He="#cccccc",Ke="#e6e6e6";function Ge(e){var t={};return[].concat(y(e),y([["","","color"],["object","","fontFamily"],["object","axis.label.name","color",Ve],["object","axis.label.name","fontFamily",qe],["object","axis.label.name","fontSize","12px"],["object","axis.line.major","color",He],["object","axis.line.minor","color",Ke],["object","axis.title","color"],["object","axis.title","fontFamily",qe],["object","axis.title","fontSize","13px"],["object","grid.line.highContrast","color",Ke],["object","grid.line.major","color",He],["object","grid.line.minor","color",Ke],["object","label.value","color",Ve],["object","label.value","fontFamily",qe],["object","label.value","fontSize","12px"],[!1,"label.value","darkColor",Ve],[!1,"label.value","lightColor",Ke],["object","outOfRange","color","#999"],["object","legend.title","color",Fe],["object","legend.title","fontFamily",qe],["object","legend.title","fontSize","15px"],["object","legend.label","color",Ve],["object","legend.label","fontFamily",qe],["object","legend.label","fontSize","13px"],["object","referenceLine.label.name","color",Fe],["object","referenceLine.label.name","fontFamily",qe],["object","referenceLine.label.name","fontSize","12px"],["object","referenceLine.outOfBounds","color",Ke],["object","referenceLine.outOfBounds","fontFamily",qe],["object","referenceLine.outOfBounds","fontSize","12px"],["object","referenceLine.outOfBounds","backgroundColor",Ue,function(e){return"transparent"===e?Ue:e}]])).reduce((function(e,n){var r="".concat(n[0],"-").concat(n[1],"-").concat(n[2],"}");return t[r]||(t[r]=!0,e.push(n)),e}),[]).sort((function(e,t){return(e[0].split?e[0].split(".").length:0)-(t[0].split?t[0].split(".").length:0)}))}var Ze=function(e){return e};function Ye(e){var t=e.theme,n=e.id,r=e.transform,o=e.extend,a=e.matrix,i={},l=r.reduce((function(e,t){var n=v(t,2),r=n[0],o=n[1];return e[r]=o,e}),{});return a.forEach((function(e){var r=v(e,5),o=r[0],a=r[1],s=r[2],u=r[3],c=r[4],d=void 0===c?function(e){return e}:c,h=function(e){var t=e.theme,n=e.base,r=e.path,o=e.attribute,a=e.defaultValue,i=void 0===a?void 0:a;if(!t||!1===n)return i;var l=t.getStyle(n,r,o);return void 0===l?i:l}({theme:t,base:"object"===o&&n?"".concat("object",".").concat(n):o,path:a,attribute:s,defaultValue:u}),p=(l["".concat(a,".").concat(s)]||Ze)(d(h));ze(i,[a,s].filter(Boolean).join("."),p)})),o.forEach((function(e){var t=v(e,2),n=t[0],r=t[1];ze(i,n,r)})),i}var We={targets:[{path:"/qHyperCubeDef",dimensions:{min:2,max:2},measures:{min:0,max:1}}]},Xe={CARD_TITLE_FONTSIZE:"14px",CARD_BODY_FONTSIZE:"11px",FONT_COLOR_TYPE:"auto",FONT_COLOR_DARK:{index:-1,color:"#484848"},FONT_COLOR_LIGHT:{color:"#e6e6e6"},BACKGROUND_COLOR_TYPE:"colorPicker",BACKGROUND_COLOR:{index:-1,color:"#ffffff"},BORDER_COLOR_TYPE:"auto",BORDER_COLOR:{index:-1,color:"#737373"},BORDER_FULL:!0,BORDER_TOP:!0,FONT_COLOR_USE_EXPRESSION:!1,BACKGROUND_USE_EXPRESSION:!1,BORDER_USE_EXPRESSION:!1,IMAGE_LOCATION:"both",IMAGE_ALIGNMENT:"left",IMAGE_SHAPE:"rectangle",IMAGE_CLIP:!0};var Je={getValue:function(e,t,n){const r=t.split(".");let o;if(void 0===e)return n;let a=e;for(o=0;o<r.length;++o){if(void 0===a[r[o]])return n;a=a[r[o]]}return a}};const Qe=[{value:!1,translation:"properties.colorMode.primary"},{value:!0,translation:"properties.colorMode.byExpression"}],et=e=>{var t;return null===(t=e.contrastTextColor)||void 0===t||t};function tt(e,t,n){const r=`${e}.${t}`,o=`${r}.fontFamily`,a=`${r}.fontSize`,i=`${r}.color`,l=`${r}.colorExpression`;return{fontFamilyItem:{component:"dropdown",ref:o,options:()=>n.getOptions(`card.${o}`),defaultValue:()=>n.getDefaultValue(`card.${o}`)},fontSizeItem:{component:"dropdown",ref:a,options:()=>n.getOptions(`card.${a}`),defaultValue:()=>n.getDefaultValue(`card.${a}`)},fontColorWrapperItem:{component:"inline-wrapper",items:{useColorExpression:{ref:`${r}.useColorExpression`,width:!0,component:"dropdown",defaultValue:Xe.FONT_COLOR_USE_EXPRESSION,options:Qe,show:e=>!et(e)},colorPicker:{component:"color-picker",ref:i,width:!1,dualOutput:!0,defaultValue:Xe.FONT_COLOR_DARK,show:n=>{var r;return!(et(n)||null!==(r=n[e])&&void 0!==r&&null!==(r=r[t])&&void 0!==r&&r.useColorExpression)}}}},colorExpression:{component:"input-field-expression",type:"string",ref:l,width:!0,expression:"optional",defaultValue:"",show:n=>{var r;return!et(n)&&(null===(r=n[e])||void 0===r||null===(r=r[t])||void 0===r?void 0:r.useColorExpression)}}}}const nt=[{value:!1,translation:"properties.colorMode.primary"},{value:!0,translation:"properties.colorMode.byExpression"}],rt=[{value:"card",translation:"Card only"},{value:"tooltip",translation:"Tooltip only"},{value:"both",translation:"Card and tooltip"}],ot=[{value:"left",translation:"Left"},{value:"right",translation:"Right"},{value:"top",translation:"Top"},{value:"bottom",translation:"Bottom"}],at=[{value:"rectangle",translation:"Rectangle"},{value:"round",translation:"Round"}];function it(e,t,n){const r=function(e){var t=e.theme,n=e.translator,r=e.config,o=void 0===r?{}:r,a=e.flags,i=function(e){var t=e.config,n=void 0===t?{}:t,r=n.id,o=n.paths;return{id:void 0===r?"object":"".concat("object",".").concat(r),paths:Array.isArray(o)?o:[]}}({config:o}),l=i.id,s=i.paths,u={};s.forEach((function(e){for(var r=e.split("."),o=u,i=0;i<r.length;i++){var s=r[i];i===r.length-1?o[s]=A({theme:t,translator:n,id:l,path:e,flags:a}):void 0===o[s]&&(o[s]={}),o=o[s]}}));var c=function(e){for(var t=e.split("."),n=u,r=0;r<t.length;r++){var o=t[r];if(void 0===n[o])throw new Error("font-resolver: Path '".concat(e,"' could not be resolved."));n=n[o]}return n};return u.getDefaultValue=function(e){return c(e).getDefaultValue()},u.getOptions=function(e){return c(e).getOptions()},u}({theme:e,translator:n,flags:t,config:{id:"orgChart",paths:["card.title.main","card.title.subTitle","card.label.description","card.label.measureLabel","card.label.measureValue"]}}),o=e=>{var t,n,r,o;return(null!==(t=null===(n=e.border)||void 0===n?void 0:n.topBar)&&void 0!==t?t:Xe.BORDER_TOP)||(null!==(r=null===(o=e.border)||void 0===o?void 0:o.fullBorder)&&void 0!==r?r:Xe.BORDER_FULL)},a=e=>{var t,n;return null===(t=null===(n=e.border)||void 0===n?void 0:n.contrastColor)||void 0===t||t};return{component:"styling-panel",show:!0,chartType:"orgchart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.OrgChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,useBackground:!0,items:{contrastTextColorSection:{translation:"Object.OrgChart.Card.TextColor",component:"panel-section",items:{contrastTextColorItems:{component:"items",ref:"components",key:"card",items:{useContrast:{component:"checkbox",type:"boolean",ref:"contrastTextColor",translation:"Object.OrgChart.Card.Contrast",defaultValue:!0}}}}},titleSection:{translation:"Object.OrgChart.Card.Title",component:"panel-section",items:{titleItems:{component:"items",ref:"components",key:"card",items:tt("title","main",r)}}},subtitleSection:{translation:"Object.OrgChart.Card.Subtitle",component:"panel-section",items:{subtitleItems:{component:"items",ref:"components",key:"card",items:tt("title","subTitle",r)}}},descriptionSection:{translation:"Object.OrgChart.Card.Description",component:"panel-section",items:{descriptionItems:{component:"items",ref:"components",key:"card",items:tt("label","description",r)}}},measureLabelSection:{translation:"Object.OrgChart.Card.MeasureLabel",component:"panel-section",items:{measureLabelItems:{component:"items",ref:"components",key:"card",items:tt("label","measureLabel",r)}}},measureValueSection:{translation:"Object.OrgChart.Card.MeasureValue",component:"panel-section",items:{measureValueItems:{component:"items",ref:"components",key:"card",items:tt("label","measureValue",r)}}},backgroundColorSection:{component:"panel-section",translation:"Object.OrgChart.ColorLabelExpression",items:{backgroundColorItems:{component:"items",ref:"components",key:"card",items:{fontColorWrapperItem:{component:"inline-wrapper",items:{useColorExpression:{ref:"background.useColorExpression",width:9,component:"dropdown",defaultValue:Xe.BACKGROUND_USE_EXPRESSION,options:nt},colorPicker:{component:"color-picker",type:"object",ref:"background.color",width:3,dualOutput:!0,defaultValue:Xe.BACKGROUND_COLOR,showAlpha:null==t?void 0:t.isEnabled("IM_3964_BG_OPACITY"),show:e=>{var t;return!(null!==(t=e.background)&&void 0!==t&&t.useColorExpression)}},colorExpression:{component:"input-field-expression",type:"string",ref:"background.colorExpression",expression:"optional",defaultValue:"",show:e=>{var t;return null===(t=e.background)||void 0===t?void 0:t.useColorExpression}}}}}}}},cardBorderSection:{component:"panel-section",translation:"Object.OrgChart.CardAppearance",items:{cardBorderItems:{component:"items",ref:"components",key:"card",items:{topBar:{component:"checkbox",ref:"border.topBar",translation:"Object.OrgChart.TopBar",defaultValue:Xe.BORDER_TOP},fullBorder:{component:"checkbox",ref:"border.fullBorder",translation:"properties.border",defaultValue:Xe.BORDER_FULL},contrastBorderColorSection:{component:"checkbox",type:"boolean",key:"card",ref:"border.contrastColor",translation:"Object.OrgChart.Card.Contrast",defaultValue:!0,show:e=>o(e)},borderColorWrapperItem:{component:"inline-wrapper",items:{useColorExpression:{component:"dropdown",ref:"border.useColorExpression",width:9,translation:"properties.border.color",defaultValue:Xe.BORDER_USE_EXPRESSION,options:nt,show:e=>o(e)&&!a(e)},colorPicker:{component:"color-picker",ref:"border.color",width:3,dualOutput:!0,defaultValue:Xe.BORDER_COLOR,show:e=>{var t;return o(e)&&!a(e)&&!(null!==(t=e.border)&&void 0!==t&&t.useColorExpression)}},colorExpression:{component:"input-field-expression",type:"string",ref:"border.colorExpression",expression:"optional",defaultValue:"",show:e=>{var t;return o(e)&&!a(e)&&(null===(t=e.border)||void 0===t?void 0:t.useColorExpression)}}}}}}}},...(null==t?void 0:t.isEnabled("IM_5036_ORGCHART_STYLING_IMAGE"))&&{imageSection:{component:"panel-section",translation:"Object.OrgChart.ImageOptions",items:{imageItems:{component:"items",ref:"components",key:"card",items:{location:{component:"dropdown",ref:"image.location",translation:"Object.OrgChart.ImageLocation",options:rt,defaultValue:Xe.IMAGE_LOCATION},alignment:{component:"dropdown",ref:"image.alignment",translation:"Object.OrgChart.ImageAlignment",options:ot,defaultValue:Xe.IMAGE_ALIGNMENT},shape:{component:"dropdown",ref:"image.shape",translation:"Object.OrgChart.ImageShape",options:at,defaultValue:Xe.IMAGE_SHAPE},clip:{component:"checkbox",ref:"image.clip",translation:"Object.OrgChart.ImageFit",defaultValue:Xe.IMAGE_CLIP,show:e=>{var t,n;return"rectangle"===(null!==(t=null===(n=e.image)||void 0===n?void 0:n.shape)&&void 0!==t?t:Xe.IMAGE_SHAPE)}}}}}}}}}}const lt=[{value:"auto",translation:"Common.Auto"},{value:"colorPicker",translation:"properties.colorMode.primary"},{value:"byExpression",translation:"properties.colorMode.byExpression"}],st=[{value:"free",translation:"Object.OrgChart.FreeMode"},{value:"expandAll",translation:"Object.OrgChart.ExpandAll"}],ut=e=>Je.getValue(e,"style.border.top")||Je.getValue(e,"style.border.fullBorder"),ct=e=>({uses:"data",items:{measures:{disabledRef:""},dimensions:{disabledRef:"",items:{dimensionLimits:{show:!1},attributes:{component:"attribute-expression-reference",defaultValue:[],show:(e,t)=>t.getDimensions()[0]===e,ref:"qAttributeExpressions",items:[{component:"expression",ref:"qExpression",translation:"Object.OrgChart.LabelExpression",defaultValue:"",id:"labelExpression",tid:"labelExpression"},{component:"expression",ref:"qExpression",translation:"Object.OrgChart.SubLabelExpression",defaultValue:"",id:"subLabelExpression",tid:"subLabelExpression"},{component:"expression",ref:"qExpression",translation:"Object.OrgChart.ExtraLabelExpression",defaultValue:"",id:"extraLabelExpression",tid:"extraLabelExpression"},...null!=e&&e.isEnabled("IM_5036_ORGCHART_STYLING")&&null!=e&&e.isEnabled("IM_5036_ORGCHART_STYLING_IMAGE")?[{component:"expression",ref:"qExpression",translation:"Object.OrgChart.ImageUrl",defaultValue:"",id:"imageExpression",tid:"imageExpression"}]:[],{component:"expression",ref:"qExpression",translation:"Object.OrgChart.ColorLabelExpression",defaultValue:"",id:"colorByExpression",tid:"nodeColorByExpression"}]},desc:{show:(e,t)=>t.getDimensions()[0]===e,component:"text",translation:"Object.OrgChart.ExtraLabelDesc",style:"hint"}}}}}),dt={uses:"sorting"},ht={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"},rowLimit:{type:"integer",translation:"$RowLimit",ref:"rowLimit",defaultValue:3e4,min:5e3,max:1e5,show:!1}}}}},pt=(e,t,n)=>{var r;const o=null==n||null===(r=n.sense)||void 0===r?void 0:r.theme,a={uses:"settings",items:{styling:{grouped:!0,translation:"properties.presentation",type:"items",items:{...(null==t?void 0:t.isEnabled("IM_5036_ORGCHART_STYLING"))&&{orgChartStyling:it(o,t,e)},navigation:{type:"items",items:{navigationMode:{ref:"navigationMode",type:"string",translation:"Object.OrgChart.NavigationMode",component:"dropdown",defaultValue:"free",options:st},resizeOnExpand:{ref:"resizeOnExpand",type:"boolean",defaultValue:!1,translation:"Object.OrgChart.resizeOnExpand",show:e=>"expandAll"!==Je.getValue(e,"navigationMode")}}},backgroundColor:{},fontColor:{},border:{}}}}};return null!=t&&t.isEnabled("IM_5036_ORGCHART_STYLING")||(a.items.styling.items.backgroundColor={type:"items",items:{useColorExpression:{ref:"style.backgroundColor.colorType",type:"string",translation:"Object.OrgChart.BackgroundColor",component:"dropdown",defaultValue:Xe.BACKGROUND_COLOR_TYPE,options:lt},colorPicker:{component:"color-picker",type:"object",ref:"style.backgroundColor.color",translation:"properties.color",dualOutput:!0,defaultValue:Xe.BACKGROUND_COLOR,show:e=>"colorPicker"===Je.getValue(e,"style.backgroundColor.colorType")},colorExpression:{component:"string",type:"string",ref:"style.backgroundColor.colorExpression",translation:"Common.Expression",expression:"optional",defaultValue:"",show:e=>"byExpression"===Je.getValue(e,"style.backgroundColor.colorType")}}},a.items.styling.items.fontColor={type:"items",items:{useColorExpression:{ref:"style.fontColor.colorType",type:"string",translation:"Object.OrgChart.FontColor",component:"dropdown",defaultValue:Xe.FONT_COLOR_TYPE,options:lt},colorPicker:{component:"color-picker",type:"object",ref:"style.fontColor.color",translation:"properties.color",dualOutput:!0,defaultValue:Xe.FONT_COLOR_DARK,show:e=>"colorPicker"===Je.getValue(e,"style.fontColor.colorType")},colorExpression:{component:"string",type:"string",ref:"style.fontColor.colorExpression",translation:"Common.Expression",expression:"optional",defaultValue:"",show:e=>"byExpression"===Je.getValue(e,"style.fontColor.colorType")}}},a.items.styling.items.border={type:"items",items:{appearanceHeader:{component:"text",translation:"Object.OrgChart.CardAppearance",style:"pp-nm-hcd__list-header"},topBar:{type:"boolean",ref:"style.border.top",translation:"Object.OrgChart.TopBar",defaultValue:Xe.BORDER_TOP},fullBorder:{type:"boolean",ref:"style.border.fullBorder",translation:"properties.border",defaultValue:Xe.BORDER_FULL},colorType:{component:"dropdown",type:"string",ref:"style.border.colorType",translation:"properties.border.color",defaultValue:Xe.BORDER_COLOR_TYPE,options:lt,show:e=>ut(e)},colorPicker:{component:"color-picker",type:"object",ref:"style.border.color",translation:"properties.color",dualOutput:!0,defaultValue:Xe.BORDER_COLOR,show:e=>ut(e)&&"colorPicker"===Je.getValue(e,"style.border.colorType")},colorExpression:{component:"string",type:"string",ref:"style.border.colorExpression",translation:"Common.Expression",expression:"optional",defaultValue:"",show:e=>ut(e)&&"byExpression"===Je.getValue(e,"style.border.colorType")}}}),a};function ft(e){return function({translator:e,flags:t,anything:n}){return{definition:{type:"items",component:"accordion",items:{data:ct(t),sorting:dt,addOns:ht,settings:pt(e,t,n)}},support:{export:!0,exportData:!0,snapshot:!0,viewData:!0},migrate:{properties:e=>null!=t&&t.isEnabled("IM_5036_ORGCHART_STYLING")?function(e){var t,n,r,o,a,i,l,s,u,c,d,h;if((null===(t=e.components)||void 0===t?void 0:t.length)>0)return e;function p(e){return{useColorExpression:"byExpression"===e.colorType,color:e.color,colorExpression:e.colorExpression,colorType:e.colorType}}function f(e){return"auto"===e.colorType}const g={key:"card",title:{main:{...p(null===(n=e.style)||void 0===n?void 0:n.fontColor)},subTitle:{...p(null===(r=e.style)||void 0===r?void 0:r.fontColor)}},label:{description:{...p(null===(o=e.style)||void 0===o?void 0:o.fontColor)},measureLabel:{...p(null===(a=e.style)||void 0===a?void 0:a.fontColor)},measureValue:{...p(null===(i=e.style)||void 0===i?void 0:i.fontColor)}},contrastTextColor:f(null===(l=e.style)||void 0===l?void 0:l.fontColor),background:{...p(null===(s=e.style)||void 0===s?void 0:s.backgroundColor)},border:{...p(null===(u=e.style)||void 0===u?void 0:u.border),fullBorder:null===(c=e.style)||void 0===c||null===(c=c.border)||void 0===c?void 0:c.fullBorder,topBar:null===(d=e.style)||void 0===d||null===(d=d.border)||void 0===d?void 0:d.top,contrastColor:f(null===(h=e.style)||void 0===h?void 0:h.border)}};return e.components=[g],e}(e):e}}}(e)}var gt={Object_OrgChart:{id:"Object.OrgChart",locale:{"de-DE":"Organisationsdiagramm","en-US":"Org chart","es-ES":"Organigrama","fr-FR":"Organigramme","it-IT":"Organigramma","ja-JP":"組織図","ko-KR":"조직도","nl-NL":"Organisatiediagram","pl-PL":"Wykres organizacyjny","pt-BR":"Quadro organizacional","ru-RU":"Организационная диаграмма","sv-SE":"Organisationsdiagram","tr-TR":"Kuruluş grafiği","zh-CN":"组织图","zh-TW":"組織圖"}},Object_OrgChart_BackgroundColor:{id:"Object.OrgChart.BackgroundColor",locale:{"de-DE":"Hintergrundfarbe","en-US":"Background color","es-ES":"Color de fondo","fr-FR":"Couleur d'arrière-plan","it-IT":"Colore sfondo","ja-JP":"背景色","ko-KR":"배경색","nl-NL":"Achtergrondkleur","pl-PL":"Kolor tła","pt-BR":"Cor de fundo","ru-RU":"Цвет фона","sv-SE":"Bakgrundsfärg","tr-TR":"Arka plan rengi","zh-CN":"背景颜色","zh-TW":"背景顏色"}},Object_OrgChart_CardAppearance:{id:"Object.OrgChart.CardAppearance",locale:{"de-DE":"Kartendarstellung","en-US":"Card appearance","es-ES":"Aspecto de la tarjeta","fr-FR":"Aspect de la carte","it-IT":"Aspetto scheda","ja-JP":"カード スタイル","ko-KR":"카드 모양","nl-NL":"Uiterlijk van de kaart","pl-PL":"Wygląd karty","pt-BR":"Aparência do cartão","ru-RU":"Вид карточки","sv-SE":"Kortets utseende","tr-TR":"Kart görünüşü","zh-CN":"卡外观","zh-TW":"卡片外觀"}},Object_OrgChart_ColorLabelExpression:{id:"Object.OrgChart.ColorLabelExpression",locale:{"de-DE":"Hintergrundfarbe der Karte","en-US":"Card background color","es-ES":"Color de fondo de la tarjeta","fr-FR":"Couleur d'arrière-plan de la carte","it-IT":"Colore sfondo scheda","ja-JP":"カードの背景色","ko-KR":"카드 배경색","nl-NL":"Achtergrondkleur kaart","pl-PL":"Kolor tła karty","pt-BR":"Cor de fundo do cartão","ru-RU":"Цвет фона карточки","sv-SE":"Kortets bakgrundsfärg","tr-TR":"Kart arka plan rengi","zh-CN":"卡背景颜色","zh-TW":"卡片背景顏色"}},Object_OrgChart_CycleWarning:{id:"Object.OrgChart.CycleWarning",locale:{"de-DE":"Die Daten enthalten Zirkelbezüge, Knoten werden ausgelassen.","en-US":"Data contains circular references, nodes are omitted.","es-ES":"Los datos contienen referencias circulares, se omiten los nodos.","fr-FR":"Les données contiennent des références circulaires. Les nœuds sont omis.","it-IT":"Impossibile visualizzare i nodi: i dati contengono riferimenti incrociati.","ja-JP":"データに循環参照が含まれています。ノードは省略されます。","ko-KR":"데이터가 순환 참조를 포함합니다. 노드는 생략됩니다.","nl-NL":"Gegevens bevatten cirkelreferenties, knooppunten worden weggelaten.","pl-PL":"Dane zawierają odwołania cykliczne, węzły są pomijane.","pt-BR":"Os dados contêm referências circulares, os nós são omitidos.","ru-RU":"В данных содержатся циклические ссылки, узлы опущены.","sv-SE":"Data innehåller cirkelreferenser. Noder utelämnas.","tr-TR":"Veriler döngüsel referanslar içeriyor; düğümler atlandı.","zh-CN":"数据包含循环引用,已省略节点。","zh-TW":"資料包含循環參照,已省略節點。"}},Object_OrgChart_Description:{id:"Object.OrgChart.Description",locale:{"de-DE":"Zeigt die Beziehungen einer Organisation oder ähnlich strukturierter Daten an. Startet oben und ermöglicht die Navigation durch die Hierarchie.","en-US":"Displays the relations of an organization or similarly structured data. Starts at the top and allows for navigation through the hierarchy.","es-ES":"Muestra las relaciones jerárquicas de una organización o datos estructurados de manera similar. Comienza en la parte superior y permite la navegación a través de la jerarquía.","fr-FR":"Affiche les relations d'une entreprise ou de données structurées de manière similaire. Démarre au sommet et permet la navigation à travers la hiérarchie.","it-IT":"Visualizza le relazioni di un'organizzazione o dati strutturati in modo analogo. Inizia dall'alto e consente la navigazione attraverso la gerarchia.","ja-JP":"組織の関係やそれに類似する構造のデータを表示します。上部から開始し、階層を移動できます。","ko-KR":"조직 또는 유사하게 구조화된 데이터의 관계를 표시합니다. 맨 위에서 시작하여 계층 구조를 탐색할 수 있습니다.","nl-NL":"Geeft de relaties van een organisatie of vergelijkbaar gestructureerde gegevens weer. Begint bovenaan en maakt navigatie door de hiërarchie mogelijk.","pl-PL":"Wyświetla relacje organizacji lub dane o podobnej strukturze. Zaczyna się od góry i umożliwia nawigację w hierarchii.","pt-BR":"Exibe as relações de uma organização ou dados estruturados de forma semelhante. Começa no topo e permite a navegação pela hierarquia.","ru-RU":"Отображает отношения организации или аналогично структурированные данные. Начинается сверху и позволяет перемещаться по иерархии.","sv-SE":"Visar relationerna i en organisation eller data som är strukturerat på liknande sätt. Startar högst upp och möjliggör navigering genom hierarkin.","tr-TR":"Bir kuruluşun ilişkilerini veya benzer yapılanan verileri gösterir. En üstte açılır ve hiyerarşide hareket etmenize olanak sağlar.","zh-CN":"显示组织或类似结构数据的关系。从顶部开始,并允许在层次结构中进行导航。","zh-TW":"顯示組織的關係或類似結構的資料。在頂端開始並允許瀏覽階層。"}},Object_OrgChart_DummyWarn:{id:"Object.OrgChart.DummyWarn",locale:{"de-DE":"Die Daten enthalten mehrere Root-Knoten.","en-US":"The data contains multiple root nodes.","es-ES":"Los datos contienen múltiples nodos raíz.","fr-FR":"Les données contiennent plusieurs nœuds racines.","it-IT":"I dati contengono più nodi principali.","ja-JP":"データには複数のルート ノードが含まれています。","ko-KR":"데이터가 여러 루트 노드를 포함합니다.","nl-NL":"De gegevens bevatten meerdere hoofdknooppunten.","pl-PL":"Dane zawierają wiele węzłów głównych.","pt-BR":"Os dados contêm vários nós raiz.","ru-RU":"В данных содержится несколько корневых узлов.","sv-SE":"Data innehåller flera rotnoder.","tr-TR":"Veriler birden çok kök düğümü içeriyor.","zh-CN":"数据包含多个根节点。","zh-TW":"資料包含多個根節點。"}},Object_OrgChart_ExpandAll:{id:"Object.OrgChart.ExpandAll",locale:{"de-DE":"Gesamte Struktur","en-US":"Entire tree","es-ES":"Árbol entero","fr-FR":"Arborescence complète","it-IT":"Intero albero","ja-JP":"ツリー全体","ko-KR":"전체 트리","nl-NL":"Volledige structuur","pl-PL":"Całe drzewo","pt-BR":"Árvore inteira","ru-RU":"Все дерево","sv-SE":"Hela trädet","tr-TR":"Tüm ağaç","zh-CN":"整个树","zh-TW":"整個樹狀結構"}},Object_OrgChart_ExtraLabelDesc:{id:"Object.OrgChart.ExtraLabelDesc",locale:{"de-DE":"Die Beschreibung wird nur angezeigt, wenn eine Kennzahl nicht verwendet wird","en-US":"Description is only visible when a measure is not used","es-ES":"La descripción solo está visible cuando no se usa una medida","fr-FR":"La description est visible uniquement lorsqu'une mesure n'est pas utilisée","it-IT":"È possibile visualizzare la descrizione solo se le misure non vengono utilizzate","ja-JP":"メジャーが使用されていない場合にのみ、説明が表示されます。","ko-KR":"측정값을 사용하지 않는 경우에만 설명을 볼 수 있습니다.","nl-NL":"Beschrijving is alleen zichtbaar wanneer een meting niet wordt gebruikt","pl-PL":"Opis jest widoczny tylko wtedy, gdy miara nie jest używana","pt-BR":"A descrição é visível apenas quando uma medida não é usada","ru-RU":"Описание отображается, только если мера не используется","sv-SE":"Beskrivning används bara när ett mått inte används","tr-TR":"Bir hesaplama kullanılmadığında yalnızca açıklama görünür","zh-CN":"描述仅在未使用度量时可用","zh-TW":"只有在不使用量值時才會顯示描述"}},Object_OrgChart_ExtraLabelExpression:{id:"Object.OrgChart.ExtraLabelExpression",locale:{"de-DE":"Beschreibung der Karte","en-US":"Card description","es-ES":"Descripción de la tarjeta","fr-FR":"Description de la carte","it-IT":"Descrizione scheda","ja-JP":"カードの説明","ko-KR":"카드 설명","nl-NL":"Beschrijving kaart","pl-PL":"Opis karty","pt-BR":"Descrição do cartão","ru-RU":"Описание карточки","sv-SE":"Kortets beskrivning","tr-TR":"Kart açıklaması","zh-CN":"卡描述","zh-TW":"卡片描述"}},Object_OrgChart_FontColor:{id:"Object.OrgChart.FontColor",locale:{"de-DE":"Schriftfarbe","en-US":"Font color","es-ES":"Color de fuente","fr-FR":"Couleur de police","it-IT":"Colore formato carattere","ja-JP":"フォントの色","ko-KR":"글꼴 색","nl-NL":"Tekstkleur","pl-PL":"Kolor czcionki","pt-BR":"Cor da fonte","ru-RU":"Цвет шрифта","sv-SE":"Teckenfärg","tr-TR":"Yazı tipi rengi","zh-CN":"字体颜色","zh-TW":"字型色彩"}},Object_OrgChart_FreeMode:{id:"Object.OrgChart.FreeMode",locale:{"de-DE":"Erweitern/reduzieren","en-US":"Expand/collapse","es-ES":"Expandir/contraer","fr-FR":"Développer/Réduire","it-IT":"Espandi/comprimi","ja-JP":"展開/折りたたむ","ko-KR":"확장/축소","nl-NL":"Uitvouwen/alles samenvouwen","pl-PL":"Rozwiń/zwiń","pt-BR":"Expandir/recolher","ru-RU":"Развернуть/свернуть","sv-SE":"Visa/dölj","tr-TR":"Genişlet/daralt","zh-CN":"展开/折叠","zh-TW":"展開/摺疊"}},Object_OrgChart_IncludeDescendants:{id:"Object.OrgChart.IncludeDescendants",locale:{"de-DE":"Alle untergeordneten Elemente einschließen","en-US":"Include all children","es-ES":"Incluir todos los nodos secundarios","fr-FR":"Inclure tous les enfants","it-IT":"Includi tutti i nodi secondari","ja-JP":"すべての子を含める","ko-KR":"모든 자식을 포함합니다.","nl-NL":"Alle onderliggende elementen opnemen","pl-PL":"Uwzględniaj wszystkie elementy podrzędne","pt-BR":"Incluir todos os filhos","ru-RU":"Включить все дочерние элементы","sv-SE":"Inkludera alla underordnade","tr-TR":"Tüm alt öğeleri dahil edin","zh-CN":"包含所有子项","zh-TW":"包括所有子項"}},Object_OrgChart_LabelExpression:{id:"Object.OrgChart.LabelExpression",locale:{"de-DE":"Titel der Karte","en-US":"Card title","es-ES":"Título de tarjeta","fr-FR":"Titre de la carte","it-IT":"Titolo scheda","ja-JP":"カード タイトル","ko-KR":"카드 제목","nl-NL":"Titel kaart","pl-PL":"Tytuł karty","pt-BR":"Título do cartão","ru-RU":"Заголовок карточки","sv-SE":"Kortets rubrik","tr-TR":"Kart başlığı","zh-CN":"卡标题","zh-TW":"卡片標題"}},Object_OrgChart_MaxChildren:{id:"Object.OrgChart.MaxChildren",locale:{"de-DE":"Maximale Anzahl an untergeordneten Knoten erreicht, Knoten werden ausgelassen.","en-US":"Maximum number of child nodes reached, nodes are omitted.","es-ES":"Se alcanzó el número máximo de nodos secundarios, se omiten los nodos.","fr-FR":"Nombre maximal de nœuds enfants atteint. Les nœuds sont omis.","it-IT":"Impossibile visualizzare i nodi: numero massimo di nodi secondari raggiunto.","ja-JP":"子ノードの最大数に達しました。ノードは省略されます。","ko-KR":"최대 자식 노드 수에 도달했습니다. 노드는 생략됩니다.","nl-NL":"Maximaal aantal onderliggende knooppunten bereikt, knooppunten worden weggelaten.","pl-PL":"Osiągnięto maksymalną liczbę węzłów podrzędnych, węzły są pomijane.","pt-BR":"Número máximo de nós filhos atingidos, os nós são omitidos.","ru-RU":"Достигнуто максимальное количество дочерних узлов, узлы опущены.","sv-SE":"Maximalt antal underordnade noder har uppnåtts. Noder utelämnas.","tr-TR":"Maksimum alt öğe düğüm sayısına ulaşıldı; düğümler atlandı.","zh-CN":"已达到子节点最大数目,将省略节点。","zh-TW":"已達子節點數量上限,已省略節點。"}},Object_OrgChart_MaxData:{id:"Object.OrgChart.MaxData",locale:{"de-DE":"Die Datenobergrenze ist erreicht. Die Struktur wird möglicherweise nicht korrekt dargestellt.","en-US":"The maximum data limit is reached. The tree may display incorrectly.","es-ES":"Se ha alcanzado el límite máximo de datos. Puede que el árbol se muestre incorrectamente.","fr-FR":"La limite de données maximale est atteinte. Il se peut que l'arborescence ne s'affiche pas correctement.","it-IT":"Limite massimo dati raggiunto. La visualizzazione del grafico potrebbe essere compromessa.","ja-JP":"最大データ制限に達しました。ツリーが正しく表示されない場合があります。","ko-KR":"최대 데이터 제한에 도달했습니다. 트리가 잘못 표시될 수 있습니다.","nl-NL":"Het maximale datalimiet is bereikt. De boom kan incorrect worden weergegeven.","pl-PL":"Osiągnięto maksymalny limit danych. Drzewo może wyświetlać się nieprawidłowo.","pt-BR":"O limite máximo de dados foi atingido. A árvore pode ser exibida incorretamente.","ru-RU":"Достигнут максимальный предел данных. Дерево может отображаться некорректно.","sv-SE":"Maxgränsen för data har nåtts. Trädet kanske inte visas på rätt sätt.","tr-TR":"Maksimum veri sınırına ulaşıldı. Ağaç grafik doğru görüntülenmeyebilir.","zh-CN":"已达到最大数据限制。树的显示可能不当。","zh-TW":"已達資料上限。樹狀目錄的顯示方式可能不正確。"}},Object_OrgChart_MissingRoot:{id:"Object.OrgChart.MissingRoot",locale:{"de-DE":"Kein Root-Knoten, prüfen Sie die Daten auf Zirkelbezüge.","en-US":"No root node, check data for circular references.","es-ES":"Sin nodo raíz, verifique los datos por si hay referencias circulares.","fr-FR":"Aucun nœud racine. Recherchez les références circulaires dans les données.","it-IT":"Impossibile utilizzare i nodi principali: verificare i riferimenti circolari.","ja-JP":"ルート ノードがありません。循環参照のデータを確認してください。","ko-KR":"루트 노드가 없습니다. 순환 참조에 대한 데이터를 확인하십시오.","nl-NL":"Geen hoofdknooppunt, controleer of de gegevens cirkelreferenties bevatten.","pl-PL":"Brak węzła głównego, sprawdź dane pod kątem odwołań cyklicznych.","pt-BR":"Nenhum nó raiz, verifique os dados para referências circulares.","ru-RU":"Нет корневых узлов, проверьте данные на предмет циклических ссылок.","sv-SE":"Ingen rotnod. Kontrollera om det finns cirkelreferenser i data.","tr-TR":"Kök düğümü yok, verileri döngüsel referanslar açısından kontrol edin.","zh-CN":"无根节点,请检查数据是否存在循环引用。","zh-TW":"沒有根節點,請檢查循環參照的資料。"}},Object_OrgChart_NavigationMode:{id:"Object.OrgChart.NavigationMode",locale:{"de-DE":"Präsentationsmodus","en-US":"Presentation mode","es-ES":"Modo presentación","fr-FR":"Mode présentation","it-IT":"Modalità presentazione","ja-JP":"プレゼンテーション モード","ko-KR":"프레젠테이션 모드","nl-NL":"Presentatiemodus","pl-PL":"Tryb prezentacji","pt-BR":"Modo de apresentação","ru-RU":"Режим представления","sv-SE":"Presentationsläge","tr-TR":"Sunum modu","zh-CN":"演示模式","zh-TW":"呈現模式"}},Object_OrgChart_SingleSelect:{id:"Object.OrgChart.SingleSelect",locale:{"de-DE":"Einzelnen Knoten auswählen","en-US":"Select single node","es-ES":"Seleccionar nodo único","fr-FR":"Sélectionner un seul nœud","it-IT":"Seleziona nodo singolo","ja-JP":"単一ノードを選択","ko-KR":"단일 노드 선택","nl-NL":"Enkel knooppunt selecteren","pl-PL":"Wybierz pojedynczy węzeł","pt-BR":"Selecionar nó único","ru-RU":"Выберите один узел","sv-SE":"Välj enskild nod","tr-TR":"Tek düğüm seç","zh-CN":"选择单个节点","zh-TW":"選取單一節點"}},Object_OrgChart_SubLabelExpression:{id:"Object.OrgChart.SubLabelExpression",locale:{"de-DE":"Untertitel der Karte","en-US":"Card sub-title","es-ES":"Subtítulo de tarjeta","fr-FR":"Sous-titre de la carte","it-IT":"Sottotitolo scheda","ja-JP":"カード サブタイトル","ko-KR":"카드 소제목","nl-NL":"Ondertitel kaart","pl-PL":"Podtytuł karty","pt-BR":"Subtítulo do cartão","ru-RU":"Подзаголовок карточки","sv-SE":"Kortets underrubrik","tr-TR":"Kart alt başlığı","zh-CN":"卡子标题","zh-TW":"卡片子標題"}},Object_OrgChart_TopBar:{id:"Object.OrgChart.TopBar",locale:{"de-DE":"Obere Leiste","en-US":"Top bar","es-ES":"Barra superior","fr-FR":"Barre supérieure","it-IT":"Barra superiore","ja-JP":"上部のバー","ko-KR":"상위 막대","nl-NL":"Bovenste balk","pl-PL":"Górny słupek","pt-BR":"Barra superior","ru-RU":"Верхняя полоса","sv-SE":"Övre fältet","tr-TR":"Üst çubuk","zh-CN":"顶部栏","zh-TW":"頂端列"}},Object_OrgChart_resizeOnExpand:{id:"Object.OrgChart.resizeOnExpand",locale:{"de-DE":"Beim Erweitern/Reduzieren Größe ändern","en-US":"Resize on expand/collapse","es-ES":"Cambiar el tamaño al expandir/contraer","fr-FR":"Redimensionner avec Développer/Réduire","it-IT":"Ridimensiona quando espandi/comprimi","ja-JP":"展開/折りたたみ時にサイズ変更","ko-KR":"확장/축소하여 크기 조정","nl-NL":"Formaat wijzigen bij uitvouwen/alles samenvouwen","pl-PL":"Zmień rozmiar przy rozwijaniu/zwijaniu","pt-BR":"Redimensionar em expandir/recolher","ru-RU":"Изменить размер при разворачивании/сворачивании","sv-SE":"Ändra storlek vid visa/dölj","tr-TR":"Genişletmede/daraltmada yeniden boyutlandır","zh-CN":"调整展开/折叠的大小","zh-TW":"調整展開/摺疊大小"}},Object_OrgChart_Card_TextColor:{id:"Object.OrgChart.Card.TextColor",locale:{"en-US":"Text Color"}},Object_OrgChart_Card_Title:{id:"Object.OrgChart.Card.Title",locale:{"en-US":"Title"}},Object_OrgChart_Card_Subtitle:{id:"Object.OrgChart.Card.Subtitle",locale:{"en-US":"Subtitle"}},Object_OrgChart_Card_Description:{id:"Object.OrgChart.Card.Description",locale:{"en-US":"Description"}},Object_OrgChart_Card_MeasureLabel:{id:"Object.OrgChart.Card.MeasureLabel",locale:{"en-US":"Measure label"}},Object_OrgChart_Card_MeasureValue:{id:"Object.OrgChart.Card.MeasureValue",locale:{"en-US":"Measure value"}},Object_OrgChart_Card_Contrast:{id:"Object.OrgChart.Card.Contrast",locale:{"en-US":"Auto contrast color"}}};function mt(e){if(e&&e.get&&e.add){const t="Object.OrgChart.MaxData";if(e.get(t)!==t)return;Object.keys(gt).forEach((t=>{e.add(gt[t])}))}}const bt={qHyperCubeDef:{qDimensions:[],qMeasures:[],qInitialDataFetch:[{qWidth:5,qHeight:500}],qSuppressZero:!1,qSuppressMissing:!0},showTitles:!0,title:"",subtitle:"",footnote:"",navigationMode:"free",resizeOnExpand:!1,style:{fontColor:{colorType:Xe.FONT_COLOR_TYPE,color:Xe.FONT_COLOR_DARK,colorExpression:""},backgroundColor:{colorType:Xe.BACKGROUND_COLOR_TYPE,color:Xe.BACKGROUND_COLOR,colorExpression:""},border:{top:Xe.BORDER_TOP,fullBorder:Xe.BORDER_FULL,colorType:Xe.BORDER_COLOR_TYPE,color:Xe.BORDER_COLOR,colorExpression:""}},components:[]};var vt={value:()=>{}};function yt(){for(var e,t=0,n=arguments.length,r={};t<n;++t){if(!(e=arguments[t]+"")||e in r||/[\s.]/.test(e))throw new Error("illegal type: "+e);r[e]=[]}return new xt(r)}function xt(e){this._=e}function wt(e,t){for(var n,r=0,o=e.length;r<o;++r)if((n=e[r]).name===t)return n.value}function _t(e,t,n){for(var r=0,o=e.length;r<o;++r)if(e[r].name===t){e[r]=vt,e=e.slice(0,r).concat(e.slice(r+1));break}return null!=n&&e.push({name:t,value:n}),e}xt.prototype=yt.prototype={constructor:xt,on:function(e,t){var n,r,o=this._,a=(r=o,(e+"").trim().split(/^|\s+/).map((function(e){var t="",n=e.indexOf(".");if(n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),e&&!r.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:t}}))),i=-1,l=a.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++i<l;)if(n=(e=a[i]).type)o[n]=_t(o[n],e.name,t);else if(null==t)for(n in o)o[n]=_t(o[n],e.name,null);return this}for(;++i<l;)if((n=(e=a[i]).type)&&(n=wt(o[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new xt(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,r,o=new Array(n),a=0;a<n;++a)o[a]=arguments[a+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=0,n=(r=this._[e]).length;a<n;++a)r[a].value.apply(t,o)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],o=0,a=r.length;o<a;++o)r[o].value.apply(t,n)}};var Ct="http://www.w3.org/1999/xhtml",Ot={svg:"http://www.w3.org/2000/svg",xhtml:Ct,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function kt(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),Ot.hasOwnProperty(t)?{space:Ot[t],local:e}:e}function Et(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Ct&&t.documentElement.namespaceURI===Ct?t.createElement(e):t.createElementNS(n,e)}}function St(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Lt(e){var t=kt(e);return(t.local?St:Et)(t)}function Rt(){}function Tt(e){return null==e?Rt:function(){return this.querySelector(e)}}function At(){return[]}function Nt(e){return null==e?At:function(){return this.querySelectorAll(e)}}function zt(e){return function(){return null==(t=e.apply(this,arguments))?[]:Array.isArray(t)?t:Array.from(t);var t}}function Mt(e){return function(){return this.matches(e)}}function jt(e){return function(t){return t.matches(e)}}var It=Array.prototype.find;function Dt(){return this.firstElementChild}var $t=Array.prototype.filter;function Bt(){return Array.from(this.children)}function Pt(e){return new Array(e.length)}function qt(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function Ft(e,t,n,r,o,a){for(var i,l=0,s=t.length,u=a.length;l<u;++l)(i=t[l])?(i.__data__=a[l],r[l]=i):n[l]=new qt(e,a[l]);for(;l<s;++l)(i=t[l])&&(o[l]=i)}function Vt(e,t,n,r,o,a,i){var l,s,u,c=new Map,d=t.length,h=a.length,p=new Array(d);for(l=0;l<d;++l)(s=t[l])&&(p[l]=u=i.call(s,s.__data__,l,t)+"",c.has(u)?o[l]=s:c.set(u,s));for(l=0;l<h;++l)u=i.call(e,a[l],l,a)+"",(s=c.get(u))?(r[l]=s,s.__data__=a[l],c.delete(u)):n[l]=new qt(e,a[l]);for(l=0;l<d;++l)(s=t[l])&&c.get(p[l])===s&&(o[l]=s)}function Ut(e){return e.__data__}function Ht(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function Kt(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Gt(e){return function(){this.removeAttribute(e)}}function Zt(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Yt(e,t){return function(){this.setAttribute(e,t)}}function Wt(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Xt(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function Jt(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function Qt(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function en(e){return function(){this.style.removeProperty(e)}}function tn(e,t,n){return function(){this.style.setProperty(e,t,n)}}function nn(e,t,n){return function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function rn(e,t){return e.style.getPropertyValue(t)||Qt(e).getComputedStyle(e,null).getPropertyValue(t)}function on(e){return function(){delete this[e]}}function an(e,t){return function(){this[e]=t}}function ln(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function sn(e){return e.trim().split(/^|\s+/)}function un(e){return e.classList||new cn(e)}function cn(e){this._node=e,this._names=sn(e.getAttribute("class")||"")}function dn(e,t){for(var n=un(e),r=-1,o=t.length;++r<o;)n.add(t[r])}function hn(e,t){for(var n=un(e),r=-1,o=t.length;++r<o;)n.remove(t[r])}function pn(e){return function(){dn(this,e)}}function fn(e){return function(){hn(this,e)}}function gn(e,t){return function(){(t.apply(this,arguments)?dn:hn)(this,e)}}function mn(){this.textContent=""}function bn(e){return function(){this.textContent=e}}function vn(e){return function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}}function yn(){this.innerHTML=""}function xn(e){return function(){this.innerHTML=e}}function wn(e){return function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}}function _n(){this.nextSibling&&this.parentNode.appendChild(this)}function Cn(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function On(){return null}function kn(){var e=this.parentNode;e&&e.removeChild(this)}function En(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Sn(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Ln(e){return function(){var t=this.__on;if(t){for(var n,r=0,o=-1,a=t.length;r<a;++r)n=t[r],e.type&&n.type!==e.type||n.name!==e.name?t[++o]=n:this.removeEventListener(n.type,n.listener,n.options);++o?t.length=o:delete this.__on}}}function Rn(e,t,n){return function(){var r,o=this.__on,a=function(e){return function(t){e.call(this,t,this.__data__)}}(t);if(o)for(var i=0,l=o.length;i<l;++i)if((r=o[i]).type===e.type&&r.name===e.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=a,r.options=n),void(r.value=t);this.addEventListener(e.type,a,n),r={type:e.type,name:e.name,value:t,listener:a,options:n},o?o.push(r):this.__on=[r]}}function Tn(e,t,n){var r=Qt(e),o=r.CustomEvent;"function"==typeof o?o=new o(t,n):(o=r.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function An(e,t){return function(){return Tn(this,e,t)}}function Nn(e,t){return function(){return Tn(this,e,t.apply(this,arguments))}}qt.prototype={constructor:qt,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}},cn.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};var zn=[null];function Mn(e,t){this._groups=e,this._parents=t}function jn(){return new Mn([[document.documentElement]],zn)}function In(e){return"string"==typeof e?new Mn([[document.querySelector(e)]],[document.documentElement]):new Mn([[e]],zn)}function Dn(e,t){if(e=function(e){let t;for(;t=e.sourceEvent;)e=t;return e}(e),void 0===t&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}Mn.prototype=jn.prototype={constructor:Mn,select:function(e){"function"!=typeof e&&(e=Tt(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var a,i,l=t[o],s=l.length,u=r[o]=new Array(s),c=0;c<s;++c)(a=l[c])&&(i=e.call(a,a.__data__,c,l))&&("__data__"in a&&(i.__data__=a.__data__),u[c]=i);return new Mn(r,this._parents)},selectAll:function(e){e="function"==typeof e?zt(e):Nt(e);for(var t=this._groups,n=t.length,r=[],o=[],a=0;a<n;++a)for(var i,l=t[a],s=l.length,u=0;u<s;++u)(i=l[u])&&(r.push(e.call(i,i.__data__,u,l)),o.push(i));return new Mn(r,o)},selectChild:function(e){return this.select(null==e?Dt:function(e){return function(){return It.call(this.children,e)}}("function"==typeof e?e:jt(e)))},selectChildren:function(e){return this.selectAll(null==e?Bt:function(e){return function(){return $t.call(this.children,e)}}("function"==typeof e?e:jt(e)))},filter:function(e){"function"!=typeof e&&(e=Mt(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var a,i=t[o],l=i.length,s=r[o]=[],u=0;u<l;++u)(a=i[u])&&e.call(a,a.__data__,u,i)&&s.push(a);return new Mn(r,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,Ut);var n,r=t?Vt:Ft,o=this._parents,a=this._groups;"function"!=typeof e&&(n=e,e=function(){return n});for(var i=a.length,l=new Array(i),s=new Array(i),u=new Array(i),c=0;c<i;++c){var d=o[c],h=a[c],p=h.length,f=Ht(e.call(d,d&&d.__data__,c,o)),g=f.length,m=s[c]=new Array(g),b=l[c]=new Array(g);r(d,h,m,b,u[c]=new Array(p),f,t);for(var v,y,x=0,w=0;x<g;++x)if(v=m[x]){for(x>=w&&(w=x+1);!(y=b[w])&&++w<g;);v._next=y||null}}return(l=new Mn(l,o))._enter=s,l._exit=u,l},enter:function(){return new Mn(this._enter||this._groups.map(Pt),this._parents)},exit:function(){return new Mn(this._exit||this._groups.map(Pt),this._parents)},join:function(e,t,n){var r=this.enter(),o=this,a=this.exit();return"function"==typeof e?(r=e(r))&&(r=r.selection()):r=r.append(e+""),null!=t&&(o=t(o))&&(o=o.selection()),null==n?a.remove():n(a),r&&o?r.merge(o).order():o},merge:function(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,o=n.length,a=r.length,i=Math.min(o,a),l=new Array(o),s=0;s<i;++s)for(var u,c=n[s],d=r[s],h=c.length,p=l[s]=new Array(h),f=0;f<h;++f)(u=c[f]||d[f])&&(p[f]=u);for(;s<o;++s)l[s]=n[s];return new Mn(l,this._parents)},selection:function(){return this},order:function(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r,o=e[t],a=o.length-1,i=o[a];--a>=0;)(r=o[a])&&(i&&4^r.compareDocumentPosition(i)&&i.parentNode.insertBefore(r,i),i=r);return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=Kt);for(var n=this._groups,r=n.length,o=new Array(r),a=0;a<r;++a){for(var i,l=n[a],s=l.length,u=o[a]=new Array(s),c=0;c<s;++c)(i=l[c])&&(u[c]=i);u.sort(t)}return new Mn(o,this._parents).order()},call:function(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,a=r.length;o<a;++o){var i=r[o];if(i)return i}return null},size:function(){let e=0;for(const t of this)++e;return e},empty:function(){return!this.node()},each:function(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var o,a=t[n],i=0,l=a.length;i<l;++i)(o=a[i])&&e.call(o,o.__data__,i,a);return this},attr:function(e,t){var n=kt(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==t?n.local?Zt:Gt:"function"==typeof t?n.local?Jt:Xt:n.local?Wt:Yt)(n,t))},style:function(e,t,n){return arguments.length>1?this.each((null==t?en:"function"==typeof t?nn:tn)(e,t,null==n?"":n)):rn(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?on:"function"==typeof t?ln:an)(e,t)):this.node()[e]},classed:function(e,t){var n=sn(e+"");if(arguments.length<2){for(var r=un(this.node()),o=-1,a=n.length;++o<a;)if(!r.contains(n[o]))return!1;return!0}return this.each(("function"==typeof t?gn:t?pn:fn)(n,t))},text:function(e){return arguments.length?this.each(null==e?mn:("function"==typeof e?vn:bn)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?yn:("function"==typeof e?wn:xn)(e)):this.node().innerHTML},raise:function(){return this.each(_n)},lower:function(){return this.each(Cn)},append:function(e){var t="function"==typeof e?e:Lt(e);return this.select((function(){return this.appendChild(t.apply(this,arguments))}))},insert:function(e,t){var n="function"==typeof e?e:Lt(e),r=null==t?On:"function"==typeof t?t:Tt(t);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(kn)},clone:function(e){return this.select(e?Sn:En)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,t,n){var r,o,a=function(e){return e.trim().split(/^|\s+/).map((function(e){var t="",n=e.indexOf(".");return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}}))}(e+""),i=a.length;if(!(arguments.length<2)){for(l=t?Rn:Ln,r=0;r<i;++r)this.each(l(a[r],t,n));return this}var l=this.node().__on;if(l)for(var s,u=0,c=l.length;u<c;++u)for(r=0,s=l[u];r<i;++r)if((o=a[r]).type===s.type&&o.name===s.name)return s.value},dispatch:function(e,t){return this.each(("function"==typeof t?Nn:An)(e,t))},[Symbol.iterator]:function*(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r,o=e[t],a=0,i=o.length;a<i;++a)(r=o[a])&&(yield r)}};const $n={capture:!0,passive:!1};function Bn(e){e.preventDefault(),e.stopImmediatePropagation()}function Pn(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function qn(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Fn(){}var Vn=.7,Un=1/Vn,Hn="\\s*([+-]?\\d+)\\s*",Kn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Gn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Zn=/^#([0-9a-f]{3,8})$/,Yn=new RegExp(`^rgb\\(${Hn},${Hn},${Hn}\\)$`),Wn=new RegExp(`^rgb\\(${Gn},${Gn},${Gn}\\)$`),Xn=new RegExp(`^rgba\\(${Hn},${Hn},${Hn},${Kn}\\)$`),Jn=new RegExp(`^rgba\\(${Gn},${Gn},${Gn},${Kn}\\)$`),Qn=new RegExp(`^hsl\\(${Kn},${Gn},${Gn}\\)$`),er=new RegExp(`^hsla\\(${Kn},${Gn},${Gn},${Kn}\\)$`),tr={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 nr(){return this.rgb().formatHex()}function rr(){return this.rgb().formatRgb()}function or(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Zn.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?ar(t):3===n?new sr(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?ir(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?ir(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Yn.exec(e))?new sr(t[1],t[2],t[3],1):(t=Wn.exec(e))?new sr(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Xn.exec(e))?ir(t[1],t[2],t[3],t[4]):(t=Jn.exec(e))?ir(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Qn.exec(e))?fr(t[1],t[2]/100,t[3]/100,1):(t=er.exec(e))?fr(t[1],t[2]/100,t[3]/100,t[4]):tr.hasOwnProperty(e)?ar(tr[e]):"transparent"===e?new sr(NaN,NaN,NaN,0):null}function ar(e){return new sr(e>>16&255,e>>8&255,255&e,1)}function ir(e,t,n,r){return r<=0&&(e=t=n=NaN),new sr(e,t,n,r)}function lr(e,t,n,r){return 1===arguments.length?((o=e)instanceof Fn||(o=or(o)),o?new sr((o=o.rgb()).r,o.g,o.b,o.opacity):new sr):new sr(e,t,n,null==r?1:r);var o}function sr(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function ur(){return`#${pr(this.r)}${pr(this.g)}${pr(this.b)}`}function cr(){const e=dr(this.opacity);return`${1===e?"rgb(":"rgba("}${hr(this.r)}, ${hr(this.g)}, ${hr(this.b)}${1===e?")":`, ${e})`}`}function dr(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function hr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function pr(e){return((e=hr(e))<16?"0":"")+e.toString(16)}function fr(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new mr(e,t,n,r)}function gr(e){if(e instanceof mr)return new mr(e.h,e.s,e.l,e.opacity);if(e instanceof Fn||(e=or(e)),!e)return new mr;if(e instanceof mr)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),a=Math.max(t,n,r),i=NaN,l=a-o,s=(a+o)/2;return l?(i=t===a?(n-r)/l+6*(n<r):n===a?(r-t)/l+2:(t-n)/l+4,l/=s<.5?a+o:2-a-o,i*=60):l=s>0&&s<1?0:i,new mr(i,l,s,e.opacity)}function mr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function br(e){return(e=(e||0)%360)<0?e+360:e}function vr(e){return Math.max(0,Math.min(1,e||0))}function yr(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Pn(Fn,or,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:nr,formatHex:nr,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return gr(this).formatHsl()},formatRgb:rr,toString:rr}),Pn(sr,lr,qn(Fn,{brighter(e){return e=null==e?Un:Math.pow(Un,e),new sr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?Vn:Math.pow(Vn,e),new sr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new sr(hr(this.r),hr(this.g),hr(this.b),dr(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:ur,formatHex:ur,formatHex8:function(){return`#${pr(this.r)}${pr(this.g)}${pr(this.b)}${pr(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:cr,toString:cr})),Pn(mr,(function(e,t,n,r){return 1===arguments.length?gr(e):new mr(e,t,n,null==r?1:r)}),qn(Fn,{brighter(e){return e=null==e?Un:Math.pow(Un,e),new mr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?Vn:Math.pow(Vn,e),new mr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new sr(yr(e>=240?e-240:e+120,o,r),yr(e,o,r),yr(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new mr(br(this.h),vr(this.s),vr(this.l),dr(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 e=dr(this.opacity);return`${1===e?"hsl(":"hsla("}${br(this.h)}, ${100*vr(this.s)}%, ${100*vr(this.l)}%${1===e?")":`, ${e})`}`}}));var xr=e=>()=>e;function wr(e){return 1==(e=+e)?_r:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):xr(isNaN(t)?n:t)}}function _r(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):xr(isNaN(e)?t:e)}var Cr=function e(t){var n=wr(t);function r(e,t){var r=n((e=lr(e)).r,(t=lr(t)).r),o=n(e.g,t.g),a=n(e.b,t.b),i=_r(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=a(t),e.opacity=i(t),e+""}}return r.gamma=e,r}(1);function Or(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var kr=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Er=new RegExp(kr.source,"g");function Sr(e,t){var n,r,o,a=kr.lastIndex=Er.lastIndex=0,i=-1,l=[],s=[];for(e+="",t+="";(n=kr.exec(e))&&(r=Er.exec(t));)(o=r.index)>a&&(o=t.slice(a,o),l[i]?l[i]+=o:l[++i]=o),(n=n[0])===(r=r[0])?l[i]?l[i]+=r:l[++i]=r:(l[++i]=null,s.push({i:i,x:Or(n,r)})),a=Er.lastIndex;return a<t.length&&(o=t.slice(a),l[i]?l[i]+=o:l[++i]=o),l.length<2?s[0]?function(e){return function(t){return e(t)+""}}(s[0].x):function(e){return function(){return e}}(t):(t=s.length,function(e){for(var n,r=0;r<t;++r)l[(n=s[r]).i]=n.x(e);return l.join("")})}var Lr,Rr=180/Math.PI,Tr={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ar(e,t,n,r,o,a){var i,l,s;return(i=Math.sqrt(e*e+t*t))&&(e/=i,t/=i),(s=e*n+t*r)&&(n-=e*s,r-=t*s),(l=Math.sqrt(n*n+r*r))&&(n/=l,r/=l,s/=l),e*r<t*n&&(e=-e,t=-t,s=-s,i=-i),{translateX:o,translateY:a,rotate:Math.atan2(t,e)*Rr,skewX:Math.atan(s)*Rr,scaleX:i,scaleY:l}}function Nr(e,t,n,r){function o(e){return e.length?e.pop()+" ":""}return function(a,i){var l=[],s=[];return a=e(a),i=e(i),function(e,r,o,a,i,l){if(e!==o||r!==a){var s=i.push("translate(",null,t,null,n);l.push({i:s-4,x:Or(e,o)},{i:s-2,x:Or(r,a)})}else(o||a)&&i.push("translate("+o+t+a+n)}(a.translateX,a.translateY,i.translateX,i.translateY,l,s),function(e,t,n,a){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),a.push({i:n.push(o(n)+"rotate(",null,r)-2,x:Or(e,t)})):t&&n.push(o(n)+"rotate("+t+r)}(a.rotate,i.rotate,l,s),function(e,t,n,a){e!==t?a.push({i:n.push(o(n)+"skewX(",null,r)-2,x:Or(e,t)}):t&&n.push(o(n)+"skewX("+t+r)}(a.skewX,i.skewX,l,s),function(e,t,n,r,a,i){if(e!==n||t!==r){var l=a.push(o(a)+"scale(",null,",",null,")");i.push({i:l-4,x:Or(e,n)},{i:l-2,x:Or(t,r)})}else 1===n&&1===r||a.push(o(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,i.scaleX,i.scaleY,l,s),a=i=null,function(e){for(var t,n=-1,r=s.length;++n<r;)l[(t=s[n]).i]=t.x(e);return l.join("")}}}var zr=Nr((function(e){const t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Tr:Ar(t.a,t.b,t.c,t.d,t.e,t.f)}),"px, ","px)","deg)"),Mr=Nr((function(e){return null==e?Tr:(Lr||(Lr=document.createElementNS("http://www.w3.org/2000/svg","g")),Lr.setAttribute("transform",e),(e=Lr.transform.baseVal.consolidate())?Ar((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):Tr)}),", ",")",")");function jr(e){return((e=Math.exp(e))+1/e)/2}var Ir,Dr,$r=function e(t,n,r){function o(e,o){var a,i,l=e[0],s=e[1],u=e[2],c=o[0],d=o[1],h=o[2],p=c-l,f=d-s,g=p*p+f*f;if(g<1e-12)i=Math.log(h/u)/t,a=function(e){return[l+e*p,s+e*f,u*Math.exp(t*e*i)]};else{var m=Math.sqrt(g),b=(h*h-u*u+r*g)/(2*u*n*m),v=(h*h-u*u-r*g)/(2*h*n*m),y=Math.log(Math.sqrt(b*b+1)-b),x=Math.log(Math.sqrt(v*v+1)-v);i=(x-y)/t,a=function(e){var r,o=e*i,a=jr(y),c=u/(n*m)*(a*(r=t*o+y,((r=Math.exp(2*r))-1)/(r+1))-function(e){return((e=Math.exp(e))-1/e)/2}(y));return[l+c*p,s+c*f,u*a/jr(t*o+y)]}}return a.duration=1e3*i*t/Math.SQRT2,a}return o.rho=function(t){var n=Math.max(.001,+t),r=n*n;return e(n,r,r*r)},o}(Math.SQRT2,2,4),Br=0,Pr=0,qr=0,Fr=0,Vr=0,Ur=0,Hr="object"==typeof performance&&performance.now?performance:Date,Kr="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Gr(){return Vr||(Kr(Zr),Vr=Hr.now()+Ur)}function Zr(){Vr=0}function Yr(){this._call=this._time=this._next=null}function Wr(e,t,n){var r=new Yr;return r.restart(e,t,n),r}function Xr(){Vr=(Fr=Hr.now())+Ur,Br=Pr=0;try{!function(){Gr(),++Br;for(var e,t=Ir;t;)(e=Vr-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Br}()}finally{Br=0,function(){var e,t,n=Ir,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:Ir=t);Dr=e,Qr(r)}(),Vr=0}}function Jr(){var e=Hr.now(),t=e-Fr;t>1e3&&(Ur-=t,Fr=e)}function Qr(e){Br||(Pr&&(Pr=clearTimeout(Pr)),e-Vr>24?(e<1/0&&(Pr=setTimeout(Xr,e-Hr.now()-Ur)),qr&&(qr=clearInterval(qr))):(qr||(Fr=Hr.now(),qr=setInterval(Jr,1e3)),Br=1,Kr(Xr)))}function eo(e,t,n){var r=new Yr;return t=null==t?0:+t,r.restart((n=>{r.stop(),e(n+t)}),t,n),r}Yr.prototype=Wr.prototype={constructor:Yr,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?Gr():+n)+(null==t?0:+t),this._next||Dr===this||(Dr?Dr._next=this:Ir=this,Dr=this),this._call=e,this._time=n,Qr()},stop:function(){this._call&&(this._call=null,this._time=1/0,Qr())}};var to=yt("start","end","cancel","interrupt"),no=[];function ro(e,t,n,r,o,a){var i=e.__transition;if(i){if(n in i)return}else e.__transition={};!function(e,t,n){var r,o=e.__transition;function a(e){n.state=1,n.timer.restart(i,n.delay,n.time),n.delay<=e&&i(e-n.delay)}function i(a){var u,c,d,h;if(1!==n.state)return s();for(u in o)if((h=o[u]).name===n.name){if(3===h.state)return eo(i);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete o[u]):+u<t&&(h.state=6,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete o[u])}if(eo((function(){3===n.state&&(n.state=4,n.timer.restart(l,n.delay,n.time),l(a))})),n.state=2,n.on.call("start",e,e.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(d=n.tween.length),u=0,c=-1;u<d;++u)(h=n.tween[u].value.call(e,e.__data__,n.index,n.group))&&(r[++c]=h);r.length=c+1}}function l(t){for(var o=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(s),n.state=5,1),a=-1,i=r.length;++a<i;)r[a].call(e,o);5===n.state&&(n.on.call("end",e,e.__data__,n.index,n.group),s())}function s(){for(var r in n.state=6,n.timer.stop(),delete o[t],o)return;delete e.__transition}o[t]=n,n.timer=Wr(a,0,n.time)}(e,n,{name:t,index:r,group:o,on:to,tween:no,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function oo(e,t){var n=io(e,t);if(n.state>0)throw new Error("too late; already scheduled");return n}function ao(e,t){var n=io(e,t);if(n.state>3)throw new Error("too late; already running");return n}function io(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function lo(e,t){var n,r,o,a=e.__transition,i=!0;if(a){for(o in t=null==t?null:t+"",a)(n=a[o]).name===t?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete a[o]):i=!1;i&&delete e.__transition}}function so(e,t){var n,r;return function(){var o=ao(this,e),a=o.tween;if(a!==n)for(var i=0,l=(r=n=a).length;i<l;++i)if(r[i].name===t){(r=r.slice()).splice(i,1);break}o.tween=r}}function uo(e,t,n){var r,o;if("function"!=typeof n)throw new Error;return function(){var a=ao(this,e),i=a.tween;if(i!==r){o=(r=i).slice();for(var l={name:t,value:n},s=0,u=o.length;s<u;++s)if(o[s].name===t){o[s]=l;break}s===u&&o.push(l)}a.tween=o}}function co(e,t,n){var r=e._id;return e.each((function(){var e=ao(this,r);(e.value||(e.value={}))[t]=n.apply(this,arguments)})),function(e){return io(e,r).value[t]}}function ho(e,t){var n;return("number"==typeof t?Or:t instanceof or?Cr:(n=or(t))?(t=n,Cr):Sr)(e,t)}function po(e){return function(){this.removeAttribute(e)}}function fo(e){return function(){this.removeAttributeNS(e.space,e.local)}}function go(e,t,n){var r,o,a=n+"";return function(){var i=this.getAttribute(e);return i===a?null:i===r?o:o=t(r=i,n)}}function mo(e,t,n){var r,o,a=n+"";return function(){var i=this.getAttributeNS(e.space,e.local);return i===a?null:i===r?o:o=t(r=i,n)}}function bo(e,t,n){var r,o,a;return function(){var i,l,s=n(this);if(null!=s)return(i=this.getAttribute(e))===(l=s+"")?null:i===r&&l===o?a:(o=l,a=t(r=i,s));this.removeAttribute(e)}}function vo(e,t,n){var r,o,a;return function(){var i,l,s=n(this);if(null!=s)return(i=this.getAttributeNS(e.space,e.local))===(l=s+"")?null:i===r&&l===o?a:(o=l,a=t(r=i,s));this.removeAttributeNS(e.space,e.local)}}function yo(e,t){var n,r;function o(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&function(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}(e,o)),n}return o._value=t,o}function xo(e,t){var n,r;function o(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&function(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}(e,o)),n}return o._value=t,o}function wo(e,t){return function(){oo(this,e).delay=+t.apply(this,arguments)}}function _o(e,t){return t=+t,function(){oo(this,e).delay=t}}function Co(e,t){return function(){ao(this,e).duration=+t.apply(this,arguments)}}function Oo(e,t){return t=+t,function(){ao(this,e).duration=t}}var ko=jn.prototype.constructor;function Eo(e){return function(){this.style.removeProperty(e)}}var So=0;function Lo(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Ro(){return++So}var To=jn.prototype;Lo.prototype={constructor:Lo,select:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=Tt(e));for(var r=this._groups,o=r.length,a=new Array(o),i=0;i<o;++i)for(var l,s,u=r[i],c=u.length,d=a[i]=new Array(c),h=0;h<c;++h)(l=u[h])&&(s=e.call(l,l.__data__,h,u))&&("__data__"in l&&(s.__data__=l.__data__),d[h]=s,ro(d[h],t,n,h,d,io(l,n)));return new Lo(a,this._parents,t,n)},selectAll:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=Nt(e));for(var r=this._groups,o=r.length,a=[],i=[],l=0;l<o;++l)for(var s,u=r[l],c=u.length,d=0;d<c;++d)if(s=u[d]){for(var h,p=e.call(s,s.__data__,d,u),f=io(s,n),g=0,m=p.length;g<m;++g)(h=p[g])&&ro(h,t,n,g,p,f);a.push(p),i.push(s)}return new Lo(a,i,t,n)},selectChild:To.selectChild,selectChildren:To.selectChildren,filter:function(e){"function"!=typeof e&&(e=Mt(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var a,i=t[o],l=i.length,s=r[o]=[],u=0;u<l;++u)(a=i[u])&&e.call(a,a.__data__,u,i)&&s.push(a);return new Lo(r,this._parents,this._name,this._id)},merge:function(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,o=n.length,a=Math.min(r,o),i=new Array(r),l=0;l<a;++l)for(var s,u=t[l],c=n[l],d=u.length,h=i[l]=new Array(d),p=0;p<d;++p)(s=u[p]||c[p])&&(h[p]=s);for(;l<r;++l)i[l]=t[l];return new Lo(i,this._parents,this._name,this._id)},selection:function(){return new ko(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,n=Ro(),r=this._groups,o=r.length,a=0;a<o;++a)for(var i,l=r[a],s=l.length,u=0;u<s;++u)if(i=l[u]){var c=io(i,t);ro(i,e,n,u,l,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Lo(r,this._parents,e,n)},call:To.call,nodes:To.nodes,node:To.node,size:To.size,empty:To.empty,each:To.each,on:function(e,t){var n=this._id;return arguments.length<2?io(this.node(),n).on.on(e):this.each(function(e,t,n){var r,o,a=function(e){return(e+"").trim().split(/^|\s+/).every((function(e){var t=e.indexOf(".");return t>=0&&(e=e.slice(0,t)),!e||"start"===e}))}(t)?oo:ao;return function(){var i=a(this,e),l=i.on;l!==r&&(o=(r=l).copy()).on(t,n),i.on=o}}(n,e,t))},attr:function(e,t){var n=kt(e),r="transform"===n?Mr:ho;return this.attrTween(e,"function"==typeof t?(n.local?vo:bo)(n,r,co(this,"attr."+e,t)):null==t?(n.local?fo:po)(n):(n.local?mo:go)(n,r,t))},attrTween:function(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;var r=kt(e);return this.tween(n,(r.local?yo:xo)(r,t))},style:function(e,t,n){var r="transform"==(e+="")?zr:ho;return null==t?this.styleTween(e,function(e,t){var n,r,o;return function(){var a=rn(this,e),i=(this.style.removeProperty(e),rn(this,e));return a===i?null:a===n&&i===r?o:o=t(n=a,r=i)}}(e,r)).on("end.style."+e,Eo(e)):"function"==typeof t?this.styleTween(e,function(e,t,n){var r,o,a;return function(){var i=rn(this,e),l=n(this),s=l+"";return null==l&&(this.style.removeProperty(e),s=l=rn(this,e)),i===s?null:i===r&&s===o?a:(o=s,a=t(r=i,l))}}(e,r,co(this,"style."+e,t))).each(function(e,t){var n,r,o,a,i="style."+t,l="end."+i;return function(){var s=ao(this,e),u=s.on,c=null==s.value[i]?a||(a=Eo(t)):void 0;u===n&&o===c||(r=(n=u).copy()).on(l,o=c),s.on=r}}(this._id,e)):this.styleTween(e,function(e,t,n){var r,o,a=n+"";return function(){var i=rn(this,e);return i===a?null:i===r?o:o=t(r=i,n)}}(e,r,t),n).on("end.style."+e,null)},styleTween:function(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==t)return this.tween(r,null);if("function"!=typeof t)throw new Error;return this.tween(r,function(e,t,n){var r,o;function a(){var a=t.apply(this,arguments);return a!==o&&(r=(o=a)&&function(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}(e,a,n)),r}return a._value=t,a}(e,t,null==n?"":n))},text:function(e){return this.tween("text","function"==typeof e?function(e){return function(){var t=e(this);this.textContent=null==t?"":t}}(co(this,"text",e)):function(e){return function(){this.textContent=e}}(null==e?"":e+""))},textTween:function(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(null==e)return this.tween(t,null);if("function"!=typeof e)throw new Error;return this.tween(t,function(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&function(e){return function(t){this.textContent=e.call(this,t)}}(r)),t}return r._value=e,r}(e))},remove:function(){return this.on("end.remove",function(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}(this._id))},tween:function(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r,o=io(this.node(),n).tween,a=0,i=o.length;a<i;++a)if((r=o[a]).name===e)return r.value;return null}return this.each((null==t?so:uo)(n,e,t))},delay:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?wo:_o)(t,e)):io(this.node(),t).delay},duration:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?Co:Oo)(t,e)):io(this.node(),t).duration},ease:function(e){var t=this._id;return arguments.length?this.each(function(e,t){if("function"!=typeof t)throw new Error;return function(){ao(this,e).ease=t}}(t,e)):io(this.node(),t).ease},easeVarying:function(e){if("function"!=typeof e)throw new Error;return this.each(function(e,t){return function(){var n=t.apply(this,arguments);if("function"!=typeof n)throw new Error;ao(this,e).ease=n}}(this._id,e))},end:function(){var e,t,n=this,r=n._id,o=n.size();return new Promise((function(a,i){var l={value:i},s={value:function(){0==--o&&a()}};n.each((function(){var n=ao(this,r),o=n.on;o!==e&&((t=(e=o).copy())._.cancel.push(l),t._.interrupt.push(l),t._.end.push(s)),n.on=t})),0===o&&a()}))},[Symbol.iterator]:To[Symbol.iterator]};var Ao={time:null,delay:0,duration:250,ease:function(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}};function No(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function zo(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function Mo(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=Io)):void 0===t&&(t=jo);for(var n,r,o,a,i,l=new Bo(e),s=[l];n=s.pop();)if((o=t(n.data))&&(i=(o=Array.from(o)).length))for(n.children=o,a=i-1;a>=0;--a)s.push(r=o[a]=new Bo(o[a])),r.parent=n,r.depth=n.depth+1;return l.eachBefore($o)}function jo(e){return e.children}function Io(e){return Array.isArray(e)?e[1]:null}function Do(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function $o(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function Bo(e){this.data=e,this.depth=this.height=0,this.parent=null}function Po(e,t){return e.parent===t.parent?1:2}function qo(e){var t=e.children;return t?t[0]:e.t}function Fo(e){var t=e.children;return t?t[t.length-1]:e.t}function Vo(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function Uo(e,t,n){return e.a.parent===t.parent?e.a:n}function Ho(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}function Ko(){var e=Po,t=1,n=1,r=null;function o(o){var s=function(e){for(var t,n,r,o,a,i=new Ho(e,0),l=[i];t=l.pop();)if(r=t._.children)for(t.children=new Array(a=r.length),o=a-1;o>=0;--o)l.push(n=t.children[o]=new Ho(r[o],o)),n.parent=t;return(i.parent=new Ho(null,0)).children=[i],i}(o);if(s.eachAfter(a),s.parent.m=-s.z,s.eachBefore(i),r)o.eachBefore(l);else{var u=o,c=o,d=o;o.eachBefore((function(e){e.x<u.x&&(u=e),e.x>c.x&&(c=e),e.depth>d.depth&&(d=e)}));var h=u===c?1:e(u,c)/2,p=h-u.x,f=t/(c.x+h+p),g=n/(d.depth||1);o.eachBefore((function(e){e.x=(e.x+p)*f,e.y=e.depth*g}))}return o}function a(t){var n=t.children,r=t.parent.children,o=t.i?r[t.i-1]:null;if(n){!function(e){for(var t,n=0,r=0,o=e.children,a=o.length;--a>=0;)(t=o[a]).z+=n,t.m+=n,n+=t.s+(r+=t.c)}(t);var a=(n[0].z+n[n.length-1].z)/2;o?(t.z=o.z+e(t._,o._),t.m=t.z-a):t.z=a}else o&&(t.z=o.z+e(t._,o._));t.parent.A=function(t,n,r){if(n){for(var o,a=t,i=t,l=n,s=a.parent.children[0],u=a.m,c=i.m,d=l.m,h=s.m;l=Fo(l),a=qo(a),l&&a;)s=qo(s),(i=Fo(i)).a=t,(o=l.z+d-a.z-u+e(l._,a._))>0&&(Vo(Uo(l,t,r),t,o),u+=o,c+=o),d+=l.m,u+=a.m,h+=s.m,c+=i.m;l&&!Fo(i)&&(i.t=l,i.m+=d-c),a&&!qo(s)&&(s.t=a,s.m+=u-h,r=t)}return r}(t,o,t.parent.A||r[0])}function i(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function l(e){e.x*=t,e.y=e.depth*n}return o.separation=function(t){return arguments.length?(e=t,o):e},o.size=function(e){return arguments.length?(r=!1,t=+e[0],n=+e[1],o):r?null:[t,n]},o.nodeSize=function(e){return arguments.length?(r=!0,t=+e[0],n=+e[1],o):r?[t,n]:null},o}jn.prototype.interrupt=function(e){return this.each((function(){lo(this,e)}))},jn.prototype.transition=function(e){var t,n;e instanceof Lo?(t=e._id,e=e._name):(t=Ro(),(n=Ao).time=Gr(),e=null==e?null:e+"");for(var r=this._groups,o=r.length,a=0;a<o;++a)for(var i,l=r[a],s=l.length,u=0;u<s;++u)(i=l[u])&&ro(i,e,t,u,l,n||No(i,t));return new Lo(r,this._parents,e,t)},Bo.prototype=Mo.prototype={constructor:Bo,count:function(){return this.eachAfter(zo)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,o,a=this,i=[a],l=[],s=-1;a=i.pop();)if(l.push(a),n=a.children)for(r=0,o=n.length;r<o;++r)i.push(n[r]);for(;a=l.pop();)e.call(t,a,++s,this);return this},eachBefore:function(e,t){for(var n,r,o=this,a=[o],i=-1;o=a.pop();)if(e.call(t,o,++i,this),n=o.children)for(r=n.length-1;r>=0;--r)a.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,o=r&&r.length;--o>=0;)n+=r[o].value;t.value=n}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),o=null;e=n.pop(),t=r.pop();for(;e===t;)o=e,e=n.pop(),t=r.pop();return o}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var o=r.length;e!==n;)r.splice(o,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return Mo(this).eachBefore(Do)},[Symbol.iterator]:function*(){var e,t,n,r,o=this,a=[o];do{for(e=a.reverse(),a=[];o=e.pop();)if(yield o,t=o.children)for(n=0,r=t.length;n<r;++n)a.push(t[n])}while(a.length)}},Ho.prototype=Object.create(Bo.prototype);var Go=e=>()=>e;function Zo(e,{sourceEvent:t,target:n,transform:r,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:o}})}function Yo(e,t,n){this.k=e,this.x=t,this.y=n}Yo.prototype={constructor:Yo,scale:function(e){return 1===e?this:new Yo(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new Yo(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Wo=new Yo(1,0,0);function Xo(e){e.stopImmediatePropagation()}function Jo(e){e.preventDefault(),e.stopImmediatePropagation()}function Qo(e){return!(e.ctrlKey&&"wheel"!==e.type||e.button)}function ea(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e).hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).x,e.y],[e.x+e.width,e.y+e.height]]:[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]:[[0,0],[e.clientWidth,e.clientHeight]]}function ta(){return this.__zoom||Wo}function na(e){return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function ra(){return navigator.maxTouchPoints||"ontouchstart"in this}function oa(e,t,n){var r=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],i=e.invertY(t[1][1])-n[1][1];return e.translate(o>r?(r+o)/2:Math.min(0,r)||Math.max(0,o),i>a?(a+i)/2:Math.min(0,a)||Math.max(0,i))}function aa(){var e,t,n,r=Qo,o=ea,a=oa,i=na,l=ra,s=[0,1/0],u=[[-1/0,-1/0],[1/0,1/0]],c=250,d=$r,h=yt("start","zoom","end"),p=0,f=10;function g(e){e.property("__zoom",ta).on("wheel.zoom",_,{passive:!1}).on("mousedown.zoom",C).on("dblclick.zoom",O).filter(l).on("touchstart.zoom",k).on("touchmove.zoom",E).on("touchend.zoom touchcancel.zoom",S).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(e,t){return(t=Math.max(s[0],Math.min(s[1],t)))===e.k?e:new Yo(t,e.x,e.y)}function b(e,t,n){var r=t[0]-n[0]*e.k,o=t[1]-n[1]*e.k;return r===e.x&&o===e.y?e:new Yo(e.k,r,o)}function v(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function y(e,t,n,r){e.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 e=this,a=arguments,i=x(e,a).event(r),l=o.apply(e,a),s=null==n?v(l):"function"==typeof n?n.apply(e,a):n,u=Math.max(l[1][0]-l[0][0],l[1][1]-l[0][1]),c=e.__zoom,h="function"==typeof t?t.apply(e,a):t,p=d(c.invert(s).concat(u/c.k),h.invert(s).concat(u/h.k));return function(e){if(1===e)e=h;else{var t=p(e),n=u/t[2];e=new Yo(n,s[0]-t[0]*n,s[1]-t[1]*n)}i.zoom(null,e)}}))}function x(e,t,n){return!n&&e.__zooming||new w(e,t)}function w(e,t){this.that=e,this.args=t,this.active=0,this.sourceEvent=null,this.extent=o.apply(e,t),this.taps=0}function _(e,...t){if(r.apply(this,arguments)){var n=x(this,t).event(e),o=this.__zoom,l=Math.max(s[0],Math.min(s[1],o.k*Math.pow(2,i.apply(this,arguments)))),c=Dn(e);if(n.wheel)n.mouse[0][0]===c[0]&&n.mouse[0][1]===c[1]||(n.mouse[1]=o.invert(n.mouse[0]=c)),clearTimeout(n.wheel);else{if(o.k===l)return;n.mouse=[c,o.invert(c)],lo(this),n.start()}Jo(e),n.wheel=setTimeout((function(){n.wheel=null,n.end()}),150),n.zoom("mouse",a(b(m(o,l),n.mouse[0],n.mouse[1]),n.extent,u))}}function C(e,...t){if(!n&&r.apply(this,arguments)){var o=e.currentTarget,i=x(this,t,!0).event(e),l=In(e.view).on("mousemove.zoom",(function(e){if(Jo(e),!i.moved){var t=e.clientX-c,n=e.clientY-d;i.moved=t*t+n*n>p}i.event(e).zoom("mouse",a(b(i.that.__zoom,i.mouse[0]=Dn(e,o),i.mouse[1]),i.extent,u))}),!0).on("mouseup.zoom",(function(e){l.on("mousemove.zoom mouseup.zoom",null),function(e,t){var n=e.document.documentElement,r=In(e).on("dragstart.drag",null);t&&(r.on("click.drag",Bn,$n),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}(e.view,i.moved),Jo(e),i.event(e).end()}),!0),s=Dn(e,o),c=e.clientX,d=e.clientY;!function(e){var t=e.document.documentElement,n=In(e).on("dragstart.drag",Bn,$n);"onselectstart"in t?n.on("selectstart.drag",Bn,$n):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}(e.view),Xo(e),i.mouse=[s,this.__zoom.invert(s)],lo(this),i.start()}}function O(e,...t){if(r.apply(this,arguments)){var n=this.__zoom,i=Dn(e.changedTouches?e.changedTouches[0]:e,this),l=n.invert(i),s=n.k*(e.shiftKey?.5:2),d=a(b(m(n,s),i,l),o.apply(this,t),u);Jo(e),c>0?In(this).transition().duration(c).call(y,d,i,e):In(this).call(g.transform,d,i,e)}}function k(n,...o){if(r.apply(this,arguments)){var a,i,l,s,u=n.touches,c=u.length,d=x(this,o,n.changedTouches.length===c).event(n);for(Xo(n),i=0;i<c;++i)s=[s=Dn(l=u[i],this),this.__zoom.invert(s),l.identifier],d.touch0?d.touch1||d.touch0[2]===s[2]||(d.touch1=s,d.taps=0):(d.touch0=s,a=!0,d.taps=1+!!e);e&&(e=clearTimeout(e)),a&&(d.taps<2&&(t=s[0],e=setTimeout((function(){e=null}),500)),lo(this),d.start())}}function E(e,...t){if(this.__zooming){var n,r,o,i,l=x(this,t).event(e),s=e.changedTouches,c=s.length;for(Jo(e),n=0;n<c;++n)o=Dn(r=s[n],this),l.touch0&&l.touch0[2]===r.identifier?l.touch0[0]=o:l.touch1&&l.touch1[2]===r.identifier&&(l.touch1[0]=o);if(r=l.that.__zoom,l.touch1){var d=l.touch0[0],h=l.touch0[1],p=l.touch1[0],f=l.touch1[1],g=(g=p[0]-d[0])*g+(g=p[1]-d[1])*g,v=(v=f[0]-h[0])*v+(v=f[1]-h[1])*v;r=m(r,Math.sqrt(g/v)),o=[(d[0]+p[0])/2,(d[1]+p[1])/2],i=[(h[0]+f[0])/2,(h[1]+f[1])/2]}else{if(!l.touch0)return;o=l.touch0[0],i=l.touch0[1]}l.zoom("touch",a(b(r,o,i),l.extent,u))}}function S(e,...r){if(this.__zooming){var o,a,i=x(this,r).event(e),l=e.changedTouches,s=l.length;for(Xo(e),n&&clearTimeout(n),n=setTimeout((function(){n=null}),500),o=0;o<s;++o)a=l[o],i.touch0&&i.touch0[2]===a.identifier?delete i.touch0:i.touch1&&i.touch1[2]===a.identifier&&delete i.touch1;if(i.touch1&&!i.touch0&&(i.touch0=i.touch1,delete i.touch1),i.touch0)i.touch0[1]=this.__zoom.invert(i.touch0[0]);else if(i.end(),2===i.taps&&(a=Dn(a,this),Math.hypot(t[0]-a[0],t[1]-a[1])<f)){var u=In(this).on("dblclick.zoom");u&&u.apply(this,arguments)}}}return g.transform=function(e,t,n,r){var o=e.selection?e.selection():e;o.property("__zoom",ta),e!==o?y(e,t,n,r):o.interrupt().each((function(){x(this,arguments).event(r).start().zoom(null,"function"==typeof t?t.apply(this,arguments):t).end()}))},g.scaleBy=function(e,t,n,r){g.scaleTo(e,(function(){return this.__zoom.k*("function"==typeof t?t.apply(this,arguments):t)}),n,r)},g.scaleTo=function(e,t,n,r){g.transform(e,(function(){var e=o.apply(this,arguments),r=this.__zoom,i=null==n?v(e):"function"==typeof n?n.apply(this,arguments):n,l=r.invert(i),s="function"==typeof t?t.apply(this,arguments):t;return a(b(m(r,s),i,l),e,u)}),n,r)},g.translateBy=function(e,t,n,r){g.transform(e,(function(){return a(this.__zoom.translate("function"==typeof t?t.apply(this,arguments):t,"function"==typeof n?n.apply(this,arguments):n),o.apply(this,arguments),u)}),null,r)},g.translateTo=function(e,t,n,r,i){g.transform(e,(function(){var e=o.apply(this,arguments),i=this.__zoom,l=null==r?v(e):"function"==typeof r?r.apply(this,arguments):r;return a(Wo.translate(l[0],l[1]).scale(i.k).translate("function"==typeof t?-t.apply(this,arguments):-t,"function"==typeof n?-n.apply(this,arguments):-n),e,u)}),r,i)},w.prototype={event:function(e){return e&&(this.sourceEvent=e),this},start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(e,t){return this.mouse&&"mouse"!==e&&(this.mouse[1]=t.invert(this.mouse[0])),this.touch0&&"touch"!==e&&(this.touch0[1]=t.invert(this.touch0[0])),this.touch1&&"touch"!==e&&(this.touch1[1]=t.invert(this.touch1[0])),this.that.__zoom=t,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(e){var t=In(this.that).datum();h.call(e,this.that,new Zo(e,{sourceEvent:this.sourceEvent,target:g,transform:this.that.__zoom,dispatch:h}),t)}},g.wheelDelta=function(e){return arguments.length?(i="function"==typeof e?e:Go(+e),g):i},g.filter=function(e){return arguments.length?(r="function"==typeof e?e:Go(!!e),g):r},g.touchable=function(e){return arguments.length?(l="function"==typeof e?e:Go(!!e),g):l},g.extent=function(e){return arguments.length?(o="function"==typeof e?e:Go([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),g):o},g.scaleExtent=function(e){return arguments.length?(s[0]=+e[0],s[1]=+e[1],g):[s[0],s[1]]},g.translateExtent=function(e){return arguments.length?(u[0][0]=+e[0][0],u[1][0]=+e[1][0],u[0][1]=+e[0][1],u[1][1]=+e[1][1],g):[[u[0][0],u[0][1]],[u[1][0],u[1][1]]]},g.constrain=function(e){return arguments.length?(a=e,g):a},g.duration=function(e){return arguments.length?(c=+e,g):c},g.interpolate=function(e){return arguments.length?(d=e,g):d},g.on=function(){var e=h.on.apply(h,arguments);return e===h?g:e},g.clickDistance=function(e){return arguments.length?(p=(e=+e)*e,g):Math.sqrt(p)},g.tapDistance=function(e){return arguments.length?(f=+e,g):f},g}Yo.prototype;const ia={cardWidth:152,cardHeight:64,cardHeightLarge:208,widthMargin:32,heightMargin:56,buttonMargin:16,leafMargin:16,cardPadding:8,buttonWidth:48,buttonHeight:24,rootDiameter:20,r:4,tooltipPadding:15,maxZoom:6,minZoom:.2},la={aliceblue:{r:240,g:248,b:255},antiquewhite:{r:250,g:235,b:215},aqua:{r:0,g:255,b:255},aquamarine:{r:127,g:255,b:212},azure:{r:240,g:255,b:255},beige:{r:245,g:245,b:220},bisque:{r:255,g:228,b:196},black:{r:0,g:0,b:0},blanchedalmond:{r:255,g:235,b:205},blue:{r:0,g:0,b:255},blueviolet:{r:138,g:43,b:226},brown:{r:165,g:42,b:42},burlywood:{r:222,g:184,b:135},cadetblue:{r:95,g:158,b:160},chartreuse:{r:127,g:255,b:0},chocolate:{r:210,g:105,b:30},coral:{r:255,g:127,b:80},cornflowerblue:{r:100,g:149,b:237},cornsilk:{r:255,g:248,b:220},crimson:{r:220,g:20,b:60},cyan:{r:0,g:255,b:255},darkblue:{r:0,g:0,b:139},darkcyan:{r:0,g:139,b:139},darkgoldenrod:{r:184,g:134,b:11},darkgray:{r:169,g:169,b:169},darkgreen:{r:0,g:100,b:0},darkgrey:{r:169,g:169,b:169},darkkhaki:{r:189,g:183,b:107},darkmagenta:{r:139,g:0,b:139},darkolivegreen:{r:85,g:107,b:47},darkorange:{r:255,g:140,b:0},darkorchid:{r:153,g:50,b:204},darkred:{r:139,g:0,b:0},darksalmon:{r:233,g:150,b:122},darkseagreen:{r:143,g:188,b:143},darkslateblue:{r:72,g:61,b:139},darkslategray:{r:47,g:79,b:79},darkslategrey:{r:47,g:79,b:79},darkturquoise:{r:0,g:206,b:209},darkviolet:{r:148,g:0,b:211},deeppink:{r:255,g:20,b:147},deepskyblue:{r:0,g:191,b:255},dimgray:{r:105,g:105,b:105},dimgrey:{r:105,g:105,b:105},dodgerblue:{r:30,g:144,b:255},firebrick:{r:178,g:34,b:34},floralwhite:{r:255,g:250,b:240},forestgreen:{r:34,g:139,b:34},fuchsia:{r:255,g:0,b:255},gainsboro:{r:220,g:220,b:220},ghostwhite:{r:248,g:248,b:255},gold:{r:255,g:215,b:0},goldenrod:{r:218,g:165,b:32},gray:{r:128,g:128,b:128},green:{r:0,g:128,b:0},greenyellow:{r:173,g:255,b:47},grey:{r:128,g:128,b:128},honeydew:{r:240,g:255,b:240},hotpink:{r:255,g:105,b:180},indianred:{r:205,g:92,b:92},indigo:{r:75,g:0,b:130},ivory:{r:255,g:255,b:240},khaki:{r:240,g:230,b:140},lavender:{r:230,g:230,b:250},lavenderblush:{r:255,g:240,b:245},lawngreen:{r:124,g:252,b:0},lemonchiffon:{r:255,g:250,b:205},lightblue:{r:173,g:216,b:230},lightcoral:{r:240,g:128,b:128},lightcyan:{r:224,g:255,b:255},lightgoldenrodyellow:{r:250,g:250,b:210},lightgray:{r:211,g:211,b:211},lightgreen:{r:144,g:238,b:144},lightgrey:{r:211,g:211,b:211},lightpink:{r:255,g:182,b:193},lightsalmon:{r:255,g:160,b:122},lightseagreen:{r:32,g:178,b:170},lightskyblue:{r:135,g:206,b:250},lightslategray:{r:119,g:136,b:153},lightslategrey:{r:119,g:136,b:153},lightsteelblue:{r:176,g:196,b:222},lightyellow:{r:255,g:255,b:224},lime:{r:0,g:255,b:0},limegreen:{r:50,g:205,b:50},linen:{r:250,g:240,b:230},magenta:{r:255,g:0,b:255},maroon:{r:128,g:0,b:0},mediumaquamarine:{r:102,g:205,b:170},mediumblue:{r:0,g:0,b:205},mediumorchid:{r:186,g:85,b:211},mediumpurple:{r:147,g:112,b:219},mediumseagreen:{r:60,g:179,b:113},mediumslateblue:{r:123,g:104,b:238},mediumspringgreen:{r:0,g:250,b:154},mediumturquoise:{r:72,g:209,b:204},mediumvioletred:{r:199,g:21,b:133},midnightblue:{r:25,g:25,b:112},mintcream:{r:245,g:255,b:250},mistyrose:{r:255,g:228,b:225},moccasin:{r:255,g:228,b:181},navajowhite:{r:255,g:222,b:173},navy:{r:0,g:0,b:128},oldlace:{r:253,g:245,b:230},olive:{r:128,g:128,b:0},olivedrab:{r:107,g:142,b:35},orange:{r:255,g:165,b:0},orangered:{r:255,g:69,b:0},orchid:{r:218,g:112,b:214},palegoldenrod:{r:238,g:232,b:170},palegreen:{r:152,g:251,b:152},paleturquoise:{r:175,g:238,b:238},palevioletred:{r:219,g:112,b:147},papayawhip:{r:255,g:239,b:213},peachpuff:{r:255,g:218,b:185},peru:{r:205,g:133,b:63},pink:{r:255,g:192,b:203},plum:{r:221,g:160,b:221},powderblue:{r:176,g:224,b:230},purple:{r:128,g:0,b:128},rebeccapurple:{r:102,g:51,b:153},red:{r:255,g:0,b:0},rosybrown:{r:188,g:143,b:143},royalblue:{r:65,g:105,b:225},saddlebrown:{r:139,g:69,b:19},salmon:{r:250,g:128,b:114},sandybrown:{r:244,g:164,b:96},seagreen:{r:46,g:139,b:87},seashell:{r:255,g:245,b:238},sienna:{r:160,g:82,b:45},silver:{r:192,g:192,b:192},skyblue:{r:135,g:206,b:235},slateblue:{r:106,g:90,b:205},slategray:{r:112,g:128,b:144},slategrey:{r:112,g:128,b:144},snow:{r:255,g:250,b:250},springgreen:{r:0,g:255,b:127},steelblue:{r:70,g:130,b:180},tan:{r:210,g:180,b:140},teal:{r:0,g:128,b:128},thistle:{r:216,g:191,b:216},tomato:{r:255,g:99,b:71},transparent:{r:255,g:255,b:255,a:0},turquoise:{r:64,g:224,b:208},violet:{r:238,g:130,b:238},wheat:{r:245,g:222,b:179},white:{r:255,g:255,b:255},whitesmoke:{r:245,g:245,b:245},yellow:{r:255,g:255,b:0},yellowgreen:{r:154,g:205,b:50}},sa={resolveExpression:e=>{let t=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e);if(t)return`rgb(${t[1]},${t[2]},${t[3]})`;if(t=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(e),t)return`rgba(${t[1]},${t[2]},${t[3]},${t[4]})`;if(t=/^argb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e),t){const e=Math.round(t[1]/2.55)/100;return`rgba(${t[2]},${t[3]},${t[4]},${e})`}if(t=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i.exec(e),t)return e;const n=e&&la[e.toLowerCase()];if(n){const e=void 0!==n.a?n.a:1;return`rgba(${n.r},${n.g},${n.b},${e})`}return"none"},getDarkColor(e){const t=.5;let n,r,o,a;if(e.length>7){n=e.split(",");const i=-1!==n[0].indexOf("a");return r=i?parseInt(n[0].slice(5),10):parseInt(n[0].slice(4),10),a=parseInt(n[1],10),o=parseInt(n[2],10),`${(i?"rgba(":"rgb(")+(Math.round((0-r)*t)+r)},${Math.round((0-a)*t)+a},${Math.round((0-o)*t)+o}${i?`,${n[3]}`:")"}`}return n=parseInt(e.slice(1),16),r=n>>16,a=n>>8&255,o=255&n,`#${(16777216+65536*(Math.round((0-r)*t)+r)+256*(Math.round((0-a)*t)+a)+(Math.round((0-o)*t)+o)).toString(16).slice(1)}`},isDarkColor(e){let t,n,r,o;return(o=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e))||(o=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(e))?(t=parseInt(o[1],10),n=parseInt(o[2],10),r=parseInt(o[3],10)):(o=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i.exec(e))&&(t=parseInt(o[1],16),n=parseInt(o[2],16),r=parseInt(o[3],16)),.299*t+.587*n+.114*r<125}};function ua(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ca(e,t,n){return t=fa(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ma()?Reflect.construct(t,n||[],fa(e).constructor):t.apply(e,n))}function da(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ha(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ya(r.key),r)}}function pa(e,t,n){return t&&ha(e.prototype,t),n&&ha(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function fa(e){return fa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},fa(e)}function ga(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ba(e,t)}function ma(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ma=function(){return!!e})()}function ba(e,t){return ba=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ba(e,t)}function va(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],s=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t);else for(;!(s=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){u=!0,o=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ua(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ua(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ya(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}function xa(e){return xa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xa(e)}var wa={fromSearchString:function(e){if(!e)return[];"?"===e[0]&&(e=e.substr(1));var t=[];return e.split("&").forEach((function(e){if(e){var n,r=e.indexOf("="),o="",a=!1;-1===r?n=e:(n=e.slice(0,r),o=e.slice(r+1),a=!0),t.push(function(e,t,n){return{key:_a(e),value:_a(t),useEqualSign:n}}(n,o,a))}})),t}};function _a(e){try{return decodeURIComponent(e)}catch(t){return e}}function Ca(e){if(!(this instanceof Ca))throw new Error("Url needs to be called with the new keyword");if(!e)throw new Error("Url needs a string to operate on");var t=function(e){var t={authorityAndPath:"",search:"",hash:""},n=e.indexOf("#");-1!==n&&(t.hash=e.substr(n),e=e.substr(0,n));n=e.indexOf("?"),-1!==n&&(t.search=e.substr(n),e=e.substr(0,n));return t.authorityAndPath=e,t}(e);Object.defineProperties(this,{authorityAndPath:{value:t.authorityAndPath},search:{value:t.search},hash:{value:t.hash},searchParams:{get:function(){return wa.fromSearchString(t.search)}}})}function Oa(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";")}Ca.encodeAuthorityAndPath=function(e){return encodeURI(e).replace(/%5B/gi,"[").replace(/%5D/gi,"]").replace(/%25/gi,"%")},Ca.encodeSearchParams=function(e){for(var t,n="",r=0;r<e.length;r++)n+=0===r?"?":"&",n+=Oa((t=e[r]).key),t.value?n+="=".concat(Oa(t.value)):n+=t.useEqualSign?"=":"";return n};var ka,Ea=function(){return pa((function e(t){da(this,e),this._input=t,this._pushback=null,this._temp=null,this._index=0,this._mark=0}),[{key:"_hasNext",value:function(){return null!=this._input&&(0!==this._input.length&&this._index<this._input.length)}},{key:"pushback",value:function(e){this._pushback=e}},{key:"index",value:function(){return this._index}},{key:"hasNext",value:function(){return null!=this._pushback||this._hasNext()}},{key:"next",value:function(){if(null!=this._pushback){var e=this._pushback;return this._pushback=null,e}return this._hasNext()?this._input.charAt(this._index++):null}},{key:"nextHex",value:function(){var e=this.next();return null==e?null:e.match(/[0-9A-Fa-f]/)?e:null}},{key:"peek",value:function(e){return e?!(!this._pushback||this._pushback!==e)||!!this._hasNext()&&this._input.charAt(this._index)===e:this._pushback?this._pushback:this._hasNext()?this._input.charAt(this._index):null}},{key:"mark",value:function(){this._temp=this._pushback,this._mark=this._index}},{key:"reset",value:function(){this._pushback=this._temp,this._index=this._mark}},{key:"remainder",value:function(){var e=this._input.substr(this._index);return null!=this._pushback&&(e=this._pushback+e),e}}])}(),Sa=function(){return pa((function e(){da(this,e)}),[{key:"decode",value:function(e){for(var t,n="",r=new Ea(e);r.hasNext();)n+=null!=(t=this.decodeCharacter(r))?t:r.next();return n}},{key:"decodeCharacter",value:function(e){return e.next()}}])}(),La=function(e){return e>=0&&e<=1114111},Ra=function(e){return e.match(/[\s]/)},Ta=function(){function e(){return da(this,e),ca(this,e,arguments)}return ga(e,Sa),pa(e,[{key:"decodeCharacter",value:function(e){e.mark();var t,n,r,o=e.next();if(null==o||"\\"!==o)return e.reset(),null;var a=e.next();if(null==a)return e.reset(),null;switch(a){case"\r":e.peek("\n")&&e.next();case"\n":case"\f":case"\0":return this.decodeCharacter(e)}if("NaN"===parseInt(a,16))return a;for(t=a,n=0;n<5&&(null!=(r=e.next())&&!Ra(r));n++){if("NaN"===parseInt(r,16)){e.pushback(r);break}t+=r}var i=parseInt(t,16);return La(i)?String.fromCharCode(i):"�"}}])}(),Aa=function(){function e(t,n){da(this,e),this._key=t,this._value=n}return pa(e,[{key:"getKey",value:function(){return this._key}},{key:"getValue",value:function(){return this._value}},{key:"equals",value:function(t){return t instanceof e&&(this._key===t._key&&this._value===t._value)}}],[{key:"newInstanceIfNeeded",value:function(){var t,n,r=arguments[0];return"string"==typeof arguments[1]?(t=arguments[1],n=r.length):(n=arguments[1],t=arguments[2]),t&&r?(r.length>n&&(r=r.substr(0,n)),new e(r,t)):null}}])}(),Na=function(){function e(){da(this,e)}return pa(e,[{key:"setValue",value:function(e){this._nextMap=null,this._value=e}},{key:"getNextNode",value:function(e){return this._nextMap?this._nextMap[e]:null}},{key:"put",value:function(t,n,r){var o,a;if(t.length===n)return a=this._value,this.setValue(r),a;var i=t.charAt(n);return this._nextMap?(o=this._nextMap[i])||(o=new e,this._nextMap[i]=o):(this._nextMap={},o=new e,this._nextMap[i]=o),o.put(t,n+1,r)}},{key:"get",value:function(e,t){if(e.length<=t)return this._value;var n=this.getNextNode(e.charAt(t));return n?n.get(e,t+1):null}},{key:"getLongestMatch",value:function(e,t){if(e.length<=t)return Aa.newInstanceIfNeeded(e,this._value);var n=this.getNextNode(e.charAt(t));if(!n)return Aa.newInstanceIfNeeded(e,t,this._value);var r=n.getLongestMatch(e,t+1);return r||Aa.newInstanceIfNeeded(e,t,this._value)}}])}(),za=function(){return pa((function e(){da(this,e),this.clear()}),[{key:"getLongestMatch",value:function(e){return this.root&&e?this.root.getLongestMatch(e,0):null}},{key:"getMaxKeyLength",value:function(){return this.maxKeyLen}},{key:"clear",value:function(){this.root=null,this.maxKeyLen=0,this.size=0}},{key:"put",value:function(e,t){this.root||(this.root=new Na);var n=this.root.put(e,0,t);return n||(e.length>this.maxKeyLen&&(this.maxKeyLen=e.length),this.size++,null)}}])}(),Ma=function(){var e,t,n,r=[],o=[],a=new za;for(e in r["&quot"]="34",r["&amp"]="38",r["&lt"]="60",r["&gt"]="62",r["&nbsp"]="160",r["&iexcl"]="161",r["&cent"]="162",r["&pound"]="163",r["&curren"]="164",r["&yen"]="165",r["&brvbar"]="166",r["&sect"]="167",r["&uml"]="168",r["&copy"]="169",r["&ordf"]="170",r["&laquo"]="171",r["&not"]="172",r["&shy"]="173",r["&reg"]="174",r["&macr"]="175",r["&deg"]="176",r["&plusmn"]="177",r["&sup2"]="178",r["&sup3"]="179",r["&acute"]="180",r["&micro"]="181",r["&para"]="182",r["&middot"]="183",r["&cedil"]="184",r["&sup1"]="185",r["&ordm"]="186",r["&raquo"]="187",r["&frac14"]="188",r["&frac12"]="189",r["&frac34"]="190",r["&iquest"]="191",r["&Agrave"]="192",r["&Aacute"]="193",r["&Acirc"]="194",r["&Atilde"]="195",r["&Auml"]="196",r["&Aring"]="197",r["&AElig"]="198",r["&Ccedil"]="199",r["&Egrave"]="200",r["&Eacute"]="201",r["&Ecirc"]="202",r["&Euml"]="203",r["&Igrave"]="204",r["&Iacute"]="205",r["&Icirc"]="206",r["&Iuml"]="207",r["&ETH"]="208",r["&Ntilde"]="209",r["&Ograve"]="210",r["&Oacute"]="211",r["&Ocirc"]="212",r["&Otilde"]="213",r["&Ouml"]="214",r["&times"]="215",r["&Oslash"]="216",r["&Ugrave"]="217",r["&Uacute"]="218",r["&Ucirc"]="219",r["&Uuml"]="220",r["&Yacute"]="221",r["&THORN"]="222",r["&szlig"]="223",r["&agrave"]="224",r["&aacute"]="225",r["&acirc"]="226",r["&atilde"]="227",r["&auml"]="228",r["&aring"]="229",r["&aelig"]="230",r["&ccedil"]="231",r["&egrave"]="232",r["&eacute"]="233",r["&ecirc"]="234",r["&euml"]="235",r["&igrave"]="236",r["&iacute"]="237",r["&icirc"]="238",r["&iuml"]="239",r["&eth"]="240",r["&ntilde"]="241",r["&ograve"]="242",r["&oacute"]="243",r["&ocirc"]="244",r["&otilde"]="245",r["&ouml"]="246",r["&divide"]="247",r["&oslash"]="248",r["&ugrave"]="249",r["&uacute"]="250",r["&ucirc"]="251",r["&uuml"]="252",r["&yacute"]="253",r["&thorn"]="254",r["&yuml"]="255",r["&OElig"]="338",r["&oelig"]="339",r["&Scaron"]="352",r["&scaron"]="353",r["&Yuml"]="376",r["&fnof"]="402",r["&circ"]="710",r["&tilde"]="732",r["&Alpha"]="913",r["&Beta"]="914",r["&Gamma"]="915",r["&Delta"]="916",r["&Epsilon"]="917",r["&Zeta"]="918",r["&Eta"]="919",r["&Theta"]="920",r["&Iota"]="921",r["&Kappa"]="922",r["&Lambda"]="923",r["&Mu"]="924",r["&Nu"]="925",r["&Xi"]="926",r["&Omicron"]="927",r["&Pi"]="928",r["&Rho"]="929",r["&Sigma"]="931",r["&Tau"]="932",r["&Upsilon"]="933",r["&Phi"]="934",r["&Chi"]="935",r["&Psi"]="936",r["&Omega"]="937",r["&alpha"]="945",r["&beta"]="946",r["&gamma"]="947",r["&delta"]="948",r["&epsilon"]="949",r["&zeta"]="950",r["&eta"]="951",r["&theta"]="952",r["&iota"]="953",r["&kappa"]="954",r["&lambda"]="955",r["&mu"]="956",r["&nu"]="957",r["&xi"]="958",r["&omicron"]="959",r["&pi"]="960",r["&rho"]="961",r["&sigmaf"]="962",r["&sigma"]="963",r["&tau"]="964",r["&upsilon"]="965",r["&phi"]="966",r["&chi"]="967",r["&psi"]="968",r["&omega"]="969",r["&thetasym"]="977",r["&upsih"]="978",r["&piv"]="982",r["&ensp"]="8194",r["&emsp"]="8195",r["&thinsp"]="8201",r["&zwnj"]="8204",r["&zwj"]="8205",r["&lrm"]="8206",r["&rlm"]="8207",r["&ndash"]="8211",r["&mdash"]="8212",r["&lsquo"]="8216",r["&rsquo"]="8217",r["&sbquo"]="8218",r["&ldquo"]="8220",r["&rdquo"]="8221",r["&bdquo"]="8222",r["&dagger"]="8224",r["&Dagger"]="8225",r["&bull"]="8226",r["&hellip"]="8230",r["&permil"]="8240",r["&prime"]="8242",r["&Prime"]="8243",r["&lsaquo"]="8249",r["&rsaquo"]="8250",r["&oline"]="8254",r["&frasl"]="8260",r["&euro"]="8364",r["&image"]="8365",r["&weierp"]="8472",r["&real"]="8476",r["&trade"]="8482",r["&alefsym"]="8501",r["&larr"]="8592",r["&uarr"]="8593",r["&rarr"]="8594",r["&darr"]="8595",r["&harr"]="8596",r["&crarr"]="8629",r["&lArr"]="8656",r["&uArr"]="8657",r["&rArr"]="8658",r["&dArr"]="8659",r["&hArr"]="8660",r["&forall"]="8704",r["&part"]="8706",r["&exist"]="8707",r["&empty"]="8709",r["&nabla"]="8711",r["&isin"]="8712",r["&notin"]="8713",r["&ni"]="8715",r["&prod"]="8719",r["&sum"]="8721",r["&minus"]="8722",r["&lowast"]="8727",r["&radic"]="8730",r["&prop"]="8733",r["&infin"]="8734",r["&ang"]="8736",r["&and"]="8743",r["&or"]="8744",r["&cap"]="8745",r["&cup"]="8746",r["&int"]="8747",r["&there4"]="8756",r["&sim"]="8764",r["&cong"]="8773",r["&asymp"]="8776",r["&ne"]="8800",r["&equiv"]="8801",r["&le"]="8804",r["&ge"]="8805",r["&sub"]="8834",r["&sup"]="8835",r["&nsub"]="8836",r["&sube"]="8838",r["&supe"]="8839",r["&oplus"]="8853",r["&otimes"]="8855",r["&perp"]="8869",r["&sdot"]="8901",r["&lceil"]="8968",r["&rceil"]="8969",r["&lfloor"]="8970",r["&rfloor"]="8971",r["&lang"]="9001",r["&rang"]="9002",r["&loz"]="9674",r["&spades"]="9824",r["&clubs"]="9827",r["&hearts"]="9829",r["&diams"]="9830",r)"function"!=typeof r[e]&&r.hasOwnProperty(e)&&(o[r[e]]=e);for(t in o)"function"!=typeof o[t]&&o.hasOwnProperty(t)&&(n=o[t].toLowerCase().substr(1),a.put(n,String.fromCharCode(t)));return a}(),ja=function(){function e(){return da(this,e),ca(this,e,arguments)}return ga(e,Sa),pa(e,[{key:"decodeCharacter",value:function(e){var t;e.mark();var n=e.next();if(null==n||"&"!==n)return e.reset(),null;var r=e.next();if(null==r)return e.reset(),null;if("#"===r){if(null!=(t=this._getNumericEntity(e)))return t}else if(r.match(/[A-Za-z]/)&&(e.pushback(r),null!=(t=this._getNamedEntity(e))))return t;return e.reset(),null}},{key:"_getNamedEntity",value:function(e){var t,n,r,o="";for(t=Math.min(e.remainder().length,Ma.getMaxKeyLength()),r=0;r<t;r++)o+=e.next().toLowerCase();var a=Ma.getLongestMatch(o);if(null==a)return null;for(e.reset(),e.next(),t=a.getKey().length,n=0;n<t;n++)e.next();return e.peek(";")&&e.next(),a.getValue()}},{key:"_getNumericEntity",value:function(e){var t=e.peek();return null==t?null:"x"===t||"X"===t?(e.next(),this._parseHex(e)):this._parseNumber(e)}},{key:"_parseHex",value:function(e){for(var t,n="";e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,16))){if(";"===t){e.next();break}break}n+=t,e.next()}var r=parseInt(n,16);return!Number.isNaN(+r)&&La(r)?String.fromCharCode(r):null}},{key:"_parseNumber",value:function(e){for(var t,n="";e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,10))){if(";"===t){e.next();break}break}n+=t,e.next()}var r=parseInt(n,10);return!Number.isNaN(+r)&&La(r)?String.fromCharCode(r):null}}])}(),Ia=function(){function e(){return da(this,e),ca(this,e,arguments)}return ga(e,Sa),pa(e,[{key:"decodeCharacter",value:function(e){e.mark();var t,n,r,o,a=e.next();if(null==a)return e.reset(),null;if("%"!==a)return e.reset(),null;for(t="",n=0;n<2;n++)null!=(r=e.nextHex())&&(t+=r);return 2===t.length&&(o=parseInt(t,16),La(o))?String.fromCharCode(o):(e.reset(),null)}}])}(),Da=/^data:(?<!\s)\s*(image\/[\w+-.]+)(?<!\s)\s*(;.*?){0,1}(?<!\s)\s*,(.*)/i;"undefined"!=typeof document&&(ka=document.createElement("div"));var $a=Array.prototype.indexOf,Ba=[",",".","_"," "],Pa=[",",".","-","_"," "],qa={width:["%"],height:["%"]},Fa={default:["-"," ","%"],color:["#"," ","(",")"],image:["(",")",":","/","?","&","-",".",'"',"="," "]},Va={background:["(",")",":","%","/","?","&","-"," ",".",'"',"=","#"],"background-image":Fa.image,"background-color":Fa.color,"border-color":Fa.color,"border-image":Fa.image,color:Fa.color,icon:Fa.image,"list-style-image":Fa.image,"outline-color":Fa.color},Ua={attr_name:["on[a-z]{1,}","style","href","src"],attr_val:["javascript:"],css_key:["behavior","-moz-behavior","-ms-behavior"],css_val:["expression"]};function Ha(e,t,n){var r;if(t){if($a)return $a.call(t,e,n);for(r=t.length,n=n?n<0?Math.max(0,r+n):n:0;n<r;n++)if(n in t&&t[n]===e)return n}return-1}function Ka(e){if(null==e)return"";var t,n=document.createTextNode(e);return ka.appendChild(n),t=ka.innerHTML,ka.removeChild(n),t}function Ga(e,t,n){var r,o,a,i,l,s,u,c,d;if(e=Ya(e).toLowerCase(),t=Ya(t),Ha(e,Ua.attr_name)>=0)throw new Error("Unsafe attribute name used: ".concat(e));for(a=0;a<Ua.attr_val;a++)if(t.toLowerCase().match(Ua.attr_val[a]))throw new Error("Unsafe attribute value used: ".concat(t));if((r=qa[e])||(r=Pa),o="",!n){for(i=0;i<e.length;i++){if(!(l=e.charAt(i)).match(/[a-zA-Z\-0-9]/))throw new Error("Invalid attribute name specified");o+=l}o+='="'}for(s=0;s<t.length;s++)u=t.charAt(s),c=t.charCodeAt(s),!u.match(/[a-zA-Z0-9]/)&&Ha(u,r)<0?(d=c.toString(16),o+="&#x".concat(d,";")):o+=u;return n||(o+='"'),o}function Za(e,t,n){var r,o,a,i,l,s,u,c,d,h;if(e=Ya(e).toLowerCase(),t=Ya(t),Ha(e,Ua.css_key)>=0)throw new Error("Unsafe property name used: ".concat(e));for(r=0;r<Ua.css_val.length;r++)if(t.toLowerCase().indexOf(Ua.css_val[r])>=0)throw new Error("Unsafe property value used: ".concat(t));if((o=Va[e])||(o=Fa.default),a="",!n){for(i=0;i<e.length;i++){if(!(l=e.charAt(i)).match(/[a-zA-Z-]/))throw new Error("Invalid Property Name specified");a+=l}a+=": "}for(s=0;s<t.length;s++)u=t.charAt(s),c=t.charCodeAt(s),!u.match(/[a-zA-Z0-9]/)&&Ha(u,o)<0?(d=c.toString(16),h="000000".substr(d.length),a+="\\".concat(h).concat(d)):a+=u;return a}function Ya(e,t){var n,r,o,a,i=!1;if(null===e)return null;n=e,r=e,o=0;for(var l=[new ja,new Ia,new Ta];!i;){r=n;for(var s=0;s<l.length;s++)(a=l[s].decode(n))!==n&&(o++,n=a);r!==n||(i=!0)}if(t&&o>1)throw new Error("Attack Detected - Multiple/Double Encodings used in input");return n}for(var Wa=[],Xa=0;Xa<255;Xa++)Wa[Xa]=Xa>=48&&Xa<=57||Xa>=65&&Xa<=90||Xa>=97&&Xa<=122?null:Xa.toString(16);var Ja=function(e){return Ka(e.unsafe)},Qa=function(e){var t,n=[],r=[],o={},a="";for(t in e.map?n=e.map:n[e.name]=e.unsafe,n)"function"!=typeof n[t]&&n.hasOwnProperty(t)&&(r[t]=Za(t,n[t],!0),a+=Za(t,n[t],!0),o[t]=r[t]);return e.map?o:a},ei=function(e){var t=[],n=[],r={},o="";for(var a in e.map?t=e.map:t[e.name]=e.unsafe,t)"function"!=typeof t[a]&&t.hasOwnProperty(a)&&(n[a]=Ga(a,t[a],!0),o+=Ga(a,t[a],!0),r[a]=n[a]);return e.map?r:o};function ti(e,t){throw new Error(t)}var ni={canonicalize:Ya,encode:function(){var e={context:"html",unsafe:null,name:null,map:null,setter:null,strict:!0};return 1===arguments.length&&"object"===xa(arguments[0])?function(){for(var e,t,n,r=arguments[0]||{},o=1,a=arguments.length;o<a;o++)if(null!=(e=arguments[o]))for(t in e)if(e.hasOwnProperty(t)){if(r===(n=e[t]))continue;void 0!==n&&(r[t]=n)}}(e,arguments[0]):(e.context=arguments[0],2===arguments.length?"html"===e.context?e.unsafe=arguments[1]:"attr"!==e.context&&"css"!==e.context||(e.map=arguments[1]):(e.name=arguments[2],e.unsafe=arguments[1])),"html"===e.context?Ja(e):"css"===e.context?(null!=e.map&&"object"!==xa(e.map)&&ti(this,"Invalid parameter type"),Qa(e)):"attr"===e.context?(null!=e.map&&"object"!==xa(e.map)&&ti(this,"Invalid parameter type"),ei(e)):void ti(this,"Invalid parameter type")},encodeForAttr:Ga,encodeForAttr2:function(e){return Ga("nonsens",e,!0)},encodeForCSS:Za,encodeForHref:function(e){Ya(e),0!==e.search("[a-zA-Z0-9]+:")&&(e="http://".concat(e));var t=new Ca(e),n=Ca.encodeAuthorityAndPath(decodeURI(t.authorityAndPath)),r=t.searchParams,o=(e=n+Ca.encodeSearchParams(r)+t.hash).toLowerCase();if(-1!==o.indexOf("javascript:"))throw new Error("Attack Detected - Javascript in input");if(-1!==o.indexOf("data:"))throw new Error("Attack Detected - data in input");return e},encodeForJS:function(e,t){var n,r,o,a,i,l;for(t||(t=Ba),l="",n=0;n<e.length;n++)o=e.charAt(n),a=e.charCodeAt(n),Ha(o,t)>=0||null==Wa[a]?l+=o:(r=a.toString(16),a<256?(i="00".substr(r.length),l+="\\x".concat(i).concat(r.toUpperCase())):(i="0000".substr(r.length),l+="\\u".concat(i).concat(r.toUpperCase())));return l},encodeForHTML:Ka,encodeForURL:function(e,t){var n="";return t&&(t.match(/^[A-Za-z\-0-9]{1,}$/)?n+=Ya(t).toLowerCase():ti(this,"Illegal Attribute Name Specified"),n+='="'),n+=encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A"),n+=t?'"':""},isSafeDataURL:function(e,t){var n=null!=t?t:{},r=n.maxByteSizeSvg,o=void 0===r?5e5:r,a=n.maxByteSizeImage,i=void 0===a?5e6:a,l=function(e){var t,n=va(null!==(t=Da.exec(e.trim()))&&void 0!==t?t:[],4),r=n[1];return{encoding:n[2],data:n[3],mimeType:null==r?void 0:r.toLocaleLowerCase()}}(e),s=l.mimeType,u=l.encoding,c=l.data;if(!c)return!0;var d=function(e,t,n){var r={type:e};if(null!=t&&t.includes(";base64"))try{return new Blob([atob(n)],r).size}catch(e){return new Blob([n],r).size}return"image/svg+xml"===e?new Blob([n],r).size:0}(s,u,c);return"image/svg+xml"===s?d<=o:d<=i},validateURI:function(e){if(""===e||function(e){if("canParse"in URL)return URL.canParse(e);try{return new URL(e),!0}catch(e){return!1}}(e))return!1;var t=e.replace(/%2E/gi,".");if(t.match(/[#&=: ]/))return!1;var n=function(e){for(var t=e,n="";t.length>0;)if(t.startsWith("../")||t.startsWith("./"))t=t.replace(/^\.\.?\//,"");else if(t.startsWith("/./"))t=t.replace(/^\/\.\//,"/");else if("/."===t)t="/";else if(t.startsWith("/../")){t=t.replace(/^\/\.\.\//,"/");var r=n.lastIndexOf("/");-1!==r&&(n=n.slice(0,r))}else if("/.."===t){t="/";var o=n.lastIndexOf("/");-1!==o&&(n=n.slice(0,o))}else if("."===t||".."===t)t="";else{var a=t.match(/^\/?[^/]*/),i=a?a[0]:"";t=t.slice(i.length),n+=i}return n}(t);return""!==n&&"/"!==n&&n}};const ri=["data:","http:","https:"],oi=e=>{try{return ni.encodeForAttr2(e)}catch(e){return""}},ai=e=>{const t=["#"," ","(",")"];let n="";for(let r=0;r<e.length;r++){const o=e.charAt(r),a=e.charCodeAt(r);if(!o.match(/[a-zA-Z0-9]/)&&t.indexOf(o)<0){const e=a.toString(16);n+=`\\${"000000".substr(e.length)}${e}`}else n+=o}return n},ii=e=>{try{var t;return(e=null===(t=e)||void 0===t?void 0:t.trim())&&(e=>{try{const t=new URL(e);return ri.includes(t.protocol)}catch(e){return!1}})(e)&&ni.isSafeDataURL(e)?/^data:/i.test(e)?encodeURI(ni.canonicalize(e)):ni.encodeForHref(e):""}catch(e){return""}};function li(e){const t=sa.resolveExpression(e);return"none"!==t?t:ai(e)}var si=(e,t,n)=>{const{api:r,state:o}=n,a=r&&r.isActive()&&-1!==o.indexOf(e.elemNo),i=function(e,t){if(e.attributes&&e.attributes.color){const t=sa.resolveExpression(e.attributes.color);if("none"!==t)return t}return li(t.backgroundColor)}(e,t),l=li(function(e,t){return"default"===e.fontColor?sa.isDarkColor(t)?Xe.FONT_COLOR_LIGHT.color:Xe.FONT_COLOR_DARK.color:e.fontColor}(t,i)),s=e.attributes||{};let u='<div class="sn-org-textbox">';if(u+=`<div class="sn-org-card-title">${oi(s.label||e.id)}</div>`,s.subLabel&&(u+=`<div class="sn-org-card-label">${oi(s.subLabel)}</div>`),e.measure){const n=t.measureLabel?`${t.measureLabel}: `:"";u+=`<div class="sn-org-card-label">${oi(n+e.measure)}</div>`}else s.extraLabel&&(u+=`<div class="sn-org-card-label">${oi(s.extraLabel)}</div>`);u+="</div>";const c=a?" selected":" not-selected",d=r&&r.isActive()?c:"",{top:h=Xe.BORDER_TOP,fullBorder:p=Xe.BORDER_FULL,colorType:f=Xe.BORDER_COLOR_TYPE}=t.border,g="auto"===f?sa.getDarkColor(i):li(t.borderColor);let m=ia.cardHeight;return a?m-=8:p?m-=4:h&&(m-=3),`<div class="sn-org-card-text${d}" style="background-color:${i};color:${l}; border:${p&&!a?`1px solid ${g}`:""}; border-top:${h&&!a?`3px solid ${g}`:""}; height:${m}px;">${u}</div>`};function ui(e){return[void 0,"left","right"].includes(e.cardImage.alignment)}function ci(e){const t=sa.resolveExpression(e);return"none"!==t?t:ai(e)}function di(e,t){return"default"===e?sa.isDarkColor(t)?Xe.FONT_COLOR_LIGHT.color:Xe.FONT_COLOR_DARK.color:e}const hi=(e,t)=>`font-family:${e.fontFamily}; font-size:${e.fontSize}; color:${t}`;function pi(e,t,n,r){const o=function(e,t){if(e.attributes&&e.attributes.color){const t=sa.resolveExpression(e.attributes.color);if("none"!==t)return t}return ci(t)}(e,t.cardBackgroundColor),a=ci(di(t.cardTitle.fontColor,o)),i=hi(t.cardTitle,a),l=ci(di(t.cardSubTitle.fontColor,o)),s=hi(t.cardSubTitle,l),u=ci(di(t.cardDescription.fontColor,o)),c=hi(t.cardDescription,u),d=ci(di(t.cardMeasureLabel.fontColor,o)),h=hi(t.cardMeasureLabel,d),p=ci(di(t.cardMeasureValue.fontColor,o)),f=hi(t.cardMeasureValue,p),{topBar:g=Xe.BORDER_TOP,fullBorder:m=Xe.BORDER_FULL,contrastColor:b=!0}=t.cardBorder,v=b?sa.getDarkColor(o):ci(t.cardBorder.borderColor);let y=n;r?y-=8:m?y-=4:g&&(y-=3);return{titleStyle:i,subTitleStyle:s,descriptionStyle:c,measureLabelStyle:h,measureValueStyle:f,cardStyle:`background-color:${o}; border:${m&&!r?`1px solid ${v}`:""}; border-top:${g&&!r?`3px solid ${v}`:""}; height:${y}px;`}}const fi=(e,t,n,r,o)=>{const a=function(e,t){var n;let r=!1,o="";return null!==(n=t.api)&&void 0!==n&&n.isActive()&&(r=-1!==t.state.indexOf(e.elemNo),o=r?" selected":" not-selected"),{isSelected:r,selectedClass:o}}(e,n),i=function(e,t,n){const r=e.attributes||{},o=t.measureLabel?`${t.measureLabel}: `:"";return{title:oi(r.label||e.id),subTitle:r.subLabel?oi(r.subLabel):void 0,description:r.extraLabel?oi(r.extraLabel):void 0,measureLabel:e.measure?oi(o):void 0,measureValue:e.measure?oi(e.measure):void 0,...(null==n?void 0:n.isEnabled("IM_5036_ORGCHART_STYLING_IMAGE"))&&{image:ii(r.image)}}}(e,t,r),l=pi(e,t,o,a.isSelected),s=function(e,t,n){return(null==t?void 0:t.image)&&"tooltip"!==e.cardImage.location&&(null==n?void 0:n.isEnabled("IM_5036_ORGCHART_STYLING_IMAGE"))}(t,e.attributes,r),u=s?function(e){let t=" has-image";return ui(e)?(t+=" horizontal",t+="right"===e.cardImage.alignment?" right":" left"):(t+=" vertical",t+="bottom"===e.cardImage.alignment?" bottom":"",t+="round"===e.cardImage.shape?" round":""),t}(t):"",c=a.selectedClass+(ui(t)?" horizontal":" vertical");let d="";if(s){const e=function(e){let t="";return t+=["right","bottom"].includes(e.cardImage.alignment)?" image-last":"",t+=ui(e)?"":" vertical",t}(t),n=function(e){let t="";return t+=e.cardImage.clip?" clip":"",t+=ui(e)?" horizontal":"",t+="round"===e.cardImage.shape?" round":"",t}(t);d+=`<div class="sn-image-wrapper${e}"><img src="${i.image}" class="sn-org-card-image${n}"/></div>`}return d+=`<div class="sn-org-textbox${u}">`,d+=`<div class="sn-org-card-title" style="${l.titleStyle};">${i.title}</div>`,i.subTitle&&(d+=`<div class="sn-org-card-label" style="${l.subTitleStyle};">${i.subTitle}</div>`),i.measureValue?d+=`<div class="sn-org-card-label"><span style="${l.measureLabelStyle};">${i.measureLabel}</span><span style="${l.measureValueStyle};">${i.measureValue}</span></div>`:i.description&&(d+=`<div class="sn-org-card-label" style="${l.descriptionStyle};">${i.description}</div>`),d+="</div>",`<div class="sn-org-card-text${c}" style="${l.cardStyle}">${d}</div>`},gi={colorByExpression:"color",labelExpression:"label",subLabelExpression:"subLabel",extraLabelExpression:"extraLabel",imageExpression:"image"},mi="max-data-limit";function bi(e){return e[0].qText}function vi(e){return e[1].qText}async function yi(e,t,n,r,o,a,i){return await n.getHyperCubeData("/qHyperCubeDef",[{qTop:o,qLeft:0,qWidth:3,qHeight:3300}]).then((n=>{e.push(n[0]),t.push(...n[0].qMatrix),o+=n[0].qArea.qHeight})),a>=i?mi:r>o?yi(e,t,n,r,o,a+1,i):""}const xi=async(e,t)=>{if(e.snapshotData)return{status:"",dataMatrix:e.snapshotData.dataMatrix};const n=e.qHyperCube&&e.qHyperCube.qDataPages,r=e.qHyperCube.qSize.qcy,o=n[0].qArea.qHeight,a=[...n[0].qMatrix];let i="";return r>o&&1===n.length&&t?i=await yi(e.qHyperCube.qDataPages,a,t,r,o,0,e.rowLimit/3300||10):n.forEach(((e,t)=>{t>0&&a.push(...e.qMatrix)})),{status:i,dataMatrix:a}};function wi(e,t){const n={};return e.forEach((e=>{"color"===e.prop?n[e.prop]=sa.resolveExpression(t.qValues[e.index].qText):n[e.prop]=t.qValues[e.index].qText})),n}function _i(e){if(!e)return!0;for(let t=0;t<e.length;++t)if(void 0!==e[t].children)return!1;return!0}function Ci(e,t){return(null==t?void 0:t.isEnabled("IM_5036_ORGCHART_STYLING_IMAGE"))&&["top","bottom"].includes(e.cardImage.alignment)&&"tooltip"!==e.cardImage.location?ia.cardHeightLarge:ia.cardHeight}async function Oi({layout:e,model:t,translator:n}){if(!e.qHyperCube)throw new Error("Require a hypercube");if(e.qHyperCube.qDimensionInfo.length<2)return!1;const{status:r,dataMatrix:o}=await xi(e,t),a=function(e){if(e&&e.length){const t=[];return e.forEach(((e,n)=>{gi[e.id]&&t.push({prop:gi[e.id],index:n})})),t}return[]}(e.qHyperCube.qDimensionInfo[0].qAttrExprInfo);return o?o.length<1?null:function(e,t,n,r,o){const a={},i=[];for(let n=0;n<e.length;++n){const r=e[n],o=bi(r),l={id:o,parentId:vi(r),children:[],elemNo:r[0].qElemNumber,attributes:wi(t,r[0].qAttrExps),measure:r[2]&&r[2].qText,rowNo:n};a[o]=l,i.push(l)}const l=[];let s=!1;for(let e=0;e<i.length;++e){const t=i[e],n=a[t.parentId];t.parent=n,n?n.children.length>98?s=!0:n.children.push({childNumber:n.children.length,...t}):l.length>98?s=!0:l.push(t)}if(0===l.length)return{error:"no_root",message:o.get("Object.OrgChart.MissingRoot")};const u=[];if(n===mi&&u.push(o.get("Object.OrgChart.MaxData")),s&&u.push(o.get("Object.OrgChart.MaxChildren")),function(e){const t={},n={};function r(e){t[e.id]=!0,n[e.id]=!0;for(let o=0;o<e.children.length;++o){if(!t[e.children[o].id]&&r(e.children[o]))return!0;if(n[e.children[o].id])return!0}return n[e.id]=!1,!1}for(let n=0;n<e.length;++n){const o=e[n];if(!t[o.id]&&r(o))return!0}return!1}(i)&&u.push(o.get("Object.OrgChart.CycleWarning")),1===l.length)return l[0].warn=u,l[0].navigationMode=r,l[0];u.push(o.get("Object.OrgChart.DummyWarn"));const c={id:"Root",name:o.get("Object.OrgChart.DummyRoot"),isDummy:!0,warn:u,children:l,navigationMode:r};return l.forEach(((e,t)=>{e.parentId="Root",e.parent=c,e.childNumber=t})),c}(o,a,r,e.navigationMode,n):null}var ki=(e,t)=>{const{api:n,state:r,singleSelect:o,setState:a}=t;if(e&&n){let t;if(e.data.elemNo<0&&-3!==e.data.elemNo)return;if(e.data.isLocked)return;n.isActive()&&r?t=r.concat():(n.begin("/qHyperCubeDef"),t=[]);const i=t.indexOf(e.data.elemNo),l=-1===i;let s=[];o||(s=function(e,t){const n=[],r=e=>{e.children.forEach((e=>{e.data.selected=t,n.push(e.data.elemNo),e.children&&e.children.length>0&&r(e)}))};return e.children&&r(e),n}(e,l)),l?(t.push(e.data.elemNo),s.forEach((e=>{-1===t.indexOf(e)&&t.push(e)}))):(t.splice(i,1),s.forEach((e=>{const n=t.indexOf(e);-1!==n&&t.splice(n,1)}))),0===t.length?n.clear():n.select({method:"selectHyperCubeValues",params:["/qHyperCubeDef",0,t,!1]}),a(t)}};function Ei(e){var t;e.tooltip.active=!0,e.tooltip.timeout=setTimeout((()=>{e.tooltip.active&&e.tooltip.html(function(e,t,n){const r=oi(e.data.attributes.label||e.data.id),o=e.data.attributes.subLabel?`${oi(e.data.attributes.subLabel)}<br />`:"",a=e.data.attributes.extraLabel?`${oi(e.data.attributes.extraLabel)}<br />`:"",i=oi(e.data.measure?`${t.measureLabel?`${t.measureLabel}: `:""}${e.data.measure}`:"");if(null!=n&&n.isEnabled("IM_5036_ORGCHART_STYLING_IMAGE")){let n=e.data.attributes.image&&"card"!==t.cardImage.location?e.data.attributes.image:"";if(n=ii(n),n){const e="right"===t.cardImage.alignment?'style="padding-right:5px"':'style="padding-left:5px"';return`<div class="sn-org-tooltip-inner" style="display:flex"><img src="${n}" class="sn-org-tooltip-image" ${"right"===t.cardImage.alignment?'style="order: 1"':""} /><div class="sn-org-tooltip-text" ${e}><div class="sn-org-tooltip-header">${r}</div>${o}${a}${i}</div></div>`}}return`<div class="sn-org-tooltip-inner"><div class="sn-org-tooltip-header">${r}</div>${o}${a}${i}</div>`}(e.node,e.styling,e.flags)).classed("sn-org-tooltip-visible",!0).attr("style",(()=>function(e,t,n,r,o){const{cardWidth:a,tooltipPadding:i}=ia,l=a/2;return`bottom:${t-(r(e)*o.zoom+o.y-i)}px;left:${n(e)*o.zoom+o.x+l*o.zoom}px;`}(e.node,e.containerHeight,e.x,e.y,e.transform)))}),null!==(t=e.delay)&&void 0!==t?t:250)}function Si(e){clearTimeout(e.timeout),e.active=!1,e.classed("sn-org-tooltip-visible",!1)}function Li({positioning:e,divBox:t,nodes:n,styling:r,setExpandedCallback:o,wrapperState:a,selectionObj:i,navigationMode:l,element:s,tooltip:u,flags:c,actualCardHeight:d}){const{x:h,y:p}=e,{cardWidth:f,buttonWidth:g,buttonHeight:m,cardPadding:b,rootDiameter:v}=ia,{topId:y}=a.expandedState,x=n.find((e=>e.data.id===y)),w=x&&x.parent?x.parent.ancestors().map((e=>e.data.id)):[],_=document.getElementsByTagName("html")[0].classList.contains("touch-on"),C={tooltip:u,containerHeight:s.clientHeight,styling:r,x:h,y:p,flags:c};t.selectAll(".sn-org-nodes").data(n.filter((e=>e.parent&&"Root"===e.parent.data.id))).enter().append("div").attr("class","sn-org-root").attr("style",(e=>`top:${p(e)-v-b}px;left:${h(e)+(f-v)/2}px`)).attr("id",(e=>e.data.id)),t.selectAll(".sn-org-nodes").data(n.filter((e=>"Root"!==e.data.id))).enter().append("div").attr("class","sn-org-card").attr("style",(e=>`width:${f}px;height:${d}px; top:${p(e)}px;left:${h(e)}px;`)).attr("id",(e=>e.data.id)).on("click",((e,t)=>{if(!a.constraints.active&&"Root"!==t.data.id){const e={...C,transform:a.transform,node:t,delay:0};_&&Ei(e),ki(t,i)}})).html((e=>null!=c&&c.isEnabled("IM_5036_ORGCHART_STYLING")?fi(e.data,r,i,c,d):si(e.data,r,i))).on("mouseenter",((e,t)=>{if(!_&&!a.constraints.active&&0===e.buttons){Ei({...C,transform:a.transform,node:t})}})).on("mouseleave",(()=>{!_&&Si(u)})).on("mousedown",(()=>{Si(u)})).on("touchmove",(()=>{Si(u)})).on("wheel",(()=>{Si(u)})),"expandAll"!==l&&t.selectAll(".sn-org-nodes").data(n.filter((e=>!!e.children&&"Root"!==e.data.id))).enter().append("div").attr("class","sn-org-traverse").attr("style",(e=>`width:${g}px;height:${m}px;top:${p(e)+d+b}px;left:${h(e)+(f-g)/2}px;`)).attr("id",(e=>`${e.data.id}-expand`)).on("mouseenter",(e=>{a.constraints.active||(e.target.style.cursor="pointer")})).on("click",((e,t)=>{a.constraints.active||(o(((e,{topId:t,isExpanded:n,expandedChildren:r},o)=>{if(e.data.id===t)n=!n,r=[];else if(o.includes(e.data.id))t=e.parent?e.parent.data.id:e.data.id,n=!!e.parent,r=[];else if(e.parent.data.id===t){const t=e.parent.children.filter((e=>r.includes(e.data.id))).every((e=>_i(e.children)));r.includes(e.data.id)?r.splice(r.indexOf(e.data.id),1):_i(e.children)&&t?r.push(e.data.id):r=[e.data.id]}else t=e.parent.data.id,n=!0,r=[e.data.id];return{topId:t,isExpanded:n,expandedChildren:r}})(t,a.expandedState,w)),e.stopPropagation())})).html((e=>`${((e,{topId:t,isExpanded:n,expandedChildren:r},o)=>e.data.id===t&&n||e.parent&&e.parent.data.id===t&&r.includes(e.data.id)||o.includes(e.data.id)?"-":"+")(e,a.expandedState,w)} ${e.data.children.length}`))}function Ri(e,t,n,r,o){e.append("path").attr("class","sn-org-path").attr("id",(e=>e.data.id)).attr("d",(e=>{let n="";const a=function(e,t,{depthSpacing:n,isVertical:r,x:o,y:a},i,l){const{cardWidth:s,buttonHeight:u,cardPadding:c,buttonMargin:d}=ia,h=[],p=s/2,f=l/2,g={x:e.xActual,y:e.yActual};if(e.parent&&"Root"!==e.parent.data.id){const t=n/2,s="expandAll"===i?l:l+c+u,m={x:o(e.parent)+p,y:a(e.parent)+s};"expandAll"!==i&&_i(e.parent.children)?h.push(r?[{x:g.x,y:g.y+f},{x:m.x-p,y:g.y+f},{x:m.x-p,y:m.y+d},{x:m.x,y:m.y+d},{x:m.x,y:m.y}]:[{x:g.x,y:g.y},{x:g.x,y:m.y-f},{x:m.x+t,y:m.y-f},{x:m.x+t,y:m.y},{x:m.x,y:m.y}]):g.x===o(e.parent)||g.y===a(e.parent)?h.push([{x:g.x+p,y:g.y},{x:m.x,y:m.y}]):h.push(r?[{x:g.x+p,y:g.y},{x:g.x+p,y:g.y-c},{x:m.x,y:g.y-c},{x:m.x,y:m.y}]:[{x:g.x,y:g.y},{x:g.x-c,y:g.y},{x:g.x-c,y:m.y},{x:m.x,y:m.y}])}else e.parent&&h.push([{x:g.x+p,y:g.y},{x:g.x+p,y:g.y-c}]);return e.children&&"Root"!==e.data.id&&h.push([{x:g.x+p,y:g.y+l},{x:g.x+p,y:g.y+l+c}]),h}(e,0,t,r,o);return a.forEach((e=>{n+=function(e){const{r:t}=ia;let n,r=`M ${e[0].x} ${e[0].y} `;const o=t=>{const r=e[t].x-e[t-1].x,o=e[t].y-e[t-1].y;n={x:(r>0)-(r<0)||+r,y:(o>0)-(o<0)||+o}};o(1);for(let a=1;a<e.length;++a){const i=e[a];a<e.length-1?(r+=`L ${i.x-n.x*t} ${i.y-n.y*t} `,o(a+1),r+=`Q ${i.x} ${i.y} ${i.x+n.x*t} ${i.y+n.y*t} `):r+=`L ${i.x} ${i.y} `}return r}(e).slice(0,-1)})),n}))}const Ti=(e,t,n,r,o,a)=>{const{buttonMargin:i}=ia,l=o&&o.initialX||0;return"expandAll"===a?(e[r]=e.x+l,e[r]):(e.parent?(e.parent[r]||(e.parent[r]=Ti(e.parent,t,n,r,o)),"Root"===e.parent.data.id?e[r]=e.parent[r]+(e.data.childNumber-(e.parent.children.length-1)/2)*t:e[r]=_i(e.parent.children)?e.parent[r]+i:e.parent[r]+(e.data.childNumber-(e.parent.children.length-1)/2)*t):e[r]=l,e[r])};function Ai(e,t,n,r,o){const{widthMargin:a,heightMargin:i,cardWidth:l,cardPadding:s}=ia;let u,c,d;if("ttb"===e)u=l+a,c="expandAll"===r?o+2*s:o+i,d={depthSpacing:c,isVertical:!0,x:e=>Ti(e,u,t,"xActual",n,r),y:e=>((e,t,n,r,o,a)=>{const{leafMargin:i}=ia,l=r&&r.initialY||0;return e.parent&&"Root"!==e.parent.data.id&&"expandAll"!==o&&_i(e.parent.children)?e[n]=e.parent.y+t+e.data.childNumber*(a+i)+l:e[n]=e.y+l,e[n]})(e,c,"yActual",n,r,o)};return d}const Ni=(e,t,n,r,o)=>{const a=e.k,i=`${e.x}px, ${e.y}px`;t.attr("transform",e),n.classed("org-disable-transition",!0),t.classed("org-disable-transition",!0),n.attr("style",`width:${r}px;height:${o}px; transform: translate(${i}) scale(${a})`)};const zi=({topId:e,isExpanded:t,expandedChildren:n},r,o,a)=>{if("expandAll"===a)return r.descendants();const i=r.descendants().find((t=>t.data.id===e))||r,l=[];if(t&&i.children&&i.children.forEach((e=>{l.push(e),e.children&&(-1!==n.indexOf(e.data.id)||o)&&e.children.forEach((t=>{l.push(t),-1!==n.indexOf(e.data.id)&&o&&t.children&&t.children.forEach((e=>{l.push(e)}))}))})),"free"===r.data.navigationMode&&i.parent){const e=i.parent.ancestors(),t=e.map((e=>e.data.id));e.forEach((e=>{o&&e.children.forEach((e=>{e.children&&-1===t.indexOf(e.data.id)&&e.data.id!==i.data.id&&l.unshift(...e.children)})),l.unshift(...e.children),e.parent||l.unshift(e)}))}else l.unshift(i);return l},Mi=({element:e,dataTree:t,selectionObj:n,wrapperState:r,setInitialZoom:o,setTransform:a,setExpandedState:i,viewState:l,setContainerData:s,layout:u,flags:c,actualCardHeight:d})=>{e.innerHTML="",e.className="sn-org-chart";const{navigationMode:h}=u;let p=Ai("ttb",e,{},h,d);const{width:f,height:g}=e.getBoundingClientRect(),m=In(e).append("span").attr("class","sn-org-zoomwrapper").on("click",(()=>{r.constraints.active||n.api.isActive()&&n.state||(n.api.begin("/qHyperCubeDef"),n.setState([]))})).node(),b=In(m).selectAll("svg").data([{}]).enter().append("svg").attr("class","sn-org-svg").attr("width","100%").attr("height","100%"),v=In(m).selectAll("div").data([{}]).enter().append("div").attr("class","sn-org-nodes"),y=In(e).append("button").attr("class","sn-org-homebutton disabled").on("click",(()=>{Mi({element:e,dataTree:t,selectionObj:n,wrapperState:r,setInitialZoom:o,setTransform:a,setExpandedState:i,viewState:l,setContainerData:s,layout:u,flags:c,actualCardHeight:d})})).html('<span class="lui-fade-button__icon sn-org-home-icon">\n <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="20" height="20" viewBox="0 0 16 16">\n <defs>\n <path id="home-a" d="M2,7.9 L8,3.4 L14,7.9 L14,16 L12,16 L12,11.2 C12,11.0895431 11.9104569,11 11.8,11 L9.2,11 C9.08954305,11 9,11.0895431 9,11.2 L9,16 L2,16 L2,7.9 Z M7,13.8 L7,11.2 C7,11.0895431 6.91045695,11 6.8,11 L4.2,11 C4.08954305,11 4,11.0895431 4,11.2 L4,13.8 C4,13.9104569 4.08954305,14 4.2,14 L6.8,14 C6.91045695,14 7,13.9104569 7,13.8 Z M13,4.1 L16,6.5 L15,7.5 L8,2 L1,7.5 L0,6.5 L8,0 L11,2.4 L11,1 L13,1 L13,4.1 Z"/>\n </defs>\n <use xlink:href="#home-a"/>\n </svg>\n </span>').node(),x=function(e){const t=In(e).append("div").attr("class","sn-org-tooltip").on("mousedown",(()=>{t.classed("sn-org-tooltip-visible",!1)}));return t}(e);if(t.error)return In(m).append("div").attr("class","sn-org-error").html(t.message),!1;t.warn&&t.warn.length&&In(m).append("span").attr("class","sn-org-warning").html(`*${t.warn.join(" ")}`);const w=b.append("g").attr("class","sn-org-paths"),_=Ko().size([f,g]).nodeSize([ia.cardWidth+ia.cardPadding,p.depthSpacing])(Mo(t)),C=!r.expandedState||!_.descendants().find((e=>e.data.id===r.expandedState.topId)),O=C?{topId:_.data.id,isExpanded:!0,expandedChildren:[],useTransitions:!1}:r.expandedState,k=zi(O,_,!1,h);k.forEach((e=>{e.xActual&&e.yActual||(p.x(e),p.y(e))}));const E=((e,t)=>{const{cardWidth:n,buttonHeight:r,buttonMargin:o}=ia,a={left:1/0,top:1/0,right:-1/0,bottom:-1/0};return e.forEach((e=>{a.left=Math.min(e.xActual,a.left),a.top=Math.min(e.yActual,a.top),a.right=Math.max(e.xActual,a.right),a.bottom=Math.max(e.yActual,a.bottom)})),{x:a.left,y:a.top-r-o,width:a.right-a.left+n,height:a.bottom-a.top+t+2*(r+o)}})(k,d),S=l&&l.initialZoom?l.initialZoom:((e,t,n,r)=>{const{widthMargin:o,minZoom:a}=ia,i="expandAll"===n?1/0:ia.maxZoom,{width:l,height:s}=e,{clientHeight:u,clientWidth:c}=t,d=l+2*o,h=s+r,p=Math.max(Math.min(d/c,i),a),f=Math.max(Math.min(h/u,i),a);return p>f?{initialX:-e.x+o,initialY:-e.y+(u*p-s)/2,initialZoom:p}:{initialX:-e.x+(c*f-l)/2,initialY:r/2,initialZoom:f}})(E,e,h,d);return o(S),p=Ai("ttb",e,S,h,d),function({containerData:e,setTransform:t,transformState:n,wrapperState:r,initialZoomState:o,navigationMode:a}){const{svg:i,divBox:l,width:s,height:u,zoomWrapper:c,element:d,tooltip:h,homeButton:p}=e,{x:f=0,y:g=0}=n,{minZoom:m,maxZoom:b}=ia,v=n&&1/n.zoom||o.initialZoom,y="expandAll"===a?v:Math.max(Math.min(b,v),m),x=()=>{const e=document.createEvent("MouseEvents");e.initEvent("mousedown",!0,!1),d.dispatchEvent(e)};In(c).call(aa().extent([[0,0],[s,u]]).filter((e=>!(r.constraints.active||"dblclick"===e.type||"mousedown"===e.type&&3===e.which))).scaleExtent(["expandAll"===a?.8:m*y,b*y]).on("start",x).on("zoom",(e=>{In(p).attr("class","sn-org-homebutton lui-fade-button lui-fade-button--large"),t({zoom:e.transform.k/y,x:e.transform.x,y:e.transform.y}),x(),Si(h),Ni(Wo.translate(e.transform.x,e.transform.y).scale(e.transform.k/y),i,l,s,u)}))),t({zoom:1/y,x:f,y:g}),Ni(Wo.translate(f,g).scale(1/y),i,l,s,u)}({containerData:{svg:w,divBox:v,width:f,height:g,zoomWrapper:m,element:e,tooltip:x,homeButton:y},setTransform:a,transformState:l&&l.transform||{},wrapperState:r,initialZoomState:S,navigationMode:h}),C&&i(O),s({svg:w,divBox:v,allNodes:_,positioning:p,width:f,height:g,element:e,zoomWrapper:m,tooltip:x,homeButton:y})},ji=(e,t,n,r)=>{const o={expandedState:e,transform:t,size:{w:r.clientWidth,h:r.clientHeight},initialZoom:n};return o.expandedState.useTransitions=!1,o};function Ii(e,t,n,r,o){const s=a();i((a=>{a.snapshotData||(a.snapshotData={}),n.snapshotData&&n.snapshotData.viewState||(a.snapshotData.viewState=ji(e,r,o,s)),a.snapshotData.dataMatrix=((e,t,n)=>{if(n.snapshotData&&n.snapshotData.dataMatrix)return n.snapshotData.dataMatrix;const{navigationMode:r}=n,o=zi(e,t,!0,r),a=[],{qDataPages:i}=n.qHyperCube,l=[];return i.forEach((e=>{l.push(...e.qMatrix)})),o.forEach((e=>{void 0!==e.data.rowNo&&a.push(l[e.data.rowNo])})),a})(e,t.allNodes,n)})),l((()=>({getViewState:()=>ji(e,r,o,s)})))}function Di(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}Di(".sn-org-chart .sn-org-homebutton {\n position: absolute;\n top: 20px;\n right: 20px;\n height: 20px;\n width: 20px;\n border-color: transparent;\n background-color: transparent;\n fill: rgba(89, 89, 89, 0.8);\n transition: fill 200ms ease-out;\n}\n.sn-org-chart .sn-org-homebutton:hover {\n fill: #595959;\n}\n.sn-org-chart .sn-org-homebutton.disabled {\n display: none;\n}\n");Di(".sn-org-chart {\n overflow: hidden;\n}\n.sn-org-chart .sn-org-nodes {\n position: absolute;\n transform-origin: 0% 0%;\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -khtml-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n backface-visibility: hidden;\n}\n.sn-org-chart .sn-org-nodes:not(.org-disable-transition) {\n transition-property: all;\n transition-duration: 0.5s;\n}\n.sn-org-chart .sn-org-nodes .sn-org-traverse {\n position: absolute;\n background-color: white;\n font-size: 20px;\n font-weight: bold;\n border-radius: 3px;\n border: 1px solid #8c8c8c;\n text-align: center;\n line-height: 24px;\n}\n.sn-org-chart .sn-org-nodes .sn-org-root {\n position: absolute;\n background-color: #8c8c8c;\n width: 20px;\n height: 20px;\n border-radius: 20px;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card {\n position: absolute;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-card-text {\n padding-left: 5px;\n padding-right: 5px;\n border-radius: 3px;\n display: flex;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-card-text.selected {\n border: 4px solid black;\n border-radius: 4px;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-card-text.not-selected {\n opacity: 0.5;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-card-text.horizontal {\n flex-direction: row;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-card-text.vertical {\n flex-direction: column;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-image-wrapper {\n order: 0;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-image-wrapper.image-last {\n order: 2;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-image-wrapper.vertical {\n margin: 0 auto;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-image-wrapper .sn-org-card-image {\n padding: 4px 4px;\n object-fit: contain;\n height: 130px;\n width: 130px;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-image-wrapper .sn-org-card-image.round {\n border-radius: 50%;\n object-fit: cover;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-image-wrapper .sn-org-card-image.clip {\n object-fit: cover;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-image-wrapper .sn-org-card-image.horizontal {\n padding: 4px 0px;\n height: 50px;\n width: 50px;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-textbox {\n order: 1;\n overflow: hidden;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-textbox.has-image {\n max-height: 60px;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-textbox.has-image.horizontal {\n width: 85px;\n height: fit-content;\n position: relative;\n top: 50%;\n transform: translate(0, -50%);\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-textbox.has-image.left {\n padding-left: 4px;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-textbox.has-image.right {\n padding-right: 4px;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-textbox.has-image.vertical {\n width: 143px;\n margin-bottom: 4px;\n margin: 0 auto;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-textbox.has-image.bottom {\n padding-top: 4px;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-textbox.has-image.round {\n max-height: 80px;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-textbox .sn-org-card-title {\n font-size: 14px;\n font-weight: bold;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.sn-org-chart .sn-org-nodes .sn-org-card .sn-org-textbox .sn-org-card-label {\n font-size: 11px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n");Di(".sn-org-chart .sn-org-svg {\n position: absolute;\n /* For css only transitions, does not work in IE11 */\n}\n.sn-org-chart .sn-org-svg .sn-org-path {\n fill: none;\n stroke: #4c4c4c;\n stroke-width: 1;\n}\n.sn-org-chart .sn-org-svg .sn-org-paths:not(.org-disable-transition) {\n transform-origin: 0% 0%;\n transition-property: all;\n transition-duration: 0.5s;\n}\n");Di('.sn-org-chart {\n /* Tooltip arrow */\n}\n.sn-org-chart .sn-org-tooltip {\n visibility: hidden;\n opacity: 0;\n /* Unsupported in IE, so there we set width explicitly */\n width: max-content;\n /* Position the tooltip text */\n position: absolute;\n z-index: 1;\n}\n.sn-org-chart .sn-org-tooltip::after {\n content: "";\n position: absolute;\n top: 100%;\n left: 0%;\n margin-left: -10px;\n border-width: 10px;\n border-style: solid;\n border-color: #404040 transparent transparent transparent;\n}\n.sn-org-chart .sn-org-tooltip-visible {\n opacity: 0.9;\n visibility: visible;\n}\n.sn-org-chart .sn-org-tooltip-inner {\n max-width: 240px;\n right: 50%;\n font-family: "QlikView Sans", sans-serif;\n position: relative;\n max-height: 150px;\n background-color: #404040;\n color: #e6e6e6;\n text-align: left;\n font-size: 13px;\n line-height: 15px;\n padding: 10px 10px 10px 10px;\n border-radius: 6px;\n overflow-wrap: break-word;\n word-wrap: break-word;\n word-break: break-word;\n overflow: hidden;\n}\n.sn-org-chart .sn-org-tooltip-inner .sn-org-tooltip-image {\n height: 50px;\n}\n.sn-org-chart .sn-org-tooltip-inner .sn-org-tooltip-header {\n font-weight: bold;\n padding-bottom: 5px;\n}\n');function $i(e,t,n){let r;switch(e.colorType){case"byExpression":r=sa.resolveExpression(e.colorExpression);break;case"colorPicker":r=t.getColorPickerColor(e.color);break;default:r=n}return"none"===r?n:r}Di(".sn-org-chart .sn-org-warning {\n position: absolute;\n bottom: 0px;\n left: 0px;\n font-style: italic;\n font-size: 13px;\n color: #7b7a78;\n}\n.sn-org-chart .sn-org-error {\n margin: 0;\n position: absolute;\n top: 50%;\n left: 50%;\n font-size: 1.2em;\n transform: translate(-50%, -50%);\n}\n");const Bi=({Theme:e,layout:t})=>{const n=$i(t.style.backgroundColor,e,Xe.BACKGROUND_COLOR.color),r=$i(t.style.fontColor,e,"default"),o=t.qHyperCube.qMeasureInfo.length?t.qHyperCube.qMeasureInfo[0].qFallbackTitle:null,{border:a={colorType:Xe.BORDER_COLOR_TYPE}}=t.style;return{backgroundColor:n,fontColor:r,measureLabel:o,border:a,borderColor:"auto"!==a.colorType?$i(a,e,sa.getDarkColor(n)):sa.getDarkColor(n)}};function Pi(e,t,n,r){if(r||void 0===e.useColorExpression)return n;let o;return o=e.useColorExpression?sa.resolveExpression(e.colorExpression):t.getColorPickerColor(e.color),"none"===o?n:o}const qi=(e,t,n,r)=>void 0===e?n:null!=t?t:r,Fi=(e,t,n)=>{var r,o,a;return{useColorExpression:qi(e,null==t?void 0:t.useColorExpression,"byExpression"===(null==n||null===(r=n.style)||void 0===r||null===(r=r.fontColor)||void 0===r?void 0:r.colorType),Xe.FONT_COLOR_USE_EXPRESSION),color:qi(e,null==t?void 0:t.color,null==n||null===(o=n.style)||void 0===o||null===(o=o.fontColor)||void 0===o?void 0:o.color,Xe.FONT_COLOR_DARK),colorExpression:qi(e,null==t?void 0:t.colorExpression,null==n||null===(a=n.style)||void 0===a||null===(a=a.fontColor)||void 0===a?void 0:a.colorExpression,"")}},Vi=(e,t)=>{const{viewState:n}=e;return!n&&t.snapshotData&&t.snapshotData.viewState?t.snapshotData.viewState:n};function Ui(i){const{flags:l}=i;return{qae:{properties:bt,data:We},component:()=>{const i=s(),b=u(),v=a(),y=c(),x=d(),w=h(),_=p(),C=f(),[O,k]=e(null),[E,S]=e(null),[L,R]=e(null),[T,A]=e(null),[N,z]=e(null),[M]=e({transform:{},constraints:_,expandedState:L}),j=function(a){const[i,l]=e(!1),s=t(),u=!!n().qSelectionInfo.qInSelections,[c]=e({api:s,setState:e=>{c.state=e},state:[],singleSelect:!1});r((()=>{mt(a)}),[a]);const d=()=>{c.state=[]},h=()=>{c.state=[],l(!1)};return r((()=>c.api?(c.api=s,c.api.on("deactivated",d),c.api.on("canceled",h),c.api.on("confirmed",h),c.api.on("cleared",d),()=>{c.api.removeListener("deactivated",d),c.api.removeListener("canceled",h),c.api.removeListener("confirmed",h),c.api.removeListener("cleared",d)}):()=>{}),[s]),r((()=>{c.singleSelect=i}),[i]),o((()=>({action(){l(!i)},icon:{shapes:[{type:"path",attrs:{d:"M9.5,15 C9.77614237,15 10,15.2238576 10,15.5 C10,15.7761424 9.77614237,16 9.5,16 L6.5,16 C6.22385763,16 6,15.7761424 6,15.5 C6,15.2238576 6.22385763,15 6.5,15 L9.5,15 Z M15.5,13 C15.7761424,13 16,13.2238576 16,13.5 L16,15 C16,15.5522847 15.5522847,16 15,16 L13.5,16 C13.2238576,16 13,15.7761424 13,15.5 C13,15.2238576 13.2238576,15 13.5,15 L14.4,15 C14.7313708,15 15,14.7313708 15,14.4 L15,13.5 C15,13.2238576 15.2238576,13 15.5,13 Z M0.5,13 C0.776142375,13 1,13.2238576 1,13.5 L1,14.4 C1,14.7313708 1.26862915,15 1.6,15 L2.5,15 C2.77614237,15 3,15.2238576 3,15.5 C3,15.7761424 2.77614237,16 2.5,16 L1,16 C0.44771525,16 0,15.5522847 0,15 L0,13.5 C0,13.2238576 0.223857625,13 0.5,13 Z M6.8,9 C6.91045695,9 7,9.08954305 7,9.2 L7,12.8 C7,12.9104569 6.91045695,13 6.8,13 L3.2,13 C3.08954305,13 3,12.9104569 3,12.8 L3,9.2 C3,9.08954305 3.08954305,9 3.2,9 L6.8,9 Z M12.8,9 C12.9104569,9 13,9.08954305 13,9.2 L13,12.8 C13,12.9104569 12.9104569,13 12.8,13 L9.2,13 C9.08954305,13 9,12.9104569 9,12.8 L9,9.2 C9,9.08954305 9.08954305,9 9.2,9 L12.8,9 Z M6,10 L4,10 L4,12 L6,12 L6,10 Z M12,10 L10,10 L10,12 L12,12 L12,10 Z M15.5,6 C15.7761424,6 16,6.22385763 16,6.5 L16,9.5 C16,9.77614237 15.7761424,10 15.5,10 C15.2238576,10 15,9.77614237 15,9.5 L15,6.5 C15,6.22385763 15.2238576,6 15.5,6 Z M0.5,6 C0.776142375,6 1,6.22385763 1,6.5 L1,9.5 C1,9.77614237 0.776142375,10 0.5,10 C0.223857625,10 0,9.77614237 0,9.5 L0,6.5 C0,6.22385763 0.223857625,6 0.5,6 Z M6.8,3 C6.91045695,3 7,3.08954305 7,3.2 L7,6.8 C7,6.91045695 6.91045695,7 6.8,7 L3.2,7 C3.08954305,7 3,6.91045695 3,6.8 L3,3.2 C3,3.08954305 3.08954305,3 3.2,3 L6.8,3 Z M12.8,3 C12.9104569,3 13,3.08954305 13,3.2 L13,6.8 C13,6.91045695 12.9104569,7 12.8,7 L9.2,7 C9.08954305,7 9,6.91045695 9,6.8 L9,3.2 C9,3.08954305 9.08954305,3 9.2,3 L12.8,3 Z M12,4 L10,4 L10,6 L12,6 L12,4 Z M2.5,5.70654635e-14 C2.77614237,5.70654635e-14 3,0.223857625 3,0.5 C3,0.776142375 2.77614237,1 2.5,1 L1.6,1 C1.26862915,1 1,1.26862915 1,1.6 L1,2.5 C1,2.77614237 0.776142375,3 0.5,3 C0.223857625,3 0,2.77614237 0,2.5 L0,1 C0,0.44771525 0.44771525,5.70654635e-14 1,5.70654635e-14 L2.5,5.70654635e-14 Z M15,0 C15.5522847,0 16,0.44771525 16,1 L16,2.5 C16,2.77614237 15.7761424,3 15.5,3 C15.2238576,3 15,2.77614237 15,2.5 L15,1.6 C15,1.26862915 14.7313708,1 14.4,1 L13.5,1 C13.2238576,1 13,0.776142375 13,0.5 C13,0.223857625 13.2238576,0 13.5,0 L15,0 Z M9.5,5.67323966e-14 C9.77614237,5.67323966e-14 10,0.223857625 10,0.5 C10,0.776142375 9.77614237,1 9.5,1 L6.5,1 C6.22385763,1 6,0.776142375 6,0.5 C6,0.223857625 6.22385763,5.67323966e-14 6.5,5.67323966e-14 L9.5,5.67323966e-14 Z"}}]},active:i,hidden:!u,label:a.get("Object.OrgChart.SingleSelect")})),[i,u]),r((()=>{const e=e=>{"Shift"===e.key&&l(!0)},t=e=>{"Shift"===e.key&&l(!1)};return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}}),[]),c}(C);g((()=>{mt(C)}),[v,C.language()]),r((()=>{M.constraints=_}),[_]),r((()=>{M.transform=T}),[T]),r((()=>{M.expandedState=L}),[L]);const I=e=>{e.useTransitions=!0,R(e)},[D]=m((()=>{if(!i)return Promise.resolve();const e=function(e){var t=e.theme,n=e.config,r=void 0===n?{}:n,o=r.id,a=r.resolve,i=void 0===a?[]:a,l=r.transform,s=void 0===l?[]:l,u=r.extend,c=void 0===u?[]:u,d={theme:t,matrix:Ge(i),styles:void 0};return d.styles=Ye({theme:t,id:o,transform:s,extend:c,matrix:d.matrix}),{getStyles:function(){return d.styles},getTheme:function(){return d.theme},setTheme:function(e){d.theme=e,d.styles=Ye({theme:e,id:o,transform:s,extend:c,matrix:d.matrix})}}}({theme:y,config:{id:"orgChart",resolve:[["object.orgChart","card.title.main","fontSize",Xe.CARD_TITLE_FONTSIZE],["object.orgChart","card.title.subTitle","fontSize",Xe.CARD_BODY_FONTSIZE],["object.orgChart","card.label.description","fontSize",Xe.CARD_BODY_FONTSIZE],["object.orgChart","card.label.measureLabel","fontSize",Xe.CARD_BODY_FONTSIZE],["object.orgChart","card.label.measureValue","fontSize",Xe.CARD_BODY_FONTSIZE],["object.orgChart","card.title.main","fontFamily","'Source Sans Pro', 'Arial', 'sans-serif'"],["object.orgChart","card.title.subTitle","fontFamily","'Source Sans Pro', 'Arial', 'sans-serif'"],["object.orgChart","card.label.description","fontFamily","'Source Sans Pro', 'Arial', 'sans-serif'"],["object.orgChart","card.label.measureLabel","fontFamily","'Source Sans Pro', 'Arial', 'sans-serif'"],["object.orgChart","card.label.measureValue","fontFamily","'Source Sans Pro', 'Arial', 'sans-serif'"]]}}),t=Vi(x,i);return t&&t.expandedState&&R(t.expandedState),t&&t.transform&&A(t.transform),Oi({layout:i,model:b,translator:C}).then((t=>(S(null!=l&&l.isEnabled("IM_5036_ORGCHART_STYLING")?(({themeService:e,layout:t})=>{var n,r,o,a,i,l,s,u,c,d,h,p,f,g,m,b,v,y,x,w,_,C,O,k,E,S,L,R,T,A,N,z,M,j,I,D,$,B,P,q,F,V,U,H,K,G,Z;const Y=e.getStyles(),W=(X="card",null!==(J=null===(Q=t.components)||void 0===Q?void 0:Q.find((e=>e.key===X)))&&void 0!==J?J:void 0);var X,J,Q;const ee=e.getTheme(),te=Fi(W,null==W||null===(n=W.title)||void 0===n?void 0:n.main,t),ne=Fi(W,null==W||null===(r=W.title)||void 0===r?void 0:r.subTitle,t),re=Fi(W,null==W||null===(o=W.label)||void 0===o?void 0:o.description,t),oe=Fi(W,null==W||null===(a=W.label)||void 0===a?void 0:a.measureLabel,t),ae=Fi(W,null==W||null===(i=W.label)||void 0===i?void 0:i.measureValue,t),ie={useColorExpression:qi(W,null==W||null===(l=W.background)||void 0===l?void 0:l.useColorExpression,"byExpression"===(null==t||null===(s=t.style)||void 0===s||null===(s=s.backgroundColor)||void 0===s?void 0:s.colorType),Xe.BACKGROUND_USE_EXPRESSION),color:qi(W,null==W||null===(u=W.background)||void 0===u?void 0:u.color,null==t||null===(c=t.style)||void 0===c||null===(c=c.backgroundColor)||void 0===c?void 0:c.color,Xe.BACKGROUND_COLOR),colorExpression:qi(W,null==W||null===(d=W.background)||void 0===d?void 0:d.colorExpression,null==t||null===(h=t.style)||void 0===h||null===(h=h.backgroundColor)||void 0===h?void 0:h.colorExpression,"")},le={topBar:qi(W,null==W||null===(p=W.border)||void 0===p?void 0:p.topBar,null==t||null===(f=t.style)||void 0===f||null===(f=f.border)||void 0===f?void 0:f.top,Xe.BORDER_TOP),fullBorder:qi(W,null==W||null===(g=W.border)||void 0===g?void 0:g.fullBorder,null==t||null===(m=t.style)||void 0===m||null===(m=m.border)||void 0===m?void 0:m.fullBorder,Xe.BORDER_FULL),contrastColor:qi(W,null==W||null===(b=W.border)||void 0===b?void 0:b.contrastColor,"auto"===(null==t||null===(v=t.style)||void 0===v||null===(v=v.border)||void 0===v?void 0:v.colorType),!0),useColorExpression:qi(W,null==W||null===(y=W.border)||void 0===y?void 0:y.useColorExpression,"byExpression"===(null==t||null===(x=t.style)||void 0===x||null===(x=x.border)||void 0===x?void 0:x.colorType),Xe.BORDER_USE_EXPRESSION),color:qi(W,null==W||null===(w=W.border)||void 0===w?void 0:w.color,null==t||null===(_=t.style)||void 0===_||null===(_=_.border)||void 0===_?void 0:_.color,Xe.BORDER_COLOR),colorExpression:qi(W,null==W||null===(C=W.border)||void 0===C?void 0:C.colorExpression,null==t||null===(O=t.style)||void 0===O||null===(O=O.border)||void 0===O?void 0:O.colorExpression,"")},se=qi(W,null==W?void 0:W.contrastTextColor,"auto"===(null==t||null===(k=t.style)||void 0===k||null===(k=k.fontColor)||void 0===k?void 0:k.colorType),!0),ue=Pi(te,ee,"default",se),ce=Pi(ne,ee,"default",se),de=Pi(re,ee,"default",se),he=Pi(oe,ee,"default",se),pe=Pi(ae,ee,"default",se),fe=Pi(ie,ee,Xe.BACKGROUND_COLOR.color,!1),ge=Pi(le,ee,sa.getDarkColor(fe),le.contrastColor),me=t.qHyperCube.qMeasureInfo.length?t.qHyperCube.qMeasureInfo[0].qFallbackTitle:null;return{cardTitle:{fontSize:qi(W,null==W||null===(E=W.title)||void 0===E||null===(E=E.main)||void 0===E?void 0:E.fontSize,Xe.CARD_TITLE_FONTSIZE,Y.card.title.main.fontSize),fontFamily:null!==(S=null==W||null===(L=W.title)||void 0===L||null===(L=L.main)||void 0===L?void 0:L.fontFamily)&&void 0!==S?S:Y.card.title.main.fontFamily,fontColor:ue},cardSubTitle:{fontSize:qi(W,null==W||null===(R=W.title)||void 0===R||null===(R=R.subTitle)||void 0===R?void 0:R.fontSize,Xe.CARD_BODY_FONTSIZE,Y.card.title.subTitle.fontSize),fontFamily:null!==(T=null==W||null===(A=W.title)||void 0===A||null===(A=A.subTitle)||void 0===A?void 0:A.fontFamily)&&void 0!==T?T:Y.card.title.subTitle.fontFamily,fontColor:ce},cardDescription:{fontSize:qi(W,null==W||null===(N=W.label)||void 0===N||null===(N=N.description)||void 0===N?void 0:N.fontSize,Xe.CARD_BODY_FONTSIZE,Y.card.label.description.fontSize),fontFamily:null!==(z=null==W||null===(M=W.label)||void 0===M||null===(M=M.description)||void 0===M?void 0:M.fontFamily)&&void 0!==z?z:Y.card.label.description.fontFamily,fontColor:de},cardMeasureLabel:{fontSize:qi(W,null==W||null===(j=W.label)||void 0===j||null===(j=j.measureLabel)||void 0===j?void 0:j.fontSize,Xe.CARD_BODY_FONTSIZE,Y.card.label.measureLabel.fontSize),fontFamily:null!==(I=null==W||null===(D=W.label)||void 0===D||null===(D=D.measureLabel)||void 0===D?void 0:D.fontFamily)&&void 0!==I?I:Y.card.label.measureLabel.fontFamily,fontColor:he},cardMeasureValue:{fontSize:qi(W,null==W||null===($=W.label)||void 0===$||null===($=$.measureValue)||void 0===$?void 0:$.fontSize,Xe.CARD_BODY_FONTSIZE,Y.card.label.measureValue.fontSize),fontFamily:null!==(B=null==W||null===(P=W.label)||void 0===P||null===(P=P.measureValue)||void 0===P?void 0:P.fontFamily)&&void 0!==B?B:Y.card.label.measureValue.fontFamily,fontColor:pe},cardContrastTextColor:se,cardBackgroundColor:fe,cardBorder:{topBar:le.topBar,fullBorder:le.fullBorder,contrastColor:le.contrastColor,borderColor:ge},cardImage:{location:null!==(q=null==W||null===(F=W.image)||void 0===F?void 0:F.location)&&void 0!==q?q:Xe.IMAGE_LOCATION,alignment:null!==(V=null==W||null===(U=W.image)||void 0===U?void 0:U.alignment)&&void 0!==V?V:Xe.IMAGE_ALIGNMENT,shape:null!==(H=null==W||null===(K=W.image)||void 0===K?void 0:K.shape)&&void 0!==H?H:Xe.IMAGE_SHAPE,clip:null!==(G=null==W||null===(Z=W.image)||void 0===Z?void 0:Z.clip)&&void 0!==G?G:Xe.IMAGE_CLIP},measureLabel:me}})({themeService:e,layout:i}):Bi({Theme:y,layout:i})),j.setState([]),t)))}),[i,b,C.language(),y.name()]),$=()=>{if(v&&D&&E){const e=Vi(x,i),t=Ci(E,l);Mi({element:v,dataTree:D,viewState:e,wrapperState:M,selectionObj:j,setInitialZoom:z,setTransform:A,setExpandedState:R,setContainerData:k,layout:i,flags:l,actualCardHeight:t})}},B=()=>{if(O&&L&&E){const e=Ci(E,l);(({containerData:e,styling:t,setExpandedCallback:n,wrapperState:r,selectionObj:o,element:a,flags:i,actualCardHeight:l})=>{const{svg:s,divBox:u,allNodes:c,positioning:d,tooltip:h}=e,{navigationMode:p}=c.data;u.selectAll("*").remove(),s.selectAll("*").remove();const f=zi(r.expandedState,c,!1,p);Li({positioning:d,divBox:u,nodes:f,styling:t,setExpandedCallback:n,wrapperState:r,selectionObj:o,navigationMode:p,element:a,tooltip:h,flags:i,actualCardHeight:l}),Ri(s.selectAll(".sn-org-paths").data(f).enter(),d,r.expandedState.topId,p,l)})({containerData:O,styling:E,setExpandedCallback:I,wrapperState:M,selectionObj:j,useTransitions:L.useTransitions,element:v,flags:l,actualCardHeight:e})}};r((()=>{B()}),[O,j.state]),r((()=>{$()}),[v,D,_]),r((()=>{i.resizeOnExpand?$():B()}),[L]),r((()=>{if(O&&i&&i.snapshotData){const e=((e,t,n)=>{if(!t)return Wo.translate(n.x,n.y).scale(n.zoom);const{size:r}=t,o=e.width/r.w>e.height/r.h?e.height/r.h:e.width/r.w,a=t.transform.x*o,i=t.transform.y*o,l=t.transform.zoom*o;return Wo.translate(a,i).scale(l)})(w,i.snapshotData.viewState,T);Ni(e,O.svg,O.divBox,w.width,w.height),O.divBox.classed("sn-org-chart-snapshot",!0)}}),[w,O]),Ii(L,O,i,T,N)},ext:ft(i)}}export{Ui as default};