@nebula.js/sn-org-chart 1.1.0 → 1.2.0
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/README.md +2 -2
- package/api-specifications/properties.json +185 -171
- package/core/esm/index.js +5 -3
- package/core/package.json +2 -2
- package/dist/sn-org-chart.js +5 -3
- package/dist/sn-org-chart.systemjs.js +5 -3
- package/package.json +79 -61
- package/sn-org-chart-ext/assets/preview.png +0 -0
- package/sn-org-chart-ext/dist/sn-org-chart.js +5 -3
- package/sn-org-chart-ext/ext.js +7 -0
- package/sn-org-chart-ext/sn-org-chart.qext +4 -3
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @nebula.js/sn-org-chart v1.
|
|
3
|
-
* Copyright (c)
|
|
2
|
+
* @nebula.js/sn-org-chart v1.2.0
|
|
3
|
+
* Copyright (c) 2024 QlikTech International AB
|
|
4
4
|
* Released under the MIT license.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
System.register(["@nebula.js/stardust"],(function(t){"use strict";var e,n,r,o,i,a,s,l,u,c,h,f,d,p,g,m;return{setters:[function(t){e=t.useElement,n=t.onTakeSnapshot,r=t.useImperativeHandle,o=t.useState,i=t.useSelections,a=t.useLayout,s=t.useEffect,l=t.useAction,u=t.useStaleLayout,c=t.useModel,h=t.useTheme,f=t.useOptions,d=t.useRect,p=t.useConstraints,g=t.useTranslator,m=t.usePromise}],execute:function(){t("default",(function(t){return{qae:{properties:v,data:b},component:()=>{const t=u(),v=c(),b=e(),x=h(),w=f(),_=d(),C=p(),L=g(),[k,O]=o(null),[E,M]=o(null),[R,A]=o(null),[T,N]=o(null),[S,z]=o(null),[D]=o({transform:{},constraints:C,expandedState:R}),q=function(t){const[e,n]=o(!1),r=i(),u=!!a().qSelectionInfo.qInSelections,[c]=o({api:r,setState:t=>{c.state=t},state:[],singleSelect:!1});s((()=>{Bo(t)}),[t]);const h=()=>{c.state=[]},f=()=>{c.state=[],n(!1)};return s((()=>c.api?(c.api=r,c.api.on("deactivated",h),c.api.on("canceled",f),c.api.on("confirmed",f),c.api.on("cleared",h),()=>{c.api.removeListener("deactivated",h),c.api.removeListener("canceled",f),c.api.removeListener("confirmed",f),c.api.removeListener("cleared",h)}):()=>{}),[r]),s((()=>{c.singleSelect=e}),[e]),l((()=>({action(){n(!e)},icon:{shapes:[{type:"path",attrs:{d:zo}}]},active:e,hidden:!u,label:t.get("Object.OrgChart.SingleSelect")})),[e,u]),s((()=>{const t=t=>{"Shift"===t.key&&n(!0)},e=t=>{"Shift"===t.key&&n(!1)};return document.addEventListener("keydown",t),document.addEventListener("keyup",e),()=>{document.removeEventListener("keydown",t),document.removeEventListener("keyup",e)}}),[]),c}(L);s((()=>{Bo(L)}),[L.language()]),s((()=>{D.constraints=C}),[C]),s((()=>{D.transform=T}),[T]),s((()=>{D.expandedState=R}),[R]);const $=t=>{t.useTransitions=!0,A(t)},[P]=m((()=>{if(!t)return Promise.resolve();const e=Io(w,t);return e&&e.expandedState&&A(e.expandedState),e&&e.transform&&N(e.transform),async function({layout:t,model:e,translator:n}){if(!t.qHyperCube)throw new Error("Require a hypercube");if(t.qHyperCube.qDimensionInfo.length<2)return!1;const{status:r,dataMatrix:o}=await(async(t,e)=>{if(t.snapshotData)return{status:"",dataMatrix:t.snapshotData.dataMatrix};const n=t.qHyperCube&&t.qHyperCube.qDataPages,r=t.qHyperCube.qSize.qcy,o=n[0].qArea.qHeight,i=[...n[0].qMatrix];let a="";r>o&&1===n.length&&e?a=await wo(t.qHyperCube.qDataPages,i,e,r,o,0,t.rowLimit/go||10):n.forEach(((t,e)=>{e>0&&i.push(...t.qMatrix)}));return{status:a,dataMatrix:i}})(t,e),i=function(t){if(t&&t.length){const e=[];return t.forEach(((t,n)=>{mo[t.id]&&e.push({prop:mo[t.id],index:n})})),e}return[]}(t.qHyperCube.qDimensionInfo[0].qAttrExprInfo);if(!o)return null;if(o.length<1)return null;return function(t,e,n,r,o){const i={},a=[];for(let n=0;n<t.length;++n){const r=t[n],o=bo(r),s={id:o,parentId:xo(r),children:[],elemNo:r[0].qElemNumber,attributes:_o(e,r[0].qAttrExps),measure:r[2]&&r[2].qText,rowNo:n};i[o]=s,a.push(s)}const s=[];let l=!1;for(let t=0;t<a.length;++t){const e=a[t],n=i[e.parentId];e.parent=n,n?n.children.length>98?l=!0:n.children.push({childNumber:n.children.length,...e}):s.length>98?l=!0:s.push(e)}if(0===s.length)return{error:vo,message:o.get("Object.OrgChart.MissingRoot")};const u=[];n===yo&&u.push(o.get("Object.OrgChart.MaxData"));l&&u.push(o.get("Object.OrgChart.MaxChildren"));(function(t){const e={},n={};function r(t){e[t.id]=!0,n[t.id]=!0;for(let o=0;o<t.children.length;++o){if(!e[t.children[o].id]&&r(t.children[o]))return!0;if(n[t.children[o].id])return!0}return n[t.id]=!1,!1}for(let n=0;n<t.length;++n){const o=t[n];if(!e[o.id]&&r(o))return!0}return!1})(a)&&u.push(o.get("Object.OrgChart.CycleWarning"));if(1===s.length)return s[0].warn=u,s[0].navigationMode=r,s[0];u.push(o.get("Object.OrgChart.DummyWarn"));const c={id:"Root",name:o.get("Object.OrgChart.DummyRoot"),isDummy:!0,warn:u,children:s,navigationMode:r};return s.forEach(((t,e)=>{t.parentId="Root",t.parent=c,t.childNumber=e})),c}(o,i,r,t.navigationMode,n)}({layout:t,model:v,translator:L}).then((e=>(M(Ho({Theme:x,layout:t})),q.setState([]),e)))}),[t,v,L.language(),x.name()]),B=()=>{if(b&&P){const e=Io(w,t);qo({element:b,dataTree:P,viewState:e,wrapperState:D,selectionObj:q,setInitialZoom:z,setTransform:N,setExpandedState:A,setContainerData:O,layout:t})}},j=()=>{k&&R&&E&&(({containerData:t,styling:e,setExpandedCallback:n,wrapperState:r,selectionObj:o,element:i})=>{const{svg:a,divBox:s,allNodes:l,positioning:u,tooltip:c}=t,{navigationMode:h}=l.data;s.selectAll("*").remove(),a.selectAll("*").remove();const f=Do(r.expandedState,l,!1,h);!function({positioning:t,divBox:e,nodes:n,styling:r,setExpandedCallback:o,wrapperState:i,selectionObj:a,navigationMode:s,element:l,tooltip:u}){const{x:c,y:h}=t,{cardWidth:f,cardHeight:d,buttonWidth:p,buttonHeight:g,cardPadding:m,rootDiameter:v}=Lo,{topId:b}=i.expandedState,x=n.find((t=>t.data.id===b)),w=x&&x.parent?x.parent.ancestors().map((t=>t.data.id)):[],_=document.getElementsByTagName("html")[0].classList.contains("touch-on");e.selectAll(".sn-org-nodes").data(n.filter((t=>t.parent&&"Root"===t.parent.data.id))).enter().append("div").attr("class","sn-org-root").attr("style",(t=>`top:${h(t)-v-m}px;left:${c(t)+(f-v)/2}px`)).attr("id",(t=>t.data.id)),e.selectAll(".sn-org-nodes").data(n.filter((t=>"Root"!==t.data.id))).enter().append("div").attr("class","sn-org-card").attr("style",(t=>`width:${f}px;height:${d}px; top:${h(t)}px;left:${c(t)}px;`)).attr("id",(t=>t.data.id)).on("click",(t=>{i.constraints.active||"Root"===t.data.id||(_&&To(u,t,l.clientHeight,r,c,h,i.transform,0),Ao(t,a))})).html((t=>((t,e,n)=>{const{api:r,state:o}=n,i=r&&r.isActive()&&-1!==o.indexOf(t.elemNo),a=function(t,e){if(t.attributes&&t.attributes.color){const e=po.resolveExpression(t.attributes.color);if("none"!==e)return e}return Ro(e.backgroundColor)}(t,e),s=Ro(function(t,e){if("default"===t.fontColor)return po.isDarkColor(e)?y.FONT_COLOR_LIGHT.color:y.FONT_COLOR_DARK.color;return t.fontColor}(e,a)),l=t.attributes||{};let u=`<div class="sn-org-card-title">${Eo(l.label||t.id)}</div>`;l.subLabel&&(u+=`<div class="sn-org-card-label">${Eo(l.subLabel)}</div>`);if(t.measure){const n=e.measureLabel?`${e.measureLabel}: `:"";u+=`<div class="sn-org-card-label">${Eo(n+t.measure)}</div>`}else l.extraLabel&&(u+=`<div class="sn-org-card-label">${Eo(l.extraLabel)}</div>`);const c=r&&r.isActive()?i?" selected":" not-selected":"",{top:h=y.BORDER_TOP,fullBorder:f=y.BORDER_FULL,colorType:d=y.BORDER_COLOR_TYPE}=e.border,p="auto"===d?po.getDarkColor(a):Ro(e.borderColor),g=h&&!i?`3px solid ${p}`:"",m=f&&!i?`1px solid ${p}`:"";let v=Lo.cardHeight;i?v-=8:f?v-=4:h&&(v-=3);return`<div class="sn-org-card-text${c}" style="background-color:${a};color:${s}; border:${m}; border-top:${g}; height:${v}px;">${u}</div>`})(t.data,r,a))).on("mouseenter",(t=>{_||i.constraints.active||0!==event.buttons||To(u,t,l.clientHeight,r,c,h,i.transform)})).on("mouseleave",(()=>{!_&&No(u)})).on("mousedown",(()=>{No(u)})).on("touchmove",(()=>{No(u)})).on("wheel",(()=>{No(u)})),"expandAll"!==s&&e.selectAll(".sn-org-nodes").data(n.filter((t=>!!t.children&&"Root"!==t.data.id))).enter().append("div").attr("class","sn-org-traverse").attr("style",(t=>`width:${p}px;height:${g}px;top:${h(t)+d+m}px;left:${c(t)+(f-p)/2}px;`)).attr("id",(t=>`${t.data.id}-expand`)).on("mouseenter",(()=>{i.constraints.active||(event.target.style.cursor="pointer")})).on("click",(t=>{i.constraints.active||(o(((t,{topId:e,isExpanded:n,expandedChildren:r},o)=>{if(t.data.id===e)n=!n,r=[];else if(o.includes(t.data.id))e=t.parent?t.parent.data.id:t.data.id,n=!!t.parent,r=[];else if(t.parent.data.id===e){const e=t.parent.children.filter((t=>r.includes(t.data.id))).every((t=>Co(t.children)));r.includes(t.data.id)?r.splice(r.indexOf(t.data.id),1):Co(t.children)&&e?r.push(t.data.id):r=[t.data.id]}else e=t.parent.data.id,n=!0,r=[t.data.id];return{topId:e,isExpanded:n,expandedChildren:r}})(t,i.expandedState,w)),event.stopPropagation())})).html((t=>`${((t,{topId:e,isExpanded:n,expandedChildren:r},o)=>{if(t.data.id===e&&n||t.parent&&t.parent.data.id===e&&r.includes(t.data.id)||o.includes(t.data.id))return"-";return"+"})(t,i.expandedState,w)} ${t.data.children.length}`))}({positioning:u,divBox:s,nodes:f,styling:e,setExpandedCallback:n,wrapperState:r,selectionObj:o,navigationMode:h,element:i,tooltip:c});!function(t,e,n,r){t.append("path").attr("class","sn-org-path").attr("id",(t=>t.data.id)).attr("d",(t=>{let n="";const o=function(t,e,{depthSpacing:n,isVertical:r,x:o,y:i},a){const{cardWidth:s,cardHeight:l,buttonHeight:u,cardPadding:c,buttonMargin:h}=Lo,f=[],d={x:s/2,y:l/2},p={x:t.xActual,y:t.yActual};if(t.parent&&"Root"!==t.parent.data.id){const e=n/2,s="expandAll"===a?l:l+c+u,g={x:o(t.parent)+d.x,y:i(t.parent)+s};"expandAll"!==a&&Co(t.parent.children)?f.push(r?[{x:p.x,y:p.y+d.y},{x:g.x-d.x,y:p.y+d.y},{x:g.x-d.x,y:g.y+h},{x:g.x,y:g.y+h},{x:g.x,y:g.y}]:[{x:p.x,y:p.y},{x:p.x,y:g.y-d.y},{x:g.x+e,y:g.y-d.y},{x:g.x+e,y:g.y},{x:g.x,y:g.y}]):p.x===o(t.parent)||p.y===i(t.parent)?f.push([{x:p.x+d.x,y:p.y},{x:g.x,y:g.y}]):f.push(r?[{x:p.x+d.x,y:p.y},{x:p.x+d.x,y:p.y-c},{x:g.x,y:p.y-c},{x:g.x,y:g.y}]:[{x:p.x,y:p.y},{x:p.x-c,y:p.y},{x:p.x-c,y:g.y},{x:g.x,y:g.y}])}else t.parent&&f.push([{x:p.x+d.x,y:p.y},{x:p.x+d.x,y:p.y-c}]);t.children&&"Root"!==t.data.id&&f.push([{x:p.x+d.x,y:p.y+l},{x:p.x+d.x,y:p.y+l+c}]);return f}(t,0,e,r);return o.forEach((t=>{n+=function(t){const{r:e}=Lo;let n,r=`M ${t[0].x} ${t[0].y} `;const o=e=>{const r={x:t[e].x-t[e-1].x,y:t[e].y-t[e-1].y};n={x:(r.x>0)-(r.x<0)||+r.x,y:(r.y>0)-(r.y<0)||+r.y}};o(1);for(let i=1;i<t.length;++i){const a=t[i];i<t.length-1?(r+=`L ${a.x-n.x*e} ${a.y-n.y*e} `,o(i+1),r+=`Q ${a.x} ${a.y} ${a.x+n.x*e} ${a.y+n.y*e} `):r+=`L ${a.x} ${a.y} `}return r}(t).slice(0,-1)})),n}))}(a.selectAll(".sn-org-paths").data(f).enter(),u,r.expandedState.topId,h)})({containerData:k,styling:E,setExpandedCallback:$,wrapperState:D,selectionObj:q,useTransitions:R.useTransitions,element:b})};s((()=>{j()}),[k,q.state]),s((()=>{B()}),[b,P,C]),s((()=>{t.resizeOnExpand?B():j()}),[R]),s((()=>{if(k&&t&&t.snapshotData){const e=((t,e,n)=>{if(!e)return no.translate(n.x,n.y).scale(n.zoom);const{size:r}=e,o=t.width/r.w>t.height/r.h?t.height/r.h:t.width/r.w,i=e.transform.x*o,a=e.transform.y*o,s=e.transform.zoom*o;return no.translate(i,a).scale(s)})(_,t.snapshotData.viewState,T);So(e,k.svg,k.divBox,_.width,_.height)}}),[_,k]),function(t,o,i,a,s){const l=e();n((e=>{e.snapshotData||(e.snapshotData={}),i.snapshotData&&i.snapshotData.viewState||(e.snapshotData.viewState=$o(t,a,s,l)),e.snapshotData.dataMatrix=((t,e,n)=>{if(n.snapshotData&&n.snapshotData.dataMatrix)return n.snapshotData.dataMatrix;const{navigationMode:r}=n,o=Do(t,e,!0,r),i=[],{qDataPages:a}=n.qHyperCube,s=[];return a.forEach((t=>{s.push(...t.qMatrix)})),o.forEach((t=>{void 0!==t.data.rowNo&&i.push(s[t.data.rowNo])})),i})(t,o.allNodes,i)})),r((()=>({getViewState:()=>$o(t,a,s,l)})))}(R,k,t,T,S)},ext:k}}));var y={FONT_COLOR_TYPE:"auto",FONT_COLOR_DARK:{index:-1,color:"#484848"},FONT_COLOR_LIGHT:{index:-1,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};const v={qHyperCubeDef:{qDimensions:[],qMeasures:[],qInitialDataFetch:[{qWidth:5,qHeight:500}],qSuppressZero:!1,qSuppressMissing:!0},showTitles:!0,title:"",subtitle:"",footnote:"",navigationMode:"free",resizeOnExpand:!1,style:{fontColor:{colorType:y.FONT_COLOR_TYPE,color:y.FONT_COLOR_DARK,colorExpression:""},backgroundColor:{colorType:y.BACKGROUND_COLOR_TYPE,color:y.BACKGROUND_COLOR,colorExpression:""},border:{top:y.BORDER_TOP,fullBorder:y.BORDER_FULL,colorType:y.BORDER_COLOR_TYPE,color:y.BORDER_COLOR,colorExpression:""}}};var b={targets:[{path:"/qHyperCubeDef",dimensions:{min:2,max:2},measures:{min:0,max:1}}]};var x={getValue:function(t,e,n){const r=e.split(".");let o;if(void 0===t)return n;let i=t;for(o=0;o<r.length;++o){if(void 0===i[r[o]])return n;i=i[r[o]]}return i}};const w=[{value:"auto",translation:"Common.Auto"},{value:"colorPicker",translation:"properties.colorMode.primary"},{value:"byExpression",translation:"properties.colorMode.byExpression"}],_=t=>x.getValue(t,"style.border.top")||x.getValue(t,"style.border.fullBorder");var C,L,k={definition:{type:"items",component:"accordion",items:{data:{uses:"data",items:{measures:{disabledRef:""},dimensions:{disabledRef:"",items:{dimensionLimits:{show:!1},attributes:{component:"attribute-expression-reference",defaultValue:[],show:(t,e)=>e.getDimensions()[0]===t,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"},{component:"expression",ref:"qExpression",translation:"Object.OrgChart.ColorLabelExpression",defaultValue:"",id:"colorByExpression",tid:"nodeColorByExpression"}]},desc:{show:(t,e)=>e.getDimensions()[0]===t,component:"text",translation:"Object.OrgChart.ExtraLabelDesc",style:"hint"}}}}},sorting:{uses:"sorting"},addOns:{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}}}}},settings:{uses:"settings",items:{styling:{grouped:!0,translation:"properties.presentation",type:"items",items:{navigation:{type:"items",items:{navigationMode:{ref:"navigationMode",type:"string",translation:"Object.OrgChart.NavigationMode",component:"dropdown",defaultValue:"free",options:[{value:"free",translation:"Object.OrgChart.FreeMode"},{value:"expandAll",translation:"Object.OrgChart.ExpandAll"}]},resizeOnExpand:{ref:"resizeOnExpand",type:"boolean",defaultValue:!1,translation:"Object.OrgChart.resizeOnExpand",show:t=>"expandAll"!==x.getValue(t,"navigationMode")}}},backgroundColor:{type:"items",items:{useColorExpression:{ref:"style.backgroundColor.colorType",type:"string",translation:"Object.OrgChart.BackgroundColor",component:"dropdown",defaultValue:y.BACKGROUND_COLOR_TYPE,options:w},colorPicker:{component:"color-picker",type:"object",ref:"style.backgroundColor.color",translation:"properties.color",dualOutput:!0,defaultValue:y.BACKGROUND_COLOR,show:t=>"colorPicker"===x.getValue(t,"style.backgroundColor.colorType")},colorExpression:{component:"string",type:"string",ref:"style.backgroundColor.colorExpression",translation:"Common.Expression",expression:"optional",defaultValue:"",show:t=>"byExpression"===x.getValue(t,"style.backgroundColor.colorType")}}},fontColor:{type:"items",items:{useColorExpression:{ref:"style.fontColor.colorType",type:"string",translation:"Object.OrgChart.FontColor",component:"dropdown",defaultValue:y.FONT_COLOR_TYPE,options:w},colorPicker:{component:"color-picker",type:"object",ref:"style.fontColor.color",translation:"properties.color",dualOutput:!0,defaultValue:y.FONT_COLOR_DARK,show:t=>"colorPicker"===x.getValue(t,"style.fontColor.colorType")},colorExpression:{component:"string",type:"string",ref:"style.fontColor.colorExpression",translation:"Common.Expression",expression:"optional",defaultValue:"",show:t=>"byExpression"===x.getValue(t,"style.fontColor.colorType")}}},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:y.BORDER_TOP},fullBorder:{type:"boolean",ref:"style.border.fullBorder",translation:"properties.border",defaultValue:y.BORDER_FULL},colorType:{component:"dropdown",type:"string",ref:"style.border.colorType",translation:"properties.border.color",defaultValue:y.BORDER_COLOR_TYPE,options:w,show:t=>_(t)},colorPicker:{component:"color-picker",type:"object",ref:"style.border.color",translation:"properties.color",dualOutput:!0,defaultValue:y.BORDER_COLOR,show:t=>_(t)&&"colorPicker"===x.getValue(t,"style.border.colorType")},colorExpression:{component:"string",type:"string",ref:"style.border.colorExpression",translation:"Common.Expression",expression:"optional",defaultValue:"",show:t=>_(t)&&"byExpression"===x.getValue(t,"style.border.colorType")}}}}}}}}},support:{export:!0,exportData:!0,snapshot:!0,viewData:!0}};function O(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}1===(C=O).length&&(L=C,C=function(t,e){return O(L(t),e)});var E={value:function(){}};function M(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new R(r)}function R(t){this._=t}function A(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function T(t,e){for(var n,r=0,o=t.length;r<o;++r)if((n=t[r]).name===e)return n.value}function N(t,e,n){for(var r=0,o=t.length;r<o;++r)if(t[r].name===e){t[r]=E,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}R.prototype=M.prototype={constructor:R,on:function(t,e){var n,r=this._,o=A(t+"",r),i=-1,a=o.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++i<a;)if(n=(t=o[i]).type)r[n]=N(r[n],t.name,e);else if(null==e)for(n in r)r[n]=N(r[n],t.name,null);return this}for(;++i<a;)if((n=(t=o[i]).type)&&(n=T(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new R(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,o=new Array(n),i=0;i<n;++i)o[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(i=0,n=(r=this._[t]).length;i<n;++i)r[i].value.apply(e,o)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],o=0,i=r.length;o<i;++o)r[o].value.apply(e,n)}};var S="http://www.w3.org/1999/xhtml",z={svg:"http://www.w3.org/2000/svg",xhtml:S,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function D(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),z.hasOwnProperty(e)?{space:z[e],local:t}:t}function q(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===S&&e.documentElement.namespaceURI===S?e.createElement(t):e.createElementNS(n,t)}}function $(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function P(t){var e=D(t);return(e.local?$:q)(e)}function B(){}function j(t){return null==t?B:function(){return this.querySelector(t)}}function H(){return[]}function I(t){return null==t?H:function(){return this.querySelectorAll(t)}}function V(t){return function(){return this.matches(t)}}function U(t){return new Array(t.length)}function Z(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Z.prototype={constructor:Z,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function Y(t,e,n,r,o,i){for(var a,s=0,l=e.length,u=i.length;s<u;++s)(a=e[s])?(a.__data__=i[s],r[s]=a):n[s]=new Z(t,i[s]);for(;s<l;++s)(a=e[s])&&(o[s]=a)}function X(t,e,n,r,o,i,a){var s,l,u,c={},h=e.length,f=i.length,d=new Array(h);for(s=0;s<h;++s)(l=e[s])&&(d[s]=u="$"+a.call(l,l.__data__,s,e),u in c?o[s]=l:c[u]=l);for(s=0;s<f;++s)(l=c[u="$"+a.call(t,i[s],s,i)])?(r[s]=l,l.__data__=i[s],c[u]=null):n[s]=new Z(t,i[s]);for(s=0;s<h;++s)(l=e[s])&&c[d[s]]===l&&(o[s]=l)}function F(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function W(t){return function(){this.removeAttribute(t)}}function G(t){return function(){this.removeAttributeNS(t.space,t.local)}}function K(t,e){return function(){this.setAttribute(t,e)}}function Q(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function J(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function tt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function et(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function nt(t){return function(){this.style.removeProperty(t)}}function rt(t,e,n){return function(){this.style.setProperty(t,e,n)}}function ot(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function it(t,e){return t.style.getPropertyValue(e)||et(t).getComputedStyle(t,null).getPropertyValue(e)}function at(t){return function(){delete this[t]}}function st(t,e){return function(){this[t]=e}}function lt(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function ut(t){return t.trim().split(/^|\s+/)}function ct(t){return t.classList||new ht(t)}function ht(t){this._node=t,this._names=ut(t.getAttribute("class")||"")}function ft(t,e){for(var n=ct(t),r=-1,o=e.length;++r<o;)n.add(e[r])}function dt(t,e){for(var n=ct(t),r=-1,o=e.length;++r<o;)n.remove(e[r])}function pt(t){return function(){ft(this,t)}}function gt(t){return function(){dt(this,t)}}function mt(t,e){return function(){(e.apply(this,arguments)?ft:dt)(this,t)}}function yt(){this.textContent=""}function vt(t){return function(){this.textContent=t}}function bt(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function xt(){this.innerHTML=""}function wt(t){return function(){this.innerHTML=t}}function _t(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function Ct(){this.nextSibling&&this.parentNode.appendChild(this)}function Lt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function kt(){return null}function Ot(){var t=this.parentNode;t&&t.removeChild(this)}function Et(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Mt(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}ht.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Rt={},At=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(Rt={mouseenter:"mouseover",mouseleave:"mouseout"}));function Tt(t,e,n){return t=Nt(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function Nt(t,e,n){return function(r){var o=At;At=r;try{t.call(this,this.__data__,e,n)}finally{At=o}}}function St(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function zt(t){return function(){var e=this.__on;if(e){for(var n,r=0,o=-1,i=e.length;r<i;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++o]=n:this.removeEventListener(n.type,n.listener,n.capture);++o?e.length=o:delete this.__on}}}function Dt(t,e,n){var r=Rt.hasOwnProperty(t.type)?Tt:Nt;return function(o,i,a){var s,l=this.__on,u=r(e,i,a);if(l)for(var c=0,h=l.length;c<h;++c)if((s=l[c]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=u,s.capture=n),void(s.value=e);this.addEventListener(t.type,u,n),s={type:t.type,name:t.name,value:e,listener:u,capture:n},l?l.push(s):this.__on=[s]}}function qt(t,e,n){var r=et(t),o=r.CustomEvent;"function"==typeof o?o=new o(e,n):(o=r.document.createEvent("Event"),n?(o.initEvent(e,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(e,!1,!1)),t.dispatchEvent(o)}function $t(t,e){return function(){return qt(this,t,e)}}function Pt(t,e){return function(){return qt(this,t,e.apply(this,arguments))}}var Bt=[null];function jt(t,e){this._groups=t,this._parents=e}function Ht(){return new jt([[document.documentElement]],Bt)}function It(t){return"string"==typeof t?new jt([[document.querySelector(t)]],[document.documentElement]):new jt([[t]],Bt)}function Vt(){for(var t,e=At;t=e.sourceEvent;)e=t;return e}function Ut(t,e){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]}var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}function Zt(t){var e=Vt();return e.changedTouches&&(e=e.changedTouches[0]),Ut(t,e)}function Yt(t,e,n){arguments.length<3&&(n=e,e=Vt().changedTouches);for(var r,o=0,i=e?e.length:0;o<i;++o)if((r=e[o]).identifier===n)return Ut(t,r);return null}function Xt(){At.preventDefault(),At.stopImmediatePropagation()}function Ft(t){var e=t.document.documentElement,n=It(t).on("dragstart.drag",Xt,!0);"onselectstart"in e?n.on("selectstart.drag",Xt,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Wt(t,e){var n=t.document.documentElement,r=It(t).on("dragstart.drag",null);e&&(r.on("click.drag",Xt,!0),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function Gt(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Kt(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Qt(){}jt.prototype=Ht.prototype={constructor:jt,select:function(t){"function"!=typeof t&&(t=j(t));for(var e=this._groups,n=e.length,r=new Array(n),o=0;o<n;++o)for(var i,a,s=e[o],l=s.length,u=r[o]=new Array(l),c=0;c<l;++c)(i=s[c])&&(a=t.call(i,i.__data__,c,s))&&("__data__"in i&&(a.__data__=i.__data__),u[c]=a);return new jt(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=I(t));for(var e=this._groups,n=e.length,r=[],o=[],i=0;i<n;++i)for(var a,s=e[i],l=s.length,u=0;u<l;++u)(a=s[u])&&(r.push(t.call(a,a.__data__,u,s)),o.push(a));return new jt(r,o)},filter:function(t){"function"!=typeof t&&(t=V(t));for(var e=this._groups,n=e.length,r=new Array(n),o=0;o<n;++o)for(var i,a=e[o],s=a.length,l=r[o]=[],u=0;u<s;++u)(i=a[u])&&t.call(i,i.__data__,u,a)&&l.push(i);return new jt(r,this._parents)},data:function(t,e){if(!t)return p=new Array(this.size()),c=-1,this.each((function(t){p[++c]=t})),p;var n,r=e?X:Y,o=this._parents,i=this._groups;"function"!=typeof t&&(n=t,t=function(){return n});for(var a=i.length,s=new Array(a),l=new Array(a),u=new Array(a),c=0;c<a;++c){var h=o[c],f=i[c],d=f.length,p=t.call(h,h&&h.__data__,c,o),g=p.length,m=l[c]=new Array(g),y=s[c]=new Array(g);r(h,f,m,y,u[c]=new Array(d),p,e);for(var v,b,x=0,w=0;x<g;++x)if(v=m[x]){for(x>=w&&(w=x+1);!(b=y[w])&&++w<g;);v._next=b||null}}return(s=new jt(s,o))._enter=l,s._exit=u,s},enter:function(){return new jt(this._enter||this._groups.map(U),this._parents)},exit:function(){return new jt(this._exit||this._groups.map(U),this._parents)},join:function(t,e,n){var r=this.enter(),o=this,i=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(o=e(o)),null==n?i.remove():n(i),r&&o?r.merge(o).order():o},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,o=n.length,i=Math.min(r,o),a=new Array(r),s=0;s<i;++s)for(var l,u=e[s],c=n[s],h=u.length,f=a[s]=new Array(h),d=0;d<h;++d)(l=u[d]||c[d])&&(f[d]=l);for(;s<r;++s)a[s]=e[s];return new jt(a,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,o=t[e],i=o.length-1,a=o[i];--i>=0;)(r=o[i])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=F);for(var n=this._groups,r=n.length,o=new Array(r),i=0;i<r;++i){for(var a,s=n[i],l=s.length,u=o[i]=new Array(l),c=0;c<l;++c)(a=s[c])&&(u[c]=a);u.sort(e)}return new jt(o,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each((function(){t[++e]=this})),t},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],o=0,i=r.length;o<i;++o){var a=r[o];if(a)return a}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var o,i=e[n],a=0,s=i.length;a<s;++a)(o=i[a])&&t.call(o,o.__data__,a,i);return this},attr:function(t,e){var n=D(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?G:W:"function"==typeof e?n.local?tt:J:n.local?Q:K)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?nt:"function"==typeof e?ot:rt)(t,e,null==n?"":n)):it(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?at:"function"==typeof e?lt:st)(t,e)):this.node()[t]},classed:function(t,e){var n=ut(t+"");if(arguments.length<2){for(var r=ct(this.node()),o=-1,i=n.length;++o<i;)if(!r.contains(n[o]))return!1;return!0}return this.each(("function"==typeof e?mt:e?pt:gt)(n,e))},text:function(t){return arguments.length?this.each(null==t?yt:("function"==typeof t?bt:vt)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?xt:("function"==typeof t?_t:wt)(t)):this.node().innerHTML},raise:function(){return this.each(Ct)},lower:function(){return this.each(Lt)},append:function(t){var e="function"==typeof t?t:P(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:P(t),r=null==e?kt:"function"==typeof e?e:j(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(Ot)},clone:function(t){return this.select(t?Mt:Et)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,o,i=St(t+""),a=i.length;if(!(arguments.length<2)){for(s=e?Dt:zt,null==n&&(n=!1),r=0;r<a;++r)this.each(s(i[r],e,n));return this}var s=this.node().__on;if(s)for(var l,u=0,c=s.length;u<c;++u)for(r=0,l=s[u];r<a;++r)if((o=i[r]).type===l.type&&o.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?Pt:$t)(t,e))}};var Jt=.7,te=1/Jt,ee="\\s*([+-]?\\d+)\\s*",ne="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",re="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",oe=/^#([0-9a-f]{3,8})$/,ie=new RegExp("^rgb\\("+[ee,ee,ee]+"\\)$"),ae=new RegExp("^rgb\\("+[re,re,re]+"\\)$"),se=new RegExp("^rgba\\("+[ee,ee,ee,ne]+"\\)$"),le=new RegExp("^rgba\\("+[re,re,re,ne]+"\\)$"),ue=new RegExp("^hsl\\("+[ne,re,re]+"\\)$"),ce=new RegExp("^hsla\\("+[ne,re,re,ne]+"\\)$"),he={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 fe(){return this.rgb().formatHex()}function de(){return this.rgb().formatRgb()}function pe(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=oe.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?ge(e):3===n?new be(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?me(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?me(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=ie.exec(t))?new be(e[1],e[2],e[3],1):(e=ae.exec(t))?new be(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=se.exec(t))?me(e[1],e[2],e[3],e[4]):(e=le.exec(t))?me(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=ue.exec(t))?Ce(e[1],e[2]/100,e[3]/100,1):(e=ce.exec(t))?Ce(e[1],e[2]/100,e[3]/100,e[4]):he.hasOwnProperty(t)?ge(he[t]):"transparent"===t?new be(NaN,NaN,NaN,0):null}function ge(t){return new be(t>>16&255,t>>8&255,255&t,1)}function me(t,e,n,r){return r<=0&&(t=e=n=NaN),new be(t,e,n,r)}function ye(t){return t instanceof Qt||(t=pe(t)),t?new be((t=t.rgb()).r,t.g,t.b,t.opacity):new be}function ve(t,e,n,r){return 1===arguments.length?ye(t):new be(t,e,n,null==r?1:r)}function be(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function xe(){return"#"+_e(this.r)+_e(this.g)+_e(this.b)}function we(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function _e(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Ce(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new ke(t,e,n,r)}function Le(t){if(t instanceof ke)return new ke(t.h,t.s,t.l,t.opacity);if(t instanceof Qt||(t=pe(t)),!t)return new ke;if(t instanceof ke)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,o=Math.min(e,n,r),i=Math.max(e,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=e===i?(n-r)/s+6*(n<r):n===i?(r-e)/s+2:(e-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new ke(a,s,l,t.opacity)}function ke(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Oe(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function Ee(t){return function(){return t}}function Me(t){return 1==(t=+t)?Re:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Ee(isNaN(e)?n:e)}}function Re(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):Ee(isNaN(t)?e:t)}Gt(Qt,pe,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:fe,formatHex:fe,formatHsl:function(){return Le(this).formatHsl()},formatRgb:de,toString:de}),Gt(be,ve,Kt(Qt,{brighter:function(t){return t=null==t?te:Math.pow(te,t),new be(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?Jt:Math.pow(Jt,t),new be(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:xe,formatHex:xe,formatRgb:we,toString:we})),Gt(ke,(function(t,e,n,r){return 1===arguments.length?Le(t):new ke(t,e,n,null==r?1:r)}),Kt(Qt,{brighter:function(t){return t=null==t?te:Math.pow(te,t),new ke(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?Jt:Math.pow(Jt,t),new ke(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,o=2*n-r;return new be(Oe(t>=240?t-240:t+120,o,r),Oe(t,o,r),Oe(t<120?t+240:t-120,o,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var Ae=function t(e){var n=Me(e);function r(t,e){var r=n((t=ve(t)).r,(e=ve(e)).r),o=n(t.g,e.g),i=n(t.b,e.b),a=Re(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=o(e),t.b=i(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);function Te(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var Ne=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Se=new RegExp(Ne.source,"g");function ze(t,e){var n,r,o,i=Ne.lastIndex=Se.lastIndex=0,a=-1,s=[],l=[];for(t+="",e+="";(n=Ne.exec(t))&&(r=Se.exec(e));)(o=r.index)>i&&(o=e.slice(i,o),s[a]?s[a]+=o:s[++a]=o),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:Te(n,r)})),i=Se.lastIndex;return i<e.length&&(o=e.slice(i),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?function(t){return function(e){return t(e)+""}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var n,r=0;r<e;++r)s[(n=l[r]).i]=n.x(t);return s.join("")})}var De,qe,$e,Pe,Be=180/Math.PI,je={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function He(t,e,n,r,o,i){var a,s,l;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(l=t*n+e*r)&&(n-=t*l,r-=e*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),t*r<e*n&&(t=-t,e=-e,l=-l,a=-a),{translateX:o,translateY:i,rotate:Math.atan2(e,t)*Be,skewX:Math.atan(l)*Be,scaleX:a,scaleY:s}}function Ie(t,e,n,r){function o(t){return t.length?t.pop()+" ":""}return function(i,a){var s=[],l=[];return i=t(i),a=t(a),function(t,r,o,i,a,s){if(t!==o||r!==i){var l=a.push("translate(",null,e,null,n);s.push({i:l-4,x:Te(t,o)},{i:l-2,x:Te(r,i)})}else(o||i)&&a.push("translate("+o+e+i+n)}(i.translateX,i.translateY,a.translateX,a.translateY,s,l),function(t,e,n,i){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),i.push({i:n.push(o(n)+"rotate(",null,r)-2,x:Te(t,e)})):e&&n.push(o(n)+"rotate("+e+r)}(i.rotate,a.rotate,s,l),function(t,e,n,i){t!==e?i.push({i:n.push(o(n)+"skewX(",null,r)-2,x:Te(t,e)}):e&&n.push(o(n)+"skewX("+e+r)}(i.skewX,a.skewX,s,l),function(t,e,n,r,i,a){if(t!==n||e!==r){var s=i.push(o(i)+"scale(",null,",",null,")");a.push({i:s-4,x:Te(t,n)},{i:s-2,x:Te(e,r)})}else 1===n&&1===r||i.push(o(i)+"scale("+n+","+r+")")}(i.scaleX,i.scaleY,a.scaleX,a.scaleY,s,l),i=a=null,function(t){for(var e,n=-1,r=l.length;++n<r;)s[(e=l[n]).i]=e.x(t);return s.join("")}}}var Ve=Ie((function(t){return"none"===t?je:(De||(De=document.createElement("DIV"),qe=document.documentElement,$e=document.defaultView),De.style.transform=t,t=$e.getComputedStyle(qe.appendChild(De),null).getPropertyValue("transform"),qe.removeChild(De),He(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),Ue=Ie((function(t){return null==t?je:(Pe||(Pe=document.createElementNS("http://www.w3.org/2000/svg","g")),Pe.setAttribute("transform",t),(t=Pe.transform.baseVal.consolidate())?He((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):je)}),", ",")",")"),Ze=Math.SQRT2;function Ye(t){return((t=Math.exp(t))+1/t)/2}function Xe(t,e){var n,r,o=t[0],i=t[1],a=t[2],s=e[0],l=e[1],u=e[2],c=s-o,h=l-i,f=c*c+h*h;if(f<1e-12)r=Math.log(u/a)/Ze,n=function(t){return[o+t*c,i+t*h,a*Math.exp(Ze*t*r)]};else{var d=Math.sqrt(f),p=(u*u-a*a+4*f)/(2*a*2*d),g=(u*u-a*a-4*f)/(2*u*2*d),m=Math.log(Math.sqrt(p*p+1)-p),y=Math.log(Math.sqrt(g*g+1)-g);r=(y-m)/Ze,n=function(t){var e,n=t*r,s=Ye(m),l=a/(2*d)*(s*(e=Ze*n+m,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(m));return[o+l*c,i+l*h,a*s/Ye(Ze*n+m)]}}return n.duration=1e3*r,n}var Fe,We,Ge=0,Ke=0,Qe=0,Je=0,tn=0,en=0,nn="object"==typeof performance&&performance.now?performance:Date,rn="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function on(){return tn||(rn(an),tn=nn.now()+en)}function an(){tn=0}function sn(){this._call=this._time=this._next=null}function ln(t,e,n){var r=new sn;return r.restart(t,e,n),r}function un(){tn=(Je=nn.now())+en,Ge=Ke=0;try{!function(){on(),++Ge;for(var t,e=Fe;e;)(t=tn-e._time)>=0&&e._call.call(null,t),e=e._next;--Ge}()}finally{Ge=0,function(){var t,e,n=Fe,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Fe=e);We=t,hn(r)}(),tn=0}}function cn(){var t=nn.now(),e=t-Je;e>1e3&&(en-=e,Je=t)}function hn(t){Ge||(Ke&&(Ke=clearTimeout(Ke)),t-tn>24?(t<1/0&&(Ke=setTimeout(un,t-nn.now()-en)),Qe&&(Qe=clearInterval(Qe))):(Qe||(Je=nn.now(),Qe=setInterval(cn,1e3)),Ge=1,rn(un)))}function fn(t,e,n){var r=new sn;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}sn.prototype=ln.prototype={constructor:sn,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?on():+n)+(null==e?0:+e),this._next||We===this||(We?We._next=this:Fe=this,We=this),this._call=t,this._time=n,hn()},stop:function(){this._call&&(this._call=null,this._time=1/0,hn())}};var dn=M("start","end","cancel","interrupt"),pn=[];function gn(t,e,n,r,o,i){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var r,o=t.__transition;function i(t){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)}function a(i){var u,c,h,f;if(1!==n.state)return l();for(u in o)if((f=o[u]).name===n.name){if(3===f.state)return fn(a);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete o[u]):+u<e&&(f.state=6,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete o[u])}if(fn((function(){3===n.state&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(i))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(h=n.tween.length),u=0,c=-1;u<h;++u)(f=n.tween[u].value.call(t,t.__data__,n.index,n.group))&&(r[++c]=f);r.length=c+1}}function s(e){for(var o=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(l),n.state=5,1),i=-1,a=r.length;++i<a;)r[i].call(t,o);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){for(var r in n.state=6,n.timer.stop(),delete o[e],o)return;delete t.__transition}o[e]=n,n.timer=ln(i,0,n.time)}(t,n,{name:e,index:r,group:o,on:dn,tween:pn,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:0})}function mn(t,e){var n=vn(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function yn(t,e){var n=vn(t,e);if(n.state>3)throw new Error("too late; already running");return n}function vn(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function bn(t,e){var n,r,o,i=t.__transition,a=!0;if(i){for(o in e=null==e?null:e+"",i)(n=i[o]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete i[o]):a=!1;a&&delete t.__transition}}function xn(t,e){var n,r;return function(){var o=yn(this,t),i=o.tween;if(i!==n)for(var a=0,s=(r=n=i).length;a<s;++a)if(r[a].name===e){(r=r.slice()).splice(a,1);break}o.tween=r}}function wn(t,e,n){var r,o;if("function"!=typeof n)throw new Error;return function(){var i=yn(this,t),a=i.tween;if(a!==r){o=(r=a).slice();for(var s={name:e,value:n},l=0,u=o.length;l<u;++l)if(o[l].name===e){o[l]=s;break}l===u&&o.push(s)}i.tween=o}}function _n(t,e,n){var r=t._id;return t.each((function(){var t=yn(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return vn(t,r).value[e]}}function Cn(t,e){var n;return("number"==typeof e?Te:e instanceof pe?Ae:(n=pe(e))?(e=n,Ae):ze)(t,e)}function Ln(t){return function(){this.removeAttribute(t)}}function kn(t){return function(){this.removeAttributeNS(t.space,t.local)}}function On(t,e,n){var r,o,i=n+"";return function(){var a=this.getAttribute(t);return a===i?null:a===r?o:o=e(r=a,n)}}function En(t,e,n){var r,o,i=n+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===i?null:a===r?o:o=e(r=a,n)}}function Mn(t,e,n){var r,o,i;return function(){var a,s,l=n(this);if(null!=l)return(a=this.getAttribute(t))===(s=l+"")?null:a===r&&s===o?i:(o=s,i=e(r=a,l));this.removeAttribute(t)}}function Rn(t,e,n){var r,o,i;return function(){var a,s,l=n(this);if(null!=l)return(a=this.getAttributeNS(t.space,t.local))===(s=l+"")?null:a===r&&s===o?i:(o=s,i=e(r=a,l));this.removeAttributeNS(t.space,t.local)}}function An(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Tn(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Nn(t,e){var n,r;function o(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&Tn(t,o)),n}return o._value=e,o}function Sn(t,e){var n,r;function o(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&An(t,o)),n}return o._value=e,o}function zn(t,e){return function(){mn(this,t).delay=+e.apply(this,arguments)}}function Dn(t,e){return e=+e,function(){mn(this,t).delay=e}}function qn(t,e){return function(){yn(this,t).duration=+e.apply(this,arguments)}}function $n(t,e){return e=+e,function(){yn(this,t).duration=e}}function Pn(t,e){if("function"!=typeof e)throw new Error;return function(){yn(this,t).ease=e}}function Bn(t,e,n){var r,o,i=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?mn:yn;return function(){var a=i(this,t),s=a.on;s!==r&&(o=(r=s).copy()).on(e,n),a.on=o}}var jn=Ht.prototype.constructor;function Hn(t){return function(){this.style.removeProperty(t)}}function In(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Vn(t,e,n){var r,o;function i(){var i=e.apply(this,arguments);return i!==o&&(r=(o=i)&&In(t,i,n)),r}return i._value=e,i}function Un(t){return function(e){this.textContent=t.call(this,e)}}function Zn(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Un(r)),e}return r._value=t,r}var Yn=0;function Xn(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Fn(){return++Yn}var Wn=Ht.prototype;Xn.prototype={constructor:Xn,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=j(t));for(var r=this._groups,o=r.length,i=new Array(o),a=0;a<o;++a)for(var s,l,u=r[a],c=u.length,h=i[a]=new Array(c),f=0;f<c;++f)(s=u[f])&&(l=t.call(s,s.__data__,f,u))&&("__data__"in s&&(l.__data__=s.__data__),h[f]=l,gn(h[f],e,n,f,h,vn(s,n)));return new Xn(i,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=I(t));for(var r=this._groups,o=r.length,i=[],a=[],s=0;s<o;++s)for(var l,u=r[s],c=u.length,h=0;h<c;++h)if(l=u[h]){for(var f,d=t.call(l,l.__data__,h,u),p=vn(l,n),g=0,m=d.length;g<m;++g)(f=d[g])&&gn(f,e,n,g,d,p);i.push(d),a.push(l)}return new Xn(i,a,e,n)},filter:function(t){"function"!=typeof t&&(t=V(t));for(var e=this._groups,n=e.length,r=new Array(n),o=0;o<n;++o)for(var i,a=e[o],s=a.length,l=r[o]=[],u=0;u<s;++u)(i=a[u])&&t.call(i,i.__data__,u,a)&&l.push(i);return new Xn(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,o=n.length,i=Math.min(r,o),a=new Array(r),s=0;s<i;++s)for(var l,u=e[s],c=n[s],h=u.length,f=a[s]=new Array(h),d=0;d<h;++d)(l=u[d]||c[d])&&(f[d]=l);for(;s<r;++s)a[s]=e[s];return new Xn(a,this._parents,this._name,this._id)},selection:function(){return new jn(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Fn(),r=this._groups,o=r.length,i=0;i<o;++i)for(var a,s=r[i],l=s.length,u=0;u<l;++u)if(a=s[u]){var c=vn(a,e);gn(a,t,n,u,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Xn(r,this._parents,t,n)},call:Wn.call,nodes:Wn.nodes,node:Wn.node,size:Wn.size,empty:Wn.empty,each:Wn.each,on:function(t,e){var n=this._id;return arguments.length<2?vn(this.node(),n).on.on(t):this.each(Bn(n,t,e))},attr:function(t,e){var n=D(t),r="transform"===n?Ue:Cn;return this.attrTween(t,"function"==typeof e?(n.local?Rn:Mn)(n,r,_n(this,"attr."+t,e)):null==e?(n.local?kn:Ln)(n):(n.local?En:On)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=D(t);return this.tween(n,(r.local?Nn:Sn)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Ve:Cn;return null==e?this.styleTween(t,function(t,e){var n,r,o;return function(){var i=it(this,t),a=(this.style.removeProperty(t),it(this,t));return i===a?null:i===n&&a===r?o:o=e(n=i,r=a)}}(t,r)).on("end.style."+t,Hn(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,o,i;return function(){var a=it(this,t),s=n(this),l=s+"";return null==s&&(this.style.removeProperty(t),l=s=it(this,t)),a===l?null:a===r&&l===o?i:(o=l,i=e(r=a,s))}}(t,r,_n(this,"style."+t,e))).each(function(t,e){var n,r,o,i,a="style."+e,s="end."+a;return function(){var l=yn(this,t),u=l.on,c=null==l.value[a]?i||(i=Hn(e)):void 0;u===n&&o===c||(r=(n=u).copy()).on(s,o=c),l.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,o,i=n+"";return function(){var a=it(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,Vn(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(_n(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,Zn(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,o=vn(this.node(),n).tween,i=0,a=o.length;i<a;++i)if((r=o[i]).name===t)return r.value;return null}return this.each((null==e?xn:wn)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?zn:Dn)(e,t)):vn(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?qn:$n)(e,t)):vn(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(Pn(e,t)):vn(this.node(),e).ease},end:function(){var t,e,n=this,r=n._id,o=n.size();return new Promise((function(i,a){var s={value:a},l={value:function(){0==--o&&i()}};n.each((function(){var n=yn(this,r),o=n.on;o!==t&&((e=(t=o).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(l)),n.on=e}))}))}};var Gn={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function Kn(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return Gn.time=on(),Gn;return n}Ht.prototype.interrupt=function(t){return this.each((function(){bn(this,t)}))},Ht.prototype.transition=function(t){var e,n;t instanceof Xn?(e=t._id,t=t._name):(e=Fn(),(n=Gn).time=on(),t=null==t?null:t+"");for(var r=this._groups,o=r.length,i=0;i<o;++i)for(var a,s=r[i],l=s.length,u=0;u<l;++u)(a=s[u])&&gn(a,t,e,u,s,n||Kn(a,e));return new Xn(r,this._parents,t,e)};var Qn="$";function Jn(){}function tr(t,e){var n=new Jn;if(t instanceof Jn)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,o=-1,i=t.length;if(null==e)for(;++o<i;)n.set(o,t[o]);else for(;++o<i;)n.set(e(r=t[o],o,t),r)}else if(t)for(var a in t)n.set(a,t[a]);return n}function er(){}Jn.prototype=tr.prototype={constructor:Jn,has:function(t){return Qn+t in this},get:function(t){return this[Qn+t]},set:function(t,e){return this[Qn+t]=e,this},remove:function(t){var e=Qn+t;return e in this&&delete this[e]},clear:function(){for(var t in this)t[0]===Qn&&delete this[t]},keys:function(){var t=[];for(var e in this)e[0]===Qn&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)e[0]===Qn&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)e[0]===Qn&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)e[0]===Qn&&++t;return t},empty:function(){for(var t in this)if(t[0]===Qn)return!1;return!0},each:function(t){for(var e in this)e[0]===Qn&&t(this[e],e.slice(1),this)}};var nr=tr.prototype;function rr(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function or(t,e){var n,r,o,i,a,s=new lr(t),l=+t.value&&(s.value=t.value),u=[s];for(null==e&&(e=ir);n=u.pop();)if(l&&(n.value=+n.data.value),(o=e(n.data))&&(a=o.length))for(n.children=new Array(a),i=a-1;i>=0;--i)u.push(r=n.children[i]=new lr(o[i])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(sr)}function ir(t){return t.children}function ar(t){t.data=t.data.data}function sr(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function lr(t){this.data=t,this.depth=this.height=0,this.parent=null}function ur(t,e){return t.parent===e.parent?1:2}function cr(t){var e=t.children;return e?e[0]:t.t}function hr(t){var e=t.children;return e?e[e.length-1]:t.t}function fr(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function dr(t,e,n){return t.a.parent===e.parent?t.a:n}function pr(t,e){this._=t,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=e}function gr(){var t=ur,e=1,n=1,r=null;function o(o){var l=function(t){for(var e,n,r,o,i,a=new pr(t,0),s=[a];e=s.pop();)if(r=e._.children)for(e.children=new Array(i=r.length),o=i-1;o>=0;--o)s.push(n=e.children[o]=new pr(r[o],o)),n.parent=e;return(a.parent=new pr(null,0)).children=[a],a}(o);if(l.eachAfter(i),l.parent.m=-l.z,l.eachBefore(a),r)o.eachBefore(s);else{var u=o,c=o,h=o;o.eachBefore((function(t){t.x<u.x&&(u=t),t.x>c.x&&(c=t),t.depth>h.depth&&(h=t)}));var f=u===c?1:t(u,c)/2,d=f-u.x,p=e/(c.x+f+d),g=n/(h.depth||1);o.eachBefore((function(t){t.x=(t.x+d)*p,t.y=t.depth*g}))}return o}function i(e){var n=e.children,r=e.parent.children,o=e.i?r[e.i-1]:null;if(n){!function(t){for(var e,n=0,r=0,o=t.children,i=o.length;--i>=0;)(e=o[i]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}(e);var i=(n[0].z+n[n.length-1].z)/2;o?(e.z=o.z+t(e._,o._),e.m=e.z-i):e.z=i}else o&&(e.z=o.z+t(e._,o._));e.parent.A=function(e,n,r){if(n){for(var o,i=e,a=e,s=n,l=i.parent.children[0],u=i.m,c=a.m,h=s.m,f=l.m;s=hr(s),i=cr(i),s&&i;)l=cr(l),(a=hr(a)).a=e,(o=s.z+h-i.z-u+t(s._,i._))>0&&(fr(dr(s,e,r),e,o),u+=o,c+=o),h+=s.m,u+=i.m,f+=l.m,c+=a.m;s&&!hr(a)&&(a.t=s,a.m+=h-c),i&&!cr(l)&&(l.t=i,l.m+=u-f,r=e)}return r}(e,o,e.parent.A||r[0])}function a(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t){t.x*=e,t.y=t.depth*n}return o.separation=function(e){return arguments.length?(t=e,o):t},o.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],o):r?null:[e,n]},o.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],o):r?[e,n]:null},o}function mr(){return Math.random()}er.prototype={constructor:er,has:nr.has,add:function(t){return this[Qn+(t+="")]=t,this},remove:nr.remove,clear:nr.clear,values:nr.keys,size:nr.size,empty:nr.empty,each:nr.each},lr.prototype=or.prototype={constructor:lr,count:function(){return this.eachAfter(rr)},each:function(t){var e,n,r,o,i=this,a=[i];do{for(e=a.reverse(),a=[];i=e.pop();)if(t(i),n=i.children)for(r=0,o=n.length;r<o;++r)a.push(n[r])}while(a.length);return this},eachAfter:function(t){for(var e,n,r,o=this,i=[o],a=[];o=i.pop();)if(a.push(o),e=o.children)for(n=0,r=e.length;n<r;++n)i.push(e[n]);for(;o=a.pop();)t(o);return this},eachBefore:function(t){for(var e,n,r=this,o=[r];r=o.pop();)if(t(r),e=r.children)for(n=e.length-1;n>=0;--n)o.push(e[n]);return this},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,o=r&&r.length;--o>=0;)n+=r[o].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),o=null;t=n.pop(),e=r.pop();for(;t===e;)o=t,t=n.pop(),e=r.pop();return o}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var o=r.length;t!==n;)r.splice(o,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each((function(e){t.push(e)})),t},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return or(this).eachBefore(ar)}},pr.prototype=Object.create(lr.prototype),function t(e){function n(t,n){return t=null==t?0:+t,n=null==n?1:+n,1===arguments.length?(n=t,t=0):n-=t,function(){return e()*n+t}}return n.source=t,n}(mr);var yr=function t(e){function n(t,n){var r,o;return t=null==t?0:+t,n=null==n?1:+n,function(){var i;if(null!=r)i=r,r=null;else do{r=2*e()-1,i=2*e()-1,o=r*r+i*i}while(!o||o>1);return t+n*i*Math.sqrt(-2*Math.log(o)/o)}}return n.source=t,n}(mr);!function t(e){function n(){var t=yr.source(e).apply(this,arguments);return function(){return Math.exp(t())}}return n.source=t,n}(mr);var vr=function t(e){function n(t){return function(){for(var n=0,r=0;r<t;++r)n+=e();return n}}return n.source=t,n}(mr);function br(){this._=null}function xr(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function wr(t,e){var n=e,r=e.R,o=n.U;o?o.L===n?o.L=r:o.R=r:t._=r,r.U=o,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function _r(t,e){var n=e,r=e.L,o=n.U;o?o.L===n?o.L=r:o.R=r:t._=r,r.U=o,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function Cr(t){for(;t.L;)t=t.L;return t}function Lr(t,e,n,r){var o=[null,null],i=Fr.push(o)-1;return o.left=t,o.right=e,n&&Or(o,t,e,n),r&&Or(o,e,t,r),Yr[t.index].halfedges.push(i),Yr[e.index].halfedges.push(i),o}function kr(t,e,n){var r=[e,n];return r.left=t,r}function Or(t,e,n,r){t[0]||t[1]?t.left===n?t[1]=r:t[0]=r:(t[0]=r,t.left=e,t.right=n)}function Er(t,e,n,r,o){var i,a=t[0],s=t[1],l=a[0],u=a[1],c=0,h=1,f=s[0]-l,d=s[1]-u;if(i=e-l,f||!(i>0)){if(i/=f,f<0){if(i<c)return;i<h&&(h=i)}else if(f>0){if(i>h)return;i>c&&(c=i)}if(i=r-l,f||!(i<0)){if(i/=f,f<0){if(i>h)return;i>c&&(c=i)}else if(f>0){if(i<c)return;i<h&&(h=i)}if(i=n-u,d||!(i>0)){if(i/=d,d<0){if(i<c)return;i<h&&(h=i)}else if(d>0){if(i>h)return;i>c&&(c=i)}if(i=o-u,d||!(i<0)){if(i/=d,d<0){if(i>h)return;i>c&&(c=i)}else if(d>0){if(i<c)return;i<h&&(h=i)}return!(c>0||h<1)||(c>0&&(t[0]=[l+c*f,u+c*d]),h<1&&(t[1]=[l+h*f,u+h*d]),!0)}}}}}function Mr(t,e,n,r,o){var i=t[1];if(i)return!0;var a,s,l=t[0],u=t.left,c=t.right,h=u[0],f=u[1],d=c[0],p=c[1],g=(h+d)/2,m=(f+p)/2;if(p===f){if(g<e||g>=r)return;if(h>d){if(l){if(l[1]>=o)return}else l=[g,n];i=[g,o]}else{if(l){if(l[1]<n)return}else l=[g,o];i=[g,n]}}else if(s=m-(a=(h-d)/(p-f))*g,a<-1||a>1)if(h>d){if(l){if(l[1]>=o)return}else l=[(n-s)/a,n];i=[(o-s)/a,o]}else{if(l){if(l[1]<n)return}else l=[(o-s)/a,o];i=[(n-s)/a,n]}else if(f<p){if(l){if(l[0]>=r)return}else l=[e,a*e+s];i=[r,a*r+s]}else{if(l){if(l[0]<e)return}else l=[r,a*r+s];i=[e,a*e+s]}return t[0]=l,t[1]=i,!0}function Rr(t,e){var n=t.site,r=e.left,o=e.right;return n===o&&(o=r,r=n),o?Math.atan2(o[1]-r[1],o[0]-r[0]):(n===r?(r=e[1],o=e[0]):(r=e[0],o=e[1]),Math.atan2(r[0]-o[0],o[1]-r[1]))}function Ar(t,e){return e[+(e.left!==t.site)]}function Tr(t,e){return e[+(e.left===t.site)]}!function t(e){function n(t){var n=vr.source(e)(t);return function(){return n()/t}}return n.source=t,n}(mr),function t(e){function n(t){return function(){return-Math.log(1-e())/t}}return n.source=t,n}(mr),br.prototype={constructor:br,insert:function(t,e){var n,r,o;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;n=t}else this._?(t=Cr(this._),e.P=null,e.N=t,t.P=t.L=e,n=t):(e.P=e.N=null,this._=e,n=null);for(e.L=e.R=null,e.U=n,e.C=!0,t=e;n&&n.C;)n===(r=n.U).L?(o=r.R)&&o.C?(n.C=o.C=!1,r.C=!0,t=r):(t===n.R&&(wr(this,n),n=(t=n).U),n.C=!1,r.C=!0,_r(this,r)):(o=r.L)&&o.C?(n.C=o.C=!1,r.C=!0,t=r):(t===n.L&&(_r(this,n),n=(t=n).U),n.C=!1,r.C=!0,wr(this,r)),n=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,n,r,o=t.U,i=t.L,a=t.R;if(n=i?a?Cr(a):i:a,o?o.L===t?o.L=n:o.R=n:this._=n,i&&a?(r=n.C,n.C=t.C,n.L=i,i.U=n,n!==a?(o=n.U,n.U=t.U,t=n.R,o.L=t,n.R=a,a.U=n):(n.U=o,o=n,t=n.R)):(r=t.C,t=n),t&&(t.U=o),!r)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===o.L){if((e=o.R).C&&(e.C=!1,o.C=!0,wr(this,o),e=o.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,_r(this,e),e=o.R),e.C=o.C,o.C=e.R.C=!1,wr(this,o),t=this._;break}}else if((e=o.L).C&&(e.C=!1,o.C=!0,_r(this,o),e=o.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,wr(this,e),e=o.L),e.C=o.C,o.C=e.L.C=!1,_r(this,o),t=this._;break}e.C=!0,t=o,o=o.U}while(!t.C);t&&(t.C=!1)}}};var Nr,Sr=[];function zr(){xr(this),this.x=this.y=this.arc=this.site=this.cy=null}function Dr(t){var e=t.P,n=t.N;if(e&&n){var r=e.site,o=t.site,i=n.site;if(r!==i){var a=o[0],s=o[1],l=r[0]-a,u=r[1]-s,c=i[0]-a,h=i[1]-s,f=2*(l*h-u*c);if(!(f>=-Gr)){var d=l*l+u*u,p=c*c+h*h,g=(h*d-u*p)/f,m=(l*p-c*d)/f,y=Sr.pop()||new zr;y.arc=t,y.site=o,y.x=g+a,y.y=(y.cy=m+s)+Math.sqrt(g*g+m*m),t.circle=y;for(var v=null,b=Xr._;b;)if(y.y<b.y||y.y===b.y&&y.x<=b.x){if(!b.L){v=b.P;break}b=b.L}else{if(!b.R){v=b;break}b=b.R}Xr.insert(v,y),v||(Nr=y)}}}}function qr(t){var e=t.circle;e&&(e.P||(Nr=e.N),Xr.remove(e),Sr.push(e),xr(e),t.circle=null)}var $r=[];function Pr(){xr(this),this.edge=this.site=this.circle=null}function Br(t){var e=$r.pop()||new Pr;return e.site=t,e}function jr(t){qr(t),Zr.remove(t),$r.push(t),xr(t)}function Hr(t){var e=t.circle,n=e.x,r=e.cy,o=[n,r],i=t.P,a=t.N,s=[t];jr(t);for(var l=i;l.circle&&Math.abs(n-l.circle.x)<Wr&&Math.abs(r-l.circle.cy)<Wr;)i=l.P,s.unshift(l),jr(l),l=i;s.unshift(l),qr(l);for(var u=a;u.circle&&Math.abs(n-u.circle.x)<Wr&&Math.abs(r-u.circle.cy)<Wr;)a=u.N,s.push(u),jr(u),u=a;s.push(u),qr(u);var c,h=s.length;for(c=1;c<h;++c)u=s[c],l=s[c-1],Or(u.edge,l.site,u.site,o);l=s[0],(u=s[h-1]).edge=Lr(l.site,u.site,null,o),Dr(l),Dr(u)}function Ir(t){for(var e,n,r,o,i=t[0],a=t[1],s=Zr._;s;)if((r=Vr(s,a)-i)>Wr)s=s.L;else{if(!((o=i-Ur(s,a))>Wr)){r>-Wr?(e=s.P,n=s):o>-Wr?(e=s,n=s.N):e=n=s;break}if(!s.R){e=s;break}s=s.R}!function(t){Yr[t.index]={site:t,halfedges:[]}}(t);var l=Br(t);if(Zr.insert(e,l),e||n){if(e===n)return qr(e),n=Br(e.site),Zr.insert(l,n),l.edge=n.edge=Lr(e.site,l.site),Dr(e),void Dr(n);if(n){qr(e),qr(n);var u=e.site,c=u[0],h=u[1],f=t[0]-c,d=t[1]-h,p=n.site,g=p[0]-c,m=p[1]-h,y=2*(f*m-d*g),v=f*f+d*d,b=g*g+m*m,x=[(m*v-d*b)/y+c,(f*b-g*v)/y+h];Or(n.edge,u,p,x),l.edge=Lr(u,t,null,x),n.edge=Lr(t,p,null,x),Dr(e),Dr(n)}else l.edge=Lr(e.site,l.site)}}function Vr(t,e){var n=t.site,r=n[0],o=n[1],i=o-e;if(!i)return r;var a=t.P;if(!a)return-1/0;var s=(n=a.site)[0],l=n[1],u=l-e;if(!u)return s;var c=s-r,h=1/i-1/u,f=c/u;return h?(-f+Math.sqrt(f*f-2*h*(c*c/(-2*u)-l+u/2+o-i/2)))/h+r:(r+s)/2}function Ur(t,e){var n=t.N;if(n)return Vr(n,e);var r=t.site;return r[1]===e?r[0]:1/0}var Zr,Yr,Xr,Fr,Wr=1e-6,Gr=1e-12;function Kr(t,e){return e[1]-t[1]||e[0]-t[0]}function Qr(t,e){var n,r,o,i=t.sort(Kr).pop();for(Fr=[],Yr=new Array(t.length),Zr=new br,Xr=new br;;)if(o=Nr,i&&(!o||i[1]<o.y||i[1]===o.y&&i[0]<o.x))i[0]===n&&i[1]===r||(Ir(i),n=i[0],r=i[1]),i=t.pop();else{if(!o)break;Hr(o.arc)}if(function(){for(var t,e,n,r,o=0,i=Yr.length;o<i;++o)if((t=Yr[o])&&(r=(e=t.halfedges).length)){var a=new Array(r),s=new Array(r);for(n=0;n<r;++n)a[n]=n,s[n]=Rr(t,Fr[e[n]]);for(a.sort((function(t,e){return s[e]-s[t]})),n=0;n<r;++n)s[n]=e[a[n]];for(n=0;n<r;++n)e[n]=s[n]}}(),e){var a=+e[0][0],s=+e[0][1],l=+e[1][0],u=+e[1][1];!function(t,e,n,r){for(var o,i=Fr.length;i--;)Mr(o=Fr[i],t,e,n,r)&&Er(o,t,e,n,r)&&(Math.abs(o[0][0]-o[1][0])>Wr||Math.abs(o[0][1]-o[1][1])>Wr)||delete Fr[i]}(a,s,l,u),function(t,e,n,r){var o,i,a,s,l,u,c,h,f,d,p,g,m=Yr.length,y=!0;for(o=0;o<m;++o)if(i=Yr[o]){for(a=i.site,s=(l=i.halfedges).length;s--;)Fr[l[s]]||l.splice(s,1);for(s=0,u=l.length;s<u;)p=(d=Tr(i,Fr[l[s]]))[0],g=d[1],h=(c=Ar(i,Fr[l[++s%u]]))[0],f=c[1],(Math.abs(p-h)>Wr||Math.abs(g-f)>Wr)&&(l.splice(s,0,Fr.push(kr(a,d,Math.abs(p-t)<Wr&&r-g>Wr?[t,Math.abs(h-t)<Wr?f:r]:Math.abs(g-r)<Wr&&n-p>Wr?[Math.abs(f-r)<Wr?h:n,r]:Math.abs(p-n)<Wr&&g-e>Wr?[n,Math.abs(h-n)<Wr?f:e]:Math.abs(g-e)<Wr&&p-t>Wr?[Math.abs(f-e)<Wr?h:t,e]:null))-1),++u);u&&(y=!1)}if(y){var v,b,x,w=1/0;for(o=0,y=null;o<m;++o)(i=Yr[o])&&(x=(v=(a=i.site)[0]-t)*v+(b=a[1]-e)*b)<w&&(w=x,y=i);if(y){var _=[t,e],C=[t,r],L=[n,r],k=[n,e];y.halfedges.push(Fr.push(kr(a=y.site,_,C))-1,Fr.push(kr(a,C,L))-1,Fr.push(kr(a,L,k))-1,Fr.push(kr(a,k,_))-1)}}for(o=0;o<m;++o)(i=Yr[o])&&(i.halfedges.length||delete Yr[o])}(a,s,l,u)}this.edges=Fr,this.cells=Yr,Zr=Xr=Fr=Yr=null}function Jr(t){return function(){return t}}function to(t,e,n){this.target=t,this.type=e,this.transform=n}function eo(t,e,n){this.k=t,this.x=e,this.y=n}Qr.prototype={constructor:Qr,polygons:function(){var t=this.edges;return this.cells.map((function(e){var n=e.halfedges.map((function(n){return Ar(e,t[n])}));return n.data=e.site.data,n}))},triangles:function(){var t=[],e=this.edges;return this.cells.forEach((function(n,r){if(i=(o=n.halfedges).length)for(var o,i,a,s,l,u,c=n.site,h=-1,f=e[o[i-1]],d=f.left===c?f.right:f.left;++h<i;)a=d,d=(f=e[o[h]]).left===c?f.right:f.left,a&&d&&r<a.index&&r<d.index&&(l=a,u=d,((s=c)[0]-u[0])*(l[1]-s[1])-(s[0]-l[0])*(u[1]-s[1])<0)&&t.push([c.data,a.data,d.data])})),t},links:function(){return this.edges.filter((function(t){return t.right})).map((function(t){return{source:t.left.data,target:t.right.data}}))},find:function(t,e,n){for(var r,o,i=this,a=i._found||0,s=i.cells.length;!(o=i.cells[a]);)if(++a>=s)return null;var l=t-o.site[0],u=e-o.site[1],c=l*l+u*u;do{o=i.cells[r=a],a=null,o.halfedges.forEach((function(n){var r=i.edges[n],s=r.left;if(s!==o.site&&s||(s=r.right)){var l=t-s[0],u=e-s[1],h=l*l+u*u;h<c&&(c=h,a=s.index)}}))}while(null!==a);return i._found=r,null==n||c<=n*n?o.site:null}},eo.prototype={constructor:eo,scale:function(t){return 1===t?this:new eo(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new eo(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var no=new eo(1,0,0);function ro(){At.stopImmediatePropagation()}function oo(){At.preventDefault(),At.stopImmediatePropagation()}function io(){return!At.ctrlKey&&!At.button}function ao(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function so(){return this.__zoom||no}function lo(){return-At.deltaY*(1===At.deltaMode?.05:At.deltaMode?1:.002)}function uo(){return navigator.maxTouchPoints||"ontouchstart"in this}function co(t,e,n){var r=t.invertX(e[0][0])-n[0][0],o=t.invertX(e[1][0])-n[1][0],i=t.invertY(e[0][1])-n[0][1],a=t.invertY(e[1][1])-n[1][1];return t.translate(o>r?(r+o)/2:Math.min(0,r)||Math.max(0,o),a>i?(i+a)/2:Math.min(0,i)||Math.max(0,a))}function ho(){var t,e,n=io,r=ao,o=co,i=lo,a=uo,s=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],u=250,c=Xe,h=M("start","zoom","end"),f=500,d=0;function p(t){t.property("__zoom",so).on("wheel.zoom",w).on("mousedown.zoom",_).on("dblclick.zoom",C).filter(a).on("touchstart.zoom",L).on("touchmove.zoom",k).on("touchend.zoom touchcancel.zoom",O).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(t,e){return(e=Math.max(s[0],Math.min(s[1],e)))===t.k?t:new eo(e,t.x,t.y)}function m(t,e,n){var r=e[0]-n[0]*t.k,o=e[1]-n[1]*t.k;return r===t.x&&o===t.y?t:new eo(t.k,r,o)}function y(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function v(t,e,n){t.on("start.zoom",(function(){b(this,arguments).start()})).on("interrupt.zoom end.zoom",(function(){b(this,arguments).end()})).tween("zoom",(function(){var t=this,o=arguments,i=b(t,o),a=r.apply(t,o),s=null==n?y(a):"function"==typeof n?n.apply(t,o):n,l=Math.max(a[1][0]-a[0][0],a[1][1]-a[0][1]),u=t.__zoom,h="function"==typeof e?e.apply(t,o):e,f=c(u.invert(s).concat(l/u.k),h.invert(s).concat(l/h.k));return function(t){if(1===t)t=h;else{var e=f(t),n=l/e[2];t=new eo(n,s[0]-e[0]*n,s[1]-e[1]*n)}i.zoom(null,t)}}))}function b(t,e,n){return!n&&t.__zooming||new x(t,e)}function x(t,e){this.that=t,this.args=e,this.active=0,this.extent=r.apply(t,e),this.taps=0}function w(){if(n.apply(this,arguments)){var t=b(this,arguments),e=this.__zoom,r=Math.max(s[0],Math.min(s[1],e.k*Math.pow(2,i.apply(this,arguments)))),a=Zt(this);if(t.wheel)t.mouse[0][0]===a[0]&&t.mouse[0][1]===a[1]||(t.mouse[1]=e.invert(t.mouse[0]=a)),clearTimeout(t.wheel);else{if(e.k===r)return;t.mouse=[a,e.invert(a)],bn(this),t.start()}oo(),t.wheel=setTimeout(u,150),t.zoom("mouse",o(m(g(e,r),t.mouse[0],t.mouse[1]),t.extent,l))}function u(){t.wheel=null,t.end()}}function _(){if(!e&&n.apply(this,arguments)){var t=b(this,arguments,!0),r=It(At.view).on("mousemove.zoom",u,!0).on("mouseup.zoom",c,!0),i=Zt(this),a=At.clientX,s=At.clientY;Ft(At.view),ro(),t.mouse=[i,this.__zoom.invert(i)],bn(this),t.start()}function u(){if(oo(),!t.moved){var e=At.clientX-a,n=At.clientY-s;t.moved=e*e+n*n>d}t.zoom("mouse",o(m(t.that.__zoom,t.mouse[0]=Zt(t.that),t.mouse[1]),t.extent,l))}function c(){r.on("mousemove.zoom mouseup.zoom",null),Wt(At.view,t.moved),oo(),t.end()}}function C(){if(n.apply(this,arguments)){var t=this.__zoom,e=Zt(this),i=t.invert(e),a=t.k*(At.shiftKey?.5:2),s=o(m(g(t,a),e,i),r.apply(this,arguments),l);oo(),u>0?It(this).transition().duration(u).call(v,s,e):It(this).call(p.transform,s)}}function L(){if(n.apply(this,arguments)){var e,r,o,i,a=At.touches,s=a.length,l=b(this,arguments,At.changedTouches.length===s);for(ro(),r=0;r<s;++r)i=[i=Yt(this,a,(o=a[r]).identifier),this.__zoom.invert(i),o.identifier],l.touch0?l.touch1||l.touch0[2]===i[2]||(l.touch1=i,l.taps=0):(l.touch0=i,e=!0,l.taps=1+!!t);t&&(t=clearTimeout(t)),e&&(l.taps<2&&(t=setTimeout((function(){t=null}),f)),bn(this),l.start())}}function k(){if(this.__zooming){var e,n,r,i,a=b(this,arguments),s=At.changedTouches,u=s.length;for(oo(),t&&(t=clearTimeout(t)),a.taps=0,e=0;e<u;++e)r=Yt(this,s,(n=s[e]).identifier),a.touch0&&a.touch0[2]===n.identifier?a.touch0[0]=r:a.touch1&&a.touch1[2]===n.identifier&&(a.touch1[0]=r);if(n=a.that.__zoom,a.touch1){var c=a.touch0[0],h=a.touch0[1],f=a.touch1[0],d=a.touch1[1],p=(p=f[0]-c[0])*p+(p=f[1]-c[1])*p,y=(y=d[0]-h[0])*y+(y=d[1]-h[1])*y;n=g(n,Math.sqrt(p/y)),r=[(c[0]+f[0])/2,(c[1]+f[1])/2],i=[(h[0]+d[0])/2,(h[1]+d[1])/2]}else{if(!a.touch0)return;r=a.touch0[0],i=a.touch0[1]}a.zoom("touch",o(m(n,r,i),a.extent,l))}}function O(){if(this.__zooming){var t,n,r=b(this,arguments),o=At.changedTouches,i=o.length;for(ro(),e&&clearTimeout(e),e=setTimeout((function(){e=null}),f),t=0;t<i;++t)n=o[t],r.touch0&&r.touch0[2]===n.identifier?delete r.touch0:r.touch1&&r.touch1[2]===n.identifier&&delete r.touch1;if(r.touch1&&!r.touch0&&(r.touch0=r.touch1,delete r.touch1),r.touch0)r.touch0[1]=this.__zoom.invert(r.touch0[0]);else if(r.end(),2===r.taps){var a=It(this).on("dblclick.zoom");a&&a.apply(this,arguments)}}}return p.transform=function(t,e,n){var r=t.selection?t.selection():t;r.property("__zoom",so),t!==r?v(t,e,n):r.interrupt().each((function(){b(this,arguments).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()}))},p.scaleBy=function(t,e,n){p.scaleTo(t,(function(){var t=this.__zoom.k,n="function"==typeof e?e.apply(this,arguments):e;return t*n}),n)},p.scaleTo=function(t,e,n){p.transform(t,(function(){var t=r.apply(this,arguments),i=this.__zoom,a=null==n?y(t):"function"==typeof n?n.apply(this,arguments):n,s=i.invert(a),u="function"==typeof e?e.apply(this,arguments):e;return o(m(g(i,u),a,s),t,l)}),n)},p.translateBy=function(t,e,n){p.transform(t,(function(){return o(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof n?n.apply(this,arguments):n),r.apply(this,arguments),l)}))},p.translateTo=function(t,e,n,i){p.transform(t,(function(){var t=r.apply(this,arguments),a=this.__zoom,s=null==i?y(t):"function"==typeof i?i.apply(this,arguments):i;return o(no.translate(s[0],s[1]).scale(a.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof n?-n.apply(this,arguments):-n),t,l)}),i)},x.prototype={start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){!function(t,e,n,r){var o=At;t.sourceEvent=At,At=t;try{e.apply(n,r)}finally{At=o}}(new to(p,t,this.that.__zoom),h.apply,h,[t,this.that,this.args])}},p.wheelDelta=function(t){return arguments.length?(i="function"==typeof t?t:Jr(+t),p):i},p.filter=function(t){return arguments.length?(n="function"==typeof t?t:Jr(!!t),p):n},p.touchable=function(t){return arguments.length?(a="function"==typeof t?t:Jr(!!t),p):a},p.extent=function(t){return arguments.length?(r="function"==typeof t?t:Jr([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),p):r},p.scaleExtent=function(t){return arguments.length?(s[0]=+t[0],s[1]=+t[1],p):[s[0],s[1]]},p.translateExtent=function(t){return arguments.length?(l[0][0]=+t[0][0],l[1][0]=+t[1][0],l[0][1]=+t[0][1],l[1][1]=+t[1][1],p):[[l[0][0],l[0][1]],[l[1][0],l[1][1]]]},p.constrain=function(t){return arguments.length?(o=t,p):o},p.duration=function(t){return arguments.length?(u=+t,p):u},p.interpolate=function(t){return arguments.length?(c=t,p):c},p.on=function(){var t=h.on.apply(h,arguments);return t===h?p:t},p.clickDistance=function(t){return arguments.length?(d=(t=+t)*t,p):Math.sqrt(d)},p}eo.prototype;const fo={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}},po={resolveExpression:t=>{let e=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(t);if(e)return`rgb(${e[1]},${e[2]},${e[3]})`;if(e=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(t),e)return`rgba(${e[1]},${e[2]},${e[3]},${e[4]})`;if(e=/^argb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(t),e){const t=Math.round(e[1]/2.55)/100;return`rgba(${e[2]},${e[3]},${e[4]},${t})`}if(e=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i.exec(t),e)return t;const n=t&&fo[t.toLowerCase()];if(n){const t=void 0!==n.a?n.a:1;return`rgba(${n.r},${n.g},${n.b},${t})`}return"none"},getDarkColor(t){const e=.5;let n,r,o,i;if(t.length>7){n=t.split(",");const a=-1!==n[0].indexOf("a");return r=a?parseInt(n[0].slice(5),10):parseInt(n[0].slice(4),10),i=parseInt(n[1],10),o=parseInt(n[2],10),`${(a?"rgba(":"rgb(")+(Math.round((0-r)*e)+r)},${Math.round((0-i)*e)+i},${Math.round((0-o)*e)+o}${a?`,${n[3]}`:")"}`}return n=parseInt(t.slice(1),16),r=n>>16,i=n>>8&255,o=255&n,`#${(16777216+65536*(Math.round((0-r)*e)+r)+256*(Math.round((0-i)*e)+i)+(Math.round((0-o)*e)+o)).toString(16).slice(1)}`},isDarkColor(t){let e,n,r,o;return(o=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(t))||(o=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(t))?(e=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(t))&&(e=parseInt(o[1],16),n=parseInt(o[2],16),r=parseInt(o[3],16)),.299*e+.587*n+.114*r<125}},go=3300,mo={colorByExpression:"color",labelExpression:"label",subLabelExpression:"subLabel",extraLabelExpression:"extraLabel"},yo="max-data-limit",vo="no_root";function bo(t){return t[0].qText}function xo(t){return t[1].qText}async function wo(t,e,n,r,o,i,a){return await n.getHyperCubeData("/qHyperCubeDef",[{qTop:o,qLeft:0,qWidth:3,qHeight:go}]).then((n=>{t.push(n[0]),e.push(...n[0].qMatrix),o+=n[0].qArea.qHeight})),i>=a?yo:r>o?wo(t,e,n,r,o,i+1,a):""}function _o(t,e){const n={};return t.forEach((t=>{"color"===t.prop?n[t.prop]=po.resolveExpression(e.qValues[t.index].qText):n[t.prop]=e.qValues[t.index].qText})),n}function Co(t){if(!t)return!0;for(let e=0;e<t.length;++e)if(void 0!==t[e].children)return!1;return!0}const Lo={cardWidth:152,cardHeight:64,widthMargin:32,heightMargin:56,buttonMargin:16,leafMargin:16,cardPadding:8,buttonWidth:48,buttonHeight:24,rootDiameter:20,r:4,tooltipWidth:240,tooltipPadding:15,maxZoom:6,minZoom:.2},ko=(t,e,n,r,o,i)=>{const{buttonMargin:a}=Lo,s=o&&o.initialX||0;return"expandAll"===i?(t[r]=t.x+s,t[r]):(t.parent?(t.parent[r]||(t.parent[r]=ko(t.parent,e,n,r,o)),"Root"===t.parent.data.id?t[r]=t.parent[r]+(t.data.childNumber-(t.parent.children.length-1)/2)*e:t[r]=Co(t.parent.children)?t.parent[r]+a:t.parent[r]+(t.data.childNumber-(t.parent.children.length-1)/2)*e):t[r]=s,t[r])};function Oo(t,e,n,r){const{widthMargin:o,heightMargin:i,cardWidth:a,cardHeight:s,cardPadding:l}=Lo;let u,c,h;if("ttb"===t)u=a+o,c="expandAll"===r?s+2*l:s+i,h={depthSpacing:c,isVertical:!0,x:t=>ko(t,u,e,"xActual",n,r),y:t=>((t,e,n,r,o)=>{const{cardHeight:i,leafMargin:a}=Lo,s=r&&r.initialY||0;return t.parent&&"Root"!==t.parent.data.id&&"expandAll"!==o&&Co(t.parent.children)?t[n]=t.parent.y+e+t.data.childNumber*(i+a)+s:t[n]=t.y+s,t[n]})(t,c,"yActual",n,r)};return h}const Eo=t=>{const e=document.createElement("div"),n=document.createTextNode(t);return e.appendChild(n),e.innerHTML},Mo=t=>{const e=["#"," ","(",")"];let n="";for(let r=0;r<t.length;r++){const o=t.charAt(r),i=t.charCodeAt(r);if(!o.match(/[a-zA-Z0-9]/)&&e.indexOf(o)<0){const t=i.toString(16);n+=`\\${"000000".substr(t.length)}${t}`}else n+=o}return n};function Ro(t){const e=po.resolveExpression(t);return"none"!==e?e:Mo(t)}var Ao=(t,e)=>{const{api:n,state:r,singleSelect:o,setState:i}=e;if(t&&n){let e;if(t.data.elemNo<0&&-3!==t.data.elemNo)return;if(t.data.isLocked)return;n.isActive()&&r?e=r.concat():(n.begin("/qHyperCubeDef"),e=[]);const a=e.indexOf(t.data.elemNo),s=-1===a;let l=[];o||(l=function(t,e){const n=[],r=t=>{t.children.forEach((t=>{t.data.selected=e,n.push(t.data.elemNo),t.children&&t.children.length>0&&r(t)}))};return t.children&&r(t),n}(t,s)),s?(e.push(t.data.elemNo),l.forEach((t=>{-1===e.indexOf(t)&&e.push(t)}))):(e.splice(a,1),l.forEach((t=>{const n=e.indexOf(t);-1!==n&&e.splice(n,1)}))),0===e.length?n.clear():n.select({method:"selectHyperCubeValues",params:["/qHyperCubeDef",0,e,!1]}),i(e)}};function To(t,e,n,r,o,i,a,s=250){t.active=!0,t.timeout=setTimeout((()=>{t.active&&t.html(function(t,e){return`<div class="sn-org-tooltip-inner"><div class="sn-org-tooltip-header">${Eo(t.data.attributes.label||t.data.id)}</div>${t.data.attributes.subLabel?`${Eo(t.data.attributes.subLabel)}<br />`:""}${t.data.attributes.extraLabel?`${Eo(t.data.attributes.extraLabel)}<br />`:""}${Eo(t.data.measure?`${e.measureLabel?`${e.measureLabel}: `:""}${t.data.measure}`:"")}</div>`}(e,r)).classed("sn-org-tooltip-visible",!0).attr("style",(()=>function(t,e,n,r,o){const{cardWidth:i,tooltipPadding:a}=Lo,s=i/2;return`bottom:${e-(r(t)*o.zoom+o.y-a)}px;left:${n(t)*o.zoom+o.x+s*o.zoom}px;`}(e,n,o,i,a)))}),s)}function No(t){clearTimeout(t.timeout),t.active=!1,t.classed("sn-org-tooltip-visible",!1)}const So=(t,e,n,r,o)=>{const i=t.k,a=`${t.x}px, ${t.y}px`;e.attr("transform",t),n.classed("org-disable-transition",!0),e.classed("org-disable-transition",!0),n.attr("style",`width:${r}px;height:${o}px; transform: translate(${a}) scale(${i})`)};const zo="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",Do=({topId:t,isExpanded:e,expandedChildren:n},r,o,i)=>{if("expandAll"===i)return r.descendants();const a=r.descendants().find((e=>e.data.id===t))||r,s=[];if(e&&a.children&&a.children.forEach((t=>{s.push(t),t.children&&(-1!==n.indexOf(t.data.id)||o)&&t.children.forEach((e=>{s.push(e),-1!==n.indexOf(t.data.id)&&o&&e.children&&e.children.forEach((t=>{s.push(t)}))}))})),"free"===r.data.navigationMode&&a.parent){const t=a.parent.ancestors(),e=t.map((t=>t.data.id));t.forEach((t=>{o&&t.children.forEach((t=>{t.children&&-1===e.indexOf(t.data.id)&&t.data.id!==a.data.id&&s.unshift(...t.children)})),s.unshift(...t.children),t.parent||s.unshift(t)}))}else s.unshift(a);return s},qo=({element:t,dataTree:e,selectionObj:n,wrapperState:r,setInitialZoom:o,setTransform:i,setExpandedState:a,viewState:s,setContainerData:l,layout:u})=>{t.innerHTML="",t.className="sn-org-chart";const{navigationMode:c}=u;let h=Oo("ttb",t,{},c);const{width:f,height:d}=t.getBoundingClientRect(),p=It(t).append("span").attr("class","sn-org-zoomwrapper").on("click",(()=>{r.constraints.active||n.api.isActive()&&n.state||(n.api.begin("/qHyperCubeDef"),n.setState([]))})).node(),g=It(p).selectAll("svg").data([{}]).enter().append("svg").attr("class","sn-org-svg").attr("width","100%").attr("height","100%"),m=It(p).selectAll("div").data([{}]).enter().append("div").attr("class","sn-org-nodes"),y=It(t).append("button").attr("class","sn-org-homebutton disabled").on("click",(()=>{qo({element:t,dataTree:e,selectionObj:n,wrapperState:r,setInitialZoom:o,setTransform:i,setExpandedState:a,viewState:s,setContainerData:l,layout:u})})).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(),v=function(t){const e=It(t).append("div").attr("class","sn-org-tooltip").on("mousedown",(()=>{e.classed("sn-org-tooltip-visible",!1)}));return e}(t);if(e.error)return It(p).append("div").attr("class","sn-org-error").html(e.message),!1;e.warn&&e.warn.length&&It(p).append("span").attr("class","sn-org-warning").html(`*${e.warn.join(" ")}`);const b=g.append("g").attr("class","sn-org-paths"),x=gr().size([f,d]).nodeSize([Lo.cardWidth+Lo.cardPadding,h.depthSpacing])(or(e)),w=!r.expandedState||!x.descendants().find((t=>t.data.id===r.expandedState.topId)),_=w?{topId:x.data.id,isExpanded:!0,expandedChildren:[],useTransitions:!1}:r.expandedState,C=Do(_,x,!1,c);C.forEach((t=>{t.xActual&&t.yActual||(h.x(t),h.y(t))}));const L=(t=>{const{cardWidth:e,cardHeight:n,buttonHeight:r,buttonMargin:o}=Lo,i={left:1/0,top:1/0,right:-1/0,bottom:-1/0};return t.forEach((t=>{i.left=Math.min(t.xActual,i.left),i.top=Math.min(t.yActual,i.top),i.right=Math.max(t.xActual,i.right),i.bottom=Math.max(t.yActual,i.bottom)})),{x:i.left,y:i.top-r-o,width:i.right-i.left+e,height:i.bottom-i.top+n+2*(r+o)}})(C),k=s&&s.initialZoom?s.initialZoom:((t,e,n)=>{const{widthMargin:r,cardHeight:o,minZoom:i}=Lo,a="expandAll"===n?1/0:Lo.maxZoom,{width:s,height:l}=t,{clientHeight:u,clientWidth:c}=e,h=s+2*r,f=l+o,d=Math.max(Math.min(h/c,a),i),p=Math.max(Math.min(f/u,a),i);return d>p?{initialX:-t.x+r,initialY:-t.y+(u*d-l)/2,initialZoom:d}:{initialX:-t.x+(c*p-s)/2,initialY:o/2,initialZoom:p}})(L,t,c);return o(k),h=Oo("ttb",t,k,c),function({containerData:t,setTransform:e,transformState:n,wrapperState:r,initialZoomState:o,navigationMode:i}){const{svg:a,divBox:s,width:l,height:u,zoomWrapper:c,element:h,tooltip:f,homeButton:d}=t,{x:p=0,y:g=0}=n,{minZoom:m,maxZoom:y}=Lo,v=n&&1/n.zoom||o.initialZoom,b="expandAll"===i?v:Math.max(Math.min(y,v),m),x=()=>{const t=document.createEvent("MouseEvents");t.initEvent("mousedown",!0,!1),h.dispatchEvent(t)};It(c).call(ho().extent([[0,0],[l,u]]).filter((()=>!(r.constraints.active||"dblclick"===At.type||"mousedown"===At.type&&3===At.which))).scaleExtent(["expandAll"===i?.8:m*b,y*b]).on("start",x).on("zoom",(()=>{It(d).attr("class","sn-org-homebutton lui-fade-button lui-fade-button--large"),e({zoom:At.transform.k/b,x:At.transform.x,y:At.transform.y}),x(),No(f),So(no.translate(At.transform.x,At.transform.y).scale(At.transform.k/b),a,s,l,u)}))),e({zoom:1/b,x:p,y:g}),So(no.translate(p,g).scale(1/b),a,s,l,u)}({containerData:{svg:b,divBox:m,width:f,height:d,zoomWrapper:p,element:t,tooltip:v,homeButton:y},setTransform:i,transformState:s&&s.transform||{},wrapperState:r,initialZoomState:k,navigationMode:c}),w&&a(_),l({svg:b,divBox:m,allNodes:x,positioning:h,width:f,height:d,element:t,zoomWrapper:p,tooltip:v,homeButton:y})},$o=(t,e,n,r)=>{const o={expandedState:t,transform:e,size:{w:r.clientWidth,h:r.clientHeight},initialZoom:n};return o.expandedState.useTransitions=!1,o};var Po={"Object.OrgChart":"Org chart","Object.OrgChart.Description":"Displays the relations of an organization or similarly structured data. Starts at the top and allows for navigation through the hierarchy.","Object.OrgChart.MaxData":"The maximum data limit is reached. The tree may display incorrectly.","Object.OrgChart.DummyWarn":"The data contains multiple root nodes.","Object.OrgChart.CycleWarning":"Data contains circular references, nodes are omitted.","Object.OrgChart.MissingRoot":"No root node, check your data for circular references.","Object.OrgChart.MaxChildren":"Maximum number of child nodes reached, nodes are omitted.","Object.OrgChart.LabelExpression":"Card title","Object.OrgChart.SubLabelExpression":"Card sub-title","Object.OrgChart.ExtraLabelExpression":"Card description","Object.OrgChart.ColorLabelExpression":"Card background color","Object.OrgChart.BackgroundColor":"Background color","Object.OrgChart.FontColor":"Font color","Object.OrgChart.IncludeDescendants":"Include descendants","Object.OrgChart.ExtraLabelDesc":"Description is only visible when a measure is not used"};function Bo(t){if(t&&t.get&&t.add){const e="Object.OrgChart.MaxData";if(t.get(e)!==e)return;Object.keys(Po).forEach((e=>{t.add({id:e,locale:{"en-US":Po[e]}})}))}}function jo(t,e,n){let r;switch(t.colorType){case"byExpression":r=po.resolveExpression(t.colorExpression);break;case"colorPicker":r=e.getColorPickerColor(t.color);break;default:r=n}return"none"===r?n:r}const Ho=({Theme:t,layout:e})=>{const n=jo(e.style.backgroundColor,t,y.BACKGROUND_COLOR.color),r=jo(e.style.fontColor,t,"default"),o=e.qHyperCube.qMeasureInfo.length?e.qHyperCube.qMeasureInfo[0].qFallbackTitle:null,{border:i={colorType:y.BORDER_COLOR_TYPE}}=e.style;return{backgroundColor:n,fontColor:r,measureLabel:o,border:i,borderColor:"auto"!==i.colorType?jo(i,t,po.getDarkColor(n)):po.getDarkColor(n)}},Io=(t,e)=>{let{viewState:n}=t;return!n&&e.snapshotData&&e.snapshotData.viewState&&(n=e.snapshotData.viewState),n};function Vo(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"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=t:o.appendChild(document.createTextNode(t))}}Vo(".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: 230px;\n width: -moz-max-content;\n width: fit-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-header {\n font-weight: bold;\n padding-bottom: 5px;\n}\n");Vo(".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");Vo(".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");Vo(".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}\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-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-card-label {\n font-size: 11px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n");Vo(".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")}}}));
|
|
7
|
+
System.register(["@nebula.js/stardust"],(function(t){"use strict";var e,n,r,o,i,a,s,l,u,c,h,d,p,f,g,m,b;return{setters:[function(t){e=t.useState,n=t.useSelections,r=t.useLayout,o=t.useEffect,i=t.useAction,a=t.useElement,s=t.onTakeSnapshot,l=t.useImperativeHandle,u=t.useStaleLayout,c=t.useModel,h=t.useTheme,d=t.useOptions,p=t.useRect,f=t.useConstraints,g=t.useTranslator,m=t.useMemo,b=t.usePromise}],execute:function(){t("default",(function(t){return{qae:{properties:re,data:y},component:()=>{const t=u(),y=c(),v=a(),x=h(),w=d(),_=p(),C=f(),O=g(),[k,E]=e(null),[R,S]=e(null),[T,L]=e(null),[z,M]=e(null),[N,A]=e(null),[j]=e({transform:{},constraints:C,expandedState:T}),$=function(t){const[a,s]=e(!1),l=n(),u=!!r().qSelectionInfo.qInSelections,[c]=e({api:l,setState:t=>{c.state=t},state:[],singleSelect:!1});o((()=>{ne(t)}),[t]);const h=()=>{c.state=[]},d=()=>{c.state=[],s(!1)};return o((()=>c.api?(c.api=l,c.api.on("deactivated",h),c.api.on("canceled",d),c.api.on("confirmed",d),c.api.on("cleared",h),()=>{c.api.removeListener("deactivated",h),c.api.removeListener("canceled",d),c.api.removeListener("confirmed",d),c.api.removeListener("cleared",h)}):()=>{}),[l]),o((()=>{c.singleSelect=a}),[a]),i((()=>({action(){s(!a)},icon:{shapes:[{type:"path",attrs:{d:oe}}]},active:a,hidden:!u,label:t.get("Object.OrgChart.SingleSelect")})),[a,u]),o((()=>{const t=t=>{"Shift"===t.key&&s(!0)},e=t=>{"Shift"===t.key&&s(!1)};return document.addEventListener("keydown",t),document.addEventListener("keyup",e),()=>{document.removeEventListener("keydown",t),document.removeEventListener("keyup",e)}}),[]),c}(O);m((()=>{ne(O)}),[v,O.language()]),o((()=>{j.constraints=C}),[C]),o((()=>{j.transform=z}),[z]),o((()=>{j.expandedState=T}),[T]);const D=t=>{t.useTransitions=!0,L(t)},[B]=b((()=>{if(!t)return Promise.resolve();const e=Ni.getViewState(w,t);return e&&e.expandedState&&L(e.expandedState),e&&e.transform&&M(e.transform),async function({layout:t,model:e,translator:n}){if(!t.qHyperCube)throw new Error("Require a hypercube");if(t.qHyperCube.qDimensionInfo.length<2)return!1;const{status:r,dataMatrix:o}=await pi(t,e),i=function(t){if(t&&t.length){const e=[];return t.forEach(((t,n)=>{si[t.id]&&e.push({prop:si[t.id],index:n})})),e}return[]}(t.qHyperCube.qDimensionInfo[0].qAttrExprInfo);if(!o)return null;if(o.length<1)return null;return function(t,e,n,r,o){const i={},a=[];for(let n=0;n<t.length;++n){const r=t[n],o=ci(r),s={id:o,parentId:hi(r),children:[],elemNo:r[0].qElemNumber,attributes:fi(e,r[0].qAttrExps),measure:r[2]&&r[2].qText,rowNo:n};i[o]=s,a.push(s)}const s=[];let l=!1;for(let t=0;t<a.length;++t){const e=a[t],n=i[e.parentId];e.parent=n,n?n.children.length>98?l=!0:n.children.push({childNumber:n.children.length,...e}):s.length>98?l=!0:s.push(e)}if(0===s.length)return{error:ui,message:o.get("Object.OrgChart.MissingRoot")};const u=[];n===li&&u.push(o.get("Object.OrgChart.MaxData"));l&&u.push(o.get("Object.OrgChart.MaxChildren"));(function(t){const e={},n={};function r(t){e[t.id]=!0,n[t.id]=!0;for(let o=0;o<t.children.length;++o){if(!e[t.children[o].id]&&r(t.children[o]))return!0;if(n[t.children[o].id])return!0}return n[t.id]=!1,!1}for(let n=0;n<t.length;++n){const o=t[n];if(!e[o.id]&&r(o))return!0}return!1})(a)&&u.push(o.get("Object.OrgChart.CycleWarning"));if(1===s.length)return s[0].warn=u,s[0].navigationMode=r,s[0];u.push(o.get("Object.OrgChart.DummyWarn"));const c={id:"Root",name:o.get("Object.OrgChart.DummyRoot"),isDummy:!0,warn:u,children:s,navigationMode:r};return s.forEach(((t,e)=>{t.parentId="Root",t.parent=c,t.childNumber=e})),c}(o,i,r,t.navigationMode,n)}({layout:t,model:y,translator:O}).then((e=>(S(Mi.cardStyling({Theme:x,layout:t})),$.setState([]),e)))}),[t,y,O.language(),x.name()]),P=()=>{if(v&&B){const e=Ni.getViewState(w,t);Ri({element:v,dataTree:B,viewState:e,wrapperState:j,selectionObj:$,setInitialZoom:A,setTransform:M,setExpandedState:L,setContainerData:E,layout:t})}},q=()=>{k&&T&&R&&Ei({containerData:k,styling:R,setExpandedCallback:D,wrapperState:j,selectionObj:$,useTransitions:T.useTransitions,element:v})};o((()=>{q()}),[k,$.state]),o((()=>{P()}),[v,B,C]),o((()=>{t.resizeOnExpand?P():q()}),[T]),o((()=>{if(k&&t&&t.snapshotData){const e=Oi(_,t.snapshotData.viewState,z);Ci(e,k.svg,k.divBox,_.width,_.height),k.divBox.classed("sn-org-chart-snapshot",!0)}}),[_,k]),function(t,e,n,r,o){const i=a();s((a=>{a.snapshotData||(a.snapshotData={}),n.snapshotData&&n.snapshotData.viewState||(a.snapshotData.viewState=Ti(t,r,o,i)),a.snapshotData.dataMatrix=Si(t,e.allNodes,n)})),l((()=>({getViewState:()=>Ti(t,r,o,i)})))}(T,k,t,z,N)},ext:te(t)}}));var y={targets:[{path:"/qHyperCubeDef",dimensions:{min:2,max:2},measures:{min:0,max:1}}]},v={FONT_COLOR_TYPE:"auto",FONT_COLOR_DARK:{index:-1,color:"#484848"},FONT_COLOR_LIGHT:{index:-1,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};var x={getValue:function(t,e,n){const r=e.split(".");let o;if(void 0===t)return n;let i=t;for(o=0;o<r.length;++o){if(void 0===i[r[o]])return n;i=i[r[o]]}return i}};function w(t){return function(t){if(Array.isArray(t))return _(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return _(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var C=["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"],O=["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 k=function(t){return{value:t,label:t.charAt(0).toUpperCase()+t.slice(1),groupHeader:!1,disabled:!1,styles:{fontFamily:t}}};function E(t){var e=t.theme,n=t.translator,r=t.defaultValue,o=t.flags,i=[],a=e.getStyle("","","fontFamilies");return Array.isArray(a)&&a.length?i.push.apply(i,w(new Set([r].concat(w(a.map((function(t){return t.split(",").map((function(t){return t.trim()})).map((function(t){return t.replace(/\s+/g," ").trim()})).filter(Boolean).join(", ")}))))))):i.push(r),[{value:"ThemeHeader",label:n.get("properties.themeFonts"),metaText:n.get("properties.theme"),groupHeader:!0}].concat(w(i.map((function(t){return k(t)}))),[{value:"DefaultHeader",label:n.get("properties.allFonts"),metaText:n.get("properties.default"),groupHeader:!0}],w(function(t){return null!=t&&t.isEnabled("PS_20852_WYSIWYG_FONT_SUPPORT")?O:C}(o).map((function(t){return k(t)}))))}function R(t){var e=t.theme,n=t.translator,r=t.id,o=t.path,i=t.flags,a=function(){return e.getStyle(r,o,"fontFamily")};return{getDefaultValue:function(){return a()},getOptions:function(){return E({theme:e,translator:n,defaultValue:a(),flags:i})}}}var S=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],T=function(t){return{value:t,label:t,groupHeader:!1,disabled:!1}};function L(t){var e=t.theme,n=t.translator,r=t.id,o=t.path,i=function(){return e.getStyle(r,o,"fontSize")};return{getDefaultValue:function(){return i()},getOptions:function(){return function(t){var e=t.translator,n=t.defaultValue,r=[],o=t.theme.getStyle("","","fontSizes");return Array.isArray(o)&&o.length?r.push.apply(r,w(new Set([n].concat(w(o))))):r.push(n),[{value:"ThemeHeader",label:e.get("properties.themeFontSizes"),metaText:e.get("properties.theme"),groupHeader:!0}].concat(w(r.map((function(t){return T(t)}))),[{value:"DefaultHeader",label:e.get("properties.allFontSizes"),metaText:e.get("properties.default"),groupHeader:!0}],w(S.map((function(t){return T(t)}))))}({theme:e,translator:n,defaultValue:i()})}}}function z(t){var e=t.theme,n=t.translator,r=t.id,o=t.path;return{fontFamily:R({theme:e,translator:n,id:r,path:o,flags:t.flags}),fontSize:L({theme:e,translator:n,id:r,path:o})}}var M,N=Object.prototype.hasOwnProperty,A=Object.prototype.toString,j=Object.defineProperty,$=Object.getOwnPropertyDescriptor,D=function(t){return"function"==typeof Array.isArray?Array.isArray(t):"[object Array]"===A.call(t)},B=function(t){if(!t||"[object Object]"!==A.call(t))return!1;var e,n=N.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&N.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;for(e in t);return void 0===e||N.call(t,e)},P=function(t,e){j&&"__proto__"===e.name?j(t,e.name,{enumerable:!0,configurable:!0,value:e.newValue,writable:!0}):t[e.name]=e.newValue},q=function(t,e){if("__proto__"===e){if(!N.call(t,e))return;if($)return $(t,e).value}return t[e]};function I(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function V(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function H(){}M=function t(){var e,n,r,o,i,a,s=arguments[0],l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<u;++l)if(null!=(e=arguments[l]))for(n in e)r=q(s,n),s!==(o=q(e,n))&&(c&&o&&(B(o)||(i=D(o)))?(i?(i=!1,a=r&&D(r)?r:[]):a=r&&B(r)?r:{},P(s,{name:n,newValue:t(c,a,o)})):void 0!==o&&P(s,{name:n,newValue:o}));return s},M&&M.__esModule&&Object.prototype.hasOwnProperty.call(M,"default")&&M.default;var U=1/.7,K="\\s*([+-]?\\d+)\\s*",F="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",W="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Y=/^#([0-9a-f]{3,8})$/,Z=new RegExp(`^rgb\\(${K},${K},${K}\\)$`),G=new RegExp(`^rgb\\(${W},${W},${W}\\)$`),X=new RegExp(`^rgba\\(${K},${K},${K},${F}\\)$`),J=new RegExp(`^rgba\\(${W},${W},${W},${F}\\)$`),Q=new RegExp(`^hsl\\(${F},${W},${W}\\)$`),tt=new RegExp(`^hsla\\(${F},${W},${W},${F}\\)$`),et={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 nt(){return this.rgb().formatHex()}function rt(){return this.rgb().formatRgb()}function ot(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Y.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?it(e):3===n?new ut(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?at(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?at(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Z.exec(t))?new ut(e[1],e[2],e[3],1):(e=G.exec(t))?new ut(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=X.exec(t))?at(e[1],e[2],e[3],e[4]):(e=J.exec(t))?at(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Q.exec(t))?gt(e[1],e[2]/100,e[3]/100,1):(e=tt.exec(t))?gt(e[1],e[2]/100,e[3]/100,e[4]):et.hasOwnProperty(t)?it(et[t]):"transparent"===t?new ut(NaN,NaN,NaN,0):null}function it(t){return new ut(t>>16&255,t>>8&255,255&t,1)}function at(t,e,n,r){return r<=0&&(t=e=n=NaN),new ut(t,e,n,r)}function st(t){return t instanceof H||(t=ot(t)),t?new ut((t=t.rgb()).r,t.g,t.b,t.opacity):new ut}function lt(t,e,n,r){return 1===arguments.length?st(t):new ut(t,e,n,null==r?1:r)}function ut(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function ct(){return`#${ft(this.r)}${ft(this.g)}${ft(this.b)}`}function ht(){const t=dt(this.opacity);return`${1===t?"rgb(":"rgba("}${pt(this.r)}, ${pt(this.g)}, ${pt(this.b)}${1===t?")":`, ${t})`}`}function dt(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function pt(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function ft(t){return((t=pt(t))<16?"0":"")+t.toString(16)}function gt(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new bt(t,e,n,r)}function mt(t){if(t instanceof bt)return new bt(t.h,t.s,t.l,t.opacity);if(t instanceof H||(t=ot(t)),!t)return new bt;if(t instanceof bt)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,o=Math.min(e,n,r),i=Math.max(e,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=e===i?(n-r)/s+6*(n<r):n===i?(r-e)/s+2:(e-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new bt(a,s,l,t.opacity)}function bt(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function yt(t){return(t=(t||0)%360)<0?t+360:t}function vt(t){return Math.max(0,Math.min(1,t||0))}function xt(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}I(H,ot,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:nt,formatHex:nt,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return mt(this).formatHsl()},formatRgb:rt,toString:rt}),I(ut,lt,V(H,{brighter(t){return t=null==t?U:Math.pow(U,t),new ut(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new ut(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ut(pt(this.r),pt(this.g),pt(this.b),dt(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:ct,formatHex:ct,formatHex8:function(){return`#${ft(this.r)}${ft(this.g)}${ft(this.b)}${ft(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:ht,toString:ht})),I(bt,(function(t,e,n,r){return 1===arguments.length?mt(t):new bt(t,e,n,null==r?1:r)}),V(H,{brighter(t){return t=null==t?U:Math.pow(U,t),new bt(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new bt(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,o=2*n-r;return new ut(xt(t>=240?t-240:t+120,o,r),xt(t,o,r),xt(t<120?t+240:t-120,o,r),this.opacity)},clamp(){return new bt(yt(this.h),vt(this.s),vt(this.l),dt(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=dt(this.opacity);return`${1===t?"hsl(":"hsla("}${yt(this.h)}, ${100*vt(this.s)}%, ${100*vt(this.l)}%${1===t?")":`, ${t})`}`}}));const wt=Math.PI/180,_t=180/Math.PI,Ct=4/29,Ot=6/29,kt=3*Ot*Ot;function Et(t){if(t instanceof Rt)return new Rt(t.l,t.a,t.b,t.opacity);if(t instanceof Mt)return Nt(t);t instanceof ut||(t=st(t));var e,n,r=zt(t.r),o=zt(t.g),i=zt(t.b),a=St((.2225045*r+.7168786*o+.0606169*i)/1);return r===o&&o===i?e=n=a:(e=St((.4360747*r+.3850649*o+.1430804*i)/.96422),n=St((.0139322*r+.0971045*o+.7141733*i)/.82521)),new Rt(116*a-16,500*(e-a),200*(a-n),t.opacity)}function Rt(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function St(t){return t>.008856451679035631?Math.pow(t,1/3):t/kt+Ct}function Tt(t){return t>Ot?t*t*t:kt*(t-Ct)}function Lt(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function zt(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Mt(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function Nt(t){if(isNaN(t.h))return new Rt(t.l,0,0,t.opacity);var e=t.h*wt;return new Rt(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}I(Rt,(function(t,e,n,r){return 1===arguments.length?Et(t):new Rt(t,e,n,null==r?1:r)}),V(H,{brighter(t){return new Rt(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker(t){return new Rt(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new ut(Lt(3.1338561*(e=.96422*Tt(e))-1.6168667*(t=1*Tt(t))-.4906146*(n=.82521*Tt(n))),Lt(-.9787684*e+1.9161415*t+.033454*n),Lt(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),I(Mt,(function(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof Mt)return new Mt(t.h,t.c,t.l,t.opacity);if(t instanceof Rt||(t=Et(t)),0===t.a&&0===t.b)return new Mt(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*_t;return new Mt(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}(t):new Mt(t,e,n,null==r?1:r)}),V(H,{brighter(t){return new Mt(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker(t){return new Mt(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb(){return Nt(this).rgb()}}));var At,jt=t=>()=>t;function $t(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):jt(isNaN(t)?e:t)}function Dt(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function Bt(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=qt)):void 0===e&&(e=Pt);for(var n,r,o,i,a,s=new Ht(t),l=[s];n=l.pop();)if((o=e(n.data))&&(a=(o=Array.from(o)).length))for(n.children=o,i=a-1;i>=0;--i)l.push(r=o[i]=new Ht(o[i])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Vt)}function Pt(t){return t.children}function qt(t){return Array.isArray(t)?t[1]:null}function It(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function Vt(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function Ht(t){this.data=t,this.depth=this.height=0,this.parent=null}function Ut(t,e){const n=`${t}.fontFamily`,r=`${t}.fontSize`;return{fontFamilyItem:{component:"dropdown",ref:n,options:()=>e.getOptions(n),defaultValue:()=>e.getDefaultValue(n)},fontSizeItem:{component:"dropdown",ref:r,options:()=>e.getOptions(r),defaultValue:()=>e.getDefaultValue(r)}}}!function t(e){var n=function(t){return 1==(t=+t)?$t:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):jt(isNaN(e)?n:e)}}(e);function r(t,e){var r=n((t=lt(t)).r,(e=lt(e)).r),o=n(t.g,e.g),i=n(t.b,e.b),a=$t(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=o(e),t.b=i(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1),Ht.prototype=Bt.prototype={constructor:Ht,count:function(){return this.eachAfter(Dt)},each:function(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this},eachAfter:function(t,e){for(var n,r,o,i=this,a=[i],s=[],l=-1;i=a.pop();)if(s.push(i),n=i.children)for(r=0,o=n.length;r<o;++r)a.push(n[r]);for(;i=s.pop();)t.call(e,i,++l,this);return this},eachBefore:function(t,e){for(var n,r,o=this,i=[o],a=-1;o=i.pop();)if(t.call(e,o,++a,this),n=o.children)for(r=n.length-1;r>=0;--r)i.push(n[r]);return this},find:function(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,o=r&&r.length;--o>=0;)n+=r[o].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),o=null;for(t=n.pop(),e=r.pop();t===e;)o=t,t=n.pop(),e=r.pop();return o}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var o=r.length;t!==n;)r.splice(o,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return Bt(this).eachBefore(It)},[Symbol.iterator]:function*(){var t,e,n,r,o=this,i=[o];do{for(t=i.reverse(),i=[];o=t.pop();)if(yield o,e=o.children)for(n=0,r=e.length;n<r;++n)i.push(e[n])}while(i.length)}},At=function(t){
|
|
8
|
+
/*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
|
|
9
|
+
t.exports=function(t,e){if(!t||isNaN(+e))return e;var n,r,o,i,a,s,l,u,c,h,d=t.length,p=t.search(/[0-9\-\+#]/),f=p>0?t.substring(0,p):"",g=t.split("").reverse().join(""),m=g.search(/[0-9\-\+#]/),b=d-m,y=t.substring(b,b+1),v=b+("."===y||","===y?1:0),x=m>0?t.substring(v,d):"";if(n=(e="-"===(t=t.substring(p,v)).charAt(0)?-e:+e)<0?e=-e:0,o=(r=t.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",i=r&&r[1]&&r[0]||",",t=t.split(o),e=+(e=e.toFixed(t[1]&&t[1].length))+"",s=t[1]&&t[1].lastIndexOf("0"),(!(u=e.split("."))[1]||u[1]&&u[1].length<=s)&&(e=(+e).toFixed(s+1)),c=t[0].split(i),t[0]=c.join(""),(a=t[0]&&t[0].indexOf("0"))>-1)for(;u[0].length<t[0].length-a;)u[0]="0"+u[0];else 0==+u[0]&&(u[0]="");if((e=e.split("."))[0]=u[0],l=c[1]&&c[c.length-1].length){for(g="",b=(h=e[0]).length%l,d=h.length,v=0;v<d;v++)g+=h.charAt(v),!((v-b+1)%l)&&v<d-l&&(g+=i);e[0]=g}return e[1]=t[1]&&e[1]?o+e[1]:"","0"!==(r=e.join(""))&&""!==r||(n=!1),f+(n?"-":"")+r+x}},At({exports:{}});const Kt=[{value:"auto",translation:"Common.Auto"},{value:"colorPicker",translation:"properties.colorMode.primary"},{value:"byExpression",translation:"properties.colorMode.byExpression"}];function Ft(t,e,n){const r=function(t){var e=t.theme,n=t.translator,r=t.config,o=void 0===r?{}:r,i=t.flags,a=function(t){var e=t.config,n=void 0===e?{}:e,r=n.id,o=n.paths;return{id:void 0===r?"object":"".concat("object",".").concat(r),paths:Array.isArray(o)?o:[]}}({config:o}),s=a.id,l=a.paths,u={};l.forEach((function(t){for(var r=t.split("."),o=u,a=0;a<r.length;a++){var l=r[a];a===r.length-1?o[l]=z({theme:e,translator:n,id:s,path:t,flags:i}):void 0===o[l]&&(o[l]={}),o=o[l]}}));var c=function(t){for(var e=t.split("."),n=u,r=0;r<e.length;r++){var o=e[r];if(void 0===n[o])throw new Error("font-resolver: Path '".concat(t,"' could not be resolved."));n=n[o]}return n};return u.getDefaultValue=function(t){return c(t).getDefaultValue()},u.getOptions=function(t){return c(t).getOptions()},u}({theme:t,translator:n,flags:e,config:{id:"orgChart",paths:["axis.label.name","label.value"]}}),o=t=>{var e,n,r,o;return(null!==(e=null===(n=t.border)||void 0===n?void 0:n.top)&&void 0!==e?e:v.BORDER_TOP)||(null!==(r=null===(o=t.border)||void 0===o?void 0:o.fullBorder)&&void 0!==r?r:v.BORDER_FULL)};return{component:"styling-panel",show:!0,chartType:"orgchart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.OrgChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,useBackground:!0,items:{axisLabelSection:{translation:"Object.OrgChart.Title",component:"panel-section",items:{axisLabelItems:{component:"items",ref:"components",key:"axis",items:Ut("axis.label.name",r)}}},labelSection:{translation:"Object.OrgChart.Body",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"label",items:Ut("label.value",r)}}},fontColorSection:{component:"panel-section",type:"items",translation:"Object.OrgChart.FontColor",items:{fontColorItems:{component:"items",ref:"components",key:"label",items:{fontColorWrapperItem:{component:"inline-wrapper",items:{useColorExpression:{ref:"label.value.colorType",width:9,component:"dropdown",defaultValue:v.FONT_COLOR_TYPE,options:Kt},colorPicker:{component:"color-picker",ref:"label.value.color",width:3,dualOutput:!0,defaultValue:v.FONT_COLOR_DARK,show:t=>{var e,n;return"colorPicker"===(null!==(e=null===(n=t.label)||void 0===n||null===(n=n.value)||void 0===n?void 0:n.colorType)&&void 0!==e?e:v.FONT_COLOR_TYPE)}}}},colorExpression:{component:"input-field-expression",type:"string",ref:"label.value.colorExpression",expression:"optional",defaultValue:"",show:t=>{var e,n;return"byExpression"===(null!==(e=null===(n=t.label)||void 0===n||null===(n=n.value)||void 0===n?void 0:n.colorType)&&void 0!==e?e:v.FONT_COLOR_TYPE)}}}}}},backgroundColorSection:{component:"panel-section",translation:"Object.OrgChart.ColorLabelExpression",items:{backgroundColorItems:{component:"items",ref:"components",key:"backgroundColor",items:{fontColorWrapperItem:{component:"inline-wrapper",items:{useColorExpression:{ref:"backgroundColor.colorType",width:9,component:"dropdown",defaultValue:v.BACKGROUND_COLOR_TYPE,options:Kt},colorPicker:{component:"color-picker",type:"object",ref:"backgroundColor.color",width:3,dualOutput:!0,defaultValue:v.BACKGROUND_COLOR,show:t=>{var e,n;return"colorPicker"===(null!==(e=null===(n=t.backgroundColor)||void 0===n?void 0:n.colorType)&&void 0!==e?e:v.BACKGROUND_COLOR_TYPE)}}}},colorExpression:{component:"input-field-expression",type:"string",ref:"backgroundColor.colorExpression",expression:"optional",defaultValue:"",show:t=>{var e,n;return"byExpression"===(null!==(e=null===(n=t.backgroundColor)||void 0===n?void 0:n.colorType)&&void 0!==e?e:v.BACKGROUND_COLOR_TYPE)}}}}}},cardBorderSection:{component:"panel-section",translation:"Object.OrgChart.CardAppearance",items:{cardBorderItems:{component:"items",ref:"components",key:"border",items:{topBar:{component:"checkbox",ref:"border.top",translation:"Object.OrgChart.TopBar",defaultValue:v.BORDER_TOP},fullBorder:{component:"checkbox",ref:"border.fullBorder",translation:"properties.border",defaultValue:v.BORDER_FULL},borderColorWrapperItem:{component:"inline-wrapper",items:{colorType:{component:"dropdown",type:"string",ref:"border.colorType",width:9,translation:"properties.border.color",defaultValue:v.BORDER_COLOR_TYPE,options:Kt,show:t=>o(t)},colorPicker:{component:"color-picker",type:"object",ref:"border.color",width:3,dualOutput:!0,defaultValue:v.BORDER_COLOR,show:t=>{var e,n;return o(t)&&"colorPicker"===(null!==(e=null===(n=t.border)||void 0===n?void 0:n.colorType)&&void 0!==e?e:v.BORDER_COLOR_TYPE)}}}},colorExpression:{component:"input-field-expression",type:"string",ref:"border.colorExpression",expression:"optional",defaultValue:"",show:t=>{var e,n;return o(t)&&"byExpression"===(null!==(e=null===(n=t.border)||void 0===n?void 0:n.colorType)&&void 0!==e?e:v.BORDER_COLOR_TYPE)}}}}}}}}}const Wt=[{value:"auto",translation:"Common.Auto"},{value:"colorPicker",translation:"properties.colorMode.primary"},{value:"byExpression",translation:"properties.colorMode.byExpression"}],Yt=[{value:"free",translation:"Object.OrgChart.FreeMode"},{value:"expandAll",translation:"Object.OrgChart.ExpandAll"}],Zt=t=>x.getValue(t,"style.border.top")||x.getValue(t,"style.border.fullBorder"),Gt={uses:"data",items:{measures:{disabledRef:""},dimensions:{disabledRef:"",items:{dimensionLimits:{show:!1},attributes:{component:"attribute-expression-reference",defaultValue:[],show:(t,e)=>e.getDimensions()[0]===t,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"},{component:"expression",ref:"qExpression",translation:"Object.OrgChart.ColorLabelExpression",defaultValue:"",id:"colorByExpression",tid:"nodeColorByExpression"}]},desc:{show:(t,e)=>e.getDimensions()[0]===t,component:"text",translation:"Object.OrgChart.ExtraLabelDesc",style:"hint"}}}}},Xt={uses:"sorting"},Jt={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}}}}},Qt=(t,e,n)=>{var r;const o=null==n||null===(r=n.sense)||void 0===r?void 0:r.theme,i={uses:"settings",items:{styling:{grouped:!0,translation:"properties.presentation",type:"items",items:{...(null==e?void 0:e.isEnabled("IM_5036_ORGCHART_STYLING"))&&{orgChartStyling:Ft(o,e,t)},navigation:{type:"items",items:{navigationMode:{ref:"navigationMode",type:"string",translation:"Object.OrgChart.NavigationMode",component:"dropdown",defaultValue:"free",options:Yt},resizeOnExpand:{ref:"resizeOnExpand",type:"boolean",defaultValue:!1,translation:"Object.OrgChart.resizeOnExpand",show:t=>"expandAll"!==x.getValue(t,"navigationMode")}}},backgroundColor:{},fontColor:{},border:{}}}}};return null!=e&&e.isEnabled("IM_5036_ORGCHART_STYLING")||(i.items.styling.items.backgroundColor={type:"items",items:{useColorExpression:{ref:"style.backgroundColor.colorType",type:"string",translation:"Object.OrgChart.BackgroundColor",component:"dropdown",defaultValue:v.BACKGROUND_COLOR_TYPE,options:Wt},colorPicker:{component:"color-picker",type:"object",ref:"style.backgroundColor.color",translation:"properties.color",dualOutput:!0,defaultValue:v.BACKGROUND_COLOR,show:t=>"colorPicker"===x.getValue(t,"style.backgroundColor.colorType")},colorExpression:{component:"string",type:"string",ref:"style.backgroundColor.colorExpression",translation:"Common.Expression",expression:"optional",defaultValue:"",show:t=>"byExpression"===x.getValue(t,"style.backgroundColor.colorType")}}},i.items.styling.items.fontColor={type:"items",items:{useColorExpression:{ref:"style.fontColor.colorType",type:"string",translation:"Object.OrgChart.FontColor",component:"dropdown",defaultValue:v.FONT_COLOR_TYPE,options:Wt},colorPicker:{component:"color-picker",type:"object",ref:"style.fontColor.color",translation:"properties.color",dualOutput:!0,defaultValue:v.FONT_COLOR_DARK,show:t=>"colorPicker"===x.getValue(t,"style.fontColor.colorType")},colorExpression:{component:"string",type:"string",ref:"style.fontColor.colorExpression",translation:"Common.Expression",expression:"optional",defaultValue:"",show:t=>"byExpression"===x.getValue(t,"style.fontColor.colorType")}}},i.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:v.BORDER_TOP},fullBorder:{type:"boolean",ref:"style.border.fullBorder",translation:"properties.border",defaultValue:v.BORDER_FULL},colorType:{component:"dropdown",type:"string",ref:"style.border.colorType",translation:"properties.border.color",defaultValue:v.BORDER_COLOR_TYPE,options:Wt,show:t=>Zt(t)},colorPicker:{component:"color-picker",type:"object",ref:"style.border.color",translation:"properties.color",dualOutput:!0,defaultValue:v.BORDER_COLOR,show:t=>Zt(t)&&"colorPicker"===x.getValue(t,"style.border.colorType")},colorExpression:{component:"string",type:"string",ref:"style.border.colorExpression",translation:"Common.Expression",expression:"optional",defaultValue:"",show:t=>Zt(t)&&"byExpression"===x.getValue(t,"style.border.colorType")}}}),i};function te(t){return function({translator:t,flags:e,anything:n}){return{definition:{type:"items",component:"accordion",items:{data:Gt,sorting:Xt,addOns:Jt,settings:Qt(t,e,n)}},support:{export:!0,exportData:!0,snapshot:!0,viewData:!0},migrate:{properties:t=>null!=e&&e.isEnabled("IM_5036_ORGCHART_STYLING")?function(t){var e,n,r,o;if((null===(e=t.components)||void 0===e?void 0:e.length)>0)return t;const i={key:"label",label:{value:{...null===(n=t.style)||void 0===n?void 0:n.fontColor}}},a={key:"backgroundColor",backgroundColor:{...null===(r=t.style)||void 0===r?void 0:r.backgroundColor}},s={key:"border",border:{...null===(o=t.style)||void 0===o?void 0:o.border}};return t.components=[i,a,s],t}(t):t}}}(t)}var ee={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 ne(t){if(t&&t.get&&t.add){const e="Object.OrgChart.MaxData";if(t.get(e)!==e)return;Object.keys(ee).forEach((e=>{t.add(ee[e])}))}}const re={qHyperCubeDef:{qDimensions:[],qMeasures:[],qInitialDataFetch:[{qWidth:5,qHeight:500}],qSuppressZero:!1,qSuppressMissing:!0},showTitles:!0,title:"",subtitle:"",footnote:"",navigationMode:"free",resizeOnExpand:!1,style:{fontColor:{colorType:v.FONT_COLOR_TYPE,color:v.FONT_COLOR_DARK,colorExpression:""},backgroundColor:{colorType:v.BACKGROUND_COLOR_TYPE,color:v.BACKGROUND_COLOR,colorExpression:""},border:{top:v.BORDER_TOP,fullBorder:v.BORDER_FULL,colorType:v.BORDER_COLOR_TYPE,color:v.BORDER_COLOR,colorExpression:""}},components:[]},oe="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";var ie={value:()=>{}};function ae(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new se(r)}function se(t){this._=t}function le(t,e){for(var n,r=0,o=t.length;r<o;++r)if((n=t[r]).name===e)return n.value}function ue(t,e,n){for(var r=0,o=t.length;r<o;++r)if(t[r].name===e){t[r]=ie,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}se.prototype=ae.prototype={constructor:se,on:function(t,e){var n,r,o=this._,i=(r=o,(t+"").trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");if(n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))),a=-1,s=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<s;)if(n=(t=i[a]).type)o[n]=ue(o[n],t.name,e);else if(null==e)for(n in o)o[n]=ue(o[n],t.name,null);return this}for(;++a<s;)if((n=(t=i[a]).type)&&(n=le(o[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new se(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,o=new Array(n),i=0;i<n;++i)o[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(i=0,n=(r=this._[t]).length;i<n;++i)r[i].value.apply(e,o)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],o=0,i=r.length;o<i;++o)r[o].value.apply(e,n)}};var ce="http://www.w3.org/1999/xhtml",he={svg:"http://www.w3.org/2000/svg",xhtml:ce,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function de(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),he.hasOwnProperty(e)?{space:he[e],local:t}:t}function pe(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===ce&&e.documentElement.namespaceURI===ce?e.createElement(t):e.createElementNS(n,t)}}function fe(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function ge(t){var e=de(t);return(e.local?fe:pe)(e)}function me(){}function be(t){return null==t?me:function(){return this.querySelector(t)}}function ye(){return[]}function ve(t){return null==t?ye:function(){return this.querySelectorAll(t)}}function xe(t){return function(){return function(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}(t.apply(this,arguments))}}function we(t){return function(){return this.matches(t)}}function _e(t){return function(e){return e.matches(t)}}var Ce=Array.prototype.find;function Oe(){return this.firstElementChild}var ke=Array.prototype.filter;function Ee(){return Array.from(this.children)}function Re(t){return new Array(t.length)}function Se(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function Te(t,e,n,r,o,i){for(var a,s=0,l=e.length,u=i.length;s<u;++s)(a=e[s])?(a.__data__=i[s],r[s]=a):n[s]=new Se(t,i[s]);for(;s<l;++s)(a=e[s])&&(o[s]=a)}function Le(t,e,n,r,o,i,a){var s,l,u,c=new Map,h=e.length,d=i.length,p=new Array(h);for(s=0;s<h;++s)(l=e[s])&&(p[s]=u=a.call(l,l.__data__,s,e)+"",c.has(u)?o[s]=l:c.set(u,l));for(s=0;s<d;++s)u=a.call(t,i[s],s,i)+"",(l=c.get(u))?(r[s]=l,l.__data__=i[s],c.delete(u)):n[s]=new Se(t,i[s]);for(s=0;s<h;++s)(l=e[s])&&c.get(p[s])===l&&(o[s]=l)}function ze(t){return t.__data__}function Me(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function Ne(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Ae(t){return function(){this.removeAttribute(t)}}function je(t){return function(){this.removeAttributeNS(t.space,t.local)}}function $e(t,e){return function(){this.setAttribute(t,e)}}function De(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Be(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Pe(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function qe(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Ie(t){return function(){this.style.removeProperty(t)}}function Ve(t,e,n){return function(){this.style.setProperty(t,e,n)}}function He(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Ue(t,e){return t.style.getPropertyValue(e)||qe(t).getComputedStyle(t,null).getPropertyValue(e)}function Ke(t){return function(){delete this[t]}}function Fe(t,e){return function(){this[t]=e}}function We(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Ye(t){return t.trim().split(/^|\s+/)}function Ze(t){return t.classList||new Ge(t)}function Ge(t){this._node=t,this._names=Ye(t.getAttribute("class")||"")}function Xe(t,e){for(var n=Ze(t),r=-1,o=e.length;++r<o;)n.add(e[r])}function Je(t,e){for(var n=Ze(t),r=-1,o=e.length;++r<o;)n.remove(e[r])}function Qe(t){return function(){Xe(this,t)}}function tn(t){return function(){Je(this,t)}}function en(t,e){return function(){(e.apply(this,arguments)?Xe:Je)(this,t)}}function nn(){this.textContent=""}function rn(t){return function(){this.textContent=t}}function on(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function an(){this.innerHTML=""}function sn(t){return function(){this.innerHTML=t}}function ln(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function un(){this.nextSibling&&this.parentNode.appendChild(this)}function cn(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function hn(){return null}function dn(){var t=this.parentNode;t&&t.removeChild(this)}function pn(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function fn(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function gn(t){return function(){var e=this.__on;if(e){for(var n,r=0,o=-1,i=e.length;r<i;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++o]=n:this.removeEventListener(n.type,n.listener,n.options);++o?e.length=o:delete this.__on}}}function mn(t,e,n){return function(){var r,o=this.__on,i=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(o)for(var a=0,s=o.length;a<s;++a)if((r=o[a]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=i,r.options=n),void(r.value=e);this.addEventListener(t.type,i,n),r={type:t.type,name:t.name,value:e,listener:i,options:n},o?o.push(r):this.__on=[r]}}function bn(t,e,n){var r=qe(t),o=r.CustomEvent;"function"==typeof o?o=new o(e,n):(o=r.document.createEvent("Event"),n?(o.initEvent(e,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(e,!1,!1)),t.dispatchEvent(o)}function yn(t,e){return function(){return bn(this,t,e)}}function vn(t,e){return function(){return bn(this,t,e.apply(this,arguments))}}Se.prototype={constructor:Se,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}},Ge.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var xn=[null];function wn(t,e){this._groups=t,this._parents=e}function _n(){return new wn([[document.documentElement]],xn)}function Cn(t){return"string"==typeof t?new wn([[document.querySelector(t)]],[document.documentElement]):new wn([[t]],xn)}function On(t,e){if(t=function(t){let e;for(;e=t.sourceEvent;)t=e;return t}(t),void 0===e&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,[(r=r.matrixTransform(e.getScreenCTM().inverse())).x,r.y]}if(e.getBoundingClientRect){var o=e.getBoundingClientRect();return[t.clientX-o.left-e.clientLeft,t.clientY-o.top-e.clientTop]}}return[t.pageX,t.pageY]}wn.prototype=_n.prototype={constructor:wn,select:function(t){"function"!=typeof t&&(t=be(t));for(var e=this._groups,n=e.length,r=new Array(n),o=0;o<n;++o)for(var i,a,s=e[o],l=s.length,u=r[o]=new Array(l),c=0;c<l;++c)(i=s[c])&&(a=t.call(i,i.__data__,c,s))&&("__data__"in i&&(a.__data__=i.__data__),u[c]=a);return new wn(r,this._parents)},selectAll:function(t){t="function"==typeof t?xe(t):ve(t);for(var e=this._groups,n=e.length,r=[],o=[],i=0;i<n;++i)for(var a,s=e[i],l=s.length,u=0;u<l;++u)(a=s[u])&&(r.push(t.call(a,a.__data__,u,s)),o.push(a));return new wn(r,o)},selectChild:function(t){return this.select(null==t?Oe:function(t){return function(){return Ce.call(this.children,t)}}("function"==typeof t?t:_e(t)))},selectChildren:function(t){return this.selectAll(null==t?Ee:function(t){return function(){return ke.call(this.children,t)}}("function"==typeof t?t:_e(t)))},filter:function(t){"function"!=typeof t&&(t=we(t));for(var e=this._groups,n=e.length,r=new Array(n),o=0;o<n;++o)for(var i,a=e[o],s=a.length,l=r[o]=[],u=0;u<s;++u)(i=a[u])&&t.call(i,i.__data__,u,a)&&l.push(i);return new wn(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,ze);var n=e?Le:Te,r=this._parents,o=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var i=o.length,a=new Array(i),s=new Array(i),l=new Array(i),u=0;u<i;++u){var c=r[u],h=o[u],d=h.length,p=Me(t.call(c,c&&c.__data__,u,r)),f=p.length,g=s[u]=new Array(f),m=a[u]=new Array(f);n(c,h,g,m,l[u]=new Array(d),p,e);for(var b,y,v=0,x=0;v<f;++v)if(b=g[v]){for(v>=x&&(x=v+1);!(y=m[x])&&++x<f;);b._next=y||null}}return(a=new wn(a,r))._enter=s,a._exit=l,a},enter:function(){return new wn(this._enter||this._groups.map(Re),this._parents)},exit:function(){return new wn(this._exit||this._groups.map(Re),this._parents)},join:function(t,e,n){var r=this.enter(),o=this,i=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=e&&(o=e(o))&&(o=o.selection()),null==n?i.remove():n(i),r&&o?r.merge(o).order():o},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,o=n.length,i=r.length,a=Math.min(o,i),s=new Array(o),l=0;l<a;++l)for(var u,c=n[l],h=r[l],d=c.length,p=s[l]=new Array(d),f=0;f<d;++f)(u=c[f]||h[f])&&(p[f]=u);for(;l<o;++l)s[l]=n[l];return new wn(s,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,o=t[e],i=o.length-1,a=o[i];--i>=0;)(r=o[i])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=Ne);for(var n=this._groups,r=n.length,o=new Array(r),i=0;i<r;++i){for(var a,s=n[i],l=s.length,u=o[i]=new Array(l),c=0;c<l;++c)(a=s[c])&&(u[c]=a);u.sort(e)}return new wn(o,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],o=0,i=r.length;o<i;++o){var a=r[o];if(a)return a}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var o,i=e[n],a=0,s=i.length;a<s;++a)(o=i[a])&&t.call(o,o.__data__,a,i);return this},attr:function(t,e){var n=de(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?je:Ae:"function"==typeof e?n.local?Pe:Be:n.local?De:$e)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?Ie:"function"==typeof e?He:Ve)(t,e,null==n?"":n)):Ue(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Ke:"function"==typeof e?We:Fe)(t,e)):this.node()[t]},classed:function(t,e){var n=Ye(t+"");if(arguments.length<2){for(var r=Ze(this.node()),o=-1,i=n.length;++o<i;)if(!r.contains(n[o]))return!1;return!0}return this.each(("function"==typeof e?en:e?Qe:tn)(n,e))},text:function(t){return arguments.length?this.each(null==t?nn:("function"==typeof t?on:rn)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?an:("function"==typeof t?ln:sn)(t)):this.node().innerHTML},raise:function(){return this.each(un)},lower:function(){return this.each(cn)},append:function(t){var e="function"==typeof t?t:ge(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:ge(t),r=null==e?hn:"function"==typeof e?e:be(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(dn)},clone:function(t){return this.select(t?fn:pn)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,o,i=function(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}(t+""),a=i.length;if(!(arguments.length<2)){for(s=e?mn:gn,r=0;r<a;++r)this.each(s(i[r],e,n));return this}var s=this.node().__on;if(s)for(var l,u=0,c=s.length;u<c;++u)for(r=0,l=s[u];r<a;++r)if((o=i[r]).type===l.type&&o.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?vn:yn)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r,o=t[e],i=0,a=o.length;i<a;++i)(r=o[i])&&(yield r)}};const kn={capture:!0,passive:!1};function En(t){t.preventDefault(),t.stopImmediatePropagation()}function Rn(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Sn(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Tn(){}var Ln=.7,zn=1/Ln,Mn="\\s*([+-]?\\d+)\\s*",Nn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",An="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",jn=/^#([0-9a-f]{3,8})$/,$n=new RegExp(`^rgb\\(${Mn},${Mn},${Mn}\\)$`),Dn=new RegExp(`^rgb\\(${An},${An},${An}\\)$`),Bn=new RegExp(`^rgba\\(${Mn},${Mn},${Mn},${Nn}\\)$`),Pn=new RegExp(`^rgba\\(${An},${An},${An},${Nn}\\)$`),qn=new RegExp(`^hsl\\(${Nn},${An},${An}\\)$`),In=new RegExp(`^hsla\\(${Nn},${An},${An},${Nn}\\)$`),Vn={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 Hn(){return this.rgb().formatHex()}function Un(){return this.rgb().formatRgb()}function Kn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=jn.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Fn(e):3===n?new Zn(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Wn(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Wn(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=$n.exec(t))?new Zn(e[1],e[2],e[3],1):(e=Dn.exec(t))?new Zn(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Bn.exec(t))?Wn(e[1],e[2],e[3],e[4]):(e=Pn.exec(t))?Wn(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=qn.exec(t))?er(e[1],e[2]/100,e[3]/100,1):(e=In.exec(t))?er(e[1],e[2]/100,e[3]/100,e[4]):Vn.hasOwnProperty(t)?Fn(Vn[t]):"transparent"===t?new Zn(NaN,NaN,NaN,0):null}function Fn(t){return new Zn(t>>16&255,t>>8&255,255&t,1)}function Wn(t,e,n,r){return r<=0&&(t=e=n=NaN),new Zn(t,e,n,r)}function Yn(t,e,n,r){return 1===arguments.length?((o=t)instanceof Tn||(o=Kn(o)),o?new Zn((o=o.rgb()).r,o.g,o.b,o.opacity):new Zn):new Zn(t,e,n,null==r?1:r);var o}function Zn(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Gn(){return`#${tr(this.r)}${tr(this.g)}${tr(this.b)}`}function Xn(){const t=Jn(this.opacity);return`${1===t?"rgb(":"rgba("}${Qn(this.r)}, ${Qn(this.g)}, ${Qn(this.b)}${1===t?")":`, ${t})`}`}function Jn(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Qn(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function tr(t){return((t=Qn(t))<16?"0":"")+t.toString(16)}function er(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new rr(t,e,n,r)}function nr(t){if(t instanceof rr)return new rr(t.h,t.s,t.l,t.opacity);if(t instanceof Tn||(t=Kn(t)),!t)return new rr;if(t instanceof rr)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,o=Math.min(e,n,r),i=Math.max(e,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=e===i?(n-r)/s+6*(n<r):n===i?(r-e)/s+2:(e-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new rr(a,s,l,t.opacity)}function rr(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function or(t){return(t=(t||0)%360)<0?t+360:t}function ir(t){return Math.max(0,Math.min(1,t||0))}function ar(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}Rn(Tn,Kn,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Hn,formatHex:Hn,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return nr(this).formatHsl()},formatRgb:Un,toString:Un}),Rn(Zn,Yn,Sn(Tn,{brighter(t){return t=null==t?zn:Math.pow(zn,t),new Zn(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?Ln:Math.pow(Ln,t),new Zn(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Zn(Qn(this.r),Qn(this.g),Qn(this.b),Jn(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:Gn,formatHex:Gn,formatHex8:function(){return`#${tr(this.r)}${tr(this.g)}${tr(this.b)}${tr(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Xn,toString:Xn})),Rn(rr,(function(t,e,n,r){return 1===arguments.length?nr(t):new rr(t,e,n,null==r?1:r)}),Sn(Tn,{brighter(t){return t=null==t?zn:Math.pow(zn,t),new rr(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?Ln:Math.pow(Ln,t),new rr(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,o=2*n-r;return new Zn(ar(t>=240?t-240:t+120,o,r),ar(t,o,r),ar(t<120?t+240:t-120,o,r),this.opacity)},clamp(){return new rr(or(this.h),ir(this.s),ir(this.l),Jn(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Jn(this.opacity);return`${1===t?"hsl(":"hsla("}${or(this.h)}, ${100*ir(this.s)}%, ${100*ir(this.l)}%${1===t?")":`, ${t})`}`}}));var sr=t=>()=>t;function lr(t){return 1==(t=+t)?ur:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):sr(isNaN(e)?n:e)}}function ur(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):sr(isNaN(t)?e:t)}var cr=function t(e){var n=lr(e);function r(t,e){var r=n((t=Yn(t)).r,(e=Yn(e)).r),o=n(t.g,e.g),i=n(t.b,e.b),a=ur(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=o(e),t.b=i(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);function hr(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var dr=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,pr=new RegExp(dr.source,"g");function fr(t,e){var n,r,o,i=dr.lastIndex=pr.lastIndex=0,a=-1,s=[],l=[];for(t+="",e+="";(n=dr.exec(t))&&(r=pr.exec(e));)(o=r.index)>i&&(o=e.slice(i,o),s[a]?s[a]+=o:s[++a]=o),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:hr(n,r)})),i=pr.lastIndex;return i<e.length&&(o=e.slice(i),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?function(t){return function(e){return t(e)+""}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var n,r=0;r<e;++r)s[(n=l[r]).i]=n.x(t);return s.join("")})}var gr,mr=180/Math.PI,br={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function yr(t,e,n,r,o,i){var a,s,l;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(l=t*n+e*r)&&(n-=t*l,r-=e*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),t*r<e*n&&(t=-t,e=-e,l=-l,a=-a),{translateX:o,translateY:i,rotate:Math.atan2(e,t)*mr,skewX:Math.atan(l)*mr,scaleX:a,scaleY:s}}function vr(t,e,n,r){function o(t){return t.length?t.pop()+" ":""}return function(i,a){var s=[],l=[];return i=t(i),a=t(a),function(t,r,o,i,a,s){if(t!==o||r!==i){var l=a.push("translate(",null,e,null,n);s.push({i:l-4,x:hr(t,o)},{i:l-2,x:hr(r,i)})}else(o||i)&&a.push("translate("+o+e+i+n)}(i.translateX,i.translateY,a.translateX,a.translateY,s,l),function(t,e,n,i){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),i.push({i:n.push(o(n)+"rotate(",null,r)-2,x:hr(t,e)})):e&&n.push(o(n)+"rotate("+e+r)}(i.rotate,a.rotate,s,l),function(t,e,n,i){t!==e?i.push({i:n.push(o(n)+"skewX(",null,r)-2,x:hr(t,e)}):e&&n.push(o(n)+"skewX("+e+r)}(i.skewX,a.skewX,s,l),function(t,e,n,r,i,a){if(t!==n||e!==r){var s=i.push(o(i)+"scale(",null,",",null,")");a.push({i:s-4,x:hr(t,n)},{i:s-2,x:hr(e,r)})}else 1===n&&1===r||i.push(o(i)+"scale("+n+","+r+")")}(i.scaleX,i.scaleY,a.scaleX,a.scaleY,s,l),i=a=null,function(t){for(var e,n=-1,r=l.length;++n<r;)s[(e=l[n]).i]=e.x(t);return s.join("")}}}var xr=vr((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?br:yr(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),wr=vr((function(t){return null==t?br:(gr||(gr=document.createElementNS("http://www.w3.org/2000/svg","g")),gr.setAttribute("transform",t),(t=gr.transform.baseVal.consolidate())?yr((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):br)}),", ",")",")");function _r(t){return((t=Math.exp(t))+1/t)/2}var Cr,Or,kr=function t(e,n,r){function o(t,o){var i,a,s=t[0],l=t[1],u=t[2],c=o[0],h=o[1],d=o[2],p=c-s,f=h-l,g=p*p+f*f;if(g<1e-12)a=Math.log(d/u)/e,i=function(t){return[s+t*p,l+t*f,u*Math.exp(e*t*a)]};else{var m=Math.sqrt(g),b=(d*d-u*u+r*g)/(2*u*n*m),y=(d*d-u*u-r*g)/(2*d*n*m),v=Math.log(Math.sqrt(b*b+1)-b),x=Math.log(Math.sqrt(y*y+1)-y);a=(x-v)/e,i=function(t){var r=t*a,o=_r(v),i=u/(n*m)*(o*function(t){return((t=Math.exp(2*t))-1)/(t+1)}(e*r+v)-function(t){return((t=Math.exp(t))-1/t)/2}(v));return[s+i*p,l+i*f,u*o/_r(e*r+v)]}}return i.duration=1e3*a*e/Math.SQRT2,i}return o.rho=function(e){var n=Math.max(.001,+e),r=n*n;return t(n,r,r*r)},o}(Math.SQRT2,2,4),Er=0,Rr=0,Sr=0,Tr=1e3,Lr=0,zr=0,Mr=0,Nr="object"==typeof performance&&performance.now?performance:Date,Ar="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function jr(){return zr||(Ar($r),zr=Nr.now()+Mr)}function $r(){zr=0}function Dr(){this._call=this._time=this._next=null}function Br(t,e,n){var r=new Dr;return r.restart(t,e,n),r}function Pr(){zr=(Lr=Nr.now())+Mr,Er=Rr=0;try{!function(){jr(),++Er;for(var t,e=Cr;e;)(t=zr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Er}()}finally{Er=0,function(){var t,e,n=Cr,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Cr=e);Or=t,Ir(r)}(),zr=0}}function qr(){var t=Nr.now(),e=t-Lr;e>Tr&&(Mr-=e,Lr=t)}function Ir(t){Er||(Rr&&(Rr=clearTimeout(Rr)),t-zr>24?(t<1/0&&(Rr=setTimeout(Pr,t-Nr.now()-Mr)),Sr&&(Sr=clearInterval(Sr))):(Sr||(Lr=Nr.now(),Sr=setInterval(qr,Tr)),Er=1,Ar(Pr)))}function Vr(t,e,n){var r=new Dr;return e=null==e?0:+e,r.restart((n=>{r.stop(),t(n+e)}),e,n),r}Dr.prototype=Br.prototype={constructor:Dr,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?jr():+n)+(null==e?0:+e),this._next||Or===this||(Or?Or._next=this:Cr=this,Or=this),this._call=t,this._time=n,Ir()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ir())}};var Hr=ae("start","end","cancel","interrupt"),Ur=[],Kr=0,Fr=1,Wr=2,Yr=3,Zr=4,Gr=5,Xr=6;function Jr(t,e,n,r,o,i){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var r,o=t.__transition;function i(t){n.state=Fr,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)}function a(i){var u,c,h,d;if(n.state!==Fr)return l();for(u in o)if((d=o[u]).name===n.name){if(d.state===Yr)return Vr(a);d.state===Zr?(d.state=Xr,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete o[u]):+u<e&&(d.state=Xr,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete o[u])}if(Vr((function(){n.state===Yr&&(n.state=Zr,n.timer.restart(s,n.delay,n.time),s(i))})),n.state=Wr,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Wr){for(n.state=Yr,r=new Array(h=n.tween.length),u=0,c=-1;u<h;++u)(d=n.tween[u].value.call(t,t.__data__,n.index,n.group))&&(r[++c]=d);r.length=c+1}}function s(e){for(var o=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(l),n.state=Gr,1),i=-1,a=r.length;++i<a;)r[i].call(t,o);n.state===Gr&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){for(var r in n.state=Xr,n.timer.stop(),delete o[e],o)return;delete t.__transition}o[e]=n,n.timer=Br(i,0,n.time)}(t,n,{name:e,index:r,group:o,on:Hr,tween:Ur,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:Kr})}function Qr(t,e){var n=eo(t,e);if(n.state>Kr)throw new Error("too late; already scheduled");return n}function to(t,e){var n=eo(t,e);if(n.state>Yr)throw new Error("too late; already running");return n}function eo(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function no(t,e){var n,r,o,i=t.__transition,a=!0;if(i){for(o in e=null==e?null:e+"",i)(n=i[o]).name===e?(r=n.state>Wr&&n.state<Gr,n.state=Xr,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete i[o]):a=!1;a&&delete t.__transition}}function ro(t,e){var n,r;return function(){var o=to(this,t),i=o.tween;if(i!==n)for(var a=0,s=(r=n=i).length;a<s;++a)if(r[a].name===e){(r=r.slice()).splice(a,1);break}o.tween=r}}function oo(t,e,n){var r,o;if("function"!=typeof n)throw new Error;return function(){var i=to(this,t),a=i.tween;if(a!==r){o=(r=a).slice();for(var s={name:e,value:n},l=0,u=o.length;l<u;++l)if(o[l].name===e){o[l]=s;break}l===u&&o.push(s)}i.tween=o}}function io(t,e,n){var r=t._id;return t.each((function(){var t=to(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return eo(t,r).value[e]}}function ao(t,e){var n;return("number"==typeof e?hr:e instanceof Kn?cr:(n=Kn(e))?(e=n,cr):fr)(t,e)}function so(t){return function(){this.removeAttribute(t)}}function lo(t){return function(){this.removeAttributeNS(t.space,t.local)}}function uo(t,e,n){var r,o,i=n+"";return function(){var a=this.getAttribute(t);return a===i?null:a===r?o:o=e(r=a,n)}}function co(t,e,n){var r,o,i=n+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===i?null:a===r?o:o=e(r=a,n)}}function ho(t,e,n){var r,o,i;return function(){var a,s,l=n(this);if(null!=l)return(a=this.getAttribute(t))===(s=l+"")?null:a===r&&s===o?i:(o=s,i=e(r=a,l));this.removeAttribute(t)}}function po(t,e,n){var r,o,i;return function(){var a,s,l=n(this);if(null!=l)return(a=this.getAttributeNS(t.space,t.local))===(s=l+"")?null:a===r&&s===o?i:(o=s,i=e(r=a,l));this.removeAttributeNS(t.space,t.local)}}function fo(t,e){var n,r;function o(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&function(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}(t,o)),n}return o._value=e,o}function go(t,e){var n,r;function o(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&function(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}(t,o)),n}return o._value=e,o}function mo(t,e){return function(){Qr(this,t).delay=+e.apply(this,arguments)}}function bo(t,e){return e=+e,function(){Qr(this,t).delay=e}}function yo(t,e){return function(){to(this,t).duration=+e.apply(this,arguments)}}function vo(t,e){return e=+e,function(){to(this,t).duration=e}}var xo=_n.prototype.constructor;function wo(t){return function(){this.style.removeProperty(t)}}var _o=0;function Co(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Oo(){return++_o}var ko=_n.prototype;Co.prototype={constructor:Co,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=be(t));for(var r=this._groups,o=r.length,i=new Array(o),a=0;a<o;++a)for(var s,l,u=r[a],c=u.length,h=i[a]=new Array(c),d=0;d<c;++d)(s=u[d])&&(l=t.call(s,s.__data__,d,u))&&("__data__"in s&&(l.__data__=s.__data__),h[d]=l,Jr(h[d],e,n,d,h,eo(s,n)));return new Co(i,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=ve(t));for(var r=this._groups,o=r.length,i=[],a=[],s=0;s<o;++s)for(var l,u=r[s],c=u.length,h=0;h<c;++h)if(l=u[h]){for(var d,p=t.call(l,l.__data__,h,u),f=eo(l,n),g=0,m=p.length;g<m;++g)(d=p[g])&&Jr(d,e,n,g,p,f);i.push(p),a.push(l)}return new Co(i,a,e,n)},selectChild:ko.selectChild,selectChildren:ko.selectChildren,filter:function(t){"function"!=typeof t&&(t=we(t));for(var e=this._groups,n=e.length,r=new Array(n),o=0;o<n;++o)for(var i,a=e[o],s=a.length,l=r[o]=[],u=0;u<s;++u)(i=a[u])&&t.call(i,i.__data__,u,a)&&l.push(i);return new Co(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,o=n.length,i=Math.min(r,o),a=new Array(r),s=0;s<i;++s)for(var l,u=e[s],c=n[s],h=u.length,d=a[s]=new Array(h),p=0;p<h;++p)(l=u[p]||c[p])&&(d[p]=l);for(;s<r;++s)a[s]=e[s];return new Co(a,this._parents,this._name,this._id)},selection:function(){return new xo(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Oo(),r=this._groups,o=r.length,i=0;i<o;++i)for(var a,s=r[i],l=s.length,u=0;u<l;++u)if(a=s[u]){var c=eo(a,e);Jr(a,t,n,u,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Co(r,this._parents,t,n)},call:ko.call,nodes:ko.nodes,node:ko.node,size:ko.size,empty:ko.empty,each:ko.each,on:function(t,e){var n=this._id;return arguments.length<2?eo(this.node(),n).on.on(t):this.each(function(t,e,n){var r,o,i=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?Qr:to;return function(){var a=i(this,t),s=a.on;s!==r&&(o=(r=s).copy()).on(e,n),a.on=o}}(n,t,e))},attr:function(t,e){var n=de(t),r="transform"===n?wr:ao;return this.attrTween(t,"function"==typeof e?(n.local?po:ho)(n,r,io(this,"attr."+t,e)):null==e?(n.local?lo:so)(n):(n.local?co:uo)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=de(t);return this.tween(n,(r.local?fo:go)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?xr:ao;return null==e?this.styleTween(t,function(t,e){var n,r,o;return function(){var i=Ue(this,t),a=(this.style.removeProperty(t),Ue(this,t));return i===a?null:i===n&&a===r?o:o=e(n=i,r=a)}}(t,r)).on("end.style."+t,wo(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,o,i;return function(){var a=Ue(this,t),s=n(this),l=s+"";return null==s&&(this.style.removeProperty(t),l=s=Ue(this,t)),a===l?null:a===r&&l===o?i:(o=l,i=e(r=a,s))}}(t,r,io(this,"style."+t,e))).each(function(t,e){var n,r,o,i,a="style."+e,s="end."+a;return function(){var l=to(this,t),u=l.on,c=null==l.value[a]?i||(i=wo(e)):void 0;u===n&&o===c||(r=(n=u).copy()).on(s,o=c),l.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,o,i=n+"";return function(){var a=Ue(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,function(t,e,n){var r,o;function i(){var i=e.apply(this,arguments);return i!==o&&(r=(o=i)&&function(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}(t,i,n)),r}return i._value=e,i}(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(io(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&function(t){return function(e){this.textContent=t.call(this,e)}}(r)),e}return r._value=t,r}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,o=eo(this.node(),n).tween,i=0,a=o.length;i<a;++i)if((r=o[i]).name===t)return r.value;return null}return this.each((null==e?ro:oo)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?mo:bo)(e,t)):eo(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?yo:vo)(e,t)):eo(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw new Error;return function(){to(this,t).ease=e}}(e,t)):eo(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;to(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,r=n._id,o=n.size();return new Promise((function(i,a){var s={value:a},l={value:function(){0==--o&&i()}};n.each((function(){var n=to(this,r),o=n.on;o!==t&&((e=(t=o).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(l)),n.on=e})),0===o&&i()}))},[Symbol.iterator]:ko[Symbol.iterator]};var Eo={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function Ro(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function So(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function To(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=zo)):void 0===e&&(e=Lo);for(var n,r,o,i,a,s=new Ao(t),l=[s];n=l.pop();)if((o=e(n.data))&&(a=(o=Array.from(o)).length))for(n.children=o,i=a-1;i>=0;--i)l.push(r=o[i]=new Ao(o[i])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(No)}function Lo(t){return t.children}function zo(t){return Array.isArray(t)?t[1]:null}function Mo(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function No(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function Ao(t){this.data=t,this.depth=this.height=0,this.parent=null}function jo(t,e){return t.parent===e.parent?1:2}function $o(t){var e=t.children;return e?e[0]:t.t}function Do(t){var e=t.children;return e?e[e.length-1]:t.t}function Bo(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function Po(t,e,n){return t.a.parent===e.parent?t.a:n}function qo(t,e){this._=t,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=e}function Io(){var t=jo,e=1,n=1,r=null;function o(o){var l=function(t){for(var e,n,r,o,i,a=new qo(t,0),s=[a];e=s.pop();)if(r=e._.children)for(e.children=new Array(i=r.length),o=i-1;o>=0;--o)s.push(n=e.children[o]=new qo(r[o],o)),n.parent=e;return(a.parent=new qo(null,0)).children=[a],a}(o);if(l.eachAfter(i),l.parent.m=-l.z,l.eachBefore(a),r)o.eachBefore(s);else{var u=o,c=o,h=o;o.eachBefore((function(t){t.x<u.x&&(u=t),t.x>c.x&&(c=t),t.depth>h.depth&&(h=t)}));var d=u===c?1:t(u,c)/2,p=d-u.x,f=e/(c.x+d+p),g=n/(h.depth||1);o.eachBefore((function(t){t.x=(t.x+p)*f,t.y=t.depth*g}))}return o}function i(e){var n=e.children,r=e.parent.children,o=e.i?r[e.i-1]:null;if(n){!function(t){for(var e,n=0,r=0,o=t.children,i=o.length;--i>=0;)(e=o[i]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}(e);var i=(n[0].z+n[n.length-1].z)/2;o?(e.z=o.z+t(e._,o._),e.m=e.z-i):e.z=i}else o&&(e.z=o.z+t(e._,o._));e.parent.A=function(e,n,r){if(n){for(var o,i=e,a=e,s=n,l=i.parent.children[0],u=i.m,c=a.m,h=s.m,d=l.m;s=Do(s),i=$o(i),s&&i;)l=$o(l),(a=Do(a)).a=e,(o=s.z+h-i.z-u+t(s._,i._))>0&&(Bo(Po(s,e,r),e,o),u+=o,c+=o),h+=s.m,u+=i.m,d+=l.m,c+=a.m;s&&!Do(a)&&(a.t=s,a.m+=h-c),i&&!$o(l)&&(l.t=i,l.m+=u-d,r=e)}return r}(e,o,e.parent.A||r[0])}function a(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t){t.x*=e,t.y=t.depth*n}return o.separation=function(e){return arguments.length?(t=e,o):t},o.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],o):r?null:[e,n]},o.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],o):r?[e,n]:null},o}_n.prototype.interrupt=function(t){return this.each((function(){no(this,t)}))},_n.prototype.transition=function(t){var e,n;t instanceof Co?(e=t._id,t=t._name):(e=Oo(),(n=Eo).time=jr(),t=null==t?null:t+"");for(var r=this._groups,o=r.length,i=0;i<o;++i)for(var a,s=r[i],l=s.length,u=0;u<l;++u)(a=s[u])&&Jr(a,t,e,u,s,n||Ro(a,e));return new Co(r,this._parents,t,e)},Ao.prototype=To.prototype={constructor:Ao,count:function(){return this.eachAfter(So)},each:function(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this},eachAfter:function(t,e){for(var n,r,o,i=this,a=[i],s=[],l=-1;i=a.pop();)if(s.push(i),n=i.children)for(r=0,o=n.length;r<o;++r)a.push(n[r]);for(;i=s.pop();)t.call(e,i,++l,this);return this},eachBefore:function(t,e){for(var n,r,o=this,i=[o],a=-1;o=i.pop();)if(t.call(e,o,++a,this),n=o.children)for(r=n.length-1;r>=0;--r)i.push(n[r]);return this},find:function(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,o=r&&r.length;--o>=0;)n+=r[o].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),o=null;t=n.pop(),e=r.pop();for(;t===e;)o=t,t=n.pop(),e=r.pop();return o}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var o=r.length;t!==n;)r.splice(o,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return To(this).eachBefore(Mo)},[Symbol.iterator]:function*(){var t,e,n,r,o=this,i=[o];do{for(t=i.reverse(),i=[];o=t.pop();)if(yield o,e=o.children)for(n=0,r=e.length;n<r;++n)i.push(e[n])}while(i.length)}},qo.prototype=Object.create(Ao.prototype);var Vo=t=>()=>t;function Ho(t,{sourceEvent:e,target:n,transform:r,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:o}})}function Uo(t,e,n){this.k=t,this.x=e,this.y=n}Uo.prototype={constructor:Uo,scale:function(t){return 1===t?this:new Uo(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new Uo(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Ko=new Uo(1,0,0);function Fo(t){t.stopImmediatePropagation()}function Wo(t){t.preventDefault(),t.stopImmediatePropagation()}function Yo(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function Zo(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function Go(){return this.__zoom||Ko}function Xo(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function Jo(){return navigator.maxTouchPoints||"ontouchstart"in this}function Qo(t,e,n){var r=t.invertX(e[0][0])-n[0][0],o=t.invertX(e[1][0])-n[1][0],i=t.invertY(e[0][1])-n[0][1],a=t.invertY(e[1][1])-n[1][1];return t.translate(o>r?(r+o)/2:Math.min(0,r)||Math.max(0,o),a>i?(i+a)/2:Math.min(0,i)||Math.max(0,a))}function ti(){var t,e,n,r=Yo,o=Zo,i=Qo,a=Xo,s=Jo,l=[0,1/0],u=[[-1/0,-1/0],[1/0,1/0]],c=250,h=kr,d=ae("start","zoom","end"),p=500,f=150,g=0,m=10;function b(t){t.property("__zoom",Go).on("wheel.zoom",O,{passive:!1}).on("mousedown.zoom",k).on("dblclick.zoom",E).filter(s).on("touchstart.zoom",R).on("touchmove.zoom",S).on("touchend.zoom touchcancel.zoom",T).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function y(t,e){return(e=Math.max(l[0],Math.min(l[1],e)))===t.k?t:new Uo(e,t.x,t.y)}function v(t,e,n){var r=e[0]-n[0]*t.k,o=e[1]-n[1]*t.k;return r===t.x&&o===t.y?t:new Uo(t.k,r,o)}function x(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function w(t,e,n,r){t.on("start.zoom",(function(){_(this,arguments).event(r).start()})).on("interrupt.zoom end.zoom",(function(){_(this,arguments).event(r).end()})).tween("zoom",(function(){var t=this,i=arguments,a=_(t,i).event(r),s=o.apply(t,i),l=null==n?x(s):"function"==typeof n?n.apply(t,i):n,u=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),c=t.__zoom,d="function"==typeof e?e.apply(t,i):e,p=h(c.invert(l).concat(u/c.k),d.invert(l).concat(u/d.k));return function(t){if(1===t)t=d;else{var e=p(t),n=u/e[2];t=new Uo(n,l[0]-e[0]*n,l[1]-e[1]*n)}a.zoom(null,t)}}))}function _(t,e,n){return!n&&t.__zooming||new C(t,e)}function C(t,e){this.that=t,this.args=e,this.active=0,this.sourceEvent=null,this.extent=o.apply(t,e),this.taps=0}function O(t,...e){if(r.apply(this,arguments)){var n=_(this,e).event(t),o=this.__zoom,s=Math.max(l[0],Math.min(l[1],o.k*Math.pow(2,a.apply(this,arguments)))),c=On(t);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===s)return;n.mouse=[c,o.invert(c)],no(this),n.start()}Wo(t),n.wheel=setTimeout((function(){n.wheel=null,n.end()}),f),n.zoom("mouse",i(v(y(o,s),n.mouse[0],n.mouse[1]),n.extent,u))}}function k(t,...e){if(!n&&r.apply(this,arguments)){var o=t.currentTarget,a=_(this,e,!0).event(t),s=Cn(t.view).on("mousemove.zoom",(function(t){if(Wo(t),!a.moved){var e=t.clientX-c,n=t.clientY-h;a.moved=e*e+n*n>g}a.event(t).zoom("mouse",i(v(a.that.__zoom,a.mouse[0]=On(t,o),a.mouse[1]),a.extent,u))}),!0).on("mouseup.zoom",(function(t){s.on("mousemove.zoom mouseup.zoom",null),function(t,e){var n=t.document.documentElement,r=Cn(t).on("dragstart.drag",null);e&&(r.on("click.drag",En,kn),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}(t.view,a.moved),Wo(t),a.event(t).end()}),!0),l=On(t,o),c=t.clientX,h=t.clientY;!function(t){var e=t.document.documentElement,n=Cn(t).on("dragstart.drag",En,kn);"onselectstart"in e?n.on("selectstart.drag",En,kn):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}(t.view),Fo(t),a.mouse=[l,this.__zoom.invert(l)],no(this),a.start()}}function E(t,...e){if(r.apply(this,arguments)){var n=this.__zoom,a=On(t.changedTouches?t.changedTouches[0]:t,this),s=n.invert(a),l=n.k*(t.shiftKey?.5:2),h=i(v(y(n,l),a,s),o.apply(this,e),u);Wo(t),c>0?Cn(this).transition().duration(c).call(w,h,a,t):Cn(this).call(b.transform,h,a,t)}}function R(n,...o){if(r.apply(this,arguments)){var i,a,s,l,u=n.touches,c=u.length,h=_(this,o,n.changedTouches.length===c).event(n);for(Fo(n),a=0;a<c;++a)l=[l=On(s=u[a],this),this.__zoom.invert(l),s.identifier],h.touch0?h.touch1||h.touch0[2]===l[2]||(h.touch1=l,h.taps=0):(h.touch0=l,i=!0,h.taps=1+!!t);t&&(t=clearTimeout(t)),i&&(h.taps<2&&(e=l[0],t=setTimeout((function(){t=null}),p)),no(this),h.start())}}function S(t,...e){if(this.__zooming){var n,r,o,a,s=_(this,e).event(t),l=t.changedTouches,c=l.length;for(Wo(t),n=0;n<c;++n)o=On(r=l[n],this),s.touch0&&s.touch0[2]===r.identifier?s.touch0[0]=o:s.touch1&&s.touch1[2]===r.identifier&&(s.touch1[0]=o);if(r=s.that.__zoom,s.touch1){var h=s.touch0[0],d=s.touch0[1],p=s.touch1[0],f=s.touch1[1],g=(g=p[0]-h[0])*g+(g=p[1]-h[1])*g,m=(m=f[0]-d[0])*m+(m=f[1]-d[1])*m;r=y(r,Math.sqrt(g/m)),o=[(h[0]+p[0])/2,(h[1]+p[1])/2],a=[(d[0]+f[0])/2,(d[1]+f[1])/2]}else{if(!s.touch0)return;o=s.touch0[0],a=s.touch0[1]}s.zoom("touch",i(v(r,o,a),s.extent,u))}}function T(t,...r){if(this.__zooming){var o,i,a=_(this,r).event(t),s=t.changedTouches,l=s.length;for(Fo(t),n&&clearTimeout(n),n=setTimeout((function(){n=null}),p),o=0;o<l;++o)i=s[o],a.touch0&&a.touch0[2]===i.identifier?delete a.touch0:a.touch1&&a.touch1[2]===i.identifier&&delete a.touch1;if(a.touch1&&!a.touch0&&(a.touch0=a.touch1,delete a.touch1),a.touch0)a.touch0[1]=this.__zoom.invert(a.touch0[0]);else if(a.end(),2===a.taps&&(i=On(i,this),Math.hypot(e[0]-i[0],e[1]-i[1])<m)){var u=Cn(this).on("dblclick.zoom");u&&u.apply(this,arguments)}}}return b.transform=function(t,e,n,r){var o=t.selection?t.selection():t;o.property("__zoom",Go),t!==o?w(t,e,n,r):o.interrupt().each((function(){_(this,arguments).event(r).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()}))},b.scaleBy=function(t,e,n,r){b.scaleTo(t,(function(){return this.__zoom.k*("function"==typeof e?e.apply(this,arguments):e)}),n,r)},b.scaleTo=function(t,e,n,r){b.transform(t,(function(){var t=o.apply(this,arguments),r=this.__zoom,a=null==n?x(t):"function"==typeof n?n.apply(this,arguments):n,s=r.invert(a),l="function"==typeof e?e.apply(this,arguments):e;return i(v(y(r,l),a,s),t,u)}),n,r)},b.translateBy=function(t,e,n,r){b.transform(t,(function(){return i(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof n?n.apply(this,arguments):n),o.apply(this,arguments),u)}),null,r)},b.translateTo=function(t,e,n,r,a){b.transform(t,(function(){var t=o.apply(this,arguments),a=this.__zoom,s=null==r?x(t):"function"==typeof r?r.apply(this,arguments):r;return i(Ko.translate(s[0],s[1]).scale(a.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof n?-n.apply(this,arguments):-n),t,u)}),r,a)},C.prototype={event:function(t){return t&&(this.sourceEvent=t),this},start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){var e=Cn(this.that).datum();d.call(t,this.that,new Ho(t,{sourceEvent:this.sourceEvent,target:b,type:t,transform:this.that.__zoom,dispatch:d}),e)}},b.wheelDelta=function(t){return arguments.length?(a="function"==typeof t?t:Vo(+t),b):a},b.filter=function(t){return arguments.length?(r="function"==typeof t?t:Vo(!!t),b):r},b.touchable=function(t){return arguments.length?(s="function"==typeof t?t:Vo(!!t),b):s},b.extent=function(t){return arguments.length?(o="function"==typeof t?t:Vo([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),b):o},b.scaleExtent=function(t){return arguments.length?(l[0]=+t[0],l[1]=+t[1],b):[l[0],l[1]]},b.translateExtent=function(t){return arguments.length?(u[0][0]=+t[0][0],u[1][0]=+t[1][0],u[0][1]=+t[0][1],u[1][1]=+t[1][1],b):[[u[0][0],u[0][1]],[u[1][0],u[1][1]]]},b.constrain=function(t){return arguments.length?(i=t,b):i},b.duration=function(t){return arguments.length?(c=+t,b):c},b.interpolate=function(t){return arguments.length?(h=t,b):h},b.on=function(){var t=d.on.apply(d,arguments);return t===d?b:t},b.clickDistance=function(t){return arguments.length?(g=(t=+t)*t,b):Math.sqrt(g)},b.tapDistance=function(t){return arguments.length?(m=+t,b):m},b}Uo.prototype;const ei={cardWidth:152,cardHeight:64,widthMargin:32,heightMargin:56,buttonMargin:16,leafMargin:16,cardPadding:8,buttonWidth:48,buttonHeight:24,rootDiameter:20,r:4,tooltipWidth:240,tooltipPadding:15,maxZoom:6,minZoom:.2},ni={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}},ri={resolveExpression:t=>{let e=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(t);if(e)return`rgb(${e[1]},${e[2]},${e[3]})`;if(e=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(t),e)return`rgba(${e[1]},${e[2]},${e[3]},${e[4]})`;if(e=/^argb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(t),e){const t=Math.round(e[1]/2.55)/100;return`rgba(${e[2]},${e[3]},${e[4]},${t})`}if(e=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i.exec(t),e)return t;const n=t&&ni[t.toLowerCase()];if(n){const t=void 0!==n.a?n.a:1;return`rgba(${n.r},${n.g},${n.b},${t})`}return"none"},getDarkColor(t){const e=.5;let n,r,o,i;if(t.length>7){n=t.split(",");const a=-1!==n[0].indexOf("a");return r=a?parseInt(n[0].slice(5),10):parseInt(n[0].slice(4),10),i=parseInt(n[1],10),o=parseInt(n[2],10),`${(a?"rgba(":"rgb(")+(Math.round((0-r)*e)+r)},${Math.round((0-i)*e)+i},${Math.round((0-o)*e)+o}${a?`,${n[3]}`:")"}`}return n=parseInt(t.slice(1),16),r=n>>16,i=n>>8&255,o=255&n,`#${(16777216+65536*(Math.round((0-r)*e)+r)+256*(Math.round((0-i)*e)+i)+(Math.round((0-o)*e)+o)).toString(16).slice(1)}`},isDarkColor(t){let e,n,r,o;return(o=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(t))||(o=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(t))?(e=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(t))&&(e=parseInt(o[1],16),n=parseInt(o[2],16),r=parseInt(o[3],16)),.299*e+.587*n+.114*r<125}},oi={encodeTitle:t=>{const e=document.createElement("div"),n=document.createTextNode(t);return e.appendChild(n),e.innerHTML},encodeCssColor:t=>{const e=["#"," ","(",")"];let n="";for(let r=0;r<t.length;r++){const o=t.charAt(r),i=t.charCodeAt(r);if(!o.match(/[a-zA-Z0-9]/)&&e.indexOf(o)<0){const t=i.toString(16);n+=`\\${"000000".substr(t.length)}${t}`}else n+=o}return n}};function ii(t){const e=ri.resolveExpression(t);return"none"!==e?e:oi.encodeCssColor(t)}var ai=(t,e,n)=>{const{api:r,state:o}=n,i=r&&r.isActive()&&-1!==o.indexOf(t.elemNo),a=function(t,e){if(t.attributes&&t.attributes.color){const e=ri.resolveExpression(t.attributes.color);if("none"!==e)return e}return ii(e.backgroundColor)}(t,e),s=ii(function(t,e){return"default"===t.fontColor?ri.isDarkColor(e)?v.FONT_COLOR_LIGHT.color:v.FONT_COLOR_DARK.color:t.fontColor}(e,a)),l=t.attributes||{};let u=`<div class="sn-org-card-title">${oi.encodeTitle(l.label||t.id)}</div>`;if(l.subLabel&&(u+=`<div class="sn-org-card-label">${oi.encodeTitle(l.subLabel)}</div>`),t.measure){const n=e.measureLabel?`${e.measureLabel}: `:"";u+=`<div class="sn-org-card-label">${oi.encodeTitle(n+t.measure)}</div>`}else l.extraLabel&&(u+=`<div class="sn-org-card-label">${oi.encodeTitle(l.extraLabel)}</div>`);const c=i?" selected":" not-selected",h=r&&r.isActive()?c:"",{top:d=v.BORDER_TOP,fullBorder:p=v.BORDER_FULL,colorType:f=v.BORDER_COLOR_TYPE}=e.border,g="auto"===f?ri.getDarkColor(a):ii(e.borderColor),m=d&&!i?`3px solid ${g}`:"",b=p&&!i?`1px solid ${g}`:"";let y=ei.cardHeight;return i?y-=8:p?y-=4:d&&(y-=3),`<div class="sn-org-card-text${h}" style="background-color:${a};color:${s}; border:${b}; border-top:${m}; height:${y}px;">${u}</div>`};const si={colorByExpression:"color",labelExpression:"label",subLabelExpression:"subLabel",extraLabelExpression:"extraLabel"},li="max-data-limit",ui="no_root";function ci(t){return t[0].qText}function hi(t){return t[1].qText}async function di(t,e,n,r,o,i,a){return await n.getHyperCubeData("/qHyperCubeDef",[{qTop:o,qLeft:0,qWidth:3,qHeight:3300}]).then((n=>{t.push(n[0]),e.push(...n[0].qMatrix),o+=n[0].qArea.qHeight})),i>=a?li:r>o?di(t,e,n,r,o,i+1,a):""}const pi=async(t,e)=>{if(t.snapshotData)return{status:"",dataMatrix:t.snapshotData.dataMatrix};const n=t.qHyperCube&&t.qHyperCube.qDataPages,r=t.qHyperCube.qSize.qcy,o=n[0].qArea.qHeight,i=[...n[0].qMatrix];let a="";return r>o&&1===n.length&&e?a=await di(t.qHyperCube.qDataPages,i,e,r,o,0,t.rowLimit/3300||10):n.forEach(((t,e)=>{e>0&&i.push(...t.qMatrix)})),{status:a,dataMatrix:i}};function fi(t,e){const n={};return t.forEach((t=>{"color"===t.prop?n[t.prop]=ri.resolveExpression(e.qValues[t.index].qText):n[t.prop]=e.qValues[t.index].qText})),n}function gi(t){if(!t)return!0;for(let e=0;e<t.length;++e)if(void 0!==t[e].children)return!1;return!0}var mi=(t,e)=>{const{api:n,state:r,singleSelect:o,setState:i}=e;if(t&&n){let e;if(t.data.elemNo<0&&-3!==t.data.elemNo)return;if(t.data.isLocked)return;n.isActive()&&r?e=r.concat():(n.begin("/qHyperCubeDef"),e=[]);const a=e.indexOf(t.data.elemNo),s=-1===a;let l=[];o||(l=function(t,e){const n=[],r=t=>{t.children.forEach((t=>{t.data.selected=e,n.push(t.data.elemNo),t.children&&t.children.length>0&&r(t)}))};return t.children&&r(t),n}(t,s)),s?(e.push(t.data.elemNo),l.forEach((t=>{-1===e.indexOf(t)&&e.push(t)}))):(e.splice(a,1),l.forEach((t=>{const n=e.indexOf(t);-1!==n&&e.splice(n,1)}))),0===e.length?n.clear():n.select({method:"selectHyperCubeValues",params:["/qHyperCubeDef",0,e,!1]}),i(e)}};function bi(t,e,n,r,o,i,a,s=250){t.active=!0,t.timeout=setTimeout((()=>{t.active&&t.html(function(t,e){return`<div class="sn-org-tooltip-inner"><div class="sn-org-tooltip-header">${oi.encodeTitle(t.data.attributes.label||t.data.id)}</div>${t.data.attributes.subLabel?`${oi.encodeTitle(t.data.attributes.subLabel)}<br />`:""}${t.data.attributes.extraLabel?`${oi.encodeTitle(t.data.attributes.extraLabel)}<br />`:""}${oi.encodeTitle(t.data.measure?`${e.measureLabel?`${e.measureLabel}: `:""}${t.data.measure}`:"")}</div>`}(e,r)).classed("sn-org-tooltip-visible",!0).attr("style",(()=>function(t,e,n,r,o){const{cardWidth:i,tooltipPadding:a}=ei,s=i/2;return`bottom:${e-(r(t)*o.zoom+o.y-a)}px;left:${n(t)*o.zoom+o.x+s*o.zoom}px;`}(e,n,o,i,a)))}),s)}function yi(t){clearTimeout(t.timeout),t.active=!1,t.classed("sn-org-tooltip-visible",!1)}function vi({positioning:t,divBox:e,nodes:n,styling:r,setExpandedCallback:o,wrapperState:i,selectionObj:a,navigationMode:s,element:l,tooltip:u}){const{x:c,y:h}=t,{cardWidth:d,cardHeight:p,buttonWidth:f,buttonHeight:g,cardPadding:m,rootDiameter:b}=ei,{topId:y}=i.expandedState,v=n.find((t=>t.data.id===y)),x=v&&v.parent?v.parent.ancestors().map((t=>t.data.id)):[],w=document.getElementsByTagName("html")[0].classList.contains("touch-on");e.selectAll(".sn-org-nodes").data(n.filter((t=>t.parent&&"Root"===t.parent.data.id))).enter().append("div").attr("class","sn-org-root").attr("style",(t=>`top:${h(t)-b-m}px;left:${c(t)+(d-b)/2}px`)).attr("id",(t=>t.data.id)),e.selectAll(".sn-org-nodes").data(n.filter((t=>"Root"!==t.data.id))).enter().append("div").attr("class","sn-org-card").attr("style",(t=>`width:${d}px;height:${p}px; top:${h(t)}px;left:${c(t)}px;`)).attr("id",(t=>t.data.id)).on("click",((t,e)=>{i.constraints.active||"Root"===e.data.id||(w&&bi(u,e,l.clientHeight,r,c,h,i.transform,0),mi(e,a))})).html((t=>ai(t.data,r,a))).on("mouseenter",((t,e)=>{w||i.constraints.active||0!==t.buttons||bi(u,e,l.clientHeight,r,c,h,i.transform)})).on("mouseleave",(()=>{!w&&yi(u)})).on("mousedown",(()=>{yi(u)})).on("touchmove",(()=>{yi(u)})).on("wheel",(()=>{yi(u)})),"expandAll"!==s&&e.selectAll(".sn-org-nodes").data(n.filter((t=>!!t.children&&"Root"!==t.data.id))).enter().append("div").attr("class","sn-org-traverse").attr("style",(t=>`width:${f}px;height:${g}px;top:${h(t)+p+m}px;left:${c(t)+(d-f)/2}px;`)).attr("id",(t=>`${t.data.id}-expand`)).on("mouseenter",(t=>{i.constraints.active||(t.target.style.cursor="pointer")})).on("click",((t,e)=>{i.constraints.active||(o(((t,{topId:e,isExpanded:n,expandedChildren:r},o)=>{if(t.data.id===e)n=!n,r=[];else if(o.includes(t.data.id))e=t.parent?t.parent.data.id:t.data.id,n=!!t.parent,r=[];else if(t.parent.data.id===e){const e=t.parent.children.filter((t=>r.includes(t.data.id))).every((t=>gi(t.children)));r.includes(t.data.id)?r.splice(r.indexOf(t.data.id),1):gi(t.children)&&e?r.push(t.data.id):r=[t.data.id]}else e=t.parent.data.id,n=!0,r=[t.data.id];return{topId:e,isExpanded:n,expandedChildren:r}})(e,i.expandedState,x)),t.stopPropagation())})).html((t=>`${((t,{topId:e,isExpanded:n,expandedChildren:r},o)=>t.data.id===e&&n||t.parent&&t.parent.data.id===e&&r.includes(t.data.id)||o.includes(t.data.id)?"-":"+")(t,i.expandedState,x)} ${t.data.children.length}`))}function xi(t,e,n,r){t.append("path").attr("class","sn-org-path").attr("id",(t=>t.data.id)).attr("d",(t=>{let n="";const o=function(t,e,{depthSpacing:n,isVertical:r,x:o,y:i},a){const{cardWidth:s,cardHeight:l,buttonHeight:u,cardPadding:c,buttonMargin:h}=ei,d=[],p=s/2,f=l/2,g={x:t.xActual,y:t.yActual};if(t.parent&&"Root"!==t.parent.data.id){const e=n/2,s="expandAll"===a?l:l+c+u,m={x:o(t.parent)+p,y:i(t.parent)+s};"expandAll"!==a&&gi(t.parent.children)?d.push(r?[{x:g.x,y:g.y+f},{x:m.x-p,y:g.y+f},{x:m.x-p,y:m.y+h},{x:m.x,y:m.y+h},{x:m.x,y:m.y}]:[{x:g.x,y:g.y},{x:g.x,y:m.y-f},{x:m.x+e,y:m.y-f},{x:m.x+e,y:m.y},{x:m.x,y:m.y}]):g.x===o(t.parent)||g.y===i(t.parent)?d.push([{x:g.x+p,y:g.y},{x:m.x,y:m.y}]):d.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 t.parent&&d.push([{x:g.x+p,y:g.y},{x:g.x+p,y:g.y-c}]);return t.children&&"Root"!==t.data.id&&d.push([{x:g.x+p,y:g.y+l},{x:g.x+p,y:g.y+l+c}]),d}(t,0,e,r);return o.forEach((t=>{n+=function(t){const{r:e}=ei;let n,r=`M ${t[0].x} ${t[0].y} `;const o=e=>{const r=t[e].x-t[e-1].x,o=t[e].y-t[e-1].y;n={x:(r>0)-(r<0)||+r,y:(o>0)-(o<0)||+o}};o(1);for(let i=1;i<t.length;++i){const a=t[i];i<t.length-1?(r+=`L ${a.x-n.x*e} ${a.y-n.y*e} `,o(i+1),r+=`Q ${a.x} ${a.y} ${a.x+n.x*e} ${a.y+n.y*e} `):r+=`L ${a.x} ${a.y} `}return r}(t).slice(0,-1)})),n}))}const wi=(t,e,n,r,o,i)=>{const{buttonMargin:a}=ei,s=o&&o.initialX||0;return"expandAll"===i?(t[r]=t.x+s,t[r]):(t.parent?(t.parent[r]||(t.parent[r]=wi(t.parent,e,n,r,o)),"Root"===t.parent.data.id?t[r]=t.parent[r]+(t.data.childNumber-(t.parent.children.length-1)/2)*e:t[r]=gi(t.parent.children)?t.parent[r]+a:t.parent[r]+(t.data.childNumber-(t.parent.children.length-1)/2)*e):t[r]=s,t[r])};function _i(t,e,n,r){const{widthMargin:o,heightMargin:i,cardWidth:a,cardHeight:s,cardPadding:l}=ei;let u,c,h;if("ttb"===t)u=a+o,c="expandAll"===r?s+2*l:s+i,h={depthSpacing:c,isVertical:!0,x:t=>wi(t,u,e,"xActual",n,r),y:t=>((t,e,n,r,o)=>{const{cardHeight:i,leafMargin:a}=ei,s=r&&r.initialY||0;return t.parent&&"Root"!==t.parent.data.id&&"expandAll"!==o&&gi(t.parent.children)?t[n]=t.parent.y+e+t.data.childNumber*(i+a)+s:t[n]=t.y+s,t[n]})(t,c,"yActual",n,r)};return h}const Ci=(t,e,n,r,o)=>{const i=t.k,a=`${t.x}px, ${t.y}px`;e.attr("transform",t),n.classed("org-disable-transition",!0),e.classed("org-disable-transition",!0),n.attr("style",`width:${r}px;height:${o}px; transform: translate(${a}) scale(${i})`)};const Oi=(t,e,n)=>{if(!e)return Ko.translate(n.x,n.y).scale(n.zoom);const{size:r}=e,o=t.width/r.w>t.height/r.h?t.height/r.h:t.width/r.w,i=e.transform.x*o,a=e.transform.y*o,s=e.transform.zoom*o;return Ko.translate(i,a).scale(s)},ki=({topId:t,isExpanded:e,expandedChildren:n},r,o,i)=>{if("expandAll"===i)return r.descendants();const a=r.descendants().find((e=>e.data.id===t))||r,s=[];if(e&&a.children&&a.children.forEach((t=>{s.push(t),t.children&&(-1!==n.indexOf(t.data.id)||o)&&t.children.forEach((e=>{s.push(e),-1!==n.indexOf(t.data.id)&&o&&e.children&&e.children.forEach((t=>{s.push(t)}))}))})),"free"===r.data.navigationMode&&a.parent){const t=a.parent.ancestors(),e=t.map((t=>t.data.id));t.forEach((t=>{o&&t.children.forEach((t=>{t.children&&-1===e.indexOf(t.data.id)&&t.data.id!==a.data.id&&s.unshift(...t.children)})),s.unshift(...t.children),t.parent||s.unshift(t)}))}else s.unshift(a);return s},Ei=({containerData:t,styling:e,setExpandedCallback:n,wrapperState:r,selectionObj:o,element:i})=>{const{svg:a,divBox:s,allNodes:l,positioning:u,tooltip:c}=t,{navigationMode:h}=l.data;s.selectAll("*").remove(),a.selectAll("*").remove();const d=ki(r.expandedState,l,!1,h);vi({positioning:u,divBox:s,nodes:d,styling:e,setExpandedCallback:n,wrapperState:r,selectionObj:o,navigationMode:h,element:i,tooltip:c});xi(a.selectAll(".sn-org-paths").data(d).enter(),u,r.expandedState.topId,h)},Ri=({element:t,dataTree:e,selectionObj:n,wrapperState:r,setInitialZoom:o,setTransform:i,setExpandedState:a,viewState:s,setContainerData:l,layout:u})=>{t.innerHTML="",t.className="sn-org-chart";const{navigationMode:c}=u;let h=_i("ttb",t,{},c);const{width:d,height:p}=t.getBoundingClientRect(),f=Cn(t).append("span").attr("class","sn-org-zoomwrapper").on("click",(()=>{r.constraints.active||n.api.isActive()&&n.state||(n.api.begin("/qHyperCubeDef"),n.setState([]))})).node(),g=Cn(f).selectAll("svg").data([{}]).enter().append("svg").attr("class","sn-org-svg").attr("width","100%").attr("height","100%"),m=Cn(f).selectAll("div").data([{}]).enter().append("div").attr("class","sn-org-nodes"),b=Cn(t).append("button").attr("class","sn-org-homebutton disabled").on("click",(()=>{Ri({element:t,dataTree:e,selectionObj:n,wrapperState:r,setInitialZoom:o,setTransform:i,setExpandedState:a,viewState:s,setContainerData:l,layout:u})})).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(),y=function(t){const e=Cn(t).append("div").attr("class","sn-org-tooltip").on("mousedown",(()=>{e.classed("sn-org-tooltip-visible",!1)}));return e}(t);if(e.error)return Cn(f).append("div").attr("class","sn-org-error").html(e.message),!1;e.warn&&e.warn.length&&Cn(f).append("span").attr("class","sn-org-warning").html(`*${e.warn.join(" ")}`);const v=g.append("g").attr("class","sn-org-paths"),x=Io().size([d,p]).nodeSize([ei.cardWidth+ei.cardPadding,h.depthSpacing])(To(e)),w=!r.expandedState||!x.descendants().find((t=>t.data.id===r.expandedState.topId)),_=w?{topId:x.data.id,isExpanded:!0,expandedChildren:[],useTransitions:!1}:r.expandedState,C=ki(_,x,!1,c);C.forEach((t=>{t.xActual&&t.yActual||(h.x(t),h.y(t))}));const O=(t=>{const{cardWidth:e,cardHeight:n,buttonHeight:r,buttonMargin:o}=ei,i={left:1/0,top:1/0,right:-1/0,bottom:-1/0};return t.forEach((t=>{i.left=Math.min(t.xActual,i.left),i.top=Math.min(t.yActual,i.top),i.right=Math.max(t.xActual,i.right),i.bottom=Math.max(t.yActual,i.bottom)})),{x:i.left,y:i.top-r-o,width:i.right-i.left+e,height:i.bottom-i.top+n+2*(r+o)}})(C),k=s&&s.initialZoom?s.initialZoom:((t,e,n)=>{const{widthMargin:r,cardHeight:o,minZoom:i}=ei,a="expandAll"===n?1/0:ei.maxZoom,{width:s,height:l}=t,{clientHeight:u,clientWidth:c}=e,h=s+2*r,d=l+o,p=Math.max(Math.min(h/c,a),i),f=Math.max(Math.min(d/u,a),i);return p>f?{initialX:-t.x+r,initialY:-t.y+(u*p-l)/2,initialZoom:p}:{initialX:-t.x+(c*f-s)/2,initialY:o/2,initialZoom:f}})(O,t,c);return o(k),h=_i("ttb",t,k,c),function({containerData:t,setTransform:e,transformState:n,wrapperState:r,initialZoomState:o,navigationMode:i}){const{svg:a,divBox:s,width:l,height:u,zoomWrapper:c,element:h,tooltip:d,homeButton:p}=t,{x:f=0,y:g=0}=n,{minZoom:m,maxZoom:b}=ei,y=n&&1/n.zoom||o.initialZoom,v="expandAll"===i?y:Math.max(Math.min(b,y),m),x=()=>{const t=document.createEvent("MouseEvents");t.initEvent("mousedown",!0,!1),h.dispatchEvent(t)};Cn(c).call(ti().extent([[0,0],[l,u]]).filter((t=>!(r.constraints.active||"dblclick"===t.type||"mousedown"===t.type&&3===t.which))).scaleExtent(["expandAll"===i?.8:m*v,b*v]).on("start",x).on("zoom",(t=>{Cn(p).attr("class","sn-org-homebutton lui-fade-button lui-fade-button--large"),e({zoom:t.transform.k/v,x:t.transform.x,y:t.transform.y}),x(),yi(d),Ci(Ko.translate(t.transform.x,t.transform.y).scale(t.transform.k/v),a,s,l,u)}))),e({zoom:1/v,x:f,y:g}),Ci(Ko.translate(f,g).scale(1/v),a,s,l,u)}({containerData:{svg:v,divBox:m,width:d,height:p,zoomWrapper:f,element:t,tooltip:y,homeButton:b},setTransform:i,transformState:s&&s.transform||{},wrapperState:r,initialZoomState:k,navigationMode:c}),w&&a(_),l({svg:v,divBox:m,allNodes:x,positioning:h,width:d,height:p,element:t,zoomWrapper:f,tooltip:y,homeButton:b})},Si=(t,e,n)=>{if(n.snapshotData&&n.snapshotData.dataMatrix)return n.snapshotData.dataMatrix;const{navigationMode:r}=n,o=ki(t,e,!0,r),i=[],{qDataPages:a}=n.qHyperCube,s=[];return a.forEach((t=>{s.push(...t.qMatrix)})),o.forEach((t=>{void 0!==t.data.rowNo&&i.push(s[t.data.rowNo])})),i},Ti=(t,e,n,r)=>{const o={expandedState:t,transform:e,size:{w:r.clientWidth,h:r.clientHeight},initialZoom:n};return o.expandedState.useTransitions=!1,o};function Li(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"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=t:o.appendChild(document.createTextNode(t))}}Li(".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");Li(".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}\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-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-card-label {\n font-size: 11px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n");Li(".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");Li('.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: 230px;\n width: -moz-max-content;\n width: fit-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-header {\n font-weight: bold;\n padding-bottom: 5px;\n}\n');function zi(t,e,n){let r;switch(t.colorType){case"byExpression":r=ri.resolveExpression(t.colorExpression);break;case"colorPicker":r=e.getColorPickerColor(t.color);break;default:r=n}return"none"===r?n:r}Li(".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 Mi={cardStyling:({Theme:t,layout:e})=>{const n=zi(e.style.backgroundColor,t,v.BACKGROUND_COLOR.color),r=zi(e.style.fontColor,t,"default"),o=e.qHyperCube.qMeasureInfo.length?e.qHyperCube.qMeasureInfo[0].qFallbackTitle:null,{border:i={colorType:v.BORDER_COLOR_TYPE}}=e.style;return{backgroundColor:n,fontColor:r,measureLabel:o,border:i,borderColor:"auto"!==i.colorType?zi(i,t,ri.getDarkColor(n)):ri.getDarkColor(n)}}},Ni={getViewState:(t,e)=>{const{viewState:n}=t;return!n&&e.snapshotData&&e.snapshotData.viewState?e.snapshotData.viewState:n}}}}}));
|