balkan-orgchart-js 9.1.74 → 9.1.75

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/orgchart.js CHANGED
@@ -1 +1 @@
1
- var e,i,o,OrgChart=function(e,i){var o=this;Object.defineProperty(this,"element",{get:()=>e?e.querySelector("[data-boc-content]"):null,set(e){o.mainElement=e}}),Object.defineProperty(this,"mainElement",{get:()=>e,set(i){(e=i)&&(e.innerHTML="\n <style> \n .boc-dark, .boc-light{ display: flex; }\n [data-boc-left]{ display: none; }\n [data-boc-right]{ height: 100%; position: relative; overflow:hidden; flex-grow: 1; }\n [data-boc-content]{ height: 100%; width: 100%; }\n @media screen and (max-width: 500px) {\n .boc-dark, .boc-light{ flex-direction: column; }\n [data-boc-left]{ order: 2; height: 50vh; }\n [data-boc-right]{ order: 1; }\n }\n </style>\n <div data-boc-left></div>\n <div data-boc-right>\n <div data-boc-content></div>\n </div>")}}),Object.defineProperty(this,"leftElement",{get:()=>e.querySelector("[data-boc-left]")}),o.init(e,i)};OrgChart.prototype.init=function(e,i){if(e&&!this._initCalled){this._initCalled=!0,("string"==typeof e||e instanceof String)&&(e=document.querySelector(e)),this.element=e;var o=this;if(this.config=OrgChart.mergeDeep(OrgChart._defaultConfig(i),i),this._layoutConfigs={base:{orientation:this.config.orientation,levelSeparation:this.config.levelSeparation,mixedHierarchyNodesSeparation:this.config.mixedHierarchyNodesSeparation,assistantSeparation:this.config.assistantSeparation,subtreeSeparation:this.config.subtreeSeparation,siblingSeparation:this.config.siblingSeparation,layout:this.config.layout,columns:this.config.columns,collapse:this.config.collapse,partnerNodeSeparation:this.config.partnerNodeSeparation}},this.config.tags)for(var a in this.config.tags){var s=this.config.tags[a];null!=s.subTreeConfig&&(this._layoutConfigs[a]={orientation:null!=s.subTreeConfig.orientation?s.subTreeConfig.orientation:this.config.orientation,levelSeparation:null!=s.subTreeConfig.levelSeparation?s.subTreeConfig.levelSeparation:this.config.levelSeparation,mixedHierarchyNodesSeparation:null!=s.subTreeConfig.mixedHierarchyNodesSeparation?s.subTreeConfig.mixedHierarchyNodesSeparation:this.config.mixedHierarchyNodesSeparation,assistantSeparation:null!=s.subTreeConfig.assistantSeparation?s.subTreeConfig.assistantSeparation:this.config.assistantSeparation,subtreeSeparation:null!=s.subTreeConfig.subtreeSeparation?s.subTreeConfig.subtreeSeparation:this.config.subtreeSeparation,siblingSeparation:null!=s.subTreeConfig.siblingSeparation?s.subTreeConfig.siblingSeparation:this.config.siblingSeparation,layout:null!=s.subTreeConfig.layout?s.subTreeConfig.layout:this.config.layout,columns:null!=s.subTreeConfig.columns?s.subTreeConfig.columns:this.config.columns,collapse:null!=s.subTreeConfig.collapse?s.subTreeConfig.collapse:this.config.collapse,partnerNodeSeparation:null!=s.subTreeConfig.partnerNodeSeparation?s.subTreeConfig.partnerNodeSeparation:this.config.partnerNodeSeparation,template:s.subTreeConfig.template})}this._event_id=OrgChart._guid(),OrgChart._validateConfig(this.config)&&(this._vScroll={},this.config.ui||(this.ui=OrgChart.ui),this.config.editUI?this.editUI=this.config.editUI:this.editUI=new OrgChart.editUI,this.editUI.init(this),this.config.filterUI?this.filterUI=this.config.filterUI:this.filterUI=new OrgChart.filterUI,this.filterUI.init(this),this.manager=new OrgChart.manager(this),this._ai=new OrgChart._ai(this),this.config.searchUI?this.searchUI=this.config.searchUI:this.searchUI=new OrgChart.searchUI,this.config.aiUI?this.aiUI=this.config.aiUI:this.aiUI=new OrgChart.aiUI,this.config.orgScribeUI?this.orgScribeUI=this.config.orgScribeUI:this.orgScribeUI=new OrgChart.orgScribeUI,this.config.powerPointPreviewUI?this.powerPointPreviewUI=this.config.powerPointPreviewUI:this.powerPointPreviewUI=new OrgChart.exportUI("pptx"),this.config.pdfPreviewUI?this.pdfPreviewUI=this.config.pdfPreviewUI:this.pdfPreviewUI=new OrgChart.exportUI("pdf"),this.config.svgPreviewUI?this.svgPreviewUI=this.config.svgPreviewUI:this.svgPreviewUI=new OrgChart.exportUI("svg"),this.config.pngPreviewUI?this.pngPreviewUI=this.config.pngPreviewUI:this.pngPreviewUI=new OrgChart.exportUI("png"),this.config.nodeMenuUI?this.nodeMenuUI=this.config.nodeMenuUI:this.nodeMenuUI=new OrgChart.menuUI,this.nodeMenuUI.init(this,this.config.nodeMenu),this.config.nodeCircleMenuUI?this.nodeCircleMenuUI=this.config.nodeCircleMenuUI:this.nodeCircleMenuUI=new OrgChart.circleMenuUI,this.nodeCircleMenuUI.init(this,this.config.nodeCircleMenu),this.config.nodeContextMenuUI?this.nodeContextMenuUI=this.config.nodeContextMenuUI:this.nodeContextMenuUI=new OrgChart.menuUI,this.nodeContextMenuUI.init(this,this.config.nodeContextMenu),this.config.controlsUI?this.controlsUI=this.config.controlsUI:this.controlsUI=new OrgChart.controlsUI,this.config.toolbarUI?this.toolbarUI=this.config.toolbarUI:this.toolbarUI=new OrgChart.toolbarUI,this.config.notifierUI?this.notifierUI=this.config.notifierUI:this.notifierUI=new OrgChart.notifierUI,this.notifierUI.init(this),this.config.menuUI?this.menuUI=this.config.menuUI:this.menuUI=new OrgChart.menuUI,this.menuUI.init(this,this.config.menu),this.config.xScrollUI||(this.xScrollUI=new OrgChart.xScrollUI(this.element,this.config,function(){return{boundary:o.response.boundary,scale:o.getScale(),viewBox:o.getViewBox(),padding:o.config.padding}},function(e){o.setViewBox(e)},function(){o._draw(!0,OrgChart.action.xScroll)})),this.config.yScrollUI||(this.yScrollUI=new OrgChart.yScrollUI(this.element,this.config,function(){return{boundary:o.response.boundary,scale:o.getScale(),viewBox:o.getViewBox(),padding:o.config.padding}},function(e){o.setViewBox(e)},function(){o._draw(!0,OrgChart.action.xScroll)})),this.config.undoRedoUI?this.undoRedoUI=this.config.undoRedoUI:this.undoRedoUI=new OrgChart.undoRedoUI,this.mainElement.classList.add("boc-"+this.config.mode),this._gragStartedId=null,this._timeout=null,this._touch=null,this._initialized=!1,this._loaded=!1,this._moveInterval=null,this._movePosition=null,this.response=null,this.nodes=null,this.isVisible=null,this._connectorLines={x:{},y:{}},OrgChart._intersectionObserver(this.element,function(e){o.isVisible=e,!1!==OrgChart.events.publish("visibility-change",[o])&&OrgChart.LAZY_LOADING&&o.isVisible&&(o._loaded?o._draw(!1,OrgChart.action.update):(o._setInitialSizeIfNotSet(),o._draw(!1,OrgChart.action.init)))}),this._resizeObserver=new ResizeObserver(e=>{for(let i of e){const{width:e,height:a}=i.contentRect;o._resizeHandler(e,a)}}),this._resizeObserver.observe(this.element))}},OrgChart.prototype.load=function(e,i){var o=this;return this.config.nodes=e,this._draw(!1,OrgChart.action.init,void 0,function(){o.filterUI.update(),i&&i()}),this},OrgChart.prototype.loadXML=function(e,i){var o=OrgChart._xml2json(e);return this.load(o,i)},OrgChart.prototype.getXML=function(){return OrgChart._json2xml(this.config.nodes)},OrgChart.prototype.on=function(e,i){return OrgChart.events.on(e,i,this._event_id),this},OrgChart.prototype.removeListener=function(e,i){return OrgChart.events.remove(e,i,this._event_id)},OrgChart.prototype.draw=function(e,i,o){null==e&&(e=OrgChart.action.update),this._draw(!1,e,i,o)},OrgChart.prototype._draw=function(e,i,o,a){var s=this;if(!OrgChart.LAZY_LOADING||this.isVisible)if(OrgChart.LAZY_LOADING||this._initialized||(this._setInitialSizeIfNotSet(),0!=this.width()&&0!=this.height())){this._hideBeforeAnimationCompleted=!1;var l=i==OrgChart.action.init?null:this.getViewBox();this.manager.read(e,this.width(),this.height(),l,i,o,function(e){if(!s.notifierUI.show(e.notif)){i!=OrgChart.action.exporting&&(s.nodes=e.nodes,s.visibleNodeIds=e.visibleNodeIds,s.roots=e.roots),s._connectorLines={x:{},y:{}},s.editUI.fields=e.allFields;var l={defs:""};OrgChart.events.publish("renderdefs",[s,l]);var c=s.ui.defs(l.defs),d=s.getScale(e.viewBox);c+=s.ui.pointer(s.config,i,d);var h=s.getViewBox(),p=e.viewBox;l={content:c,res:e};OrgChart.events.publish("prerender",[s,l]),c=l.content;var u=[];if(OrgChart.RENDER_LINKS_BEFORE_NODES)for(var f=0;f<e.visibleNodeIds.length;f++){var g=e.nodes[e.visibleNodeIds[f]];OrgChart.getRootOf(g).stParent?u.push(g.id):c+=s.ui.link(g,s,d,e.bordersByRootIdAndLevel,e.nodes,i)}for(f=0;f<e.visibleNodeIds.length;f++){g=e.nodes[e.visibleNodeIds[f]];var m=s._get(g.id);if(OrgChart.RENDER_LINKS_BEFORE_NODES&&u.includes(g.id)&&(c+=s.ui.link(g,s,d,e.bordersByRootIdAndLevel,e.nodes,i)),g.isTreeListItem||(c+=s.ui.node(g,m,e.animations,s.config,void 0,void 0,void 0,i,d,s)),!g.min&&g.treeList){var renderTreeListIterate=function(o){if(!g.treeList.pinnedIds.includes(o.id)){var a=s._get(o.id);c+=s.ui.node(o,a,e.animations,s.config,void 0,void 0,void 0,i,d,s),c+=s.ui.expandCollapseBtn(s,o,a,s.config,s._layoutConfigs,i,d)}for(var l of o.children)renderTreeListIterate(l)},b=OrgChart.randomId();for(var x of(c+=`<clipPath id="treelist_${b}">\n <rect rx="10" ry="10" x="${g.x+g.padding[3]}" y="${g.y+g.padding[0]}" width="${g.w-g.padding[1]-g.padding[3]}" height="${g.h-g.padding[2]-g.padding[0]}">\n </clipPath><g clip-path="url(#treelist_${b})"><g data-treelist-content="${g.id}" transform="matrix(1,0,0,1,0,-${g.treeList.scrollTop})">`,g.stChildren))renderTreeListIterate(x);for(var v of g.treeList.pinnedIds){var y=s.getNode(v),_=s._get(v);c+=s.ui.node(y,_,e.animations,s.config,void 0,void 0,void 0,i,d,s,!0),c+=s.ui.expandCollapseBtn(s,y,_,s.config,s._layoutConfigs,i,d)}var{thumbHeight:w,thumbPosition:k,scrollBarDisplay:I}=OrgChart._treeListGetTumbPositionFromScrollTop(g);c+=`</g>\n\n \n <rect style="display: ${I}" data-treelist-scroll="${g.id}" class="boc-scroll" x="${g.x+g.w-g.padding[1]-OrgChart.TREELIST_SCROLLBAR_WIDTH}" y="${g.y+g.padding[0]}" width="${OrgChart.TREELIST_SCROLLBAR_WIDTH}" height="${g.h-g.padding[2]-g.padding[0]}"></rect>\n <rect style="display: ${I}" data-treelist-thumb="${g.id}" class="boc-scroll-thumb" x="${g.x+g.w-g.padding[1]-OrgChart.TREELIST_SCROLLBAR_WIDTH}" y="${k}" width="${OrgChart.TREELIST_SCROLLBAR_WIDTH}" height="${w}"></rect>\n\n </g>`}}for(f=0;f<e.visibleNodeIds.length;f++){g=e.nodes[e.visibleNodeIds[f]],m=s._get(g.id);g.isTreeListItem||(OrgChart.RENDER_LINKS_BEFORE_NODES||(c+=s.ui.link(g,s,d,e.bordersByRootIdAndLevel,e.nodes,i)),c+=s.ui.expandCollapseBtn(s,g,m,s.config,s._layoutConfigs,i,d))}l={content:c,res:e};if(OrgChart.events.publish("render",[s,l]),c=l.content,e=l.res,c+=s.ui.lonely(s.config),i!==OrgChart.action.exporting){i!==OrgChart.action.centernode&&i!==OrgChart.action.insert&&i!==OrgChart.action.expand&&i!==OrgChart.action.collapse&&i!==OrgChart.action.update||(p=h),i===OrgChart.action.init&&null!=h&&(p=h),i===OrgChart.action.centerNode&&null!=h&&(p=h),s.response=e,s._lastSize={width:s.width(),height:s.height()};M=s.ui.svg("100%","100%",p,s.config,c);if(s._initialized){var S=s.getSvg(),C=S.parentNode;C.removeChild(S),C.insertAdjacentHTML("afterbegin",M),s._attachEventHandlers(),s.xScrollUI.addListener(s.getSvg()),s.yScrollUI.addListener(s.getSvg()),s.xScrollUI.setPosition(),s.yScrollUI.setPosition()}else s.element.innerHTML=s.ui.css()+M+s.ui.menuButton(s.config)+s.ui.aiButton(s.config),s._attachEventHandlers(),s.xScrollUI.create(s.width(),s.config.padding),s.xScrollUI.setPosition(),s.xScrollUI.addListener(s.getSvg()),s.yScrollUI.create(s.height(),s.config.padding),s.yScrollUI.setPosition(),s.yScrollUI.addListener(s.getSvg()),s.config.enableSearch&&s.searchUI.init(s),s.aiUI.init(s),s.orgScribeUI.init(s),s.powerPointPreviewUI.init(s),s.pdfPreviewUI.init(s),s.svgPreviewUI.init(s),s.pngPreviewUI.init(s),s.toolbarUI.init(s,s.config.toolbar),s.undoRedoUI.init(s),s.controlsUI.init(s);var L=!1,A=s.response.animations;if(A[0].length>0){s._hideBeforeAnimation(A[0].length);for(f=0;f<A[0].length;f++)A[0][f]=s.getNodeElement(A[0][f]);OrgChart.animate(A[0],A[1],A[2],s.config.anim.duration,s.config.anim.func,function(){L||(a&&a.call(s),OrgChart.events.publish("redraw",[s]),s._showAfterAnimation(),L=!0)})}i===OrgChart.action.centerNode?OrgChart.animate(s.getSvg(),{viewbox:h},{viewbox:s.response.viewBox},s.config.anim.duration,s.config.anim.func,function(){s.ripple(o.options.rippleId),L||(a&&a.call(s),OrgChart.events.publish("redraw",[s]),s._showAfterAnimation(),L=!0)},function(){s.xScrollUI.setPosition(),s.yScrollUI.setPosition()}):!h||!s.response||h[0]==s.response.viewBox[0]&&h[1]==s.response.viewBox[1]&&h[2]==s.response.viewBox[2]&&h[3]==s.response.viewBox[3]||i!==OrgChart.action.insert&&i!==OrgChart.action.expand&&i!==OrgChart.action.collapse&&i!==OrgChart.action.update&&i!==OrgChart.action.init?0==A[0].length&&(L||(a&&a.call(s),OrgChart.events.publish("redraw",[s]),L=!0)):OrgChart.animate(s.getSvg(),{viewbox:h},{viewbox:s.response.viewBox},2*s.config.anim.duration,s.config.anim.func,function(){s.xScrollUI.setPosition(),s.yScrollUI.setPosition(),L||(a&&a.call(s),OrgChart.events.publish("redraw",[s]),L=!0)}),s._initialized||(s._initialized=!0,s.filterUI.update(),s._ai.setContext(),OrgChart.events.publish("init",[s])),!s._loaded&&e&&e.nodes&&Object.keys(e.nodes).length&&(s._loaded=!0)}else{var E=e.boundary,N=E.maxX-E.minX,$=E.maxY-E.minY,M=s.ui.svg(N,$,[E.minX,E.minY,N,$],s.config,c,d);a.call(s,M,e)}}},function(e){OrgChart.events.publish("ready",[s,e])})}else console.error("Cannot load the chart with size 0! If you are using the OrgChart within tabs set OrgChart.LAZY_LOADING to true! ")},OrgChart.prototype._setInitialSizeIfNotSet=function(){this.mainElement.style.overflow="hidden",this.mainElement.style.position="relative",0==this.mainElement.offsetHeight&&(this.mainElement.style.height="100%",0==this.mainElement.offsetHeight&&(this.mainElement.style.height="700px")),0==this.mainElement.offsetWidth&&(this.mainElement.style.width="100%",0==this.mainElement.offsetWidth&&(this.mainElement.style.width="700px"))},OrgChart.prototype.width=function(){return this.element.offsetWidth},OrgChart.prototype.height=function(){return this.element.offsetHeight},OrgChart.prototype.getViewBox=function(){var e=this.getSvg();return OrgChart._getViewBox(e)},OrgChart.prototype.setViewBox=function(e){this.getSvg().setAttribute("viewBox",e.toString())},OrgChart.prototype.getScale=function(e){return e||(e=this.getViewBox()),OrgChart.getScale(e,this.width(),this.height(),this.config.scaleInitial,this.config.scaleMax,this.config.scaleMin)},OrgChart.prototype.setScale=function(e){e>this.config.scaleMax&&(e=this.config.scaleMax),e<this.config.scaleMin&&(e=this.config.scaleMin);var i=this.getViewBox().slice(0),o=this.width(),a=this.height(),s=o/i[2],l=a/i[3],c=s>l?l:s,d=i,h=i[2],p=i[3];return i[2]=i[2]/(e/c),i[3]=i[3]/(e/c),i[0]=d[0]-(i[2]-h)/2,i[1]=d[1]-(i[3]-p)/2,this.setViewBox(i),OrgChart.events.publish("redraw",[this]),e},OrgChart.prototype.ripple=function(e,i,o){var a=this.getNode(e);if(null!=a){var s=this.getNodeElement(e);if(null!=s){var l=this.getScale(),c=a.w/2,d=a.h/2;if(void 0!==i&&void 0!==o){var h=s.getBoundingClientRect();c=i/l-h.left/l,d=o/l-h.top/l}var p=a.w,u=a.h,f=p-c>c?p-c:c,g=u-d>d?u-d:d,m=f>g?f:g,b=document.createElementNS("http://www.w3.org/2000/svg","g"),x=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),v=document.createElementNS("http://www.w3.org/2000/svg","rect"),y=document.createElementNS("http://www.w3.org/2000/svg","circle"),_=OrgChart.randomId();x.setAttribute("id",_);var w={ripple:OrgChart.t(a.templateName,a.min,this.getScale()).ripple,node:a};OrgChart.events.publish("ripple",[this,w]),v.setAttribute("x",w.ripple.rect?w.ripple.rect.x:0),v.setAttribute("y",w.ripple.rect?w.ripple.rect.y:0),v.setAttribute("width",w.ripple.rect?w.ripple.rect.width:a.w),v.setAttribute("height",w.ripple.rect?w.ripple.rect.height:a.h),v.setAttribute("rx",w.ripple.radius),v.setAttribute("ry",w.ripple.radius),y.setAttribute("clip-path","url(#"+_+")"),y.setAttribute("cx",c),y.setAttribute("cy",d),y.setAttribute("r",0),y.setAttribute("fill",w.ripple.color),y.setAttribute("class","boc-ripple"),x.appendChild(v),b.appendChild(x),b.appendChild(y),s.appendChild(b),OrgChart.animate(y,{r:0,opacity:1},{r:m,opacity:0},500,OrgChart.anim.outPow,function(){s.removeChild(b)})}}},OrgChart.prototype.centerOutNodes=function(e){if(this._centerInNodes){var i=JSON.parse(this._centerInNodes);this._centerInNodes=null;var o=this;this._centerInNodesTimeout=OrgChart.animate(this.getSvg(),{viewBox:this.getViewBox()},{viewBox:i},300,this.config.anim.func,function(){o.draw(OrgChart.action.update,null,function(){e&&e.call(o)})})}},OrgChart.prototype.centerInNodes=function(e,i){var o=this.getViewBox();this._centerInNodes||(this._centerInNodes=JSON.stringify(o));var a=Number.MAX_SAFE_INTEGER,s=Number.MIN_SAFE_INTEGER,l=Number.MAX_SAFE_INTEGER,c=Number.MIN_SAFE_INTEGER;for(var d of e)d.y<a&&(a=d.y),d.y+d.h>s&&(s=d.y+d.h),d.x<l&&(l=d.x),d.x+d.w>c&&(c=d.x+d.w);var h=c-l,p=s-a,u=(f=h/(h+2*this.config.padding))>(g=p/(p+2*this.config.padding))?g:f;u>this.config.scaleMax&&(u=this.config.scaleMax),u<this.config.scaleMin&&(u=this.config.scaleMin);var f,g,m=[50,50],b=this.width(),x=this.height(),v=(f=b/o[2])>(g=x/o[3])?g:f,y=o,_=o[2],w=o[3];o[2]=o[2]/(u/v),o[3]=o[3]/(u/v),o[0]=y[0]-(o[2]-_)/(100/m[0]),o[1]=y[1]-(o[3]-w)/(100/m[1]),o[0]=l-(b/u-h)/2,o[1]=a-(x/u-p)/2;var k=this;this._centerInNodesTimeout&&(clearTimeout(this._centerInNodesTimeout),this._centerInNodesTimeout=null),this._centerInNodesTimeout=OrgChart.animate(this.getSvg(),{viewBox:this.getViewBox()},{viewBox:o},300,this.config.anim.func,function(){k.draw(OrgChart.action.update,null,function(){i&&i.call(k)})})},OrgChart.prototype.center=function(e,i,o){var a,s,l=e,c=!0,d=!0;i&&null!=i.parentState&&(a=i.parentState),i&&null!=i.childrenState&&(s=i.childrenState),i&&null!=i.rippleId&&(l=i.rippleId),i&&null!=i.vertical&&(c=i.vertical),i&&null!=i.horizontal&&(d=i.horizontal);var h={parentState:a,childrenState:s,rippleId:l,vertical:c,horizontal:d};this._draw(!1,OrgChart.action.centerNode,{id:e,options:h},o)},OrgChart.prototype.fit=function(e){this.config.scaleInitial=OrgChart.match.boundary,this._draw(!0,OrgChart.action.init,{method:"fit"},e)},OrgChart.prototype.fitIfOutside=function(e){this.config.scaleInitial=OrgChart.match.boundaryIfOutside,this._draw(!0,OrgChart.action.init,{method:"fit"},e)},OrgChart.prototype.toggleFullScreen=function(){var e=document.querySelector("["+OrgChart.attr.tlbr+"r='fullScreen']");document.fullscreenElement==this.element||document.webkitFullscreenElement==this.element||document.mozFullScreenElement==this.element||document.msFullscreenElement==this.element?(document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen(),e&&(e.innerHTML=OrgChart.toolbarUI.openFullScreenIcon)):(this.element.requestFullscreen?this.element.requestFullscreen():this.element.mozRequestFullScreen?this.element.mozRequestFullScreen():this.element.webkitRequestFullscreen?this.element.webkitRequestFullscreen():this.element.msRequestFullscreen&&this.element.msRequestFullscreen(),e&&(e.innerHTML=OrgChart.toolbarUI.closeFullScreenIcon))},OrgChart.prototype.getNode=function(e){return this.nodes[e]},OrgChart.prototype.setLayout=function(e,i){i||(i="base"),this._layoutConfigs[i].layout=e,"base"==i&&(this.config.layout=e),this._draw(!1,OrgChart.action.update)},OrgChart.prototype.setOrientation=function(e,i,o){var a=this;i||(i="base"),this._layoutConfigs[i].orientation=e,"base"==i&&(this.config.orientation=e),this._draw(!1,OrgChart.action.update,void 0,function(){a.getScale(),OrgChart._moveToBoundaryArea(a.getSvg(),a.getViewBox(),a.response.boundary,function(){a._draw(!0,OrgChart.action.pan),o&&o()})})},OrgChart.prototype.search=function(e,i,o){return OrgChart.isNEU(i)&&(i=this.searchUI._searchFields),OrgChart.isNEU(o)&&(o=i),OrgChart._search.search(this.config.nodes,e,i,o,this.config.searchDisplayField,this.config.searchFieldsWeight,this.searchUI._searchFieldsAbbreviation)},OrgChart.prototype._hideBeforeAnimation=function(e){if(1!=this._hideBeforeAnimationCompleted&&!(e&&e<OrgChart.ANIM_THRESHOLD)){var i=this.element.getElementsByTagName("text");if(i.length>OrgChart.TEXT_THRESHOLD)for(var o=0;o<i.length;o++)i[o].style.display="none";var a=this.element.getElementsByTagName("image");if(a.length>OrgChart.IMAGES_THRESHOLD)for(o=0;o<a.length;o++)a[o].style.display="none";var s=this.element.querySelectorAll("["+OrgChart.attr.link_id+"]");if(s.length>OrgChart.LINKS_THRESHOLD)for(o=0;o<s.length;o++)s[o].style.display="none";var l=this.element.querySelectorAll("["+OrgChart.attr.control_expcoll_id+"]");if(l.length>OrgChart.BUTTONS_THRESHOLD)for(o=0;o<l.length;o++)l[o].style.display="none";var c=this.element.querySelectorAll("["+OrgChart.attr.control_up_id+"]");if(c.length>OrgChart.BUTTONS_THRESHOLD)for(o=0;o<c.length;o++)c[o].style.display="none";this._hideBeforeAnimationCompleted=!0}},OrgChart.prototype._showAfterAnimation=function(){for(var e=this.element.getElementsByTagName("text"),i=0;i<e.length;i++)e[i].style.display="";var o=this.element.getElementsByTagName("image");for(i=0;i<o.length;i++)o[i].style.display="";var a=this.element.querySelectorAll("["+OrgChart.attr.link_id+"]");for(i=0;i<a.length;i++)a[i].style.display="";var s=this.element.querySelectorAll("["+OrgChart.attr.control_expcoll_id+"]");for(i=0;i<s.length;i++)s[i].style.display="";var l=this.element.querySelectorAll("["+OrgChart.attr.control_up_id+"]");for(i=0;i<l.length;i++)l[i].style.display="";this._hideBeforeAnimationCompleted=!1},OrgChart.prototype.isChild=function(e,i){for(var o=this.getNode(i);o;){if(o.id==e)return!0;o=o.parent?o.parent:o.stParent}return!1},OrgChart.prototype.getCollapsedIds=function(e){for(var i=[],o=0;o<e.childrenIds.length;o++){var a=this.getNode(e.childrenIds[o]);1==a.collapsed&&i.push(a.id)}return i},OrgChart.prototype.stateToUrl=function(){if(this.manager.state){var e={};return e.exp=this.manager.state.exp.join("*"),e.min=this.manager.state.min.join("*"),e.adjustify=this.manager.state.adjustify.x+"*"+this.manager.state.adjustify.y,e.scale=this.manager.state.scale,e.y=this.manager.state.x,e.x=this.manager.state.y,new URLSearchParams(e).toString()}return""},OrgChart.prototype.generateId=function(){for(;;){var e="_"+("0000"+(Math.random()*Math.pow(36,4)|0).toString(36)).slice(-4);if(null==this.nodes||!this.nodes.hasOwnProperty(e))return e}},OrgChart.prototype.moveNodesToVisibleArea=function(e,i){for(var o=this,a=this.roots[0],s=this.getSvg(),l=this.getViewBox(),c=null,d=null,h=null,p=null,u=0;u<e.length;u++){var f=this.nodes[e[u]];null!=f.x&&null!=f.y&&((null===c||c<f.x+f.w)&&(c=f.x+f.w),(null===d||d<f.y+f.h)&&(d=f.y+f.h),(null===h||h>f.x)&&(h=f.x),(null===p||p>f.y)&&(p=f.y))}if(null!=c&&null!=d&&null!=h&&null!=p){var g=this.width(),m=this.height(),b=g/(w=c-h+2*this.config.padding),x=m/(k=d-p+2*this.config.padding),v=b>x?x:b,y=Math.ceil(g/v),_=Math.ceil(m/v),w=0,k=0;if(y-2*this.config.padding>=c-h)w=(c+h)/2-y/2;else switch(w=a.x-y/2+OrgChart.manager._getNodeWidth(a,this.config)/2,this.config.orientation){case OrgChart.orientation.right:case OrgChart.orientation.right_top:(w=-(y/2-(h-c)/2))<this.config.padding-y&&(w=this.config.padding-y);break;case OrgChart.orientation.left:case OrgChart.orientation.bottom_left:case OrgChart.orientation.top_left:case OrgChart.orientation.left_top:(w=-(y/2-(c-h)/2))>-this.config.padding&&(w=-this.config.padding)}if(_-2*this.config.padding>=d-p)k=(d+p)/2-_/2;else switch((k=-(_/2-(d-p)/2))>-this.config.padding&&(k=-this.config.padding),this.config.orientation){case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:(k=-(_/2-(p-d)/2))<this.config.padding-_&&(k=this.config.padding-_);break;case OrgChart.orientation.left:case OrgChart.orientation.right:k=a.y-_/2+OrgChart.manager._getNodeWidth(a,this.config)/2}var I=[w,k,y,_];l[0]!==I[0]||l[1]!==I[1]?OrgChart.animate(s,{viewBox:l},{viewBox:I},this.config.anim.duration,this.config.anim.func,function(){o.draw(OrgChart.action.update,void 0,i)}):i&&i()}},OrgChart.prototype._nodeHasHiddenParent=function(e){return!e.parent&&!OrgChart.isNEU(e.pid)&&this.getNode(e.pid)},OrgChart.prototype.destroy=function(){this._initCalled=!1,this._resizeObserver.unobserve(this.element),OrgChart.events.removeForEventId(this._event_id),this.element.innerHTML=null},OrgChart._defaultConfig=function(e){return{interactive:!0,mode:"light",lazyLoading:"auto",enableDragDrop:!1,enableSearch:!0,enableAI:!1,enablePan:!0,keyNavigation:!1,miniMap:!1,controls:null,nodeMenu:null,nodeCircleMenu:null,nodeContextMenu:null,menu:null,toolbar:!1,nodeMouseClick:OrgChart.action.details,nodeMouseDbClick:OrgChart.none,mouseScrool:OrgChart.action.ctrlZoom,showXScroll:!1,showYScroll:!1,template:"ana",tags:{},min:!1,nodeBinding:{},linkBinding:{},searchFields:null,searchDisplayField:null,searchFieldsWeight:null,searchFieldsAbbreviation:null,nodes:[],clinks:[],slinks:[],backdrops:[],groupDottedLines:[],dottedLines:[],undoRedoStorageName:null,levelSeparation:60,siblingSeparation:20,subtreeSeparation:40,backdropSeparation:15,mixedHierarchyNodesSeparation:15,assistantSeparation:100,minPartnerSeparation:50,partnerChildrenSplitSeparation:20,partnerNodeSeparation:15,columns:10,padding:30,orientation:OrgChart.orientation.top,layout:OrgChart.layout.normal,layoutGridColumns:"dynamic",scaleInitial:OrgChart.match.boundaryIfOutside,movable:null,scaleMin:.1,scaleMax:5,orderBy:null,editUI:null,aiUI:null,orgScribeUI:null,powerPointPreviewUI:null,pdfPreviewUI:null,svgPreviewUI:null,pngPreviewUI:null,filterUI:null,searchUI:null,xScrollUI:null,yScrollUI:null,nodeMenuUI:null,controlsUI:null,nodeCircleMenuUI:null,nodeContextMenuUI:null,toolbarUI:null,notifierUI:null,menuUI:null,undoRedoUI:null,exportUrl:"https://balkan.app/export",serverUrl:"https://serverjs.balkan.app",aiChatTools:[],collapse:{},expand:{},align:OrgChart.CENTER,UI:null,anim:{func:OrgChart.anim.outPow,duration:200},zoom:{speed:120,smooth:12},roots:null,state:null,editForm:{readOnly:!1,titleBinding:"name",photoBinding:"img",addMore:"Add more fields",addMoreBtn:"Add",addMoreFieldName:"Field name",saveAndCloseBtn:"Save and close",generateElementsFromFields:!0,focusBinding:null,buttons:{edit:{icon:OrgChart.icon.edit(24,24,"#fff"),text:"Edit",hideIfEditMode:!0,hideIfDetailsMode:!1},share:{icon:OrgChart.icon.share(24,24,"#fff"),text:"Share"},pdf:{icon:OrgChart.icon.pdf(24,24,"#fff"),text:"Save as PDF"},remove:{icon:OrgChart.icon.remove(24,24,"#fff"),text:"Remove",hideIfDetailsMode:!0}},elements:[]}}},OrgChart.localStorage={},OrgChart.localStorage.getItem=function(e){var i=localStorage.getItem("to_date");if(i){if((i=new Date(i))<new Date){for(var o=0,a=localStorage.length;o<a;++o){var s=localStorage.key(o);s&&s.startsWith&&s.startsWith('{"n"')&&localStorage.removeItem(s)}localStorage.removeItem("to_date")}}else(i=new Date).setDate(i.getDate()+5),i=i.toISOString(),localStorage.setItem("to_date",i);return localStorage.getItem(e)},OrgChart.localStorage.setItem=function(e,o){try{localStorage.setItem(e,o)}catch(i){i.code==i.QUOTA_EXCEEDED_ERR?(console.warn("Local storage quota exceeded"),localStorage.clear()):(console.error("Local storage error code:"+i.code),console.error(i))}},OrgChart.prototype.canUpdateLink=function(e,i){if(null==i||null==i)return!1;if(null==e||null==e)return!1;if(e==i)return!1;var o=this.getNode(i),a=this.getNode(e);return!(o&&a&&(o.isPartner||o.hasPartners&&a.isAssistant||o.hasAssistants&&a.isPartner))&&!this.isChild(e,i)},OrgChart.prototype._canUpdateLink=OrgChart.prototype.canUpdateLink,OrgChart.prototype.updateNode=function(e,i,o,a){if(e){var s=this,l=this.get(e.id);if(!0===o&&!1===OrgChart.events.publish("update",[this,l,e]))return!1;this.update(e),this._ai.setContext(),OrgChart.events.publish("updated",[this]),this.filterUI.update();var c=this.getNode(e.id),d=c.pid;null==d&&(d=c.stpid),this._draw(!1,OrgChart.action.update,{id:d},function(){a||s.ripple(e.id),i&&i()})}},OrgChart.prototype.update=function(e){for(var i=0;i<this.config.nodes.length;i++)if(this.config.nodes[i].id==e.id){this._putInUndoStack(),this.clearRedo(),this.config.nodes[i]=e;break}return this},OrgChart.prototype.removeNode=function(e,i,o){if(!this.canRemove(e))return!1;var a=this._getNewPidsAndStpidsForIds(e);return(!0!==o||!1!==OrgChart.events.publish("remove",[this,e,a]))&&(this.remove(e),this._ai.setContext(),OrgChart.events.publish("updated",[this]),this.filterUI.update(),this._draw(!1,OrgChart.action.update,null,function(){i&&i()}),!0)},OrgChart.prototype.remove=function(e){var i=this.get(e);if(i){this._putInUndoStack(),this.clearRedo();for(var o=this.config.nodes.length-1;o>=0;o--)this.config.nodes[o].pid!=e&&this.config.nodes[o].stpid!=e||(this.config.nodes[o].pid=i.pid,this.config.nodes[o].stpid=i.stpid),this.config.nodes[o].id==e&&this.config.nodes.splice(o,1)}return this},OrgChart.prototype._getNewPidsAndStpidsForIds=function(e){var i=this.get(e),o={},a={};if(i)for(var s=this.config.nodes.length-1;s>=0;s--)this.config.nodes[s].pid==e?o[this.config.nodes[s].id]=i.pid:this.config.nodes[s].stpid==e&&(a[this.config.nodes[s].id]=i.stpid);return{newPidsForIds:o,newStpidsForIds:a}},OrgChart.prototype.addNode=function(e,i,o){var a=this;if(!0===o&&!1===OrgChart.events.publish("add",[this,e]))return!1;this.add(e),this._ai.setContext(),OrgChart.events.publish("updated",[this]),this.filterUI.update(),a._draw(!1,OrgChart.action.insert,{id:e.pid,insertedNodeId:e.id},function(){a.ripple(e.id),i&&i()})},OrgChart.prototype.add=function(e){if(null==e.id&&console.error("Call addNode without id"),this._putInUndoStack(),this.clearRedo(),this.config.movable&&!OrgChart.isNEU(e.pid)){var i=this._get(e.pid);i&&(null!=i.movex&&(e.movex=i.movex),null!=i.movey&&(e.movey=i.movey))}return this.config.nodes.push(e),this},OrgChart.prototype.replaceIds=function(e,i){this._replaceIds(e),this._draw(!1,OrgChart.action.update,void 0,i)},OrgChart.prototype._replaceIds=function(e){for(var replaceSecondLinksIds=function(i){for(var o=0;o<i.length;o++){var a=i[o];for(var s in e){var l=e[s];a.from==s&&(a.from=l),a.to==s&&(a.to=l)}}},i=0;i<this.config.nodes.length;i++){var o=this.config.nodes[i];for(var a in e){var s=e[a];o.id==a&&(o.id=s),o.pid==a&&(o.pid=s),o.stpid==a&&(o.stpid=s),o.ppid==a&&(o.ppid=s)}}if(Array.isArray(this.config.roots))for(i=0;i<this.config.roots.length;i++)OrgChart.isNEU(e[this.config.roots[i]])||(this.config.roots[i]=e[this.config.roots[i]]);if(this.nodes)for(var l in this.nodes)if(!OrgChart.isNEU(e[l])){s=e[l];(c=this.nodes[l]).id=s,this.nodes[s]=c}if(this.manager.oldNodes)for(var l in this.manager.oldNodes)if(!OrgChart.isNEU(e[l])){s=e[l];(c=this.manager.oldNodes[l]).id=s,this.manager.oldNodes[s]=c}if(this.roots)for(var l in this.roots)if(!OrgChart.isNEU(e[l])){var c;s=e[l];(c=this.roots[l]).id=s,this.roots[s]=c}replaceSecondLinksIds(this.config.clinks),replaceSecondLinksIds(this.config.slinks),replaceSecondLinksIds(this.config.groupDottedLines),replaceSecondLinksIds(this.config.dottedLines)},OrgChart.prototype._get=function(e){var i=this.__get(e);if(i)return i;if((this.config.groupDottedLines.length||this.config.dottedLines.length)&&!OrgChart.isNEU(e)&&"string"==typeof e&&(-1!=e.indexOf("balkan_group_dotted_")||-1!=e.indexOf("balkan_dotted_"))){var o=(e=(e=e.replace("balkan_group_dotted_","")).replace("balkan_dotted_","")).indexOf("_balkan_id_");if(e=e.substring(o+11),i=this.__get(e))return i}return null},OrgChart.prototype.__get=function(e){for(var i=0;i<this.config.nodes.length;i++)if(this.config.nodes[i].id==e)return this.config.nodes[i];return null},OrgChart.prototype.get=function(e){var i=this._get(e);return null==i?null:JSON.parse(JSON.stringify(i))},OrgChart.prototype.canRemove=function(e){var i=this.getNode(e);return!!i&&(!i.hasPartners&&!i.hasAssistants)},void 0===OrgChart&&(OrgChart={}),OrgChart._ajax=function(e,i,o,a,s){null==a&&(a="arraybuffer");var l=new XMLHttpRequest;for(var c in l.onload=function(e){4==l.readyState&&200===this.status&&(null==e.target?s(this.response):s(e.target.response))},l.onerror=function(e){s({error:e})},l.open(i,e),l.responseType=a,l.setRequestHeader("Content-Type","application/json"),OrgChart.REQUEST_CUSTOM_HEADERS)l.setRequestHeader(c,OrgChart.REQUEST_CUSTOM_HEADERS[c]);null==o?l.send():l.send(o)},void 0===OrgChart&&(OrgChart={}),OrgChart.animate=function(e,i,o,a,s,l,c){var d,h=10,p=1,u=a/h+1;return document.getElementsByTagName("g"),Array.isArray(e)||(e=[e]),Array.isArray(i)||(i=[i]),Array.isArray(o)||(o=[o]),d=setInterval(function(){for(var f=0;f<e.length;f++)for(var g in o[f]){var m=OrgChart._arrayContains(["top","left","right","bottom","width","height"],g.toLowerCase())?"px":"";switch(g.toLowerCase()){case"d":var b=s((p*h-h)/a)*(o[f][g][0]-i[f][g][0])+i[f][g][0],x=s((p*h-h)/a)*(o[f][g][1]-i[f][g][1])+i[f][g][1];e[f].setAttribute("d",e[f].getAttribute("d")+" L"+b+" "+x);break;case"r":var v=s((p*h-h)/a)*(o[f][g]-i[f][g])+i[f][g];e[f].setAttribute("r",v);break;case"x1":v=s((p*h-h)/a)*(o[f][g]-i[f][g])+i[f][g];e[f].setAttribute("x1",v);break;case"x2":v=s((p*h-h)/a)*(o[f][g]-i[f][g])+i[f][g];e[f].setAttribute("x2",v);break;case"y1":v=s((p*h-h)/a)*(o[f][g]-i[f][g])+i[f][g];e[f].setAttribute("y1",v);break;case"y2":v=s((p*h-h)/a)*(o[f][g]-i[f][g])+i[f][g];e[f].setAttribute("y2",v);break;case"scrolltop":v=s((p*h-h)/a)*(o[f][g]-i[f][g])+i[f][g];e[f].scrollTop=v;break;case"rotate3d":if(o[f][g]){var y=i[f][g],_=o[f][g],w=[0,0,0,0];for(var k in y)w[k]=s((p*h-h)/a)*(_[k]-y[k])+y[k];e[f].style.transform="rotate3d("+w.toString()+"deg)"}break;case"transform":if(o[f][g]){y=i[f][g],_=o[f][g],w=[0,0,0,0,0,0];for(var k in y)w[k]=s((p*h-h)/a)*(_[k]-y[k])+y[k];e[f].hasAttribute("transform")?e[f].setAttribute("transform","matrix("+w.toString()+")"):e[f].style.transform="matrix("+w.toString()+")"}break;case"viewbox":if(o[f][g]){y=i[f][g],_=o[f][g],w=[0,0,0,0];for(var k in y)w[k]=s((p*h-h)/a)*(_[k]-y[k])+y[k];e[f].setAttribute("viewBox",w.toString())}break;case"margin":if(o[f][g]){y=i[f][g],_=o[f][g],w=[0,0,0,0];for(var k in y)w[k]=s((p*h-h)/a)*(_[k]-y[k])+y[k];var I="";for(k=0;k<w.length;k++)I+=parseInt(w[k])+"px ";e[f]&&e[f].style&&(e[f].style[g]=I)}break;case"scrolly":v=s((p*h-h)/a)*(o[f][g]-i[f][g])+i[f][g];e[f].scrollTo(0,v);break;default:v=s((p*h-h)/a)*(o[f][g]-i[f][g])+i[f][g];e[f]&&e[f].style&&(e[f].style[g]=v+m)}}if(c){v=s((p*h-h)/a);c(v)}(p+=1)>u+1&&(clearInterval(d),l&&l(e))},h)},OrgChart.anim={},OrgChart.anim.inPow=function(e){return e<0?0:e>1?1:Math.pow(e,2)},OrgChart.anim.outPow=function(e){if(e<0)return 0;if(e>1)return 1;return-1*(Math.pow(e-1,2)+-1)},OrgChart.anim.inOutPow=function(e){if(e<0)return 0;if(e>1)return 1;if((e*=2)<1)return OrgChart.anim.inPow(e,2)/2;return-.5*(Math.pow(e-2,2)+-2)},OrgChart.anim.inSin=function(e){return e<0?0:e>1?1:1-Math.cos(e*(Math.PI/2))},OrgChart.anim.outSin=function(e){return e<0?0:e>1?1:Math.sin(e*(Math.PI/2))},OrgChart.anim.inOutSin=function(e){return e<0?0:e>1?1:-.5*(Math.cos(Math.PI*e)-1)},OrgChart.anim.inExp=function(e){return e<0?0:e>1?1:Math.pow(2,10*(e-1))},OrgChart.anim.outExp=function(e){return e<0?0:e>1?1:1-Math.pow(2,-10*e)},OrgChart.anim.inOutExp=function(e){return e<0?0:e>1?1:e<.5?.5*Math.pow(2,10*(2*e-1)):.5*(2-Math.pow(2,10*(-2*e+1)))},OrgChart.anim.inCirc=function(e){return e<0?0:e>1?1:-(Math.sqrt(1-e*e)-1)},OrgChart.anim.outCirc=function(e){return e<0?0:e>1?1:Math.sqrt(1-(e-1)*(e-1))},OrgChart.anim.inOutCirc=function(e){return e<0?0:e>1?1:e<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(2*e-2)*(2*e-2))+1)},OrgChart.anim.rebound=function(e){return e<0?0:e>1?1:e<1/2.75?1-7.5625*e*e:e<2/2.75?1-(7.5625*(e-1.5/2.75)*(e-1.5/2.75)+.75):e<2.5/2.75?1-(7.5625*(e-2.25/2.75)*(e-2.25/2.75)+.9375):1-(7.5625*(e-2.625/2.75)*(e-2.625/2.75)+.984375)},OrgChart.anim.inBack=function(e){return e<0?0:e>1?1:e*e*(2.70158*e-1.70158)},OrgChart.anim.outBack=function(e){return e<0?0:e>1?1:(e-1)*(e-1)*(2.70158*(e-1)+1.70158)+1},OrgChart.anim.inOutBack=function(e){return e<0?0:e>1?1:e<.5?4*e*e*(7.1898*e-2.5949)*.5:.5*((2*e-2)*(2*e-2)*(3.5949*(2*e-2)+2.5949)+2)},OrgChart.anim.impulse=function(e){var i=2*e;return i*Math.exp(1-i)},OrgChart.anim.expPulse=function(e){return Math.exp(-2*Math.pow(e,2))},void 0===OrgChart&&(OrgChart={}),OrgChart.prototype._attachEventHandlers=function(e){if(this.config.interactive){e=this.getSvg();var i=this;e.addEventListener("touchstart",function(e){e.preventDefault(),i._globalMouseDownHandler.apply(i,[this,e])},{passive:!1}),e.addEventListener("mousedown",function(e){i._globalMouseDownHandler.apply(i,[this,e])},{passive:!0}),e.addEventListener("contextmenu",function(e){i._globalContextHandler.apply(i,[this,e])},{passive:!1}),e.addEventListener("dblclick",function(e){i._globalDbClickHandler.apply(i,[this,e])},{passive:!0}),this.config.mouseScrool!=OrgChart.action.none&&e.addEventListener("wheel",function(e){i._mouseScrollHandler.apply(i,[this,e])},{passive:!1});var o=this.getMenuButton();o&&o.addEventListener("click",function(e){i._menuClickHandler.apply(i,[this,e])})}},void 0===OrgChart&&(OrgChart={}),OrgChart.VERSION="9.1.74",OrgChart.orientation={},OrgChart.orientation.top=0,OrgChart.orientation.bottom=1,OrgChart.orientation.right=2,OrgChart.orientation.left=3,OrgChart.orientation.top_left=4,OrgChart.orientation.bottom_left=5,OrgChart.orientation.right_top=6,OrgChart.orientation.left_top=7,OrgChart.anchor={top_right:"top_right",right_top:"right_top",bottom_right:"bottom_right",right_bottom:"right_bottom",top_left:"top_left",left_top:"left_top",bottom_left:"bottom_left",left_bottom:"left_bottom",top:"top",bottom:"bottom",left:"left",right:"right"},OrgChart.align={},OrgChart.align.center=OrgChart.CENTER=8,OrgChart.align.orientation=OrgChart.ORIENTATION=9,OrgChart.attr={},OrgChart.attr.l="data-l",OrgChart.attr.id="data-id",OrgChart.attr.sl="data-sl",OrgChart.attr.lbl="data-lbl",OrgChart.attr.val="data-val",OrgChart.attr.tlbr="data-tlbr",OrgChart.attr.item="data-item",OrgChart.attr.layout="data-layout",OrgChart.attr.node_id="data-n-id",OrgChart.attr.link_id="data-l-id",OrgChart.attr.field_name="data-f-name",OrgChart.attr.c_link_to="data-c-l-to",OrgChart.attr.c_link_from="data-c-l-from",OrgChart.attr.s_link_to="data-s-l-to",OrgChart.attr.s_link_from="data-s-l-from",OrgChart.attr.control_add="data-ctrl-add",OrgChart.attr.control_expcoll_id="data-ctrl-ec-id",OrgChart.attr.control_up_id="data-ctrl-up-id",OrgChart.attr.control_export_menu="data-ctrl-menu",OrgChart.attr.control_node_menu_id="data-ctrl-n-menu-id",OrgChart.attr.control_node_circle_menu_id="data-ctrl-n-c-menu-id",OrgChart.attr.control_node_circle_menu_name="data-ctrl-n-c-menu-name",OrgChart.attr.control_node_circle_menu_wrraper_id="data-ctrl-n-c-menu-wrapper-id",OrgChart.attr.width="data-width",OrgChart.attr.text_overflow="data-text-overflow",OrgChart.ID="id",OrgChart.PID="pid",OrgChart.STPID="stpid",OrgChart.TAGS="tags",OrgChart.NODES="nodes",OrgChart.ELASTIC="elastic",OrgChart.ASSISTANT="Assistant",OrgChart.action={},OrgChart.action.expand=0,OrgChart.action.collapse=1,OrgChart.action.maximize=101,OrgChart.action.minimize=102,OrgChart.action.expandCollapse=501,OrgChart.action.edit=1,OrgChart.action.zoom=2,OrgChart.action.ctrlZoom=22,OrgChart.action.scroll=41,OrgChart.action.xScroll=3,OrgChart.action.yScroll=4,OrgChart.action.none=5,OrgChart.action.init=6,OrgChart.action.update=7,OrgChart.action.move=70,OrgChart.action.pan=8,OrgChart.action.centerNode=9,OrgChart.action.resize=10,OrgChart.action.insert=11,OrgChart.action.insertfirst=12,OrgChart.action.details=13,OrgChart.action.exporting=14,OrgChart.none=400001,OrgChart.scroll={},OrgChart.scroll.visible=!0,OrgChart.scroll.smooth=12,OrgChart.scroll.speed=120,OrgChart.scroll.safari={smooth:12,speed:250},OrgChart.match={},OrgChart.match.height=100001,OrgChart.match.width=100002,OrgChart.match.boundary=100003,OrgChart.match.boundaryIfOutside=100004,OrgChart.match.none=1,OrgChart.movable={},OrgChart.movable.node="node",OrgChart.movable.tree="tree",OrgChart.movable.detachTree="detachTree",OrgChart.layout={},OrgChart.layout.normal=OrgChart.normal=0,OrgChart.layout.mixed=OrgChart.mixed=1,OrgChart.layout.tree=OrgChart.tree=2,OrgChart.layout.treeLeftOffset=OrgChart.treeLeftOffset=3,OrgChart.layout.treeRightOffset=OrgChart.treeRightOffset=4,OrgChart.layout.treeLeft=5,OrgChart.layout.treeRight=6,OrgChart.layout.grid=-1,OrgChart.layout.treeList=-2,OrgChart.nodeOpenTag="<g "+OrgChart.attr.node_id+'="{id}" style="opacity: {opacity}" transform="matrix(1,0,0,1,{x},{y})" class="{class}" '+OrgChart.attr.sl+'="{sl}" '+OrgChart.attr.l+'="{level}" {lcn}>',OrgChart.linkOpenTag="<g "+OrgChart.attr.link_id+'="[{id}][{child-id}]" class="{class}">',OrgChart.expcollOpenTag="<g "+OrgChart.attr.control_expcoll_id+'="{id}" transform="matrix(1,0,0,1,{x},{y})" style="cursor:pointer;">',OrgChart.upOpenTag="<g "+OrgChart.attr.control_up_id+'="{id}" transform="matrix(1,0,0,1,{x},{y})" style="cursor:pointer;">',OrgChart.linkFieldsOpenTag='<g transform="matrix(1,0,0,1,{x},{y}) rotate({rotate})">',OrgChart.grCloseTag="</g>",OrgChart.A5={width:420,height:595},OrgChart.A4={width:595,height:842},OrgChart.A3={width:842,height:1191},OrgChart.A2={width:1191,height:1684},OrgChart.A1={width:1684,height:2384},OrgChart.Letter={width:612,height:791},OrgChart.Legal={width:612,height:1009},OrgChart.Legal={width:612,height:1009},OrgChart.Widescreen={width:720,height:1280},OrgChart.Standard={width:720,height:960},OrgChart.COLLAPSE_PARENT_NEIGHBORS=1,OrgChart.COLLAPSE_SUB_CHILDRENS=2,OrgChart.COLLAPSE_PARENT_SUB_CHILDREN_EXCEPT_CLICKED=3,OrgChart.TEXT_THRESHOLD=4e3,OrgChart.IMAGES_THRESHOLD=1e3,OrgChart.LINKS_THRESHOLD=2e3,OrgChart.BUTTONS_THRESHOLD=700,OrgChart.ANIM_THRESHOLD=500,OrgChart.IT_IS_LONELY_HERE='<g transform="translate(-100, 0)" style="cursor:pointer;" '+OrgChart.attr.control_add+'="control-add"><text fill="#039be5">{link}</text></g>',OrgChart.RES={},OrgChart.IT_IS_LONELY_HERE_LINK=OrgChart.RES.IT_IS_LONELY_HERE_LINK="It's lonely here, add your first node",OrgChart.FIRE_DRAG_NOT_CLICK_IF_MOVE=3,OrgChart.STRING_TAGS=!1,OrgChart.MAX_NODES_MESS="The trial has expired or 200 nodes limit was reached! <br /><a style='color: #039BE5;' target='_blank' href='https://balkan.app/OrgChartJS/Docs/Evaluation'>See more</a>",OrgChart.OFFLINE_MESS="The evaluation version requires internet connection! <br /><a style='color: #039BE5;' target='_blank' href='https://balkan.app/OrgChartJS/Docs/Evaluation'>See more</a>",OrgChart.SEARCH_PLACEHOLDER="Search... type ? to get help.",OrgChart.SEARCH_HELP_SYMBOL="?",OrgChart.SEARCH_CLOSE_RESULT_ON_ESCAPE_OR_CLICKOUTSIDE=!1,OrgChart.SEARCH_RESULT_LIMIT=10,OrgChart.IMPORT_MESSAGE="Choose the columns (fields) in your data file that contain the required information.",OrgChart.FIXED_POSITION_ON_CLICK=!1,OrgChart.RENDER_LINKS_BEFORE_NODES=!1,OrgChart.RENDER_CLINKS_BEFORE_NODES=!1,OrgChart.MIXED_LAYOUT_ALL_NODES=!1,OrgChart.MIXED_LAYOUT_FOR_NODES_WITH_COLLAPSED_CHILDREN=!1,OrgChart.MIXED_LAYOUT_IF_NUMBER_OF_CHILDREN_IS_MORE_THEN=1,OrgChart.LINK_ROUNDED_CORNERS=5,OrgChart.MOVE_STEP=5,OrgChart.CLINK_CURVE=1,OrgChart.MAX_DEPTH=200,OrgChart.SCALE_FACTOR=1.44,OrgChart.LAZY_LOADING_FACTOR="auto",OrgChart.LAZY_LOADING=!0,OrgChart.ARRAY_FIELDS=["tags"],OrgChart.CSV_DELIMITER=",",OrgChart.EDITFORM_CLOSE_BTN='<svg data-edit-from-close class="boc-edit-form-close"><path style="fill:#ffffff;" d="M21.205,5.007c-0.429-0.444-1.143-0.444-1.587,0c-0.429,0.429-0.429,1.143,0,1.571l8.047,8.047H1.111 C0.492,14.626,0,15.118,0,15.737c0,0.619,0.492,1.127,1.111,1.127h26.554l-8.047,8.032c-0.429,0.444-0.429,1.159,0,1.587 c0.444,0.444,1.159,0.444,1.587,0l9.952-9.952c0.444-0.429,0.444-1.143,0-1.571L21.205,5.007z"></path></svg>',OrgChart.ESCAPE_HTML=!1,OrgChart.VERTICAL_CHILDREN_ASSISTANT=!1,OrgChart.EXPORT_PAGES_CUT_NODES=!1,OrgChart.RESET_MOVABLE_ONEXPANDCOLLAPSE=!1,OrgChart.FILTER_ALPHABETICALLY=!0,OrgChart.SERVER_PREFIX=".azurewebsites.net/api/you-see-this-request-because-it-is-trial-version-of-orgchartjs",OrgChart.FUNC_URL_NAME="func-url-orgchartjs",OrgChart.MINIMUM_SYMBOLS_IN_SEARCH_INPUT=1,OrgChart.AI_SYSTEM_MESSAGES=[],OrgChart.ORGSCRIBE_OFFSET=" ",OrgChart.TREELIST_WHEEL_STEP="auto",OrgChart.TREELIST_SCROLLBAR_WIDTH=10,OrgChart.CONVERT_IMAGES_TO_BASE64_BEFORE_EXPORT=!1,OrgChart.REQUEST_CUSTOM_HEADERS={},OrgChart.SLINK_GAP=7,OrgChart._intersects=function(e,i,o){var a=e.x-o.siblingSeparation/4,s=e.y,l=e.x+e.w+o.siblingSeparation/4,c=e.y;switch(o.orientation){case OrgChart.orientation.right:case OrgChart.orientation.right_top:case OrgChart.orientation.left:case OrgChart.orientation.left_top:a=e.x,s=e.y-o.siblingSeparation/4,l=e.x,c=e.y+e.h+o.siblingSeparation/4}var d,h,p=i.p,u=i.q,f=i.r,g=i.s,m=(l-a)*(g-u)-(f-p)*(c-s);return 0!==m&&(d=((s-c)*(f-a)+(l-a)*(g-s))/m,0<(h=((g-u)*(f-a)+(p-f)*(g-s))/m)&&h<1&&0<d&&d<1)},OrgChart._addPoint=function(e,i,o,a,s){switch(o.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:return OrgChart._addPointTop(e,i,o,a,s);case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:return OrgChart._addPointBottom(e,i,o,a,s);case OrgChart.orientation.left:case OrgChart.orientation.left_top:return OrgChart._addPointLeft(e,i,o,a,s);case OrgChart.orientation.right:case OrgChart.orientation.right_top:return OrgChart._addPointRight(e,i,o,a,s)}},OrgChart._addPointTop=function(e,i,o,a,s){var l,c,d;return"left"==s?l=e.leftNeighbor?e.x+(e.leftNeighbor.x+e.leftNeighbor.w-e.x)/2:e.x-o.siblingSeparation/2:"right"==s&&(l=e.rightNeighbor?e.x+e.w+(e.rightNeighbor.x-(e.x+e.w))/2:e.x+e.w+o.siblingSeparation/2),i.push([l,i[i.length-1][1]]),i.push([l,e.y-o.levelSeparation/3]),c=i[i.length-1][1],d=l,a.p=l,a.q=c,a.r=d,a},OrgChart._addPointBottom=function(e,i,o,a,s){var l,c,d;return"left"==s?l=e.leftNeighbor?e.x+(e.leftNeighbor.x+e.leftNeighbor.w-e.x)/2:e.x-o.siblingSeparation/2:"right"==s&&(l=e.rightNeighbor?e.x+e.w+(e.rightNeighbor.x-(e.x+e.w))/2:e.x+e.w+o.siblingSeparation/2),i.push([l,i[i.length-1][1]]),i.push([l,e.y+e.h+o.levelSeparation/3]),c=i[i.length-1][1],d=l,a.p=l,a.q=c,a.r=d,a},OrgChart._addPointLeft=function(e,i,o,a,s){var l,c=i[i.length-1][0];"bottom"==s?l=e.rightNeighbor?e.y+e.h+(e.rightNeighbor.y-(e.y+e.h))/2:e.y+e.h+o.siblingSeparation/2:"top"==s&&(l=e.leftNeighbor?e.y+(e.leftNeighbor.y+e.leftNeighbor.h-e.y)/2:e.y-o.siblingSeparation/2),i.push([i[i.length-1][0],l]),i.push([e.x-o.levelSeparation/3,l]),c=i[i.length-1][0];var d=l;return a.p=c,a.q=l,a.s=d,a},OrgChart._addPointRight=function(e,i,o,a,s){var l,c=i[i.length-1][0];"bottom"==s?l=e.rightNeighbor?e.y+e.h+(e.rightNeighbor.y-(e.y+e.h))/2:e.y+e.h+o.siblingSeparation/2:"top"==s&&(l=e.leftNeighbor?e.y+(e.leftNeighbor.y+e.leftNeighbor.h-e.y)/2:e.y-o.siblingSeparation/2),i.push([i[i.length-1][0],l]),i.push([e.x+e.w+o.levelSeparation/3,l]),c=i[i.length-1][0];var d=l;return a.p=c,a.q=l,a.s=d,a},OrgChart._addConnectorLines=function(e,i){OrgChart._addConnectorLine(e,{x1:i.xa,y1:i.ya,x2:i.xb,y2:i.yb}),OrgChart._addConnectorLine(e,{x1:i.xb,y1:i.yb,x2:i.xc,y2:i.yc}),OrgChart._addConnectorLine(e,{x1:i.xc,y1:i.yc,x2:i.xd,y2:i.yd})},OrgChart._addConnectorLine=function(e,i){if(i.x1==i.x2){if(e.x[i.x1]||(e.x[i.x1]=[]),i.y1>i.y2){var o=i.y1;i.y1=i.y2,i.y2=o}e.x[i.x1].push({y1:i.y1,y2:i.y2})}if(i.y1==i.y2){if(e.y[i.y1]||(e.y[i.y1]=[]),i.x1>i.x2){var a=i.x1;i.x1=i.x2,i.x2=a}e.y[i.y1].push({x1:i.x1,x2:i.x2})}},OrgChart._addLineToPath=function(e,i,o){return OrgChart._avoidOverlapping(i,o),e.push([o.x1,o.y1]),e.push([o.x2,o.y2]),OrgChart._addConnectorLine(i,o),o},OrgChart._slinkRemoveUnusedPoints=function(e){for(var i=e.length-2;i>=1;i--){var o=e[i-1],a=e[i],s=e[i+1];(a[0]==o[0]&&a[0]==s[0]||a[1]==o[1]&&a[1]==s[1])&&e.splice(i,1)}},OrgChart._slinkAvoidOverlaping=function(e,i,o,a){for(var s=1;s<i.length;s++){var l=i[s-1],c=i[s];if(l[0]==c[0]){for(var d=e.x[c[0]];d;){var h=!0;for(var p of d)if(p.y1<=l[1]&&p.y2>=l[1]||p.y1<=c[1]&&p.y2>=c[1]){a==OrgChart.orientation.top||a==OrgChart.orientation.top_left?"left"==o?c[0]-=OrgChart.SLINK_GAP:"right"==o&&(c[0]+=OrgChart.SLINK_GAP):a!=OrgChart.orientation.bottom&&a!=OrgChart.orientation.bottom_left||("right"==o?c[0]+=OrgChart.SLINK_GAP:"left"==o&&(c[0]-=OrgChart.SLINK_GAP)),h=!1;break}if(h)break;d=e.x[c[0]]}l[0]=c[0]}var u=!0;if(l[1]==c[1]&&l[0]>=c[0]&&(u=!1),u&&l[1]==c[1]){for(d=e.y[c[1]];d;){h=!0;for(var p of d)if(p.x1<=l[0]&&p.x2>=l[0]||p.x1<=c[0]&&p.x2>=c[0]){l[0]>=c[0]||(a==OrgChart.orientation.top||a==OrgChart.orientation.top_left?c[1]-=OrgChart.SLINK_GAP:a!=OrgChart.orientation.bottom&&a!=OrgChart.orientation.bottom_left||(c[1]+=OrgChart.SLINK_GAP),h=!1);break}if(h)break;d=e.y[c[1]]}l[1]=c[1]}u&&OrgChart._addConnectorLine(e,{x1:l[0],y1:l[1],x2:c[0],y2:c[1]})}},OrgChart._slinkAvoidOverlapingSecond=function(e,i,o){for(var a=1;a<i.length;a++){var s=i[a-1],l=i[a],c=!1;if(s[1]==l[1]){for(var d=e.y[l[1]];d;){var h=!0;for(var p of d)if(p.x1<=s[0]&&p.x2>=s[0]||p.x1<=l[0]&&p.x2>=l[0]){s[0]>=l[0]?(o==OrgChart.orientation.top||o==OrgChart.orientation.top_left?l[1]-=OrgChart.SLINK_GAP:o!=OrgChart.orientation.bottom&&o!=OrgChart.orientation.bottom_left||(l[1]+=OrgChart.SLINK_GAP),h=!1):c=!0;break}if(h)break;d=e.y[l[1]]}s[1]=l[1]}c||OrgChart._addConnectorLine(e,{x1:s[0],y1:s[1],x2:l[0],y2:l[1]})}},OrgChart._slinkAvoidOverlaping2=function(e,i,o,a){for(var s=1;s<i.length;s++){var l=i[s-1],c=i[s];if(l[1]==c[1]){for(var d=e.y[c[1]];d;){var h=!0;for(var p of d)if(p.x1<=l[0]&&p.x2>=l[0]||p.x1<=c[0]&&p.x2>=c[0]){a==OrgChart.orientation.left||a==OrgChart.orientation.left_top?"top"==o?c[1]-=OrgChart.SLINK_GAP:"bottom"==o&&(c[1]+=OrgChart.SLINK_GAP):a!=OrgChart.orientation.right&&a!=OrgChart.orientation.right_top||("bottom"==o?c[1]+=OrgChart.SLINK_GAP:"top"==o&&(c[1]-=OrgChart.SLINK_GAP)),h=!1;break}if(h)break;d=e.y[c[1]]}l[1]=c[1]}var u=!0;if(l[0]==c[0]&&l[1]>=c[1]&&(u=!1),u&&l[0]==c[0]){for(d=e.x[c[0]];d;){h=!0;for(var p of d)if(p.y1<=l[1]&&p.y2>=l[1]||p.y1<=c[1]&&p.y2>=c[1]){l[1]>=c[1]||(a==OrgChart.orientation.left||a==OrgChart.orientation.left_top?c[0]-=OrgChart.SLINK_GAP:a!=OrgChart.orientation.right&&a!=OrgChart.orientation.right_top||(c[0]+=OrgChart.SLINK_GAP),h=!1);break}if(h)break;d=e.x[c[0]]}l[0]=c[0]}u&&OrgChart._addConnectorLine(e,{x1:l[0],y1:l[1],x2:c[0],y2:c[1]})}},OrgChart._slinkAvoidOverlapingSecond2=function(e,i,o){for(var a=1;a<i.length;a++){var s=i[a-1],l=i[a],c=!1;if(s[0]==l[0]){for(var d=e.x[l[0]];d;){var h=!0;for(var p of d)if(p.y1<=s[1]&&p.y2>=s[1]||p.y1<=l[1]&&p.y2>=l[1]){s[1]>=l[1]?(o==OrgChart.orientation.left||o==OrgChart.orientation.left_top?l[0]-=OrgChart.SLINK_GAP:o!=OrgChart.orientation.right&&o!=OrgChart.orientation.right_top||(l[0]+=OrgChart.SLINK_GAP),h=!1):c=!0;break}if(h)break;d=e.x[l[0]]}s[0]=l[0]}c||OrgChart._addConnectorLine(e,{x1:s[0],y1:s[1],x2:l[0],y2:l[1]})}},OrgChart.editUI=function(){},OrgChart.editUI.prototype.init=function(e){this.obj=e,this.fields=null,this.nodeId=null,this.detailsMode=null,this._event_id=OrgChart._guid()},OrgChart.editUI.prototype.on=function(e,i){return OrgChart.events.on(e,i,this._event_id),this},OrgChart.editUI.prototype.show=function(e,i,o){if(this.hide(!0)){if(this.nodeId=e,this.detailsMode=i,!1===OrgChart.events.publish("show",[this,e]))return!1;var a=this,s=this.content(e,i,o);this.obj.element.appendChild(s.element),OrgChart.input.init(this.obj.element),OrgChart.events.publish("shown",[this,{nodeId:e}]),o?i||this._focusElement(s.focusId):this.interval=OrgChart.animate(s.element,{right:-20,opacity:0},{right:0,opacity:1},300,OrgChart.anim.outSin,function(){i||a._focusElement(s.focusId)}),this.obj.element.querySelector("[data-edit-from-close]").addEventListener("click",function(i){i.preventDefault(),!1!==OrgChart.events.publish("cancel",[a,{id:e}])&&a.hide()}),this.obj.element.querySelector("[data-edit-from-save]").addEventListener("click",function(e){e.preventDefault(),a.hide()});for(var l=this.obj.element.querySelectorAll("[data-input-btn]"),c=0;c<l.length;c++)l[c].addEventListener("click",function(i){i.preventDefault(),OrgChart.events.publish("element-btn-click",[a,{input:this.parentNode.querySelector("input"),nodeId:e,event:i}])});this.obj.element.querySelector("[data-add-more-fields-btn]").addEventListener("click",function(e){e.stopPropagation(),e.preventDefault();var i=this,o=OrgChart.elements.textbox({},{type:"textbox",label:a.obj.config.editForm.addMoreFieldName,btn:a.obj.config.editForm.addMoreBtn},"280px");i.parentNode.insertAdjacentHTML("beforebegin",o.html),i.style.display="none",OrgChart.input.init(i.parentNode.previousSibling);var s=document.getElementById(o.id);s.focus(),s.nextElementSibling.addEventListener("click",function(e){e.stopPropagation(),e.preventDefault();var o=s.value,l=a.obj.element.querySelector('[data-binding="'+OrgChart._escapeDoubleQuotes(s.value)+'"]');if(OrgChart.isNEU(o)||l)s.focus();else{var c=OrgChart.elements.textbox({},{type:"textbox",label:o,binding:o},"280px");s.parentNode.parentNode.parentNode.removeChild(s.parentNode.parentNode),i.parentNode.insertAdjacentHTML("beforebegin",c.html),i.style.display="",OrgChart.input.init(i.parentNode.previousSibling);var d=document.getElementById(c.id);d.focus(),d.addEventListener("input",function(){a._drawCurrentNodeElement()})}})}),this.obj.element.querySelector("[data-boc-edit-from-btns]").addEventListener("click",function(i){for(var o=i.target;o&&o.hasAttribute&&!o.hasAttribute("data-edit-from-btn");)o=o.parentNode;if(o&&o.hasAttribute){var s=o.getAttribute("data-edit-from-btn"),l={button:a.obj.config.editForm.buttons[s],name:s,nodeId:e,event:i};if(!1===OrgChart.events.publish("button-click",[a,l]))return!1;switch(s){case"edit":a.obj.editUI.show(e,!1,!0);break;case"pdf":a.obj.exportToPDFProfile(e),a.hide();break;case"share":a.obj.shareProfile(e);break;case"remove":a.obj.removeNode(e,null,!0),a.hide()}}});var d=this.obj.element.querySelectorAll("[data-boc-edit-form] [data-binding]");for(c=0;c<d.length;c++){var h=d[c];h.getAttribute("data-binding")&&h.addEventListener("input",function(){a._drawCurrentNodeElement()})}}},OrgChart.editUI.prototype._drawCurrentNodeElement=function(){var e=this.obj.element.querySelector("[data-boc-edit-form]"),i=OrgChart.input.getData(e),o=this.obj.get(this.nodeId),a=this.obj.getNode(this.nodeId),s=OrgChart.mergeDeep(o,i),l=this.obj.ui.node(a,s,[],this.obj.config,void 0,void 0,void 0,void 0,this.obj.getScale(),this.obj);this._replaceNodeWith(l)},OrgChart.editUI.prototype._replaceNodeWith=function(e){var i=document.createElementNS("http://www.w3.org/2000/svg","g");i.innerHTML=e;var o=i.firstElementChild;this.obj.getNodeElement(this.nodeId).replaceWith(o)},OrgChart.editUI.prototype.setAvatar=function(e){var i=this.obj.element.querySelector('[id="boc-avatar"]'),o=this.obj.element.querySelector('[id="boc-avatar"] img'),a=this.obj.element.querySelector('[id="boc-avatar"] svg');i&&(o?o.setAttribute("src",e):a&&(i.innerHTML=`<img style="width: 100%;height:100%;border-radius: 50%;object-fit:cover;" src="${e}">`),this._drawCurrentNodeElement())},OrgChart.editUI.prototype.save=function(e){var i=this.obj.element.querySelector("[data-boc-edit-form]"),o=OrgChart.input.validateAndGetData(i);if(!1!==o){var a=this.obj.get(this.nodeId),s={data:OrgChart.mergeDeep(a,o)};if(!1===OrgChart.events.publish("save",[this,s]))return;return this.obj.updateNode(s.data,null,!0,e),!0}return!1},OrgChart.editUI.prototype._focusElement=function(e){var i=null;OrgChart.isNEU(this.obj.config.editForm.focusBinding)?OrgChart.isNEU(e)||(i=document.getElementById(e)):i=this.obj.element.querySelector('[data-binding="'+this.obj.config.editForm.focusBinding+'"]'),i&&(i.value&&i.value.length&&i.setSelectionRange(i.value.length,i.value.length),i.focus())},OrgChart.editUI.prototype.content=function(e,i,o,a,s){var l,c=this.obj.config.editForm.readOnly,d=JSON.parse(JSON.stringify(this.obj.config.editForm.elements)),h=this.obj.config.editForm.addMore,p=this.obj.config.editForm.saveAndCloseBtn,u=this.obj.config.editForm.buttons,f=this.obj.config.editForm.titleBinding,g=this.obj.config.editForm.photoBinding,m=this.obj.getNode(e),b=this.obj._get(e),x=OrgChart.t(m.templateName,m.min,this.obj.getScale()),v=b[f],y=b[g];if(this.obj.config.editForm.generateElementsFromFields)for(var _=0;_<this.fields.length;_++){var w=this.fields[_];if("tags"!=w){for(var k=!1,I=0;I<d.length;I++){if(Array.isArray(d[I])){for(var S=0;S<d[I].length;S++)if(w==d[I][S].binding){k=!0;break}}else if(w==d[I].binding){k=!0;break}if(k)break}k||d.push({type:"textbox",label:w,binding:w})}}OrgChart.isNEU(v)&&(v=""),y=OrgChart.isNEU(y)?OrgChart.icon.user(150,150,"#8C8C8C",0,0):`<img style="width: 100%;height:100%;border-radius: 50%;object-fit:cover;" src="${y}"></img>`;var C=!i,L=i?"display:none;":"",A=i||!h?"display:none;":"",E=x.editFormHeaderColor?`style="background-color:${x.editFormHeaderColor};"`:"",N=document.createElement("form");if(N.setAttribute("data-boc-edit-form",""),N.classList.add("boc-edit-form"),N.classList.add(this.obj.config.mode),N.classList.add(m.templateName.replaceAll(" ","")),N.classList.add(OrgChart.ui._defsIds[m.templateName]),Array.isArray(m.tags)&&m.tags.length)for(_=0;_<m.tags.length;_++)N.classList.add(m.tags[_].replaceAll(" ",""));N.style.display="flex",N.style.opacity=o?1:0,N.style.right=o?0:"-20px",a&&(N.style.width=a);var $=[];return N.innerHTML=`<div>\n <div class="boc-edit-form-header" ${E}>\n ${s?"":OrgChart.EDITFORM_CLOSE_BTN}\n ${OrgChart.editUI.renderHeaderContent(v,y,m,b)}\n </div>\n <div data-boc-edit-from-btns class="boc-edit-form-instruments">\n ${function(){if(s)return"";var e="";for(var o in u){var a=u[o];OrgChart.isNEU(a)||(C&&a.hideIfEditMode||i&&a.hideIfDetailsMode||c&&"Edit"==a.text||(e+=`<div data-edit-from-btn='${o}' class="boc-img-button" ${E} title="${a.text}">${a.icon}</div>`))}return e}()} \n </div>\n </div>\n <div class="boc-edit-form-fields">\n <div class="boc-edit-form-fields-inner">\n <div class="boc-form-fieldset">\n ${function(){for(var e="",o=0;o<d.length;o++){var a=d[o];if(Array.isArray(a)){e+='<div class="boc-form-field-100 boc-form-fieldset">';for(var s=0;s<a.length;s++){var c=a[s],h=OrgChart.elements[c.type](b,c,"unset",i);!OrgChart.isNEU(h.id)&&OrgChart.isNEU(l)&&OrgChart.isNEU(h.value)&&(l=h.id),OrgChart.isNEU(h.value)||$.push(`${c.label}: ${h.value}`),e+=h.html}e+="</div>"}else{h=OrgChart.elements[a.type](b,a,"280px",i);!OrgChart.isNEU(h.id)&&OrgChart.isNEU(l)&&OrgChart.isNEU(h.value)&&(l=h.id),OrgChart.isNEU(h.value)||$.push(`${a.label}: ${h.value}`),e+=h.html}}return e}()}\n\n <div class="boc-form-field" style="min-width: 280px; text-align:center; ${A}">\n <a data-add-more-fields-btn href="#" class="boc-link">${h}</a>\n </div>\n </div> \n </div>\n </div>\n <div class="boc-form-fieldset" style="padding: 14px 10px; ${L}">\n <div class="boc-form-field" style="min-width: initial;">\n <button type="submit" data-edit-from-save type="button" class="boc-button">${p}</button>\n </div>\n </div>`,{element:N,focusId:l,title:v,shareText:$.join("\n")}},OrgChart.editUI.prototype.hide=function(e){var i=this.obj.element.querySelector("[data-boc-edit-form]");if(i){if(!this.detailsMode&&!this.save(e))return;if(!1===OrgChart.events.publish("hide",[this]))return!1;OrgChart.isNEU(this.interval)&&(clearInterval(this.interval),this.interval=null),i.parentNode.removeChild(i),this.nodeId=null,this.detailsMode=null}return!0},OrgChart.editUI.renderHeaderContent=function(e,i,o,a){return`<h1 class="boc-edit-form-title">${OrgChart._escapeGreaterLessSign(e)}</h1>\n <div id="boc-avatar" class="boc-edit-form-avatar">${i}</div>`},OrgChart.prototype.getSvg=function(){return this.element.querySelector("svg")},OrgChart.prototype.getPointerElement=function(){return this.element.querySelector("g[data-pointer]")},OrgChart.prototype.getNodeElement=function(e){return this.element.querySelector("["+OrgChart.attr.node_id+"='"+e+"']")},OrgChart.prototype.getMenuButton=function(){return this.element.querySelector("["+OrgChart.attr.control_export_menu+"]")},OrgChart.menuUI=function(){},OrgChart.menuUI.prototype.init=function(e,i){this.obj=e,this.wrapper=null,this.menu=i,this._event_id=OrgChart._guid()},OrgChart.menuUI.prototype.showStickIn=function(e,i,o,a){this._show(e,null,i,o,a)},OrgChart.menuUI.prototype.show=function(e,i,o,a,s){this._show(e,i,o,a,s)},OrgChart.menuUI.prototype._show=function(e,i,o,a,s){var l=this;this.hide();var c="";s||(s=this.menu);var d={firstNodeId:o,secondNodeId:a,menu:s};if(!1===OrgChart.events.publish("show",[this,d]))return!1;for(var h in s=d.menu){var p=s[h].icon,u=s[h].text;void 0===p&&(p=OrgChart.icon[h]?OrgChart.icon[h](24,24,"#7A7A7A"):""),"function"==typeof u&&(u=u()),"function"==typeof p&&(p=p()),c+="<div "+OrgChart.attr.item+'="'+h+'">'+p+"<span>&nbsp;&nbsp;"+u+"</span></div>"}if(""!=c){if(this.wrapper=document.createElement("div"),this.wrapper.className="boc-chart-menu",this.wrapper.style.left="-99999px",this.wrapper.style.top="-99999px",this.wrapper.innerHTML=c,this.obj.element.appendChild(this.wrapper),null==i){var f=OrgChart._menuPosition(e,this.wrapper,this.obj.getSvg());e=f.x,i=f.y}var g=e+45;this.wrapper.style.left=g+"px",this.wrapper.style.top=i+"px",this.wrapper.style.left=g-this.wrapper.offsetWidth+"px";var m=e-this.wrapper.offsetWidth;OrgChart.animate(this.wrapper,{opacity:0,left:g-this.wrapper.offsetWidth},{opacity:1,left:m},300,OrgChart.anim.inOutPow);for(var b=this.wrapper.getElementsByTagName("div"),x=0;x<b.length;x++){(h=b[x]).addEventListener("click",function(e){var i=this.getAttribute(OrgChart.attr.item),c=s[i].onClick;0!=OrgChart._onClickHandler(l.obj,i,c,o,a)&&l.hide()})}}},OrgChart.menuUI.prototype.isVisible=function(){return null!=this.wrapper},OrgChart.menuUI.prototype.hide=function(){null!=this.wrapper&&(this.obj.element.removeChild(this.wrapper),this.wrapper=null)},OrgChart.menuUI.prototype.on=function(e,i){return OrgChart.events.on(e,i,this._event_id),this},OrgChart.controlsUI=function(){},OrgChart.controlsUI.prototype.init=function(e){this.instance=e,this.elements={top_right:null,right_top:null,bottom_right:null,right_bottom:null,top_left:null,left_top:null,bottom_left:null,left_bottom:null,top:null,bottom:null,left:null,right:null},this.show()},OrgChart.controlsUI.prototype.show=function(){var e=this,clickHandler=function(i){for(var o=i.target;o&&o.hasAttribute&&!o.hasAttribute("data-control-id");)o=o.parentNode;if(o.hasAttribute&&o.hasAttribute("data-control-id")){var a=o.getAttribute("data-control-id"),s=e.instance.config.controls[a];OrgChart.isNEU(s.isOn)||(o.classList.contains("boc-control-selected")?o.classList.remove("boc-control-selected"):o.classList.add("boc-control-selected"));var l=s.onClick;OrgChart._onClickHandler(e.instance,a,l,void 0,void 0)}},i=this.instance.config.controls;if(i){this.hide();var o={top_right:"",right_top:"",bottom_right:"",right_bottom:"",top_left:"",left_top:"",bottom_left:"",left_bottom:"",top:"",bottom:"",left:"",right:""};for(var a in i){var s=i[a],l=s.icon;void 0===l&&(l=OrgChart.icon[a]?OrgChart.icon[a](32,32,"#7A7A7A"):OrgChart.icon.cursor(32,32,"#7A7A7A"));var c=s.title;c||(c=a);var d="";!0===s.isOn&&(d='class="boc-control-selected"');var h=`<div ${d} data-control-id="${a}" title="${c}">${l}</div>`;s.anchor||(s.anchor=OrgChart.anchor.bottom_right),o[s.anchor]+=h}for(var a in o)o[a]&&(this.elements[a]=document.createElement("div"),this.elements[a].className="boc-controls boc-controls-"+a,this.elements[a].innerHTML=o[a],this.elements[a].addEventListener("click",clickHandler),this.instance.element.appendChild(this.elements[a]))}},OrgChart.controlsUI.prototype.hide=function(){for(var e in this.elements)if(this.elements[e]){var i=this.elements[e];i.parentNode.removeChild(i)}},OrgChart.circleMenuUI=function(){},OrgChart.circleMenuUI.prototype.init=function(e,i){this.obj=e,this.menu=i,this._menu=null,this._buttonsInterval=[],this._linesInterval=[],this._event_id=OrgChart._guid()},OrgChart.circleMenuUI.prototype.show=function(e,i){this._show(e,i)},OrgChart.circleMenuUI.prototype.isVisible=function(){return null!==this.obj.element.querySelector("["+OrgChart.attr.control_node_circle_menu_wrraper_id+"]")},OrgChart.circleMenuUI.prototype._show=function(e,i){var o=this,a=this.obj.getNode(e),s=OrgChart.t(a.templateName,a.min,this.obj.getScale());if(!OrgChart.isNEU(s.nodeCircleMenuButton)){var l=this.obj.getSvg(),c=this.obj.element.querySelector("["+OrgChart.attr.control_node_circle_menu_id+'="'+e+'"]'),d=this.obj.getNodeElement(e),h=OrgChart._getTransform(c),p=OrgChart._getTransform(d),u=h[4]+p[4],f=h[5]+p[5],g=c.querySelectorAll("line"),m=this.obj.element.querySelector("["+OrgChart.attr.control_node_circle_menu_wrraper_id+"]");if(OrgChart.isNEU(m)||m.getAttribute(OrgChart.attr.control_node_circle_menu_wrraper_id)!=e){this.hide(),i||(i=this.menu);var b={nodeId:e,menu:i},x=OrgChart.events.publish("show",[this,b]);if(this._menu=i,!1===x)return!1;for(var v=0,y=Object.keys(b.menu).length,_=2*s.nodeCircleMenuButton.radius+4,w=2*Math.PI*_,k=w/y-(2*s.nodeCircleMenuButton.radius+2);k<0;)_+=8,k=(w=2*Math.PI*_)/y-(2*s.nodeCircleMenuButton.radius+2);for(var I in(m=document.createElementNS("http://www.w3.org/2000/svg","g")).setAttribute(OrgChart.attr.control_node_circle_menu_wrraper_id,e),m.setAttribute("transform","matrix(1,0,0,1,"+u+","+f+")"),l.appendChild(m),b.menu){var S=b.menu[I].icon,C=b.menu[I].color,L=b.menu[I].text;"function"==typeof S&&(S=S()),"function"==typeof C&&(C=C()),"function"==typeof L&&(L=L());var A=document.createElementNS("http://www.w3.org/2000/svg","g");A.setAttribute("transform","matrix(1,0,0,1,0,0)"),A.setAttribute(OrgChart.attr.control_node_circle_menu_name,I),A.style.cursor="pointer";var E=document.createElementNS("http://www.w3.org/2000/svg","title");OrgChart.isNEU(L)||(E.innerHTML=L);var N=document.createElementNS("http://www.w3.org/2000/svg","circle");N.setAttribute("cx",0),N.setAttribute("cy",0),N.setAttribute("r",s.nodeCircleMenuButton.radius),N.setAttribute("fill",C),N.setAttribute("stroke-width","1"),N.setAttribute("stroke",s.nodeCircleMenuButton.stroke),A.appendChild(N),A.appendChild(E),A.innerHTML+=S,m.appendChild(A);var $=A.getElementsByTagName("svg")[0];if($.setAttribute("pointer-events","none"),$){var M=parseInt($.getAttribute("width")),T=parseInt($.getAttribute("height"));$.setAttribute("x",-M/2),$.setAttribute("y",-T/2)}var P=v*Math.PI/(y/2);v++;var U=Math.cos(P)*_,O=Math.sin(P)*_;this._buttonsInterval.push(OrgChart.animate(A,{transform:[1,0,0,1,0,0]},{transform:[1,0,0,1,U,O]},250,OrgChart.anim.outBack,function(e){var i=e[0].getAttribute(OrgChart.attr.control_node_circle_menu_name),a=e[0].parentNode.getAttribute(OrgChart.attr.control_node_circle_menu_wrraper_id);e[0].addEventListener("mouseenter",function(e){OrgChart.events.publish("mouseenter",[o,{from:a,menuItem:b.menu[i],menuItemName:i,event:e}])}),e[0].addEventListener("mouseout",function(e){OrgChart.events.publish("mouseout",[o,{from:a,menuItem:b.menu[i],menuItemName:i,event:e}])})}))}this._linesInterval.push(OrgChart.animate(g[0],{x1:-s.nodeCircleMenuButton.radius/2,y1:-6,x2:s.nodeCircleMenuButton.radius/2,y2:-6},{x1:-7,y1:-7,x2:7,y2:7},500,OrgChart.anim.inOutSin)),this._linesInterval.push(OrgChart.animate(g[1],{x1:-s.nodeCircleMenuButton.radius/2,y1:0,x2:s.nodeCircleMenuButton.radius/2,y2:0},{x1:0,y1:0,x2:0,y2:0},500,OrgChart.anim.inOutSin)),this._linesInterval.push(OrgChart.animate(g[2],{x1:-s.nodeCircleMenuButton.radius/2,y1:6,x2:s.nodeCircleMenuButton.radius/2,y2:6},{x1:-7,y1:7,x2:7,y2:-7},500,OrgChart.anim.inOutSin))}else this.hide()}},OrgChart.circleMenuUI.prototype.hide=function(){for(var e=this._buttonsInterval.length-1;e>=0;e--)clearInterval(this._buttonsInterval[e]),this._buttonsInterval.splice(e,1);this._buttonsInterval=[];for(e=this._linesInterval.length-1;e>=0;e--)clearInterval(this._linesInterval[e]),this._linesInterval.splice(e,1);this._linesInterval=[];var i=this.obj.element.querySelector("["+OrgChart.attr.control_node_circle_menu_wrraper_id+"]");if(null!=i){var o=i.getAttribute(OrgChart.attr.control_node_circle_menu_wrraper_id),a=this.obj.getNode(o),s=OrgChart.t(a.templateName,a.min,this.obj.getScale()),l=this.obj.element.querySelector("["+OrgChart.attr.control_node_circle_menu_id+'="'+o+'"]').querySelectorAll("line");l[0].setAttribute("x1",-s.nodeCircleMenuButton.radius/2),l[0].setAttribute("x2",s.nodeCircleMenuButton.radius/2),l[0].setAttribute("y1",-6),l[0].setAttribute("y2",-6),l[1].setAttribute("x1",-s.nodeCircleMenuButton.radius/2),l[1].setAttribute("x2",s.nodeCircleMenuButton.radius/2),l[1].setAttribute("y1",0),l[1].setAttribute("y2",0),l[2].setAttribute("x1",-s.nodeCircleMenuButton.radius/2),l[2].setAttribute("x2",s.nodeCircleMenuButton.radius/2),l[2].setAttribute("y1",6),l[2].setAttribute("y2",6),i.parentElement.removeChild(i),i=null}},OrgChart.circleMenuUI.prototype.on=function(e,i){return OrgChart.events.on(e,i,this._event_id),this},void 0===OrgChart&&(OrgChart={}),OrgChart.idb={version:1,dbName:"BALKAN",tableName:"orgchart-js",keyPath:"id"},OrgChart.idb.db=null,OrgChart.idb._open=function(e){if(OrgChart._browser().msie)e&&e(!1);else if((navigator.userAgent.toLowerCase().indexOf("safari")>0||navigator.userAgent.toLowerCase().indexOf("firefox")>0)&&window.location!==window.parent.location)e&&e(!1);else{if(!window.indexedDB)return console.error("Your browser doesn't support a stable version of IndexedDB."),void(e&&e(!1));if(null==OrgChart.idb.db){var i=indexedDB.open(OrgChart.idb.dbName,OrgChart.idb.version);i.onerror=function(i){console.error("Cannot open database!"),e&&e(!1)},i.onsuccess=function(i){OrgChart.idb.db=i.target.result,e&&e(!0)},i.onupgradeneeded=function(e){var i=e.target.result;i.objectStoreNames.contains(OrgChart.idb.tableName)&&i.deleteObjectStore(OrgChart.idb.tableName),i.createObjectStore(OrgChart.idb.tableName,{keyPath:OrgChart.idb.keyPath})}}else e&&e(!0)}},OrgChart.idb.read=function(e,i){OrgChart.idb._open(function(o){if(o){var a=OrgChart.idb.db.transaction([OrgChart.idb.tableName]).objectStore(OrgChart.idb.tableName).get(e);a.onerror=function(e){console.error("Unable to retrieve data from database!"),i&&i(!1)},a.onsuccess=function(e){a.result?i&&i(!0,a.result):i&&i(null)}}else i&&i(!1)})},OrgChart.idb.write=function(e,i){OrgChart.idb.read(e.id,function(o){if(null==o){var a=OrgChart.idb.db.transaction([OrgChart.idb.tableName],"readwrite").objectStore(OrgChart.idb.tableName).add(e);a.onerror=function(e){console.error("Unable to add data to database!"),i&&i(!1)},a.onsuccess=function(e){i&&i(!0)}}else i&&i(o)})},OrgChart.idb.put=function(e,i){OrgChart.idb._open(function(o){if(o){var a=OrgChart.idb.db.transaction([OrgChart.idb.tableName],"readwrite").objectStore(OrgChart.idb.tableName).put(e);a.onerror=function(e){console.error("Unable to put data to database!"),i&&i(!1)},a.onsuccess=function(e){i&&i(!0)}}else i&&i(!1)})},OrgChart.idb.delete=function(e,i){OrgChart.idb._open(function(o){if(o){var a=OrgChart.idb.db.transaction([OrgChart.idb.tableName],"readwrite").objectStore(OrgChart.idb.tableName).delete(e);a.onerror=function(e){console.error("Unable to retrieve data from database!"),i&&i(!1)},a.onsuccess=function(e){a.error?i&&i(!1):i&&i(!0)}}else i&&i(!1)})},OrgChart.toolbarUI=function(){},OrgChart.toolbarUI.expandAllIcon='<svg style="margin-bottom:7px;box-shadow: 0px 1px 4px rgba(0,0,0,0.3); border: 1px solid #cacaca;background-color: #f9f9f9;display: block;cursor: pointer;" width="32px" height="32px"><marker id="arrow" viewBox="0 0 10 10" refX="5" refY="5" markerWidth="4" markerHeight="4" orient="auto-start-reverse"><path d="M 0 0 L 10 5 L 0 10 z" fill="#757575" /></marker><line x1="11" y1="11" x2="6" y2="6" stroke="#757575" stroke-width="2" marker-end="url(#arrow)" /><line x1="21" y1="11" x2="26" y2="6" stroke="#757575" stroke-width="2" marker-end="url(#arrow)" /><line x1="21" y1="21" x2="26" y2="26" stroke="#757575" stroke-width="2" marker-end="url(#arrow)" /><line x1="11" y1="21" x2="6" y2="26" stroke="#757575" stroke-width="2" marker-end="url(#arrow)" /><rect x="12" y="12" width="8" height="8" fill="#757575"></rect></svg>',OrgChart.toolbarUI.fitIcon='<svg style="margin-bottom:7px;box-shadow: 0px 1px 4px rgba(0,0,0,0.3); border: 1px solid #cacaca;background-color: #f9f9f9;display: block;cursor: pointer;" width="32px" height="32px"><path stroke-width="3" fill="none" stroke="#757575" d="M4,11 L4,4 L11,4"></path><path stroke-width="3" fill="none" stroke="#757575" d="M28,11 L28,4 L21,4"></path><path stroke-width="3" fill="none" stroke="#757575" d="M28,21 L28,28 L21,28"></path><path stroke-width="3" fill="none" stroke="#757575" d="M4,21 L4,28 L11,28"></path><circle cx="16" cy="16" r="5" fill="#757575"></circle></svg>',OrgChart.toolbarUI.openFullScreenIcon='<svg style="margin-bottom:7px;box-shadow: 0px 1px 4px rgba(0,0,0,0.3); border: 1px solid #cacaca;background-color: #f9f9f9;display: block;cursor: pointer;" width="32px" height="32px"><path stroke-width="3" fill="none" stroke="#757575" d="M4,11 L4,4 L11,4"></path><path stroke-width="3" fill="none" stroke="#757575" d="M28,11 L28,4 L21,4"></path><path stroke-width="3" fill="none" stroke="#757575" d="M28,21 L28,28 L21,28"></path><path stroke-width="3" fill="none" stroke="#757575" d="M4,21 L4,28 L11,28"></path><line x1="5" y1="5" x2="27" y2="27" stroke-width="3" stroke="#757575"></line><line x1="5" y1="27" x2="27" y2="5" stroke-width="3" stroke="#757575"></line></svg>',OrgChart.toolbarUI.closeFullScreenIcon='<svg style="margin-bottom:7px;box-shadow: 0px 1px 4px rgba(0,0,0,0.3); border: 1px solid #cacaca;background-color: #f9f9f9;display: block;cursor: pointer;" width="32px" height="32px"><path stroke-width="3" fill="none" stroke="#757575" d="M4,11 L4,4 L11,4"></path><path stroke-width="3" fill="none" stroke="#757575" d="M28,11 L28,4 L21,4"></path><path stroke-width="3" fill="none" stroke="#757575" d="M28,21 L28,28 L21,28"></path><path stroke-width="3" fill="none" stroke="#757575" d="M4,21 L4,28 L11,28"></path><rect x="11" y="11" width="10" height="10" stroke-width="3" fill="none" stroke="#757575" ></rect></svg>',OrgChart.toolbarUI.zoomInIcon='<svg style="box-shadow: 0px 1px 4px rgba(0,0,0,0.3); border-left: 1px solid #cacaca; border-right: 1px solid #cacaca; border-top: 1px solid #cacaca; background-color: #f9f9f9;display: block; cursor: pointer;" width="32px" height="32px" ><g><rect fill="#f9f9f9" x="0" y="0" width="32" height="32" ></rect><line x1="8" y1="16" x2="24" y2="16" stroke-width="3" stroke="#757575"></line><line x1="16" y1="8" x2="16" y2="24" stroke-width="3" stroke="#757575"></line></g><line x1="4" y1="32" x2="28" y2="32" stroke-width="1" stroke="#cacaca"></line></svg>',OrgChart.toolbarUI.zoomOutIcon='<svg style="box-shadow: 0px 1px 4px rgba(0,0,0,0.3); margin-bottom:7px; border-left: 1px solid #cacaca; border-right: 1px solid #cacaca; border-bottom: 1px solid #cacaca; background-color: #f9f9f9;display: block; cursor: pointer;" width="32px" height="32px" ><g><rect fill="#f9f9f9" x="0" y="0" width="32" height="32" ></rect><line x1="8" y1="16" x2="24" y2="16" stroke-width="3" stroke="#757575"></line></g></svg>',OrgChart.toolbarUI.layoutIcon="<svg "+OrgChart.attr.tlbr+'="layout" style="box-shadow: 0px 1px 4px rgba(0,0,0,0.3); border: 1px solid #cacaca;background-color: #f9f9f9;display: block;cursor: pointer;" width="32px" height="32px"><path stroke-width="3" fill="none" stroke="#757575" d="M8,24 L16,14 L24,24"></path><path stroke-width="3" fill="none" stroke="#757575" d="M8,16 L16,8 L24,16"></path></svg>',OrgChart.toolbarUI.prototype.init=function(e,i){if(i){this.obj=e,this.toolbar=i,this._visible=!1,this.div=document.createElement("div"),this.div.classList.add("boc-toolbar-container"),Object.assign(this.div.style,{position:"absolute",padding:"3px",right:this.obj.config.padding-10+"px",bottom:this.obj.config.padding-10+"px"}),i.expandAll&&(this.div.innerHTML+="<div "+OrgChart.attr.tlbr+'="expand">'+OrgChart.toolbarUI.expandAllIcon+"</div>"),i.fit&&(this.div.innerHTML+="<div "+OrgChart.attr.tlbr+'="fit">'+OrgChart.toolbarUI.fitIcon+"</div>"),i.zoom&&(this.div.innerHTML+="<div "+OrgChart.attr.tlbr+'="plus">'+OrgChart.toolbarUI.zoomInIcon+"</div>",this.div.innerHTML+="<div "+OrgChart.attr.tlbr+'="minus">'+OrgChart.toolbarUI.zoomOutIcon+"</div>"),i.layout&&(this.div.innerHTML+="<div "+OrgChart.attr.tlbr+'="layout">'+OrgChart.toolbarUI.layoutIcon+"</div>",this.layouts=document.createElement("div"),this.layouts.classList.add("boc-toolbar-layout"),this.layouts.innerHTML='<svg data-layout="normal" style="cursor: pointer;" width="110" height="100"><rect fill="#039BE5" x="35" y="0" width="50" height="27"></rect><rect fill="#F57C00" x="7" y="41" width="50" height="27"></rect><rect fill="#F57C00" x="63" y="41" width="50" height="27"></rect><line stroke="#000000" x1="60" x2="60" y1="27" y2="35" stroke-width="1"></line><line stroke="#000000" x1="32" x2="88" y1="35" y2="35" stroke-width="1"></line><line stroke="#000000" x1="32" x2="32" y1="35" y2="41" stroke-width="1"></line><line stroke="#000000" x1="88" x2="88" y1="35" y2="41" stroke-width="1"></line></svg>\n <svg data-layout="treeRightOffset" style="cursor: pointer;" width="110" height="100"><rect fill="#039BE5" x="35" y="0" width="50" height="27"></rect><rect fill="#F57C00" x="40" y="41" width="50" height="27"></rect><rect fill="#F57C00" x="40" y="73" width="50" height="27"></rect><line stroke="#000000" x1="60" x2="60" y1="27" y2="35" stroke-width="1"></line><line stroke="#000000" x1="60" x2="35" y1="35" y2="35" stroke-width="1"></line><line stroke="#000000" x1="35" x2="35" y1="35" y2="86" stroke-width="1"></line><line stroke="#000000" x1="35" x2="40" y1="86" y2="86" stroke-width="1"></line><line stroke="#000000" x1="35" x2="40" y1="54" y2="54" stroke-width="1"></line></svg>\n <svg data-layout="treeLeftOffset" style="cursor: pointer;" width="110" height="100"><rect fill="#039BE5" x="35" y="0" width="50" height="27"></rect><rect fill="#F57C00" x="30" y="41" width="50" height="27"></rect><rect fill="#F57C00" x="30" y="73" width="50" height="27"></rect><line stroke="#000000" x1="60" x2="60" y1="27" y2="35" stroke-width="1"></line><line stroke="#000000" x1="60" x2="85" y1="35" y2="35" stroke-width="1"></line><line stroke="#000000" x1="85" x2="85" y1="35" y2="86" stroke-width="1"></line><line stroke="#000000" x1="80" x2="85" y1="86" y2="86" stroke-width="1"></line><line stroke="#000000" x1="80" x2="85" y1="54" y2="54" stroke-width="1"></line></svg>\n <svg data-layout="mixed" style="cursor: pointer;" width="110" height="100"><rect fill="#039BE5" x="35" y="0" width="50" height="27"></rect><rect fill="#F57C00" x="35" y="41" width="50" height="27"></rect><rect fill="#F57C00" x="35" y="73" width="50" height="27"></rect><line stroke="#000000" x1="60" x2="60" y1="27" y2="41" stroke-width="1"></line><line stroke="#000000" x1="60" x2="60" y1="68" y2="73" stroke-width="1"></line></svg>\n <svg data-layout="tree" style="cursor: pointer;" width="110" height="100"><rect fill="#039BE5" x="35" y="0" width="50" height="27"></rect><rect fill="#F57C00" x="7" y="41" width="50" height="27"></rect><rect fill="#F57C00" x="35" y="73" width="50" height="27"></rect><rect fill="#F57C00" x="63" y="41" width="50" height="27"></rect><line stroke="#000000" x1="60" x2="60" y1="27" y2="73" stroke-width="1"></line><line stroke="#000000" x1="57" x2="63" y1="54" y2="54" stroke-width="1"></line></svg>\n <svg data-layout="grid" style="cursor: pointer;" width="110" height="100"><rect fill="#039BE5" x="35" y="0" width="50" height="27"></rect><rect fill="#F57C00" x="7" y="41" width="50" height="27"></rect><rect fill="#F57C00" x="7" y="73" width="50" height="27"></rect><rect fill="#F57C00" x="63" y="41" width="50" height="27"></rect><rect fill="#F57C00" x="63" y="73" width="50" height="27"></rect><line stroke="#000000" x1="60" x2="60" y1="27" y2="71" stroke-width="1"></line><line stroke="#000000" x1="32" x2="88" y1="39" y2="39" stroke-width="1"></line><line stroke="#000000" x1="32" x2="88" y1="71" y2="71" stroke-width="1"></line><line stroke="#000000" x1="32" x2="32" y1="71" y2="73" stroke-width="1"></line><line stroke="#000000" x1="88" x2="88" y1="71" y2="73" stroke-width="1"></line><line stroke="#000000" x1="32" x2="32" y1="39" y2="41" stroke-width="1"></line><line stroke="#000000" x1="88" x2="88" y1="39" y2="41" stroke-width="1"></line></svg>',this.obj.element.appendChild(this.layouts)),i.fullScreen&&(this.div.innerHTML+="<div "+OrgChart.attr.tlbr+'="fullScreen">'+OrgChart.toolbarUI.openFullScreenIcon+"</div>"),this.obj.element.appendChild(this.div),this.layoutBtn=this.div.querySelector("["+OrgChart.attr.tlbr+'="layout"]');var o=this.div.querySelector("["+OrgChart.attr.tlbr+'="plus"]'),a=this.div.querySelector("["+OrgChart.attr.tlbr+'="minus"]'),s=this.div.querySelector("["+OrgChart.attr.tlbr+'="fit"]'),l=this.div.querySelector("["+OrgChart.attr.tlbr+'="fullScreen"]'),c=this.div.querySelector("["+OrgChart.attr.tlbr+'="expand"]'),d=this;o&&o.addEventListener("click",function(){d.obj.zoom(!0,null,!0)}),a&&a.addEventListener("click",function(){d.obj.zoom(!1,null,!0)}),s&&s.addEventListener("click",function(){d.obj.fit()}),l&&l.addEventListener("click",function(){d.obj.toggleFullScreen()}),c&&c.addEventListener("click",function(){d.obj.expand(null,"all")}),this.layoutBtn&&this.layoutBtn.addEventListener("click",function(){d._visible?d.hideLayout():d.showLayout()}),this.layouts&&this.layouts.addEventListener("click",function(e){for(var i=e.target;i;){if(i.hasAttribute&&i.hasAttribute(OrgChart.attr.layout)){i=i.getAttribute(OrgChart.attr.layout),d.obj.setLayout(OrgChart.layout[i]);break}i=i.parentNode}})}},OrgChart.toolbarUI.prototype.showLayout=function(){this._visible=!0,this.layoutBtn.style.transform="rotate(180deg) translateX(0px) translateY(0px)",OrgChart.animate(this.div,{bottom:this.obj.config.padding-10},{bottom:this.obj.config.padding+135},this.obj.config.anim.duration,this.obj.config.anim.func),OrgChart.animate(this.layouts,{bottom:-145},{bottom:0},this.obj.config.anim.duration,this.obj.config.anim.func)},OrgChart.toolbarUI.prototype.hideLayout=function(){this._visible=!1,this.layoutBtn.style.transform="rotate(0deg) translateX(0px) translateY(0px)",OrgChart.animate(this.div,{bottom:this.obj.config.padding+135},{bottom:this.obj.config.padding-10},this.obj.config.anim.duration,this.obj.config.anim.func),OrgChart.animate(this.layouts,{bottom:0},{bottom:-145},this.obj.config.anim.duration,this.obj.config.anim.func)},OrgChart.notifierUI=function(){},OrgChart.notifierUI.prototype.init=function(e){this.obj=e},OrgChart.notifierUI.prototype.show=function(e,i){if(null==e)return!1;1==e&&(e=OrgChart.MAX_NODES_MESS,i="#FFCA28"),2==e&&(e=OrgChart.OFFLINE_MESS,i="#FFCA28");var o=document.createElement("div");o.innerHTML=e,Object.assign(o.style,{position:"absolute","background-color":i,color:"#ffffff",padding:"15px","border-radius":"40px",opacity:0,overflow:"hidden","white-space":"nowrap","text-align":"center"}),this.obj.element.appendChild(o);var a=this.obj.width()/2-o.offsetWidth/2,s=this.obj.height()/2-o.offsetHeight/2;o.style.left=a+"px",o.style.top=s+"px";var l=o.offsetWidth;return o.style.width="20px",OrgChart.animate(o,{opacity:0,width:10},{opacity:1,width:l},this.obj.config.anim.duration,this.obj.config.anim.func),!0},void 0===OrgChart&&(OrgChart={}),OrgChart.icon={},OrgChart.icon.png_export=OrgChart.icon.png_preview=OrgChart.icon.pngpreview=OrgChart.icon.png=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" viewBox="0 0 550.801 550.801" x="${a}" y="${s}">\n <path fill="${o}" d="M146.747,276.708c0-13.998-9.711-22.352-26.887-22.352c-6.99,0-11.726,0.675-14.204,1.355v44.927 c2.932,0.676,6.539,0.896,11.52,0.896C135.449,301.546,146.747,292.28,146.747,276.708z"/>\n <path fill="${o}" d="M488.426,197.019H475.2v-63.816c0-0.398-0.063-0.799-0.116-1.202c-0.021-2.534-0.827-5.023-2.562-6.995L366.325,3.694 c-0.032-0.031-0.063-0.042-0.085-0.076c-0.633-0.707-1.371-1.295-2.151-1.804c-0.231-0.155-0.464-0.285-0.706-0.419 c-0.676-0.369-1.393-0.675-2.131-0.896c-0.2-0.056-0.38-0.138-0.58-0.19C359.87,0.119,359.037,0,358.193,0H97.2 c-11.918,0-21.6,9.693-21.6,21.601v175.413H62.377c-17.049,0-30.873,13.818-30.873,30.873v160.545 c0,17.043,13.824,30.87,30.873,30.87h13.224V529.2c0,11.907,9.682,21.601,21.6,21.601h356.4c11.907,0,21.6-9.693,21.6-21.601 V419.302h13.226c17.044,0,30.871-13.827,30.871-30.87v-160.54C519.297,210.838,505.47,197.019,488.426,197.019z M97.2,21.605 h250.193v110.513c0,5.967,4.841,10.8,10.8,10.8h95.407v54.108H97.2V21.605z M234.344,335.86v45.831h-31.601V229.524h40.184 l31.611,55.759c9.025,16.031,18.064,34.983,24.825,52.154h0.675c-2.257-20.103-2.933-40.643-2.933-63.44v-44.473h31.614v152.167 h-36.117l-32.516-58.703c-9.049-16.253-18.971-35.892-26.438-53.727l-0.665,0.222C233.906,289.58,234.344,311.027,234.344,335.86z M71.556,381.691V231.56c10.613-1.804,25.516-3.159,46.506-3.159c21.215,0,36.353,4.061,46.509,12.192 c9.698,7.673,16.255,20.313,16.255,35.219c0,14.897-4.959,27.549-13.999,36.123c-11.738,11.063-29.123,16.031-49.441,16.031 c-4.522,0-8.593-0.231-11.736-0.675v54.411H71.556V381.691z M453.601,523.353H97.2V419.302h356.4V523.353z M485.652,374.688 c-10.61,3.607-30.713,8.585-50.805,8.585c-27.759,0-47.872-7.003-61.857-20.545c-13.995-13.1-21.684-32.97-21.452-55.318 c0.222-50.569,37.03-79.463,86.917-79.463c19.644,0,34.783,3.829,42.219,7.446l-7.214,27.543c-8.369-3.617-18.752-6.55-35.458-6.55 c-28.656,0-50.341,16.256-50.341,49.22c0,31.382,19.649,49.892,47.872,49.892c7.895,0,14.218-0.901,16.934-2.257v-31.835h-23.493 v-26.869h56.679V374.688z"/>\n </svg>`},OrgChart.icon.pdf_export=OrgChart.icon.pdf_preview=OrgChart.icon.pdfpreview=OrgChart.icon.pdf=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" viewBox="0 0 550.801 550.801" x="${a}" y="${s}">\n <path fill="${o}" d="M160.381,282.225c0-14.832-10.299-23.684-28.474-23.684c-7.414,0-12.437,0.715-15.071,1.432V307.6 c3.114,0.707,6.942,0.949,12.192,0.949C148.419,308.549,160.381,298.74,160.381,282.225z"/>\n <path fill="${o}" d="M272.875,259.019c-8.145,0-13.397,0.717-16.519,1.435v105.523c3.116,0.729,8.142,0.729,12.69,0.729 c33.017,0.231,54.554-17.946,54.554-56.474C323.842,276.719,304.215,259.019,272.875,259.019z"/>\n <path fill="${o}" d="M488.426,197.019H475.2v-63.816c0-0.398-0.063-0.799-0.116-1.202c-0.021-2.534-0.827-5.023-2.562-6.995L366.325,3.694 c-0.032-0.031-0.063-0.042-0.085-0.076c-0.633-0.707-1.371-1.295-2.151-1.804c-0.231-0.155-0.464-0.285-0.706-0.419 c-0.676-0.369-1.393-0.675-2.131-0.896c-0.2-0.056-0.38-0.138-0.58-0.19C359.87,0.119,359.037,0,358.193,0H97.2 c-11.918,0-21.6,9.693-21.6,21.601v175.413H62.377c-17.049,0-30.873,13.818-30.873,30.873v160.545 c0,17.043,13.824,30.87,30.873,30.87h13.224V529.2c0,11.907,9.682,21.601,21.6,21.601h356.4c11.907,0,21.6-9.693,21.6-21.601 V419.302h13.226c17.044,0,30.871-13.827,30.871-30.87v-160.54C519.297,210.838,505.47,197.019,488.426,197.019z M97.2,21.605 h250.193v110.513c0,5.967,4.841,10.8,10.8,10.8h95.407v54.108H97.2V21.605z M362.359,309.023c0,30.876-11.243,52.165-26.82,65.333 c-16.971,14.117-42.82,20.814-74.396,20.814c-18.9,0-32.297-1.197-41.401-2.389V234.365c13.399-2.149,30.878-3.346,49.304-3.346 c30.612,0,50.478,5.508,66.039,17.226C351.828,260.69,362.359,280.547,362.359,309.023z M80.7,393.499V234.365 c11.241-1.904,27.042-3.346,49.296-3.346c22.491,0,38.527,4.308,49.291,12.928c10.292,8.131,17.215,21.534,17.215,37.328 c0,15.799-5.25,29.198-14.829,38.285c-12.442,11.728-30.865,16.996-52.407,16.996c-4.778,0-9.1-0.243-12.435-0.723v57.67H80.7 V393.499z M453.601,523.353H97.2V419.302h356.4V523.353z M484.898,262.127h-61.989v36.851h57.913v29.674h-57.913v64.848h-36.593 V232.216h98.582V262.127z"/>\n </svg>`},OrgChart.icon.svg_export=OrgChart.icon.svg_preview=OrgChart.icon.svg=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" viewBox="0 0 550.801 550.801" x="${a}" y="${s}">\n <path fill="${o}" d="M488.426,197.019H475.2v-63.816c0-0.398-0.063-0.799-0.116-1.202c-0.021-2.534-0.827-5.023-2.562-6.995L366.325,3.694 c-0.032-0.031-0.063-0.042-0.085-0.076c-0.633-0.707-1.371-1.295-2.151-1.804c-0.231-0.155-0.464-0.285-0.706-0.419 c-0.676-0.369-1.393-0.675-2.131-0.896c-0.2-0.056-0.38-0.138-0.58-0.19C359.87,0.119,359.037,0,358.193,0H97.2 c-11.918,0-21.6,9.693-21.6,21.601v175.413H62.377c-17.049,0-30.873,13.818-30.873,30.873v160.545 c0,17.043,13.824,30.87,30.873,30.87h13.224V529.2c0,11.907,9.682,21.601,21.6,21.601h356.4c11.907,0,21.6-9.693,21.6-21.601 V419.302h13.226c17.044,0,30.871-13.827,30.871-30.87v-160.54C519.297,210.838,505.47,197.019,488.426,197.019z M97.2,21.605 h250.193v110.513c0,5.967,4.841,10.8,10.8,10.8h95.407v54.108H97.2V21.605z M338.871,225.672L284.545,386.96h-42.591 l-51.69-161.288h39.967l19.617,68.196c5.508,19.143,10.531,37.567,14.36,57.67h0.717c4.061-19.385,9.089-38.527,14.592-56.953 l20.585-68.918h38.77V225.672z M68.458,379.54l7.415-30.153c9.811,5.021,24.888,10.051,40.439,10.051 c16.751,0,25.607-6.935,25.607-17.465c0-10.052-7.662-15.795-27.05-22.734c-26.8-9.328-44.263-24.168-44.263-47.611 c0-27.524,22.971-48.579,61.014-48.579c18.188,0,31.591,3.823,41.159,8.131l-8.126,29.437c-6.465-3.116-17.945-7.657-33.745-7.657 c-15.791,0-23.454,7.183-23.454,15.552c0,10.296,9.089,14.842,29.917,22.731c28.468,10.536,41.871,25.365,41.871,48.094 c0,27.042-20.812,50.013-65.09,50.013C95.731,389.349,77.538,384.571,68.458,379.54z M453.601,523.353H97.2V419.302h356.4V523.353z M488.911,379.54c-11.243,3.823-32.537,9.103-53.831,9.103c-29.437,0-50.73-7.426-65.57-21.779 c-14.839-13.875-22.971-34.942-22.738-58.625c0.253-53.604,39.255-84.235,92.137-84.235c20.81,0,36.852,4.073,44.74,7.896 l-7.657,29.202c-8.859-3.829-19.849-6.95-37.567-6.95c-30.396,0-53.357,17.233-53.357,52.173c0,33.265,20.81,52.882,50.73,52.882 c8.375,0,15.072-0.96,17.94-2.395v-33.745h-24.875v-28.471h60.049V379.54L488.911,379.54z" />\n </svg>`},OrgChart.icon.csv_export=OrgChart.icon.csv=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" viewBox="0 0 548.29 548.291" x="${a}" y="${s}">'\n <path fill="${o}" d="M486.2,196.121h-13.164V132.59c0-0.399-0.064-0.795-0.116-1.2c-0.021-2.52-0.824-5-2.551-6.96L364.656,3.677 c-0.031-0.034-0.064-0.044-0.085-0.075c-0.629-0.707-1.364-1.292-2.141-1.796c-0.231-0.157-0.462-0.286-0.704-0.419 c-0.672-0.365-1.386-0.672-2.121-0.893c-0.199-0.052-0.377-0.134-0.576-0.188C358.229,0.118,357.4,0,356.562,0H96.757 C84.893,0,75.256,9.649,75.256,21.502v174.613H62.093c-16.972,0-30.733,13.756-30.733,30.73v159.81 c0,16.966,13.761,30.736,30.733,30.736h13.163V526.79c0,11.854,9.637,21.501,21.501,21.501h354.777 c11.853,0,21.502-9.647,21.502-21.501V417.392H486.2c16.966,0,30.729-13.764,30.729-30.731v-159.81 C516.93,209.872,503.166,196.121,486.2,196.121z M96.757,21.502h249.053v110.006c0,5.94,4.818,10.751,10.751,10.751h94.973v53.861 H96.757V21.502z M258.618,313.18c-26.68-9.291-44.063-24.053-44.063-47.389c0-27.404,22.861-48.368,60.733-48.368 c18.107,0,31.447,3.811,40.968,8.107l-8.09,29.3c-6.43-3.107-17.862-7.632-33.59-7.632c-15.717,0-23.339,7.149-23.339,15.485 c0,10.247,9.047,14.769,29.78,22.632c28.341,10.479,41.681,25.239,41.681,47.874c0,26.909-20.721,49.786-64.792,49.786 c-18.338,0-36.449-4.776-45.497-9.77l7.38-30.016c9.772,5.014,24.775,10.006,40.264,10.006c16.671,0,25.488-6.908,25.488-17.396 C285.536,325.789,277.909,320.078,258.618,313.18z M69.474,302.692c0-54.781,39.074-85.269,87.654-85.269 c18.822,0,33.113,3.811,39.549,7.149l-7.392,28.816c-7.38-3.084-17.632-5.939-30.491-5.939c-28.822,0-51.206,17.375-51.206,53.099 c0,32.158,19.051,52.4,51.456,52.4c10.947,0,23.097-2.378,30.241-5.238l5.483,28.346c-6.672,3.34-21.674,6.919-41.208,6.919 C98.06,382.976,69.474,348.424,69.474,302.692z M451.534,520.962H96.757v-103.57h354.777V520.962z M427.518,380.583h-42.399 l-51.45-160.536h39.787l19.526,67.894c5.479,19.046,10.479,37.386,14.299,57.397h0.709c4.048-19.298,9.045-38.352,14.526-56.693 l20.487-68.598h38.599L427.518,380.583z" />'\n </svg>`},OrgChart.icon.json_export=OrgChart.icon.json=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" viewBox="0 0 32 32" x="${a}" y="${s}">\n <polygon fill="${o}" points="31 11 31 21 29 21 27 15 27 21 25 21 25 11 27 11 29 17 29 11 31 11"/>\n <path fill="${o}" d="M21.3335,21h-2.667A1.6684,1.6684,0,0,1,17,19.3335v-6.667A1.6684,1.6684,0,0,1,18.6665,11h2.667A1.6684,1.6684,0,0,1,23,12.6665v6.667A1.6684,1.6684,0,0,1,21.3335,21ZM19,19h2V13H19Z"/>\n <path fill="${o}" d="M13.3335,21H9V19h4V17H11a2.002,2.002,0,0,1-2-2V12.6665A1.6684,1.6684,0,0,1,10.6665,11H15v2H11v2h2a2.002,2.002,0,0,1,2,2v2.3335A1.6684,1.6684,0,0,1,13.3335,21Z"/>\n <path fill="${o}" d="M5.3335,21H2.6665A1.6684,1.6684,0,0,1,1,19.3335V17H3v2H5V11H7v8.3335A1.6684,1.6684,0,0,1,5.3335,21Z"/>\n <rect fill="${o}" id="_Transparent_Rectangle_" data-name="&lt;Transparent Rectangle&gt;" style="fill: none;" width="32" height="32"/>'\n </svg>`},OrgChart.icon.excel=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" viewBox="0 0 24 24" x="${a}" y="${s}">\n <path fill="${o}" d="M9.29289 1.29289C9.48043 1.10536 9.73478 1 10 1H18C19.6569 1 21 2.34315 21 4V9C21 9.55228 20.5523 10 20 10C19.4477 10 19 9.55228 19 9V4C19 3.44772 18.5523 3 18 3H11V8C11 8.55228 10.5523 9 10 9H5V20C5 20.5523 5.44772 21 6 21H7C7.55228 21 8 21.4477 8 22C8 22.5523 7.55228 23 7 23H6C4.34315 23 3 21.6569 3 20V8C3 7.73478 3.10536 7.48043 3.29289 7.29289L9.29289 1.29289ZM6.41421 7H9V4.41421L6.41421 7ZM19 12C19.5523 12 20 12.4477 20 13V19H23C23.5523 19 24 19.4477 24 20C24 20.5523 23.5523 21 23 21H19C18.4477 21 18 20.5523 18 20V13C18 12.4477 18.4477 12 19 12ZM11.8137 12.4188C11.4927 11.9693 10.8682 11.8653 10.4188 12.1863C9.96935 12.5073 9.86526 13.1318 10.1863 13.5812L12.2711 16.5L10.1863 19.4188C9.86526 19.8682 9.96935 20.4927 10.4188 20.8137C10.8682 21.1347 11.4927 21.0307 11.8137 20.5812L13.5 18.2205L15.1863 20.5812C15.5073 21.0307 16.1318 21.1347 16.5812 20.8137C17.0307 20.4927 17.1347 19.8682 16.8137 19.4188L14.7289 16.5L16.8137 13.5812C17.1347 13.1318 17.0307 12.5073 16.5812 12.1863C16.1318 11.8653 15.5073 11.9693 15.1863 12.4188L13.5 14.7795L11.8137 12.4188Z" fill="#000000"/>\n </svg>`},OrgChart.icon.pp_export=OrgChart.icon.pp_preview=OrgChart.icon.pppreview=OrgChart.icon.powerpoint=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" viewBox="0 0 24 24" x="${a}" y="${s}">\n <path fill="${o}" d="M10 1C9.73478 1 9.48043 1.10536 9.29289 1.29289L3.29289 7.29289C3.10536 7.48043 3 7.73478 3 8V20C3 21.6569 4.34315 23 6 23H11C11.5523 23 12 22.5523 12 22C12 21.4477 11.5523 21 11 21H6C5.44772 21 5 20.5523 5 20V9H10C10.5523 9 11 8.55228 11 8V3H18C18.5523 3 19 3.44772 19 4V9C19 9.55228 19.4477 10 20 10C20.5523 10 21 9.55228 21 9V4C21 2.34315 19.6569 1 18 1H10ZM9 7H6.41421L9 4.41421V7ZM15 12C14.4477 12 14 12.4477 14 13V17V20C14 20.5523 14.4477 21 15 21C15.5523 21 16 20.5523 16 20V18H19C20.6569 18 22 16.6569 22 15C22 13.3431 20.6569 12 19 12H15ZM19 16H16V14H19C19.5523 14 20 14.4477 20 15C20 15.5523 19.5523 16 19 16Z" fill="#000000"/>\n </svg>`},OrgChart.icon.edit=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" viewBox="0 0 528.899 528.899" x="${a}" y="${s}">\n <path fill="${o}" d="M328.883,89.125l107.59,107.589l-272.34,272.34L56.604,361.465L328.883,89.125z M518.113,63.177l-47.981-47.981 c-18.543-18.543-48.653-18.543-67.259,0l-45.961,45.961l107.59,107.59l53.611-53.611 C532.495,100.753,532.495,77.559,518.113,63.177z M0.3,512.69c-1.958,8.812,5.998,16.708,14.811,14.565l119.891-29.069 L27.473,390.597L0.3,512.69z" />'\n </svg>`},OrgChart.icon.details=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" viewBox="0 0 512 512" x="${a}" y="${s}">\n <path fill="${o}" d="M447.933,103.629c-0.034-3.076-1.224-6.09-3.485-8.352L352.683,3.511c-0.004-0.004-0.007-0.005-0.011-0.008 C350.505,1.338,347.511,0,344.206,0H89.278C75.361,0,64.04,11.32,64.04,25.237v461.525c0,13.916,11.32,25.237,25.237,25.237 h333.444c13.916,0,25.237-11.32,25.237-25.237V103.753C447.96,103.709,447.937,103.672,447.933,103.629z M356.194,40.931 l50.834,50.834h-49.572c-0.695,0-1.262-0.567-1.262-1.262V40.931z M423.983,486.763c0,0.695-0.566,1.261-1.261,1.261H89.278 c-0.695,0-1.261-0.566-1.261-1.261V25.237c0-0.695,0.566-1.261,1.261-1.261h242.94v66.527c0,13.916,11.322,25.239,25.239,25.239 h66.527V486.763z"/>\n <path fill="${o}" d="M362.088,164.014H149.912c-6.62,0-11.988,5.367-11.988,11.988c0,6.62,5.368,11.988,11.988,11.988h212.175 c6.62,0,11.988-5.368,11.988-11.988C374.076,169.381,368.707,164.014,362.088,164.014z"/>\n <path fill="${o}" d="M362.088,236.353H149.912c-6.62,0-11.988,5.368-11.988,11.988c0,6.62,5.368,11.988,11.988,11.988h212.175 c6.62,0,11.988-5.368,11.988-11.988C374.076,241.721,368.707,236.353,362.088,236.353z"/>\n <path fill="${o}" d="M362.088,308.691H149.912c-6.62,0-11.988,5.368-11.988,11.988c0,6.621,5.368,11.988,11.988,11.988h212.175 c6.62,0,11.988-5.367,11.988-11.988C374.076,314.06,368.707,308.691,362.088,308.691z"/>\n <path fill="${o}" d="M256,381.031H149.912c-6.62,0-11.988,5.368-11.988,11.988c0,6.621,5.368,11.988,11.988,11.988H256 c6.62,0,11.988-5.367,11.988-11.988C267.988,386.398,262.62,381.031,256,381.031z"/>\n </svg>`},OrgChart.icon.remove=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" viewBox="0 0 900.5 900.5" x="${a}" y="${s}">\n <path fill="${o}" d="M176.415,880.5c0,11.046,8.954,20,20,20h507.67c11.046,0,20-8.954,20-20V232.487h-547.67V880.5L176.415,880.5z M562.75,342.766h75v436.029h-75V342.766z M412.75,342.766h75v436.029h-75V342.766z M262.75,342.766h75v436.029h-75V342.766z"/>\n <path fill="${o}" d="M618.825,91.911V20c0-11.046-8.954-20-20-20h-297.15c-11.046,0-20,8.954-20,20v71.911v12.5v12.5H141.874 c-11.046,0-20,8.954-20,20v50.576c0,11.045,8.954,20,20,20h34.541h547.67h34.541c11.046,0,20-8.955,20-20v-50.576 c0-11.046-8.954-20-20-20H618.825v-12.5V91.911z M543.825,112.799h-187.15v-8.389v-12.5V75h187.15v16.911v12.5V112.799z"/>\n </svg>`},OrgChart.icon.add=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" viewBox="0 0 922 922" x="${a}" y="${s}">\n <path fill="${o}" d="M922,453V81c0-11.046-8.954-20-20-20H410c-11.045,0-20,8.954-20,20v149h318c24.812,0,45,20.187,45,45v198h149 C913.046,473.001,922,464.046,922,453z" />\n <path fill="${o}" d="M557,667.001h151c11.046,0,20-8.954,20-20v-174v-198c0-11.046-8.954-20-20-20H390H216c-11.045,0-20,8.954-20,20v149h194 h122c24.812,0,45,20.187,45,45v4V667.001z" />\n <path fill="${o}" d="M0,469v372c0,11.046,8.955,20,20,20h492c11.046,0,20-8.954,20-20V692v-12.501V667V473v-4c0-11.046-8.954-20-20-20H390H196 h-12.5H171H20C8.955,449,0,457.955,0,469z" />\n </svg>`},OrgChart.icon.search=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 485.213 485.213" x="${a}" y="${s}">\n <path fill="${o}" d="M471.882,407.567L360.567,296.243c-16.586,25.795-38.536,47.734-64.331,64.321l111.324,111.324 c17.772,17.768,46.587,17.768,64.321,0C489.654,454.149,489.654,425.334,471.882,407.567z" />\n <path fill="${o}" d="M363.909,181.955C363.909,81.473,282.44,0,181.956,0C81.474,0,0.001,81.473,0.001,181.955s81.473,181.951,181.955,181.951 C282.44,363.906,363.909,282.437,363.909,181.955z M181.956,318.416c-75.252,0-136.465-61.208-136.465-136.46 c0-75.252,61.213-136.465,136.465-136.465c75.25,0,136.468,61.213,136.468,136.465 C318.424,257.208,257.206,318.416,181.956,318.416z" />\n <path fill="${o}" d="M75.817,181.955h30.322c0-41.803,34.014-75.814,75.816-75.814V75.816C123.438,75.816,75.817,123.437,75.817,181.955z" />\n </svg>`},OrgChart.icon.xml_export=OrgChart.icon.xml=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" viewBox="0 0 550.801 550.801" x="${a}" y="${s}">\n <path fill="${o}" d="M488.426,197.019H475.2v-63.816c0-0.401-0.063-0.799-0.116-1.205c-0.021-2.534-0.827-5.023-2.562-6.992L366.325,3.691 c-0.032-0.031-0.063-0.042-0.085-0.073c-0.633-0.707-1.371-1.298-2.151-1.804c-0.231-0.158-0.464-0.287-0.706-0.422 c-0.676-0.366-1.393-0.675-2.131-0.896c-0.2-0.053-0.38-0.135-0.58-0.19C359.87,0.119,359.037,0,358.193,0H97.2 c-11.918,0-21.6,9.693-21.6,21.601v175.413H62.377c-17.049,0-30.873,13.818-30.873,30.87v160.542 c0,17.044,13.824,30.876,30.873,30.876h13.224V529.2c0,11.907,9.682,21.601,21.6,21.601h356.4c11.907,0,21.6-9.693,21.6-21.601 V419.302h13.226c17.044,0,30.871-13.827,30.871-30.87V227.89C519.297,210.838,505.47,197.019,488.426,197.019z M97.2,21.605 h250.193v110.51c0,5.967,4.841,10.8,10.8,10.8h95.407v54.108H97.2V21.605z M369.531,374.53h-32.058l-2.156-55.519 c-0.644-17.434-1.298-38.518-1.298-59.611h-0.633c-4.514,18.516-10.547,39.166-16.137,56.162l-17.645,56.601h-25.618 l-15.494-56.157c-4.725-16.996-9.671-37.658-13.123-56.6h-0.43c-0.854,19.585-1.508,41.961-2.586,60.038l-2.576,55.086h-30.343 l9.26-145.035h43.677l14.207,48.421c4.517,16.774,9.041,34.847,12.258,51.843h0.654c4.081-16.77,9.038-35.923,13.774-52.064 l15.493-48.199h42.82L369.531,374.53z M69.992,374.53l41.955-73.385l-40.444-71.65h37.655l12.688,26.465 c4.316,8.828,7.533,15.928,10.99,24.092h0.422c3.438-9.242,6.23-15.694,9.893-24.092l12.274-26.465h37.434l-40.89,70.796 l43.044,74.239h-37.866l-13.134-26.257c-5.376-10.108-8.817-17.639-12.909-26.04h-0.433c-3.009,8.401-6.674,15.932-11.19,26.04 l-12.042,26.257H69.992z M453.601,523.353H97.2V419.302h356.4V523.353z M485.325,374.53h-90.608V229.495h32.933v117.497h57.682 v27.538H485.325z"/>\n </svg>`},OrgChart.icon.visio_export=OrgChart.icon.visio=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" viewBox="0 0 24 24" x="${a}" y="${s}">\n <path fill="${o}" d="M24 7.609v9.556q0 .424-.302.726-.303.303-.726.303h-5.19q-.072 1.149-.556 2.135-.484.986-1.264 1.717-.78.732-1.803 1.15-1.022.417-2.159.417-1.016 0-1.96-.35-.943-.352-1.705-.969-.762-.617-1.295-1.47-.532-.852-.713-1.856H1.028q-.423 0-.726-.303Q0 18.363 0 17.94V7.609q0-.424.302-.726.303-.302.726-.302h5.238q-.072-.182-.072-.387 0-.424.302-.726L11.274.69q.303-.303.726-.303t.726.303l4.778 4.778q.302.302.302.726 0 .205-.072.387h5.238q.423 0 .726.302.302.302.302.726zM12 2.153l-4.04 4.04.387.388h3.012q.423 0 .726.302.302.302.302.726v2.238l3.653-3.653zM7.161 16.84l3.085-8.13H8.238q-.508 1.489-1.028 2.952-.52 1.464-1.004 2.964-.496-1.488-.992-2.958-.496-1.47-1.004-2.957H2.153l3.037 8.129zM12 22.065q.883 0 1.657-.333t1.355-.913q.58-.581.913-1.355.333-.774.333-1.658 0-.81-.302-1.548-.303-.738-.823-1.318-.52-.581-1.228-.944-.707-.363-1.518-.423v4.367q0 .423-.302.725-.303.303-.726.303H7.923q.206.677.593 1.246.387.568.92.98.532.41 1.185.64.653.23 1.379.23zm10.452-5.42V8.13h-6.158q-.133.133-.441.454-.309.32-.714.725-.405.406-.847.853-.441.448-.828.823-.387.375-.684.641-.296.266-.393.302v.097q.968.036 1.845.411t1.578.998q.702.623 1.186 1.446t.677 1.766Z"/>\n </svg>`},OrgChart.icon.link=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" viewBox="0 0 512.092 512.092" x="${a}" y="${s}">\n <path fill="${o}" d="M312.453,199.601c-6.066-6.102-12.792-11.511-20.053-16.128c-19.232-12.315-41.59-18.859-64.427-18.859 c-31.697-0.059-62.106,12.535-84.48,34.987L34.949,308.23c-22.336,22.379-34.89,52.7-34.91,84.318 c-0.042,65.98,53.41,119.501,119.39,119.543c31.648,0.11,62.029-12.424,84.395-34.816l89.6-89.6 c1.628-1.614,2.537-3.816,2.524-6.108c-0.027-4.713-3.87-8.511-8.583-8.484h-3.413c-18.72,0.066-37.273-3.529-54.613-10.581 c-3.195-1.315-6.867-0.573-9.301,1.877l-64.427,64.512c-20.006,20.006-52.442,20.006-72.448,0 c-20.006-20.006-20.006-52.442,0-72.448l108.971-108.885c19.99-19.965,52.373-19.965,72.363,0 c13.472,12.679,34.486,12.679,47.957,0c5.796-5.801,9.31-13.495,9.899-21.675C322.976,216.108,319.371,206.535,312.453,199.601z" />\n <path fill="${o}" d="M477.061,34.993c-46.657-46.657-122.303-46.657-168.96,0l-89.515,89.429c-2.458,2.47-3.167,6.185-1.792,9.387 c1.359,3.211,4.535,5.272,8.021,5.205h3.157c18.698-0.034,37.221,3.589,54.528,10.667c3.195,1.315,6.867,0.573,9.301-1.877 l64.256-64.171c20.006-20.006,52.442-20.006,72.448,0c20.006,20.006,20.006,52.442,0,72.448l-80.043,79.957l-0.683,0.768 l-27.989,27.819c-19.99,19.965-52.373,19.965-72.363,0c-13.472-12.679-34.486-12.679-47.957,0 c-5.833,5.845-9.35,13.606-9.899,21.845c-0.624,9.775,2.981,19.348,9.899,26.283c9.877,9.919,21.433,18.008,34.133,23.893 c1.792,0.853,3.584,1.536,5.376,2.304c1.792,0.768,3.669,1.365,5.461,2.048c1.792,0.683,3.669,1.28,5.461,1.792l5.035,1.365 c3.413,0.853,6.827,1.536,10.325,2.133c4.214,0.626,8.458,1.025,12.715,1.195h5.973h0.512l5.12-0.597 c1.877-0.085,3.84-0.512,6.059-0.512h2.901l5.888-0.853l2.731-0.512l4.949-1.024h0.939c20.961-5.265,40.101-16.118,55.381-31.403 l108.629-108.629C523.718,157.296,523.718,81.65,477.061,34.993z" />\n </svg>`},OrgChart.icon.happy=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" viewBox="0 0 512 512" x="${a}" y="${s}">\n <path fill="${o}" d="M256,0C114.615,0,0,114.615,0,256s114.615,256,256,256s256-114.615,256-256S397.385,0,256,0z M256,480 C132.288,480,32,379.712,32,256S132.288,32,256,32s224,100.288,224,224S379.712,480,256,480z"/>\n <path fill="${o}" d="M176,176c17.673,0,32,14.327,32,32h32c0-35.346-28.654-64-64-64c-35.346,0-64,28.654-64,64h32 C144,190.327,158.327,176,176,176z"/>\n <path fill="${o}" d="M336,144c-35.346,0-64,28.654-64,64h32c0-17.673,14.327-32,32-32c17.673,0,32,14.327,32,32h32 C400,172.654,371.346,144,336,144z"/>\n <path fill="${o}" d="M256,368c-53.019,0-96-42.981-96-96h-32c0,70.692,57.308,128,128,128s128-57.308,128-128h-32 C352,325.019,309.019,368,256,368z"/>\n </svg>`},OrgChart.icon.sad=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" viewBox="0 0 512 512" x="${a}" y="${s}">\n <path fill="${o}" d="M256,0C114.615,0,0,114.615,0,256s114.615,256,256,256s256-114.615,256-256S397.385,0,256,0z M256,480 C132.288,480,32,379.712,32,256S132.288,32,256,32s224,100.288,224,224S379.712,480,256,480z"/>\n <path fill="${o}" d="M336,192c-17.673,0-32-14.327-32-32h-32c0,35.346,28.654,64,64,64c35.346,0,64-28.654,64-64h-32 C368,177.673,353.673,192,336,192z"/>\n <path fill="${o}" d="M176,224c35.346,0,64-28.654,64-64h-32c0,17.673-14.327,32-32,32s-32-14.327-32-32h-32C112,195.346,140.654,224,176,224z "/>\n <path fill="${o}" d="M256,256c-70.692,0-128,57.308-128,128h32c0-53.019,42.981-96,96-96s96,42.981,96,96h32C384,313.308,326.692,256,256,256 z"/>\n </svg>`},OrgChart.icon.share=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" x="${a}" y="${s}" viewBox="0 0 512 512">\n <path fill="${o}" d="M406,332c-29.641,0-55.761,14.581-72.167,36.755L191.99,296.124c2.355-8.027,4.01-16.346,4.01-25.124\n c0-11.906-2.441-23.225-6.658-33.636l148.445-89.328C354.307,167.424,378.589,180,406,180c49.629,0,90-40.371,90-90\n c0-49.629-40.371-90-90-90c-49.629,0-90,40.371-90,90c0,11.437,2.355,22.286,6.262,32.358l-148.887,89.59\n C156.869,193.136,132.937,181,106,181c-49.629,0-90,40.371-90,90c0,49.629,40.371,90,90,90c30.13,0,56.691-15.009,73.035-37.806\n l141.376,72.395C317.807,403.995,316,412.75,316,422c0,49.629,40.371,90,90,90c49.629,0,90-40.371,90-90\n C496,372.371,455.629,332,406,332z"/>\n </svg>`},OrgChart.icon.user=function(e,i,o,a,s){return OrgChart.isNEU(a)&&(a=0),OrgChart.isNEU(s)&&(s=0),`<svg width="${e}" height="${i}" x="${a}" y="${s}" viewBox="0 0 24 24">\n <path fill="${o}" d="M12 11.796C14.7189 11.796 16.9231 9.60308 16.9231 6.89801C16.9231 4.19294 14.7189 2.00005 12 2.00005C9.28106 2.00005 7.07692 4.19294 7.07692 6.89801C7.07692 9.60308 9.28106 11.796 12 11.796Z" fill="#030D45"/>\n <path fill="${o}" d="M14.5641 13.8369H9.4359C6.46154 13.8369 4 16.2859 4 19.245C4 19.9593 4.30769 20.5716 4.92308 20.8777C5.84615 21.3879 7.89744 22.0001 12 22.0001C16.1026 22.0001 18.1538 21.3879 19.0769 20.8777C19.5897 20.5716 20 19.9593 20 19.245C20 16.1838 17.5385 13.8369 14.5641 13.8369Z" fill="#030D45"/>\n </svg>`},OrgChart.icon.close=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" x="${a}" y="${s}" viewBox="0 0 512 512">\n <path fill="${o}" d="m256 0c-141.49 0-256 114.5-256 256 0 141.49 114.5 256 256 256 141.49 0 256-114.5 256-256 0-141.49-114.5-256-256-256zm-12.284 317.397-58.121 58.132c-6.565 6.553-15.283 10.166-24.557 10.166-19.196 0-34.734-15.526-34.734-34.734 0-9.274 3.612-17.992 10.166-24.557l58.132-58.121c6.785-6.784 6.785-17.783 0-24.568l-58.132-58.121c-6.553-6.565-10.166-15.283-10.166-24.557 0-19.196 15.526-34.734 34.734-34.734 9.274 0 17.992 3.613 24.557 10.166l58.121 58.132c6.785 6.773 17.784 6.773 24.568 0l58.121-58.132c6.565-6.553 15.283-10.166 24.557-10.166 19.196 0 34.734 15.526 34.734 34.734 0 9.274-3.612 17.992-10.166 24.557l-58.132 58.121c-6.785 6.784-6.785 17.783 0 24.568l58.132 58.121c6.553 6.565 10.166 15.283 10.166 24.557 0 19.196-15.526 34.734-34.734 34.734-9.274 0-17.992-3.613-24.557-10.166l-58.121-58.132c-6.784-6.784-17.784-6.773-24.568 0z"/>\n </svg>`},OrgChart.icon.undo=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" x="${a}" y="${s}" viewBox="0 0 24 24">\n <path fill-rule="evenodd" clip-rule="evenodd" fill="${o}" d="M3.46447 3.46447C2 4.92893 2 7.28595 2 12C2 16.714 2 19.0711 3.46447 20.5355C4.92893 22 7.28595 22 12 22C16.714 22 19.0711 22 20.5355 20.5355C22 19.0711 22 16.7141 22 12C22 7.28598 22 4.92893 20.5355 3.46447C19.0711 2 16.714 2 12 2C7.28595 2 4.92893 2 3.46447 3.46447ZM9.25871 7.97395C9.56308 7.693 9.58205 7.21851 9.3011 6.91414C9.02015 6.60978 8.54565 6.5908 8.24129 6.87175L5.99129 8.94867C5.83748 9.09065 5.75 9.29045 5.75 9.49977C5.75 9.7091 5.83748 9.9089 5.99129 10.0509L8.24129 12.1278C8.54565 12.4088 9.02015 12.3898 9.3011 12.0854C9.58205 11.781 9.56308 11.3065 9.25871 11.0256L8.41824 10.2498H14.0385C14.7376 10.2498 15.2069 10.2506 15.5652 10.2862C15.9116 10.3205 16.0724 10.3813 16.1787 10.4501C16.3272 10.5461 16.4537 10.6726 16.5497 10.8211C16.6184 10.9274 16.6793 11.0882 16.7136 11.4345C16.7491 11.7929 16.75 12.2622 16.75 12.9613C16.75 13.6604 16.7491 14.1298 16.7136 14.4881C16.6793 14.8344 16.6185 14.9952 16.5497 15.1015C16.4537 15.2501 16.3272 15.3765 16.1787 15.4726C16.0724 15.5413 15.9116 15.6021 15.5652 15.6365C15.2069 15.672 14.7376 15.6729 14.0385 15.6729H9.5C9.08579 15.6729 8.75 16.0086 8.75 16.4229C8.75 16.8371 9.08579 17.1729 9.5 17.1729H14.0758C14.7279 17.1729 15.2721 17.1729 15.7133 17.1291C16.1748 17.0834 16.6038 16.9839 16.9931 16.7322C17.3199 16.5209 17.5981 16.2427 17.8094 15.916C18.0611 15.5266 18.1605 15.0976 18.2063 14.6361C18.25 14.195 18.25 13.6508 18.25 12.9987V12.924C18.25 12.2718 18.25 11.7276 18.2063 11.2865C18.1605 10.825 18.0611 10.396 17.8093 10.0067C17.5981 9.6799 17.3199 9.40169 16.9931 9.19042C16.6038 8.9387 16.1748 8.83927 15.7133 8.7935C15.2721 8.74975 14.7279 8.74976 14.0758 8.74977L8.41824 8.74977L9.25871 7.97395Z" />\n <rect style="opacity: 0" x="2" y="2" width="20" height="20"></rect>\n </svg>`},OrgChart.icon.redo=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" x="${a}" y="${s}" viewBox="0 0 24 24" >\n <path fill="#f9f9f9" fill-rule="evenodd" clip-rule="evenodd" fill="${o}" d="M3.46447 3.46447C2 4.92893 2 7.28595 2 12C2 16.714 2 19.0711 3.46447 20.5355C4.92893 22 7.28595 22 12 22C16.714 22 19.0711 22 20.5355 20.5355C22 19.0711 22 16.7141 22 12C22 7.28598 22 4.92893 20.5355 3.46447C19.0711 2 16.714 2 12 2C7.28595 2 4.92893 2 3.46447 3.46447ZM15.7587 6.87273C15.4543 6.59177 14.9799 6.61075 14.6989 6.91512C14.4179 7.21948 14.4369 7.69398 14.7413 7.97493L15.5818 8.75075H9.96155C7.63558 8.75075 5.75 10.6363 5.75 12.9623C5.75 15.2883 7.63557 17.1738 9.96154 17.1738H14.5C14.9142 17.1738 15.25 16.838 15.25 16.4238C15.25 16.0096 14.9142 15.6738 14.5 15.6738H9.96154C8.464 15.6738 7.25 14.4598 7.25 12.9623C7.25 11.4647 8.464 10.2508 9.96155 10.2508H15.5818L14.7413 11.0266C14.4369 11.3075 14.4179 11.782 14.6989 12.0864C14.9799 12.3908 15.4543 12.4097 15.7587 12.1288L18.0087 10.0519C18.1625 9.90987 18.25 9.71007 18.25 9.50075C18.25 9.29143 18.1625 9.09163 18.0087 8.94965L15.7587 6.87273Z"/>\n <rect style="opacity: 0" x="2" y="2" width="20" height="20"></rect> \n </svg>`},OrgChart.icon.send=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" x="${a}" y="${s}" viewBox="0 0 24 24" >\n <path fill="none" stroke="${o}" stroke-width="2" d="M10.3009 13.6949L20.102 3.89742M10.5795 14.1355L12.8019 18.5804C13.339 19.6545 13.6075 20.1916 13.9458 20.3356C14.2394 20.4606 14.575 20.4379 14.8492 20.2747C15.1651 20.0866 15.3591 19.5183 15.7472 18.3818L19.9463 6.08434C20.2845 5.09409 20.4535 4.59896 20.3378 4.27142C20.2371 3.98648 20.013 3.76234 19.7281 3.66167C19.4005 3.54595 18.9054 3.71502 17.9151 4.05315L5.61763 8.2523C4.48114 8.64037 3.91289 8.83441 3.72478 9.15032C3.56153 9.42447 3.53891 9.76007 3.66389 10.0536C3.80791 10.3919 4.34498 10.6605 5.41912 11.1975L9.86397 13.42C10.041 13.5085 10.1295 13.5527 10.2061 13.6118C10.2742 13.6643 10.3352 13.7253 10.3876 13.7933C10.4468 13.87 10.491 13.9585 10.5795 14.1355Z" />\n </svg>`},OrgChart.icon.x=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" x="${a}" y="${s}" viewBox="0 0 24 24">\n <line x1="0" y1="0" x2="24" y2="24" stroke-width="3" stroke="${o}"></line>\n <line x1="24" y1="0" x2="0" y2="24" stroke-width="3" stroke="${o}"></line>\n </svg>`},OrgChart.icon.x=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" x="${a}" y="${s}" viewBox="0 0 24 24">\n <line x1="0" y1="0" x2="24" y2="24" stroke-width="3" stroke="${o}"></line>\n <line x1="24" y1="0" x2="0" y2="24" stroke-width="3" stroke="${o}"></line>\n </svg>`},OrgChart.icon.fit=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" x="${a}" y="${s}" viewBox="0 0 128 128">\n <path fill="${o}" d="M 58.1875 4.90625 C 29.957889 4.90625 6.9375 27.957888 6.9375 56.1875 C 6.9375 84.417111 29.957889 107.4375 58.1875 107.4375 C 69.752492 107.4375 80.436703 103.56785 89.03125 97.0625 L 108.59375 120.4375 A 7.0007 7.0007 0 1 0 119.3125 111.4375 L 98.96875 87.15625 C 105.53731 78.538312 109.4375 67.814416 109.4375 56.1875 C 109.4375 27.957888 86.417111 4.90625 58.1875 4.90625 z M 58.1875 18.875 C 78.850949 18.875 95.4375 35.52405 95.4375 56.1875 C 95.4375 76.850949 78.850949 93.4375 58.1875 93.4375 C 37.524051 93.4375 20.9375 76.850949 20.9375 56.1875 C 20.9375 35.52405 37.524051 18.875 58.1875 18.875 z M 33.125 31.09375 L 33.125 36.40625 L 33.125 75.90625 L 33.125 81.21875 L 38.4375 81.21875 L 77.9375 81.21875 L 83.25 81.21875 L 83.25 75.90625 L 83.25 36.40625 L 83.25 31.09375 L 77.9375 31.09375 L 38.4375 31.09375 L 33.125 31.09375 z M 43.78125 41.75 L 72.59375 41.75 L 72.59375 70.5625 L 43.78125 70.5625 L 43.78125 41.75 z "/>\n</svg>`},OrgChart.icon.expand_all=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" x="${a}" y="${s}" viewBox="0 0 32 32">\n <path fill="${o}" d="M13.816 5.989l-7.785 0.046 0.003 7.735 2.59-2.591 3.454 3.454 2.665-2.665-3.453-3.454 2.526-2.525zM12.079 17.35l-3.454 3.455-2.59-2.592-0.003 7.799 7.785-0.018-2.526-2.525 3.454-3.453-2.666-2.666zM19.922 14.633l3.453-3.454 2.59 2.591 0.004-7.735-7.785-0.046 2.526 2.525-3.454 3.454 2.666 2.665zM23.375 20.805l-3.453-3.455-2.666 2.666 3.454 3.453-2.526 2.525 7.785 0.018-0.004-7.799-2.59 2.592z"></path>\n</svg>`},OrgChart.icon.full_screen=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" x="${a}" y="${s}" viewBox="0 0 48 48">\n<rect width="48" height="48" fill="${o}" fill-opacity="0.01"/>\n<path fill="none" d="M16 40H6C4.89543 40 4 39.1046 4 38V10C4 8.89543 4.89543 8 6 8H42C43.1046 8 44 8.89543 44 10V16" stroke="${o}" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>\n<rect x="24" y="24" width="20" height="16" rx="2" fill="none" stroke="${o}" stroke-width="4" stroke-linejoin="round"/>\n</svg>`},OrgChart.icon.zoom_in=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" x="${a}" y="${s}" viewBox="0 0 32 32" >\n <g sketch:type="MSLayerGroup" transform="translate(-362.000000, -1037.000000)" fill="${o}">\n <path d="M390,1049 L382,1049 L382,1041 C382,1038.79 380.209,1037 378,1037 C375.791,1037 374,1038.79 374,1041 L374,1049 L366,1049 C363.791,1049 362,1050.79 362,1053 C362,1055.21 363.791,1057 366,1057 L374,1057 L374,1065 C374,1067.21 375.791,1069 378,1069 C380.209,1069 382,1067.21 382,1065 L382,1057 L390,1057 C392.209,1057 394,1055.21 394,1053 C394,1050.79 392.209,1049 390,1049" id="plus" sketch:type="MSShapeGroup"></path>\n </g>\n </svg>`},OrgChart.icon.zoom_out=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" x="${a}" y="${s}" viewBox="0 -12 32 32" >\n <g id="Icon-Set-Filled" sketch:type="MSLayerGroup" transform="translate(-414.000000, -1049.000000)" fill="${o}">\n <path d="M442,1049 L418,1049 C415.791,1049 414,1050.79 414,1053 C414,1055.21 415.791,1057 418,1057 L442,1057 C444.209,1057 446,1055.21 446,1053 C446,1050.79 444.209,1049 442,1049" id="minus" sketch:type="MSShapeGroup"></path>\n </g>\n </svg>`},OrgChart.icon.layout_normal=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" x="${a}" y="${s}" viewBox="0 0 110 100">\n <rect fill="${o}" x="35" y="0" width="50" height="27"></rect>\n <rect fill="${o}" x="7" y="41" width="50" height="27"></rect>\n <rect fill="${o}" x="63" y="41" width="50" height="27"></rect>\n <line stroke="${o}" x1="60" x2="60" y1="27" y2="35" stroke-width="1"></line>\n <line stroke="${o}" x1="32" x2="88" y1="35" y2="35" stroke-width="1"></line>\n <line stroke="${o}" x1="32" x2="32" y1="35" y2="41" stroke-width="1"></line>\n <line stroke="${o}" x1="88" x2="88" y1="35" y2="41" stroke-width="1"></line>\n </svg>`},OrgChart.icon.layout_right_offset=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" x="${a}" y="${s}" viewBox="0 0 110 100">\n <rect fill="${o}" x="35" y="0" width="50" height="27"></rect>\n <rect fill="${o}" x="40" y="41" width="50" height="27"></rect>\n <rect fill="${o}" x="40" y="73" width="50" height="27"></rect>\n <line stroke="${o}" x1="60" x2="60" y1="27" y2="35" stroke-width="1"></line>\n <line stroke="${o}" x1="60" x2="35" y1="35" y2="35" stroke-width="1"></line>\n <line stroke="${o}" x1="35" x2="35" y1="35" y2="86" stroke-width="1"></line>\n <line stroke="${o}" x1="35" x2="40" y1="86" y2="86" stroke-width="1"></line>\n <line stroke="${o}" x1="35" x2="40" y1="54" y2="54" stroke-width="1"></line>\n </svg>`},OrgChart.icon.layout_left_offset=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" x="${a}" y="${s}" viewBox="0 0 110 100">\n <rect fill="${o}" x="35" y="0" width="50" height="27"></rect>\n <rect fill="${o}" x="30" y="41" width="50" height="27"></rect>\n <rect fill="${o}" x="30" y="73" width="50" height="27"></rect>\n <line stroke="${o}" x1="60" x2="60" y1="27" y2="35" stroke-width="1"></line>\n <line stroke="${o}" x1="60" x2="85" y1="35" y2="35" stroke-width="1"></line>\n <line stroke="${o}" x1="85" x2="85" y1="35" y2="86" stroke-width="1"></line>\n <line stroke="${o}" x1="80" x2="85" y1="86" y2="86" stroke-width="1"></line>\n <line stroke="${o}" x1="80" x2="85" y1="54" y2="54" stroke-width="1"></line>\n </svg>`},OrgChart.icon.layout_mixed=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" x="${a}" y="${s}" viewBox="0 0 110 100">\n <rect fill="${o}" x="35" y="0" width="50" height="27"></rect>\n <rect fill="${o}" x="35" y="41" width="50" height="27"></rect>\n <rect fill="${o}" x="35" y="73" width="50" height="27"></rect>\n <line stroke="${o}" x1="60" x2="60" y1="27" y2="41" stroke-width="1"></line>\n <line stroke="${o}" x1="60" x2="60" y1="68" y2="73" stroke-width="1"></line>\n </svg>`},OrgChart.icon.layout_tree=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" x="${a}" y="${s}" viewBox="0 0 110 100">\n <rect fill="${o}" x="35" y="0" width="50" height="27"></rect>\n <rect fill="${o}" x="7" y="41" width="50" height="27"></rect>\n <rect fill="${o}" x="35" y="73" width="50" height="27"></rect>\n <rect fill="${o}" x="63" y="41" width="50" height="27"></rect>\n <line stroke="${o}" x1="60" x2="60" y1="27" y2="73" stroke-width="1"></line>\n <line stroke="${o}" x1="57" x2="63" y1="54" y2="54" stroke-width="1"></line>\n </svg>`},OrgChart.icon.layout_grid=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" x="${a}" y="${s}" viewBox="0 0 110 100">\n <rect fill="${o}" x="35" y="0" width="50" height="27"></rect>\n <rect fill="${o}" x="7" y="41" width="50" height="27"></rect>\n <rect fill="${o}" x="7" y="73" width="50" height="27"></rect>\n <rect fill="${o}" x="63" y="41" width="50" height="27"></rect>\n <rect fill="${o}" x="63" y="73" width="50" height="27"></rect>\n <line stroke="${o}" x1="60" x2="60" y1="27" y2="71" stroke-width="1"></line>\n <line stroke="${o}" x1="32" x2="88" y1="39" y2="39" stroke-width="1"></line>\n <line stroke="${o}" x1="32" x2="88" y1="71" y2="71" stroke-width="1"></line>\n <line stroke="${o}" x1="32" x2="32" y1="71" y2="73" stroke-width="1"></line>\n <line stroke="${o}" x1="88" x2="88" y1="71" y2="73" stroke-width="1"></line>\n <line stroke="${o}" x1="32" x2="32" y1="39" y2="41" stroke-width="1"></line>\n <line stroke="${o}" x1="88" x2="88" y1="39" y2="41" stroke-width="1"></line>\n </svg>`},OrgChart.icon.layout_grid=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" x="${a}" y="${s}" viewBox="0 0 110 100">\n <rect fill="${o}" x="35" y="0" width="50" height="27"></rect>\n <rect fill="${o}" x="7" y="41" width="50" height="27"></rect>\n <rect fill="${o}" x="7" y="73" width="50" height="27"></rect>\n <rect fill="${o}" x="63" y="41" width="50" height="27"></rect>\n <rect fill="${o}" x="63" y="73" width="50" height="27"></rect>\n <line stroke="${o}" x1="60" x2="60" y1="27" y2="71" stroke-width="1"></line>\n <line stroke="${o}" x1="32" x2="88" y1="39" y2="39" stroke-width="1"></line>\n <line stroke="${o}" x1="32" x2="88" y1="71" y2="71" stroke-width="1"></line>\n <line stroke="${o}" x1="32" x2="32" y1="71" y2="73" stroke-width="1"></line>\n <line stroke="${o}" x1="88" x2="88" y1="71" y2="73" stroke-width="1"></line>\n <line stroke="${o}" x1="32" x2="32" y1="39" y2="41" stroke-width="1"></line>\n <line stroke="${o}" x1="88" x2="88" y1="39" y2="41" stroke-width="1"></line>\n </svg>`},OrgChart.icon.cursor=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" x="${a}" y="${s}" viewBox="0 0 16 16" >\n <path d="M8 3V0H6V3H8Z" fill="${o}"/>\n <path d="M0.792893 2.20711L3.29289 4.70711L4.70711 3.29289L2.20711 0.792893L0.792893 2.20711Z" fill="${o}"/>\n <path d="M6 5L5 6.00001L8 15H10L10.7172 12.1314L14.2929 15.7071L15.7071 14.2929L12.1314 10.7172L15 10V8L6 5Z" fill="${o}"/>\n <path d="M0 6H3V8H0V6Z" fill="${o}"/>\n </svg>`},OrgChart.prototype.exportPDFProfile=function(e,i){console.warn("exportPDFProfile is obsolete; use exportToPDFProfile instead.")},OrgChart.prototype.exportPDFPreview=function(e,i){console.warn("exportPDFPreview is obsolete; use exportToPDFProfile instead.")},OrgChart.prototype.exportPNGProfile=function(e,i){console.warn("exportPNGProfile is obsolete; use exportToPDFProfile instead.")},OrgChart.prototype.exportPDF=function(e,i){console.warn("exportPDF is obsolete; use exportToPDF instead.")},OrgChart.prototype.exportPNG=function(e,i){console.warn("exportPNG is obsolete; use exportToPNG instead.")},OrgChart.prototype.exportSVG=function(e,i){console.warn("exportSVG is obsolete; use exportToSVG instead.")},OrgChart.prototype.exportVisio=function(e,i){console.warn("exportVisio is obsolete; use exportToVisio instead.")},OrgChart.exportPDFFromCharts=function(e,i,o,a){console.warn('The "exportPDFFromCharts" is depricated. Use "chart1.exportToPDF" with pages instead.')},OrgChart.prototype.shareProfile=function(e){var i;"object"==typeof e?e=(i=e).focusId:i=this.editUI.content(e,!0,!0,"100%",!0);var o=new URL(window.location.href);o.searchParams.append("nodeId",e);var a={title:i.title,text:i.shareText,url:o.href};try{navigator.share(a)}catch(s){console.error("error: "+s)}},OrgChart.prototype.exportToCSV=OrgChart.prototype.exportCSV=function(e){var i=OrgChart._defaultExportProfileOptionsForCSV_SVG_JSON(e,"csv"),o=this.getNode(i.nodeId),a=null;o?(a=[],OrgChart._exportIterateForJSON_XML_CSV(this,o,i,a)):!1===i.min||!1===i.expandChildren?OrgChart._exportIterateForJSON_XML_CSV(this,this.roots,i,a):a=JSON.parse(JSON.stringify(this.config.nodes));var s={ext:"csv",filename:e,options:i,nodes:a};if(!1===OrgChart.events.publish("exportstart",[this,s]))return!1;var l=OrgChart._json2csv(s.nodes),c={ext:s.ext,filename:s.filename,options:i,nodes:s.nodes,content:l};if(!1===OrgChart.events.publish("exportend",[this,c]))return!1;OrgChart._downloadFile("text/csv;charset=utf-8;","\ufeff"+c.content,c.options.filename,c.options.openInNewTab,c.ext)},OrgChart.prototype.exportToXML=OrgChart.prototype.exportXML=function(e){var i=OrgChart._defaultExportProfileOptionsForCSV_SVG_JSON(e,"xml"),o=this.getNode(i.nodeId),a=null;o?(a=[],OrgChart._exportIterateForJSON_XML_CSV(this,o,i,a)):!1===i.min||!1===i.expandChildren?OrgChart._exportIterateForJSON_XML_CSV(this,this.roots,i,a):a=JSON.parse(JSON.stringify(this.config.nodes));var s={ext:"xml",filename:e,options:i,nodes:a};if(!1===OrgChart.events.publish("exportstart",[this,s]))return!1;var l=OrgChart._json2xml(s.nodes),c={ext:s.ext,filename:s.filename,options:i,nodes:s.nodes,content:l};if(!1===OrgChart.events.publish("exportend",[this,c]))return!1;OrgChart._downloadFile("application/xml",c.content,c.options.filename,c.options.openInNewTab,c.ext)},OrgChart.prototype.exportToJSON=OrgChart.prototype.exportJSON=function(e){var i=OrgChart._defaultExportProfileOptionsForCSV_SVG_JSON(e,"json"),o=this.getNode(i.nodeId),a=null;o?(a=[],OrgChart._exportIterateForJSON_XML_CSV(this,o,i,a)):!1===i.min||!1===i.expandChildren?OrgChart._exportIterateForJSON_XML_CSV(this,this.roots,i,a):a=JSON.parse(JSON.stringify(this.config.nodes));var s={ext:"json",filename:i.filename,options:i,nodes:a};if(!1===OrgChart.events.publish("exportstart",[this,s]))return!1;var l={ext:s.ext,filename:s.filename,options:i,nodes:s.nodes,content:JSON.stringify(s.nodes)};if(!1===OrgChart.events.publish("exportend",[this,l]))return!1;OrgChart._downloadFile("application/json",l.content,l.options.filename,l.options.openInNewTab,l.ext)},OrgChart._exportIterateForJSON_XML_CSV=function(e,i,o,a){if(Array.isArray(i))for(var s=0;s<i.length;s++)OrgChart._exportIterateForJSON_XML_CSV(e,i[s],o,a);else{var l=e.get(i.id);if(a.push(l),o.min)for(s=0;s<i.stChildrenIds.length;s++)OrgChart._exportIterateForJSON_XML_CSV(e,e.getNode(i.stChildrenIds[s]),o,a);else for(s=0;s<i.stChildren.length;s++)OrgChart._exportIterateForJSON_XML_CSV(e,i.stChildren[s],o,a);if(o.expandChildren)for(s=0;s<i.childrenIds.length;s++)OrgChart._exportIterateForJSON_XML_CSV(e,e.getNode(i.childrenIds[s]),o,a);else for(s=0;s<i.children.length;s++)OrgChart._exportIterateForJSON_XML_CSV(e,i.children[s],o,a)}},OrgChart._defaultExportProfileOptionsForCSV_SVG_JSON=function(e,i){return OrgChart.isNEU(e)&&(e={}),"string"==typeof e&&(e={filename:e}),OrgChart.isNEU(e.filename)&&(e.filename=`OrgChart.${i}`),OrgChart.isNEU(e.expandChildren)&&(e.expandChildren=!0),OrgChart.isNEU(e.min)&&(e.min=!0),OrgChart.isNEU(e.openInNewTab)&&(e.openInNewTab=!1),e},OrgChart.prototype.exportToPDFProfile=function(e,i){chart.exportToPDF({format:"A4",pages:[{nodeId:e,isProfile:!0}]},i)},OrgChart.prototype.exportToVisio=function(e,i){var o=this;e=OrgChart._setDefaultOptions(e,"vstx"),this._createExportPages("vstx",e,function(a){for(var s=0;s<e.pages.length;s++)OrgChart.loading.show(e.pages[s].chartInstance);o._requestToExportVisio(a,e,function(a){var s=!0;if(i&&(s=i(a)),!1!==s){if(!1===(s=OrgChart.events.publish("exportend",[o,a])))return OrgChart._exportHideAnimation(e),!1;OrgChart._downloadFile("application/vnd.visio",a,e.fileName,e.openInNewTab,"vsdx")}OrgChart._exportHideAnimation(e)})})},OrgChart.prototype.exportToPDF=function(e,i){var o=this;e=OrgChart._setDefaultOptions(e,"pdf"),this._createExportPages("pdf",e,function(a){for(var s=0;s<e.pages.length;s++)OrgChart.loading.show(e.pages[s].chartInstance);o._requestToExportPDF(a,e,function(a){var s=!0;if(i&&(s=i(a)),!1!==s){if(!1===(s=OrgChart.events.publish("exportend",[o,a])))return OrgChart._exportHideAnimation(e),!1;OrgChart._downloadFile("application/pdf",a,e.fileName,e.openInNewTab,"pdf")}OrgChart._exportHideAnimation(e)})})},OrgChart.prototype.exportToPNG=function(e,i){var o=this;e=OrgChart._setDefaultOptions(e,"png"),this._createExportPages("png",e,function(a){for(var s=0;s<e.pages.length;s++)OrgChart.loading.show(e.pages[s].chartInstance);o._requestToExportPNG(a,e,function(a){var s=!0;if(i&&(s=i(a)),!1!==s){if(!1===(s=OrgChart.events.publish("exportend",[o,a])))return OrgChart._exportHideAnimation(e),!1;1==e.pages.length?OrgChart._downloadFile("image/png",a,e.fileName,e.openInNewTab,"png"):OrgChart._downloadFile("application/zip",a,e.fileName.replaceAll(".png",".zip"),!1,"zip")}OrgChart._exportHideAnimation(e)})})},OrgChart.prototype.exportToSVG=function(e,i){var o=this;e=OrgChart._setDefaultOptions(e,"svg"),this._createExportPages("svg",e,function(a){for(var s=0;s<e.pages.length;s++)OrgChart.loading.show(e.pages[s].chartInstance);o._requestToExportSVG(a,e,function(a){var s=!0;if(i&&(s=i(a)),!1!==s){if(!1===(s=OrgChart.events.publish("exportend",[o,a])))return OrgChart._exportHideAnimation(e),!1;1==e.pages.length?OrgChart._downloadFile("image/svg+xml",a,e.fileName,e.openInNewTab,"svg"):OrgChart._downloadFile("application/zip",a,e.fileName.replaceAll(".svg",".zip"),!1,"zip")}OrgChart._exportHideAnimation(e)})})},OrgChart.prototype.exportToPowerPoint=function(e,i){var o=this;e=OrgChart._setDefaultOptions(e,"pptx"),this._createExportPages("pptx",e,function(a){for(var s=0;s<e.pages.length;s++)OrgChart.loading.show(e.pages[s].chartInstance);o._requestToExportPowerPoint(a,e,function(a){var s=!0;if(i&&(s=i(a)),!1!==s){if(!1===(s=OrgChart.events.publish("exportend",[o,a])))return OrgChart._exportHideAnimation(e),!1;OrgChart._downloadFile("application/msword",a,e.fileName,e.openInNewTab,"pptx")}OrgChart._exportHideAnimation(e)})})},OrgChart._exportHideAnimation=function(e){for(var i=0;i<e.pages.length;i++)OrgChart.loading.hide(e.pages[i].chartInstance)},OrgChart._setDefaultOptions=function(e,i,o){return e||(e={}),e.type=i,null==e.landscape&&("pdf"==i?e.landscape=!1:"pptx"==i&&(e.landscape=!0)),null==e.header&&(e.header=""),null==e.expandChildren&&(e.expandChildren=!1),null==e.childLevels&&(e.childLevels=null),null==e.parentLevels&&(e.parentLevels=null),null==e.min&&(e.min=!0),null==e.format&&("pdf"!=i||o?"pdf"==i&&o?e.format="A4":"pptx"==i&&(e.format="Widescreen"):e.format="auto"),null==e.footer&&("pdf"==i?"auto"==e.format?e.footer="":e.footer='<text style="fill: #aeaeae" x="0" y="15">Page {current-page} of {total-pages}</text>':"png"==i||"svg"==i?e.footer="":"pptx"==i?e.footer='<text style="fill: #aeaeae" x="0" y="15">Slide {current-page} of {total-pages}</text>':"vstx"==i&&(e.footer="")),null==e.fileName&&(e.fileName="OrgChart."+i),null==e.openInNewTab&&(e.openInNewTab=!1),null==e.width&&null==e.height&&("png"==i||"svg"==i||"vstx"==i||"pdf"==i&&"auto"==e.format?(e.width="auto",e.height="auto"):(OrgChart.Screen={width:screen.height/2,height:screen.width/2},e.landscape?(e.width=OrgChart[e.format].height,e.height=OrgChart[e.format].width):(e.width=OrgChart[e.format].width,e.height=OrgChart[e.format].height))),null==e.margin&&(e.margin=[30,20,30,20]),null==e.padding&&(e.padding=0),e.pages||(e.pages=[{}]),e},OrgChart.prototype._requestToExportPDF=function(e,i,o){OrgChart.__requestExport(this.config.serverUrl+"/Export/PDF",i.fileName,e,o)},OrgChart.prototype._requestToExportPNG=function(e,i,o){OrgChart.__requestExport(this.config.serverUrl+"/Export/PNG",i.fileName,e,o)},OrgChart.prototype._requestToExportVisio=function(e,i,o){OrgChart.__requestExport(this.config.serverUrl+"/Export/VSTX",i.fileName,e,o)},OrgChart.prototype._requestToExportSVG=function(e,i,o){OrgChart.__requestExport(this.config.serverUrl+"/Export/SVG",i.fileName,e,o)},OrgChart.prototype._requestToExportPowerPoint=function(e,i,o){OrgChart.__requestExport(this.config.serverUrl+"/Export/PowerPoint",i.fileName,e,o)},OrgChart.__requestExport=function(e,i,o,a){var s={filename:i,pages:o};OrgChart._ajax(e,"POST",JSON.stringify(s),"arraybuffer",function(e){a(e)})},OrgChart.prototype._createExportPages=function(e,i,o){var a=[];if(i.pages.length)for(var s=0;s<i.pages.length;s++)this.__createExportPages(e,s,a,i,o);else o(a)},OrgChart.prototype.__createExportPages=function(e,i,o,a,s){var l=this,c=a.pages[i];if(c.chartInstance||(c.chartInstance=this),void 0===c.expandChildren&&(c.expandChildren=a.expandChildren),void 0===c.childLevels&&(c.childLevels=a.childLevels),void 0===c.parentLevels&&(c.parentLevels=a.parentLevels),void 0===c.min&&(c.min=a.min),void 0===c.header&&(c.header=a.header),void 0===c.footer&&(c.footer=a.footer),null!=c.childLevels&&(c.expandChildren=!1),void 0===c.padding&&(c.padding=a.padding),void 0===c.margin&&(c.margin=a.margin),null!=c.content||!0===c.isProfile){c.isProfile&&(c.content=this._createProfileSvg(a,c));var d=l._createMasterSvg(e,c.content,i,a,null!=c.content);if(o.push(d),l.___createExportPages(e,i,o,a,s))return}else{var h={id:c.nodeId,expandChildren:c.expandChildren,parentLevels:c.parentLevels,childLevels:c.childLevels,min:c.min};a.pages[i].chartInstance._draw(!1,OrgChart.action.exporting,h,function(c,d){var h=l._createMasterSvg(e,c,i,a,!1);o.push(h),l.___createExportPages(e,i,o,a,s)})}},OrgChart.prototype._createMasterSvg=function(e,i,o,a,s){var l=!1;""==i&&(l=!0,i='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="display:block;" width="100" height="100" viewBox="0,0,0,0"><svg>');var c=a.pages[o],d=document.createElementNS("http://www.w3.org/2000/svg","svg");d.setAttribute("xmlns","http://www.w3.org/2000/svg"),d.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),document.body.appendChild(d);var h=OrgChart._getSvgAttributes(i);l?"auto"==a.width?c.width=1e3:c.width=a.width:"auto"==a.width?c.width=h.width+c.margin[3]+c.margin[1]:c.width=a.width;var p=document.createElementNS("http://www.w3.org/2000/svg","g");p.innerHTML=`${c.header.replaceAll("{current-page}",o+1).replaceAll("{total-pages}",a.pages.length)}`,d.appendChild(p),OrgChart._setYAttrToTextElements(c,a,p);var u=p.getBoundingClientRect();u.height&&(u.height+=10),p.setAttribute("transform",`matrix(1,0,0,1,${c.margin[3]},${c.margin[0]})`);var f=document.createElementNS("http://www.w3.org/2000/svg","g");f.innerHTML=`${c.footer.replaceAll("{current-page}",o+1).replaceAll("{total-pages}",a.pages.length)}`,d.appendChild(f),OrgChart._setYAttrToTextElements(c,a,f);var g,m=f.getBoundingClientRect();if(l?"auto"==a.height?c.height=1e3:c.height=a.height:"auto"==a.height?c.height=h.height+c.margin[0]+c.margin[2]+u.height+m.height:c.height=a.height,f.setAttribute("transform",`matrix(1,0,0,1,${c.margin[3]},${c.height-c.margin[2]-m.height})`),d.classList.add("boc-"+this.config.mode),document.body.removeChild(d),!c.isProfile){var b=(c.width-c.margin[3]-c.margin[1])/h.width,x=(c.height-c.margin[0]-c.margin[2]-u.height-m.height)/h.height,v=Math.min(b,x,1);h.width*=v,h.height*=v,h.viewBox[0]-=c.padding,h.viewBox[1]-=c.padding,h.viewBox[2]+=2*c.padding,h.viewBox[3]+=2*c.padding,h.x=(c.width-h.width)/2,h.y=c.margin[0]+u.height+(c.height-c.margin[0]-u.height-c.margin[2]-m.height-h.height)/2}g=s?OrgChart._isSVG(i)?i:`<foreignObject x="0" y="0" width="100%" height="100%">${i}</foreignObject>`:OrgChart._setSvgAttributes(i,h);var y=c.width,_=c.height;return"pdf"!=e||c.isProfile||(y+=2,_+=2),d.setAttribute("width",y),d.setAttribute("height",_),d.innerHTML=g+d.innerHTML,d},OrgChart.prototype._createProfileSvg=function(e,i){var o=this.editUI.content(i.nodeId,!0,!0,"100%",!0).element;return OrgChart.input.init(o),`<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="display:block;" width="${e.width}" height="${e.height}" viewBox="0,0,${e.width},${e.height}"> \n <style>\n form.boc-edit-form, div.boc-edit-form-header {\n border-radius: 0;\n }\n \n </style>\n <foreignobject class="node" x="0" y="0" width="${e.width}" height="${e.height}">${o.outerHTML}</foreignobject>\n </svg>`},OrgChart.prototype.___createExportPages=function(e,i,o,a,s){if(i>=a.pages.length-1){var l={pages:o,options:a,styles:""};if(!1===OrgChart.events.publish("exportstart",[this,l]))return!1;var c=this.mainElement.querySelector("[data-boc-styles]");if(c&&(l.styles+=c.outerHTML),l.styles)for(var d=0;d<l.pages.length;d++){var h=l.pages[d];h.insertAdjacentHTML("afterbegin",l.styles),l.pages[d]=h.outerHTML}return OrgChart.CONVERT_IMAGES_TO_BASE64_BEFORE_EXPORT?OrgChart._convertImagesToBase64(l.pages).then(function(e){l.pages=e,s(l.pages)}):s(l.pages),!0}return!1},OrgChart._setYAttrToTextElements=function(e,i,o){for(var a=o.querySelectorAll("text"),s=0;s<a.length;s++){var l=a[s];if(!l.hasAttribute("y")){var c=l.getBoundingClientRect();l.setAttribute("y",c.height)}if(l.hasAttribute("text-anchor")&&!l.hasAttribute("x")){var d=l.getAttribute("text-anchor").toLowerCase(),h=e.width-e.margin[1]-e.margin[3];"end"==d?l.setAttribute("x",h):"middle"==d&&l.setAttribute("x",h/2)}}},OrgChart.exportUI=function(e){this.instance=null,this.interval=null,this.element=null,this.options=null,this.selectedIndex=0,this.type=e,this.locExport="Export",this.locLandscape="Landscape",this.locPortrait="Portrait",this.locCancel="Close",this.locParentLevels="parent levels",this.locChildLevels="child levels",this.locClickToAdd="Click on a node to display it here",this.locPrintTree="Print tree",this.locPrintProfile="Print profile","pdf"==e?(this.locAddNew="Add new page",this.locRemove="Remove page"):"png"==e?(this.locAddNew="Add new PNG",this.locRemove="Remove PNG"):"svg"==e?(this.locAddNew="Add new SVG",this.locRemove="Remove SVG"):"pptx"==e&&(this.locAddNew="Add new slide",this.locRemove="Remove slide"),this.buttons={parentLevels:!1,childLevels:!0,printProfileOrTree:!0,removePage:!0,addNewPage:!0,landscapePortrait:!0},Object.defineProperty(this,"width",{get(){return this.isVisible()?this.element.offsetWidth:0}}),Object.defineProperty(this,"selectedPage",{get(){var e=this.instance.leftElement.querySelector(".boc-export-selected");if(e){var i=e.getAttribute("data-boc-export-page");return i=parseInt(i),this.options.pages[i]}return null}})},OrgChart.exportUI.prototype.init=function(e){this.instance=e},OrgChart.exportUI.prototype.show=function(e){this.selectedIndex=0,this.instance.pdfPreviewUI.hide(),this.instance.svgPreviewUI.hide(),this.instance.pngPreviewUI.hide(),this.instance.powerPointPreviewUI.hide(),this.instance.aiUI.hide(),this.instance.orgScribeUI.hide(),this.options=OrgChart._setDefaultOptions(e,this.type,!0);var i=this;this.instance._createExportPages(this.type,this.options,function(e){i._init(e)})},OrgChart.exportUI.prototype.isVisible=function(){return null!=this.element},OrgChart.exportUI.prototype.hide=function(){this.instance.leftElement.style.display="none",this.element&&(this.element.parentNode.removeChild(this.element),this.element=null)},OrgChart.exportUI.prototype.refresh=function(){var e=this;this.instance._createExportPages(this.type,this.options,function(i){e._draw(i)})},OrgChart.exportUI.prototype._init=function(e){var i=this;this.element=document.createElement("div"),this.element.setAttribute("data-boc-export-form",""),this.element.style.opacity=0,this.element.classList.add("boc-export-form"),this.element.classList.add(this.instance.config.mode),this.element.style.display="";var o="";"pdf"==this.type&&"auto"!=this.options.format&&(o=`<button ${this.buttons.landscapePortrait?"":'style="display: none;"'} data-boc-export-landcapeportrait>${this.options.landscape?this.locPortrait:this.locLandscape}</button> `),this.element.innerHTML=`<div class="boc-export-container"> \n <div class="boc-export-btns"> \n \n <div class="boc-export-btns-inner"> \n <div class="boc-export-left"> \n <button data-boc-export-cancel>${this.locCancel}</button> \n ${o} \n <button ${this.buttons.addNewPage?"":'style="display: none;"'} data-boc-export-btnnewpage>${this.locAddNew}</button> \n </div> \n <div class="boc-export-right"> \n <button class="boc-export-btn" data-boc-export-export>${this.locExport}</button> \n </div> \n </div> \n </div>\n <div class="boc-export-middle">\n <div class="boc-export-middle-inner" data-boc-export-pages>\n </div>\n </div>\n </div>`,this.instance.leftElement.appendChild(this.element),this.instance.leftElement.style.display="block",this.instance.leftElement.querySelector("[data-boc-export-btnnewpage]").addEventListener("click",function(e){i.addPage({content:""})});var a=this.instance.leftElement.querySelector("[data-boc-export-landcapeportrait]");a&&a.addEventListener("click",function(e){i.toggleLanscape()}),this.instance.leftElement.querySelector("[data-boc-export-pages]").addEventListener("click",function(e){for(var o,a=e.target;a&&a.hasAttribute&&!a.hasAttribute("data-boc-export-page");)a=a.parentNode;a&&a.hasAttribute&&a.hasAttribute("data-boc-export-page")&&(o=a.getAttribute("data-boc-export-page")),e.target.hasAttribute&&(e.target.hasAttribute("data-export-remove")?i.removePage(o):e.target.hasAttribute("data-export-child-plus")?i._incrementDecrementChildLevel(o,!0):e.target.hasAttribute("data-export-child-minus")?i._incrementDecrementChildLevel(o,!1):e.target.hasAttribute("data-export-parent-plus")?i._incrementDecrementParentLevel(o,!0):e.target.hasAttribute("data-export-parent-minus")?i._incrementDecrementParentLevel(o,!1):e.target.hasAttribute("data-export-profiletree")?i.toggelePrintTreeOrProfile(o,!1):i.selectPage(o))});var s=this.instance.leftElement.querySelector("[data-boc-export-cancel]");s&&s.addEventListener("click",function(e){i.hide()});var l=this.instance.leftElement.querySelector("[data-boc-export-export]");l&&l.addEventListener("click",function(e){i.instance.powerPointPreviewUI.isVisible()?i.instance.exportToPowerPoint(i.options):i.instance.pdfPreviewUI.isVisible()?i.instance.exportToPDF(i.options):i.instance.pngPreviewUI.isVisible()?i.instance.exportToPNG(i.options):i.instance.svgPreviewUI.isVisible()&&i.instance.exportToSVG(i.options)}),this.interval&&(clearTimeout(this.interval),this.interval=null),this.interval=OrgChart.animate(this.element,{opacity:0},{opacity:1},300,OrgChart.anim.outSin,function(){i._draw(e)})},OrgChart.exportUI.prototype._draw=function(e){var i=this.instance.leftElement.querySelector("[data-boc-export-pages]");i.innerHTML="";for(var o=0;o<e.length;o++){var a=e[o],s=this.options.pages[o].width/this.options.pages[o].height,l=OrgChart._getSvgAttributes(a);l.viewBox[0]=0,l.viewBox[1]=0,l.viewBox[2]=l.width,l.viewBox[3]=l.height,l.width="100%",l.height="100%";var c=OrgChart._setSvgAttributes(a,l),d=OrgChart._getSvgAttributes;""==this.options.pages[o].content&&(d=" boc-export-empty");var h=`<div ${this.buttons.removePage?"":'style="display: none;"'} class="boc-export-remove-buttons"> \n <button data-export-remove="${o}">${this.locRemove}</button> \n </div>`;"pdf"==this.type&&"auto"!=this.options.format&&!OrgChart.isNEU(this.options.pages[o].nodeId)&&(!this.options.pages[o].content||this.options.pages[o].isProfile&&this.options.pages[o].content)&&(h+=`<div ${this.buttons.printProfileOrTree?"":'style="display: none;"'} class="boc-export-profiletree-buttons"> \n <button data-export-profiletree="${o}">${this.options.pages[o].isProfile?this.locPrintTree:this.locPrintProfile}</button> \n </div>`),this.options.pages[o].isProfile||OrgChart.isNEU(this.options.pages[o].nodeId)||(h=`<div ${this.buttons.parentLevels?"":'style="display: none;"'} class="boc-export-parent-buttons"> \n <button data-export-parent-minus="${o}">-</button> \n <button data-export-parent-plus="${o}">+</button> ${null==this.options.pages[o].parentLevels?"all":this.options.pages[o].parentLevels} ${this.locParentLevels}\n </div> \n <div ${this.buttons.childLevels?"":'style="display: none;"'} class="boc-export-child-buttons"> \n <button data-export-child-minus="${o}">-</button> \n <button data-export-child-plus="${o}">+</button> ${null==this.options.pages[o].childLevels?"all":this.options.pages[o].childLevels} ${this.locChildLevels}\n </div>`+h),i.innerHTML+=`<div data-boc-export-page="${o}" style="aspect-ratio: ${s};" class="boc-export-page ${d}">\n ${c}\n ${h} \n </div>`}this.selectPage(this.selectedIndex)},OrgChart.exportUI.prototype.toggleLanscape=function(){var e=this;this.options.landscape=!this.options.landscape,this.options.width=void 0,this.options.height=void 0,this.options=OrgChart._setDefaultOptions(this.options,this.type,!0),this.instance.leftElement.querySelector("[data-boc-export-landcapeportrait]").innerHTML=this.options.landscape?this.locPortrait:this.locLandscape,this.instance._createExportPages(this.type,this.options,function(i){e._draw(i),e.selectPage(e.options.pages.length-1)})},OrgChart.exportUI.prototype.addPage=function(e){var i=this;this.options.pages.push(e),this.instance._createExportPages(this.type,this.options,function(e){i._draw(e),i.selectPage(i.options.pages.length-1);var o=i.element.querySelector(".boc-export-middle");OrgChart.animate(o,{scrollTop:o.scrollTop},{scrollTop:o.scrollHeight},600,OrgChart.anim.outSin)})},OrgChart.exportUI.prototype.removePage=function(e){e=parseInt(e);var i=this;e<=i.selectedIndex&&(i.selectedIndex--,i.selectedIndex<0&&(i.selectedIndex=0)),this.options.pages.splice(e,1),this.instance._createExportPages(this.type,this.options,function(e){i._draw(e),i.selectPage(i.selectedIndex)})},OrgChart.exportUI.prototype._incrementDecrementChildLevel=function(e,i){var o=this;e<o.selectedIndex&&o.selectedIndex--;var a=this.options.pages[e];null==a.childLevels&&(a.childLevels=i?0:2),i?a.childLevels++:a.childLevels--,-1==a.childLevels&&(a.childLevels=0),a.expandChildren=!1,this.instance._createExportPages(this.type,this.options,function(e){o._draw(e),o.selectPage(o.selectedIndex)})},OrgChart.exportUI.prototype.toggelePrintTreeOrProfile=function(e){var i=this,o=this.options.pages[e];o.isProfile=!o.isProfile,this.options.pages[e].content=void 0,this.instance._createExportPages(this.type,this.options,function(e){i._draw(e),i.selectPage(i.selectedIndex)})},OrgChart.exportUI.prototype._incrementDecrementParentLevel=function(e,i){var o=this;e<o.selectedIndex&&o.selectedIndex--;var a=this.options.pages[e];null==a.parentLevels?a.parentLevels=1:i?a.parentLevels++:a.parentLevels--,-1==a.parentLevels&&(a.parentLevels=0),this.instance._createExportPages(this.type,this.options,function(e){o._draw(e),o.selectPage(o.selectedIndex)})},OrgChart.exportUI.prototype.selectPage=function(e){for(var i=this.instance.leftElement.querySelectorAll("[data-boc-export-page]"),o=0;o<i.length;o++)i[o].classList.remove("boc-export-selected");for(i=this.instance.leftElement.querySelectorAll(".boc-export-select"),o=0;o<i.length;o++)i[o].parentNode.removeChild(i[o]);var a=this.instance.leftElement.querySelectorAll("[data-boc-export-pages] .boc-export-page");if(a.length){var s=a[e];s.classList.contains("boc-export-empty")&&(s.innerHTML+=`<div class="boc-export-select">${this.locClickToAdd}</div>`),s.classList.add("boc-export-selected"),this.selectedIndex=e}},void 0===OrgChart&&(OrgChart={}),OrgChart.events=(e={},{on:function(i,o,a){Array.isArray(e[i])||(e[i]=[]),e[i].push({listener:o,event_id:a})},removeAll:function(i){Array.isArray(e[i])||(e[i]=[]),e[i]=[]},remove:function(i,o,a){var s=!1;if(e[i]&&Array.isArray(e[i])&&e[i].length>0)for(var l=e[i].length-1;l>=0;l--)(!OrgChart.isNEU(a)&&!OrgChart.isNEU(o)&&e[i][l].event_id==a&&e[i][l].listener==o||!OrgChart.isNEU(a)&&OrgChart.isNEU(o)&&e[i][l].event_id==a||OrgChart.isNEU(a)&&!OrgChart.isNEU(o)&&e[i][l].listener==o||OrgChart.isNEU(a)&&OrgChart.isNEU(o))&&(e[i].splice(l,1),s=!0);return s},has:function(i,o){if(e[i]&&Array.isArray(e[i])&&e[i].length>0){if(OrgChart.isNEU(o))return!0;for(var a=0;a<e[i].length;a++)if(e[i][a].event_id==o)return!0}return!1},removeForEventId:function(i){for(var o in e)if(Array.isArray(e[o]))for(var a=e[o].length-1;a>=0;a--)e[o][a].event_id==i&&e[o].splice(a,1)},publish:function(i,o){if(e[i]){for(var a=[],s=0;s<e[i].length;s++){var l=e[i][s];null!=l.event_id&&l.event_id!=o[0]._event_id||a.push(l.listener)}if(a.length>0){var c=!0;for(s=0;s<a.length&&(1==o.length?c=a[s](o[0])&&c:2==o.length?c=a[s](o[0],o[1])&&c:3==o.length?c=a[s](o[0],o[1],o[2])&&c:4==o.length?c=a[s](o[0],o[1],o[2],o[3])&&c:5==o.length&&(c=a[s](o[0],o[1],o[2],o[3],o[4])&&c),!1!==c);s++);return c}}}}),OrgChart.prototype.importCSV=function(){var e=this,i=document.createElement("INPUT");i.setAttribute("type","file"),i.setAttribute("accept",".csv"),i.style.display="none",i.onchange=function(i){var o=i.target,a=new FileReader;a.onload=function(){var i=a.result,o=OrgChart._csvToArray(i),s=[],l=o[0];OrgChart._importSetColumnNames(l,function(i){for(var a=1;a<o.length;a++){for(var l={},c=0;c<o[a].length;c++){var d=i[c],h=o[a][c];l[d]=OrgChart._convertStringToArray(d,h)}""!=l.id.trim()&&s.push(l)}var p={nodes:s,columnNames:o[0]};0!=OrgChart.events.publish("import",[e,p])&&(e._putInUndoStack(),e.clearRedo(),e.config.nodes=p.nodes,e._ai.setContext(),OrgChart.events.publish("updated",[e]),e.filterUI.update(),e.draw())})},a.readAsText(o.files[0])},i.click()},OrgChart._importSetColumnNames=function(e,i){if(-1==e.indexOf("id")||-1==e.indexOf("pid")){var o=document.createElement("DIV"),a=document.createElement("P");a.style.padding="5px",a.style.color="rgb(122, 122, 122)",a.innerHTML=OrgChart.IMPORT_MESSAGE,o.appendChild(a);var s=document.createElement("div"),l=document.createElement("div"),c=document.createElement("div"),d=document.createElement("span");s.setAttribute("id","boc-sampleDialog"),s.style.height="260px",s.style.width="400px",s.style.background="white",s.style.border="0.5px solid grey",s.style.position="fixed",s.style.overflow="hidden",s.style.zIndex="99",l.setAttribute("id","title"),l.style.backgroundColor="#e5e5e5",l.style.fontWeight="bold",l.style.color="rgb(122, 122, 122)",l.style.height="20px",l.style.padding="3px 0 0 7px",d.setAttribute("id","close"),d.style.cursor="pointer",d.style.position="absolute",d.style.color="rgb(122, 122, 122)",d.style.fontWeight="bold",d.style.top="2px",d.style.zIndex=100,c.setAttribute("id","content"),c.style.padding="2px",l.innerHTML="Import Organizational Chart Data",d.innerHTML="&times;";var h=document.createElement("HR");h.style.height="0.1px",h.style.backgroundColor="#aeaeae",h.style.border="none",h.style.margin="0",s.appendChild(l),s.appendChild(h),c.appendChild(o),s.appendChild(c),s.appendChild(d),document.body.appendChild(s),OrgChart._importCenter(s),d.style.left=s.offsetWidth-20+"px";var p=document.createElement("div");p.setAttribute("id","overlay"),p.style.width="100%",p.style.height="100%",p.style.left=0,p.style.top=0,p.style.position="fixed",p.style.background="grey",p.style.opacity="0.5",p.style.zIndex=98,document.body.appendChild(p),s._overlay=p;var u=document.createElement("LABEL"),f=document.createTextNode("Name:");u.setAttribute("for","boc-id-select"),u.appendChild(f),u.style.fontSize="16px",u.style.color="rgb(122, 122, 122)",u.style.padding="5px",u.style.margin="5px",u.style.width="30%",u.style.textAlign="right",u.style.display="inline-block",o.appendChild(u);var g=document.createElement("SELECT");g.id="boc-id-select",g.style.fontSize="16px",g.style.color="rgb(122, 122, 122)",g.style.padding="5px",g.style.margin="5px",g.style.width="60%",g.style.border="1px solid #aeaeae",o.appendChild(g);var m=document.createElement("BR");o.appendChild(m);for(var b=0;b<e.length;b++){(w=document.createElement("option")).setAttribute("value",e[b]);var x=document.createTextNode(e[b]);w.appendChild(x),g.appendChild(w)}var v=document.createElement("LABEL"),y=document.createTextNode("Reports to:");v.setAttribute("for","pid-select"),v.appendChild(y),v.style.fontSize="16px",v.style.color="rgb(122, 122, 122)",v.style.padding="5px",v.style.margin="5px",v.style.width="30%",v.style.textAlign="right",v.style.display="inline-block",o.appendChild(v);var _=document.createElement("SELECT");_.id="pid-select",_.style.fontSize="16px",_.style.color="rgb(122, 122, 122)",_.style.padding="5px",_.style.margin="5px",_.style.width="60%",_.style.border="1px solid #aeaeae",o.appendChild(_);for(b=0;b<e.length;b++){var w;(w=document.createElement("option")).setAttribute("value",e[b]);x=document.createTextNode(e[b]);w.appendChild(x),_.appendChild(w)}var k=document.createElement("BUTTON");k.innerHTML="Import",k.style.fontSize="16px",k.style.color="rgb(122, 122, 122)",k.style.padding="5px 20px",k.style.margin="20px auto",k.style.display="block",k.onclick=function(){s.style.display="none",s._overlay&&s._overlay.parentNode.removeChild(s._overlay);var o=g.options[g.selectedIndex].value,a=e.indexOf(o);e[a]="id";var l=_.options[_.selectedIndex].value,c=e.indexOf(l);e[c]="pid",i(e)};var I=document.createElement("DIV");return I.appendChild(k),o.appendChild(I),d.onclick=function(e){s._overlay&&s._overlay.parentNode.removeChild(s._overlay),s.parentNode.removeChild(s),e.stopPropagation()},l.onmousedown=function(e){e=e||window.event,s._dragging=!0,s._originalLeft=s.offsetLeft,s._originalTop=s.offsetTop,s._mouseLeft=e.clientX,s._mouseTop=e.clientY},document.onmousemove=function(e){e=e||window.event,s._dragging&&(s.style.left=s._originalLeft+e.clientX-s._mouseLeft+"px",s.style.top=s._originalTop+e.clientY-s._mouseTop+"px")},document.onmouseup=function(e){e=e||window.event,s._dragging&&(s.style.left=s._originalLeft+e.clientX-s._mouseLeft+"px",s.style.top=s._originalTop+e.clientY-s._mouseTop+"px",s._dragging=!1)},s}i(e)},OrgChart._importCenter=function(e){e&&(e.style.left=(window.innerWidth-e.offsetWidth)/2+"px",e.style.top=(window.innerHeight-e.offsetHeight)/2+"px")},OrgChart.prototype.importXML=function(){var e=this,i=document.createElement("INPUT");i.setAttribute("type","file"),i.setAttribute("accept",".xml"),i.style.display="none",i.onchange=function(i){var o=i.target,a=new FileReader;a.onload=function(){var i=a.result,o=OrgChart._xml2json(i);0!=OrgChart.events.publish("import",[e,o])&&(e._putInUndoStack(),e.clearRedo(),e.config.nodes=o,e._ai.setContext(),OrgChart.events.publish("updated",[e]),e.filterUI.update(),e.draw())},a.readAsText(o.files[0])},i.click()},OrgChart.prototype.importJSON=function(){var e=this,i=document.createElement("INPUT");i.setAttribute("type","file"),i.setAttribute("accept",".json"),i.style.display="none",i.onchange=function(i){var o=i.target,a=new FileReader;a.onload=function(){var i=a.result,o=JSON.parse(i);0!=OrgChart.events.publish("import",[e,o])&&(e._putInUndoStack(),e.clearRedo(),e.config.nodes=o,e._ai.setContext(),OrgChart.events.publish("updated",[e]),e.filterUI.update(),e.draw())},a.readAsText(o.files[0])},i.click()},OrgChart.prototype.expand=function(e,i,o){this._treeListExpandCollapseHandler(e),this._resetMovableNodes();var a={id:e,ids:i};this._draw(!1,OrgChart.action.expand,a,o)},OrgChart.prototype.collapse=function(e,i,o){this._treeListExpandCollapseHandler(e),this._resetMovableNodes();var a={id:e,ids:i};this._draw(!1,OrgChart.action.collapse,a,o)},OrgChart.prototype.expandCollapse=function(e,i,o,a){this._treeListExpandCollapseHandler(e),this._resetMovableNodes(),Array.isArray(i)||(i=[]),Array.isArray(o)||(o=[]);var s={id:e,expandIds:i,collapseIds:o,ids:i.concat(o)};this._draw(!1,OrgChart.action.collapse,s,a)},OrgChart.prototype.changeRoots=function(e,i,o){this.config.roots=i;var a={id:e,changeRoots:i};this._draw(!1,OrgChart.action.update,a,o)},OrgChart.prototype._resetMovableNodes=function(){if(OrgChart.RESET_MOVABLE_ONEXPANDCOLLAPSE&&null!=this.config.movable){for(var e=!1,i=0;i<this.config.nodes.length;i++){var o=this.config.nodes[i];null!=o.movex&&(o.movex=0,e=!0),null!=o.movey&&(o.movey=0,e=!0)}e&&(this._ai.setContext(),OrgChart.events.publish("updated",[this]))}},OrgChart.prototype.maximize=function(e,i,o,a){var s=this,l={id:e,options:{}};OrgChart.isNEU(l.id)&&(l.id=this.roots[0].id,l.all=!0),l.options.horizontal=!1,l.options.vertical=!1,i&&(l.options.horizontal=i),o&&(l.options.vertical=o),this._draw(!1,OrgChart.action.maximize,l,function(){s.ripple(e),a&&a()})},OrgChart.prototype.minimize=function(e,i){var o=this,a={id:e};OrgChart.isNEU(a.id)&&(a.id=this.roots[0].id,a.all=!0),this._draw(!1,OrgChart.action.minimize,a,function(){o.ripple(e),i&&i()})},OrgChart.prototype._expCollHandler=function(e){this.nodeMenuUI.hide(),this.nodeContextMenuUI.hide(),this.menuUI.hide(),this.nodeCircleMenuUI.hide();var i=this.getNode(e),o=this.getCollapsedIds(i);if(o.length){if(!1===OrgChart.events.publish("expcollclick",[this,!1,e,o]))return!1;this.expand(e,o,!1)}else{if(!1===OrgChart.events.publish("expcollclick",[this,!0,e,i.childrenIds]))return!1;this.collapse(e,i.childrenIds,!1)}},OrgChart.prototype._upHandler=function(e){this.nodeMenuUI.hide(),this.nodeContextMenuUI.hide(),this.menuUI.hide(),this.nodeCircleMenuUI.hide();var i=this._upHandlerCreateArgs(e);if(!1===OrgChart.events.publish("up-click",[this,i]))return!1;this.changeRoots(i.id,i.roots,!1)},OrgChart.prototype._upHandlerCreateArgs=function(e){var i,o=this.getNode(e),a=Object.assign([],this.config.roots),s=this.getNode(o.pid);if(s&&(i=s),i){if(Array.isArray(a)){var l=a.indexOf(o.id);-1!=l&&a.splice(l,1)}else a=[];a.push(i.id)}return{id:o.id,roots:a}},String.prototype.replaceAll||(String.prototype.replaceAll=function(e,i){return this.replace(new RegExp(e,"g"),i)}),String.prototype.endsWith||(String.prototype.endsWith=function(e){return-1!==this.indexOf(e,this.length-e.length)}),String.prototype.splice||(String.prototype.splice=function(e,i,o){return this.slice(0,e)+o+this.slice(e+Math.abs(i))}),String.prototype.insert||(String.prototype.insert=function(e,i){return e>0?this.substring(0,e)+i+this.substr(e):i+this}),Array.prototype.unique||Object.defineProperty(Array.prototype,"unique",{value:function(){for(var e=this.concat(),i=0;i<e.length;++i)for(var o=i+1;o<e.length;++o)e[i]===e[o]&&e.splice(o--,1);return e},writable:!0,configurable:!0,enumerable:!1}),Array.prototype.has||Object.defineProperty(Array.prototype,"has",{value:function(e){for(var i=0;i<this.length;i++)if(this[i]==e)return!0;return!1},writable:!0,configurable:!0,enumerable:!1}),Array.prototype.compare||Object.defineProperty(Array.prototype,"compare",{value:function(e){if(this.length!=e.length)return!1;for(var i=0;i<this.length;i++)if(!e.has(this[i]))return!1;return!0},writable:!0,configurable:!0,enumerable:!1}),Object.assign||Object.defineProperty(Object,"assign",{value:function(e,i){"use strict";if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var o=Object(e),a=1;a<arguments.length;a++){var s=arguments[a];if(null!=s)for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(o[l]=s[l])}return o},writable:!0,configurable:!0}),OrgChart.prototype._clickHandler=function(e,i){if(!(i.button>0)){for(var o=i.target;o!=e;){if(o.hasAttribute(OrgChart.attr.control_expcoll_id)){var a=o.getAttribute(OrgChart.attr.control_expcoll_id),s=this.getNode(a);return void this._expCollHandler(s.id)}if(o.hasAttribute(OrgChart.attr.node_id)){a=o.getAttribute(OrgChart.attr.node_id),s=this.getNode(a);return void this._nodeClickHandler(s.id,i)}if(o.hasAttribute(OrgChart.attr.control_node_menu_id)){i.stopPropagation(),i.preventDefault();a=o.getAttribute(OrgChart.attr.control_node_menu_id),s=this.getNode(a);return void this._nodeMenuClickHandler(s.id,o,i)}if(o.hasAttribute(OrgChart.attr.control_node_circle_menu_id)){i.stopPropagation(),i.preventDefault();a=o.getAttribute(OrgChart.attr.control_node_circle_menu_id);return void this._nodeCircleMenuClickHandler(a)}if(o.hasAttribute(OrgChart.attr.control_node_circle_menu_name))return i.stopPropagation(),void this._nodeCircleMenuItemClickHandler(o,i);if(o.hasAttribute(OrgChart.attr.control_add))return void this._lonelyButtonHandler();if(o.hasAttribute(OrgChart.attr.control_up_id)){a=o.getAttribute(OrgChart.attr.control_up_id);return i.stopPropagation(),i.preventDefault(),void this._upHandler(a)}if(o.hasAttribute(OrgChart.attr.c_link_from))return void OrgChart.events.publish("clink-click",[this,{from:o.getAttribute(OrgChart.attr.c_link_from),to:o.getAttribute(OrgChart.attr.c_link_to),event:i}]);if(o.hasAttribute(OrgChart.attr.s_link_from))return void OrgChart.events.publish("slink-click",[this,{from:o.getAttribute(OrgChart.attr.s_link_from),to:o.getAttribute(OrgChart.attr.s_link_to),event:i}]);if(o.hasAttribute("data-ctrl-n-dotted-close")){a=o.getAttribute("data-ctrl-n-dotted-close");return void this.minimize(a)}if(o.hasAttribute("data-ctrl-n-dotted-open")){a=o.getAttribute("data-ctrl-n-dotted-open");return void this.maximize(a)}o=o.parentNode}OrgChart.events.publish("canvas-click",[this,{event:i}])}},OrgChart.prototype._mouseDownHandler=function(e,i,o,a){var s=this;OrgChart.SEARCH_CLOSE_RESULT_ON_ESCAPE_OR_CLICKOUTSIDE&&this.searchUI.hide(),this.nodeMenuUI.hide(),this.nodeContextMenuUI.hide(),this.menuUI.hide();var l=this.getViewBox(),c=this.getScale(),d=OrgChart._getClientTouchesXY(i,0),h=OrgChart._getClientTouchesXY(i,1),p={diffX:0,diffY:0,x0:d.x,y0:d.y,type:this.config.enablePan?"pan":"pan-not-enabled",viewBoxLeft:l[0],viewBoxTop:l[1],time:Date.now()};i.touches&&i.touches.length>1&&(p.type="pinch",p.dist=Math.sqrt((d.x-h.x)*(d.x-h.x)+(d.y-h.y)*(d.y-h.y)));var u=null;if(a){var f=a.stChildren[0].lcn?a.stChildren[0].lcn:"base";u=s.manager.layoutConfigs[f],p.scrollTop=a.treeList.scrollTop}var g=0,moveHandler=function(e){var i=OrgChart._getClientTouchesXY(e,0);if(p&&"pan"==p.type){clearTimeout(s._timeout),p.diffX=i.x-p.x0,p.diffY=i.y-p.y0,g=Math.max(Math.abs(p.diffY),Math.abs(p.diffX));var o=-p.diffY/c+p.viewBoxTop,d=-p.diffX/c+p.viewBoxLeft;g>3&&(a?(a.treeList.scrollTop=p.scrollTop-p.diffY/c,s._treeListUpdateInterval&&(clearInterval(s._treeListUpdateInterval),s._treeListUpdateInterval=null),s._treeListUpdate(a,u)):(s._hideBeforeAnimation(),s._changeCursorOnPanStart(l,c,e),s._move(o,d,l)))}else if(p&&"pinch"==p.type){var h=OrgChart._getClientTouchesXY(e,1),f=Math.sqrt((i.x-h.x)*(i.x-h.x)+(i.y-h.y)*(i.y-h.y)),m=1+(f-p.dist)/(p.dist/100)/100;p.dist=f;var b=OrgChart._pinchMiddlePointInPercent(s.element,s.width(),s.height(),e);s.zoom(m,b)}},leaveHandler=function(i){if(g<3&&"pinch"!=p.type&&(null==i.touches||i.touches.length<=1))s._clickHandler(e,i);else if("pan"==p.type&&a){var l=Date.now()-p.time,c=Math.abs(g/l);if(c>.5){var d=(f=a.treeList.scrollTop)+400*c*(p.diffY>0?-1:1),h=a.stChildren[0].h;(d=Math.round(d/h)*h)!=f&&(s._treeListUpdateInterval&&(clearInterval(s._treeListUpdateInterval),s._treeListUpdateInterval=null),s._treeListUpdateInterval=OrgChart.animate(null,{},{},1500,OrgChart.anim.outExp,function(){},function(e){a.treeList.scrollTop=e*(d-f)+f,s._treeListUpdate(a,u.orientation)}))}else{var f=a.treeList.scrollTop;h=a.stChildren[0].h;(d=Math.round(a.treeList.scrollTop/h)*h)!=f&&(s._treeListUpdateInterval&&(clearInterval(s._treeListUpdateInterval),s._treeListUpdateInterval=null),s._treeListUpdateInterval=OrgChart.animate(null,{},{},200,OrgChart.anim.outSin,function(){},function(e){a.treeList.scrollTop=e*(d-f)+f,s._treeListUpdate(a,u.orientation)}))}}else"pan"==p.type&&!a&&g>10&&s._draw(!0,OrgChart.action.pan);"pan"!=p.type||a||s._changeCursorOnPanEnd(),p=null,e.removeEventListener(o.move,moveHandler),e.removeEventListener(o.up,leaveHandler),o.leave&&e.removeEventListener(o.leave,leaveHandler),o.touchstart&&e.removeEventListener(o.touchstart,leaveHandler)};e.addEventListener(o.move,moveHandler,{passive:!0}),e.addEventListener(o.up,leaveHandler),o.leave&&e.addEventListener(o.leave,leaveHandler),o.touchstart&&e.addEventListener(o.touchstart,leaveHandler,{passive:!0})},OrgChart.prototype._changeCursorOnPanStart=function(e,i,o){var a=this.getPointerElement();if(a){var s=OrgChart._getOffsetXY(this.element,o),l=s.x/i+e[0]-16/i,c=s.y/i+e[1]-16/i;a.style.display="inherit",a.setAttribute("transform","matrix(0,0,0,0,"+l+","+c+")"),OrgChart.animate(a,{transform:[0,0,0,0,l,c],opacity:0},{transform:[1/i,0,0,1/i,l,c],opacity:1},300,OrgChart.anim.outBack)}else this.element.style.cursor="move"},OrgChart.prototype._changeCursorOnPanEnd=function(){var e=this.getPointerElement();e?e.style.display="none":this.element.style.cursor="initial"},OrgChart.prototype._globalMouseDownHandler=function(e,i){var o={move:"mousemove",up:"mouseup",leave:"mouseleave"};-1!=i.type.indexOf("touch")&&(1==i.touches.length?this._touch={x:i.touches[0].clientX,y:i.touches[0].clientY}:this._touch=null,o={move:"touchmove",up:"touchend",touchstart:"touchstart"}),this._treeListUpdateInterval&&(clearInterval(this._treeListUpdateInterval),this._treeListUpdateInterval=null);for(var a=null,s=i.target;s!=e&&!s.hasAttribute(OrgChart.attr.control_node_menu_id)&&!s.hasAttribute(OrgChart.attr.control_node_circle_menu_id);){if(s.hasAttribute){var l=null;s.hasAttribute(OrgChart.attr.node_id)?l=this.getNode(s.getAttribute(OrgChart.attr.node_id)):s.hasAttribute(OrgChart.attr.control_expcoll_id)?l=this.getNode(s.getAttribute(OrgChart.attr.control_expcoll_id)):(s.hasAttribute(OrgChart.attr.control_node_menu_id)||s.hasAttribute(OrgChart.attr.control_node_menu_id))&&(l=this.getNode(s.getAttribute(OrgChart.attr.control_node_menu_id))),a||(a=OrgChart._getScrollableTreeListNodeInTouchEnabledDevice(l))}if(s.hasAttribute(OrgChart.attr.node_id)&&!a&&(this.config.enableDragDrop||this.config.movable)){if(null==i.touches||i.touches.length<=1)return void this._nodeMouseDownHandler(s,i,o)}else if(s.hasAttribute(OrgChart.attr.control_node_circle_menu_name)){if(i.stopPropagation(),null==i.touches||i.touches.length<=1)return void this._nodeCircleNodeMenuItemMouseDownHandler(e,s,i,o)}else if(s.hasAttribute("data-treelist-thumb")&&(i.stopPropagation(),null==i.touches||i.touches.length<=1))return void this._treeListThumbMouseDownHandler(s,i,o);s=s.parentNode}i.stopPropagation(),this._mouseDownHandler(e,i,o,a)},OrgChart.prototype._globalContextHandler=function(e,i){for(var o=i.target;o!=e;){if(o.hasAttribute(OrgChart.attr.node_id)){var a=o.getAttribute(OrgChart.attr.node_id),s=this.getNode(a);return void this._nodeContextHandler(s.id,i)}o=o.parentNode}},OrgChart.prototype._nodeContextHandler=function(e,i){i.preventDefault(),OrgChart.SEARCH_CLOSE_RESULT_ON_ESCAPE_OR_CLICKOUTSIDE&&this.searchUI.hide(),this.nodeMenuUI.hide(),this.nodeContextMenuUI.hide(),this.menuUI.hide(),this.nodeCircleMenuUI.hide();var o=this.get(e),a=null;if(null!=o&&Array.isArray(o.tags))for(var s=0;s<o.tags.length;s++){var l=o.tags[s];this.config.tags[l]&&this.config.tags[l].nodeContextMenu&&(a=this.config.tags[l].nodeContextMenu)}var c=this.element.getBoundingClientRect(),d=i.clientX-c.left,h=i.clientY-c.top;this.nodeContextMenuUI.show(d,h,e,null,a)},OrgChart.prototype._globalDbClickHandler=function(e,i){for(var o=i.target;o!=e;){if(o.hasAttribute(OrgChart.attr.node_id)){var a=o.getAttribute(OrgChart.attr.node_id),s=this.getNode(a);return void this._nodeDbClickHandler(s.id,i)}o=o.parentNode}},OrgChart.prototype._mouseScrollHandler=function(e,i){for(var o=!1,a=i.target,s=null;a&&a.hasAttribute&&!a.hasAttribute("data-n-id")&&!a.hasAttribute("data-ctrl-ec-id");)a=a.parentNode;if(a.hasAttribute&&a.hasAttribute("data-n-id")){var l=a.getAttribute("data-n-id");(s=this.getNode(l)).isTreeListItem&&(o=!0)}if(a.hasAttribute&&a.hasAttribute("data-ctrl-ec-id")){l=a.getAttribute("data-ctrl-ec-id");(s=this.getNode(l)).isTreeListItem&&(o=!0)}i.ctrlKey&&(o=!1),o?this.__mouseScrollHandlerTreeList(s,i):this.__mouseScrollHandler(this.getSvg(),i)},OrgChart.prototype.__mouseScrollHandler=function(e,i){if(i.ctrlKey){if(this.config.mouseScrool==OrgChart.action.zoom)return}else{if(this.config.mouseScrool==OrgChart.action.ctrlZoom)return;if(this.config.mouseScrool!=OrgChart.action.zoom)return}if(i.preventDefault(),!navigator.hardwareConcurrency||navigator.hardwareConcurrency<9){let a=i.deltaY/1e3;a=Math.abs(a)<.1?.1*i.deltaY/Math.abs(i.deltaY):a;var o=OrgChart._centerPointInPercent(e,i.clientX,i.clientY);this.zoom(1-a,o)}else{var a=this,s=!1,l=this.config.zoom.speed,c=this.config.zoom.smooth,d=0,h=this.getScale();o=OrgChart._centerPointInPercent(e,i.clientX,i.clientY);var p=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){setTimeout(e,20)};i.preventDefault();var u=i.delta||i.wheelDelta;void 0===u&&(u=-i.detail),u=Math.max(-1,Math.min(1,u)),d+=-u*l,s||function update(){s=!0;var e=(d-h)/c;e>0?e++:e--,h+=e,a.zoom(1-e/12/50,o),parseInt(h)==parseInt(d)?s=!1:p(update)}()}},OrgChart.prototype._nodeCircleNodeMenuItemMouseDownHandler=function(e,i,o,a){var s=i.parentNode.getAttribute(OrgChart.attr.control_node_circle_menu_wrraper_id),l=i.getAttribute(OrgChart.attr.control_node_circle_menu_name),c=this.nodeCircleMenuUI._menu[l];if(c.draggable){var d=this,h=OrgChart._getClientXY(o),p=this.getNode(s);i._dragEventFired=!1;var u=d.getScale(),f=null,g=null;document.body.style.mozUserSelect=document.body.style.webkitUserSelect=document.body.style.userSelect="none";var m=this.getSvg(),b={x:h.x,y:h.y},x=i.cloneNode(!0);m.insertBefore(x,m.firstChild);var v=OrgChart._getTransform(x),y=v[4],_=v[5],w=function(e){for(;e&&!e.hasAttribute(OrgChart.attr.control_node_circle_menu_wrraper_id);)e=e.parentNode;if(e){var i=OrgChart._getTransform(e);return{x:i[4],y:i[5]}}console.error("cannot find parent"+OrgChart.attr.control_node_circle_menu_wrraper_id)}(i);x.setAttribute("transform","matrix(1,0,0,1,"+(y+w.x)+","+(_+w.y)+")"),x.style.opacity=.7;var removeOpacity=function(e,i){if(null!=e){i.classList.remove("boc-drag-over");for(var o=OrgChart.getStParentNodes(d.getNode(f)),a=0;a<o.length;a++){var s=d.getNodeElement(o[a].id);s&&(s.style.opacity=1)}}},moveHandler=function(e){if(b){var o=OrgChart._getClientXY(e),a=e.target;OrgChart.isMobile()&&(a=document.elementFromPoint(o.x,o.y)),o.x+=w.x*u,o.y+=w.y*u;var s=OrgChart._getOffsetXY(d.element,e),h={left:d.width()-(s.x+d.config.padding)<0,right:s.x-d.config.padding<0,up:d.height()-(s.y+d.config.padding)<0,down:s.y-d.config.padding<0};if(h.left||h.right||h.up||h.down){m.classList&&(m.classList.remove("boc-cursor-grab"),m.classList.add("boc-cursor-move"),m.classList.remove("boc-cursor-nodrop"),m.classList.remove("boc-cursor-copy"));var p=v[4],k=v[5],I=b.x,S=b.y,C=o.x,L=o.y;d.moveStart(h,function(e){v[4]=p+e.x,v[5]=k+e.y,b.x=I-e.xWithoutScale,b.y=S-e.yWithoutScale,o.x=C-e.xWithoutScale,o.y=L-e.yWithoutScale,x.setAttribute("transform","matrix("+v.toString()+")")})}else{for(d.moveEnd(),m.classList&&(m.classList.add("boc-cursor-grab"),m.classList.remove("boc-cursor-move"),m.classList.remove("boc-cursor-nodrop"),m.classList.remove("boc-cursor-copy")),removeOpacity(f,g),f=null,g=null;null!=a&&a!=m;){if(a.hasAttribute&&a.hasAttribute(OrgChart.attr.node_id)){var A=a.getAttribute(OrgChart.attr.node_id);f=A,g=a;break}a=a.parentNode}if(null!=f){g.classList.add("boc-drag-over");for(var E=d.getNode(f),N=OrgChart.getStParentNodes(E),$=0;$<N.length;$++){var M=d.getNodeElement(N[$].id);M&&(M.style.opacity=.1)}m.classList.remove("boc-cursor-grab"),m.classList.remove("boc-cursor-move"),m.classList.add("boc-cursor-copy"),m.classList.remove("boc-cursor-nodrop")}var T=(o.x-b.x)/u,P=(o.y-b.y)/u;v[4]=y+T,v[5]=_+P,!i._dragEventFired&&(Math.abs(o.x-b.x)>OrgChart.FIRE_DRAG_NOT_CLICK_IF_MOVE||Math.abs(o.y-b.y)>OrgChart.FIRE_DRAG_NOT_CLICK_IF_MOVE)&&(d._gragStartedId=i.parentNode.getAttribute(OrgChart.attr.control_node_circle_menu_wrraper_id),!1===OrgChart.events.publish("drag",[d.nodeCircleMenuUI,{from:A,menuItem:c,menuItemName:l}])&&leaveHandler(),i._dragEventFired=!0),x.setAttribute("transform","matrix("+v.toString()+")")}}},leaveHandler=function(e){if(d.moveEnd(),m.classList&&(m.classList.remove("boc-cursor-grab"),m.classList.remove("boc-cursor-move"),m.classList.remove("boc-cursor-nodrop"),m.classList.remove("boc-cursor-copy")),m.removeEventListener(a.move,moveHandler),m.removeEventListener(a.up,leaveHandler),a.leave&&m.removeEventListener(a.leave,leaveHandler),p.id==f||null==f)return m.removeChild(x),d._gragStartedId=null,void(i._dragEventFired&&OrgChart.events.publish("drop",[d.nodeCircleMenuUI,{from:p.id,menuItemName:l,menuItem:c,event:e}]));var o=d.getNode(f);OrgChart.events.publish("drop",[d.nodeCircleMenuUI,{from:p.id,to:o.id,menuItem:c,menuItemName:l,event:e}]),removeOpacity(f,g),m.removeChild(x),d._gragStartedId=null};m.addEventListener(a.move,moveHandler),m.addEventListener(a.up,leaveHandler),a.leave&&m.addEventListener(a.leave,leaveHandler)}else this._clickHandler(e,o)},OrgChart.prototype._nodeMouseDownHandler=function(e,i,o){var a=e.getAttribute(OrgChart.attr.node_id),s=this.getNode(a);this.config.movable&&!OrgChart.getRootOf(s).stParent?this._movableHandler(e,i,o):this.config.enableDragDrop&&this._dragDropHandler(e,i,o)},OrgChart.prototype._resizeHandler=function(e,i){if(this.isVisible&&0!=e&&0!=i){var o=this.getViewBox();if(o){var a=e/(o=o.slice(0))[2],s=i/o[3];Math.abs(this._lastSize.width-e)>Math.abs(this._lastSize.height-i)?o[3]=i/a:o[2]=e/s,this.nodeMenuUI.hide(),this.nodeContextMenuUI.hide(),this.menuUI.hide(),this.nodeCircleMenuUI.hide(),this.setViewBox(o),this.xScrollUI.create(e),this.yScrollUI.create(i),this._draw(!0,OrgChart.action.resize)}}},OrgChart.prototype._nodeDbClickHandler=function(e,i){if(!1===OrgChart.events.publish("dbclick",[this,this.get(e)]))return!1;this._commonClickHandler(e,i,this.config.nodeMouseDbClick)},OrgChart.prototype._nodeClickHandler=function(e,i){if(!1===OrgChart.events.publish("click",[this,{node:this.getNode(e),event:i}]))return!1;if(this.powerPointPreviewUI.isVisible()&&null!=this.powerPointPreviewUI.selectedPage)return this.powerPointPreviewUI.selectedPage.content=void 0,this.powerPointPreviewUI.selectedPage.nodeId=e,this.powerPointPreviewUI.refresh(e),void this.ripple(e,i.clientX,i.clientY);if(this.pdfPreviewUI.isVisible()&&null!=this.pdfPreviewUI.selectedPage)return this.pdfPreviewUI.selectedPage.content=void 0,this.pdfPreviewUI.selectedPage.nodeId=e,this.pdfPreviewUI.refresh(e),void this.ripple(e,i.clientX,i.clientY);if(this.svgPreviewUI.isVisible()&&null!=this.svgPreviewUI.selectedPage)return this.svgPreviewUI.selectedPage.content=void 0,this.svgPreviewUI.selectedPage.nodeId=e,this.svgPreviewUI.refresh(e),void this.ripple(e,i.clientX,i.clientY);if(this.pngPreviewUI.isVisible()&&null!=this.pngPreviewUI.selectedPage)return this.pngPreviewUI.selectedPage.content=void 0,this.pngPreviewUI.selectedPage.nodeId=e,this.pngPreviewUI.refresh(e),void this.ripple(e,i.clientX,i.clientY);var o=this.getNodeElement(e);o&&o._dragEventFired?o._dragEventFired=!1:this._commonClickHandler(e,i,this.config.nodeMouseClick)},OrgChart.prototype._nodeCircleMenuItemClickHandler=function(e,i){var o=e.parentNode.getAttribute(OrgChart.attr.control_node_circle_menu_wrraper_id),a=e.getAttribute(OrgChart.attr.control_node_circle_menu_name),s=this.nodeCircleMenuUI._menu[a];OrgChart.events.publish("click",[this.nodeCircleMenuUI,{nodeId:o,menuItemName:a,menuItem:s,event:i}])},OrgChart.prototype._nodeCircleMenuClickHandler=function(e){if(OrgChart.SEARCH_CLOSE_RESULT_ON_ESCAPE_OR_CLICKOUTSIDE&&this.searchUI.hide(),this.nodeMenuUI.hide(),this.menuUI.hide(),this.nodeContextMenuUI.isVisible())this.nodeContextMenuUI.hide();else{var i=this.getNode(e),o=null;if(Array.isArray(i.tags))for(var a=0;a<i.tags.length;a++){var s=i.tags[a];this.config.tags[s]&&this.config.tags[s].nodeCircleMenu&&(o=this.config.tags[s].nodeCircleMenu)}this.nodeCircleMenuUI.show(e,o)}},OrgChart.prototype._commonClickHandler=function(e,i,o){var a;(OrgChart.SEARCH_CLOSE_RESULT_ON_ESCAPE_OR_CLICKOUTSIDE&&this.searchUI.hide(),this.nodeMenuUI.hide(),this.nodeContextMenuUI.hide(),this.menuUI.hide(),this.nodeCircleMenuUI.hide(),o==OrgChart.action.expandCollapse&&this.toggleExpandCollapse(e,i),o==OrgChart.action.edit)&&((a=this.getNode(e))&&(this.editUI.show(a.id),this.ripple(a.id,i.clientX,i.clientY)));o==OrgChart.action.details&&((a=this.getNode(e))&&(this.editUI.show(a.id,!0),this.ripple(a.id,i.clientX,i.clientY)))},OrgChart.prototype._menuHandlerMouseDownHandler=function(e,i){i.stopPropagation(),i.preventDefault()},OrgChart.prototype._nodeMenuClickHandler=function(e,i,o){OrgChart.SEARCH_CLOSE_RESULT_ON_ESCAPE_OR_CLICKOUTSIDE&&this.searchUI.hide(),this.nodeMenuUI.hide(),this.nodeContextMenuUI.hide(),this.menuUI.hide(),this.nodeCircleMenuUI.hide();var a=this.getNode(e),s=null;if(Array.isArray(a.tags))for(var l=0;l<a.tags.length;l++){var c=a.tags[l];this.config.tags[c]&&this.config.tags[c].nodeMenu&&(s=this.config.tags[c].nodeMenu)}this.nodeMenuUI.showStickIn(i,e,null,s)},OrgChart.prototype._menuClickHandler=function(e,i){i.stopPropagation(),i.preventDefault(),this.nodeMenuUI.hide(),this.nodeContextMenuUI.hide(),this.menuUI.show(e.offsetLeft,e.offsetTop)},OrgChart.prototype._lonelyButtonHandler=function(){var e={id:this.generateId()};!1!==this.addNode(e,null,!0)&&this.center(e.id)},OrgChart.prototype.toggleExpandCollapse=function(e,i){var o=this.getNode(e),a=this.getCollapsedIds(o);if(a.length){if(!1===OrgChart.events.publish("expcollclick",[this,!1,e,a]))return!1;this.expand(e,a,!1)}else{if(!1===OrgChart.events.publish("expcollclick",[this,!0,e,o.childrenIds]))return!1;this.collapse(e,o.childrenIds,!1)}i&&this.ripple(o.id,i.clientX,i.clientY)},OrgChart.prototype._dragDropHandler=function(e,i,o){var a=OrgChart._getClientXY(i),s=e.getAttribute(OrgChart.attr.node_id),l=this.getNode(s);e._dragEventFired=!1;var c=null,d=null;this.element.style.mozUserSelect=this.element.style.webkitUserSelect=this.element.style.userSelect="none";var h=this,p=this.getSvg(),u={x:a.x,y:a.y},f=OrgChart._getTransform(e),g=f[4],m=f[5],b=h.getScale(),x=e.cloneNode(!0);x.setAttribute("data-n-id","draging"),p.insertBefore(x,p.firstChild),x.style.opacity=.7;var removeOpacity=function(e,i){if(null!=e){i.classList.remove("boc-drag-over");for(var o=h.getNode(c),a=OrgChart.getStParentNodes(o),s=0;s<a.length;s++){var l=h.getNodeElement(a[s].id);l&&(l.style.opacity=1)}}},moveHandler=function(i){if(null!=i.touches&&i.touches.length>1)leaveHandler(i);else if(u){var o=OrgChart._getClientXY(i),a=i.target;OrgChart.isMobile()&&(a=document.elementFromPoint(o.x,o.y));var s=OrgChart._getOffsetXY(h.element,i),v={left:h.width()-(s.x+h.config.padding)<0,right:s.x-h.config.padding<0,up:h.height()-(s.y+h.config.padding)<0,down:s.y-h.config.padding<0};if(v.left||v.right||v.up||v.down){p.classList&&(p.classList.remove("boc-cursor-grab"),p.classList.add("boc-cursor-move"),p.classList.remove("boc-cursor-nodrop"),p.classList.remove("boc-cursor-copy"));var y=f[4],_=f[5],w=u.x,k=u.y,I=o.x,S=o.y;h.moveStart(v,function(e){f[4]=y+e.x,f[5]=_+e.y,u.x=w-e.xWithoutScale,u.y=k-e.yWithoutScale,o.x=I-e.xWithoutScale,o.y=S-e.yWithoutScale,x.setAttribute("transform","matrix("+f.toString()+")")})}else{if(h.moveEnd(),p.classList&&(p.classList.add("boc-cursor-grab"),p.classList.remove("boc-cursor-move"),p.classList.remove("boc-cursor-nodrop"),p.classList.remove("boc-cursor-copy")),removeOpacity(c,d),c=null,d=null,h.config.enableDragDrop)for(;null!=a&&a!=p;){if(a.hasAttribute&&a.hasAttribute(OrgChart.attr.node_id)){var C=a.getAttribute(OrgChart.attr.node_id);if(h._gragStartedId&&C!=h._gragStartedId){c=C,d=a;break}}a=a.parentNode}if("draging"==c&&(c=null,d=null),null!=c){d.classList.add("boc-drag-over");for(var L=h.getNode(c),A=OrgChart.getStParentNodes(L),E=0;E<A.length;E++){var N=h.getNodeElement(A[E].id);N&&(N.style.opacity=.1)}!h.canUpdateLink(l.id,c)&&p.classList?(p.classList.remove("boc-cursor-grab"),p.classList.remove("boc-cursor-move"),p.classList.remove("boc-cursor-copy"),p.classList.add("boc-cursor-nodrop")):p.classList&&(p.classList.remove("boc-cursor-grab"),p.classList.remove("boc-cursor-move"),p.classList.add("boc-cursor-copy"),p.classList.remove("boc-cursor-nodrop"))}var $=(o.x-u.x)/b,M=(o.y-u.y)/b;f[4]=g+$,f[5]=m+M,!e._dragEventFired&&(Math.abs(o.x-u.x)>OrgChart.FIRE_DRAG_NOT_CLICK_IF_MOVE||Math.abs(o.y-u.y)>OrgChart.FIRE_DRAG_NOT_CLICK_IF_MOVE)&&(h._gragStartedId=C,!1===OrgChart.events.publish("drag",[h,C,i])&&leaveHandler(),e._dragEventFired=!0),x.setAttribute("transform","matrix("+f.toString()+")")}}},leaveHandler=function(i){if(!e._dragEventFired&&(null==i.touches||i.touches.length<=1)&&h._clickHandler(h.getSvg(),i),h.moveEnd(),p.classList&&(p.classList.remove("boc-cursor-grab"),p.classList.remove("boc-cursor-move"),p.classList.remove("boc-cursor-nodrop"),p.classList.remove("boc-cursor-copy")),p.removeEventListener(o.move,moveHandler),p.removeEventListener(o.up,leaveHandler),o.leave&&p.removeEventListener(o.leave,leaveHandler),l.id==c||null==c)return e._dragEventFired&&OrgChart.events.publish("drop",[h,l.id,void 0,x,i]),p.removeChild(x),void(h._gragStartedId=null);var a=h.getNode(c);if(!1===OrgChart.events.publish("drop",[h,l.id,a.id,x,i]))return removeOpacity(c,d),p.removeChild(x),void(h._gragStartedId=null);if(h.canUpdateLink(l.id,c)){var s=h.get(l.id);s.pid=c,s.stpid=null,null!=s.movex&&(s.movex=void 0),null!=s.movey&&(s.movey=void 0),h.updateNode(s,null,!0)}else p.removeChild(x),removeOpacity(c,d);h._gragStartedId=null};p.addEventListener(o.move,moveHandler),p.addEventListener(o.up,leaveHandler),o.leave&&p.addEventListener(o.leave,leaveHandler)},OrgChart.prototype._movableHandler=function(e,i,o){var a=this,s=e.getAttribute(OrgChart.attr.node_id),l=[],iterate=function(e,i){if(Array.isArray(e))for(var o=0;o<e.length;o++)iterate(e[o],i);else{i.push(e.id);for(o=0;o<e.stChildren.length;o++)iterate(e.stChildren[o],i);for(o=0;o<e.children.length;o++)iterate(e.children[o],i)}},iterateIds=function(e,i){if(Array.isArray(e))for(var o=0;o<e.length;o++)iterate(e[o],i);else{i.push(e.id);for(o=0;o<e.stChildrenIds.length;o++)iterateIds(a.getNode(e.stChildrenIds[o]),i);for(o=0;o<e.childrenIds.length;o++)iterateIds(a.getNode(e.childrenIds[o]),i)}},c=this.getNode(s);iterate(c,l);for(var d=this.getSvg(),h=OrgChart._getClientXY(i),p=[],u=[],f=[],g=[],m=[],b=[],x=[],v=[],y=0;y<l.length;y++){var _=this.getNode(l[y]);p.push(_),f.push({x:_.x,y:_.y});var w=this.getNodeElement(l[y]);if(w){m.push(w);var k=OrgChart._getTransform(w);g.push({x:k[4],y:k[5]}),u.push(k);var I=this.element.querySelector(`[data-ctrl-ec-id="${l[y]}"]`);if(I){b.push(I);var S=OrgChart._getTransform(I);x.push(S),v.push({x:S[4],y:S[5]})}else b.push(null),x.push(null),v.push(null);if(this.config.movable==OrgChart.movable.node)break}}e._dragEventFired=!1;var C=null,L=null;document.body.style.mozUserSelect=document.body.style.webkitUserSelect=document.body.style.userSelect="none";var A={x:h.x,y:h.y},E=a.getScale(),removeOpacity=function(e,i){if(null!=e){i.classList.remove("boc-drag-over");for(var o=a.getNode(C),s=OrgChart.getStParentNodes(o),l=0;l<s.length;l++){var c=a.getNodeElement(s[l].id);c&&(c.style.opacity=1)}}},moveHandler=function(i){if(null!=i.touches&&i.touches.length>1)leaveHandler(i);else if(A){var o=OrgChart._getClientXY(i),h=i.target;OrgChart.isMobile()&&(h=document.elementFromPoint(o.x,o.y));var y=OrgChart._getOffsetXY(a.element,i),_={left:a.width()-(y.x+a.config.padding)<0,right:y.x-a.config.padding<0,up:a.height()-(y.y+a.config.padding)<0,down:y.y-a.config.padding<0};if(_.left||_.right||_.up||_.down){d.classList&&(d.classList.remove("boc-cursor-grab"),d.classList.add("boc-cursor-move"),d.classList.remove("boc-cursor-nodrop"),d.classList.remove("boc-cursor-copy"));for(var w=[],k=[],I=[],S=[],N=0;N<u.length;N++)w.push(u[N][4]),k.push(u[N][5]),x[N]?(I.push(x[N][4]),S.push(x[N][5])):(I.push(null),S.push(null));var $=A.x,M=A.y,T=o.x,P=o.y;a.moveStart(_,function(e){for(var i=0;i<u.length;i++){var s=w[i],l=k[i],c=I[i],d=S[i];u[i][4]=s+e.x,u[i][5]=l+e.y,A.x=$-e.xWithoutScale,A.y=M-e.yWithoutScale,o.x=T-e.xWithoutScale,o.y=P-e.yWithoutScale,p[i].x=s+e.x,p[i].y=l+e.y,p[i].movex=e.x,p[i].movey=e.y,x[i]&&(x[i][4]=c+e.x,x[i][5]=d+e.y);for(var h=OrgChart.ui.link(p[i],a,E,a.response.bordersByRootIdAndLevel,a.nodes,OrgChart.action.update,!0),f=0;f<h.length;f++){var g=h[f];(v=a.element.querySelector(`[data-l-id="[${g.id}][${g.childId}]"]`))&&(v.innerHTML=g.html)}if(p[i].parent)for(h=OrgChart.ui.link(p[i].parent,a,E,a.response.bordersByRootIdAndLevel,a.nodes,OrgChart.action.update,!0),f=0;f<h.length;f++){var v;g=h[f];(v=a.element.querySelector(`[data-l-id="[${g.id}][${g.childId}]"]`))&&(v.innerHTML=g.html)}m[i].setAttribute("transform","matrix("+u[i].toString()+")"),b[i]&&b[i].setAttribute("transform","matrix("+x[i].toString()+")")}})}else{if(a.moveEnd(),d.classList&&(d.classList.add("boc-cursor-grab"),d.classList.remove("boc-cursor-move"),d.classList.remove("boc-cursor-nodrop"),d.classList.remove("boc-cursor-copy")),removeOpacity(C,L),C=null,L=null,a.config.enableDragDrop)for(;null!=h&&h!=d;){if(h.hasAttribute&&h.hasAttribute(OrgChart.attr.node_id)){var U=h.getAttribute(OrgChart.attr.node_id);if(a._gragStartedId&&U!=a._gragStartedId){C=U,L=h;break}}h=h.parentNode}if(null!=C){L.classList.add("boc-drag-over");for(var O=a.getNode(C),R=OrgChart.getStParentNodes(O),B=0;B<R.length;B++){var F=a.getNodeElement(R[B].id);F&&(F.style.opacity=.1)}!a.canUpdateLink(p[0].id,C)&&d.classList?(d.classList.remove("boc-cursor-grab"),d.classList.remove("boc-cursor-move"),d.classList.remove("boc-cursor-copy"),d.classList.add("boc-cursor-nodrop")):d.classList&&(d.classList.remove("boc-cursor-grab"),d.classList.remove("boc-cursor-move"),d.classList.add("boc-cursor-copy"),d.classList.remove("boc-cursor-nodrop"))}var H=(o.x-A.x)/E,D=(o.y-A.y)/E;for(N=0;N<u.length;N++){u[N][4]=g[N].x+H,u[N][5]=g[N].y+D,x[N]&&(x[N][4]=v[N].x+H,x[N][5]=v[N].y+D),p[N].x=f[N].x+H,p[N].y=f[N].y+D;var z=OrgChart.ui.link(p[N],a,E,a.response.bordersByRootIdAndLevel,a.nodes,OrgChart.action.update,!0);for(B=0;B<z.length;B++){var j=z[B];(q=a.element.querySelector(`[data-l-id="[${j.id}][${j.childId}]"]`))&&(q.innerHTML=j.html)}}if(c.parent)if(a.config.movable==OrgChart.movable.detachTree){(q=a.element.querySelector(`[data-l-id="[${c.parent.id}][${c.id}]"]`))&&q.parentElement.removeChild(q)}else for(z=OrgChart.ui.link(c.parent,a,E,a.response.bordersByRootIdAndLevel,a.nodes,OrgChart.action.update,!0),B=0;B<z.length;B++){var q;j=z[B];(q=a.element.querySelector(`[data-l-id="[${j.id}][${j.childId}]"]`))&&(q.innerHTML=j.html)}if(!e._dragEventFired&&(Math.abs(o.x-A.x)>OrgChart.FIRE_DRAG_NOT_CLICK_IF_MOVE||Math.abs(o.y-A.y)>OrgChart.FIRE_DRAG_NOT_CLICK_IF_MOVE)){if(a._gragStartedId=l[0],!1===OrgChart.events.publish("drag",[a,s,i,l])&&leaveHandler(),a.config.enableDragDrop)for(N=0;N<m.length;N++)d.insertBefore(m[N],d.firstChild);e._dragEventFired=!0}for(N=0;N<u.length;N++)m[N].setAttribute("transform","matrix("+u[N].toString()+")"),b[N]&&b[N].setAttribute("transform","matrix("+x[N].toString()+")")}}},leaveHandler=function(s){!e._dragEventFired&&(null==s.touches||s.touches.length<=1)&&a._clickHandler(a.getSvg(),i);for(var l=0;l<p.length;l++)p[l].x=f[l].x,p[l].y=f[l].y;if(a.moveEnd(),d.classList&&(d.classList.remove("boc-cursor-grab"),d.classList.remove("boc-cursor-move"),d.classList.remove("boc-cursor-nodrop"),d.classList.remove("boc-cursor-copy")),d.removeEventListener(o.move,moveHandler),d.removeEventListener(o.up,leaveHandler),o.leave&&d.removeEventListener(o.leave,leaveHandler),p[0].id!=C&&null!=C){var h=a.getNode(C);if(!1===(u=OrgChart.events.publish("drop",[a,p[0].id,h.id,m[0],s])))return removeOpacity(C,L),void(a._gragStartedId=null);if(a.canUpdateLink(p[0].id,C))(y=a.get(p[0].id)).pid=C,y.stpid=null,a.updateNode(y,null,!0);else removeOpacity(C,L);a._gragStartedId=null}else{if(e._dragEventFired){var u=OrgChart.events.publish("drop",[a,p[0].id,void 0,m[0],s]);if(a.config.movable&&!1!==u)if(a.config.movable==OrgChart.movable.detachTree){var g=OrgChart._getTransform(a.getNodeElement(c.id));(y=a.get(c.id)).pid=null,y.stpid=null,a.updateNode(y,null,!0)}else{var b=[];a.config.movable==OrgChart.movable.node?b.push(c.id):iterateIds(c,b);var x=(g=OrgChart._getTransform(a.getNodeElement(c.id)))[4]-c.x,v=g[5]-c.y;for(l=0;l<b.length;l++){var y;(y=a.get(b[l]))&&(null!=y.movex?y.movex+=x:y.movex=x,null!=y.movey?y.movey+=v:y.movey=v,a.update(y))}a._ai.setContext(),OrgChart.events.publish("updated",[a]),a.draw(OrgChart.action.update,{dragNodeIdList:b})}}a._gragStartedId=null}};d.addEventListener(o.move,moveHandler),d.addEventListener(o.up,leaveHandler),o.leave&&d.addEventListener(o.leave,leaveHandler)},OrgChart.prototype._move=function(e,i,o){o[0]=i,o[1]=e,this.setViewBox(o),this.xScrollUI.setPosition(),this.yScrollUI.setPosition()},OrgChart.prototype.moveStart=function(e,i,o,a){if(e){if(!this._moveInterval){var s=this,l=this.getViewBox().slice(0),c=this.getScale(),d=0,h=0,p=1;OrgChart.isNEU(o)&&(o=OrgChart.anim.inSin),OrgChart.isNEU(a)&&(a=3e3),this._moveInterval=setInterval(function(){var u={x:0,y:0,xWithoutScale:0,yWithoutScale:0};e.left?(d++,u.x=d*OrgChart.MOVE_STEP/c,u.xWithoutScale=d*OrgChart.MOVE_STEP):e.right&&(d++,u.x=-d*OrgChart.MOVE_STEP/c,u.xWithoutScale=-d*OrgChart.MOVE_STEP),e.up?(h++,u.y=h*OrgChart.MOVE_STEP/c,u.yWithoutScale=h*OrgChart.MOVE_STEP):e.down&&(h++,u.y=-h*OrgChart.MOVE_STEP/c,u.yWithoutScale=-h*OrgChart.MOVE_STEP);var f=o((10*p-10)/a);u.x=u.x*f,u.xWithoutScale=u.xWithoutScale*f,u.y=u.y*f,u.yWithoutScale=u.yWithoutScale*f,s.setViewBox([l[0]+u.x,l[1]+u.y,l[2],l[3]]),i&&i(u),p+=1},10)}}else console.error("movePosition parameter not defined")},OrgChart.prototype.moveEnd=function(){this._moveInterval&&(clearInterval(this._moveInterval),this._moveInterval=null)},void 0===OrgChart&&(OrgChart={}),OrgChart.node=function(e,i,o,a){this.templateName=a,this.id=e,this.pid=i,this.children=[],this.childrenIds=[],this.parent=null,this.stpid=null,this.stParent=null,this.stChildren=[],this.stChildrenIds=[],this.tags=o,this.childCount=0,this.collapsedChildCount=0,this.deepCollapsedChildCount=0,this.deepChildCount=0,this.tags||(this.tags=[])},OrgChart.searchUI=function(){this.lastSearch=[],this._searchAfterEnterPress=!1,this._event_id=OrgChart._guid(),this.instance=null},OrgChart.searchUI.prototype.init=function(e){this.instance=e,this.obj=this.instance,this._initSearchFields();var i=this,o=this.instance.config.padding-10,a=this.instance.config.padding-10,s=this.instance.getMenuButton();if(s){var l=s.getBoundingClientRect(),c=this.instance.getSvg().getBoundingClientRect();o=c.right-l.left+10,a=l.top-c.top-10}var d=document.createElement("div");d.classList.add("boc-search"),d.style.right=o+"px",d.style.top=a+"px";var h=OrgChart.elements.textbox({},{label:OrgChart.SEARCH_PLACEHOLDER,btn:"X"},"320px");d.innerHTML+=h.html,this.xBtn=d.querySelector("[data-input-btn]"),this.xBtn.style.display="none",this.searchTableWrapper=document.createElement("div"),d.appendChild(this.searchTableWrapper);var p=this.instance.getSvg().nextSibling;this.instance.element.insertBefore(d,p),OrgChart.input.init(d),this.input=document.getElementById(h.id),this.xBtn.addEventListener("click",function(e){e.preventDefault(),i.hide()}),this.input.addEventListener("keypress",function(e){"Enter"==e.key&&e.preventDefault()}),this.input.addEventListener("focus",function(e){i.xBtn.style.display="",i._search()}),this.input.addEventListener("blur",function(e){OrgChart.isNEU(i.input.value)&&OrgChart.SEARCH_HELP_SYMBOL!=i.input.value&&(i.xBtn.style.display="none")}),this.input.addEventListener("keydown",function(e){("ArrowDown"==e.key||"ArrowUp"==e.key)&&e.preventDefault()}),this.input.addEventListener("keyup",function(e){"ArrowDown"==e.key?downHandler():"ArrowUp"==e.key?upHandler():"Enter"==e.key?i._enterHandler():"Escape"==e.key?i.hide():this.value.length>=OrgChart.MINIMUM_SYMBOLS_IN_SEARCH_INPUT&&i._search()});var downHandler=function(){var e=i.instance.element.querySelectorAll("[data-search-item-id]"),o=i.instance.element.querySelector('[data-selected="yes"]');null==o&&e.length>0?e[0].setAttribute("data-selected","yes"):e.length>0&&o.nextSibling&&o.nextSibling.setAttribute&&(o.removeAttribute("data-selected"),o.nextSibling.setAttribute("data-selected","yes"))},upHandler=function(){var e=i.instance.element.querySelectorAll("[data-search-item-id]"),o=i.instance.element.querySelector('[data-selected="yes"]');null==o&&e.length>0?e[e.length-1].setAttribute("data-selected","yes"):e.length>0&&o.previousSibling&&o.previousSibling.setAttribute&&(o.removeAttribute("data-selected"),o.previousSibling.setAttribute("data-selected","yes"))}},OrgChart.searchUI.prototype._enterHandler=function(){var e=this.instance.element.querySelector('[data-selected="yes"]');if(e){if(e.hasAttribute("data-search-item-id")){var i=e.getAttribute("data-search-item-id");this.input.value!=OrgChart.SEARCH_HELP_SYMBOL?0!=OrgChart.events.publish("searchclick",[this,{nodeId:i}])&&(this.instance.center(i),OrgChart.isMobile()&&this.hide()):(this.input.value=i+" ",this.searchTableWrapper.innerHTML="")}}else this._searchAfterEnterPress=!0,this.__search(),this.searchTableWrapper.innerHTML="",this.instance.draw()},OrgChart.searchUI.prototype._initSearchFields=function(){if(null==this.instance.config.searchFields){this._searchFields=[];for(var e=0;e<this.instance.response.allFields.length;e++){var i=this.instance.response.allFields[e];"tags"==i||OrgChart._fieldIsImg(this.instance.config,i)||-1==this._searchFields.indexOf(i)&&this._searchFields.push(i)}}else this._searchFields=this.instance.config.searchFields;if(null==this.instance.config.searchFieldsAbbreviation){this.searchFieldsAbbreviation={};for(e=0;e<this._searchFields.length;e++){for(var o=this._searchFields[e],a=0,s=o.slice(0,a+1).toLowerCase();this.searchFieldsAbbreviation[s];)a++,s=o.slice(0,a+1).toLowerCase();this.searchFieldsAbbreviation[s]=o}}else this.searchFieldsAbbreviation=this.instance.config.searchFieldsAbbreviation;this._searchFieldsAbbreviation=this.searchFieldsAbbreviation},OrgChart.searchUI.prototype.find=function(e){this.input&&(this.input.value=e,document.activeElement==this.input?this._search(e):this.input.focus())},OrgChart.searchUI.prototype.addMatchTag=function(e){if(this._searchAfterEnterPress){for(var i=0;i<this.lastSearch.length;i++)if(this.lastSearch[i].id==e)return!0;return!1}return null},OrgChart.searchUI.prototype.__search=function(){this.lastSearch=OrgChart._search.search(this.instance.config.nodes,this.input.value,this._searchFields,this._searchFields,this.instance.config.searchDisplayField,this.instance.config.searchFieldsWeight,this.searchFieldsAbbreviation)},OrgChart.searchUI.prototype._search=function(){var e,i=this;if(this._searchAfterEnterPress=!1,this.input.value==OrgChart.SEARCH_HELP_SYMBOL)e=this.helpView();else{this.__search();var o=OrgChart._getFistImgField(this.instance.config);e=`<table border="0" cellspacing="0" cellpadding="0">\n <tbody>\n ${function(){for(var e="",a=0;a<i.lastSearch.length&&!(a>=OrgChart.SEARCH_RESULT_LIMIT);a++){var s=i.lastSearch[a],l="";if(o){var c=i.instance._get(s.id);"function"==typeof o?l=o(i.instance,i.instance.getNode(s.id),c):c[o]&&(l=c[o])}var d="",h="";i.instance.config.searchDisplayField==s.__searchField?d=s.__searchMarks:i.instance.config.searchDisplayField?(d=s[i.instance.config.searchDisplayField],OrgChart.isNEU(d)&&(d=""),h=s.__searchMarks):d=s.__searchMarks;var p={img:l,nodeId:s.id,first:d,second:h,searchItem:s,html:OrgChart.searchUI.createItem(l,s.id,d,h)};OrgChart.events.publish("add-item",[i,p]),e+=p.html}return e}()} \n </tbody>\n </table>`}this.searchTableWrapper.innerHTML=e;for(var a=this.instance.element.querySelectorAll("[data-search-item-id]"),s=0;s<a.length;s++)a[s].addEventListener("click",function(){if(this.hasAttribute("data-search-item-id")){var e=this.getAttribute("data-search-item-id");if(i.input.value!=OrgChart.SEARCH_HELP_SYMBOL){var o=OrgChart.events.publish("searchclick",[i.instance,e]),a=OrgChart.events.publish("searchclick",[i,{nodeId:e}]);if(!1===o&&(a=!1),!1!==a){i.instance.center(this.getAttribute("data-search-item-id"));var s=i.instance.element.querySelector('[data-selected="yes"]');s&&s.removeAttribute("data-selected"),this.setAttribute("data-selected","yes"),i.input.focus(),OrgChart.isMobile()&&i.hide()}}else i.input.value=e+" ",i.searchTableWrapper.innerHTML="",i.input.focus()}});OrgChart.events.publish("show-items",[this,{}])},OrgChart.searchUI.prototype.helpView=function(){var e='<table border="0" cellspacing="0" cellpadding="0">';for(var i in this.searchFieldsAbbreviation)e+=`<tr data-search-item-id="${i}" style="height: 50px;"><td class="boc-search-image-td" style="text-align: center;">${i}</td><td class="boc-search-text-td">${this.searchFieldsAbbreviation[i]}</td></tr>`;return e+="</table>"},OrgChart.searchUI.createItem=function(e,i,o,a){return o&&(o="<b>"+o+"</b>"),`<tr data-search-item-id="${i}">\n <td class="boc-search-image-td">\n ${e=e?`<div class="boc-search-photo" style="background-image: url(${e})"></div>`:`<div class="boc-search-photo">${OrgChart.icon.user(32,32,"#aeaeae")}</div>`}\n </td>\n <td class="boc-search-text-td">${o} <br/>${a}</td>\n </tr>`},OrgChart.searchUI.prototype.hide=function(){if(!1===OrgChart.events.publish("hide",[this]))return!1;this._searchAfterEnterPress&&(this._searchAfterEnterPress=!1,this.instance.draw()),this.lastSearch=[],this.xBtn&&(this.xBtn.style.display="none"),this.searchTableWrapper&&(this.searchTableWrapper.innerHTML=""),this.input&&(OrgChart.isMobile()||(this.input.value=""),document.activeElement==this.input&&this.input.blur(),document.activeElement==this.xBtn&&OrgChart.input.blurHandler(this.input))},OrgChart.searchUI.prototype.on=function(e,i){return OrgChart.events.on(e,i,this._event_id),this},void 0===OrgChart&&(OrgChart={}),OrgChart.manager=function(e){this.config=e.config,this.layoutConfigs=e._layoutConfigs,this.visibleNodeIds=[],this.viewBox=null,this.action=null,this.actionParams=null,this.nodes={},this.oldNodes={},this.maxX=null,this.maxY=null,this.minX=null,this.minY=null,this.bordersByRootIdAndLevel=null,this.roots=null,this.state=null,this.vbIsInitializedFromState=!1,this.rootList=[],this.instance=e,this._fixAdjustForExport={x:0,y:0}},OrgChart.manager.prototype.read=function(e,i,o,a,s,l,c,d){var h=this;OrgChart.state._get(this.config.state,i,o,function(p){h.state=p,h.action=s,h.actionParams=l,s!=OrgChart.action.init||!h.state||l&&l.method&&"fit"==l.method?(h.viewBox=a,h.vbIsInitializedFromState=!1):(h.viewBox=h.state.vb,h.vbIsInitializedFromState=!0,Array.isArray(h.state.roots)&&(h.config.roots=h.state.roots));var u=h.maxX,f=h.maxY,g=h.minX,m=h.minY,b=h.bordersByRootIdAndLevel,x=h.roots,v=h.nodes;if(e){var y=OrgChart.manager._getResponse(i,o,h.visibleNodeIds,h.config,u,f,g,m,h.viewBox,x,h.action,h.actionParams,v,h.oldNodes,h.vbIsInitializedFromState);s!=OrgChart.action.exporting&&(h.maxX=u,h.maxY=f,h.minX=g,h.minY=m,h.roots=x,h.nodes=v,h.visibleNodeIds=y.visibleNodeIds),y.bordersByRootIdAndLevel=b,y.roots=x,y.adjustify={x:0,y:0},h.state&&(y.adjustify=h.state.adjustify),c(y)}else h.oldNodes=v||null,h._read(function(e){u=e.maxX,f=e.maxY,g=e.minX,m=e.minY,b=e.bordersByRootIdAndLevel,x=e.roots,v=e.nodes;var a=OrgChart.manager._getResponse(i,o,h.visibleNodeIds,h.config,u,f,g,m,h.viewBox,x,h.action,h.actionParams,v,h.oldNodes,h.vbIsInitializedFromState);a.notif=e.limit,a.roots=x,a.bordersByRootIdAndLevel=b,a.adjustify=e.adjustify,s!=OrgChart.action.exporting&&(h.maxX=u,h.maxY=f,h.minX=g,h.minY=m,h.roots=x,h.nodes=v,h.visibleNodeIds=a.visibleNodeIds,h.bordersByRootIdAndLevel=b,h.rootList=e.rootList),c(a)},d)})},OrgChart.manager.prototype._read=function(e,i){var o=this,a=OrgChart.manager._createNodes(this.instance);i(a);var s=a.nodes,l=a.roots,c=OrgChart.remote;null==c&&(c=OrgChart.local),c._setPositions(l,o.layoutConfigs,function(i){var c=OrgChart.manager._doNotChangePositionOfClickedNodeIfAny(l,s,o.action,o.actionParams,o.oldNodes,o.config.orientation);o.state&&o.action==OrgChart.action.init&&(c=o.state.adjustify),o.action==OrgChart.action.exporting?c=o._fixAdjustForExport:o._fixAdjustForExport=c;for(var d={minX:null,minY:null,maxX:null,maxY:null},h={},p=[],u=0;u<l.length;u++)OrgChart.manager._setMinMaxXYAdjustifyIterate(l[u],l[u],d,0,h,c,o.config.orientation,p);for(u=0;u<l.length;u++)OrgChart.manager._setChildCountPropsIterate(l[u],s);for(var f in p)for(var g in p[f]){var m=h[f][g],b=p[f][g];null==m.minX&&null==m.minY&&null==m.maxX&&null==m.maxY&&OrgChart._setMinMaxXY(b,m,!0)}e({minX:d.minX,minY:d.minY,maxX:d.maxX,maxY:d.maxY,bordersByRootIdAndLevel:h,nodes:s,roots:l,rootList:a.rootList,limit:i,adjustify:c})},s)},void 0===OrgChart&&(OrgChart={}),OrgChart.manager._initDinamicNode=function(e,i,o){i&&(e.lcn=i),o&&(e.isAssistant=!0);var a=OrgChart.t(e.templateName);e.w=a&&a.size?a.size[0]:0,e.h=a&&a.size?a.size[1]:0,e.isSplit="split"==e.templateName,e.isMirror="mirror"==e.templateName,e.isSubLevel="subLevel"==e.templateName},OrgChart.manager._setCollpasedProperty=function(e,i,o,a,s,l,c,d){if(null==e.collapsed&&i.collapse&&i.collapse.allChildren?e.collapsed=!0:null==e.collapsed&&(e.collapsed=!1),s==OrgChart.action.expand&&-1!=o.ids.indexOf(e.id)&&(e.collapsed=!1),s==OrgChart.action.collapse&&(o.expandIds||o.collapseIds)?o.expandIds&&-1!=o.expandIds.indexOf(e.id)?e.collapsed=!1:o.collapseIds&&-1!=o.collapseIds.indexOf(e.id)&&(e.collapsed=!0):s==OrgChart.action.collapse&&-1!=o.ids.indexOf(e.id)&&(e.collapsed=!0),s==OrgChart.action.expand&&"all"==o.ids&&(e.collapsed=!1),s!=OrgChart.action.exporting||OrgChart.isNEU(o.parentLevels)&&OrgChart.isNEU(o.childLevels)||null==o.id)s==OrgChart.action.exporting&&o.expandChildren&&(e.collapsed=!1);else if(!(null==o.id||OrgChart.isNEU(o.parentLevels)&&OrgChart.isNEU(o.childLevels))){var h=d[o.id];if(h==e)e.collapsed=!1;else{for(var p=!1,u=-1,f=!1,g=-1;h;){if(u++,h==e){p=!0;break}h=d[h.pid]}h=d[o.id];for(var m=d[e.id];m;){if(g++,m==h){f=!0;break}m=d[m.pid]}null!=o.parentLevels&&p&&u<=o.parentLevels||null!=o.childLevels&&f&&g<=o.childLevels||f&&o.expandChildren?e.collapsed=!1:e.collapsed=!0}}s==OrgChart.action.init&&null!=c?e.collapsed=!c.exp.has(e.id):s==OrgChart.action.init?-1!=e.tags.indexOf("left-partner")||-1!=e.tags.indexOf("right-partner")||-1!=e.tags.indexOf("partner")||e.parentPartner?e.collapsed=i.collapse&&l>=i.collapse.level&&-1==a.indexOf(e.id):e.collapsed=i.collapse&&l>=i.collapse.level-1&&-1==a.indexOf(e.id):s==OrgChart.action.centerNode||s==OrgChart.action.insert||s==OrgChart.action.expand||s==OrgChart.action.collapse?a.has(e.id)&&(e.collapsed=!1):s==OrgChart.action.update&&o&&o.changeRoots&&o.changeRoots.has(e.id)&&(e.collapsed=!1)},OrgChart.manager._initNode=function(e,i,o,a,s,l,c){var d=c.manager.config,h=c.manager.layoutConfigs,p=c.manager.action,u=c.manager.actionParams,f=c.manager.state,g=h[o||"base"];null==e.parent&&OrgChart.manager._setCollpasedProperty(e,g,u,s,p,a-1,f,i);for(var m=0;m<e.childrenIds.length;m++){var b=i[e.childrenIds[m]];if(OrgChart.manager._setCollpasedProperty(b,g,u,s,p,a,f,i),b.collapsed)e.collapsedChildCount++;else{if(b.parent=e,null!=b.ppid){var x=i[b.ppid];x&&(b.parentPartner=x)}(-1!=b.tags.indexOf("left-partner")||-1!=b.tags.indexOf("right-partner")||-1!=b.tags.indexOf("partner")||b.parentPartner)&&-1==l.indexOf(e.id)&&l.push(e.id),e.children.push(b)}}if(p!=OrgChart.action.minimize||e.min?p==OrgChart.action.maximize&&!0===e.min?(u.all||u.id==e.id)&&(e.min=!1):p==OrgChart.action.exporting&&!1===u.min?e.min=!1:p==OrgChart.action.init&&null!=f&&(e.min=f.min.has(e.id)):(u.all||u.id==e.id)&&(e.min=!0),!(e.min||e.tags&&e.tags.has("filter")))for(m=0;m<e.stChildrenIds.length;m++){(b=i[e.stChildrenIds[m]]).stParent=e,e.stChildren.push(b)}null!=a&&(e.level=a),o&&(e.lcn=o);var v=OrgChart._getSubLevels(e.tags,d.tags);v>0&&(e.subLevels=v),-1!=e.tags.indexOf("assistant")&&null!=e.parent&&(e.isAssistant=!0),g.layout==OrgChart.layout.treeList&&(e.isTreeListItem=!0),g.template&&d.template==e.templateName&&(e.templateName=g.template);var y=OrgChart.t(e.templateName,e.min);if(e.w=y&&y.size?y.size[0]:0,e.h=y&&y.size?y.size[1]:0,e.padding=y&&y.padding?y.padding:[0,0,0,0],e.isTreeListItem&&e.stParent&&null==e.stParent.treeList){var _=OrgChart.t(e.stParent.templateName,e.stParent.min);e.stParent.treeList={pinnedIds:[],scrollTop:0,scrollTopMax:0,maxHeight:_.treeListMaxHeight}}var w={node:e};OrgChart.events.publish("node-initialized",[c,w])},OrgChart.manager._iterate=function(e,i,o,a,s,l,c,d,h,p,u,f){var g=f.manager.layoutConfigs;if(OrgChart.manager._initNode(i,o,h,a,p,u,f),i.isAssistant&&(l[i.pid]||(l[i.pid]=[]),l[i.pid].push(i.id)),i.subLevels>0&&c.push(i.id),OrgChart.MIXED_LAYOUT_FOR_NODES_WITH_COLLAPSED_CHILDREN&&!i.isAssistant&&i.parent){if(i.parent&&i.parent.children.length&&i.parent.children[i.parent.children.length-1]==i){for(var m=[],b=0,x=0,v=0;v<i.parent.children.length;v++){-1==(y=i.parent.children[v]).tags.indexOf("partner")&&-1==y.tags.indexOf("left-partner")&&-1==y.tags.indexOf("right-partner")&&-1==y.tags.indexOf("assistant")&&0==y.children.length?m.push(y.id):-1!=y.tags.indexOf("assistant")?b++:-1==y.tags.indexOf("partner")&&-1==y.tags.indexOf("left-partner")&&-1==y.tags.indexOf("right-partner")||x++}(OrgChart.MIXED_LAYOUT_ALL_NODES&&m.length>1&&m.length==i.parent.children.length-b-x||!OrgChart.MIXED_LAYOUT_ALL_NODES&&m.length>1)&&(d[i.pid]=m)}}else if(!i.isAssistant&&0==i.childrenIds.length&&i.parent&&!d[i.pid]){for(m=[],b=0,x=0,v=0;v<i.parent.children.length;v++){var y;-1==(y=i.parent.children[v]).tags.indexOf("partner")&&-1==y.tags.indexOf("left-partner")&&-1==y.tags.indexOf("right-partner")&&-1==y.tags.indexOf("assistant")&&0==y.childrenIds.length?m.push(y.id):-1!=y.tags.indexOf("assistant")?b++:-1==y.tags.indexOf("partner")&&-1==y.tags.indexOf("left-partner")&&-1==y.tags.indexOf("right-partner")||x++}(OrgChart.MIXED_LAYOUT_ALL_NODES&&m.length>OrgChart.MIXED_LAYOUT_IF_NUMBER_OF_CHILDREN_IS_MORE_THEN&&m.length==i.parent.childrenIds.length-b-x||!OrgChart.MIXED_LAYOUT_ALL_NODES&&m.length>OrgChart.MIXED_LAYOUT_IF_NUMBER_OF_CHILDREN_IS_MORE_THEN)&&(d[i.pid]=m)}i.stChildren.length&&(e.stContainerNodes||(e.stContainerNodes=[]),e.stContainerNodes.push(i));for(var _=0;_<i.stChildren.length;_++){var w="";for(v=0;v<i.tags.length;v++)if(g[i.tags[v]]){w=i.tags[v];break}s.push(i.stChildren[_].id),OrgChart.manager._iterate(e,i.stChildren[_],o,0,s,l,c,d,w,p,u,f)}a++;for(_=0;_<i.children.length;_++)i.isTreeListItem&&(i.children[_].isTreeListItem=i.isTreeListItem),OrgChart.manager._iterate(e,i.children[_],o,a,s,l,c,d,h,p,u,f)},OrgChart.manager.__createNodes=function(e,i,o,a,s,l,c,d){for(var h=[],p=OrgChart._addDottedLines(o),u=0;u<p.length;u++){var f,g=p[u];f=OrgChart.STRING_TAGS?g.tags?g.tags.split(","):[]:Array.isArray(g.tags)?g.tags.slice(0):[],d.filterUI.addFilterTag(g)&&f.unshift("filter");var m=d.searchUI.addMatchTag(g.id);!0===m?f.unshift("match"):!1===m&&f.unshift("no-match");var b=OrgChart._getTemplate(f,o.tags,o.template),x=new OrgChart.node(g.id,g.pid,f,b);OrgChart.isNEU(g.ppid)||(x.ppid=g.ppid),OrgChart.isNEU(g.stpid)||(x.stpid=g.stpid),null!=g.movex&&(x.movex=g.movex),null!=g.movey&&(x.movey=g.movey),e[g.id]=x,h.push(g.id)}if(null!=o.orderBy){var v=OrgChart.manager._getOrderSortArray(o.orderBy);h.sort(function(e,i){var o,a;for(var s of p)if(s.id==e&&(o=s),s.id==i&&(a=s),o&&a)break;for(var l=0;l<v.length;l++){var c=o[v[l].field],d=a[v[l].field],h=c,u=d;if(null==h&&(h=""),null==u&&(u=""),"string"==typeof h&&"string"==typeof u){var f=h.localeCompare(u);if(v[l].desc&&(f*=-1),0!==f)return f}else{f=c<d?-1:c>d?1:0;if(v[l].desc&&(f*=-1),0!==f)return f}}})}for(u=0;u<h.length;u++){var y=h[u],_=(x=e[y],l?l[y]:null),w=e[x.stpid],k=e[x.pid];if(w||(x.stpid=null),k||(x.pid=null),w){var I=l?l[w.id]:null;I&&(w.min=I.min),w.stChildrenIds.push(x.id)}else k?(_&&(x.collapsed=_.collapsed,x.min=_.min,x.treeList=_.treeList),k.childrenIds.push(x.id)):(_&&(x.collapsed=_.collapsed,x.min=_.min,x.treeList=_.treeList),i.push(x),c.push(x.id));a==OrgChart.action.init&&(x.min=OrgChart._getMin(x,o))}},OrgChart.manager._createNodes=function(e){var i=e.manager.config,o=e.manager.layoutConfigs,a=e.manager.action,s=e.manager.actionParams,l=e.manager.oldNodes,c=e.manager.state,d={},h=[],p=[];if(OrgChart.manager.__createNodes(d,h,i,a,s,l,p,e),null!=i.roots){h=[];for(var u=0;u<i.roots.length;u++){var f=d[i.roots[u]];if(f&&a==OrgChart.action.centerNode){for(var g=f;null!=g.pid||null!=g.stpid;)g=null==g.pid&&null!=g.stpid?d[g.stpid]:d[g.pid];for(var m=d[s.id];(null!=m.pid||null!=m.stpid)&&m!=f;)m=null==m.pid&&null!=m.stpid?d[m.stpid]:d[m.pid];g==m&&(f=g)}if(f){for(var b=!1,x=0;x<h.length;x++)if(h[x].id==f.id){b=!0;break}if(!b){if(!OrgChart.isNEU(f.pid))(Te=(v=d[f.pid]).childrenIds.indexOf(f.id))>-1&&v.childrenIds.splice(Te,1);h.push(f)}}}i.roots=[];for(u=0;u<h.length;u++)i.roots.push(h[u].id)}if(a==OrgChart.action.exporting&&null!=s.id)if(s.parentLevels){for(var v=d[s.id],y=0;y<s.parentLevels&&d[v.pid];)y++,v=d[v.pid];v.pid=null,h=[v]}else{(w=d[s.id])&&(w.pid=null,h=[w])}var _=[];if(a==OrgChart.action.init&&i.expand&&i.expand.nodes&&null==c)for(u=0;u<i.expand.nodes.length;u++){var w=d[i.expand.nodes[u]];for(!0===i.expand.allChildren&&OrgChart.manager._addExpandedNodeIdsIterate(w,d,_);w;)_.push(w.id),null==w.pid&&null!=w.stpid?(w=d[w.stpid]).min=!1:w=d[w.pid]}else if(a==OrgChart.action.expand&&s.ids&&"all"!=s.ids||a==OrgChart.action.collapse&&s&&s.expandIds){_e=a==OrgChart.action.expand?s.ids:s.expandIds;for(u=0;u<_e.length;u++)for(v=d[(w=d[_e[u]]).pid];v;)_.push(v.id),null==v.pid&&null!=v.stpid?(v=d[v.stpid]).min=!1:v=d[v.pid]}else if(a==OrgChart.action.centerNode){for(var k=OrgChart._getCenterNodeFromParams(d,s);k;){if(_.push(k.id),s.options.parentState===OrgChart.COLLAPSE_PARENT_NEIGHBORS&&k)for(u=0;u<k.childrenIds.length;u++){(j=d[k.childrenIds[u]]).collapsed=!0}if(null==k.pid&&null!=k.stpid){if((k=d[k.stpid]).min=!1,k.tags)-1!=(Te=k.tags.indexOf("filter"))&&(k.tags.splice(Te,1),e.filterUI._removeFilter(k.id))}else k=d[k.pid]}if(k=OrgChart._getCenterNodeFromParams(d,s),s.options.childrenState===OrgChart.COLLAPSE_SUB_CHILDRENS)for(u=0;u<k.childrenIds.length;u++){(S=d[k.childrenIds[u]]).collapsed=!1;for(var I=0;I<S.childrenIds.length;I++){d[S.childrenIds[I]].collapsed=!0}}if(s.options.parentState===OrgChart.COLLAPSE_PARENT_SUB_CHILDREN_EXCEPT_CLICKED)if(v=d[k.pid])for(u=0;u<v.childrenIds.length;u++){var S;if((S=d[v.childrenIds[u]])!=k){S.collapsed=!1;for(I=0;I<S.childrenIds.length;I++){d[S.childrenIds[I]].collapsed=!0}}}}else if(a==OrgChart.action.insert)for(w=d[s.insertedNodeId];w;)_.push(w.id),null==w.pid&&null!=w.stpid?(w=d[w.stpid]).min=!1:w=d[w.pid];var C=[],L={},A=[],E={},N=[];for(u=0;u<h.length;u++)OrgChart.manager._iterate(h[u],h[u],d,0,C,L,A,E,"",_,N,e);if(a==OrgChart.action.collapse&&s&&Array.isArray(s.expandIds)&&Array.isArray(s.collapseIds))for(u=0;u<s.ids.length;u++)if(s.expandIds.has(s.collapseIds[u]))console.error(`id ${s.collapseIds[u]} exist in both collapseIds and expandIds`);else{(w=d[s.collapseIds[u]])&&(w.collapsed=!0)}for(u=h.length-1;u>=0;u--)h[u].collapsed&&h.splice(u,1);for(u=0;u<N.length;u++){w=d[N[u]];var $=[],M=[],T=[],P={},U=0,O=0,R=0,B=[],F=[];for(I=0;I<w.children.length;I++){(j=w.children[I]).isAssistant?$.push(j.id):-1!=j.tags.indexOf("right-partner")?(j.isPartner=1,j.children=[],M.push(j.id)):-1!=j.tags.indexOf("left-partner")?(j.isPartner=2,j.children=[],T.push(j.id)):-1==j.tags.indexOf("partner")||U%2?-1!=j.tags.indexOf("partner")&&U%2?(j.isPartner=2,j.children=[],T.push(j.id),U++):j.parentPartner?(P[j.parentPartner.id]||(P[j.parentPartner.id]=[]),P[j.parentPartner.id].push(j.id)):$.push(j.id):(j.isPartner=1,j.children=[],M.push(j.id),U++)}w.children=[];var H=[];for(I=0;I<M.length;I++){P[(j=d[M[I]]).id]?w.children.push(j):w.children.splice(0,0,j);for(var D=0;D<j.childrenIds.length;D++)H.push(j.childrenIds[D])}var z=[];for(I=0;I<T.length;I++){P[(j=d[T[I]]).id]?w.children.push(j):w.children.splice(0,0,j);for(D=0;D<j.childrenIds.length;D++)z.push(j.childrenIds[D])}for(I=0;I<z.length;I++){(j=d[z[I]]).collapsed||(j.parentPartner=j.parent,j.parent=w,j.isChildOfPartner=!0,w.children.push(j))}for(I=T.length-1;I>=0;I--)if(P[T[I]])for(x=0;x<P[T[I]].length;x++)w.children.push(d[P[T[I]][x]]),O++,-1==F.indexOf(T[I])&&F.push(T[I]);for(I=0;I<$.length;I++){var j=d[$[I]];w.children.push(j)}for(I=0;I<M.length;I++)if(P[M[I]])for(x=0;x<P[M[I]].length;x++)w.children.push(d[P[M[I]][x]]),R++,-1==B.indexOf(M[I])&&B.push(M[I]);for(I=0;I<H.length;I++){(j=d[H[I]]).collapsed||(j.parentPartner=j.parent,j.parent=w,j.isChildOfPartner=!0,w.children.push(j))}w.partnerSeparation=Math.max(F.length,B.length)*i.partnerChildrenSplitSeparation+i.minPartnerSeparation,$.length||!O||R?$.length||O||!R?$.length||1!=O||1!=R?$.length||O||R?!$.length||O||R?$.length&&(O||R)?w.hasPartners=7:w.hasPartners=1:w.hasPartners=6:w.hasPartners=5:w.hasPartners=4:w.hasPartners=3:w.hasPartners=2}for(u=0;u<A.length;u++){var q=o[(w=d[A[u]]).lcn?w.lcn:"base"];for(I=0;I<w.subLevels;I++){var X=new OrgChart.node(w.id+"_sub_level_index_"+I,w.pid,[],"subLevel");if(OrgChart.manager._initDinamicNode(X,w.lcn),v=w.parent)null!=w.movex&&(X.movex=w.movex),null!=w.movey&&(X.movey=w.movey),(Te=v.children.indexOf(w))>-1&&(v.children.splice(Te,1),v.children.splice(Te,0,X)),X.children.push(w),X.parent=v,w.parent=X,d[X.id]=X}}for(var G in L){(v=d[G]).hasAssistants=!0;X=new OrgChart.node(v.id+"_split_assitant_0",v.id,["assistant"],"split");null!=v.movex&&(X.movex=v.movex),null!=v.movey&&(X.movey=v.movey),OrgChart.manager._initDinamicNode(X,v.lcn,!0),d[X.id]=X;var Z=[];for(I=v.children.length-1;I>=0;I--){(j=v.children[I]).isAssistant?(j.parent=null,v.children.splice(I,1),Z.splice(0,0,j.id)):j.isPartner||(j.parent&&E[j.parent.id]&&X&&j.parent.id!=X.id&&(Object.defineProperty(E,X.id,Object.getOwnPropertyDescriptor(E,j.parent.id)),delete E[j.parent.id]),j.parent=X,X.children.unshift(j),v.children.splice(I,1))}if(Z.length%2){var Q=d[Z[Z.length-1]],ae=new OrgChart.node(Q.id+"_mirror",v.pid,[],"mirror");OrgChart.manager._initDinamicNode(ae,Q.lcn,!0),ae.isAssistant=!0,ae.w=Q.w,ae.h=Q.h,d[ae.id]=ae,Z.splice(Z.length-1,0,ae.id)}var de=1;for(I=Z.length-1;I>=0;I--)if(I%2&&I!=Z.length-1){var he=new OrgChart.node(v.id+"_split_assitant_"+de,v.pid,[],"split");OrgChart.manager._initDinamicNode(he,v.lcn,!0),null!=v.movex&&(he.movex=v.movex),null!=v.movey&&(he.movey=v.movey),d[he.id]=he,Z.splice(I,0,he.id),de++}else I%2&&Z.splice(I,0,X.id);for(I=0;I<Z.length;I+=3){var pe=null;pe=0==I?v:d[Z[I-2]];var ue=d[Z[I]],fe=d[Z[I+1]],ge=d[Z[I+2]];ue.parent=pe,fe.parent=pe,ge.parent=pe,pe.children.push(ue),pe.children.push(fe),pe.children.push(ge)}}var me=!1;for(var be in o){if(0!=(q=o[be]).layout){me=!0;break}}var xe=OrgChart.events.has("node-layout",e._event_id);if(me||xe){var ve={nodes:d,config:i,action:a,actionParams:s};if(A.length){var ye=!1;for(var G in E){var _e=E[G];for(u=0;u<_e.length;u++){if((w=d[_e[u]]).subLevels){ye=!0;break}}if(ye)break}if(ye){var we={},ke={},Ie={};for(var G in E){_e=E[G];var Se=!1,Ce=null;for(u=0;u<_e.length;u++){var Le=_e[u];(null===Ce||A.has(Le))&&(Ce=d[Le].parent.id,Se||OrgChart.isNEU(d[Le].subLevels)||(Se=d[Le].subLevels>0)),we[Ce]||(we[Ce]=[]),we[Ce].push(Le),Se&&(Ie[Ce]=G,ke[Ce]||(ke[Ce]=[]),ke[Ce].push(Le))}}for(var G in E={},ke)if(ke[G].length>OrgChart.MIXED_LAYOUT_IF_NUMBER_OF_CHILDREN_IS_MORE_THEN){var Ae=Ie[G];for(u=d[Ae].children.length-1;u>=0;u--){j=d[Ae].children[u];ke[G].has(j.id)&&d[Ae].children.splice(u,1)}}for(var G in we)we[G].length>OrgChart.MIXED_LAYOUT_IF_NUMBER_OF_CHILDREN_IS_MORE_THEN&&(E[G]=we[G])}}for(var G in E){for(var Ee=v=d[G];Ee.isSplit;)Ee=d[Ee.pid];for(;Ee.isSubLevel;)Ee=d[Ee.pid];if(0!=(q=o[v.lcn?v.lcn:"base"]).layout||xe){ve.pnode=v,ve.layout=q.layout,ve.layoutGridColumns=i.layoutGridColumns,ve.childrenIds=E[G],ve.lastChildrenPidIds=E,ve.subLevels=0,ve.layouts=[],OrgChart.events.publish("node-layout",[e,ve]),OrgChart.events.publish("layout",[ve]),ve.layouts.length||ve.layouts.push({layout:ve.layout,childrenIds:ve.childrenIds,subLevels:ve.subLevels,layoutGridColumns:ve.layoutGridColumns});for(var Ne=0;Ne<ve.layouts.length;Ne++){var $e=ve.layouts[Ne];for(OrgChart.isNEU($e.subLevels)&&($e.subLevels=0),OrgChart.isNEU($e.layout)&&($e.layout=q.layout),Ee=v=d[G];Ee.isSplit;)Ee=d[Ee.pid];for(;Ee.isSubLevel;)Ee=d[Ee.pid];var Me=v;for(I=0;I<$e.subLevels;I++){X=new OrgChart.node(Ne+"_sublevel_layout_"+I,Me.id,[],"subLevel");OrgChart.manager._initDinamicNode(X,Me.lcn),X.parent=Me,Me.children.push(X),d[X.id]=X,Me=X}if($e.subLevels){for(I=0;I<$e.childrenIds.length;I++){var Te;j=d[$e.childrenIds[I]];-1!=(Te=v.children.indexOf(j))&&v.children.splice(Te,1),j.parent=Me,Me.children.push(j)}v=Me}if($e.layout==OrgChart.layout.grid&&$e.childrenIds.length>2){"dynamic"==$e.layoutGridColumns&&($e.layoutGridColumns=OrgChart._getDynamicGridCoulumns($e.childrenIds.length));var Pe=v.id;for(u=v.children.length-1;u>=0;u--)for(I=0;I<$e.childrenIds.length;I++){Le=$e.childrenIds[I];if(v.children[u].id==Le){v.children.splice(u,1);break}}var Ue=$e.layoutGridColumns;Ue%2!=0&&Ue>2&&Ue--;for(u=0;u<$e.childrenIds.length;u+=Ue){var Oe=null;for(I=0;I<Ue;I++){var Re=u+Ue>=$e.childrenIds.length;if($e.childrenIds.length-1<u+I)break;(j=d[Le=$e.childrenIds[u+I]]).parent=d[Pe],d[Pe].children.push(j),Re||(Ue/2-1==I&&(Oe=new OrgChart.node($e.childrenIds[u+I-1]+"_grid_pseudo_node_"+$e.childrenIds[u+I+1],Pe,[],"subLevel"),OrgChart.manager._initDinamicNode(Oe,v.lcn),Oe.parent=d[Pe],d[Pe].children.push(Oe),d[Oe.id]=Oe),Ue-1==I&&(Pe=Oe.id))}}}if($e.layout==OrgChart.layout.mixed){var Be=$e.childrenIds;for(u=Be.length-1;u>=0;u--){v=(j=d[Be[u]]).parent,j.layout=OrgChart.layout.mixed;for(I=v.children.length-1;I>=0;I--)if(j.id==v.children[I].id){v.children.splice(I,1);break}if(u>0){var Fe=d[Be[u-1]];j.parent=Fe,j.layout=OrgChart.layout.mixed,Fe.children.push(j)}else v.children.push(j)}}else if($e.layout>1){X=new OrgChart.node(Ne+"_"+v.id+"_split_0",Ee.id,[],"split");null!=v.movex&&(X.movex=v.movex),null!=v.movey&&(X.movey=v.movey),OrgChart.manager._initDinamicNode(X,v.lcn),d[X.id]=X,X.layout=$e.layout;var He=[];for(u=$e.childrenIds.length-1;u>=0;u--){for(j=d[$e.childrenIds[u]],I=0;I<v.children.length;I++)v.children[I].id==j.id&&v.children.splice(I,1);if(j.parent=null,j.layout=$e.layout,$e.layout!=OrgChart.layout.treeRightOffset&&$e.layout!=OrgChart.layout.treeRight||He.splice(0,0,j.id),$e.layout>2){var De=new OrgChart.node(Ne+"_"+j.id+"_mirror",Ee.id,[],"mirror");OrgChart.manager._initDinamicNode(De,j.lcn),De.layout=$e.layout,d[De.id]=De,He.splice(0,0,De.id)}$e.layout!=OrgChart.layout.treeRightOffset&&$e.layout!=OrgChart.layout.treeRight&&He.splice(0,0,j.id)}for(de=1,I=He.length-1;I>=0;I--)if(I%2&&I!=He.length-1){he=new OrgChart.node(Ne+"_"+v.id+"_split_"+de,Ee.id,[],"split");OrgChart.manager._initDinamicNode(he,v.lcn),null!=v.movex&&(he.movex=v.movex),null!=v.movey&&(he.movey=v.movey),he.layout=$e.layout,d[he.id]=he,He.splice(I,0,he.id),de++}else I%2&&He.splice(I,0,X.id);for(I=0;I<He.length;I+=3){pe=null;0==I&&(pe=v);ue=d[He[I]],fe=d[He[I+1]],ge=d[He[I+2]];0!=I&&(pe=d[He[I-3]]),0==I||fe||(pe=d[He[I-2]]),ue.parent=pe,pe.children.push(ue),fe&&(0!=I&&(pe=d[He[I-2]]),fe.parent=pe,pe.children.push(fe)),ge&&(0!=I&&(pe=d[He[I-1]]),ge.parent=pe,pe.children.push(ge))}}}}}}if(OrgChart.VERTICAL_CHILDREN_ASSISTANT)for(u=0;u<h.length;u++)OrgChart.manager._verticalAssistantIterate(h[u],d);ve={nodes:d,roots:h};return OrgChart.events.publish("nodes-initialized",[e,ve]),{nodes:ve.nodes,roots:ve.roots,rootList:p}},OrgChart.manager._getOrderSortArray=function(e){if("string"==typeof e)return[{field:e,desc:!1}];if(Array.isArray(e)){var i=[];for(var o of e)"string"==typeof o?i.push({field:o,desc:!1}):e instanceof Object?i.push(o):console.error("Unseported orderBy value!");return i}if(e instanceof Object)return[e];console.error("Unseported orderBy value!")},OrgChart.manager._getNodeWidth=function(e,i){switch(i.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:return e.w;case OrgChart.orientation.right:case OrgChart.orientation.right_top:case OrgChart.orientation.left:case OrgChart.orientation.left_top:return e.h}return 0},OrgChart.manager._isVisible=function(e,i,o,a,s,l,c){var d=0;if("auto"==OrgChart.LAZY_LOADING_FACTOR){var h=l/s*2,p=c/s*2;d=h>p?Math.ceil(h):Math.ceil(p)}else d=OrgChart.LAZY_LOADING_FACTOR/s;if(null!=e.x&&null!=e.y){if(OrgChart._getLazyLoading(i)&&a!==OrgChart.action.exporting){function is_vizible(e,i){var o=e.x,a=e.y,s=e.w,l=e.h,c=i[0]-d,h=i[2]+d+i[0],p=i[1]-d,u=i[3]+d+i[1],f=o+s>c&&h>o;return f&&(f=a+l>p&&u>a),f}if(is_vizible(e,o))return!0;for(var u=0;u<e.children.length;u++)if(is_vizible(e.children[u],o))return!0;return!1}return!0}},OrgChart.manager.getAllFields=function(e){var i=[OrgChart.TAGS];for(var o in e.nodeBinding)i.push(e.nodeBinding[o]);for(o=0;o<e.nodes.length;o++)for(var a in e.nodes[o])a!==OrgChart.ID&&a!==OrgChart.TAGS&&a!==OrgChart.NODES&&a!==OrgChart.PID&&a!==OrgChart.STPID&&"movex"!==a&&"movey"!==a&&(e.nodeBinding[a]||i.has(a)||i.push(a));return i},OrgChart.manager._getMostDeepChild=function(e){if(e){var i=e;return function getMostDeepChild(e){e.sl>i.sl&&(i=e);for(var o=0;o<e.children.length;o++)getMostDeepChild(e.children[o])}(e),i}},OrgChart.manager._getResponse=function(e,i,o,a,s,l,c,d,h,p,u,f,g,m,b){var x=p[0],v=[],y={top:null,left:null,bottom:null,right:null,minX:null,maxX:null,minY:null,maxY:null},_=[[],[],[]],w=s-c+2*a.padding,k=l-d+2*a.padding,I=OrgChart.getScale(h,e,i,a.scaleInitial,a.scaleMax,a.scaleMin,w,k);if(y.top=d-a.padding,y.left=c-a.padding,y.bottom=l+a.padding-i/I,y.right=s+a.padding-e/I,y.maxX=s,y.minX=c,y.maxY=l,y.minY=d,0==p.length||null==h&&!b&&a.align==OrgChart.CENTER){var S=Math.ceil(e/I),C=Math.ceil(i/I),L=0,A=0;if(S-2*a.padding>=s-c)switch(L=(s+c)/2-S/2,a.orientation){case OrgChart.orientation.right:case OrgChart.orientation.right_top:L=(c-s)/2-S/2}else switch(L=x.x-S/2+OrgChart.manager._getNodeWidth(x,a)/2,a.orientation){case OrgChart.orientation.right:case OrgChart.orientation.right_top:(L=-(S/2-(c-s)/2))<a.padding-S&&(L=a.padding-S);break;case OrgChart.orientation.left:case OrgChart.orientation.bottom_left:case OrgChart.orientation.top_left:case OrgChart.orientation.left_top:(L=-(S/2-(s-c)/2))>-a.padding&&(L=-a.padding)}if(C-2*a.padding>=l-d)switch(A=(l+d)/2-C/2,a.orientation){case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:A=(d-l)/2-C/2}else switch((A=-(C/2-(l-d)/2))>-a.padding&&(A=-a.padding),a.orientation){case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:(A=-(C/2-(d-l)/2))<a.padding-C&&(A=a.padding-C);break;case OrgChart.orientation.left:case OrgChart.orientation.right:A=x.y-C/2+OrgChart.manager._getNodeWidth(x,a)/2}h=[L,A,S,C]}else if(null==h&&!b&&a.align==OrgChart.ORIENTATION){S=Math.ceil(e/I),C=Math.ceil(i/I),L=0,A=0;switch(a.orientation){case OrgChart.orientation.top:L=x.x-S/2+OrgChart.manager._getNodeWidth(x,a)/2,A=-a.padding;break;case OrgChart.orientation.bottom:L=x.x-S/2+OrgChart.manager._getNodeWidth(x,a)/2,A=a.padding-C;break;case OrgChart.orientation.left:L=-a.padding,A=x.y-C/2+OrgChart.manager._getNodeWidth(x,a)/2;break;case OrgChart.orientation.right:L=a.padding-S,A=x.y-C/2+OrgChart.manager._getNodeWidth(x,a)/2;break;case OrgChart.orientation.top_left:L=-a.padding,A=-a.padding;break;case OrgChart.orientation.right_top:L=a.padding-S,A=-a.padding;break;case OrgChart.orientation.left_top:L=-a.padding,A=-a.padding;break;case OrgChart.orientation.bottom_left:L=-a.padding,A=a.padding-C}h=[L,A,S,C]}if(u==OrgChart.action.centerNode||u==OrgChart.action.maximize){var E=OrgChart._getCenterNodeFromParams(g,f);1==f.options.horizontal&&(h[0]=E.x+E.w/2-h[2]/2),1==f.options.vertical&&(h[1]=E.y+E.h/2-h[3]/2)}if(u==OrgChart.action.insert||u==OrgChart.action.expand||u==OrgChart.action.collapse||u==OrgChart.action.update||u==OrgChart.action.centerNode){var N=null;if(u==OrgChart.action.insert&&f&&null!=f.insertedNodeId&&null!=f.insertedNodeId)N=g[f.insertedNodeId];else if(u==OrgChart.action.update&&f&&null!=f.visId&&null!=f.visId)N=g[f.visId];else if(u!=OrgChart.action.expand&&u!=OrgChart.action.collapse||!f||null==f.id||null==f.id){if(u==OrgChart.action.centerNode){switch(a.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:f.options.vertical||(N=g[f.id]);break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:case OrgChart.orientation.left:case OrgChart.orientation.left_top:f.options.horizontal||(N=g[f.id])}N&&(N=OrgChart.manager._getMostDeepChild(N))}}else N=g[f.id],N=OrgChart.manager._getMostDeepChild(N);if(!OrgChart.FIXED_POSITION_ON_CLICK&&N){if(N.isTreeListItem){for(;!N.stParent;)N=N.parent;N=N.stParent}switch(a.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:var $=N.y+N.h-h[3]+a.padding;h[1]<$&&(h[1]=$);break;case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:$=N.y-a.padding;h[1]>$&&(h[1]=$);break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:$=N.x-a.padding;h[0]>$&&(h[0]=$);break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:$=N.x+N.w-h[2]+a.padding;h[0]<$&&(h[0]=$)}}}for(var M=0;M<p.length;M++)OrgChart.manager._iterate2(p[M],g,a,h,u,f,v,m,o,_,I,e,i);return{animations:_,boundary:y,viewBox:h,visibleNodeIds:v,nodes:g,allFields:OrgChart.manager.getAllFields(a)}},OrgChart.manager._iterate2=function(e,i,o,a,s,l,c,d,h,p,u,f,g){if(OrgChart.manager._isVisible(e,o,a,s,u,f,g)){c.push(e.id);var m=null;if((s==OrgChart.action.expand||s==OrgChart.action.collapse||s==OrgChart.action.maximize)&&d&&d[e.id]&&"expandCollapseToLevel"==l.method){if(m={x:(y=d[e.id]).x,y:y.y},y){m={x:y.x,y:y.y};for(var b=e,x=null;null!=b;)d[b.id]&&d[b.id].collapsed&&(x=b),b=b.parent;x&&x.parent&&(m={x:x.parent.x,y:x.parent.y})}if(_=i[l.id]){for(b=e.parent;null!=b;)b=b.parent;b&&(m={x:_.x+_.w/2-e.w/2,y:_.y+_.h/2-e.h/2})}}else if((s==OrgChart.action.expand||s==OrgChart.action.collapse)&&d&&d[e.id]){if(m={x:(y=d[e.id]).x,y:y.y},"all"==l.ids&&y){m={x:y.x,y:y.y};for(b=e,x=null;null!=b;)d[b.id]&&d[b.id].collapsed&&(x=b),b=b.parent;x&&x.parent&&(m={x:x.parent.x,y:x.parent.y})}if(_=i[l.id]){for(b=e.parent;null!=b&&-1==l.ids.indexOf(e.id)&&-1==l.ids.indexOf(b.id);)b=b.parent;b&&(m={x:_.x+_.w/2-e.w/2,y:_.y+_.h/2-e.h/2})}}else if(s==OrgChart.action.centerNode&&d&&d[e.id]){if(null!=(y=d[e.id]).x&&null!=y.y&&(m={x:y.x,y:y.y}),(v=OrgChart._getCenterNodeFromParams(i,l))&&v==e)(b=e.parent)&&b.id==l.id&&(m={x:v.x+v.w/2-e.w/2,y:v.y+v.h/2-e.h/2})}else if(s==OrgChart.action.maximize&&d&&d[e.id]){var v;if(null!=(y=d[e.id]).x&&null!=y.y&&(m={x:y.x,y:y.y}),(v=OrgChart._getCenterNodeFromParams(i,l))&&v==e)(b=e.parent)&&b.id==l.id&&(m={x:v.x+v.w/2-e.w/2,y:v.y+v.h/2-e.h/2})}else if(s==OrgChart.action.minimize&&d&&d[e.id]){m={x:(y=d[e.id]).x,y:y.y}}else if(s==OrgChart.action.insert&&l&&l.insertedNodeId==e.id&&e.parent)m={x:e.parent.x,y:e.parent.y};else if(s!=OrgChart.action.update&&s!=OrgChart.action.insert||!d)s!==OrgChart.action.exporting&&s!==OrgChart.action.init&&-1==h.indexOf(e.id)&&(p[0].push(e.id),p[1].push({opacity:0}),p[2].push({opacity:1}));else{var y,_;if((!(y=d[e.id])||OrgChart.isNEU(y.x)&&OrgChart.isNEU(y.y))&&l){if(_=i[l.id]){for(b=_;b&&b.id==e.id;)b=b.parent;b&&(m={x:_.x,y:_.y})}}else y&&(m={x:y.x,y:y.y})}null!=m&&null!=m.x&&null!=m.y&&(m.x==e.x&&m.y==e.y||l&&l.dragNodeIdList&&-1!=l.dragNodeIdList.indexOf(e.id)||e.isSplit||(p[0].push(e.id),p[1].push({transform:[1,0,0,1,m.x,m.y]}),p[2].push({transform:[1,0,0,1,e.x,e.y]})))}for(var w=0;w<e.stChildren.length;w++)OrgChart.manager._iterate2(e.stChildren[w],i,o,a,s,l,c,d,h,p,u,f,g);for(w=0;w<e.children.length;w++)OrgChart.manager._iterate2(e.children[w],i,o,a,s,l,c,d,h,p,u,f,g)},OrgChart.manager._addExpandedNodeIdsIterate=function(e,i,o){for(var a=0;a<e.childrenIds.length;a++)o.push(e.childrenIds[a]),OrgChart.manager._addExpandedNodeIdsIterate(i[e.childrenIds[a]],i,o)},OrgChart.manager._setChildCountPropsIterate=function(e,i){void 0===e.w&&(e.collapsedChildCount=e.childrenIds.length),e.deepChildCount=e.childCount=e.childrenIds.length,e.deepCollapsedChildCount=e.collapsedChildCount;for(var o=i[e.pid];o;)o.deepCollapsedChildCount+=e.collapsedChildCount,o.deepChildCount+=e.childCount,o=i[o.pid];for(var a of e.stChildrenIds)OrgChart.manager._setChildCountPropsIterate(i[a],i);for(var a of e.childrenIds)OrgChart.manager._setChildCountPropsIterate(i[a],i)},OrgChart.manager._setMinMaxXYAdjustifyIterate=function(e,i,o,a,s,l,c,d){for(var h of(e.x+=l.x,e.y+=l.y,e.stChildren))OrgChart.manager._setMinMaxXYAdjustifyIterate(h,h,o,0,s,l,c,d);for(var h of(e.isPartner?e.sl=a-1:e.sl=a,null==s[i.id]&&(s[i.id]={}),null==s[i.id][e.sl]&&(s[i.id][e.sl]={minX:null,minY:null,maxX:null,maxY:null}),e.layout?(null==d[i.id]&&(d[i.id]={}),null==d[i.id][e.sl]&&(d[i.id][e.sl]=e)):OrgChart._setMinMaxXY(e,s[i.id][e.sl],!0),null!=e.movex&&(e.x+=e.movex),null!=e.movey&&(e.y+=e.movey),OrgChart._setMinMaxXY(e,o,!0),a++,e.children))OrgChart.manager._setMinMaxXYAdjustifyIterate(h,i,o,a,s,l,c,d)},OrgChart.manager._doNotChangePositionOfClickedNodeIfAny=function(e,i,o,a,s,l){if(o!=OrgChart.action.expand&&o!=OrgChart.action.collapse&&o!=OrgChart.action.minimize&&o!=OrgChart.action.maximize&&o!=OrgChart.action.centerNode&&o!=OrgChart.action.update&&o!=OrgChart.action.insert)return{x:0,y:0};if(o==OrgChart.action.update&&(!a||null==a.id)){if(!e||!e.length)return{x:0,y:0};a={id:e[0].id}}if(null==a.id)return{x:0,y:0};var c=a.id;(o==OrgChart.action.minimize&&i[c].parent||o==OrgChart.action.maximize&&i[c].parent)&&(c=i[c].pid);var d=i[c],h=s[c];if(!h)return{x:0,y:0};var p=null!=h.movex?h.movex:0,u=null!=h.movey?h.movey:0,f={x:(h.x?h.x-p:0)-d.x,y:(h.y?h.y-u:0)-d.y};return d&&d.isTreeListItem?{x:0,y:0}:f},OrgChart.manager._verticalAssistantIterate=function(e,i){for(var o=0;o<e.stChildren.length;o++)OrgChart.manager._verticalAssistantIterate(e.stChildren[o],i);if(3==e.children.length)OrgChart.manager._verticalAssistantIterate(e.children[0],i),OrgChart.manager._verticalAssistantIterate(e.children[2],i),OrgChart.manager._verticalAssistantIterate(e.children[1],i);else for(o=0;o<e.children.length;o++)OrgChart.manager._verticalAssistantIterate(e.children[o],i);if(e.isAssistant&&e.isSplit&&e.children.length){for(var a=e.parent.children[0],s=e.parent.children[2],l=e.parent;!l.hasAssistants;)l=l.parent;var c={max:0},d={max:0};OrgChart.manager._verticalAssistantLevelCountIterate(a,0,c),OrgChart.manager._verticalAssistantLevelCountIterate(s,0,d);var h=Math.max(c.max,d.max),p=[];for(o=0;o<h;o++){var u=new OrgChart.node(e.parent.id+"_split_assitant_level_"+o,e.pid,[],"subLevel");OrgChart.manager._initDinamicNode(u,e.lcn,!0),null!=l.movex&&(u.movex=l.movex),null!=l.movey&&(u.movey=l.movey),o>0&&(p[o-1].children.push(u),u.parent=p[o-1]),i[u.id]=u,p.push(u)}if(p.length){for(var f=p[p.length-1],g=p[0],m=e.children.length-1;m>=0;m--){var b=e.children[m];f.children.unshift(b),b.parent=f,e.children.splice(m,1)}e.children.push(g),g.parent=e}}},OrgChart.manager._verticalAssistantLevelCountIterate=function(e,i,o){o.max<i&&(o.max=i),i++;for(var a=0;a<e.children.length;a++)OrgChart.manager._verticalAssistantLevelCountIterate(e.children[a],i,o)},OrgChart._addDottedLines=function(e){var i=e.nodes;if((e.groupDottedLines.length||e.dottedLines.length)&&(i=JSON.parse(JSON.stringify(i))),e.groupDottedLines.length)for(var o=[],a=0;a<e.groupDottedLines.length;a++){var s=e.groupDottedLines[a];null==s.rootId&&(s.rootId=s.to);var l=`balkan_group_dotted_${s.rootId}`;if(!o.has(l))for(var c=0;c<i.length;c++)if(i[c].id==s.rootId){(u=JSON.parse(JSON.stringify(i[c]))).id=`balkan_group_dotted_${s.rootId}_balkan_id_${i[c].id}`,u.pid=void 0,u.stpid=i[c].id,i.push(u),o.push(l),i[c].tags||(i[c].tags=[]),i[c].tags.push("group-dotted-lines"),i[c].tags.push("group-dotted-lines-"+l);break}for(c=0;c<i.length;c++)if(i[c].id==s.from){if((u=JSON.parse(JSON.stringify(i[c]))).id=`balkan_group_dotted_${s.rootId}_balkan_id_${i[c].id}`,u.pid=`balkan_group_dotted_${s.rootId}_balkan_id_${s.to}`,u.tags){var d=u.tags.indexOf("group-dotted-lines");-1!=d&&u.tags.splice(d,1)}if(u.tags||(u.tags=[]),u.tags.push("boc-dotted-connector"),s.tags)for(var h=0;h<s.tags.length;h++)u.tags.push(s.tags[h]);i.push(u);break}}if(e.dottedLines.length)for(a=0;a<e.dottedLines.length;a++){var p=e.dottedLines[a];null==p.rootId&&(p.rootId=p.to);for(c=0;c<i.length;c++)if(i[c].id==p.from){var u;if((u=JSON.parse(JSON.stringify(i[c]))).id=`balkan_dotted_${p.rootId}_balkan_id_${i[c].id}`,p.rootId==p.to?u.pid=p.to:u.pid=`balkan_dotted_${p.rootId}_balkan_id_${p.to}`,u.tags||(u.tags=[]),u.tags.push("boc-dotted-connector"),p.tags)for(h=0;h<p.tags.length;h++)u.tags.push(p.tags[h]);i.push(u);break}}return i},void 0===OrgChart&&(OrgChart={}),OrgChart.templates={},OrgChart.templates.base={defs:"",size:[250,120],expandCollapseSize:30,linkAdjuster:{fromX:0,fromY:0,toX:0,toY:0},ripple:{radius:0,color:"#e6e6e6",rect:null},assistanseLink:'<path stroke-linejoin="round" stroke="#aeaeae" stroke-width="2px" fill="none" d="M{xa},{ya} {xb},{yb} {xc},{yc} {xd},{yd} L{xe},{ye}"/>',svg:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="display:block;" width="{w}" height="{h}" viewBox="{viewBox}">{content}</svg>',link:'<path stroke-linejoin="round" stroke="#aeaeae" stroke-width="1px" fill="none" d="M{xa},{ya} {xb},{yb} {xc},{yc} L{xd},{yd}"/>',node:'<rect x="0" y="0" height="120" width="250" fill="none" stroke-width="1" stroke="#aeaeae" rx="7" ry="7"></rect>',plus:function(e,i,o,a,s){var l="dark"==a.mode?"#1E1E1E":"#ffffff";return`<g transform="matrix(1,0,0,1,${s.x-15},${s.y-15})"><circle cx="15" cy="15" r="15" fill="${l}" stroke="#aeaeae" stroke-width="1"></circle>\n <text text-anchor="middle" style="font-size: 14px;cursor:pointer;" fill="#aeaeae" x="15" y="21">${e.deepCollapsedChildCount}</text></g>`},minus:function(e,i,o,a,s){var l="dark"==a.mode?"#1E1E1E":"#ffffff";return`<g transform="matrix(1,0,0,1,${s.x-15},${s.y-15})"><circle cx="15" cy="15" r="15" fill="${l}" stroke="#aeaeae" stroke-width="1"></circle>\n <line x1="4" y1="15" x2="26" y2="15" stroke-width="1" stroke="#aeaeae"></line></g>`},nodeMenuButton:'<g style="cursor:pointer;" transform="matrix(1,0,0,1,225,105)"><rect x="-4" y="-10" fill="#000000" fill-opacity="0" width="22" height="22"></rect><circle cx="0" cy="0" r="2" fill="#ffffff"></circle><circle cx="7" cy="0" r="2" fill="#ffffff"></circle><circle cx="14" cy="0" r="2" fill="#ffffff"></circle></g>',menuButton:'<div style="user-select:none;position:absolute;right:{p}px;top:{p}px; width:30px;height:50px;cursor:pointer;" '+OrgChart.attr.control_export_menu+'=""><hr style="background-color: #7A7A7A; height: 3px; border: none;"><hr style="background-color: #7A7A7A; height: 3px; border: none;"><hr style="background-color: #7A7A7A; height: 3px; border: none;"></div>',img_0:'<clipPath id="{randId}"><circle cx="60" cy="60" r="40"></circle></clipPath><image preserveAspectRatio="xMidYMid slice" clip-path="url(#{randId})" xlink:href="{val}" x="20" y="20" width="80" height="80"></image>',link_field_0:'<text text-anchor="middle" fill="#aeaeae" '+OrgChart.attr.width+'="290" x="0" y="0" style="font-size:10px;">{val}</text>',editFormHeaderColor:"#039BE5",treeListMaxHeight:500},OrgChart.templates.ana={defs:"",size:[250,120],linkAdjuster:{fromX:0,fromY:0,toX:0,toY:0},ripple:{radius:0,color:"#e6e6e6",rect:null},expandCollapseSize:30,svg:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="display:block;" width="{w}" height="{h}" viewBox="{viewBox}">{content}</svg>',link:'<path stroke-linejoin="round" stroke="#aeaeae" stroke-width="1px" fill="none" d="{rounded}" />',assistanseLink:'<path stroke-linejoin="round" stroke="#aeaeae" stroke-width="2px" fill="none" d="M{xa},{ya} {xb},{yb} {xc},{yc} {xd},{yd} L{xe},{ye}"/>',node:function(e,i,o,a){return`<rect x="0" y="0" height="${e.h}" width="${e.w}" fill="#039BE5" stroke-width="1" stroke="#aeaeae" rx="10" ry="10"></rect>`},plus:function(e,i,o,a,s){var l="dark"==a.mode?"#1E1E1E":"#ffffff";return`<g transform="matrix(1,0,0,1,${s.x-15},${s.y-15})"><circle cx="15" cy="15" r="15" fill="${l}" stroke="#aeaeae" stroke-width="1"></circle>\n <text text-anchor="middle" style="font-size: 14px;cursor:pointer;" fill="#aeaeae" x="15" y="21">${e.deepCollapsedChildCount}</text></g>`},minus:function(e,i,o,a,s){var l="dark"==a.mode?"#1E1E1E":"#ffffff";return`<g transform="matrix(1,0,0,1,${s.x-15},${s.y-15})"><circle cx="15" cy="15" r="15" fill="${l}" stroke="#aeaeae" stroke-width="1"></circle>\n <line x1="4" y1="15" x2="26" y2="15" stroke-width="1" stroke="#aeaeae"></line></g>`},up:'<rect x="20" y="-25" width="30" height="17" fill="#aeaeae" rx="3" ry="3"></rect><line x1="35" x2="35" y1="0" y2="-8" stroke="#aeaeae" stroke-width="1"></line>',nodeMenuButton:function(e,i,o,a){return`<g transform="matrix(1,0,0,1,${e.w-25},${e.h-15})"><rect x="-4" y="-10" fill="#000000" fill-opacity="0" width="22" height="22"></rect><circle cx="0" cy="0" r="2" fill="#ffffff"></circle><circle cx="7" cy="0" r="2" fill="#ffffff"></circle><circle cx="14" cy="0" r="2" fill="#ffffff"></circle></g>`},menuButton:OrgChart.templates.base.menuButton,img_0:function(e,i,o,a,s){var l=OrgChart.randomId();return`<clipPath id="${l}"><circle cx="50" cy="30" r="40"></circle></clipPath><image preserveAspectRatio="xMidYMid slice" clip-path="url(#${l})" xlink:href="${s}" x="10" y="-10" width="80" height="80" ></image>`},link_field_0:'<text text-anchor="middle" fill="#aeaeae" '+OrgChart.attr.width+'="290" x="0" y="0" style="font-size:10px;">{val}</text>',field_0:function(e,i,o,a,s){return OrgChart.wrapText(s,`<text style="font-size: 18px;" fill="#ffffff" x="${e.w/2}" y="${e.h-25}" text-anchor="middle"></text>`,e.w-20,1)},field_1:function(e,i,o,a,s){return OrgChart.wrapText(s,`<text style="font-size: 14px;" fill="#ffffff" x="${e.w-20}" y="30" text-anchor="end"></text>`,e.w-120,3)},padding:[75,5,50,5],editFormHeaderColor:"#039BE5",treeListMaxHeight:500},OrgChart.templates.split=Object.assign({},OrgChart.templates.ana),OrgChart.templates.split.size=[10,10],OrgChart.templates.split.node='<circle cx="5" cy="5" r="5" fill="none" stroke-width="1" stroke="#aeaeae"></circle>',OrgChart.templates.split.field_0="",OrgChart.templates.split.field_1="",OrgChart.templates.split.img_0="",OrgChart.templates.dot=Object.assign({},OrgChart.templates.split),OrgChart.templates.group=Object.assign({},OrgChart.templates.ana),OrgChart.templates.group.size=[250,120],OrgChart.templates.group.padding=[50,20,35,20],OrgChart.templates.group.node='<rect rx="50" ry="50" x="0" y="0" height="{h}" width="{w}" fill="#f2f2f2" stroke-width="0"></rect>',OrgChart.templates.group.link='<path stroke="#aeaeae" stroke-width="1px" fill="none" d="M{xa},{ya} C{xb},{yb} {xc},{yc} {xd},{yd}"/>',OrgChart.templates.group.nodeMenuButton='<g style="cursor:pointer;" transform="matrix(1,0,0,1,{ew},25)"><g transform="matrix(1,0,0,1,-22,-8)"><rect x="0" y="0" fill="red" fill-opacity="0" width="18" height="22"></rect><line x1="0" y1="2" x2="9" y2="2" stroke="#aeaeae" stroke-width="1"></line><line x1="0" y1="9" x2="18" y2="9" stroke="#aeaeae" stroke-width="1"></line><line x1="0" y1="16" x2="22" y2="16" stroke="#aeaeae" stroke-width="1"></line></g></g>',OrgChart.templates.group.field_0="<text "+OrgChart.attr.width+'="230" style="font-size: 18px;" fill="#aeaeae" x="{cw}" y="30" text-anchor="middle">{val}</text>',OrgChart.templates.group.field_1="",OrgChart.templates.group.ripple={radius:50,color:"#aeaeae"},OrgChart.templates.invisibleGroup=Object.assign({},OrgChart.templates.group),OrgChart.templates.invisibleGroup.node="",OrgChart.templates.invisibleGroup.padding=[0,0,0,0],OrgChart.templates.invisibleGroup.field_0="",OrgChart.templates.invisibleGroup.nodeMenuButton="",OrgChart.templates.mirror={linkAdjuster:{},link:"",node:"",nodeMenuButton:"",size:[0,0]},OrgChart.templates.ula=Object.assign({},OrgChart.templates.ana),OrgChart.templates.ula.field_0=function(e,i,o,a,s){return OrgChart.wrapText(s,'<text style="font-size: 18px;" fill="#039BE5" x="100" y="55"></text>',e.w-105,1)},OrgChart.templates.ula.field_1=function(e,i,o,a,s){return OrgChart.wrapText(s,'<text data-text-overflow="multiline" style="font-size: 14px;" fill="#afafaf" x="100" y="76"></text>',e.w-105,3)},OrgChart.templates.ula.node=function(e,i,o,a){return`<rect x="0" y="0" height="${e.h}" width="${e.w}" fill="#ffffff" stroke-width="1" stroke="#aeaeae"></rect><line x1="0" y1="0" x2="${e.w}" y2="0" stroke-width="2" stroke="#039BE5"></line>`},OrgChart.templates.ula.img_0=function(e,i,o,a,s){var l=OrgChart.randomId();return`<clipPath id="${l}"><circle cx="50" cy="60" r="40"></circle></clipPath><image preserveAspectRatio="xMidYMid slice" clip-path="url(#${l})" xlink:href="${s}" x="10" y="20" width="80" height="80" ></image>`},OrgChart.templates.ula.menu='<g style="cursor:pointer;" transform="matrix(1,0,0,1,225,12)" '+OrgChart.attr.control_node_menu_id+'="{id}"><rect x="-4" y="-10" fill="#ffffff" width="22" height="22"></rect><circle cx="0" cy="0" r="2" fill="#039BE5"></circle><circle cx="7" cy="0" r="2" fill="#039BE5"></circle><circle cx="14" cy="0" r="2" fill="#039BE5"></circle></g>',OrgChart.templates.ula.nodeMenuButton=function(e,i,o,a){return`<g transform="matrix(1,0,0,1,${e.w-25}, ${e.h-15})"><rect x="-4" y="-10" fill="#000000" fill-opacity="0" width="22" height="22"></rect><circle cx="0" cy="0" r="2" fill="#AEAEAE"></circle><circle cx="7" cy="0" r="2" fill="#AEAEAE"></circle><circle cx="14" cy="0" r="2" fill="#AEAEAE"></circle></g>`},OrgChart.templates.ula.padding=[110,1,1,1],OrgChart.templates.olivia=Object.assign({},OrgChart.templates.ana),OrgChart.templates.olivia.defs='<style>\n #olivia_gradient {\n --color-stop-1: #ffffff;\n --color-stop-2: #eeeeee;\n --opacity-stop: 1;\n }\n .olivia-f0{\n font-size: 18px;\n fill: #757575;\n }\n .olivia-f1{\n font-size: 14px;\n fill: #757575;\n }\n .boc-dark .olivia-f0,.boc-dark .olivia-f1{\n fill: #aeaeae;\n }\n .boc-dark #olivia_gradient {\n --color-stop-1: #646464;\n --color-stop-2: #363636;\n --opacity-stop: 1;\n }\n </style>\n <linearGradient id="olivia_gradient" x1="0%" y1="0%" x2="0%" y2="100%"><stop offset="0%" stop-color="var(--color-stop-1)" stop-opacity="var(--opacity-stop)"/><stop offset="100%" stop-color="var(--color-stop-2)" stop-opacity="var(--opacity-stop)" /></linearGradient>',OrgChart.templates.olivia.field_0=function(e,i,o,a,s){return OrgChart.wrapText(s,'<text class="olivia-f0" x="100" y="55"></text>',e.w-105,1)},OrgChart.templates.olivia.field_1=function(e,i,o,a,s){return OrgChart.wrapText(s,'<text class="olivia-f1" x="100" y="76"></text>',e.w-105,3)},OrgChart.templates.olivia.node=function(e,i,o,a){return`<rect fill="url(#olivia_gradient)" x="0" y="0" height="${e.h}" width="${e.w}" stroke-width="1" stroke="#aeaeae" rx="10" ry="10"></rect>`},OrgChart.templates.olivia.img_0='<clipPath id="{randId}"><circle cx="50" cy="60" r="40"></circle></clipPath><image preserveAspectRatio="xMidYMid slice" clip-path="url(#{randId})" xlink:href="{val}" x="10" y="20" width="80" height="80" ></image>',OrgChart.templates.olivia.nodeMenuButton=function(e,i,o,a){return`<g style="cursor:pointer;" transform="matrix(1,0,0,1,${e.w-25},${e.h-15})"><rect x="-4" y="-10" fill="#000000" fill-opacity="0" width="22" height="22"></rect><circle cx="0" cy="0" r="2" fill="#AEAEAE"></circle><circle cx="7" cy="0" r="2" fill="#AEAEAE"></circle><circle cx="14" cy="0" r="2" fill="#AEAEAE"></circle></g>`},OrgChart.templates.olivia.padding=[110,15,30,15],OrgChart.templates.belinda=Object.assign({},OrgChart.templates.ana),OrgChart.templates.belinda.size=[180,180],OrgChart.templates.belinda.ripple={radius:90,color:"#e6e6e6",rect:null},OrgChart.templates.belinda.node=function(e,i,o,a){return`<circle cx="${e.w/2}" cy="${e.h/2}" r="${e.w/2}" fill="#039BE5" stroke-width="1" stroke="#aeaeae"></circle>`},OrgChart.templates.belinda.img_0=function(e,i,o,a,s){var l=e.w/2,c=OrgChart.randomId();return`<clipPath id="${c}"><circle cx="${l}" cy="45" r="40"></circle></clipPath><image preserveAspectRatio="xMidYMid slice" clip-path="url(#${c})" xlink:href="${s}" x="${l-40}" y="5" width="80" height="80" ></image>`},OrgChart.templates.belinda.field_0=function(e,i,o,a,s){return OrgChart.wrapText(s,`<text style="font-size: 18px;" text-anchor="middle" fill="#ffffff" x="${e.w/2}" y="${e.h/2+15}"></text>`,e.w-10,1)},OrgChart.templates.belinda.field_1=function(e,i,o,a,s){return OrgChart.wrapText(s,`<text style="font-size: 14px;" text-anchor="middle" fill="#ffffff" x="${e.w/2}" y="${e.h/2+35}"></text>`,e.w-20,2)},OrgChart.templates.belinda.link='<path stroke="#aeaeae" stroke-width="1px" fill="none" d="M{xa},{ya} C{xb},{yb} {xc},{yc} {xd},{yd}"/>',OrgChart.templates.belinda.nodeMenuButton=function(e,i,o,a){return`<g style="cursor:pointer;" transform="matrix(1,0,0,1,${e.w/2-11},5)"><rect x="0" y="0" fill="#000000" fill-opacity="0" width="22" height="22"></rect><line stroke-width="2" stroke="#000" x1="0" y1="3" x2="22" y2="3"></line><line stroke-width="2" stroke="#000" x1="0" y1="9" x2="22" y2="9"></line><line stroke-width="2" stroke="#000" x1="0" y1="15" x2="22" y2="15"></line></g>`},OrgChart.templates.rony=Object.assign({},OrgChart.templates.ana),OrgChart.templates.rony.svg='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="background-color:#E8E8E8;display:block;" width="{w}" height="{h}" viewBox="{viewBox}">{content}</svg>',OrgChart.templates.rony.defs='<filter id="{randId}" x="0" y="0" width="200%" height="200%"><feOffset result="offOut" in="SourceAlpha" dx="5" dy="5"></feOffset><feGaussianBlur result="blurOut" in="offOut" stdDeviation="5"></feGaussianBlur><feBlend in="SourceGraphic" in2="blurOut" mode="normal"></feBlend></filter>',OrgChart.templates.rony.size=[180,250],OrgChart.templates.rony.ripple={color:"#F57C00",radius:5,rect:null},OrgChart.templates.rony.padding=[250,0,30,0],OrgChart.templates.rony.img_0=function(e,i,o,a,s){var l=e.w/2,c=OrgChart.randomId();return`<clipPath id="${c}"><circle cx="${l}" cy="160" r="60"></circle></clipPath><image preserveAspectRatio="xMidYMid slice" clip-path="url(#${c})" xlink:href="${s}" x="${l-60}" y="100" width="120" height="120" ></image>`},OrgChart.templates.rony.node=function(e,i,o,a){return`<rect filter="url(#{randId})" x="0" y="0" height="${e.h}" width="${e.w}" fill="#ffffff" stroke-width="0" rx="10" ry="10"></rect>'`},OrgChart.templates.rony.field_0=function(e,i,o,a,s){return OrgChart.wrapText(s,`<text style="font-size: 18px;" fill="#039BE5" x="${e.w/2}" y="40" text-anchor="middle"></text>`,e.w-15,1)},OrgChart.templates.rony.field_1=function(e,i,o,a,s){return OrgChart.wrapText(s,`<text style="font-size: 14px;" fill="#F57C00" x="${e.w/2}" y="60" text-anchor="middle"></text>`,e.w-15,3)},OrgChart.templates.rony.field_2=function(e,i,o,a,s){return OrgChart.wrapText(s,`<text style="font-size: 14px;" fill="#FFCA28" x="${e.w/2}" y="80" text-anchor="middle"></text>`,e.w-15,1)},OrgChart.templates.rony.link='<path stroke="#039BE5" stroke-width="1px" fill="none" d="M{xa},{ya} {xb},{yb} {xc},{yc} L{xd},{yd}"/>',OrgChart.templates.rony.plus=function(e,i,o,a,s){return`<g transform="matrix(1,0,0,1,${s.x-15},${s.y-15})"><circle cx="15" cy="15" r="15" fill="#ffffff" stroke="#039BE5" stroke-width="1"></circle><line x1="4" y1="15" x2="26" y2="15" stroke-width="1" stroke="#039BE5"></line><line x1="15" y1="4" x2="15" y2="26" stroke-width="1" stroke="#039BE5"></line></g>`},OrgChart.templates.rony.minus=function(e,i,o,a,s){return`<g transform="matrix(1,0,0,1,${s.x-15},${s.y-15})"><circle cx="15" cy="15" r="15" fill="#ffffff" stroke="#039BE5" stroke-width="1"></circle><line x1="4" y1="15" x2="26" y2="15" stroke-width="1" stroke="#039BE5"></line></g>`},OrgChart.templates.rony.nodeMenuButton=function(e,i,o,a){return`<g transform="matrix(1,0,0,1,${e.w-25},${e.h-15})"><rect x="-4" y="-10" fill="#000000" fill-opacity="0" width="22" height="22"></rect><circle cx="0" cy="0" r="2" fill="#F57C00"></circle><circle cx="7" cy="0" r="2" fill="#F57C00"></circle><circle cx="14" cy="0" r="2" fill="#F57C00"></circle></g>`},OrgChart.templates.mery=Object.assign({},OrgChart.templates.ana),OrgChart.templates.mery.ripple={color:"#e6e6e6",radius:50,rect:null},OrgChart.templates.mery.node=function(e,i,o,a){return`<rect x="0" y="0" height="${e.h}" width="${e.w}" fill="#ffffff" stroke-width="1" stroke="#686868" rx="50" ry="50"></rect><rect x="0" y="${e.h/2-15}" height="30" width="${e.w}" fill="#039BE5" stroke-width="1"></rect>`},OrgChart.templates.mery.link='<path stroke="#aeaeae" stroke-width="1px" fill="none" d="M{xa},{ya} C{xb},{yb} {xc},{yc} {xd},{yd}" />',OrgChart.templates.mery.img_0=function(e,i,o,a,s){var l=e.w/2,c=e.h/2,d=OrgChart.randomId();return`<clipPath id="${d}"><circle cx="${l}" cy="${c}" r="24"></circle></clipPath><image preserveAspectRatio="xMidYMid slice" clip-path="url(#${d})" xlink:href="${s}" x="${l-24}" y="${c-24}" width="48" height="48" ></image>`},OrgChart.templates.mery.field_0=function(e,i,o,a,s){return OrgChart.wrapText(s,`<text style="font-size: 18px;" fill="#039BE5" x="${e.w/2}" y="${e.h/2-30}" text-anchor="middle"></text>`,e.w-30,1)},OrgChart.templates.mery.field_1=function(e,i,o,a,s){return OrgChart.wrapText(s,`<text style="font-size: 14px;" fill="#039BE5" x="${e.w/2}" y="${e.h/2+40}" text-anchor="middle"></text>`,e.w-30,1)},OrgChart.templates.mery.nodeMenuButton=function(e,i,o,a){return`<g transform="matrix(1,0,0,1,${e.w-25}, ${e.h/2})"><rect x="-4" y="-10" fill="#000000" fill-opacity="0" width="22" height="22"></rect><circle cx="0" cy="0" r="2" fill="#ffffff"></circle><circle cx="7" cy="0" r="2" fill="#ffffff"></circle><circle cx="14" cy="0" r="2" fill="#ffffff"></circle></g>`},OrgChart.templates.polina=Object.assign({},OrgChart.templates.ana),OrgChart.templates.polina.size=[300,80],OrgChart.templates.polina.padding=[80,15,30,15],OrgChart.templates.polina.ripple={color:"#e6e6e6",radius:40,rect:null},OrgChart.templates.polina.node=function(e,i,o,a){return`<rect x="0" y="0" height="${e.h}" width="${e.w}" fill="#039BE5" stroke-width="1" stroke="#686868" rx="40" ry="40"></rect>`},OrgChart.templates.polina.img_0='<clipPath id="{randId}"><circle cx="40" cy="40" r="35"></circle></clipPath><image preserveAspectRatio="xMidYMid slice" clip-path="url(#{randId})" xlink:href="{val}" x="0" y="0" width="80" height="80"></image>',OrgChart.templates.polina.field_0=function(e,i,o,a,s){return OrgChart.wrapText(s,'<text style="font-size: 18px;" fill="#ffffff" x="80" y="30" text-anchor="start"></text>',e.w-90,1)},OrgChart.templates.polina.field_1=function(e,i,o,a,s){return OrgChart.wrapText(s,'<text style="font-size: 14px;" fill="#ffffff" x="80" y="55" text-anchor="start"></text>',e.w-90,1)},OrgChart.templates.polina.link='<path stroke="#686868" stroke-width="1px" fill="none" d="M{xa},{ya} C{xb},{yb} {xc},{yc} {xd},{yd}" />',OrgChart.templates.polina.nodeMenuButton=function(e,i,o,a){return`<g transform="matrix(1,0,0,1,${e.w-15},33)"><rect x="-4" y="-10" fill="#000000" fill-opacity="0" width="22" height="22"></rect><circle cx="0" cy="0" r="2" fill="#ffffff"></circle><circle cx="0" cy="7" r="2" fill="#ffffff"></circle><circle cx="0" cy="14" r="2" fill="#ffffff"></circle></g>`},OrgChart.templates.mila=Object.assign({},OrgChart.templates.ana),OrgChart.templates.mila.padding=[60,15,120,15],OrgChart.templates.mila.node=function(e,i,o,a){return`<rect x="0" y="0" height="${e.h}" width="${e.w}" fill="#039BE5" stroke-width="1" stroke="#aeaeae"></rect><rect x="-5" y="${e.h-50}" height="30" width="${e.w+10}" fill="#ffffff" stroke-width="1" stroke="#039BE5"></rect><line x1="-5" x2="0" y1="${e.h-20}" y2="${e.h-15}" stroke-width="1" stroke="#039BE5"/><line x1="${e.w+5}" x2="${e.w}" y1="${e.h-20}" y2="${e.h-15}" stroke-width="1" stroke="#039BE5"/>`},OrgChart.templates.mila.img_0=function(e,i,o,a,s){return`<image preserveAspectRatio="xMidYMid slice" xlink:href="${s}" x="20" y="${e.h-115}" width="64" height="64"></image>`},OrgChart.templates.mila.field_0=function(e,i,o,a,s){return OrgChart.wrapText(s,`<text style="font-size: 18px;" fill="#039BE5" x="${e.w/2}" y="${e.h-28}" text-anchor="middle"></text>`,e.w-10,1)},OrgChart.templates.mila.nodeMenuButton=function(e,i,o,a){return`<g transform="matrix(1,0,0,1,${e.w-25},${e.h-10})"><rect x="-4" y="-10" fill="#000000" fill-opacity="0" width="22" height="22"></rect><circle cx="0" cy="0" r="2" fill="#ffffff"></circle><circle cx="7" cy="0" r="2" fill="#ffffff"></circle><circle cx="14" cy="0" r="2" fill="#ffffff"></circle></g>`},OrgChart.templates.diva=Object.assign({},OrgChart.templates.ana),OrgChart.templates.diva.size=[200,170],OrgChart.templates.diva.padding=[160,10,30,10],OrgChart.templates.diva.node=function(e,i,o,a){return`<rect x="0" y="80" height="${e.h-80}" width="${e.w}" fill="#039BE5"></rect><circle cx="${e.w/2}" cy="50" fill="#ffffff" r="50" stroke="#039BE5" stroke-width="2"></circle>`},OrgChart.templates.diva.img_0=function(e,i,o,a,s){var l=e.w/2,c=OrgChart.randomId();return`<clipPath id="${c}"><circle cx="${l}" cy="50" r="45"></circle></clipPath><image preserveAspectRatio="xMidYMid slice" clip-path="url(#${c})" xlink:href="${s}" x="${l-45}" y="5" width="90" height="90" ></image>`},OrgChart.templates.diva.field_0=function(e,i,o,a,s){return OrgChart.wrapText(s,`<text style="font-size: 18px;" fill="#ffffff" x="${e.w/2}" y="125" text-anchor="middle"></text>`,e.w-15,1)},OrgChart.templates.diva.field_1=function(e,i,o,a,s){return OrgChart.wrapText(s,`<text style="font-size: 14px;" fill="#ffffff" x="${e.w/2}" y="145" text-anchor="middle"></text>`,e.w-15,1)},OrgChart.templates.diva.pointer='<g data-pointer="pointer" transform="matrix(0,0,0,0,100,100)"><radialGradient id="pointerGradient"><stop stop-color="#ffffff" offset="0" /><stop stop-color="#039BE5" offset="1" /></radialGradient><circle cx="16" cy="16" r="16" stroke-width="1" stroke="#acacac" fill="url(#pointerGradient)"></circle></g>',OrgChart.templates.diva.nodeMenuButton=function(e,i,o,a){return`<g transform="matrix(1,0,0,1,${e.w-30}, ${e.h-15})"><rect x="-4" y="-10" fill="#000000" fill-opacity="0" width="22" height="22"></rect><circle cx="0" cy="0" r="2" fill="#ffffff"></circle><circle cx="7" cy="0" r="2" fill="#ffffff"></circle><circle cx="14" cy="0" r="2" fill="#ffffff"></circle></g>`},OrgChart.templates.luba=Object.assign({},OrgChart.templates.ana),OrgChart.templates.luba.svg='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="display:block;background-color: #2E2E2E;" width="{w}" height="{h}" viewBox="{viewBox}">{content}</svg>',OrgChart.templates.luba.defs='<linearGradient id="{randId}" x1="0%" y1="0%" x2="0%" y2="100%"><stop offset="0%" style="stop-color:#646464;stop-opacity:1" /><stop offset="100%" style="stop-color:#363636;stop-opacity:1" /></linearGradient>',OrgChart.templates.luba.node=function(e,i,o,a){return`<rect fill="url(#{randId})" x="0" y="0" height="${e.h}" width="${e.w}" stroke-width="1" stroke="#aeaeae" rx="10" ry="10"></rect>`},OrgChart.templates.luba.padding=[70,10,60,10],OrgChart.templates.luba.img_0=function(e,i,o,a,s){var l=OrgChart.randomId();return`<clipPath id="${l}"><circle cx="50" cy="25" r="40"></circle></clipPath><image preserveAspectRatio="xMidYMid slice" clip-path="url(#${l})" xlink:href="${s}" x="10" y="-15" width="80" height="80" ></image>`},OrgChart.templates.luba.nodeMenuButton=function(e,i,o,a){return`<g transform="matrix(1,0,0,1,${e.w-25},${e.h-15})"><rect x="-4" y="-10" fill="#000000" fill-opacity="0" width="22" height="22"></rect><circle cx="0" cy="0" r="2" fill="#aeaeae"></circle><circle cx="7" cy="0" r="2" fill="#aeaeae"></circle><circle cx="14" cy="0" r="2" fill="#aeaeae"></circle></g>`},OrgChart.templates.luba.field_0=function(e,i,o,a,s){return OrgChart.wrapText(s,`<text style="font-size: 18px;" fill="#aeaeae" x="${e.w/2}" y="${e.h-30}" text-anchor="middle"></text>`,e.w-15,1)},OrgChart.templates.luba.field_1=function(e,i,o,a,s){return OrgChart.wrapText(s,`<text style="font-size: 14px;" fill="#aeaeae" x="${e.w-10}" y="30" text-anchor="end"></text>`,e.w-110,1)},OrgChart.templates.luba.plus='<rect x="0" y="0" width="36" height="36" rx="12" ry="12" fill="#2E2E2E" stroke="#aeaeae" stroke-width="1"></rect><line x1="4" y1="18" x2="32" y2="18" stroke-width="1" stroke="#aeaeae"></line><line x1="18" y1="4" x2="18" y2="32" stroke-width="1" stroke="#aeaeae"></line>',OrgChart.templates.luba.minus='<rect x="0" y="0" width="36" height="36" rx="12" ry="12" fill="#2E2E2E" stroke="#aeaeae" stroke-width="1"></rect><line x1="4" y1="18" x2="32" y2="18" stroke-width="1" stroke="#aeaeae"></line>',OrgChart.templates.luba.expandCollapseSize=36,OrgChart.templates.isla=Object.assign({},OrgChart.templates.ana),OrgChart.templates.isla.defs='<filter x="-50%" y="-50%" width="200%" height="200%" filterUnits="objectBoundingBox" id="isla-shadow"><feOffset dx="0" dy="4" in="SourceAlpha" result="shadowOffsetOuter1" /><feGaussianBlur stdDeviation="10" in="shadowOffsetOuter1" result="shadowBlurOuter1" /><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0" in="shadowBlurOuter1" type="matrix" result="shadowMatrixOuter1" /><feMerge><feMergeNode in="shadowMatrixOuter1" /><feMergeNode in="SourceGraphic" /></feMerge></filter>',OrgChart.templates.isla.size=[180,120],OrgChart.templates.isla.padding=[70,1,60,1],OrgChart.templates.isla.node=function(e,i,o,a){return`<rect filter="url(#isla-shadow)" x="0" y="20" rx="10" ry="10" height="${e.h-20}" width="${e.w}" fill="#FFF" stroke-width="1" stroke="#039BE5" ></rect><rect x="25" y="${e.h-45}" rx="10" ry="10" height="20" width="${e.w-50}" fill="#039BE5" stroke-width="3" stroke="#039BE5"></rect><rect fill="#ffffff" stroke="#039BE5" stroke-width="1" x="${e.w/2-20}" y="0" rx="13" ry="13" width="40" height="40"></rect><circle stroke="#FFCA28" stroke-width="3" fill="none" cx="${e.w/2}" cy="12" r="8"></circle><path d="M${e.w/2-15},34 C${e.w/2-15},17 ${e.w/2+15},17 ${e.w/2+15},34" stroke="#FFCA28" stroke-width="3" fill="none"></path>`},OrgChart.templates.isla.field_0=function(e,i,o,a,s){return OrgChart.wrapText(s,`<text style="font-size: 12px;" fill="#fff" x="${e.w/2}" y="${e.h-30}" text-anchor="middle"></text>`,e.w-60,1)},OrgChart.templates.isla.field_1=function(e,i,o,a,s){return OrgChart.wrapText(s,`<text style="font-size: 13px;" fill="#039BE5" x="${e.w/2}" y="64" text-anchor="middle"></text>`,e.w-20,1)},OrgChart.templates.isla.img_0="",OrgChart.templates.isla.img_0=function(e,i,o,a,s){var l=OrgChart.randomId();return`<clipPath id="${l}"><rect filter="url(#isla-shadow)" fill="#ffffff" stroke="#039BE5" stroke-width="1" x="${e.w/2-20}" y="0" rx="13" ry="13" width="40" height="40"></rect></clipPath><image preserveAspectRatio="xMidYMid slice" clip-path="url(#${l})" xlink:href="${s}" x="${e.w/2-20}" y="0" width="40" height="40"></image>`},OrgChart.templates.isla.minus='<circle cx="15" cy="15" r="15" fill="#F57C00" stroke="#F57C00" stroke-width="1"></circle><line x1="8" y1="15" x2="22" y2="15" stroke-width="1" stroke="#ffffff"></line>',OrgChart.templates.isla.plus='<circle cx="15" cy="15" r="15" fill="#ffffff" stroke="#039BE5" stroke-width="1"></circle><line x1="4" y1="15" x2="26" y2="15" stroke-width="1" stroke="#039BE5"></line><line x1="15" y1="4" x2="15" y2="26" stroke-width="1" stroke="#039BE5"></line>',OrgChart.templates.isla.nodeMenuButton=function(e,i,o,a){return`<g transform="matrix(1,0,0,1,${e.w/2-7},45)"><rect x="-4" y="-10" fill="#000000" fill-opacity="0" width="22" height="22"></rect><circle cx="0" cy="0" r="2" fill="#F57C00"></circle><circle cx="7" cy="0" r="2" fill="#F57C00"></circle><circle cx="14" cy="0" r="2" fill="#F57C00"></circle></g>`},OrgChart.templates.isla.ripple={radius:0,color:"#F57C00",rect:{x:0,y:20,width:180,height:100}},OrgChart.templates.deborah=Object.assign({},OrgChart.templates.polina),OrgChart.templates.deborah.size=[150,150],OrgChart.templates.deborah.node=function(e,i,o,a){return`<rect x="0" y="0" height="${e.h}" width="${e.w}" fill="#039BE5" stroke-width="1" stroke="#686868" rx="15" ry="15"></rect>`},OrgChart.templates.deborah.img_0=function(e,i,o,a,s){var l=OrgChart.randomId();return`<clipPath id="${l}"><rect fill="#ffffff" stroke="#039BE5" stroke-width="1" x="5" y="5" rx="15" ry="15" width="${e.w-10}" height="${e.h-10}"></rect></clipPath><image preserveAspectRatio="xMidYMid slice" clip-path="url(#${l})" xlink:href="${s}" x="5" y="5" width="${e.w-10}" height="${e.h-10}"></image><rect x="3" y="5" height="30" width="${e.w-6}" fill="#039BE5" opacity="0.5" rx="3" ry="3"></rect><rect x="3" y="${e.h-35}" height="30" width="${e.w-6}" fill="#039BE5" opacity="0.5" rx="3" ry="3"></rect>`},OrgChart.templates.deborah.field_0=function(e,i,o,a,s){return OrgChart.wrapText(s,'<text style="font-size: 18px;" fill="#ffffff" x="15" y="25" text-anchor="start"></text>',e.w-25,1)},OrgChart.templates.deborah.field_1=function(e,i,o,a,s){return OrgChart.wrapText(s,`<text style="font-size: 11px;" fill="#ffffff" x="15" y="${e.h-15}" text-anchor="start"></text>`,e.w-45,1)},OrgChart.templates.deborah.nodeMenuButton=function(e,i,o,a){return`<g style="cursor:pointer;" transform="matrix(1,0,0,1,${e.w-25},${e.h-20})"><rect x="-4" y="-10" fill="#000000" fill-opacity="0" width="22" height="22"></rect><circle cx="0" cy="0" r="2" fill="#ffffff"></circle><circle cx="7" cy="0" r="2" fill="#ffffff"></circle><circle cx="14" cy="0" r="2" fill="#ffffff"></circle></g>`},OrgChart.templates.subLevel=Object.assign({},OrgChart.templates.base),OrgChart.templates.subLevel.size=[0,0],OrgChart.templates.subLevel.node="",OrgChart.templates.subLevel.plus="",OrgChart.templates.subLevel.minus="",OrgChart.templates.subLevel.nodeMenuButton="",OrgChart.templates.group_dotted_lines=Object.assign({},OrgChart.templates.group),OrgChart.templates.group_dotted_lines.size=[250,120],OrgChart.templates.group_dotted_lines.padding=[50,20,35,20],OrgChart.templates.group_dotted_lines.link='<path stroke-linejoin="round" stroke="#aeaeae" stroke-width="1px" fill="none" d="{rounded}" />',OrgChart.templates.group_dotted_lines.node='<rect rx="5" ry="5" x="0" y="0" height="{h}" width="{w}" fill="#e5e5e5" stroke-width="0"></rect>',OrgChart.templates.group_dotted_lines.nodeGroupDottedCloseButton='<g transform="matrix(1,0,0,1,{ew},0)"><circle cx="0.5" cy="21.5" r="12" fill="#F57C00"></circle>'+OrgChart.icon.close(25,25,"#fff",-13,8)+"</g>",OrgChart.templates.group_dotted_lines.field_0='<text data-width="230" style="font-size: 18px;" fill="#F57C00" x="20" y="30" text-anchor="start">Dotted Lines</text>',OrgChart.templates.group_dotted_lines.field_1="",OrgChart.templates.group_dotted_lines.img_0="",OrgChart.templates.group_dotted_lines.ripple.radius=5,OrgChart.templates.group_dotted_lines.min=Object.assign({},OrgChart.templates.olivia),OrgChart.templates.group_dotted_lines.min.nodeGroupDottedOpenButton='<g transform="matrix(1,0,0,1,220,10)"><rect x="0" y="0" width="22" height="22" stroke="#aeaeae" stroke-width="1" fill="#ffffff" rx="5" ry="5"></rect><text x="11" y="16" text-anchor="middle" style="font-size: 14px;" fill="#2A292E">{children-total-count}</text><rect x="0" y="0" width="22" height="22" style="opacity: 0" stroke="#aeaeae" stroke-width="1" fill="red" rx="5" ry="5"></rect></g>',OrgChart.templates.clara=Object.assign({},OrgChart.templates.ana),OrgChart.templates.clara.size=[180,210],OrgChart.templates.clara.padding=[80,7,7,7],OrgChart.templates.clara.img_0=function(e,i,o,a,s){var l=50,c=30,d=40;e.stChildren.length||(d=60,l=e.w/2,c=70);var h=OrgChart.randomId();return`<clipPath id="${h}"><circle cx="${l}" cy="${c}" r="${d}"></circle></clipPath><image preserveAspectRatio="xMidYMid slice" clip-path="url(#${h})" xlink:href="${s}" x="${l-d}" y="${c-d}" width="${2*d}" height="${2*d}" ></image>`},OrgChart.templates.clara.treeListMaxHeight=387,OrgChart.templates.clara.field_0=function(e,i,o,a,s){var l=65,c=e.w/2,d="middle",h=e.w-100;return e.stChildren.length||(d="middle",c=e.w/2,l=160,h=e.w-20),OrgChart.wrapText(s,`<text style="font-size: 20px;" fill="#ffffff" x="${c}" y="${l}" text-anchor="${d}"></text>`,h,1)},OrgChart.templates.clara.field_1=function(e,i,o,a,s){var l=35,c=e.w-15,d="end",h=e.w-100;return e.stChildren.length||(d="middle",c=e.w/2,l=180,h=e.w-20),OrgChart.wrapText(s,`<text style="font-size: 14px;" fill="#ffffff" x="${c}" y="${l}" text-anchor="${d}"></text>`,h,1)},OrgChart.templates.clara.nodeMenuButton=function(e,i,o,a){return`<g style="cursor:pointer;" transform="matrix(1,0,0,1, ${e.w-35}, 2)">\n <rect x="0" y="0" fill="red" style="opacity: 0;" width="26" height="26"></rect>\n <circle cy="13" cx="6" r="2" fill="#fff"></circle>\n <circle cy="13" cx="13" r="2" fill="#fff"></circle>\n <circle cy="13" cx="20" r="2" fill="#fff"></circle>\n </g>`},OrgChart.templates.clara.node=function(e,i,o,a){return`<rect x="0" y="0" height="${e.h}" width="${e.w}" fill="#039BE5" stroke-width="1" stroke="#aeaeae" rx="10" ry="10"></rect>`},OrgChart.templates.treeListItem=Object.assign({},OrgChart.templates.ana),OrgChart.templates.treeListItem.size=[350,60],OrgChart.templates.treeListItem.field_0=function(e,i,o,a,s){var l=e.level*o.expandCollapseSize+45,c="dark"==a.mode?"#ccc":"#757575";return OrgChart.wrapText(s,`<text fill="${c}" x="${l}" y="27" style="font-size:16px;"></text>`,e.w-l-70,1)},OrgChart.templates.treeListItem.field_1=function(e,i,o,a,s){var l=e.level*o.expandCollapseSize+45,c="dark"==a.mode?"#ccc":"#757575";return OrgChart.wrapText(s,`<text fill="${c}" x="${l}" y="47" style="font-size:12px;"></text>`,e.w-l-70,1)},OrgChart.templates.treeListItem.img_0=function(e,i,o,a,s){var l=e.w-55,c=e.h/2,d=e.h/2-4,h=OrgChart.randomId();return`<clipPath id="${h}"><circle cx="${l}" cy="${c}" r="${d}"></circle></clipPath><image preserveAspectRatio="xMidYMid slice" clip-path="url(#${h})" xlink:href="${s}" x="${l-d}" y="${c-d}" width="${2*d}" height="${2*d}" ></image>`},OrgChart.templates.treeListItem.expandCollapseSize=24,OrgChart.templates.treeListItem.plus=function(e,i,o,a){var s=o.expandCollapseSize/2+e.level*o.expandCollapseSize,l=e.h/2;l-=o.expandCollapseSize/2;var c="dark"==a.mode?"#ccc":"#757575";return`<g transform="matrix(1,0,0,1,${s},${l})"><text x="6" style="font-size: 10px;" fill="${c}" y="15.5" text-anchor="end">${e.deepCollapsedChildCount}</text><path fill="${c}" d="M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z" /><rect style="opacity: 0" x="-3" y="-3" width="30" height="30"></rect></g>`},OrgChart.templates.treeListItem.minus=function(e,i,o,a){var s=o.expandCollapseSize/2+e.level*o.expandCollapseSize,l=e.h/2;return`<g transform="matrix(1,0,0,1,${s},${l-=o.expandCollapseSize/2})"><path fill="${"dark"==a.mode?"#ccc":"#757575"}" d="M7.42,8.59L12,13.17L16.59,8.59L18,10L12,16L6,10L7.42,8.59Z" /><rect style="opacity: 0" x="-3" y="-3" width="30" height="30"></rect></g>`},OrgChart.templates.treeListItem.nodeMenuButton=function(e,i,o,a){var s="dark"==a.mode?"#ccc":"#757575";return`<g style="cursor:pointer;" transform="matrix(1,0,0,1, ${e.w-36}, ${e.h/2-13})">\n <rect x="0" y="0" fill="red" style="opacity: 0;" width="26" height="26"></rect>\n <circle cx="13" cy="6" r="2" fill="${s}"></circle>\n <circle cx="13" cy="13" r="2" fill="${s}"></circle>\n <circle cx="13" cy="20" r="2" fill="${s}"></circle>\n </g>`},OrgChart.templates.treeListItem.node=function(e,i,o,a){var s="",l="#FFFFFF";if(e.isTreeListItem&&!e.stParent||e.isTreeListItem&&e.stParent&&e.stParent.stChildren[0]!=e){var c="#E0E0E0";"dark"==a.mode&&(c="#444444"),s=`<line stroke="${c}" stroke-width="1" x1="0" x2="${e.w}" y1="0" y2="0"></line>`}return"dark"==a.mode&&(l="#252526"),`<rect fill="${l}" x="0" y="0" height="${e.h}" width="${e.w}" rx="0" ry="0" ></rect>${s}`},OrgChart.ui={_defsIds:{},defs:function(e){var i="";for(var o in OrgChart.templates){var a=OrgChart.templates[o];a.defs&&(OrgChart.ui._defsIds[o]=OrgChart.randomId(),i+=a.defs.replaceAll("{randId}",OrgChart.ui._defsIds[o]))}return"<defs>"+i+e+"</defs>"},lonely:function(e){return e.nodes&&e.nodes.length?"":OrgChart.IT_IS_LONELY_HERE.replace("{link}",OrgChart.RES.IT_IS_LONELY_HERE_LINK)},pointer:function(e,i,o){if(i===OrgChart.action.exporting)return"";var a=OrgChart.t(e.template,!1,o).pointer;return a||(a=""),a},aiButton:function(e){return e.enableAI?'<div data-boc-ai-button class="boc-ai-button">AI</div>':""},node:function(e,i,o,a,s,l,c,d,h,p,u){var f=OrgChart.t(e.templateName,e.min,h),g="";"function"==typeof f.node?g=f.node(e,i,f,a):OrgChart.isNEU(f.node)||(g=f.node)&&(g=g.replaceAll("{w}",e.w).replaceAll("{h}",e.h)),f.defs&&(g=g.replaceAll("{randId}",OrgChart.ui._defsIds[e.templateName])),null==c&&(c=a.nodeBinding);var m={node:e,data:i};for(var b in c){var x,v=c[b];i&&(x=i[v]),null==x&&(x=e[v]),m.element=f[b],m.value=x;var y=!1;"function"==typeof m.element&&(y=!0,m.element=m.element(e,i,f,a,m.value));var _=OrgChart._lblIsImg(a,b);if(m.name=v,m.field=b,!1!==OrgChart.events.publish("field",[p,m])&&null!=m.value&&null!=m.value&&null!=m.element)if(y)g+=m.element;else if(!_||_&&!OrgChart.isNEU(m.value)){if(!_&&"string"==typeof m.value){var w=m.element;w&&(w=w.replaceAll("{ew}",e.w-(e.padding?e.padding[1]:0)).replaceAll("{cw}",e.w/2)),m.value=OrgChart.wrapText(m.value,w)}var k=m.element.replace("{val}",m.value);g+=k=k.replaceAll("{ew}",e.w-(e.padding?e.padding[1]:0)).replaceAll("{cw}",e.w/2).replaceAll("{randId}",OrgChart.randomId()).replaceAll("{randId2}",OrgChart.randomId())}}var I=OrgChart._getPosition(o,e,s,l),S="node";Array.isArray(e.tags)&&e.tags.length&&(S+=" "+e.tags.join(" ")),e.layout&&(S+=" tree-layout"),u&&(S+=" treelist-pinned");var C="";e.lcn&&(C='lcn="'+e.lcn+'"');var L=OrgChart.nodeOpenTag.replace("{lcn}",C).replace("{id}",e.id).replace("{class}",S).replace("{sl}",e.sl).replace("{level}",e.level).replace("{x}",I.x).replace("{y}",I.y),A=OrgChart._getOpacity(o,e);return g=(L=L.replace("{opacity}",A))+(g+=OrgChart.ui.nodeBtns(a,e,i,d,f,p))+OrgChart.grCloseTag},nodeBtns:function(e,i,o,a,s,l){var c="";return null==e.nodeMenu||i.isSplit||a===OrgChart.action.exporting||("function"==typeof s.nodeMenuButton?c+=s.nodeMenuButton(i,o,s,e):OrgChart.isNEU(s.nodeMenuButton)||(c+=s.nodeMenuButton.replace("{id}",i.id).replace("{cw}",i.w/2).replace("{ch}",i.h/2).replace("{ew}",i.w-(i.padding?i.padding[1]:0)).replace("{eh}",i.h-(i.padding?i.padding[2]:0)))),c&&(c=`<g style="cursor:pointer;" ${OrgChart.attr.control_node_menu_id}="${i.id}">${c}</g>`),null==e.nodeCircleMenu||i.isSplit||a===OrgChart.action.exporting||OrgChart.isNEU(s.nodeCircleMenuButton)||(c+='<g style="cursor:pointer;" transform="matrix(1,0,0,1,'+s.nodeCircleMenuButton.x+","+s.nodeCircleMenuButton.y+')" '+OrgChart.attr.control_node_circle_menu_id+'="'+i.id+'"><circle cx="0" cy="0" fill="'+s.nodeCircleMenuButton.color+'" r="'+s.nodeCircleMenuButton.radius+'" stroke-width="1" stroke="'+s.nodeCircleMenuButton.stroke+'"></circle><line x1="-'+s.nodeCircleMenuButton.radius/2+'" y1="-6" x2="'+s.nodeCircleMenuButton.radius/2+'" y2="-6" stroke-width="2" stroke="'+s.nodeCircleMenuButton.stroke+'"></line><line x1="-'+s.nodeCircleMenuButton.radius/2+'" y1="0" x2="'+s.nodeCircleMenuButton.radius/2+'" y2="0" stroke-width="2" stroke="'+s.nodeCircleMenuButton.stroke+'"></line><line x1="-'+s.nodeCircleMenuButton.radius/2+'" y1="6" x2="'+s.nodeCircleMenuButton.radius/2+'" y2="6" stroke-width="2" stroke="'+s.nodeCircleMenuButton.stroke+'"></line></g>'),c},expandCollapseBtn:function(e,i,o,a,s,l,c){var d="";if(l!==OrgChart.action.exporting&&!i.isSplit){var h=s[i.lcn?i.lcn:"base"],p=OrgChart.t(i.templateName,i.min,c);if(i.childrenIds.length>0){if(i.hasPartners){for(var u=!1,f=0;f<i.childrenIds.length;f++){var g=e.getNode(i.childrenIds[f]);!g||g.parentPartner||g.isPartner||(u=!0)}if(!u)return""}var m=OrgChart._getDefailtPositionForExpandCollpase(h,i),b={x:m.x+i.x-p.expandCollapseSize/2,y:m.y+i.y-p.expandCollapseSize/2},x=e.getCollapsedIds(i);x.length?("function"==typeof p.plus?(d+=OrgChart.expcollOpenTag.replace("{id}",i.id).replace("{x}",i.x).replace("{y}",i.y),d+=p.plus(i,o,p,a,m)):(d+=OrgChart.expcollOpenTag.replace("{id}",i.id).replace("{x}",b.x).replace("{y}",b.y),d+=p.plus),d+=OrgChart.grCloseTag):("function"==typeof p.minus?(d+=OrgChart.expcollOpenTag.replace("{id}",i.id).replace("{x}",i.x).replace("{y}",i.y),d+=p.minus(i,o,p,a,m)):(d+=OrgChart.expcollOpenTag.replace("{id}",i.id).replace("{x}",b.x).replace("{y}",b.y),d+=p.minus),d+=OrgChart.grCloseTag),(x.length&&"function"!=typeof p.plus||!x.length&&"function"!=typeof p.minus)&&(-1!=d.indexOf("{collapsed-children-count}")&&(d=d.replace("{collapsed-children-count}",i.collapsedChildCount)),-1!=d.indexOf("{collapsed-children-total-count}")&&(d=d.replace("{collapsed-children-total-count}",i.deepCollapsedChildCount)),-1!=d.indexOf("{children-count}")&&(d=d.replace("{children-count}",i.childCount)),-1!=d.indexOf("{children-total-count}")&&(d=d.replace("{children-total-count}",i.deepChildCount)))}e._nodeHasHiddenParent(i)&&(d+=OrgChart.upOpenTag.replace("{id}",i.id).replace("{x}",i.x).replace("{y}",i.y),d+=p.up,d+=OrgChart.grCloseTag)}var v={html:d,node:i};return OrgChart.events.publish("renderbuttons",[e,v]),v.html},link:function(e,i,o,a,s,l,c){var d=e.lcn?e.lcn:"base",h=i._layoutConfigs[d],p=OrgChart.t(e.templateName,e.min,o),u=[],f=[],g=h.levelSeparation/2;e.layout>0&&(g=h.mixedHierarchyNodesSeparation/2);var m=0,b=OrgChart.getRootOf(e).id,x=a[b][e.sl],v=void 0;if(e.hasPartners){v={ids:[],indexes:{},ppnodes:{},lastLeft:null,firstRight:null,maxSidePartnersWithChildren:0,rightIds:[],leftIds:[],partnerChildrenSplitSeparation:i.config.partnerChildrenSplitSeparation};for(var y=0;y<e.children.length;y++){(w=e.children[y]).parentPartner?(v.ppnodes[w.id]=w.parentPartner,v.ids.push(w.id),1==w.parentPartner.isPartner?(-1==v.rightIds.indexOf(w.parentPartner.id)&&v.rightIds.push(w.parentPartner.id),v.indexes[w.id]=v.rightIds.indexOf(w.parentPartner.id),v.firstRight||(v.firstRight=w)):2==w.parentPartner.isPartner&&(-1==v.leftIds.indexOf(w.parentPartner.id)&&v.leftIds.push(w.parentPartner.id),v.indexes[w.id]=v.leftIds.indexOf(w.parentPartner.id),v.lastLeft=w)):w.isPartner||(v.lastLeft=w,v.firstRight||(v.firstRight=w))}v.maxSidePartnersWithChildren=Math.max(v.leftIds.length,v.rightIds.length),m=0==v.maxSidePartnersWithChildren?i.config.minPartnerSeparation/2:i.config.minPartnerSeparation/2+v.partnerChildrenSplitSeparation*v.maxSidePartnersWithChildren+v.partnerChildrenSplitSeparation/2}for(y=0;y<e.children.length;y++){var _,w=e.children[y],k=a[b][w.sl],I={xa:0,ya:0,xb:0,yb:0,xc:0,yc:0,xd:0,yd:0,x:0,y:0,rotate:0},S=(p=OrgChart.t(w.templateName,w.min,o)).link;if(w.isChildOfPartner)switch(h.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:var C=1==w.layout?void 0:k.minY-(k.minY-x.maxY)/2;I=OrgChart.ui._linkTopToBottom(w.parentPartner,w,p,g,C,i);break;case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:C=1==w.layout?void 0:k.maxY-(k.maxY-x.minY)/2;I=OrgChart.ui._linkBottomToTop(w.parentPartner,w,p,g,C,i);break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:C=1==w.layout?void 0:k.maxX-(k.maxX-x.minX)/2;I=OrgChart.ui._linkRightToLeft(w.parentPartner,w,p,g,C,i);break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:C=1==w.layout?void 0:k.minX-(k.minX-x.maxX)/2;I=OrgChart.ui._linkLeftToRight(w.parentPartner,w,p,g,C,i)}else if(v&&-1!=v.ids.indexOf(w.id))switch(h.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:I=OrgChart.ui._linkPpTop(v,e,w,k,x,p);break;case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:I=OrgChart.ui._linkPpBottom(v,e,w,k,x,p);break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:I=OrgChart.ui._linkPpRight(v,e,w,k,x,p);break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:I=OrgChart.ui._linkPpLeft(v,e,w,k,x,p)}else{var L=w.isAssistant&&w.rightNeighbor&&w.rightNeighbor.isAssistant&&w.parent==w.rightNeighbor.parent,A=w.isAssistant&&w.leftNeighbor&&w.leftNeighbor.isAssistant&&w.parent==w.leftNeighbor.parent;if((L||w.layout>1)&&w.rightNeighbor&&w.rightNeighbor.isSplit)switch(h.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:I=OrgChart.ui._linkRightToLeft(w.rightNeighbor,w,p,g);break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:case OrgChart.orientation.left:case OrgChart.orientation.left_top:I=OrgChart.ui._linkBottomToTop(w.rightNeighbor,w,p,g)}else if((A||w.layout>1)&&w.leftNeighbor&&w.leftNeighbor.isSplit)switch(h.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:I=OrgChart.ui._linkLeftToRight(w.leftNeighbor,w,p,g,i);break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:case OrgChart.orientation.left:case OrgChart.orientation.left_top:I=OrgChart.ui._linkTopToBottom(w.leftNeighbor,w,p,g,i)}else switch(h.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:if(1==w.isPartner)I=OrgChart.ui._linkLeftToRight(e,w,p,m);else if(2==w.isPartner)I=OrgChart.ui._linkRightToLeft(e,w,p,m);else{C=1==w.layout?void 0:k.minY-(k.minY-x.maxY)/2;I=OrgChart.ui._linkTopToBottom(e,w,p,g,C,i)}break;case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:if(1==w.isPartner)I=OrgChart.ui._linkLeftToRight(e,w,p,m);else if(2==w.isPartner)I=OrgChart.ui._linkRightToLeft(e,w,p,m);else{C=1==w.layout?void 0:k.maxY-(k.maxY-x.minY)/2;I=OrgChart.ui._linkBottomToTop(e,w,p,g,C,i)}break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:if(1==w.isPartner)I=OrgChart.ui._linkTopToBottom(e,w,p,m);else if(2==w.isPartner)I=OrgChart.ui._linkBottomToTop(e,w,p,m);else{C=1==w.layout?void 0:k.maxX-(k.maxX-x.minX)/2;I=OrgChart.ui._linkRightToLeft(e,w,p,g,C,i)}break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:if(1==w.isPartner)I=OrgChart.ui._linkTopToBottom(e,w,p,m);else if(2==w.isPartner)I=OrgChart.ui._linkBottomToTop(e,w,p,m);else{C=1==w.layout?void 0:k.minX-(k.minX-x.maxX)/2;I=OrgChart.ui._linkLeftToRight(e,w,p,g,C,i)}}}var E=OrgChart.ui._draggableLinkPath(i,e,w,I,g,h.orientation);if(E)_=E,S=S.replaceAll("{rounded}",E).replaceAll("{edge}",E).replaceAll("{curve}",_);else if(-1!=S.indexOf("{rounded}"))if(I.xa==I.xb&&I.xa==I.xc&&I.xa==I.xd||I.ya==I.yb&&I.ya==I.yc&&I.ya==I.yd)_="M"+I.xa+","+I.ya+" L"+I.xd+","+I.yd,S=S.replaceAll("{rounded}",_);else if(Math.abs(I.xa-I.xd)<=OrgChart.LINK_ROUNDED_CORNERS&&Math.abs(I.xa-I.xc)<=OrgChart.LINK_ROUNDED_CORNERS&&Math.abs(I.xa-I.xb)<=OrgChart.LINK_ROUNDED_CORNERS)_="M"+I.xa+","+I.ya+" L"+I.xa+","+I.yd,S=S.replaceAll("{rounded}",_);else if(Math.abs(I.ya-I.yd)<=OrgChart.LINK_ROUNDED_CORNERS&&Math.abs(I.ya-I.yc)<=OrgChart.LINK_ROUNDED_CORNERS&&Math.abs(I.ya-I.yb)<=OrgChart.LINK_ROUNDED_CORNERS)_="M"+I.xa+","+I.ya+" L"+I.xd+","+I.ya,S=S.replaceAll("{rounded}",_);else{var N=OrgChart.ui._roundedEdge(I.xa,I.ya,I.xb,I.yb,I.xc,I.yc),$=OrgChart.ui._roundedEdge(I.xb,I.yb,I.xc,I.yc,I.xd,I.yd);_="M"+N.x1+","+N.y1+" "+N.x2+","+N.y2+" Q"+N.qx1+","+N.qy1+" "+N.qx2+","+N.qy2+" L"+$.x2+","+$.y2+" Q"+$.qx1+","+$.qy1+" "+$.qx2+","+$.qy2+" L"+$.x3+","+$.y3,S=S.replaceAll("{rounded}",_)}else-1!=S.indexOf("{edge}")?(_="M"+I.xa+","+I.ya+" "+I.xb+","+I.yb+" "+I.xc+","+I.yc+" L"+I.xd+","+I.yd,S=S.replaceAll("{edge}",_)):-1!=S.indexOf("{curve}")?(_="M"+I.xa+","+I.ya+" C"+I.xb+","+I.yb+" "+I.xc+","+I.yc+" "+I.xd+","+I.yd,S=S.replaceAll("{curve}",_)):(_=S.replaceAll("{xa}",I.xa).replaceAll("{ya}",I.ya).replaceAll("{xb}",I.xb).replaceAll("{yb}",I.yb).replaceAll("{xc}",I.xc).replaceAll("{yc}",I.yc).replaceAll("{xd}",I.xd).replaceAll("{yd}",I.yd),S=_);u.push(OrgChart.linkOpenTag.replaceAll("{id}",e.id).replaceAll("{class}","link "+w.tags.join(" ")).replaceAll("{child-id}",w.id));var M={node:e,cnode:w,p:I,html:S,action:l};OrgChart.events.publish("render-link",[i,M]),u.push(M.html),c&&f.push({id:e.id,childId:w.id,html:M.html});var T="";for(var P in i.config.linkBinding){var U=i.config.linkBinding[P],O=i._get(w.id);O&&(M.value=O[U],M.element=p[P],M.name=U,!1!==OrgChart.events.publish("label",[i,M])&&(OrgChart.isNEU(M.value)||OrgChart.isNEU(M.element)||(T+=M.element.replace("{val}",M.value))))}if(""!=T){var R=I.x,B=I.y;null!=w.movey&&(B+=w.movey),T=OrgChart.linkFieldsOpenTag.replace("{x}",R).replace("{y}",B).replace("{rotate}",0)+T+OrgChart.grCloseTag,u.push(T)}u.push(OrgChart.grCloseTag)}return c?f:u.join("")},svg:function(e,i,o,a,s,l){return OrgChart.t(a.template,!1,l).svg.replace("{w}",e).replace("{h}",i).replace("{viewBox}",o).replace("{randId}",OrgChart.ui._defsIds[a.template]).replace("{mode}",a.mode).replace("{template}",a.template).replace("{content}",function(){return s})},menuButton:function(e){return null==e.menu?"":OrgChart.t(e.template,!1).menuButton.replaceAll("{p}",e.padding)},_roundedEdge:function(e,i,o,a,s,l){var c,d,h,p=OrgChart.LINK_ROUNDED_CORNERS,u=0;return e==o&&e==s||i==a&&i==l?(c=h=o,d=u=a):(e!=s&&o==s&&(c=h=o,d=a,i<l?u=a+p:i>l&&(u=a-p)),e<s&&o==s?o-=p:e>s&&o==s&&(o+=p),i!=l&&a==l&&(c=o,d=u=a,e<s?h=o+p:e>s&&(h=o-p)),i<l&&a==l?a-=p:i>l&&a==l&&(a+=p)),{x1:e,y1:i,x2:o,y2:a,x3:s,y3:l,qx1:c,qy1:d,qx2:h,qy2:u}},_linkTopToBottom:function(e,i,o,a,s,l){var c,d,h,p,u,f=0;c=e.x+e.w/2+o.linkAdjuster.toX,d=e.y+e.h+o.linkAdjuster.toY,p=h=i.x+i.w/2+o.linkAdjuster.fromX,u=i.y+o.linkAdjuster.fromY;var g={xa:c,ya:d,xb:c,yb:f=e.rightNeighbor&&e.rightNeighbor.isAssistant&&"split"==i.templateName?e.rightNeighbor.y+e.rightNeighbor.h+a:"split"==e.templateName&&(i.isAssistant||i.layout>1)?u:"split"==i.templateName?d+a:null!=s?s:u-a,xc:h,yc:f,xd:p,yd:u,x:h,y:OrgChart.isNEU(i.parentPartner)?f+16:f,rotate:0};return l&&OrgChart._addConnectorLines(l._connectorLines,g),g},_linkBottomToTop:function(e,i,o,a,s,l){var c,d,h,p,u,f=0;c=e.x+e.w/2+o.linkAdjuster.toX,d=e.y+o.linkAdjuster.toY,p=h=i.x+i.w/2+o.linkAdjuster.fromX,u=i.y+i.h+o.linkAdjuster.fromY;var g={xa:c,ya:d,xb:c,yb:f=e.rightNeighbor&&e.rightNeighbor.isAssistant&&"split"==i.templateName?e.rightNeighbor.y-a:"split"==e.templateName&&(i.isAssistant||i.layout>1)?u:"split"==i.templateName?d-a:null!=s?s:u+a,xc:h,yc:f,xd:p,yd:u,x:h,y:f-14,rotate:0};return l&&OrgChart._addConnectorLines(l._connectorLines,g),g},_linkRightToLeft:function(e,i,o,a,s,l){var c,d,h,p,u,f,g=0;c=e.x+o.linkAdjuster.toX,d=e.y+e.h/2+o.linkAdjuster.toY,u=i.x+i.w+o.linkAdjuster.fromX,f=p=i.y+i.h/2+o.linkAdjuster.fromY,h=d;var m={xa:c,ya:d,xb:g=e.rightNeighbor&&e.rightNeighbor.isAssistant&&"split"==i.templateName?e.rightNeighbor.x-a:"split"==e.templateName&&(i.isAssistant||i.layout>1)?u:"split"==i.templateName?c-a:null!=s?s:u+a,yb:h,xc:g,yc:p,xd:u,yd:f,x:g-16,y:p,rotate:90};return l&&OrgChart._addConnectorLines(l._connectorLines,m),m},_linkLeftToRight:function(e,i,o,a,s,l){var c,d,h,p,u,f,g=0;c=e.x+e.w+o.linkAdjuster.toX,d=e.y+e.h/2+o.linkAdjuster.toY,u=i.x+o.linkAdjuster.fromX,f=p=i.y+i.h/2+o.linkAdjuster.fromY,h=d;var m={xa:c,ya:d,xb:g=e.rightNeighbor&&e.rightNeighbor.isAssistant&&"split"==i.templateName?e.rightNeighbor.x+e.rightNeighbor.w+a:"split"==e.templateName&&(i.isAssistant||i.layout>1)?u:"split"==i.templateName?c+a:null!=s?s:u-a,yb:h,xc:g,yc:p,xd:u,yd:f,x:g+14,y:p,rotate:270};return l&&OrgChart._addConnectorLines(l._connectorLines,m),m},_linkPpTop:function(e,i,o,a,s,l){var c=e.ppnodes[o.id],d=c.y+c.h/2,h=a.minY-(a.minY-s.maxY)/2,p=(a.minY-s.maxY)/e.maxSidePartnersWithChildren/4,u=OrgChart.ui.__linkPpBottomTop(e,i,o,h,p,c),f=u.x;return h=u.mid,OrgChart.ui._linkTopToBottom({x:f,y:d,w:0,h:0},o,l,0,h)},_linkPpBottom:function(e,i,o,a,s,l){var c=e.ppnodes[o.id],d=c.y+c.h/2,h=a.maxY-(a.maxY-s.minY)/2,p=(a.maxY-s.minY)/e.maxSidePartnersWithChildren/4,u=OrgChart.ui.__linkPpBottomTop(e,i,o,h,p,c),f=u.x;return h=u.mid,OrgChart.ui._linkBottomToTop({x:f,y:d,w:0,h:0},o,l,0,h)},_linkPpLeft:function(e,i,o,a,s,l){var c=e.ppnodes[o.id],d=a.minX-(a.minX-s.maxX)/2,h=(a.minX-s.maxX)/e.maxSidePartnersWithChildren/4,p=c.x+c.w/2,u=OrgChart.ui.__linkPpLeftRight(e,i,o,d,h,c),f=u.y;return d=u.mid,OrgChart.ui._linkLeftToRight({x:p,y:f,w:0,h:0},o,l,0,d)},_linkPpRight:function(e,i,o,a,s,l){var c=e.ppnodes[o.id],d=a.maxX-(a.maxX-s.minX)/2,h=(a.maxX-s.minX)/e.maxSidePartnersWithChildren/4,p=c.x+c.w/2,u=OrgChart.ui.__linkPpLeftRight(e,i,o,d,h,c),f=u.y;return d=u.mid,OrgChart.ui._linkRightToLeft({x:p,y:f,w:0,h:0},o,l,0,d)},__linkPpBottomTop:function(e,i,o,a,s,l){var c=0;return 1==l.isPartner?(c=l.x-i.partnerSeparation/2+e.indexes[o.id]*e.partnerChildrenSplitSeparation-(e.rightIds.length-1)*e.partnerChildrenSplitSeparation/2,e.lastLeft&&c<e.lastLeft.x+e.lastLeft.w/2?c<o.x+o.w/2?a-=(e.indexes[o.id]+1)*s:a-=(e.rightIds.length-e.indexes[o.id])*s:c<o.x+o.w/2?a+=(e.rightIds.length-e.indexes[o.id])*s:a+=(e.indexes[o.id]+1)*s):2==l.isPartner&&(c=l.x+l.w+i.partnerSeparation/2+e.indexes[o.id]*e.partnerChildrenSplitSeparation-(e.leftIds.length-1)*e.partnerChildrenSplitSeparation/2,e.firstRight&&c>e.firstRight.x+e.firstRight.w/2?c<o.x+o.w/2?a-=(e.indexes[o.id]+1)*s:a-=(e.leftIds.length-e.indexes[o.id])*s:c<o.x+o.w/2?a+=(e.leftIds.length-e.indexes[o.id])*s:a+=(e.indexes[o.id]+1)*s),{x:c,mid:a}},__linkPpLeftRight:function(e,i,o,a,s,l){var c=0;return 1==l.isPartner?(c=l.y-i.partnerSeparation/2+e.indexes[o.id]*e.partnerChildrenSplitSeparation-(e.rightIds.length-1)*e.partnerChildrenSplitSeparation/2,e.lastLeft&&c<e.lastLeft.y+e.lastLeft.h/2?c<o.y+o.h/2?a-=(e.indexes[o.id]+1)*s:a-=(e.rightIds.length-e.indexes[o.id])*s:c<o.y+o.h/2?a+=(e.rightIds.length-e.indexes[o.id])*s:a+=(e.indexes[o.id]+1)*s):2==l.isPartner&&(c=l.y+l.h+i.partnerSeparation/2+e.indexes[o.id]*e.partnerChildrenSplitSeparation-(e.leftIds.length-1)*e.partnerChildrenSplitSeparation/2,e.firstRight&&c>e.firstRight.y+e.firstRight.h/2?c<o.y+o.h/2?a-=(e.indexes[o.id]+1)*s:a-=(e.leftIds.length-e.indexes[o.id])*s:c<o.y+o.h/2?a+=(e.leftIds.length-e.indexes[o.id])*s:a+=(e.indexes[o.id]+1)*s),{y:c,mid:a}},_draggableLinkPath:function(e,i,o,a,s,l){if(o.isSubLevel)return null;if(i.isSubLevel)return null;if(o.leftNeighbor&&o.leftNeighbor.isSplit||o.rightNeighbor&&o.rightNeighbor.isSplit)return null;if(o.isPartner)return null;if(o.isAssistant)return null;if(OrgChart._isMoved(o)&&!OrgChart._isMoved(i)){var c=[];switch(l){case OrgChart.orientation.top:case OrgChart.orientation.top_left:if(a.yb+s/2<a.yd)return null;h=a.xa<a.xd?o.x-s/2:o.x+o.w+s/2,p=o.y-s/2;break;case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:if(a.yb-s/2>a.yd)return null;h=a.xa<a.xd?o.x-s/2:o.x+o.w+s/2,p=o.y+o.h+s/2;break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:if(a.xb-s/2>a.xd)return null;p=a.ya<a.yd?o.y-s/2:o.y+o.h+s/2,h=o.x+o.w+s/2;break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:if(a.xb+s/2<a.xd)return null;p=a.ya<a.yd?o.y-s/2:o.y+o.h+s/2,h=o.x-s/2}switch(l){case OrgChart.orientation.top:case OrgChart.orientation.top_left:case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:c.push(["M",a.xa,a.ya]),c.push(["L",a.xb,a.yb]),c.push(["L",h,a.yb]),c.push(["L",h,p]),c.push(["L",a.xd,p]),c.push(["L",a.xd,a.yd]);break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:case OrgChart.orientation.left:case OrgChart.orientation.left_top:(c=[]).push(["M",a.xa,a.ya]),c.push(["L",a.xb,a.yb]),c.push(["L",a.xb,p]),c.push(["L",h,p]),c.push(["L",h,a.yd]),c.push(["L",a.xd,a.yd])}return OrgChart.roundPathCorners(c,OrgChart.LINK_ROUNDED_CORNERS,!1)}if(!OrgChart._isMoved(o)&&OrgChart._isMoved(i)){var d=!1;c=[];switch(l){case OrgChart.orientation.top:case OrgChart.orientation.top_left:if(a.ya+s/2>a.yb)d=!0,h=a.xa<a.xd?i.x+i.w+s/2:i.x-s/2,p=i.y+i.h+s;else{if(a.yb+s/2<a.yd)return null;h=a.xa<a.xd?o.x-s/2:o.x+o.w+s/2,p=o.y-s/2}break;case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:if(a.ya-s/2<a.yb)d=!0,h=a.xa<a.xd?i.x+i.w+s/2:i.x-s/2,p=i.y-s;else{if(a.yb-s/2>a.yd)return null;h=a.xa<a.xd?o.x-s/2:o.x+o.w+s/2,p=o.y+o.h+s/2}break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:if(a.xa-s/2<a.xb)d=!0,p=a.ya<a.yd?i.y+i.h+s/2:i.y-s/2,h=i.x-s;else{if(a.xb-s/2>a.xd)return null;p=a.ya<a.yd?o.y-s/2:o.y+o.h+s/2,h=o.x+o.w+s/2}break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:if(a.xa+s/2>a.xb)d=!0,p=a.ya<a.yd?i.y+i.h+s/2:i.y-s/2,h=i.x+i.w+s;else{if(a.xb+s/2<a.xd)return null;p=a.ya<a.yd?o.y-s/2:o.y+o.h+s/2,h=o.x-s/2}}if(d)switch(l){case OrgChart.orientation.top:case OrgChart.orientation.top_left:case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:c.push(["M",a.xa,a.ya]),c.push(["L",a.xa,p]),c.push(["L",h,p]),c.push(["L",h,a.yc]),c.push(["L",a.xc,a.yc]),c.push(["L",a.xd,a.yd]);break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:case OrgChart.orientation.left:case OrgChart.orientation.left_top:c.push(["M",a.xa,a.ya]),c.push(["L",h,a.ya]),c.push(["L",h,p]),c.push(["L",a.xc,p]),c.push(["L",a.xc,a.yc]),c.push(["L",a.xd,a.yd])}else switch(l){case OrgChart.orientation.top:case OrgChart.orientation.top_left:case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:c.push(["M",a.xa,a.ya]),c.push(["L",a.xb,a.yb]),c.push(["L",h,a.yb]),c.push(["L",h,p]),c.push(["L",a.xd,p]),c.push(["L",a.xd,a.yd]);break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:case OrgChart.orientation.left:case OrgChart.orientation.left_top:c.push(["M",a.xa,a.ya]),c.push(["L",a.xb,a.yb]),c.push(["L",a.xb,p]),c.push(["L",h,p]),c.push(["L",h,a.yd]),c.push(["L",a.xd,a.yd])}return OrgChart.roundPathCorners(c,OrgChart.LINK_ROUNDED_CORNERS,!1)}if(OrgChart._isMoved(o)&&OrgChart._isMoved(i)){c=[];switch(l){case OrgChart.orientation.top:case OrgChart.orientation.top_left:if(a.ya+s>a.yd){var h=a.xa<a.xd?i.x+i.w+s/2:i.x-s/2,p=i.y+i.h+s,u=o.y-s;c.push(["M",a.xa,a.ya]),c.push(["L",a.xa,p]),c.push(["L",h,p]),c.push(["L",h,u]),c.push(["L",a.xc,u]),c.push(["L",a.xd,a.yd])}else c.push(["M",a.xa,a.ya]),c.push(["L",a.xa,i.y+i.h+s]),c.push(["L",a.xc,i.y+i.h+s]),c.push(["L",a.xd,a.yd]);break;case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:if(a.ya-s<a.yd){h=a.xa<a.xd?i.x+i.w+s/2:i.x-s/2,p=i.y-s,u=o.y+o.h+s;c.push(["M",a.xa,a.ya]),c.push(["L",a.xa,p]),c.push(["L",h,p]),c.push(["L",h,u]),c.push(["L",a.xc,u]),c.push(["L",a.xd,a.yd])}else c.push(["M",a.xa,a.ya]),c.push(["L",a.xa,i.y-s]),c.push(["L",a.xc,i.y-s]),c.push(["L",a.xd,a.yd]);break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:if(a.xa-s<a.xd){p=a.ya<a.yd?i.y+i.h+s/2:i.y-s/2,h=i.x-s;var f=o.x+o.w+s;c.push(["M",a.xa,a.ya]),c.push(["L",h,a.ya]),c.push(["L",h,p]),c.push(["L",f,p]),c.push(["L",f,a.yc]),c.push(["L",a.xd,a.yd])}else c.push(["M",a.xa,a.ya]),c.push(["L",i.x-s,a.ya]),c.push(["L",i.x-s,a.yc]),c.push(["L",a.xd,a.yd]);break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:if(a.xa+s>a.xd){p=a.ya<a.yd?i.y+i.h+s/2:i.y-s/2,h=i.x+i.w+s,f=o.x-s;c.push(["M",a.xa,a.ya]),c.push(["L",h,a.ya]),c.push(["L",h,p]),c.push(["L",f,p]),c.push(["L",f,a.yc]),c.push(["L",a.xd,a.yd])}else c.push(["M",a.xa,a.ya]),c.push(["L",i.x+i.w+s,a.ya]),c.push(["L",i.x+i.w+s,a.yc]),c.push(["L",a.xd,a.yd])}return OrgChart.roundPathCorners(c,OrgChart.LINK_ROUNDED_CORNERS,!1)}return null}},void 0===OrgChart&&(OrgChart={}),OrgChart._validateConfig=function(e){return!!e||(console.error("config is not defined"),!1)},OrgChart._arrayContains=function(e,i){if(e&&Array.isArray(e))for(var o=e.length;o--;)if(e[o]===i)return!0;return!1},OrgChart._interceptions=function(e,i){if(!e)return[];if(!i)return[];var o=[];if(Array.isArray(e)&&Array.isArray(i))for(var a in e)for(var s in i)e[a]==i[s]&&o.push(e[a]);else if(Array.isArray(e)&&!Array.isArray(i))for(var a in e)for(var s in i)e[a]==s&&o.push(e[a]);else if(!Array.isArray(e)&&Array.isArray(i))for(var a in e)for(var s in i)a==i[s]&&o.push(i[s]);return o},OrgChart._getTags=function(e){return e.tags&&!Array.isArray(e.tags)?e.tags.split(","):e.tags&&Array.isArray(e.tags)?e.tags:[]},OrgChart._centerPointInPercent=function(e,i,o){var a=e.getBoundingClientRect(),s=i-a.left,l=o-a.top;return[s/(a.width/100),l/(a.height/100)]},OrgChart._trim=function(e){return e.replace(/^\s+|\s+$/g,"")},OrgChart._getTransform=function(e){var i=e.getAttribute("transform");return i=i.replace("matrix","").replace("(","").replace(")",""),OrgChart._browser().msie&&(i=i.replace(/ /g,",")),i="["+(i=OrgChart._trim(i))+"]",i=JSON.parse(i)},OrgChart.getScale=function(e,i,o,a,s,l,c,d){var h=1;if(e||a!==OrgChart.match.boundary&&a!==OrgChart.match.boundaryIfOutside)if(e||a!==OrgChart.match.width)if(e||a!==OrgChart.match.height)if(e){var p,u;h=(p=i/e[2])>(u=o/e[3])?u:p}else h=a;else h=o/d;else h=i/c;else h=(p=i/c)>(u=o/d)?u:p,a===OrgChart.match.boundaryIfOutside&&h>1&&(h=1);return h&&h>s&&(h=s),h&&h<l&&(h=l),h},OrgChart.isObject=function(e){return e&&"object"==typeof e&&!Array.isArray(e)&&null!==e&&e.constructor&&"object"==e.constructor.name.toLowerCase()},OrgChart.fileUploadDialog=function(e){var i=document.createElement("INPUT");i.setAttribute("type","file"),i.style.display="none",i.onchange=function(){var i=this.files[0];e(i)},document.body.appendChild(i),i.click()},OrgChart.mergeDeep=function(e,i){if(OrgChart.isObject(e)&&OrgChart.isObject(i))for(var o in i)OrgChart.isObject(i[o])?(e[o]||Object.assign(e,{[o]:{}}),OrgChart.mergeDeep(e[o],i[o])):Object.assign(e,{[o]:i[o]});return e},OrgChart._lblIsImg=function(e,i){return!(!e.nodeBinding||"string"!=typeof i||-1==i.indexOf("img")||!e.nodeBinding[i])},OrgChart._getFistImgField=function(e){if(e.nodeBinding)for(var i in e.nodeBinding)if(-1!=i.indexOf("img"))return e.nodeBinding[i];return!1},OrgChart._fieldIsImg=function(e,i){if(e.nodeBinding)for(var o in e.nodeBinding)if(e.nodeBinding[o]==i)return OrgChart._lblIsImg(e,o);return!1},OrgChart._guid=function(){function s4(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return s4()+s4()+"-"+s4()+"-"+s4()+"-"+s4()+"-"+s4()+s4()+s4()},OrgChart.htmlRipple=function(e){var i=document.createElement("style");i.type="text/css",i.innerHTML=" .boc-ripple-container {position: absolute; top: 0; right: 0; bottom: 0; left: 0; } .boc-ripple-container span {transform: scale(0);border-radius:100%;position:absolute;opacity:0.75;background-color:#fff;animation: boc-ripple 1000ms; }@-moz-keyframes boc-ripple {to {opacity: 0;transform: scale(2);}}@-webkit-keyframes boc-ripple {to {opacity: 0;transform: scale(2);}}@-o-keyframes boc-ripple {to {opacity: 0;transform: scale(2);}}@keyframes boc-ripple {to {opacity: 0;transform: scale(2);}}",document.head.appendChild(i);var o,a,s,l=document.createElement("div");l.className="boc-ripple-container",e.addEventListener("mousedown",function(i){var o,a,s,l=document.createElement("span"),c=this.offsetWidth;return o=this.getBoundingClientRect(),s=i.pageX-o.left-c/2,a="top:"+(i.pageY-o.top-c/2)+"px; left: "+s+"px; height: "+c+"px; width: "+c+"px;",e.rippleContainer.appendChild(l),l.setAttribute("style",a)}),e.addEventListener("mouseup",(o=function(){for(;this.rippleContainer.firstChild;)this.rippleContainer.removeChild(this.rippleContainer.firstChild)},a=2e3,s=void 0,function(){var e,i=this;return e=arguments,clearTimeout(s),s=setTimeout(function(){return o.apply(i,e)},a)})),e.rippleContainer=l,e.appendChild(l)},OrgChart._moveToBoundaryArea=function(e,i,o,a){var s=i.slice(0);i[0]<o.left&&i[0]<o.right&&(s[0]=o.left>o.right?o.right:o.left),i[0]>o.right&&i[0]>o.left&&(s[0]=o.left>o.right?o.left:o.right),i[1]<o.top&&i[1]<o.bottom&&(s[1]=o.top>o.bottom?o.bottom:o.top),i[1]>o.bottom&&i[1]>o.top&&(s[1]=o.top>o.bottom?o.top:o.bottom),i[0]!==s[0]||i[1]!==s[1]?OrgChart.animate(e,{viewBox:i},{viewBox:s},300,OrgChart.anim.outPow,function(){a&&a()}):a&&a()},OrgChart.randomId=function(){return"_"+("0000"+(Math.random()*Math.pow(36,4)|0).toString(36)).slice(-4)},OrgChart._getClientXY=function(e){return-1==e.type.indexOf("touch")?{x:e.clientX,y:e.clientY}:e.changedTouches.length?{x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY}:void 0},OrgChart._getClientTouchesXY=function(e,i){return-1!=e.type.indexOf("touch")?e.touches.length<i+1?{x:null,y:null}:{x:e.touches[i].clientX,y:e.touches[i].clientY}:{x:e.clientX,y:e.clientY}},OrgChart._getOffset=function(e,i){e&&(i.x+=e.offsetLeft,i.y+=e.offsetTop,OrgChart._getOffset(e.offsetParent,i))},OrgChart._getTopLeft=function(e){var i={x:0,y:0};return OrgChart._getOffset(e,i),i},OrgChart._getOffsetXY=function(e,i){if(-1==i.type.indexOf("touch"))return{x:i.offsetX,y:i.offsetY};if(i.touches.length){var o=OrgChart._getTopLeft(e);return{x:i.touches[0].pageX-o.x,y:i.touches[0].pageY-o.y}}if(i.changedTouches.length){o=OrgChart._getTopLeft(e);return isNaN(o.x)||isNaN(o.y)?{x:i.changedTouches[0].pageX,y:i.changedTouches[0].pageY}:{x:i.changedTouches[0].pageX-o.x,y:i.changedTouches[0].pageY-o.y}}},OrgChart._pinchMiddlePointInPercent=function(e,i,o,a){var s=OrgChart._getTopLeft(e),l=a.touches[0].pageX-s.x,c=a.touches[0].pageY-s.y,d=a.touches[1].pageX-s.x,h=a.touches[1].pageY-s.y;return[((l-d)/2+d)/(i/100),((c-h)/2+h)/(o/100)]},OrgChart._browser=function(){var e=!!window.opr&&!!window.opr.addons||!!window.opera||navigator.userAgent.indexOf(" OPR/")>=0,i="undefined"!=typeof InstallTrigger,o=/constructor/i.test(window.HTMLElement)||"[object SafariRemoteNotification]"===(!window.safari||void 0!==window.safari&&safari.pushNotification).toString(),a=!!document.documentMode,s=!a&&!!window.StyleMedia,l=!(!window.chrome||!window.chrome.webstore&&!window.chrome.runtime);return{opera:e,firefox:i,safari:o,msie:a,edge:s,chrome:l,blink:(l||e)&&!!window.CSS}},OrgChart._menuPosition=function(e,i,o){var a=e.getBoundingClientRect(),s=o.getBoundingClientRect(),l=i.getBoundingClientRect(),c=a.left-s.left,d=a.top-s.top;return a.top+l.height>s.top+s.height&&(d-=l.height),a.left-l.width<s.left&&(c+=l.width),{x:c,y:d}},OrgChart._getTemplate=function(e,i,o){if(Array.isArray(e))for(var a=0;a<e.length;a++){var s=i[e[a]];if(s&&s.template)return s.template}return o},OrgChart._getMin=function(e,i){if(e.tags&&e.tags.length&&i.tags)for(var o=0;o<e.tags.length;o++){var a=i.tags[e.tags[o]];if(a&&!0===a.min)return!0}return i.min},OrgChart._getSubLevels=function(e,i){if(e&&e.length)for(var o=0;o<e.length;o++){var a=i[e[o]];if(a&&a.subLevels)return a.subLevels}return 0},OrgChart._isHTML=function(e){var i=(new DOMParser).parseFromString(e,"text/html");return Array.from(i.body.childNodes).some(e=>1===e.nodeType)},OrgChart._getTestDiv=function(){var e=document.getElementById("orgchart_js_test_div");return e||((e=document.createElement("div")).id="orgchart_js_test_div",e.style.position="fixed",e.style.top="-10000px",e.style.left="-10000px",document.body.appendChild(e)),e},OrgChart._getLabelSize=function(e){var i=OrgChart._getTestDiv();return i.innerHTML="<svg>"+e+"</svg>",i.querySelector("text").getBoundingClientRect()},OrgChart.wrapText=function(e,i,o,a){if(null!=o&&null!=a)return OrgChart._lineClamp(i,e,o,a);var s=i,l=s.toLowerCase();if(-1==l.indexOf("<text"))return OrgChart._escapeHtml(e);if(-1==l.indexOf(OrgChart.attr.width))return OrgChart._escapeHtml(e);if(-1!=l.indexOf("foreignobject"))return OrgChart._escapeHtml(e);if(-1==s.indexOf(OrgChart.attr.width))return OrgChart._escapeHtml(e);if(OrgChart.ESCAPE_HTML&&"string"==typeof str&&OrgChart._isHTML(e))return OrgChart._escapeHtml(e);if(!OrgChart.ESCAPE_HTML&&OrgChart._isHTML(e))return e;var c=OrgChart._getTestDiv();s=s.replaceAll("{cw}",0),c.innerHTML="<svg>"+s+"</svg>";var d,h=(new DOMParser).parseFromString(s,"text/xml").getElementsByTagName("text")[0],p=parseFloat(h.getAttribute("x")),u=parseFloat(h.getAttribute("y")),f=h.getAttribute("text-anchor"),g=(o=h.getAttribute(OrgChart.attr.width),h.getAttribute(OrgChart.attr.text_overflow)),m="http://www.w3.org/2000/svg",b=c.getElementsByTagName("svg")[0].getElementsByTagName("text")[0];g||(g="ellipsis");var x=g.split("-");if(x.length>1&&(a=parseInt(g.split("-")[1]),x.length>2&&"ellipsis"==x[2]&&(d=!0)),!o)return OrgChart._escapeHtml(e);if(o=parseFloat(o),p||(p=0),u||(u=0),p||(f="start"),"ellipsis"==g){b.removeChild(b.firstChild),b.textContent=e;for(var v=b.getComputedTextLength(),y=2;v>o;)b.textContent=e.substring(0,e.length-y),b.textContent+="...",v=b.getComputedTextLength(),y++;return y>2?`<title>${OrgChart._escapeHtml(e)}</title>${b.textContent}`:OrgChart._escapeHtml(e)}if(-1!=g.indexOf("multiline")){var _=e.split(" "),w=b.getBBox().height;b.textContent="";var k=document.createElementNS(m,"tspan"),I=document.createTextNode(_[0]);k.setAttributeNS(null,"x",p),k.setAttributeNS(null,"y",u),k.setAttributeNS(null,"text-anchor",f),k.appendChild(I),b.appendChild(k);y=1;for(var S=1,C=!1,L=1;L<_.length;L++){var A=k.firstChild.data.length;if(k.firstChild.data+=" "+_[L],k.getComputedTextLength()>o){if(k.firstChild.data=k.firstChild.data.slice(0,A),S++,a&&S>a){if(d&&b.children.length==a){var E=b.children[a-1].textContent;b.children[a-1].textContent=E.substring(0,E.length-3)+"...",C=!0}break}(k=document.createElementNS(m,"tspan")).setAttributeNS(null,"x",p),k.setAttributeNS(null,"y",u+w*y),k.setAttributeNS(null,"text-anchor",f),I=document.createTextNode(_[L]),k.appendChild(I),b.appendChild(k),y++}}var N="";if(null!=b.innerHTML)N=b.innerHTML,b.innerHTML="";else{var $="";for(L=b.childNodes.length-1;L>=0;L--)$=XMLSerializer().serializeToString(b.childNodes[L])+$,b.removeChild(b.childNodes[L]);N=$}return C?`<title>${OrgChart._escapeHtml(e)}</title>${N}`:N}},OrgChart._downloadFile=function(e,i,o,a,s){var l=new Blob([i],{type:e});if(1==a){var c=URL.createObjectURL(l);window.open(c,"_blank").focus()}else if(navigator.msSaveBlob)navigator.msSaveBlob(l,o);else{var d=document.createElement("a");if(void 0!==d.download){c=URL.createObjectURL(l);d.setAttribute("href",c);var h=o;h.toLowerCase().endsWith(s.toLowerCase())||(h=h+"."+s),d.setAttribute("download",h),d.style.visibility="hidden",document.body.appendChild(d),d.click(),document.body.removeChild(d)}}},OrgChart._getPosition=function(e,i,o,a){var s={x:i.x,y:i.y};if(null!=o&&(s.x=o),null!=a&&(s.y=o),e&&3==e.length){var l=e[0].indexOf(i.id);-1!=l&&null!=e[1][l].transform&&(null==o&&(s.x=e[1][l].transform[4]),null==a&&(s.y=e[1][l].transform[5]))}return s},OrgChart._getOpacity=function(e,i){var o=1;if(e&&3==e.length){var a=e[0].indexOf(i.id);-1!=a&&null!=e[1][a].opacity&&(o=e[1][a].opacity)}return o},OrgChart.t=function(e,i,o){var a=OrgChart.templates[e];null==a&&console.error(`Template "${e}" does not exist!`);var s=null;if(null!=o&&a.scaleLessThen){var l=[];for(var c in a.scaleLessThen){var d=parseFloat(c);o<d&&l.push(d)}if(l.length>0){l.sort(function(e,i){return e-i});var h=a.scaleLessThen[l[0]];for(var p in h)null==s&&(s=Object.assign({},a)),s[p]=h[p]}}return i?null==s?a.min?a.min:a:s.min?s.min:s:null==s?a:s},OrgChart.setNodeSize=function(e){var i=OrgChart.t(e.templateName,e.min);e.w=i&&i.size?i.size[0]:0,e.h=i&&i.size?i.size[1]:0},OrgChart._imgs2base64=function(e,i,o,a){var s=e.getElementsByTagName(i),l=s.length;0==l&&a();for(var c=0;c<l;c++)(function(){var e=c,i=s[e];OrgChart._getDataUri(i.getAttribute(o),function(s){s.success&&i.setAttribute(o,s.result),e==l-1&&a()})})()},OrgChart._getDataUri=function(e,i){if(-1!=e.indexOf("base64"))i({success:!1});else{var o=new XMLHttpRequest;o.open("GET",e),o.responseType="blob",o.onload=function(){200===o.status?a.readAsDataURL(o.response):404===o.status&&i({success:!1,result:o.status})};var a=new FileReader;a.onloadend=function(){i({success:!0,result:a.result})},o.send()}},OrgChart._convertStringToArray=function(e,i){return-1!=OrgChart.ARRAY_FIELDS.indexOf(e)?OrgChart.isNEU(i)?[]:i.split(","):i},OrgChart._convertArrayToString=function(e){return!OrgChart.isNEU(e)&&Array.isArray(e)?e.join():e},OrgChart._csvToArray=function(e,i){i=i||OrgChart.CSV_DELIMITER;for(var o=new RegExp("(\\"+i+'|\\r?\\n|\\r|^)(?:"([^"]*(?:""[^"]*)*)"|([^"\\'+i+"\\r\\n]*))","gi"),a=[[]],s=null;s=o.exec(e);){var l,c=s[1];c.length&&c!==i&&a.push([]),l=s[2]?s[2].replace(new RegExp('""',"g"),'"'):s[3],a[a.length-1].push(l)}return a},OrgChart._json2xml=function(e){for(var i=document.implementation.createDocument("","",null),o=i.createElement("nodes"),a=0;a<e.length;a++){var s=i.createElement("node"),l=e[a];for(var c in l){var d=l[c];s.setAttribute(c,OrgChart._convertArrayToString(d))}o.appendChild(s)}return i.appendChild(o),'<?xml version="1.0" encoding="utf-8" ?>'+(new XMLSerializer).serializeToString(i.documentElement)},OrgChart._xml2json=function(e){for(var i=(new DOMParser).parseFromString(e,"text/xml").getElementsByTagName("node"),o=[],a=0;a<i.length;a++){for(var s=i[a],l={},c=0;c<s.attributes.length;c++){var d=s.attributes[c];l[d.name]=OrgChart._convertStringToArray(d.name,d.value)}o.push(l)}return o},OrgChart.convertNodesToCsv=function(e){return OrgChart._json2csv(e)},OrgChart._json2csv=function(e){for(var i=[],processNode=function(e){for(var o="",a=0;a<i.length;a++){var s;(s="reportsTo"==i[a]?null:null==e[i[a]]?"":e[i[a]])instanceof Date&&(s=s.toLocaleString());var l=(s=null===s?"":s.toString()).replace(/"/g,'""'),c=new RegExp('("|;|\n)',"g");l.search(c)>=0&&(l='"'+l+'"'),a>0&&(o+=OrgChart.CSV_DELIMITER),o+=l}return o+"\n"},o="",a=0;a<e.length;a++)for(var s in e[a])OrgChart._arrayContains(i,s)||(i.push(s),o+=s+OrgChart.CSV_DELIMITER);o=o.substring(0,o.length-1),o+="\n";for(a=0;a<e.length;a++)o+=processNode(e[a]);return o=o.substring(0,o.length-1)},OrgChart.accentFold=function(e){return(e=e.toString().toLowerCase()).replace(/([àáâãäå])|([ç])|([èéêë])|([ìíîï])|([ñ])|([òóôõöø])|([ß])|([ùúûü])|([ÿ])|([æ])/g,function(e,i,o,a,s,l,c,d,h,p,u){return i?"a":o?"c":a?"e":s?"i":l?"n":c?"o":d?"s":h?"u":p?"y":u?"ae":void 0})},OrgChart.copy=function(e){if(null===e||"object"!=typeof e||"isActiveClone"in e)return e;if(e instanceof Date)var i=new e.constructor;else i=e.constructor();for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(e.isActiveClone=null,i[o]=OrgChart.copy(e[o]),delete e.isActiveClone);return i},OrgChart._getScrollSensitivity=function(){var e=OrgChart._browser();return e.msie&&OrgChart.scroll.ie?OrgChart.scroll.ie:e.edge&&OrgChart.scroll.edge?OrgChart.scroll.edge:e.safari&&OrgChart.scroll.safari?OrgChart.scroll.safari:e.chrome&&OrgChart.scroll.chrome?OrgChart.scroll.chrome:e.firefox&&OrgChart.scroll.firefox?OrgChart.scroll.firefox:e.opera&&OrgChart.scroll.opera?OrgChart.scroll.opera:{smooth:OrgChart.scroll.smooth,speed:OrgChart.scroll.speed}},OrgChart.isMobile=function(){const e=navigator.userAgent,i=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e),o="MacIntel"===navigator.platform&&navigator.maxTouchPoints>1;return i||o},OrgChart._isTouchDevice=function(){return navigator.maxTouchPoints>0},OrgChart.isTrial=function(){return void 0!==OrgChart.remote},OrgChart.childrenCount=function(e,i){for(var o=0,a=0;a<i.childrenIds.length;a++)e.nodes[i.childrenIds[a]]&&o++;return o},OrgChart.childrenTotalCount=function(e,i){for(var o=0,a=0;a<i.childrenIds.length;a++){var s=e.nodes[i.childrenIds[a]];s&&(o++,o+=OrgChart.childrenTotalCount(e,s))}return o},OrgChart.collapsedChildrenCount=function(e,i){for(var o=0,a=0;a<i.childrenIds.length;a++){var s=e.nodes[i.childrenIds[a]];s&&!0===s.collapsed&&o++}return o},OrgChart.collapsedChildrenTotalCount=function(e,i,o){for(var a=0,s=0;s<i.childrenIds.length;s++){var l=e.nodes[i.childrenIds[s]];l&&((o||!0===l.collapsed)&&a++,a+=OrgChart.collapsedChildrenTotalCount(e,l,!0))}return a},OrgChart._setMinMaxXY=function(e,i,o){o&&e.isTreeListItem||((null==i.minX||null!=e.x&&e.x<i.minX)&&(i.minX=e.x),(null==i.minY||null!=e.y&&e.y<i.minY)&&(i.minY=e.y),(null==i.maxX||null!=e.x&&e.x+e.w>i.maxX)&&(i.maxX=e.x+e.w),(null==i.maxY||null!=e.y&&e.y+e.h>i.maxY)&&(i.maxY=e.y+e.h))},OrgChart.getStParentNodes=function(e,i){for(i||(i=[]);e.parent;)e=e.parent;return e.stParent&&(i.push(e.stParent),OrgChart.getStParentNodes(e.stParent,i)),i},OrgChart.getRootOf=function(e){for(;e&&e.parent;)e=e.parent;return e},OrgChart._getViewBox=function(e){var i=null;return e?(i=(i="["+(i=e.getAttribute("viewBox"))+"]").replace(/\ /g,","),i=JSON.parse(i)):null},OrgChart.isNEU=function(e){return null==e||""===e},OrgChart.gradientCircleForDefs=function(e,i,o,a){function polarToCartesian(e,i,o,a){var s=(a-90)*Math.PI/180;return{x:e+o*Math.cos(s),y:i+o*Math.sin(s)}}function describeArc(e,i,o,a,s){var l=polarToCartesian(e,i,o,s),c=polarToCartesian(e,i,o,a),d=s-a<=180?"0":"1";return["M",l.x,l.y,"A",o,o,0,d,0,c.x,c.y].join(" ")}return Array.isArray(i)||(i=[i,i,i,i,i,i]),`<linearGradient id="${e}_linearColors1" x1="0" y1="0" x2="1" y2="1">\n <stop offset="0%" stop-color="${i[0]}"></stop>\n <stop offset="100%" stop-color="${i[1]}"></stop>\n </linearGradient>\n <linearGradient id="${e}_linearColors2" x1="0.5" y1="0" x2="0.5" y2="1">\n <stop offset="0%" stop-color="${i[1]}"></stop>\n <stop offset="100%" stop-color="${i[2]}"></stop>\n </linearGradient>\n <linearGradient id="${e}_linearColors3" x1="1" y1="0" x2="0" y2="1">\n <stop offset="0%" stop-color="${i[2]}"></stop>\n <stop offset="100%" stop-color="${i[3]}"></stop>\n </linearGradient>\n <linearGradient id="${e}_linearColors4" x1="1" y1="1" x2="0" y2="0">\n <stop offset="0%" stop-color="${i[3]}"></stop>\n <stop offset="100%" stop-color="${i[4]}"></stop>\n </linearGradient>\n <linearGradient id="${e}_linearColors5" x1="0.5" y1="1" x2="0.5" y2="0">\n <stop offset="0%" stop-color="${i[4]}"></stop>\n <stop offset="100%" stop-color="${i[5]}"></stop>\n </linearGradient>\n <linearGradient id="${e}_linearColors6" x1="0" y1="1" x2="1" y2="0">\n <stop offset="0%" stop-color="${i[5]}"></stop>\n <stop offset="100%" stop-color="${i[0]}"></stop>\n </linearGradient> \n <g id="${e}">\n <path stroke-width="${a}" fill="none" stroke="url(#${e}_linearColors1)" d="${describeArc(o,o,o,1,60)}" />\n <path stroke-width="${a}" fill="none" stroke="url(#${e}_linearColors2)" d="${describeArc(o,o,o,60,120)}"/>\n <path stroke-width="${a}" fill="none" stroke="url(#${e}_linearColors3)" d="${describeArc(o,o,o,120,180)}" />\n <path stroke-width="${a}" fill="none" stroke="url(#${e}_linearColors4)" d="${describeArc(o,o,o,180,240)}" />\n <path stroke-width="${a}" fill="none" stroke="url(#${e}_linearColors5)" d="${describeArc(o,o,o,240,300)}" />\n <path stroke-width="${a}" fill="none" stroke="url(#${e}_linearColors6)" d="${describeArc(o,o,o,300,1)}"/>\n </g>`},OrgChart._intersectionObserver=function(e,i){"function"==typeof IntersectionObserver?new IntersectionObserver(function(e,o){e.forEach(function(e){var o=e.intersectionRatio>0;0==e.intersectionRatio&&(o=e.isIntersecting),i(o)})}).observe(e):i(!0)},OrgChart.convertCsvToNodes=function(e){for(var i=OrgChart._csvToArray(e),o=i[0],a=[],s=1;s<i.length;s++){for(var l={},c=0;c<i[s].length;c++){var d=o[c],h=i[s][c];l[o[c]]=OrgChart._convertStringToArray(d,h)}""!=l.id.trim()&&a.push(l)}return a},OrgChart._escapeHtml=function(e){return OrgChart.ESCAPE_HTML&&"string"==typeof e?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;"):e},OrgChart._escapeDoubleQuotes=function(e){return"string"==typeof e?e.replace(/"/g,"&quot;"):e},OrgChart._escapeGreaterLessSign=function(e){return"string"==typeof e?e.replace(/</g,"&lt;").replace(/>/g,"&gt;"):e},OrgChart.roundPathCorners=function(e,i,o){function moveTowardsLength(e,i,o){var a=i.x-e.x,s=i.y-e.y,l=Math.sqrt(a*a+s*s);return moveTowardsFractional(e,i,Math.min(1,o/l))}function moveTowardsFractional(e,i,o){return{x:e.x+(i.x-e.x)*o,y:e.y+(i.y-e.y)*o}}function adjustCommand(e,i){e.length>2&&(e[e.length-2]=i.x,e[e.length-1]=i.y)}function pointForCommand(e){return{x:parseFloat(e[e.length-2]),y:parseFloat(e[e.length-1])}}Array.isArray(e)||(e=(e=e.split(/[,\s]/).reduce(function(e,i){var o=i.match("([a-zA-Z])(.+)");return o?(e.push(o[1]),e.push(o[2])):e.push(i),e},[])).reduce(function(e,i){return parseFloat(i)==i&&e.length?e[e.length-1].push(i):e.push([i]),e},[]));var a=[];if(e.length>1){var s=pointForCommand(e[0]),l=null;"Z"==e[e.length-1][0]&&e[0].length>2&&(l=["L",s.x,s.y],e[e.length-1]=l),a.push(e[0]);for(var c=1;c<e.length;c++){var d=a[a.length-1],h=e[c],p=h==l?e[1]:e[c+1];if(p&&d&&d.length>2&&"L"==h[0]&&p.length>2&&"L"==p[0]){var u,f,g=pointForCommand(d),m=pointForCommand(h),b=pointForCommand(p);o?(u=moveTowardsFractional(m,d.origPoint||g,i),f=moveTowardsFractional(m,p.origPoint||b,i)):(u=moveTowardsLength(m,g,i),f=moveTowardsLength(m,b,i)),adjustCommand(h,u),h.origPoint=m,a.push(h);var x=moveTowardsFractional(u,m,.5),v=moveTowardsFractional(m,f,.5),y=["C",x.x,x.y,v.x,v.y,f.x,f.y];y.origPoint=m,a.push(y)}else a.push(h)}if(l){var _=pointForCommand(a[a.length-1]);a.push(["Z"]),adjustCommand(a[0],_)}}else a=e;return a.reduce(function(e,i){return e+i.join(" ")+" "},"")},OrgChart._isMoved=function(e){return null!=e.movex||null!=e.movey},OrgChart._getDynamicGridCoulumns=function(e){for(var i=1;i<e&&!(e/i-i<=0);i++);return i%2!=0&&i>2&&i--,i},OrgChart._getLazyLoading=function(e){var i=e.lazyLoading;return"auto"==i&&(i=!!(e&&e.nodes&&e.nodes.length>700)),i},OrgChart._getSvgAttributes=function(e){const i=e.match(/width="([\d.]+)"/),o=e.match(/height="([\d.]+)"/),a=e.match(/x="([\d.]+)"/),s=e.match(/y="([\d.]+)"/),l=e.match(/viewBox="([^"]+)"/),c=i?parseFloat(i[1]):0,d=o?parseFloat(o[1]):0,h=a?parseFloat(a[1]):0,p=s?parseFloat(s[1]):0;let u=[0,0,0,0];return l&&(u=l[1],u=JSON.parse(`[${u}]`)),{width:c,height:d,viewBox:u,x:h,y:p}},OrgChart._setSvgAttributes=function(e,i){var o=i.x,a=i.y,s=i.width,l=i.height,c=i.viewBox.join(",");const d=e.match(/<svg\s+([^>]*?)>/);if(!d)return e;let h=d[0],p=d[1];const updateAttribute=(e,i,o)=>{if(null==o)return e;const a=new RegExp(`\\s*${i}="[^"]*"`,"i"),s=` ${i}="${o}"`;return e.match(a)?e.replace(a,s):e+s};p=updateAttribute(p,"x",o),p=updateAttribute(p,"y",a),p=updateAttribute(p,"width",s),p=updateAttribute(p,"height",l),p=updateAttribute(p,"viewBox",c);const u=`<svg ${p}>`;return e.replace(h,u)},OrgChart._convertTextToNodes=function(e,i){const o=e.split(/\r?\n/).filter(e=>""!==e.trim()),a=[];let s=1;const l=[];for(let c of o){let e=0;for(;c.startsWith(i);)c=c.slice(i.length),e++;if(c=c.trim(),!c)continue;const o=c.match(/^\[([^\]]+)](.*)$/);if(o){const e=o[1].trim(),i=o[2].trim();l.length>0&&(l[l.length-1][e]=i);continue}const d=c.match(/^([^\(]+)\(([^)]+)\)$/);let h,p=[];d?(h=d[1].trim(),p=d[2].split(",").map(e=>e.trim())):h=c;const u={id:s++,pid:0===e?null:l[e-1].id,name:h,tags:p};l[e]=u,l.length=e+1,a.push(u)}return a},OrgChart._convertFromNodesToText=function(e,i){const o={},a=[];function render(e,o){const a=i.repeat(o);let s=a+e.name;Array.isArray(e.tags)&&e.tags.length>0&&(s+="("+e.tags.join(",")+")"),s+="\n";for(const i of Object.keys(e))["id","pid","name","children","tags"].includes(i)||(s+=a+"["+i+"]"+e[i]+"\n");for(const i of e.children)s+=render(i,o+1);return s}return e.forEach(e=>{o[e.id]={...e,children:[]}}),e.forEach(e=>{e.pid&&o[e.pid]?o[e.pid].children.push(o[e.id]):a.push(o[e.id])}),a.map(e=>render(e,0)).join("").trim()},OrgChart._onClickHandler=function(e,i,o,a,s){var l;if(void 0===o)if("add"===i){var c={id:e.generateId(),pid:a};e.addNode(c,null,!0)}else if("edit"===i){var d=e.getNode(a);e.editUI.show(d.id)}else if("details"===i){d=e.getNode(a);e.editUI.show(d.id,!0)}else if("remove"===i)e.removeNode(a,null,!0);else if("svg_export"===i||"svg"===i){var h={};OrgChart.isNEU(a)||(h.pages=[{nodeId:a}]),e.exportToSVG(h)}else if("pdf_export"===i||"pdf"===i){h={};OrgChart.isNEU(a)||(h.pages=[{nodeId:a}]),e.exportToPDF(h)}else if("png_export"===i||"png"===i){h={};OrgChart.isNEU(a)||(h.pages=[{nodeId:a}]),e.exportToPNG(h)}else if("visio_export"===i||"visio"===i)e.exportToVisio({nodeId:a});else if("pp_export"===i||"powerpoint"===i)e.exportToPowerPoint();else if("pp_preview"===i||"pppreview"===i){h={parentLevels:0,childLevels:1,expandChildren:!1,pages:[{parentLevels:null,childLevels:null,expandChildren:!0,nodeId:e.roots[0].id}]};null!=a&&(h.expandChildren=!1,h.pages[0].nodeId=a),e.powerPointPreviewUI.show(h)}else if("pdf_preview"===i||"pdfpreview"===i){h={parentLevels:0,childLevels:1,expandChildren:!1,pages:[{parentLevels:null,childLevels:null,expandChildren:!0,nodeId:e.roots[0].id}]};null!=a&&(h.expandChildren=!1,h.pages[0].nodeId=a),e.pdfPreviewUI.show(h)}else if("svg_preview"===i||"svgpreview"===i){h={parentLevels:0,childLevels:1,expandChildren:!1,pages:[{parentLevels:null,childLevels:null,expandChildren:!0,nodeId:e.roots[0].id}]};null!=a&&(h.expandChildren=!1,h.pages[0].nodeId=a),e.svgPreviewUI.show(h)}else if("png_preview"===i||"pngpreview"===i){h={parentLevels:0,childLevels:1,expandChildren:!1,pages:[{parentLevels:null,childLevels:null,expandChildren:!0,nodeId:e.roots[0].id}]};null!=a&&(h.expandChildren=!1,h.pages[0].nodeId=a),e.pngPreviewUI.show(h)}else"csv_export"===i||"csv"===i?e.exportToCSV({nodeId:a}):"xml_export"===i||"xml"===i?e.exportToXML({nodeId:a}):"json_export"===i||"json"===i?e.exportToJSON({nodeId:a}):"fit"===i?e.fit():"expand_all"===i?e.expand(null,"all"):"full_screen"===i?e.toggleFullScreen():"zoom_in"===i?e.zoom(!0,null,!0):"zoom_out"===i||"zoom_out"===i?e.zoom(!1,null,!0):"layout_mixed"===i?e.setLayout(OrgChart.layout.mixed):"layout_normal"===i?e.setLayout(OrgChart.layout.normal):"layout_right_offset"===i?e.setLayout(OrgChart.layout.treeRightOffset):"layout_left_offset"===i?e.setLayout(OrgChart.layout.treeLeftOffset):"layout_tree"===i?e.setLayout(OrgChart.layout.tree):"layout_grid"===i&&e.setLayout(OrgChart.layout.grid);else l=o.call(e,a,s);return l},OrgChart._isSVG=function(e){if("string"!=typeof e)return!1;const i=e.trim();if(!i.startsWith("<svg")||!i.endsWith("</svg>"))return!1;try{const e=(new DOMParser).parseFromString(i,"image/svg+xml");return!e.querySelector("parsererror")&&"svg"===e.documentElement.nodeName.toLowerCase()}catch{return!1}},OrgChart._treeListAdjustToSTNodePostition=function(e,i){for(var o of e)o.y+=i.y+i.padding[0],o.x+=i.x+i.padding[3],OrgChart._treeListAdjustToSTNodePostition(o.children,i)},OrgChart._treeListSetProps=function(e,i){var o=-e.treeList.scrollTop,a={nodesByLevels:[],lastNode:null,y:0};e.treeList.pinnedIds=[],OrgChart._treeListIterate(e.stChildren,a,-1);var s=a.lastNode.y+a.lastNode.h-0-(e.treeList.maxHeight-e.padding[0]-e.padding[2]);o>0||s<0?o=0:0!=o&&-1*o>s&&(o=-s);for(var l=a.nodesByLevels.length-1;l>=0;l--)for(var c=a.nodesByLevels[l],d=c.length-1;d>=0;d--){for(var h=(x=c[d]).y,p=0,u=x.parent;u&&(p+=u.h,u.parent);)u=u.parent;if(x.children.length&&x.y+o<=p){h=-o+p;var f=c[d+1];if(f&&f.y<h+x.h&&(h=f.y-x.h),u){var g=e.stChildren.indexOf(u);if(e.stChildren.length>g+1){var m=e.stChildren[g+1];m.y<h+x.h&&(h=m.y-x.h)}}}x.y!=h&&e.treeList.pinnedIds.push(x.id),x.y=h,x.x=0}if(i==OrgChart.orientation.bottom){var b=a.lastNode.y+a.lastNode.h;for(var l of a.nodesByLevels)for(var x of l)x.y=b-x.y-x.h}e.treeList.scrollTop=-o,e.treeList.scrollTopMax=s},OrgChart._treeListIterate=function(e,i,o){for(var a of(o++,e))a.y=i.y,i.y+=a.h,i.nodesByLevels[o]||(i.nodesByLevels[o]=[]),i.nodesByLevels[o].push(a),i.lastNode=a,OrgChart._treeListIterate(a.children,i,o)},OrgChart._treeListGetTumbPositionFromScrollTop=function(e){var i=e.h-e.padding[0]-e.padding[2],o=i/((e.treeList.scrollTopMax+i)/100),a=i/100*o,s=i-a,l=-e.treeList.scrollTop/(e.treeList.scrollTopMax/100),c=e.y+e.padding[0]+l*(s/-100),d="initial";return(isNaN(a)||isNaN(c)||a<0||o>100)&&(d="none",a=0,c=0),{thumbHeight:a,thumbPosition:c,scrollBarDisplay:d}},OrgChart._treeListGetScrollTopFromTumbPosition=function(e,i,o){var a=e.h-e.padding[0]-e.padding[2]-i,s=(o-(e.y+e.padding[0]))/a*100/100*e.treeList.scrollTopMax;return(isNaN(s)||s<0)&&(s=0),s>e.treeList.scrollTopMax&&(s=e.treeList.scrollTopMax),s},OrgChart._getCenterNodeFromParams=function(e,i){var o=e[i.id];if(o){if(o.isTreeListItem){for(;!o.stParent;)o=o.parent;o=o.stParent}return o}return null},OrgChart._getScrollTopForNode=function(e,i){var o={nodesByLevels:[],lastNode:null,y:0};OrgChart._treeListIterate(e.stChildren,o,-1);var a=null;for(var s of o.nodesByLevels){for(var l of s)if(l.id==i){a=l;break}if(a)break}if(!a)return e.treeList.scrollTop;for(var c=0,d=a.parent;d&&(c+=d.h,d.parent);)d=d.parent;var h=e.padding[0],p=e.padding[2],u=e.treeList.maxHeight-h-p,f=o.lastNode.y+o.lastNode.h-u;f<0&&(f=0);var g=e.treeList.scrollTop,m=a.y-c,b=a.y+a.h-u,x=g;return a.y<g+c?x=m:a.y+a.h>g+u&&(x=a.h>u-c?m:b),x<0?x=0:x>f&&(x=f),x},OrgChart._getDefailtPositionForExpandCollpase=function(e,i){var o={x:0,y:0};switch(e.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:o.x=i.w/2,o.y=i.h;break;case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:o.x=i.w/2,o.y=0;break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:o.x=0,o.y=i.h/2;break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:o.x=i.w,o.y=i.h/2}return o},OrgChart._measureCache={svg:null,text:null},OrgChart._getMeasureElement=function(){if(OrgChart._measureCache.svg)return OrgChart._measureCache.text;const e="http://www.w3.org/2000/svg";return OrgChart._measureCache.svg=document.createElementNS(e,"svg"),OrgChart._measureCache.svg.id="orgchart_js_test__measure",OrgChart._measureCache.svg.style.cssText="position:absolute;top:-9999px;visibility:hidden;white-space:pre;",OrgChart._measureCache.text=document.createElementNS(e,"text"),OrgChart._measureCache.svg.appendChild(OrgChart._measureCache.text),document.body.appendChild(OrgChart._measureCache.svg),OrgChart._measureCache.text},OrgChart._lineClamp=function(e,i,o,a){if(void 0===i||null==i)return"";"string"!=typeof i&&(i=i.toString()),i=OrgChart._escapeHtml(i);const s=/(\w+(?:-\w+)?)="([^"]*)"/g,l={};let c;for(;null!==(c=s.exec(e));)l[c[1]]=c[2];const d=OrgChart._getMeasureElement();d.textContent="";for(const[x,v]of Object.entries(l))"x"!==x&&"y"!==x&&d.setAttribute(x,v);const getWidth=e=>(d.textContent=e,d.getComputedTextLength()),h=i.split(" "),p=[];let u="",f=0;for(;f<h.length&&p.length<a;){const e=h[f],i=u?u+" "+e:e;if(getWidth(i)<=o)u=i,f++;else if(""===u){let i=0,a=e.length,s=1;for(;i<=a;){let l=i+a>>1;getWidth(e.slice(0,l))<=o?(s=l,i=l+1):a=l-1}p.push(e.slice(0,s)),h[f]=e.slice(s)}else p.push(u),u=""}u&&p.length<a&&p.push(u);let g=f<h.length||f===h.length&&""===h[f-1]&&i.endsWith(" ");if(g&&p.length>0){let e=p[p.length-1],i=0,a=e.length,s="";for(;i<=a;){let l=Math.floor((i+a)/2),c=e.substring(0,l)+"...";getWidth(c)<=o?(s=c,i=l+1):a=l-1}p[p.length-1]=s}const m=` x="${l.x||"0"}"`,b=1===p.length?p[0]:p.map((e,i)=>`<tspan${m} dy="${0===i?0:"1.2em"}">${e}</tspan>`).join("");return`<text${Object.entries(l).map(([e,i])=>` ${e}="${i}"`).join("")}>${g?`<title>${i}</title>`:""}${b}</text>`},OrgChart._getScrollableTreeListNodeInTouchEnabledDevice=function(e){if(!e||!e.isTreeListItem||!OrgChart._isTouchDevice())return null;var i=OrgChart.getRootOf(e).stParent,{thumbHeight:o,thumbPosition:a,scrollBarDisplay:s}=OrgChart._treeListGetTumbPositionFromScrollTop(i);return"none"==s?null:i},OrgChart._convertImagesToBase64=async function(e){const i=new DOMParser;return await Promise.all(e.map(async e=>{const o=i.parseFromString(e,"image/svg+xml"),a=o.querySelectorAll("image");for(const i of a){const e=i.getAttribute("href")||i.getAttribute("xlink:href");if(e&&!e.startsWith("data:"))try{const o=parseFloat(i.getAttribute("width"))||0,a=parseFloat(i.getAttribute("height"))||0;if(o>0&&a>0){const s=await OrgChart._resizeAndConvert(e,o,a);i.setAttribute("href",s),i.removeAttributeNS("http://www.w3.org/1999/xlink","href")}}catch(s){console.error("Failed to process image:",e,s)}}return(new XMLSerializer).serializeToString(o)}))},OrgChart._resizeAndConvert=function(e,i,o){return new Promise((a,s)=>{const l=new Image;l.crossOrigin="anonymous",l.onload=()=>{const e=document.createElement("canvas"),s=e.getContext("2d"),c=Math.min(i/l.width,o/l.height),d=l.width*c,h=l.height*c;e.width=d,e.height=h,s.drawImage(l,0,0,d,h),a(e.toDataURL("image/png"))},l.onerror=s,l.src=e})},OrgChart.xScrollUI=function(e,i,o,a,s){this.element=e,this.requestParams=o,this.config=i,this.onSetViewBoxCallback=a,this.onDrawCallback=s,this.position=0,this.bar=null,this._event_id=OrgChart._guid()},OrgChart.xScrollUI.prototype.addListener=function(e){var i=this;if((this.config.mouseScrool==OrgChart.action.xScroll||this.config.mouseScrool==OrgChart.action.scroll)&&this.bar){var o=-1!==navigator.userAgent.indexOf("Mac OS"),a=OrgChart._getScrollSensitivity();!function(e,a,s){var l=!1;function update(){l=!0;var e=(i.position-i.bar.scrollLeft)/s;if(e>0)e++;else{if(0==e)return void(l=!1);e--}Math.ceil(i.bar.scrollLeft)==Math.ceil(i.position)?l=!1:(i.bar.scrollLeft+=e,c(update))}e.addEventListener("wheel",function(e){if(e.preventDefault(),e.ctrlKey)return;var s=0;if(i.config.mouseScrool==OrgChart.action.xScroll)(s=e.deltaX||e.wheelDeltaX)||(s=e.deltaY||e.wheelDeltaY);else if(i.config.mouseScrool==OrgChart.action.scroll&&!(s=o||!e.shiftKey?e.deltaX||e.wheelDeltaX:e.deltaY||e.wheelDeltaY))return;s=-s,s=Math.max(-1,Math.min(1,s)),i.position+=-s*a;var c=parseFloat(i.innerBar.clientWidth)-parseFloat(i.bar.clientWidth);i.position<0&&(i.position=0);i.position>c&&(i.position=c);l||update()},{passive:!1});var c=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){setTimeout(e,20)}}(e,a.speed,a.smooth)}},OrgChart.xScrollUI.prototype.create=function(e){if(!0===this.config.showXScroll||this.config.mouseScrool===OrgChart.action.scroll||this.config.mouseScrool===OrgChart.action.xScroll){var i=this;this.bar&&this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),this.bar=document.createElement("div"),this.innerBar=document.createElement("div"),this.requestParams(),this.innerBar.innerHTML="&nbsp",Object.assign(this.bar.style,{position:"absolute",left:0,bottom:0,width:e+"px","overflow-x":"scroll",height:"20px"}),this.element.appendChild(this.bar),this.bar.appendChild(this.innerBar),this.bar.addEventListener("scroll",function(){if(this.ignore)this.ignore=!1;else{var e=i.requestParams(),o=(parseFloat(i.innerBar.clientWidth)-parseFloat(i.bar.clientWidth))/100,a=this.scrollLeft/o,s=(e.boundary.right-e.boundary.left)/100;e.viewBox[0]=a*s+e.boundary.left,i.onSetViewBoxCallback(e.viewBox),clearTimeout(this._timeout),this._timeout=setTimeout(function(){i.onDrawCallback()},500)}})}},OrgChart.xScrollUI.prototype.setPosition=function(){if(this.bar){var e=this.requestParams(),i=(Math.abs(e.boundary.maxX-e.boundary.minX)+2*this.config.padding)*e.scale;switch(this.config.orientation){case OrgChart.orientation.right:case OrgChart.orientation.right_top:i=Math.abs(e.boundary.minX*e.scale)}this.innerBar.style.width=i+"px";var o=(e.boundary.right-e.boundary.left)/100,a=(e.viewBox[0]-e.boundary.left)/o;a<0?a=0:a>100&&(a=100);var s=(parseFloat(this.innerBar.clientWidth)-parseFloat(this.bar.clientWidth))/100,l=a*s;this.bar.ignore=!0,this.bar.scrollLeft=l,this.position=this.bar.scrollLeft,this.bar.style.visibility=s<=0?"hidden":"",!0!==this.config.showXScroll&&(this.bar.style.visibility="hidden"),OrgChart.events.publish("change",[this,{isScrollBarVisible:"hidden"!=this.bar.style.visibility}])}},OrgChart.xScrollUI.prototype.on=function(e,i){return OrgChart.events.on(e,i,this._event_id),this},OrgChart.yScrollUI=function(e,i,o,a,s){this.element=e,this.requestParams=o,this.config=i,this.onSetViewBoxCallback=a,this.onDrawCallback=s,this.position=0,this.bar=null,this._event_id=OrgChart._guid()},OrgChart.yScrollUI.prototype.addListener=function(e){var i=this;if((this.config.mouseScrool==OrgChart.action.yScroll||this.config.mouseScrool==OrgChart.action.scroll)&&this.bar){var o=-1!==navigator.userAgent.indexOf("Mac OS"),a=OrgChart._getScrollSensitivity();!function(e,a,s){var l=!1;function update(){l=!0;var e=(i.position-i.bar.scrollTop)/s;if(e>0)e++;else{if(0==e)return void(l=!1);e--}Math.ceil(i.bar.scrollTop)==Math.ceil(i.position)?l=!1:(i.bar.scrollTop+=e,c(update))}e.addEventListener("wheel",function(e){if(e.preventDefault(),e.ctrlKey)return;var s=0;if(i.config.mouseScrool==OrgChart.action.yScroll)(s=e.deltaY||e.wheelDeltaY)||(s=e.deltaX||e.wheelDeltaX);else if(i.config.mouseScrool==OrgChart.action.scroll&&!(s=o||!e.shiftKey?e.deltaY||e.wheelDeltaY:e.deltaX||e.wheelDeltaX))return;s=-s,s=Math.max(-1,Math.min(1,s)),i.position+=-s*a;var c=parseFloat(i.innerBar.clientHeight)-parseFloat(i.bar.clientHeight);i.position<0&&(i.position=0);i.position>c&&(i.position=c);l||update()},{passive:!1});var c=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){setTimeout(e,20)}}(e,a.speed,a.smooth)}},OrgChart.yScrollUI.prototype.create=function(e){if(!0===this.config.showYScroll||this.config.mouseScrool===OrgChart.action.scroll||this.config.mouseScrool===OrgChart.action.yScroll){var i=this;this.bar&&this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),this.bar=document.createElement("div"),this.innerBar=document.createElement("div"),this.innerBar.innerHTML="&nbsp",Object.assign(this.bar.style,{position:"absolute",right:0,bottom:0,height:e+"px","overflow-y":"scroll",width:"20px"}),this.element.appendChild(this.bar),this.bar.appendChild(this.innerBar),this.bar.addEventListener("scroll",function(){if(this.ignore)this.ignore=!1;else{var e=i.requestParams(),o=(parseFloat(i.innerBar.clientHeight)-parseFloat(i.bar.clientHeight))/100,a=this.scrollTop/o,s=(e.boundary.bottom-e.boundary.top)/100;e.viewBox[1]=a*s+e.boundary.top,i.onSetViewBoxCallback(e.viewBox),clearTimeout(this._timeout),this._timeout=setTimeout(function(){i.onDrawCallback()},500)}})}},OrgChart.yScrollUI.prototype.setPosition=function(){if(this.bar){var e=this.requestParams(),i=(Math.abs(e.boundary.maxY-e.boundary.minY)+2*this.config.padding)*e.scale;switch(this.config.orientation){case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:i=Math.abs(e.boundary.minY*e.scale)}this.innerBar.style.height=i+"px";var o=(e.boundary.bottom-e.boundary.top)/100,a=(e.viewBox[1]-e.boundary.top)/Math.abs(o);a<0?a=0:a>100&&(a=100);var s=(parseFloat(this.innerBar.clientHeight)-parseFloat(this.bar.clientHeight))/100,l=a*s;this.bar.ignore=!0,this.bar.scrollTop=l,this.position=this.bar.scrollTop,this.bar.style.visibility=s<=0?"hidden":"",!0!==this.config.showYScroll&&(this.bar.style.visibility="hidden"),OrgChart.events.publish("change",[this,{isScrollBarVisible:"hidden"!=this.bar.style.visibility}])}},OrgChart.yScrollUI.prototype.on=function(e,i){return OrgChart.events.on(e,i,this._event_id),this},OrgChart.prototype.zoom=function(e,i,o,a){var s=this.getViewBox().slice(0),l=s,c=s[2],d=s[3];!0===e?(s[2]=s[2]/OrgChart.SCALE_FACTOR,s[3]=s[3]/OrgChart.SCALE_FACTOR):!1===e?(s[2]=s[2]*OrgChart.SCALE_FACTOR,s[3]=s[3]*OrgChart.SCALE_FACTOR):(s[2]=s[2]/e,s[3]=s[3]/e),i||(i=[50,50]),s[0]=l[0]-(s[2]-c)/(100/i[0]),s[1]=l[1]-(s[3]-d)/(100/i[1]);var h=this.getScale(s);if(s[2]=this.width()/h,s[3]=this.height()/h,!0===e&&h<this.config.scaleMax||!1===e&&h>this.config.scaleMin||0!=e&&1!=e&&h<this.config.scaleMax&&h>this.config.scaleMin){this._hideBeforeAnimation();var p=this;o?(clearTimeout(p._timeout),OrgChart.animate(this.getSvg(),{viewbox:this.getViewBox()},{viewbox:s},this.config.anim.duration,this.config.anim.func,function(){clearTimeout(p._timeout),p._timeout=setTimeout(function(){p._draw(!0,OrgChart.action.zoom,null,a)},500)})):(this.setViewBox(s),clearTimeout(p._timeout),p._timeout=setTimeout(function(){p._draw(!0,OrgChart.action.zoom,null,a)},500))}},OrgChart.loading={},OrgChart.loading.show=function(e){var i=document.createElement("div");i.id="boc-loading",i.innerHTML='<style>@-webkit-keyframes dot-keyframes {0% { opacity: .4; -webkit-transform: scale(1, 1);transform: scale(1, 1);}50% {opacity: 1;-webkit-transform: scale(1.2, 1.2);transform: scale(1.2, 1.2);}100% {opacity: .4;-webkit-transform: scale(1, 1);transform: scale(1, 1);}}@keyframes dot-keyframes {0% {opacity: .4;-webkit-transform: scale(1, 1);transform: scale(1, 1);}50% {opacity: 1;-webkit-transform: scale(1.2, 1.2);transform: scale(1.2, 1.2);}100% {opacity: .4;-webkit-transform: scale(1, 1);transform: scale(1, 1);}}.boc-loading-dots div {margin: 10px;} .boc-dot-1 {background-color: #039BE5;}.boc-dot-2 {background-color: #F57C00;}.boc-dot-3 {background-color: #FFCA28;} .boc-loading-dots {text-align: center;width: 100%; position: absolute; top: 0;}.boc-loading-dots--dot {-webkit-animation: dot-keyframes 1.5s infinite ease-in-out;animation: dot-keyframes 1.5s infinite ease-in-out; border-radius: 10px;display: inline-block;height: 10px;width: 10px;}.boc-loading-dots--dot:nth-child(2) {-webkit-animation-delay: .5s;animation-delay: .5s;}.boc-loading-dots--dot:nth-child(3) {-webkit-animation-delay: 1s;animation-delay: 1s;}</style><div class="boc-loading-dots"><div class="boc-loading-dots--dot boc-dot-1"></div><div class="boc-loading-dots--dot boc-dot-2"></div><div class="boc-loading-dots--dot boc-dot-3"></div></div>',e.element.appendChild(i)},OrgChart.loading.hide=function(e){var i=e.element.querySelector("#boc-loading");i&&i.parentNode.removeChild(i)},OrgChart.pdfPrevUI={},OrgChart.pdfPrevUI.show=function(e,i){console.warn("OrgChart.pdfPrevUI.show is obsolete; use chart.pdfPreviewUI.show instead.")},OrgChart.pdfPrevUI.hide=function(){console.warn("OrgChart.pdfPrevUI.hide is obsolete; use chart.pdfPreviewUI.hide instead.")},void 0===OrgChart&&(OrgChart={}),OrgChart.events.on("renderdefs",function(e,i){for(var o=0;o<e.config.clinks.length;o++){var a=e.config.clinks[o].template;a||(a="orange");var s=OrgChart.clinkTemplates[a];i.defs+=s.defs}}),OrgChart.events.on("prerender",function(e,i){OrgChart.RENDER_CLINKS_BEFORE_NODES&&e._clink(e,i)}),OrgChart.events.on("render",function(e,i){OrgChart.RENDER_CLINKS_BEFORE_NODES||e._clink(e,i)}),OrgChart.events.on("drag",function(e,i,o,a){if(e instanceof OrgChart&&e.config.movable&&a)for(var s=0;s<a.length;s++){for(var l=a[s],c=e.element.querySelectorAll(`[data-c-l-from="${l}"]`),d=e.element.querySelectorAll(`[data-c-l-to="${l}"]`),h=0;h<c.length;h++)c[h].parentNode.removeChild(c[h]);for(h=0;h<d.length;h++)d[h].parentNode.removeChild(d[h])}}),OrgChart.prototype._clink=function(e,i){for(var o="",a=0;a<this.config.clinks.length;a++){var s=this.config.clinks[a],l=e.getNode(s.from),c=e.getNode(s.to);if(l&&-1!=i.res.visibleNodeIds.indexOf(l.id)&&(c&&-1!=i.res.visibleNodeIds.indexOf(c.id))){var d=l.x,h=l.y,p=c.x,u=c.y,f={},g={},m=d+l.w/2,b=p+c.w/2,x=h+l.h/2,v=u+c.h/2,y=1;switch(this.config.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:m<=b?(y=1,f.x=m+l.w/10,g.x=b-c.w/10):(y=-1,f.x=m-l.w/10,g.x=b+c.w/10),h==u?(y=1,f.y=h,g.y=u):h>u?(f.y=h,g.y=u+c.h):(f.y=h+l.h,g.y=u);break;case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:m<=b?(y=-1,f.x=m+l.w/10,g.x=b+c.w/10):(y=1,f.x=m-l.w/10,g.x=b+c.w/10),h==u?(y=-1,f.y=h+l.h,g.y=u+c.h):h>u?(f.y=h,g.y=u+c.h):(f.y=h+l.h,g.y=u);break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:x<=v?(y=-1,f.y=x+l.h/5,g.y=v+c.h/5):(y=1,f.y=x-l.h/5,g.y=v+c.h/5),d==p?(y=-1,f.x=d,g.x=p):d>p?(f.x=d,g.x=p+c.w):(f.x=d+l.w,g.x=p);break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:x<=v?(y=1,f.y=x+l.h/5,g.y=v+c.h/5):(y=-1,f.y=x-l.h/5,g.y=v+c.h/5),d==p?(y=1,f.x=d+l.w,g.x=p+c.w):d>p?(f.x=d,g.x=p+c.w):(f.x=d+l.w,g.x=p)}var _=findD(f,g,y),w=s.template;w||(w="orange");var k=OrgChart.clinkTemplates[w];if(s.label){var I=OrgChart.clinkLabelPosition(s,f,g,_);o+=k.label.replace("{x}",I.x).replace("{y}",I.y).replace("{val}",s.label)}var S="M"+f.x+","+f.y+"C"+f.x+","+f.y+" "+_.x+","+_.y+" "+g.x+","+g.y;o+=("<g "+OrgChart.attr.c_link_from+'="{from}" '+OrgChart.attr.c_link_to+'="{to}">').replace("{from}",l.id).replace("{to}",c.id)+k.link.replaceAll("{d}",S)+'<path stroke="transparent" stroke-width="15" fill="none" d="'+S+'" />',o+=OrgChart.grCloseTag}function findD(e,i,o){null==o&&(o=1);var a=i.x-e.x,l=i.y-e.y,c=Math.sqrt(Math.pow(i.x-e.x,2)+Math.pow(i.y-e.y,2))/3;return c=c/(Math.sqrt(a*a+l*l)*o)*OrgChart.clinkCurve(s),{x:e.x+a/2-l*c,y:e.y+l/2+a*c}}}i.content+=o},OrgChart.clinkLabelPosition=function(e,i,o,a){var s=(o.x-i.x)/2+i.x,l=(o.y-i.y)/2+i.y;return{x:(s-a.x)/2+a.x,y:(l-a.y)/2+a.y}},OrgChart.clinkCurve=function(e){return OrgChart.CLINK_CURVE},OrgChart.prototype.addClink=function(e,i,o,a){this._putInUndoStack(),this.clearRedo();for(var s=this.config.clinks.length-1;s>=0;s--){var l=this.config.clinks[s];l.from==e&&l.to==i&&this.config.clinks.splice(s,1)}return this.config.clinks.push({from:e,to:i,label:o,template:a}),this._ai.setContext(),OrgChart.events.publish("updated",[this]),this},OrgChart.prototype.removeClink=function(e,i){this._putInUndoStack(),this.clearRedo();for(var o=this.config.clinks.length-1;o>=0;o--){var a=this.config.clinks[o];a.from==e&&a.to==i&&this.config.clinks.splice(o,1)}return this._ai.setContext(),OrgChart.events.publish("updated",[this]),this},OrgChart.clinkTemplates={},OrgChart.clinkTemplates.orange={defs:'<marker id="arrowOrange" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse"><path fill="#F57C00" d="M 0 0 L 10 5 L 0 10 z" /></marker><marker id="dotOrange" viewBox="0 0 10 10" refX="5" refY="5" markerWidth="5" markerHeight="5"> <circle cx="5" cy="5" r="5" fill="#F57C00" /></marker>',link:'<path marker-start="url(#dotOrange)" marker-end="url(#arrowOrange)" stroke="#F57C00" stroke-width="2" fill="none" d="{d}" />',label:'<text fill="#F57C00" text-anchor="middle" x="{x}" y="{y}">{val}</text>'},OrgChart.clinkTemplates.blue={defs:'<marker id="arrowBlue" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse"><path fill="#039BE5" d="M 0 0 L 10 5 L 0 10 z" /></marker><marker id="dotBlue" viewBox="0 0 10 10" refX="5" refY="5" markerWidth="5" markerHeight="5"> <circle cx="5" cy="5" r="5" fill="#039BE5" /></marker>',link:'<path marker-start="url(#dotBlue)" marker-end="url(#arrowBlue)" stroke="#039BE5" stroke-width="2" fill="none" d="{d}" />',label:'<text fill="#039BE5" text-anchor="middle" x="{x}" y="{y}">{val}</text>'},OrgChart.clinkTemplates.yellow={defs:'<marker id="arrowYellow" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse"><path fill="#FFCA28" d="M 0 0 L 10 5 L 0 10 z" /></marker><marker id="dotYellow" viewBox="0 0 10 10" refX="5" refY="5" markerWidth="5" markerHeight="5"> <circle cx="5" cy="5" r="5" fill="#FFCA28" /></marker>',link:'<path marker-start="url(#dotYellow)" marker-end="url(#arrowYellow)" stroke="#FFCA28" stroke-width="2" fill="none" d="{d}" />',label:'<text fill="#FFCA28" text-anchor="middle" x="{x}" y="{y}">{val}</text>'},void 0===OrgChart&&(OrgChart={}),OrgChart.events.on("renderdefs",function(e,i){for(var o=0;o<e.config.slinks.length;o++){var a=e.config.slinks[o].template;a||(a="orange");var s=OrgChart.slinkTemplates[a];i.defs+=s.defs}}),OrgChart.events.on("render",function(e,i){e._slinks(e,i)}),OrgChart.events.on("drag",function(e,i,o,a){if(e instanceof OrgChart&&e.config.movable&&a)for(var s=0;s<a.length;s++){for(var l=a[s],c=e.element.querySelectorAll(`[data-s-l-from="${l}"]`),d=e.element.querySelectorAll(`[data-s-l-to="${l}"]`),h=0;h<c.length;h++)c[h].parentNode.removeChild(c[h]);for(h=0;h<d.length;h++)d[h].parentNode.removeChild(d[h])}}),OrgChart.prototype._slinks=function(e,i){var o="",a=this.getScale(),s=i.res.boundary;function _findM(e,i){return{x:(e[0]+i[0])/2,y:(e[1]+i[1])/2}}function _slinks(i,o,l,c,d){var h,p=[],u=null,f=OrgChart.t(i.templateName,i.min,a),g=c.levelSeparation;switch(i.parent&&i.parent.layout&&(g=c.mixedHierarchyNodesSeparation),c.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:h={p:i.x+i.w/2,q:i.y,r:i.x+i.w/2,s:s.minY+g};break;case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:h={p:i.x+i.w/2,q:i.y+i.h,r:i.x+i.w/2,s:s.maxY};break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:h={p:i.x,q:i.y+i.h/2,r:s.minX+g,s:i.y+i.h/2};break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:h={p:i.x+i.w,q:i.y+i.h/2,r:s.maxX,s:i.y+i.h/2}}if(i.sl==o.sl)switch(u=o,c.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:p.push([h.p,h.q]),p.push([h.p,h.q-2*OrgChart.SLINK_GAP]),f=OrgChart.t(u.templateName,u.min,a),p.push([u.x+u.w/2,p[p.length-1][1]]),p.push([p[p.length-1][0],u.y]);break;case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:p.push([h.p,h.q]),p.push([h.p,h.q+2*OrgChart.SLINK_GAP]),f=OrgChart.t(u.templateName,u.min,a),p.push([u.x+u.w/2,p[p.length-1][1]]),p.push([p[p.length-1][0],u.y+u.h]);break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:p.push([h.p,h.q]),p.push([h.p-2*OrgChart.SLINK_GAP,h.q]),f=OrgChart.t(u.templateName,u.min,a),p.push([p[p.length-1][0],u.y+u.h/2]),p.push([u.x,p[p.length-1][1]]);break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:p.push([h.p,h.q]),p.push([h.p+2*OrgChart.SLINK_GAP,h.q]),f=OrgChart.t(u.templateName,u.min,a),p.push([p[p.length-1][0],u.y+u.h/2]),p.push([u.x+u.w,p[p.length-1][1]])}else{switch(c.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:p.push([h.p,h.q]),p.push([h.r,i.y-2*OrgChart.SLINK_GAP]);break;case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:p.push([h.p,h.q]),p.push([h.r,i.y+i.h+2*OrgChart.SLINK_GAP]);break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:p.push([h.p,h.q]),p.push([i.x-2*OrgChart.SLINK_GAP,h.s]);break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:p.push([h.p,h.q]),p.push([i.x+i.w+2*OrgChart.SLINK_GAP,h.s])}for(var m=i,b=i;b.parent;)b=b.parent;for(;null==u;){var x=!1,v=m.parent,y=v.leftNeighbor,_=v.rightNeighbor;if(v.id==o.id?u=v:OrgChart._intersects(v,h,c)&&(h=OrgChart._addPoint(v,p,c,h,d),x=!0),v.id!=o.id){for(;y;){if(y.id==o.id){u=y;break}OrgChart._intersects(y,h,c)&&(h=OrgChart._addPoint(y,p,c,h,d),x=!0),y=y.leftNeighbor}for(;_;){if(_.id==o.id){u=_;break}OrgChart._intersects(_,h,c)&&(h=OrgChart._addPoint(_,p,c,h,d),x=!0),_=_.rightNeighbor}}if(!x){var w=0,k=0;if(v.parent){g=c.levelSeparation,v.parent.layout&&(g=c.mixedHierarchyNodesSeparation);var I=e.manager.bordersByRootIdAndLevel[b.id][v.parent.sl];switch(c.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:w=p[p.length-1][0],k=I.maxY+g-OrgChart.SLINK_GAP;break;case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:w=p[p.length-1][0],k=I.minY-g+OrgChart.SLINK_GAP;break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:w=I.maxX+g-OrgChart.SLINK_GAP,k=p[p.length-1][1];break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:w=I.minX-g+OrgChart.SLINK_GAP,k=p[p.length-1][1]}}p.push([w,k])}m=v}switch(f=OrgChart.t(u.templateName,u.min,a),p.splice(p.length-1,1),c.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:var S=f.expandCollapseSize;"left"==d&&(S*=-1),p.push([u.x+u.w/2+S,p[p.length-1][1]]),p.push([p[p.length-1][0],u.y+u.h]);break;case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:S=f.expandCollapseSize;"left"==d&&(S*=-1),p.push([u.x+u.w/2+S,p[p.length-1][1]]),p.push([p[p.length-1][0],u.y]);break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:S=f.expandCollapseSize;"top"==d&&(S*=-1),p.push([p[p.length-1][0],u.y+u.h/2+S]),p.push([u.x+u.w,p[p.length-1][1]]);break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:S=f.expandCollapseSize;"top"==d&&(S*=-1),p.push([p[p.length-1][0],u.y+u.h/2+S]),p.push([u.x,p[p.length-1][1]])}}return l&&(p=p.reverse()),p}for(var l=[],c=[],d=[],h=[],p=[],u=0;u<this.config.slinks.length;u++){var f=this.config.slinks[u],g=e.getNode(f.from),m=e.getNode(f.to);if(g&&m&&-1!=i.res.visibleNodeIds.indexOf(m.id)&&-1!=i.res.visibleNodeIds.indexOf(g.id)){var b=g.lcn?g.lcn:"base",x=e._layoutConfigs[b],v=g.sl<m.sl,y="left";switch(x.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:m.x>=g.x&&(y="right");break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:case OrgChart.orientation.right:case OrgChart.orientation.right_top:y="top",m.y>g.y&&(y="bottom")}_=v?_slinks(m,g,v,x,y):_slinks(g,m,v,x,y),l.push(_),c.push(f),h.push(y),d.push(x),p.push({from:g,to:m})}}for(u=0;u<l.length;u++){var _=l[u];f=c[u],y=h[u];switch(OrgChart._slinkRemoveUnusedPoints(_),x.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:OrgChart._slinkAvoidOverlaping(e._connectorLines,_,y,x.orientation);break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:case OrgChart.orientation.right:case OrgChart.orientation.right_top:OrgChart._slinkAvoidOverlaping2(e._connectorLines,_,y,x.orientation)}}for(u=l.length-1;u>=0;u--){_=l[u],f=c[u];switch(x.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:OrgChart._slinkAvoidOverlapingSecond(e._connectorLines,_,x.orientation);break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:case OrgChart.orientation.right:case OrgChart.orientation.right_top:OrgChart._slinkAvoidOverlapingSecond2(e._connectorLines,_,x.orientation)}}for(u=0;u<l.length;u++){_=l[u],f=c[u],x=d[u],g=p[u].from,m=p[u].to;var w=f.template;w||(w="orange");var k=OrgChart.slinkTemplates[w],I=null;switch(k.labelPosition){case"start":I={x:_[1][0],y:_[1][1]};break;case"middle":var S=Math.ceil(_.length/2);I=_findM(_[S],_[S-1]);break;case"end":I={x:_[_.length-2][0],y:_[_.length-2][1]}}var C=structuredClone(_);C[0].unshift("M");for(var L=1;L<_.length;L++)C[L].unshift("L");var A=OrgChart.roundPathCorners(C,OrgChart.LINK_ROUNDED_CORNERS,!1);if(f.label){var E=k.label.replace("{x}",I.x).replace("{y}",I.y).replace("{val}",f.label),N=OrgChart._getLabelSize(E),$=-N.height/2;switch(x.orientation){case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:$=N.height}o+=k.label.replace("{x}",I.x).replace("{y}",I.y+$).replace("{val}",f.label)}var M=g.id,T=m.id;v&&(M=m.id,T=g.id),o+=("<g "+OrgChart.attr.s_link_from+'="{from}" '+OrgChart.attr.s_link_to+'="{to}">').replace("{from}",M).replace("{to}",T)+k.link.replaceAll("{d}",A)+'<path stroke="transparent" stroke-width="15" fill="none" d="'+A+'" />',o+=OrgChart.grCloseTag}i.content+=o},OrgChart.prototype.addSlink=function(e,i,o,a){this._putInUndoStack(),this.clearRedo();for(var s=this.config.slinks.length-1;s>=0;s--){var l=this.config.slinks[s];l.from==e&&l.to==i&&this.config.slinks.splice(s,1)}return this.config.slinks.push({from:e,to:i,label:o,template:a}),this._ai.setContext(),OrgChart.events.publish("updated",[this]),this},OrgChart.prototype.removeSlink=function(e,i){this._putInUndoStack(),this.clearRedo();for(var o=this.config.slinks.length-1;o>=0;o--){var a=this.config.slinks[o];a.from==e&&a.to==i&&this.config.slinks.splice(o,1)}return this._ai.setContext(),OrgChart.events.publish("updated",[this]),this},OrgChart.slinkTemplates={},OrgChart.slinkTemplates.orange={defs:'<marker id="arrowSlinkOrange" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse"><path fill="#F57C00" d="M 0 0 L 10 5 L 0 10 z" /></marker><marker id="dotSlinkOrange" viewBox="0 0 10 10" refX="5" refY="5" markerWidth="5" markerHeight="5"> <circle cx="5" cy="5" r="5" fill="#F57C00" /></marker>',link:'<path stroke-dasharray="4, 2" marker-start="url(#dotSlinkOrange)" marker-end="url(#arrowSlinkOrange)" stroke-linejoin="round" stroke="#F57C00" stroke-width="2" fill="none" d="{d}" />',label:'<text dominant-baseline="middle" fill="#F57C00" alignment-baseline="middle" text-anchor="middle" x="{x}" y="{y}">{val}</text>',labelPosition:"middle"},OrgChart.slinkTemplates.blue={defs:'<marker id="arrowSlinkBlue" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse"><path fill="#039BE5" d="M 0 0 L 10 5 L 0 10 z" /></marker><marker id="dotSlinkBlue" viewBox="0 0 10 10" refX="5" refY="5" markerWidth="5" markerHeight="5"> <circle cx="5" cy="5" r="5" fill="#039BE5" /></marker>',link:'<path stroke-dasharray="4, 2" marker-start="url(#dotSlinkBlue)" marker-end="url(#arrowSlinkBlue)" stroke-linejoin="round" stroke="#039BE5" stroke-width="2" fill="none" d="{d}" />',label:'<text fill="#039BE5" text-anchor="middle" x="{x}" y="{y}">{val}</text>',labelPosition:"middle"},OrgChart.slinkTemplates.yellow={defs:'<marker id="arrowSlinkYellow" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse"><path fill="#FFCA28" d="M 0 0 L 10 5 L 0 10 z" /></marker><marker id="dotSlinkYellow" viewBox="0 0 10 10" refX="5" refY="5" markerWidth="5" markerHeight="5"> <circle cx="5" cy="5" r="5" fill="#FFCA28" /></marker>',link:'<path stroke-dasharray="4, 2" marker-start="url(#dotSlinkYellow)" marker-end="url(#arrowSlinkYellow)" stroke-linejoin="round" stroke="#FFCA28" stroke-width="2" fill="none" d="{d}" />',label:'<text fill="#FFCA28" text-anchor="middle" x="{x}" y="{y}">{val}</text>',labelPosition:"middle"},OrgChart._ai=function(e){this.instance=e,this.sessionId=null};OrgChart._ai.prototype.prompt=function(e,i){var o=this;(e=e.trim())&&(this.sessionId?o._prompt([{Role:"user",Text:e}],i):this.setContext(function(){o._prompt([{Role:"user",Text:e}],i)}))},OrgChart._ai.prototype._prompt=function(e,i){var o=this,a=[];for(var s of OrgChart.AI_SYSTEM_MESSAGES)a.push({Role:"system",Text:s});var l=this.instance.config.serverUrl+`/OrgChartJSAI/Prompt?client_messages=${encodeURIComponent(JSON.stringify(e))}&system_messages=${encodeURIComponent(JSON.stringify(a))}&sessionId=${this.sessionId}`;const c=new EventSource(l);c.onmessage=function(e){var a=JSON.parse(e.data);"end"==a.kind&&c.close(),"text"==a.kind&&(a.text,i&&i(a.text)),"assistant-message-with-tools"==a.kind?o.toolCalls(a.message,i):"error"==a.kind&&console.error(a.text)},c.onerror=function(e){console.error(e),c.close()}},OrgChart._ai.prototype.setContext=function(e){if(this.instance&&this.instance.config.enableAI&&this.instance.aiUI.canSetContext){this.sessionId=this.instance._event_id;var i=this.instance.config.serverUrl+"/OrgChartJSAI/SetContext",o=this.instance.config.aiChatTools.slice();for(var a of o)null==a.functionParameters&&(a.functionParameters=null),a.functionParameters=JSON.stringify(a.functionParameters);fetch(i,{method:"post",headers:{"Content-Type":"application/json","x-request-type":"ajax"},body:JSON.stringify({context:this.instance.config.nodes,sessionId:this.sessionId,chatTools:o})}).then(function(){e&&e()}).catch(function(e){console.error(e)})}},OrgChart._ai.prototype.toolCalls=function(e,i){var o=this,a={toolCalls:e.ToolCalls};OrgChart.events.publish("ai-tool-calls",[this.instance,a]);var s=[],l=[],c=[],d=[],h=[],p=null,u=null,f=null,g=null,m=null;for(var b of a.toolCalls)null==b.FunctionResult&&("removeNode"==b.FunctionName?s.push(b):"addNode"==b.FunctionName?l.push(b):"updateNode"==b.FunctionName?c.push(b):"select"==b.FunctionName?d.push(b):"deselect"==b.FunctionName?h.push(b):"exportToPDF"==b.FunctionName?p=b:"changeTemplate"==b.FunctionName?u=b:"addSlink"==b.FunctionName?f=b:"removeSlink"==b.FunctionName?g=b:"fit"==b.FunctionName&&(m=b));var x=!1;if(u&&(x=!0,b.FunctionResult="ok",this.instance.config.template=b.FunctionArguments.templateName),f){var v=this.instance.getNode(b.FunctionArguments.employeeId1),y=this.instance.getNode(b.FunctionArguments.employeeId2);v&&y&&v!=y?(x=!0,this.instance.addSlink(v.id,y.id),b.FunctionResult="ok"):b.FunctionResult=`Cannot add link between ${b.FunctionArguments.employeeId1} and ${b.FunctionArguments.employeeId2}`}if(g){v=this.instance.getNode(b.FunctionArguments.employeeId1),y=this.instance.getNode(b.FunctionArguments.employeeId2);v&&y&&v!=y?(x=!0,this.instance.removeSlink(v.id,y.id),b.FunctionResult="ok"):b.FunctionResult=`Cannot remove link between ${b.FunctionArguments.employeeId1} and ${b.FunctionArguments.employeeId2}`}for(var b of(m&&(this.instance.fit(),x=!1),s))x=!0,b.FunctionResult="ok",this.instance.remove(b.FunctionArguments.id);for(var b of l){x=!0,b.FunctionResult="ok",(_=JSON.parse(JSON.stringify(b.FunctionArguments))).isAssistant&&(_.tags=["assistant"]),delete _.isAssistant,OrgChart.isNEU(_.id)&&(_.id=this.instance.generateId()),this.instance.add(_)}for(var b of c){x=!0,b.FunctionResult="ok";var _=this.instance.get(b.FunctionArguments.id);for(var w in b.FunctionArguments)"id"!=w&&null!=b.FunctionArguments[w]&&(_[w]=b.FunctionArguments[w]);this.instance.update(_)}for(var b of d)for(var k of(b.FunctionResult="ok",b.FunctionArguments.ids)){var I=b.FunctionArguments.color;I||(I="#FFCA28");var S=this.instance.getNodeElement(k).firstChild;S&&(S.style.stroke=b.FunctionArguments.color,S.style.strokeWidth=5)}var deselect=function(){for(var e of h)if(e.FunctionResult="ok",e.FunctionArguments.ids)for(var i of e.FunctionArguments.ids){var a=o.instance.getNodeElement(i).firstChild;a&&(a.style.stroke="#aeaeae",a.style.strokeWidth=1)}else x=!0};x?(this.setContext(),this.instance.draw(OrgChart.action.update,void 0,deselect)):deselect();var prompt=function(){var e=[];for(var s of a.toolCalls)e.push({Role:"tool",Text:s.FunctionResult,Id:s.Id});o._prompt(e,i)};p?this.chartInstance.exportToPDF({},function(){b.FunctionResult="ok",OrgChart._downloadFile("application/pdf",response,"OrgChart.pdf",!1,"pdf"),prompt()}):prompt()},OrgChart.aiUI=function(){this.instance=null,this.interval=null,this.canSetContext=!1,this.element=null,this.inputElement=null,this.btnSendElement=null,this.messagesElement=null,Object.defineProperty(this,"width",{get(){return this.isVisible()?this.element.offsetWidth:0}})},OrgChart.aiUI.title="AI for OrgChart JS",OrgChart.aiUI.prototype.init=function(e){this.instance=e;var i=this,o=this.instance.element.querySelector("[data-boc-ai-button]");o&&o.addEventListener("click",function(e){i.show()})},OrgChart.aiUI.prototype.isVisible=function(){return!(!this.element||"none"==this.element.style.display)},OrgChart.aiUI.prototype.show=function(e,i){this.instance.pdfPreviewUI.hide(),this.instance.svgPreviewUI.hide(),this.instance.pngPreviewUI.hide(),this.instance.powerPointPreviewUI.hide(),this.instance.aiUI.hide(),this.instance.orgScribeUI.hide(),this._create(),this.element.style.display="",this.canSetContext||(this.canSetContext=!0,this.instance._ai.setContext());var o=this;i||(this.timeout&&clearInterval(this.interval),this.interval=OrgChart.animate(this.element,{opacity:0},{opacity:1},300,OrgChart.anim.outSin,function(){e||o.inputElement.focus()}))},OrgChart.aiUI.prototype._create=function(){if(!this.element){var e=this,i="inp_"+this.instance.generateId();this.element=document.createElement("div"),this.element.setAttribute("data-boc-ai-form",""),this.element.style.opacity=0,this.element.classList.add("boc-ai-form"),this.element.classList.add(this.instance.config.mode),this.element.innerHTML=`<div class="boc-ai-container">\n <div data-boc-ai-close class="boc-ai-close">${OrgChart.icon.x(20,20,"#aeaeae")}</div>\n <div class="boc-ai-middle boc-ai-start">\n <div data-boc-ai-messages class="boc-ai-messages">\n <img src="https://orgchartjs.balkan.app/logo.svg">&nbsp;\n <span>\n ${OrgChart.aiUI.title}\n </span>\n </div> \n </div>\n <div>\n <div class="boc-input" data-boc-input="">\n <label for="${i}">Message OrgChart</label>\n <input maxlength="256" id="${i}" name="${i}" type="text" value="" autocomplete="off"> \n <div data-boc-ai-send class="boc-ai-send">\n ${OrgChart.icon.send(20,20,"#aeaeae")}\n </div> \n </div>\n \n </div>\n </div>`,this.instance.leftElement.appendChild(this.element),this.instance.leftElement.style.display="block",OrgChart.input.init(this.element);var o=this.instance.leftElement.querySelector("[data-boc-ai-close] svg");o&&o.addEventListener("click",function(i){e.hide()}),this.inputElement=this.element.querySelector("#"+i),this.btnSendElement=this.inputElement.parentNode.querySelector("[data-boc-ai-send]"),this.messagesElement=this.element.querySelector("[data-boc-ai-messages]"),this.inputElement.addEventListener("input",function(e){this.value?this.parentNode.querySelector(".boc-ai-send").classList.add("boc-ai-send-cansend"):this.parentNode.querySelector(".boc-ai-send").classList.remove("boc-ai-send-cansend")}),this.element.querySelector("[data-boc-ai-send]").addEventListener("click",function(i){e.sendUserInput()}),this.inputElement.addEventListener("keyup",function(i){var o=window.event?window.event:i;switch(e.canSetContext||(e.canSetContext=!0,e.instance._ai.setContext()),o.key){case"Enter":e.sendUserInput();break;case"ArrowUp":if((a=OrgChart.aiUI._getSuggestions()).length)-1==(s=a.indexOf(e.inputElement.value))?s=a.length-1:s--,-1==s&&(s=a.length-1),e.inputElement.value=a[s];break;case"ArrowDown":var a,s;if((a=OrgChart.aiUI._getSuggestions()).length)-1==(s=a.indexOf(e.inputElement.value))?s=0:s++,s==a.length&&(s=0),e.inputElement.value=a[s]}})}},OrgChart.aiUI.prototype.addUserMessage=function(e){this.btnSendElement.classList.remove("boc-ai-send-cansend");var i=this.element.querySelector(".boc-ai-start");i&&(i.classList.remove("boc-ai-start"),this.messagesElement.innerHTML="");var o=document.createElement("div");o.classList.add("boc-ai-user-message"),o.innerHTML=`<span class="boc-inner-user-message">${e}</span>`,this.messagesElement.appendChild(o)},OrgChart.aiUI.prototype.hide=function(){this.instance.leftElement.style.display="none",this.element&&(this.element.parentNode.removeChild(this.element),this.element=null)},OrgChart.aiUI.prototype.sendUserInput=function(){var e=this;OrgChart.aiUI._addSuggestion(this.inputElement.value),this.addUserMessage(this.inputElement.value);var i=document.createElement("div");i.classList.add("boc-ai-assistant-message");var o=document.createElement("span");o.classList.add("boc-inner-assistant-message"),i.appendChild(o),this.messagesElement.appendChild(i);var a="";this.instance._ai.prompt(this.inputElement.value,function(i){a+=i,o.innerHTML=marked.parse(a);var s=e.element.querySelector(".boc-ai-middle");s.scrollTo(0,s.scrollHeight)}),this.inputElement.value=""},OrgChart.aiUI._addSuggestion=function(e){e=e.trim();var i=OrgChart.aiUI._getSuggestions(),o=i.indexOf(e);-1!=o&&i.splice(o,1),i.push(e),localStorage.setItem("suggestions",JSON.stringify(i))},OrgChart.aiUI._getSuggestions=function(){var e=localStorage.getItem("suggestions");return e=e?JSON.parse(e):[]},OrgChart.orgScribeUI=function(){this.instance=null,this.element=null,this.textAreaElement=null,this._timeout=null,Object.defineProperty(this,"width",{get(){return this.isVisible()?this.element.offsetWidth:0}})},OrgChart.orgScribeUI.prototype.init=function(e){this.instance=e},OrgChart.events.on("updated",function(e,i){if(e.orgScribeUI.isVisible()){var o=OrgChart._convertFromNodesToText(e.config.nodes,OrgChart.ORGSCRIBE_OFFSET);e.orgScribeUI.textAreaElement.value=o}}),OrgChart.orgScribeUI.prototype.isVisible=function(){return!(!this.element||"none"==this.element.style.display)},OrgChart.orgScribeUI.prototype.show=function(e,i){this.instance.pdfPreviewUI.hide(),this.instance.svgPreviewUI.hide(),this.instance.pngPreviewUI.hide(),this.instance.powerPointPreviewUI.hide(),this.instance.aiUI.hide(),this.instance.orgScribeUI.hide(),this._create(),this.element.style.display="";var o=this;i||(this.timeout&&clearInterval(this.interval),this.interval=OrgChart.animate(this.element,{opacity:0},{opacity:1},300,OrgChart.anim.outSin,function(){if(!e){var i=o.textAreaElement.value.length;o.textAreaElement.focus(),o.textAreaElement.setSelectionRange(i,i)}}))},OrgChart.orgScribeUI.prototype._create=function(){if(!this.element){var e=this;this.element=document.createElement("div"),this.element.setAttribute("data-boc-orgscribe-form",""),this.element.style.opacity=0,this.element.classList.add("boc-orgscribe-form"),this.element.classList.add(this.instance.config.mode);var i=OrgChart._convertFromNodesToText(this.instance.config.nodes,OrgChart.ORGSCRIBE_OFFSET);this.element.innerHTML=`<div class="boc-orgscribe-container">\n <div data-boc-orgscribe-close class="boc-orgscribe-close">${OrgChart.icon.x(20,20,"#aeaeae")}</div> \n <div>\n <textarea wrap="off" class="boc-orgscribe-txt" data-id="boc_orgscribe_txt">${i}</textarea>\n </div>\n </div>`,this.instance.leftElement.appendChild(this.element),this.instance.leftElement.style.display="block";var o=this.instance.leftElement.querySelector("[data-boc-orgscribe-close] svg");o&&o.addEventListener("click",function(i){e.hide()}),this.textAreaElement=this.element.querySelector('[data-id="boc_orgscribe_txt"]'),this.textAreaElement.addEventListener("input",function(){e._timeout&&(clearTimeout(e._timeout),e._timeout=null);var i=this.value;e._timeout=setTimeout(function(){var o=OrgChart._convertTextToNodes(i,OrgChart.ORGSCRIBE_OFFSET);e.instance.load(o)},500)})}},OrgChart.orgScribeUI.prototype.hide=function(){this.element&&(this.element.parentNode.removeChild(this.element),this.element=null)},i=void 0,o=function(e){"use strict";function t(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function n(i){e.defaults=i}e.defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};const i={exec:()=>null};function r(e,i=""){let a="string"==typeof e?e:e.source;const s={replace:(e,i)=>{let l="string"==typeof i?i:i.source;return l=l.replace(o.caret,"$1"),a=a.replace(e,l),s},getRegex:()=>new RegExp(a,i)};return s}const o={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},a=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,s=/(?:[*+-]|\d{1,9}[.)])/,l=r(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,s).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),c=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,d=/(?!\s*\])(?:\\.|[^\[\]\\])+/,h=r(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",d).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),p=r(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,s).getRegex(),u="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",f=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,g=r("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",f).replace("tag",u).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),m=r(c).replace("hr",a).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",u).getRegex(),b={blockquote:r(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",m).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:h,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:a,html:g,lheading:l,list:p,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:m,table:i,text:/^[^\n]+/},x=r("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",a).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",u).getRegex(),v={...b,table:x,paragraph:r(c).replace("hr",a).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",x).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",u).getRegex()},y={...b,html:r("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",f).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:i,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:r(c).replace("hr",a).replace("heading"," *#{1,6} *[^\n]").replace("lheading",l).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},_=/^( {2,}|\\)\n(?!\s*$)/,w=/[\p{P}\p{S}]/u,k=/[\s\p{P}\p{S}]/u,I=/[^\s\p{P}\p{S}]/u,S=r(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,k).getRegex(),C=/(?!~)[\p{P}\p{S}]/u,L=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,A=r(L,"u").replace(/punct/g,w).getRegex(),E=r(L,"u").replace(/punct/g,C).getRegex(),N="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",$=r(N,"gu").replace(/notPunctSpace/g,I).replace(/punctSpace/g,k).replace(/punct/g,w).getRegex(),M=r(N,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,C).getRegex(),T=r("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,I).replace(/punctSpace/g,k).replace(/punct/g,w).getRegex(),P=r(/\\(punct)/,"gu").replace(/punct/g,w).getRegex(),U=r(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),O=r(f).replace("(?:--\x3e|$)","--\x3e").getRegex(),R=r("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",O).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),B=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,F=r(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",B).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),H=r(/^!?\[(label)\]\[(ref)\]/).replace("label",B).replace("ref",d).getRegex(),D=r(/^!?\[(ref)\](?:\[\])?/).replace("ref",d).getRegex(),z={_backpedal:i,anyPunctuation:P,autolink:U,blockSkip:/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,br:_,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:i,emStrongLDelim:A,emStrongRDelimAst:$,emStrongRDelimUnd:T,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:F,nolink:D,punctuation:S,reflink:H,reflinkSearch:r("reflink|nolink(?!\\()","g").replace("reflink",H).replace("nolink",D).getRegex(),tag:R,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:i},j={...z,link:r(/^!?\[(label)\]\((.*?)\)/).replace("label",B).getRegex(),reflink:r(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",B).getRegex()},q={...z,emStrongRDelimAst:M,emStrongLDelim:E,url:r(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},X={...q,br:r(_).replace("{2,}","*").getRegex(),text:r(q.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},G={normal:b,gfm:v,pedantic:y},Z={normal:z,gfm:q,breaks:X,pedantic:j},Q={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},J=e=>Q[e];function K(e,i){if(i){if(o.escapeTest.test(e))return e.replace(o.escapeReplace,J)}else if(o.escapeTestNoEncode.test(e))return e.replace(o.escapeReplaceNoEncode,J);return e}function V(e){try{e=encodeURI(e).replace(o.percentDecode,"%")}catch{return null}return e}function W(e,i){const a=e.replace(o.findPipe,(e,i,o)=>{let a=!1,s=i;for(;--s>=0&&"\\"===o[s];)a=!a;return a?"|":" |"}).split(o.splitPipe);let s=0;if(a[0].trim()||a.shift(),a.length>0&&!a.at(-1)?.trim()&&a.pop(),i)if(a.length>i)a.splice(i);else for(;a.length<i;)a.push("");for(;s<a.length;s++)a[s]=a[s].trim().replace(o.slashPipe,"|");return a}function Y(e,i,o){const a=e.length;if(0===a)return"";let s=0;for(;s<a&&e.charAt(a-s-1)===i;)s++;return e.slice(0,a-s)}function ee(e,i,o,a,s){const l=i.href,c=i.title||null,d=e[1].replace(s.other.outputLinkReplace,"$1");if("!"!==e[0].charAt(0)){a.state.inLink=!0;const e={type:"link",raw:o,href:l,title:c,text:d,tokens:a.inlineTokens(d)};return a.state.inLink=!1,e}return{type:"image",raw:o,href:l,title:c,text:d}}class te{options;rules;lexer;constructor(i){this.options=i||e.defaults}space(e){const i=this.rules.block.newline.exec(e);if(i&&i[0].length>0)return{type:"space",raw:i[0]}}code(e){const i=this.rules.block.code.exec(e);if(i){const e=i[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:i[0],codeBlockStyle:"indented",text:this.options.pedantic?e:Y(e,"\n")}}}fences(e){const i=this.rules.block.fences.exec(e);if(i){const e=i[0],o=function(e,i,o){const a=e.match(o.other.indentCodeCompensation);if(null===a)return i;const s=a[1];return i.split("\n").map(e=>{const i=e.match(o.other.beginningSpace);if(null===i)return e;const[a]=i;return a.length>=s.length?e.slice(s.length):e}).join("\n")}(e,i[3]||"",this.rules);return{type:"code",raw:e,lang:i[2]?i[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):i[2],text:o}}}heading(e){const i=this.rules.block.heading.exec(e);if(i){let e=i[2].trim();if(this.rules.other.endingHash.test(e)){const i=Y(e,"#");this.options.pedantic?e=i.trim():i&&!this.rules.other.endingSpaceChar.test(i)||(e=i.trim())}return{type:"heading",raw:i[0],depth:i[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const i=this.rules.block.hr.exec(e);if(i)return{type:"hr",raw:Y(i[0],"\n")}}blockquote(e){const i=this.rules.block.blockquote.exec(e);if(i){let e=Y(i[0],"\n").split("\n"),o="",a="";const s=[];for(;e.length>0;){let i=!1;const l=[];let c;for(c=0;c<e.length;c++)if(this.rules.other.blockquoteStart.test(e[c]))l.push(e[c]),i=!0;else{if(i)break;l.push(e[c])}e=e.slice(c);const d=l.join("\n"),h=d.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");o=o?`${o}\n${d}`:d,a=a?`${a}\n${h}`:h;const p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(h,s,!0),this.lexer.state.top=p,0===e.length)break;const u=s.at(-1);if("code"===u?.type)break;if("blockquote"===u?.type){const i=u,l=i.raw+"\n"+e.join("\n"),c=this.blockquote(l);s[s.length-1]=c,o=o.substring(0,o.length-i.raw.length)+c.raw,a=a.substring(0,a.length-i.text.length)+c.text;break}if("list"!==u?.type);else{const i=u,l=i.raw+"\n"+e.join("\n"),c=this.list(l);s[s.length-1]=c,o=o.substring(0,o.length-u.raw.length)+c.raw,a=a.substring(0,a.length-i.raw.length)+c.raw,e=l.substring(s.at(-1).raw.length).split("\n")}}return{type:"blockquote",raw:o,tokens:s,text:a}}}list(e){let i=this.rules.block.list.exec(e);if(i){let o=i[1].trim();const a=o.length>1,s={type:"list",raw:"",ordered:a,start:a?+o.slice(0,-1):"",loose:!1,items:[]};o=a?`\\d{1,9}\\${o.slice(-1)}`:`\\${o}`,this.options.pedantic&&(o=a?o:"[*+-]");const l=this.rules.other.listItemRegex(o);let c=!1;for(;e;){let o=!1,a="",d="";if(!(i=l.exec(e)))break;if(this.rules.block.hr.test(e))break;a=i[0],e=e.substring(a.length);let h=i[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,e=>" ".repeat(3*e.length)),p=e.split("\n",1)[0],u=!h.trim(),f=0;if(this.options.pedantic?(f=2,d=h.trimStart()):u?f=i[1].length+1:(f=i[2].search(this.rules.other.nonSpaceChar),f=f>4?1:f,d=h.slice(f),f+=i[1].length),u&&this.rules.other.blankLine.test(p)&&(a+=p+"\n",e=e.substring(p.length+1),o=!0),!o){const i=this.rules.other.nextBulletRegex(f),o=this.rules.other.hrRegex(f),s=this.rules.other.fencesBeginRegex(f),l=this.rules.other.headingBeginRegex(f),c=this.rules.other.htmlBeginRegex(f);for(;e;){const g=e.split("\n",1)[0];let m;if(p=g,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),m=p):m=p.replace(this.rules.other.tabCharGlobal," "),s.test(p))break;if(l.test(p))break;if(c.test(p))break;if(i.test(p))break;if(o.test(p))break;if(m.search(this.rules.other.nonSpaceChar)>=f||!p.trim())d+="\n"+m.slice(f);else{if(u)break;if(h.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4)break;if(s.test(h))break;if(l.test(h))break;if(o.test(h))break;d+="\n"+p}u||p.trim()||(u=!0),a+=g+"\n",e=e.substring(g.length+1),h=m.slice(f)}}s.loose||(c?s.loose=!0:this.rules.other.doubleBlankLine.test(a)&&(c=!0));let g,m=null;this.options.gfm&&(m=this.rules.other.listIsTask.exec(d),m&&(g="[ ] "!==m[0],d=d.replace(this.rules.other.listReplaceTask,""))),s.items.push({type:"list_item",raw:a,task:!!m,checked:g,loose:!1,text:d,tokens:[]}),s.raw+=a}const d=s.items.at(-1);if(!d)return;d.raw=d.raw.trimEnd(),d.text=d.text.trimEnd(),s.raw=s.raw.trimEnd();for(let e=0;e<s.items.length;e++)if(this.lexer.state.top=!1,s.items[e].tokens=this.lexer.blockTokens(s.items[e].text,[]),!s.loose){const i=s.items[e].tokens.filter(e=>"space"===e.type);s.loose=i.length>0&&i.some(e=>this.rules.other.anyLine.test(e.raw))}if(s.loose)for(let e=0;e<s.items.length;e++)s.items[e].loose=!0;return s}}html(e){const i=this.rules.block.html.exec(e);if(i)return{type:"html",block:!0,raw:i[0],pre:"pre"===i[1]||"script"===i[1]||"style"===i[1],text:i[0]}}def(e){const i=this.rules.block.def.exec(e);if(i){const e=i[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),o=i[2]?i[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=i[3]?i[3].substring(1,i[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):i[3];return{type:"def",tag:e,raw:i[0],href:o,title:a}}}table(e){const i=this.rules.block.table.exec(e);if(!i)return;if(!this.rules.other.tableDelimiter.test(i[2]))return;const o=W(i[1]),a=i[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=i[3]?.trim()?i[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],l={type:"table",raw:i[0],header:[],align:[],rows:[]};if(o.length===a.length){for(const e of a)this.rules.other.tableAlignRight.test(e)?l.align.push("right"):this.rules.other.tableAlignCenter.test(e)?l.align.push("center"):this.rules.other.tableAlignLeft.test(e)?l.align.push("left"):l.align.push(null);for(let e=0;e<o.length;e++)l.header.push({text:o[e],tokens:this.lexer.inline(o[e]),header:!0,align:l.align[e]});for(const e of s)l.rows.push(W(e,l.header.length).map((e,i)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:l.align[i]})));return l}}lheading(e){const i=this.rules.block.lheading.exec(e);if(i)return{type:"heading",raw:i[0],depth:"="===i[2].charAt(0)?1:2,text:i[1],tokens:this.lexer.inline(i[1])}}paragraph(e){const i=this.rules.block.paragraph.exec(e);if(i){const e="\n"===i[1].charAt(i[1].length-1)?i[1].slice(0,-1):i[1];return{type:"paragraph",raw:i[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const i=this.rules.block.text.exec(e);if(i)return{type:"text",raw:i[0],text:i[0],tokens:this.lexer.inline(i[0])}}escape(e){const i=this.rules.inline.escape.exec(e);if(i)return{type:"escape",raw:i[0],text:i[1]}}tag(e){const i=this.rules.inline.tag.exec(e);if(i)return!this.lexer.state.inLink&&this.rules.other.startATag.test(i[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(i[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(i[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(i[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:i[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:i[0]}}link(e){const i=this.rules.inline.link.exec(e);if(i){const e=i[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;const i=Y(e.slice(0,-1),"\\");if((e.length-i.length)%2==0)return}else{const e=function(e,i){if(-1===e.indexOf(i[1]))return-1;let o=0;for(let a=0;a<e.length;a++)if("\\"===e[a])a++;else if(e[a]===i[0])o++;else if(e[a]===i[1]&&(o--,o<0))return a;return-1}(i[2],"()");if(e>-1){const o=(0===i[0].indexOf("!")?5:4)+i[1].length+e;i[2]=i[2].substring(0,e),i[0]=i[0].substring(0,o).trim(),i[3]=""}}let o=i[2],a="";if(this.options.pedantic){const e=this.rules.other.pedanticHrefTitle.exec(o);e&&(o=e[1],a=e[3])}else a=i[3]?i[3].slice(1,-1):"";return o=o.trim(),this.rules.other.startAngleBracket.test(o)&&(o=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?o.slice(1):o.slice(1,-1)),ee(i,{href:o?o.replace(this.rules.inline.anyPunctuation,"$1"):o,title:a?a.replace(this.rules.inline.anyPunctuation,"$1"):a},i[0],this.lexer,this.rules)}}reflink(e,i){let o;if((o=this.rules.inline.reflink.exec(e))||(o=this.rules.inline.nolink.exec(e))){const e=i[(o[2]||o[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!e){const e=o[0].charAt(0);return{type:"text",raw:e,text:e}}return ee(o,e,o[0],this.lexer,this.rules)}}emStrong(e,i,o=""){let a=this.rules.inline.emStrongLDelim.exec(e);if(a&&(!a[3]||!o.match(this.rules.other.unicodeAlphaNumeric))&&(!a[1]&&!a[2]||!o||this.rules.inline.punctuation.exec(o))){const o=[...a[0]].length-1;let s,l,c=o,d=0;const h="*"===a[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,i=i.slice(-1*e.length+o);null!=(a=h.exec(i));){if(s=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!s)continue;if(l=[...s].length,a[3]||a[4]){c+=l;continue}if((a[5]||a[6])&&o%3&&!((o+l)%3)){d+=l;continue}if(c-=l,c>0)continue;l=Math.min(l,l+c+d);const i=[...a[0]][0].length,h=e.slice(0,o+a.index+i+l);if(Math.min(o,l)%2){const e=h.slice(1,-1);return{type:"em",raw:h,text:e,tokens:this.lexer.inlineTokens(e)}}const p=h.slice(2,-2);return{type:"strong",raw:h,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(e){const i=this.rules.inline.code.exec(e);if(i){let e=i[2].replace(this.rules.other.newLineCharGlobal," ");const o=this.rules.other.nonSpaceChar.test(e),a=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return o&&a&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:i[0],text:e}}}br(e){const i=this.rules.inline.br.exec(e);if(i)return{type:"br",raw:i[0]}}del(e){const i=this.rules.inline.del.exec(e);if(i)return{type:"del",raw:i[0],text:i[2],tokens:this.lexer.inlineTokens(i[2])}}autolink(e){const i=this.rules.inline.autolink.exec(e);if(i){let e,o;return"@"===i[2]?(e=i[1],o="mailto:"+e):(e=i[1],o=e),{type:"link",raw:i[0],text:e,href:o,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let i;if(i=this.rules.inline.url.exec(e)){let e,o;if("@"===i[2])e=i[0],o="mailto:"+e;else{let a;do{a=i[0],i[0]=this.rules.inline._backpedal.exec(i[0])?.[0]??""}while(a!==i[0]);e=i[0],o="www."===i[1]?"http://"+i[0]:i[0]}return{type:"link",raw:i[0],text:e,href:o,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const i=this.rules.inline.text.exec(e);if(i){const e=this.lexer.state.inRawBlock;return{type:"text",raw:i[0],text:i[0],escaped:e}}}}class ne{tokens;options;state;tokenizer;inlineQueue;constructor(i){this.tokens=[],this.tokens.links=Object.create(null),this.options=i||e.defaults,this.options.tokenizer=this.options.tokenizer||new te,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const a={other:o,block:G.normal,inline:Z.normal};this.options.pedantic?(a.block=G.pedantic,a.inline=Z.pedantic):this.options.gfm&&(a.block=G.gfm,this.options.breaks?a.inline=Z.breaks:a.inline=Z.gfm),this.tokenizer.rules=a}static get rules(){return{block:G,inline:Z}}static lex(e,i){return new ne(i).lex(e)}static lexInline(e,i){return new ne(i).inlineTokens(e)}lex(e){e=e.replace(o.carriageReturn,"\n"),this.blockTokens(e,this.tokens);for(let i=0;i<this.inlineQueue.length;i++){const e=this.inlineQueue[i];this.inlineTokens(e.src,e.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,i=[],a=!1){for(this.options.pedantic&&(e=e.replace(o.tabCharGlobal," ").replace(o.spaceLine,""));e;){let o;if(this.options.extensions?.block?.some(a=>!!(o=a.call({lexer:this},e,i))&&(e=e.substring(o.raw.length),i.push(o),!0)))continue;if(o=this.tokenizer.space(e)){e=e.substring(o.raw.length);const a=i.at(-1);1===o.raw.length&&void 0!==a?a.raw+="\n":i.push(o);continue}if(o=this.tokenizer.code(e)){e=e.substring(o.raw.length);const a=i.at(-1);"paragraph"===a?.type||"text"===a?.type?(a.raw+="\n"+o.raw,a.text+="\n"+o.text,this.inlineQueue.at(-1).src=a.text):i.push(o);continue}if(o=this.tokenizer.fences(e)){e=e.substring(o.raw.length),i.push(o);continue}if(o=this.tokenizer.heading(e)){e=e.substring(o.raw.length),i.push(o);continue}if(o=this.tokenizer.hr(e)){e=e.substring(o.raw.length),i.push(o);continue}if(o=this.tokenizer.blockquote(e)){e=e.substring(o.raw.length),i.push(o);continue}if(o=this.tokenizer.list(e)){e=e.substring(o.raw.length),i.push(o);continue}if(o=this.tokenizer.html(e)){e=e.substring(o.raw.length),i.push(o);continue}if(o=this.tokenizer.def(e)){e=e.substring(o.raw.length);const a=i.at(-1);"paragraph"===a?.type||"text"===a?.type?(a.raw+="\n"+o.raw,a.text+="\n"+o.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title});continue}if(o=this.tokenizer.table(e)){e=e.substring(o.raw.length),i.push(o);continue}if(o=this.tokenizer.lheading(e)){e=e.substring(o.raw.length),i.push(o);continue}let s=e;if(this.options.extensions?.startBlock){let i=1/0;const o=e.slice(1);let a;this.options.extensions.startBlock.forEach(e=>{a=e.call({lexer:this},o),"number"==typeof a&&a>=0&&(i=Math.min(i,a))}),i<1/0&&i>=0&&(s=e.substring(0,i+1))}if(this.state.top&&(o=this.tokenizer.paragraph(s))){const l=i.at(-1);a&&"paragraph"===l?.type?(l.raw+="\n"+o.raw,l.text+="\n"+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):i.push(o),a=s.length!==e.length,e=e.substring(o.raw.length)}else if(o=this.tokenizer.text(e)){e=e.substring(o.raw.length);const a=i.at(-1);"text"===a?.type?(a.raw+="\n"+o.raw,a.text+="\n"+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):i.push(o)}else if(e){const i="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(i);break}throw new Error(i)}}return this.state.top=!0,i}inline(e,i=[]){return this.inlineQueue.push({src:e,tokens:i}),i}inlineTokens(e,i=[]){let o=e,a=null;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(a=this.tokenizer.rules.inline.reflinkSearch.exec(o));)e.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(o=o.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(a=this.tokenizer.rules.inline.blockSkip.exec(o));)o=o.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(a=this.tokenizer.rules.inline.anyPunctuation.exec(o));)o=o.slice(0,a.index)+"++"+o.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let s=!1,l="";for(;e;){let a;if(s||(l=""),s=!1,this.options.extensions?.inline?.some(o=>!!(a=o.call({lexer:this},e,i))&&(e=e.substring(a.raw.length),i.push(a),!0)))continue;if(a=this.tokenizer.escape(e)){e=e.substring(a.raw.length),i.push(a);continue}if(a=this.tokenizer.tag(e)){e=e.substring(a.raw.length),i.push(a);continue}if(a=this.tokenizer.link(e)){e=e.substring(a.raw.length),i.push(a);continue}if(a=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(a.raw.length);const o=i.at(-1);"text"===a.type&&"text"===o?.type?(o.raw+=a.raw,o.text+=a.text):i.push(a);continue}if(a=this.tokenizer.emStrong(e,o,l)){e=e.substring(a.raw.length),i.push(a);continue}if(a=this.tokenizer.codespan(e)){e=e.substring(a.raw.length),i.push(a);continue}if(a=this.tokenizer.br(e)){e=e.substring(a.raw.length),i.push(a);continue}if(a=this.tokenizer.del(e)){e=e.substring(a.raw.length),i.push(a);continue}if(a=this.tokenizer.autolink(e)){e=e.substring(a.raw.length),i.push(a);continue}if(!this.state.inLink&&(a=this.tokenizer.url(e))){e=e.substring(a.raw.length),i.push(a);continue}let c=e;if(this.options.extensions?.startInline){let i=1/0;const o=e.slice(1);let a;this.options.extensions.startInline.forEach(e=>{a=e.call({lexer:this},o),"number"==typeof a&&a>=0&&(i=Math.min(i,a))}),i<1/0&&i>=0&&(c=e.substring(0,i+1))}if(a=this.tokenizer.inlineText(c)){e=e.substring(a.raw.length),"_"!==a.raw.slice(-1)&&(l=a.raw.slice(-1)),s=!0;const o=i.at(-1);"text"===o?.type?(o.raw+=a.raw,o.text+=a.text):i.push(a)}else if(e){const i="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(i);break}throw new Error(i)}}return i}}class se{options;parser;constructor(i){this.options=i||e.defaults}space(e){return""}code({text:e,lang:i,escaped:a}){const s=(i||"").match(o.notSpaceStart)?.[0],l=e.replace(o.endingNewline,"")+"\n";return s?'<pre><code class="language-'+K(s)+'">'+(a?l:K(l,!0))+"</code></pre>\n":"<pre><code>"+(a?l:K(l,!0))+"</code></pre>\n"}blockquote({tokens:e}){return`<blockquote>\n${this.parser.parse(e)}</blockquote>\n`}html({text:e}){return e}heading({tokens:e,depth:i}){return`<h${i}>${this.parser.parseInline(e)}</h${i}>\n`}hr(e){return"<hr>\n"}list(e){const i=e.ordered,o=e.start;let a="";for(let l=0;l<e.items.length;l++){const i=e.items[l];a+=this.listitem(i)}const s=i?"ol":"ul";return"<"+s+(i&&1!==o?' start="'+o+'"':"")+">\n"+a+"</"+s+">\n"}listitem(e){let i="";if(e.task){const o=this.checkbox({checked:!!e.checked});e.loose?"paragraph"===e.tokens[0]?.type?(e.tokens[0].text=o+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=o+" "+K(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:o+" ",text:o+" ",escaped:!0}):i+=o+" "}return i+=this.parser.parse(e.tokens,!!e.loose),`<li>${i}</li>\n`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>\n`}table(e){let i="",o="";for(let s=0;s<e.header.length;s++)o+=this.tablecell(e.header[s]);i+=this.tablerow({text:o});let a="";for(let s=0;s<e.rows.length;s++){const i=e.rows[s];o="";for(let e=0;e<i.length;e++)o+=this.tablecell(i[e]);a+=this.tablerow({text:o})}return a&&(a=`<tbody>${a}</tbody>`),"<table>\n<thead>\n"+i+"</thead>\n"+a+"</table>\n"}tablerow({text:e}){return`<tr>\n${e}</tr>\n`}tablecell(e){const i=this.parser.parseInline(e.tokens),o=e.header?"th":"td";return(e.align?`<${o} align="${e.align}">`:`<${o}>`)+i+`</${o}>\n`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${K(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:i,tokens:o}){const a=this.parser.parseInline(o),s=V(e);if(null===s)return a;let l='<a href="'+(e=s)+'"';return i&&(l+=' title="'+K(i)+'"'),l+=">"+a+"</a>",l}image({href:e,title:i,text:o}){const a=V(e);if(null===a)return K(o);let s=`<img src="${e=a}" alt="${o}"`;return i&&(s+=` title="${K(i)}"`),s+=">",s}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:K(e.text)}}class re{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}}class ie{options;renderer;textRenderer;constructor(i){this.options=i||e.defaults,this.options.renderer=this.options.renderer||new se,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new re}static parse(e,i){return new ie(i).parse(e)}static parseInline(e,i){return new ie(i).parseInline(e)}parse(e,i=!0){let o="";for(let a=0;a<e.length;a++){const s=e[a];if(this.options.extensions?.renderers?.[s.type]){const e=s,i=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==i||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(e.type)){o+=i||"";continue}}const l=s;switch(l.type){case"space":o+=this.renderer.space(l);continue;case"hr":o+=this.renderer.hr(l);continue;case"heading":o+=this.renderer.heading(l);continue;case"code":o+=this.renderer.code(l);continue;case"table":o+=this.renderer.table(l);continue;case"blockquote":o+=this.renderer.blockquote(l);continue;case"list":o+=this.renderer.list(l);continue;case"html":o+=this.renderer.html(l);continue;case"paragraph":o+=this.renderer.paragraph(l);continue;case"text":{let s=l,c=this.renderer.text(s);for(;a+1<e.length&&"text"===e[a+1].type;)s=e[++a],c+="\n"+this.renderer.text(s);o+=i?this.renderer.paragraph({type:"paragraph",raw:c,text:c,tokens:[{type:"text",raw:c,text:c,escaped:!0}]}):c;continue}default:{const e='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return o}parseInline(e,i=this.renderer){let o="";for(let a=0;a<e.length;a++){const s=e[a];if(this.options.extensions?.renderers?.[s.type]){const e=this.options.extensions.renderers[s.type].call({parser:this},s);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){o+=e||"";continue}}const l=s;switch(l.type){case"escape":case"text":o+=i.text(l);break;case"html":o+=i.html(l);break;case"link":o+=i.link(l);break;case"image":o+=i.image(l);break;case"strong":o+=i.strong(l);break;case"em":o+=i.em(l);break;case"codespan":o+=i.codespan(l);break;case"br":o+=i.br(l);break;case"del":o+=i.del(l);break;default:{const e='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return o}}class le{options;block;constructor(i){this.options=i||e.defaults}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?ne.lex:ne.lexInline}provideParser(){return this.block?ie.parse:ie.parseInline}}class oe{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=ie;Renderer=se;TextRenderer=re;Lexer=ne;Tokenizer=te;Hooks=le;constructor(...e){this.use(...e)}walkTokens(e,i){let o=[];for(const a of e)switch(o=o.concat(i.call(this,a)),a.type){case"table":{const e=a;for(const a of e.header)o=o.concat(this.walkTokens(a.tokens,i));for(const a of e.rows)for(const e of a)o=o.concat(this.walkTokens(e.tokens,i));break}case"list":{const e=a;o=o.concat(this.walkTokens(e.items,i));break}default:{const e=a;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(a=>{const s=e[a].flat(1/0);o=o.concat(this.walkTokens(s,i))}):e.tokens&&(o=o.concat(this.walkTokens(e.tokens,i)))}}return o}use(...e){const i=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{const o={...e};if(o.async=this.defaults.async||o.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){const o=i.renderers[e.name];i.renderers[e.name]=o?function(...i){let a=e.renderer.apply(this,i);return!1===a&&(a=o.apply(this,i)),a}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");const o=i[e.level];o?o.unshift(e.tokenizer):i[e.level]=[e.tokenizer],e.start&&("block"===e.level?i.startBlock?i.startBlock.push(e.start):i.startBlock=[e.start]:"inline"===e.level&&(i.startInline?i.startInline.push(e.start):i.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(i.childTokens[e.name]=e.childTokens)}),o.extensions=i),e.renderer){const i=this.defaults.renderer||new se(this.defaults);for(const o in e.renderer){if(!(o in i))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;const a=o,s=e.renderer[a],l=i[a];i[a]=(...e)=>{let o=s.apply(i,e);return!1===o&&(o=l.apply(i,e)),o||""}}o.renderer=i}if(e.tokenizer){const i=this.defaults.tokenizer||new te(this.defaults);for(const o in e.tokenizer){if(!(o in i))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;const a=o,s=e.tokenizer[a],l=i[a];i[a]=(...e)=>{let o=s.apply(i,e);return!1===o&&(o=l.apply(i,e)),o}}o.tokenizer=i}if(e.hooks){const i=this.defaults.hooks||new le;for(const o in e.hooks){if(!(o in i))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;const a=o,s=e.hooks[a],l=i[a];le.passThroughHooks.has(o)?i[a]=e=>{if(this.defaults.async)return Promise.resolve(s.call(i,e)).then(e=>l.call(i,e));const o=s.call(i,e);return l.call(i,o)}:i[a]=(...e)=>{let o=s.apply(i,e);return!1===o&&(o=l.apply(i,e)),o}}o.hooks=i}if(e.walkTokens){const i=this.defaults.walkTokens,a=e.walkTokens;o.walkTokens=function(e){let o=[];return o.push(a.call(this,e)),i&&(o=o.concat(i.call(this,e))),o}}this.defaults={...this.defaults,...o}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,i){return ne.lex(e,i??this.defaults)}parser(e,i){return ie.parse(e,i??this.defaults)}parseMarkdown(e){return(i,o)=>{const a={...o},s={...this.defaults,...a},l=this.onError(!!s.silent,!!s.async);if(!0===this.defaults.async&&!1===a.async)return l(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(null==i)return l(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof i)return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(i)+", string expected"));s.hooks&&(s.hooks.options=s,s.hooks.block=e);const c=s.hooks?s.hooks.provideLexer():e?ne.lex:ne.lexInline,d=s.hooks?s.hooks.provideParser():e?ie.parse:ie.parseInline;if(s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(i):i).then(e=>c(e,s)).then(e=>s.hooks?s.hooks.processAllTokens(e):e).then(e=>s.walkTokens?Promise.all(this.walkTokens(e,s.walkTokens)).then(()=>e):e).then(e=>d(e,s)).then(e=>s.hooks?s.hooks.postprocess(e):e).catch(l);try{s.hooks&&(i=s.hooks.preprocess(i));let e=c(i,s);s.hooks&&(e=s.hooks.processAllTokens(e)),s.walkTokens&&this.walkTokens(e,s.walkTokens);let o=d(e,s);return s.hooks&&(o=s.hooks.postprocess(o)),o}catch(e){return l(e)}}}onError(e,i){return o=>{if(o.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="<p>An error occurred:</p><pre>"+K(o.message+"",!0)+"</pre>";return i?Promise.resolve(e):e}if(i)return Promise.reject(o);throw o}}}const ae=new oe;function ce(e,i){return ae.parse(e,i)}ce.options=ce.setOptions=function(e){return ae.setOptions(e),ce.defaults=ae.defaults,n(ce.defaults),ce},ce.getDefaults=t,ce.defaults=e.defaults,ce.use=function(...e){return ae.use(...e),ce.defaults=ae.defaults,n(ce.defaults),ce},ce.walkTokens=function(e,i){return ae.walkTokens(e,i)},ce.parseInline=ae.parseInline,ce.Parser=ie,ce.parser=ie.parse,ce.Renderer=se,ce.TextRenderer=re,ce.Lexer=ne,ce.lexer=ne.lex,ce.Tokenizer=te,ce.Hooks=le,ce.parse=ce;const de=ce.options,he=ce.setOptions,pe=ce.use,ue=ce.walkTokens,fe=ce.parseInline,ge=ce,me=ie.parse,be=ne.lex;e.Hooks=le,e.Lexer=ne,e.Marked=oe,e.Parser=ie,e.Renderer=se,e.TextRenderer=re,e.Tokenizer=te,e.getDefaults=t,e.lexer=be,e.marked=ce,e.options=de,e.parse=ge,e.parseInline=fe,e.parser=me,e.setOptions=he,e.use=pe,e.walkTokens=ue},"object"==typeof exports&&"undefined"!=typeof module?o(exports):"function"==typeof define&&define.amd?define(["exports"],o):o((i="undefined"!=typeof globalThis?globalThis:i||self).marked={}),OrgChart.events.on("renderbuttons",function(e,i){if(i.node&&i.node.tags&&i.node.tags.has("group-dotted-lines")){var o=e.getScale(),a=OrgChart.t(i.node.templateName,i.node.min,o),s="";i.node.min?(a.nodeGroupDottedOpenButton||console.error(`[${i.node.templateName}].nodeGroupDottedOpenButton is not defined`),s+=`<g style="cursor:pointer;" data-ctrl-n-dotted-open="${i.node.id}" transform="matrix(1,0,0,1,${i.node.x},${i.node.y})">`,s+=a.nodeGroupDottedOpenButton):(a.nodeGroupDottedCloseButton||console.error(`[${i.node.templateName}].nodeGroupDottedCloseButton is not defined`),s+=`<g style="cursor:pointer;" transform="matrix(1,0,0,1,${i.node.x},${i.node.y})" data-ctrl-n-dotted-close="${i.node.id}">`,s+=a.nodeGroupDottedCloseButton),s=(s+="</g>").replaceAll("{cw}",i.node.w/2).replaceAll("{ch}",i.node.h/2).replaceAll("{ew}",i.node.w-(i.node.padding?i.node.padding[1]:0)).replaceAll("{eh}",i.node.h-(i.node.padding?i.node.padding[2]:0));var l=e.getNode(i.node.stChildrenIds[0]);-1!=s.indexOf("{collapsed-children-count}")&&(s=s.replace("{collapsed-children-count}",l.collapsedChildCount)),-1!=s.indexOf("{collapsed-children-total-count}")&&(s=s.replace("{collapsed-children-total-count}",l.deepCollapsedChildCount)),-1!=s.indexOf("{children-count}")&&(s=s.replace("{children-count}",l.childCount)),-1!=s.indexOf("{children-total-count}")&&(s=s.replace("{children-total-count}",l.deepChildCount)),i.html+=s}}),OrgChart.events.on("redraw",function(e,i){var o=null;if(e.manager.action==OrgChart.action.centerNode&&(o=e.manager.actionParams.id),null!=o){var a=e.getNode(o);if(a.isTreeListItem){var s=OrgChart._getCenterNodeFromParams(e.manager.nodes,e.manager.actionParams),l=s.stChildren[0].lcn?s.stChildren[0].lcn:"base",c=e.manager.layoutConfigs[l],d=OrgChart._getScrollTopForNode(s,a.id),h=s.treeList.scrollTop;d!=h&&(e._treeListUpdateInterval=OrgChart.animate(null,{},{},400,OrgChart.anim.inOutPow,function(){},function(i){s.treeList.scrollTop=i*(d-h)+h,e._treeListUpdate(s,c.orientation)}))}}}),OrgChart.prototype.__mouseScrollHandlerTreeList=function(e,i){var o=i.delta||i.wheelDelta;for(void 0===o&&(o=-i.detail),o=Math.max(-1,Math.min(1,o));e&&!e.stParent;)e=e.parent;e=e.stParent;var a=OrgChart.TREELIST_WHEEL_STEP;"auto"==a&&(a=e.stChildren[0].h/2),e.treeList.scrollTop+=-o*a;var s=e.stChildren[0].lcn?e.stChildren[0].lcn:"base",l=this.manager.layoutConfigs[s];this._treeListUpdateInterval&&(clearInterval(this._treeListUpdateInterval),this._treeListUpdateInterval=null),"none"==OrgChart._treeListGetTumbPositionFromScrollTop(e).scrollBarDisplay||(i.preventDefault(),this._treeListUpdate(e,l.orientation))},OrgChart.prototype._treeListUpdate=function(e,i){OrgChart._treeListSetProps(e,i),OrgChart._treeListAdjustToSTNodePostition(e.stChildren,e);var o=this.getScale(),a=this.element.querySelector(`[data-treelist-content="${e.id}"]`),s=a.transform.baseVal.consolidate().matrix;for(var l of(s.f=-e.treeList.scrollTop,this._treeListIterate2(e.stChildren,e,o,a),e.treeList.pinnedIds)){var c=this.getNode(l);this._treeListSetPositions(c,o,a,!0)}var d=this.element.querySelector(`[data-treelist-thumb="${e.id}"]`),h=this.element.querySelector(`[data-treelist-scroll="${e.id}"]`),{thumbHeight:p,thumbPosition:u,scrollBarDisplay:f}=OrgChart._treeListGetTumbPositionFromScrollTop(e);d.style.display=f,h.style.display=f,d.setAttributeNS(null,"height",p),d.setAttributeNS(null,"y",+u)},OrgChart.prototype._treeListIterate2=function(e,i,o,a){for(var s of e)i.treeList.pinnedIds.includes(s.id)||this._treeListSetPositions(s,o,a,!1),this._treeListIterate2(s.children,i,o,a)},OrgChart.prototype._treeListSetPositions=function(e,i,o,a){var s=this.getNodeElement(e.id);if(s){var l=s.transform.baseVal.consolidate().matrix;s.classList.remove("treelist-pinned"),a&&(s.classList.add("treelist-pinned"),o.appendChild(s)),l.f=e.y,l.e=e.x;var c=this.element.querySelector(`[data-ctrl-ec-id="${e.id}"]`);if(c)c.transform.baseVal.consolidate().matrix.f=e.y,o.appendChild(c)}},OrgChart.prototype._treeListThumbMouseDownHandler=function(e,i,o){var a=e.getAttribute("data-treelist-thumb"),s=this.getNode(a),l=this.getSvg(),c=this,d=!0,h=OrgChart._getClientXY(i),p=this.getScale(),u=parseFloat(e.getAttribute("y")),f=parseFloat(e.getAttribute("height")),moveHandler=function(e){if(d){thumbPosition=u+(OrgChart._getClientXY(e).y-h.y)/p;var i=OrgChart._treeListGetScrollTopFromTumbPosition(s,f,thumbPosition);s.treeList.scrollTop=i,c._treeListUpdateInterval&&(clearInterval(c._treeListUpdateInterval),c._treeListUpdateInterval=null),c._treeListUpdate(s)}},leaveHandler=function(e){d=!1,l.removeEventListener(o.move,moveHandler),l.removeEventListener(o.up,leaveHandler)};l.addEventListener(o.move,moveHandler),l.addEventListener(o.up,leaveHandler)},OrgChart.prototype._treeListExpandCollapseHandler=function(e){var i=this.getNode(e);if(i&&i.isTreeListItem){var o=OrgChart.getRootOf(i).stParent;if(o.treeList.pinnedIds.includes(e)){var a=OrgChart._getScrollTopForNode(o,i.id);o.treeList.scrollTop=a,this._treeListUpdate(o)}}},void 0===OrgChart&&(OrgChart={}),OrgChart.prototype.undo=function(e){if(this.config.undoRedoStorageName){var i=this.undoStepsCount();if(0!=i){this._putInRedoStack();var o=`${this.config.undoRedoStorageName}_undo_`+(i-1),a=sessionStorage.getItem(o);sessionStorage.removeItem(o);var s=JSON.parse(a);this.config.nodes=s.nodes,this.config.clinks=s.clinks,this.config.slinks=s.slinks,this.config.groupDottedLines=s.groupDottedLines,this.config.dottedLines=s.dottedLines,this._ai.setContext(),OrgChart.events.publish("updated",[this]),this.filterUI.update(),this.draw(OrgChart.action.update,void 0,e),this.undoRedoUI.refresh()}}},OrgChart.prototype.redo=function(e){if(this.config.undoRedoStorageName){var i=this.redoStepsCount();if(0!=i){this._putInUndoStack();var o=`${this.config.undoRedoStorageName}_redo_`+(i-1),a=sessionStorage.getItem(o);sessionStorage.removeItem(o);var s=JSON.parse(a);this.config.nodes=s.nodes,this.config.clinks=s.clinks,this.config.slinks=s.slinks,this.config.groupDottedLines=s.groupDottedLines,this.config.dottedLines=s.dottedLines,this._ai.setContext(),OrgChart.events.publish("updated",[this]),this.filterUI.update(),this.draw(OrgChart.action.update,void 0,e),this.undoRedoUI.refresh()}}},OrgChart.prototype.clearRedo=function(){if(this.config.undoRedoStorageName){for(var e=`${this.config.undoRedoStorageName}_redo_`,i=Object.keys(sessionStorage),o=0;-1!=i.indexOf(e+o);)sessionStorage.removeItem(e+o),o++;this.undoRedoUI.refresh()}},OrgChart.prototype.clearUndo=function(){if(this.config.undoRedoStorageName){for(var e=`${this.config.undoRedoStorageName}_undo_`,i=Object.keys(sessionStorage),o=0;-1!=i.indexOf(e+o);)sessionStorage.removeItem(e+o),o++;this.undoRedoUI.refresh()}},OrgChart.prototype.undoStepsCount=function(){for(var e=`${this.config.undoRedoStorageName}_undo_`,i=Object.keys(sessionStorage),o=0;-1!=i.indexOf(e+o);)o++;return o},OrgChart.prototype.redoStepsCount=function(){for(var e=`${this.config.undoRedoStorageName}_redo_`,i=Object.keys(sessionStorage),o=0;-1!=i.indexOf(e+o);)o++;return o},OrgChart.prototype._putInUndoStack=function(){if(this.config.undoRedoStorageName){var e=`${this.config.undoRedoStorageName}_undo_`+this.undoStepsCount();sessionStorage.setItem(e,JSON.stringify({nodes:this.config.nodes,clinks:this.config.clinks,slinks:this.config.slinks,groupDottedLines:this.config.groupDottedLines,dottedLines:this.config.dottedLines}))}},OrgChart.prototype._putInRedoStack=function(){if(this.config.undoRedoStorageName){var e=`${this.config.undoRedoStorageName}_redo_`+this.redoStepsCount();sessionStorage.setItem(e,JSON.stringify({nodes:this.config.nodes,clinks:this.config.clinks,slinks:this.config.slinks,groupDottedLines:this.config.groupDottedLines,dottedLines:this.config.dottedLines}))}},void 0===OrgChart&&(OrgChart={}),OrgChart.undoRedoUI=function(){this.instance=null,this._event_id=OrgChart._guid()},OrgChart.undoRedoUI.prototype.init=function(e){e.config.undoRedoStorageName&&(this.instance=e,this.refresh())},OrgChart.undoRedoUI.prototype.refresh=function(){var e=this;if(this.instance.config.undoRedoStorageName){var i={undoStepsCount:this.instance.undoStepsCount(),redoStepsCount:this.instance.redoStepsCount()};if(!1!==OrgChart.events.publish("change",[this,i])){var o=this.instance.element.querySelector("[data-undo]"),a=this.instance.element.querySelector("[data-redo]");if(!o||!a){var s=document.createElement("div");s.classList.add("boc-undo-redo"),s.innerHTML=`<span data-undo>${OrgChart.icon.undo(50,50,"")}<span class="boc-undo-i"></span></span>\n <span data-redo>${OrgChart.icon.redo(50,50,"")}<span class="boc-redo-i"></span></span>`,this.instance.element.appendChild(s),o=this.instance.element.querySelector("[data-undo]"),a=this.instance.element.querySelector("[data-redo]"),o.addEventListener("click",function(){e.instance.undo()}),a.addEventListener("click",function(){e.instance.redo()})}i.undoStepsCount>0?(o.classList.add("boc-ur-clickable"),o.querySelector(".boc-undo-i").innerHTML=i.undoStepsCount,o.querySelector(".boc-undo-i").style.display="inline-block"):(o.classList.remove("boc-ur-clickable"),o.querySelector(".boc-undo-i").style.display="none"),i.redoStepsCount>0?(a.classList.add("boc-ur-clickable"),a.querySelector(".boc-redo-i").innerHTML=i.redoStepsCount,a.querySelector(".boc-redo-i").style.display="inline-block"):(a.classList.remove("boc-ur-clickable"),a.querySelector(".boc-redo-i").style.display="none")}}},OrgChart.undoRedoUI.prototype.on=function(e,i){return OrgChart.events.on(e,i,this._event_id),this},OrgChart.undoRedoUI.prototype.onChange=function(e){return this.on("change",function(i,o){return e.call(i,o)})},OrgChart.events.on("redraw",function(e,i){if(e.config.miniMap){if(e.manager.action!=OrgChart.action.move){OrgChart.miniMap._settings._scale=Math.min(OrgChart.miniMap.width/(e.response.boundary.maxX-e.response.boundary.minX),OrgChart.miniMap.height/(e.response.boundary.maxY-e.response.boundary.minY)),OrgChart.miniMap._settings._translateX=-e.response.boundary.minX*OrgChart.miniMap._settings._scale+(OrgChart.miniMap.width-(e.response.boundary.maxX-e.response.boundary.minX)*OrgChart.miniMap._settings._scale)/2,OrgChart.miniMap._settings._translateY=-e.response.boundary.minY*OrgChart.miniMap._settings._scale+(OrgChart.miniMap.height-(e.response.boundary.maxY-e.response.boundary.minY)*OrgChart.miniMap._settings._scale)/2;var o=e.getViewBox();OrgChart.miniMap._init(e),OrgChart.miniMap._drawMainCanvas(e),OrgChart.miniMap._drawRectSelectorCanvas(e,o);var a,s,l,c,d=e.element.querySelector('[data-id="mini-map-focus"]'),h=!1,p=null;d.onmousedown=function(e){var i,l,c,p=d.getBoundingClientRect(),u=p.left,f=p.top;if(a=parseInt(e.clientX-u),s=parseInt(e.clientY-f),i=s,l=(a-OrgChart.miniMap._settings._translateX)/OrgChart.miniMap._settings._scale,c=(i-OrgChart.miniMap._settings._translateY)/OrgChart.miniMap._settings._scale,l>o[0]&&l<o[0]+o[2]&&c>o[1]&&c<o[1]+o[3])return e.preventDefault(),e.stopPropagation(),void(h=!0)},d.onmousemove=function(i){if(h){i.preventDefault(),i.stopPropagation(),OrgChart.miniMap._mouseMove=!0;var u=d.getBoundingClientRect(),f=u.left,g=u.top;l=parseInt(i.clientX-f),c=parseInt(i.clientY-g);var m=(l-a)/OrgChart.miniMap._settings._scale,b=(c-s)/OrgChart.miniMap._settings._scale;o[0]=m+o[0],o[1]=b+o[1],e.setViewBox(o),p&&(clearTimeout(p),p=null),p=setTimeout(function(){e._draw(!0,OrgChart.action.move)},300),OrgChart.miniMap._drawRectSelectorCanvas(e,o),a=l,s=c}},d.onmouseup=function(e){h&&(e.preventDefault(),e.stopPropagation(),h=!1)},d.onmouseout=function(e){h&&(e.preventDefault(),e.stopPropagation(),h=!1,OrgChart.miniMap._mouseMove=!1)},d.onclick=function(i){if(i.preventDefault(),i.stopPropagation(),OrgChart.miniMap._mouseMove)OrgChart.miniMap._mouseMove=!1;else{var a=d.getBoundingClientRect(),s=a.left,h=a.top;l=parseInt(i.clientX-s),c=parseInt(i.clientY-h);var u=l/OrgChart.miniMap._settings._scale,f=c/OrgChart.miniMap._settings._scale;o[0]=u-(o[0]+o[2]-o[0])/2-OrgChart.miniMap._settings._translateX/OrgChart.miniMap._settings._scale,o[1]=f-(o[1]+o[3]-o[1])/2-OrgChart.miniMap._settings._translateY/OrgChart.miniMap._settings._scale,e.setViewBox(o),p&&(clearTimeout(p),p=null),p=setTimeout(function(){e._draw(!0,OrgChart.action.move)},300),OrgChart.miniMap._drawRectSelectorCanvas(e,o)}}}}else{var u=e.element.querySelector('[data-id="mini-map"]');u&&u.parentNode.removeChild(u)}}),OrgChart.miniMap={},OrgChart.miniMap._settings={_translateX:0,_translateY:0,_scale:1},OrgChart.miniMap._drawMainCanvas=function(e){var i=e.element.querySelector('[data-id="mini-map-main"]'),o=i.getContext("2d");OrgChart.miniMap._initCtx(e,i,1);var a=0,s=[];!function iterate(e,i){if(Array.isArray(i))for(var l=0;l<i.length;l++)iterate(e,i[l]);else{o.fillStyle=OrgChart.miniMap.colors[3],o.beginPath(),o.lineWidth="0.5",o.fillRect(i.x,i.y,i.w,i.h),o.strokeRect(i.x,i.y,i.w,i.h);for(l=0;l<i.stChildrenIds.length;l++)a++,s.includes(i.id)||(1==a?o.fillStyle=OrgChart.miniMap.colors[0]:2==a?o.fillStyle=OrgChart.miniMap.colors[1]:3==a&&(o.fillStyle=OrgChart.miniMap.colors[2]),o.beginPath(),o.fillRect(i.x,i.y,i.w,i.h),o.strokeRect(i.x,i.y,i.w,i.h),s.push(i.id)),iterate(e,e.getNode(i.stChildrenIds[l])),a--;for(l=0;l<i.childrenIds.length;l++)iterate(e,e.getNode(i.childrenIds[l]))}}(e,e.roots)},OrgChart.miniMap._drawRectSelectorCanvas=function(e,i){var o=e.element.querySelector('[data-id="mini-map-focus"]'),a=o.getContext("2d");OrgChart.miniMap._initCtx(e,o,OrgChart.miniMap.opacity);var s=i[0],l=i[1],c=i[2],d=i[3];a.lineWidth=.5/OrgChart.miniMap._settings._scale,a.strokeStyle=OrgChart.miniMap.focusStroke,a.globalAlpha=1,a.clearRect(s,l,c,d),a.strokeRect(s,l,c,d)},OrgChart.miniMap._initCtx=function(e,i,o){var a=i.getContext("2d");i.width=i.width,i.height=i.height,a.clearRect(0,0,OrgChart.miniMap.width,OrgChart.miniMap.height),a.globalAlpha=o,1!=o&&(a.fillStyle=OrgChart.miniMap.selectorBackgroundColor,a.fillRect(0,0,OrgChart.miniMap.width,OrgChart.miniMap.height)),a.translate(OrgChart.miniMap._settings._translateX,OrgChart.miniMap._settings._translateY),a.scale(OrgChart.miniMap._settings._scale,OrgChart.miniMap._settings._scale)},OrgChart.miniMap._init=function(e){if(!e.element.querySelector('[data-id="mini-map"]')){var i=document.createElement("canvas");i.width=OrgChart.miniMap.width,i.height=OrgChart.miniMap.height,i.setAttribute("data-id","mini-map-main"),i.style.display="inline-block",i.style.backgroundColor=OrgChart.miniMap.backgroundColor,i.style.position="absolute",i.style.top=0,i.style.left=0;var o=document.createElement("canvas");o.width=OrgChart.miniMap.width,o.height=OrgChart.miniMap.height,o.setAttribute("data-id","mini-map-focus"),o.style.display="inline-block",o.style.position="absolute",o.style.top=0,o.style.left=0;var a=document.createElement("div");a.setAttribute("data-id","mini-map"),a.style.position="absolute";for(var s=["top","right","left","bottom"],l=0;l<s.length;l++){var c=s[l];OrgChart.isNEU(OrgChart.miniMap.position[c])||("padding"==OrgChart.miniMap.position[c]?a.style[c]=e.config.padding+"px":a.style[c]=OrgChart.miniMap.position[c]+"px")}a.style.border=OrgChart.miniMap.border,a.style.padding=OrgChart.miniMap.padding+"px",a.style.backgroundColor=OrgChart.miniMap.backgroundColor;var d=document.createElement("div");d.style.position="relative",d.style.width=OrgChart.miniMap.width+"px",d.style.height=OrgChart.miniMap.height+"px",d.appendChild(i),d.appendChild(o),a.appendChild(d),e.element.appendChild(a),a.addEventListener("DOMMouseScroll",function(i){e.__mouseScrollHandler(a,i)}),a.addEventListener("mousewheel",function(i){e.__mouseScrollHandler(a,i)});var h=0,p=0,mouseMoveHandler=function(e){OrgChart.miniMap._mouseMove=!0;var i=e.clientX-h,o=e.clientY-p;if(!OrgChart.isNEU(a.style.left)){var s=parseFloat(a.style.left)+i;a.style.left=`${s}px`}if(!OrgChart.isNEU(a.style.right)){var l=parseFloat(a.style.right)-i;a.style.right=`${l}px`}if(!OrgChart.isNEU(a.style.bottom)){var c=parseFloat(a.style.bottom)-o;a.style.bottom=`${c}px`}if(!OrgChart.isNEU(a.style.top)){var d=parseFloat(a.style.top)+o;a.style.top=`${d}px`}h=e.clientX,p=e.clientY},mouseUpHandler=function(){document.removeEventListener("mousemove",mouseMoveHandler),document.removeEventListener("mouseup",mouseUpHandler)};OrgChart.miniMap.draggable&&a.addEventListener("mousedown",function(e){h=e.clientX,p=e.clientY,document.addEventListener("mousemove",mouseMoveHandler),document.addEventListener("mouseup",mouseUpHandler)})}},OrgChart.miniMap.colors=["#E0E0E0","#BDBDBD","#9E9E9E","#757575"],OrgChart.miniMap.selectorBackgroundColor="white",OrgChart.miniMap.backgroundColor="white",OrgChart.miniMap.focusStroke="#f57c00",OrgChart.miniMap.opacity=.4,OrgChart.miniMap.border="1px solid #aeaeae",OrgChart.miniMap.width=250,OrgChart.miniMap.height=140,OrgChart.miniMap.padding=5,OrgChart.miniMap.position={top:void 0,left:"padding",right:void 0,bottom:"padding"},OrgChart.miniMap.draggable=!0,OrgChart._search={},OrgChart._search.search=function(e,i,o,a,s,l,c){var d=[],h=i.toLowerCase();document.documentElement.lang&&(h=i.toLocaleLowerCase(document.documentElement.lang));var p=h.split(" ");if(c&&p.length>1){var u=p[0];c[u]&&(o=[c[u]],p=(h=h.replace(u,"").trim()).split(" "))}p=p.filter(function(e,i,o){return o.indexOf(e)===i});for(var f={},g=0;g<e.length;g++)for(var m=e[g],b=0;b<o.length;b++){var x=o[b];if(!OrgChart.isNEU(m[x])){var v=m[x];if(null!=(i=OrgChart._search.searchAndComputeScore(p,v,x,l))){var y=m.id;if(f[y]){if(f[y]&&f[y]<i.__score){f[y]=i.__score;for(var _=d.length-1;_>=0;_--)d[_].id==y&&d.splice(_,1);OrgChart._search.addNodeToResult(d,a,m,i,x,s)}}else f[y]=i.__score,OrgChart._search.addNodeToResult(d,a,m,i,x,s)}}}return d.sort(function(e,i){return e.__score<i.__score?1:e.__score>i.__score?-1:0}),d},OrgChart._search.addNodeToResult=function(e,i,o,a,s,l){var c={};c.id=o.id,OrgChart.isNEU(o[l])||(c[l]=o[l]);for(var d=0;d<i.length;d++){var h=i[d];OrgChart.isNEU(o[h])||OrgChart.isNEU(c[h])&&(c[h]=o[h])}null!=a&&(OrgChart.isNEU(c.__score)&&(c.__score=a.__score),OrgChart.isNEU(c.__searchField)&&(c.__searchField=s),OrgChart.isNEU(c.__searchMarks)&&(c.__searchMarks=a.__searchMarks)),e.push(c)},OrgChart._search.searchAndComputeScore=function(e,i,o,a){if(OrgChart.isNEU(i))return null;if(OrgChart.isNEU(e))return null;if(!e.length)return null;"string"!=typeof i&&(i=i.toString());var s=i.toLowerCase();document.documentElement.lang&&(s=i.toLocaleLowerCase(document.documentElement.lang));var l=OrgChart._search.searchIndexesOf(s,e);if(!l.length)return null;for(var c=s.length/100,d=0,h=0,p=d>0?100:0,u=0,f=0;f<e.length;f++)for(var g=e[f],m=0;m<l.length;m++)if(-1!=g.indexOf(l[m].searchPhrase)){u++;break}var b=100/(e.length/u);if(l.length){h=l[0].start;for(m=0;m<l.length;m++)if(d+=l[m].length,l[m].start<h&&(h=l[m].start),m>=1&&l[m-1].start>l[m].start){p=0;break}}var x=0;0!=d&&(x=d/c);var v=d>0?100:0;0!=h&&(v=100-h/c);var y=0;a&&a[o]&&(y=a[o]),b&&(b=b/100*50),x>0&&(x=x/100*10),v>0&&(v=v/100*10),p>0&&(p=p/100*10),y>0&&(y=y/100*20);var _=Math.round(1e4*(b+x+v+p+y));l.sort(function(e,i){return e.start<i.start?-1:e.start>i.start?1:0});for(m=l.length-1;m>=0;m--)for(f=0;f<l.length;f++)f<m&&l[f].start+l[f].length>l[m].start&&l.splice(m,1);var w=i;for(m=l.length-1;m>=0;m--)w=(w=w.insert(l[m].start+l[m].length,"</mark>")).insert(l[m].start,"<mark>");return{__searchMarks:w,__score:_}},OrgChart._search.searchIndexesOf=function(e,i){var o=[];if(!OrgChart.isNEU(e))for(var a=0;a<i.length;a++){var s=i[a];if(!OrgChart.isNEU(s))for(var l=0;(l=e.indexOf(s,l))>-1;)o.push({length:s.length,start:l,searchPhrase:s}),l+=s.length}return o.sort(function(e,i){return e.length<i.length?1:e.length>i.length||e.start<i.start?-1:e.start>i.start?1:0}),o=o.filter(function(e){for(var i=!1,a=0;a<o.length;a++){var s=o[a].start,l=o[a].start+o[a].length-1,c=e.start,d=e.start+e.length-1;if(s==c&&l==d){i=!1;break}if(s>=c&&l<=d){i=!0;break}if(s<=c&&l>=d){i=!0;break}}return!i})},OrgChart.events.on("redraw",function(e,i){if(e.config.state){var o=[],a=[];!function iterate(e){if(Array.isArray(e))for(var i=0;i<e.length;i++)iterate(e[i]);else{("string"!=typeof e.id||"string"==typeof e.id&&-1==e.id.indexOf("split")&&-1==e.id.indexOf("mirror"))&&(o.push(e.id),1==e.min&&a.push(e.id));for(i=0;i<e.stChildren.length;i++)iterate(e.stChildren[i]);for(i=0;i<e.children.length;i++)iterate(e.children[i])}}(e.roots),OrgChart.state._put(e.config.roots,e.width(),e.height(),e.response.viewBox,o,a,e.response.adjustify,e.config.state)}}),OrgChart.state={},OrgChart.state._buildStateNames=function(e){return{paramScale:e+"-scale",paramX:e+"-x",paramY:e+"-y",paramExp:e+"-exp",paramMin:e+"-min",paramRoots:e+"-roots",paramAdjustify:e+"-adjustify"}},OrgChart.state._put=function(e,i,o,a,s,l,c,d){if(d&&!OrgChart.isNEU(s)&&0!=s.length){var h=OrgChart.state._buildStateNames(d.name),p={roots:e,scale:Math.min(i/a[2],o/a[3]),x:a[0],y:a[1],exp:s,min:l,adjustify:c};if(d.writeToUrlParams){var u=new URLSearchParams(window.location.search);u.has(h.paramScale)?u.set(h.paramScale,p.scale):u.append(h.paramScale,p.scale),u.has(h.paramX)?u.set(h.paramX,p.x):u.append(h.paramX,p.x),u.has(h.paramY)?u.set(h.paramY,p.y):u.append(h.paramY,p.y),u.has(h.paramExp)?u.set(h.paramExp,p.exp.join("*")):u.append(h.paramExp,p.exp.join("*")),u.has(h.paramRoots)&&Array.isArray(p.roots)?u.set(h.paramRoots,p.roots.join("*")):Array.isArray(p.roots)&&u.append(h.paramRoots,p.roots.join("*")),u.has(h.paramMin)?u.set(h.paramMin,p.min.join("*")):u.append(h.paramMin,p.min.join("*")),u.has(h.paramAdjustify)?u.set(h.paramAdjustify,p.adjustify.x+"*"+p.adjustify.y):u.append(h.paramAdjustify,p.adjustify.x+"*"+p.adjustify.y),window.history.replaceState(null,null,"?"+u)}d.writeToIndexedDB&&(p.id=d.name,OrgChart.idb.put(p,function(e){0==e&&console.error("Cannot write row - "+d.name)})),d.writeToLocalStorage&&OrgChart.localStorage.setItem(d.name,JSON.stringify(p))}},OrgChart.state._get=function(e,i,o,a){if(e){var s=OrgChart.state._buildStateNames(e.name);if(e.readFromUrlParams){var l=new URLSearchParams(window.location.search);if(l.has(s.paramScale)&&l.has(s.paramX)&&l.has(s.paramY)&&l.has(s.paramExp)&&l.has(s.paramMin)&&l.has(s.paramAdjustify)){var c={},d=parseFloat(l.get(s.paramScale)),h=parseFloat(l.get(s.paramX)),p=parseFloat(l.get(s.paramY));(f=[])[0]=h,f[1]=p,f[2]=i/d,f[3]=o/d,c.vb=f,c.scale=d,c.x=h,c.y=p,c.roots=null,l.has(s.paramRoots)&&(c.roots=l.get(s.paramRoots).split("*")),c.exp=l.get(s.paramExp).split("*"),c.min=l.get(s.paramMin).split("*");var u=l.get(s.paramAdjustify).split("*");return c.adjustify={x:parseFloat(u[0]),y:parseFloat(u[1])},void a(c)}if(!e.readFromIndexedDB&&!e.readFromLocalStorage)return void a(null)}if(e.readFromLocalStorage){var f;if(null!=(c=OrgChart.localStorage.getItem(e.name)))return c=JSON.parse(c),(f=[])[0]=c.x,f[1]=c.y,f[2]=i/c.scale,f[3]=o/c.scale,c.vb=f,void a(c);if(!e.readFromIndexedDB)return void a(null)}e.readFromIndexedDB&&OrgChart.idb.read(e.name,function(s,l){if(0==s)console.error("Cannot read from - "+e.name),a(null);else if(null==s)a(null);else{var c=[];c[0]=l.x,c[1]=l.y,c[2]=i/l.scale,c[3]=o/l.scale,l.vb=c,a(l)}})}else a(null)},OrgChart.state.clear=function(e){if(!e)return!1;try{localStorage.removeItem(e);var i=OrgChart.state._buildStateNames(e),o=new URLSearchParams(window.location.search);o.has(i.paramScale)&&o.delete(i.paramScale),o.has(i.paramX)&&o.delete(i.paramX),o.has(i.paramY)&&o.delete(i.paramY),o.has(i.paramExp)&&o.delete(i.paramExp),o.has(i.paramRoots)&&o.delete(i.paramRoots),o.has(i.paramMin)&&o.delete(i.paramMin),o.has(i.paramAdjustify)&&o.delete(i.paramAdjustify),window.history.replaceState(null,null,"?"+o),OrgChart.idb.delete(e,function(i){0==i&&console.error("Cannot delete row - "+e)})}catch{}},OrgChart._magnify={},OrgChart.prototype.magnify=function(e,i,o,a,s){a||(a=this.config.anim);var l=this.getNode(e),c=this.getNodeElement(e);if(l||c){var d=OrgChart._magnify[e];d&&(null!=d.timer&&clearInterval(d.timer),null!=d.timerBack&&clearInterval(d.timerBack),c.setAttribute("transform","matrix("+d.transformStart.toString()+")"),OrgChart._magnify[e]=null),o&&(c=c.cloneNode(!0),this.getSvg().appendChild(c));var h=OrgChart._getTransform(c),p=JSON.parse(JSON.stringify(h));p[0]=i,p[3]=i;var u=l.w+l.w*(i-1),f=l.h+l.h*(i-1);p[4]+=(l.w-u)/2,p[5]+=(l.h-f)/2;var g=OrgChart.animate(c,{transform:h},{transform:p},a.duration,a.func);OrgChart._magnify[e]={timer:g,transformStart:h,nodeElement:c,front:o},s&&s(c)}},OrgChart.prototype.magnifyBack=function(e,i,o){i||(i=this.config.anim);var a=OrgChart._magnify[e];if(a){null!=a.timer&&clearInterval(a.timer),null!=a.timerBack&&clearInterval(a.timerBack);var s=OrgChart._getTransform(a.nodeElement);a.timerBack=OrgChart.animate(a.nodeElement,{transform:s},{transform:a.transformStart},i.duration,i.func,function(e){var i=e[0].getAttribute(OrgChart.attr.node_id);OrgChart._magnify[i]&&OrgChart._magnify[i].front&&(e[0].parentNode.removeChild(e[0]),OrgChart._magnify[i]=null),o&&o(e[0])})}},void 0===OrgChart&&(OrgChart={}),OrgChart.events.on("init",function(e,i){if(e.config.keyNavigation&&(window.addEventListener("keydown",function(){e._windowKeyDownHandler.apply(e,[this,arguments[0]])}),OrgChart.isNEU(e._keyNavigationActiveNodeId)&&e.roots&&e.roots.length)){var o=e.roots[0].id;OrgChart.isNEU(e.config.keyNavigation.focusId)||(o=e.config.keyNavigation.focusId),e._keyNavigationActiveNodeId=o,e.center(e._keyNavigationActiveNodeId)}}),OrgChart.prototype._windowKeyDownHandler=function(e,i){for(var o=i.target,a=null;o&&o!=this.element;){if(o.hasAttribute&&o.hasAttribute(OrgChart.attr.node_id)){a=o.getAttribute(OrgChart.attr.node_id);break}o=o.parentNode}if(o){var s=a?this.getNode(a):null,l={node:s,data:a?this.get(a):null,event:i};if(!1!==OrgChart.events.publish("key-down",[this,l])&&s)if("KeyF"==i.code)this.searchUI.find("");else if("ArrowRight"==i.code||s.isAssistant&&"ArrowDown"==i.code||s.isPartner&&"ArrowDown"==i.code){if(h=this.getNode(s.pid)){var c=h.childrenIds.indexOf(s.id);if(++c<h.childrenIds.length){var d=h.childrenIds[c];this._keyNavigationActiveNodeId=d,this.center(d)}}}else if("ArrowLeft"==i.code){if(h=this.getNode(s.pid)){c=h.childrenIds.indexOf(s.id);if(--c>=0){d=h.childrenIds[c];this._keyNavigationActiveNodeId=d,this.center(d)}}}else if("ArrowUp"==i.code){var h;if(h=this.getNode(s.pid)){d=h.id;if(s.isAssistant||h.hasAssistants||s.isPartner||h.hasPartners){c=h.childrenIds.indexOf(s.id);--c>=0&&(d=h.childrenIds[c])}this._keyNavigationActiveNodeId=d,this.center(d)}}else if("ArrowDown"==i.code)s.childrenIds.length&&(this._keyNavigationActiveNodeId=s.childrenIds[0],this.center(s.childrenIds[0]));else if("Space"==i.code){var p=o.getAttribute(OrgChart.attr.node_id);return void this.toggleExpandCollapse(p,i)}}},OrgChart.events.on("redraw",function(e,i){e.config.keyNavigation&&OrgChart._keyNavigation(e)}),OrgChart.events.on("click",function(e,i){e.config&&e.config.keyNavigation&&(e._keyNavigationActiveNodeId=i.node.id,e.center(i.node.id))}),OrgChart._keyNavigation=function(e){var i=e.element.querySelector(":focus");if(i&&i.parentElement&&i.parentElement.hasAttribute(OrgChart.attr.node_id)){var o=i.parentElement;(s=(a=i).querySelector("title"))&&s.parentNode.removeChild(s),a.removeAttribute("tabindex")}if(!OrgChart.isNEU(e._keyNavigationActiveNodeId)&&((o=e.getNodeElement(e._keyNavigationActiveNodeId))&&o.children.length)){var a;(a=o.children[0]).setAttribute("tabindex",2);var s,l={text:"",id:e._keyNavigationActiveNodeId};if(OrgChart.events.publish("screen-reader-text",[e,l]),!OrgChart.isNEU(l.text))(s=document.createElementNS("http://www.w3.org/2000/svg","title")).innerHTML=l.text,a.appendChild(s);OrgChart.SEARCH_CLOSE_RESULT_ON_ESCAPE_OR_CLICKOUTSIDE&&e.searchUI.hide(),a.focus()}},OrgChart.elements={},OrgChart.elements.textbox=function(e,i,o,a){var s=OrgChart.elements._vidrf(e,i,a);if(s.doNotRender)return{html:""};var l="";return i.btn&&(l=`<a href="#" data-input-btn="" class="boc-link boc-link-boc-button">${i.btn}</a>`),{html:`<div class="boc-form-field" style="min-width: ${o};">\n <div class="boc-input" data-boc-input="" ${s.disabledAttribute} ${s.vlidators}>\n <label for="${s.id}">${OrgChart._escapeGreaterLessSign(s.label)}</label>\n <input ${s.readOnlyAttribute} data-binding="${OrgChart._escapeDoubleQuotes(s.binding)}" maxlength="256" id="${s.id}" name="${s.id}" type="text" value="${OrgChart._escapeDoubleQuotes(s.value)}" autocomplete="off">\n ${l}\n </div>\n </div>`,id:s.id,value:s.value}},OrgChart.elements.checkbox=function(e,i,o,a){var s=OrgChart.elements._vidrf(e,i,a);if(s.doNotRender)return{html:""};var l=s.value?"checked":"",c=a?'onclick="return false;"':"";return{html:`<div class="boc-form-field" style="min-width: ${o};" >\n <label class="boc-checkbox" data-boc-input="" ${s.disabledAttribute}>\n <input ${l} ${c} data-binding="${OrgChart._escapeDoubleQuotes(s.binding)}" type="checkbox"><span class="boc-checkbox-checkmark" type="checkbox"></span>${OrgChart._escapeGreaterLessSign(s.label)}\n </label>\n </div>`,id:s.id,value:l}},OrgChart.elements.select=function(e,i,o,a){if(a)return OrgChart.elements.textbox(e,i,o,a);var s=OrgChart.elements._vidrf(e,i,a);return s.doNotRender?{html:""}:{html:`<div class="boc-form-field" style="min-width: ${o};">\n <div class="boc-input" data-boc-input="" ${s.disabledAttribute} ${s.vlidators}>\n <label for="${s.id}">${OrgChart._escapeGreaterLessSign(s.label)}</label>\n <select data-binding="${OrgChart._escapeDoubleQuotes(s.binding)}" ${s.readOnlyAttribute} id="${s.id}" name="${s.id}">\n ${function(){for(var e="",i=0;i<s.options.length;i++){var o=s.options[i];e+=`<option ${o.value==s.value?"selected":""} value="${OrgChart._escapeDoubleQuotes(o.value)}">${OrgChart._escapeGreaterLessSign(o.text)}</option>`}return e}()} \n </select>\n </div>\n </div>`,id:s.id,value:s.value}},OrgChart.elements.multiSelect=function(e,i,o,a){if(a)return OrgChart.elements.textbox(e,i,o,a);var s=OrgChart.elements._vidrf(e,i,a);return s.doNotRender?{html:""}:{html:`<div class="boc-form-field" style="min-width: ${o};">\n <div class="boc-input" data-boc-input="" ${s.disabledAttribute} ${s.vlidators}>\n <label for="${s.id}">${OrgChart._escapeGreaterLessSign(s.label)}</label>\n <select class="multiple" data-binding="${OrgChart._escapeDoubleQuotes(s.binding)}" ${s.readOnlyAttribute} id="${s.id}" name="${s.id}" multiple>\n ${function(){for(var e="",i=0;i<s.options.length;i++){var o=s.options[i];e+=`<option ${s.value.includes(o.value)?"selected":""} value="${OrgChart._escapeDoubleQuotes(o.value)}">${OrgChart._escapeGreaterLessSign(o.text)}</option>`}return e}()} \n </select>\n </div>\n </div>`,id:s.id,value:s.value}},OrgChart.elements.date=function(e,i,o,a){var s=OrgChart.elements._vidrf(e,i,a);return s.doNotRender?{html:""}:{html:`<div class="boc-form-field" style="min-width: ${o};">\n <div class="boc-input" data-boc-input="" ${s.disabledAttribute} ${s.vlidators}>\n <label for="${s.id}" class="hasval">${OrgChart._escapeGreaterLessSign(s.label)}</label>\n <input data-binding="${OrgChart._escapeDoubleQuotes(s.binding)}" ${s.readOnlyAttribute} maxlength="256" id="${s.id}" name="${s.id}" type="date" value="${OrgChart._escapeDoubleQuotes(s.value)}" autocomplete="off">\n </div>\n </div>`,id:s.id,value:s.value}},OrgChart.elements._vidrf=function(e,i,o){var a={};if(i.binding||(i.binding=""),i.label||(i.label=""),"select"!=i.type||Array.isArray(i.options)?a.options=i.options:a.options=[],a.value=e&&!OrgChart.isNEU(e[i.binding])?e[i.binding]:"",o&&a.options)for(var s=0;s<a.options.length;s++)if(a.options[s].value==a.value){a.value=a.options[s].text;break}if(a.id=OrgChart.elements.generateId(),a.disabledAttribute=o?"data-boc-input-disabled":"",a.readOnlyAttribute=o?"readonly":"",a.id=a.id,o&&OrgChart.isNEU(a.value)&&(a.doNotRender=!0),o&&"photo"==i.binding&&(a.id=null,a.doNotRender=!0),a.binding=i.binding,a.label=i.label,a.vlidators="",i.vlidators)for(var l in i.vlidators)a.vlidators+=`data-v-${l}="${i.vlidators[l]}" `;return a},OrgChart.elements.ids=[],OrgChart.elements.generateId=function(){for(;;){var e="_"+("0000"+(Math.random()*Math.pow(36,4)|0).toString(36)).slice(-4);if(!OrgChart.elements.ids.has(e))return OrgChart.elements.ids.push(e),e}},OrgChart.input={},OrgChart.input._timeout=null,OrgChart.input.initWithTimeout=function(){OrgChart.input._timeout&&(clearTimeout(OrgChart.input._timeout),OrgChart.input._timeout=null),OrgChart.input._timeout=setTimeout(OrgChart.input.init,200)},OrgChart.input.init=function(e){var i;i=e?e.querySelectorAll("[data-boc-input]"):document.querySelectorAll("[data-boc-input]");for(var o=0;o<i.length;o++){var a=i[o],s=null;a.type&&"hidden"==a.type.toLowerCase()&&(s=a),s||(s=a.querySelector("input")),s||(s=a.querySelector("select"));var l=a.querySelector("label");l&&(s.value||"select-one"==s.type&&s.selectedOptions&&s.selectedOptions.length&&""==s.selectedOptions[0].value&&s.selectedOptions[0].innerHTML)&&l.classList.add("hasval"),"checkbox"!=s.type.toLowerCase()&&s.addEventListener("focus",function(){this.classList.remove("boc-validation-error");var e=this.parentNode.querySelector("label");e.classList.add("focused");var i=e.querySelector(".boc-validation-error-message");i&&i.parentNode.removeChild(i)}),"checkbox"!=s.type.toLowerCase()&&s.addEventListener("blur",function(){OrgChart.input.blurHandler(this)})}},OrgChart.input.blurHandler=function(e){var i=e.parentNode.querySelector("label");i.classList.remove("focused"),e.value||"date"==e.type?i.classList.add("hasval"):i.classList.remove("hasval")},OrgChart.input.validate=function(e){var i=null;e.type&&"hidden"==e.type.toLowerCase()&&(i=e),i||(i=e.querySelector("input")),i||(i=e.querySelector("select"));var o=e.querySelector("label");if(i.classList.remove("boc-validation-error"),o){var a=o.querySelector(".boc-validation-error-message");a&&a.parentNode.removeChild(a)}!i.selectedOptions&&i.value&&(i.value=i.value.trim());var s=e.getAttribute("data-v-required"),l=e.getAttribute("data-v-password"),c=e.getAttribute("data-v-email"),d=e.getAttribute("data-v-emails");return s&&""==i.value?(o.innerHTML+='<span class="boc-validation-error-message">&nbsp;'+s+"</span>",i.classList.add("boc-validation-error"),!1):l&&!OrgChart.input.validatePassword(i.value)?(o.innerHTML+='<span class="boc-validation-error-message">&nbsp;'+l+"</span>",i.classList.add("boc-validation-error"),!1):c&&!OrgChart.input.isValidEmail(i.value)?(o.innerHTML+='<span class="boc-validation-error-message">&nbsp;'+c+"</span>",i.classList.add("boc-validation-error"),!1):!(d&&!OrgChart.input.isValidEmails(i.value))||(o.innerHTML+='<span class="boc-validation-error-message">&nbsp;'+d+"</span>",i.classList.add("boc-validation-error"),!1)},OrgChart.input.validateAndGetData=function(e){for(var i=e.querySelectorAll("[data-boc-input]"),o=!0,a=0;a<i.length;a++){var s=i[a];OrgChart.input.validate(s)||(o=!1)}return!!o&&OrgChart.input.getData(e)},OrgChart.input.getData=function(e){for(var i=e.querySelectorAll("[data-binding]"),o={},a=0;a<i.length;a++){var s=i[a],l=s.getAttribute("data-binding");if("checkbox"==s.type.toLowerCase())o[l]=s.checked;else if(s.selectedOptions&&s.hasAttribute("multiple")){var c=s.selectedOptions;o[l]=Array.from(c).map(({value:e})=>e)}else o[l]=s.value}return o},OrgChart.input.validatePassword=function(e){return e&&(e=e.trim()),!(e.length<5)&&(!(e.length>18)&&-1==e.indexOf(" "))},OrgChart.input.isValidEmails=function(e){if(e)for(var i=e.split(","),o=0;o<i.length;o++){var a=i[o].trim();if(!OrgChart.input.isValidEmail(a))return!1}return!0},OrgChart.input.isValidEmail=function(e){return e&&(e=e.trim()),/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(String(e).toLowerCase())},OrgChart.ui.css=function(){return'<style data-boc-styles>.boc-ai-form{height:100%;width:100%;box-shadow:rgba(0,0,0,.2) 0 6px 6px 0,rgba(0,0,0,.19) 0 13px 20px 0;display:flex;flex-direction:column;height:100%;width:400px}.boc-dark .boc-ai-form{color:#aeaeae}.boc-light .boc-ai-form{color:#757575}.boc-ai-messages{font-size:16px}@media screen and (max-width:500px){.boc-ai-form{width:100%}}.boc-dark .boc-ai-form{background-color:#252526}.boc-light .boc-ai-form{background-color:#fff}.boc-ai-button{font-size:32px;position:absolute;top:20px;left:20px;cursor:pointer;padding:12px;border-radius:50%;user-select:none}.boc-dark .boc-ai-button{color:#aeaeae}.boc-light .boc-ai-button{color:#757575}.boc-ai-button:hover{color:#fff;background-color:#039be5}.boc-ai-container{padding:0 14px;display:grid;grid-template-rows:40px auto 80px;gap:10px;height:100%}.boc-ai-container .boc-input input{padding-right:50px}.boc-ai-close{text-align:end;margin-top:20px}.boc-ai-close svg{cursor:pointer}.boc-ai-start{text-align:center;display:flex;justify-content:center;align-items:center;user-select:none}.boc-ai-start span{font-weight:700;font-size:32px;font:"Segoe UI",Arial,sans-serif;background:linear-gradient(90deg,#039be5 28%,#f57c00,#ffca28);color:transparent!important;background-clip:text;display:inline-block;padding:10px 0}.boc-ai-send.boc-ai-send-cansend{cursor:pointer;background-color:#039be5}.boc-ai-send.boc-ai-send-cansend:hover{background-color:#f57c00}.boc-ai-send.boc-ai-send-cansend:active{background-color:#ffca28}.boc-ai-send{background-color:transparent;position:absolute;right:7px;top:7px;width:38px;height:38px;border-radius:50%;text-align:center;background-repeat:no-repeat;background-position:center;background-size:20px 20px}.boc-ai-send svg{display:block;margin:auto;height:100%}.boc-ai-user-message{text-align:end;margin:14px 0}.boc-inner-user-message{padding:7px;border-radius:7px;display:inline-block}.boc-ai-middle{overflow-y:auto}.boc-ai-middle::-webkit-scrollbar{display:none}.boc-button{background-color:#039be5;cursor:pointer;width:calc(100%);height:50px;color:#fff;padding-top:5px;padding-left:7px;padding-right:7px;text-align:center;text-transform:uppercase;border:1px solid #3fc0ff;display:inline-block;border-radius:5px}.boc-button.orange{background-color:#f57c00;border:1px solid #ffa03e}.boc-button.yellow{background-color:#ffca28;border:1px solid #ffdf7c}.boc-button.lower{text-transform:unset}.boc-button.transparent{background-color:transparent}.boc-button:hover{background-color:#35afea}.boc-button.orange:hover{background-color:#f79632}.boc-button.yellow:hover{background-color:#ffd452}.boc-button:active{transform:matrix(.98,0,0,.98,0,0)}.boc-button-icon{text-align:initial;cursor:pointer;margin-bottom:15px;color:#039be5}.boc-dark .boc-button-icon:hover{background-color:#2d2d2d}.boc-light .boc-button-icon:hover{background-color:#ececec}.boc-button-icon>img{height:24px;width:24px;vertical-align:middle;padding:7px}.boc-button:focus{outline:0}.boc-button-icon>img{filter:invert(46%) sepia(66%) saturate(2530%) hue-rotate(171deg) brightness(95%) contrast(98%)}.boc-light .boc-button.transparent{color:#039be5}.boc-light .boc-button.transparent:hover{color:#fff}.boc-button-loading{background-color:transparent;cursor:pointer;width:calc(100% - 2px);height:50px;color:#fff;text-align:center;text-transform:uppercase;border:1px solid #027cb7;display:inline-block;display:flex;justify-content:center;align-items:center;display:none}.boc-button-loading .boc-loading-dots div{margin:0 10px}.boc-link-boc-button{position:absolute;right:10px;top:-1px}@media screen and (max-width:1000px){.boc-link-boc-button{right:50px}}[data-boc-input-disabled] .boc-link-boc-button{display:none}[dir=rtl] .boc-link-boc-button{left:10px;right:unset}.boc-img-button{width:48px;height:48px;cursor:pointer;border-radius:50%;background-color:#039be5;background-repeat:no-repeat;background-size:24px 24px;background-position:center center;margin:3px;display:inline-block}.boc-img-button:hover{background-color:#f57c00}.boc-checkbox{display:block;position:relative;padding-left:35px;margin-bottom:12px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap}.boc-checkbox input{position:absolute;opacity:0;cursor:pointer;height:0;width:0}.boc-checkbox-checkmark{position:absolute;top:0;left:0;height:25px;width:25px;border-radius:5px}.boc-dark [data-boc-input-disabled] .boc-checkbox-checkmark,.boc-dark [data-boc-input-disabled].boc-checkbox input:checked~.boc-checkbox-checkmark,.boc-light [data-boc-input-disabled] .boc-checkbox-checkmark,.boc-light [data-boc-input-disabled].boc-checkbox input:checked~.boc-checkbox-checkmark{background-color:#aeaeae!important}[data-boc-input-disabled].boc-checkbox{cursor:default}[dir=rtl] .boc-checkbox-checkmark{right:0}[dir=rtl] .boc-checkbox{padding-left:unset;padding-right:35px}.boc-dark .boc-checkbox-checkmark{background-color:#333;border:1px solid #5b5b5b}.boc-light .boc-checkbox-checkmark{background-color:#fff;border:1px solid #c7c7c7}.boc-dark .boc-checkbox:hover input~.boc-checkbox-checkmark{background-color:#3c3c3c}.boc-light .boc-checkbox:hover input~.boc-checkbox-checkmark{background-color:#f8f9f9}.boc-dark .boc-checkbox input:checked~.boc-checkbox-checkmark{background-color:#039be5}.boc-light .boc-checkbox input:checked~.boc-checkbox-checkmark{background-color:#039be5}.boc-checkbox-checkmark:after{content:"";position:absolute;display:none}.boc-checkbox input:checked~.boc-checkbox-checkmark:after{display:block}.boc-checkbox .boc-checkbox-checkmark:after{left:9px;top:5px;width:5px;height:10px;border:solid #fff;border-width:0 3px 3px 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.boc-controls{display:flex;gap:7px;position:absolute}.boc-controls-top{left:unset;top:15px;right:50%;bottom:unset;transform:translateX(50%);flex-direction:row}.boc-controls-bottom{left:unset;top:unset;right:50%;bottom:15px;transform:translateX(50%);flex-direction:row}.boc-controls-left{left:15px;top:50%;right:unset;bottom:unset;transform:translateY(-50%);flex-direction:column}.boc-controls-right{left:unset;top:50%;right:15px;bottom:unset;transform:translateY(-50%);flex-direction:column}.boc-controls-bottom_right,.boc-controls-right_bottom{left:unset;top:unset;right:15px;bottom:15px;flex-direction:row}.boc-controls-right_bottom{flex-direction:column}.boc-controls-right_top,.boc-controls-top_right{left:unset;top:15px;right:15px;bottom:unset;flex-direction:row}.boc-controls-right_top{flex-direction:column}.boc-controls-bottom_left,.boc-controls-left_bottom{left:15px;top:unset;right:unset;bottom:15px;flex-direction:row}.boc-controls-left_bottom{flex-direction:column}.boc-controls-left_top,.boc-controls-top_left{left:15px;top:15px;right:unset;bottom:unset;flex-direction:row}.boc-controls-left_top{flex-direction:column}.boc-controls [data-control-id] svg{display:block;margin:0 auto}.boc-controls [data-control-id]{display:flex;align-items:center;cursor:pointer;width:60px;height:60px;border-radius:30px;box-shadow:0 4px 30px rgba(0,0,0,.1);backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px)}.boc-light .boc-controls [data-control-id]{background:rgba(255,255,255,.2);border:1px solid #c7c7c7}.boc-dark .boc-controls [data-control-id]{background:rgba(30,30,30,.2);border:1px solid #5b5b5b}.boc-controls [data-control-id]:hover{background-color:#0074e8}.boc-controls [data-control-id]:hover svg{filter:brightness(0) invert(1)}.boc-controls [data-control-id].boc-control-selected{background-color:#0074e8}.boc-controls [data-control-id].boc-control-selected svg{filter:brightness(0) invert(1)}.boc-filter{user-select:none}.boc-light .boc-filter{color:#757575}.boc-dark .boc-filter{color:#ccc}.boc-filter>div>div{display:inline-block;padding:3px 10px;cursor:pointer}.boc-filter-menu fieldset,.boc-filter>div,.filter-field-selected{border-radius:5px}.boc-filter-menu fieldset{overflow-y:auto;max-height:300px}.boc-filter>div.boc-filter-menu{padding:10px}.boc-light .boc-filter>div.boc-filter-menu,.boc-light .filter-field-selected{background-color:#f8f9f9}.boc-dark .boc-filter>div.boc-filter-menu,.boc-dark .filter-field-selected{background-color:#3c3c3c}.boc-light .boc-filter>div{background-color:#eee}.boc-dark .boc-filter>div{background-color:#333}.boc-form-perspective{transform-style:preserve-3d;perspective:500px;position:absolute;top:32px}.boc-form{box-shadow:rgba(0,0,0,.2) 0 6px 6px 0,rgba(0,0,0,.19) 0 13px 20px 0;padding:14px;transform-origin:top center;user-select:none;display:none;position:relative;max-height:calc(100vh - 100px);overflow-y:auto;border-bottom-left-radius:5px;border-bottom-right-radius:5px}.boc-form-bottom{border-bottom-left-radius:unset;border-bottom-right-radius:unset;border-top-left-radius:5px;border-top-right-radius:5px}.boc-form .separator{margin:0 10px}@media screen and (max-width:1000px){.boc-form-perspective{min-width:100%;max-height:calc(100% - 32px);left:unset!important;right:unset!important;transform:none!important}.boc-form .set{max-height:calc(100vh - 74px)}.boc-form-fieldset{max-width:unset!important}}.boc-light .boc-form .separator{border-bottom:1px solid #c7c7c7}.boc-dark .boc-form .separator{border-bottom:1px solid #5b5b5b}.boc-light .boc-form{background-color:#fff}.boc-dark .boc-form{background-color:#252526}.boc-item{padding:6px 12px 6px 12px;display:flex;flex-direction:row}.boc-light .boc-form .boc-item.selected,.boc-light .boc-form .boc-item:hover{background-color:#0074e8;color:#fff}.boc-dark .boc-form .boc-item.selected,.boc-dark .boc-form .boc-item:hover{background-color:#094771;color:#fff}.boc-item.selected img,.boc-item:hover img{filter:invert(100%)}.boc-item.selected img{visibility:visible!important}.boc-form-fieldset{display:flex;flex-wrap:wrap;margin:0!important}.boc-form-field{flex:1 0 21%;margin:3px;min-width:200px}.boc-form-field-100{flex:1 0 96%;margin:3px;min-width:200px}.boc-input{position:relative}.boc-input>input,.boc-input>select{height:50px;padding:18px 10px 2px 9px;width:100%;box-sizing:border-box;border-style:solid;border-width:1px}.boc-input select{height:50px;padding:20px 5px 4px 5px}[data-boc-input-disabled].boc-input>input,[data-boc-input-disabled].boc-input>select{border-color:transparent!important}.boc-light [data-boc-input-disabled]>input,.boc-light [data-boc-input-disabled]>select{background-color:#fff!important}.boc-dark [data-boc-input-disabled]>input,.boc-dark [data-boc-input-disabled]>select{background-color:#252526!important}[data-boc-input-disabled]>select{appearance:none;padding-left:8px}.boc-input>label{display:inline-block;position:absolute;padding-left:10px;padding-right:10px;color:#acacac;cursor:text;-webkit-transition:all .1s ease-out;-moz-transition:all .1s ease-out;-ms-transition:all .1s ease-out;-o-transition:all .1s ease-out;transition:all .1 ease-out;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:initial;text-align:initial;white-space:nowrap}.boc-input>label{top:12px;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 14px)}.boc-input>label.focused,.boc-input>label.hasval{top:-1px}.boc-input>input,.boc-input>select{outline:0;border-radius:5px}.boc-dark .boc-input>label.focused,.boc-light .boc-input>label.focused{color:#039be5}.boc-dark .boc-input>input,.boc-dark .boc-input>select{color:#ccc;background-color:#333;border-color:#5b5b5b}.boc-light .boc-input>input,.boc-light .boc-input>select{color:#757575;background-color:#fff;border-color:#c7c7c7}.boc-light .boc-input>input:focus,.boc-light .boc-input>select:focus{border-color:#039be5;background-color:#f8f9f9}.boc-dark .boc-input>input:focus,.boc-dark .boc-input>select:focus{border-color:#039be5;background-color:#3c3c3c}.boc-dark .boc-input>input.boc-validation-error,.boc-dark .boc-input>select.boc-validation-error,.boc-light .boc-input>input.boc-validation-error,.boc-light .boc-input>select.boc-validation-error{border-color:#ca2a2a}.boc-dark .boc-validation-error-message,.boc-light .boc-validation-error-message{color:#ca2a2a}.boc-input select.multiple{height:initial}.boc-link{color:#039be5;cursor:pointer;text-decoration:underline}.boc-link:hover{color:#f57c00}.boc-dark ::-webkit-scrollbar,.boc-light ::-webkit-scrollbar{width:15px;height:15px}.boc-dark ::-webkit-scrollbar-corner{background:#1e1e1e}.boc-dark ::-webkit-scrollbar-track{background:#1e1e1e;border-left:1px solid #333;border-top:1px solid #333}.boc-dark ::-webkit-scrollbar-thumb{background:#424242}.boc-dark ::-webkit-scrollbar-thumb:hover{background:#4f4f4f}.boc-dark ::-webkit-scrollbar-thumb:active{background:#5e5e5e}.boc-light ::-webkit-scrollbar-corner{background:#fff}.boc-light ::-webkit-scrollbar-track{background:#fff;border-left:1px solid #ddd;border-top:1px solid #ddd}.boc-light ::-webkit-scrollbar-thumb{background:#c1c1c1}.boc-light ::-webkit-scrollbar-thumb:hover{background:#929292}.boc-light ::-webkit-scrollbar-thumb:active{background:#666}.boc-edit-form{position:fixed;top:0;right:0;height:100%;width:100%;box-shadow:rgba(0,0,0,.2) 0 6px 6px 0,rgba(0,0,0,.19) 0 13px 20px 0;display:flex;flex-direction:column;height:100%;width:400px}@media screen and (max-width:1000px){.boc-edit-form{width:100%}}.boc-dark .boc-edit-form{background-color:#252526}.boc-light .boc-edit-form{background-color:#fff}.boc-edit-form-header{height:200px;text-align:center;border-radius:10px}.export-service .boc-edit-form-header{border-radius:unset}.boc-edit-form-title{color:#fff;margin:0;padding:14px 17px 7px 17px}.boc-edit-form-avatar{border-radius:50%;width:150px;height:150px;position:absolute;top:75px;border:5px solid #fff;left:50%;transform:translateX(-50%);background-color:#cacaca;box-shadow:rgba(0,0,0,.2) 0 6px 6px 0,rgba(0,0,0,.19) 0 13px 20px 0}.boc-edit-form-close{position:absolute;right:14px;top:14px;width:34px;height:34px;cursor:pointer}.boc-edit-form-fields{flex-grow:1;overflow-y:auto;overflow-x:hidden}.boc-edit-form-fields-inner{margin:0 7px 20px 7px}.boc-ai-user-message{text-align:end;margin:14px 0}.boc-inner-user-message{padding:7px;border-radius:7px;display:inline-block}.dark .boc-inner-user-message{background-color:#333}.light .boc-inner-user-message{background-color:#f9f9f9}.boc-export-form{box-shadow:rgba(0,0,0,.2) 0 -6px 6px 0,rgba(0,0,0,.19) 0 -13px 20px 0;display:flex;flex-direction:column;height:100%;width:400px}.boc-dark .boc-export-form{color:#aeaeae;background-color:#252526}.boc-light .boc-export-form{color:#757575;background-color:#eee}@media screen and (max-width:500px){.boc-export-form{width:100%}}.boc-export-container{display:grid;grid-template-rows:40px auto;gap:10px;height:100%}.boc-export-page{width:100%;border:1px solid #aeaeae;display:flex;justify-content:center;align-items:center;user-select:none;position:relative}.boc-export-selected{border:1px solid #ffca28}.boc-export-middle{overflow-y:auto;overflow-x:hidden;padding:0 3px 0 0;margin-bottom:10px}.boc-export-btns-inner{padding-top:14px;display:flex;justify-content:space-between}.boc-export-left{justify-content:flex-start}.boc-export-right{justify-content:flex-end}.boc-export-left,.boc-export-right{user-select:none}.boc-export-select{position:absolute;top:0;left:0;text-align:center;width:100%}.boc-export-child-buttons{position:absolute;bottom:7px;left:7px;display:none}.boc-export-page:hover .boc-export-child-buttons{display:initial}.boc-export-parent-buttons{position:absolute;top:7px;left:7px;display:none}.boc-export-page:hover .boc-export-parent-buttons{display:initial}.boc-export-remove-buttons{position:absolute;bottom:7px;right:7px;display:none}.boc-export-page:hover .boc-export-remove-buttons{display:initial}.boc-export-child-buttons button,.boc-export-parent-buttons button{width:23px}.boc-export-profiletree-buttons{position:absolute;top:7px;right:7px;display:none}.boc-export-page:hover .boc-export-profiletree-buttons{display:initial}.boc-export-middle-inner{display:grid;gap:10px;margin:0 10px}.boc-export-btns-inner{margin:0 10px}.boc-chart-menu{opacity:0;display:inline-block;position:absolute;text-align:left;user-select:none;min-width:270px;box-shadow:rgba(0,0,0,.2) 0 4px 8px 0,rgba(0,0,0,.19) 0 6px 20px 0;font:13px/28px Helvetica,"Segoe UI",Arial,sans-serif;border-radius:10px}.boc-chart-menu>div:hover img{filter:invert(100%)}.boc-chart-menu [data-item]{text-align:start;padding:7px 10px}.boc-dark .boc-chart-menu [data-item]{background-color:#252526;color:#acacac;border-bottom:1px solid #333}.boc-dark .boc-chart-menu [data-item]:hover{background-color:#094771!important;color:#fff!important}.boc-dark .boc-chart-menu [data-item]:hover svg{filter:brightness(0) invert(1)}.boc-light .boc-chart-menu [data-item]{background-color:#fff;color:#333;border-bottom:1px solid #c7c7c7}.boc-light .boc-chart-menu [data-item]:hover{background-color:#0074e8!important;color:#fff!important}.boc-light .boc-chart-menu [data-item]:hover svg{filter:brightness(0) invert(1)}.boc-chart-menu [data-item] svg{vertical-align:middle}.boc-chart-menu [data-item]:first-child{border-top-left-radius:7px;border-top-right-radius:7px}.boc-chart-menu [data-item]:last-child{border-bottom-width:0;border-bottom-style:none;border-bottom-left-radius:7px;border-bottom-right-radius:7px}.boc-orgscribe-form{height:100%;width:100%;box-shadow:rgba(0,0,0,.2) 0 6px 6px 0,rgba(0,0,0,.19) 0 13px 20px 0;display:flex;flex-direction:column;height:100%;width:400px}@media screen and (max-width:500px){.boc-orgscribe-form{width:100%}}.boc-dark .boc-orgscribe-form{background-color:#252526}.boc-light .boc-orgscribe-form{background-color:#fff}.boc-orgscribe-container{padding:0 14px;display:grid;grid-template-rows:40px auto 10px;gap:10px;height:100%}.boc-orgscribe-container .boc-input input{padding-right:50px}.boc-orgscribe-close{text-align:end;margin-top:20px}.boc-orgscribe-close svg{cursor:pointer}.boc-orgscribe-txt{width:100%;height:100%;box-sizing:border-box;border-style:solid;border-width:1px;outline:0;border-radius:5px;font-size:24px}.boc-dark .boc-orgscribe-txt{color:#ccc;background-color:#333;border-color:#5b5b5b}.boc-light .boc-orgscribe-txt{color:#757575;background-color:#fff;border-color:#c7c7c7}.boc-search{position:absolute}@media screen and (max-width:500px){.boc-search{width:calc(100% - 30px);left:15px}}.boc-search .boc-input{margin-bottom:0}.boc-search-input{color:#7a7a7a;width:100%;border:none;outline:0;padding-top:10px;padding-right:47px}.boc-search-image-td{width:43px}.boc-search-text-td{padding-inline-end:7px;line-height:15px;text-align:start}.boc-search table{box-shadow:rgba(0,0,0,.2) 0 4px 8px 0,rgba(0,0,0,.19) 0 6px 20px 0;margin:0 3.5px 0 3.5px;width:calc(100% - 7px);border-radius:7px}.boc-search table tr:first-child td:first-child{border-top-left-radius:7px}.boc-search table tr:first-child td:last-child{border-top-right-radius:7px}[dir=rtl] .boc-search table tr:first-child td:first-child{border-top-left-radius:unset;border-top-right-radius:7px}[dir=rtl] .boc-search table tr:first-child td:last-child{border-top-right-radius:unset;border-top-left-radius:7px}.boc-search table tr:last-child td:first-child{border-bottom-left-radius:7px}.boc-search table tr:last-child td:last-child{border-bottom-right-radius:7px}[dir=rtl] .boc-search table tr:last-child td:first-child{border-bottom-left-radius:unset;border-bottom-right-radius:7px}[dir=rtl] .boc-search table tr:last-child td:last-child{border-bottom-right-radius:unset;border-bottom-left-radius:7px}.boc-dark .boc-search table{background-color:#252526;color:#acacac}.boc-search [data-search-item-id]{cursor:pointer}.boc-search-photo{margin:7px 7px 0 7px;width:32px;height:32px;background-size:cover;background-position:top center;border-radius:50%;display:inline-block;border:1px solid #8c8c8c}.boc-search [data-search-item-id]:hover .boc-link{color:#ffca28}.boc-search [data-search-item-id]:hover .boc-link:hover{color:#f57c00}.boc-dark .boc-search [data-search-item-id] td{border-top:1px solid #333}.boc-dark .boc-search [data-search-item-id]:hover,.boc-dark .boc-search [data-selected=yes]{background-color:#094771;color:#fff}.boc-light .boc-search table{background-color:#fff;color:#333}.boc-light .boc-search [data-search-item-id] td{border-top:1px solid #c7c7c7}.boc-light .boc-search [data-search-item-id]:hover,.boc-light .boc-search [data-selected=yes]{background-color:#0074e8;color:#fff}.boc-search [data-search-item-id]:first-child td{border-top:unset}.boc-ripple-container{position:absolute;top:0;right:0;bottom:0;left:0}.boc-drag-over rect{opacity:.5}.boc-ripple-container span{transform:scale(0);border-radius:100%;position:absolute;opacity:.75;background-color:#fff;animation:boc-ripple 1s}@-moz-keyframes boc-ripple{to{opacity:0;transform:scale(2)}}@-webkit-keyframes boc-ripple{to{opacity:0;transform:scale(2)}}@-o-keyframes boc-ripple{to{opacity:0;transform:scale(2)}}@keyframes boc-ripple{to{opacity:0;transform:scale(2)}}.boc-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.4s;transition:.4s}.boc-slider:before{position:absolute;content:"";height:16px;width:16px;left:4px;bottom:4px;background-color:#fff;-webkit-transition:.4s;transition:.4s}.boc-slider.round{border-radius:24px}.boc-slider.round:before{border-radius:50%}svg text:hover{cursor:default}svg.boc-cursor-grab,svg.boc-cursor-grab text:hover{cursor:grab}svg.boc-cursor-nodrop,svg.boc-cursor-nodrop text:hover{cursor:no-drop}svg.boc-cursor-copy,svg.boc-cursor-copy text:hover{cursor:copy}svg.boc-cursor-move,svg.boc-cursor-move text:hover{cursor:move}#boc-close-btn:focus,#boc-close-btn:hover{color:#000;text-decoration:none;cursor:pointer}#boc-id-select:focus{outline:.5px solid #aeaeae}#boc-sampleDialog #title:hover{cursor:default;background:gray}.boc-light{background-color:#fff;font:13px/28px Helvetica,"Segoe UI",Arial,sans-serif}.boc-dark{background-color:#1e1e1e;font:13px/28px Helvetica,"Segoe UI",Arial,sans-serif}.boc-dark input,.boc-dark select,.boc-light input,.boc-light select{font:16px Helvetica,"Segoe UI",Arial,sans-serif}.boc-dark h1,.boc-light h1{font-size:30px;line-height:1}.boc-light [data-boc-content]::backdrop{background-color:#fff}.boc-dark [data-boc-content]::backdrop{background-color:#1e1e1e}.boc-dark text,.boc-light text{user-select:none}.boc-edit-form{position:absolute;border-radius:10px}.export-service .boc-edit-form{border-radius:unset}.boc-dark .boc-edit-form{color:#acacac}.boc-light .boc-edit-form{color:#333}.boc-dark ::-webkit-calendar-picker-indicator{filter:invert(70%)}.boc-light ::-webkit-calendar-picker-indicator{filter:invert(50%)}.boc-edit-form-instruments{margin:42px 10px 0 10px;text-align:center;min-height:70px}.boc-img-button svg{position:relative;top:12px}.boc-light .boc-toolbar-container svg circle,.boc-light .boc-toolbar-container svg line,.boc-light .boc-toolbar-container svg path{stroke:#8c8c8c!important}.boc-dark .boc-toolbar-container svg circle,.boc-dark .boc-toolbar-container svg line,.boc-dark .boc-toolbar-container svg path{stroke:#8c8c8c!important}.boc-dark .boc-toolbar-container svg rect{fill:#252526!important}.boc-dark .boc-toolbar-container [data-tlbr=minus] svg{border-left:1px solid #5b5b5b!important;border-right:1px solid #5b5b5b!important;border-bottom:1px solid #5b5b5b!important}.boc-dark .boc-toolbar-container [data-tlbr=plus] svg{border-left:1px solid #5b5b5b!important;border-right:1px solid #5b5b5b!important;border-top:1px solid #5b5b5b!important}.boc-dark .boc-toolbar-container [data-tlbr]>svg{border:1px solid #5b5b5b!important;background-color:#252526!important}.boc-toolbar-layout{height:123px;padding-top:20px;position:absolute;width:100%;left:"0";bottom:"-145px"}.boc-light .boc-toolbar-layout{border-top:1px solid #c7c7c7;background-color:#f9f9f9}.boc-dark .boc-toolbar-layout{border-top:1px solid #5b5b5b;background-color:#2b2b2b}.boc-dotted-connector path{stroke-dasharray:7}.boc-undo-redo{position:absolute;top:23px;left:23px}@media screen and (max-width:500px){.boc-undo-redo{position:absolute;top:83px;left:23px}}.boc-light .boc-undo-redo path{fill:#cacaca}.boc-dark .boc-undo-redo path{fill:#5b5b5b}.boc-light .boc-undo-redo .boc-ur-clickable path{fill:#9c9c9c}.boc-dark .boc-undo-redo .boc-ur-clickable path{fill:#8c8c8c}.boc-undo-redo .boc-ur-clickable rect{cursor:pointer}.boc-undo-redo>span{position:relative;display:inline-block;user-select:none}.boc-undo-redo .boc-undo-i{left:-6px;top:-6px}.boc-undo-redo .boc-redo-i{right:-6px;bottom:6px}.boc-undo-redo>span>span{color:#fff;position:absolute;display:inline-block;min-width:20px;min-height:20px;border-radius:50%;line-height:20px;text-align:center;padding:1px;user-select:none;cursor:pointer}.boc-light .boc-undo-redo>span>span{background-color:#9c9c9c}.boc-dark .boc-undo-redo>span>span{background-color:#8c8c8c}.boc-dark .treelist-pinned{filter:brightness(1.2)}.boc-light .treelist-pinned{filter:brightness(.9)}.boc-light .boc-scroll{fill:#fff}.boc-light .boc-scroll-thumb{fill:#c1c1c1}.boc-light .boc-scroll-thumb:hover{fill:#929292}.boc-dark .boc-scroll{fill:#1e1e1e}.boc-dark .boc-scroll-thumb{fill:#424242}.boc-dark .boc-scroll-thumb:hover{fill:#4f4f4f}</style>'},void 0===OrgChart&&(OrgChart={}),OrgChart.prototype.onField=function(e){return this.on("field",function(i,o){return e.call(i,o)})},OrgChart.prototype.onInit=function(e){return this.on("init",function(i){return e.call(i)})},OrgChart.prototype.onRedraw=function(e){return this.on("redraw",function(i){return e.call(i)})},OrgChart.prototype.onUpdateNode=function(e){return this.on("update",function(i,o,a){var s={oldData:o,newData:a};return e.call(i,s)})},OrgChart.prototype.onUpdated=function(e){return this.on("updated",function(i){return e.call(i)})},OrgChart.prototype.onRemoveNode=function(e){return this.on("remove",function(i,o,a){var s={id:o,newPidsAndStpidsForIds:a};return e.call(i,s)})},OrgChart.prototype.onAddNode=function(e){return this.on("add",function(i,o){var a={data:o};return e.call(i,a)})},OrgChart.prototype.onDrop=function(e){return this.on("drop",function(i,o,a,s,l){var c={dragId:o,dropId:a,dragNodeElement:s,event:l};return e.call(i,c)})},OrgChart.prototype.onDrag=function(e){return this.on("drag",function(i,o,a,s){var l={dragId:o,event:a,nodeIds:s};return e.call(i,l)})},OrgChart.prototype.onExpandCollapseButtonClick=OrgChart.prototype.onExpandCollpaseButtonClick=function(e){return this.on("expcollclick",function(i,o,a,s){var l={collapsing:o,id:a,ids:s};return e.call(i,l)})},OrgChart.prototype.onExportStart=function(e){return this.on("exportstart",function(i,o){return e.call(i,o)})},OrgChart.prototype.onExportEnd=function(e){return this.on("exportend",function(i,o){return e.call(i,o)})},OrgChart.prototype.onNodeClick=function(e){return this.on("click",function(i,o){return e.call(i,o)})},OrgChart.prototype.onCanvasClick=function(e){return this.on("canvas-click",function(i,o){return e.call(i,o)})},OrgChart.prototype.onNodeDoubleClick=function(e){return this.on("dbclick",function(i,o){var a={data:o};return e.call(i,a)})},OrgChart.prototype.onAIToolCalls=function(e){return this.on("ai-tool-calls",function(i,o){return e.call(i,o)})},OrgChart.filterUI=function(){},OrgChart.filterUI.prototype.init=function(e){this.instance=e,this.element=null,this.filterBy=null,this._event_id=OrgChart._guid()},OrgChart.filterUI.prototype.addFilterTag=function(e){if(!this.instance.config.filterBy)return!1;if(OrgChart.isNEU(e))return!1;if(null!==this.filterBy||"object"!=typeof this.instance.config.filterBy||Array.isArray(this.instance.config.filterBy)||(this.filterBy=JSON.parse(JSON.stringify(this.instance.config.filterBy))),null!=this.filterBy)for(var i in this.filterBy){var o=e[i];if(null!=o){var a=this.filterBy[i];if(null!=a){var s=a[o];if(null!=s&&!1===s.checked)return!0}}}return!1},OrgChart.filterUI.prototype.show=function(e){var i=this.element.querySelector('[data-filter-field="'+e+'"]');i&&i.click()},OrgChart.filterUI.prototype.hide=function(){var e=this.instance.element.querySelector("[data-filter-close]");e&&e.click()},OrgChart.filterUI.prototype._removeFilter=function(e){var i=this.instance.get(e);for(var o in this.filterBy){var a=this.filterBy[o];for(var s in i){var l=i[s];a[l]&&(a[l].checked=!0)}}this.update()},OrgChart.filterUI.prototype.update=function(){if(this.instance.config.filterBy){var e={};if("all"==this.instance.config.filterBy)for(var i=OrgChart.manager.getAllFields(this.instance.config),o=0;o<i.length;o++){var a=i[o];"tags"!=a&&"id"!=a&&"pid"!=a&&"ppid"!=a&&"stpid"!=a&&(e[a]={})}else if(Array.isArray(this.instance.config.filterBy))for(o=0;o<this.instance.config.filterBy.length;o++)e[this.instance.config.filterBy[o]]={};else if("object"==typeof this.instance.config.filterBy)for(var s in this.instance.config.filterBy)e[s]={};for(var l in e){var c=e[l];for(o=0;o<this.instance.config.nodes.length;o++){var d=this.instance.config.nodes[o][l];null!=d&&(c[d]||(c[d]={checked:!0,text:d}))}}if(null!=this.filterBy)for(var h in e)if(this.filterBy[h])for(var p in e[h])this.filterBy[h][p]&&(e[h][p]=this.filterBy[h][p]);if(OrgChart.FILTER_ALPHABETICALLY){var u=Object.keys(e).sort(),f=e;e={};for(o=0;o<u.length;o++){e[g=u[o]]=f[g]}for(var l in e){c=e[l];e[l]={};for(u=Object.keys(c).sort(),o=0;o<u.length;o++){var g=u[o];e[l][g]=c[g]}}}this.filterBy=e;var m=this;this.element=this.instance.element.querySelector("[data-filter]"),this.element&&this.element.parentNode.removeChild(this.element),this.element=document.createElement("div"),this.element.setAttribute("data-filter",""),this.element.style.position="absolute",this.element.setAttribute("class","boc-filter"),this.instance.config.undoRedoStorageName?(this.element.style.top=0,this.element.style.left="50%",this.element.style.transform="translate(-50%)"):(this.element.style.top=this.instance.config.padding+"px",this.element.style.left=this.instance.config.padding+"px");var b="";for(var h in this.filterBy){var x={name:h,html:`<div data-filter-field="${h}">${h}</div>`};OrgChart.events.publish("add-filter",[m,x]),b+=x.html}this.element.innerHTML=`<div>${b}</div>`,this.element.addEventListener("click",function(e){if(e.target.hasAttribute("data-filter-close")||e.target.hasAttribute("data-filter-field")){for(var i=e.target.getAttribute("data-filter-field"),o=m.instance.element.querySelectorAll("[data-filter-menu]"),a=0;a<o.length;a++)o[a].style.display="none";var s=m.instance.element.querySelectorAll(".filter-field-selected");for(a=0;a<s.length;a++)s[a].classList.remove("filter-field-selected");var l=m.instance.element.querySelector("[data-filter-close]");if(l&&l.parentNode.removeChild(l),e.target.hasAttribute("data-filter-close"))return;if(!e.target.hasAttribute("data-filter-field"))return;var c=m.instance.element.querySelector(`[data-filter-menu="${i}"]`);if(!c){var d="checked";for(var h in m.filterBy[i])m.filterBy[i][h].checked||(d="");var p={name:i,text:OrgChart.filterUI.all,value:i,checked:!0,html:`<div>\n <input data-all type="checkbox" id="${i}" name="${i}" ${d}>\n <label for="${i}">${OrgChart.filterUI.all}</label>\n </div>`};OrgChart.events.publish("add-item",[m,p]);var u=p.html;for(var f in m.filterBy[i]){var g=m.filterBy[i][f],b=g.text;null==b&&(b=f),p={name:i,text:b,value:f,checked:g.checked,html:`<div>\n <input type="checkbox" id="${i}_${f}" name="${f}" ${g.checked?"checked":""}>\n <label for="${i}_${f}">${b}</label>\n </div>`},OrgChart.events.publish("add-item",[m,p]),u+=p.html}c=document.createElement("div");var x=OrgChart.filterUI.textFilterBy;c.innerHTML=`<fieldset>\n <legend>${x} ${i}:</legend>\n ${u}\n </fieldset>`,c.setAttribute("data-filter-menu",i),c.classList.add("boc-filter-menu"),e.target.parentNode.parentNode.appendChild(c);var v=c.querySelectorAll("input");for(a=0;a<v.length;a++)v[a].addEventListener("change",function(e){for(var i=e.target;i&&!i.hasAttribute("data-filter-menu");)i=i.parentNode;if(i){var o=i.getAttribute("data-filter-menu");if(e.target.hasAttribute("data-all")){for(var a=e.target.parentNode.parentNode.querySelectorAll("input"),s=0;s<a.length;s++)if(a[s]!=e.target)for(var l in a[s].checked=e.target.checked,m.filterBy[o])m.filterBy[o][l].checked=e.target.checked}else if(null!=m.filterBy[o][this.name]&&(m.filterBy[o][this.name].checked=this.checked),this.checked)for(var c=m.instance.config.nodes,d=0;d<c.length;d++)if(c[d][o]==this.name)for(var h=c[d];h;)if(OrgChart.isNEU(h.stpid))h=OrgChart.isNEU(h.pid)?null:m.instance._get(h.pid);else if((h=m.instance._get(h.stpid))[o]){var p=e.target.parentNode.parentNode.querySelector('[name="'+h[o]+'"]');p?(p.checked=this.checked,m.filterBy[o][h[o]].checked=this.checked):console.error('Cannot find element with selector: [name="'+h[o]+'"]')}var u=!0;for(var f in m.filterBy[o])m.filterBy[o][f].checked||(u=!1);i.querySelector("[data-all]").checked=u,m.instance.draw()}})}c.style.display="block",e.target.classList.add("filter-field-selected"),(l=document.createElement("div")).classList.add("close"),l.innerHTML="x",l.setAttribute("data-filter-close",""),e.target.parentNode.appendChild(l),OrgChart.events.publish("show-items",[m,{name:i}])}}),this.instance.element.appendChild(this.element),OrgChart.events.publish("update",[this,{}])}},OrgChart.filterUI.prototype.on=function(e,i){return OrgChart.events.on(e,i,this._event_id),this},OrgChart.filterUI.textFilterBy="Filter by",OrgChart.filterUI.all="[All]",void 0===OrgChart&&(OrgChart={}),void 0===OrgChart.remote&&(OrgChart.remote={}),OrgChart.LIMIT_NODES=!0,OrgChart.remote._fromResDTO=function(e,i,o,a,s){var l=i[e.id];e.x=l.p[0],e.y=l.p[1],e.w=l.p[2],e.h=l.p[3],null!=l.ln&&(e.leftNeighbor=s[l.ln]),null!=l.rn&&(e.rightNeighbor=s[l.rn]),l.tl&&(e.treeList={},e.treeList.pinnedIds=l.tl[0],e.treeList.scrollTop=l.tl[1],e.treeList.scrollTopMax=l.tl[2],e.treeList.maxHeight=l.tl[3]);for(var c=0;c<e.stChildren.length;c++)OrgChart.remote._fromResDTO(e.stChildren[c],i,o,a,s);for(c=0;c<e.children.length;c++)OrgChart.remote._fromResDTO(e.children[c],i,o,a,s)},OrgChart.remote._toReqDTO=function(e,i){var o={p:[e.id,null!=e.parent?e.parent.id:null,null!=e.stParent?e.stParent.id:null,e.w,e.h]};e.children.length>0&&(o.c=OrgChart.remote._convertToIdArray(e.children)),e.stChildren.length>0&&(o.v=OrgChart.remote._convertToIdArray(e.stChildren)),null!=e.layout&&0!=e.layout&&(o.l=e.layout),e.isAssistant&&(o.a=1),e.isSplit&&(o.s=e.isSplit),e.isMirror&&(o.im=e.isMirror),e.padding&&(o.q=e.padding),e.lcn&&(o.k=e.lcn),e.stContainerNodes&&(o.b=OrgChart.remote._convertToIdArray(e.stContainerNodes)),e.isPartner&&(o.i=e.isPartner),e.hasPartners&&(o.g=e.hasPartners),e.partnerSeparation&&(o.e=e.partnerSeparation),e.treeList&&(o.z=[e.treeList.scrollTop,e.treeList.maxHeight]),i.push(o);for(var a=0;a<e.stChildren.length;a++)OrgChart.remote._toReqDTO(e.stChildren[a],i);for(a=0;a<e.children.length;a++)OrgChart.remote._toReqDTO(e.children[a],i)},OrgChart.remote._toReqLayoutConfigsDTO=function(e){var i={};for(var o in e){var a=e[o];i[o]||(i[o]=[]),i[o][0]=a.orientation,i[o][1]=a.levelSeparation,i[o][2]=a.mixedHierarchyNodesSeparation,i[o][3]=a.subtreeSeparation,i[o][4]=a.siblingSeparation,i[o][5]=a.layout,i[o][6]=a.columns,i[o][7]=a.collapse,i[o][8]=a.assistantSeparation,i[o][9]=a.partnerNodeSeparation}return i},OrgChart.remote._convertToIdArray=function(e){for(var i=[],o=0;o<e.length;o++)i.push(e[o].id);return i},OrgChart.remote._setPositions=function(e,i,o,a){for(var s=[],l=[],c=OrgChart.remote._toReqLayoutConfigsDTO(i),d=0;d<e.length;d++)l.push(e[d].id),OrgChart.remote._toReqDTO(e[d],s);var h={n:s,c:c,r:l,v:"9.00.19"};if(OrgChart.LIMIT_NODES||(h.l=!0),null!=OrgChart.remote._fromReqDTO)OrgChart.remote._fromReqDTO(h.n,h.r,h.c,function(i){for(var s=0;s<e.length;s++)OrgChart.remote._fromResDTO(e[s],i,0,e,a);o()});else{h=JSON.stringify(h);var p=OrgChart.localStorage.getItem(h);p&&(p=JSON.parse(p)),p&&!p.limit?OrgChart.remote._proceed(e,p,a,o):OrgChart.remote._findRegion(function(i){OrgChart._ajax(i,"post",h,"json",function(i){i.error?o(2):(OrgChart.remote._proceed(e,i,a,o),OrgChart.localStorage.setItem(h,JSON.stringify(i)))})})}},OrgChart.remote._proceed=function(e,i,o,a){if("string"==typeof i&&(i=JSON.parse(i)),i.limit&&1==i.limit)a(i.limit);else{for(var s=0;s<e.length;s++)OrgChart.remote._fromResDTO(e[s],i,0,e,o);a()}},OrgChart.remote._findRegion=function(e){var i=OrgChart.localStorage.getItem(OrgChart.FUNC_URL_NAME);if(i)e(i);else{for(var o=["defunc2","cusfunc2","bsfunc2","acfunc2","kcfunc2","safunc2","wifunc2"],a=[],s=0;s<o.length;s++)a.push(new XMLHttpRequest);for(s=0;s<o.length;s++)(function(){var i="https://"+o[s]+OrgChart.SERVER_PREFIX,l=a[s];l.onreadystatechange=function(){if(4==this.readyState&&200==this.status){OrgChart.localStorage.setItem(OrgChart.FUNC_URL_NAME,i),e(i);for(var o=0;o<a.length;o++)a[o].abort()}},l.open("GET",i,!0),l.send()})()}};var a=OrgChart;module.exports=a;
1
+ var e,i,o,OrgChart=function(e,i){var o=this;Object.defineProperty(this,"element",{get:()=>e?e.querySelector("[data-boc-content]"):null,set(e){o.mainElement=e}}),Object.defineProperty(this,"mainElement",{get:()=>e,set(i){(e=i)&&(e.innerHTML="\n <style> \n .boc-dark, .boc-light{ display: flex; }\n [data-boc-left]{ display: none; }\n [data-boc-right]{ height: 100%; position: relative; overflow:hidden; flex-grow: 1; }\n [data-boc-content]{ height: 100%; width: 100%; }\n @media screen and (max-width: 500px) {\n .boc-dark, .boc-light{ flex-direction: column; }\n [data-boc-left]{ order: 2; height: 50vh; }\n [data-boc-right]{ order: 1; }\n }\n </style>\n <div data-boc-left></div>\n <div data-boc-right>\n <div data-boc-content></div>\n </div>")}}),Object.defineProperty(this,"leftElement",{get:()=>e.querySelector("[data-boc-left]")}),o.init(e,i)};OrgChart.prototype.init=function(e,i){if(e&&!this._initCalled){this._initCalled=!0,("string"==typeof e||e instanceof String)&&(e=document.querySelector(e)),this.element=e;var o=this;if(this.config=OrgChart.mergeDeep(OrgChart._defaultConfig(i),i),this._layoutConfigs={base:{orientation:this.config.orientation,levelSeparation:this.config.levelSeparation,mixedHierarchyNodesSeparation:this.config.mixedHierarchyNodesSeparation,assistantSeparation:this.config.assistantSeparation,subtreeSeparation:this.config.subtreeSeparation,siblingSeparation:this.config.siblingSeparation,layout:this.config.layout,columns:this.config.columns,collapse:this.config.collapse,partnerNodeSeparation:this.config.partnerNodeSeparation}},this.config.tags)for(var a in this.config.tags){var s=this.config.tags[a];null!=s.subTreeConfig&&(this._layoutConfigs[a]={orientation:null!=s.subTreeConfig.orientation?s.subTreeConfig.orientation:this.config.orientation,levelSeparation:null!=s.subTreeConfig.levelSeparation?s.subTreeConfig.levelSeparation:this.config.levelSeparation,mixedHierarchyNodesSeparation:null!=s.subTreeConfig.mixedHierarchyNodesSeparation?s.subTreeConfig.mixedHierarchyNodesSeparation:this.config.mixedHierarchyNodesSeparation,assistantSeparation:null!=s.subTreeConfig.assistantSeparation?s.subTreeConfig.assistantSeparation:this.config.assistantSeparation,subtreeSeparation:null!=s.subTreeConfig.subtreeSeparation?s.subTreeConfig.subtreeSeparation:this.config.subtreeSeparation,siblingSeparation:null!=s.subTreeConfig.siblingSeparation?s.subTreeConfig.siblingSeparation:this.config.siblingSeparation,layout:null!=s.subTreeConfig.layout?s.subTreeConfig.layout:this.config.layout,columns:null!=s.subTreeConfig.columns?s.subTreeConfig.columns:this.config.columns,collapse:null!=s.subTreeConfig.collapse?s.subTreeConfig.collapse:this.config.collapse,partnerNodeSeparation:null!=s.subTreeConfig.partnerNodeSeparation?s.subTreeConfig.partnerNodeSeparation:this.config.partnerNodeSeparation,template:s.subTreeConfig.template})}this._event_id=OrgChart._guid(),OrgChart._validateConfig(this.config)&&(this._vScroll={},this.config.ui||(this.ui=OrgChart.ui),this.config.editUI?this.editUI=this.config.editUI:this.editUI=new OrgChart.editUI,this.editUI.init(this),this.config.filterUI?this.filterUI=this.config.filterUI:this.filterUI=new OrgChart.filterUI,this.filterUI.init(this),this.manager=new OrgChart.manager(this),this._ai=new OrgChart._ai(this),this.config.searchUI?this.searchUI=this.config.searchUI:this.searchUI=new OrgChart.searchUI,this.config.aiUI?this.aiUI=this.config.aiUI:this.aiUI=new OrgChart.aiUI,this.config.orgScribeUI?this.orgScribeUI=this.config.orgScribeUI:this.orgScribeUI=new OrgChart.orgScribeUI,this.config.powerPointPreviewUI?this.powerPointPreviewUI=this.config.powerPointPreviewUI:this.powerPointPreviewUI=new OrgChart.exportUI("pptx"),this.config.pdfPreviewUI?this.pdfPreviewUI=this.config.pdfPreviewUI:this.pdfPreviewUI=new OrgChart.exportUI("pdf"),this.config.svgPreviewUI?this.svgPreviewUI=this.config.svgPreviewUI:this.svgPreviewUI=new OrgChart.exportUI("svg"),this.config.pngPreviewUI?this.pngPreviewUI=this.config.pngPreviewUI:this.pngPreviewUI=new OrgChart.exportUI("png"),this.config.nodeMenuUI?this.nodeMenuUI=this.config.nodeMenuUI:this.nodeMenuUI=new OrgChart.menuUI,this.nodeMenuUI.init(this,this.config.nodeMenu),this.config.nodeCircleMenuUI?this.nodeCircleMenuUI=this.config.nodeCircleMenuUI:this.nodeCircleMenuUI=new OrgChart.circleMenuUI,this.nodeCircleMenuUI.init(this,this.config.nodeCircleMenu),this.config.nodeContextMenuUI?this.nodeContextMenuUI=this.config.nodeContextMenuUI:this.nodeContextMenuUI=new OrgChart.menuUI,this.nodeContextMenuUI.init(this,this.config.nodeContextMenu),this.config.controlsUI?this.controlsUI=this.config.controlsUI:this.controlsUI=new OrgChart.controlsUI,this.config.toolbarUI?this.toolbarUI=this.config.toolbarUI:this.toolbarUI=new OrgChart.toolbarUI,this.config.notifierUI?this.notifierUI=this.config.notifierUI:this.notifierUI=new OrgChart.notifierUI,this.notifierUI.init(this),this.config.menuUI?this.menuUI=this.config.menuUI:this.menuUI=new OrgChart.menuUI,this.menuUI.init(this,this.config.menu),this.config.xScrollUI||(this.xScrollUI=new OrgChart.xScrollUI(this.element,this.config,function(){return{boundary:o.response.boundary,scale:o.getScale(),viewBox:o.getViewBox(),padding:o.config.padding}},function(e){o.setViewBox(e)},function(){o._draw(!0,OrgChart.action.xScroll)})),this.config.yScrollUI||(this.yScrollUI=new OrgChart.yScrollUI(this.element,this.config,function(){return{boundary:o.response.boundary,scale:o.getScale(),viewBox:o.getViewBox(),padding:o.config.padding}},function(e){o.setViewBox(e)},function(){o._draw(!0,OrgChart.action.xScroll)})),this.config.undoRedoUI?this.undoRedoUI=this.config.undoRedoUI:this.undoRedoUI=new OrgChart.undoRedoUI,this.mainElement.classList.add("boc-"+this.config.mode),this._gragStartedId=null,this._timeout=null,this._touch=null,this._initialized=!1,this._loaded=!1,this._moveInterval=null,this._movePosition=null,this.response=null,this.nodes=null,this.isVisible=null,this._connectorLines={x:{},y:{}},OrgChart._intersectionObserver(this.element,function(e){o.isVisible=e,!1!==OrgChart.events.publish("visibility-change",[o])&&OrgChart.LAZY_LOADING&&o.isVisible&&(o._loaded?o._draw(!1,OrgChart.action.update):(o._setInitialSizeIfNotSet(),o._draw(!1,OrgChart.action.init)))}),this._resizeObserver=new ResizeObserver(e=>{for(let i of e){const{width:e,height:a}=i.contentRect;o._resizeHandler(e,a)}}),this._resizeObserver.observe(this.element))}},OrgChart.prototype.load=function(e,i){var o=this;return this.config.nodes=e,this._draw(!1,OrgChart.action.init,void 0,function(){o.filterUI.update(),i&&i()}),this},OrgChart.prototype.loadXML=function(e,i){var o=OrgChart._xml2json(e);return this.load(o,i)},OrgChart.prototype.getXML=function(){return OrgChart._json2xml(this.config.nodes)},OrgChart.prototype.on=function(e,i){return OrgChart.events.on(e,i,this._event_id),this},OrgChart.prototype.removeListener=function(e,i){return OrgChart.events.remove(e,i,this._event_id)},OrgChart.prototype.draw=function(e,i,o){null==e&&(e=OrgChart.action.update),this._draw(!1,e,i,o)},OrgChart.prototype._draw=function(e,i,o,a){var s=this;if(!OrgChart.LAZY_LOADING||this.isVisible)if(OrgChart.LAZY_LOADING||this._initialized||(this._setInitialSizeIfNotSet(),0!=this.width()&&0!=this.height())){this._hideBeforeAnimationCompleted=!1;var l=i==OrgChart.action.init?null:this.getViewBox();this.manager.read(e,this.width(),this.height(),l,i,o,function(e){if(!s.notifierUI.show(e.notif)){i!=OrgChart.action.exporting&&(s.nodes=e.nodes,s.visibleNodeIds=e.visibleNodeIds,s.roots=e.roots),s._connectorLines={x:{},y:{}},s.editUI.fields=e.allFields;var l={defs:""};OrgChart.events.publish("renderdefs",[s,l]);var c=s.ui.defs(l.defs),d=s.getScale(e.viewBox);c+=s.ui.pointer(s.config,i,d);var h=s.getViewBox(),p=e.viewBox;l={content:c,res:e};OrgChart.events.publish("prerender",[s,l]),c=l.content;var u=[];if(OrgChart.RENDER_LINKS_BEFORE_NODES)for(var f=0;f<e.visibleNodeIds.length;f++){var g=e.nodes[e.visibleNodeIds[f]];OrgChart.getRootOf(g).stParent?u.push(g.id):c+=s.ui.link(g,s,d,e.bordersByRootIdAndLevel,e.nodes,i)}for(f=0;f<e.visibleNodeIds.length;f++){g=e.nodes[e.visibleNodeIds[f]];var m=s._get(g.id);if(OrgChart.RENDER_LINKS_BEFORE_NODES&&u.includes(g.id)&&(c+=s.ui.link(g,s,d,e.bordersByRootIdAndLevel,e.nodes,i)),g.isTreeListItem||(c+=s.ui.node(g,m,e.animations,s.config,void 0,void 0,void 0,i,d,s)),!g.min&&g.treeList){var renderTreeListIterate=function(o){if(!g.treeList.pinnedIds.includes(o.id)){var a=s._get(o.id);c+=s.ui.node(o,a,e.animations,s.config,void 0,void 0,void 0,i,d,s),c+=s.ui.expandCollapseBtn(s,o,a,s.config,s._layoutConfigs,i,d)}for(var l of o.children)renderTreeListIterate(l)},b=OrgChart.randomId();for(var x of(c+=`<clipPath id="treelist_${b}">\n <rect rx="10" ry="10" x="${g.x+g.padding[3]}" y="${g.y+g.padding[0]}" width="${g.w-g.padding[1]-g.padding[3]}" height="${g.h-g.padding[2]-g.padding[0]}">\n </clipPath><g clip-path="url(#treelist_${b})"><g data-treelist-content="${g.id}" transform="matrix(1,0,0,1,0,-${g.treeList.scrollTop})">`,g.stChildren))renderTreeListIterate(x);for(var v of g.treeList.pinnedIds){var y=s.getNode(v),_=s._get(v);c+=s.ui.node(y,_,e.animations,s.config,void 0,void 0,void 0,i,d,s,!0),c+=s.ui.expandCollapseBtn(s,y,_,s.config,s._layoutConfigs,i,d)}var{thumbHeight:w,thumbPosition:k,scrollBarDisplay:I}=OrgChart._treeListGetTumbPositionFromScrollTop(g);c+=`</g>\n\n \n <rect style="display: ${I}" data-treelist-scroll="${g.id}" class="boc-scroll" x="${g.x+g.w-g.padding[1]-OrgChart.TREELIST_SCROLLBAR_WIDTH}" y="${g.y+g.padding[0]}" width="${OrgChart.TREELIST_SCROLLBAR_WIDTH}" height="${g.h-g.padding[2]-g.padding[0]}"></rect>\n <rect style="display: ${I}" data-treelist-thumb="${g.id}" class="boc-scroll-thumb" x="${g.x+g.w-g.padding[1]-OrgChart.TREELIST_SCROLLBAR_WIDTH}" y="${k}" width="${OrgChart.TREELIST_SCROLLBAR_WIDTH}" height="${w}"></rect>\n\n </g>`}}for(f=0;f<e.visibleNodeIds.length;f++){g=e.nodes[e.visibleNodeIds[f]],m=s._get(g.id);g.isTreeListItem||(OrgChart.RENDER_LINKS_BEFORE_NODES||(c+=s.ui.link(g,s,d,e.bordersByRootIdAndLevel,e.nodes,i)),c+=s.ui.expandCollapseBtn(s,g,m,s.config,s._layoutConfigs,i,d))}l={content:c,res:e};if(OrgChart.events.publish("render",[s,l]),c=l.content,e=l.res,c+=s.ui.lonely(s.config),i!==OrgChart.action.exporting){i!==OrgChart.action.centernode&&i!==OrgChart.action.insert&&i!==OrgChart.action.expand&&i!==OrgChart.action.collapse&&i!==OrgChart.action.update||(p=h),i===OrgChart.action.init&&null!=h&&(p=h),i===OrgChart.action.centerNode&&null!=h&&(p=h),s.response=e,s._lastSize={width:s.width(),height:s.height()};M=s.ui.svg("100%","100%",p,s.config,c);if(s._initialized){var S=s.getSvg(),C=S.parentNode;C.removeChild(S),C.insertAdjacentHTML("afterbegin",M),s._attachEventHandlers(),s.xScrollUI.addListener(s.getSvg()),s.yScrollUI.addListener(s.getSvg()),s.xScrollUI.setPosition(),s.yScrollUI.setPosition()}else s.element.innerHTML=s.ui.css()+M+s.ui.menuButton(s.config)+s.ui.aiButton(s.config),s._attachEventHandlers(),s.xScrollUI.create(s.width(),s.config.padding),s.xScrollUI.setPosition(),s.xScrollUI.addListener(s.getSvg()),s.yScrollUI.create(s.height(),s.config.padding),s.yScrollUI.setPosition(),s.yScrollUI.addListener(s.getSvg()),s.config.enableSearch&&s.searchUI.init(s),s.aiUI.init(s),s.orgScribeUI.init(s),s.powerPointPreviewUI.init(s),s.pdfPreviewUI.init(s),s.svgPreviewUI.init(s),s.pngPreviewUI.init(s),s.toolbarUI.init(s,s.config.toolbar),s.undoRedoUI.init(s),s.controlsUI.init(s);var L=!1,A=s.response.animations;if(A[0].length>0){s._hideBeforeAnimation(A[0].length);for(f=0;f<A[0].length;f++)A[0][f]=s.getNodeElement(A[0][f]);OrgChart.animate(A[0],A[1],A[2],s.config.anim.duration,s.config.anim.func,function(){L||(a&&a.call(s),OrgChart.events.publish("redraw",[s]),s._showAfterAnimation(),L=!0)})}i===OrgChart.action.centerNode?OrgChart.animate(s.getSvg(),{viewbox:h},{viewbox:s.response.viewBox},s.config.anim.duration,s.config.anim.func,function(){s.ripple(o.options.rippleId),L||(a&&a.call(s),OrgChart.events.publish("redraw",[s]),s._showAfterAnimation(),L=!0)},function(){s.xScrollUI.setPosition(),s.yScrollUI.setPosition()}):!h||!s.response||h[0]==s.response.viewBox[0]&&h[1]==s.response.viewBox[1]&&h[2]==s.response.viewBox[2]&&h[3]==s.response.viewBox[3]||i!==OrgChart.action.insert&&i!==OrgChart.action.expand&&i!==OrgChart.action.collapse&&i!==OrgChart.action.update&&i!==OrgChart.action.init?0==A[0].length&&(L||(a&&a.call(s),OrgChart.events.publish("redraw",[s]),L=!0)):OrgChart.animate(s.getSvg(),{viewbox:h},{viewbox:s.response.viewBox},2*s.config.anim.duration,s.config.anim.func,function(){s.xScrollUI.setPosition(),s.yScrollUI.setPosition(),L||(a&&a.call(s),OrgChart.events.publish("redraw",[s]),L=!0)}),s._initialized||(s._initialized=!0,s.filterUI.update(),s._ai.setContext(),OrgChart.events.publish("init",[s])),!s._loaded&&e&&e.nodes&&Object.keys(e.nodes).length&&(s._loaded=!0)}else{var E=e.boundary,N=E.maxX-E.minX,$=E.maxY-E.minY,M=s.ui.svg(N,$,[E.minX,E.minY,N,$],s.config,c,d);a.call(s,M,e)}}},function(e){OrgChart.events.publish("ready",[s,e])})}else console.error("Cannot load the chart with size 0! If you are using the OrgChart within tabs set OrgChart.LAZY_LOADING to true! ")},OrgChart.prototype._setInitialSizeIfNotSet=function(){this.mainElement.style.overflow="hidden",this.mainElement.style.position="relative",0==this.mainElement.offsetHeight&&(this.mainElement.style.height="100%",0==this.mainElement.offsetHeight&&(this.mainElement.style.height="700px")),0==this.mainElement.offsetWidth&&(this.mainElement.style.width="100%",0==this.mainElement.offsetWidth&&(this.mainElement.style.width="700px"))},OrgChart.prototype.width=function(){return this.element.offsetWidth},OrgChart.prototype.height=function(){return this.element.offsetHeight},OrgChart.prototype.getViewBox=function(){var e=this.getSvg();return OrgChart._getViewBox(e)},OrgChart.prototype.setViewBox=function(e){this.getSvg().setAttribute("viewBox",e.toString())},OrgChart.prototype.getScale=function(e){return e||(e=this.getViewBox()),OrgChart.getScale(e,this.width(),this.height(),this.config.scaleInitial,this.config.scaleMax,this.config.scaleMin)},OrgChart.prototype.setScale=function(e){e>this.config.scaleMax&&(e=this.config.scaleMax),e<this.config.scaleMin&&(e=this.config.scaleMin);var i=this.getViewBox().slice(0),o=this.width(),a=this.height(),s=o/i[2],l=a/i[3],c=s>l?l:s,d=i,h=i[2],p=i[3];return i[2]=i[2]/(e/c),i[3]=i[3]/(e/c),i[0]=d[0]-(i[2]-h)/2,i[1]=d[1]-(i[3]-p)/2,this.setViewBox(i),OrgChart.events.publish("redraw",[this]),e},OrgChart.prototype.ripple=function(e,i,o){var a=this.getNode(e);if(null!=a){var s=this.getNodeElement(e);if(null!=s){var l=this.getScale(),c=a.w/2,d=a.h/2;if(void 0!==i&&void 0!==o){var h=s.getBoundingClientRect();c=i/l-h.left/l,d=o/l-h.top/l}var p=a.w,u=a.h,f=p-c>c?p-c:c,g=u-d>d?u-d:d,m=f>g?f:g,b=document.createElementNS("http://www.w3.org/2000/svg","g"),x=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),v=document.createElementNS("http://www.w3.org/2000/svg","rect"),y=document.createElementNS("http://www.w3.org/2000/svg","circle"),_=OrgChart.randomId();x.setAttribute("id",_);var w={ripple:OrgChart.t(a.templateName,a.min,this.getScale()).ripple,node:a};OrgChart.events.publish("ripple",[this,w]),v.setAttribute("x",w.ripple.rect?w.ripple.rect.x:0),v.setAttribute("y",w.ripple.rect?w.ripple.rect.y:0),v.setAttribute("width",w.ripple.rect?w.ripple.rect.width:a.w),v.setAttribute("height",w.ripple.rect?w.ripple.rect.height:a.h),v.setAttribute("rx",w.ripple.radius),v.setAttribute("ry",w.ripple.radius),y.setAttribute("clip-path","url(#"+_+")"),y.setAttribute("cx",c),y.setAttribute("cy",d),y.setAttribute("r",0),y.setAttribute("fill",w.ripple.color),y.setAttribute("class","boc-ripple"),x.appendChild(v),b.appendChild(x),b.appendChild(y),s.appendChild(b),OrgChart.animate(y,{r:0,opacity:1},{r:m,opacity:0},500,OrgChart.anim.outPow,function(){s.removeChild(b)})}}},OrgChart.prototype.centerOutNodes=function(e){if(this._centerInNodes){var i=JSON.parse(this._centerInNodes);this._centerInNodes=null;var o=this;this._centerInNodesTimeout=OrgChart.animate(this.getSvg(),{viewBox:this.getViewBox()},{viewBox:i},300,this.config.anim.func,function(){o.draw(OrgChart.action.update,null,function(){e&&e.call(o)})})}},OrgChart.prototype.centerInNodes=function(e,i){var o=this.getViewBox();this._centerInNodes||(this._centerInNodes=JSON.stringify(o));var a=Number.MAX_SAFE_INTEGER,s=Number.MIN_SAFE_INTEGER,l=Number.MAX_SAFE_INTEGER,c=Number.MIN_SAFE_INTEGER;for(var d of e)d.y<a&&(a=d.y),d.y+d.h>s&&(s=d.y+d.h),d.x<l&&(l=d.x),d.x+d.w>c&&(c=d.x+d.w);var h=c-l,p=s-a,u=(f=h/(h+2*this.config.padding))>(g=p/(p+2*this.config.padding))?g:f;u>this.config.scaleMax&&(u=this.config.scaleMax),u<this.config.scaleMin&&(u=this.config.scaleMin);var f,g,m=[50,50],b=this.width(),x=this.height(),v=(f=b/o[2])>(g=x/o[3])?g:f,y=o,_=o[2],w=o[3];o[2]=o[2]/(u/v),o[3]=o[3]/(u/v),o[0]=y[0]-(o[2]-_)/(100/m[0]),o[1]=y[1]-(o[3]-w)/(100/m[1]),o[0]=l-(b/u-h)/2,o[1]=a-(x/u-p)/2;var k=this;this._centerInNodesTimeout&&(clearTimeout(this._centerInNodesTimeout),this._centerInNodesTimeout=null),this._centerInNodesTimeout=OrgChart.animate(this.getSvg(),{viewBox:this.getViewBox()},{viewBox:o},300,this.config.anim.func,function(){k.draw(OrgChart.action.update,null,function(){i&&i.call(k)})})},OrgChart.prototype.center=function(e,i,o){var a,s,l=e,c=!0,d=!0;i&&null!=i.parentState&&(a=i.parentState),i&&null!=i.childrenState&&(s=i.childrenState),i&&null!=i.rippleId&&(l=i.rippleId),i&&null!=i.vertical&&(c=i.vertical),i&&null!=i.horizontal&&(d=i.horizontal);var h={parentState:a,childrenState:s,rippleId:l,vertical:c,horizontal:d};this._draw(!1,OrgChart.action.centerNode,{id:e,options:h},o)},OrgChart.prototype.fit=function(e){this.config.scaleInitial=OrgChart.match.boundary,this._draw(!0,OrgChart.action.init,{method:"fit"},e)},OrgChart.prototype.fitIfOutside=function(e){this.config.scaleInitial=OrgChart.match.boundaryIfOutside,this._draw(!0,OrgChart.action.init,{method:"fit"},e)},OrgChart.prototype.toggleFullScreen=function(){var e=document.querySelector("["+OrgChart.attr.tlbr+"r='fullScreen']");document.fullscreenElement==this.element||document.webkitFullscreenElement==this.element||document.mozFullScreenElement==this.element||document.msFullscreenElement==this.element?(document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen(),e&&(e.innerHTML=OrgChart.toolbarUI.openFullScreenIcon)):(this.element.requestFullscreen?this.element.requestFullscreen():this.element.mozRequestFullScreen?this.element.mozRequestFullScreen():this.element.webkitRequestFullscreen?this.element.webkitRequestFullscreen():this.element.msRequestFullscreen&&this.element.msRequestFullscreen(),e&&(e.innerHTML=OrgChart.toolbarUI.closeFullScreenIcon))},OrgChart.prototype.getNode=function(e){return this.nodes[e]},OrgChart.prototype.setLayout=function(e,i){i||(i="base"),this._layoutConfigs[i].layout=e,"base"==i&&(this.config.layout=e),this._draw(!1,OrgChart.action.update)},OrgChart.prototype.setOrientation=function(e,i,o){var a=this;i||(i="base"),this._layoutConfigs[i].orientation=e,"base"==i&&(this.config.orientation=e),this._draw(!1,OrgChart.action.update,void 0,function(){a.getScale(),OrgChart._moveToBoundaryArea(a.getSvg(),a.getViewBox(),a.response.boundary,function(){a._draw(!0,OrgChart.action.pan),o&&o()})})},OrgChart.prototype.search=function(e,i,o){return OrgChart.isNEU(i)&&(i=this.searchUI._searchFields),OrgChart.isNEU(o)&&(o=i),OrgChart._search.search(this.config.nodes,e,i,o,this.config.searchDisplayField,this.config.searchFieldsWeight,this.searchUI._searchFieldsAbbreviation)},OrgChart.prototype._hideBeforeAnimation=function(e){if(1!=this._hideBeforeAnimationCompleted&&!(e&&e<OrgChart.ANIM_THRESHOLD)){var i=this.element.getElementsByTagName("text");if(i.length>OrgChart.TEXT_THRESHOLD)for(var o=0;o<i.length;o++)i[o].style.display="none";var a=this.element.getElementsByTagName("image");if(a.length>OrgChart.IMAGES_THRESHOLD)for(o=0;o<a.length;o++)a[o].style.display="none";var s=this.element.querySelectorAll("["+OrgChart.attr.link_id+"]");if(s.length>OrgChart.LINKS_THRESHOLD)for(o=0;o<s.length;o++)s[o].style.display="none";var l=this.element.querySelectorAll("["+OrgChart.attr.control_expcoll_id+"]");if(l.length>OrgChart.BUTTONS_THRESHOLD)for(o=0;o<l.length;o++)l[o].style.display="none";var c=this.element.querySelectorAll("["+OrgChart.attr.control_up_id+"]");if(c.length>OrgChart.BUTTONS_THRESHOLD)for(o=0;o<c.length;o++)c[o].style.display="none";this._hideBeforeAnimationCompleted=!0}},OrgChart.prototype._showAfterAnimation=function(){for(var e=this.element.getElementsByTagName("text"),i=0;i<e.length;i++)e[i].style.display="";var o=this.element.getElementsByTagName("image");for(i=0;i<o.length;i++)o[i].style.display="";var a=this.element.querySelectorAll("["+OrgChart.attr.link_id+"]");for(i=0;i<a.length;i++)a[i].style.display="";var s=this.element.querySelectorAll("["+OrgChart.attr.control_expcoll_id+"]");for(i=0;i<s.length;i++)s[i].style.display="";var l=this.element.querySelectorAll("["+OrgChart.attr.control_up_id+"]");for(i=0;i<l.length;i++)l[i].style.display="";this._hideBeforeAnimationCompleted=!1},OrgChart.prototype.isChild=function(e,i){for(var o=this.getNode(i);o;){if(o.id==e)return!0;o=o.parent?o.parent:o.stParent}return!1},OrgChart.prototype.getCollapsedIds=function(e){for(var i=[],o=0;o<e.childrenIds.length;o++){var a=this.getNode(e.childrenIds[o]);1==a.collapsed&&i.push(a.id)}return i},OrgChart.prototype.stateToUrl=function(){if(this.manager.state){var e={};return e.exp=this.manager.state.exp.join("*"),e.min=this.manager.state.min.join("*"),e.adjustify=this.manager.state.adjustify.x+"*"+this.manager.state.adjustify.y,e.scale=this.manager.state.scale,e.y=this.manager.state.x,e.x=this.manager.state.y,new URLSearchParams(e).toString()}return""},OrgChart.prototype.generateId=function(){for(;;){var e="_"+("0000"+(Math.random()*Math.pow(36,4)|0).toString(36)).slice(-4);if(null==this.nodes||!this.nodes.hasOwnProperty(e))return e}},OrgChart.prototype.moveNodesToVisibleArea=function(e,i){for(var o=this,a=this.roots[0],s=this.getSvg(),l=this.getViewBox(),c=null,d=null,h=null,p=null,u=0;u<e.length;u++){var f=this.nodes[e[u]];null!=f.x&&null!=f.y&&((null===c||c<f.x+f.w)&&(c=f.x+f.w),(null===d||d<f.y+f.h)&&(d=f.y+f.h),(null===h||h>f.x)&&(h=f.x),(null===p||p>f.y)&&(p=f.y))}if(null!=c&&null!=d&&null!=h&&null!=p){var g=this.width(),m=this.height(),b=g/(w=c-h+2*this.config.padding),x=m/(k=d-p+2*this.config.padding),v=b>x?x:b,y=Math.ceil(g/v),_=Math.ceil(m/v),w=0,k=0;if(y-2*this.config.padding>=c-h)w=(c+h)/2-y/2;else switch(w=a.x-y/2+OrgChart.manager._getNodeWidth(a,this.config)/2,this.config.orientation){case OrgChart.orientation.right:case OrgChart.orientation.right_top:(w=-(y/2-(h-c)/2))<this.config.padding-y&&(w=this.config.padding-y);break;case OrgChart.orientation.left:case OrgChart.orientation.bottom_left:case OrgChart.orientation.top_left:case OrgChart.orientation.left_top:(w=-(y/2-(c-h)/2))>-this.config.padding&&(w=-this.config.padding)}if(_-2*this.config.padding>=d-p)k=(d+p)/2-_/2;else switch((k=-(_/2-(d-p)/2))>-this.config.padding&&(k=-this.config.padding),this.config.orientation){case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:(k=-(_/2-(p-d)/2))<this.config.padding-_&&(k=this.config.padding-_);break;case OrgChart.orientation.left:case OrgChart.orientation.right:k=a.y-_/2+OrgChart.manager._getNodeWidth(a,this.config)/2}var I=[w,k,y,_];l[0]!==I[0]||l[1]!==I[1]?OrgChart.animate(s,{viewBox:l},{viewBox:I},this.config.anim.duration,this.config.anim.func,function(){o.draw(OrgChart.action.update,void 0,i)}):i&&i()}},OrgChart.prototype._nodeHasHiddenParent=function(e){return!e.parent&&!OrgChart.isNEU(e.pid)&&this.getNode(e.pid)},OrgChart.prototype.destroy=function(){this._initCalled=!1,this._resizeObserver.unobserve(this.element),OrgChart.events.removeForEventId(this._event_id),this.element.innerHTML=null},OrgChart._defaultConfig=function(e){return{interactive:!0,mode:"light",lazyLoading:"auto",enableDragDrop:!1,enableSearch:!0,enableAI:!1,enablePan:!0,keyNavigation:!1,miniMap:!1,controls:null,nodeMenu:null,nodeCircleMenu:null,nodeContextMenu:null,menu:null,toolbar:!1,nodeMouseClick:OrgChart.action.details,nodeMouseDbClick:OrgChart.none,mouseScrool:OrgChart.action.ctrlZoom,showXScroll:!1,showYScroll:!1,template:"ana",tags:{},min:!1,nodeBinding:{},linkBinding:{},searchFields:null,searchDisplayField:null,searchFieldsWeight:null,searchFieldsAbbreviation:null,nodes:[],clinks:[],slinks:[],backdrops:[],groupDottedLines:[],dottedLines:[],undoRedoStorageName:null,levelSeparation:60,siblingSeparation:20,subtreeSeparation:40,backdropSeparation:15,mixedHierarchyNodesSeparation:15,assistantSeparation:100,minPartnerSeparation:50,partnerChildrenSplitSeparation:20,partnerNodeSeparation:15,columns:10,padding:30,orientation:OrgChart.orientation.top,layout:OrgChart.layout.normal,layoutGridColumns:"dynamic",scaleInitial:OrgChart.match.boundaryIfOutside,movable:null,scaleMin:.1,scaleMax:5,orderBy:null,editUI:null,aiUI:null,orgScribeUI:null,powerPointPreviewUI:null,pdfPreviewUI:null,svgPreviewUI:null,pngPreviewUI:null,filterUI:null,searchUI:null,xScrollUI:null,yScrollUI:null,nodeMenuUI:null,controlsUI:null,nodeCircleMenuUI:null,nodeContextMenuUI:null,toolbarUI:null,notifierUI:null,menuUI:null,undoRedoUI:null,exportUrl:"https://balkan.app/export",serverUrl:"https://serverjs.balkan.app",aiChatTools:[],collapse:{},expand:{},align:OrgChart.CENTER,UI:null,anim:{func:OrgChart.anim.outPow,duration:200},zoom:{speed:120,smooth:12},roots:null,state:null,editForm:{readOnly:!1,titleBinding:"name",photoBinding:"img",addMore:"Add more fields",addMoreBtn:"Add",addMoreFieldName:"Field name",saveAndCloseBtn:"Save and close",generateElementsFromFields:!0,focusBinding:null,buttons:{edit:{icon:OrgChart.icon.edit(24,24,"#fff"),text:"Edit",hideIfEditMode:!0,hideIfDetailsMode:!1},share:{icon:OrgChart.icon.share(24,24,"#fff"),text:"Share"},pdf:{icon:OrgChart.icon.pdf(24,24,"#fff"),text:"Save as PDF"},remove:{icon:OrgChart.icon.remove(24,24,"#fff"),text:"Remove",hideIfDetailsMode:!0}},elements:[]}}},OrgChart.localStorage={},OrgChart.localStorage.getItem=function(e){var i=localStorage.getItem("to_date");if(i){if((i=new Date(i))<new Date){for(var o=0,a=localStorage.length;o<a;++o){var s=localStorage.key(o);s&&s.startsWith&&s.startsWith('{"n"')&&localStorage.removeItem(s)}localStorage.removeItem("to_date")}}else(i=new Date).setDate(i.getDate()+5),i=i.toISOString(),localStorage.setItem("to_date",i);return localStorage.getItem(e)},OrgChart.localStorage.setItem=function(e,o){try{localStorage.setItem(e,o)}catch(i){i.code==i.QUOTA_EXCEEDED_ERR?(console.warn("Local storage quota exceeded"),localStorage.clear()):(console.error("Local storage error code:"+i.code),console.error(i))}},OrgChart.prototype.canUpdateLink=function(e,i){if(null==i||null==i)return!1;if(null==e||null==e)return!1;if(e==i)return!1;var o=this.getNode(i),a=this.getNode(e);return!(o&&a&&(o.isPartner||o.hasPartners&&a.isAssistant||o.hasAssistants&&a.isPartner))&&!this.isChild(e,i)},OrgChart.prototype._canUpdateLink=OrgChart.prototype.canUpdateLink,OrgChart.prototype.updateNode=function(e,i,o,a){if(e){var s=this,l=this.get(e.id);if(!0===o&&!1===OrgChart.events.publish("update",[this,l,e]))return!1;this.update(e),this._ai.setContext(),OrgChart.events.publish("updated",[this]),this.filterUI.update();var c=this.getNode(e.id),d=c.pid;null==d&&(d=c.stpid),this._draw(!1,OrgChart.action.update,{id:d},function(){a||s.ripple(e.id),i&&i()})}},OrgChart.prototype.update=function(e){for(var i=0;i<this.config.nodes.length;i++)if(this.config.nodes[i].id==e.id){this._putInUndoStack(),this.clearRedo(),this.config.nodes[i]=e;break}return this},OrgChart.prototype.removeNode=function(e,i,o){if(!this.canRemove(e))return!1;var a=this._getNewPidsAndStpidsForIds(e);return(!0!==o||!1!==OrgChart.events.publish("remove",[this,e,a]))&&(this.remove(e),this._ai.setContext(),OrgChart.events.publish("updated",[this]),this.filterUI.update(),this._draw(!1,OrgChart.action.update,null,function(){i&&i()}),!0)},OrgChart.prototype.remove=function(e){var i=this.get(e);if(i){this._putInUndoStack(),this.clearRedo();for(var o=this.config.nodes.length-1;o>=0;o--)this.config.nodes[o].pid!=e&&this.config.nodes[o].stpid!=e||(this.config.nodes[o].pid=i.pid,this.config.nodes[o].stpid=i.stpid),this.config.nodes[o].id==e&&this.config.nodes.splice(o,1)}return this},OrgChart.prototype._getNewPidsAndStpidsForIds=function(e){var i=this.get(e),o={},a={};if(i)for(var s=this.config.nodes.length-1;s>=0;s--)this.config.nodes[s].pid==e?o[this.config.nodes[s].id]=i.pid:this.config.nodes[s].stpid==e&&(a[this.config.nodes[s].id]=i.stpid);return{newPidsForIds:o,newStpidsForIds:a}},OrgChart.prototype.addNode=function(e,i,o){var a=this;if(!0===o&&!1===OrgChart.events.publish("add",[this,e]))return!1;this.add(e),this._ai.setContext(),OrgChart.events.publish("updated",[this]),this.filterUI.update(),a._draw(!1,OrgChart.action.insert,{id:e.pid,insertedNodeId:e.id},function(){a.ripple(e.id),i&&i()})},OrgChart.prototype.add=function(e){if(null==e.id&&console.error("Call addNode without id"),this._putInUndoStack(),this.clearRedo(),this.config.movable&&!OrgChart.isNEU(e.pid)){var i=this._get(e.pid);i&&(null!=i.movex&&(e.movex=i.movex),null!=i.movey&&(e.movey=i.movey))}return this.config.nodes.push(e),this},OrgChart.prototype.replaceIds=function(e,i){this._replaceIds(e),this._draw(!1,OrgChart.action.update,void 0,i)},OrgChart.prototype._replaceIds=function(e){for(var replaceSecondLinksIds=function(i){for(var o=0;o<i.length;o++){var a=i[o];for(var s in e){var l=e[s];a.from==s&&(a.from=l),a.to==s&&(a.to=l)}}},i=0;i<this.config.nodes.length;i++){var o=this.config.nodes[i];for(var a in e){var s=e[a];o.id==a&&(o.id=s),o.pid==a&&(o.pid=s),o.stpid==a&&(o.stpid=s),o.ppid==a&&(o.ppid=s)}}if(Array.isArray(this.config.roots))for(i=0;i<this.config.roots.length;i++)OrgChart.isNEU(e[this.config.roots[i]])||(this.config.roots[i]=e[this.config.roots[i]]);if(this.nodes)for(var l in this.nodes)if(!OrgChart.isNEU(e[l])){s=e[l];(c=this.nodes[l]).id=s,this.nodes[s]=c}if(this.manager.oldNodes)for(var l in this.manager.oldNodes)if(!OrgChart.isNEU(e[l])){s=e[l];(c=this.manager.oldNodes[l]).id=s,this.manager.oldNodes[s]=c}if(this.roots)for(var l in this.roots)if(!OrgChart.isNEU(e[l])){var c;s=e[l];(c=this.roots[l]).id=s,this.roots[s]=c}replaceSecondLinksIds(this.config.clinks),replaceSecondLinksIds(this.config.slinks),replaceSecondLinksIds(this.config.groupDottedLines),replaceSecondLinksIds(this.config.dottedLines)},OrgChart.prototype._get=function(e){var i=this.__get(e);if(i)return i;if((this.config.groupDottedLines.length||this.config.dottedLines.length)&&!OrgChart.isNEU(e)&&"string"==typeof e&&(-1!=e.indexOf("balkan_group_dotted_")||-1!=e.indexOf("balkan_dotted_"))){var o=(e=(e=e.replace("balkan_group_dotted_","")).replace("balkan_dotted_","")).indexOf("_balkan_id_");if(e=e.substring(o+11),i=this.__get(e))return i}return null},OrgChart.prototype.__get=function(e){for(var i=0;i<this.config.nodes.length;i++)if(this.config.nodes[i].id==e)return this.config.nodes[i];return null},OrgChart.prototype.get=function(e){var i=this._get(e);return null==i?null:JSON.parse(JSON.stringify(i))},OrgChart.prototype.canRemove=function(e){var i=this.getNode(e);return!!i&&(!i.hasPartners&&!i.hasAssistants)},void 0===OrgChart&&(OrgChart={}),OrgChart._ajax=function(e,i,o,a,s){null==a&&(a="arraybuffer");var l=new XMLHttpRequest;for(var c in l.onload=function(e){4==l.readyState&&200===this.status&&(null==e.target?s(this.response):s(e.target.response))},l.onerror=function(e){s({error:e})},l.open(i,e),l.responseType=a,l.setRequestHeader("Content-Type","application/json"),OrgChart.REQUEST_CUSTOM_HEADERS)l.setRequestHeader(c,OrgChart.REQUEST_CUSTOM_HEADERS[c]);null==o?l.send():l.send(o)},void 0===OrgChart&&(OrgChart={}),OrgChart.animate=function(e,i,o,a,s,l,c){var d,h=10,p=1,u=a/h+1;return document.getElementsByTagName("g"),Array.isArray(e)||(e=[e]),Array.isArray(i)||(i=[i]),Array.isArray(o)||(o=[o]),d=setInterval(function(){for(var f=0;f<e.length;f++)for(var g in o[f]){var m=OrgChart._arrayContains(["top","left","right","bottom","width","height"],g.toLowerCase())?"px":"";switch(g.toLowerCase()){case"d":var b=s((p*h-h)/a)*(o[f][g][0]-i[f][g][0])+i[f][g][0],x=s((p*h-h)/a)*(o[f][g][1]-i[f][g][1])+i[f][g][1];e[f].setAttribute("d",e[f].getAttribute("d")+" L"+b+" "+x);break;case"r":var v=s((p*h-h)/a)*(o[f][g]-i[f][g])+i[f][g];e[f].setAttribute("r",v);break;case"x1":v=s((p*h-h)/a)*(o[f][g]-i[f][g])+i[f][g];e[f].setAttribute("x1",v);break;case"x2":v=s((p*h-h)/a)*(o[f][g]-i[f][g])+i[f][g];e[f].setAttribute("x2",v);break;case"y1":v=s((p*h-h)/a)*(o[f][g]-i[f][g])+i[f][g];e[f].setAttribute("y1",v);break;case"y2":v=s((p*h-h)/a)*(o[f][g]-i[f][g])+i[f][g];e[f].setAttribute("y2",v);break;case"scrolltop":v=s((p*h-h)/a)*(o[f][g]-i[f][g])+i[f][g];e[f].scrollTop=v;break;case"rotate3d":if(o[f][g]){var y=i[f][g],_=o[f][g],w=[0,0,0,0];for(var k in y)w[k]=s((p*h-h)/a)*(_[k]-y[k])+y[k];e[f].style.transform="rotate3d("+w.toString()+"deg)"}break;case"transform":if(o[f][g]){y=i[f][g],_=o[f][g],w=[0,0,0,0,0,0];for(var k in y)w[k]=s((p*h-h)/a)*(_[k]-y[k])+y[k];e[f].hasAttribute("transform")?e[f].setAttribute("transform","matrix("+w.toString()+")"):e[f].style.transform="matrix("+w.toString()+")"}break;case"viewbox":if(o[f][g]){y=i[f][g],_=o[f][g],w=[0,0,0,0];for(var k in y)w[k]=s((p*h-h)/a)*(_[k]-y[k])+y[k];e[f].setAttribute("viewBox",w.toString())}break;case"margin":if(o[f][g]){y=i[f][g],_=o[f][g],w=[0,0,0,0];for(var k in y)w[k]=s((p*h-h)/a)*(_[k]-y[k])+y[k];var I="";for(k=0;k<w.length;k++)I+=parseInt(w[k])+"px ";e[f]&&e[f].style&&(e[f].style[g]=I)}break;case"scrolly":v=s((p*h-h)/a)*(o[f][g]-i[f][g])+i[f][g];e[f].scrollTo(0,v);break;default:v=s((p*h-h)/a)*(o[f][g]-i[f][g])+i[f][g];e[f]&&e[f].style&&(e[f].style[g]=v+m)}}if(c){v=s((p*h-h)/a);c(v)}(p+=1)>u+1&&(clearInterval(d),l&&l(e))},h)},OrgChart.anim={},OrgChart.anim.inPow=function(e){return e<0?0:e>1?1:Math.pow(e,2)},OrgChart.anim.outPow=function(e){if(e<0)return 0;if(e>1)return 1;return-1*(Math.pow(e-1,2)+-1)},OrgChart.anim.inOutPow=function(e){if(e<0)return 0;if(e>1)return 1;if((e*=2)<1)return OrgChart.anim.inPow(e,2)/2;return-.5*(Math.pow(e-2,2)+-2)},OrgChart.anim.inSin=function(e){return e<0?0:e>1?1:1-Math.cos(e*(Math.PI/2))},OrgChart.anim.outSin=function(e){return e<0?0:e>1?1:Math.sin(e*(Math.PI/2))},OrgChart.anim.inOutSin=function(e){return e<0?0:e>1?1:-.5*(Math.cos(Math.PI*e)-1)},OrgChart.anim.inExp=function(e){return e<0?0:e>1?1:Math.pow(2,10*(e-1))},OrgChart.anim.outExp=function(e){return e<0?0:e>1?1:1-Math.pow(2,-10*e)},OrgChart.anim.inOutExp=function(e){return e<0?0:e>1?1:e<.5?.5*Math.pow(2,10*(2*e-1)):.5*(2-Math.pow(2,10*(-2*e+1)))},OrgChart.anim.inCirc=function(e){return e<0?0:e>1?1:-(Math.sqrt(1-e*e)-1)},OrgChart.anim.outCirc=function(e){return e<0?0:e>1?1:Math.sqrt(1-(e-1)*(e-1))},OrgChart.anim.inOutCirc=function(e){return e<0?0:e>1?1:e<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(2*e-2)*(2*e-2))+1)},OrgChart.anim.rebound=function(e){return e<0?0:e>1?1:e<1/2.75?1-7.5625*e*e:e<2/2.75?1-(7.5625*(e-1.5/2.75)*(e-1.5/2.75)+.75):e<2.5/2.75?1-(7.5625*(e-2.25/2.75)*(e-2.25/2.75)+.9375):1-(7.5625*(e-2.625/2.75)*(e-2.625/2.75)+.984375)},OrgChart.anim.inBack=function(e){return e<0?0:e>1?1:e*e*(2.70158*e-1.70158)},OrgChart.anim.outBack=function(e){return e<0?0:e>1?1:(e-1)*(e-1)*(2.70158*(e-1)+1.70158)+1},OrgChart.anim.inOutBack=function(e){return e<0?0:e>1?1:e<.5?4*e*e*(7.1898*e-2.5949)*.5:.5*((2*e-2)*(2*e-2)*(3.5949*(2*e-2)+2.5949)+2)},OrgChart.anim.impulse=function(e){var i=2*e;return i*Math.exp(1-i)},OrgChart.anim.expPulse=function(e){return Math.exp(-2*Math.pow(e,2))},void 0===OrgChart&&(OrgChart={}),OrgChart.prototype._attachEventHandlers=function(e){if(this.config.interactive){e=this.getSvg();var i=this;e.addEventListener("touchstart",function(e){e.preventDefault(),i._globalMouseDownHandler.apply(i,[this,e])},{passive:!1}),e.addEventListener("mousedown",function(e){i._globalMouseDownHandler.apply(i,[this,e])},{passive:!0}),e.addEventListener("contextmenu",function(e){i._globalContextHandler.apply(i,[this,e])},{passive:!1}),e.addEventListener("dblclick",function(e){i._globalDbClickHandler.apply(i,[this,e])},{passive:!0}),this.config.mouseScrool!=OrgChart.action.none&&e.addEventListener("wheel",function(e){i._mouseScrollHandler.apply(i,[this,e])},{passive:!1});var o=this.getMenuButton();o&&o.addEventListener("click",function(e){i._menuClickHandler.apply(i,[this,e])})}},void 0===OrgChart&&(OrgChart={}),OrgChart.VERSION="9.1.75",OrgChart.orientation={},OrgChart.orientation.top=0,OrgChart.orientation.bottom=1,OrgChart.orientation.right=2,OrgChart.orientation.left=3,OrgChart.orientation.top_left=4,OrgChart.orientation.bottom_left=5,OrgChart.orientation.right_top=6,OrgChart.orientation.left_top=7,OrgChart.anchor={top_right:"top_right",right_top:"right_top",bottom_right:"bottom_right",right_bottom:"right_bottom",top_left:"top_left",left_top:"left_top",bottom_left:"bottom_left",left_bottom:"left_bottom",top:"top",bottom:"bottom",left:"left",right:"right"},OrgChart.align={},OrgChart.align.center=OrgChart.CENTER=8,OrgChart.align.orientation=OrgChart.ORIENTATION=9,OrgChart.attr={},OrgChart.attr.l="data-l",OrgChart.attr.id="data-id",OrgChart.attr.sl="data-sl",OrgChart.attr.lbl="data-lbl",OrgChart.attr.val="data-val",OrgChart.attr.tlbr="data-tlbr",OrgChart.attr.item="data-item",OrgChart.attr.layout="data-layout",OrgChart.attr.node_id="data-n-id",OrgChart.attr.link_id="data-l-id",OrgChart.attr.field_name="data-f-name",OrgChart.attr.c_link_to="data-c-l-to",OrgChart.attr.c_link_from="data-c-l-from",OrgChart.attr.s_link_to="data-s-l-to",OrgChart.attr.s_link_from="data-s-l-from",OrgChart.attr.control_add="data-ctrl-add",OrgChart.attr.control_expcoll_id="data-ctrl-ec-id",OrgChart.attr.control_up_id="data-ctrl-up-id",OrgChart.attr.control_export_menu="data-ctrl-menu",OrgChart.attr.control_node_menu_id="data-ctrl-n-menu-id",OrgChart.attr.control_node_circle_menu_id="data-ctrl-n-c-menu-id",OrgChart.attr.control_node_circle_menu_name="data-ctrl-n-c-menu-name",OrgChart.attr.control_node_circle_menu_wrraper_id="data-ctrl-n-c-menu-wrapper-id",OrgChart.attr.width="data-width",OrgChart.attr.text_overflow="data-text-overflow",OrgChart.ID="id",OrgChart.PID="pid",OrgChart.STPID="stpid",OrgChart.TAGS="tags",OrgChart.NODES="nodes",OrgChart.ELASTIC="elastic",OrgChart.ASSISTANT="Assistant",OrgChart.action={},OrgChart.action.expand=0,OrgChart.action.collapse=1,OrgChart.action.maximize=101,OrgChart.action.minimize=102,OrgChart.action.expandCollapse=501,OrgChart.action.edit=1,OrgChart.action.zoom=2,OrgChart.action.ctrlZoom=22,OrgChart.action.scroll=41,OrgChart.action.xScroll=3,OrgChart.action.yScroll=4,OrgChart.action.none=5,OrgChart.action.init=6,OrgChart.action.update=7,OrgChart.action.move=70,OrgChart.action.pan=8,OrgChart.action.centerNode=9,OrgChart.action.resize=10,OrgChart.action.insert=11,OrgChart.action.insertfirst=12,OrgChart.action.details=13,OrgChart.action.exporting=14,OrgChart.none=400001,OrgChart.scroll={},OrgChart.scroll.visible=!0,OrgChart.scroll.smooth=12,OrgChart.scroll.speed=120,OrgChart.scroll.safari={smooth:12,speed:250},OrgChart.match={},OrgChart.match.height=100001,OrgChart.match.width=100002,OrgChart.match.boundary=100003,OrgChart.match.boundaryIfOutside=100004,OrgChart.match.none=1,OrgChart.movable={},OrgChart.movable.node="node",OrgChart.movable.tree="tree",OrgChart.movable.detachTree="detachTree",OrgChart.layout={},OrgChart.layout.normal=OrgChart.normal=0,OrgChart.layout.mixed=OrgChart.mixed=1,OrgChart.layout.tree=OrgChart.tree=2,OrgChart.layout.treeLeftOffset=OrgChart.treeLeftOffset=3,OrgChart.layout.treeRightOffset=OrgChart.treeRightOffset=4,OrgChart.layout.treeLeft=5,OrgChart.layout.treeRight=6,OrgChart.layout.grid=-1,OrgChart.layout.treeList=-2,OrgChart.nodeOpenTag="<g "+OrgChart.attr.node_id+'="{id}" style="opacity: {opacity}" transform="matrix(1,0,0,1,{x},{y})" class="{class}" '+OrgChart.attr.sl+'="{sl}" '+OrgChart.attr.l+'="{level}" {lcn}>',OrgChart.linkOpenTag="<g "+OrgChart.attr.link_id+'="[{id}][{child-id}]" class="{class}">',OrgChart.expcollOpenTag="<g "+OrgChart.attr.control_expcoll_id+'="{id}" transform="matrix(1,0,0,1,{x},{y})" style="cursor:pointer;">',OrgChart.upOpenTag="<g "+OrgChart.attr.control_up_id+'="{id}" transform="matrix(1,0,0,1,{x},{y})" style="cursor:pointer;">',OrgChart.linkFieldsOpenTag='<g transform="matrix(1,0,0,1,{x},{y}) rotate({rotate})">',OrgChart.grCloseTag="</g>",OrgChart.A5={width:420,height:595},OrgChart.A4={width:595,height:842},OrgChart.A3={width:842,height:1191},OrgChart.A2={width:1191,height:1684},OrgChart.A1={width:1684,height:2384},OrgChart.Letter={width:612,height:791},OrgChart.Legal={width:612,height:1009},OrgChart.Legal={width:612,height:1009},OrgChart.Widescreen={width:720,height:1280},OrgChart.Standard={width:720,height:960},OrgChart.COLLAPSE_PARENT_NEIGHBORS=1,OrgChart.COLLAPSE_SUB_CHILDRENS=2,OrgChart.COLLAPSE_PARENT_SUB_CHILDREN_EXCEPT_CLICKED=3,OrgChart.TEXT_THRESHOLD=4e3,OrgChart.IMAGES_THRESHOLD=1e3,OrgChart.LINKS_THRESHOLD=2e3,OrgChart.BUTTONS_THRESHOLD=700,OrgChart.ANIM_THRESHOLD=500,OrgChart.IT_IS_LONELY_HERE='<g transform="translate(-100, 0)" style="cursor:pointer;" '+OrgChart.attr.control_add+'="control-add"><text fill="#039be5">{link}</text></g>',OrgChart.RES={},OrgChart.IT_IS_LONELY_HERE_LINK=OrgChart.RES.IT_IS_LONELY_HERE_LINK="It's lonely here, add your first node",OrgChart.FIRE_DRAG_NOT_CLICK_IF_MOVE=3,OrgChart.STRING_TAGS=!1,OrgChart.MAX_NODES_MESS="The trial has expired or 200 nodes limit was reached! <br /><a style='color: #039BE5;' target='_blank' href='https://balkan.app/OrgChartJS/Docs/Evaluation'>See more</a>",OrgChart.OFFLINE_MESS="The evaluation version requires internet connection! <br /><a style='color: #039BE5;' target='_blank' href='https://balkan.app/OrgChartJS/Docs/Evaluation'>See more</a>",OrgChart.SEARCH_PLACEHOLDER="Search... type ? to get help.",OrgChart.SEARCH_HELP_SYMBOL="?",OrgChart.SEARCH_CLOSE_RESULT_ON_ESCAPE_OR_CLICKOUTSIDE=!1,OrgChart.SEARCH_RESULT_LIMIT=10,OrgChart.IMPORT_MESSAGE="Choose the columns (fields) in your data file that contain the required information.",OrgChart.FIXED_POSITION_ON_CLICK=!1,OrgChart.RENDER_LINKS_BEFORE_NODES=!1,OrgChart.RENDER_CLINKS_BEFORE_NODES=!1,OrgChart.MIXED_LAYOUT_ALL_NODES=!1,OrgChart.MIXED_LAYOUT_FOR_NODES_WITH_COLLAPSED_CHILDREN=!1,OrgChart.MIXED_LAYOUT_IF_NUMBER_OF_CHILDREN_IS_MORE_THEN=1,OrgChart.LINK_ROUNDED_CORNERS=5,OrgChart.MOVE_STEP=5,OrgChart.CLINK_CURVE=1,OrgChart.MAX_DEPTH=200,OrgChart.SCALE_FACTOR=1.44,OrgChart.LAZY_LOADING_FACTOR="auto",OrgChart.LAZY_LOADING=!0,OrgChart.ARRAY_FIELDS=["tags"],OrgChart.CSV_DELIMITER=",",OrgChart.EDITFORM_CLOSE_BTN='<svg data-edit-from-close class="boc-edit-form-close"><path style="fill:#ffffff;" d="M21.205,5.007c-0.429-0.444-1.143-0.444-1.587,0c-0.429,0.429-0.429,1.143,0,1.571l8.047,8.047H1.111 C0.492,14.626,0,15.118,0,15.737c0,0.619,0.492,1.127,1.111,1.127h26.554l-8.047,8.032c-0.429,0.444-0.429,1.159,0,1.587 c0.444,0.444,1.159,0.444,1.587,0l9.952-9.952c0.444-0.429,0.444-1.143,0-1.571L21.205,5.007z"></path></svg>',OrgChart.ESCAPE_HTML=!1,OrgChart.VERTICAL_CHILDREN_ASSISTANT=!1,OrgChart.EXPORT_PAGES_CUT_NODES=!1,OrgChart.RESET_MOVABLE_ONEXPANDCOLLAPSE=!1,OrgChart.FILTER_ALPHABETICALLY=!0,OrgChart.SERVER_PREFIX=".azurewebsites.net/api/you-see-this-request-because-it-is-trial-version-of-orgchartjs",OrgChart.FUNC_URL_NAME="func-url-orgchartjs",OrgChart.MINIMUM_SYMBOLS_IN_SEARCH_INPUT=1,OrgChart.AI_SYSTEM_MESSAGES=[],OrgChart.ORGSCRIBE_OFFSET=" ",OrgChart.TREELIST_WHEEL_STEP="auto",OrgChart.TREELIST_SCROLLBAR_WIDTH=10,OrgChart.CONVERT_IMAGES_TO_BASE64_BEFORE_EXPORT=!1,OrgChart.REQUEST_CUSTOM_HEADERS={},OrgChart.SLINK_GAP=7,OrgChart._intersects=function(e,i,o){var a=e.x-o.siblingSeparation/4,s=e.y,l=e.x+e.w+o.siblingSeparation/4,c=e.y;switch(o.orientation){case OrgChart.orientation.right:case OrgChart.orientation.right_top:case OrgChart.orientation.left:case OrgChart.orientation.left_top:a=e.x,s=e.y-o.siblingSeparation/4,l=e.x,c=e.y+e.h+o.siblingSeparation/4}var d,h,p=i.p,u=i.q,f=i.r,g=i.s,m=(l-a)*(g-u)-(f-p)*(c-s);return 0!==m&&(d=((s-c)*(f-a)+(l-a)*(g-s))/m,0<(h=((g-u)*(f-a)+(p-f)*(g-s))/m)&&h<1&&0<d&&d<1)},OrgChart._addPoint=function(e,i,o,a,s){switch(o.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:return OrgChart._addPointTop(e,i,o,a,s);case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:return OrgChart._addPointBottom(e,i,o,a,s);case OrgChart.orientation.left:case OrgChart.orientation.left_top:return OrgChart._addPointLeft(e,i,o,a,s);case OrgChart.orientation.right:case OrgChart.orientation.right_top:return OrgChart._addPointRight(e,i,o,a,s)}},OrgChart._addPointTop=function(e,i,o,a,s){var l,c,d;return"left"==s?l=e.leftNeighbor?e.x+(e.leftNeighbor.x+e.leftNeighbor.w-e.x)/2:e.x-o.siblingSeparation/2:"right"==s&&(l=e.rightNeighbor?e.x+e.w+(e.rightNeighbor.x-(e.x+e.w))/2:e.x+e.w+o.siblingSeparation/2),i.push([l,i[i.length-1][1]]),i.push([l,e.y-o.levelSeparation/3]),c=i[i.length-1][1],d=l,a.p=l,a.q=c,a.r=d,a},OrgChart._addPointBottom=function(e,i,o,a,s){var l,c,d;return"left"==s?l=e.leftNeighbor?e.x+(e.leftNeighbor.x+e.leftNeighbor.w-e.x)/2:e.x-o.siblingSeparation/2:"right"==s&&(l=e.rightNeighbor?e.x+e.w+(e.rightNeighbor.x-(e.x+e.w))/2:e.x+e.w+o.siblingSeparation/2),i.push([l,i[i.length-1][1]]),i.push([l,e.y+e.h+o.levelSeparation/3]),c=i[i.length-1][1],d=l,a.p=l,a.q=c,a.r=d,a},OrgChart._addPointLeft=function(e,i,o,a,s){var l,c=i[i.length-1][0];"bottom"==s?l=e.rightNeighbor?e.y+e.h+(e.rightNeighbor.y-(e.y+e.h))/2:e.y+e.h+o.siblingSeparation/2:"top"==s&&(l=e.leftNeighbor?e.y+(e.leftNeighbor.y+e.leftNeighbor.h-e.y)/2:e.y-o.siblingSeparation/2),i.push([i[i.length-1][0],l]),i.push([e.x-o.levelSeparation/3,l]),c=i[i.length-1][0];var d=l;return a.p=c,a.q=l,a.s=d,a},OrgChart._addPointRight=function(e,i,o,a,s){var l,c=i[i.length-1][0];"bottom"==s?l=e.rightNeighbor?e.y+e.h+(e.rightNeighbor.y-(e.y+e.h))/2:e.y+e.h+o.siblingSeparation/2:"top"==s&&(l=e.leftNeighbor?e.y+(e.leftNeighbor.y+e.leftNeighbor.h-e.y)/2:e.y-o.siblingSeparation/2),i.push([i[i.length-1][0],l]),i.push([e.x+e.w+o.levelSeparation/3,l]),c=i[i.length-1][0];var d=l;return a.p=c,a.q=l,a.s=d,a},OrgChart._addConnectorLines=function(e,i){OrgChart._addConnectorLine(e,{x1:i.xa,y1:i.ya,x2:i.xb,y2:i.yb}),OrgChart._addConnectorLine(e,{x1:i.xb,y1:i.yb,x2:i.xc,y2:i.yc}),OrgChart._addConnectorLine(e,{x1:i.xc,y1:i.yc,x2:i.xd,y2:i.yd})},OrgChart._addConnectorLine=function(e,i){if(i.x1==i.x2){if(e.x[i.x1]||(e.x[i.x1]=[]),i.y1>i.y2){var o=i.y1;i.y1=i.y2,i.y2=o}e.x[i.x1].push({y1:i.y1,y2:i.y2})}if(i.y1==i.y2){if(e.y[i.y1]||(e.y[i.y1]=[]),i.x1>i.x2){var a=i.x1;i.x1=i.x2,i.x2=a}e.y[i.y1].push({x1:i.x1,x2:i.x2})}},OrgChart._addLineToPath=function(e,i,o){return OrgChart._avoidOverlapping(i,o),e.push([o.x1,o.y1]),e.push([o.x2,o.y2]),OrgChart._addConnectorLine(i,o),o},OrgChart._slinkRemoveUnusedPoints=function(e){for(var i=e.length-2;i>=1;i--){var o=e[i-1],a=e[i],s=e[i+1];(a[0]==o[0]&&a[0]==s[0]||a[1]==o[1]&&a[1]==s[1])&&e.splice(i,1)}},OrgChart._slinkAvoidOverlaping=function(e,i,o,a){for(var s=1;s<i.length;s++){var l=i[s-1],c=i[s];if(l[0]==c[0]){for(var d=e.x[c[0]];d;){var h=!0;for(var p of d)if(p.y1<=l[1]&&p.y2>=l[1]||p.y1<=c[1]&&p.y2>=c[1]){a==OrgChart.orientation.top||a==OrgChart.orientation.top_left?"left"==o?c[0]-=OrgChart.SLINK_GAP:"right"==o&&(c[0]+=OrgChart.SLINK_GAP):a!=OrgChart.orientation.bottom&&a!=OrgChart.orientation.bottom_left||("right"==o?c[0]+=OrgChart.SLINK_GAP:"left"==o&&(c[0]-=OrgChart.SLINK_GAP)),h=!1;break}if(h)break;d=e.x[c[0]]}l[0]=c[0]}var u=!0;if(l[1]==c[1]&&l[0]>=c[0]&&(u=!1),u&&l[1]==c[1]){for(d=e.y[c[1]];d;){h=!0;for(var p of d)if(p.x1<=l[0]&&p.x2>=l[0]||p.x1<=c[0]&&p.x2>=c[0]){l[0]>=c[0]||(a==OrgChart.orientation.top||a==OrgChart.orientation.top_left?c[1]-=OrgChart.SLINK_GAP:a!=OrgChart.orientation.bottom&&a!=OrgChart.orientation.bottom_left||(c[1]+=OrgChart.SLINK_GAP),h=!1);break}if(h)break;d=e.y[c[1]]}l[1]=c[1]}u&&OrgChart._addConnectorLine(e,{x1:l[0],y1:l[1],x2:c[0],y2:c[1]})}},OrgChart._slinkAvoidOverlapingSecond=function(e,i,o){for(var a=1;a<i.length;a++){var s=i[a-1],l=i[a],c=!1;if(s[1]==l[1]){for(var d=e.y[l[1]];d;){var h=!0;for(var p of d)if(p.x1<=s[0]&&p.x2>=s[0]||p.x1<=l[0]&&p.x2>=l[0]){s[0]>=l[0]?(o==OrgChart.orientation.top||o==OrgChart.orientation.top_left?l[1]-=OrgChart.SLINK_GAP:o!=OrgChart.orientation.bottom&&o!=OrgChart.orientation.bottom_left||(l[1]+=OrgChart.SLINK_GAP),h=!1):c=!0;break}if(h)break;d=e.y[l[1]]}s[1]=l[1]}c||OrgChart._addConnectorLine(e,{x1:s[0],y1:s[1],x2:l[0],y2:l[1]})}},OrgChart._slinkAvoidOverlaping2=function(e,i,o,a){for(var s=1;s<i.length;s++){var l=i[s-1],c=i[s];if(l[1]==c[1]){for(var d=e.y[c[1]];d;){var h=!0;for(var p of d)if(p.x1<=l[0]&&p.x2>=l[0]||p.x1<=c[0]&&p.x2>=c[0]){a==OrgChart.orientation.left||a==OrgChart.orientation.left_top?"top"==o?c[1]-=OrgChart.SLINK_GAP:"bottom"==o&&(c[1]+=OrgChart.SLINK_GAP):a!=OrgChart.orientation.right&&a!=OrgChart.orientation.right_top||("bottom"==o?c[1]+=OrgChart.SLINK_GAP:"top"==o&&(c[1]-=OrgChart.SLINK_GAP)),h=!1;break}if(h)break;d=e.y[c[1]]}l[1]=c[1]}var u=!0;if(l[0]==c[0]&&l[1]>=c[1]&&(u=!1),u&&l[0]==c[0]){for(d=e.x[c[0]];d;){h=!0;for(var p of d)if(p.y1<=l[1]&&p.y2>=l[1]||p.y1<=c[1]&&p.y2>=c[1]){l[1]>=c[1]||(a==OrgChart.orientation.left||a==OrgChart.orientation.left_top?c[0]-=OrgChart.SLINK_GAP:a!=OrgChart.orientation.right&&a!=OrgChart.orientation.right_top||(c[0]+=OrgChart.SLINK_GAP),h=!1);break}if(h)break;d=e.x[c[0]]}l[0]=c[0]}u&&OrgChart._addConnectorLine(e,{x1:l[0],y1:l[1],x2:c[0],y2:c[1]})}},OrgChart._slinkAvoidOverlapingSecond2=function(e,i,o){for(var a=1;a<i.length;a++){var s=i[a-1],l=i[a],c=!1;if(s[0]==l[0]){for(var d=e.x[l[0]];d;){var h=!0;for(var p of d)if(p.y1<=s[1]&&p.y2>=s[1]||p.y1<=l[1]&&p.y2>=l[1]){s[1]>=l[1]?(o==OrgChart.orientation.left||o==OrgChart.orientation.left_top?l[0]-=OrgChart.SLINK_GAP:o!=OrgChart.orientation.right&&o!=OrgChart.orientation.right_top||(l[0]+=OrgChart.SLINK_GAP),h=!1):c=!0;break}if(h)break;d=e.x[l[0]]}s[0]=l[0]}c||OrgChart._addConnectorLine(e,{x1:s[0],y1:s[1],x2:l[0],y2:l[1]})}},OrgChart.editUI=function(){},OrgChart.editUI.prototype.init=function(e){this.obj=e,this.fields=null,this.nodeId=null,this.detailsMode=null,this._event_id=OrgChart._guid()},OrgChart.editUI.prototype.on=function(e,i){return OrgChart.events.on(e,i,this._event_id),this},OrgChart.editUI.prototype.show=function(e,i,o){if(this.hide(!0)){if(this.nodeId=e,this.detailsMode=i,!1===OrgChart.events.publish("show",[this,e]))return!1;var a=this,s=this.content(e,i,o);this.obj.element.appendChild(s.element),OrgChart.input.init(this.obj.element),OrgChart.events.publish("shown",[this,{nodeId:e}]),o?i||this._focusElement(s.focusId):this.interval=OrgChart.animate(s.element,{right:-20,opacity:0},{right:0,opacity:1},300,OrgChart.anim.outSin,function(){i||a._focusElement(s.focusId)}),this.obj.element.querySelector("[data-edit-from-close]").addEventListener("click",function(i){i.preventDefault(),!1!==OrgChart.events.publish("cancel",[a,{id:e}])&&a.hide()}),this.obj.element.querySelector("[data-edit-from-save]").addEventListener("click",function(e){e.preventDefault(),a.hide()});for(var l=this.obj.element.querySelectorAll("[data-input-btn]"),c=0;c<l.length;c++)l[c].addEventListener("click",function(i){i.preventDefault(),OrgChart.events.publish("element-btn-click",[a,{input:this.parentNode.querySelector("input"),nodeId:e,event:i}])});this.obj.element.querySelector("[data-add-more-fields-btn]").addEventListener("click",function(e){e.stopPropagation(),e.preventDefault();var i=this,o=OrgChart.elements.textbox({},{type:"textbox",label:a.obj.config.editForm.addMoreFieldName,btn:a.obj.config.editForm.addMoreBtn},"280px");i.parentNode.insertAdjacentHTML("beforebegin",o.html),i.style.display="none",OrgChart.input.init(i.parentNode.previousSibling);var s=document.getElementById(o.id);s.focus(),s.nextElementSibling.addEventListener("click",function(e){e.stopPropagation(),e.preventDefault();var o=s.value,l=a.obj.element.querySelector('[data-binding="'+OrgChart._escapeDoubleQuotes(s.value)+'"]');if(OrgChart.isNEU(o)||l)s.focus();else{var c=OrgChart.elements.textbox({},{type:"textbox",label:o,binding:o},"280px");s.parentNode.parentNode.parentNode.removeChild(s.parentNode.parentNode),i.parentNode.insertAdjacentHTML("beforebegin",c.html),i.style.display="",OrgChart.input.init(i.parentNode.previousSibling);var d=document.getElementById(c.id);d.focus(),d.addEventListener("input",function(){a._drawCurrentNodeElement()})}})}),this.obj.element.querySelector("[data-boc-edit-from-btns]").addEventListener("click",function(i){for(var o=i.target;o&&o.hasAttribute&&!o.hasAttribute("data-edit-from-btn");)o=o.parentNode;if(o&&o.hasAttribute){var s=o.getAttribute("data-edit-from-btn"),l={button:a.obj.config.editForm.buttons[s],name:s,nodeId:e,event:i};if(!1===OrgChart.events.publish("button-click",[a,l]))return!1;switch(s){case"edit":a.obj.editUI.show(e,!1,!0);break;case"pdf":a.obj.exportToPDFProfile(e),a.hide();break;case"share":a.obj.shareProfile(e);break;case"remove":a.obj.removeNode(e,null,!0),a.hide()}}});var d=this.obj.element.querySelectorAll("[data-boc-edit-form] [data-binding]");for(c=0;c<d.length;c++){var h=d[c];h.getAttribute("data-binding")&&h.addEventListener("input",function(){a._drawCurrentNodeElement()})}}},OrgChart.editUI.prototype._drawCurrentNodeElement=function(){var e=this.obj.element.querySelector("[data-boc-edit-form]"),i=OrgChart.input.getData(e),o=this.obj.get(this.nodeId),a=this.obj.getNode(this.nodeId),s=OrgChart.mergeDeep(o,i),l=this.obj.ui.node(a,s,[],this.obj.config,void 0,void 0,void 0,void 0,this.obj.getScale(),this.obj);this._replaceNodeWith(l)},OrgChart.editUI.prototype._replaceNodeWith=function(e){var i=document.createElementNS("http://www.w3.org/2000/svg","g");i.innerHTML=e;var o=i.firstElementChild;this.obj.getNodeElement(this.nodeId).replaceWith(o)},OrgChart.editUI.prototype.setAvatar=function(e){var i=this.obj.element.querySelector('[id="boc-avatar"]'),o=this.obj.element.querySelector('[id="boc-avatar"] img'),a=this.obj.element.querySelector('[id="boc-avatar"] svg');i&&(o?o.setAttribute("src",e):a&&(i.innerHTML=`<img style="width: 100%;height:100%;border-radius: 50%;object-fit:cover;" src="${e}">`),this._drawCurrentNodeElement())},OrgChart.editUI.prototype.save=function(e){var i=this.obj.element.querySelector("[data-boc-edit-form]"),o=OrgChart.input.validateAndGetData(i);if(!1!==o){var a=this.obj.get(this.nodeId),s={data:OrgChart.mergeDeep(a,o)};if(!1===OrgChart.events.publish("save",[this,s]))return;return this.obj.updateNode(s.data,null,!0,e),!0}return!1},OrgChart.editUI.prototype._focusElement=function(e){var i=null;OrgChart.isNEU(this.obj.config.editForm.focusBinding)?OrgChart.isNEU(e)||(i=document.getElementById(e)):i=this.obj.element.querySelector('[data-binding="'+this.obj.config.editForm.focusBinding+'"]'),i&&(i.value&&i.value.length&&i.setSelectionRange(i.value.length,i.value.length),i.focus())},OrgChart.editUI.prototype.content=function(e,i,o,a,s){var l,c=this.obj.config.editForm.readOnly,d=JSON.parse(JSON.stringify(this.obj.config.editForm.elements)),h=this.obj.config.editForm.addMore,p=this.obj.config.editForm.saveAndCloseBtn,u=this.obj.config.editForm.buttons,f=this.obj.config.editForm.titleBinding,g=this.obj.config.editForm.photoBinding,m=this.obj.getNode(e),b=this.obj._get(e),x=OrgChart.t(m.templateName,m.min,this.obj.getScale()),v=b[f],y=b[g];if(this.obj.config.editForm.generateElementsFromFields)for(var _=0;_<this.fields.length;_++){var w=this.fields[_];if("tags"!=w){for(var k=!1,I=0;I<d.length;I++){if(Array.isArray(d[I])){for(var S=0;S<d[I].length;S++)if(w==d[I][S].binding){k=!0;break}}else if(w==d[I].binding){k=!0;break}if(k)break}k||d.push({type:"textbox",label:w,binding:w})}}OrgChart.isNEU(v)&&(v=""),y=OrgChart.isNEU(y)?OrgChart.icon.user(150,150,"#8C8C8C",0,0):`<img style="width: 100%;height:100%;border-radius: 50%;object-fit:cover;" src="${y}"></img>`;var C=!i,L=i?"display:none;":"",A=i||!h?"display:none;":"",E=x.editFormHeaderColor?`style="background-color:${x.editFormHeaderColor};"`:"",N=document.createElement("form");if(N.setAttribute("data-boc-edit-form",""),N.classList.add("boc-edit-form"),N.classList.add(this.obj.config.mode),N.classList.add(m.templateName.replaceAll(" ","")),N.classList.add(OrgChart.ui._defsIds[m.templateName]),Array.isArray(m.tags)&&m.tags.length)for(_=0;_<m.tags.length;_++)N.classList.add(m.tags[_].replaceAll(" ",""));N.style.display="flex",N.style.opacity=o?1:0,N.style.right=o?0:"-20px",a&&(N.style.width=a);var $=[];return N.innerHTML=`<div>\n <div class="boc-edit-form-header" ${E}>\n ${s?"":OrgChart.EDITFORM_CLOSE_BTN}\n ${OrgChart.editUI.renderHeaderContent(v,y,m,b)}\n </div>\n <div data-boc-edit-from-btns class="boc-edit-form-instruments">\n ${function(){if(s)return"";var e="";for(var o in u){var a=u[o];OrgChart.isNEU(a)||(C&&a.hideIfEditMode||i&&a.hideIfDetailsMode||c&&"Edit"==a.text||(e+=`<div data-edit-from-btn='${o}' class="boc-img-button" ${E} title="${a.text}">${a.icon}</div>`))}return e}()} \n </div>\n </div>\n <div class="boc-edit-form-fields">\n <div class="boc-edit-form-fields-inner">\n <div class="boc-form-fieldset">\n ${function(){for(var e="",o=0;o<d.length;o++){var a=d[o];if(Array.isArray(a)){e+='<div class="boc-form-field-100 boc-form-fieldset">';for(var s=0;s<a.length;s++){var c=a[s],h=OrgChart.elements[c.type](b,c,"unset",i);!OrgChart.isNEU(h.id)&&OrgChart.isNEU(l)&&OrgChart.isNEU(h.value)&&(l=h.id),OrgChart.isNEU(h.value)||$.push(`${c.label}: ${h.value}`),e+=h.html}e+="</div>"}else{h=OrgChart.elements[a.type](b,a,"280px",i);!OrgChart.isNEU(h.id)&&OrgChart.isNEU(l)&&OrgChart.isNEU(h.value)&&(l=h.id),OrgChart.isNEU(h.value)||$.push(`${a.label}: ${h.value}`),e+=h.html}}return e}()}\n\n <div class="boc-form-field" style="min-width: 280px; text-align:center; ${A}">\n <a data-add-more-fields-btn href="#" class="boc-link">${h}</a>\n </div>\n </div> \n </div>\n </div>\n <div class="boc-form-fieldset" style="padding: 14px 10px; ${L}">\n <div class="boc-form-field" style="min-width: initial;">\n <button type="submit" data-edit-from-save type="button" class="boc-button">${p}</button>\n </div>\n </div>`,{element:N,focusId:l,title:v,shareText:$.join("\n")}},OrgChart.editUI.prototype.hide=function(e){var i=this.obj.element.querySelector("[data-boc-edit-form]");if(i){if(!this.detailsMode&&!this.save(e))return;if(!1===OrgChart.events.publish("hide",[this]))return!1;OrgChart.isNEU(this.interval)&&(clearInterval(this.interval),this.interval=null),i.parentNode.removeChild(i),this.nodeId=null,this.detailsMode=null}return!0},OrgChart.editUI.renderHeaderContent=function(e,i,o,a){return`<h1 class="boc-edit-form-title">${OrgChart._escapeGreaterLessSign(e)}</h1>\n <div id="boc-avatar" class="boc-edit-form-avatar">${i}</div>`},OrgChart.prototype.getSvg=function(){return this.element.querySelector("svg")},OrgChart.prototype.getPointerElement=function(){return this.element.querySelector("g[data-pointer]")},OrgChart.prototype.getNodeElement=function(e){return this.element.querySelector("["+OrgChart.attr.node_id+"='"+e+"']")},OrgChart.prototype.getMenuButton=function(){return this.element.querySelector("["+OrgChart.attr.control_export_menu+"]")},OrgChart.menuUI=function(){},OrgChart.menuUI.prototype.init=function(e,i){this.obj=e,this.wrapper=null,this.menu=i,this._event_id=OrgChart._guid()},OrgChart.menuUI.prototype.showStickIn=function(e,i,o,a){this._show(e,null,i,o,a)},OrgChart.menuUI.prototype.show=function(e,i,o,a,s){this._show(e,i,o,a,s)},OrgChart.menuUI.prototype._show=function(e,i,o,a,s){var l=this;this.hide();var c="";s||(s=this.menu);var d={firstNodeId:o,secondNodeId:a,menu:s};if(!1===OrgChart.events.publish("show",[this,d]))return!1;for(var h in s=d.menu){var p=s[h].icon,u=s[h].text;void 0===p&&(p=OrgChart.icon[h]?OrgChart.icon[h](24,24,"#7A7A7A"):""),"function"==typeof u&&(u=u()),"function"==typeof p&&(p=p()),c+="<div "+OrgChart.attr.item+'="'+h+'">'+p+"<span>&nbsp;&nbsp;"+u+"</span></div>"}if(""!=c){if(this.wrapper=document.createElement("div"),this.wrapper.className="boc-chart-menu",this.wrapper.style.left="-99999px",this.wrapper.style.top="-99999px",this.wrapper.innerHTML=c,this.obj.element.appendChild(this.wrapper),null==i){var f=OrgChart._menuPosition(e,this.wrapper,this.obj.getSvg());e=f.x,i=f.y}var g=e+45;this.wrapper.style.left=g+"px",this.wrapper.style.top=i+"px",this.wrapper.style.left=g-this.wrapper.offsetWidth+"px";var m=e-this.wrapper.offsetWidth;OrgChart.animate(this.wrapper,{opacity:0,left:g-this.wrapper.offsetWidth},{opacity:1,left:m},300,OrgChart.anim.inOutPow);for(var b=this.wrapper.getElementsByTagName("div"),x=0;x<b.length;x++){(h=b[x]).addEventListener("click",function(e){var i=this.getAttribute(OrgChart.attr.item),c=s[i].onClick;0!=OrgChart._onClickHandler(l.obj,i,c,o,a)&&l.hide()})}}},OrgChart.menuUI.prototype.isVisible=function(){return null!=this.wrapper},OrgChart.menuUI.prototype.hide=function(){null!=this.wrapper&&(this.obj.element.removeChild(this.wrapper),this.wrapper=null)},OrgChart.menuUI.prototype.on=function(e,i){return OrgChart.events.on(e,i,this._event_id),this},OrgChart.controlsUI=function(){},OrgChart.controlsUI.prototype.init=function(e){this.instance=e,this.elements={top_right:null,right_top:null,bottom_right:null,right_bottom:null,top_left:null,left_top:null,bottom_left:null,left_bottom:null,top:null,bottom:null,left:null,right:null},this.show()},OrgChart.controlsUI.prototype.show=function(){var e=this,clickHandler=function(i){for(var o=i.target;o&&o.hasAttribute&&!o.hasAttribute("data-control-id");)o=o.parentNode;if(o.hasAttribute&&o.hasAttribute("data-control-id")){var a=o.getAttribute("data-control-id"),s=e.instance.config.controls[a];OrgChart.isNEU(s.isOn)||(o.classList.contains("boc-control-selected")?o.classList.remove("boc-control-selected"):o.classList.add("boc-control-selected"));var l=s.onClick;OrgChart._onClickHandler(e.instance,a,l,void 0,void 0)}},i=this.instance.config.controls;if(i){this.hide();var o={top_right:"",right_top:"",bottom_right:"",right_bottom:"",top_left:"",left_top:"",bottom_left:"",left_bottom:"",top:"",bottom:"",left:"",right:""};for(var a in i){var s=i[a],l=s.icon;void 0===l&&(l=OrgChart.icon[a]?OrgChart.icon[a](32,32,"#7A7A7A"):OrgChart.icon.cursor(32,32,"#7A7A7A"));var c=s.title;c||(c=a);var d="";!0===s.isOn&&(d='class="boc-control-selected"');var h=`<div ${d} data-control-id="${a}" title="${c}">${l}</div>`;s.anchor||(s.anchor=OrgChart.anchor.bottom_right),o[s.anchor]+=h}for(var a in o)o[a]&&(this.elements[a]=document.createElement("div"),this.elements[a].className="boc-controls boc-controls-"+a,this.elements[a].innerHTML=o[a],this.elements[a].addEventListener("click",clickHandler),this.instance.element.appendChild(this.elements[a]))}},OrgChart.controlsUI.prototype.hide=function(){for(var e in this.elements)if(this.elements[e]){var i=this.elements[e];i.parentNode.removeChild(i)}},OrgChart.circleMenuUI=function(){},OrgChart.circleMenuUI.prototype.init=function(e,i){this.obj=e,this.menu=i,this._menu=null,this._buttonsInterval=[],this._linesInterval=[],this._event_id=OrgChart._guid()},OrgChart.circleMenuUI.prototype.show=function(e,i){this._show(e,i)},OrgChart.circleMenuUI.prototype.isVisible=function(){return null!==this.obj.element.querySelector("["+OrgChart.attr.control_node_circle_menu_wrraper_id+"]")},OrgChart.circleMenuUI.prototype._show=function(e,i){var o=this,a=this.obj.getNode(e),s=OrgChart.t(a.templateName,a.min,this.obj.getScale());if(!OrgChart.isNEU(s.nodeCircleMenuButton)){var l=this.obj.getSvg(),c=this.obj.element.querySelector("["+OrgChart.attr.control_node_circle_menu_id+'="'+e+'"]'),d=this.obj.getNodeElement(e),h=OrgChart._getTransform(c),p=OrgChart._getTransform(d),u=h[4]+p[4],f=h[5]+p[5],g=c.querySelectorAll("line"),m=this.obj.element.querySelector("["+OrgChart.attr.control_node_circle_menu_wrraper_id+"]");if(OrgChart.isNEU(m)||m.getAttribute(OrgChart.attr.control_node_circle_menu_wrraper_id)!=e){this.hide(),i||(i=this.menu);var b={nodeId:e,menu:i},x=OrgChart.events.publish("show",[this,b]);if(this._menu=i,!1===x)return!1;for(var v=0,y=Object.keys(b.menu).length,_=2*s.nodeCircleMenuButton.radius+4,w=2*Math.PI*_,k=w/y-(2*s.nodeCircleMenuButton.radius+2);k<0;)_+=8,k=(w=2*Math.PI*_)/y-(2*s.nodeCircleMenuButton.radius+2);for(var I in(m=document.createElementNS("http://www.w3.org/2000/svg","g")).setAttribute(OrgChart.attr.control_node_circle_menu_wrraper_id,e),m.setAttribute("transform","matrix(1,0,0,1,"+u+","+f+")"),l.appendChild(m),b.menu){var S=b.menu[I].icon,C=b.menu[I].color,L=b.menu[I].text;"function"==typeof S&&(S=S()),"function"==typeof C&&(C=C()),"function"==typeof L&&(L=L());var A=document.createElementNS("http://www.w3.org/2000/svg","g");A.setAttribute("transform","matrix(1,0,0,1,0,0)"),A.setAttribute(OrgChart.attr.control_node_circle_menu_name,I),A.style.cursor="pointer";var E=document.createElementNS("http://www.w3.org/2000/svg","title");OrgChart.isNEU(L)||(E.innerHTML=L);var N=document.createElementNS("http://www.w3.org/2000/svg","circle");N.setAttribute("cx",0),N.setAttribute("cy",0),N.setAttribute("r",s.nodeCircleMenuButton.radius),N.setAttribute("fill",C),N.setAttribute("stroke-width","1"),N.setAttribute("stroke",s.nodeCircleMenuButton.stroke),A.appendChild(N),A.appendChild(E),A.innerHTML+=S,m.appendChild(A);var $=A.getElementsByTagName("svg")[0];if($.setAttribute("pointer-events","none"),$){var M=parseInt($.getAttribute("width")),T=parseInt($.getAttribute("height"));$.setAttribute("x",-M/2),$.setAttribute("y",-T/2)}var P=v*Math.PI/(y/2);v++;var U=Math.cos(P)*_,O=Math.sin(P)*_;this._buttonsInterval.push(OrgChart.animate(A,{transform:[1,0,0,1,0,0]},{transform:[1,0,0,1,U,O]},250,OrgChart.anim.outBack,function(e){var i=e[0].getAttribute(OrgChart.attr.control_node_circle_menu_name),a=e[0].parentNode.getAttribute(OrgChart.attr.control_node_circle_menu_wrraper_id);e[0].addEventListener("mouseenter",function(e){OrgChart.events.publish("mouseenter",[o,{from:a,menuItem:b.menu[i],menuItemName:i,event:e}])}),e[0].addEventListener("mouseout",function(e){OrgChart.events.publish("mouseout",[o,{from:a,menuItem:b.menu[i],menuItemName:i,event:e}])})}))}this._linesInterval.push(OrgChart.animate(g[0],{x1:-s.nodeCircleMenuButton.radius/2,y1:-6,x2:s.nodeCircleMenuButton.radius/2,y2:-6},{x1:-7,y1:-7,x2:7,y2:7},500,OrgChart.anim.inOutSin)),this._linesInterval.push(OrgChart.animate(g[1],{x1:-s.nodeCircleMenuButton.radius/2,y1:0,x2:s.nodeCircleMenuButton.radius/2,y2:0},{x1:0,y1:0,x2:0,y2:0},500,OrgChart.anim.inOutSin)),this._linesInterval.push(OrgChart.animate(g[2],{x1:-s.nodeCircleMenuButton.radius/2,y1:6,x2:s.nodeCircleMenuButton.radius/2,y2:6},{x1:-7,y1:7,x2:7,y2:-7},500,OrgChart.anim.inOutSin))}else this.hide()}},OrgChart.circleMenuUI.prototype.hide=function(){for(var e=this._buttonsInterval.length-1;e>=0;e--)clearInterval(this._buttonsInterval[e]),this._buttonsInterval.splice(e,1);this._buttonsInterval=[];for(e=this._linesInterval.length-1;e>=0;e--)clearInterval(this._linesInterval[e]),this._linesInterval.splice(e,1);this._linesInterval=[];var i=this.obj.element.querySelector("["+OrgChart.attr.control_node_circle_menu_wrraper_id+"]");if(null!=i){var o=i.getAttribute(OrgChart.attr.control_node_circle_menu_wrraper_id),a=this.obj.getNode(o),s=OrgChart.t(a.templateName,a.min,this.obj.getScale()),l=this.obj.element.querySelector("["+OrgChart.attr.control_node_circle_menu_id+'="'+o+'"]').querySelectorAll("line");l[0].setAttribute("x1",-s.nodeCircleMenuButton.radius/2),l[0].setAttribute("x2",s.nodeCircleMenuButton.radius/2),l[0].setAttribute("y1",-6),l[0].setAttribute("y2",-6),l[1].setAttribute("x1",-s.nodeCircleMenuButton.radius/2),l[1].setAttribute("x2",s.nodeCircleMenuButton.radius/2),l[1].setAttribute("y1",0),l[1].setAttribute("y2",0),l[2].setAttribute("x1",-s.nodeCircleMenuButton.radius/2),l[2].setAttribute("x2",s.nodeCircleMenuButton.radius/2),l[2].setAttribute("y1",6),l[2].setAttribute("y2",6),i.parentElement.removeChild(i),i=null}},OrgChart.circleMenuUI.prototype.on=function(e,i){return OrgChart.events.on(e,i,this._event_id),this},void 0===OrgChart&&(OrgChart={}),OrgChart.idb={version:1,dbName:"BALKAN",tableName:"orgchart-js",keyPath:"id"},OrgChart.idb.db=null,OrgChart.idb._open=function(e){if(OrgChart._browser().msie)e&&e(!1);else if((navigator.userAgent.toLowerCase().indexOf("safari")>0||navigator.userAgent.toLowerCase().indexOf("firefox")>0)&&window.location!==window.parent.location)e&&e(!1);else{if(!window.indexedDB)return console.error("Your browser doesn't support a stable version of IndexedDB."),void(e&&e(!1));if(null==OrgChart.idb.db){var i=indexedDB.open(OrgChart.idb.dbName,OrgChart.idb.version);i.onerror=function(i){console.error("Cannot open database!"),e&&e(!1)},i.onsuccess=function(i){OrgChart.idb.db=i.target.result,e&&e(!0)},i.onupgradeneeded=function(e){var i=e.target.result;i.objectStoreNames.contains(OrgChart.idb.tableName)&&i.deleteObjectStore(OrgChart.idb.tableName),i.createObjectStore(OrgChart.idb.tableName,{keyPath:OrgChart.idb.keyPath})}}else e&&e(!0)}},OrgChart.idb.read=function(e,i){OrgChart.idb._open(function(o){if(o){var a=OrgChart.idb.db.transaction([OrgChart.idb.tableName]).objectStore(OrgChart.idb.tableName).get(e);a.onerror=function(e){console.error("Unable to retrieve data from database!"),i&&i(!1)},a.onsuccess=function(e){a.result?i&&i(!0,a.result):i&&i(null)}}else i&&i(!1)})},OrgChart.idb.write=function(e,i){OrgChart.idb.read(e.id,function(o){if(null==o){var a=OrgChart.idb.db.transaction([OrgChart.idb.tableName],"readwrite").objectStore(OrgChart.idb.tableName).add(e);a.onerror=function(e){console.error("Unable to add data to database!"),i&&i(!1)},a.onsuccess=function(e){i&&i(!0)}}else i&&i(o)})},OrgChart.idb.put=function(e,i){OrgChart.idb._open(function(o){if(o){var a=OrgChart.idb.db.transaction([OrgChart.idb.tableName],"readwrite").objectStore(OrgChart.idb.tableName).put(e);a.onerror=function(e){console.error("Unable to put data to database!"),i&&i(!1)},a.onsuccess=function(e){i&&i(!0)}}else i&&i(!1)})},OrgChart.idb.delete=function(e,i){OrgChart.idb._open(function(o){if(o){var a=OrgChart.idb.db.transaction([OrgChart.idb.tableName],"readwrite").objectStore(OrgChart.idb.tableName).delete(e);a.onerror=function(e){console.error("Unable to retrieve data from database!"),i&&i(!1)},a.onsuccess=function(e){a.error?i&&i(!1):i&&i(!0)}}else i&&i(!1)})},OrgChart.toolbarUI=function(){},OrgChart.toolbarUI.expandAllIcon='<svg style="margin-bottom:7px;box-shadow: 0px 1px 4px rgba(0,0,0,0.3); border: 1px solid #cacaca;background-color: #f9f9f9;display: block;cursor: pointer;" width="32px" height="32px"><marker id="arrow" viewBox="0 0 10 10" refX="5" refY="5" markerWidth="4" markerHeight="4" orient="auto-start-reverse"><path d="M 0 0 L 10 5 L 0 10 z" fill="#757575" /></marker><line x1="11" y1="11" x2="6" y2="6" stroke="#757575" stroke-width="2" marker-end="url(#arrow)" /><line x1="21" y1="11" x2="26" y2="6" stroke="#757575" stroke-width="2" marker-end="url(#arrow)" /><line x1="21" y1="21" x2="26" y2="26" stroke="#757575" stroke-width="2" marker-end="url(#arrow)" /><line x1="11" y1="21" x2="6" y2="26" stroke="#757575" stroke-width="2" marker-end="url(#arrow)" /><rect x="12" y="12" width="8" height="8" fill="#757575"></rect></svg>',OrgChart.toolbarUI.fitIcon='<svg style="margin-bottom:7px;box-shadow: 0px 1px 4px rgba(0,0,0,0.3); border: 1px solid #cacaca;background-color: #f9f9f9;display: block;cursor: pointer;" width="32px" height="32px"><path stroke-width="3" fill="none" stroke="#757575" d="M4,11 L4,4 L11,4"></path><path stroke-width="3" fill="none" stroke="#757575" d="M28,11 L28,4 L21,4"></path><path stroke-width="3" fill="none" stroke="#757575" d="M28,21 L28,28 L21,28"></path><path stroke-width="3" fill="none" stroke="#757575" d="M4,21 L4,28 L11,28"></path><circle cx="16" cy="16" r="5" fill="#757575"></circle></svg>',OrgChart.toolbarUI.openFullScreenIcon='<svg style="margin-bottom:7px;box-shadow: 0px 1px 4px rgba(0,0,0,0.3); border: 1px solid #cacaca;background-color: #f9f9f9;display: block;cursor: pointer;" width="32px" height="32px"><path stroke-width="3" fill="none" stroke="#757575" d="M4,11 L4,4 L11,4"></path><path stroke-width="3" fill="none" stroke="#757575" d="M28,11 L28,4 L21,4"></path><path stroke-width="3" fill="none" stroke="#757575" d="M28,21 L28,28 L21,28"></path><path stroke-width="3" fill="none" stroke="#757575" d="M4,21 L4,28 L11,28"></path><line x1="5" y1="5" x2="27" y2="27" stroke-width="3" stroke="#757575"></line><line x1="5" y1="27" x2="27" y2="5" stroke-width="3" stroke="#757575"></line></svg>',OrgChart.toolbarUI.closeFullScreenIcon='<svg style="margin-bottom:7px;box-shadow: 0px 1px 4px rgba(0,0,0,0.3); border: 1px solid #cacaca;background-color: #f9f9f9;display: block;cursor: pointer;" width="32px" height="32px"><path stroke-width="3" fill="none" stroke="#757575" d="M4,11 L4,4 L11,4"></path><path stroke-width="3" fill="none" stroke="#757575" d="M28,11 L28,4 L21,4"></path><path stroke-width="3" fill="none" stroke="#757575" d="M28,21 L28,28 L21,28"></path><path stroke-width="3" fill="none" stroke="#757575" d="M4,21 L4,28 L11,28"></path><rect x="11" y="11" width="10" height="10" stroke-width="3" fill="none" stroke="#757575" ></rect></svg>',OrgChart.toolbarUI.zoomInIcon='<svg style="box-shadow: 0px 1px 4px rgba(0,0,0,0.3); border-left: 1px solid #cacaca; border-right: 1px solid #cacaca; border-top: 1px solid #cacaca; background-color: #f9f9f9;display: block; cursor: pointer;" width="32px" height="32px" ><g><rect fill="#f9f9f9" x="0" y="0" width="32" height="32" ></rect><line x1="8" y1="16" x2="24" y2="16" stroke-width="3" stroke="#757575"></line><line x1="16" y1="8" x2="16" y2="24" stroke-width="3" stroke="#757575"></line></g><line x1="4" y1="32" x2="28" y2="32" stroke-width="1" stroke="#cacaca"></line></svg>',OrgChart.toolbarUI.zoomOutIcon='<svg style="box-shadow: 0px 1px 4px rgba(0,0,0,0.3); margin-bottom:7px; border-left: 1px solid #cacaca; border-right: 1px solid #cacaca; border-bottom: 1px solid #cacaca; background-color: #f9f9f9;display: block; cursor: pointer;" width="32px" height="32px" ><g><rect fill="#f9f9f9" x="0" y="0" width="32" height="32" ></rect><line x1="8" y1="16" x2="24" y2="16" stroke-width="3" stroke="#757575"></line></g></svg>',OrgChart.toolbarUI.layoutIcon="<svg "+OrgChart.attr.tlbr+'="layout" style="box-shadow: 0px 1px 4px rgba(0,0,0,0.3); border: 1px solid #cacaca;background-color: #f9f9f9;display: block;cursor: pointer;" width="32px" height="32px"><path stroke-width="3" fill="none" stroke="#757575" d="M8,24 L16,14 L24,24"></path><path stroke-width="3" fill="none" stroke="#757575" d="M8,16 L16,8 L24,16"></path></svg>',OrgChart.toolbarUI.prototype.init=function(e,i){if(i){this.obj=e,this.toolbar=i,this._visible=!1,this.div=document.createElement("div"),this.div.classList.add("boc-toolbar-container"),Object.assign(this.div.style,{position:"absolute",padding:"3px",right:this.obj.config.padding-10+"px",bottom:this.obj.config.padding-10+"px"}),i.expandAll&&(this.div.innerHTML+="<div "+OrgChart.attr.tlbr+'="expand">'+OrgChart.toolbarUI.expandAllIcon+"</div>"),i.fit&&(this.div.innerHTML+="<div "+OrgChart.attr.tlbr+'="fit">'+OrgChart.toolbarUI.fitIcon+"</div>"),i.zoom&&(this.div.innerHTML+="<div "+OrgChart.attr.tlbr+'="plus">'+OrgChart.toolbarUI.zoomInIcon+"</div>",this.div.innerHTML+="<div "+OrgChart.attr.tlbr+'="minus">'+OrgChart.toolbarUI.zoomOutIcon+"</div>"),i.layout&&(this.div.innerHTML+="<div "+OrgChart.attr.tlbr+'="layout">'+OrgChart.toolbarUI.layoutIcon+"</div>",this.layouts=document.createElement("div"),this.layouts.classList.add("boc-toolbar-layout"),this.layouts.innerHTML='<svg data-layout="normal" style="cursor: pointer;" width="110" height="100"><rect fill="#039BE5" x="35" y="0" width="50" height="27"></rect><rect fill="#F57C00" x="7" y="41" width="50" height="27"></rect><rect fill="#F57C00" x="63" y="41" width="50" height="27"></rect><line stroke="#000000" x1="60" x2="60" y1="27" y2="35" stroke-width="1"></line><line stroke="#000000" x1="32" x2="88" y1="35" y2="35" stroke-width="1"></line><line stroke="#000000" x1="32" x2="32" y1="35" y2="41" stroke-width="1"></line><line stroke="#000000" x1="88" x2="88" y1="35" y2="41" stroke-width="1"></line></svg>\n <svg data-layout="treeRightOffset" style="cursor: pointer;" width="110" height="100"><rect fill="#039BE5" x="35" y="0" width="50" height="27"></rect><rect fill="#F57C00" x="40" y="41" width="50" height="27"></rect><rect fill="#F57C00" x="40" y="73" width="50" height="27"></rect><line stroke="#000000" x1="60" x2="60" y1="27" y2="35" stroke-width="1"></line><line stroke="#000000" x1="60" x2="35" y1="35" y2="35" stroke-width="1"></line><line stroke="#000000" x1="35" x2="35" y1="35" y2="86" stroke-width="1"></line><line stroke="#000000" x1="35" x2="40" y1="86" y2="86" stroke-width="1"></line><line stroke="#000000" x1="35" x2="40" y1="54" y2="54" stroke-width="1"></line></svg>\n <svg data-layout="treeLeftOffset" style="cursor: pointer;" width="110" height="100"><rect fill="#039BE5" x="35" y="0" width="50" height="27"></rect><rect fill="#F57C00" x="30" y="41" width="50" height="27"></rect><rect fill="#F57C00" x="30" y="73" width="50" height="27"></rect><line stroke="#000000" x1="60" x2="60" y1="27" y2="35" stroke-width="1"></line><line stroke="#000000" x1="60" x2="85" y1="35" y2="35" stroke-width="1"></line><line stroke="#000000" x1="85" x2="85" y1="35" y2="86" stroke-width="1"></line><line stroke="#000000" x1="80" x2="85" y1="86" y2="86" stroke-width="1"></line><line stroke="#000000" x1="80" x2="85" y1="54" y2="54" stroke-width="1"></line></svg>\n <svg data-layout="mixed" style="cursor: pointer;" width="110" height="100"><rect fill="#039BE5" x="35" y="0" width="50" height="27"></rect><rect fill="#F57C00" x="35" y="41" width="50" height="27"></rect><rect fill="#F57C00" x="35" y="73" width="50" height="27"></rect><line stroke="#000000" x1="60" x2="60" y1="27" y2="41" stroke-width="1"></line><line stroke="#000000" x1="60" x2="60" y1="68" y2="73" stroke-width="1"></line></svg>\n <svg data-layout="tree" style="cursor: pointer;" width="110" height="100"><rect fill="#039BE5" x="35" y="0" width="50" height="27"></rect><rect fill="#F57C00" x="7" y="41" width="50" height="27"></rect><rect fill="#F57C00" x="35" y="73" width="50" height="27"></rect><rect fill="#F57C00" x="63" y="41" width="50" height="27"></rect><line stroke="#000000" x1="60" x2="60" y1="27" y2="73" stroke-width="1"></line><line stroke="#000000" x1="57" x2="63" y1="54" y2="54" stroke-width="1"></line></svg>\n <svg data-layout="grid" style="cursor: pointer;" width="110" height="100"><rect fill="#039BE5" x="35" y="0" width="50" height="27"></rect><rect fill="#F57C00" x="7" y="41" width="50" height="27"></rect><rect fill="#F57C00" x="7" y="73" width="50" height="27"></rect><rect fill="#F57C00" x="63" y="41" width="50" height="27"></rect><rect fill="#F57C00" x="63" y="73" width="50" height="27"></rect><line stroke="#000000" x1="60" x2="60" y1="27" y2="71" stroke-width="1"></line><line stroke="#000000" x1="32" x2="88" y1="39" y2="39" stroke-width="1"></line><line stroke="#000000" x1="32" x2="88" y1="71" y2="71" stroke-width="1"></line><line stroke="#000000" x1="32" x2="32" y1="71" y2="73" stroke-width="1"></line><line stroke="#000000" x1="88" x2="88" y1="71" y2="73" stroke-width="1"></line><line stroke="#000000" x1="32" x2="32" y1="39" y2="41" stroke-width="1"></line><line stroke="#000000" x1="88" x2="88" y1="39" y2="41" stroke-width="1"></line></svg>',this.obj.element.appendChild(this.layouts)),i.fullScreen&&(this.div.innerHTML+="<div "+OrgChart.attr.tlbr+'="fullScreen">'+OrgChart.toolbarUI.openFullScreenIcon+"</div>"),this.obj.element.appendChild(this.div),this.layoutBtn=this.div.querySelector("["+OrgChart.attr.tlbr+'="layout"]');var o=this.div.querySelector("["+OrgChart.attr.tlbr+'="plus"]'),a=this.div.querySelector("["+OrgChart.attr.tlbr+'="minus"]'),s=this.div.querySelector("["+OrgChart.attr.tlbr+'="fit"]'),l=this.div.querySelector("["+OrgChart.attr.tlbr+'="fullScreen"]'),c=this.div.querySelector("["+OrgChart.attr.tlbr+'="expand"]'),d=this;o&&o.addEventListener("click",function(){d.obj.zoom(!0,null,!0)}),a&&a.addEventListener("click",function(){d.obj.zoom(!1,null,!0)}),s&&s.addEventListener("click",function(){d.obj.fit()}),l&&l.addEventListener("click",function(){d.obj.toggleFullScreen()}),c&&c.addEventListener("click",function(){d.obj.expand(null,"all")}),this.layoutBtn&&this.layoutBtn.addEventListener("click",function(){d._visible?d.hideLayout():d.showLayout()}),this.layouts&&this.layouts.addEventListener("click",function(e){for(var i=e.target;i;){if(i.hasAttribute&&i.hasAttribute(OrgChart.attr.layout)){i=i.getAttribute(OrgChart.attr.layout),d.obj.setLayout(OrgChart.layout[i]);break}i=i.parentNode}})}},OrgChart.toolbarUI.prototype.showLayout=function(){this._visible=!0,this.layoutBtn.style.transform="rotate(180deg) translateX(0px) translateY(0px)",OrgChart.animate(this.div,{bottom:this.obj.config.padding-10},{bottom:this.obj.config.padding+135},this.obj.config.anim.duration,this.obj.config.anim.func),OrgChart.animate(this.layouts,{bottom:-145},{bottom:0},this.obj.config.anim.duration,this.obj.config.anim.func)},OrgChart.toolbarUI.prototype.hideLayout=function(){this._visible=!1,this.layoutBtn.style.transform="rotate(0deg) translateX(0px) translateY(0px)",OrgChart.animate(this.div,{bottom:this.obj.config.padding+135},{bottom:this.obj.config.padding-10},this.obj.config.anim.duration,this.obj.config.anim.func),OrgChart.animate(this.layouts,{bottom:0},{bottom:-145},this.obj.config.anim.duration,this.obj.config.anim.func)},OrgChart.notifierUI=function(){},OrgChart.notifierUI.prototype.init=function(e){this.obj=e},OrgChart.notifierUI.prototype.show=function(e,i){if(null==e)return!1;1==e&&(e=OrgChart.MAX_NODES_MESS,i="#FFCA28"),2==e&&(e=OrgChart.OFFLINE_MESS,i="#FFCA28");var o=document.createElement("div");o.innerHTML=e,Object.assign(o.style,{position:"absolute","background-color":i,color:"#ffffff",padding:"15px","border-radius":"40px",opacity:0,overflow:"hidden","white-space":"nowrap","text-align":"center"}),this.obj.element.appendChild(o);var a=this.obj.width()/2-o.offsetWidth/2,s=this.obj.height()/2-o.offsetHeight/2;o.style.left=a+"px",o.style.top=s+"px";var l=o.offsetWidth;return o.style.width="20px",OrgChart.animate(o,{opacity:0,width:10},{opacity:1,width:l},this.obj.config.anim.duration,this.obj.config.anim.func),!0},void 0===OrgChart&&(OrgChart={}),OrgChart.icon={},OrgChart.icon.png_export=OrgChart.icon.png_preview=OrgChart.icon.pngpreview=OrgChart.icon.png=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" viewBox="0 0 550.801 550.801" x="${a}" y="${s}">\n <path fill="${o}" d="M146.747,276.708c0-13.998-9.711-22.352-26.887-22.352c-6.99,0-11.726,0.675-14.204,1.355v44.927 c2.932,0.676,6.539,0.896,11.52,0.896C135.449,301.546,146.747,292.28,146.747,276.708z"/>\n <path fill="${o}" d="M488.426,197.019H475.2v-63.816c0-0.398-0.063-0.799-0.116-1.202c-0.021-2.534-0.827-5.023-2.562-6.995L366.325,3.694 c-0.032-0.031-0.063-0.042-0.085-0.076c-0.633-0.707-1.371-1.295-2.151-1.804c-0.231-0.155-0.464-0.285-0.706-0.419 c-0.676-0.369-1.393-0.675-2.131-0.896c-0.2-0.056-0.38-0.138-0.58-0.19C359.87,0.119,359.037,0,358.193,0H97.2 c-11.918,0-21.6,9.693-21.6,21.601v175.413H62.377c-17.049,0-30.873,13.818-30.873,30.873v160.545 c0,17.043,13.824,30.87,30.873,30.87h13.224V529.2c0,11.907,9.682,21.601,21.6,21.601h356.4c11.907,0,21.6-9.693,21.6-21.601 V419.302h13.226c17.044,0,30.871-13.827,30.871-30.87v-160.54C519.297,210.838,505.47,197.019,488.426,197.019z M97.2,21.605 h250.193v110.513c0,5.967,4.841,10.8,10.8,10.8h95.407v54.108H97.2V21.605z M234.344,335.86v45.831h-31.601V229.524h40.184 l31.611,55.759c9.025,16.031,18.064,34.983,24.825,52.154h0.675c-2.257-20.103-2.933-40.643-2.933-63.44v-44.473h31.614v152.167 h-36.117l-32.516-58.703c-9.049-16.253-18.971-35.892-26.438-53.727l-0.665,0.222C233.906,289.58,234.344,311.027,234.344,335.86z M71.556,381.691V231.56c10.613-1.804,25.516-3.159,46.506-3.159c21.215,0,36.353,4.061,46.509,12.192 c9.698,7.673,16.255,20.313,16.255,35.219c0,14.897-4.959,27.549-13.999,36.123c-11.738,11.063-29.123,16.031-49.441,16.031 c-4.522,0-8.593-0.231-11.736-0.675v54.411H71.556V381.691z M453.601,523.353H97.2V419.302h356.4V523.353z M485.652,374.688 c-10.61,3.607-30.713,8.585-50.805,8.585c-27.759,0-47.872-7.003-61.857-20.545c-13.995-13.1-21.684-32.97-21.452-55.318 c0.222-50.569,37.03-79.463,86.917-79.463c19.644,0,34.783,3.829,42.219,7.446l-7.214,27.543c-8.369-3.617-18.752-6.55-35.458-6.55 c-28.656,0-50.341,16.256-50.341,49.22c0,31.382,19.649,49.892,47.872,49.892c7.895,0,14.218-0.901,16.934-2.257v-31.835h-23.493 v-26.869h56.679V374.688z"/>\n </svg>`},OrgChart.icon.pdf_export=OrgChart.icon.pdf_preview=OrgChart.icon.pdfpreview=OrgChart.icon.pdf=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" viewBox="0 0 550.801 550.801" x="${a}" y="${s}">\n <path fill="${o}" d="M160.381,282.225c0-14.832-10.299-23.684-28.474-23.684c-7.414,0-12.437,0.715-15.071,1.432V307.6 c3.114,0.707,6.942,0.949,12.192,0.949C148.419,308.549,160.381,298.74,160.381,282.225z"/>\n <path fill="${o}" d="M272.875,259.019c-8.145,0-13.397,0.717-16.519,1.435v105.523c3.116,0.729,8.142,0.729,12.69,0.729 c33.017,0.231,54.554-17.946,54.554-56.474C323.842,276.719,304.215,259.019,272.875,259.019z"/>\n <path fill="${o}" d="M488.426,197.019H475.2v-63.816c0-0.398-0.063-0.799-0.116-1.202c-0.021-2.534-0.827-5.023-2.562-6.995L366.325,3.694 c-0.032-0.031-0.063-0.042-0.085-0.076c-0.633-0.707-1.371-1.295-2.151-1.804c-0.231-0.155-0.464-0.285-0.706-0.419 c-0.676-0.369-1.393-0.675-2.131-0.896c-0.2-0.056-0.38-0.138-0.58-0.19C359.87,0.119,359.037,0,358.193,0H97.2 c-11.918,0-21.6,9.693-21.6,21.601v175.413H62.377c-17.049,0-30.873,13.818-30.873,30.873v160.545 c0,17.043,13.824,30.87,30.873,30.87h13.224V529.2c0,11.907,9.682,21.601,21.6,21.601h356.4c11.907,0,21.6-9.693,21.6-21.601 V419.302h13.226c17.044,0,30.871-13.827,30.871-30.87v-160.54C519.297,210.838,505.47,197.019,488.426,197.019z M97.2,21.605 h250.193v110.513c0,5.967,4.841,10.8,10.8,10.8h95.407v54.108H97.2V21.605z M362.359,309.023c0,30.876-11.243,52.165-26.82,65.333 c-16.971,14.117-42.82,20.814-74.396,20.814c-18.9,0-32.297-1.197-41.401-2.389V234.365c13.399-2.149,30.878-3.346,49.304-3.346 c30.612,0,50.478,5.508,66.039,17.226C351.828,260.69,362.359,280.547,362.359,309.023z M80.7,393.499V234.365 c11.241-1.904,27.042-3.346,49.296-3.346c22.491,0,38.527,4.308,49.291,12.928c10.292,8.131,17.215,21.534,17.215,37.328 c0,15.799-5.25,29.198-14.829,38.285c-12.442,11.728-30.865,16.996-52.407,16.996c-4.778,0-9.1-0.243-12.435-0.723v57.67H80.7 V393.499z M453.601,523.353H97.2V419.302h356.4V523.353z M484.898,262.127h-61.989v36.851h57.913v29.674h-57.913v64.848h-36.593 V232.216h98.582V262.127z"/>\n </svg>`},OrgChart.icon.svg_export=OrgChart.icon.svg_preview=OrgChart.icon.svg=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" viewBox="0 0 550.801 550.801" x="${a}" y="${s}">\n <path fill="${o}" d="M488.426,197.019H475.2v-63.816c0-0.398-0.063-0.799-0.116-1.202c-0.021-2.534-0.827-5.023-2.562-6.995L366.325,3.694 c-0.032-0.031-0.063-0.042-0.085-0.076c-0.633-0.707-1.371-1.295-2.151-1.804c-0.231-0.155-0.464-0.285-0.706-0.419 c-0.676-0.369-1.393-0.675-2.131-0.896c-0.2-0.056-0.38-0.138-0.58-0.19C359.87,0.119,359.037,0,358.193,0H97.2 c-11.918,0-21.6,9.693-21.6,21.601v175.413H62.377c-17.049,0-30.873,13.818-30.873,30.873v160.545 c0,17.043,13.824,30.87,30.873,30.87h13.224V529.2c0,11.907,9.682,21.601,21.6,21.601h356.4c11.907,0,21.6-9.693,21.6-21.601 V419.302h13.226c17.044,0,30.871-13.827,30.871-30.87v-160.54C519.297,210.838,505.47,197.019,488.426,197.019z M97.2,21.605 h250.193v110.513c0,5.967,4.841,10.8,10.8,10.8h95.407v54.108H97.2V21.605z M338.871,225.672L284.545,386.96h-42.591 l-51.69-161.288h39.967l19.617,68.196c5.508,19.143,10.531,37.567,14.36,57.67h0.717c4.061-19.385,9.089-38.527,14.592-56.953 l20.585-68.918h38.77V225.672z M68.458,379.54l7.415-30.153c9.811,5.021,24.888,10.051,40.439,10.051 c16.751,0,25.607-6.935,25.607-17.465c0-10.052-7.662-15.795-27.05-22.734c-26.8-9.328-44.263-24.168-44.263-47.611 c0-27.524,22.971-48.579,61.014-48.579c18.188,0,31.591,3.823,41.159,8.131l-8.126,29.437c-6.465-3.116-17.945-7.657-33.745-7.657 c-15.791,0-23.454,7.183-23.454,15.552c0,10.296,9.089,14.842,29.917,22.731c28.468,10.536,41.871,25.365,41.871,48.094 c0,27.042-20.812,50.013-65.09,50.013C95.731,389.349,77.538,384.571,68.458,379.54z M453.601,523.353H97.2V419.302h356.4V523.353z M488.911,379.54c-11.243,3.823-32.537,9.103-53.831,9.103c-29.437,0-50.73-7.426-65.57-21.779 c-14.839-13.875-22.971-34.942-22.738-58.625c0.253-53.604,39.255-84.235,92.137-84.235c20.81,0,36.852,4.073,44.74,7.896 l-7.657,29.202c-8.859-3.829-19.849-6.95-37.567-6.95c-30.396,0-53.357,17.233-53.357,52.173c0,33.265,20.81,52.882,50.73,52.882 c8.375,0,15.072-0.96,17.94-2.395v-33.745h-24.875v-28.471h60.049V379.54L488.911,379.54z" />\n </svg>`},OrgChart.icon.csv_export=OrgChart.icon.csv=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" viewBox="0 0 548.29 548.291" x="${a}" y="${s}">'\n <path fill="${o}" d="M486.2,196.121h-13.164V132.59c0-0.399-0.064-0.795-0.116-1.2c-0.021-2.52-0.824-5-2.551-6.96L364.656,3.677 c-0.031-0.034-0.064-0.044-0.085-0.075c-0.629-0.707-1.364-1.292-2.141-1.796c-0.231-0.157-0.462-0.286-0.704-0.419 c-0.672-0.365-1.386-0.672-2.121-0.893c-0.199-0.052-0.377-0.134-0.576-0.188C358.229,0.118,357.4,0,356.562,0H96.757 C84.893,0,75.256,9.649,75.256,21.502v174.613H62.093c-16.972,0-30.733,13.756-30.733,30.73v159.81 c0,16.966,13.761,30.736,30.733,30.736h13.163V526.79c0,11.854,9.637,21.501,21.501,21.501h354.777 c11.853,0,21.502-9.647,21.502-21.501V417.392H486.2c16.966,0,30.729-13.764,30.729-30.731v-159.81 C516.93,209.872,503.166,196.121,486.2,196.121z M96.757,21.502h249.053v110.006c0,5.94,4.818,10.751,10.751,10.751h94.973v53.861 H96.757V21.502z M258.618,313.18c-26.68-9.291-44.063-24.053-44.063-47.389c0-27.404,22.861-48.368,60.733-48.368 c18.107,0,31.447,3.811,40.968,8.107l-8.09,29.3c-6.43-3.107-17.862-7.632-33.59-7.632c-15.717,0-23.339,7.149-23.339,15.485 c0,10.247,9.047,14.769,29.78,22.632c28.341,10.479,41.681,25.239,41.681,47.874c0,26.909-20.721,49.786-64.792,49.786 c-18.338,0-36.449-4.776-45.497-9.77l7.38-30.016c9.772,5.014,24.775,10.006,40.264,10.006c16.671,0,25.488-6.908,25.488-17.396 C285.536,325.789,277.909,320.078,258.618,313.18z M69.474,302.692c0-54.781,39.074-85.269,87.654-85.269 c18.822,0,33.113,3.811,39.549,7.149l-7.392,28.816c-7.38-3.084-17.632-5.939-30.491-5.939c-28.822,0-51.206,17.375-51.206,53.099 c0,32.158,19.051,52.4,51.456,52.4c10.947,0,23.097-2.378,30.241-5.238l5.483,28.346c-6.672,3.34-21.674,6.919-41.208,6.919 C98.06,382.976,69.474,348.424,69.474,302.692z M451.534,520.962H96.757v-103.57h354.777V520.962z M427.518,380.583h-42.399 l-51.45-160.536h39.787l19.526,67.894c5.479,19.046,10.479,37.386,14.299,57.397h0.709c4.048-19.298,9.045-38.352,14.526-56.693 l20.487-68.598h38.599L427.518,380.583z" />'\n </svg>`},OrgChart.icon.json_export=OrgChart.icon.json=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" viewBox="0 0 32 32" x="${a}" y="${s}">\n <polygon fill="${o}" points="31 11 31 21 29 21 27 15 27 21 25 21 25 11 27 11 29 17 29 11 31 11"/>\n <path fill="${o}" d="M21.3335,21h-2.667A1.6684,1.6684,0,0,1,17,19.3335v-6.667A1.6684,1.6684,0,0,1,18.6665,11h2.667A1.6684,1.6684,0,0,1,23,12.6665v6.667A1.6684,1.6684,0,0,1,21.3335,21ZM19,19h2V13H19Z"/>\n <path fill="${o}" d="M13.3335,21H9V19h4V17H11a2.002,2.002,0,0,1-2-2V12.6665A1.6684,1.6684,0,0,1,10.6665,11H15v2H11v2h2a2.002,2.002,0,0,1,2,2v2.3335A1.6684,1.6684,0,0,1,13.3335,21Z"/>\n <path fill="${o}" d="M5.3335,21H2.6665A1.6684,1.6684,0,0,1,1,19.3335V17H3v2H5V11H7v8.3335A1.6684,1.6684,0,0,1,5.3335,21Z"/>\n <rect fill="${o}" id="_Transparent_Rectangle_" data-name="&lt;Transparent Rectangle&gt;" style="fill: none;" width="32" height="32"/>'\n </svg>`},OrgChart.icon.excel=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" viewBox="0 0 24 24" x="${a}" y="${s}">\n <path fill="${o}" d="M9.29289 1.29289C9.48043 1.10536 9.73478 1 10 1H18C19.6569 1 21 2.34315 21 4V9C21 9.55228 20.5523 10 20 10C19.4477 10 19 9.55228 19 9V4C19 3.44772 18.5523 3 18 3H11V8C11 8.55228 10.5523 9 10 9H5V20C5 20.5523 5.44772 21 6 21H7C7.55228 21 8 21.4477 8 22C8 22.5523 7.55228 23 7 23H6C4.34315 23 3 21.6569 3 20V8C3 7.73478 3.10536 7.48043 3.29289 7.29289L9.29289 1.29289ZM6.41421 7H9V4.41421L6.41421 7ZM19 12C19.5523 12 20 12.4477 20 13V19H23C23.5523 19 24 19.4477 24 20C24 20.5523 23.5523 21 23 21H19C18.4477 21 18 20.5523 18 20V13C18 12.4477 18.4477 12 19 12ZM11.8137 12.4188C11.4927 11.9693 10.8682 11.8653 10.4188 12.1863C9.96935 12.5073 9.86526 13.1318 10.1863 13.5812L12.2711 16.5L10.1863 19.4188C9.86526 19.8682 9.96935 20.4927 10.4188 20.8137C10.8682 21.1347 11.4927 21.0307 11.8137 20.5812L13.5 18.2205L15.1863 20.5812C15.5073 21.0307 16.1318 21.1347 16.5812 20.8137C17.0307 20.4927 17.1347 19.8682 16.8137 19.4188L14.7289 16.5L16.8137 13.5812C17.1347 13.1318 17.0307 12.5073 16.5812 12.1863C16.1318 11.8653 15.5073 11.9693 15.1863 12.4188L13.5 14.7795L11.8137 12.4188Z" fill="#000000"/>\n </svg>`},OrgChart.icon.pp_export=OrgChart.icon.pp_preview=OrgChart.icon.pppreview=OrgChart.icon.powerpoint=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" viewBox="0 0 24 24" x="${a}" y="${s}">\n <path fill="${o}" d="M10 1C9.73478 1 9.48043 1.10536 9.29289 1.29289L3.29289 7.29289C3.10536 7.48043 3 7.73478 3 8V20C3 21.6569 4.34315 23 6 23H11C11.5523 23 12 22.5523 12 22C12 21.4477 11.5523 21 11 21H6C5.44772 21 5 20.5523 5 20V9H10C10.5523 9 11 8.55228 11 8V3H18C18.5523 3 19 3.44772 19 4V9C19 9.55228 19.4477 10 20 10C20.5523 10 21 9.55228 21 9V4C21 2.34315 19.6569 1 18 1H10ZM9 7H6.41421L9 4.41421V7ZM15 12C14.4477 12 14 12.4477 14 13V17V20C14 20.5523 14.4477 21 15 21C15.5523 21 16 20.5523 16 20V18H19C20.6569 18 22 16.6569 22 15C22 13.3431 20.6569 12 19 12H15ZM19 16H16V14H19C19.5523 14 20 14.4477 20 15C20 15.5523 19.5523 16 19 16Z" fill="#000000"/>\n </svg>`},OrgChart.icon.edit=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" viewBox="0 0 528.899 528.899" x="${a}" y="${s}">\n <path fill="${o}" d="M328.883,89.125l107.59,107.589l-272.34,272.34L56.604,361.465L328.883,89.125z M518.113,63.177l-47.981-47.981 c-18.543-18.543-48.653-18.543-67.259,0l-45.961,45.961l107.59,107.59l53.611-53.611 C532.495,100.753,532.495,77.559,518.113,63.177z M0.3,512.69c-1.958,8.812,5.998,16.708,14.811,14.565l119.891-29.069 L27.473,390.597L0.3,512.69z" />'\n </svg>`},OrgChart.icon.details=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" viewBox="0 0 512 512" x="${a}" y="${s}">\n <path fill="${o}" d="M447.933,103.629c-0.034-3.076-1.224-6.09-3.485-8.352L352.683,3.511c-0.004-0.004-0.007-0.005-0.011-0.008 C350.505,1.338,347.511,0,344.206,0H89.278C75.361,0,64.04,11.32,64.04,25.237v461.525c0,13.916,11.32,25.237,25.237,25.237 h333.444c13.916,0,25.237-11.32,25.237-25.237V103.753C447.96,103.709,447.937,103.672,447.933,103.629z M356.194,40.931 l50.834,50.834h-49.572c-0.695,0-1.262-0.567-1.262-1.262V40.931z M423.983,486.763c0,0.695-0.566,1.261-1.261,1.261H89.278 c-0.695,0-1.261-0.566-1.261-1.261V25.237c0-0.695,0.566-1.261,1.261-1.261h242.94v66.527c0,13.916,11.322,25.239,25.239,25.239 h66.527V486.763z"/>\n <path fill="${o}" d="M362.088,164.014H149.912c-6.62,0-11.988,5.367-11.988,11.988c0,6.62,5.368,11.988,11.988,11.988h212.175 c6.62,0,11.988-5.368,11.988-11.988C374.076,169.381,368.707,164.014,362.088,164.014z"/>\n <path fill="${o}" d="M362.088,236.353H149.912c-6.62,0-11.988,5.368-11.988,11.988c0,6.62,5.368,11.988,11.988,11.988h212.175 c6.62,0,11.988-5.368,11.988-11.988C374.076,241.721,368.707,236.353,362.088,236.353z"/>\n <path fill="${o}" d="M362.088,308.691H149.912c-6.62,0-11.988,5.368-11.988,11.988c0,6.621,5.368,11.988,11.988,11.988h212.175 c6.62,0,11.988-5.367,11.988-11.988C374.076,314.06,368.707,308.691,362.088,308.691z"/>\n <path fill="${o}" d="M256,381.031H149.912c-6.62,0-11.988,5.368-11.988,11.988c0,6.621,5.368,11.988,11.988,11.988H256 c6.62,0,11.988-5.367,11.988-11.988C267.988,386.398,262.62,381.031,256,381.031z"/>\n </svg>`},OrgChart.icon.remove=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" viewBox="0 0 900.5 900.5" x="${a}" y="${s}">\n <path fill="${o}" d="M176.415,880.5c0,11.046,8.954,20,20,20h507.67c11.046,0,20-8.954,20-20V232.487h-547.67V880.5L176.415,880.5z M562.75,342.766h75v436.029h-75V342.766z M412.75,342.766h75v436.029h-75V342.766z M262.75,342.766h75v436.029h-75V342.766z"/>\n <path fill="${o}" d="M618.825,91.911V20c0-11.046-8.954-20-20-20h-297.15c-11.046,0-20,8.954-20,20v71.911v12.5v12.5H141.874 c-11.046,0-20,8.954-20,20v50.576c0,11.045,8.954,20,20,20h34.541h547.67h34.541c11.046,0,20-8.955,20-20v-50.576 c0-11.046-8.954-20-20-20H618.825v-12.5V91.911z M543.825,112.799h-187.15v-8.389v-12.5V75h187.15v16.911v12.5V112.799z"/>\n </svg>`},OrgChart.icon.add=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" viewBox="0 0 922 922" x="${a}" y="${s}">\n <path fill="${o}" d="M922,453V81c0-11.046-8.954-20-20-20H410c-11.045,0-20,8.954-20,20v149h318c24.812,0,45,20.187,45,45v198h149 C913.046,473.001,922,464.046,922,453z" />\n <path fill="${o}" d="M557,667.001h151c11.046,0,20-8.954,20-20v-174v-198c0-11.046-8.954-20-20-20H390H216c-11.045,0-20,8.954-20,20v149h194 h122c24.812,0,45,20.187,45,45v4V667.001z" />\n <path fill="${o}" d="M0,469v372c0,11.046,8.955,20,20,20h492c11.046,0,20-8.954,20-20V692v-12.501V667V473v-4c0-11.046-8.954-20-20-20H390H196 h-12.5H171H20C8.955,449,0,457.955,0,469z" />\n </svg>`},OrgChart.icon.search=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 485.213 485.213" x="${a}" y="${s}">\n <path fill="${o}" d="M471.882,407.567L360.567,296.243c-16.586,25.795-38.536,47.734-64.331,64.321l111.324,111.324 c17.772,17.768,46.587,17.768,64.321,0C489.654,454.149,489.654,425.334,471.882,407.567z" />\n <path fill="${o}" d="M363.909,181.955C363.909,81.473,282.44,0,181.956,0C81.474,0,0.001,81.473,0.001,181.955s81.473,181.951,181.955,181.951 C282.44,363.906,363.909,282.437,363.909,181.955z M181.956,318.416c-75.252,0-136.465-61.208-136.465-136.46 c0-75.252,61.213-136.465,136.465-136.465c75.25,0,136.468,61.213,136.468,136.465 C318.424,257.208,257.206,318.416,181.956,318.416z" />\n <path fill="${o}" d="M75.817,181.955h30.322c0-41.803,34.014-75.814,75.816-75.814V75.816C123.438,75.816,75.817,123.437,75.817,181.955z" />\n </svg>`},OrgChart.icon.xml_export=OrgChart.icon.xml=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" viewBox="0 0 550.801 550.801" x="${a}" y="${s}">\n <path fill="${o}" d="M488.426,197.019H475.2v-63.816c0-0.401-0.063-0.799-0.116-1.205c-0.021-2.534-0.827-5.023-2.562-6.992L366.325,3.691 c-0.032-0.031-0.063-0.042-0.085-0.073c-0.633-0.707-1.371-1.298-2.151-1.804c-0.231-0.158-0.464-0.287-0.706-0.422 c-0.676-0.366-1.393-0.675-2.131-0.896c-0.2-0.053-0.38-0.135-0.58-0.19C359.87,0.119,359.037,0,358.193,0H97.2 c-11.918,0-21.6,9.693-21.6,21.601v175.413H62.377c-17.049,0-30.873,13.818-30.873,30.87v160.542 c0,17.044,13.824,30.876,30.873,30.876h13.224V529.2c0,11.907,9.682,21.601,21.6,21.601h356.4c11.907,0,21.6-9.693,21.6-21.601 V419.302h13.226c17.044,0,30.871-13.827,30.871-30.87V227.89C519.297,210.838,505.47,197.019,488.426,197.019z M97.2,21.605 h250.193v110.51c0,5.967,4.841,10.8,10.8,10.8h95.407v54.108H97.2V21.605z M369.531,374.53h-32.058l-2.156-55.519 c-0.644-17.434-1.298-38.518-1.298-59.611h-0.633c-4.514,18.516-10.547,39.166-16.137,56.162l-17.645,56.601h-25.618 l-15.494-56.157c-4.725-16.996-9.671-37.658-13.123-56.6h-0.43c-0.854,19.585-1.508,41.961-2.586,60.038l-2.576,55.086h-30.343 l9.26-145.035h43.677l14.207,48.421c4.517,16.774,9.041,34.847,12.258,51.843h0.654c4.081-16.77,9.038-35.923,13.774-52.064 l15.493-48.199h42.82L369.531,374.53z M69.992,374.53l41.955-73.385l-40.444-71.65h37.655l12.688,26.465 c4.316,8.828,7.533,15.928,10.99,24.092h0.422c3.438-9.242,6.23-15.694,9.893-24.092l12.274-26.465h37.434l-40.89,70.796 l43.044,74.239h-37.866l-13.134-26.257c-5.376-10.108-8.817-17.639-12.909-26.04h-0.433c-3.009,8.401-6.674,15.932-11.19,26.04 l-12.042,26.257H69.992z M453.601,523.353H97.2V419.302h356.4V523.353z M485.325,374.53h-90.608V229.495h32.933v117.497h57.682 v27.538H485.325z"/>\n </svg>`},OrgChart.icon.visio_export=OrgChart.icon.visio=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" viewBox="0 0 24 24" x="${a}" y="${s}">\n <path fill="${o}" d="M24 7.609v9.556q0 .424-.302.726-.303.303-.726.303h-5.19q-.072 1.149-.556 2.135-.484.986-1.264 1.717-.78.732-1.803 1.15-1.022.417-2.159.417-1.016 0-1.96-.35-.943-.352-1.705-.969-.762-.617-1.295-1.47-.532-.852-.713-1.856H1.028q-.423 0-.726-.303Q0 18.363 0 17.94V7.609q0-.424.302-.726.303-.302.726-.302h5.238q-.072-.182-.072-.387 0-.424.302-.726L11.274.69q.303-.303.726-.303t.726.303l4.778 4.778q.302.302.302.726 0 .205-.072.387h5.238q.423 0 .726.302.302.302.302.726zM12 2.153l-4.04 4.04.387.388h3.012q.423 0 .726.302.302.302.302.726v2.238l3.653-3.653zM7.161 16.84l3.085-8.13H8.238q-.508 1.489-1.028 2.952-.52 1.464-1.004 2.964-.496-1.488-.992-2.958-.496-1.47-1.004-2.957H2.153l3.037 8.129zM12 22.065q.883 0 1.657-.333t1.355-.913q.58-.581.913-1.355.333-.774.333-1.658 0-.81-.302-1.548-.303-.738-.823-1.318-.52-.581-1.228-.944-.707-.363-1.518-.423v4.367q0 .423-.302.725-.303.303-.726.303H7.923q.206.677.593 1.246.387.568.92.98.532.41 1.185.64.653.23 1.379.23zm10.452-5.42V8.13h-6.158q-.133.133-.441.454-.309.32-.714.725-.405.406-.847.853-.441.448-.828.823-.387.375-.684.641-.296.266-.393.302v.097q.968.036 1.845.411t1.578.998q.702.623 1.186 1.446t.677 1.766Z"/>\n </svg>`},OrgChart.icon.link=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" viewBox="0 0 512.092 512.092" x="${a}" y="${s}">\n <path fill="${o}" d="M312.453,199.601c-6.066-6.102-12.792-11.511-20.053-16.128c-19.232-12.315-41.59-18.859-64.427-18.859 c-31.697-0.059-62.106,12.535-84.48,34.987L34.949,308.23c-22.336,22.379-34.89,52.7-34.91,84.318 c-0.042,65.98,53.41,119.501,119.39,119.543c31.648,0.11,62.029-12.424,84.395-34.816l89.6-89.6 c1.628-1.614,2.537-3.816,2.524-6.108c-0.027-4.713-3.87-8.511-8.583-8.484h-3.413c-18.72,0.066-37.273-3.529-54.613-10.581 c-3.195-1.315-6.867-0.573-9.301,1.877l-64.427,64.512c-20.006,20.006-52.442,20.006-72.448,0 c-20.006-20.006-20.006-52.442,0-72.448l108.971-108.885c19.99-19.965,52.373-19.965,72.363,0 c13.472,12.679,34.486,12.679,47.957,0c5.796-5.801,9.31-13.495,9.899-21.675C322.976,216.108,319.371,206.535,312.453,199.601z" />\n <path fill="${o}" d="M477.061,34.993c-46.657-46.657-122.303-46.657-168.96,0l-89.515,89.429c-2.458,2.47-3.167,6.185-1.792,9.387 c1.359,3.211,4.535,5.272,8.021,5.205h3.157c18.698-0.034,37.221,3.589,54.528,10.667c3.195,1.315,6.867,0.573,9.301-1.877 l64.256-64.171c20.006-20.006,52.442-20.006,72.448,0c20.006,20.006,20.006,52.442,0,72.448l-80.043,79.957l-0.683,0.768 l-27.989,27.819c-19.99,19.965-52.373,19.965-72.363,0c-13.472-12.679-34.486-12.679-47.957,0 c-5.833,5.845-9.35,13.606-9.899,21.845c-0.624,9.775,2.981,19.348,9.899,26.283c9.877,9.919,21.433,18.008,34.133,23.893 c1.792,0.853,3.584,1.536,5.376,2.304c1.792,0.768,3.669,1.365,5.461,2.048c1.792,0.683,3.669,1.28,5.461,1.792l5.035,1.365 c3.413,0.853,6.827,1.536,10.325,2.133c4.214,0.626,8.458,1.025,12.715,1.195h5.973h0.512l5.12-0.597 c1.877-0.085,3.84-0.512,6.059-0.512h2.901l5.888-0.853l2.731-0.512l4.949-1.024h0.939c20.961-5.265,40.101-16.118,55.381-31.403 l108.629-108.629C523.718,157.296,523.718,81.65,477.061,34.993z" />\n </svg>`},OrgChart.icon.happy=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" viewBox="0 0 512 512" x="${a}" y="${s}">\n <path fill="${o}" d="M256,0C114.615,0,0,114.615,0,256s114.615,256,256,256s256-114.615,256-256S397.385,0,256,0z M256,480 C132.288,480,32,379.712,32,256S132.288,32,256,32s224,100.288,224,224S379.712,480,256,480z"/>\n <path fill="${o}" d="M176,176c17.673,0,32,14.327,32,32h32c0-35.346-28.654-64-64-64c-35.346,0-64,28.654-64,64h32 C144,190.327,158.327,176,176,176z"/>\n <path fill="${o}" d="M336,144c-35.346,0-64,28.654-64,64h32c0-17.673,14.327-32,32-32c17.673,0,32,14.327,32,32h32 C400,172.654,371.346,144,336,144z"/>\n <path fill="${o}" d="M256,368c-53.019,0-96-42.981-96-96h-32c0,70.692,57.308,128,128,128s128-57.308,128-128h-32 C352,325.019,309.019,368,256,368z"/>\n </svg>`},OrgChart.icon.sad=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" viewBox="0 0 512 512" x="${a}" y="${s}">\n <path fill="${o}" d="M256,0C114.615,0,0,114.615,0,256s114.615,256,256,256s256-114.615,256-256S397.385,0,256,0z M256,480 C132.288,480,32,379.712,32,256S132.288,32,256,32s224,100.288,224,224S379.712,480,256,480z"/>\n <path fill="${o}" d="M336,192c-17.673,0-32-14.327-32-32h-32c0,35.346,28.654,64,64,64c35.346,0,64-28.654,64-64h-32 C368,177.673,353.673,192,336,192z"/>\n <path fill="${o}" d="M176,224c35.346,0,64-28.654,64-64h-32c0,17.673-14.327,32-32,32s-32-14.327-32-32h-32C112,195.346,140.654,224,176,224z "/>\n <path fill="${o}" d="M256,256c-70.692,0-128,57.308-128,128h32c0-53.019,42.981-96,96-96s96,42.981,96,96h32C384,313.308,326.692,256,256,256 z"/>\n </svg>`},OrgChart.icon.share=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" x="${a}" y="${s}" viewBox="0 0 512 512">\n <path fill="${o}" d="M406,332c-29.641,0-55.761,14.581-72.167,36.755L191.99,296.124c2.355-8.027,4.01-16.346,4.01-25.124\n c0-11.906-2.441-23.225-6.658-33.636l148.445-89.328C354.307,167.424,378.589,180,406,180c49.629,0,90-40.371,90-90\n c0-49.629-40.371-90-90-90c-49.629,0-90,40.371-90,90c0,11.437,2.355,22.286,6.262,32.358l-148.887,89.59\n C156.869,193.136,132.937,181,106,181c-49.629,0-90,40.371-90,90c0,49.629,40.371,90,90,90c30.13,0,56.691-15.009,73.035-37.806\n l141.376,72.395C317.807,403.995,316,412.75,316,422c0,49.629,40.371,90,90,90c49.629,0,90-40.371,90-90\n C496,372.371,455.629,332,406,332z"/>\n </svg>`},OrgChart.icon.user=function(e,i,o,a,s){return OrgChart.isNEU(a)&&(a=0),OrgChart.isNEU(s)&&(s=0),`<svg width="${e}" height="${i}" x="${a}" y="${s}" viewBox="0 0 24 24">\n <path fill="${o}" d="M12 11.796C14.7189 11.796 16.9231 9.60308 16.9231 6.89801C16.9231 4.19294 14.7189 2.00005 12 2.00005C9.28106 2.00005 7.07692 4.19294 7.07692 6.89801C7.07692 9.60308 9.28106 11.796 12 11.796Z" fill="#030D45"/>\n <path fill="${o}" d="M14.5641 13.8369H9.4359C6.46154 13.8369 4 16.2859 4 19.245C4 19.9593 4.30769 20.5716 4.92308 20.8777C5.84615 21.3879 7.89744 22.0001 12 22.0001C16.1026 22.0001 18.1538 21.3879 19.0769 20.8777C19.5897 20.5716 20 19.9593 20 19.245C20 16.1838 17.5385 13.8369 14.5641 13.8369Z" fill="#030D45"/>\n </svg>`},OrgChart.icon.close=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" x="${a}" y="${s}" viewBox="0 0 512 512">\n <path fill="${o}" d="m256 0c-141.49 0-256 114.5-256 256 0 141.49 114.5 256 256 256 141.49 0 256-114.5 256-256 0-141.49-114.5-256-256-256zm-12.284 317.397-58.121 58.132c-6.565 6.553-15.283 10.166-24.557 10.166-19.196 0-34.734-15.526-34.734-34.734 0-9.274 3.612-17.992 10.166-24.557l58.132-58.121c6.785-6.784 6.785-17.783 0-24.568l-58.132-58.121c-6.553-6.565-10.166-15.283-10.166-24.557 0-19.196 15.526-34.734 34.734-34.734 9.274 0 17.992 3.613 24.557 10.166l58.121 58.132c6.785 6.773 17.784 6.773 24.568 0l58.121-58.132c6.565-6.553 15.283-10.166 24.557-10.166 19.196 0 34.734 15.526 34.734 34.734 0 9.274-3.612 17.992-10.166 24.557l-58.132 58.121c-6.785 6.784-6.785 17.783 0 24.568l58.132 58.121c6.553 6.565 10.166 15.283 10.166 24.557 0 19.196-15.526 34.734-34.734 34.734-9.274 0-17.992-3.613-24.557-10.166l-58.121-58.132c-6.784-6.784-17.784-6.773-24.568 0z"/>\n </svg>`},OrgChart.icon.undo=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" x="${a}" y="${s}" viewBox="0 0 24 24">\n <path fill-rule="evenodd" clip-rule="evenodd" fill="${o}" d="M3.46447 3.46447C2 4.92893 2 7.28595 2 12C2 16.714 2 19.0711 3.46447 20.5355C4.92893 22 7.28595 22 12 22C16.714 22 19.0711 22 20.5355 20.5355C22 19.0711 22 16.7141 22 12C22 7.28598 22 4.92893 20.5355 3.46447C19.0711 2 16.714 2 12 2C7.28595 2 4.92893 2 3.46447 3.46447ZM9.25871 7.97395C9.56308 7.693 9.58205 7.21851 9.3011 6.91414C9.02015 6.60978 8.54565 6.5908 8.24129 6.87175L5.99129 8.94867C5.83748 9.09065 5.75 9.29045 5.75 9.49977C5.75 9.7091 5.83748 9.9089 5.99129 10.0509L8.24129 12.1278C8.54565 12.4088 9.02015 12.3898 9.3011 12.0854C9.58205 11.781 9.56308 11.3065 9.25871 11.0256L8.41824 10.2498H14.0385C14.7376 10.2498 15.2069 10.2506 15.5652 10.2862C15.9116 10.3205 16.0724 10.3813 16.1787 10.4501C16.3272 10.5461 16.4537 10.6726 16.5497 10.8211C16.6184 10.9274 16.6793 11.0882 16.7136 11.4345C16.7491 11.7929 16.75 12.2622 16.75 12.9613C16.75 13.6604 16.7491 14.1298 16.7136 14.4881C16.6793 14.8344 16.6185 14.9952 16.5497 15.1015C16.4537 15.2501 16.3272 15.3765 16.1787 15.4726C16.0724 15.5413 15.9116 15.6021 15.5652 15.6365C15.2069 15.672 14.7376 15.6729 14.0385 15.6729H9.5C9.08579 15.6729 8.75 16.0086 8.75 16.4229C8.75 16.8371 9.08579 17.1729 9.5 17.1729H14.0758C14.7279 17.1729 15.2721 17.1729 15.7133 17.1291C16.1748 17.0834 16.6038 16.9839 16.9931 16.7322C17.3199 16.5209 17.5981 16.2427 17.8094 15.916C18.0611 15.5266 18.1605 15.0976 18.2063 14.6361C18.25 14.195 18.25 13.6508 18.25 12.9987V12.924C18.25 12.2718 18.25 11.7276 18.2063 11.2865C18.1605 10.825 18.0611 10.396 17.8093 10.0067C17.5981 9.6799 17.3199 9.40169 16.9931 9.19042C16.6038 8.9387 16.1748 8.83927 15.7133 8.7935C15.2721 8.74975 14.7279 8.74976 14.0758 8.74977L8.41824 8.74977L9.25871 7.97395Z" />\n <rect style="opacity: 0" x="2" y="2" width="20" height="20"></rect>\n </svg>`},OrgChart.icon.redo=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" x="${a}" y="${s}" viewBox="0 0 24 24" >\n <path fill="#f9f9f9" fill-rule="evenodd" clip-rule="evenodd" fill="${o}" d="M3.46447 3.46447C2 4.92893 2 7.28595 2 12C2 16.714 2 19.0711 3.46447 20.5355C4.92893 22 7.28595 22 12 22C16.714 22 19.0711 22 20.5355 20.5355C22 19.0711 22 16.7141 22 12C22 7.28598 22 4.92893 20.5355 3.46447C19.0711 2 16.714 2 12 2C7.28595 2 4.92893 2 3.46447 3.46447ZM15.7587 6.87273C15.4543 6.59177 14.9799 6.61075 14.6989 6.91512C14.4179 7.21948 14.4369 7.69398 14.7413 7.97493L15.5818 8.75075H9.96155C7.63558 8.75075 5.75 10.6363 5.75 12.9623C5.75 15.2883 7.63557 17.1738 9.96154 17.1738H14.5C14.9142 17.1738 15.25 16.838 15.25 16.4238C15.25 16.0096 14.9142 15.6738 14.5 15.6738H9.96154C8.464 15.6738 7.25 14.4598 7.25 12.9623C7.25 11.4647 8.464 10.2508 9.96155 10.2508H15.5818L14.7413 11.0266C14.4369 11.3075 14.4179 11.782 14.6989 12.0864C14.9799 12.3908 15.4543 12.4097 15.7587 12.1288L18.0087 10.0519C18.1625 9.90987 18.25 9.71007 18.25 9.50075C18.25 9.29143 18.1625 9.09163 18.0087 8.94965L15.7587 6.87273Z"/>\n <rect style="opacity: 0" x="2" y="2" width="20" height="20"></rect> \n </svg>`},OrgChart.icon.send=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" x="${a}" y="${s}" viewBox="0 0 24 24" >\n <path fill="none" stroke="${o}" stroke-width="2" d="M10.3009 13.6949L20.102 3.89742M10.5795 14.1355L12.8019 18.5804C13.339 19.6545 13.6075 20.1916 13.9458 20.3356C14.2394 20.4606 14.575 20.4379 14.8492 20.2747C15.1651 20.0866 15.3591 19.5183 15.7472 18.3818L19.9463 6.08434C20.2845 5.09409 20.4535 4.59896 20.3378 4.27142C20.2371 3.98648 20.013 3.76234 19.7281 3.66167C19.4005 3.54595 18.9054 3.71502 17.9151 4.05315L5.61763 8.2523C4.48114 8.64037 3.91289 8.83441 3.72478 9.15032C3.56153 9.42447 3.53891 9.76007 3.66389 10.0536C3.80791 10.3919 4.34498 10.6605 5.41912 11.1975L9.86397 13.42C10.041 13.5085 10.1295 13.5527 10.2061 13.6118C10.2742 13.6643 10.3352 13.7253 10.3876 13.7933C10.4468 13.87 10.491 13.9585 10.5795 14.1355Z" />\n </svg>`},OrgChart.icon.x=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" x="${a}" y="${s}" viewBox="0 0 24 24">\n <line x1="0" y1="0" x2="24" y2="24" stroke-width="3" stroke="${o}"></line>\n <line x1="24" y1="0" x2="0" y2="24" stroke-width="3" stroke="${o}"></line>\n </svg>`},OrgChart.icon.x=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" x="${a}" y="${s}" viewBox="0 0 24 24">\n <line x1="0" y1="0" x2="24" y2="24" stroke-width="3" stroke="${o}"></line>\n <line x1="24" y1="0" x2="0" y2="24" stroke-width="3" stroke="${o}"></line>\n </svg>`},OrgChart.icon.fit=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" x="${a}" y="${s}" viewBox="0 0 128 128">\n <path fill="${o}" d="M 58.1875 4.90625 C 29.957889 4.90625 6.9375 27.957888 6.9375 56.1875 C 6.9375 84.417111 29.957889 107.4375 58.1875 107.4375 C 69.752492 107.4375 80.436703 103.56785 89.03125 97.0625 L 108.59375 120.4375 A 7.0007 7.0007 0 1 0 119.3125 111.4375 L 98.96875 87.15625 C 105.53731 78.538312 109.4375 67.814416 109.4375 56.1875 C 109.4375 27.957888 86.417111 4.90625 58.1875 4.90625 z M 58.1875 18.875 C 78.850949 18.875 95.4375 35.52405 95.4375 56.1875 C 95.4375 76.850949 78.850949 93.4375 58.1875 93.4375 C 37.524051 93.4375 20.9375 76.850949 20.9375 56.1875 C 20.9375 35.52405 37.524051 18.875 58.1875 18.875 z M 33.125 31.09375 L 33.125 36.40625 L 33.125 75.90625 L 33.125 81.21875 L 38.4375 81.21875 L 77.9375 81.21875 L 83.25 81.21875 L 83.25 75.90625 L 83.25 36.40625 L 83.25 31.09375 L 77.9375 31.09375 L 38.4375 31.09375 L 33.125 31.09375 z M 43.78125 41.75 L 72.59375 41.75 L 72.59375 70.5625 L 43.78125 70.5625 L 43.78125 41.75 z "/>\n</svg>`},OrgChart.icon.expand_all=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" x="${a}" y="${s}" viewBox="0 0 32 32">\n <path fill="${o}" d="M13.816 5.989l-7.785 0.046 0.003 7.735 2.59-2.591 3.454 3.454 2.665-2.665-3.453-3.454 2.526-2.525zM12.079 17.35l-3.454 3.455-2.59-2.592-0.003 7.799 7.785-0.018-2.526-2.525 3.454-3.453-2.666-2.666zM19.922 14.633l3.453-3.454 2.59 2.591 0.004-7.735-7.785-0.046 2.526 2.525-3.454 3.454 2.666 2.665zM23.375 20.805l-3.453-3.455-2.666 2.666 3.454 3.453-2.526 2.525 7.785 0.018-0.004-7.799-2.59 2.592z"></path>\n</svg>`},OrgChart.icon.full_screen=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" x="${a}" y="${s}" viewBox="0 0 48 48">\n<rect width="48" height="48" fill="${o}" fill-opacity="0.01"/>\n<path fill="none" d="M16 40H6C4.89543 40 4 39.1046 4 38V10C4 8.89543 4.89543 8 6 8H42C43.1046 8 44 8.89543 44 10V16" stroke="${o}" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>\n<rect x="24" y="24" width="20" height="16" rx="2" fill="none" stroke="${o}" stroke-width="4" stroke-linejoin="round"/>\n</svg>`},OrgChart.icon.zoom_in=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" x="${a}" y="${s}" viewBox="0 0 32 32" >\n <g sketch:type="MSLayerGroup" transform="translate(-362.000000, -1037.000000)" fill="${o}">\n <path d="M390,1049 L382,1049 L382,1041 C382,1038.79 380.209,1037 378,1037 C375.791,1037 374,1038.79 374,1041 L374,1049 L366,1049 C363.791,1049 362,1050.79 362,1053 C362,1055.21 363.791,1057 366,1057 L374,1057 L374,1065 C374,1067.21 375.791,1069 378,1069 C380.209,1069 382,1067.21 382,1065 L382,1057 L390,1057 C392.209,1057 394,1055.21 394,1053 C394,1050.79 392.209,1049 390,1049" id="plus" sketch:type="MSShapeGroup"></path>\n </g>\n </svg>`},OrgChart.icon.zoom_out=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" x="${a}" y="${s}" viewBox="0 -12 32 32" >\n <g id="Icon-Set-Filled" sketch:type="MSLayerGroup" transform="translate(-414.000000, -1049.000000)" fill="${o}">\n <path d="M442,1049 L418,1049 C415.791,1049 414,1050.79 414,1053 C414,1055.21 415.791,1057 418,1057 L442,1057 C444.209,1057 446,1055.21 446,1053 C446,1050.79 444.209,1049 442,1049" id="minus" sketch:type="MSShapeGroup"></path>\n </g>\n </svg>`},OrgChart.icon.layout_normal=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" x="${a}" y="${s}" viewBox="0 0 110 100">\n <rect fill="${o}" x="35" y="0" width="50" height="27"></rect>\n <rect fill="${o}" x="7" y="41" width="50" height="27"></rect>\n <rect fill="${o}" x="63" y="41" width="50" height="27"></rect>\n <line stroke="${o}" x1="60" x2="60" y1="27" y2="35" stroke-width="1"></line>\n <line stroke="${o}" x1="32" x2="88" y1="35" y2="35" stroke-width="1"></line>\n <line stroke="${o}" x1="32" x2="32" y1="35" y2="41" stroke-width="1"></line>\n <line stroke="${o}" x1="88" x2="88" y1="35" y2="41" stroke-width="1"></line>\n </svg>`},OrgChart.icon.layout_right_offset=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" x="${a}" y="${s}" viewBox="0 0 110 100">\n <rect fill="${o}" x="35" y="0" width="50" height="27"></rect>\n <rect fill="${o}" x="40" y="41" width="50" height="27"></rect>\n <rect fill="${o}" x="40" y="73" width="50" height="27"></rect>\n <line stroke="${o}" x1="60" x2="60" y1="27" y2="35" stroke-width="1"></line>\n <line stroke="${o}" x1="60" x2="35" y1="35" y2="35" stroke-width="1"></line>\n <line stroke="${o}" x1="35" x2="35" y1="35" y2="86" stroke-width="1"></line>\n <line stroke="${o}" x1="35" x2="40" y1="86" y2="86" stroke-width="1"></line>\n <line stroke="${o}" x1="35" x2="40" y1="54" y2="54" stroke-width="1"></line>\n </svg>`},OrgChart.icon.layout_left_offset=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" x="${a}" y="${s}" viewBox="0 0 110 100">\n <rect fill="${o}" x="35" y="0" width="50" height="27"></rect>\n <rect fill="${o}" x="30" y="41" width="50" height="27"></rect>\n <rect fill="${o}" x="30" y="73" width="50" height="27"></rect>\n <line stroke="${o}" x1="60" x2="60" y1="27" y2="35" stroke-width="1"></line>\n <line stroke="${o}" x1="60" x2="85" y1="35" y2="35" stroke-width="1"></line>\n <line stroke="${o}" x1="85" x2="85" y1="35" y2="86" stroke-width="1"></line>\n <line stroke="${o}" x1="80" x2="85" y1="86" y2="86" stroke-width="1"></line>\n <line stroke="${o}" x1="80" x2="85" y1="54" y2="54" stroke-width="1"></line>\n </svg>`},OrgChart.icon.layout_mixed=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" x="${a}" y="${s}" viewBox="0 0 110 100">\n <rect fill="${o}" x="35" y="0" width="50" height="27"></rect>\n <rect fill="${o}" x="35" y="41" width="50" height="27"></rect>\n <rect fill="${o}" x="35" y="73" width="50" height="27"></rect>\n <line stroke="${o}" x1="60" x2="60" y1="27" y2="41" stroke-width="1"></line>\n <line stroke="${o}" x1="60" x2="60" y1="68" y2="73" stroke-width="1"></line>\n </svg>`},OrgChart.icon.layout_tree=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" x="${a}" y="${s}" viewBox="0 0 110 100">\n <rect fill="${o}" x="35" y="0" width="50" height="27"></rect>\n <rect fill="${o}" x="7" y="41" width="50" height="27"></rect>\n <rect fill="${o}" x="35" y="73" width="50" height="27"></rect>\n <rect fill="${o}" x="63" y="41" width="50" height="27"></rect>\n <line stroke="${o}" x1="60" x2="60" y1="27" y2="73" stroke-width="1"></line>\n <line stroke="${o}" x1="57" x2="63" y1="54" y2="54" stroke-width="1"></line>\n </svg>`},OrgChart.icon.layout_grid=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" x="${a}" y="${s}" viewBox="0 0 110 100">\n <rect fill="${o}" x="35" y="0" width="50" height="27"></rect>\n <rect fill="${o}" x="7" y="41" width="50" height="27"></rect>\n <rect fill="${o}" x="7" y="73" width="50" height="27"></rect>\n <rect fill="${o}" x="63" y="41" width="50" height="27"></rect>\n <rect fill="${o}" x="63" y="73" width="50" height="27"></rect>\n <line stroke="${o}" x1="60" x2="60" y1="27" y2="71" stroke-width="1"></line>\n <line stroke="${o}" x1="32" x2="88" y1="39" y2="39" stroke-width="1"></line>\n <line stroke="${o}" x1="32" x2="88" y1="71" y2="71" stroke-width="1"></line>\n <line stroke="${o}" x1="32" x2="32" y1="71" y2="73" stroke-width="1"></line>\n <line stroke="${o}" x1="88" x2="88" y1="71" y2="73" stroke-width="1"></line>\n <line stroke="${o}" x1="32" x2="32" y1="39" y2="41" stroke-width="1"></line>\n <line stroke="${o}" x1="88" x2="88" y1="39" y2="41" stroke-width="1"></line>\n </svg>`},OrgChart.icon.layout_grid=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" x="${a}" y="${s}" viewBox="0 0 110 100">\n <rect fill="${o}" x="35" y="0" width="50" height="27"></rect>\n <rect fill="${o}" x="7" y="41" width="50" height="27"></rect>\n <rect fill="${o}" x="7" y="73" width="50" height="27"></rect>\n <rect fill="${o}" x="63" y="41" width="50" height="27"></rect>\n <rect fill="${o}" x="63" y="73" width="50" height="27"></rect>\n <line stroke="${o}" x1="60" x2="60" y1="27" y2="71" stroke-width="1"></line>\n <line stroke="${o}" x1="32" x2="88" y1="39" y2="39" stroke-width="1"></line>\n <line stroke="${o}" x1="32" x2="88" y1="71" y2="71" stroke-width="1"></line>\n <line stroke="${o}" x1="32" x2="32" y1="71" y2="73" stroke-width="1"></line>\n <line stroke="${o}" x1="88" x2="88" y1="71" y2="73" stroke-width="1"></line>\n <line stroke="${o}" x1="32" x2="32" y1="39" y2="41" stroke-width="1"></line>\n <line stroke="${o}" x1="88" x2="88" y1="39" y2="41" stroke-width="1"></line>\n </svg>`},OrgChart.icon.cursor=function(e,i,o,a,s){return null==a&&(a=0),null==s&&(s=0),`<svg width="${e}" height="${i}" x="${a}" y="${s}" viewBox="0 0 16 16" >\n <path d="M8 3V0H6V3H8Z" fill="${o}"/>\n <path d="M0.792893 2.20711L3.29289 4.70711L4.70711 3.29289L2.20711 0.792893L0.792893 2.20711Z" fill="${o}"/>\n <path d="M6 5L5 6.00001L8 15H10L10.7172 12.1314L14.2929 15.7071L15.7071 14.2929L12.1314 10.7172L15 10V8L6 5Z" fill="${o}"/>\n <path d="M0 6H3V8H0V6Z" fill="${o}"/>\n </svg>`},OrgChart.prototype.exportPDFProfile=function(e,i){console.warn("exportPDFProfile is obsolete; use exportToPDFProfile instead.")},OrgChart.prototype.exportPDFPreview=function(e,i){console.warn("exportPDFPreview is obsolete; use exportToPDFProfile instead.")},OrgChart.prototype.exportPNGProfile=function(e,i){console.warn("exportPNGProfile is obsolete; use exportToPDFProfile instead.")},OrgChart.prototype.exportPDF=function(e,i){console.warn("exportPDF is obsolete; use exportToPDF instead.")},OrgChart.prototype.exportPNG=function(e,i){console.warn("exportPNG is obsolete; use exportToPNG instead.")},OrgChart.prototype.exportSVG=function(e,i){console.warn("exportSVG is obsolete; use exportToSVG instead.")},OrgChart.prototype.exportVisio=function(e,i){console.warn("exportVisio is obsolete; use exportToVisio instead.")},OrgChart.exportPDFFromCharts=function(e,i,o,a){console.warn('The "exportPDFFromCharts" is depricated. Use "chart1.exportToPDF" with pages instead.')},OrgChart.prototype.shareProfile=function(e){var i;"object"==typeof e?e=(i=e).focusId:i=this.editUI.content(e,!0,!0,"100%",!0);var o=new URL(window.location.href);o.searchParams.append("nodeId",e);var a={title:i.title,text:i.shareText,url:o.href};try{navigator.share(a)}catch(s){console.error("error: "+s)}},OrgChart.prototype.exportToCSV=OrgChart.prototype.exportCSV=function(e){var i=OrgChart._defaultExportProfileOptionsForCSV_SVG_JSON(e,"csv"),o=this.getNode(i.nodeId),a=null;o?(a=[],OrgChart._exportIterateForJSON_XML_CSV(this,o,i,a)):!1===i.min||!1===i.expandChildren?OrgChart._exportIterateForJSON_XML_CSV(this,this.roots,i,a):a=JSON.parse(JSON.stringify(this.config.nodes));var s={ext:"csv",filename:e,options:i,nodes:a};if(!1===OrgChart.events.publish("exportstart",[this,s]))return!1;var l=OrgChart._json2csv(s.nodes),c={ext:s.ext,filename:s.filename,options:i,nodes:s.nodes,content:l};if(!1===OrgChart.events.publish("exportend",[this,c]))return!1;OrgChart._downloadFile("text/csv;charset=utf-8;","\ufeff"+c.content,c.options.filename,c.options.openInNewTab,c.ext)},OrgChart.prototype.exportToXML=OrgChart.prototype.exportXML=function(e){var i=OrgChart._defaultExportProfileOptionsForCSV_SVG_JSON(e,"xml"),o=this.getNode(i.nodeId),a=null;o?(a=[],OrgChart._exportIterateForJSON_XML_CSV(this,o,i,a)):!1===i.min||!1===i.expandChildren?OrgChart._exportIterateForJSON_XML_CSV(this,this.roots,i,a):a=JSON.parse(JSON.stringify(this.config.nodes));var s={ext:"xml",filename:e,options:i,nodes:a};if(!1===OrgChart.events.publish("exportstart",[this,s]))return!1;var l=OrgChart._json2xml(s.nodes),c={ext:s.ext,filename:s.filename,options:i,nodes:s.nodes,content:l};if(!1===OrgChart.events.publish("exportend",[this,c]))return!1;OrgChart._downloadFile("application/xml",c.content,c.options.filename,c.options.openInNewTab,c.ext)},OrgChart.prototype.exportToJSON=OrgChart.prototype.exportJSON=function(e){var i=OrgChart._defaultExportProfileOptionsForCSV_SVG_JSON(e,"json"),o=this.getNode(i.nodeId),a=null;o?(a=[],OrgChart._exportIterateForJSON_XML_CSV(this,o,i,a)):!1===i.min||!1===i.expandChildren?OrgChart._exportIterateForJSON_XML_CSV(this,this.roots,i,a):a=JSON.parse(JSON.stringify(this.config.nodes));var s={ext:"json",filename:i.filename,options:i,nodes:a};if(!1===OrgChart.events.publish("exportstart",[this,s]))return!1;var l={ext:s.ext,filename:s.filename,options:i,nodes:s.nodes,content:JSON.stringify(s.nodes)};if(!1===OrgChart.events.publish("exportend",[this,l]))return!1;OrgChart._downloadFile("application/json",l.content,l.options.filename,l.options.openInNewTab,l.ext)},OrgChart._exportIterateForJSON_XML_CSV=function(e,i,o,a){if(Array.isArray(i))for(var s=0;s<i.length;s++)OrgChart._exportIterateForJSON_XML_CSV(e,i[s],o,a);else{var l=e.get(i.id);if(a.push(l),o.min)for(s=0;s<i.stChildrenIds.length;s++)OrgChart._exportIterateForJSON_XML_CSV(e,e.getNode(i.stChildrenIds[s]),o,a);else for(s=0;s<i.stChildren.length;s++)OrgChart._exportIterateForJSON_XML_CSV(e,i.stChildren[s],o,a);if(o.expandChildren)for(s=0;s<i.childrenIds.length;s++)OrgChart._exportIterateForJSON_XML_CSV(e,e.getNode(i.childrenIds[s]),o,a);else for(s=0;s<i.children.length;s++)OrgChart._exportIterateForJSON_XML_CSV(e,i.children[s],o,a)}},OrgChart._defaultExportProfileOptionsForCSV_SVG_JSON=function(e,i){return OrgChart.isNEU(e)&&(e={}),"string"==typeof e&&(e={filename:e}),OrgChart.isNEU(e.filename)&&(e.filename=`OrgChart.${i}`),OrgChart.isNEU(e.expandChildren)&&(e.expandChildren=!0),OrgChart.isNEU(e.min)&&(e.min=!0),OrgChart.isNEU(e.openInNewTab)&&(e.openInNewTab=!1),e},OrgChart.prototype.exportToPDFProfile=function(e,i){chart.exportToPDF({format:"A4",pages:[{nodeId:e,isProfile:!0}]},i)},OrgChart.prototype.exportToVisio=function(e,i){var o=this;e=OrgChart._setDefaultOptions(e,"vstx"),this._createExportPages("vstx",e,function(a){for(var s=0;s<e.pages.length;s++)OrgChart.loading.show(e.pages[s].chartInstance);o._requestToExportVisio(a,e,function(a){var s=!0;if(i&&(s=i(a)),!1!==s){if(!1===(s=OrgChart.events.publish("exportend",[o,a])))return OrgChart._exportHideAnimation(e),!1;OrgChart._downloadFile("application/vnd.visio",a,e.fileName,e.openInNewTab,"vsdx")}OrgChart._exportHideAnimation(e)})})},OrgChart.prototype.exportToPDF=function(e,i){var o=this;e=OrgChart._setDefaultOptions(e,"pdf"),this._createExportPages("pdf",e,function(a){for(var s=0;s<e.pages.length;s++)OrgChart.loading.show(e.pages[s].chartInstance);o._requestToExportPDF(a,e,function(a){var s=!0;if(i&&(s=i(a)),!1!==s){if(!1===(s=OrgChart.events.publish("exportend",[o,a])))return OrgChart._exportHideAnimation(e),!1;OrgChart._downloadFile("application/pdf",a,e.fileName,e.openInNewTab,"pdf")}OrgChart._exportHideAnimation(e)})})},OrgChart.prototype.exportToPNG=function(e,i){var o=this;e=OrgChart._setDefaultOptions(e,"png"),this._createExportPages("png",e,function(a){for(var s=0;s<e.pages.length;s++)OrgChart.loading.show(e.pages[s].chartInstance);o._requestToExportPNG(a,e,function(a){var s=!0;if(i&&(s=i(a)),!1!==s){if(!1===(s=OrgChart.events.publish("exportend",[o,a])))return OrgChart._exportHideAnimation(e),!1;1==e.pages.length?OrgChart._downloadFile("image/png",a,e.fileName,e.openInNewTab,"png"):OrgChart._downloadFile("application/zip",a,e.fileName.replaceAll(".png",".zip"),!1,"zip")}OrgChart._exportHideAnimation(e)})})},OrgChart.prototype.exportToSVG=function(e,i){var o=this;e=OrgChart._setDefaultOptions(e,"svg"),this._createExportPages("svg",e,function(a){for(var s=0;s<e.pages.length;s++)OrgChart.loading.show(e.pages[s].chartInstance);o._requestToExportSVG(a,e,function(a){var s=!0;if(i&&(s=i(a)),!1!==s){if(!1===(s=OrgChart.events.publish("exportend",[o,a])))return OrgChart._exportHideAnimation(e),!1;1==e.pages.length?OrgChart._downloadFile("image/svg+xml",a,e.fileName,e.openInNewTab,"svg"):OrgChart._downloadFile("application/zip",a,e.fileName.replaceAll(".svg",".zip"),!1,"zip")}OrgChart._exportHideAnimation(e)})})},OrgChart.prototype.exportToPowerPoint=function(e,i){var o=this;e=OrgChart._setDefaultOptions(e,"pptx"),this._createExportPages("pptx",e,function(a){for(var s=0;s<e.pages.length;s++)OrgChart.loading.show(e.pages[s].chartInstance);o._requestToExportPowerPoint(a,e,function(a){var s=!0;if(i&&(s=i(a)),!1!==s){if(!1===(s=OrgChart.events.publish("exportend",[o,a])))return OrgChart._exportHideAnimation(e),!1;OrgChart._downloadFile("application/msword",a,e.fileName,e.openInNewTab,"pptx")}OrgChart._exportHideAnimation(e)})})},OrgChart._exportHideAnimation=function(e){for(var i=0;i<e.pages.length;i++)OrgChart.loading.hide(e.pages[i].chartInstance)},OrgChart._setDefaultOptions=function(e,i,o){return e||(e={}),e.type=i,null==e.landscape&&("pdf"==i?e.landscape=!1:"pptx"==i&&(e.landscape=!0)),null==e.header&&(e.header=""),null==e.expandChildren&&(e.expandChildren=!1),null==e.childLevels&&(e.childLevels=null),null==e.parentLevels&&(e.parentLevels=null),null==e.min&&(e.min=!0),null==e.format&&("pdf"!=i||o?"pdf"==i&&o?e.format="A4":"pptx"==i&&(e.format="Widescreen"):e.format="auto"),null==e.footer&&("pdf"==i?"auto"==e.format?e.footer="":e.footer='<text style="fill: #aeaeae" x="0" y="15">Page {current-page} of {total-pages}</text>':"png"==i||"svg"==i?e.footer="":"pptx"==i?e.footer='<text style="fill: #aeaeae" x="0" y="15">Slide {current-page} of {total-pages}</text>':"vstx"==i&&(e.footer="")),null==e.fileName&&(e.fileName="OrgChart."+i),null==e.openInNewTab&&(e.openInNewTab=!1),null==e.width&&null==e.height&&("png"==i||"svg"==i||"vstx"==i||"pdf"==i&&"auto"==e.format?(e.width="auto",e.height="auto"):(OrgChart.Screen={width:screen.height/2,height:screen.width/2},e.landscape?(e.width=OrgChart[e.format].height,e.height=OrgChart[e.format].width):(e.width=OrgChart[e.format].width,e.height=OrgChart[e.format].height))),null==e.margin&&(e.margin=[30,20,30,20]),null==e.padding&&(e.padding=0),e.pages||(e.pages=[{}]),e},OrgChart.prototype._requestToExportPDF=function(e,i,o){OrgChart.__requestExport(this.config.serverUrl+"/Export/PDF",i.fileName,e,o)},OrgChart.prototype._requestToExportPNG=function(e,i,o){OrgChart.__requestExport(this.config.serverUrl+"/Export/PNG",i.fileName,e,o)},OrgChart.prototype._requestToExportVisio=function(e,i,o){OrgChart.__requestExport(this.config.serverUrl+"/Export/VSTX",i.fileName,e,o)},OrgChart.prototype._requestToExportSVG=function(e,i,o){OrgChart.__requestExport(this.config.serverUrl+"/Export/SVG",i.fileName,e,o)},OrgChart.prototype._requestToExportPowerPoint=function(e,i,o){OrgChart.__requestExport(this.config.serverUrl+"/Export/PowerPoint",i.fileName,e,o)},OrgChart.__requestExport=function(e,i,o,a){var s={filename:i,pages:o};OrgChart._ajax(e,"POST",JSON.stringify(s),"arraybuffer",function(e){a(e)})},OrgChart.prototype._createExportPages=function(e,i,o){var a=[];if(i.pages.length)for(var s=0;s<i.pages.length;s++)this.__createExportPages(e,s,a,i,o);else o(a)},OrgChart.prototype.__createExportPages=function(e,i,o,a,s){var l=this,c=a.pages[i];if(c.chartInstance||(c.chartInstance=this),void 0===c.expandChildren&&(c.expandChildren=a.expandChildren),void 0===c.childLevels&&(c.childLevels=a.childLevels),void 0===c.parentLevels&&(c.parentLevels=a.parentLevels),void 0===c.min&&(c.min=a.min),void 0===c.header&&(c.header=a.header),void 0===c.footer&&(c.footer=a.footer),null!=c.childLevels&&(c.expandChildren=!1),void 0===c.padding&&(c.padding=a.padding),void 0===c.margin&&(c.margin=a.margin),null!=c.content||!0===c.isProfile){c.isProfile&&(c.content=this._createProfileSvg(a,c));var d=l._createMasterSvg(e,c.content,i,a,null!=c.content);if(o.push(d),l.___createExportPages(e,i,o,a,s))return}else{var h={id:c.nodeId,expandChildren:c.expandChildren,parentLevels:c.parentLevels,childLevels:c.childLevels,min:c.min};a.pages[i].chartInstance._draw(!1,OrgChart.action.exporting,h,function(c,d){var h=l._createMasterSvg(e,c,i,a,!1);o.push(h),l.___createExportPages(e,i,o,a,s)})}},OrgChart.prototype._createMasterSvg=function(e,i,o,a,s){var l=!1;""==i&&(l=!0,i='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="display:block;" width="100" height="100" viewBox="0,0,0,0"><svg>');var c=a.pages[o],d=document.createElementNS("http://www.w3.org/2000/svg","svg");d.setAttribute("xmlns","http://www.w3.org/2000/svg"),d.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),document.body.appendChild(d);var h=OrgChart._getSvgAttributes(i);l?"auto"==a.width?c.width=1e3:c.width=a.width:"auto"==a.width?c.width=h.width+c.margin[3]+c.margin[1]:c.width=a.width;var p=document.createElementNS("http://www.w3.org/2000/svg","g");p.innerHTML=`${c.header.replaceAll("{current-page}",o+1).replaceAll("{total-pages}",a.pages.length)}`,d.appendChild(p),OrgChart._setYAttrToTextElements(c,a,p);var u=p.getBoundingClientRect();u.height&&(u.height+=10),p.setAttribute("transform",`matrix(1,0,0,1,${c.margin[3]},${c.margin[0]})`);var f=document.createElementNS("http://www.w3.org/2000/svg","g");f.innerHTML=`${c.footer.replaceAll("{current-page}",o+1).replaceAll("{total-pages}",a.pages.length)}`,d.appendChild(f),OrgChart._setYAttrToTextElements(c,a,f);var g,m=f.getBoundingClientRect();if(l?"auto"==a.height?c.height=1e3:c.height=a.height:"auto"==a.height?c.height=h.height+c.margin[0]+c.margin[2]+u.height+m.height:c.height=a.height,f.setAttribute("transform",`matrix(1,0,0,1,${c.margin[3]},${c.height-c.margin[2]-m.height})`),d.classList.add("boc-"+this.config.mode),document.body.removeChild(d),!c.isProfile){var b=(c.width-c.margin[3]-c.margin[1])/h.width,x=(c.height-c.margin[0]-c.margin[2]-u.height-m.height)/h.height,v=Math.min(b,x,1);h.width*=v,h.height*=v,h.viewBox[0]-=c.padding,h.viewBox[1]-=c.padding,h.viewBox[2]+=2*c.padding,h.viewBox[3]+=2*c.padding,h.x=(c.width-h.width)/2,h.y=c.margin[0]+u.height+(c.height-c.margin[0]-u.height-c.margin[2]-m.height-h.height)/2}g=s?OrgChart._isSVG(i)?i:`<foreignObject x="0" y="0" width="100%" height="100%">${i}</foreignObject>`:OrgChart._setSvgAttributes(i,h);var y=c.width,_=c.height;return"pdf"!=e||c.isProfile||(y+=2,_+=2),d.setAttribute("width",y),d.setAttribute("height",_),d.innerHTML=g+d.innerHTML,d},OrgChart.prototype._createProfileSvg=function(e,i){var o=this.editUI.content(i.nodeId,!0,!0,"100%",!0).element;return OrgChart.input.init(o),`<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="display:block;" width="${e.width}" height="${e.height}" viewBox="0,0,${e.width},${e.height}"> \n <style>\n form.boc-edit-form, div.boc-edit-form-header {\n border-radius: 0;\n }\n \n </style>\n <foreignobject class="node" x="0" y="0" width="${e.width}" height="${e.height}">${o.outerHTML}</foreignobject>\n </svg>`},OrgChart.prototype.___createExportPages=function(e,i,o,a,s){if(i>=a.pages.length-1){var l={pages:o,options:a,styles:""};if(!1===OrgChart.events.publish("exportstart",[this,l]))return!1;var c=this.mainElement.querySelector("[data-boc-styles]");if(c&&(l.styles+=c.outerHTML),l.styles)for(var d=0;d<l.pages.length;d++){var h=l.pages[d];h.insertAdjacentHTML("afterbegin",l.styles),l.pages[d]=h.outerHTML}return OrgChart.CONVERT_IMAGES_TO_BASE64_BEFORE_EXPORT?OrgChart._convertImagesToBase64(l.pages).then(function(e){l.pages=e,s(l.pages)}):s(l.pages),!0}return!1},OrgChart._setYAttrToTextElements=function(e,i,o){for(var a=o.querySelectorAll("text"),s=0;s<a.length;s++){var l=a[s];if(!l.hasAttribute("y")){var c=l.getBoundingClientRect();l.setAttribute("y",c.height)}if(l.hasAttribute("text-anchor")&&!l.hasAttribute("x")){var d=l.getAttribute("text-anchor").toLowerCase(),h=e.width-e.margin[1]-e.margin[3];"end"==d?l.setAttribute("x",h):"middle"==d&&l.setAttribute("x",h/2)}}},OrgChart.exportUI=function(e){this.instance=null,this.interval=null,this.element=null,this.options=null,this.selectedIndex=0,this.type=e,this.locExport="Export",this.locLandscape="Landscape",this.locPortrait="Portrait",this.locCancel="Close",this.locParentLevels="parent levels",this.locChildLevels="child levels",this.locClickToAdd="Click on a node to display it here",this.locPrintTree="Print tree",this.locPrintProfile="Print profile","pdf"==e?(this.locAddNew="Add new page",this.locRemove="Remove page"):"png"==e?(this.locAddNew="Add new PNG",this.locRemove="Remove PNG"):"svg"==e?(this.locAddNew="Add new SVG",this.locRemove="Remove SVG"):"pptx"==e&&(this.locAddNew="Add new slide",this.locRemove="Remove slide"),this.buttons={parentLevels:!1,childLevels:!0,printProfileOrTree:!0,removePage:!0,addNewPage:!0,landscapePortrait:!0},Object.defineProperty(this,"width",{get(){return this.isVisible()?this.element.offsetWidth:0}}),Object.defineProperty(this,"selectedPage",{get(){var e=this.instance.leftElement.querySelector(".boc-export-selected");if(e){var i=e.getAttribute("data-boc-export-page");return i=parseInt(i),this.options.pages[i]}return null}})},OrgChart.exportUI.prototype.init=function(e){this.instance=e},OrgChart.exportUI.prototype.show=function(e){this.selectedIndex=0,this.instance.pdfPreviewUI.hide(),this.instance.svgPreviewUI.hide(),this.instance.pngPreviewUI.hide(),this.instance.powerPointPreviewUI.hide(),this.instance.aiUI.hide(),this.instance.orgScribeUI.hide(),this.options=OrgChart._setDefaultOptions(e,this.type,!0);var i=this;this.instance._createExportPages(this.type,this.options,function(e){i._init(e)})},OrgChart.exportUI.prototype.isVisible=function(){return null!=this.element},OrgChart.exportUI.prototype.hide=function(){this.instance.leftElement.style.display="none",this.element&&(this.element.parentNode.removeChild(this.element),this.element=null)},OrgChart.exportUI.prototype.refresh=function(){var e=this;this.instance._createExportPages(this.type,this.options,function(i){e._draw(i)})},OrgChart.exportUI.prototype._init=function(e){var i=this;this.element=document.createElement("div"),this.element.setAttribute("data-boc-export-form",""),this.element.style.opacity=0,this.element.classList.add("boc-export-form"),this.element.classList.add(this.instance.config.mode),this.element.style.display="";var o="";"pdf"==this.type&&"auto"!=this.options.format&&(o=`<button ${this.buttons.landscapePortrait?"":'style="display: none;"'} data-boc-export-landcapeportrait>${this.options.landscape?this.locPortrait:this.locLandscape}</button> `),this.element.innerHTML=`<div class="boc-export-container"> \n <div class="boc-export-btns"> \n \n <div class="boc-export-btns-inner"> \n <div class="boc-export-left"> \n <button data-boc-export-cancel>${this.locCancel}</button> \n ${o} \n <button ${this.buttons.addNewPage?"":'style="display: none;"'} data-boc-export-btnnewpage>${this.locAddNew}</button> \n </div> \n <div class="boc-export-right"> \n <button class="boc-export-btn" data-boc-export-export>${this.locExport}</button> \n </div> \n </div> \n </div>\n <div class="boc-export-middle">\n <div class="boc-export-middle-inner" data-boc-export-pages>\n </div>\n </div>\n </div>`,this.instance.leftElement.appendChild(this.element),this.instance.leftElement.style.display="block",this.instance.leftElement.querySelector("[data-boc-export-btnnewpage]").addEventListener("click",function(e){i.addPage({content:""})});var a=this.instance.leftElement.querySelector("[data-boc-export-landcapeportrait]");a&&a.addEventListener("click",function(e){i.toggleLanscape()}),this.instance.leftElement.querySelector("[data-boc-export-pages]").addEventListener("click",function(e){for(var o,a=e.target;a&&a.hasAttribute&&!a.hasAttribute("data-boc-export-page");)a=a.parentNode;a&&a.hasAttribute&&a.hasAttribute("data-boc-export-page")&&(o=a.getAttribute("data-boc-export-page")),e.target.hasAttribute&&(e.target.hasAttribute("data-export-remove")?i.removePage(o):e.target.hasAttribute("data-export-child-plus")?i._incrementDecrementChildLevel(o,!0):e.target.hasAttribute("data-export-child-minus")?i._incrementDecrementChildLevel(o,!1):e.target.hasAttribute("data-export-parent-plus")?i._incrementDecrementParentLevel(o,!0):e.target.hasAttribute("data-export-parent-minus")?i._incrementDecrementParentLevel(o,!1):e.target.hasAttribute("data-export-profiletree")?i.toggelePrintTreeOrProfile(o,!1):i.selectPage(o))});var s=this.instance.leftElement.querySelector("[data-boc-export-cancel]");s&&s.addEventListener("click",function(e){i.hide()});var l=this.instance.leftElement.querySelector("[data-boc-export-export]");l&&l.addEventListener("click",function(e){i.instance.powerPointPreviewUI.isVisible()?i.instance.exportToPowerPoint(i.options):i.instance.pdfPreviewUI.isVisible()?i.instance.exportToPDF(i.options):i.instance.pngPreviewUI.isVisible()?i.instance.exportToPNG(i.options):i.instance.svgPreviewUI.isVisible()&&i.instance.exportToSVG(i.options)}),this.interval&&(clearTimeout(this.interval),this.interval=null),this.interval=OrgChart.animate(this.element,{opacity:0},{opacity:1},300,OrgChart.anim.outSin,function(){i._draw(e)})},OrgChart.exportUI.prototype._draw=function(e){var i=this.instance.leftElement.querySelector("[data-boc-export-pages]");i.innerHTML="";for(var o=0;o<e.length;o++){var a=e[o],s=this.options.pages[o].width/this.options.pages[o].height,l=OrgChart._getSvgAttributes(a);l.viewBox[0]=0,l.viewBox[1]=0,l.viewBox[2]=l.width,l.viewBox[3]=l.height,l.width="100%",l.height="100%";var c=OrgChart._setSvgAttributes(a,l),d=OrgChart._getSvgAttributes;""==this.options.pages[o].content&&(d=" boc-export-empty");var h=`<div ${this.buttons.removePage?"":'style="display: none;"'} class="boc-export-remove-buttons"> \n <button data-export-remove="${o}">${this.locRemove}</button> \n </div>`;"pdf"==this.type&&"auto"!=this.options.format&&!OrgChart.isNEU(this.options.pages[o].nodeId)&&(!this.options.pages[o].content||this.options.pages[o].isProfile&&this.options.pages[o].content)&&(h+=`<div ${this.buttons.printProfileOrTree?"":'style="display: none;"'} class="boc-export-profiletree-buttons"> \n <button data-export-profiletree="${o}">${this.options.pages[o].isProfile?this.locPrintTree:this.locPrintProfile}</button> \n </div>`),this.options.pages[o].isProfile||OrgChart.isNEU(this.options.pages[o].nodeId)||(h=`<div ${this.buttons.parentLevels?"":'style="display: none;"'} class="boc-export-parent-buttons"> \n <button data-export-parent-minus="${o}">-</button> \n <button data-export-parent-plus="${o}">+</button> ${null==this.options.pages[o].parentLevels?"all":this.options.pages[o].parentLevels} ${this.locParentLevels}\n </div> \n <div ${this.buttons.childLevels?"":'style="display: none;"'} class="boc-export-child-buttons"> \n <button data-export-child-minus="${o}">-</button> \n <button data-export-child-plus="${o}">+</button> ${null==this.options.pages[o].childLevels?"all":this.options.pages[o].childLevels} ${this.locChildLevels}\n </div>`+h),i.innerHTML+=`<div data-boc-export-page="${o}" style="aspect-ratio: ${s};" class="boc-export-page ${d}">\n ${c}\n ${h} \n </div>`}this.selectPage(this.selectedIndex)},OrgChart.exportUI.prototype.toggleLanscape=function(){var e=this;this.options.landscape=!this.options.landscape,this.options.width=void 0,this.options.height=void 0,this.options=OrgChart._setDefaultOptions(this.options,this.type,!0),this.instance.leftElement.querySelector("[data-boc-export-landcapeportrait]").innerHTML=this.options.landscape?this.locPortrait:this.locLandscape,this.instance._createExportPages(this.type,this.options,function(i){e._draw(i),e.selectPage(e.options.pages.length-1)})},OrgChart.exportUI.prototype.addPage=function(e){var i=this;this.options.pages.push(e),this.instance._createExportPages(this.type,this.options,function(e){i._draw(e),i.selectPage(i.options.pages.length-1);var o=i.element.querySelector(".boc-export-middle");OrgChart.animate(o,{scrollTop:o.scrollTop},{scrollTop:o.scrollHeight},600,OrgChart.anim.outSin)})},OrgChart.exportUI.prototype.removePage=function(e){e=parseInt(e);var i=this;e<=i.selectedIndex&&(i.selectedIndex--,i.selectedIndex<0&&(i.selectedIndex=0)),this.options.pages.splice(e,1),this.instance._createExportPages(this.type,this.options,function(e){i._draw(e),i.selectPage(i.selectedIndex)})},OrgChart.exportUI.prototype._incrementDecrementChildLevel=function(e,i){var o=this;e<o.selectedIndex&&o.selectedIndex--;var a=this.options.pages[e];null==a.childLevels&&(a.childLevels=i?0:2),i?a.childLevels++:a.childLevels--,-1==a.childLevels&&(a.childLevels=0),a.expandChildren=!1,this.instance._createExportPages(this.type,this.options,function(e){o._draw(e),o.selectPage(o.selectedIndex)})},OrgChart.exportUI.prototype.toggelePrintTreeOrProfile=function(e){var i=this,o=this.options.pages[e];o.isProfile=!o.isProfile,this.options.pages[e].content=void 0,this.instance._createExportPages(this.type,this.options,function(e){i._draw(e),i.selectPage(i.selectedIndex)})},OrgChart.exportUI.prototype._incrementDecrementParentLevel=function(e,i){var o=this;e<o.selectedIndex&&o.selectedIndex--;var a=this.options.pages[e];null==a.parentLevels?a.parentLevels=1:i?a.parentLevels++:a.parentLevels--,-1==a.parentLevels&&(a.parentLevels=0),this.instance._createExportPages(this.type,this.options,function(e){o._draw(e),o.selectPage(o.selectedIndex)})},OrgChart.exportUI.prototype.selectPage=function(e){for(var i=this.instance.leftElement.querySelectorAll("[data-boc-export-page]"),o=0;o<i.length;o++)i[o].classList.remove("boc-export-selected");for(i=this.instance.leftElement.querySelectorAll(".boc-export-select"),o=0;o<i.length;o++)i[o].parentNode.removeChild(i[o]);var a=this.instance.leftElement.querySelectorAll("[data-boc-export-pages] .boc-export-page");if(a.length){var s=a[e];s.classList.contains("boc-export-empty")&&(s.innerHTML+=`<div class="boc-export-select">${this.locClickToAdd}</div>`),s.classList.add("boc-export-selected"),this.selectedIndex=e}},void 0===OrgChart&&(OrgChart={}),OrgChart.events=(e={},{on:function(i,o,a){Array.isArray(e[i])||(e[i]=[]),e[i].push({listener:o,event_id:a})},removeAll:function(i){Array.isArray(e[i])||(e[i]=[]),e[i]=[]},remove:function(i,o,a){var s=!1;if(e[i]&&Array.isArray(e[i])&&e[i].length>0)for(var l=e[i].length-1;l>=0;l--)(!OrgChart.isNEU(a)&&!OrgChart.isNEU(o)&&e[i][l].event_id==a&&e[i][l].listener==o||!OrgChart.isNEU(a)&&OrgChart.isNEU(o)&&e[i][l].event_id==a||OrgChart.isNEU(a)&&!OrgChart.isNEU(o)&&e[i][l].listener==o||OrgChart.isNEU(a)&&OrgChart.isNEU(o))&&(e[i].splice(l,1),s=!0);return s},has:function(i,o){if(e[i]&&Array.isArray(e[i])&&e[i].length>0){if(OrgChart.isNEU(o))return!0;for(var a=0;a<e[i].length;a++)if(e[i][a].event_id==o)return!0}return!1},removeForEventId:function(i){for(var o in e)if(Array.isArray(e[o]))for(var a=e[o].length-1;a>=0;a--)e[o][a].event_id==i&&e[o].splice(a,1)},publish:function(i,o){if(e[i]){for(var a=[],s=0;s<e[i].length;s++){var l=e[i][s];null!=l.event_id&&l.event_id!=o[0]._event_id||a.push(l.listener)}if(a.length>0){var c=!0;for(s=0;s<a.length&&(1==o.length?c=a[s](o[0])&&c:2==o.length?c=a[s](o[0],o[1])&&c:3==o.length?c=a[s](o[0],o[1],o[2])&&c:4==o.length?c=a[s](o[0],o[1],o[2],o[3])&&c:5==o.length&&(c=a[s](o[0],o[1],o[2],o[3],o[4])&&c),!1!==c);s++);return c}}}}),OrgChart.prototype.importCSV=function(){var e=this,i=document.createElement("INPUT");i.setAttribute("type","file"),i.setAttribute("accept",".csv"),i.style.display="none",i.onchange=function(i){var o=i.target,a=new FileReader;a.onload=function(){var i=a.result,o=OrgChart._csvToArray(i),s=[],l=o[0];OrgChart._importSetColumnNames(l,function(i){for(var a=1;a<o.length;a++){for(var l={},c=0;c<o[a].length;c++){var d=i[c],h=o[a][c];l[d]=OrgChart._convertStringToArray(d,h)}""!=l.id.trim()&&s.push(l)}var p={nodes:s,columnNames:o[0]};0!=OrgChart.events.publish("import",[e,p])&&(e._putInUndoStack(),e.clearRedo(),e.config.nodes=p.nodes,e._ai.setContext(),OrgChart.events.publish("updated",[e]),e.filterUI.update(),e.draw())})},a.readAsText(o.files[0])},i.click()},OrgChart._importSetColumnNames=function(e,i){if(-1==e.indexOf("id")||-1==e.indexOf("pid")){var o=document.createElement("DIV"),a=document.createElement("P");a.style.padding="5px",a.style.color="rgb(122, 122, 122)",a.innerHTML=OrgChart.IMPORT_MESSAGE,o.appendChild(a);var s=document.createElement("div"),l=document.createElement("div"),c=document.createElement("div"),d=document.createElement("span");s.setAttribute("id","boc-sampleDialog"),s.style.height="260px",s.style.width="400px",s.style.background="white",s.style.border="0.5px solid grey",s.style.position="fixed",s.style.overflow="hidden",s.style.zIndex="99",l.setAttribute("id","title"),l.style.backgroundColor="#e5e5e5",l.style.fontWeight="bold",l.style.color="rgb(122, 122, 122)",l.style.height="20px",l.style.padding="3px 0 0 7px",d.setAttribute("id","close"),d.style.cursor="pointer",d.style.position="absolute",d.style.color="rgb(122, 122, 122)",d.style.fontWeight="bold",d.style.top="2px",d.style.zIndex=100,c.setAttribute("id","content"),c.style.padding="2px",l.innerHTML="Import Organizational Chart Data",d.innerHTML="&times;";var h=document.createElement("HR");h.style.height="0.1px",h.style.backgroundColor="#aeaeae",h.style.border="none",h.style.margin="0",s.appendChild(l),s.appendChild(h),c.appendChild(o),s.appendChild(c),s.appendChild(d),document.body.appendChild(s),OrgChart._importCenter(s),d.style.left=s.offsetWidth-20+"px";var p=document.createElement("div");p.setAttribute("id","overlay"),p.style.width="100%",p.style.height="100%",p.style.left=0,p.style.top=0,p.style.position="fixed",p.style.background="grey",p.style.opacity="0.5",p.style.zIndex=98,document.body.appendChild(p),s._overlay=p;var u=document.createElement("LABEL"),f=document.createTextNode("Name:");u.setAttribute("for","boc-id-select"),u.appendChild(f),u.style.fontSize="16px",u.style.color="rgb(122, 122, 122)",u.style.padding="5px",u.style.margin="5px",u.style.width="30%",u.style.textAlign="right",u.style.display="inline-block",o.appendChild(u);var g=document.createElement("SELECT");g.id="boc-id-select",g.style.fontSize="16px",g.style.color="rgb(122, 122, 122)",g.style.padding="5px",g.style.margin="5px",g.style.width="60%",g.style.border="1px solid #aeaeae",o.appendChild(g);var m=document.createElement("BR");o.appendChild(m);for(var b=0;b<e.length;b++){(w=document.createElement("option")).setAttribute("value",e[b]);var x=document.createTextNode(e[b]);w.appendChild(x),g.appendChild(w)}var v=document.createElement("LABEL"),y=document.createTextNode("Reports to:");v.setAttribute("for","pid-select"),v.appendChild(y),v.style.fontSize="16px",v.style.color="rgb(122, 122, 122)",v.style.padding="5px",v.style.margin="5px",v.style.width="30%",v.style.textAlign="right",v.style.display="inline-block",o.appendChild(v);var _=document.createElement("SELECT");_.id="pid-select",_.style.fontSize="16px",_.style.color="rgb(122, 122, 122)",_.style.padding="5px",_.style.margin="5px",_.style.width="60%",_.style.border="1px solid #aeaeae",o.appendChild(_);for(b=0;b<e.length;b++){var w;(w=document.createElement("option")).setAttribute("value",e[b]);x=document.createTextNode(e[b]);w.appendChild(x),_.appendChild(w)}var k=document.createElement("BUTTON");k.innerHTML="Import",k.style.fontSize="16px",k.style.color="rgb(122, 122, 122)",k.style.padding="5px 20px",k.style.margin="20px auto",k.style.display="block",k.onclick=function(){s.style.display="none",s._overlay&&s._overlay.parentNode.removeChild(s._overlay);var o=g.options[g.selectedIndex].value,a=e.indexOf(o);e[a]="id";var l=_.options[_.selectedIndex].value,c=e.indexOf(l);e[c]="pid",i(e)};var I=document.createElement("DIV");return I.appendChild(k),o.appendChild(I),d.onclick=function(e){s._overlay&&s._overlay.parentNode.removeChild(s._overlay),s.parentNode.removeChild(s),e.stopPropagation()},l.onmousedown=function(e){e=e||window.event,s._dragging=!0,s._originalLeft=s.offsetLeft,s._originalTop=s.offsetTop,s._mouseLeft=e.clientX,s._mouseTop=e.clientY},document.onmousemove=function(e){e=e||window.event,s._dragging&&(s.style.left=s._originalLeft+e.clientX-s._mouseLeft+"px",s.style.top=s._originalTop+e.clientY-s._mouseTop+"px")},document.onmouseup=function(e){e=e||window.event,s._dragging&&(s.style.left=s._originalLeft+e.clientX-s._mouseLeft+"px",s.style.top=s._originalTop+e.clientY-s._mouseTop+"px",s._dragging=!1)},s}i(e)},OrgChart._importCenter=function(e){e&&(e.style.left=(window.innerWidth-e.offsetWidth)/2+"px",e.style.top=(window.innerHeight-e.offsetHeight)/2+"px")},OrgChart.prototype.importXML=function(){var e=this,i=document.createElement("INPUT");i.setAttribute("type","file"),i.setAttribute("accept",".xml"),i.style.display="none",i.onchange=function(i){var o=i.target,a=new FileReader;a.onload=function(){var i=a.result,o=OrgChart._xml2json(i);0!=OrgChart.events.publish("import",[e,o])&&(e._putInUndoStack(),e.clearRedo(),e.config.nodes=o,e._ai.setContext(),OrgChart.events.publish("updated",[e]),e.filterUI.update(),e.draw())},a.readAsText(o.files[0])},i.click()},OrgChart.prototype.importJSON=function(){var e=this,i=document.createElement("INPUT");i.setAttribute("type","file"),i.setAttribute("accept",".json"),i.style.display="none",i.onchange=function(i){var o=i.target,a=new FileReader;a.onload=function(){var i=a.result,o=JSON.parse(i);0!=OrgChart.events.publish("import",[e,o])&&(e._putInUndoStack(),e.clearRedo(),e.config.nodes=o,e._ai.setContext(),OrgChart.events.publish("updated",[e]),e.filterUI.update(),e.draw())},a.readAsText(o.files[0])},i.click()},OrgChart.prototype.expand=function(e,i,o){this._treeListExpandCollapseHandler(e),this._resetMovableNodes();var a={id:e,ids:i};this._draw(!1,OrgChart.action.expand,a,o)},OrgChart.prototype.collapse=function(e,i,o){this._treeListExpandCollapseHandler(e),this._resetMovableNodes();var a={id:e,ids:i};this._draw(!1,OrgChart.action.collapse,a,o)},OrgChart.prototype.expandCollapse=function(e,i,o,a){this._treeListExpandCollapseHandler(e),this._resetMovableNodes(),Array.isArray(i)||(i=[]),Array.isArray(o)||(o=[]);var s={id:e,expandIds:i,collapseIds:o,ids:i.concat(o)};this._draw(!1,OrgChart.action.collapse,s,a)},OrgChart.prototype.changeRoots=function(e,i,o){this.config.roots=i;var a={id:e,changeRoots:i};this._draw(!1,OrgChart.action.update,a,o)},OrgChart.prototype._resetMovableNodes=function(){if(OrgChart.RESET_MOVABLE_ONEXPANDCOLLAPSE&&null!=this.config.movable){for(var e=!1,i=0;i<this.config.nodes.length;i++){var o=this.config.nodes[i];null!=o.movex&&(o.movex=0,e=!0),null!=o.movey&&(o.movey=0,e=!0)}e&&(this._ai.setContext(),OrgChart.events.publish("updated",[this]))}},OrgChart.prototype.maximize=function(e,i,o,a){var s=this,l={id:e,options:{}};OrgChart.isNEU(l.id)&&(l.id=this.roots[0].id,l.all=!0),l.options.horizontal=!1,l.options.vertical=!1,i&&(l.options.horizontal=i),o&&(l.options.vertical=o),this._draw(!1,OrgChart.action.maximize,l,function(){s.ripple(e),a&&a()})},OrgChart.prototype.minimize=function(e,i){var o=this,a={id:e};OrgChart.isNEU(a.id)&&(a.id=this.roots[0].id,a.all=!0),this._draw(!1,OrgChart.action.minimize,a,function(){o.ripple(e),i&&i()})},OrgChart.prototype._expCollHandler=function(e){this.nodeMenuUI.hide(),this.nodeContextMenuUI.hide(),this.menuUI.hide(),this.nodeCircleMenuUI.hide();var i=this.getNode(e),o=this.getCollapsedIds(i);if(o.length){if(!1===OrgChart.events.publish("expcollclick",[this,!1,e,o]))return!1;this.expand(e,o,!1)}else{if(!1===OrgChart.events.publish("expcollclick",[this,!0,e,i.childrenIds]))return!1;this.collapse(e,i.childrenIds,!1)}},OrgChart.prototype._upHandler=function(e){this.nodeMenuUI.hide(),this.nodeContextMenuUI.hide(),this.menuUI.hide(),this.nodeCircleMenuUI.hide();var i=this._upHandlerCreateArgs(e);if(!1===OrgChart.events.publish("up-click",[this,i]))return!1;this.changeRoots(i.id,i.roots,!1)},OrgChart.prototype._upHandlerCreateArgs=function(e){var i,o=this.getNode(e),a=Object.assign([],this.config.roots),s=this.getNode(o.pid);if(s&&(i=s),i){if(Array.isArray(a)){var l=a.indexOf(o.id);-1!=l&&a.splice(l,1)}else a=[];a.push(i.id)}return{id:o.id,roots:a}},String.prototype.replaceAll||(String.prototype.replaceAll=function(e,i){return this.replace(new RegExp(e,"g"),i)}),String.prototype.endsWith||(String.prototype.endsWith=function(e){return-1!==this.indexOf(e,this.length-e.length)}),String.prototype.splice||(String.prototype.splice=function(e,i,o){return this.slice(0,e)+o+this.slice(e+Math.abs(i))}),String.prototype.insert||(String.prototype.insert=function(e,i){return e>0?this.substring(0,e)+i+this.substr(e):i+this}),Array.prototype.unique||Object.defineProperty(Array.prototype,"unique",{value:function(){for(var e=this.concat(),i=0;i<e.length;++i)for(var o=i+1;o<e.length;++o)e[i]===e[o]&&e.splice(o--,1);return e},writable:!0,configurable:!0,enumerable:!1}),Array.prototype.has||Object.defineProperty(Array.prototype,"has",{value:function(e){for(var i=0;i<this.length;i++)if(this[i]==e)return!0;return!1},writable:!0,configurable:!0,enumerable:!1}),Array.prototype.compare||Object.defineProperty(Array.prototype,"compare",{value:function(e){if(this.length!=e.length)return!1;for(var i=0;i<this.length;i++)if(!e.has(this[i]))return!1;return!0},writable:!0,configurable:!0,enumerable:!1}),Object.assign||Object.defineProperty(Object,"assign",{value:function(e,i){"use strict";if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var o=Object(e),a=1;a<arguments.length;a++){var s=arguments[a];if(null!=s)for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(o[l]=s[l])}return o},writable:!0,configurable:!0}),OrgChart.prototype._clickHandler=function(e,i){if(!(i.button>0)){for(var o=i.target;o!=e;){if(o.hasAttribute(OrgChart.attr.control_expcoll_id)){var a=o.getAttribute(OrgChart.attr.control_expcoll_id),s=this.getNode(a);return void this._expCollHandler(s.id)}if(o.hasAttribute(OrgChart.attr.node_id)){a=o.getAttribute(OrgChart.attr.node_id),s=this.getNode(a);return void this._nodeClickHandler(s.id,i)}if(o.hasAttribute(OrgChart.attr.control_node_menu_id)){i.stopPropagation(),i.preventDefault();a=o.getAttribute(OrgChart.attr.control_node_menu_id),s=this.getNode(a);return void this._nodeMenuClickHandler(s.id,o,i)}if(o.hasAttribute(OrgChart.attr.control_node_circle_menu_id)){i.stopPropagation(),i.preventDefault();a=o.getAttribute(OrgChart.attr.control_node_circle_menu_id);return void this._nodeCircleMenuClickHandler(a)}if(o.hasAttribute(OrgChart.attr.control_node_circle_menu_name))return i.stopPropagation(),void this._nodeCircleMenuItemClickHandler(o,i);if(o.hasAttribute(OrgChart.attr.control_add))return void this._lonelyButtonHandler();if(o.hasAttribute(OrgChart.attr.control_up_id)){a=o.getAttribute(OrgChart.attr.control_up_id);return i.stopPropagation(),i.preventDefault(),void this._upHandler(a)}if(o.hasAttribute(OrgChart.attr.c_link_from))return void OrgChart.events.publish("clink-click",[this,{from:o.getAttribute(OrgChart.attr.c_link_from),to:o.getAttribute(OrgChart.attr.c_link_to),event:i}]);if(o.hasAttribute(OrgChart.attr.s_link_from))return void OrgChart.events.publish("slink-click",[this,{from:o.getAttribute(OrgChart.attr.s_link_from),to:o.getAttribute(OrgChart.attr.s_link_to),event:i}]);if(o.hasAttribute("data-ctrl-n-dotted-close")){a=o.getAttribute("data-ctrl-n-dotted-close");return void this.minimize(a)}if(o.hasAttribute("data-ctrl-n-dotted-open")){a=o.getAttribute("data-ctrl-n-dotted-open");return void this.maximize(a)}o=o.parentNode}OrgChart.events.publish("canvas-click",[this,{event:i}])}},OrgChart.prototype._mouseDownHandler=function(e,i,o,a){var s=this;OrgChart.SEARCH_CLOSE_RESULT_ON_ESCAPE_OR_CLICKOUTSIDE&&this.searchUI.hide(),this.nodeMenuUI.hide(),this.nodeContextMenuUI.hide(),this.menuUI.hide();var l=this.getViewBox(),c=this.getScale(),d=OrgChart._getClientTouchesXY(i,0),h=OrgChart._getClientTouchesXY(i,1),p={diffX:0,diffY:0,x0:d.x,y0:d.y,type:this.config.enablePan?"pan":"pan-not-enabled",viewBoxLeft:l[0],viewBoxTop:l[1],time:Date.now()};i.touches&&i.touches.length>1&&(p.type="pinch",p.dist=Math.sqrt((d.x-h.x)*(d.x-h.x)+(d.y-h.y)*(d.y-h.y)));var u=null;if(a){var f=a.stChildren[0].lcn?a.stChildren[0].lcn:"base";u=s.manager.layoutConfigs[f],p.scrollTop=a.treeList.scrollTop}var g=0,moveHandler=function(e){var i=OrgChart._getClientTouchesXY(e,0);if(p&&"pan"==p.type){clearTimeout(s._timeout),p.diffX=i.x-p.x0,p.diffY=i.y-p.y0,g=Math.max(Math.abs(p.diffY),Math.abs(p.diffX));var o=-p.diffY/c+p.viewBoxTop,d=-p.diffX/c+p.viewBoxLeft;g>3&&(a?(a.treeList.scrollTop=p.scrollTop-p.diffY/c,s._treeListUpdateInterval&&(clearInterval(s._treeListUpdateInterval),s._treeListUpdateInterval=null),s._treeListUpdate(a,u)):(s._hideBeforeAnimation(),s._changeCursorOnPanStart(l,c,e),s._move(o,d,l)))}else if(p&&"pinch"==p.type){var h=OrgChart._getClientTouchesXY(e,1),f=Math.sqrt((i.x-h.x)*(i.x-h.x)+(i.y-h.y)*(i.y-h.y)),m=1+(f-p.dist)/(p.dist/100)/100;p.dist=f;var b=OrgChart._pinchMiddlePointInPercent(s.element,s.width(),s.height(),e);s.zoom(m,b)}},leaveHandler=function(i){if(g<3&&"pinch"!=p.type&&(null==i.touches||i.touches.length<=1))s._clickHandler(e,i);else if("pan"==p.type&&a){var l=Date.now()-p.time,c=Math.abs(g/l);if(c>.5){var d=(f=a.treeList.scrollTop)+400*c*(p.diffY>0?-1:1),h=a.stChildren[0].h;(d=Math.round(d/h)*h)!=f&&(s._treeListUpdateInterval&&(clearInterval(s._treeListUpdateInterval),s._treeListUpdateInterval=null),s._treeListUpdateInterval=OrgChart.animate(null,{},{},1500,OrgChart.anim.outExp,function(){},function(e){a.treeList.scrollTop=e*(d-f)+f,s._treeListUpdate(a,u.orientation)}))}else{var f=a.treeList.scrollTop;h=a.stChildren[0].h;(d=Math.round(a.treeList.scrollTop/h)*h)!=f&&(s._treeListUpdateInterval&&(clearInterval(s._treeListUpdateInterval),s._treeListUpdateInterval=null),s._treeListUpdateInterval=OrgChart.animate(null,{},{},200,OrgChart.anim.outSin,function(){},function(e){a.treeList.scrollTop=e*(d-f)+f,s._treeListUpdate(a,u.orientation)}))}}else"pan"==p.type&&!a&&g>10&&s._draw(!0,OrgChart.action.pan);"pan"!=p.type||a||s._changeCursorOnPanEnd(),p=null,e.removeEventListener(o.move,moveHandler),e.removeEventListener(o.up,leaveHandler),o.leave&&e.removeEventListener(o.leave,leaveHandler),o.touchstart&&e.removeEventListener(o.touchstart,leaveHandler)};e.addEventListener(o.move,moveHandler,{passive:!0}),e.addEventListener(o.up,leaveHandler),o.leave&&e.addEventListener(o.leave,leaveHandler),o.touchstart&&e.addEventListener(o.touchstart,leaveHandler,{passive:!0})},OrgChart.prototype._changeCursorOnPanStart=function(e,i,o){var a=this.getPointerElement();if(a){var s=OrgChart._getOffsetXY(this.element,o),l=s.x/i+e[0]-16/i,c=s.y/i+e[1]-16/i;a.style.display="inherit",a.setAttribute("transform","matrix(0,0,0,0,"+l+","+c+")"),OrgChart.animate(a,{transform:[0,0,0,0,l,c],opacity:0},{transform:[1/i,0,0,1/i,l,c],opacity:1},300,OrgChart.anim.outBack)}else this.element.style.cursor="move"},OrgChart.prototype._changeCursorOnPanEnd=function(){var e=this.getPointerElement();e?e.style.display="none":this.element.style.cursor="initial"},OrgChart.prototype._globalMouseDownHandler=function(e,i){var o={move:"mousemove",up:"mouseup",leave:"mouseleave"};-1!=i.type.indexOf("touch")&&(1==i.touches.length?this._touch={x:i.touches[0].clientX,y:i.touches[0].clientY}:this._touch=null,o={move:"touchmove",up:"touchend",touchstart:"touchstart"}),this._treeListUpdateInterval&&(clearInterval(this._treeListUpdateInterval),this._treeListUpdateInterval=null);for(var a=null,s=i.target;s!=e&&!s.hasAttribute(OrgChart.attr.control_node_menu_id)&&!s.hasAttribute(OrgChart.attr.control_node_circle_menu_id);){if(s.hasAttribute){var l=null;s.hasAttribute(OrgChart.attr.node_id)?l=this.getNode(s.getAttribute(OrgChart.attr.node_id)):s.hasAttribute(OrgChart.attr.control_expcoll_id)?l=this.getNode(s.getAttribute(OrgChart.attr.control_expcoll_id)):(s.hasAttribute(OrgChart.attr.control_node_menu_id)||s.hasAttribute(OrgChart.attr.control_node_menu_id))&&(l=this.getNode(s.getAttribute(OrgChart.attr.control_node_menu_id))),a||(a=OrgChart._getScrollableTreeListNodeInTouchEnabledDevice(l))}if(s.hasAttribute(OrgChart.attr.node_id)&&!a&&(this.config.enableDragDrop||this.config.movable)){if(null==i.touches||i.touches.length<=1)return void this._nodeMouseDownHandler(s,i,o)}else if(s.hasAttribute(OrgChart.attr.control_node_circle_menu_name)){if(i.stopPropagation(),null==i.touches||i.touches.length<=1)return void this._nodeCircleNodeMenuItemMouseDownHandler(e,s,i,o)}else if(s.hasAttribute("data-treelist-thumb")&&(i.stopPropagation(),null==i.touches||i.touches.length<=1))return void this._treeListThumbMouseDownHandler(s,i,o);s=s.parentNode}i.stopPropagation(),this._mouseDownHandler(e,i,o,a)},OrgChart.prototype._globalContextHandler=function(e,i){for(var o=i.target;o!=e;){if(o.hasAttribute(OrgChart.attr.node_id)){var a=o.getAttribute(OrgChart.attr.node_id),s=this.getNode(a);return void this._nodeContextHandler(s.id,i)}o=o.parentNode}},OrgChart.prototype._nodeContextHandler=function(e,i){i.preventDefault(),OrgChart.SEARCH_CLOSE_RESULT_ON_ESCAPE_OR_CLICKOUTSIDE&&this.searchUI.hide(),this.nodeMenuUI.hide(),this.nodeContextMenuUI.hide(),this.menuUI.hide(),this.nodeCircleMenuUI.hide();var o=this.get(e),a=null;if(null!=o&&Array.isArray(o.tags))for(var s=0;s<o.tags.length;s++){var l=o.tags[s];this.config.tags[l]&&this.config.tags[l].nodeContextMenu&&(a=this.config.tags[l].nodeContextMenu)}var c=this.element.getBoundingClientRect(),d=i.clientX-c.left,h=i.clientY-c.top;this.nodeContextMenuUI.show(d,h,e,null,a)},OrgChart.prototype._globalDbClickHandler=function(e,i){for(var o=i.target;o!=e;){if(o.hasAttribute(OrgChart.attr.node_id)){var a=o.getAttribute(OrgChart.attr.node_id),s=this.getNode(a);return void this._nodeDbClickHandler(s.id,i)}o=o.parentNode}},OrgChart.prototype._mouseScrollHandler=function(e,i){for(var o=!1,a=i.target,s=null;a&&a.hasAttribute&&!a.hasAttribute("data-n-id")&&!a.hasAttribute("data-ctrl-ec-id");)a=a.parentNode;if(a.hasAttribute&&a.hasAttribute("data-n-id")){var l=a.getAttribute("data-n-id");(s=this.getNode(l)).isTreeListItem&&(o=!0)}if(a.hasAttribute&&a.hasAttribute("data-ctrl-ec-id")){l=a.getAttribute("data-ctrl-ec-id");(s=this.getNode(l)).isTreeListItem&&(o=!0)}i.ctrlKey&&(o=!1),o?this.__mouseScrollHandlerTreeList(s,i):this.__mouseScrollHandler(this.getSvg(),i)},OrgChart.prototype.__mouseScrollHandler=function(e,i){if(i.ctrlKey){if(this.config.mouseScrool==OrgChart.action.zoom)return}else{if(this.config.mouseScrool==OrgChart.action.ctrlZoom)return;if(this.config.mouseScrool!=OrgChart.action.zoom)return}if(i.preventDefault(),!navigator.hardwareConcurrency||navigator.hardwareConcurrency<9){let a=i.deltaY/1e3;a=Math.abs(a)<.1?.1*i.deltaY/Math.abs(i.deltaY):a;var o=OrgChart._centerPointInPercent(e,i.clientX,i.clientY);this.zoom(1-a,o)}else{var a=this,s=!1,l=this.config.zoom.speed,c=this.config.zoom.smooth,d=0,h=this.getScale();o=OrgChart._centerPointInPercent(e,i.clientX,i.clientY);var p=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){setTimeout(e,20)};i.preventDefault();var u=i.delta||i.wheelDelta;void 0===u&&(u=-i.detail),u=Math.max(-1,Math.min(1,u)),d+=-u*l,s||function update(){s=!0;var e=(d-h)/c;e>0?e++:e--,h+=e,a.zoom(1-e/12/50,o),parseInt(h)==parseInt(d)?s=!1:p(update)}()}},OrgChart.prototype._nodeCircleNodeMenuItemMouseDownHandler=function(e,i,o,a){var s=i.parentNode.getAttribute(OrgChart.attr.control_node_circle_menu_wrraper_id),l=i.getAttribute(OrgChart.attr.control_node_circle_menu_name),c=this.nodeCircleMenuUI._menu[l];if(c.draggable){var d=this,h=OrgChart._getClientXY(o),p=this.getNode(s);i._dragEventFired=!1;var u=d.getScale(),f=null,g=null;document.body.style.mozUserSelect=document.body.style.webkitUserSelect=document.body.style.userSelect="none";var m=this.getSvg(),b={x:h.x,y:h.y},x=i.cloneNode(!0);m.insertBefore(x,m.firstChild);var v=OrgChart._getTransform(x),y=v[4],_=v[5],w=function(e){for(;e&&!e.hasAttribute(OrgChart.attr.control_node_circle_menu_wrraper_id);)e=e.parentNode;if(e){var i=OrgChart._getTransform(e);return{x:i[4],y:i[5]}}console.error("cannot find parent"+OrgChart.attr.control_node_circle_menu_wrraper_id)}(i);x.setAttribute("transform","matrix(1,0,0,1,"+(y+w.x)+","+(_+w.y)+")"),x.style.opacity=.7;var removeOpacity=function(e,i){if(null!=e){i.classList.remove("boc-drag-over");for(var o=OrgChart.getStParentNodes(d.getNode(f)),a=0;a<o.length;a++){var s=d.getNodeElement(o[a].id);s&&(s.style.opacity=1)}}},moveHandler=function(e){if(b){var o=OrgChart._getClientXY(e),a=e.target;OrgChart.isMobile()&&(a=document.elementFromPoint(o.x,o.y)),o.x+=w.x*u,o.y+=w.y*u;var s=OrgChart._getOffsetXY(d.element,e),h={left:d.width()-(s.x+d.config.padding)<0,right:s.x-d.config.padding<0,up:d.height()-(s.y+d.config.padding)<0,down:s.y-d.config.padding<0};if(h.left||h.right||h.up||h.down){m.classList&&(m.classList.remove("boc-cursor-grab"),m.classList.add("boc-cursor-move"),m.classList.remove("boc-cursor-nodrop"),m.classList.remove("boc-cursor-copy"));var p=v[4],k=v[5],I=b.x,S=b.y,C=o.x,L=o.y;d.moveStart(h,function(e){v[4]=p+e.x,v[5]=k+e.y,b.x=I-e.xWithoutScale,b.y=S-e.yWithoutScale,o.x=C-e.xWithoutScale,o.y=L-e.yWithoutScale,x.setAttribute("transform","matrix("+v.toString()+")")})}else{for(d.moveEnd(),m.classList&&(m.classList.add("boc-cursor-grab"),m.classList.remove("boc-cursor-move"),m.classList.remove("boc-cursor-nodrop"),m.classList.remove("boc-cursor-copy")),removeOpacity(f,g),f=null,g=null;null!=a&&a!=m;){if(a.hasAttribute&&a.hasAttribute(OrgChart.attr.node_id)){var A=a.getAttribute(OrgChart.attr.node_id);f=A,g=a;break}a=a.parentNode}if(null!=f){g.classList.add("boc-drag-over");for(var E=d.getNode(f),N=OrgChart.getStParentNodes(E),$=0;$<N.length;$++){var M=d.getNodeElement(N[$].id);M&&(M.style.opacity=.1)}m.classList.remove("boc-cursor-grab"),m.classList.remove("boc-cursor-move"),m.classList.add("boc-cursor-copy"),m.classList.remove("boc-cursor-nodrop")}var T=(o.x-b.x)/u,P=(o.y-b.y)/u;v[4]=y+T,v[5]=_+P,!i._dragEventFired&&(Math.abs(o.x-b.x)>OrgChart.FIRE_DRAG_NOT_CLICK_IF_MOVE||Math.abs(o.y-b.y)>OrgChart.FIRE_DRAG_NOT_CLICK_IF_MOVE)&&(d._gragStartedId=i.parentNode.getAttribute(OrgChart.attr.control_node_circle_menu_wrraper_id),!1===OrgChart.events.publish("drag",[d.nodeCircleMenuUI,{from:A,menuItem:c,menuItemName:l}])&&leaveHandler(),i._dragEventFired=!0),x.setAttribute("transform","matrix("+v.toString()+")")}}},leaveHandler=function(e){if(d.moveEnd(),m.classList&&(m.classList.remove("boc-cursor-grab"),m.classList.remove("boc-cursor-move"),m.classList.remove("boc-cursor-nodrop"),m.classList.remove("boc-cursor-copy")),m.removeEventListener(a.move,moveHandler),m.removeEventListener(a.up,leaveHandler),a.leave&&m.removeEventListener(a.leave,leaveHandler),p.id==f||null==f)return m.removeChild(x),d._gragStartedId=null,void(i._dragEventFired&&OrgChart.events.publish("drop",[d.nodeCircleMenuUI,{from:p.id,menuItemName:l,menuItem:c,event:e}]));var o=d.getNode(f);OrgChart.events.publish("drop",[d.nodeCircleMenuUI,{from:p.id,to:o.id,menuItem:c,menuItemName:l,event:e}]),removeOpacity(f,g),m.removeChild(x),d._gragStartedId=null};m.addEventListener(a.move,moveHandler),m.addEventListener(a.up,leaveHandler),a.leave&&m.addEventListener(a.leave,leaveHandler)}else this._clickHandler(e,o)},OrgChart.prototype._nodeMouseDownHandler=function(e,i,o){var a=e.getAttribute(OrgChart.attr.node_id),s=this.getNode(a);this.config.movable&&!OrgChart.getRootOf(s).stParent?this._movableHandler(e,i,o):this.config.enableDragDrop&&this._dragDropHandler(e,i,o)},OrgChart.prototype._resizeHandler=function(e,i){if(this.isVisible&&0!=e&&0!=i){var o=this.getViewBox();if(o){var a=e/(o=o.slice(0))[2],s=i/o[3];Math.abs(this._lastSize.width-e)>Math.abs(this._lastSize.height-i)?o[3]=i/a:o[2]=e/s,this.nodeMenuUI.hide(),this.nodeContextMenuUI.hide(),this.menuUI.hide(),this.nodeCircleMenuUI.hide(),this.setViewBox(o),this.xScrollUI.create(e),this.yScrollUI.create(i),this._draw(!0,OrgChart.action.resize)}}},OrgChart.prototype._nodeDbClickHandler=function(e,i){if(!1===OrgChart.events.publish("dbclick",[this,this.get(e)]))return!1;this._commonClickHandler(e,i,this.config.nodeMouseDbClick)},OrgChart.prototype._nodeClickHandler=function(e,i){if(!1===OrgChart.events.publish("click",[this,{node:this.getNode(e),event:i}]))return!1;if(this.powerPointPreviewUI.isVisible()&&null!=this.powerPointPreviewUI.selectedPage)return this.powerPointPreviewUI.selectedPage.content=void 0,this.powerPointPreviewUI.selectedPage.nodeId=e,this.powerPointPreviewUI.refresh(e),void this.ripple(e,i.clientX,i.clientY);if(this.pdfPreviewUI.isVisible()&&null!=this.pdfPreviewUI.selectedPage)return this.pdfPreviewUI.selectedPage.content=void 0,this.pdfPreviewUI.selectedPage.nodeId=e,this.pdfPreviewUI.refresh(e),void this.ripple(e,i.clientX,i.clientY);if(this.svgPreviewUI.isVisible()&&null!=this.svgPreviewUI.selectedPage)return this.svgPreviewUI.selectedPage.content=void 0,this.svgPreviewUI.selectedPage.nodeId=e,this.svgPreviewUI.refresh(e),void this.ripple(e,i.clientX,i.clientY);if(this.pngPreviewUI.isVisible()&&null!=this.pngPreviewUI.selectedPage)return this.pngPreviewUI.selectedPage.content=void 0,this.pngPreviewUI.selectedPage.nodeId=e,this.pngPreviewUI.refresh(e),void this.ripple(e,i.clientX,i.clientY);var o=this.getNodeElement(e);o&&o._dragEventFired?o._dragEventFired=!1:this._commonClickHandler(e,i,this.config.nodeMouseClick)},OrgChart.prototype._nodeCircleMenuItemClickHandler=function(e,i){var o=e.parentNode.getAttribute(OrgChart.attr.control_node_circle_menu_wrraper_id),a=e.getAttribute(OrgChart.attr.control_node_circle_menu_name),s=this.nodeCircleMenuUI._menu[a];OrgChart.events.publish("click",[this.nodeCircleMenuUI,{nodeId:o,menuItemName:a,menuItem:s,event:i}])},OrgChart.prototype._nodeCircleMenuClickHandler=function(e){if(OrgChart.SEARCH_CLOSE_RESULT_ON_ESCAPE_OR_CLICKOUTSIDE&&this.searchUI.hide(),this.nodeMenuUI.hide(),this.menuUI.hide(),this.nodeContextMenuUI.isVisible())this.nodeContextMenuUI.hide();else{var i=this.getNode(e),o=null;if(Array.isArray(i.tags))for(var a=0;a<i.tags.length;a++){var s=i.tags[a];this.config.tags[s]&&this.config.tags[s].nodeCircleMenu&&(o=this.config.tags[s].nodeCircleMenu)}this.nodeCircleMenuUI.show(e,o)}},OrgChart.prototype._commonClickHandler=function(e,i,o){var a;(OrgChart.SEARCH_CLOSE_RESULT_ON_ESCAPE_OR_CLICKOUTSIDE&&this.searchUI.hide(),this.nodeMenuUI.hide(),this.nodeContextMenuUI.hide(),this.menuUI.hide(),this.nodeCircleMenuUI.hide(),o==OrgChart.action.expandCollapse&&this.toggleExpandCollapse(e,i),o==OrgChart.action.edit)&&((a=this.getNode(e))&&(this.editUI.show(a.id),this.ripple(a.id,i.clientX,i.clientY)));o==OrgChart.action.details&&((a=this.getNode(e))&&(this.editUI.show(a.id,!0),this.ripple(a.id,i.clientX,i.clientY)))},OrgChart.prototype._menuHandlerMouseDownHandler=function(e,i){i.stopPropagation(),i.preventDefault()},OrgChart.prototype._nodeMenuClickHandler=function(e,i,o){OrgChart.SEARCH_CLOSE_RESULT_ON_ESCAPE_OR_CLICKOUTSIDE&&this.searchUI.hide(),this.nodeMenuUI.hide(),this.nodeContextMenuUI.hide(),this.menuUI.hide(),this.nodeCircleMenuUI.hide();var a=this.getNode(e),s=null;if(Array.isArray(a.tags))for(var l=0;l<a.tags.length;l++){var c=a.tags[l];this.config.tags[c]&&this.config.tags[c].nodeMenu&&(s=this.config.tags[c].nodeMenu)}this.nodeMenuUI.showStickIn(i,e,null,s)},OrgChart.prototype._menuClickHandler=function(e,i){i.stopPropagation(),i.preventDefault(),this.nodeMenuUI.hide(),this.nodeContextMenuUI.hide(),this.menuUI.show(e.offsetLeft,e.offsetTop)},OrgChart.prototype._lonelyButtonHandler=function(){var e={id:this.generateId()};!1!==this.addNode(e,null,!0)&&this.center(e.id)},OrgChart.prototype.toggleExpandCollapse=function(e,i){var o=this.getNode(e),a=this.getCollapsedIds(o);if(a.length){if(!1===OrgChart.events.publish("expcollclick",[this,!1,e,a]))return!1;this.expand(e,a,!1)}else{if(!1===OrgChart.events.publish("expcollclick",[this,!0,e,o.childrenIds]))return!1;this.collapse(e,o.childrenIds,!1)}i&&this.ripple(o.id,i.clientX,i.clientY)},OrgChart.prototype._dragDropHandler=function(e,i,o){var a=OrgChart._getClientXY(i),s=e.getAttribute(OrgChart.attr.node_id),l=this.getNode(s);e._dragEventFired=!1;var c=null,d=null;this.element.style.mozUserSelect=this.element.style.webkitUserSelect=this.element.style.userSelect="none";var h=this,p=this.getSvg(),u={x:a.x,y:a.y},f=OrgChart._getTransform(e),g=f[4],m=f[5],b=h.getScale(),x=e.cloneNode(!0);x.setAttribute("data-n-id","draging"),p.insertBefore(x,p.firstChild),x.style.opacity=.7;var removeOpacity=function(e,i){if(null!=e){i.classList.remove("boc-drag-over");for(var o=h.getNode(c),a=OrgChart.getStParentNodes(o),s=0;s<a.length;s++){var l=h.getNodeElement(a[s].id);l&&(l.style.opacity=1)}}},moveHandler=function(i){if(null!=i.touches&&i.touches.length>1)leaveHandler(i);else if(u){var o=OrgChart._getClientXY(i),a=i.target;OrgChart.isMobile()&&(a=document.elementFromPoint(o.x,o.y));var s=OrgChart._getOffsetXY(h.element,i),v={left:h.width()-(s.x+h.config.padding)<0,right:s.x-h.config.padding<0,up:h.height()-(s.y+h.config.padding)<0,down:s.y-h.config.padding<0};if(v.left||v.right||v.up||v.down){p.classList&&(p.classList.remove("boc-cursor-grab"),p.classList.add("boc-cursor-move"),p.classList.remove("boc-cursor-nodrop"),p.classList.remove("boc-cursor-copy"));var y=f[4],_=f[5],w=u.x,k=u.y,I=o.x,S=o.y;h.moveStart(v,function(e){f[4]=y+e.x,f[5]=_+e.y,u.x=w-e.xWithoutScale,u.y=k-e.yWithoutScale,o.x=I-e.xWithoutScale,o.y=S-e.yWithoutScale,x.setAttribute("transform","matrix("+f.toString()+")")})}else{if(h.moveEnd(),p.classList&&(p.classList.add("boc-cursor-grab"),p.classList.remove("boc-cursor-move"),p.classList.remove("boc-cursor-nodrop"),p.classList.remove("boc-cursor-copy")),removeOpacity(c,d),c=null,d=null,h.config.enableDragDrop)for(;null!=a&&a!=p;){if(a.hasAttribute&&a.hasAttribute(OrgChart.attr.node_id)){var C=a.getAttribute(OrgChart.attr.node_id);if(h._gragStartedId&&C!=h._gragStartedId){c=C,d=a;break}}a=a.parentNode}if("draging"==c&&(c=null,d=null),null!=c){d.classList.add("boc-drag-over");for(var L=h.getNode(c),A=OrgChart.getStParentNodes(L),E=0;E<A.length;E++){var N=h.getNodeElement(A[E].id);N&&(N.style.opacity=.1)}!h.canUpdateLink(l.id,c)&&p.classList?(p.classList.remove("boc-cursor-grab"),p.classList.remove("boc-cursor-move"),p.classList.remove("boc-cursor-copy"),p.classList.add("boc-cursor-nodrop")):p.classList&&(p.classList.remove("boc-cursor-grab"),p.classList.remove("boc-cursor-move"),p.classList.add("boc-cursor-copy"),p.classList.remove("boc-cursor-nodrop"))}var $=(o.x-u.x)/b,M=(o.y-u.y)/b;f[4]=g+$,f[5]=m+M,!e._dragEventFired&&(Math.abs(o.x-u.x)>OrgChart.FIRE_DRAG_NOT_CLICK_IF_MOVE||Math.abs(o.y-u.y)>OrgChart.FIRE_DRAG_NOT_CLICK_IF_MOVE)&&(h._gragStartedId=C,!1===OrgChart.events.publish("drag",[h,C,i])&&leaveHandler(),e._dragEventFired=!0),x.setAttribute("transform","matrix("+f.toString()+")")}}},leaveHandler=function(i){if(!e._dragEventFired&&(null==i.touches||i.touches.length<=1)&&h._clickHandler(h.getSvg(),i),h.moveEnd(),p.classList&&(p.classList.remove("boc-cursor-grab"),p.classList.remove("boc-cursor-move"),p.classList.remove("boc-cursor-nodrop"),p.classList.remove("boc-cursor-copy")),p.removeEventListener(o.move,moveHandler),p.removeEventListener(o.up,leaveHandler),o.leave&&p.removeEventListener(o.leave,leaveHandler),l.id==c||null==c)return e._dragEventFired&&OrgChart.events.publish("drop",[h,l.id,void 0,x,i]),p.removeChild(x),void(h._gragStartedId=null);var a=h.getNode(c);if(!1===OrgChart.events.publish("drop",[h,l.id,a.id,x,i]))return removeOpacity(c,d),p.removeChild(x),void(h._gragStartedId=null);if(h.canUpdateLink(l.id,c)){var s=h.get(l.id);s.pid=c,s.stpid=null,null!=s.movex&&(s.movex=void 0),null!=s.movey&&(s.movey=void 0),h.updateNode(s,null,!0)}else p.removeChild(x),removeOpacity(c,d);h._gragStartedId=null};p.addEventListener(o.move,moveHandler),p.addEventListener(o.up,leaveHandler),o.leave&&p.addEventListener(o.leave,leaveHandler)},OrgChart.prototype._movableHandler=function(e,i,o){var a=this,s=e.getAttribute(OrgChart.attr.node_id),l=[],iterate=function(e,i){if(Array.isArray(e))for(var o=0;o<e.length;o++)iterate(e[o],i);else{i.push(e.id);for(o=0;o<e.stChildren.length;o++)iterate(e.stChildren[o],i);for(o=0;o<e.children.length;o++)iterate(e.children[o],i)}},iterateIds=function(e,i){if(Array.isArray(e))for(var o=0;o<e.length;o++)iterate(e[o],i);else{i.push(e.id);for(o=0;o<e.stChildrenIds.length;o++)iterateIds(a.getNode(e.stChildrenIds[o]),i);for(o=0;o<e.childrenIds.length;o++)iterateIds(a.getNode(e.childrenIds[o]),i)}},c=this.getNode(s);iterate(c,l);for(var d=this.getSvg(),h=OrgChart._getClientXY(i),p=[],u=[],f=[],g=[],m=[],b=[],x=[],v=[],y=0;y<l.length;y++){var _=this.getNode(l[y]);p.push(_),f.push({x:_.x,y:_.y});var w=this.getNodeElement(l[y]);if(w){m.push(w);var k=OrgChart._getTransform(w);g.push({x:k[4],y:k[5]}),u.push(k);var I=this.element.querySelector(`[data-ctrl-ec-id="${l[y]}"]`);if(I){b.push(I);var S=OrgChart._getTransform(I);x.push(S),v.push({x:S[4],y:S[5]})}else b.push(null),x.push(null),v.push(null);if(this.config.movable==OrgChart.movable.node)break}}e._dragEventFired=!1;var C=null,L=null;document.body.style.mozUserSelect=document.body.style.webkitUserSelect=document.body.style.userSelect="none";var A={x:h.x,y:h.y},E=a.getScale(),removeOpacity=function(e,i){if(null!=e){i.classList.remove("boc-drag-over");for(var o=a.getNode(C),s=OrgChart.getStParentNodes(o),l=0;l<s.length;l++){var c=a.getNodeElement(s[l].id);c&&(c.style.opacity=1)}}},moveHandler=function(i){if(null!=i.touches&&i.touches.length>1)leaveHandler(i);else if(A){var o=OrgChart._getClientXY(i),h=i.target;OrgChart.isMobile()&&(h=document.elementFromPoint(o.x,o.y));var y=OrgChart._getOffsetXY(a.element,i),_={left:a.width()-(y.x+a.config.padding)<0,right:y.x-a.config.padding<0,up:a.height()-(y.y+a.config.padding)<0,down:y.y-a.config.padding<0};if(_.left||_.right||_.up||_.down){d.classList&&(d.classList.remove("boc-cursor-grab"),d.classList.add("boc-cursor-move"),d.classList.remove("boc-cursor-nodrop"),d.classList.remove("boc-cursor-copy"));for(var w=[],k=[],I=[],S=[],N=0;N<u.length;N++)w.push(u[N][4]),k.push(u[N][5]),x[N]?(I.push(x[N][4]),S.push(x[N][5])):(I.push(null),S.push(null));var $=A.x,M=A.y,T=o.x,P=o.y;a.moveStart(_,function(e){for(var i=0;i<u.length;i++){var s=w[i],l=k[i],c=I[i],d=S[i];u[i][4]=s+e.x,u[i][5]=l+e.y,A.x=$-e.xWithoutScale,A.y=M-e.yWithoutScale,o.x=T-e.xWithoutScale,o.y=P-e.yWithoutScale,p[i].x=s+e.x,p[i].y=l+e.y,p[i].movex=e.x,p[i].movey=e.y,x[i]&&(x[i][4]=c+e.x,x[i][5]=d+e.y);for(var h=OrgChart.ui.link(p[i],a,E,a.response.bordersByRootIdAndLevel,a.nodes,OrgChart.action.update,!0),f=0;f<h.length;f++){var g=h[f];(v=a.element.querySelector(`[data-l-id="[${g.id}][${g.childId}]"]`))&&(v.innerHTML=g.html)}if(p[i].parent)for(h=OrgChart.ui.link(p[i].parent,a,E,a.response.bordersByRootIdAndLevel,a.nodes,OrgChart.action.update,!0),f=0;f<h.length;f++){var v;g=h[f];(v=a.element.querySelector(`[data-l-id="[${g.id}][${g.childId}]"]`))&&(v.innerHTML=g.html)}m[i].setAttribute("transform","matrix("+u[i].toString()+")"),b[i]&&b[i].setAttribute("transform","matrix("+x[i].toString()+")")}})}else{if(a.moveEnd(),d.classList&&(d.classList.add("boc-cursor-grab"),d.classList.remove("boc-cursor-move"),d.classList.remove("boc-cursor-nodrop"),d.classList.remove("boc-cursor-copy")),removeOpacity(C,L),C=null,L=null,a.config.enableDragDrop)for(;null!=h&&h!=d;){if(h.hasAttribute&&h.hasAttribute(OrgChart.attr.node_id)){var U=h.getAttribute(OrgChart.attr.node_id);if(a._gragStartedId&&U!=a._gragStartedId){C=U,L=h;break}}h=h.parentNode}if(null!=C){L.classList.add("boc-drag-over");for(var O=a.getNode(C),R=OrgChart.getStParentNodes(O),B=0;B<R.length;B++){var F=a.getNodeElement(R[B].id);F&&(F.style.opacity=.1)}!a.canUpdateLink(p[0].id,C)&&d.classList?(d.classList.remove("boc-cursor-grab"),d.classList.remove("boc-cursor-move"),d.classList.remove("boc-cursor-copy"),d.classList.add("boc-cursor-nodrop")):d.classList&&(d.classList.remove("boc-cursor-grab"),d.classList.remove("boc-cursor-move"),d.classList.add("boc-cursor-copy"),d.classList.remove("boc-cursor-nodrop"))}var H=(o.x-A.x)/E,D=(o.y-A.y)/E;for(N=0;N<u.length;N++){u[N][4]=g[N].x+H,u[N][5]=g[N].y+D,x[N]&&(x[N][4]=v[N].x+H,x[N][5]=v[N].y+D),p[N].x=f[N].x+H,p[N].y=f[N].y+D;var z=OrgChart.ui.link(p[N],a,E,a.response.bordersByRootIdAndLevel,a.nodes,OrgChart.action.update,!0);for(B=0;B<z.length;B++){var j=z[B];(q=a.element.querySelector(`[data-l-id="[${j.id}][${j.childId}]"]`))&&(q.innerHTML=j.html)}}if(c.parent)if(a.config.movable==OrgChart.movable.detachTree){(q=a.element.querySelector(`[data-l-id="[${c.parent.id}][${c.id}]"]`))&&q.parentElement.removeChild(q)}else for(z=OrgChart.ui.link(c.parent,a,E,a.response.bordersByRootIdAndLevel,a.nodes,OrgChart.action.update,!0),B=0;B<z.length;B++){var q;j=z[B];(q=a.element.querySelector(`[data-l-id="[${j.id}][${j.childId}]"]`))&&(q.innerHTML=j.html)}if(!e._dragEventFired&&(Math.abs(o.x-A.x)>OrgChart.FIRE_DRAG_NOT_CLICK_IF_MOVE||Math.abs(o.y-A.y)>OrgChart.FIRE_DRAG_NOT_CLICK_IF_MOVE)){if(a._gragStartedId=l[0],!1===OrgChart.events.publish("drag",[a,s,i,l])&&leaveHandler(),a.config.enableDragDrop)for(N=0;N<m.length;N++)d.insertBefore(m[N],d.firstChild);e._dragEventFired=!0}for(N=0;N<u.length;N++)m[N].setAttribute("transform","matrix("+u[N].toString()+")"),b[N]&&b[N].setAttribute("transform","matrix("+x[N].toString()+")")}}},leaveHandler=function(s){!e._dragEventFired&&(null==s.touches||s.touches.length<=1)&&a._clickHandler(a.getSvg(),i);for(var l=0;l<p.length;l++)p[l].x=f[l].x,p[l].y=f[l].y;if(a.moveEnd(),d.classList&&(d.classList.remove("boc-cursor-grab"),d.classList.remove("boc-cursor-move"),d.classList.remove("boc-cursor-nodrop"),d.classList.remove("boc-cursor-copy")),d.removeEventListener(o.move,moveHandler),d.removeEventListener(o.up,leaveHandler),o.leave&&d.removeEventListener(o.leave,leaveHandler),p[0].id!=C&&null!=C){var h=a.getNode(C);if(!1===(u=OrgChart.events.publish("drop",[a,p[0].id,h.id,m[0],s])))return removeOpacity(C,L),void(a._gragStartedId=null);if(a.canUpdateLink(p[0].id,C))(y=a.get(p[0].id)).pid=C,y.stpid=null,a.updateNode(y,null,!0);else removeOpacity(C,L);a._gragStartedId=null}else{if(e._dragEventFired){var u=OrgChart.events.publish("drop",[a,p[0].id,void 0,m[0],s]);if(a.config.movable&&!1!==u)if(a.config.movable==OrgChart.movable.detachTree){var g=OrgChart._getTransform(a.getNodeElement(c.id));(y=a.get(c.id)).pid=null,y.stpid=null,a.updateNode(y,null,!0)}else{var b=[];a.config.movable==OrgChart.movable.node?b.push(c.id):iterateIds(c,b);var x=(g=OrgChart._getTransform(a.getNodeElement(c.id)))[4]-c.x,v=g[5]-c.y;for(l=0;l<b.length;l++){var y;(y=a.get(b[l]))&&(null!=y.movex?y.movex+=x:y.movex=x,null!=y.movey?y.movey+=v:y.movey=v,a.update(y))}a._ai.setContext(),OrgChart.events.publish("updated",[a]),a.draw(OrgChart.action.update,{dragNodeIdList:b})}}a._gragStartedId=null}};d.addEventListener(o.move,moveHandler),d.addEventListener(o.up,leaveHandler),o.leave&&d.addEventListener(o.leave,leaveHandler)},OrgChart.prototype._move=function(e,i,o){o[0]=i,o[1]=e,this.setViewBox(o),this.xScrollUI.setPosition(),this.yScrollUI.setPosition()},OrgChart.prototype.moveStart=function(e,i,o,a){if(e){if(!this._moveInterval){var s=this,l=this.getViewBox().slice(0),c=this.getScale(),d=0,h=0,p=1;OrgChart.isNEU(o)&&(o=OrgChart.anim.inSin),OrgChart.isNEU(a)&&(a=3e3),this._moveInterval=setInterval(function(){var u={x:0,y:0,xWithoutScale:0,yWithoutScale:0};e.left?(d++,u.x=d*OrgChart.MOVE_STEP/c,u.xWithoutScale=d*OrgChart.MOVE_STEP):e.right&&(d++,u.x=-d*OrgChart.MOVE_STEP/c,u.xWithoutScale=-d*OrgChart.MOVE_STEP),e.up?(h++,u.y=h*OrgChart.MOVE_STEP/c,u.yWithoutScale=h*OrgChart.MOVE_STEP):e.down&&(h++,u.y=-h*OrgChart.MOVE_STEP/c,u.yWithoutScale=-h*OrgChart.MOVE_STEP);var f=o((10*p-10)/a);u.x=u.x*f,u.xWithoutScale=u.xWithoutScale*f,u.y=u.y*f,u.yWithoutScale=u.yWithoutScale*f,s.setViewBox([l[0]+u.x,l[1]+u.y,l[2],l[3]]),i&&i(u),p+=1},10)}}else console.error("movePosition parameter not defined")},OrgChart.prototype.moveEnd=function(){this._moveInterval&&(clearInterval(this._moveInterval),this._moveInterval=null)},void 0===OrgChart&&(OrgChart={}),OrgChart.node=function(e,i,o,a){this.templateName=a,this.id=e,this.pid=i,this.children=[],this.childrenIds=[],this.parent=null,this.stpid=null,this.stParent=null,this.stChildren=[],this.stChildrenIds=[],this.tags=o,this.childCount=0,this.collapsedChildCount=0,this.deepCollapsedChildCount=0,this.deepChildCount=0,this.tags||(this.tags=[])},OrgChart.searchUI=function(){this.lastSearch=[],this._searchAfterEnterPress=!1,this._event_id=OrgChart._guid(),this.instance=null},OrgChart.searchUI.prototype.init=function(e){this.instance=e,this.obj=this.instance,this._initSearchFields();var i=this,o=this.instance.config.padding-10,a=this.instance.config.padding-10,s=this.instance.getMenuButton();if(s){var l=s.getBoundingClientRect(),c=this.instance.getSvg().getBoundingClientRect();o=c.right-l.left+10,a=l.top-c.top-10}var d=document.createElement("div");d.classList.add("boc-search"),d.style.right=o+"px",d.style.top=a+"px";var h=OrgChart.elements.textbox({},{label:OrgChart.SEARCH_PLACEHOLDER,btn:"X"},"320px");d.innerHTML+=h.html,this.xBtn=d.querySelector("[data-input-btn]"),this.xBtn.style.display="none",this.searchTableWrapper=document.createElement("div"),d.appendChild(this.searchTableWrapper);var p=this.instance.getSvg().nextSibling;this.instance.element.insertBefore(d,p),OrgChart.input.init(d),this.input=document.getElementById(h.id),this.xBtn.addEventListener("click",function(e){e.preventDefault(),i.hide()}),this.input.addEventListener("keypress",function(e){"Enter"==e.key&&e.preventDefault()}),this.input.addEventListener("focus",function(e){i.xBtn.style.display="",i._search()}),this.input.addEventListener("blur",function(e){OrgChart.isNEU(i.input.value)&&OrgChart.SEARCH_HELP_SYMBOL!=i.input.value&&(i.xBtn.style.display="none")}),this.input.addEventListener("keydown",function(e){("ArrowDown"==e.key||"ArrowUp"==e.key)&&e.preventDefault()}),this.input.addEventListener("keyup",function(e){"ArrowDown"==e.key?downHandler():"ArrowUp"==e.key?upHandler():"Enter"==e.key?i._enterHandler():"Escape"==e.key?i.hide():this.value.length>=OrgChart.MINIMUM_SYMBOLS_IN_SEARCH_INPUT&&i._search()});var downHandler=function(){var e=i.instance.element.querySelectorAll("[data-search-item-id]"),o=i.instance.element.querySelector('[data-selected="yes"]');null==o&&e.length>0?e[0].setAttribute("data-selected","yes"):e.length>0&&o.nextSibling&&o.nextSibling.setAttribute&&(o.removeAttribute("data-selected"),o.nextSibling.setAttribute("data-selected","yes"))},upHandler=function(){var e=i.instance.element.querySelectorAll("[data-search-item-id]"),o=i.instance.element.querySelector('[data-selected="yes"]');null==o&&e.length>0?e[e.length-1].setAttribute("data-selected","yes"):e.length>0&&o.previousSibling&&o.previousSibling.setAttribute&&(o.removeAttribute("data-selected"),o.previousSibling.setAttribute("data-selected","yes"))}},OrgChart.searchUI.prototype._enterHandler=function(){var e=this.instance.element.querySelector('[data-selected="yes"]');if(e){if(e.hasAttribute("data-search-item-id")){var i=e.getAttribute("data-search-item-id");this.input.value!=OrgChart.SEARCH_HELP_SYMBOL?0!=OrgChart.events.publish("searchclick",[this,{nodeId:i}])&&(this.instance.center(i),OrgChart.isMobile()&&this.hide()):(this.input.value=i+" ",this.searchTableWrapper.innerHTML="")}}else this._searchAfterEnterPress=!0,this.__search(),this.searchTableWrapper.innerHTML="",this.instance.draw()},OrgChart.searchUI.prototype._initSearchFields=function(){if(null==this.instance.config.searchFields){this._searchFields=[];for(var e=0;e<this.instance.response.allFields.length;e++){var i=this.instance.response.allFields[e];"tags"==i||OrgChart._fieldIsImg(this.instance.config,i)||-1==this._searchFields.indexOf(i)&&this._searchFields.push(i)}}else this._searchFields=this.instance.config.searchFields;if(null==this.instance.config.searchFieldsAbbreviation){this.searchFieldsAbbreviation={};for(e=0;e<this._searchFields.length;e++){for(var o=this._searchFields[e],a=0,s=o.slice(0,a+1).toLowerCase();this.searchFieldsAbbreviation[s];)a++,s=o.slice(0,a+1).toLowerCase();this.searchFieldsAbbreviation[s]=o}}else this.searchFieldsAbbreviation=this.instance.config.searchFieldsAbbreviation;this._searchFieldsAbbreviation=this.searchFieldsAbbreviation},OrgChart.searchUI.prototype.find=function(e){this.input&&(this.input.value=e,document.activeElement==this.input?this._search(e):this.input.focus())},OrgChart.searchUI.prototype.addMatchTag=function(e){if(this._searchAfterEnterPress){for(var i=0;i<this.lastSearch.length;i++)if(this.lastSearch[i].id==e)return!0;return!1}return null},OrgChart.searchUI.prototype.__search=function(){this.lastSearch=OrgChart._search.search(this.instance.config.nodes,this.input.value,this._searchFields,this._searchFields,this.instance.config.searchDisplayField,this.instance.config.searchFieldsWeight,this.searchFieldsAbbreviation)},OrgChart.searchUI.prototype._search=function(){var e,i=this;if(this._searchAfterEnterPress=!1,this.input.value==OrgChart.SEARCH_HELP_SYMBOL)e=this.helpView();else{this.__search();var o=OrgChart._getFistImgField(this.instance.config);e=`<table border="0" cellspacing="0" cellpadding="0">\n <tbody>\n ${function(){for(var e="",a=0;a<i.lastSearch.length&&!(a>=OrgChart.SEARCH_RESULT_LIMIT);a++){var s=i.lastSearch[a],l="";if(o){var c=i.instance._get(s.id);"function"==typeof o?l=o(i.instance,i.instance.getNode(s.id),c):c[o]&&(l=c[o])}var d="",h="";i.instance.config.searchDisplayField==s.__searchField?d=s.__searchMarks:i.instance.config.searchDisplayField?(d=s[i.instance.config.searchDisplayField],OrgChart.isNEU(d)&&(d=""),h=s.__searchMarks):d=s.__searchMarks;var p={img:l,nodeId:s.id,first:d,second:h,searchItem:s,html:OrgChart.searchUI.createItem(l,s.id,d,h)};OrgChart.events.publish("add-item",[i,p]),e+=p.html}return e}()} \n </tbody>\n </table>`}this.searchTableWrapper.innerHTML=e;for(var a=this.instance.element.querySelectorAll("[data-search-item-id]"),s=0;s<a.length;s++)a[s].addEventListener("click",function(){if(this.hasAttribute("data-search-item-id")){var e=this.getAttribute("data-search-item-id");if(i.input.value!=OrgChart.SEARCH_HELP_SYMBOL){var o=OrgChart.events.publish("searchclick",[i.instance,e]),a=OrgChart.events.publish("searchclick",[i,{nodeId:e}]);if(!1===o&&(a=!1),!1!==a){i.instance.center(this.getAttribute("data-search-item-id"));var s=i.instance.element.querySelector('[data-selected="yes"]');s&&s.removeAttribute("data-selected"),this.setAttribute("data-selected","yes"),i.input.focus(),OrgChart.isMobile()&&i.hide()}}else i.input.value=e+" ",i.searchTableWrapper.innerHTML="",i.input.focus()}});OrgChart.events.publish("show-items",[this,{}])},OrgChart.searchUI.prototype.helpView=function(){var e='<table border="0" cellspacing="0" cellpadding="0">';for(var i in this.searchFieldsAbbreviation)e+=`<tr data-search-item-id="${i}" style="height: 50px;"><td class="boc-search-image-td" style="text-align: center;">${i}</td><td class="boc-search-text-td">${this.searchFieldsAbbreviation[i]}</td></tr>`;return e+="</table>"},OrgChart.searchUI.createItem=function(e,i,o,a){return o&&(o="<b>"+o+"</b>"),`<tr data-search-item-id="${i}">\n <td class="boc-search-image-td">\n ${e=e?`<div class="boc-search-photo" style="background-image: url(${e})"></div>`:`<div class="boc-search-photo">${OrgChart.icon.user(32,32,"#aeaeae")}</div>`}\n </td>\n <td class="boc-search-text-td">${o} <br/>${a}</td>\n </tr>`},OrgChart.searchUI.prototype.hide=function(){if(!1===OrgChart.events.publish("hide",[this]))return!1;this._searchAfterEnterPress&&(this._searchAfterEnterPress=!1,this.instance.draw()),this.lastSearch=[],this.xBtn&&(this.xBtn.style.display="none"),this.searchTableWrapper&&(this.searchTableWrapper.innerHTML=""),this.input&&(OrgChart.isMobile()||(this.input.value=""),document.activeElement==this.input&&this.input.blur(),document.activeElement==this.xBtn&&OrgChart.input.blurHandler(this.input))},OrgChart.searchUI.prototype.on=function(e,i){return OrgChart.events.on(e,i,this._event_id),this},void 0===OrgChart&&(OrgChart={}),OrgChart.manager=function(e){this.config=e.config,this.layoutConfigs=e._layoutConfigs,this.visibleNodeIds=[],this.viewBox=null,this.action=null,this.actionParams=null,this.nodes={},this.oldNodes={},this.maxX=null,this.maxY=null,this.minX=null,this.minY=null,this.bordersByRootIdAndLevel=null,this.roots=null,this.state=null,this.vbIsInitializedFromState=!1,this.rootList=[],this.instance=e,this._fixAdjustForExport={x:0,y:0}},OrgChart.manager.prototype.read=function(e,i,o,a,s,l,c,d){var h=this;OrgChart.state._get(this.config.state,i,o,function(p){h.state=p,h.action=s,h.actionParams=l,s!=OrgChart.action.init||!h.state||l&&l.method&&"fit"==l.method?(h.viewBox=a,h.vbIsInitializedFromState=!1):(h.viewBox=h.state.vb,h.vbIsInitializedFromState=!0,Array.isArray(h.state.roots)&&(h.config.roots=h.state.roots));var u=h.maxX,f=h.maxY,g=h.minX,m=h.minY,b=h.bordersByRootIdAndLevel,x=h.roots,v=h.nodes;if(e){var y=OrgChart.manager._getResponse(i,o,h.visibleNodeIds,h.config,u,f,g,m,h.viewBox,x,h.action,h.actionParams,v,h.oldNodes,h.vbIsInitializedFromState);s!=OrgChart.action.exporting&&(h.maxX=u,h.maxY=f,h.minX=g,h.minY=m,h.roots=x,h.nodes=v,h.visibleNodeIds=y.visibleNodeIds),y.bordersByRootIdAndLevel=b,y.roots=x,y.adjustify={x:0,y:0},h.state&&(y.adjustify=h.state.adjustify),c(y)}else h.oldNodes=v||null,h._read(function(e){u=e.maxX,f=e.maxY,g=e.minX,m=e.minY,b=e.bordersByRootIdAndLevel,x=e.roots,v=e.nodes;var a=OrgChart.manager._getResponse(i,o,h.visibleNodeIds,h.config,u,f,g,m,h.viewBox,x,h.action,h.actionParams,v,h.oldNodes,h.vbIsInitializedFromState);a.notif=e.limit,a.roots=x,a.bordersByRootIdAndLevel=b,a.adjustify=e.adjustify,s!=OrgChart.action.exporting&&(h.maxX=u,h.maxY=f,h.minX=g,h.minY=m,h.roots=x,h.nodes=v,h.visibleNodeIds=a.visibleNodeIds,h.bordersByRootIdAndLevel=b,h.rootList=e.rootList),c(a)},d)})},OrgChart.manager.prototype._read=function(e,i){var o=this,a=OrgChart.manager._createNodes(this.instance);i(a);var s=a.nodes,l=a.roots,c=OrgChart.remote;null==c&&(c=OrgChart.local),c._setPositions(l,o.layoutConfigs,function(i){var c=OrgChart.manager._doNotChangePositionOfClickedNodeIfAny(l,s,o.action,o.actionParams,o.oldNodes,o.config.orientation);o.state&&o.action==OrgChart.action.init&&(c=o.state.adjustify),o.action==OrgChart.action.exporting?c=o._fixAdjustForExport:o._fixAdjustForExport=c;for(var d={minX:null,minY:null,maxX:null,maxY:null},h={},p=[],u=0;u<l.length;u++)OrgChart.manager._setMinMaxXYAdjustifyIterate(l[u],l[u],d,0,h,c,o.config.orientation,p);for(u=0;u<l.length;u++)OrgChart.manager._setChildCountPropsIterate(l[u],s);for(var f in p)for(var g in p[f]){var m=h[f][g],b=p[f][g];null==m.minX&&null==m.minY&&null==m.maxX&&null==m.maxY&&OrgChart._setMinMaxXY(b,m,!0)}e({minX:d.minX,minY:d.minY,maxX:d.maxX,maxY:d.maxY,bordersByRootIdAndLevel:h,nodes:s,roots:l,rootList:a.rootList,limit:i,adjustify:c})},s)},void 0===OrgChart&&(OrgChart={}),OrgChart.manager._initDinamicNode=function(e,i,o){i&&(e.lcn=i),o&&(e.isAssistant=!0);var a=OrgChart.t(e.templateName);e.w=a&&a.size?a.size[0]:0,e.h=a&&a.size?a.size[1]:0,e.isSplit="split"==e.templateName,e.isMirror="mirror"==e.templateName,e.isSubLevel="subLevel"==e.templateName},OrgChart.manager._setCollpasedProperty=function(e,i,o,a,s,l,c,d){if(null==e.collapsed&&i.collapse&&i.collapse.allChildren?e.collapsed=!0:null==e.collapsed&&(e.collapsed=!1),s==OrgChart.action.expand&&-1!=o.ids.indexOf(e.id)&&(e.collapsed=!1),s==OrgChart.action.collapse&&(o.expandIds||o.collapseIds)?o.expandIds&&-1!=o.expandIds.indexOf(e.id)?e.collapsed=!1:o.collapseIds&&-1!=o.collapseIds.indexOf(e.id)&&(e.collapsed=!0):s==OrgChart.action.collapse&&-1!=o.ids.indexOf(e.id)&&(e.collapsed=!0),s==OrgChart.action.expand&&"all"==o.ids&&(e.collapsed=!1),s!=OrgChart.action.exporting||OrgChart.isNEU(o.parentLevels)&&OrgChart.isNEU(o.childLevels)||null==o.id)s==OrgChart.action.exporting&&o.expandChildren&&(e.collapsed=!1);else if(!(null==o.id||OrgChart.isNEU(o.parentLevels)&&OrgChart.isNEU(o.childLevels))){var h=d[o.id];if(h==e)e.collapsed=!1;else{for(var p=!1,u=-1,f=!1,g=-1;h;){if(u++,h==e){p=!0;break}h=d[h.pid]}h=d[o.id];for(var m=d[e.id];m;){if(g++,m==h){f=!0;break}m=d[m.pid]}null!=o.parentLevels&&p&&u<=o.parentLevels||null!=o.childLevels&&f&&g<=o.childLevels||f&&o.expandChildren?e.collapsed=!1:e.collapsed=!0}}s==OrgChart.action.init&&null!=c?e.collapsed=!c.exp.has(e.id):s==OrgChart.action.init?-1!=e.tags.indexOf("left-partner")||-1!=e.tags.indexOf("right-partner")||-1!=e.tags.indexOf("partner")||e.parentPartner?e.collapsed=i.collapse&&l>=i.collapse.level&&-1==a.indexOf(e.id):e.collapsed=i.collapse&&l>=i.collapse.level-1&&-1==a.indexOf(e.id):s==OrgChart.action.centerNode||s==OrgChart.action.insert||s==OrgChart.action.expand||s==OrgChart.action.collapse?a.has(e.id)&&(e.collapsed=!1):s==OrgChart.action.update&&o&&o.changeRoots&&o.changeRoots.has(e.id)&&(e.collapsed=!1)},OrgChart.manager._initNode=function(e,i,o,a,s,l,c){var d=c.manager.config,h=c.manager.layoutConfigs,p=c.manager.action,u=c.manager.actionParams,f=c.manager.state,g=h[o||"base"];null==e.parent&&OrgChart.manager._setCollpasedProperty(e,g,u,s,p,a-1,f,i);for(var m=0;m<e.childrenIds.length;m++){var b=i[e.childrenIds[m]];if(OrgChart.manager._setCollpasedProperty(b,g,u,s,p,a,f,i),b.collapsed)e.collapsedChildCount++;else{if(b.parent=e,null!=b.ppid){var x=i[b.ppid];x&&(b.parentPartner=x)}(-1!=b.tags.indexOf("left-partner")||-1!=b.tags.indexOf("right-partner")||-1!=b.tags.indexOf("partner")||b.parentPartner)&&-1==l.indexOf(e.id)&&l.push(e.id),e.children.push(b)}}if(p!=OrgChart.action.minimize||e.min?p==OrgChart.action.maximize&&!0===e.min?(u.all||u.id==e.id)&&(e.min=!1):p==OrgChart.action.exporting&&!1===u.min?e.min=!1:p==OrgChart.action.init&&null!=f&&(e.min=f.min.has(e.id)):(u.all||u.id==e.id)&&(e.min=!0),!(e.min||e.tags&&e.tags.has("filter")))for(m=0;m<e.stChildrenIds.length;m++){(b=i[e.stChildrenIds[m]]).stParent=e,e.stChildren.push(b)}null!=a&&(e.level=a),o&&(e.lcn=o);var v=OrgChart._getSubLevels(e.tags,d.tags);v>0&&(e.subLevels=v),-1!=e.tags.indexOf("assistant")&&null!=e.parent&&(e.isAssistant=!0),g.layout==OrgChart.layout.treeList&&(e.isTreeListItem=!0),g.template&&d.template==e.templateName&&(e.templateName=g.template);var y=OrgChart.t(e.templateName,e.min);if(e.w=y&&y.size?y.size[0]:0,e.h=y&&y.size?y.size[1]:0,e.padding=y&&y.padding?y.padding:[0,0,0,0],e.isTreeListItem&&e.stParent&&null==e.stParent.treeList){var _=OrgChart.t(e.stParent.templateName,e.stParent.min);e.stParent.treeList={pinnedIds:[],scrollTop:0,scrollTopMax:0,maxHeight:_.treeListMaxHeight}}var w={node:e};OrgChart.events.publish("node-initialized",[c,w])},OrgChart.manager._iterate=function(e,i,o,a,s,l,c,d,h,p,u,f){var g=f.manager.layoutConfigs;if(OrgChart.manager._initNode(i,o,h,a,p,u,f),i.isAssistant&&(l[i.pid]||(l[i.pid]=[]),l[i.pid].push(i.id)),i.subLevels>0&&c.push(i.id),OrgChart.MIXED_LAYOUT_FOR_NODES_WITH_COLLAPSED_CHILDREN&&!i.isAssistant&&i.parent){if(i.parent&&i.parent.children.length&&i.parent.children[i.parent.children.length-1]==i){for(var m=[],b=0,x=0,v=0;v<i.parent.children.length;v++){-1==(y=i.parent.children[v]).tags.indexOf("partner")&&-1==y.tags.indexOf("left-partner")&&-1==y.tags.indexOf("right-partner")&&-1==y.tags.indexOf("assistant")&&0==y.children.length?m.push(y.id):-1!=y.tags.indexOf("assistant")?b++:-1==y.tags.indexOf("partner")&&-1==y.tags.indexOf("left-partner")&&-1==y.tags.indexOf("right-partner")||x++}(OrgChart.MIXED_LAYOUT_ALL_NODES&&m.length>1&&m.length==i.parent.children.length-b-x||!OrgChart.MIXED_LAYOUT_ALL_NODES&&m.length>1)&&(d[i.pid]=m)}}else if(!i.isAssistant&&0==i.childrenIds.length&&i.parent&&!d[i.pid]){for(m=[],b=0,x=0,v=0;v<i.parent.children.length;v++){var y;-1==(y=i.parent.children[v]).tags.indexOf("partner")&&-1==y.tags.indexOf("left-partner")&&-1==y.tags.indexOf("right-partner")&&-1==y.tags.indexOf("assistant")&&0==y.childrenIds.length?m.push(y.id):-1!=y.tags.indexOf("assistant")?b++:-1==y.tags.indexOf("partner")&&-1==y.tags.indexOf("left-partner")&&-1==y.tags.indexOf("right-partner")||x++}(OrgChart.MIXED_LAYOUT_ALL_NODES&&m.length>OrgChart.MIXED_LAYOUT_IF_NUMBER_OF_CHILDREN_IS_MORE_THEN&&m.length==i.parent.childrenIds.length-b-x||!OrgChart.MIXED_LAYOUT_ALL_NODES&&m.length>OrgChart.MIXED_LAYOUT_IF_NUMBER_OF_CHILDREN_IS_MORE_THEN)&&(d[i.pid]=m)}i.stChildren.length&&(e.stContainerNodes||(e.stContainerNodes=[]),e.stContainerNodes.push(i));for(var _=0;_<i.stChildren.length;_++){var w="";for(v=0;v<i.tags.length;v++)if(g[i.tags[v]]){w=i.tags[v];break}s.push(i.stChildren[_].id),OrgChart.manager._iterate(e,i.stChildren[_],o,0,s,l,c,d,w,p,u,f)}a++;for(_=0;_<i.children.length;_++)i.isTreeListItem&&(i.children[_].isTreeListItem=i.isTreeListItem),OrgChart.manager._iterate(e,i.children[_],o,a,s,l,c,d,h,p,u,f)},OrgChart.manager.__createNodes=function(e,i,o,a,s,l,c,d){for(var h=[],p=OrgChart._addDottedLines(o),u=0;u<p.length;u++){var f,g=p[u];f=OrgChart.STRING_TAGS?g.tags?g.tags.split(","):[]:Array.isArray(g.tags)?g.tags.slice(0):[],d.filterUI.addFilterTag(g)&&f.unshift("filter");var m=d.searchUI.addMatchTag(g.id);!0===m?f.unshift("match"):!1===m&&f.unshift("no-match");var b=OrgChart._getTemplate(f,o.tags,o.template),x=new OrgChart.node(g.id,g.pid,f,b);OrgChart.isNEU(g.ppid)||(x.ppid=g.ppid),OrgChart.isNEU(g.stpid)||(x.stpid=g.stpid),null!=g.movex&&(x.movex=g.movex),null!=g.movey&&(x.movey=g.movey),e[g.id]=x,h.push(g.id)}if(null!=o.orderBy){var v=OrgChart.manager._getOrderSortArray(o.orderBy);h.sort(function(e,i){var o,a;for(var s of p)if(s.id==e&&(o=s),s.id==i&&(a=s),o&&a)break;for(var l=0;l<v.length;l++){var c=o[v[l].field],d=a[v[l].field],h=c,u=d;if(null==h&&(h=""),null==u&&(u=""),"string"==typeof h&&"string"==typeof u){var f=h.localeCompare(u);if(v[l].desc&&(f*=-1),0!==f)return f}else{f=c<d?-1:c>d?1:0;if(v[l].desc&&(f*=-1),0!==f)return f}}})}for(u=0;u<h.length;u++){var y=h[u],_=(x=e[y],l?l[y]:null),w=e[x.stpid],k=e[x.pid];if(w||(x.stpid=null),k||(x.pid=null),w){var I=l?l[w.id]:null;I&&(w.min=I.min),w.stChildrenIds.push(x.id)}else k?(_&&(x.collapsed=_.collapsed,x.min=_.min,x.treeList=_.treeList),k.childrenIds.push(x.id)):(_&&(x.collapsed=_.collapsed,x.min=_.min,x.treeList=_.treeList),i.push(x),c.push(x.id));a==OrgChart.action.init&&(x.min=OrgChart._getMin(x,o))}},OrgChart.manager._createNodes=function(e){var i=e.manager.config,o=e.manager.layoutConfigs,a=e.manager.action,s=e.manager.actionParams,l=e.manager.oldNodes,c=e.manager.state,d={},h=[],p=[];if(OrgChart.manager.__createNodes(d,h,i,a,s,l,p,e),null!=i.roots){h=[];for(var u=0;u<i.roots.length;u++){var f=d[i.roots[u]];if(f&&a==OrgChart.action.centerNode){for(var g=f;null!=g.pid||null!=g.stpid;)g=null==g.pid&&null!=g.stpid?d[g.stpid]:d[g.pid];for(var m=d[s.id];(null!=m.pid||null!=m.stpid)&&m!=f;)m=null==m.pid&&null!=m.stpid?d[m.stpid]:d[m.pid];g==m&&(f=g)}if(f){for(var b=!1,x=0;x<h.length;x++)if(h[x].id==f.id){b=!0;break}if(!b){if(!OrgChart.isNEU(f.pid))(Te=(v=d[f.pid]).childrenIds.indexOf(f.id))>-1&&v.childrenIds.splice(Te,1);h.push(f)}}}i.roots=[];for(u=0;u<h.length;u++)i.roots.push(h[u].id)}if(a==OrgChart.action.exporting&&null!=s.id)if(s.parentLevels){for(var v=d[s.id],y=0;y<s.parentLevels&&d[v.pid];)y++,v=d[v.pid];v.pid=null,h=[v]}else{(w=d[s.id])&&(w.pid=null,h=[w])}var _=[];if(a==OrgChart.action.init&&i.expand&&i.expand.nodes&&null==c)for(u=0;u<i.expand.nodes.length;u++){var w=d[i.expand.nodes[u]];for(!0===i.expand.allChildren&&OrgChart.manager._addExpandedNodeIdsIterate(w,d,_);w;)_.push(w.id),null==w.pid&&null!=w.stpid?(w=d[w.stpid]).min=!1:w=d[w.pid]}else if(a==OrgChart.action.expand&&s.ids&&"all"!=s.ids||a==OrgChart.action.collapse&&s&&s.expandIds){_e=a==OrgChart.action.expand?s.ids:s.expandIds;for(u=0;u<_e.length;u++)for(v=d[(w=d[_e[u]]).pid];v;)_.push(v.id),null==v.pid&&null!=v.stpid?(v=d[v.stpid]).min=!1:v=d[v.pid]}else if(a==OrgChart.action.centerNode){for(var k=OrgChart._getCenterNodeFromParams(d,s);k;){if(_.push(k.id),s.options.parentState===OrgChart.COLLAPSE_PARENT_NEIGHBORS&&k)for(u=0;u<k.childrenIds.length;u++){(j=d[k.childrenIds[u]]).collapsed=!0}if(null==k.pid&&null!=k.stpid){if((k=d[k.stpid]).min=!1,k.tags)-1!=(Te=k.tags.indexOf("filter"))&&(k.tags.splice(Te,1),e.filterUI._removeFilter(k.id))}else k=d[k.pid]}if(k=OrgChart._getCenterNodeFromParams(d,s),s.options.childrenState===OrgChart.COLLAPSE_SUB_CHILDRENS)for(u=0;u<k.childrenIds.length;u++){(S=d[k.childrenIds[u]]).collapsed=!1;for(var I=0;I<S.childrenIds.length;I++){d[S.childrenIds[I]].collapsed=!0}}if(s.options.parentState===OrgChart.COLLAPSE_PARENT_SUB_CHILDREN_EXCEPT_CLICKED)if(v=d[k.pid])for(u=0;u<v.childrenIds.length;u++){var S;if((S=d[v.childrenIds[u]])!=k){S.collapsed=!1;for(I=0;I<S.childrenIds.length;I++){d[S.childrenIds[I]].collapsed=!0}}}}else if(a==OrgChart.action.insert)for(w=d[s.insertedNodeId];w;)_.push(w.id),null==w.pid&&null!=w.stpid?(w=d[w.stpid]).min=!1:w=d[w.pid];var C=[],L={},A=[],E={},N=[];for(u=0;u<h.length;u++)OrgChart.manager._iterate(h[u],h[u],d,0,C,L,A,E,"",_,N,e);if(a==OrgChart.action.collapse&&s&&Array.isArray(s.expandIds)&&Array.isArray(s.collapseIds))for(u=0;u<s.ids.length;u++)if(s.expandIds.has(s.collapseIds[u]))console.error(`id ${s.collapseIds[u]} exist in both collapseIds and expandIds`);else{(w=d[s.collapseIds[u]])&&(w.collapsed=!0)}for(u=h.length-1;u>=0;u--)h[u].collapsed&&h.splice(u,1);for(u=0;u<N.length;u++){w=d[N[u]];var $=[],M=[],T=[],P={},U=0,O=0,R=0,B=[],F=[];for(I=0;I<w.children.length;I++){(j=w.children[I]).isAssistant?$.push(j.id):-1!=j.tags.indexOf("right-partner")?(j.isPartner=1,j.children=[],M.push(j.id)):-1!=j.tags.indexOf("left-partner")?(j.isPartner=2,j.children=[],T.push(j.id)):-1==j.tags.indexOf("partner")||U%2?-1!=j.tags.indexOf("partner")&&U%2?(j.isPartner=2,j.children=[],T.push(j.id),U++):j.parentPartner?(P[j.parentPartner.id]||(P[j.parentPartner.id]=[]),P[j.parentPartner.id].push(j.id)):$.push(j.id):(j.isPartner=1,j.children=[],M.push(j.id),U++)}w.children=[];var H=[];for(I=0;I<M.length;I++){P[(j=d[M[I]]).id]?w.children.push(j):w.children.splice(0,0,j);for(var D=0;D<j.childrenIds.length;D++)H.push(j.childrenIds[D])}var z=[];for(I=0;I<T.length;I++){P[(j=d[T[I]]).id]?w.children.push(j):w.children.splice(0,0,j);for(D=0;D<j.childrenIds.length;D++)z.push(j.childrenIds[D])}for(I=0;I<z.length;I++){(j=d[z[I]]).collapsed||(j.parentPartner=j.parent,j.parent=w,j.isChildOfPartner=!0,w.children.push(j))}for(I=T.length-1;I>=0;I--)if(P[T[I]])for(x=0;x<P[T[I]].length;x++)w.children.push(d[P[T[I]][x]]),O++,-1==F.indexOf(T[I])&&F.push(T[I]);for(I=0;I<$.length;I++){var j=d[$[I]];w.children.push(j)}for(I=0;I<M.length;I++)if(P[M[I]])for(x=0;x<P[M[I]].length;x++)w.children.push(d[P[M[I]][x]]),R++,-1==B.indexOf(M[I])&&B.push(M[I]);for(I=0;I<H.length;I++){(j=d[H[I]]).collapsed||(j.parentPartner=j.parent,j.parent=w,j.isChildOfPartner=!0,w.children.push(j))}w.partnerSeparation=Math.max(F.length,B.length)*i.partnerChildrenSplitSeparation+i.minPartnerSeparation,$.length||!O||R?$.length||O||!R?$.length||1!=O||1!=R?$.length||O||R?!$.length||O||R?$.length&&(O||R)?w.hasPartners=7:w.hasPartners=1:w.hasPartners=6:w.hasPartners=5:w.hasPartners=4:w.hasPartners=3:w.hasPartners=2}for(u=0;u<A.length;u++){var q=o[(w=d[A[u]]).lcn?w.lcn:"base"];for(I=0;I<w.subLevels;I++){var X=new OrgChart.node(w.id+"_sub_level_index_"+I,w.pid,[],"subLevel");if(OrgChart.manager._initDinamicNode(X,w.lcn),v=w.parent)null!=w.movex&&(X.movex=w.movex),null!=w.movey&&(X.movey=w.movey),(Te=v.children.indexOf(w))>-1&&(v.children.splice(Te,1),v.children.splice(Te,0,X)),X.children.push(w),X.parent=v,w.parent=X,d[X.id]=X}}for(var G in L){(v=d[G]).hasAssistants=!0;X=new OrgChart.node(v.id+"_split_assitant_0",v.id,["assistant"],"split");null!=v.movex&&(X.movex=v.movex),null!=v.movey&&(X.movey=v.movey),OrgChart.manager._initDinamicNode(X,v.lcn,!0),d[X.id]=X;var Z=[];for(I=v.children.length-1;I>=0;I--){(j=v.children[I]).isAssistant?(j.parent=null,v.children.splice(I,1),Z.splice(0,0,j.id)):j.isPartner||(j.parent&&E[j.parent.id]&&X&&j.parent.id!=X.id&&(Object.defineProperty(E,X.id,Object.getOwnPropertyDescriptor(E,j.parent.id)),delete E[j.parent.id]),j.parent=X,X.children.unshift(j),v.children.splice(I,1))}if(Z.length%2){var Q=d[Z[Z.length-1]],ae=new OrgChart.node(Q.id+"_mirror",v.pid,[],"mirror");OrgChart.manager._initDinamicNode(ae,Q.lcn,!0),ae.isAssistant=!0,ae.w=Q.w,ae.h=Q.h,d[ae.id]=ae,Z.splice(Z.length-1,0,ae.id)}var de=1;for(I=Z.length-1;I>=0;I--)if(I%2&&I!=Z.length-1){var he=new OrgChart.node(v.id+"_split_assitant_"+de,v.pid,[],"split");OrgChart.manager._initDinamicNode(he,v.lcn,!0),null!=v.movex&&(he.movex=v.movex),null!=v.movey&&(he.movey=v.movey),d[he.id]=he,Z.splice(I,0,he.id),de++}else I%2&&Z.splice(I,0,X.id);for(I=0;I<Z.length;I+=3){var pe=null;pe=0==I?v:d[Z[I-2]];var ue=d[Z[I]],fe=d[Z[I+1]],ge=d[Z[I+2]];ue.parent=pe,fe.parent=pe,ge.parent=pe,pe.children.push(ue),pe.children.push(fe),pe.children.push(ge)}}var me=!1;for(var be in o){if(0!=(q=o[be]).layout){me=!0;break}}var xe=OrgChart.events.has("node-layout",e._event_id);if(me||xe){var ve={nodes:d,config:i,action:a,actionParams:s};if(A.length){var ye=!1;for(var G in E){var _e=E[G];for(u=0;u<_e.length;u++){if((w=d[_e[u]]).subLevels){ye=!0;break}}if(ye)break}if(ye){var we={},ke={},Ie={};for(var G in E){_e=E[G];var Se=!1,Ce=null;for(u=0;u<_e.length;u++){var Le=_e[u];(null===Ce||A.has(Le))&&(Ce=d[Le].parent.id,Se||OrgChart.isNEU(d[Le].subLevels)||(Se=d[Le].subLevels>0)),we[Ce]||(we[Ce]=[]),we[Ce].push(Le),Se&&(Ie[Ce]=G,ke[Ce]||(ke[Ce]=[]),ke[Ce].push(Le))}}for(var G in E={},ke)if(ke[G].length>OrgChart.MIXED_LAYOUT_IF_NUMBER_OF_CHILDREN_IS_MORE_THEN){var Ae=Ie[G];for(u=d[Ae].children.length-1;u>=0;u--){j=d[Ae].children[u];ke[G].has(j.id)&&d[Ae].children.splice(u,1)}}for(var G in we)we[G].length>OrgChart.MIXED_LAYOUT_IF_NUMBER_OF_CHILDREN_IS_MORE_THEN&&(E[G]=we[G])}}for(var G in E){for(var Ee=v=d[G];Ee.isSplit;)Ee=d[Ee.pid];for(;Ee.isSubLevel;)Ee=d[Ee.pid];if(0!=(q=o[v.lcn?v.lcn:"base"]).layout||xe){ve.pnode=v,ve.layout=q.layout,ve.layoutGridColumns=i.layoutGridColumns,ve.childrenIds=E[G],ve.lastChildrenPidIds=E,ve.subLevels=0,ve.layouts=[],OrgChart.events.publish("node-layout",[e,ve]),OrgChart.events.publish("layout",[ve]),ve.layouts.length||ve.layouts.push({layout:ve.layout,childrenIds:ve.childrenIds,subLevels:ve.subLevels,layoutGridColumns:ve.layoutGridColumns});for(var Ne=0;Ne<ve.layouts.length;Ne++){var $e=ve.layouts[Ne];for(OrgChart.isNEU($e.subLevels)&&($e.subLevels=0),OrgChart.isNEU($e.layout)&&($e.layout=q.layout),Ee=v=d[G];Ee.isSplit;)Ee=d[Ee.pid];for(;Ee.isSubLevel;)Ee=d[Ee.pid];var Me=v;for(I=0;I<$e.subLevels;I++){X=new OrgChart.node(Ne+"_sublevel_layout_"+I,Me.id,[],"subLevel");OrgChart.manager._initDinamicNode(X,Me.lcn),X.parent=Me,Me.children.push(X),d[X.id]=X,Me=X}if($e.subLevels){for(I=0;I<$e.childrenIds.length;I++){var Te;j=d[$e.childrenIds[I]];-1!=(Te=v.children.indexOf(j))&&v.children.splice(Te,1),j.parent=Me,Me.children.push(j)}v=Me}if($e.layout==OrgChart.layout.grid&&$e.childrenIds.length>2){"dynamic"==$e.layoutGridColumns&&($e.layoutGridColumns=OrgChart._getDynamicGridCoulumns($e.childrenIds.length));var Pe=v.id;for(u=v.children.length-1;u>=0;u--)for(I=0;I<$e.childrenIds.length;I++){Le=$e.childrenIds[I];if(v.children[u].id==Le){v.children.splice(u,1);break}}var Ue=$e.layoutGridColumns;Ue%2!=0&&Ue>2&&Ue--;for(u=0;u<$e.childrenIds.length;u+=Ue){var Oe=null;for(I=0;I<Ue;I++){var Re=u+Ue>=$e.childrenIds.length;if($e.childrenIds.length-1<u+I)break;(j=d[Le=$e.childrenIds[u+I]]).parent=d[Pe],d[Pe].children.push(j),Re||(Ue/2-1==I&&(Oe=new OrgChart.node($e.childrenIds[u+I-1]+"_grid_pseudo_node_"+$e.childrenIds[u+I+1],Pe,[],"subLevel"),OrgChart.manager._initDinamicNode(Oe,v.lcn),Oe.parent=d[Pe],d[Pe].children.push(Oe),d[Oe.id]=Oe),Ue-1==I&&(Pe=Oe.id))}}}if($e.layout==OrgChart.layout.mixed){var Be=$e.childrenIds;for(u=Be.length-1;u>=0;u--){v=(j=d[Be[u]]).parent,j.layout=OrgChart.layout.mixed;for(I=v.children.length-1;I>=0;I--)if(j.id==v.children[I].id){v.children.splice(I,1);break}if(u>0){var Fe=d[Be[u-1]];j.parent=Fe,j.layout=OrgChart.layout.mixed,Fe.children.push(j)}else v.children.push(j)}}else if($e.layout>1){X=new OrgChart.node(Ne+"_"+v.id+"_split_0",Ee.id,[],"split");null!=v.movex&&(X.movex=v.movex),null!=v.movey&&(X.movey=v.movey),OrgChart.manager._initDinamicNode(X,v.lcn),d[X.id]=X,X.layout=$e.layout;var He=[];for(u=$e.childrenIds.length-1;u>=0;u--){for(j=d[$e.childrenIds[u]],I=0;I<v.children.length;I++)v.children[I].id==j.id&&v.children.splice(I,1);if(j.parent=null,j.layout=$e.layout,$e.layout!=OrgChart.layout.treeRightOffset&&$e.layout!=OrgChart.layout.treeRight||He.splice(0,0,j.id),$e.layout>2){var De=new OrgChart.node(Ne+"_"+j.id+"_mirror",Ee.id,[],"mirror");OrgChart.manager._initDinamicNode(De,j.lcn),De.layout=$e.layout,d[De.id]=De,He.splice(0,0,De.id)}$e.layout!=OrgChart.layout.treeRightOffset&&$e.layout!=OrgChart.layout.treeRight&&He.splice(0,0,j.id)}for(de=1,I=He.length-1;I>=0;I--)if(I%2&&I!=He.length-1){he=new OrgChart.node(Ne+"_"+v.id+"_split_"+de,Ee.id,[],"split");OrgChart.manager._initDinamicNode(he,v.lcn),null!=v.movex&&(he.movex=v.movex),null!=v.movey&&(he.movey=v.movey),he.layout=$e.layout,d[he.id]=he,He.splice(I,0,he.id),de++}else I%2&&He.splice(I,0,X.id);for(I=0;I<He.length;I+=3){pe=null;0==I&&(pe=v);ue=d[He[I]],fe=d[He[I+1]],ge=d[He[I+2]];0!=I&&(pe=d[He[I-3]]),0==I||fe||(pe=d[He[I-2]]),ue.parent=pe,pe.children.push(ue),fe&&(0!=I&&(pe=d[He[I-2]]),fe.parent=pe,pe.children.push(fe)),ge&&(0!=I&&(pe=d[He[I-1]]),ge.parent=pe,pe.children.push(ge))}}}}}}if(OrgChart.VERTICAL_CHILDREN_ASSISTANT)for(u=0;u<h.length;u++)OrgChart.manager._verticalAssistantIterate(h[u],d);ve={nodes:d,roots:h};return OrgChart.events.publish("nodes-initialized",[e,ve]),{nodes:ve.nodes,roots:ve.roots,rootList:p}},OrgChart.manager._getOrderSortArray=function(e){if("string"==typeof e)return[{field:e,desc:!1}];if(Array.isArray(e)){var i=[];for(var o of e)"string"==typeof o?i.push({field:o,desc:!1}):e instanceof Object?i.push(o):console.error("Unseported orderBy value!");return i}if(e instanceof Object)return[e];console.error("Unseported orderBy value!")},OrgChart.manager._getNodeWidth=function(e,i){switch(i.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:return e.w;case OrgChart.orientation.right:case OrgChart.orientation.right_top:case OrgChart.orientation.left:case OrgChart.orientation.left_top:return e.h}return 0},OrgChart.manager._isVisible=function(e,i,o,a,s,l,c){var d=0;if("auto"==OrgChart.LAZY_LOADING_FACTOR){var h=l/s*2,p=c/s*2;d=h>p?Math.ceil(h):Math.ceil(p)}else d=OrgChart.LAZY_LOADING_FACTOR/s;if(null!=e.x&&null!=e.y){if(OrgChart._getLazyLoading(i)&&a!==OrgChart.action.exporting){function is_vizible(e,i){var o=e.x,a=e.y,s=e.w,l=e.h,c=i[0]-d,h=i[2]+d+i[0],p=i[1]-d,u=i[3]+d+i[1],f=o+s>c&&h>o;return f&&(f=a+l>p&&u>a),f}if(is_vizible(e,o))return!0;for(var u=0;u<e.children.length;u++)if(is_vizible(e.children[u],o))return!0;return!1}return!0}},OrgChart.manager.getAllFields=function(e){var i=[OrgChart.TAGS];for(var o in e.nodeBinding)i.push(e.nodeBinding[o]);for(o=0;o<e.nodes.length;o++)for(var a in e.nodes[o])a!==OrgChart.ID&&a!==OrgChart.TAGS&&a!==OrgChart.NODES&&a!==OrgChart.PID&&a!==OrgChart.STPID&&"movex"!==a&&"movey"!==a&&(e.nodeBinding[a]||i.has(a)||i.push(a));return i},OrgChart.manager._getMostDeepChild=function(e){if(e){var i=e;return function getMostDeepChild(e){e.sl>i.sl&&(i=e);for(var o=0;o<e.children.length;o++)getMostDeepChild(e.children[o])}(e),i}},OrgChart.manager._getResponse=function(e,i,o,a,s,l,c,d,h,p,u,f,g,m,b){var x=p[0],v=[],y={top:null,left:null,bottom:null,right:null,minX:null,maxX:null,minY:null,maxY:null},_=[[],[],[]],w=s-c+2*a.padding,k=l-d+2*a.padding,I=OrgChart.getScale(h,e,i,a.scaleInitial,a.scaleMax,a.scaleMin,w,k);if(y.top=d-a.padding,y.left=c-a.padding,y.bottom=l+a.padding-i/I,y.right=s+a.padding-e/I,y.maxX=s,y.minX=c,y.maxY=l,y.minY=d,0==p.length||null==h&&!b&&a.align==OrgChart.CENTER){var S=Math.ceil(e/I),C=Math.ceil(i/I),L=0,A=0;if(S-2*a.padding>=s-c)switch(L=(s+c)/2-S/2,a.orientation){case OrgChart.orientation.right:case OrgChart.orientation.right_top:L=(c-s)/2-S/2}else switch(L=x.x-S/2+OrgChart.manager._getNodeWidth(x,a)/2,a.orientation){case OrgChart.orientation.right:case OrgChart.orientation.right_top:(L=-(S/2-(c-s)/2))<a.padding-S&&(L=a.padding-S);break;case OrgChart.orientation.left:case OrgChart.orientation.bottom_left:case OrgChart.orientation.top_left:case OrgChart.orientation.left_top:(L=-(S/2-(s-c)/2))>-a.padding&&(L=-a.padding)}if(C-2*a.padding>=l-d)switch(A=(l+d)/2-C/2,a.orientation){case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:A=(d-l)/2-C/2}else switch((A=-(C/2-(l-d)/2))>-a.padding&&(A=-a.padding),a.orientation){case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:(A=-(C/2-(d-l)/2))<a.padding-C&&(A=a.padding-C);break;case OrgChart.orientation.left:case OrgChart.orientation.right:A=x.y-C/2+OrgChart.manager._getNodeWidth(x,a)/2}h=[L,A,S,C]}else if(null==h&&!b&&a.align==OrgChart.ORIENTATION){S=Math.ceil(e/I),C=Math.ceil(i/I),L=0,A=0;switch(a.orientation){case OrgChart.orientation.top:L=x.x-S/2+OrgChart.manager._getNodeWidth(x,a)/2,A=-a.padding;break;case OrgChart.orientation.bottom:L=x.x-S/2+OrgChart.manager._getNodeWidth(x,a)/2,A=a.padding-C;break;case OrgChart.orientation.left:L=-a.padding,A=x.y-C/2+OrgChart.manager._getNodeWidth(x,a)/2;break;case OrgChart.orientation.right:L=a.padding-S,A=x.y-C/2+OrgChart.manager._getNodeWidth(x,a)/2;break;case OrgChart.orientation.top_left:L=-a.padding,A=-a.padding;break;case OrgChart.orientation.right_top:L=a.padding-S,A=-a.padding;break;case OrgChart.orientation.left_top:L=-a.padding,A=-a.padding;break;case OrgChart.orientation.bottom_left:L=-a.padding,A=a.padding-C}h=[L,A,S,C]}if(u==OrgChart.action.centerNode||u==OrgChart.action.maximize){var E=OrgChart._getCenterNodeFromParams(g,f);1==f.options.horizontal&&(h[0]=E.x+E.w/2-h[2]/2),1==f.options.vertical&&(h[1]=E.y+E.h/2-h[3]/2)}if(u==OrgChart.action.insert||u==OrgChart.action.expand||u==OrgChart.action.collapse||u==OrgChart.action.update||u==OrgChart.action.centerNode){var N=null;if(u==OrgChart.action.insert&&f&&null!=f.insertedNodeId&&null!=f.insertedNodeId)N=g[f.insertedNodeId];else if(u==OrgChart.action.update&&f&&null!=f.visId&&null!=f.visId)N=g[f.visId];else if(u!=OrgChart.action.expand&&u!=OrgChart.action.collapse||!f||null==f.id||null==f.id){if(u==OrgChart.action.centerNode){switch(a.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:f.options.vertical||(N=g[f.id]);break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:case OrgChart.orientation.left:case OrgChart.orientation.left_top:f.options.horizontal||(N=g[f.id])}N&&(N=OrgChart.manager._getMostDeepChild(N))}}else N=g[f.id],N=OrgChart.manager._getMostDeepChild(N);if(!OrgChart.FIXED_POSITION_ON_CLICK&&N){if(N.isTreeListItem){for(;!N.stParent;)N=N.parent;N=N.stParent}switch(a.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:var $=N.y+N.h-h[3]+a.padding;h[1]<$&&(h[1]=$);break;case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:$=N.y-a.padding;h[1]>$&&(h[1]=$);break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:$=N.x-a.padding;h[0]>$&&(h[0]=$);break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:$=N.x+N.w-h[2]+a.padding;h[0]<$&&(h[0]=$)}}}for(var M=0;M<p.length;M++)OrgChart.manager._iterate2(p[M],g,a,h,u,f,v,m,o,_,I,e,i);return{animations:_,boundary:y,viewBox:h,visibleNodeIds:v,nodes:g,allFields:OrgChart.manager.getAllFields(a)}},OrgChart.manager._iterate2=function(e,i,o,a,s,l,c,d,h,p,u,f,g){if(OrgChart.manager._isVisible(e,o,a,s,u,f,g)){c.push(e.id);var m=null;if((s==OrgChart.action.expand||s==OrgChart.action.collapse||s==OrgChart.action.maximize)&&d&&d[e.id]&&"expandCollapseToLevel"==l.method){if(m={x:(y=d[e.id]).x,y:y.y},y){m={x:y.x,y:y.y};for(var b=e,x=null;null!=b;)d[b.id]&&d[b.id].collapsed&&(x=b),b=b.parent;x&&x.parent&&(m={x:x.parent.x,y:x.parent.y})}if(_=i[l.id]){for(b=e.parent;null!=b;)b=b.parent;b&&(m={x:_.x+_.w/2-e.w/2,y:_.y+_.h/2-e.h/2})}}else if((s==OrgChart.action.expand||s==OrgChart.action.collapse)&&d&&d[e.id]){if(m={x:(y=d[e.id]).x,y:y.y},"all"==l.ids&&y){m={x:y.x,y:y.y};for(b=e,x=null;null!=b;)d[b.id]&&d[b.id].collapsed&&(x=b),b=b.parent;x&&x.parent&&(m={x:x.parent.x,y:x.parent.y})}if(_=i[l.id]){for(b=e.parent;null!=b&&-1==l.ids.indexOf(e.id)&&-1==l.ids.indexOf(b.id);)b=b.parent;b&&(m={x:_.x+_.w/2-e.w/2,y:_.y+_.h/2-e.h/2})}}else if(s==OrgChart.action.centerNode&&d&&d[e.id]){if(null!=(y=d[e.id]).x&&null!=y.y&&(m={x:y.x,y:y.y}),(v=OrgChart._getCenterNodeFromParams(i,l))&&v==e)(b=e.parent)&&b.id==l.id&&(m={x:v.x+v.w/2-e.w/2,y:v.y+v.h/2-e.h/2})}else if(s==OrgChart.action.maximize&&d&&d[e.id]){var v;if(null!=(y=d[e.id]).x&&null!=y.y&&(m={x:y.x,y:y.y}),(v=OrgChart._getCenterNodeFromParams(i,l))&&v==e)(b=e.parent)&&b.id==l.id&&(m={x:v.x+v.w/2-e.w/2,y:v.y+v.h/2-e.h/2})}else if(s==OrgChart.action.minimize&&d&&d[e.id]){m={x:(y=d[e.id]).x,y:y.y}}else if(s==OrgChart.action.insert&&l&&l.insertedNodeId==e.id&&e.parent)m={x:e.parent.x,y:e.parent.y};else if(s!=OrgChart.action.update&&s!=OrgChart.action.insert||!d)s!==OrgChart.action.exporting&&s!==OrgChart.action.init&&-1==h.indexOf(e.id)&&(p[0].push(e.id),p[1].push({opacity:0}),p[2].push({opacity:1}));else{var y,_;if((!(y=d[e.id])||OrgChart.isNEU(y.x)&&OrgChart.isNEU(y.y))&&l){if(_=i[l.id]){for(b=_;b&&b.id==e.id;)b=b.parent;b&&(m={x:_.x,y:_.y})}}else y&&(m={x:y.x,y:y.y})}null!=m&&null!=m.x&&null!=m.y&&(m.x==e.x&&m.y==e.y||l&&l.dragNodeIdList&&-1!=l.dragNodeIdList.indexOf(e.id)||e.isSplit||(p[0].push(e.id),p[1].push({transform:[1,0,0,1,m.x,m.y]}),p[2].push({transform:[1,0,0,1,e.x,e.y]})))}for(var w=0;w<e.stChildren.length;w++)OrgChart.manager._iterate2(e.stChildren[w],i,o,a,s,l,c,d,h,p,u,f,g);for(w=0;w<e.children.length;w++)OrgChart.manager._iterate2(e.children[w],i,o,a,s,l,c,d,h,p,u,f,g)},OrgChart.manager._addExpandedNodeIdsIterate=function(e,i,o){for(var a=0;a<e.childrenIds.length;a++)o.push(e.childrenIds[a]),OrgChart.manager._addExpandedNodeIdsIterate(i[e.childrenIds[a]],i,o)},OrgChart.manager._setChildCountPropsIterate=function(e,i){void 0===e.w&&(e.collapsedChildCount=e.childrenIds.length),e.deepChildCount=e.childCount=e.childrenIds.length,e.deepCollapsedChildCount=e.collapsedChildCount;for(var o=i[e.pid];o;)o.deepCollapsedChildCount+=e.collapsedChildCount,o.deepChildCount+=e.childCount,o=i[o.pid];for(var a of e.stChildrenIds)OrgChart.manager._setChildCountPropsIterate(i[a],i);for(var a of e.childrenIds)OrgChart.manager._setChildCountPropsIterate(i[a],i)},OrgChart.manager._setMinMaxXYAdjustifyIterate=function(e,i,o,a,s,l,c,d){for(var h of(e.x+=l.x,e.y+=l.y,e.stChildren))OrgChart.manager._setMinMaxXYAdjustifyIterate(h,h,o,0,s,l,c,d);for(var h of(e.isPartner?e.sl=a-1:e.sl=a,null==s[i.id]&&(s[i.id]={}),null==s[i.id][e.sl]&&(s[i.id][e.sl]={minX:null,minY:null,maxX:null,maxY:null}),e.layout?(null==d[i.id]&&(d[i.id]={}),null==d[i.id][e.sl]&&(d[i.id][e.sl]=e)):OrgChart._setMinMaxXY(e,s[i.id][e.sl],!0),null!=e.movex&&(e.x+=e.movex),null!=e.movey&&(e.y+=e.movey),OrgChart._setMinMaxXY(e,o,!0),a++,e.children))OrgChart.manager._setMinMaxXYAdjustifyIterate(h,i,o,a,s,l,c,d)},OrgChart.manager._doNotChangePositionOfClickedNodeIfAny=function(e,i,o,a,s,l){if(o!=OrgChart.action.expand&&o!=OrgChart.action.collapse&&o!=OrgChart.action.minimize&&o!=OrgChart.action.maximize&&o!=OrgChart.action.centerNode&&o!=OrgChart.action.update&&o!=OrgChart.action.insert)return{x:0,y:0};if(o==OrgChart.action.update&&(!a||null==a.id)){if(!e||!e.length)return{x:0,y:0};a={id:e[0].id}}if(null==a.id)return{x:0,y:0};var c=a.id;(o==OrgChart.action.minimize&&i[c].parent||o==OrgChart.action.maximize&&i[c].parent)&&(c=i[c].pid);var d=i[c],h=s[c];if(!h)return{x:0,y:0};var p=null!=h.movex?h.movex:0,u=null!=h.movey?h.movey:0,f={x:(h.x?h.x-p:0)-d.x,y:(h.y?h.y-u:0)-d.y};return d&&d.isTreeListItem?{x:0,y:0}:f},OrgChart.manager._verticalAssistantIterate=function(e,i){for(var o=0;o<e.stChildren.length;o++)OrgChart.manager._verticalAssistantIterate(e.stChildren[o],i);if(3==e.children.length)OrgChart.manager._verticalAssistantIterate(e.children[0],i),OrgChart.manager._verticalAssistantIterate(e.children[2],i),OrgChart.manager._verticalAssistantIterate(e.children[1],i);else for(o=0;o<e.children.length;o++)OrgChart.manager._verticalAssistantIterate(e.children[o],i);if(e.isAssistant&&e.isSplit&&e.children.length){for(var a=e.parent.children[0],s=e.parent.children[2],l=e.parent;!l.hasAssistants;)l=l.parent;var c={max:0},d={max:0};OrgChart.manager._verticalAssistantLevelCountIterate(a,0,c),OrgChart.manager._verticalAssistantLevelCountIterate(s,0,d);var h=Math.max(c.max,d.max),p=[];for(o=0;o<h;o++){var u=new OrgChart.node(e.parent.id+"_split_assitant_level_"+o,e.pid,[],"subLevel");OrgChart.manager._initDinamicNode(u,e.lcn,!0),null!=l.movex&&(u.movex=l.movex),null!=l.movey&&(u.movey=l.movey),o>0&&(p[o-1].children.push(u),u.parent=p[o-1]),i[u.id]=u,p.push(u)}if(p.length){for(var f=p[p.length-1],g=p[0],m=e.children.length-1;m>=0;m--){var b=e.children[m];f.children.unshift(b),b.parent=f,e.children.splice(m,1)}e.children.push(g),g.parent=e}}},OrgChart.manager._verticalAssistantLevelCountIterate=function(e,i,o){o.max<i&&(o.max=i),i++;for(var a=0;a<e.children.length;a++)OrgChart.manager._verticalAssistantLevelCountIterate(e.children[a],i,o)},OrgChart._addDottedLines=function(e){var i=e.nodes;if((e.groupDottedLines.length||e.dottedLines.length)&&(i=JSON.parse(JSON.stringify(i))),e.groupDottedLines.length)for(var o=[],a=0;a<e.groupDottedLines.length;a++){var s=e.groupDottedLines[a];null==s.rootId&&(s.rootId=s.to);var l=`balkan_group_dotted_${s.rootId}`;if(!o.has(l))for(var c=0;c<i.length;c++)if(i[c].id==s.rootId){(u=JSON.parse(JSON.stringify(i[c]))).id=`balkan_group_dotted_${s.rootId}_balkan_id_${i[c].id}`,u.pid=void 0,u.stpid=i[c].id,i.push(u),o.push(l),i[c].tags||(i[c].tags=[]),i[c].tags.push("group-dotted-lines"),i[c].tags.push("group-dotted-lines-"+l);break}for(c=0;c<i.length;c++)if(i[c].id==s.from){if((u=JSON.parse(JSON.stringify(i[c]))).id=`balkan_group_dotted_${s.rootId}_balkan_id_${i[c].id}`,u.pid=`balkan_group_dotted_${s.rootId}_balkan_id_${s.to}`,u.tags){var d=u.tags.indexOf("group-dotted-lines");-1!=d&&u.tags.splice(d,1)}if(u.tags||(u.tags=[]),u.tags.push("boc-dotted-connector"),s.tags)for(var h=0;h<s.tags.length;h++)u.tags.push(s.tags[h]);i.push(u);break}}if(e.dottedLines.length)for(a=0;a<e.dottedLines.length;a++){var p=e.dottedLines[a];null==p.rootId&&(p.rootId=p.to);for(c=0;c<i.length;c++)if(i[c].id==p.from){var u;if((u=JSON.parse(JSON.stringify(i[c]))).id=`balkan_dotted_${p.rootId}_balkan_id_${i[c].id}`,p.rootId==p.to?u.pid=p.to:u.pid=`balkan_dotted_${p.rootId}_balkan_id_${p.to}`,u.tags||(u.tags=[]),u.tags.push("boc-dotted-connector"),p.tags)for(h=0;h<p.tags.length;h++)u.tags.push(p.tags[h]);i.push(u);break}}return i},void 0===OrgChart&&(OrgChart={}),OrgChart.templates={},OrgChart.templates.base={defs:"",size:[250,120],expandCollapseSize:30,linkAdjuster:{fromX:0,fromY:0,toX:0,toY:0},ripple:{radius:0,color:"#e6e6e6",rect:null},assistanseLink:'<path stroke-linejoin="round" stroke="#aeaeae" stroke-width="2px" fill="none" d="M{xa},{ya} {xb},{yb} {xc},{yc} {xd},{yd} L{xe},{ye}"/>',svg:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="display:block;" width="{w}" height="{h}" viewBox="{viewBox}">{content}</svg>',link:'<path stroke-linejoin="round" stroke="#aeaeae" stroke-width="1px" fill="none" d="M{xa},{ya} {xb},{yb} {xc},{yc} L{xd},{yd}"/>',node:'<rect x="0" y="0" height="120" width="250" fill="none" stroke-width="1" stroke="#aeaeae" rx="7" ry="7"></rect>',plus:function(e,i,o,a,s){var l="dark"==a.mode?"#1E1E1E":"#ffffff";return`<g transform="matrix(1,0,0,1,${s.x-15},${s.y-15})"><circle cx="15" cy="15" r="15" fill="${l}" stroke="#aeaeae" stroke-width="1"></circle>\n <text text-anchor="middle" style="font-size: 14px;cursor:pointer;" fill="#aeaeae" x="15" y="21">${e.deepCollapsedChildCount}</text></g>`},minus:function(e,i,o,a,s){var l="dark"==a.mode?"#1E1E1E":"#ffffff";return`<g transform="matrix(1,0,0,1,${s.x-15},${s.y-15})"><circle cx="15" cy="15" r="15" fill="${l}" stroke="#aeaeae" stroke-width="1"></circle>\n <line x1="4" y1="15" x2="26" y2="15" stroke-width="1" stroke="#aeaeae"></line></g>`},nodeMenuButton:'<g style="cursor:pointer;" transform="matrix(1,0,0,1,225,105)"><rect x="-4" y="-10" fill="#000000" fill-opacity="0" width="22" height="22"></rect><circle cx="0" cy="0" r="2" fill="#ffffff"></circle><circle cx="7" cy="0" r="2" fill="#ffffff"></circle><circle cx="14" cy="0" r="2" fill="#ffffff"></circle></g>',menuButton:'<div style="user-select:none;position:absolute;right:{p}px;top:{p}px; width:30px;height:50px;cursor:pointer;" '+OrgChart.attr.control_export_menu+'=""><hr style="background-color: #7A7A7A; height: 3px; border: none;"><hr style="background-color: #7A7A7A; height: 3px; border: none;"><hr style="background-color: #7A7A7A; height: 3px; border: none;"></div>',img_0:'<clipPath id="{randId}"><circle cx="60" cy="60" r="40"></circle></clipPath><image preserveAspectRatio="xMidYMid slice" clip-path="url(#{randId})" xlink:href="{val}" x="20" y="20" width="80" height="80"></image>',link_field_0:'<text text-anchor="middle" fill="#aeaeae" '+OrgChart.attr.width+'="290" x="0" y="0" style="font-size:10px;">{val}</text>',editFormHeaderColor:"#039BE5",treeListMaxHeight:500},OrgChart.templates.ana={defs:"",size:[250,120],linkAdjuster:{fromX:0,fromY:0,toX:0,toY:0},ripple:{radius:0,color:"#e6e6e6",rect:null},expandCollapseSize:30,svg:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="display:block;" width="{w}" height="{h}" viewBox="{viewBox}">{content}</svg>',link:'<path stroke-linejoin="round" stroke="#aeaeae" stroke-width="1px" fill="none" d="{rounded}" />',assistanseLink:'<path stroke-linejoin="round" stroke="#aeaeae" stroke-width="2px" fill="none" d="M{xa},{ya} {xb},{yb} {xc},{yc} {xd},{yd} L{xe},{ye}"/>',node:function(e,i,o,a){return`<rect x="0" y="0" height="${e.h}" width="${e.w}" fill="#039BE5" stroke-width="1" stroke="#aeaeae" rx="10" ry="10"></rect>`},plus:function(e,i,o,a,s){var l="dark"==a.mode?"#1E1E1E":"#ffffff";return`<g transform="matrix(1,0,0,1,${s.x-15},${s.y-15})"><circle cx="15" cy="15" r="15" fill="${l}" stroke="#aeaeae" stroke-width="1"></circle>\n <text text-anchor="middle" style="font-size: 14px;cursor:pointer;" fill="#aeaeae" x="15" y="21">${e.deepCollapsedChildCount}</text></g>`},minus:function(e,i,o,a,s){var l="dark"==a.mode?"#1E1E1E":"#ffffff";return`<g transform="matrix(1,0,0,1,${s.x-15},${s.y-15})"><circle cx="15" cy="15" r="15" fill="${l}" stroke="#aeaeae" stroke-width="1"></circle>\n <line x1="4" y1="15" x2="26" y2="15" stroke-width="1" stroke="#aeaeae"></line></g>`},up:'<rect x="20" y="-25" width="30" height="17" fill="#aeaeae" rx="3" ry="3"></rect><line x1="35" x2="35" y1="0" y2="-8" stroke="#aeaeae" stroke-width="1"></line>',nodeMenuButton:function(e,i,o,a){return`<g transform="matrix(1,0,0,1,${e.w-25},${e.h-15})"><rect x="-4" y="-10" fill="#000000" fill-opacity="0" width="22" height="22"></rect><circle cx="0" cy="0" r="2" fill="#ffffff"></circle><circle cx="7" cy="0" r="2" fill="#ffffff"></circle><circle cx="14" cy="0" r="2" fill="#ffffff"></circle></g>`},menuButton:OrgChart.templates.base.menuButton,img_0:function(e,i,o,a,s){var l=OrgChart.randomId();return`<clipPath id="${l}"><circle cx="50" cy="30" r="40"></circle></clipPath><image preserveAspectRatio="xMidYMid slice" clip-path="url(#${l})" xlink:href="${s}" x="10" y="-10" width="80" height="80" ></image>`},link_field_0:'<text text-anchor="middle" fill="#aeaeae" '+OrgChart.attr.width+'="290" x="0" y="0" style="font-size:10px;">{val}</text>',field_0:function(e,i,o,a,s){return OrgChart.wrapText(s,`<text style="font-size: 18px;" fill="#ffffff" x="${e.w/2}" y="${e.h-25}" text-anchor="middle"></text>`,e.w-20,1)},field_1:function(e,i,o,a,s){return OrgChart.wrapText(s,`<text style="font-size: 14px;" fill="#ffffff" x="${e.w-20}" y="30" text-anchor="end"></text>`,e.w-120,3)},padding:[75,5,50,5],editFormHeaderColor:"#039BE5",treeListMaxHeight:500},OrgChart.templates.split=Object.assign({},OrgChart.templates.ana),OrgChart.templates.split.size=[10,10],OrgChart.templates.split.node='<circle cx="5" cy="5" r="5" fill="none" stroke-width="1" stroke="#aeaeae"></circle>',OrgChart.templates.split.field_0="",OrgChart.templates.split.field_1="",OrgChart.templates.split.img_0="",OrgChart.templates.dot=Object.assign({},OrgChart.templates.split),OrgChart.templates.group=Object.assign({},OrgChart.templates.ana),OrgChart.templates.group.size=[250,120],OrgChart.templates.group.padding=[50,20,35,20],OrgChart.templates.group.node='<rect rx="50" ry="50" x="0" y="0" height="{h}" width="{w}" fill="#f2f2f2" stroke-width="0"></rect>',OrgChart.templates.group.link='<path stroke="#aeaeae" stroke-width="1px" fill="none" d="M{xa},{ya} C{xb},{yb} {xc},{yc} {xd},{yd}"/>',OrgChart.templates.group.nodeMenuButton='<g style="cursor:pointer;" transform="matrix(1,0,0,1,{ew},25)"><g transform="matrix(1,0,0,1,-22,-8)"><rect x="0" y="0" fill="red" fill-opacity="0" width="18" height="22"></rect><line x1="0" y1="2" x2="9" y2="2" stroke="#aeaeae" stroke-width="1"></line><line x1="0" y1="9" x2="18" y2="9" stroke="#aeaeae" stroke-width="1"></line><line x1="0" y1="16" x2="22" y2="16" stroke="#aeaeae" stroke-width="1"></line></g></g>',OrgChart.templates.group.field_0="<text "+OrgChart.attr.width+'="230" style="font-size: 18px;" fill="#aeaeae" x="{cw}" y="30" text-anchor="middle">{val}</text>',OrgChart.templates.group.field_1="",OrgChart.templates.group.ripple={radius:50,color:"#aeaeae"},OrgChart.templates.invisibleGroup=Object.assign({},OrgChart.templates.group),OrgChart.templates.invisibleGroup.node="",OrgChart.templates.invisibleGroup.padding=[0,0,0,0],OrgChart.templates.invisibleGroup.field_0="",OrgChart.templates.invisibleGroup.nodeMenuButton="",OrgChart.templates.mirror={linkAdjuster:{},link:"",node:"",nodeMenuButton:"",size:[0,0]},OrgChart.templates.ula=Object.assign({},OrgChart.templates.ana),OrgChart.templates.ula.field_0=function(e,i,o,a,s){return OrgChart.wrapText(s,'<text style="font-size: 18px;" fill="#039BE5" x="100" y="55"></text>',e.w-105,1)},OrgChart.templates.ula.field_1=function(e,i,o,a,s){return OrgChart.wrapText(s,'<text data-text-overflow="multiline" style="font-size: 14px;" fill="#afafaf" x="100" y="76"></text>',e.w-105,3)},OrgChart.templates.ula.node=function(e,i,o,a){return`<rect x="0" y="0" height="${e.h}" width="${e.w}" fill="#ffffff" stroke-width="1" stroke="#aeaeae"></rect><line x1="0" y1="0" x2="${e.w}" y2="0" stroke-width="2" stroke="#039BE5"></line>`},OrgChart.templates.ula.img_0=function(e,i,o,a,s){var l=OrgChart.randomId();return`<clipPath id="${l}"><circle cx="50" cy="60" r="40"></circle></clipPath><image preserveAspectRatio="xMidYMid slice" clip-path="url(#${l})" xlink:href="${s}" x="10" y="20" width="80" height="80" ></image>`},OrgChart.templates.ula.menu='<g style="cursor:pointer;" transform="matrix(1,0,0,1,225,12)" '+OrgChart.attr.control_node_menu_id+'="{id}"><rect x="-4" y="-10" fill="#ffffff" width="22" height="22"></rect><circle cx="0" cy="0" r="2" fill="#039BE5"></circle><circle cx="7" cy="0" r="2" fill="#039BE5"></circle><circle cx="14" cy="0" r="2" fill="#039BE5"></circle></g>',OrgChart.templates.ula.nodeMenuButton=function(e,i,o,a){return`<g transform="matrix(1,0,0,1,${e.w-25}, ${e.h-15})"><rect x="-4" y="-10" fill="#000000" fill-opacity="0" width="22" height="22"></rect><circle cx="0" cy="0" r="2" fill="#AEAEAE"></circle><circle cx="7" cy="0" r="2" fill="#AEAEAE"></circle><circle cx="14" cy="0" r="2" fill="#AEAEAE"></circle></g>`},OrgChart.templates.ula.padding=[110,1,1,1],OrgChart.templates.olivia=Object.assign({},OrgChart.templates.ana),OrgChart.templates.olivia.defs='<style>\n #olivia_gradient {\n --color-stop-1: #ffffff;\n --color-stop-2: #eeeeee;\n --opacity-stop: 1;\n }\n .olivia-f0{\n font-size: 18px;\n fill: #757575;\n }\n .olivia-f1{\n font-size: 14px;\n fill: #757575;\n }\n .boc-dark .olivia-f0,.boc-dark .olivia-f1{\n fill: #aeaeae;\n }\n .boc-dark #olivia_gradient {\n --color-stop-1: #646464;\n --color-stop-2: #363636;\n --opacity-stop: 1;\n }\n </style>\n <linearGradient id="olivia_gradient" x1="0%" y1="0%" x2="0%" y2="100%"><stop offset="0%" stop-color="var(--color-stop-1)" stop-opacity="var(--opacity-stop)"/><stop offset="100%" stop-color="var(--color-stop-2)" stop-opacity="var(--opacity-stop)" /></linearGradient>',OrgChart.templates.olivia.field_0=function(e,i,o,a,s){return OrgChart.wrapText(s,'<text class="olivia-f0" x="100" y="55"></text>',e.w-105,1)},OrgChart.templates.olivia.field_1=function(e,i,o,a,s){return OrgChart.wrapText(s,'<text class="olivia-f1" x="100" y="76"></text>',e.w-105,3)},OrgChart.templates.olivia.node=function(e,i,o,a){return`<rect fill="url(#olivia_gradient)" x="0" y="0" height="${e.h}" width="${e.w}" stroke-width="1" stroke="#aeaeae" rx="10" ry="10"></rect>`},OrgChart.templates.olivia.img_0='<clipPath id="{randId}"><circle cx="50" cy="60" r="40"></circle></clipPath><image preserveAspectRatio="xMidYMid slice" clip-path="url(#{randId})" xlink:href="{val}" x="10" y="20" width="80" height="80" ></image>',OrgChart.templates.olivia.nodeMenuButton=function(e,i,o,a){return`<g style="cursor:pointer;" transform="matrix(1,0,0,1,${e.w-25},${e.h-15})"><rect x="-4" y="-10" fill="#000000" fill-opacity="0" width="22" height="22"></rect><circle cx="0" cy="0" r="2" fill="#AEAEAE"></circle><circle cx="7" cy="0" r="2" fill="#AEAEAE"></circle><circle cx="14" cy="0" r="2" fill="#AEAEAE"></circle></g>`},OrgChart.templates.olivia.padding=[110,15,30,15],OrgChart.templates.belinda=Object.assign({},OrgChart.templates.ana),OrgChart.templates.belinda.size=[180,180],OrgChart.templates.belinda.ripple={radius:90,color:"#e6e6e6",rect:null},OrgChart.templates.belinda.node=function(e,i,o,a){return`<circle cx="${e.w/2}" cy="${e.h/2}" r="${e.w/2}" fill="#039BE5" stroke-width="1" stroke="#aeaeae"></circle>`},OrgChart.templates.belinda.img_0=function(e,i,o,a,s){var l=e.w/2,c=OrgChart.randomId();return`<clipPath id="${c}"><circle cx="${l}" cy="45" r="40"></circle></clipPath><image preserveAspectRatio="xMidYMid slice" clip-path="url(#${c})" xlink:href="${s}" x="${l-40}" y="5" width="80" height="80" ></image>`},OrgChart.templates.belinda.field_0=function(e,i,o,a,s){return OrgChart.wrapText(s,`<text style="font-size: 18px;" text-anchor="middle" fill="#ffffff" x="${e.w/2}" y="${e.h/2+15}"></text>`,e.w-10,1)},OrgChart.templates.belinda.field_1=function(e,i,o,a,s){return OrgChart.wrapText(s,`<text style="font-size: 14px;" text-anchor="middle" fill="#ffffff" x="${e.w/2}" y="${e.h/2+35}"></text>`,e.w-20,2)},OrgChart.templates.belinda.link='<path stroke="#aeaeae" stroke-width="1px" fill="none" d="M{xa},{ya} C{xb},{yb} {xc},{yc} {xd},{yd}"/>',OrgChart.templates.belinda.nodeMenuButton=function(e,i,o,a){return`<g style="cursor:pointer;" transform="matrix(1,0,0,1,${e.w/2-11},5)"><rect x="0" y="0" fill="#000000" fill-opacity="0" width="22" height="22"></rect><line stroke-width="2" stroke="#000" x1="0" y1="3" x2="22" y2="3"></line><line stroke-width="2" stroke="#000" x1="0" y1="9" x2="22" y2="9"></line><line stroke-width="2" stroke="#000" x1="0" y1="15" x2="22" y2="15"></line></g>`},OrgChart.templates.rony=Object.assign({},OrgChart.templates.ana),OrgChart.templates.rony.svg='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="background-color:#E8E8E8;display:block;" width="{w}" height="{h}" viewBox="{viewBox}">{content}</svg>',OrgChart.templates.rony.defs='<filter id="{randId}" x="0" y="0" width="200%" height="200%"><feOffset result="offOut" in="SourceAlpha" dx="5" dy="5"></feOffset><feGaussianBlur result="blurOut" in="offOut" stdDeviation="5"></feGaussianBlur><feBlend in="SourceGraphic" in2="blurOut" mode="normal"></feBlend></filter>',OrgChart.templates.rony.size=[180,250],OrgChart.templates.rony.ripple={color:"#F57C00",radius:5,rect:null},OrgChart.templates.rony.padding=[250,0,30,0],OrgChart.templates.rony.img_0=function(e,i,o,a,s){var l=e.w/2,c=OrgChart.randomId();return`<clipPath id="${c}"><circle cx="${l}" cy="160" r="60"></circle></clipPath><image preserveAspectRatio="xMidYMid slice" clip-path="url(#${c})" xlink:href="${s}" x="${l-60}" y="100" width="120" height="120" ></image>`},OrgChart.templates.rony.node=function(e,i,o,a){return`<rect filter="url(#{randId})" x="0" y="0" height="${e.h}" width="${e.w}" fill="#ffffff" stroke-width="0" rx="10" ry="10"></rect>'`},OrgChart.templates.rony.field_0=function(e,i,o,a,s){return OrgChart.wrapText(s,`<text style="font-size: 18px;" fill="#039BE5" x="${e.w/2}" y="40" text-anchor="middle"></text>`,e.w-15,1)},OrgChart.templates.rony.field_1=function(e,i,o,a,s){return OrgChart.wrapText(s,`<text style="font-size: 14px;" fill="#F57C00" x="${e.w/2}" y="60" text-anchor="middle"></text>`,e.w-15,3)},OrgChart.templates.rony.field_2=function(e,i,o,a,s){return OrgChart.wrapText(s,`<text style="font-size: 14px;" fill="#FFCA28" x="${e.w/2}" y="80" text-anchor="middle"></text>`,e.w-15,1)},OrgChart.templates.rony.link='<path stroke="#039BE5" stroke-width="1px" fill="none" d="M{xa},{ya} {xb},{yb} {xc},{yc} L{xd},{yd}"/>',OrgChart.templates.rony.plus=function(e,i,o,a,s){return`<g transform="matrix(1,0,0,1,${s.x-15},${s.y-15})"><circle cx="15" cy="15" r="15" fill="#ffffff" stroke="#039BE5" stroke-width="1"></circle><line x1="4" y1="15" x2="26" y2="15" stroke-width="1" stroke="#039BE5"></line><line x1="15" y1="4" x2="15" y2="26" stroke-width="1" stroke="#039BE5"></line></g>`},OrgChart.templates.rony.minus=function(e,i,o,a,s){return`<g transform="matrix(1,0,0,1,${s.x-15},${s.y-15})"><circle cx="15" cy="15" r="15" fill="#ffffff" stroke="#039BE5" stroke-width="1"></circle><line x1="4" y1="15" x2="26" y2="15" stroke-width="1" stroke="#039BE5"></line></g>`},OrgChart.templates.rony.nodeMenuButton=function(e,i,o,a){return`<g transform="matrix(1,0,0,1,${e.w-25},${e.h-15})"><rect x="-4" y="-10" fill="#000000" fill-opacity="0" width="22" height="22"></rect><circle cx="0" cy="0" r="2" fill="#F57C00"></circle><circle cx="7" cy="0" r="2" fill="#F57C00"></circle><circle cx="14" cy="0" r="2" fill="#F57C00"></circle></g>`},OrgChart.templates.mery=Object.assign({},OrgChart.templates.ana),OrgChart.templates.mery.ripple={color:"#e6e6e6",radius:50,rect:null},OrgChart.templates.mery.node=function(e,i,o,a){return`<rect x="0" y="0" height="${e.h}" width="${e.w}" fill="#ffffff" stroke-width="1" stroke="#686868" rx="50" ry="50"></rect><rect x="0" y="${e.h/2-15}" height="30" width="${e.w}" fill="#039BE5" stroke-width="1"></rect>`},OrgChart.templates.mery.link='<path stroke="#aeaeae" stroke-width="1px" fill="none" d="M{xa},{ya} C{xb},{yb} {xc},{yc} {xd},{yd}" />',OrgChart.templates.mery.img_0=function(e,i,o,a,s){var l=e.w/2,c=e.h/2,d=OrgChart.randomId();return`<clipPath id="${d}"><circle cx="${l}" cy="${c}" r="24"></circle></clipPath><image preserveAspectRatio="xMidYMid slice" clip-path="url(#${d})" xlink:href="${s}" x="${l-24}" y="${c-24}" width="48" height="48" ></image>`},OrgChart.templates.mery.field_0=function(e,i,o,a,s){return OrgChart.wrapText(s,`<text style="font-size: 18px;" fill="#039BE5" x="${e.w/2}" y="${e.h/2-30}" text-anchor="middle"></text>`,e.w-30,1)},OrgChart.templates.mery.field_1=function(e,i,o,a,s){return OrgChart.wrapText(s,`<text style="font-size: 14px;" fill="#039BE5" x="${e.w/2}" y="${e.h/2+40}" text-anchor="middle"></text>`,e.w-30,1)},OrgChart.templates.mery.nodeMenuButton=function(e,i,o,a){return`<g transform="matrix(1,0,0,1,${e.w-25}, ${e.h/2})"><rect x="-4" y="-10" fill="#000000" fill-opacity="0" width="22" height="22"></rect><circle cx="0" cy="0" r="2" fill="#ffffff"></circle><circle cx="7" cy="0" r="2" fill="#ffffff"></circle><circle cx="14" cy="0" r="2" fill="#ffffff"></circle></g>`},OrgChart.templates.polina=Object.assign({},OrgChart.templates.ana),OrgChart.templates.polina.size=[300,80],OrgChart.templates.polina.padding=[80,15,30,15],OrgChart.templates.polina.ripple={color:"#e6e6e6",radius:40,rect:null},OrgChart.templates.polina.node=function(e,i,o,a){return`<rect x="0" y="0" height="${e.h}" width="${e.w}" fill="#039BE5" stroke-width="1" stroke="#686868" rx="40" ry="40"></rect>`},OrgChart.templates.polina.img_0='<clipPath id="{randId}"><circle cx="40" cy="40" r="35"></circle></clipPath><image preserveAspectRatio="xMidYMid slice" clip-path="url(#{randId})" xlink:href="{val}" x="0" y="0" width="80" height="80"></image>',OrgChart.templates.polina.field_0=function(e,i,o,a,s){return OrgChart.wrapText(s,'<text style="font-size: 18px;" fill="#ffffff" x="80" y="30" text-anchor="start"></text>',e.w-90,1)},OrgChart.templates.polina.field_1=function(e,i,o,a,s){return OrgChart.wrapText(s,'<text style="font-size: 14px;" fill="#ffffff" x="80" y="55" text-anchor="start"></text>',e.w-90,1)},OrgChart.templates.polina.link='<path stroke="#686868" stroke-width="1px" fill="none" d="M{xa},{ya} C{xb},{yb} {xc},{yc} {xd},{yd}" />',OrgChart.templates.polina.nodeMenuButton=function(e,i,o,a){return`<g transform="matrix(1,0,0,1,${e.w-15},33)"><rect x="-4" y="-10" fill="#000000" fill-opacity="0" width="22" height="22"></rect><circle cx="0" cy="0" r="2" fill="#ffffff"></circle><circle cx="0" cy="7" r="2" fill="#ffffff"></circle><circle cx="0" cy="14" r="2" fill="#ffffff"></circle></g>`},OrgChart.templates.mila=Object.assign({},OrgChart.templates.ana),OrgChart.templates.mila.padding=[60,15,120,15],OrgChart.templates.mila.node=function(e,i,o,a){return`<rect x="0" y="0" height="${e.h}" width="${e.w}" fill="#039BE5" stroke-width="1" stroke="#aeaeae"></rect><rect x="-5" y="${e.h-50}" height="30" width="${e.w+10}" fill="#ffffff" stroke-width="1" stroke="#039BE5"></rect><line x1="-5" x2="0" y1="${e.h-20}" y2="${e.h-15}" stroke-width="1" stroke="#039BE5"/><line x1="${e.w+5}" x2="${e.w}" y1="${e.h-20}" y2="${e.h-15}" stroke-width="1" stroke="#039BE5"/>`},OrgChart.templates.mila.img_0=function(e,i,o,a,s){return`<image preserveAspectRatio="xMidYMid slice" xlink:href="${s}" x="20" y="${e.h-115}" width="64" height="64"></image>`},OrgChart.templates.mila.field_0=function(e,i,o,a,s){return OrgChart.wrapText(s,`<text style="font-size: 18px;" fill="#039BE5" x="${e.w/2}" y="${e.h-28}" text-anchor="middle"></text>`,e.w-10,1)},OrgChart.templates.mila.nodeMenuButton=function(e,i,o,a){return`<g transform="matrix(1,0,0,1,${e.w-25},${e.h-10})"><rect x="-4" y="-10" fill="#000000" fill-opacity="0" width="22" height="22"></rect><circle cx="0" cy="0" r="2" fill="#ffffff"></circle><circle cx="7" cy="0" r="2" fill="#ffffff"></circle><circle cx="14" cy="0" r="2" fill="#ffffff"></circle></g>`},OrgChart.templates.diva=Object.assign({},OrgChart.templates.ana),OrgChart.templates.diva.size=[200,170],OrgChart.templates.diva.padding=[160,10,30,10],OrgChart.templates.diva.node=function(e,i,o,a){return`<rect x="0" y="80" height="${e.h-80}" width="${e.w}" fill="#039BE5"></rect><circle cx="${e.w/2}" cy="50" fill="#ffffff" r="50" stroke="#039BE5" stroke-width="2"></circle>`},OrgChart.templates.diva.img_0=function(e,i,o,a,s){var l=e.w/2,c=OrgChart.randomId();return`<clipPath id="${c}"><circle cx="${l}" cy="50" r="45"></circle></clipPath><image preserveAspectRatio="xMidYMid slice" clip-path="url(#${c})" xlink:href="${s}" x="${l-45}" y="5" width="90" height="90" ></image>`},OrgChart.templates.diva.field_0=function(e,i,o,a,s){return OrgChart.wrapText(s,`<text style="font-size: 18px;" fill="#ffffff" x="${e.w/2}" y="125" text-anchor="middle"></text>`,e.w-15,1)},OrgChart.templates.diva.field_1=function(e,i,o,a,s){return OrgChart.wrapText(s,`<text style="font-size: 14px;" fill="#ffffff" x="${e.w/2}" y="145" text-anchor="middle"></text>`,e.w-15,1)},OrgChart.templates.diva.pointer='<g data-pointer="pointer" transform="matrix(0,0,0,0,100,100)"><radialGradient id="pointerGradient"><stop stop-color="#ffffff" offset="0" /><stop stop-color="#039BE5" offset="1" /></radialGradient><circle cx="16" cy="16" r="16" stroke-width="1" stroke="#acacac" fill="url(#pointerGradient)"></circle></g>',OrgChart.templates.diva.nodeMenuButton=function(e,i,o,a){return`<g transform="matrix(1,0,0,1,${e.w-30}, ${e.h-15})"><rect x="-4" y="-10" fill="#000000" fill-opacity="0" width="22" height="22"></rect><circle cx="0" cy="0" r="2" fill="#ffffff"></circle><circle cx="7" cy="0" r="2" fill="#ffffff"></circle><circle cx="14" cy="0" r="2" fill="#ffffff"></circle></g>`},OrgChart.templates.luba=Object.assign({},OrgChart.templates.ana),OrgChart.templates.luba.svg='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="display:block;background-color: #2E2E2E;" width="{w}" height="{h}" viewBox="{viewBox}">{content}</svg>',OrgChart.templates.luba.defs='<linearGradient id="{randId}" x1="0%" y1="0%" x2="0%" y2="100%"><stop offset="0%" style="stop-color:#646464;stop-opacity:1" /><stop offset="100%" style="stop-color:#363636;stop-opacity:1" /></linearGradient>',OrgChart.templates.luba.node=function(e,i,o,a){return`<rect fill="url(#{randId})" x="0" y="0" height="${e.h}" width="${e.w}" stroke-width="1" stroke="#aeaeae" rx="10" ry="10"></rect>`},OrgChart.templates.luba.padding=[70,10,60,10],OrgChart.templates.luba.img_0=function(e,i,o,a,s){var l=OrgChart.randomId();return`<clipPath id="${l}"><circle cx="50" cy="25" r="40"></circle></clipPath><image preserveAspectRatio="xMidYMid slice" clip-path="url(#${l})" xlink:href="${s}" x="10" y="-15" width="80" height="80" ></image>`},OrgChart.templates.luba.nodeMenuButton=function(e,i,o,a){return`<g transform="matrix(1,0,0,1,${e.w-25},${e.h-15})"><rect x="-4" y="-10" fill="#000000" fill-opacity="0" width="22" height="22"></rect><circle cx="0" cy="0" r="2" fill="#aeaeae"></circle><circle cx="7" cy="0" r="2" fill="#aeaeae"></circle><circle cx="14" cy="0" r="2" fill="#aeaeae"></circle></g>`},OrgChart.templates.luba.field_0=function(e,i,o,a,s){return OrgChart.wrapText(s,`<text style="font-size: 18px;" fill="#aeaeae" x="${e.w/2}" y="${e.h-30}" text-anchor="middle"></text>`,e.w-15,1)},OrgChart.templates.luba.field_1=function(e,i,o,a,s){return OrgChart.wrapText(s,`<text style="font-size: 14px;" fill="#aeaeae" x="${e.w-10}" y="30" text-anchor="end"></text>`,e.w-110,1)},OrgChart.templates.luba.plus='<rect x="0" y="0" width="36" height="36" rx="12" ry="12" fill="#2E2E2E" stroke="#aeaeae" stroke-width="1"></rect><line x1="4" y1="18" x2="32" y2="18" stroke-width="1" stroke="#aeaeae"></line><line x1="18" y1="4" x2="18" y2="32" stroke-width="1" stroke="#aeaeae"></line>',OrgChart.templates.luba.minus='<rect x="0" y="0" width="36" height="36" rx="12" ry="12" fill="#2E2E2E" stroke="#aeaeae" stroke-width="1"></rect><line x1="4" y1="18" x2="32" y2="18" stroke-width="1" stroke="#aeaeae"></line>',OrgChart.templates.luba.expandCollapseSize=36,OrgChart.templates.isla=Object.assign({},OrgChart.templates.ana),OrgChart.templates.isla.defs='<filter x="-50%" y="-50%" width="200%" height="200%" filterUnits="objectBoundingBox" id="isla-shadow"><feOffset dx="0" dy="4" in="SourceAlpha" result="shadowOffsetOuter1" /><feGaussianBlur stdDeviation="10" in="shadowOffsetOuter1" result="shadowBlurOuter1" /><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0" in="shadowBlurOuter1" type="matrix" result="shadowMatrixOuter1" /><feMerge><feMergeNode in="shadowMatrixOuter1" /><feMergeNode in="SourceGraphic" /></feMerge></filter>',OrgChart.templates.isla.size=[180,120],OrgChart.templates.isla.padding=[70,1,60,1],OrgChart.templates.isla.node=function(e,i,o,a){return`<rect filter="url(#isla-shadow)" x="0" y="20" rx="10" ry="10" height="${e.h-20}" width="${e.w}" fill="#FFF" stroke-width="1" stroke="#039BE5" ></rect><rect x="25" y="${e.h-45}" rx="10" ry="10" height="20" width="${e.w-50}" fill="#039BE5" stroke-width="3" stroke="#039BE5"></rect><rect fill="#ffffff" stroke="#039BE5" stroke-width="1" x="${e.w/2-20}" y="0" rx="13" ry="13" width="40" height="40"></rect><circle stroke="#FFCA28" stroke-width="3" fill="none" cx="${e.w/2}" cy="12" r="8"></circle><path d="M${e.w/2-15},34 C${e.w/2-15},17 ${e.w/2+15},17 ${e.w/2+15},34" stroke="#FFCA28" stroke-width="3" fill="none"></path>`},OrgChart.templates.isla.field_0=function(e,i,o,a,s){return OrgChart.wrapText(s,`<text style="font-size: 12px;" fill="#fff" x="${e.w/2}" y="${e.h-30}" text-anchor="middle"></text>`,e.w-60,1)},OrgChart.templates.isla.field_1=function(e,i,o,a,s){return OrgChart.wrapText(s,`<text style="font-size: 13px;" fill="#039BE5" x="${e.w/2}" y="64" text-anchor="middle"></text>`,e.w-20,1)},OrgChart.templates.isla.img_0="",OrgChart.templates.isla.img_0=function(e,i,o,a,s){var l=OrgChart.randomId();return`<clipPath id="${l}"><rect filter="url(#isla-shadow)" fill="#ffffff" stroke="#039BE5" stroke-width="1" x="${e.w/2-20}" y="0" rx="13" ry="13" width="40" height="40"></rect></clipPath><image preserveAspectRatio="xMidYMid slice" clip-path="url(#${l})" xlink:href="${s}" x="${e.w/2-20}" y="0" width="40" height="40"></image>`},OrgChart.templates.isla.minus='<circle cx="15" cy="15" r="15" fill="#F57C00" stroke="#F57C00" stroke-width="1"></circle><line x1="8" y1="15" x2="22" y2="15" stroke-width="1" stroke="#ffffff"></line>',OrgChart.templates.isla.plus='<circle cx="15" cy="15" r="15" fill="#ffffff" stroke="#039BE5" stroke-width="1"></circle><line x1="4" y1="15" x2="26" y2="15" stroke-width="1" stroke="#039BE5"></line><line x1="15" y1="4" x2="15" y2="26" stroke-width="1" stroke="#039BE5"></line>',OrgChart.templates.isla.nodeMenuButton=function(e,i,o,a){return`<g transform="matrix(1,0,0,1,${e.w/2-7},45)"><rect x="-4" y="-10" fill="#000000" fill-opacity="0" width="22" height="22"></rect><circle cx="0" cy="0" r="2" fill="#F57C00"></circle><circle cx="7" cy="0" r="2" fill="#F57C00"></circle><circle cx="14" cy="0" r="2" fill="#F57C00"></circle></g>`},OrgChart.templates.isla.ripple={radius:0,color:"#F57C00",rect:{x:0,y:20,width:180,height:100}},OrgChart.templates.deborah=Object.assign({},OrgChart.templates.polina),OrgChart.templates.deborah.size=[150,150],OrgChart.templates.deborah.node=function(e,i,o,a){return`<rect x="0" y="0" height="${e.h}" width="${e.w}" fill="#039BE5" stroke-width="1" stroke="#686868" rx="15" ry="15"></rect>`},OrgChart.templates.deborah.img_0=function(e,i,o,a,s){var l=OrgChart.randomId();return`<clipPath id="${l}"><rect fill="#ffffff" stroke="#039BE5" stroke-width="1" x="5" y="5" rx="15" ry="15" width="${e.w-10}" height="${e.h-10}"></rect></clipPath><image preserveAspectRatio="xMidYMid slice" clip-path="url(#${l})" xlink:href="${s}" x="5" y="5" width="${e.w-10}" height="${e.h-10}"></image><rect x="3" y="5" height="30" width="${e.w-6}" fill="#039BE5" opacity="0.5" rx="3" ry="3"></rect><rect x="3" y="${e.h-35}" height="30" width="${e.w-6}" fill="#039BE5" opacity="0.5" rx="3" ry="3"></rect>`},OrgChart.templates.deborah.field_0=function(e,i,o,a,s){return OrgChart.wrapText(s,'<text style="font-size: 18px;" fill="#ffffff" x="15" y="25" text-anchor="start"></text>',e.w-25,1)},OrgChart.templates.deborah.field_1=function(e,i,o,a,s){return OrgChart.wrapText(s,`<text style="font-size: 11px;" fill="#ffffff" x="15" y="${e.h-15}" text-anchor="start"></text>`,e.w-45,1)},OrgChart.templates.deborah.nodeMenuButton=function(e,i,o,a){return`<g style="cursor:pointer;" transform="matrix(1,0,0,1,${e.w-25},${e.h-20})"><rect x="-4" y="-10" fill="#000000" fill-opacity="0" width="22" height="22"></rect><circle cx="0" cy="0" r="2" fill="#ffffff"></circle><circle cx="7" cy="0" r="2" fill="#ffffff"></circle><circle cx="14" cy="0" r="2" fill="#ffffff"></circle></g>`},OrgChart.templates.subLevel=Object.assign({},OrgChart.templates.base),OrgChart.templates.subLevel.size=[0,0],OrgChart.templates.subLevel.node="",OrgChart.templates.subLevel.plus="",OrgChart.templates.subLevel.minus="",OrgChart.templates.subLevel.nodeMenuButton="",OrgChart.templates.group_dotted_lines=Object.assign({},OrgChart.templates.group),OrgChart.templates.group_dotted_lines.size=[250,120],OrgChart.templates.group_dotted_lines.padding=[50,20,35,20],OrgChart.templates.group_dotted_lines.link='<path stroke-linejoin="round" stroke="#aeaeae" stroke-width="1px" fill="none" d="{rounded}" />',OrgChart.templates.group_dotted_lines.node='<rect rx="5" ry="5" x="0" y="0" height="{h}" width="{w}" fill="#e5e5e5" stroke-width="0"></rect>',OrgChart.templates.group_dotted_lines.nodeGroupDottedCloseButton='<g transform="matrix(1,0,0,1,{ew},0)"><circle cx="0.5" cy="21.5" r="12" fill="#F57C00"></circle>'+OrgChart.icon.close(25,25,"#fff",-13,8)+"</g>",OrgChart.templates.group_dotted_lines.field_0='<text data-width="230" style="font-size: 18px;" fill="#F57C00" x="20" y="30" text-anchor="start">Dotted Lines</text>',OrgChart.templates.group_dotted_lines.field_1="",OrgChart.templates.group_dotted_lines.img_0="",OrgChart.templates.group_dotted_lines.ripple.radius=5,OrgChart.templates.group_dotted_lines.min=Object.assign({},OrgChart.templates.olivia),OrgChart.templates.group_dotted_lines.min.nodeGroupDottedOpenButton='<g transform="matrix(1,0,0,1,220,10)"><rect x="0" y="0" width="22" height="22" stroke="#aeaeae" stroke-width="1" fill="#ffffff" rx="5" ry="5"></rect><text x="11" y="16" text-anchor="middle" style="font-size: 14px;" fill="#2A292E">{children-total-count}</text><rect x="0" y="0" width="22" height="22" style="opacity: 0" stroke="#aeaeae" stroke-width="1" fill="red" rx="5" ry="5"></rect></g>',OrgChart.templates.clara=Object.assign({},OrgChart.templates.ana),OrgChart.templates.clara.size=[180,210],OrgChart.templates.clara.padding=[80,7,7,7],OrgChart.templates.clara.img_0=function(e,i,o,a,s){var l=50,c=30,d=40;e.stChildren.length||(d=60,l=e.w/2,c=70);var h=OrgChart.randomId();return`<clipPath id="${h}"><circle cx="${l}" cy="${c}" r="${d}"></circle></clipPath><image preserveAspectRatio="xMidYMid slice" clip-path="url(#${h})" xlink:href="${s}" x="${l-d}" y="${c-d}" width="${2*d}" height="${2*d}" ></image>`},OrgChart.templates.clara.treeListMaxHeight=387,OrgChart.templates.clara.field_0=function(e,i,o,a,s){var l=65,c=e.w/2,d="middle",h=e.w-100;return e.stChildren.length||(d="middle",c=e.w/2,l=160,h=e.w-20),OrgChart.wrapText(s,`<text style="font-size: 20px;" fill="#ffffff" x="${c}" y="${l}" text-anchor="${d}"></text>`,h,1)},OrgChart.templates.clara.field_1=function(e,i,o,a,s){var l=35,c=e.w-15,d="end",h=e.w-100;return e.stChildren.length||(d="middle",c=e.w/2,l=180,h=e.w-20),OrgChart.wrapText(s,`<text style="font-size: 14px;" fill="#ffffff" x="${c}" y="${l}" text-anchor="${d}"></text>`,h,1)},OrgChart.templates.clara.nodeMenuButton=function(e,i,o,a){return`<g style="cursor:pointer;" transform="matrix(1,0,0,1, ${e.w-35}, 2)">\n <rect x="0" y="0" fill="red" style="opacity: 0;" width="26" height="26"></rect>\n <circle cy="13" cx="6" r="2" fill="#fff"></circle>\n <circle cy="13" cx="13" r="2" fill="#fff"></circle>\n <circle cy="13" cx="20" r="2" fill="#fff"></circle>\n </g>`},OrgChart.templates.clara.node=function(e,i,o,a){return`<rect x="0" y="0" height="${e.h}" width="${e.w}" fill="#039BE5" stroke-width="1" stroke="#aeaeae" rx="10" ry="10"></rect>`},OrgChart.templates.treeListItem=Object.assign({},OrgChart.templates.ana),OrgChart.templates.treeListItem.size=[350,60],OrgChart.templates.treeListItem.field_0=function(e,i,o,a,s){var l=e.level*o.expandCollapseSize+45,c="dark"==a.mode?"#ccc":"#757575";return OrgChart.wrapText(s,`<text fill="${c}" x="${l}" y="27" style="font-size:16px;"></text>`,e.w-l-70,1)},OrgChart.templates.treeListItem.field_1=function(e,i,o,a,s){var l=e.level*o.expandCollapseSize+45,c="dark"==a.mode?"#ccc":"#757575";return OrgChart.wrapText(s,`<text fill="${c}" x="${l}" y="47" style="font-size:12px;"></text>`,e.w-l-70,1)},OrgChart.templates.treeListItem.img_0=function(e,i,o,a,s){var l=e.w-55,c=e.h/2,d=e.h/2-4,h=OrgChart.randomId();return`<clipPath id="${h}"><circle cx="${l}" cy="${c}" r="${d}"></circle></clipPath><image preserveAspectRatio="xMidYMid slice" clip-path="url(#${h})" xlink:href="${s}" x="${l-d}" y="${c-d}" width="${2*d}" height="${2*d}" ></image>`},OrgChart.templates.treeListItem.expandCollapseSize=24,OrgChart.templates.treeListItem.plus=function(e,i,o,a){var s=o.expandCollapseSize/2+e.level*o.expandCollapseSize,l=e.h/2;l-=o.expandCollapseSize/2;var c="dark"==a.mode?"#ccc":"#757575";return`<g transform="matrix(1,0,0,1,${s},${l})"><text x="6" style="font-size: 10px;" fill="${c}" y="15.5" text-anchor="end">${e.deepCollapsedChildCount}</text><path fill="${c}" d="M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z" /><rect style="opacity: 0" x="-3" y="-3" width="30" height="30"></rect></g>`},OrgChart.templates.treeListItem.minus=function(e,i,o,a){var s=o.expandCollapseSize/2+e.level*o.expandCollapseSize,l=e.h/2;return`<g transform="matrix(1,0,0,1,${s},${l-=o.expandCollapseSize/2})"><path fill="${"dark"==a.mode?"#ccc":"#757575"}" d="M7.42,8.59L12,13.17L16.59,8.59L18,10L12,16L6,10L7.42,8.59Z" /><rect style="opacity: 0" x="-3" y="-3" width="30" height="30"></rect></g>`},OrgChart.templates.treeListItem.nodeMenuButton=function(e,i,o,a){var s="dark"==a.mode?"#ccc":"#757575";return`<g style="cursor:pointer;" transform="matrix(1,0,0,1, ${e.w-36}, ${e.h/2-13})">\n <rect x="0" y="0" fill="red" style="opacity: 0;" width="26" height="26"></rect>\n <circle cx="13" cy="6" r="2" fill="${s}"></circle>\n <circle cx="13" cy="13" r="2" fill="${s}"></circle>\n <circle cx="13" cy="20" r="2" fill="${s}"></circle>\n </g>`},OrgChart.templates.treeListItem.node=function(e,i,o,a){var s="",l="#FFFFFF";if(e.isTreeListItem&&!e.stParent||e.isTreeListItem&&e.stParent&&e.stParent.stChildren[0]!=e){var c="#E0E0E0";"dark"==a.mode&&(c="#444444"),s=`<line stroke="${c}" stroke-width="1" x1="0" x2="${e.w}" y1="0" y2="0"></line>`}return"dark"==a.mode&&(l="#252526"),`<rect fill="${l}" x="0" y="0" height="${e.h}" width="${e.w}" rx="0" ry="0" ></rect>${s}`},OrgChart.ui={_defsIds:{},defs:function(e){var i="";for(var o in OrgChart.templates){var a=OrgChart.templates[o];a.defs&&(OrgChart.ui._defsIds[o]=OrgChart.randomId(),i+=a.defs.replaceAll("{randId}",OrgChart.ui._defsIds[o]))}return"<defs>"+i+e+"</defs>"},lonely:function(e){return e.nodes&&e.nodes.length?"":OrgChart.IT_IS_LONELY_HERE.replace("{link}",OrgChart.RES.IT_IS_LONELY_HERE_LINK)},pointer:function(e,i,o){if(i===OrgChart.action.exporting)return"";var a=OrgChart.t(e.template,!1,o).pointer;return a||(a=""),a},aiButton:function(e){return e.enableAI?'<div data-boc-ai-button class="boc-ai-button">AI</div>':""},node:function(e,i,o,a,s,l,c,d,h,p,u){var f=OrgChart.t(e.templateName,e.min,h),g="";"function"==typeof f.node?g=f.node(e,i,f,a):OrgChart.isNEU(f.node)||(g=f.node)&&(g=g.replaceAll("{w}",e.w).replaceAll("{h}",e.h)),f.defs&&(g=g.replaceAll("{randId}",OrgChart.ui._defsIds[e.templateName])),null==c&&(c=a.nodeBinding);var m={node:e,data:i};for(var b in c){var x,v=c[b];i&&(x=i[v]),null==x&&(x=e[v]),m.element=f[b],m.value=x;var y=!1;"function"==typeof m.element&&(y=!0,m.element=m.element(e,i,f,a,m.value));var _=OrgChart._lblIsImg(a,b);if(m.name=v,m.field=b,!1!==OrgChart.events.publish("field",[p,m])&&null!=m.value&&null!=m.value&&null!=m.element)if(y)g+=m.element;else if(!_||_&&!OrgChart.isNEU(m.value)){if(!_&&"string"==typeof m.value){var w=m.element;w&&(w=w.replaceAll("{ew}",e.w-(e.padding?e.padding[1]:0)).replaceAll("{cw}",e.w/2)),m.value=OrgChart.wrapText(m.value,w)}var k=m.element.replace("{val}",m.value);g+=k=k.replaceAll("{ew}",e.w-(e.padding?e.padding[1]:0)).replaceAll("{cw}",e.w/2).replaceAll("{randId}",OrgChart.randomId()).replaceAll("{randId2}",OrgChart.randomId())}}var I=OrgChart._getPosition(o,e,s,l),S="node";Array.isArray(e.tags)&&e.tags.length&&(S+=" "+e.tags.join(" ")),e.layout&&(S+=" tree-layout"),u&&(S+=" treelist-pinned");var C="";e.lcn&&(C='lcn="'+e.lcn+'"');var L=OrgChart.nodeOpenTag.replace("{lcn}",C).replace("{id}",e.id).replace("{class}",S).replace("{sl}",e.sl).replace("{level}",e.level).replace("{x}",I.x).replace("{y}",I.y),A=OrgChart._getOpacity(o,e);return g=(L=L.replace("{opacity}",A))+(g+=OrgChart.ui.nodeBtns(a,e,i,d,f,p))+OrgChart.grCloseTag},nodeBtns:function(e,i,o,a,s,l){var c="";return null==e.nodeMenu||i.isSplit||a===OrgChart.action.exporting||("function"==typeof s.nodeMenuButton?c+=s.nodeMenuButton(i,o,s,e):OrgChart.isNEU(s.nodeMenuButton)||(c+=s.nodeMenuButton.replace("{id}",i.id).replace("{cw}",i.w/2).replace("{ch}",i.h/2).replace("{ew}",i.w-(i.padding?i.padding[1]:0)).replace("{eh}",i.h-(i.padding?i.padding[2]:0)))),c&&(c=`<g style="cursor:pointer;" ${OrgChart.attr.control_node_menu_id}="${i.id}">${c}</g>`),null==e.nodeCircleMenu||i.isSplit||a===OrgChart.action.exporting||OrgChart.isNEU(s.nodeCircleMenuButton)||(c+='<g style="cursor:pointer;" transform="matrix(1,0,0,1,'+s.nodeCircleMenuButton.x+","+s.nodeCircleMenuButton.y+')" '+OrgChart.attr.control_node_circle_menu_id+'="'+i.id+'"><circle cx="0" cy="0" fill="'+s.nodeCircleMenuButton.color+'" r="'+s.nodeCircleMenuButton.radius+'" stroke-width="1" stroke="'+s.nodeCircleMenuButton.stroke+'"></circle><line x1="-'+s.nodeCircleMenuButton.radius/2+'" y1="-6" x2="'+s.nodeCircleMenuButton.radius/2+'" y2="-6" stroke-width="2" stroke="'+s.nodeCircleMenuButton.stroke+'"></line><line x1="-'+s.nodeCircleMenuButton.radius/2+'" y1="0" x2="'+s.nodeCircleMenuButton.radius/2+'" y2="0" stroke-width="2" stroke="'+s.nodeCircleMenuButton.stroke+'"></line><line x1="-'+s.nodeCircleMenuButton.radius/2+'" y1="6" x2="'+s.nodeCircleMenuButton.radius/2+'" y2="6" stroke-width="2" stroke="'+s.nodeCircleMenuButton.stroke+'"></line></g>'),c},expandCollapseBtn:function(e,i,o,a,s,l,c){var d="";if(l!==OrgChart.action.exporting&&!i.isSplit){var h=s[i.lcn?i.lcn:"base"],p=OrgChart.t(i.templateName,i.min,c);if(i.childrenIds.length>0){if(i.hasPartners){for(var u=!1,f=0;f<i.childrenIds.length;f++){var g=e.getNode(i.childrenIds[f]);!g||g.parentPartner||g.isPartner||(u=!0)}if(!u)return""}var m=OrgChart._getDefailtPositionForExpandCollpase(h,i),b={x:m.x+i.x-p.expandCollapseSize/2,y:m.y+i.y-p.expandCollapseSize/2},x=e.getCollapsedIds(i);x.length?("function"==typeof p.plus?(d+=OrgChart.expcollOpenTag.replace("{id}",i.id).replace("{x}",i.x).replace("{y}",i.y),d+=p.plus(i,o,p,a,m)):(d+=OrgChart.expcollOpenTag.replace("{id}",i.id).replace("{x}",b.x).replace("{y}",b.y),d+=p.plus),d+=OrgChart.grCloseTag):("function"==typeof p.minus?(d+=OrgChart.expcollOpenTag.replace("{id}",i.id).replace("{x}",i.x).replace("{y}",i.y),d+=p.minus(i,o,p,a,m)):(d+=OrgChart.expcollOpenTag.replace("{id}",i.id).replace("{x}",b.x).replace("{y}",b.y),d+=p.minus),d+=OrgChart.grCloseTag),(x.length&&"function"!=typeof p.plus||!x.length&&"function"!=typeof p.minus)&&(-1!=d.indexOf("{collapsed-children-count}")&&(d=d.replace("{collapsed-children-count}",i.collapsedChildCount)),-1!=d.indexOf("{collapsed-children-total-count}")&&(d=d.replace("{collapsed-children-total-count}",i.deepCollapsedChildCount)),-1!=d.indexOf("{children-count}")&&(d=d.replace("{children-count}",i.childCount)),-1!=d.indexOf("{children-total-count}")&&(d=d.replace("{children-total-count}",i.deepChildCount)))}e._nodeHasHiddenParent(i)&&(d+=OrgChart.upOpenTag.replace("{id}",i.id).replace("{x}",i.x).replace("{y}",i.y),d+=p.up,d+=OrgChart.grCloseTag)}var v={html:d,node:i};return OrgChart.events.publish("renderbuttons",[e,v]),v.html},link:function(e,i,o,a,s,l,c){var d=e.lcn?e.lcn:"base",h=i._layoutConfigs[d],p=OrgChart.t(e.templateName,e.min,o),u=[],f=[],g=h.levelSeparation/2;e.layout>0&&(g=h.mixedHierarchyNodesSeparation/2);var m=0,b=OrgChart.getRootOf(e).id,x=a[b][e.sl],v=void 0;if(e.hasPartners){v={ids:[],indexes:{},ppnodes:{},lastLeft:null,firstRight:null,maxSidePartnersWithChildren:0,rightIds:[],leftIds:[],partnerChildrenSplitSeparation:i.config.partnerChildrenSplitSeparation};for(var y=0;y<e.children.length;y++){(w=e.children[y]).parentPartner?(v.ppnodes[w.id]=w.parentPartner,v.ids.push(w.id),1==w.parentPartner.isPartner?(-1==v.rightIds.indexOf(w.parentPartner.id)&&v.rightIds.push(w.parentPartner.id),v.indexes[w.id]=v.rightIds.indexOf(w.parentPartner.id),v.firstRight||(v.firstRight=w)):2==w.parentPartner.isPartner&&(-1==v.leftIds.indexOf(w.parentPartner.id)&&v.leftIds.push(w.parentPartner.id),v.indexes[w.id]=v.leftIds.indexOf(w.parentPartner.id),v.lastLeft=w)):w.isPartner||(v.lastLeft=w,v.firstRight||(v.firstRight=w))}v.maxSidePartnersWithChildren=Math.max(v.leftIds.length,v.rightIds.length),m=0==v.maxSidePartnersWithChildren?i.config.minPartnerSeparation/2:i.config.minPartnerSeparation/2+v.partnerChildrenSplitSeparation*v.maxSidePartnersWithChildren+v.partnerChildrenSplitSeparation/2}for(y=0;y<e.children.length;y++){var _,w=e.children[y],k=a[b][w.sl],I={xa:0,ya:0,xb:0,yb:0,xc:0,yc:0,xd:0,yd:0,x:0,y:0,rotate:0},S=(p=OrgChart.t(w.templateName,w.min,o)).link;if(w.isChildOfPartner)switch(h.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:var C=1==w.layout?void 0:k.minY-(k.minY-x.maxY)/2;I=OrgChart.ui._linkTopToBottom(w.parentPartner,w,p,g,C,i);break;case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:C=1==w.layout?void 0:k.maxY-(k.maxY-x.minY)/2;I=OrgChart.ui._linkBottomToTop(w.parentPartner,w,p,g,C,i);break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:C=1==w.layout?void 0:k.maxX-(k.maxX-x.minX)/2;I=OrgChart.ui._linkRightToLeft(w.parentPartner,w,p,g,C,i);break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:C=1==w.layout?void 0:k.minX-(k.minX-x.maxX)/2;I=OrgChart.ui._linkLeftToRight(w.parentPartner,w,p,g,C,i)}else if(v&&-1!=v.ids.indexOf(w.id))switch(h.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:I=OrgChart.ui._linkPpTop(v,e,w,k,x,p);break;case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:I=OrgChart.ui._linkPpBottom(v,e,w,k,x,p);break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:I=OrgChart.ui._linkPpRight(v,e,w,k,x,p);break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:I=OrgChart.ui._linkPpLeft(v,e,w,k,x,p)}else{var L=w.isAssistant&&w.rightNeighbor&&w.rightNeighbor.isAssistant&&w.parent==w.rightNeighbor.parent,A=w.isAssistant&&w.leftNeighbor&&w.leftNeighbor.isAssistant&&w.parent==w.leftNeighbor.parent;if((L||w.layout>1)&&w.rightNeighbor&&w.rightNeighbor.isSplit)switch(h.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:I=OrgChart.ui._linkRightToLeft(w.rightNeighbor,w,p,g);break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:case OrgChart.orientation.left:case OrgChart.orientation.left_top:I=OrgChart.ui._linkBottomToTop(w.rightNeighbor,w,p,g)}else if((A||w.layout>1)&&w.leftNeighbor&&w.leftNeighbor.isSplit)switch(h.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:I=OrgChart.ui._linkLeftToRight(w.leftNeighbor,w,p,g,i);break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:case OrgChart.orientation.left:case OrgChart.orientation.left_top:I=OrgChart.ui._linkTopToBottom(w.leftNeighbor,w,p,g,i)}else switch(h.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:if(1==w.isPartner)I=OrgChart.ui._linkLeftToRight(e,w,p,m);else if(2==w.isPartner)I=OrgChart.ui._linkRightToLeft(e,w,p,m);else{C=1==w.layout?void 0:k.minY-(k.minY-x.maxY)/2;I=OrgChart.ui._linkTopToBottom(e,w,p,g,C,i)}break;case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:if(1==w.isPartner)I=OrgChart.ui._linkLeftToRight(e,w,p,m);else if(2==w.isPartner)I=OrgChart.ui._linkRightToLeft(e,w,p,m);else{C=1==w.layout?void 0:k.maxY-(k.maxY-x.minY)/2;I=OrgChart.ui._linkBottomToTop(e,w,p,g,C,i)}break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:if(1==w.isPartner)I=OrgChart.ui._linkTopToBottom(e,w,p,m);else if(2==w.isPartner)I=OrgChart.ui._linkBottomToTop(e,w,p,m);else{C=1==w.layout?void 0:k.maxX-(k.maxX-x.minX)/2;I=OrgChart.ui._linkRightToLeft(e,w,p,g,C,i)}break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:if(1==w.isPartner)I=OrgChart.ui._linkTopToBottom(e,w,p,m);else if(2==w.isPartner)I=OrgChart.ui._linkBottomToTop(e,w,p,m);else{C=1==w.layout?void 0:k.minX-(k.minX-x.maxX)/2;I=OrgChart.ui._linkLeftToRight(e,w,p,g,C,i)}}}var E=OrgChart.ui._draggableLinkPath(i,e,w,I,g,h.orientation);if(E)_=E,S=S.replaceAll("{rounded}",E).replaceAll("{edge}",E).replaceAll("{curve}",_);else if(-1!=S.indexOf("{rounded}"))if(I.xa==I.xb&&I.xa==I.xc&&I.xa==I.xd||I.ya==I.yb&&I.ya==I.yc&&I.ya==I.yd)_="M"+I.xa+","+I.ya+" L"+I.xd+","+I.yd,S=S.replaceAll("{rounded}",_);else if(Math.abs(I.xa-I.xd)<=OrgChart.LINK_ROUNDED_CORNERS&&Math.abs(I.xa-I.xc)<=OrgChart.LINK_ROUNDED_CORNERS&&Math.abs(I.xa-I.xb)<=OrgChart.LINK_ROUNDED_CORNERS)_="M"+I.xa+","+I.ya+" L"+I.xa+","+I.yd,S=S.replaceAll("{rounded}",_);else if(Math.abs(I.ya-I.yd)<=OrgChart.LINK_ROUNDED_CORNERS&&Math.abs(I.ya-I.yc)<=OrgChart.LINK_ROUNDED_CORNERS&&Math.abs(I.ya-I.yb)<=OrgChart.LINK_ROUNDED_CORNERS)_="M"+I.xa+","+I.ya+" L"+I.xd+","+I.ya,S=S.replaceAll("{rounded}",_);else{var N=OrgChart.ui._roundedEdge(I.xa,I.ya,I.xb,I.yb,I.xc,I.yc),$=OrgChart.ui._roundedEdge(I.xb,I.yb,I.xc,I.yc,I.xd,I.yd);_="M"+N.x1+","+N.y1+" "+N.x2+","+N.y2+" Q"+N.qx1+","+N.qy1+" "+N.qx2+","+N.qy2+" L"+$.x2+","+$.y2+" Q"+$.qx1+","+$.qy1+" "+$.qx2+","+$.qy2+" L"+$.x3+","+$.y3,S=S.replaceAll("{rounded}",_)}else-1!=S.indexOf("{edge}")?(_="M"+I.xa+","+I.ya+" "+I.xb+","+I.yb+" "+I.xc+","+I.yc+" L"+I.xd+","+I.yd,S=S.replaceAll("{edge}",_)):-1!=S.indexOf("{curve}")?(_="M"+I.xa+","+I.ya+" C"+I.xb+","+I.yb+" "+I.xc+","+I.yc+" "+I.xd+","+I.yd,S=S.replaceAll("{curve}",_)):(_=S.replaceAll("{xa}",I.xa).replaceAll("{ya}",I.ya).replaceAll("{xb}",I.xb).replaceAll("{yb}",I.yb).replaceAll("{xc}",I.xc).replaceAll("{yc}",I.yc).replaceAll("{xd}",I.xd).replaceAll("{yd}",I.yd),S=_);u.push(OrgChart.linkOpenTag.replaceAll("{id}",e.id).replaceAll("{class}","link "+w.tags.join(" ")).replaceAll("{child-id}",w.id));var M={node:e,cnode:w,p:I,html:S,action:l};OrgChart.events.publish("render-link",[i,M]),u.push(M.html),c&&f.push({id:e.id,childId:w.id,html:M.html});var T="";for(var P in i.config.linkBinding){var U=i.config.linkBinding[P],O=i._get(w.id);O&&(M.value=O[U],M.element=p[P],M.name=U,!1!==OrgChart.events.publish("label",[i,M])&&(OrgChart.isNEU(M.value)||OrgChart.isNEU(M.element)||(T+=M.element.replace("{val}",M.value))))}if(""!=T){var R=I.x,B=I.y;null!=w.movey&&(B+=w.movey),T=OrgChart.linkFieldsOpenTag.replace("{x}",R).replace("{y}",B).replace("{rotate}",0)+T+OrgChart.grCloseTag,u.push(T)}u.push(OrgChart.grCloseTag)}return c?f:u.join("")},svg:function(e,i,o,a,s,l){return OrgChart.t(a.template,!1,l).svg.replace("{w}",e).replace("{h}",i).replace("{viewBox}",o).replace("{randId}",OrgChart.ui._defsIds[a.template]).replace("{mode}",a.mode).replace("{template}",a.template).replace("{content}",function(){return s})},menuButton:function(e){return null==e.menu?"":OrgChart.t(e.template,!1).menuButton.replaceAll("{p}",e.padding)},_roundedEdge:function(e,i,o,a,s,l){var c,d,h,p=OrgChart.LINK_ROUNDED_CORNERS,u=0;return e==o&&e==s||i==a&&i==l?(c=h=o,d=u=a):(e!=s&&o==s&&(c=h=o,d=a,i<l?u=a+p:i>l&&(u=a-p)),e<s&&o==s?o-=p:e>s&&o==s&&(o+=p),i!=l&&a==l&&(c=o,d=u=a,e<s?h=o+p:e>s&&(h=o-p)),i<l&&a==l?a-=p:i>l&&a==l&&(a+=p)),{x1:e,y1:i,x2:o,y2:a,x3:s,y3:l,qx1:c,qy1:d,qx2:h,qy2:u}},_linkTopToBottom:function(e,i,o,a,s,l){var c,d,h,p,u,f=0;c=e.x+e.w/2+o.linkAdjuster.toX,d=e.y+e.h+o.linkAdjuster.toY,p=h=i.x+i.w/2+o.linkAdjuster.fromX,u=i.y+o.linkAdjuster.fromY;var g={xa:c,ya:d,xb:c,yb:f=e.rightNeighbor&&e.rightNeighbor.isAssistant&&"split"==i.templateName?e.rightNeighbor.y+e.rightNeighbor.h+a:"split"==e.templateName&&(i.isAssistant||i.layout>1)?u:"split"==i.templateName?d+a:null!=s?s:u-a,xc:h,yc:f,xd:p,yd:u,x:h,y:OrgChart.isNEU(i.parentPartner)?f+16:f,rotate:0};return l&&OrgChart._addConnectorLines(l._connectorLines,g),g},_linkBottomToTop:function(e,i,o,a,s,l){var c,d,h,p,u,f=0;c=e.x+e.w/2+o.linkAdjuster.toX,d=e.y+o.linkAdjuster.toY,p=h=i.x+i.w/2+o.linkAdjuster.fromX,u=i.y+i.h+o.linkAdjuster.fromY;var g={xa:c,ya:d,xb:c,yb:f=e.rightNeighbor&&e.rightNeighbor.isAssistant&&"split"==i.templateName?e.rightNeighbor.y-a:"split"==e.templateName&&(i.isAssistant||i.layout>1)?u:"split"==i.templateName?d-a:null!=s?s:u+a,xc:h,yc:f,xd:p,yd:u,x:h,y:f-14,rotate:0};return l&&OrgChart._addConnectorLines(l._connectorLines,g),g},_linkRightToLeft:function(e,i,o,a,s,l){var c,d,h,p,u,f,g=0;c=e.x+o.linkAdjuster.toX,d=e.y+e.h/2+o.linkAdjuster.toY,u=i.x+i.w+o.linkAdjuster.fromX,f=p=i.y+i.h/2+o.linkAdjuster.fromY,h=d;var m={xa:c,ya:d,xb:g=e.rightNeighbor&&e.rightNeighbor.isAssistant&&"split"==i.templateName?e.rightNeighbor.x-a:"split"==e.templateName&&(i.isAssistant||i.layout>1)?u:"split"==i.templateName?c-a:null!=s?s:u+a,yb:h,xc:g,yc:p,xd:u,yd:f,x:g-16,y:p,rotate:90};return l&&OrgChart._addConnectorLines(l._connectorLines,m),m},_linkLeftToRight:function(e,i,o,a,s,l){var c,d,h,p,u,f,g=0;c=e.x+e.w+o.linkAdjuster.toX,d=e.y+e.h/2+o.linkAdjuster.toY,u=i.x+o.linkAdjuster.fromX,f=p=i.y+i.h/2+o.linkAdjuster.fromY,h=d;var m={xa:c,ya:d,xb:g=e.rightNeighbor&&e.rightNeighbor.isAssistant&&"split"==i.templateName?e.rightNeighbor.x+e.rightNeighbor.w+a:"split"==e.templateName&&(i.isAssistant||i.layout>1)?u:"split"==i.templateName?c+a:null!=s?s:u-a,yb:h,xc:g,yc:p,xd:u,yd:f,x:g+14,y:p,rotate:270};return l&&OrgChart._addConnectorLines(l._connectorLines,m),m},_linkPpTop:function(e,i,o,a,s,l){var c=e.ppnodes[o.id],d=c.y+c.h/2,h=a.minY-(a.minY-s.maxY)/2,p=(a.minY-s.maxY)/e.maxSidePartnersWithChildren/4,u=OrgChart.ui.__linkPpBottomTop(e,i,o,h,p,c),f=u.x;return h=u.mid,OrgChart.ui._linkTopToBottom({x:f,y:d,w:0,h:0},o,l,0,h)},_linkPpBottom:function(e,i,o,a,s,l){var c=e.ppnodes[o.id],d=c.y+c.h/2,h=a.maxY-(a.maxY-s.minY)/2,p=(a.maxY-s.minY)/e.maxSidePartnersWithChildren/4,u=OrgChart.ui.__linkPpBottomTop(e,i,o,h,p,c),f=u.x;return h=u.mid,OrgChart.ui._linkBottomToTop({x:f,y:d,w:0,h:0},o,l,0,h)},_linkPpLeft:function(e,i,o,a,s,l){var c=e.ppnodes[o.id],d=a.minX-(a.minX-s.maxX)/2,h=(a.minX-s.maxX)/e.maxSidePartnersWithChildren/4,p=c.x+c.w/2,u=OrgChart.ui.__linkPpLeftRight(e,i,o,d,h,c),f=u.y;return d=u.mid,OrgChart.ui._linkLeftToRight({x:p,y:f,w:0,h:0},o,l,0,d)},_linkPpRight:function(e,i,o,a,s,l){var c=e.ppnodes[o.id],d=a.maxX-(a.maxX-s.minX)/2,h=(a.maxX-s.minX)/e.maxSidePartnersWithChildren/4,p=c.x+c.w/2,u=OrgChart.ui.__linkPpLeftRight(e,i,o,d,h,c),f=u.y;return d=u.mid,OrgChart.ui._linkRightToLeft({x:p,y:f,w:0,h:0},o,l,0,d)},__linkPpBottomTop:function(e,i,o,a,s,l){var c=0;return 1==l.isPartner?(c=l.x-i.partnerSeparation/2+e.indexes[o.id]*e.partnerChildrenSplitSeparation-(e.rightIds.length-1)*e.partnerChildrenSplitSeparation/2,e.lastLeft&&c<e.lastLeft.x+e.lastLeft.w/2?c<o.x+o.w/2?a-=(e.indexes[o.id]+1)*s:a-=(e.rightIds.length-e.indexes[o.id])*s:c<o.x+o.w/2?a+=(e.rightIds.length-e.indexes[o.id])*s:a+=(e.indexes[o.id]+1)*s):2==l.isPartner&&(c=l.x+l.w+i.partnerSeparation/2+e.indexes[o.id]*e.partnerChildrenSplitSeparation-(e.leftIds.length-1)*e.partnerChildrenSplitSeparation/2,e.firstRight&&c>e.firstRight.x+e.firstRight.w/2?c<o.x+o.w/2?a-=(e.indexes[o.id]+1)*s:a-=(e.leftIds.length-e.indexes[o.id])*s:c<o.x+o.w/2?a+=(e.leftIds.length-e.indexes[o.id])*s:a+=(e.indexes[o.id]+1)*s),{x:c,mid:a}},__linkPpLeftRight:function(e,i,o,a,s,l){var c=0;return 1==l.isPartner?(c=l.y-i.partnerSeparation/2+e.indexes[o.id]*e.partnerChildrenSplitSeparation-(e.rightIds.length-1)*e.partnerChildrenSplitSeparation/2,e.lastLeft&&c<e.lastLeft.y+e.lastLeft.h/2?c<o.y+o.h/2?a-=(e.indexes[o.id]+1)*s:a-=(e.rightIds.length-e.indexes[o.id])*s:c<o.y+o.h/2?a+=(e.rightIds.length-e.indexes[o.id])*s:a+=(e.indexes[o.id]+1)*s):2==l.isPartner&&(c=l.y+l.h+i.partnerSeparation/2+e.indexes[o.id]*e.partnerChildrenSplitSeparation-(e.leftIds.length-1)*e.partnerChildrenSplitSeparation/2,e.firstRight&&c>e.firstRight.y+e.firstRight.h/2?c<o.y+o.h/2?a-=(e.indexes[o.id]+1)*s:a-=(e.leftIds.length-e.indexes[o.id])*s:c<o.y+o.h/2?a+=(e.leftIds.length-e.indexes[o.id])*s:a+=(e.indexes[o.id]+1)*s),{y:c,mid:a}},_draggableLinkPath:function(e,i,o,a,s,l){if(o.isSubLevel)return null;if(i.isSubLevel)return null;if(o.leftNeighbor&&o.leftNeighbor.isSplit||o.rightNeighbor&&o.rightNeighbor.isSplit)return null;if(o.isPartner)return null;if(o.isAssistant)return null;if(OrgChart._isMoved(o)&&!OrgChart._isMoved(i)){var c=[];switch(l){case OrgChart.orientation.top:case OrgChart.orientation.top_left:if(a.yb+s/2<a.yd)return null;h=a.xa<a.xd?o.x-s/2:o.x+o.w+s/2,p=o.y-s/2;break;case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:if(a.yb-s/2>a.yd)return null;h=a.xa<a.xd?o.x-s/2:o.x+o.w+s/2,p=o.y+o.h+s/2;break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:if(a.xb-s/2>a.xd)return null;p=a.ya<a.yd?o.y-s/2:o.y+o.h+s/2,h=o.x+o.w+s/2;break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:if(a.xb+s/2<a.xd)return null;p=a.ya<a.yd?o.y-s/2:o.y+o.h+s/2,h=o.x-s/2}switch(l){case OrgChart.orientation.top:case OrgChart.orientation.top_left:case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:c.push(["M",a.xa,a.ya]),c.push(["L",a.xb,a.yb]),c.push(["L",h,a.yb]),c.push(["L",h,p]),c.push(["L",a.xd,p]),c.push(["L",a.xd,a.yd]);break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:case OrgChart.orientation.left:case OrgChart.orientation.left_top:(c=[]).push(["M",a.xa,a.ya]),c.push(["L",a.xb,a.yb]),c.push(["L",a.xb,p]),c.push(["L",h,p]),c.push(["L",h,a.yd]),c.push(["L",a.xd,a.yd])}return OrgChart.roundPathCorners(c,OrgChart.LINK_ROUNDED_CORNERS,!1)}if(!OrgChart._isMoved(o)&&OrgChart._isMoved(i)){var d=!1;c=[];switch(l){case OrgChart.orientation.top:case OrgChart.orientation.top_left:if(a.ya+s/2>a.yb)d=!0,h=a.xa<a.xd?i.x+i.w+s/2:i.x-s/2,p=i.y+i.h+s;else{if(a.yb+s/2<a.yd)return null;h=a.xa<a.xd?o.x-s/2:o.x+o.w+s/2,p=o.y-s/2}break;case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:if(a.ya-s/2<a.yb)d=!0,h=a.xa<a.xd?i.x+i.w+s/2:i.x-s/2,p=i.y-s;else{if(a.yb-s/2>a.yd)return null;h=a.xa<a.xd?o.x-s/2:o.x+o.w+s/2,p=o.y+o.h+s/2}break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:if(a.xa-s/2<a.xb)d=!0,p=a.ya<a.yd?i.y+i.h+s/2:i.y-s/2,h=i.x-s;else{if(a.xb-s/2>a.xd)return null;p=a.ya<a.yd?o.y-s/2:o.y+o.h+s/2,h=o.x+o.w+s/2}break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:if(a.xa+s/2>a.xb)d=!0,p=a.ya<a.yd?i.y+i.h+s/2:i.y-s/2,h=i.x+i.w+s;else{if(a.xb+s/2<a.xd)return null;p=a.ya<a.yd?o.y-s/2:o.y+o.h+s/2,h=o.x-s/2}}if(d)switch(l){case OrgChart.orientation.top:case OrgChart.orientation.top_left:case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:c.push(["M",a.xa,a.ya]),c.push(["L",a.xa,p]),c.push(["L",h,p]),c.push(["L",h,a.yc]),c.push(["L",a.xc,a.yc]),c.push(["L",a.xd,a.yd]);break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:case OrgChart.orientation.left:case OrgChart.orientation.left_top:c.push(["M",a.xa,a.ya]),c.push(["L",h,a.ya]),c.push(["L",h,p]),c.push(["L",a.xc,p]),c.push(["L",a.xc,a.yc]),c.push(["L",a.xd,a.yd])}else switch(l){case OrgChart.orientation.top:case OrgChart.orientation.top_left:case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:c.push(["M",a.xa,a.ya]),c.push(["L",a.xb,a.yb]),c.push(["L",h,a.yb]),c.push(["L",h,p]),c.push(["L",a.xd,p]),c.push(["L",a.xd,a.yd]);break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:case OrgChart.orientation.left:case OrgChart.orientation.left_top:c.push(["M",a.xa,a.ya]),c.push(["L",a.xb,a.yb]),c.push(["L",a.xb,p]),c.push(["L",h,p]),c.push(["L",h,a.yd]),c.push(["L",a.xd,a.yd])}return OrgChart.roundPathCorners(c,OrgChart.LINK_ROUNDED_CORNERS,!1)}if(OrgChart._isMoved(o)&&OrgChart._isMoved(i)){c=[];switch(l){case OrgChart.orientation.top:case OrgChart.orientation.top_left:if(a.ya+s>a.yd){var h=a.xa<a.xd?i.x+i.w+s/2:i.x-s/2,p=i.y+i.h+s,u=o.y-s;c.push(["M",a.xa,a.ya]),c.push(["L",a.xa,p]),c.push(["L",h,p]),c.push(["L",h,u]),c.push(["L",a.xc,u]),c.push(["L",a.xd,a.yd])}else c.push(["M",a.xa,a.ya]),c.push(["L",a.xa,i.y+i.h+s]),c.push(["L",a.xc,i.y+i.h+s]),c.push(["L",a.xd,a.yd]);break;case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:if(a.ya-s<a.yd){h=a.xa<a.xd?i.x+i.w+s/2:i.x-s/2,p=i.y-s,u=o.y+o.h+s;c.push(["M",a.xa,a.ya]),c.push(["L",a.xa,p]),c.push(["L",h,p]),c.push(["L",h,u]),c.push(["L",a.xc,u]),c.push(["L",a.xd,a.yd])}else c.push(["M",a.xa,a.ya]),c.push(["L",a.xa,i.y-s]),c.push(["L",a.xc,i.y-s]),c.push(["L",a.xd,a.yd]);break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:if(a.xa-s<a.xd){p=a.ya<a.yd?i.y+i.h+s/2:i.y-s/2,h=i.x-s;var f=o.x+o.w+s;c.push(["M",a.xa,a.ya]),c.push(["L",h,a.ya]),c.push(["L",h,p]),c.push(["L",f,p]),c.push(["L",f,a.yc]),c.push(["L",a.xd,a.yd])}else c.push(["M",a.xa,a.ya]),c.push(["L",i.x-s,a.ya]),c.push(["L",i.x-s,a.yc]),c.push(["L",a.xd,a.yd]);break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:if(a.xa+s>a.xd){p=a.ya<a.yd?i.y+i.h+s/2:i.y-s/2,h=i.x+i.w+s,f=o.x-s;c.push(["M",a.xa,a.ya]),c.push(["L",h,a.ya]),c.push(["L",h,p]),c.push(["L",f,p]),c.push(["L",f,a.yc]),c.push(["L",a.xd,a.yd])}else c.push(["M",a.xa,a.ya]),c.push(["L",i.x+i.w+s,a.ya]),c.push(["L",i.x+i.w+s,a.yc]),c.push(["L",a.xd,a.yd])}return OrgChart.roundPathCorners(c,OrgChart.LINK_ROUNDED_CORNERS,!1)}return null}},void 0===OrgChart&&(OrgChart={}),OrgChart._validateConfig=function(e){return!!e||(console.error("config is not defined"),!1)},OrgChart._arrayContains=function(e,i){if(e&&Array.isArray(e))for(var o=e.length;o--;)if(e[o]===i)return!0;return!1},OrgChart._interceptions=function(e,i){if(!e)return[];if(!i)return[];var o=[];if(Array.isArray(e)&&Array.isArray(i))for(var a in e)for(var s in i)e[a]==i[s]&&o.push(e[a]);else if(Array.isArray(e)&&!Array.isArray(i))for(var a in e)for(var s in i)e[a]==s&&o.push(e[a]);else if(!Array.isArray(e)&&Array.isArray(i))for(var a in e)for(var s in i)a==i[s]&&o.push(i[s]);return o},OrgChart._getTags=function(e){return e.tags&&!Array.isArray(e.tags)?e.tags.split(","):e.tags&&Array.isArray(e.tags)?e.tags:[]},OrgChart._centerPointInPercent=function(e,i,o){var a=e.getBoundingClientRect(),s=i-a.left,l=o-a.top;return[s/(a.width/100),l/(a.height/100)]},OrgChart._trim=function(e){return e.replace(/^\s+|\s+$/g,"")},OrgChart._getTransform=function(e){var i=e.getAttribute("transform");return i=i.replace("matrix","").replace("(","").replace(")",""),OrgChart._browser().msie&&(i=i.replace(/ /g,",")),i="["+(i=OrgChart._trim(i))+"]",i=JSON.parse(i)},OrgChart.getScale=function(e,i,o,a,s,l,c,d){var h=1;if(e||a!==OrgChart.match.boundary&&a!==OrgChart.match.boundaryIfOutside)if(e||a!==OrgChart.match.width)if(e||a!==OrgChart.match.height)if(e){var p,u;h=(p=i/e[2])>(u=o/e[3])?u:p}else h=a;else h=o/d;else h=i/c;else h=(p=i/c)>(u=o/d)?u:p,a===OrgChart.match.boundaryIfOutside&&h>1&&(h=1);return h&&h>s&&(h=s),h&&h<l&&(h=l),h},OrgChart.isObject=function(e){return e&&"object"==typeof e&&!Array.isArray(e)&&null!==e&&e.constructor&&"object"==e.constructor.name.toLowerCase()},OrgChart.fileUploadDialog=function(e){var i=document.createElement("INPUT");i.setAttribute("type","file"),i.style.display="none",i.onchange=function(){var i=this.files[0];e(i)},document.body.appendChild(i),i.click()},OrgChart.mergeDeep=function(e,i){if(OrgChart.isObject(e)&&OrgChart.isObject(i))for(var o in i)OrgChart.isObject(i[o])?(e[o]||Object.assign(e,{[o]:{}}),OrgChart.mergeDeep(e[o],i[o])):Object.assign(e,{[o]:i[o]});return e},OrgChart._lblIsImg=function(e,i){return!(!e.nodeBinding||"string"!=typeof i||-1==i.indexOf("img")||!e.nodeBinding[i])},OrgChart._getFistImgField=function(e){if(e.nodeBinding)for(var i in e.nodeBinding)if(-1!=i.indexOf("img"))return e.nodeBinding[i];return!1},OrgChart._fieldIsImg=function(e,i){if(e.nodeBinding)for(var o in e.nodeBinding)if(e.nodeBinding[o]==i)return OrgChart._lblIsImg(e,o);return!1},OrgChart._guid=function(){function s4(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return s4()+s4()+"-"+s4()+"-"+s4()+"-"+s4()+"-"+s4()+s4()+s4()},OrgChart.htmlRipple=function(e){var i=document.createElement("style");i.type="text/css",i.innerHTML=" .boc-ripple-container {position: absolute; top: 0; right: 0; bottom: 0; left: 0; } .boc-ripple-container span {transform: scale(0);border-radius:100%;position:absolute;opacity:0.75;background-color:#fff;animation: boc-ripple 1000ms; }@-moz-keyframes boc-ripple {to {opacity: 0;transform: scale(2);}}@-webkit-keyframes boc-ripple {to {opacity: 0;transform: scale(2);}}@-o-keyframes boc-ripple {to {opacity: 0;transform: scale(2);}}@keyframes boc-ripple {to {opacity: 0;transform: scale(2);}}",document.head.appendChild(i);var o,a,s,l=document.createElement("div");l.className="boc-ripple-container",e.addEventListener("mousedown",function(i){var o,a,s,l=document.createElement("span"),c=this.offsetWidth;return o=this.getBoundingClientRect(),s=i.pageX-o.left-c/2,a="top:"+(i.pageY-o.top-c/2)+"px; left: "+s+"px; height: "+c+"px; width: "+c+"px;",e.rippleContainer.appendChild(l),l.setAttribute("style",a)}),e.addEventListener("mouseup",(o=function(){for(;this.rippleContainer.firstChild;)this.rippleContainer.removeChild(this.rippleContainer.firstChild)},a=2e3,s=void 0,function(){var e,i=this;return e=arguments,clearTimeout(s),s=setTimeout(function(){return o.apply(i,e)},a)})),e.rippleContainer=l,e.appendChild(l)},OrgChart._moveToBoundaryArea=function(e,i,o,a){var s=i.slice(0);i[0]<o.left&&i[0]<o.right&&(s[0]=o.left>o.right?o.right:o.left),i[0]>o.right&&i[0]>o.left&&(s[0]=o.left>o.right?o.left:o.right),i[1]<o.top&&i[1]<o.bottom&&(s[1]=o.top>o.bottom?o.bottom:o.top),i[1]>o.bottom&&i[1]>o.top&&(s[1]=o.top>o.bottom?o.top:o.bottom),i[0]!==s[0]||i[1]!==s[1]?OrgChart.animate(e,{viewBox:i},{viewBox:s},300,OrgChart.anim.outPow,function(){a&&a()}):a&&a()},OrgChart.randomId=function(){return"_"+("0000"+(Math.random()*Math.pow(36,4)|0).toString(36)).slice(-4)},OrgChart._getClientXY=function(e){return-1==e.type.indexOf("touch")?{x:e.clientX,y:e.clientY}:e.changedTouches.length?{x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY}:void 0},OrgChart._getClientTouchesXY=function(e,i){return-1!=e.type.indexOf("touch")?e.touches.length<i+1?{x:null,y:null}:{x:e.touches[i].clientX,y:e.touches[i].clientY}:{x:e.clientX,y:e.clientY}},OrgChart._getOffset=function(e,i){e&&(i.x+=e.offsetLeft,i.y+=e.offsetTop,OrgChart._getOffset(e.offsetParent,i))},OrgChart._getTopLeft=function(e){var i={x:0,y:0};return OrgChart._getOffset(e,i),i},OrgChart._getOffsetXY=function(e,i){if(-1==i.type.indexOf("touch"))return{x:i.offsetX,y:i.offsetY};if(i.touches.length){var o=OrgChart._getTopLeft(e);return{x:i.touches[0].pageX-o.x,y:i.touches[0].pageY-o.y}}if(i.changedTouches.length){o=OrgChart._getTopLeft(e);return isNaN(o.x)||isNaN(o.y)?{x:i.changedTouches[0].pageX,y:i.changedTouches[0].pageY}:{x:i.changedTouches[0].pageX-o.x,y:i.changedTouches[0].pageY-o.y}}},OrgChart._pinchMiddlePointInPercent=function(e,i,o,a){var s=OrgChart._getTopLeft(e),l=a.touches[0].pageX-s.x,c=a.touches[0].pageY-s.y,d=a.touches[1].pageX-s.x,h=a.touches[1].pageY-s.y;return[((l-d)/2+d)/(i/100),((c-h)/2+h)/(o/100)]},OrgChart._browser=function(){var e=!!window.opr&&!!window.opr.addons||!!window.opera||navigator.userAgent.indexOf(" OPR/")>=0,i="undefined"!=typeof InstallTrigger,o=/constructor/i.test(window.HTMLElement)||"[object SafariRemoteNotification]"===(!window.safari||void 0!==window.safari&&safari.pushNotification).toString(),a=!!document.documentMode,s=!a&&!!window.StyleMedia,l=!(!window.chrome||!window.chrome.webstore&&!window.chrome.runtime);return{opera:e,firefox:i,safari:o,msie:a,edge:s,chrome:l,blink:(l||e)&&!!window.CSS}},OrgChart._menuPosition=function(e,i,o){var a=e.getBoundingClientRect(),s=o.getBoundingClientRect(),l=i.getBoundingClientRect(),c=a.left-s.left,d=a.top-s.top;return a.top+l.height>s.top+s.height&&(d-=l.height),a.left-l.width<s.left&&(c+=l.width),{x:c,y:d}},OrgChart._getTemplate=function(e,i,o){if(Array.isArray(e))for(var a=0;a<e.length;a++){var s=i[e[a]];if(s&&s.template)return s.template}return o},OrgChart._getMin=function(e,i){if(e.tags&&e.tags.length&&i.tags)for(var o=0;o<e.tags.length;o++){var a=i.tags[e.tags[o]];if(a&&!0===a.min)return!0}return i.min},OrgChart._getSubLevels=function(e,i){if(e&&e.length)for(var o=0;o<e.length;o++){var a=i[e[o]];if(a&&a.subLevels)return a.subLevels}return 0},OrgChart._isHTML=function(e){var i=(new DOMParser).parseFromString(e,"text/html");return Array.from(i.body.childNodes).some(e=>1===e.nodeType)},OrgChart._getTestDiv=function(){var e=document.getElementById("orgchart_js_test_div");return e||((e=document.createElement("div")).id="orgchart_js_test_div",e.style.position="fixed",e.style.top="-10000px",e.style.left="-10000px",document.body.appendChild(e)),e},OrgChart._getLabelSize=function(e){var i=OrgChart._getTestDiv();return i.innerHTML="<svg>"+e+"</svg>",i.querySelector("text").getBoundingClientRect()},OrgChart.wrapText=function(e,i,o,a){if(null!=o&&null!=a)return OrgChart._lineClamp(i,e,o,a);var s=i,l=s.toLowerCase();if(-1==l.indexOf("<text"))return OrgChart._escapeHtml(e);if(-1==l.indexOf(OrgChart.attr.width))return OrgChart._escapeHtml(e);if(-1!=l.indexOf("foreignobject"))return OrgChart._escapeHtml(e);if(-1==s.indexOf(OrgChart.attr.width))return OrgChart._escapeHtml(e);if(OrgChart.ESCAPE_HTML&&"string"==typeof str&&OrgChart._isHTML(e))return OrgChart._escapeHtml(e);if(!OrgChart.ESCAPE_HTML&&OrgChart._isHTML(e))return e;var c=OrgChart._getTestDiv();s=s.replaceAll("{cw}",0),c.innerHTML="<svg>"+s+"</svg>";var d,h=(new DOMParser).parseFromString(s,"text/xml").getElementsByTagName("text")[0],p=parseFloat(h.getAttribute("x")),u=parseFloat(h.getAttribute("y")),f=h.getAttribute("text-anchor"),g=(o=h.getAttribute(OrgChart.attr.width),h.getAttribute(OrgChart.attr.text_overflow)),m="http://www.w3.org/2000/svg",b=c.getElementsByTagName("svg")[0].getElementsByTagName("text")[0];g||(g="ellipsis");var x=g.split("-");if(x.length>1&&(a=parseInt(g.split("-")[1]),x.length>2&&"ellipsis"==x[2]&&(d=!0)),!o)return OrgChart._escapeHtml(e);if(o=parseFloat(o),p||(p=0),u||(u=0),p||(f="start"),"ellipsis"==g){b.removeChild(b.firstChild),b.textContent=e;for(var v=b.getComputedTextLength(),y=2;v>o;)b.textContent=e.substring(0,e.length-y),b.textContent+="...",v=b.getComputedTextLength(),y++;return y>2?`<title>${OrgChart._escapeHtml(e)}</title>${b.textContent}`:OrgChart._escapeHtml(e)}if(-1!=g.indexOf("multiline")){var _=e.split(" "),w=b.getBBox().height;b.textContent="";var k=document.createElementNS(m,"tspan"),I=document.createTextNode(_[0]);k.setAttributeNS(null,"x",p),k.setAttributeNS(null,"y",u),k.setAttributeNS(null,"text-anchor",f),k.appendChild(I),b.appendChild(k);y=1;for(var S=1,C=!1,L=1;L<_.length;L++){var A=k.firstChild.data.length;if(k.firstChild.data+=" "+_[L],k.getComputedTextLength()>o){if(k.firstChild.data=k.firstChild.data.slice(0,A),S++,a&&S>a){if(d&&b.children.length==a){var E=b.children[a-1].textContent;b.children[a-1].textContent=E.substring(0,E.length-3)+"...",C=!0}break}(k=document.createElementNS(m,"tspan")).setAttributeNS(null,"x",p),k.setAttributeNS(null,"y",u+w*y),k.setAttributeNS(null,"text-anchor",f),I=document.createTextNode(_[L]),k.appendChild(I),b.appendChild(k),y++}}var N="";if(null!=b.innerHTML)N=b.innerHTML,b.innerHTML="";else{var $="";for(L=b.childNodes.length-1;L>=0;L--)$=XMLSerializer().serializeToString(b.childNodes[L])+$,b.removeChild(b.childNodes[L]);N=$}return C?`<title>${OrgChart._escapeHtml(e)}</title>${N}`:N}},OrgChart._downloadFile=function(e,i,o,a,s){var l=new Blob([i],{type:e});if(1==a){var c=URL.createObjectURL(l);window.open(c,"_blank").focus()}else if(navigator.msSaveBlob)navigator.msSaveBlob(l,o);else{var d=document.createElement("a");if(void 0!==d.download){c=URL.createObjectURL(l);d.setAttribute("href",c);var h=o;h.toLowerCase().endsWith(s.toLowerCase())||(h=h+"."+s),d.setAttribute("download",h),d.style.visibility="hidden",document.body.appendChild(d),d.click(),document.body.removeChild(d)}}},OrgChart._getPosition=function(e,i,o,a){var s={x:i.x,y:i.y};if(null!=o&&(s.x=o),null!=a&&(s.y=o),e&&3==e.length){var l=e[0].indexOf(i.id);-1!=l&&null!=e[1][l].transform&&(null==o&&(s.x=e[1][l].transform[4]),null==a&&(s.y=e[1][l].transform[5]))}return s},OrgChart._getOpacity=function(e,i){var o=1;if(e&&3==e.length){var a=e[0].indexOf(i.id);-1!=a&&null!=e[1][a].opacity&&(o=e[1][a].opacity)}return o},OrgChart.t=function(e,i,o){var a=OrgChart.templates[e];null==a&&console.error(`Template "${e}" does not exist!`);var s=null;if(null!=o&&a.scaleLessThen){var l=[];for(var c in a.scaleLessThen){var d=parseFloat(c);o<d&&l.push(d)}if(l.length>0){l.sort(function(e,i){return e-i});var h=a.scaleLessThen[l[0]];for(var p in h)null==s&&(s=Object.assign({},a)),s[p]=h[p]}}return i?null==s?a.min?a.min:a:s.min?s.min:s:null==s?a:s},OrgChart.setNodeSize=function(e){var i=OrgChart.t(e.templateName,e.min);e.w=i&&i.size?i.size[0]:0,e.h=i&&i.size?i.size[1]:0},OrgChart._imgs2base64=function(e,i,o,a){var s=e.getElementsByTagName(i),l=s.length;0==l&&a();for(var c=0;c<l;c++)(function(){var e=c,i=s[e];OrgChart._getDataUri(i.getAttribute(o),function(s){s.success&&i.setAttribute(o,s.result),e==l-1&&a()})})()},OrgChart._getDataUri=function(e,i){if(-1!=e.indexOf("base64"))i({success:!1});else{var o=new XMLHttpRequest;o.open("GET",e),o.responseType="blob",o.onload=function(){200===o.status?a.readAsDataURL(o.response):404===o.status&&i({success:!1,result:o.status})};var a=new FileReader;a.onloadend=function(){i({success:!0,result:a.result})},o.send()}},OrgChart._convertStringToArray=function(e,i){return-1!=OrgChart.ARRAY_FIELDS.indexOf(e)?OrgChart.isNEU(i)?[]:i.split(","):i},OrgChart._convertArrayToString=function(e){return!OrgChart.isNEU(e)&&Array.isArray(e)?e.join():e},OrgChart._csvToArray=function(e,i){i=i||OrgChart.CSV_DELIMITER;for(var o=new RegExp("(\\"+i+'|\\r?\\n|\\r|^)(?:"([^"]*(?:""[^"]*)*)"|([^"\\'+i+"\\r\\n]*))","gi"),a=[[]],s=null;s=o.exec(e);){var l,c=s[1];c.length&&c!==i&&a.push([]),l=s[2]?s[2].replace(new RegExp('""',"g"),'"'):s[3],a[a.length-1].push(l)}return a},OrgChart._json2xml=function(e){for(var i=document.implementation.createDocument("","",null),o=i.createElement("nodes"),a=0;a<e.length;a++){var s=i.createElement("node"),l=e[a];for(var c in l){var d=l[c];s.setAttribute(c,OrgChart._convertArrayToString(d))}o.appendChild(s)}return i.appendChild(o),'<?xml version="1.0" encoding="utf-8" ?>'+(new XMLSerializer).serializeToString(i.documentElement)},OrgChart._xml2json=function(e){for(var i=(new DOMParser).parseFromString(e,"text/xml").getElementsByTagName("node"),o=[],a=0;a<i.length;a++){for(var s=i[a],l={},c=0;c<s.attributes.length;c++){var d=s.attributes[c];l[d.name]=OrgChart._convertStringToArray(d.name,d.value)}o.push(l)}return o},OrgChart.convertNodesToCsv=function(e){return OrgChart._json2csv(e)},OrgChart._json2csv=function(e){for(var i=[],processNode=function(e){for(var o="",a=0;a<i.length;a++){var s;(s="reportsTo"==i[a]?null:null==e[i[a]]?"":e[i[a]])instanceof Date&&(s=s.toLocaleString());var l=(s=null===s?"":s.toString()).replace(/"/g,'""'),c=new RegExp('("|;|\n)',"g");l.search(c)>=0&&(l='"'+l+'"'),a>0&&(o+=OrgChart.CSV_DELIMITER),o+=l}return o+"\n"},o="",a=0;a<e.length;a++)for(var s in e[a])OrgChart._arrayContains(i,s)||(i.push(s),o+=s+OrgChart.CSV_DELIMITER);o=o.substring(0,o.length-1),o+="\n";for(a=0;a<e.length;a++)o+=processNode(e[a]);return o=o.substring(0,o.length-1)},OrgChart.accentFold=function(e){return(e=e.toString().toLowerCase()).replace(/([àáâãäå])|([ç])|([èéêë])|([ìíîï])|([ñ])|([òóôõöø])|([ß])|([ùúûü])|([ÿ])|([æ])/g,function(e,i,o,a,s,l,c,d,h,p,u){return i?"a":o?"c":a?"e":s?"i":l?"n":c?"o":d?"s":h?"u":p?"y":u?"ae":void 0})},OrgChart.copy=function(e){if(null===e||"object"!=typeof e||"isActiveClone"in e)return e;if(e instanceof Date)var i=new e.constructor;else i=e.constructor();for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(e.isActiveClone=null,i[o]=OrgChart.copy(e[o]),delete e.isActiveClone);return i},OrgChart._getScrollSensitivity=function(){var e=OrgChart._browser();return e.msie&&OrgChart.scroll.ie?OrgChart.scroll.ie:e.edge&&OrgChart.scroll.edge?OrgChart.scroll.edge:e.safari&&OrgChart.scroll.safari?OrgChart.scroll.safari:e.chrome&&OrgChart.scroll.chrome?OrgChart.scroll.chrome:e.firefox&&OrgChart.scroll.firefox?OrgChart.scroll.firefox:e.opera&&OrgChart.scroll.opera?OrgChart.scroll.opera:{smooth:OrgChart.scroll.smooth,speed:OrgChart.scroll.speed}},OrgChart.isMobile=function(){const e=navigator.userAgent,i=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e),o="MacIntel"===navigator.platform&&navigator.maxTouchPoints>1;return i||o},OrgChart._isTouchDevice=function(){return navigator.maxTouchPoints>0},OrgChart.isTrial=function(){return void 0!==OrgChart.remote},OrgChart.childrenCount=function(e,i){for(var o=0,a=0;a<i.childrenIds.length;a++)e.nodes[i.childrenIds[a]]&&o++;return o},OrgChart.childrenTotalCount=function(e,i){for(var o=0,a=0;a<i.childrenIds.length;a++){var s=e.nodes[i.childrenIds[a]];s&&(o++,o+=OrgChart.childrenTotalCount(e,s))}return o},OrgChart.collapsedChildrenCount=function(e,i){for(var o=0,a=0;a<i.childrenIds.length;a++){var s=e.nodes[i.childrenIds[a]];s&&!0===s.collapsed&&o++}return o},OrgChart.collapsedChildrenTotalCount=function(e,i,o){for(var a=0,s=0;s<i.childrenIds.length;s++){var l=e.nodes[i.childrenIds[s]];l&&((o||!0===l.collapsed)&&a++,a+=OrgChart.collapsedChildrenTotalCount(e,l,!0))}return a},OrgChart._setMinMaxXY=function(e,i,o){o&&e.isTreeListItem||((null==i.minX||null!=e.x&&e.x<i.minX)&&(i.minX=e.x),(null==i.minY||null!=e.y&&e.y<i.minY)&&(i.minY=e.y),(null==i.maxX||null!=e.x&&e.x+e.w>i.maxX)&&(i.maxX=e.x+e.w),(null==i.maxY||null!=e.y&&e.y+e.h>i.maxY)&&(i.maxY=e.y+e.h))},OrgChart.getStParentNodes=function(e,i){for(i||(i=[]);e.parent;)e=e.parent;return e.stParent&&(i.push(e.stParent),OrgChart.getStParentNodes(e.stParent,i)),i},OrgChart.getRootOf=function(e){for(;e&&e.parent;)e=e.parent;return e},OrgChart._getViewBox=function(e){var i=null;return e?(i=(i="["+(i=e.getAttribute("viewBox"))+"]").replace(/\ /g,","),i=JSON.parse(i)):null},OrgChart.isNEU=function(e){return null==e||""===e},OrgChart.gradientCircleForDefs=function(e,i,o,a){function polarToCartesian(e,i,o,a){var s=(a-90)*Math.PI/180;return{x:e+o*Math.cos(s),y:i+o*Math.sin(s)}}function describeArc(e,i,o,a,s){var l=polarToCartesian(e,i,o,s),c=polarToCartesian(e,i,o,a),d=s-a<=180?"0":"1";return["M",l.x,l.y,"A",o,o,0,d,0,c.x,c.y].join(" ")}return Array.isArray(i)||(i=[i,i,i,i,i,i]),`<linearGradient id="${e}_linearColors1" x1="0" y1="0" x2="1" y2="1">\n <stop offset="0%" stop-color="${i[0]}"></stop>\n <stop offset="100%" stop-color="${i[1]}"></stop>\n </linearGradient>\n <linearGradient id="${e}_linearColors2" x1="0.5" y1="0" x2="0.5" y2="1">\n <stop offset="0%" stop-color="${i[1]}"></stop>\n <stop offset="100%" stop-color="${i[2]}"></stop>\n </linearGradient>\n <linearGradient id="${e}_linearColors3" x1="1" y1="0" x2="0" y2="1">\n <stop offset="0%" stop-color="${i[2]}"></stop>\n <stop offset="100%" stop-color="${i[3]}"></stop>\n </linearGradient>\n <linearGradient id="${e}_linearColors4" x1="1" y1="1" x2="0" y2="0">\n <stop offset="0%" stop-color="${i[3]}"></stop>\n <stop offset="100%" stop-color="${i[4]}"></stop>\n </linearGradient>\n <linearGradient id="${e}_linearColors5" x1="0.5" y1="1" x2="0.5" y2="0">\n <stop offset="0%" stop-color="${i[4]}"></stop>\n <stop offset="100%" stop-color="${i[5]}"></stop>\n </linearGradient>\n <linearGradient id="${e}_linearColors6" x1="0" y1="1" x2="1" y2="0">\n <stop offset="0%" stop-color="${i[5]}"></stop>\n <stop offset="100%" stop-color="${i[0]}"></stop>\n </linearGradient> \n <g id="${e}">\n <path stroke-width="${a}" fill="none" stroke="url(#${e}_linearColors1)" d="${describeArc(o,o,o,1,60)}" />\n <path stroke-width="${a}" fill="none" stroke="url(#${e}_linearColors2)" d="${describeArc(o,o,o,60,120)}"/>\n <path stroke-width="${a}" fill="none" stroke="url(#${e}_linearColors3)" d="${describeArc(o,o,o,120,180)}" />\n <path stroke-width="${a}" fill="none" stroke="url(#${e}_linearColors4)" d="${describeArc(o,o,o,180,240)}" />\n <path stroke-width="${a}" fill="none" stroke="url(#${e}_linearColors5)" d="${describeArc(o,o,o,240,300)}" />\n <path stroke-width="${a}" fill="none" stroke="url(#${e}_linearColors6)" d="${describeArc(o,o,o,300,1)}"/>\n </g>`},OrgChart._intersectionObserver=function(e,i){"function"==typeof IntersectionObserver?new IntersectionObserver(function(e,o){e.forEach(function(e){var o=e.intersectionRatio>0;0==e.intersectionRatio&&(o=e.isIntersecting),i(o)})}).observe(e):i(!0)},OrgChart.convertCsvToNodes=function(e){for(var i=OrgChart._csvToArray(e),o=i[0],a=[],s=1;s<i.length;s++){for(var l={},c=0;c<i[s].length;c++){var d=o[c],h=i[s][c];l[o[c]]=OrgChart._convertStringToArray(d,h)}""!=l.id.trim()&&a.push(l)}return a},OrgChart._escapeHtml=function(e){return OrgChart.ESCAPE_HTML&&"string"==typeof e?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;"):e},OrgChart._escapeDoubleQuotes=function(e){return"string"==typeof e?e.replace(/"/g,"&quot;"):e},OrgChart._escapeGreaterLessSign=function(e){return"string"==typeof e?e.replace(/</g,"&lt;").replace(/>/g,"&gt;"):e},OrgChart.roundPathCorners=function(e,i,o){function moveTowardsLength(e,i,o){var a=i.x-e.x,s=i.y-e.y,l=Math.sqrt(a*a+s*s);return moveTowardsFractional(e,i,Math.min(1,o/l))}function moveTowardsFractional(e,i,o){return{x:e.x+(i.x-e.x)*o,y:e.y+(i.y-e.y)*o}}function adjustCommand(e,i){e.length>2&&(e[e.length-2]=i.x,e[e.length-1]=i.y)}function pointForCommand(e){return{x:parseFloat(e[e.length-2]),y:parseFloat(e[e.length-1])}}Array.isArray(e)||(e=(e=e.split(/[,\s]/).reduce(function(e,i){var o=i.match("([a-zA-Z])(.+)");return o?(e.push(o[1]),e.push(o[2])):e.push(i),e},[])).reduce(function(e,i){return parseFloat(i)==i&&e.length?e[e.length-1].push(i):e.push([i]),e},[]));var a=[];if(e.length>1){var s=pointForCommand(e[0]),l=null;"Z"==e[e.length-1][0]&&e[0].length>2&&(l=["L",s.x,s.y],e[e.length-1]=l),a.push(e[0]);for(var c=1;c<e.length;c++){var d=a[a.length-1],h=e[c],p=h==l?e[1]:e[c+1];if(p&&d&&d.length>2&&"L"==h[0]&&p.length>2&&"L"==p[0]){var u,f,g=pointForCommand(d),m=pointForCommand(h),b=pointForCommand(p);o?(u=moveTowardsFractional(m,d.origPoint||g,i),f=moveTowardsFractional(m,p.origPoint||b,i)):(u=moveTowardsLength(m,g,i),f=moveTowardsLength(m,b,i)),adjustCommand(h,u),h.origPoint=m,a.push(h);var x=moveTowardsFractional(u,m,.5),v=moveTowardsFractional(m,f,.5),y=["C",x.x,x.y,v.x,v.y,f.x,f.y];y.origPoint=m,a.push(y)}else a.push(h)}if(l){var _=pointForCommand(a[a.length-1]);a.push(["Z"]),adjustCommand(a[0],_)}}else a=e;return a.reduce(function(e,i){return e+i.join(" ")+" "},"")},OrgChart._isMoved=function(e){return null!=e.movex||null!=e.movey},OrgChart._getDynamicGridCoulumns=function(e){for(var i=1;i<e&&!(e/i-i<=0);i++);return i%2!=0&&i>2&&i--,i},OrgChart._getLazyLoading=function(e){var i=e.lazyLoading;return"auto"==i&&(i=!!(e&&e.nodes&&e.nodes.length>700)),i},OrgChart._getSvgAttributes=function(e){const i=e.match(/width="([\d.]+)"/),o=e.match(/height="([\d.]+)"/),a=e.match(/x="([\d.]+)"/),s=e.match(/y="([\d.]+)"/),l=e.match(/viewBox="([^"]+)"/),c=i?parseFloat(i[1]):0,d=o?parseFloat(o[1]):0,h=a?parseFloat(a[1]):0,p=s?parseFloat(s[1]):0;let u=[0,0,0,0];return l&&(u=l[1],u=JSON.parse(`[${u}]`)),{width:c,height:d,viewBox:u,x:h,y:p}},OrgChart._setSvgAttributes=function(e,i){var o=i.x,a=i.y,s=i.width,l=i.height,c=i.viewBox.join(",");const d=e.match(/<svg\s+([^>]*?)>/);if(!d)return e;let h=d[0],p=d[1];const updateAttribute=(e,i,o)=>{if(null==o)return e;const a=new RegExp(`\\s*${i}="[^"]*"`,"i"),s=` ${i}="${o}"`;return e.match(a)?e.replace(a,s):e+s};p=updateAttribute(p,"x",o),p=updateAttribute(p,"y",a),p=updateAttribute(p,"width",s),p=updateAttribute(p,"height",l),p=updateAttribute(p,"viewBox",c);const u=`<svg ${p}>`;return e.replace(h,u)},OrgChart._convertTextToNodes=function(e,i){const o=e.split(/\r?\n/).filter(e=>""!==e.trim()),a=[];let s=1;const l=[];for(let c of o){let e=0;for(;c.startsWith(i);)c=c.slice(i.length),e++;if(c=c.trim(),!c)continue;const o=c.match(/^\[([^\]]+)](.*)$/);if(o){const e=o[1].trim(),i=o[2].trim();l.length>0&&(l[l.length-1][e]=i);continue}const d=c.match(/^([^\(]+)\(([^)]+)\)$/);let h,p=[];d?(h=d[1].trim(),p=d[2].split(",").map(e=>e.trim())):h=c;const u={id:s++,pid:0===e?null:l[e-1].id,name:h,tags:p};l[e]=u,l.length=e+1,a.push(u)}return a},OrgChart._convertFromNodesToText=function(e,i){const o={},a=[];function render(e,o){const a=i.repeat(o);let s=a+e.name;Array.isArray(e.tags)&&e.tags.length>0&&(s+="("+e.tags.join(",")+")"),s+="\n";for(const i of Object.keys(e))["id","pid","name","children","tags"].includes(i)||(s+=a+"["+i+"]"+e[i]+"\n");for(const i of e.children)s+=render(i,o+1);return s}return e.forEach(e=>{o[e.id]={...e,children:[]}}),e.forEach(e=>{e.pid&&o[e.pid]?o[e.pid].children.push(o[e.id]):a.push(o[e.id])}),a.map(e=>render(e,0)).join("").trim()},OrgChart._onClickHandler=function(e,i,o,a,s){var l;if(void 0===o)if("add"===i){var c={id:e.generateId(),pid:a};e.addNode(c,null,!0)}else if("edit"===i){var d=e.getNode(a);e.editUI.show(d.id)}else if("details"===i){d=e.getNode(a);e.editUI.show(d.id,!0)}else if("remove"===i)e.removeNode(a,null,!0);else if("svg_export"===i||"svg"===i){var h={};OrgChart.isNEU(a)||(h.pages=[{nodeId:a}]),e.exportToSVG(h)}else if("pdf_export"===i||"pdf"===i){h={};OrgChart.isNEU(a)||(h.pages=[{nodeId:a}]),e.exportToPDF(h)}else if("png_export"===i||"png"===i){h={};OrgChart.isNEU(a)||(h.pages=[{nodeId:a}]),e.exportToPNG(h)}else if("visio_export"===i||"visio"===i)e.exportToVisio({nodeId:a});else if("pp_export"===i||"powerpoint"===i)e.exportToPowerPoint();else if("pp_preview"===i||"pppreview"===i){h={parentLevels:0,childLevels:1,expandChildren:!1,pages:[{parentLevels:null,childLevels:null,expandChildren:!0,nodeId:e.roots[0].id}]};null!=a&&(h.expandChildren=!1,h.pages[0].nodeId=a),e.powerPointPreviewUI.show(h)}else if("pdf_preview"===i||"pdfpreview"===i){h={parentLevels:0,childLevels:1,expandChildren:!1,pages:[{parentLevels:null,childLevels:null,expandChildren:!0,nodeId:e.roots[0].id}]};null!=a&&(h.expandChildren=!1,h.pages[0].nodeId=a),e.pdfPreviewUI.show(h)}else if("svg_preview"===i||"svgpreview"===i){h={parentLevels:0,childLevels:1,expandChildren:!1,pages:[{parentLevels:null,childLevels:null,expandChildren:!0,nodeId:e.roots[0].id}]};null!=a&&(h.expandChildren=!1,h.pages[0].nodeId=a),e.svgPreviewUI.show(h)}else if("png_preview"===i||"pngpreview"===i){h={parentLevels:0,childLevels:1,expandChildren:!1,pages:[{parentLevels:null,childLevels:null,expandChildren:!0,nodeId:e.roots[0].id}]};null!=a&&(h.expandChildren=!1,h.pages[0].nodeId=a),e.pngPreviewUI.show(h)}else"csv_export"===i||"csv"===i?e.exportToCSV({nodeId:a}):"xml_export"===i||"xml"===i?e.exportToXML({nodeId:a}):"json_export"===i||"json"===i?e.exportToJSON({nodeId:a}):"fit"===i?e.fit():"expand_all"===i?e.expand(null,"all"):"full_screen"===i?e.toggleFullScreen():"zoom_in"===i?e.zoom(!0,null,!0):"zoom_out"===i||"zoom_out"===i?e.zoom(!1,null,!0):"layout_mixed"===i?e.setLayout(OrgChart.layout.mixed):"layout_normal"===i?e.setLayout(OrgChart.layout.normal):"layout_right_offset"===i?e.setLayout(OrgChart.layout.treeRightOffset):"layout_left_offset"===i?e.setLayout(OrgChart.layout.treeLeftOffset):"layout_tree"===i?e.setLayout(OrgChart.layout.tree):"layout_grid"===i&&e.setLayout(OrgChart.layout.grid);else l=o.call(e,a,s);return l},OrgChart._isSVG=function(e){if("string"!=typeof e)return!1;const i=e.trim();if(!i.startsWith("<svg")||!i.endsWith("</svg>"))return!1;try{const e=(new DOMParser).parseFromString(i,"image/svg+xml");return!e.querySelector("parsererror")&&"svg"===e.documentElement.nodeName.toLowerCase()}catch{return!1}},OrgChart._treeListAdjustToSTNodePostition=function(e,i){for(var o of e)o.y+=i.y+i.padding[0],o.x+=i.x+i.padding[3],OrgChart._treeListAdjustToSTNodePostition(o.children,i)},OrgChart._treeListSetProps=function(e,i){var o=-e.treeList.scrollTop,a={nodesByLevels:[],lastNode:null,y:0};e.treeList.pinnedIds=[],OrgChart._treeListIterate(e.stChildren,a,-1);var s=a.lastNode.y+a.lastNode.h-0-(e.treeList.maxHeight-e.padding[0]-e.padding[2]);o>0||s<0?o=0:0!=o&&-1*o>s&&(o=-s);for(var l=a.nodesByLevels.length-1;l>=0;l--)for(var c=a.nodesByLevels[l],d=c.length-1;d>=0;d--){for(var h=(x=c[d]).y,p=0,u=x.parent;u&&(p+=u.h,u.parent);)u=u.parent;if(x.children.length&&x.y+o<=p){h=-o+p;var f=c[d+1];if(f&&f.y<h+x.h&&(h=f.y-x.h),u){var g=e.stChildren.indexOf(u);if(e.stChildren.length>g+1){var m=e.stChildren[g+1];m.y<h+x.h&&(h=m.y-x.h)}}}x.y!=h&&e.treeList.pinnedIds.push(x.id),x.y=h,x.x=0}if(i==OrgChart.orientation.bottom){var b=a.lastNode.y+a.lastNode.h;for(var l of a.nodesByLevels)for(var x of l)x.y=b-x.y-x.h}e.treeList.scrollTop=-o,e.treeList.scrollTopMax=s},OrgChart._treeListIterate=function(e,i,o){for(var a of(o++,e))a.y=i.y,i.y+=a.h,i.nodesByLevels[o]||(i.nodesByLevels[o]=[]),i.nodesByLevels[o].push(a),i.lastNode=a,OrgChart._treeListIterate(a.children,i,o)},OrgChart._treeListGetTumbPositionFromScrollTop=function(e){var i=e.h-e.padding[0]-e.padding[2],o=i/((e.treeList.scrollTopMax+i)/100),a=i/100*o,s=i-a,l=-e.treeList.scrollTop/(e.treeList.scrollTopMax/100),c=e.y+e.padding[0]+l*(s/-100),d="initial";return(isNaN(a)||isNaN(c)||a<0||o>100)&&(d="none",a=0,c=0),{thumbHeight:a,thumbPosition:c,scrollBarDisplay:d}},OrgChart._treeListGetScrollTopFromTumbPosition=function(e,i,o){var a=e.h-e.padding[0]-e.padding[2]-i,s=(o-(e.y+e.padding[0]))/a*100/100*e.treeList.scrollTopMax;return(isNaN(s)||s<0)&&(s=0),s>e.treeList.scrollTopMax&&(s=e.treeList.scrollTopMax),s},OrgChart._getCenterNodeFromParams=function(e,i){var o=e[i.id];if(o){if(o.isTreeListItem){for(;!o.stParent;)o=o.parent;o=o.stParent}return o}return null},OrgChart._getScrollTopForNode=function(e,i){var o={nodesByLevels:[],lastNode:null,y:0};OrgChart._treeListIterate(e.stChildren,o,-1);var a=null;for(var s of o.nodesByLevels){for(var l of s)if(l.id==i){a=l;break}if(a)break}if(!a)return e.treeList.scrollTop;for(var c=0,d=a.parent;d&&(c+=d.h,d.parent);)d=d.parent;var h=e.padding[0],p=e.padding[2],u=e.treeList.maxHeight-h-p,f=o.lastNode.y+o.lastNode.h-u;f<0&&(f=0);var g=e.treeList.scrollTop,m=a.y-c,b=a.y+a.h-u,x=g;return a.y<g+c?x=m:a.y+a.h>g+u&&(x=a.h>u-c?m:b),x<0?x=0:x>f&&(x=f),x},OrgChart._getDefailtPositionForExpandCollpase=function(e,i){var o={x:0,y:0};switch(e.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:o.x=i.w/2,o.y=i.h;break;case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:o.x=i.w/2,o.y=0;break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:o.x=0,o.y=i.h/2;break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:o.x=i.w,o.y=i.h/2}return o},OrgChart._measureCache={svg:null,text:null},OrgChart._getMeasureElement=function(){if(OrgChart._measureCache.svg)return OrgChart._measureCache.text;const e="http://www.w3.org/2000/svg";return OrgChart._measureCache.svg=document.createElementNS(e,"svg"),OrgChart._measureCache.svg.id="orgchart_js_test__measure",OrgChart._measureCache.svg.style.cssText="position:absolute;top:-9999px;visibility:hidden;white-space:pre;",OrgChart._measureCache.text=document.createElementNS(e,"text"),OrgChart._measureCache.svg.appendChild(OrgChart._measureCache.text),document.body.appendChild(OrgChart._measureCache.svg),OrgChart._measureCache.text},OrgChart._lineClamp=function(e,i,o,a){if(void 0===i||null==i)return"";"string"!=typeof i&&(i=i.toString()),i=OrgChart._escapeHtml(i);const s=/(\w+(?:-\w+)?)="([^"]*)"/g,l={};let c;for(;null!==(c=s.exec(e));)l[c[1]]=c[2];const d=OrgChart._getMeasureElement();d.textContent="";for(const[x,v]of Object.entries(l))"x"!==x&&"y"!==x&&d.setAttribute(x,v);const getWidth=e=>(d.textContent=e,d.getComputedTextLength()),h=i.split(" "),p=[];let u="",f=0;for(;f<h.length&&p.length<a;){const e=h[f],i=u?u+" "+e:e;if(getWidth(i)<=o)u=i,f++;else if(""===u){let i=0,a=e.length,s=1;for(;i<=a;){let l=i+a>>1;getWidth(e.slice(0,l))<=o?(s=l,i=l+1):a=l-1}p.push(e.slice(0,s)),h[f]=e.slice(s)}else p.push(u),u=""}u&&p.length<a&&p.push(u);let g=f<h.length||f===h.length&&""===h[f-1]&&i.endsWith(" ");if(g&&p.length>0){let e=p[p.length-1],i=0,a=e.length,s="";for(;i<=a;){let l=Math.floor((i+a)/2),c=e.substring(0,l)+"...";getWidth(c)<=o?(s=c,i=l+1):a=l-1}p[p.length-1]=s}const m=` x="${l.x||"0"}"`,b=1===p.length?p[0]:p.map((e,i)=>`<tspan${m} dy="${0===i?0:"1.2em"}">${e}</tspan>`).join("");return`<text${Object.entries(l).map(([e,i])=>` ${e}="${i}"`).join("")}>${g?`<title>${i}</title>`:""}${b}</text>`},OrgChart._getScrollableTreeListNodeInTouchEnabledDevice=function(e){if(!e||!e.isTreeListItem||!OrgChart._isTouchDevice())return null;var i=OrgChart.getRootOf(e).stParent,{thumbHeight:o,thumbPosition:a,scrollBarDisplay:s}=OrgChart._treeListGetTumbPositionFromScrollTop(i);return"none"==s?null:i},OrgChart._convertImagesToBase64=async function(e){const i=new DOMParser;return await Promise.all(e.map(async e=>{const o=i.parseFromString(e,"image/svg+xml"),a=o.querySelectorAll("image");for(const i of a){const e=i.getAttribute("href")||i.getAttribute("xlink:href");if(e&&!e.startsWith("data:"))try{const o=parseFloat(i.getAttribute("width"))||0,a=parseFloat(i.getAttribute("height"))||0;if(o>0&&a>0){const s=await OrgChart._resizeAndConvert(e,o,a);i.setAttribute("href",s),i.removeAttributeNS("http://www.w3.org/1999/xlink","href")}}catch(s){console.error("Failed to process image:",e,s)}}return(new XMLSerializer).serializeToString(o)}))},OrgChart._resizeAndConvert=function(e,i,o){return new Promise((a,s)=>{const l=new Image;l.crossOrigin="anonymous",l.onload=()=>{const e=document.createElement("canvas"),s=e.getContext("2d"),c=Math.min(i/l.width,o/l.height),d=l.width*c,h=l.height*c;e.width=d,e.height=h,s.drawImage(l,0,0,d,h),a(e.toDataURL("image/png"))},l.onerror=s,l.src=e})},OrgChart.xScrollUI=function(e,i,o,a,s){this.element=e,this.requestParams=o,this.config=i,this.onSetViewBoxCallback=a,this.onDrawCallback=s,this.position=0,this.bar=null,this._event_id=OrgChart._guid()},OrgChart.xScrollUI.prototype.addListener=function(e){var i=this;if((this.config.mouseScrool==OrgChart.action.xScroll||this.config.mouseScrool==OrgChart.action.scroll)&&this.bar){var o=-1!==navigator.userAgent.indexOf("Mac OS"),a=OrgChart._getScrollSensitivity();!function(e,a,s){var l=!1;function update(){l=!0;var e=(i.position-i.bar.scrollLeft)/s;if(e>0)e++;else{if(0==e)return void(l=!1);e--}Math.ceil(i.bar.scrollLeft)==Math.ceil(i.position)?l=!1:(i.bar.scrollLeft+=e,c(update))}e.addEventListener("wheel",function(e){if(e.preventDefault(),e.ctrlKey)return;var s=0;if(i.config.mouseScrool==OrgChart.action.xScroll)(s=e.deltaX||e.wheelDeltaX)||(s=e.deltaY||e.wheelDeltaY);else if(i.config.mouseScrool==OrgChart.action.scroll&&!(s=o||!e.shiftKey?e.deltaX||e.wheelDeltaX:e.deltaY||e.wheelDeltaY))return;s=-s,s=Math.max(-1,Math.min(1,s)),i.position+=-s*a;var c=parseFloat(i.innerBar.clientWidth)-parseFloat(i.bar.clientWidth);i.position<0&&(i.position=0);i.position>c&&(i.position=c);l||update()},{passive:!1});var c=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){setTimeout(e,20)}}(e,a.speed,a.smooth)}},OrgChart.xScrollUI.prototype.create=function(e){if(!0===this.config.showXScroll||this.config.mouseScrool===OrgChart.action.scroll||this.config.mouseScrool===OrgChart.action.xScroll){var i=this;this.bar&&this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),this.bar=document.createElement("div"),this.innerBar=document.createElement("div"),this.requestParams(),this.innerBar.innerHTML="&nbsp",Object.assign(this.bar.style,{position:"absolute",left:0,bottom:0,width:e+"px","overflow-x":"scroll",height:"20px"}),this.element.appendChild(this.bar),this.bar.appendChild(this.innerBar),this.bar.addEventListener("scroll",function(){if(this.ignore)this.ignore=!1;else{var e=i.requestParams(),o=(parseFloat(i.innerBar.clientWidth)-parseFloat(i.bar.clientWidth))/100,a=this.scrollLeft/o,s=(e.boundary.right-e.boundary.left)/100;e.viewBox[0]=a*s+e.boundary.left,i.onSetViewBoxCallback(e.viewBox),clearTimeout(this._timeout),this._timeout=setTimeout(function(){i.onDrawCallback()},500)}})}},OrgChart.xScrollUI.prototype.setPosition=function(){if(this.bar){var e=this.requestParams(),i=(Math.abs(e.boundary.maxX-e.boundary.minX)+2*this.config.padding)*e.scale;switch(this.config.orientation){case OrgChart.orientation.right:case OrgChart.orientation.right_top:i=Math.abs(e.boundary.minX*e.scale)}this.innerBar.style.width=i+"px";var o=(e.boundary.right-e.boundary.left)/100,a=(e.viewBox[0]-e.boundary.left)/o;a<0?a=0:a>100&&(a=100);var s=(parseFloat(this.innerBar.clientWidth)-parseFloat(this.bar.clientWidth))/100,l=a*s;this.bar.ignore=!0,this.bar.scrollLeft=l,this.position=this.bar.scrollLeft,this.bar.style.visibility=s<=0?"hidden":"",!0!==this.config.showXScroll&&(this.bar.style.visibility="hidden"),OrgChart.events.publish("change",[this,{isScrollBarVisible:"hidden"!=this.bar.style.visibility}])}},OrgChart.xScrollUI.prototype.on=function(e,i){return OrgChart.events.on(e,i,this._event_id),this},OrgChart.yScrollUI=function(e,i,o,a,s){this.element=e,this.requestParams=o,this.config=i,this.onSetViewBoxCallback=a,this.onDrawCallback=s,this.position=0,this.bar=null,this._event_id=OrgChart._guid()},OrgChart.yScrollUI.prototype.addListener=function(e){var i=this;if((this.config.mouseScrool==OrgChart.action.yScroll||this.config.mouseScrool==OrgChart.action.scroll)&&this.bar){var o=-1!==navigator.userAgent.indexOf("Mac OS"),a=OrgChart._getScrollSensitivity();!function(e,a,s){var l=!1;function update(){l=!0;var e=(i.position-i.bar.scrollTop)/s;if(e>0)e++;else{if(0==e)return void(l=!1);e--}Math.ceil(i.bar.scrollTop)==Math.ceil(i.position)?l=!1:(i.bar.scrollTop+=e,c(update))}e.addEventListener("wheel",function(e){if(e.preventDefault(),e.ctrlKey)return;var s=0;if(i.config.mouseScrool==OrgChart.action.yScroll)(s=e.deltaY||e.wheelDeltaY)||(s=e.deltaX||e.wheelDeltaX);else if(i.config.mouseScrool==OrgChart.action.scroll&&!(s=o||!e.shiftKey?e.deltaY||e.wheelDeltaY:e.deltaX||e.wheelDeltaX))return;s=-s,s=Math.max(-1,Math.min(1,s)),i.position+=-s*a;var c=parseFloat(i.innerBar.clientHeight)-parseFloat(i.bar.clientHeight);i.position<0&&(i.position=0);i.position>c&&(i.position=c);l||update()},{passive:!1});var c=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){setTimeout(e,20)}}(e,a.speed,a.smooth)}},OrgChart.yScrollUI.prototype.create=function(e){if(!0===this.config.showYScroll||this.config.mouseScrool===OrgChart.action.scroll||this.config.mouseScrool===OrgChart.action.yScroll){var i=this;this.bar&&this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),this.bar=document.createElement("div"),this.innerBar=document.createElement("div"),this.innerBar.innerHTML="&nbsp",Object.assign(this.bar.style,{position:"absolute",right:0,bottom:0,height:e+"px","overflow-y":"scroll",width:"20px"}),this.element.appendChild(this.bar),this.bar.appendChild(this.innerBar),this.bar.addEventListener("scroll",function(){if(this.ignore)this.ignore=!1;else{var e=i.requestParams(),o=(parseFloat(i.innerBar.clientHeight)-parseFloat(i.bar.clientHeight))/100,a=this.scrollTop/o,s=(e.boundary.bottom-e.boundary.top)/100;e.viewBox[1]=a*s+e.boundary.top,i.onSetViewBoxCallback(e.viewBox),clearTimeout(this._timeout),this._timeout=setTimeout(function(){i.onDrawCallback()},500)}})}},OrgChart.yScrollUI.prototype.setPosition=function(){if(this.bar){var e=this.requestParams(),i=(Math.abs(e.boundary.maxY-e.boundary.minY)+2*this.config.padding)*e.scale;switch(this.config.orientation){case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:i=Math.abs(e.boundary.minY*e.scale)}this.innerBar.style.height=i+"px";var o=(e.boundary.bottom-e.boundary.top)/100,a=(e.viewBox[1]-e.boundary.top)/Math.abs(o);a<0?a=0:a>100&&(a=100);var s=(parseFloat(this.innerBar.clientHeight)-parseFloat(this.bar.clientHeight))/100,l=a*s;this.bar.ignore=!0,this.bar.scrollTop=l,this.position=this.bar.scrollTop,this.bar.style.visibility=s<=0?"hidden":"",!0!==this.config.showYScroll&&(this.bar.style.visibility="hidden"),OrgChart.events.publish("change",[this,{isScrollBarVisible:"hidden"!=this.bar.style.visibility}])}},OrgChart.yScrollUI.prototype.on=function(e,i){return OrgChart.events.on(e,i,this._event_id),this},OrgChart.prototype.zoom=function(e,i,o,a){var s=this.getViewBox().slice(0),l=s,c=s[2],d=s[3];!0===e?(s[2]=s[2]/OrgChart.SCALE_FACTOR,s[3]=s[3]/OrgChart.SCALE_FACTOR):!1===e?(s[2]=s[2]*OrgChart.SCALE_FACTOR,s[3]=s[3]*OrgChart.SCALE_FACTOR):(s[2]=s[2]/e,s[3]=s[3]/e),i||(i=[50,50]),s[0]=l[0]-(s[2]-c)/(100/i[0]),s[1]=l[1]-(s[3]-d)/(100/i[1]);var h=this.getScale(s);if(s[2]=this.width()/h,s[3]=this.height()/h,!0===e&&h<this.config.scaleMax||!1===e&&h>this.config.scaleMin||0!=e&&1!=e&&h<this.config.scaleMax&&h>this.config.scaleMin){this._hideBeforeAnimation();var p=this;o?(clearTimeout(p._timeout),OrgChart.animate(this.getSvg(),{viewbox:this.getViewBox()},{viewbox:s},this.config.anim.duration,this.config.anim.func,function(){clearTimeout(p._timeout),p._timeout=setTimeout(function(){p._draw(!0,OrgChart.action.zoom,null,a)},500)})):(this.setViewBox(s),clearTimeout(p._timeout),p._timeout=setTimeout(function(){p._draw(!0,OrgChart.action.zoom,null,a)},500))}},OrgChart.loading={},OrgChart.loading.show=function(e){var i=document.createElement("div");i.id="boc-loading",i.innerHTML='<style>@-webkit-keyframes dot-keyframes {0% { opacity: .4; -webkit-transform: scale(1, 1);transform: scale(1, 1);}50% {opacity: 1;-webkit-transform: scale(1.2, 1.2);transform: scale(1.2, 1.2);}100% {opacity: .4;-webkit-transform: scale(1, 1);transform: scale(1, 1);}}@keyframes dot-keyframes {0% {opacity: .4;-webkit-transform: scale(1, 1);transform: scale(1, 1);}50% {opacity: 1;-webkit-transform: scale(1.2, 1.2);transform: scale(1.2, 1.2);}100% {opacity: .4;-webkit-transform: scale(1, 1);transform: scale(1, 1);}}.boc-loading-dots div {margin: 10px;} .boc-dot-1 {background-color: #039BE5;}.boc-dot-2 {background-color: #F57C00;}.boc-dot-3 {background-color: #FFCA28;} .boc-loading-dots {text-align: center;width: 100%; position: absolute; top: 0;}.boc-loading-dots--dot {-webkit-animation: dot-keyframes 1.5s infinite ease-in-out;animation: dot-keyframes 1.5s infinite ease-in-out; border-radius: 10px;display: inline-block;height: 10px;width: 10px;}.boc-loading-dots--dot:nth-child(2) {-webkit-animation-delay: .5s;animation-delay: .5s;}.boc-loading-dots--dot:nth-child(3) {-webkit-animation-delay: 1s;animation-delay: 1s;}</style><div class="boc-loading-dots"><div class="boc-loading-dots--dot boc-dot-1"></div><div class="boc-loading-dots--dot boc-dot-2"></div><div class="boc-loading-dots--dot boc-dot-3"></div></div>',e.element.appendChild(i)},OrgChart.loading.hide=function(e){var i=e.element.querySelector("#boc-loading");i&&i.parentNode.removeChild(i)},OrgChart.pdfPrevUI={},OrgChart.pdfPrevUI.show=function(e,i){console.warn("OrgChart.pdfPrevUI.show is obsolete; use chart.pdfPreviewUI.show instead.")},OrgChart.pdfPrevUI.hide=function(){console.warn("OrgChart.pdfPrevUI.hide is obsolete; use chart.pdfPreviewUI.hide instead.")},void 0===OrgChart&&(OrgChart={}),OrgChart.events.on("renderdefs",function(e,i){for(var o=0;o<e.config.clinks.length;o++){var a=e.config.clinks[o].template;a||(a="orange");var s=OrgChart.clinkTemplates[a];i.defs+=s.defs}}),OrgChart.events.on("prerender",function(e,i){OrgChart.RENDER_CLINKS_BEFORE_NODES&&e._clink(e,i)}),OrgChart.events.on("render",function(e,i){OrgChart.RENDER_CLINKS_BEFORE_NODES||e._clink(e,i)}),OrgChart.events.on("drag",function(e,i,o,a){if(e instanceof OrgChart&&e.config.movable&&a)for(var s=0;s<a.length;s++){for(var l=a[s],c=e.element.querySelectorAll(`[data-c-l-from="${l}"]`),d=e.element.querySelectorAll(`[data-c-l-to="${l}"]`),h=0;h<c.length;h++)c[h].parentNode.removeChild(c[h]);for(h=0;h<d.length;h++)d[h].parentNode.removeChild(d[h])}}),OrgChart.prototype._clink=function(e,i){for(var o="",a=0;a<this.config.clinks.length;a++){var s=this.config.clinks[a],l=e.getNode(s.from),c=e.getNode(s.to);if(l&&-1!=i.res.visibleNodeIds.indexOf(l.id)&&(c&&-1!=i.res.visibleNodeIds.indexOf(c.id))){var d=l.x,h=l.y,p=c.x,u=c.y,f={},g={},m=d+l.w/2,b=p+c.w/2,x=h+l.h/2,v=u+c.h/2,y=1;switch(this.config.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:m<=b?(y=1,f.x=m+l.w/10,g.x=b-c.w/10):(y=-1,f.x=m-l.w/10,g.x=b+c.w/10),h==u?(y=1,f.y=h,g.y=u):h>u?(f.y=h,g.y=u+c.h):(f.y=h+l.h,g.y=u);break;case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:m<=b?(y=-1,f.x=m+l.w/10,g.x=b+c.w/10):(y=1,f.x=m-l.w/10,g.x=b+c.w/10),h==u?(y=-1,f.y=h+l.h,g.y=u+c.h):h>u?(f.y=h,g.y=u+c.h):(f.y=h+l.h,g.y=u);break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:x<=v?(y=-1,f.y=x+l.h/5,g.y=v+c.h/5):(y=1,f.y=x-l.h/5,g.y=v+c.h/5),d==p?(y=-1,f.x=d,g.x=p):d>p?(f.x=d,g.x=p+c.w):(f.x=d+l.w,g.x=p);break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:x<=v?(y=1,f.y=x+l.h/5,g.y=v+c.h/5):(y=-1,f.y=x-l.h/5,g.y=v+c.h/5),d==p?(y=1,f.x=d+l.w,g.x=p+c.w):d>p?(f.x=d,g.x=p+c.w):(f.x=d+l.w,g.x=p)}var _=findD(f,g,y),w=s.template;w||(w="orange");var k=OrgChart.clinkTemplates[w];if(s.label){var I=OrgChart.clinkLabelPosition(s,f,g,_);o+=k.label.replace("{x}",I.x).replace("{y}",I.y).replace("{val}",s.label)}var S="M"+f.x+","+f.y+"C"+f.x+","+f.y+" "+_.x+","+_.y+" "+g.x+","+g.y;o+=("<g "+OrgChart.attr.c_link_from+'="{from}" '+OrgChart.attr.c_link_to+'="{to}">').replace("{from}",l.id).replace("{to}",c.id)+k.link.replaceAll("{d}",S)+'<path stroke="transparent" stroke-width="15" fill="none" d="'+S+'" />',o+=OrgChart.grCloseTag}function findD(e,i,o){null==o&&(o=1);var a=i.x-e.x,l=i.y-e.y,c=Math.sqrt(Math.pow(i.x-e.x,2)+Math.pow(i.y-e.y,2))/3;return c=c/(Math.sqrt(a*a+l*l)*o)*OrgChart.clinkCurve(s),{x:e.x+a/2-l*c,y:e.y+l/2+a*c}}}i.content+=o},OrgChart.clinkLabelPosition=function(e,i,o,a){var s=(o.x-i.x)/2+i.x,l=(o.y-i.y)/2+i.y;return{x:(s-a.x)/2+a.x,y:(l-a.y)/2+a.y}},OrgChart.clinkCurve=function(e){return OrgChart.CLINK_CURVE},OrgChart.prototype.addClink=function(e,i,o,a){this._putInUndoStack(),this.clearRedo();for(var s=this.config.clinks.length-1;s>=0;s--){var l=this.config.clinks[s];l.from==e&&l.to==i&&this.config.clinks.splice(s,1)}return this.config.clinks.push({from:e,to:i,label:o,template:a}),this._ai.setContext(),OrgChart.events.publish("updated",[this]),this},OrgChart.prototype.removeClink=function(e,i){this._putInUndoStack(),this.clearRedo();for(var o=this.config.clinks.length-1;o>=0;o--){var a=this.config.clinks[o];a.from==e&&a.to==i&&this.config.clinks.splice(o,1)}return this._ai.setContext(),OrgChart.events.publish("updated",[this]),this},OrgChart.clinkTemplates={},OrgChart.clinkTemplates.orange={defs:'<marker id="arrowOrange" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse"><path fill="#F57C00" d="M 0 0 L 10 5 L 0 10 z" /></marker><marker id="dotOrange" viewBox="0 0 10 10" refX="5" refY="5" markerWidth="5" markerHeight="5"> <circle cx="5" cy="5" r="5" fill="#F57C00" /></marker>',link:'<path marker-start="url(#dotOrange)" marker-end="url(#arrowOrange)" stroke="#F57C00" stroke-width="2" fill="none" d="{d}" />',label:'<text fill="#F57C00" text-anchor="middle" x="{x}" y="{y}">{val}</text>'},OrgChart.clinkTemplates.blue={defs:'<marker id="arrowBlue" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse"><path fill="#039BE5" d="M 0 0 L 10 5 L 0 10 z" /></marker><marker id="dotBlue" viewBox="0 0 10 10" refX="5" refY="5" markerWidth="5" markerHeight="5"> <circle cx="5" cy="5" r="5" fill="#039BE5" /></marker>',link:'<path marker-start="url(#dotBlue)" marker-end="url(#arrowBlue)" stroke="#039BE5" stroke-width="2" fill="none" d="{d}" />',label:'<text fill="#039BE5" text-anchor="middle" x="{x}" y="{y}">{val}</text>'},OrgChart.clinkTemplates.yellow={defs:'<marker id="arrowYellow" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse"><path fill="#FFCA28" d="M 0 0 L 10 5 L 0 10 z" /></marker><marker id="dotYellow" viewBox="0 0 10 10" refX="5" refY="5" markerWidth="5" markerHeight="5"> <circle cx="5" cy="5" r="5" fill="#FFCA28" /></marker>',link:'<path marker-start="url(#dotYellow)" marker-end="url(#arrowYellow)" stroke="#FFCA28" stroke-width="2" fill="none" d="{d}" />',label:'<text fill="#FFCA28" text-anchor="middle" x="{x}" y="{y}">{val}</text>'},void 0===OrgChart&&(OrgChart={}),OrgChart.events.on("renderdefs",function(e,i){for(var o=0;o<e.config.slinks.length;o++){var a=e.config.slinks[o].template;a||(a="orange");var s=OrgChart.slinkTemplates[a];i.defs+=s.defs}}),OrgChart.events.on("render",function(e,i){e._slinks(e,i)}),OrgChart.events.on("drag",function(e,i,o,a){if(e instanceof OrgChart&&e.config.movable&&a)for(var s=0;s<a.length;s++){for(var l=a[s],c=e.element.querySelectorAll(`[data-s-l-from="${l}"]`),d=e.element.querySelectorAll(`[data-s-l-to="${l}"]`),h=0;h<c.length;h++)c[h].parentNode.removeChild(c[h]);for(h=0;h<d.length;h++)d[h].parentNode.removeChild(d[h])}}),OrgChart.prototype._slinks=function(e,i){var o="",a=this.getScale(),s=i.res.boundary;function _findM(e,i){return{x:(e[0]+i[0])/2,y:(e[1]+i[1])/2}}function _slinks(i,o,l,c,d){var h,p=[],u=null,f=OrgChart.t(i.templateName,i.min,a),g=c.levelSeparation;switch(i.parent&&i.parent.layout&&(g=c.mixedHierarchyNodesSeparation),c.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:h={p:i.x+i.w/2,q:i.y,r:i.x+i.w/2,s:s.minY+g};break;case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:h={p:i.x+i.w/2,q:i.y+i.h,r:i.x+i.w/2,s:s.maxY};break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:h={p:i.x,q:i.y+i.h/2,r:s.minX+g,s:i.y+i.h/2};break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:h={p:i.x+i.w,q:i.y+i.h/2,r:s.maxX,s:i.y+i.h/2}}if(i.sl==o.sl)switch(u=o,c.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:p.push([h.p,h.q]),p.push([h.p,h.q-2*OrgChart.SLINK_GAP]),f=OrgChart.t(u.templateName,u.min,a),p.push([u.x+u.w/2,p[p.length-1][1]]),p.push([p[p.length-1][0],u.y]);break;case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:p.push([h.p,h.q]),p.push([h.p,h.q+2*OrgChart.SLINK_GAP]),f=OrgChart.t(u.templateName,u.min,a),p.push([u.x+u.w/2,p[p.length-1][1]]),p.push([p[p.length-1][0],u.y+u.h]);break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:p.push([h.p,h.q]),p.push([h.p-2*OrgChart.SLINK_GAP,h.q]),f=OrgChart.t(u.templateName,u.min,a),p.push([p[p.length-1][0],u.y+u.h/2]),p.push([u.x,p[p.length-1][1]]);break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:p.push([h.p,h.q]),p.push([h.p+2*OrgChart.SLINK_GAP,h.q]),f=OrgChart.t(u.templateName,u.min,a),p.push([p[p.length-1][0],u.y+u.h/2]),p.push([u.x+u.w,p[p.length-1][1]])}else{switch(c.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:p.push([h.p,h.q]),p.push([h.r,i.y-2*OrgChart.SLINK_GAP]);break;case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:p.push([h.p,h.q]),p.push([h.r,i.y+i.h+2*OrgChart.SLINK_GAP]);break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:p.push([h.p,h.q]),p.push([i.x-2*OrgChart.SLINK_GAP,h.s]);break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:p.push([h.p,h.q]),p.push([i.x+i.w+2*OrgChart.SLINK_GAP,h.s])}for(var m=i,b=i;b.parent;)b=b.parent;for(;null==u;){var x=!1,v=m.parent,y=v.leftNeighbor,_=v.rightNeighbor;if(v.id==o.id?u=v:OrgChart._intersects(v,h,c)&&(h=OrgChart._addPoint(v,p,c,h,d),x=!0),v.id!=o.id){for(;y;){if(y.id==o.id){u=y;break}OrgChart._intersects(y,h,c)&&(h=OrgChart._addPoint(y,p,c,h,d),x=!0),y=y.leftNeighbor}for(;_;){if(_.id==o.id){u=_;break}OrgChart._intersects(_,h,c)&&(h=OrgChart._addPoint(_,p,c,h,d),x=!0),_=_.rightNeighbor}}if(!x){var w=0,k=0;if(v.parent){g=c.levelSeparation,v.parent.layout&&(g=c.mixedHierarchyNodesSeparation);var I=e.manager.bordersByRootIdAndLevel[b.id][v.parent.sl];switch(c.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:w=p[p.length-1][0],k=I.maxY+g-OrgChart.SLINK_GAP;break;case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:w=p[p.length-1][0],k=I.minY-g+OrgChart.SLINK_GAP;break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:w=I.maxX+g-OrgChart.SLINK_GAP,k=p[p.length-1][1];break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:w=I.minX-g+OrgChart.SLINK_GAP,k=p[p.length-1][1]}}p.push([w,k])}m=v}switch(f=OrgChart.t(u.templateName,u.min,a),p.splice(p.length-1,1),c.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:var S=f.expandCollapseSize;"left"==d&&(S*=-1),p.push([u.x+u.w/2+S,p[p.length-1][1]]),p.push([p[p.length-1][0],u.y+u.h]);break;case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:S=f.expandCollapseSize;"left"==d&&(S*=-1),p.push([u.x+u.w/2+S,p[p.length-1][1]]),p.push([p[p.length-1][0],u.y]);break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:S=f.expandCollapseSize;"top"==d&&(S*=-1),p.push([p[p.length-1][0],u.y+u.h/2+S]),p.push([u.x+u.w,p[p.length-1][1]]);break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:S=f.expandCollapseSize;"top"==d&&(S*=-1),p.push([p[p.length-1][0],u.y+u.h/2+S]),p.push([u.x,p[p.length-1][1]])}}return l&&(p=p.reverse()),p}for(var l=[],c=[],d=[],h=[],p=[],u=0;u<this.config.slinks.length;u++){var f=this.config.slinks[u],g=e.getNode(f.from),m=e.getNode(f.to);if(g&&m&&-1!=i.res.visibleNodeIds.indexOf(m.id)&&-1!=i.res.visibleNodeIds.indexOf(g.id)){var b=g.lcn?g.lcn:"base",x=e._layoutConfigs[b],v=g.sl<m.sl,y="left";switch(x.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:m.x>=g.x&&(y="right");break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:case OrgChart.orientation.right:case OrgChart.orientation.right_top:y="top",m.y>g.y&&(y="bottom")}_=v?_slinks(m,g,v,x,y):_slinks(g,m,v,x,y),l.push(_),c.push(f),h.push(y),d.push(x),p.push({from:g,to:m})}}for(u=0;u<l.length;u++){var _=l[u];f=c[u],y=h[u];switch(OrgChart._slinkRemoveUnusedPoints(_),x.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:OrgChart._slinkAvoidOverlaping(e._connectorLines,_,y,x.orientation);break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:case OrgChart.orientation.right:case OrgChart.orientation.right_top:OrgChart._slinkAvoidOverlaping2(e._connectorLines,_,y,x.orientation)}}for(u=l.length-1;u>=0;u--){_=l[u],f=c[u];switch(x.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:OrgChart._slinkAvoidOverlapingSecond(e._connectorLines,_,x.orientation);break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:case OrgChart.orientation.right:case OrgChart.orientation.right_top:OrgChart._slinkAvoidOverlapingSecond2(e._connectorLines,_,x.orientation)}}for(u=0;u<l.length;u++){_=l[u],f=c[u],x=d[u],g=p[u].from,m=p[u].to;var w=f.template;w||(w="orange");var k=OrgChart.slinkTemplates[w],I=null;switch(k.labelPosition){case"start":I={x:_[1][0],y:_[1][1]};break;case"middle":var S=Math.ceil(_.length/2);I=_findM(_[S],_[S-1]);break;case"end":I={x:_[_.length-2][0],y:_[_.length-2][1]}}var C=structuredClone(_);C[0].unshift("M");for(var L=1;L<_.length;L++)C[L].unshift("L");var A=OrgChart.roundPathCorners(C,OrgChart.LINK_ROUNDED_CORNERS,!1);if(f.label){var E=k.label.replace("{x}",I.x).replace("{y}",I.y).replace("{val}",f.label),N=OrgChart._getLabelSize(E),$=-N.height/2;switch(x.orientation){case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:$=N.height}o+=k.label.replace("{x}",I.x).replace("{y}",I.y+$).replace("{val}",f.label)}var M=g.id,T=m.id;v&&(M=m.id,T=g.id),o+=("<g "+OrgChart.attr.s_link_from+'="{from}" '+OrgChart.attr.s_link_to+'="{to}">').replace("{from}",M).replace("{to}",T)+k.link.replaceAll("{d}",A)+'<path stroke="transparent" stroke-width="15" fill="none" d="'+A+'" />',o+=OrgChart.grCloseTag}i.content+=o},OrgChart.prototype.addSlink=function(e,i,o,a){this._putInUndoStack(),this.clearRedo();for(var s=this.config.slinks.length-1;s>=0;s--){var l=this.config.slinks[s];l.from==e&&l.to==i&&this.config.slinks.splice(s,1)}return this.config.slinks.push({from:e,to:i,label:o,template:a}),this._ai.setContext(),OrgChart.events.publish("updated",[this]),this},OrgChart.prototype.removeSlink=function(e,i){this._putInUndoStack(),this.clearRedo();for(var o=this.config.slinks.length-1;o>=0;o--){var a=this.config.slinks[o];a.from==e&&a.to==i&&this.config.slinks.splice(o,1)}return this._ai.setContext(),OrgChart.events.publish("updated",[this]),this},OrgChart.slinkTemplates={},OrgChart.slinkTemplates.orange={defs:'<marker id="arrowSlinkOrange" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse"><path fill="#F57C00" d="M 0 0 L 10 5 L 0 10 z" /></marker><marker id="dotSlinkOrange" viewBox="0 0 10 10" refX="5" refY="5" markerWidth="5" markerHeight="5"> <circle cx="5" cy="5" r="5" fill="#F57C00" /></marker>',link:'<path stroke-dasharray="4, 2" marker-start="url(#dotSlinkOrange)" marker-end="url(#arrowSlinkOrange)" stroke-linejoin="round" stroke="#F57C00" stroke-width="2" fill="none" d="{d}" />',label:'<text dominant-baseline="middle" fill="#F57C00" alignment-baseline="middle" text-anchor="middle" x="{x}" y="{y}">{val}</text>',labelPosition:"middle"},OrgChart.slinkTemplates.blue={defs:'<marker id="arrowSlinkBlue" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse"><path fill="#039BE5" d="M 0 0 L 10 5 L 0 10 z" /></marker><marker id="dotSlinkBlue" viewBox="0 0 10 10" refX="5" refY="5" markerWidth="5" markerHeight="5"> <circle cx="5" cy="5" r="5" fill="#039BE5" /></marker>',link:'<path stroke-dasharray="4, 2" marker-start="url(#dotSlinkBlue)" marker-end="url(#arrowSlinkBlue)" stroke-linejoin="round" stroke="#039BE5" stroke-width="2" fill="none" d="{d}" />',label:'<text fill="#039BE5" text-anchor="middle" x="{x}" y="{y}">{val}</text>',labelPosition:"middle"},OrgChart.slinkTemplates.yellow={defs:'<marker id="arrowSlinkYellow" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse"><path fill="#FFCA28" d="M 0 0 L 10 5 L 0 10 z" /></marker><marker id="dotSlinkYellow" viewBox="0 0 10 10" refX="5" refY="5" markerWidth="5" markerHeight="5"> <circle cx="5" cy="5" r="5" fill="#FFCA28" /></marker>',link:'<path stroke-dasharray="4, 2" marker-start="url(#dotSlinkYellow)" marker-end="url(#arrowSlinkYellow)" stroke-linejoin="round" stroke="#FFCA28" stroke-width="2" fill="none" d="{d}" />',label:'<text fill="#FFCA28" text-anchor="middle" x="{x}" y="{y}">{val}</text>',labelPosition:"middle"},OrgChart._ai=function(e){this.instance=e,this.sessionId=null};OrgChart._ai.prototype.prompt=function(e,i){var o=this;(e=e.trim())&&(this.sessionId?o._prompt([{Role:"user",Text:e}],i):this.setContext(function(){o._prompt([{Role:"user",Text:e}],i)}))},OrgChart._ai.prototype._prompt=function(e,i){var o=this,a=[];for(var s of OrgChart.AI_SYSTEM_MESSAGES)a.push({Role:"system",Text:s});var l=this.instance.config.serverUrl+`/OrgChartJSAI/Prompt?client_messages=${encodeURIComponent(JSON.stringify(e))}&system_messages=${encodeURIComponent(JSON.stringify(a))}&sessionId=${this.sessionId}`;const c=new EventSource(l);c.onmessage=function(e){var a=JSON.parse(e.data);"end"==a.kind&&c.close(),"text"==a.kind&&(a.text,i&&i(a.text)),"assistant-message-with-tools"==a.kind?o.toolCalls(a.message,i):"error"==a.kind&&console.error(a.text)},c.onerror=function(e){console.error(e),c.close()}},OrgChart._ai.prototype.setContext=function(e){if(this.instance&&this.instance.config.enableAI&&this.instance.aiUI.canSetContext){this.sessionId=this.instance._event_id;var i=this.instance.config.serverUrl+"/OrgChartJSAI/SetContext",o=this.instance.config.aiChatTools.slice();for(var a of o)null==a.functionParameters&&(a.functionParameters=null),a.functionParameters=JSON.stringify(a.functionParameters);fetch(i,{method:"post",headers:{"Content-Type":"application/json","x-request-type":"ajax"},body:JSON.stringify({context:this.instance.config.nodes,sessionId:this.sessionId,chatTools:o})}).then(function(){e&&e()}).catch(function(e){console.error(e)})}},OrgChart._ai.prototype.toolCalls=function(e,i){var o=this,a={toolCalls:e.ToolCalls};OrgChart.events.publish("ai-tool-calls",[this.instance,a]);var s=[],l=[],c=[],d=[],h=[],p=null,u=null,f=null,g=null,m=null;for(var b of a.toolCalls)null==b.FunctionResult&&("removeNode"==b.FunctionName?s.push(b):"addNode"==b.FunctionName?l.push(b):"updateNode"==b.FunctionName?c.push(b):"select"==b.FunctionName?d.push(b):"deselect"==b.FunctionName?h.push(b):"exportToPDF"==b.FunctionName?p=b:"changeTemplate"==b.FunctionName?u=b:"addSlink"==b.FunctionName?f=b:"removeSlink"==b.FunctionName?g=b:"fit"==b.FunctionName&&(m=b));var x=!1;if(u&&(x=!0,b.FunctionResult="ok",this.instance.config.template=b.FunctionArguments.templateName),f){var v=this.instance.getNode(b.FunctionArguments.employeeId1),y=this.instance.getNode(b.FunctionArguments.employeeId2);v&&y&&v!=y?(x=!0,this.instance.addSlink(v.id,y.id),b.FunctionResult="ok"):b.FunctionResult=`Cannot add link between ${b.FunctionArguments.employeeId1} and ${b.FunctionArguments.employeeId2}`}if(g){v=this.instance.getNode(b.FunctionArguments.employeeId1),y=this.instance.getNode(b.FunctionArguments.employeeId2);v&&y&&v!=y?(x=!0,this.instance.removeSlink(v.id,y.id),b.FunctionResult="ok"):b.FunctionResult=`Cannot remove link between ${b.FunctionArguments.employeeId1} and ${b.FunctionArguments.employeeId2}`}for(var b of(m&&(this.instance.fit(),x=!1),s))x=!0,b.FunctionResult="ok",this.instance.remove(b.FunctionArguments.id);for(var b of l){x=!0,b.FunctionResult="ok",(_=JSON.parse(JSON.stringify(b.FunctionArguments))).isAssistant&&(_.tags=["assistant"]),delete _.isAssistant,OrgChart.isNEU(_.id)&&(_.id=this.instance.generateId()),this.instance.add(_)}for(var b of c){x=!0,b.FunctionResult="ok";var _=this.instance.get(b.FunctionArguments.id);for(var w in b.FunctionArguments)"id"!=w&&null!=b.FunctionArguments[w]&&(_[w]=b.FunctionArguments[w]);this.instance.update(_)}for(var b of d)for(var k of(b.FunctionResult="ok",b.FunctionArguments.ids)){var I=b.FunctionArguments.color;I||(I="#FFCA28");var S=this.instance.getNodeElement(k).firstChild;S&&(S.style.stroke=b.FunctionArguments.color,S.style.strokeWidth=5)}var deselect=function(){for(var e of h)if(e.FunctionResult="ok",e.FunctionArguments.ids)for(var i of e.FunctionArguments.ids){var a=o.instance.getNodeElement(i).firstChild;a&&(a.style.stroke="#aeaeae",a.style.strokeWidth=1)}else x=!0};x?(this.setContext(),this.instance.draw(OrgChart.action.update,void 0,deselect)):deselect();var prompt=function(){var e=[];for(var s of a.toolCalls)e.push({Role:"tool",Text:s.FunctionResult,Id:s.Id});o._prompt(e,i)};p?this.chartInstance.exportToPDF({},function(){b.FunctionResult="ok",OrgChart._downloadFile("application/pdf",response,"OrgChart.pdf",!1,"pdf"),prompt()}):prompt()},OrgChart.aiUI=function(){this.instance=null,this.interval=null,this.canSetContext=!1,this.element=null,this.inputElement=null,this.btnSendElement=null,this.messagesElement=null,Object.defineProperty(this,"width",{get(){return this.isVisible()?this.element.offsetWidth:0}})},OrgChart.aiUI.title="AI for OrgChart JS",OrgChart.aiUI.prototype.init=function(e){this.instance=e;var i=this,o=this.instance.element.querySelector("[data-boc-ai-button]");o&&o.addEventListener("click",function(e){i.show()})},OrgChart.aiUI.prototype.isVisible=function(){return!(!this.element||"none"==this.element.style.display)},OrgChart.aiUI.prototype.show=function(e,i){this.instance.pdfPreviewUI.hide(),this.instance.svgPreviewUI.hide(),this.instance.pngPreviewUI.hide(),this.instance.powerPointPreviewUI.hide(),this.instance.aiUI.hide(),this.instance.orgScribeUI.hide(),this._create(),this.element.style.display="",this.canSetContext||(this.canSetContext=!0,this.instance._ai.setContext());var o=this;i||(this.timeout&&clearInterval(this.interval),this.interval=OrgChart.animate(this.element,{opacity:0},{opacity:1},300,OrgChart.anim.outSin,function(){e||o.inputElement.focus()}))},OrgChart.aiUI.prototype._create=function(){if(!this.element){var e=this,i="inp_"+this.instance.generateId();this.element=document.createElement("div"),this.element.setAttribute("data-boc-ai-form",""),this.element.style.opacity=0,this.element.classList.add("boc-ai-form"),this.element.classList.add(this.instance.config.mode),this.element.innerHTML=`<div class="boc-ai-container">\n <div data-boc-ai-close class="boc-ai-close">${OrgChart.icon.x(20,20,"#aeaeae")}</div>\n <div class="boc-ai-middle boc-ai-start">\n <div data-boc-ai-messages class="boc-ai-messages">\n <img src="https://orgchartjs.balkan.app/logo.svg">&nbsp;\n <span>\n ${OrgChart.aiUI.title}\n </span>\n </div> \n </div>\n <div>\n <div class="boc-input" data-boc-input="">\n <label for="${i}">Message OrgChart</label>\n <input maxlength="256" id="${i}" name="${i}" type="text" value="" autocomplete="off"> \n <div data-boc-ai-send class="boc-ai-send">\n ${OrgChart.icon.send(20,20,"#aeaeae")}\n </div> \n </div>\n \n </div>\n </div>`,this.instance.leftElement.appendChild(this.element),this.instance.leftElement.style.display="block",OrgChart.input.init(this.element);var o=this.instance.leftElement.querySelector("[data-boc-ai-close] svg");o&&o.addEventListener("click",function(i){e.hide()}),this.inputElement=this.element.querySelector("#"+i),this.btnSendElement=this.inputElement.parentNode.querySelector("[data-boc-ai-send]"),this.messagesElement=this.element.querySelector("[data-boc-ai-messages]"),this.inputElement.addEventListener("input",function(e){this.value?this.parentNode.querySelector(".boc-ai-send").classList.add("boc-ai-send-cansend"):this.parentNode.querySelector(".boc-ai-send").classList.remove("boc-ai-send-cansend")}),this.element.querySelector("[data-boc-ai-send]").addEventListener("click",function(i){e.sendUserInput()}),this.inputElement.addEventListener("keyup",function(i){var o=window.event?window.event:i;switch(e.canSetContext||(e.canSetContext=!0,e.instance._ai.setContext()),o.key){case"Enter":e.sendUserInput();break;case"ArrowUp":if((a=OrgChart.aiUI._getSuggestions()).length)-1==(s=a.indexOf(e.inputElement.value))?s=a.length-1:s--,-1==s&&(s=a.length-1),e.inputElement.value=a[s];break;case"ArrowDown":var a,s;if((a=OrgChart.aiUI._getSuggestions()).length)-1==(s=a.indexOf(e.inputElement.value))?s=0:s++,s==a.length&&(s=0),e.inputElement.value=a[s]}})}},OrgChart.aiUI.prototype.addUserMessage=function(e){this.btnSendElement.classList.remove("boc-ai-send-cansend");var i=this.element.querySelector(".boc-ai-start");i&&(i.classList.remove("boc-ai-start"),this.messagesElement.innerHTML="");var o=document.createElement("div");o.classList.add("boc-ai-user-message"),o.innerHTML=`<span class="boc-inner-user-message">${e}</span>`,this.messagesElement.appendChild(o)},OrgChart.aiUI.prototype.hide=function(){this.instance.leftElement.style.display="none",this.element&&(this.element.parentNode.removeChild(this.element),this.element=null)},OrgChart.aiUI.prototype.sendUserInput=function(){var e=this;OrgChart.aiUI._addSuggestion(this.inputElement.value),this.addUserMessage(this.inputElement.value);var i=document.createElement("div");i.classList.add("boc-ai-assistant-message");var o=document.createElement("span");o.classList.add("boc-inner-assistant-message"),i.appendChild(o),this.messagesElement.appendChild(i);var a="";this.instance._ai.prompt(this.inputElement.value,function(i){a+=i,o.innerHTML=marked.parse(a);var s=e.element.querySelector(".boc-ai-middle");s.scrollTo(0,s.scrollHeight)}),this.inputElement.value=""},OrgChart.aiUI._addSuggestion=function(e){e=e.trim();var i=OrgChart.aiUI._getSuggestions(),o=i.indexOf(e);-1!=o&&i.splice(o,1),i.push(e),localStorage.setItem("suggestions",JSON.stringify(i))},OrgChart.aiUI._getSuggestions=function(){var e=localStorage.getItem("suggestions");return e=e?JSON.parse(e):[]},OrgChart.orgScribeUI=function(){this.instance=null,this.element=null,this.textAreaElement=null,this._timeout=null,Object.defineProperty(this,"width",{get(){return this.isVisible()?this.element.offsetWidth:0}})},OrgChart.orgScribeUI.prototype.init=function(e){this.instance=e},OrgChart.events.on("updated",function(e,i){if(e.orgScribeUI.isVisible()){var o=OrgChart._convertFromNodesToText(e.config.nodes,OrgChart.ORGSCRIBE_OFFSET);e.orgScribeUI.textAreaElement.value=o}}),OrgChart.orgScribeUI.prototype.isVisible=function(){return!(!this.element||"none"==this.element.style.display)},OrgChart.orgScribeUI.prototype.show=function(e,i){this.instance.pdfPreviewUI.hide(),this.instance.svgPreviewUI.hide(),this.instance.pngPreviewUI.hide(),this.instance.powerPointPreviewUI.hide(),this.instance.aiUI.hide(),this.instance.orgScribeUI.hide(),this._create(),this.element.style.display="";var o=this;i||(this.timeout&&clearInterval(this.interval),this.interval=OrgChart.animate(this.element,{opacity:0},{opacity:1},300,OrgChart.anim.outSin,function(){if(!e){var i=o.textAreaElement.value.length;o.textAreaElement.focus(),o.textAreaElement.setSelectionRange(i,i)}}))},OrgChart.orgScribeUI.prototype._create=function(){if(!this.element){var e=this;this.element=document.createElement("div"),this.element.setAttribute("data-boc-orgscribe-form",""),this.element.style.opacity=0,this.element.classList.add("boc-orgscribe-form"),this.element.classList.add(this.instance.config.mode);var i=OrgChart._convertFromNodesToText(this.instance.config.nodes,OrgChart.ORGSCRIBE_OFFSET);this.element.innerHTML=`<div class="boc-orgscribe-container">\n <div data-boc-orgscribe-close class="boc-orgscribe-close">${OrgChart.icon.x(20,20,"#aeaeae")}</div> \n <div>\n <textarea wrap="off" class="boc-orgscribe-txt" data-id="boc_orgscribe_txt">${i}</textarea>\n </div>\n </div>`,this.instance.leftElement.appendChild(this.element),this.instance.leftElement.style.display="block";var o=this.instance.leftElement.querySelector("[data-boc-orgscribe-close] svg");o&&o.addEventListener("click",function(i){e.hide()}),this.textAreaElement=this.element.querySelector('[data-id="boc_orgscribe_txt"]'),this.textAreaElement.addEventListener("input",function(){e._timeout&&(clearTimeout(e._timeout),e._timeout=null);var i=this.value;e._timeout=setTimeout(function(){var o=OrgChart._convertTextToNodes(i,OrgChart.ORGSCRIBE_OFFSET);e.instance.load(o)},500)})}},OrgChart.orgScribeUI.prototype.hide=function(){this.element&&(this.element.parentNode.removeChild(this.element),this.element=null)},i=void 0,o=function(e){"use strict";function t(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function n(i){e.defaults=i}e.defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};const i={exec:()=>null};function r(e,i=""){let a="string"==typeof e?e:e.source;const s={replace:(e,i)=>{let l="string"==typeof i?i:i.source;return l=l.replace(o.caret,"$1"),a=a.replace(e,l),s},getRegex:()=>new RegExp(a,i)};return s}const o={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},a=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,s=/(?:[*+-]|\d{1,9}[.)])/,l=r(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,s).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),c=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,d=/(?!\s*\])(?:\\.|[^\[\]\\])+/,h=r(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",d).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),p=r(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,s).getRegex(),u="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",f=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,g=r("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",f).replace("tag",u).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),m=r(c).replace("hr",a).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",u).getRegex(),b={blockquote:r(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",m).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:h,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:a,html:g,lheading:l,list:p,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:m,table:i,text:/^[^\n]+/},x=r("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",a).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",u).getRegex(),v={...b,table:x,paragraph:r(c).replace("hr",a).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",x).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",u).getRegex()},y={...b,html:r("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",f).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:i,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:r(c).replace("hr",a).replace("heading"," *#{1,6} *[^\n]").replace("lheading",l).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},_=/^( {2,}|\\)\n(?!\s*$)/,w=/[\p{P}\p{S}]/u,k=/[\s\p{P}\p{S}]/u,I=/[^\s\p{P}\p{S}]/u,S=r(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,k).getRegex(),C=/(?!~)[\p{P}\p{S}]/u,L=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,A=r(L,"u").replace(/punct/g,w).getRegex(),E=r(L,"u").replace(/punct/g,C).getRegex(),N="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",$=r(N,"gu").replace(/notPunctSpace/g,I).replace(/punctSpace/g,k).replace(/punct/g,w).getRegex(),M=r(N,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,C).getRegex(),T=r("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,I).replace(/punctSpace/g,k).replace(/punct/g,w).getRegex(),P=r(/\\(punct)/,"gu").replace(/punct/g,w).getRegex(),U=r(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),O=r(f).replace("(?:--\x3e|$)","--\x3e").getRegex(),R=r("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",O).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),B=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,F=r(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",B).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),H=r(/^!?\[(label)\]\[(ref)\]/).replace("label",B).replace("ref",d).getRegex(),D=r(/^!?\[(ref)\](?:\[\])?/).replace("ref",d).getRegex(),z={_backpedal:i,anyPunctuation:P,autolink:U,blockSkip:/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,br:_,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:i,emStrongLDelim:A,emStrongRDelimAst:$,emStrongRDelimUnd:T,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:F,nolink:D,punctuation:S,reflink:H,reflinkSearch:r("reflink|nolink(?!\\()","g").replace("reflink",H).replace("nolink",D).getRegex(),tag:R,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:i},j={...z,link:r(/^!?\[(label)\]\((.*?)\)/).replace("label",B).getRegex(),reflink:r(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",B).getRegex()},q={...z,emStrongRDelimAst:M,emStrongLDelim:E,url:r(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},X={...q,br:r(_).replace("{2,}","*").getRegex(),text:r(q.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},G={normal:b,gfm:v,pedantic:y},Z={normal:z,gfm:q,breaks:X,pedantic:j},Q={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},J=e=>Q[e];function K(e,i){if(i){if(o.escapeTest.test(e))return e.replace(o.escapeReplace,J)}else if(o.escapeTestNoEncode.test(e))return e.replace(o.escapeReplaceNoEncode,J);return e}function V(e){try{e=encodeURI(e).replace(o.percentDecode,"%")}catch{return null}return e}function W(e,i){const a=e.replace(o.findPipe,(e,i,o)=>{let a=!1,s=i;for(;--s>=0&&"\\"===o[s];)a=!a;return a?"|":" |"}).split(o.splitPipe);let s=0;if(a[0].trim()||a.shift(),a.length>0&&!a.at(-1)?.trim()&&a.pop(),i)if(a.length>i)a.splice(i);else for(;a.length<i;)a.push("");for(;s<a.length;s++)a[s]=a[s].trim().replace(o.slashPipe,"|");return a}function Y(e,i,o){const a=e.length;if(0===a)return"";let s=0;for(;s<a&&e.charAt(a-s-1)===i;)s++;return e.slice(0,a-s)}function ee(e,i,o,a,s){const l=i.href,c=i.title||null,d=e[1].replace(s.other.outputLinkReplace,"$1");if("!"!==e[0].charAt(0)){a.state.inLink=!0;const e={type:"link",raw:o,href:l,title:c,text:d,tokens:a.inlineTokens(d)};return a.state.inLink=!1,e}return{type:"image",raw:o,href:l,title:c,text:d}}class te{options;rules;lexer;constructor(i){this.options=i||e.defaults}space(e){const i=this.rules.block.newline.exec(e);if(i&&i[0].length>0)return{type:"space",raw:i[0]}}code(e){const i=this.rules.block.code.exec(e);if(i){const e=i[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:i[0],codeBlockStyle:"indented",text:this.options.pedantic?e:Y(e,"\n")}}}fences(e){const i=this.rules.block.fences.exec(e);if(i){const e=i[0],o=function(e,i,o){const a=e.match(o.other.indentCodeCompensation);if(null===a)return i;const s=a[1];return i.split("\n").map(e=>{const i=e.match(o.other.beginningSpace);if(null===i)return e;const[a]=i;return a.length>=s.length?e.slice(s.length):e}).join("\n")}(e,i[3]||"",this.rules);return{type:"code",raw:e,lang:i[2]?i[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):i[2],text:o}}}heading(e){const i=this.rules.block.heading.exec(e);if(i){let e=i[2].trim();if(this.rules.other.endingHash.test(e)){const i=Y(e,"#");this.options.pedantic?e=i.trim():i&&!this.rules.other.endingSpaceChar.test(i)||(e=i.trim())}return{type:"heading",raw:i[0],depth:i[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const i=this.rules.block.hr.exec(e);if(i)return{type:"hr",raw:Y(i[0],"\n")}}blockquote(e){const i=this.rules.block.blockquote.exec(e);if(i){let e=Y(i[0],"\n").split("\n"),o="",a="";const s=[];for(;e.length>0;){let i=!1;const l=[];let c;for(c=0;c<e.length;c++)if(this.rules.other.blockquoteStart.test(e[c]))l.push(e[c]),i=!0;else{if(i)break;l.push(e[c])}e=e.slice(c);const d=l.join("\n"),h=d.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");o=o?`${o}\n${d}`:d,a=a?`${a}\n${h}`:h;const p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(h,s,!0),this.lexer.state.top=p,0===e.length)break;const u=s.at(-1);if("code"===u?.type)break;if("blockquote"===u?.type){const i=u,l=i.raw+"\n"+e.join("\n"),c=this.blockquote(l);s[s.length-1]=c,o=o.substring(0,o.length-i.raw.length)+c.raw,a=a.substring(0,a.length-i.text.length)+c.text;break}if("list"!==u?.type);else{const i=u,l=i.raw+"\n"+e.join("\n"),c=this.list(l);s[s.length-1]=c,o=o.substring(0,o.length-u.raw.length)+c.raw,a=a.substring(0,a.length-i.raw.length)+c.raw,e=l.substring(s.at(-1).raw.length).split("\n")}}return{type:"blockquote",raw:o,tokens:s,text:a}}}list(e){let i=this.rules.block.list.exec(e);if(i){let o=i[1].trim();const a=o.length>1,s={type:"list",raw:"",ordered:a,start:a?+o.slice(0,-1):"",loose:!1,items:[]};o=a?`\\d{1,9}\\${o.slice(-1)}`:`\\${o}`,this.options.pedantic&&(o=a?o:"[*+-]");const l=this.rules.other.listItemRegex(o);let c=!1;for(;e;){let o=!1,a="",d="";if(!(i=l.exec(e)))break;if(this.rules.block.hr.test(e))break;a=i[0],e=e.substring(a.length);let h=i[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,e=>" ".repeat(3*e.length)),p=e.split("\n",1)[0],u=!h.trim(),f=0;if(this.options.pedantic?(f=2,d=h.trimStart()):u?f=i[1].length+1:(f=i[2].search(this.rules.other.nonSpaceChar),f=f>4?1:f,d=h.slice(f),f+=i[1].length),u&&this.rules.other.blankLine.test(p)&&(a+=p+"\n",e=e.substring(p.length+1),o=!0),!o){const i=this.rules.other.nextBulletRegex(f),o=this.rules.other.hrRegex(f),s=this.rules.other.fencesBeginRegex(f),l=this.rules.other.headingBeginRegex(f),c=this.rules.other.htmlBeginRegex(f);for(;e;){const g=e.split("\n",1)[0];let m;if(p=g,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),m=p):m=p.replace(this.rules.other.tabCharGlobal," "),s.test(p))break;if(l.test(p))break;if(c.test(p))break;if(i.test(p))break;if(o.test(p))break;if(m.search(this.rules.other.nonSpaceChar)>=f||!p.trim())d+="\n"+m.slice(f);else{if(u)break;if(h.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4)break;if(s.test(h))break;if(l.test(h))break;if(o.test(h))break;d+="\n"+p}u||p.trim()||(u=!0),a+=g+"\n",e=e.substring(g.length+1),h=m.slice(f)}}s.loose||(c?s.loose=!0:this.rules.other.doubleBlankLine.test(a)&&(c=!0));let g,m=null;this.options.gfm&&(m=this.rules.other.listIsTask.exec(d),m&&(g="[ ] "!==m[0],d=d.replace(this.rules.other.listReplaceTask,""))),s.items.push({type:"list_item",raw:a,task:!!m,checked:g,loose:!1,text:d,tokens:[]}),s.raw+=a}const d=s.items.at(-1);if(!d)return;d.raw=d.raw.trimEnd(),d.text=d.text.trimEnd(),s.raw=s.raw.trimEnd();for(let e=0;e<s.items.length;e++)if(this.lexer.state.top=!1,s.items[e].tokens=this.lexer.blockTokens(s.items[e].text,[]),!s.loose){const i=s.items[e].tokens.filter(e=>"space"===e.type);s.loose=i.length>0&&i.some(e=>this.rules.other.anyLine.test(e.raw))}if(s.loose)for(let e=0;e<s.items.length;e++)s.items[e].loose=!0;return s}}html(e){const i=this.rules.block.html.exec(e);if(i)return{type:"html",block:!0,raw:i[0],pre:"pre"===i[1]||"script"===i[1]||"style"===i[1],text:i[0]}}def(e){const i=this.rules.block.def.exec(e);if(i){const e=i[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),o=i[2]?i[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=i[3]?i[3].substring(1,i[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):i[3];return{type:"def",tag:e,raw:i[0],href:o,title:a}}}table(e){const i=this.rules.block.table.exec(e);if(!i)return;if(!this.rules.other.tableDelimiter.test(i[2]))return;const o=W(i[1]),a=i[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=i[3]?.trim()?i[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],l={type:"table",raw:i[0],header:[],align:[],rows:[]};if(o.length===a.length){for(const e of a)this.rules.other.tableAlignRight.test(e)?l.align.push("right"):this.rules.other.tableAlignCenter.test(e)?l.align.push("center"):this.rules.other.tableAlignLeft.test(e)?l.align.push("left"):l.align.push(null);for(let e=0;e<o.length;e++)l.header.push({text:o[e],tokens:this.lexer.inline(o[e]),header:!0,align:l.align[e]});for(const e of s)l.rows.push(W(e,l.header.length).map((e,i)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:l.align[i]})));return l}}lheading(e){const i=this.rules.block.lheading.exec(e);if(i)return{type:"heading",raw:i[0],depth:"="===i[2].charAt(0)?1:2,text:i[1],tokens:this.lexer.inline(i[1])}}paragraph(e){const i=this.rules.block.paragraph.exec(e);if(i){const e="\n"===i[1].charAt(i[1].length-1)?i[1].slice(0,-1):i[1];return{type:"paragraph",raw:i[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const i=this.rules.block.text.exec(e);if(i)return{type:"text",raw:i[0],text:i[0],tokens:this.lexer.inline(i[0])}}escape(e){const i=this.rules.inline.escape.exec(e);if(i)return{type:"escape",raw:i[0],text:i[1]}}tag(e){const i=this.rules.inline.tag.exec(e);if(i)return!this.lexer.state.inLink&&this.rules.other.startATag.test(i[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(i[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(i[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(i[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:i[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:i[0]}}link(e){const i=this.rules.inline.link.exec(e);if(i){const e=i[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;const i=Y(e.slice(0,-1),"\\");if((e.length-i.length)%2==0)return}else{const e=function(e,i){if(-1===e.indexOf(i[1]))return-1;let o=0;for(let a=0;a<e.length;a++)if("\\"===e[a])a++;else if(e[a]===i[0])o++;else if(e[a]===i[1]&&(o--,o<0))return a;return-1}(i[2],"()");if(e>-1){const o=(0===i[0].indexOf("!")?5:4)+i[1].length+e;i[2]=i[2].substring(0,e),i[0]=i[0].substring(0,o).trim(),i[3]=""}}let o=i[2],a="";if(this.options.pedantic){const e=this.rules.other.pedanticHrefTitle.exec(o);e&&(o=e[1],a=e[3])}else a=i[3]?i[3].slice(1,-1):"";return o=o.trim(),this.rules.other.startAngleBracket.test(o)&&(o=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?o.slice(1):o.slice(1,-1)),ee(i,{href:o?o.replace(this.rules.inline.anyPunctuation,"$1"):o,title:a?a.replace(this.rules.inline.anyPunctuation,"$1"):a},i[0],this.lexer,this.rules)}}reflink(e,i){let o;if((o=this.rules.inline.reflink.exec(e))||(o=this.rules.inline.nolink.exec(e))){const e=i[(o[2]||o[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!e){const e=o[0].charAt(0);return{type:"text",raw:e,text:e}}return ee(o,e,o[0],this.lexer,this.rules)}}emStrong(e,i,o=""){let a=this.rules.inline.emStrongLDelim.exec(e);if(a&&(!a[3]||!o.match(this.rules.other.unicodeAlphaNumeric))&&(!a[1]&&!a[2]||!o||this.rules.inline.punctuation.exec(o))){const o=[...a[0]].length-1;let s,l,c=o,d=0;const h="*"===a[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,i=i.slice(-1*e.length+o);null!=(a=h.exec(i));){if(s=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!s)continue;if(l=[...s].length,a[3]||a[4]){c+=l;continue}if((a[5]||a[6])&&o%3&&!((o+l)%3)){d+=l;continue}if(c-=l,c>0)continue;l=Math.min(l,l+c+d);const i=[...a[0]][0].length,h=e.slice(0,o+a.index+i+l);if(Math.min(o,l)%2){const e=h.slice(1,-1);return{type:"em",raw:h,text:e,tokens:this.lexer.inlineTokens(e)}}const p=h.slice(2,-2);return{type:"strong",raw:h,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(e){const i=this.rules.inline.code.exec(e);if(i){let e=i[2].replace(this.rules.other.newLineCharGlobal," ");const o=this.rules.other.nonSpaceChar.test(e),a=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return o&&a&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:i[0],text:e}}}br(e){const i=this.rules.inline.br.exec(e);if(i)return{type:"br",raw:i[0]}}del(e){const i=this.rules.inline.del.exec(e);if(i)return{type:"del",raw:i[0],text:i[2],tokens:this.lexer.inlineTokens(i[2])}}autolink(e){const i=this.rules.inline.autolink.exec(e);if(i){let e,o;return"@"===i[2]?(e=i[1],o="mailto:"+e):(e=i[1],o=e),{type:"link",raw:i[0],text:e,href:o,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let i;if(i=this.rules.inline.url.exec(e)){let e,o;if("@"===i[2])e=i[0],o="mailto:"+e;else{let a;do{a=i[0],i[0]=this.rules.inline._backpedal.exec(i[0])?.[0]??""}while(a!==i[0]);e=i[0],o="www."===i[1]?"http://"+i[0]:i[0]}return{type:"link",raw:i[0],text:e,href:o,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const i=this.rules.inline.text.exec(e);if(i){const e=this.lexer.state.inRawBlock;return{type:"text",raw:i[0],text:i[0],escaped:e}}}}class ne{tokens;options;state;tokenizer;inlineQueue;constructor(i){this.tokens=[],this.tokens.links=Object.create(null),this.options=i||e.defaults,this.options.tokenizer=this.options.tokenizer||new te,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const a={other:o,block:G.normal,inline:Z.normal};this.options.pedantic?(a.block=G.pedantic,a.inline=Z.pedantic):this.options.gfm&&(a.block=G.gfm,this.options.breaks?a.inline=Z.breaks:a.inline=Z.gfm),this.tokenizer.rules=a}static get rules(){return{block:G,inline:Z}}static lex(e,i){return new ne(i).lex(e)}static lexInline(e,i){return new ne(i).inlineTokens(e)}lex(e){e=e.replace(o.carriageReturn,"\n"),this.blockTokens(e,this.tokens);for(let i=0;i<this.inlineQueue.length;i++){const e=this.inlineQueue[i];this.inlineTokens(e.src,e.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,i=[],a=!1){for(this.options.pedantic&&(e=e.replace(o.tabCharGlobal," ").replace(o.spaceLine,""));e;){let o;if(this.options.extensions?.block?.some(a=>!!(o=a.call({lexer:this},e,i))&&(e=e.substring(o.raw.length),i.push(o),!0)))continue;if(o=this.tokenizer.space(e)){e=e.substring(o.raw.length);const a=i.at(-1);1===o.raw.length&&void 0!==a?a.raw+="\n":i.push(o);continue}if(o=this.tokenizer.code(e)){e=e.substring(o.raw.length);const a=i.at(-1);"paragraph"===a?.type||"text"===a?.type?(a.raw+="\n"+o.raw,a.text+="\n"+o.text,this.inlineQueue.at(-1).src=a.text):i.push(o);continue}if(o=this.tokenizer.fences(e)){e=e.substring(o.raw.length),i.push(o);continue}if(o=this.tokenizer.heading(e)){e=e.substring(o.raw.length),i.push(o);continue}if(o=this.tokenizer.hr(e)){e=e.substring(o.raw.length),i.push(o);continue}if(o=this.tokenizer.blockquote(e)){e=e.substring(o.raw.length),i.push(o);continue}if(o=this.tokenizer.list(e)){e=e.substring(o.raw.length),i.push(o);continue}if(o=this.tokenizer.html(e)){e=e.substring(o.raw.length),i.push(o);continue}if(o=this.tokenizer.def(e)){e=e.substring(o.raw.length);const a=i.at(-1);"paragraph"===a?.type||"text"===a?.type?(a.raw+="\n"+o.raw,a.text+="\n"+o.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title});continue}if(o=this.tokenizer.table(e)){e=e.substring(o.raw.length),i.push(o);continue}if(o=this.tokenizer.lheading(e)){e=e.substring(o.raw.length),i.push(o);continue}let s=e;if(this.options.extensions?.startBlock){let i=1/0;const o=e.slice(1);let a;this.options.extensions.startBlock.forEach(e=>{a=e.call({lexer:this},o),"number"==typeof a&&a>=0&&(i=Math.min(i,a))}),i<1/0&&i>=0&&(s=e.substring(0,i+1))}if(this.state.top&&(o=this.tokenizer.paragraph(s))){const l=i.at(-1);a&&"paragraph"===l?.type?(l.raw+="\n"+o.raw,l.text+="\n"+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):i.push(o),a=s.length!==e.length,e=e.substring(o.raw.length)}else if(o=this.tokenizer.text(e)){e=e.substring(o.raw.length);const a=i.at(-1);"text"===a?.type?(a.raw+="\n"+o.raw,a.text+="\n"+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):i.push(o)}else if(e){const i="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(i);break}throw new Error(i)}}return this.state.top=!0,i}inline(e,i=[]){return this.inlineQueue.push({src:e,tokens:i}),i}inlineTokens(e,i=[]){let o=e,a=null;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(a=this.tokenizer.rules.inline.reflinkSearch.exec(o));)e.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(o=o.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(a=this.tokenizer.rules.inline.blockSkip.exec(o));)o=o.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(a=this.tokenizer.rules.inline.anyPunctuation.exec(o));)o=o.slice(0,a.index)+"++"+o.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let s=!1,l="";for(;e;){let a;if(s||(l=""),s=!1,this.options.extensions?.inline?.some(o=>!!(a=o.call({lexer:this},e,i))&&(e=e.substring(a.raw.length),i.push(a),!0)))continue;if(a=this.tokenizer.escape(e)){e=e.substring(a.raw.length),i.push(a);continue}if(a=this.tokenizer.tag(e)){e=e.substring(a.raw.length),i.push(a);continue}if(a=this.tokenizer.link(e)){e=e.substring(a.raw.length),i.push(a);continue}if(a=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(a.raw.length);const o=i.at(-1);"text"===a.type&&"text"===o?.type?(o.raw+=a.raw,o.text+=a.text):i.push(a);continue}if(a=this.tokenizer.emStrong(e,o,l)){e=e.substring(a.raw.length),i.push(a);continue}if(a=this.tokenizer.codespan(e)){e=e.substring(a.raw.length),i.push(a);continue}if(a=this.tokenizer.br(e)){e=e.substring(a.raw.length),i.push(a);continue}if(a=this.tokenizer.del(e)){e=e.substring(a.raw.length),i.push(a);continue}if(a=this.tokenizer.autolink(e)){e=e.substring(a.raw.length),i.push(a);continue}if(!this.state.inLink&&(a=this.tokenizer.url(e))){e=e.substring(a.raw.length),i.push(a);continue}let c=e;if(this.options.extensions?.startInline){let i=1/0;const o=e.slice(1);let a;this.options.extensions.startInline.forEach(e=>{a=e.call({lexer:this},o),"number"==typeof a&&a>=0&&(i=Math.min(i,a))}),i<1/0&&i>=0&&(c=e.substring(0,i+1))}if(a=this.tokenizer.inlineText(c)){e=e.substring(a.raw.length),"_"!==a.raw.slice(-1)&&(l=a.raw.slice(-1)),s=!0;const o=i.at(-1);"text"===o?.type?(o.raw+=a.raw,o.text+=a.text):i.push(a)}else if(e){const i="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(i);break}throw new Error(i)}}return i}}class se{options;parser;constructor(i){this.options=i||e.defaults}space(e){return""}code({text:e,lang:i,escaped:a}){const s=(i||"").match(o.notSpaceStart)?.[0],l=e.replace(o.endingNewline,"")+"\n";return s?'<pre><code class="language-'+K(s)+'">'+(a?l:K(l,!0))+"</code></pre>\n":"<pre><code>"+(a?l:K(l,!0))+"</code></pre>\n"}blockquote({tokens:e}){return`<blockquote>\n${this.parser.parse(e)}</blockquote>\n`}html({text:e}){return e}heading({tokens:e,depth:i}){return`<h${i}>${this.parser.parseInline(e)}</h${i}>\n`}hr(e){return"<hr>\n"}list(e){const i=e.ordered,o=e.start;let a="";for(let l=0;l<e.items.length;l++){const i=e.items[l];a+=this.listitem(i)}const s=i?"ol":"ul";return"<"+s+(i&&1!==o?' start="'+o+'"':"")+">\n"+a+"</"+s+">\n"}listitem(e){let i="";if(e.task){const o=this.checkbox({checked:!!e.checked});e.loose?"paragraph"===e.tokens[0]?.type?(e.tokens[0].text=o+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=o+" "+K(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:o+" ",text:o+" ",escaped:!0}):i+=o+" "}return i+=this.parser.parse(e.tokens,!!e.loose),`<li>${i}</li>\n`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>\n`}table(e){let i="",o="";for(let s=0;s<e.header.length;s++)o+=this.tablecell(e.header[s]);i+=this.tablerow({text:o});let a="";for(let s=0;s<e.rows.length;s++){const i=e.rows[s];o="";for(let e=0;e<i.length;e++)o+=this.tablecell(i[e]);a+=this.tablerow({text:o})}return a&&(a=`<tbody>${a}</tbody>`),"<table>\n<thead>\n"+i+"</thead>\n"+a+"</table>\n"}tablerow({text:e}){return`<tr>\n${e}</tr>\n`}tablecell(e){const i=this.parser.parseInline(e.tokens),o=e.header?"th":"td";return(e.align?`<${o} align="${e.align}">`:`<${o}>`)+i+`</${o}>\n`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${K(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:i,tokens:o}){const a=this.parser.parseInline(o),s=V(e);if(null===s)return a;let l='<a href="'+(e=s)+'"';return i&&(l+=' title="'+K(i)+'"'),l+=">"+a+"</a>",l}image({href:e,title:i,text:o}){const a=V(e);if(null===a)return K(o);let s=`<img src="${e=a}" alt="${o}"`;return i&&(s+=` title="${K(i)}"`),s+=">",s}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:K(e.text)}}class re{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}}class ie{options;renderer;textRenderer;constructor(i){this.options=i||e.defaults,this.options.renderer=this.options.renderer||new se,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new re}static parse(e,i){return new ie(i).parse(e)}static parseInline(e,i){return new ie(i).parseInline(e)}parse(e,i=!0){let o="";for(let a=0;a<e.length;a++){const s=e[a];if(this.options.extensions?.renderers?.[s.type]){const e=s,i=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==i||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(e.type)){o+=i||"";continue}}const l=s;switch(l.type){case"space":o+=this.renderer.space(l);continue;case"hr":o+=this.renderer.hr(l);continue;case"heading":o+=this.renderer.heading(l);continue;case"code":o+=this.renderer.code(l);continue;case"table":o+=this.renderer.table(l);continue;case"blockquote":o+=this.renderer.blockquote(l);continue;case"list":o+=this.renderer.list(l);continue;case"html":o+=this.renderer.html(l);continue;case"paragraph":o+=this.renderer.paragraph(l);continue;case"text":{let s=l,c=this.renderer.text(s);for(;a+1<e.length&&"text"===e[a+1].type;)s=e[++a],c+="\n"+this.renderer.text(s);o+=i?this.renderer.paragraph({type:"paragraph",raw:c,text:c,tokens:[{type:"text",raw:c,text:c,escaped:!0}]}):c;continue}default:{const e='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return o}parseInline(e,i=this.renderer){let o="";for(let a=0;a<e.length;a++){const s=e[a];if(this.options.extensions?.renderers?.[s.type]){const e=this.options.extensions.renderers[s.type].call({parser:this},s);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){o+=e||"";continue}}const l=s;switch(l.type){case"escape":case"text":o+=i.text(l);break;case"html":o+=i.html(l);break;case"link":o+=i.link(l);break;case"image":o+=i.image(l);break;case"strong":o+=i.strong(l);break;case"em":o+=i.em(l);break;case"codespan":o+=i.codespan(l);break;case"br":o+=i.br(l);break;case"del":o+=i.del(l);break;default:{const e='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return o}}class le{options;block;constructor(i){this.options=i||e.defaults}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?ne.lex:ne.lexInline}provideParser(){return this.block?ie.parse:ie.parseInline}}class oe{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=ie;Renderer=se;TextRenderer=re;Lexer=ne;Tokenizer=te;Hooks=le;constructor(...e){this.use(...e)}walkTokens(e,i){let o=[];for(const a of e)switch(o=o.concat(i.call(this,a)),a.type){case"table":{const e=a;for(const a of e.header)o=o.concat(this.walkTokens(a.tokens,i));for(const a of e.rows)for(const e of a)o=o.concat(this.walkTokens(e.tokens,i));break}case"list":{const e=a;o=o.concat(this.walkTokens(e.items,i));break}default:{const e=a;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(a=>{const s=e[a].flat(1/0);o=o.concat(this.walkTokens(s,i))}):e.tokens&&(o=o.concat(this.walkTokens(e.tokens,i)))}}return o}use(...e){const i=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{const o={...e};if(o.async=this.defaults.async||o.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){const o=i.renderers[e.name];i.renderers[e.name]=o?function(...i){let a=e.renderer.apply(this,i);return!1===a&&(a=o.apply(this,i)),a}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");const o=i[e.level];o?o.unshift(e.tokenizer):i[e.level]=[e.tokenizer],e.start&&("block"===e.level?i.startBlock?i.startBlock.push(e.start):i.startBlock=[e.start]:"inline"===e.level&&(i.startInline?i.startInline.push(e.start):i.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(i.childTokens[e.name]=e.childTokens)}),o.extensions=i),e.renderer){const i=this.defaults.renderer||new se(this.defaults);for(const o in e.renderer){if(!(o in i))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;const a=o,s=e.renderer[a],l=i[a];i[a]=(...e)=>{let o=s.apply(i,e);return!1===o&&(o=l.apply(i,e)),o||""}}o.renderer=i}if(e.tokenizer){const i=this.defaults.tokenizer||new te(this.defaults);for(const o in e.tokenizer){if(!(o in i))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;const a=o,s=e.tokenizer[a],l=i[a];i[a]=(...e)=>{let o=s.apply(i,e);return!1===o&&(o=l.apply(i,e)),o}}o.tokenizer=i}if(e.hooks){const i=this.defaults.hooks||new le;for(const o in e.hooks){if(!(o in i))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;const a=o,s=e.hooks[a],l=i[a];le.passThroughHooks.has(o)?i[a]=e=>{if(this.defaults.async)return Promise.resolve(s.call(i,e)).then(e=>l.call(i,e));const o=s.call(i,e);return l.call(i,o)}:i[a]=(...e)=>{let o=s.apply(i,e);return!1===o&&(o=l.apply(i,e)),o}}o.hooks=i}if(e.walkTokens){const i=this.defaults.walkTokens,a=e.walkTokens;o.walkTokens=function(e){let o=[];return o.push(a.call(this,e)),i&&(o=o.concat(i.call(this,e))),o}}this.defaults={...this.defaults,...o}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,i){return ne.lex(e,i??this.defaults)}parser(e,i){return ie.parse(e,i??this.defaults)}parseMarkdown(e){return(i,o)=>{const a={...o},s={...this.defaults,...a},l=this.onError(!!s.silent,!!s.async);if(!0===this.defaults.async&&!1===a.async)return l(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(null==i)return l(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof i)return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(i)+", string expected"));s.hooks&&(s.hooks.options=s,s.hooks.block=e);const c=s.hooks?s.hooks.provideLexer():e?ne.lex:ne.lexInline,d=s.hooks?s.hooks.provideParser():e?ie.parse:ie.parseInline;if(s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(i):i).then(e=>c(e,s)).then(e=>s.hooks?s.hooks.processAllTokens(e):e).then(e=>s.walkTokens?Promise.all(this.walkTokens(e,s.walkTokens)).then(()=>e):e).then(e=>d(e,s)).then(e=>s.hooks?s.hooks.postprocess(e):e).catch(l);try{s.hooks&&(i=s.hooks.preprocess(i));let e=c(i,s);s.hooks&&(e=s.hooks.processAllTokens(e)),s.walkTokens&&this.walkTokens(e,s.walkTokens);let o=d(e,s);return s.hooks&&(o=s.hooks.postprocess(o)),o}catch(e){return l(e)}}}onError(e,i){return o=>{if(o.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="<p>An error occurred:</p><pre>"+K(o.message+"",!0)+"</pre>";return i?Promise.resolve(e):e}if(i)return Promise.reject(o);throw o}}}const ae=new oe;function ce(e,i){return ae.parse(e,i)}ce.options=ce.setOptions=function(e){return ae.setOptions(e),ce.defaults=ae.defaults,n(ce.defaults),ce},ce.getDefaults=t,ce.defaults=e.defaults,ce.use=function(...e){return ae.use(...e),ce.defaults=ae.defaults,n(ce.defaults),ce},ce.walkTokens=function(e,i){return ae.walkTokens(e,i)},ce.parseInline=ae.parseInline,ce.Parser=ie,ce.parser=ie.parse,ce.Renderer=se,ce.TextRenderer=re,ce.Lexer=ne,ce.lexer=ne.lex,ce.Tokenizer=te,ce.Hooks=le,ce.parse=ce;const de=ce.options,he=ce.setOptions,pe=ce.use,ue=ce.walkTokens,fe=ce.parseInline,ge=ce,me=ie.parse,be=ne.lex;e.Hooks=le,e.Lexer=ne,e.Marked=oe,e.Parser=ie,e.Renderer=se,e.TextRenderer=re,e.Tokenizer=te,e.getDefaults=t,e.lexer=be,e.marked=ce,e.options=de,e.parse=ge,e.parseInline=fe,e.parser=me,e.setOptions=he,e.use=pe,e.walkTokens=ue},"object"==typeof exports&&"undefined"!=typeof module?o(exports):"function"==typeof define&&define.amd?define(["exports"],o):o((i="undefined"!=typeof globalThis?globalThis:i||self).marked={}),OrgChart.events.on("renderbuttons",function(e,i){if(i.node&&i.node.tags&&i.node.tags.has("group-dotted-lines")){var o=e.getScale(),a=OrgChart.t(i.node.templateName,i.node.min,o),s="";i.node.min?(a.nodeGroupDottedOpenButton||console.error(`[${i.node.templateName}].nodeGroupDottedOpenButton is not defined`),s+=`<g style="cursor:pointer;" data-ctrl-n-dotted-open="${i.node.id}" transform="matrix(1,0,0,1,${i.node.x},${i.node.y})">`,s+=a.nodeGroupDottedOpenButton):(a.nodeGroupDottedCloseButton||console.error(`[${i.node.templateName}].nodeGroupDottedCloseButton is not defined`),s+=`<g style="cursor:pointer;" transform="matrix(1,0,0,1,${i.node.x},${i.node.y})" data-ctrl-n-dotted-close="${i.node.id}">`,s+=a.nodeGroupDottedCloseButton),s=(s+="</g>").replaceAll("{cw}",i.node.w/2).replaceAll("{ch}",i.node.h/2).replaceAll("{ew}",i.node.w-(i.node.padding?i.node.padding[1]:0)).replaceAll("{eh}",i.node.h-(i.node.padding?i.node.padding[2]:0));var l=e.getNode(i.node.stChildrenIds[0]);-1!=s.indexOf("{collapsed-children-count}")&&(s=s.replace("{collapsed-children-count}",l.collapsedChildCount)),-1!=s.indexOf("{collapsed-children-total-count}")&&(s=s.replace("{collapsed-children-total-count}",l.deepCollapsedChildCount)),-1!=s.indexOf("{children-count}")&&(s=s.replace("{children-count}",l.childCount)),-1!=s.indexOf("{children-total-count}")&&(s=s.replace("{children-total-count}",l.deepChildCount)),i.html+=s}}),OrgChart.events.on("redraw",function(e,i){var o=null;if(e.manager.action==OrgChart.action.centerNode&&(o=e.manager.actionParams.id),null!=o){var a=e.getNode(o);if(a.isTreeListItem){var s=OrgChart._getCenterNodeFromParams(e.manager.nodes,e.manager.actionParams),l=s.stChildren[0].lcn?s.stChildren[0].lcn:"base",c=e.manager.layoutConfigs[l],d=OrgChart._getScrollTopForNode(s,a.id),h=s.treeList.scrollTop;d!=h&&(e._treeListUpdateInterval=OrgChart.animate(null,{},{},400,OrgChart.anim.inOutPow,function(){},function(i){s.treeList.scrollTop=i*(d-h)+h,e._treeListUpdate(s,c.orientation)}))}}}),OrgChart.prototype.__mouseScrollHandlerTreeList=function(e,i){var o=i.delta||i.wheelDelta;for(void 0===o&&(o=-i.detail),o=Math.max(-1,Math.min(1,o));e&&!e.stParent;)e=e.parent;e=e.stParent;var a=OrgChart.TREELIST_WHEEL_STEP;"auto"==a&&(a=e.stChildren[0].h/2),e.treeList.scrollTop+=-o*a;var s=e.stChildren[0].lcn?e.stChildren[0].lcn:"base",l=this.manager.layoutConfigs[s];this._treeListUpdateInterval&&(clearInterval(this._treeListUpdateInterval),this._treeListUpdateInterval=null),"none"==OrgChart._treeListGetTumbPositionFromScrollTop(e).scrollBarDisplay||(i.preventDefault(),this._treeListUpdate(e,l.orientation))},OrgChart.prototype._treeListUpdate=function(e,i){OrgChart._treeListSetProps(e,i),OrgChart._treeListAdjustToSTNodePostition(e.stChildren,e);var o=this.getScale(),a=this.element.querySelector(`[data-treelist-content="${e.id}"]`),s=a.transform.baseVal.consolidate().matrix;for(var l of(s.f=-e.treeList.scrollTop,this._treeListIterate2(e.stChildren,e,o,a),e.treeList.pinnedIds)){var c=this.getNode(l);this._treeListSetPositions(c,o,a,!0)}var d=this.element.querySelector(`[data-treelist-thumb="${e.id}"]`),h=this.element.querySelector(`[data-treelist-scroll="${e.id}"]`),{thumbHeight:p,thumbPosition:u,scrollBarDisplay:f}=OrgChart._treeListGetTumbPositionFromScrollTop(e);d.style.display=f,h.style.display=f,d.setAttributeNS(null,"height",p),d.setAttributeNS(null,"y",+u)},OrgChart.prototype._treeListIterate2=function(e,i,o,a){for(var s of e)i.treeList.pinnedIds.includes(s.id)||this._treeListSetPositions(s,o,a,!1),this._treeListIterate2(s.children,i,o,a)},OrgChart.prototype._treeListSetPositions=function(e,i,o,a){var s=this.getNodeElement(e.id);if(s){var l=s.transform.baseVal.consolidate().matrix;s.classList.remove("treelist-pinned"),a&&(s.classList.add("treelist-pinned"),o.appendChild(s)),l.f=e.y,l.e=e.x;var c=this.element.querySelector(`[data-ctrl-ec-id="${e.id}"]`);if(c)c.transform.baseVal.consolidate().matrix.f=e.y,o.appendChild(c)}},OrgChart.prototype._treeListThumbMouseDownHandler=function(e,i,o){var a=e.getAttribute("data-treelist-thumb"),s=this.getNode(a),l=this.getSvg(),c=this,d=!0,h=OrgChart._getClientXY(i),p=this.getScale(),u=parseFloat(e.getAttribute("y")),f=parseFloat(e.getAttribute("height")),moveHandler=function(e){if(d){thumbPosition=u+(OrgChart._getClientXY(e).y-h.y)/p;var i=OrgChart._treeListGetScrollTopFromTumbPosition(s,f,thumbPosition);s.treeList.scrollTop=i,c._treeListUpdateInterval&&(clearInterval(c._treeListUpdateInterval),c._treeListUpdateInterval=null),c._treeListUpdate(s)}},leaveHandler=function(e){d=!1,l.removeEventListener(o.move,moveHandler),l.removeEventListener(o.up,leaveHandler)};l.addEventListener(o.move,moveHandler),l.addEventListener(o.up,leaveHandler)},OrgChart.prototype._treeListExpandCollapseHandler=function(e){var i=this.getNode(e);if(i&&i.isTreeListItem){var o=OrgChart.getRootOf(i).stParent;if(o.treeList.pinnedIds.includes(e)){var a=OrgChart._getScrollTopForNode(o,i.id);o.treeList.scrollTop=a,this._treeListUpdate(o)}}},void 0===OrgChart&&(OrgChart={}),OrgChart.prototype.undo=function(e){if(this.config.undoRedoStorageName){var i=this.undoStepsCount();if(0!=i){this._putInRedoStack();var o=`${this.config.undoRedoStorageName}_undo_`+(i-1),a=sessionStorage.getItem(o);sessionStorage.removeItem(o);var s=JSON.parse(a);this.config.nodes=s.nodes,this.config.clinks=s.clinks,this.config.slinks=s.slinks,this.config.groupDottedLines=s.groupDottedLines,this.config.dottedLines=s.dottedLines,this._ai.setContext(),OrgChart.events.publish("updated",[this]),this.filterUI.update(),this.draw(OrgChart.action.update,void 0,e),this.undoRedoUI.refresh()}}},OrgChart.prototype.redo=function(e){if(this.config.undoRedoStorageName){var i=this.redoStepsCount();if(0!=i){this._putInUndoStack();var o=`${this.config.undoRedoStorageName}_redo_`+(i-1),a=sessionStorage.getItem(o);sessionStorage.removeItem(o);var s=JSON.parse(a);this.config.nodes=s.nodes,this.config.clinks=s.clinks,this.config.slinks=s.slinks,this.config.groupDottedLines=s.groupDottedLines,this.config.dottedLines=s.dottedLines,this._ai.setContext(),OrgChart.events.publish("updated",[this]),this.filterUI.update(),this.draw(OrgChart.action.update,void 0,e),this.undoRedoUI.refresh()}}},OrgChart.prototype.clearRedo=function(){if(this.config.undoRedoStorageName){for(var e=`${this.config.undoRedoStorageName}_redo_`,i=Object.keys(sessionStorage),o=0;-1!=i.indexOf(e+o);)sessionStorage.removeItem(e+o),o++;this.undoRedoUI.refresh()}},OrgChart.prototype.clearUndo=function(){if(this.config.undoRedoStorageName){for(var e=`${this.config.undoRedoStorageName}_undo_`,i=Object.keys(sessionStorage),o=0;-1!=i.indexOf(e+o);)sessionStorage.removeItem(e+o),o++;this.undoRedoUI.refresh()}},OrgChart.prototype.undoStepsCount=function(){for(var e=`${this.config.undoRedoStorageName}_undo_`,i=Object.keys(sessionStorage),o=0;-1!=i.indexOf(e+o);)o++;return o},OrgChart.prototype.redoStepsCount=function(){for(var e=`${this.config.undoRedoStorageName}_redo_`,i=Object.keys(sessionStorage),o=0;-1!=i.indexOf(e+o);)o++;return o},OrgChart.prototype._putInUndoStack=function(){if(this.config.undoRedoStorageName){var e=`${this.config.undoRedoStorageName}_undo_`+this.undoStepsCount();sessionStorage.setItem(e,JSON.stringify({nodes:this.config.nodes,clinks:this.config.clinks,slinks:this.config.slinks,groupDottedLines:this.config.groupDottedLines,dottedLines:this.config.dottedLines}))}},OrgChart.prototype._putInRedoStack=function(){if(this.config.undoRedoStorageName){var e=`${this.config.undoRedoStorageName}_redo_`+this.redoStepsCount();sessionStorage.setItem(e,JSON.stringify({nodes:this.config.nodes,clinks:this.config.clinks,slinks:this.config.slinks,groupDottedLines:this.config.groupDottedLines,dottedLines:this.config.dottedLines}))}},void 0===OrgChart&&(OrgChart={}),OrgChart.undoRedoUI=function(){this.instance=null,this._event_id=OrgChart._guid()},OrgChart.undoRedoUI.prototype.init=function(e){e.config.undoRedoStorageName&&(this.instance=e,this.refresh())},OrgChart.undoRedoUI.prototype.refresh=function(){var e=this;if(this.instance.config.undoRedoStorageName){var i={undoStepsCount:this.instance.undoStepsCount(),redoStepsCount:this.instance.redoStepsCount()};if(!1!==OrgChart.events.publish("change",[this,i])){var o=this.instance.element.querySelector("[data-undo]"),a=this.instance.element.querySelector("[data-redo]");if(!o||!a){var s=document.createElement("div");s.classList.add("boc-undo-redo"),s.innerHTML=`<span data-undo>${OrgChart.icon.undo(50,50,"")}<span class="boc-undo-i"></span></span>\n <span data-redo>${OrgChart.icon.redo(50,50,"")}<span class="boc-redo-i"></span></span>`,this.instance.element.appendChild(s),o=this.instance.element.querySelector("[data-undo]"),a=this.instance.element.querySelector("[data-redo]"),o.addEventListener("click",function(){e.instance.undo()}),a.addEventListener("click",function(){e.instance.redo()})}i.undoStepsCount>0?(o.classList.add("boc-ur-clickable"),o.querySelector(".boc-undo-i").innerHTML=i.undoStepsCount,o.querySelector(".boc-undo-i").style.display="inline-block"):(o.classList.remove("boc-ur-clickable"),o.querySelector(".boc-undo-i").style.display="none"),i.redoStepsCount>0?(a.classList.add("boc-ur-clickable"),a.querySelector(".boc-redo-i").innerHTML=i.redoStepsCount,a.querySelector(".boc-redo-i").style.display="inline-block"):(a.classList.remove("boc-ur-clickable"),a.querySelector(".boc-redo-i").style.display="none")}}},OrgChart.undoRedoUI.prototype.on=function(e,i){return OrgChart.events.on(e,i,this._event_id),this},OrgChart.undoRedoUI.prototype.onChange=function(e){return this.on("change",function(i,o){return e.call(i,o)})},OrgChart.events.on("redraw",function(e,i){if(e.config.miniMap){if(e.manager.action!=OrgChart.action.move){OrgChart.miniMap._settings._scale=Math.min(OrgChart.miniMap.width/(e.response.boundary.maxX-e.response.boundary.minX),OrgChart.miniMap.height/(e.response.boundary.maxY-e.response.boundary.minY)),OrgChart.miniMap._settings._translateX=-e.response.boundary.minX*OrgChart.miniMap._settings._scale+(OrgChart.miniMap.width-(e.response.boundary.maxX-e.response.boundary.minX)*OrgChart.miniMap._settings._scale)/2,OrgChart.miniMap._settings._translateY=-e.response.boundary.minY*OrgChart.miniMap._settings._scale+(OrgChart.miniMap.height-(e.response.boundary.maxY-e.response.boundary.minY)*OrgChart.miniMap._settings._scale)/2;var o=e.getViewBox();OrgChart.miniMap._init(e),OrgChart.miniMap._drawMainCanvas(e),OrgChart.miniMap._drawRectSelectorCanvas(e,o);var a,s,l,c,d=e.element.querySelector('[data-id="mini-map-focus"]'),h=!1,p=null;d.onmousedown=function(e){var i,l,c,p=d.getBoundingClientRect(),u=p.left,f=p.top;if(a=parseInt(e.clientX-u),s=parseInt(e.clientY-f),i=s,l=(a-OrgChart.miniMap._settings._translateX)/OrgChart.miniMap._settings._scale,c=(i-OrgChart.miniMap._settings._translateY)/OrgChart.miniMap._settings._scale,l>o[0]&&l<o[0]+o[2]&&c>o[1]&&c<o[1]+o[3])return e.preventDefault(),e.stopPropagation(),void(h=!0)},d.onmousemove=function(i){if(h){i.preventDefault(),i.stopPropagation(),OrgChart.miniMap._mouseMove=!0;var u=d.getBoundingClientRect(),f=u.left,g=u.top;l=parseInt(i.clientX-f),c=parseInt(i.clientY-g);var m=(l-a)/OrgChart.miniMap._settings._scale,b=(c-s)/OrgChart.miniMap._settings._scale;o[0]=m+o[0],o[1]=b+o[1],e.setViewBox(o),p&&(clearTimeout(p),p=null),p=setTimeout(function(){e._draw(!0,OrgChart.action.move)},300),OrgChart.miniMap._drawRectSelectorCanvas(e,o),a=l,s=c}},d.onmouseup=function(e){h&&(e.preventDefault(),e.stopPropagation(),h=!1)},d.onmouseout=function(e){h&&(e.preventDefault(),e.stopPropagation(),h=!1,OrgChart.miniMap._mouseMove=!1)},d.onclick=function(i){if(i.preventDefault(),i.stopPropagation(),OrgChart.miniMap._mouseMove)OrgChart.miniMap._mouseMove=!1;else{var a=d.getBoundingClientRect(),s=a.left,h=a.top;l=parseInt(i.clientX-s),c=parseInt(i.clientY-h);var u=l/OrgChart.miniMap._settings._scale,f=c/OrgChart.miniMap._settings._scale;o[0]=u-(o[0]+o[2]-o[0])/2-OrgChart.miniMap._settings._translateX/OrgChart.miniMap._settings._scale,o[1]=f-(o[1]+o[3]-o[1])/2-OrgChart.miniMap._settings._translateY/OrgChart.miniMap._settings._scale,e.setViewBox(o),p&&(clearTimeout(p),p=null),p=setTimeout(function(){e._draw(!0,OrgChart.action.move)},300),OrgChart.miniMap._drawRectSelectorCanvas(e,o)}}}}else{var u=e.element.querySelector('[data-id="mini-map"]');u&&u.parentNode.removeChild(u)}}),OrgChart.miniMap={},OrgChart.miniMap._settings={_translateX:0,_translateY:0,_scale:1},OrgChart.miniMap._drawMainCanvas=function(e){var i=e.element.querySelector('[data-id="mini-map-main"]'),o=i.getContext("2d");OrgChart.miniMap._initCtx(e,i,1);var a=0,s=[];!function iterate(e,i){if(Array.isArray(i))for(var l=0;l<i.length;l++)iterate(e,i[l]);else{o.fillStyle=OrgChart.miniMap.colors[3],o.beginPath(),o.lineWidth="0.5",o.fillRect(i.x,i.y,i.w,i.h),o.strokeRect(i.x,i.y,i.w,i.h);for(l=0;l<i.stChildrenIds.length;l++)a++,s.includes(i.id)||(1==a?o.fillStyle=OrgChart.miniMap.colors[0]:2==a?o.fillStyle=OrgChart.miniMap.colors[1]:3==a&&(o.fillStyle=OrgChart.miniMap.colors[2]),o.beginPath(),o.fillRect(i.x,i.y,i.w,i.h),o.strokeRect(i.x,i.y,i.w,i.h),s.push(i.id)),iterate(e,e.getNode(i.stChildrenIds[l])),a--;for(l=0;l<i.childrenIds.length;l++)iterate(e,e.getNode(i.childrenIds[l]))}}(e,e.roots)},OrgChart.miniMap._drawRectSelectorCanvas=function(e,i){var o=e.element.querySelector('[data-id="mini-map-focus"]'),a=o.getContext("2d");OrgChart.miniMap._initCtx(e,o,OrgChart.miniMap.opacity);var s=i[0],l=i[1],c=i[2],d=i[3];a.lineWidth=.5/OrgChart.miniMap._settings._scale,a.strokeStyle=OrgChart.miniMap.focusStroke,a.globalAlpha=1,a.clearRect(s,l,c,d),a.strokeRect(s,l,c,d)},OrgChart.miniMap._initCtx=function(e,i,o){var a=i.getContext("2d");i.width=i.width,i.height=i.height,a.clearRect(0,0,OrgChart.miniMap.width,OrgChart.miniMap.height),a.globalAlpha=o,1!=o&&(a.fillStyle=OrgChart.miniMap.selectorBackgroundColor,a.fillRect(0,0,OrgChart.miniMap.width,OrgChart.miniMap.height)),a.translate(OrgChart.miniMap._settings._translateX,OrgChart.miniMap._settings._translateY),a.scale(OrgChart.miniMap._settings._scale,OrgChart.miniMap._settings._scale)},OrgChart.miniMap._init=function(e){if(!e.element.querySelector('[data-id="mini-map"]')){var i=document.createElement("canvas");i.width=OrgChart.miniMap.width,i.height=OrgChart.miniMap.height,i.setAttribute("data-id","mini-map-main"),i.style.display="inline-block",i.style.backgroundColor=OrgChart.miniMap.backgroundColor,i.style.position="absolute",i.style.top=0,i.style.left=0;var o=document.createElement("canvas");o.width=OrgChart.miniMap.width,o.height=OrgChart.miniMap.height,o.setAttribute("data-id","mini-map-focus"),o.style.display="inline-block",o.style.position="absolute",o.style.top=0,o.style.left=0;var a=document.createElement("div");a.setAttribute("data-id","mini-map"),a.style.position="absolute";for(var s=["top","right","left","bottom"],l=0;l<s.length;l++){var c=s[l];OrgChart.isNEU(OrgChart.miniMap.position[c])||("padding"==OrgChart.miniMap.position[c]?a.style[c]=e.config.padding+"px":a.style[c]=OrgChart.miniMap.position[c]+"px")}a.style.border=OrgChart.miniMap.border,a.style.padding=OrgChart.miniMap.padding+"px",a.style.backgroundColor=OrgChart.miniMap.backgroundColor;var d=document.createElement("div");d.style.position="relative",d.style.width=OrgChart.miniMap.width+"px",d.style.height=OrgChart.miniMap.height+"px",d.appendChild(i),d.appendChild(o),a.appendChild(d),e.element.appendChild(a),a.addEventListener("DOMMouseScroll",function(i){e.__mouseScrollHandler(a,i)}),a.addEventListener("mousewheel",function(i){e.__mouseScrollHandler(a,i)});var h=0,p=0,mouseMoveHandler=function(e){OrgChart.miniMap._mouseMove=!0;var i=e.clientX-h,o=e.clientY-p;if(!OrgChart.isNEU(a.style.left)){var s=parseFloat(a.style.left)+i;a.style.left=`${s}px`}if(!OrgChart.isNEU(a.style.right)){var l=parseFloat(a.style.right)-i;a.style.right=`${l}px`}if(!OrgChart.isNEU(a.style.bottom)){var c=parseFloat(a.style.bottom)-o;a.style.bottom=`${c}px`}if(!OrgChart.isNEU(a.style.top)){var d=parseFloat(a.style.top)+o;a.style.top=`${d}px`}h=e.clientX,p=e.clientY},mouseUpHandler=function(){document.removeEventListener("mousemove",mouseMoveHandler),document.removeEventListener("mouseup",mouseUpHandler)};OrgChart.miniMap.draggable&&a.addEventListener("mousedown",function(e){h=e.clientX,p=e.clientY,document.addEventListener("mousemove",mouseMoveHandler),document.addEventListener("mouseup",mouseUpHandler)})}},OrgChart.miniMap.colors=["#E0E0E0","#BDBDBD","#9E9E9E","#757575"],OrgChart.miniMap.selectorBackgroundColor="white",OrgChart.miniMap.backgroundColor="white",OrgChart.miniMap.focusStroke="#f57c00",OrgChart.miniMap.opacity=.4,OrgChart.miniMap.border="1px solid #aeaeae",OrgChart.miniMap.width=250,OrgChart.miniMap.height=140,OrgChart.miniMap.padding=5,OrgChart.miniMap.position={top:void 0,left:"padding",right:void 0,bottom:"padding"},OrgChart.miniMap.draggable=!0,OrgChart._search={},OrgChart._search.search=function(e,i,o,a,s,l,c){var d=[],h=i.toLowerCase();document.documentElement.lang&&(h=i.toLocaleLowerCase(document.documentElement.lang));var p=h.split(" ");if(c&&p.length>1){var u=p[0];c[u]&&(o=[c[u]],p=(h=h.replace(u,"").trim()).split(" "))}p=p.filter(function(e,i,o){return o.indexOf(e)===i});for(var f={},g=0;g<e.length;g++)for(var m=e[g],b=0;b<o.length;b++){var x=o[b];if(!OrgChart.isNEU(m[x])){var v=m[x];if(null!=(i=OrgChart._search.searchAndComputeScore(p,v,x,l))){var y=m.id;if(f[y]){if(f[y]&&f[y]<i.__score){f[y]=i.__score;for(var _=d.length-1;_>=0;_--)d[_].id==y&&d.splice(_,1);OrgChart._search.addNodeToResult(d,a,m,i,x,s)}}else f[y]=i.__score,OrgChart._search.addNodeToResult(d,a,m,i,x,s)}}}return d.sort(function(e,i){return e.__score<i.__score?1:e.__score>i.__score?-1:0}),d},OrgChart._search.addNodeToResult=function(e,i,o,a,s,l){var c={};c.id=o.id,OrgChart.isNEU(o[l])||(c[l]=o[l]);for(var d=0;d<i.length;d++){var h=i[d];OrgChart.isNEU(o[h])||OrgChart.isNEU(c[h])&&(c[h]=o[h])}null!=a&&(OrgChart.isNEU(c.__score)&&(c.__score=a.__score),OrgChart.isNEU(c.__searchField)&&(c.__searchField=s),OrgChart.isNEU(c.__searchMarks)&&(c.__searchMarks=a.__searchMarks)),e.push(c)},OrgChart._search.searchAndComputeScore=function(e,i,o,a){if(OrgChart.isNEU(i))return null;if(OrgChart.isNEU(e))return null;if(!e.length)return null;"string"!=typeof i&&(i=i.toString());var s=i.toLowerCase();document.documentElement.lang&&(s=i.toLocaleLowerCase(document.documentElement.lang));var l=OrgChart._search.searchIndexesOf(s,e);if(!l.length)return null;for(var c=s.length/100,d=0,h=0,p=d>0?100:0,u=0,f=0;f<e.length;f++)for(var g=e[f],m=0;m<l.length;m++)if(-1!=g.indexOf(l[m].searchPhrase)){u++;break}var b=100/(e.length/u);if(l.length){h=l[0].start;for(m=0;m<l.length;m++)if(d+=l[m].length,l[m].start<h&&(h=l[m].start),m>=1&&l[m-1].start>l[m].start){p=0;break}}var x=0;0!=d&&(x=d/c);var v=d>0?100:0;0!=h&&(v=100-h/c);var y=0;a&&a[o]&&(y=a[o]),b&&(b=b/100*50),x>0&&(x=x/100*10),v>0&&(v=v/100*10),p>0&&(p=p/100*10),y>0&&(y=y/100*20);var _=Math.round(1e4*(b+x+v+p+y));l.sort(function(e,i){return e.start<i.start?-1:e.start>i.start?1:0});for(m=l.length-1;m>=0;m--)for(f=0;f<l.length;f++)f<m&&l[f].start+l[f].length>l[m].start&&l.splice(m,1);var w=i;for(m=l.length-1;m>=0;m--)w=(w=w.insert(l[m].start+l[m].length,"</mark>")).insert(l[m].start,"<mark>");return{__searchMarks:w,__score:_}},OrgChart._search.searchIndexesOf=function(e,i){var o=[];if(!OrgChart.isNEU(e))for(var a=0;a<i.length;a++){var s=i[a];if(!OrgChart.isNEU(s))for(var l=0;(l=e.indexOf(s,l))>-1;)o.push({length:s.length,start:l,searchPhrase:s}),l+=s.length}return o.sort(function(e,i){return e.length<i.length?1:e.length>i.length||e.start<i.start?-1:e.start>i.start?1:0}),o=o.filter(function(e){for(var i=!1,a=0;a<o.length;a++){var s=o[a].start,l=o[a].start+o[a].length-1,c=e.start,d=e.start+e.length-1;if(s==c&&l==d){i=!1;break}if(s>=c&&l<=d){i=!0;break}if(s<=c&&l>=d){i=!0;break}}return!i})},OrgChart.events.on("redraw",function(e,i){if(e.config.state){var o=[],a=[];!function iterate(e){if(Array.isArray(e))for(var i=0;i<e.length;i++)iterate(e[i]);else{("string"!=typeof e.id||"string"==typeof e.id&&-1==e.id.indexOf("split")&&-1==e.id.indexOf("mirror"))&&(o.push(e.id),1==e.min&&a.push(e.id));for(i=0;i<e.stChildren.length;i++)iterate(e.stChildren[i]);for(i=0;i<e.children.length;i++)iterate(e.children[i])}}(e.roots),OrgChart.state._put(e.config.roots,e.width(),e.height(),e.response.viewBox,o,a,e.response.adjustify,e.config.state)}}),OrgChart.state={},OrgChart.state._buildStateNames=function(e){return{paramScale:e+"-scale",paramX:e+"-x",paramY:e+"-y",paramExp:e+"-exp",paramMin:e+"-min",paramRoots:e+"-roots",paramAdjustify:e+"-adjustify"}},OrgChart.state._put=function(e,i,o,a,s,l,c,d){if(d&&!OrgChart.isNEU(s)&&0!=s.length){var h=OrgChart.state._buildStateNames(d.name),p={roots:e,scale:Math.min(i/a[2],o/a[3]),x:a[0],y:a[1],exp:s,min:l,adjustify:c};if(d.writeToUrlParams){var u=new URLSearchParams(window.location.search);u.has(h.paramScale)?u.set(h.paramScale,p.scale):u.append(h.paramScale,p.scale),u.has(h.paramX)?u.set(h.paramX,p.x):u.append(h.paramX,p.x),u.has(h.paramY)?u.set(h.paramY,p.y):u.append(h.paramY,p.y),u.has(h.paramExp)?u.set(h.paramExp,p.exp.join("*")):u.append(h.paramExp,p.exp.join("*")),u.has(h.paramRoots)&&Array.isArray(p.roots)?u.set(h.paramRoots,p.roots.join("*")):Array.isArray(p.roots)&&u.append(h.paramRoots,p.roots.join("*")),u.has(h.paramMin)?u.set(h.paramMin,p.min.join("*")):u.append(h.paramMin,p.min.join("*")),u.has(h.paramAdjustify)?u.set(h.paramAdjustify,p.adjustify.x+"*"+p.adjustify.y):u.append(h.paramAdjustify,p.adjustify.x+"*"+p.adjustify.y),window.history.replaceState(null,null,"?"+u)}d.writeToIndexedDB&&(p.id=d.name,OrgChart.idb.put(p,function(e){0==e&&console.error("Cannot write row - "+d.name)})),d.writeToLocalStorage&&OrgChart.localStorage.setItem(d.name,JSON.stringify(p))}},OrgChart.state._get=function(e,i,o,a){if(e){var s=OrgChart.state._buildStateNames(e.name);if(e.readFromUrlParams){var l=new URLSearchParams(window.location.search);if(l.has(s.paramScale)&&l.has(s.paramX)&&l.has(s.paramY)&&l.has(s.paramExp)&&l.has(s.paramMin)&&l.has(s.paramAdjustify)){var c={},d=parseFloat(l.get(s.paramScale)),h=parseFloat(l.get(s.paramX)),p=parseFloat(l.get(s.paramY));(f=[])[0]=h,f[1]=p,f[2]=i/d,f[3]=o/d,c.vb=f,c.scale=d,c.x=h,c.y=p,c.roots=null,l.has(s.paramRoots)&&(c.roots=l.get(s.paramRoots).split("*")),c.exp=l.get(s.paramExp).split("*"),c.min=l.get(s.paramMin).split("*");var u=l.get(s.paramAdjustify).split("*");return c.adjustify={x:parseFloat(u[0]),y:parseFloat(u[1])},void a(c)}if(!e.readFromIndexedDB&&!e.readFromLocalStorage)return void a(null)}if(e.readFromLocalStorage){var f;if(null!=(c=OrgChart.localStorage.getItem(e.name)))return c=JSON.parse(c),(f=[])[0]=c.x,f[1]=c.y,f[2]=i/c.scale,f[3]=o/c.scale,c.vb=f,void a(c);if(!e.readFromIndexedDB)return void a(null)}e.readFromIndexedDB&&OrgChart.idb.read(e.name,function(s,l){if(0==s)console.error("Cannot read from - "+e.name),a(null);else if(null==s)a(null);else{var c=[];c[0]=l.x,c[1]=l.y,c[2]=i/l.scale,c[3]=o/l.scale,l.vb=c,a(l)}})}else a(null)},OrgChart.state.clear=function(e){if(!e)return!1;try{localStorage.removeItem(e);var i=OrgChart.state._buildStateNames(e),o=new URLSearchParams(window.location.search);o.has(i.paramScale)&&o.delete(i.paramScale),o.has(i.paramX)&&o.delete(i.paramX),o.has(i.paramY)&&o.delete(i.paramY),o.has(i.paramExp)&&o.delete(i.paramExp),o.has(i.paramRoots)&&o.delete(i.paramRoots),o.has(i.paramMin)&&o.delete(i.paramMin),o.has(i.paramAdjustify)&&o.delete(i.paramAdjustify),window.history.replaceState(null,null,"?"+o),OrgChart.idb.delete(e,function(i){0==i&&console.error("Cannot delete row - "+e)})}catch{}},OrgChart._magnify={},OrgChart.prototype.magnify=function(e,i,o,a,s){a||(a=this.config.anim);var l=this.getNode(e),c=this.getNodeElement(e);if(l||c){var d=OrgChart._magnify[e];d&&(null!=d.timer&&clearInterval(d.timer),null!=d.timerBack&&clearInterval(d.timerBack),c.setAttribute("transform","matrix("+d.transformStart.toString()+")"),OrgChart._magnify[e]=null),o&&(c=c.cloneNode(!0),this.getSvg().appendChild(c));var h=OrgChart._getTransform(c),p=JSON.parse(JSON.stringify(h));p[0]=i,p[3]=i;var u=l.w+l.w*(i-1),f=l.h+l.h*(i-1);p[4]+=(l.w-u)/2,p[5]+=(l.h-f)/2;var g=OrgChart.animate(c,{transform:h},{transform:p},a.duration,a.func);OrgChart._magnify[e]={timer:g,transformStart:h,nodeElement:c,front:o},s&&s(c)}},OrgChart.prototype.magnifyBack=function(e,i,o){i||(i=this.config.anim);var a=OrgChart._magnify[e];if(a){null!=a.timer&&clearInterval(a.timer),null!=a.timerBack&&clearInterval(a.timerBack);var s=OrgChart._getTransform(a.nodeElement);a.timerBack=OrgChart.animate(a.nodeElement,{transform:s},{transform:a.transformStart},i.duration,i.func,function(e){var i=e[0].getAttribute(OrgChart.attr.node_id);OrgChart._magnify[i]&&OrgChart._magnify[i].front&&(e[0].parentNode.removeChild(e[0]),OrgChart._magnify[i]=null),o&&o(e[0])})}},void 0===OrgChart&&(OrgChart={}),OrgChart.events.on("init",function(e,i){if(e.config.keyNavigation&&(window.addEventListener("keydown",function(){e._windowKeyDownHandler.apply(e,[this,arguments[0]])}),OrgChart.isNEU(e._keyNavigationActiveNodeId)&&e.roots&&e.roots.length)){var o=e.roots[0].id;OrgChart.isNEU(e.config.keyNavigation.focusId)||(o=e.config.keyNavigation.focusId),e._keyNavigationActiveNodeId=o,e.center(e._keyNavigationActiveNodeId)}}),OrgChart.prototype._windowKeyDownHandler=function(e,i){for(var o=i.target,a=null;o&&o!=this.element;){if(o.hasAttribute&&o.hasAttribute(OrgChart.attr.node_id)){a=o.getAttribute(OrgChart.attr.node_id);break}o=o.parentNode}if(o){var s=a?this.getNode(a):null,l={node:s,data:a?this.get(a):null,event:i};if(!1!==OrgChart.events.publish("key-down",[this,l])&&s)if("KeyF"==i.code)this.searchUI.find("");else if("ArrowRight"==i.code||s.isAssistant&&"ArrowDown"==i.code||s.isPartner&&"ArrowDown"==i.code){if(h=this.getNode(s.pid)){var c=h.childrenIds.indexOf(s.id);if(++c<h.childrenIds.length){var d=h.childrenIds[c];this._keyNavigationActiveNodeId=d,this.center(d)}}}else if("ArrowLeft"==i.code){if(h=this.getNode(s.pid)){c=h.childrenIds.indexOf(s.id);if(--c>=0){d=h.childrenIds[c];this._keyNavigationActiveNodeId=d,this.center(d)}}}else if("ArrowUp"==i.code){var h;if(h=this.getNode(s.pid)){d=h.id;if(s.isAssistant||h.hasAssistants||s.isPartner||h.hasPartners){c=h.childrenIds.indexOf(s.id);--c>=0&&(d=h.childrenIds[c])}this._keyNavigationActiveNodeId=d,this.center(d)}}else if("ArrowDown"==i.code)s.childrenIds.length&&(this._keyNavigationActiveNodeId=s.childrenIds[0],this.center(s.childrenIds[0]));else if("Space"==i.code){var p=o.getAttribute(OrgChart.attr.node_id);return void this.toggleExpandCollapse(p,i)}}},OrgChart.events.on("redraw",function(e,i){e.config.keyNavigation&&OrgChart._keyNavigation(e)}),OrgChart.events.on("click",function(e,i){e.config&&e.config.keyNavigation&&(e._keyNavigationActiveNodeId=i.node.id,e.center(i.node.id))}),OrgChart._keyNavigation=function(e){var i=e.element.querySelector(":focus");if(i&&i.parentElement&&i.parentElement.hasAttribute(OrgChart.attr.node_id)){var o=i.parentElement;(s=(a=i).querySelector("title"))&&s.parentNode.removeChild(s),a.removeAttribute("tabindex")}if(!OrgChart.isNEU(e._keyNavigationActiveNodeId)&&((o=e.getNodeElement(e._keyNavigationActiveNodeId))&&o.children.length)){var a;(a=o.children[0]).setAttribute("tabindex",2);var s,l={text:"",id:e._keyNavigationActiveNodeId};if(OrgChart.events.publish("screen-reader-text",[e,l]),!OrgChart.isNEU(l.text))(s=document.createElementNS("http://www.w3.org/2000/svg","title")).innerHTML=l.text,a.appendChild(s);OrgChart.SEARCH_CLOSE_RESULT_ON_ESCAPE_OR_CLICKOUTSIDE&&e.searchUI.hide(),a.focus()}},OrgChart.elements={},OrgChart.elements.textbox=function(e,i,o,a){var s=OrgChart.elements._vidrf(e,i,a);if(s.doNotRender)return{html:""};var l="";return i.btn&&(l=`<a href="#" data-input-btn="" class="boc-link boc-link-boc-button">${i.btn}</a>`),{html:`<div class="boc-form-field" style="min-width: ${o};">\n <div class="boc-input" data-boc-input="" ${s.disabledAttribute} ${s.vlidators}>\n <label for="${s.id}">${OrgChart._escapeGreaterLessSign(s.label)}</label>\n <input ${s.readOnlyAttribute} data-binding="${OrgChart._escapeDoubleQuotes(s.binding)}" maxlength="256" id="${s.id}" name="${s.id}" type="text" value="${OrgChart._escapeDoubleQuotes(s.value)}" autocomplete="off">\n ${l}\n </div>\n </div>`,id:s.id,value:s.value}},OrgChart.elements.checkbox=function(e,i,o,a){var s=OrgChart.elements._vidrf(e,i,a);if(s.doNotRender)return{html:""};var l=s.value?"checked":"",c=a?'onclick="return false;"':"";return{html:`<div class="boc-form-field" style="min-width: ${o};" >\n <label class="boc-checkbox" data-boc-input="" ${s.disabledAttribute}>\n <input ${l} ${c} data-binding="${OrgChart._escapeDoubleQuotes(s.binding)}" type="checkbox"><span class="boc-checkbox-checkmark" type="checkbox"></span>${OrgChart._escapeGreaterLessSign(s.label)}\n </label>\n </div>`,id:s.id,value:l}},OrgChart.elements.select=function(e,i,o,a){if(a)return OrgChart.elements.textbox(e,i,o,a);var s=OrgChart.elements._vidrf(e,i,a);return s.doNotRender?{html:""}:{html:`<div class="boc-form-field" style="min-width: ${o};">\n <div class="boc-input" data-boc-input="" ${s.disabledAttribute} ${s.vlidators}>\n <label for="${s.id}">${OrgChart._escapeGreaterLessSign(s.label)}</label>\n <select data-binding="${OrgChart._escapeDoubleQuotes(s.binding)}" ${s.readOnlyAttribute} id="${s.id}" name="${s.id}">\n ${function(){for(var e="",i=0;i<s.options.length;i++){var o=s.options[i];e+=`<option ${o.value==s.value?"selected":""} value="${OrgChart._escapeDoubleQuotes(o.value)}">${OrgChart._escapeGreaterLessSign(o.text)}</option>`}return e}()} \n </select>\n </div>\n </div>`,id:s.id,value:s.value}},OrgChart.elements.multiSelect=function(e,i,o,a){if(a)return OrgChart.elements.textbox(e,i,o,a);var s=OrgChart.elements._vidrf(e,i,a);return s.doNotRender?{html:""}:{html:`<div class="boc-form-field" style="min-width: ${o};">\n <div class="boc-input" data-boc-input="" ${s.disabledAttribute} ${s.vlidators}>\n <label for="${s.id}">${OrgChart._escapeGreaterLessSign(s.label)}</label>\n <select class="multiple" data-binding="${OrgChart._escapeDoubleQuotes(s.binding)}" ${s.readOnlyAttribute} id="${s.id}" name="${s.id}" multiple>\n ${function(){for(var e="",i=0;i<s.options.length;i++){var o=s.options[i];e+=`<option ${s.value.includes(o.value)?"selected":""} value="${OrgChart._escapeDoubleQuotes(o.value)}">${OrgChart._escapeGreaterLessSign(o.text)}</option>`}return e}()} \n </select>\n </div>\n </div>`,id:s.id,value:s.value}},OrgChart.elements.date=function(e,i,o,a){var s=OrgChart.elements._vidrf(e,i,a);return s.doNotRender?{html:""}:{html:`<div class="boc-form-field" style="min-width: ${o};">\n <div class="boc-input" data-boc-input="" ${s.disabledAttribute} ${s.vlidators}>\n <label for="${s.id}" class="hasval">${OrgChart._escapeGreaterLessSign(s.label)}</label>\n <input data-binding="${OrgChart._escapeDoubleQuotes(s.binding)}" ${s.readOnlyAttribute} maxlength="256" id="${s.id}" name="${s.id}" type="date" value="${OrgChart._escapeDoubleQuotes(s.value)}" autocomplete="off">\n </div>\n </div>`,id:s.id,value:s.value}},OrgChart.elements._vidrf=function(e,i,o){var a={};if(i.binding||(i.binding=""),i.label||(i.label=""),"select"!=i.type||Array.isArray(i.options)?a.options=i.options:a.options=[],a.value=e&&!OrgChart.isNEU(e[i.binding])?e[i.binding]:"",o&&a.options)for(var s=0;s<a.options.length;s++)if(a.options[s].value==a.value){a.value=a.options[s].text;break}if(a.id=OrgChart.elements.generateId(),a.disabledAttribute=o?"data-boc-input-disabled":"",a.readOnlyAttribute=o?"readonly":"",a.id=a.id,o&&OrgChart.isNEU(a.value)&&(a.doNotRender=!0),o&&"photo"==i.binding&&(a.id=null,a.doNotRender=!0),a.binding=i.binding,a.label=i.label,a.vlidators="",i.vlidators)for(var l in i.vlidators)a.vlidators+=`data-v-${l}="${i.vlidators[l]}" `;return a},OrgChart.elements.ids=[],OrgChart.elements.generateId=function(){for(;;){var e="_"+("0000"+(Math.random()*Math.pow(36,4)|0).toString(36)).slice(-4);if(!OrgChart.elements.ids.has(e))return OrgChart.elements.ids.push(e),e}},OrgChart.input={},OrgChart.input._timeout=null,OrgChart.input.initWithTimeout=function(){OrgChart.input._timeout&&(clearTimeout(OrgChart.input._timeout),OrgChart.input._timeout=null),OrgChart.input._timeout=setTimeout(OrgChart.input.init,200)},OrgChart.input.init=function(e){var i;i=e?e.querySelectorAll("[data-boc-input]"):document.querySelectorAll("[data-boc-input]");for(var o=0;o<i.length;o++){var a=i[o],s=null;a.type&&"hidden"==a.type.toLowerCase()&&(s=a),s||(s=a.querySelector("input")),s||(s=a.querySelector("select"));var l=a.querySelector("label");l&&(s.value||"select-one"==s.type&&s.selectedOptions&&s.selectedOptions.length&&""==s.selectedOptions[0].value&&s.selectedOptions[0].innerHTML)&&l.classList.add("hasval"),"checkbox"!=s.type.toLowerCase()&&s.addEventListener("focus",function(){this.classList.remove("boc-validation-error");var e=this.parentNode.querySelector("label");e.classList.add("focused");var i=e.querySelector(".boc-validation-error-message");i&&i.parentNode.removeChild(i)}),"checkbox"!=s.type.toLowerCase()&&s.addEventListener("blur",function(){OrgChart.input.blurHandler(this)})}},OrgChart.input.blurHandler=function(e){var i=e.parentNode.querySelector("label");i.classList.remove("focused"),e.value||"date"==e.type?i.classList.add("hasval"):i.classList.remove("hasval")},OrgChart.input.validate=function(e){var i=null;e.type&&"hidden"==e.type.toLowerCase()&&(i=e),i||(i=e.querySelector("input")),i||(i=e.querySelector("select"));var o=e.querySelector("label");if(i.classList.remove("boc-validation-error"),o){var a=o.querySelector(".boc-validation-error-message");a&&a.parentNode.removeChild(a)}!i.selectedOptions&&i.value&&(i.value=i.value.trim());var s=e.getAttribute("data-v-required"),l=e.getAttribute("data-v-password"),c=e.getAttribute("data-v-email"),d=e.getAttribute("data-v-emails");return s&&""==i.value?(o.innerHTML+='<span class="boc-validation-error-message">&nbsp;'+s+"</span>",i.classList.add("boc-validation-error"),!1):l&&!OrgChart.input.validatePassword(i.value)?(o.innerHTML+='<span class="boc-validation-error-message">&nbsp;'+l+"</span>",i.classList.add("boc-validation-error"),!1):c&&!OrgChart.input.isValidEmail(i.value)?(o.innerHTML+='<span class="boc-validation-error-message">&nbsp;'+c+"</span>",i.classList.add("boc-validation-error"),!1):!(d&&!OrgChart.input.isValidEmails(i.value))||(o.innerHTML+='<span class="boc-validation-error-message">&nbsp;'+d+"</span>",i.classList.add("boc-validation-error"),!1)},OrgChart.input.validateAndGetData=function(e){for(var i=e.querySelectorAll("[data-boc-input]"),o=!0,a=0;a<i.length;a++){var s=i[a];OrgChart.input.validate(s)||(o=!1)}return!!o&&OrgChart.input.getData(e)},OrgChart.input.getData=function(e){for(var i=e.querySelectorAll("[data-binding]"),o={},a=0;a<i.length;a++){var s=i[a],l=s.getAttribute("data-binding");if("checkbox"==s.type.toLowerCase())o[l]=s.checked;else if(s.selectedOptions&&s.hasAttribute("multiple")){var c=s.selectedOptions;o[l]=Array.from(c).map(({value:e})=>e)}else o[l]=s.value}return o},OrgChart.input.validatePassword=function(e){return e&&(e=e.trim()),!(e.length<5)&&(!(e.length>18)&&-1==e.indexOf(" "))},OrgChart.input.isValidEmails=function(e){if(e)for(var i=e.split(","),o=0;o<i.length;o++){var a=i[o].trim();if(!OrgChart.input.isValidEmail(a))return!1}return!0},OrgChart.input.isValidEmail=function(e){return e&&(e=e.trim()),/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(String(e).toLowerCase())},OrgChart.ui.css=function(){return'<style data-boc-styles>.boc-ai-form{height:100%;width:100%;box-shadow:rgba(0,0,0,.2) 0 6px 6px 0,rgba(0,0,0,.19) 0 13px 20px 0;display:flex;flex-direction:column;height:100%;width:400px}.boc-dark .boc-ai-form{color:#aeaeae}.boc-light .boc-ai-form{color:#757575}.boc-ai-messages{font-size:16px}@media screen and (max-width:500px){.boc-ai-form{width:100%}}.boc-dark .boc-ai-form{background-color:#252526}.boc-light .boc-ai-form{background-color:#fff}.boc-ai-button{font-size:32px;position:absolute;top:20px;left:20px;cursor:pointer;padding:12px;border-radius:50%;user-select:none}.boc-dark .boc-ai-button{color:#aeaeae}.boc-light .boc-ai-button{color:#757575}.boc-ai-button:hover{color:#fff;background-color:#039be5}.boc-ai-container{padding:0 14px;display:grid;grid-template-rows:40px auto 80px;gap:10px;height:100%}.boc-ai-container .boc-input input{padding-right:50px}.boc-ai-close{text-align:end;margin-top:20px}.boc-ai-close svg{cursor:pointer}.boc-ai-start{text-align:center;display:flex;justify-content:center;align-items:center;user-select:none}.boc-ai-start span{font-weight:700;font-size:32px;font:"Segoe UI",Arial,sans-serif;background:linear-gradient(90deg,#039be5 28%,#f57c00,#ffca28);color:transparent!important;background-clip:text;display:inline-block;padding:10px 0}.boc-ai-send.boc-ai-send-cansend{cursor:pointer;background-color:#039be5}.boc-ai-send.boc-ai-send-cansend:hover{background-color:#f57c00}.boc-ai-send.boc-ai-send-cansend:active{background-color:#ffca28}.boc-ai-send{background-color:transparent;position:absolute;right:7px;top:7px;width:38px;height:38px;border-radius:50%;text-align:center;background-repeat:no-repeat;background-position:center;background-size:20px 20px}.boc-ai-send svg{display:block;margin:auto;height:100%}.boc-ai-user-message{text-align:end;margin:14px 0}.boc-inner-user-message{padding:7px;border-radius:7px;display:inline-block}.boc-ai-middle{overflow-y:auto}.boc-ai-middle::-webkit-scrollbar{display:none}.boc-button{background-color:#039be5;cursor:pointer;width:calc(100%);height:50px;color:#fff;padding-top:5px;padding-left:7px;padding-right:7px;text-align:center;text-transform:uppercase;border:1px solid #3fc0ff;display:inline-block;border-radius:5px}.boc-button.orange{background-color:#f57c00;border:1px solid #ffa03e}.boc-button.yellow{background-color:#ffca28;border:1px solid #ffdf7c}.boc-button.lower{text-transform:unset}.boc-button.transparent{background-color:transparent}.boc-button:hover{background-color:#35afea}.boc-button.orange:hover{background-color:#f79632}.boc-button.yellow:hover{background-color:#ffd452}.boc-button:active{transform:matrix(.98,0,0,.98,0,0)}.boc-button-icon{text-align:initial;cursor:pointer;margin-bottom:15px;color:#039be5}.boc-dark .boc-button-icon:hover{background-color:#2d2d2d}.boc-light .boc-button-icon:hover{background-color:#ececec}.boc-button-icon>img{height:24px;width:24px;vertical-align:middle;padding:7px}.boc-button:focus{outline:0}.boc-button-icon>img{filter:invert(46%) sepia(66%) saturate(2530%) hue-rotate(171deg) brightness(95%) contrast(98%)}.boc-light .boc-button.transparent{color:#039be5}.boc-light .boc-button.transparent:hover{color:#fff}.boc-button-loading{background-color:transparent;cursor:pointer;width:calc(100% - 2px);height:50px;color:#fff;text-align:center;text-transform:uppercase;border:1px solid #027cb7;display:inline-block;display:flex;justify-content:center;align-items:center;display:none}.boc-button-loading .boc-loading-dots div{margin:0 10px}.boc-link-boc-button{position:absolute;right:10px;top:-1px}@media screen and (max-width:1000px){.boc-link-boc-button{right:50px}}[data-boc-input-disabled] .boc-link-boc-button{display:none}[dir=rtl] .boc-link-boc-button{left:10px;right:unset}.boc-img-button{width:48px;height:48px;cursor:pointer;border-radius:50%;background-color:#039be5;background-repeat:no-repeat;background-size:24px 24px;background-position:center center;margin:3px;display:inline-block}.boc-img-button:hover{background-color:#f57c00}.boc-checkbox{display:block;position:relative;padding-left:35px;margin-bottom:12px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap}.boc-checkbox input{position:absolute;opacity:0;cursor:pointer;height:0;width:0}.boc-checkbox-checkmark{position:absolute;top:0;left:0;height:25px;width:25px;border-radius:5px}.boc-dark [data-boc-input-disabled] .boc-checkbox-checkmark,.boc-dark [data-boc-input-disabled].boc-checkbox input:checked~.boc-checkbox-checkmark,.boc-light [data-boc-input-disabled] .boc-checkbox-checkmark,.boc-light [data-boc-input-disabled].boc-checkbox input:checked~.boc-checkbox-checkmark{background-color:#aeaeae!important}[data-boc-input-disabled].boc-checkbox{cursor:default}[dir=rtl] .boc-checkbox-checkmark{right:0}[dir=rtl] .boc-checkbox{padding-left:unset;padding-right:35px}.boc-dark .boc-checkbox-checkmark{background-color:#333;border:1px solid #5b5b5b}.boc-light .boc-checkbox-checkmark{background-color:#fff;border:1px solid #c7c7c7}.boc-dark .boc-checkbox:hover input~.boc-checkbox-checkmark{background-color:#3c3c3c}.boc-light .boc-checkbox:hover input~.boc-checkbox-checkmark{background-color:#f8f9f9}.boc-dark .boc-checkbox input:checked~.boc-checkbox-checkmark{background-color:#039be5}.boc-light .boc-checkbox input:checked~.boc-checkbox-checkmark{background-color:#039be5}.boc-checkbox-checkmark:after{content:"";position:absolute;display:none}.boc-checkbox input:checked~.boc-checkbox-checkmark:after{display:block}.boc-checkbox .boc-checkbox-checkmark:after{left:9px;top:5px;width:5px;height:10px;border:solid #fff;border-width:0 3px 3px 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.boc-controls{display:flex;gap:7px;position:absolute}.boc-controls-top{left:unset;top:15px;right:50%;bottom:unset;transform:translateX(50%);flex-direction:row}.boc-controls-bottom{left:unset;top:unset;right:50%;bottom:15px;transform:translateX(50%);flex-direction:row}.boc-controls-left{left:15px;top:50%;right:unset;bottom:unset;transform:translateY(-50%);flex-direction:column}.boc-controls-right{left:unset;top:50%;right:15px;bottom:unset;transform:translateY(-50%);flex-direction:column}.boc-controls-bottom_right,.boc-controls-right_bottom{left:unset;top:unset;right:15px;bottom:15px;flex-direction:row}.boc-controls-right_bottom{flex-direction:column}.boc-controls-right_top,.boc-controls-top_right{left:unset;top:15px;right:15px;bottom:unset;flex-direction:row}.boc-controls-right_top{flex-direction:column}.boc-controls-bottom_left,.boc-controls-left_bottom{left:15px;top:unset;right:unset;bottom:15px;flex-direction:row}.boc-controls-left_bottom{flex-direction:column}.boc-controls-left_top,.boc-controls-top_left{left:15px;top:15px;right:unset;bottom:unset;flex-direction:row}.boc-controls-left_top{flex-direction:column}.boc-controls [data-control-id] svg{display:block;margin:0 auto}.boc-controls [data-control-id]{display:flex;align-items:center;cursor:pointer;width:60px;height:60px;border-radius:30px;box-shadow:0 4px 30px rgba(0,0,0,.1);backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px)}.boc-light .boc-controls [data-control-id]{background:rgba(255,255,255,.2);border:1px solid #c7c7c7}.boc-dark .boc-controls [data-control-id]{background:rgba(30,30,30,.2);border:1px solid #5b5b5b}.boc-controls [data-control-id]:hover{background-color:#0074e8}.boc-controls [data-control-id]:hover svg{filter:brightness(0) invert(1)}.boc-controls [data-control-id].boc-control-selected{background-color:#0074e8}.boc-controls [data-control-id].boc-control-selected svg{filter:brightness(0) invert(1)}.boc-filter{user-select:none}.boc-light .boc-filter{color:#757575}.boc-dark .boc-filter{color:#ccc}.boc-filter>div>div{display:inline-block;padding:3px 10px;cursor:pointer}.boc-filter-menu fieldset,.boc-filter>div,.filter-field-selected{border-radius:5px}.boc-filter-menu fieldset{overflow-y:auto;max-height:300px}.boc-filter>div.boc-filter-menu{padding:10px}.boc-light .boc-filter>div.boc-filter-menu,.boc-light .filter-field-selected{background-color:#f8f9f9}.boc-dark .boc-filter>div.boc-filter-menu,.boc-dark .filter-field-selected{background-color:#3c3c3c}.boc-light .boc-filter>div{background-color:#eee}.boc-dark .boc-filter>div{background-color:#333}.boc-form-perspective{transform-style:preserve-3d;perspective:500px;position:absolute;top:32px}.boc-form{box-shadow:rgba(0,0,0,.2) 0 6px 6px 0,rgba(0,0,0,.19) 0 13px 20px 0;padding:14px;transform-origin:top center;user-select:none;display:none;position:relative;max-height:calc(100vh - 100px);overflow-y:auto;border-bottom-left-radius:5px;border-bottom-right-radius:5px}.boc-form-bottom{border-bottom-left-radius:unset;border-bottom-right-radius:unset;border-top-left-radius:5px;border-top-right-radius:5px}.boc-form .separator{margin:0 10px}@media screen and (max-width:1000px){.boc-form-perspective{min-width:100%;max-height:calc(100% - 32px);left:unset!important;right:unset!important;transform:none!important}.boc-form .set{max-height:calc(100vh - 74px)}.boc-form-fieldset{max-width:unset!important}}.boc-light .boc-form .separator{border-bottom:1px solid #c7c7c7}.boc-dark .boc-form .separator{border-bottom:1px solid #5b5b5b}.boc-light .boc-form{background-color:#fff}.boc-dark .boc-form{background-color:#252526}.boc-item{padding:6px 12px 6px 12px;display:flex;flex-direction:row}.boc-light .boc-form .boc-item.selected,.boc-light .boc-form .boc-item:hover{background-color:#0074e8;color:#fff}.boc-dark .boc-form .boc-item.selected,.boc-dark .boc-form .boc-item:hover{background-color:#094771;color:#fff}.boc-item.selected img,.boc-item:hover img{filter:invert(100%)}.boc-item.selected img{visibility:visible!important}.boc-form-fieldset{display:flex;flex-wrap:wrap;margin:0!important}.boc-form-field{flex:1 0 21%;margin:3px;min-width:200px}.boc-form-field-100{flex:1 0 96%;margin:3px;min-width:200px}.boc-input{position:relative}.boc-input>input,.boc-input>select{height:50px;padding:18px 10px 2px 9px;width:100%;box-sizing:border-box;border-style:solid;border-width:1px}.boc-input select{height:50px;padding:20px 5px 4px 5px}[data-boc-input-disabled].boc-input>input,[data-boc-input-disabled].boc-input>select{border-color:transparent!important}.boc-light [data-boc-input-disabled]>input,.boc-light [data-boc-input-disabled]>select{background-color:#fff!important}.boc-dark [data-boc-input-disabled]>input,.boc-dark [data-boc-input-disabled]>select{background-color:#252526!important}[data-boc-input-disabled]>select{appearance:none;padding-left:8px}.boc-input>label{display:inline-block;position:absolute;padding-left:10px;padding-right:10px;color:#acacac;cursor:text;-webkit-transition:all .1s ease-out;-moz-transition:all .1s ease-out;-ms-transition:all .1s ease-out;-o-transition:all .1s ease-out;transition:all .1 ease-out;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:initial;text-align:initial;white-space:nowrap}.boc-input>label{top:12px;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 14px)}.boc-input>label.focused,.boc-input>label.hasval{top:-1px}.boc-input>input,.boc-input>select{outline:0;border-radius:5px}.boc-dark .boc-input>label.focused,.boc-light .boc-input>label.focused{color:#039be5}.boc-dark .boc-input>input,.boc-dark .boc-input>select{color:#ccc;background-color:#333;border-color:#5b5b5b}.boc-light .boc-input>input,.boc-light .boc-input>select{color:#757575;background-color:#fff;border-color:#c7c7c7}.boc-light .boc-input>input:focus,.boc-light .boc-input>select:focus{border-color:#039be5;background-color:#f8f9f9}.boc-dark .boc-input>input:focus,.boc-dark .boc-input>select:focus{border-color:#039be5;background-color:#3c3c3c}.boc-dark .boc-input>input.boc-validation-error,.boc-dark .boc-input>select.boc-validation-error,.boc-light .boc-input>input.boc-validation-error,.boc-light .boc-input>select.boc-validation-error{border-color:#ca2a2a}.boc-dark .boc-validation-error-message,.boc-light .boc-validation-error-message{color:#ca2a2a}.boc-input select.multiple{height:initial}.boc-link{color:#039be5;cursor:pointer;text-decoration:underline}.boc-link:hover{color:#f57c00}.boc-dark ::-webkit-scrollbar,.boc-light ::-webkit-scrollbar{width:15px;height:15px}.boc-dark ::-webkit-scrollbar-corner{background:#1e1e1e}.boc-dark ::-webkit-scrollbar-track{background:#1e1e1e;border-left:1px solid #333;border-top:1px solid #333}.boc-dark ::-webkit-scrollbar-thumb{background:#424242}.boc-dark ::-webkit-scrollbar-thumb:hover{background:#4f4f4f}.boc-dark ::-webkit-scrollbar-thumb:active{background:#5e5e5e}.boc-light ::-webkit-scrollbar-corner{background:#fff}.boc-light ::-webkit-scrollbar-track{background:#fff;border-left:1px solid #ddd;border-top:1px solid #ddd}.boc-light ::-webkit-scrollbar-thumb{background:#c1c1c1}.boc-light ::-webkit-scrollbar-thumb:hover{background:#929292}.boc-light ::-webkit-scrollbar-thumb:active{background:#666}.boc-edit-form{position:fixed;top:0;right:0;height:100%;width:100%;box-shadow:rgba(0,0,0,.2) 0 6px 6px 0,rgba(0,0,0,.19) 0 13px 20px 0;display:flex;flex-direction:column;height:100%;width:400px}@media screen and (max-width:1000px){.boc-edit-form{width:100%}}.boc-dark .boc-edit-form{background-color:#252526}.boc-light .boc-edit-form{background-color:#fff}.boc-edit-form-header{height:200px;text-align:center;border-radius:10px}.export-service .boc-edit-form-header{border-radius:unset}.boc-edit-form-title{color:#fff;margin:0;padding:14px 17px 7px 17px}.boc-edit-form-avatar{border-radius:50%;width:150px;height:150px;position:absolute;top:75px;border:5px solid #fff;left:50%;transform:translateX(-50%);background-color:#cacaca;box-shadow:rgba(0,0,0,.2) 0 6px 6px 0,rgba(0,0,0,.19) 0 13px 20px 0}.boc-edit-form-close{position:absolute;right:14px;top:14px;width:34px;height:34px;cursor:pointer}.boc-edit-form-fields{flex-grow:1;overflow-y:auto;overflow-x:hidden}.boc-edit-form-fields-inner{margin:0 7px 20px 7px}.boc-ai-user-message{text-align:end;margin:14px 0}.boc-inner-user-message{padding:7px;border-radius:7px;display:inline-block}.dark .boc-inner-user-message{background-color:#333}.light .boc-inner-user-message{background-color:#f9f9f9}.boc-export-form{box-shadow:rgba(0,0,0,.2) 0 -6px 6px 0,rgba(0,0,0,.19) 0 -13px 20px 0;display:flex;flex-direction:column;height:100%;width:400px}.boc-dark .boc-export-form{color:#aeaeae;background-color:#252526}.boc-light .boc-export-form{color:#757575;background-color:#eee}@media screen and (max-width:500px){.boc-export-form{width:100%}}.boc-export-container{display:grid;grid-template-rows:40px auto;gap:10px;height:100%}.boc-export-page{width:100%;border:1px solid #aeaeae;display:flex;justify-content:center;align-items:center;user-select:none;position:relative}.boc-export-selected{border:1px solid #ffca28}.boc-export-middle{overflow-y:auto;overflow-x:hidden;padding:0 3px 0 0;margin-bottom:10px}.boc-export-btns-inner{padding-top:14px;display:flex;justify-content:space-between}.boc-export-left{justify-content:flex-start}.boc-export-right{justify-content:flex-end}.boc-export-left,.boc-export-right{user-select:none}.boc-export-select{position:absolute;top:0;left:0;text-align:center;width:100%}.boc-export-child-buttons{position:absolute;bottom:7px;left:7px;display:none}.boc-export-page:hover .boc-export-child-buttons{display:initial}.boc-export-parent-buttons{position:absolute;top:7px;left:7px;display:none}.boc-export-page:hover .boc-export-parent-buttons{display:initial}.boc-export-remove-buttons{position:absolute;bottom:7px;right:7px;display:none}.boc-export-page:hover .boc-export-remove-buttons{display:initial}.boc-export-child-buttons button,.boc-export-parent-buttons button{width:23px}.boc-export-profiletree-buttons{position:absolute;top:7px;right:7px;display:none}.boc-export-page:hover .boc-export-profiletree-buttons{display:initial}.boc-export-middle-inner{display:grid;gap:10px;margin:0 10px}.boc-export-btns-inner{margin:0 10px}.boc-chart-menu{opacity:0;display:inline-block;position:absolute;text-align:left;user-select:none;min-width:270px;box-shadow:rgba(0,0,0,.2) 0 4px 8px 0,rgba(0,0,0,.19) 0 6px 20px 0;font:13px/28px Helvetica,"Segoe UI",Arial,sans-serif;border-radius:10px}.boc-chart-menu>div:hover img{filter:invert(100%)}.boc-chart-menu [data-item]{text-align:start;padding:7px 10px}.boc-dark .boc-chart-menu [data-item]{background-color:#252526;color:#acacac;border-bottom:1px solid #333}.boc-dark .boc-chart-menu [data-item]:hover{background-color:#094771!important;color:#fff!important}.boc-dark .boc-chart-menu [data-item]:hover svg{filter:brightness(0) invert(1)}.boc-light .boc-chart-menu [data-item]{background-color:#fff;color:#333;border-bottom:1px solid #c7c7c7}.boc-light .boc-chart-menu [data-item]:hover{background-color:#0074e8!important;color:#fff!important}.boc-light .boc-chart-menu [data-item]:hover svg{filter:brightness(0) invert(1)}.boc-chart-menu [data-item] svg{vertical-align:middle}.boc-chart-menu [data-item]:first-child{border-top-left-radius:7px;border-top-right-radius:7px}.boc-chart-menu [data-item]:last-child{border-bottom-width:0;border-bottom-style:none;border-bottom-left-radius:7px;border-bottom-right-radius:7px}.boc-orgscribe-form{height:100%;width:100%;box-shadow:rgba(0,0,0,.2) 0 6px 6px 0,rgba(0,0,0,.19) 0 13px 20px 0;display:flex;flex-direction:column;height:100%;width:400px}@media screen and (max-width:500px){.boc-orgscribe-form{width:100%}}.boc-dark .boc-orgscribe-form{background-color:#252526}.boc-light .boc-orgscribe-form{background-color:#fff}.boc-orgscribe-container{padding:0 14px;display:grid;grid-template-rows:40px auto 10px;gap:10px;height:100%}.boc-orgscribe-container .boc-input input{padding-right:50px}.boc-orgscribe-close{text-align:end;margin-top:20px}.boc-orgscribe-close svg{cursor:pointer}.boc-orgscribe-txt{width:100%;height:100%;box-sizing:border-box;border-style:solid;border-width:1px;outline:0;border-radius:5px;font-size:24px}.boc-dark .boc-orgscribe-txt{color:#ccc;background-color:#333;border-color:#5b5b5b}.boc-light .boc-orgscribe-txt{color:#757575;background-color:#fff;border-color:#c7c7c7}.boc-search{position:absolute}@media screen and (max-width:500px){.boc-search{width:calc(100% - 30px);left:15px}}.boc-search .boc-input{margin-bottom:0}.boc-search-input{color:#7a7a7a;width:100%;border:none;outline:0;padding-top:10px;padding-right:47px}.boc-search-image-td{width:43px}.boc-search-text-td{padding-inline-end:7px;line-height:15px;text-align:start}.boc-search table{box-shadow:rgba(0,0,0,.2) 0 4px 8px 0,rgba(0,0,0,.19) 0 6px 20px 0;margin:0 3.5px 0 3.5px;width:calc(100% - 7px);border-radius:7px}.boc-search table tr:first-child td:first-child{border-top-left-radius:7px}.boc-search table tr:first-child td:last-child{border-top-right-radius:7px}[dir=rtl] .boc-search table tr:first-child td:first-child{border-top-left-radius:unset;border-top-right-radius:7px}[dir=rtl] .boc-search table tr:first-child td:last-child{border-top-right-radius:unset;border-top-left-radius:7px}.boc-search table tr:last-child td:first-child{border-bottom-left-radius:7px}.boc-search table tr:last-child td:last-child{border-bottom-right-radius:7px}[dir=rtl] .boc-search table tr:last-child td:first-child{border-bottom-left-radius:unset;border-bottom-right-radius:7px}[dir=rtl] .boc-search table tr:last-child td:last-child{border-bottom-right-radius:unset;border-bottom-left-radius:7px}.boc-dark .boc-search table{background-color:#252526;color:#acacac}.boc-search [data-search-item-id]{cursor:pointer}.boc-search-photo{margin:7px 7px 0 7px;width:32px;height:32px;background-size:cover;background-position:top center;border-radius:50%;display:inline-block;border:1px solid #8c8c8c}.boc-search [data-search-item-id]:hover .boc-link{color:#ffca28}.boc-search [data-search-item-id]:hover .boc-link:hover{color:#f57c00}.boc-dark .boc-search [data-search-item-id] td{border-top:1px solid #333}.boc-dark .boc-search [data-search-item-id]:hover,.boc-dark .boc-search [data-selected=yes]{background-color:#094771;color:#fff}.boc-light .boc-search table{background-color:#fff;color:#333}.boc-light .boc-search [data-search-item-id] td{border-top:1px solid #c7c7c7}.boc-light .boc-search [data-search-item-id]:hover,.boc-light .boc-search [data-selected=yes]{background-color:#0074e8;color:#fff}.boc-search [data-search-item-id]:first-child td{border-top:unset}.boc-ripple-container{position:absolute;top:0;right:0;bottom:0;left:0}.boc-drag-over rect{opacity:.5}.boc-ripple-container span{transform:scale(0);border-radius:100%;position:absolute;opacity:.75;background-color:#fff;animation:boc-ripple 1s}@-moz-keyframes boc-ripple{to{opacity:0;transform:scale(2)}}@-webkit-keyframes boc-ripple{to{opacity:0;transform:scale(2)}}@-o-keyframes boc-ripple{to{opacity:0;transform:scale(2)}}@keyframes boc-ripple{to{opacity:0;transform:scale(2)}}.boc-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.4s;transition:.4s}.boc-slider:before{position:absolute;content:"";height:16px;width:16px;left:4px;bottom:4px;background-color:#fff;-webkit-transition:.4s;transition:.4s}.boc-slider.round{border-radius:24px}.boc-slider.round:before{border-radius:50%}svg text:hover{cursor:default}svg.boc-cursor-grab,svg.boc-cursor-grab text:hover{cursor:grab}svg.boc-cursor-nodrop,svg.boc-cursor-nodrop text:hover{cursor:no-drop}svg.boc-cursor-copy,svg.boc-cursor-copy text:hover{cursor:copy}svg.boc-cursor-move,svg.boc-cursor-move text:hover{cursor:move}#boc-close-btn:focus,#boc-close-btn:hover{color:#000;text-decoration:none;cursor:pointer}#boc-id-select:focus{outline:.5px solid #aeaeae}#boc-sampleDialog #title:hover{cursor:default;background:gray}.boc-light{background-color:#fff;font:13px/28px Helvetica,"Segoe UI",Arial,sans-serif}.boc-dark{background-color:#1e1e1e;font:13px/28px Helvetica,"Segoe UI",Arial,sans-serif}.boc-dark input,.boc-dark select,.boc-light input,.boc-light select{font:16px Helvetica,"Segoe UI",Arial,sans-serif}.boc-dark h1,.boc-light h1{font-size:30px;line-height:1}.boc-light [data-boc-content]::backdrop{background-color:#fff}.boc-dark [data-boc-content]::backdrop{background-color:#1e1e1e}.boc-dark text,.boc-light text{user-select:none}.boc-edit-form{position:absolute;border-radius:10px}.export-service .boc-edit-form{border-radius:unset}.boc-dark .boc-edit-form{color:#acacac}.boc-light .boc-edit-form{color:#333}.boc-dark ::-webkit-calendar-picker-indicator{filter:invert(70%)}.boc-light ::-webkit-calendar-picker-indicator{filter:invert(50%)}.boc-edit-form-instruments{margin:42px 10px 0 10px;text-align:center;min-height:70px}.boc-img-button svg{position:relative;top:12px}.boc-light .boc-toolbar-container svg circle,.boc-light .boc-toolbar-container svg line,.boc-light .boc-toolbar-container svg path{stroke:#8c8c8c!important}.boc-dark .boc-toolbar-container svg circle,.boc-dark .boc-toolbar-container svg line,.boc-dark .boc-toolbar-container svg path{stroke:#8c8c8c!important}.boc-dark .boc-toolbar-container svg rect{fill:#252526!important}.boc-dark .boc-toolbar-container [data-tlbr=minus] svg{border-left:1px solid #5b5b5b!important;border-right:1px solid #5b5b5b!important;border-bottom:1px solid #5b5b5b!important}.boc-dark .boc-toolbar-container [data-tlbr=plus] svg{border-left:1px solid #5b5b5b!important;border-right:1px solid #5b5b5b!important;border-top:1px solid #5b5b5b!important}.boc-dark .boc-toolbar-container [data-tlbr]>svg{border:1px solid #5b5b5b!important;background-color:#252526!important}.boc-toolbar-layout{height:123px;padding-top:20px;position:absolute;width:100%;left:"0";bottom:"-145px"}.boc-light .boc-toolbar-layout{border-top:1px solid #c7c7c7;background-color:#f9f9f9}.boc-dark .boc-toolbar-layout{border-top:1px solid #5b5b5b;background-color:#2b2b2b}.boc-dotted-connector path{stroke-dasharray:7}.boc-undo-redo{position:absolute;top:23px;left:23px}@media screen and (max-width:500px){.boc-undo-redo{position:absolute;top:83px;left:23px}}.boc-light .boc-undo-redo path{fill:#cacaca}.boc-dark .boc-undo-redo path{fill:#5b5b5b}.boc-light .boc-undo-redo .boc-ur-clickable path{fill:#9c9c9c}.boc-dark .boc-undo-redo .boc-ur-clickable path{fill:#8c8c8c}.boc-undo-redo .boc-ur-clickable rect{cursor:pointer}.boc-undo-redo>span{position:relative;display:inline-block;user-select:none}.boc-undo-redo .boc-undo-i{left:-6px;top:-6px}.boc-undo-redo .boc-redo-i{right:-6px;bottom:6px}.boc-undo-redo>span>span{color:#fff;position:absolute;display:inline-block;min-width:20px;min-height:20px;border-radius:50%;line-height:20px;text-align:center;padding:1px;user-select:none;cursor:pointer}.boc-light .boc-undo-redo>span>span{background-color:#9c9c9c}.boc-dark .boc-undo-redo>span>span{background-color:#8c8c8c}.boc-dark .treelist-pinned{filter:brightness(1.2)}.boc-light .treelist-pinned{filter:brightness(.9)}.boc-light .boc-scroll{fill:#fff}.boc-light .boc-scroll-thumb{fill:#c1c1c1}.boc-light .boc-scroll-thumb:hover{fill:#929292}.boc-dark .boc-scroll{fill:#1e1e1e}.boc-dark .boc-scroll-thumb{fill:#424242}.boc-dark .boc-scroll-thumb:hover{fill:#4f4f4f}</style>'},void 0===OrgChart&&(OrgChart={}),OrgChart.prototype.onField=function(e){return this.on("field",function(i,o){return e.call(i,o)})},OrgChart.prototype.onInit=function(e){return this.on("init",function(i){return e.call(i)})},OrgChart.prototype.onRedraw=function(e){return this.on("redraw",function(i){return e.call(i)})},OrgChart.prototype.onUpdateNode=function(e){return this.on("update",function(i,o,a){var s={oldData:o,newData:a};return e.call(i,s)})},OrgChart.prototype.onUpdated=function(e){return this.on("updated",function(i){return e.call(i)})},OrgChart.prototype.onRemoveNode=function(e){return this.on("remove",function(i,o,a){var s={id:o,newPidsAndStpidsForIds:a};return e.call(i,s)})},OrgChart.prototype.onAddNode=function(e){return this.on("add",function(i,o){var a={data:o};return e.call(i,a)})},OrgChart.prototype.onDrop=function(e){return this.on("drop",function(i,o,a,s,l){var c={dragId:o,dropId:a,dragNodeElement:s,event:l};return e.call(i,c)})},OrgChart.prototype.onDrag=function(e){return this.on("drag",function(i,o,a,s){var l={dragId:o,event:a,nodeIds:s};return e.call(i,l)})},OrgChart.prototype.onExpandCollapseButtonClick=OrgChart.prototype.onExpandCollpaseButtonClick=function(e){return this.on("expcollclick",function(i,o,a,s){var l={collapsing:o,id:a,ids:s};return e.call(i,l)})},OrgChart.prototype.onExportStart=function(e){return this.on("exportstart",function(i,o){return e.call(i,o)})},OrgChart.prototype.onExportEnd=function(e){return this.on("exportend",function(i,o){return e.call(i,o)})},OrgChart.prototype.onNodeClick=function(e){return this.on("click",function(i,o){return e.call(i,o)})},OrgChart.prototype.onCanvasClick=function(e){return this.on("canvas-click",function(i,o){return e.call(i,o)})},OrgChart.prototype.onNodeDoubleClick=function(e){return this.on("dbclick",function(i,o){var a={data:o};return e.call(i,a)})},OrgChart.prototype.onAIToolCalls=function(e){return this.on("ai-tool-calls",function(i,o){return e.call(i,o)})},OrgChart.filterUI=function(){},OrgChart.filterUI.prototype.init=function(e){this.instance=e,this.element=null,this.filterBy=null,this._event_id=OrgChart._guid()},OrgChart.filterUI.prototype.addFilterTag=function(e){if(!this.instance.config.filterBy)return!1;if(OrgChart.isNEU(e))return!1;if(null!==this.filterBy||"object"!=typeof this.instance.config.filterBy||Array.isArray(this.instance.config.filterBy)||(this.filterBy=JSON.parse(JSON.stringify(this.instance.config.filterBy))),null!=this.filterBy)for(var i in this.filterBy){var o=e[i];if(null!=o){var a=this.filterBy[i];if(null!=a){var s=a[o];if(null!=s&&!1===s.checked)return!0}}}return!1},OrgChart.filterUI.prototype.show=function(e){var i=this.element.querySelector('[data-filter-field="'+e+'"]');i&&i.click()},OrgChart.filterUI.prototype.hide=function(){var e=this.instance.element.querySelector("[data-filter-close]");e&&e.click()},OrgChart.filterUI.prototype._removeFilter=function(e){var i=this.instance.get(e);for(var o in this.filterBy){var a=this.filterBy[o];for(var s in i){var l=i[s];a[l]&&(a[l].checked=!0)}}this.update()},OrgChart.filterUI.prototype.update=function(){if(this.instance.config.filterBy){var e={};if("all"==this.instance.config.filterBy)for(var i=OrgChart.manager.getAllFields(this.instance.config),o=0;o<i.length;o++){var a=i[o];"tags"!=a&&"id"!=a&&"pid"!=a&&"ppid"!=a&&"stpid"!=a&&(e[a]={})}else if(Array.isArray(this.instance.config.filterBy))for(o=0;o<this.instance.config.filterBy.length;o++)e[this.instance.config.filterBy[o]]={};else if("object"==typeof this.instance.config.filterBy)for(var s in this.instance.config.filterBy)e[s]={};for(var l in e){var c=e[l];for(o=0;o<this.instance.config.nodes.length;o++){var d=this.instance.config.nodes[o][l];null!=d&&(c[d]||(c[d]={checked:!0,text:d}))}}if(null!=this.filterBy)for(var h in e)if(this.filterBy[h])for(var p in e[h])this.filterBy[h][p]&&(e[h][p]=this.filterBy[h][p]);if(OrgChart.FILTER_ALPHABETICALLY){var u=Object.keys(e).sort(),f=e;e={};for(o=0;o<u.length;o++){e[g=u[o]]=f[g]}for(var l in e){c=e[l];e[l]={};for(u=Object.keys(c).sort(),o=0;o<u.length;o++){var g=u[o];e[l][g]=c[g]}}}this.filterBy=e;var m=this;this.element=this.instance.element.querySelector("[data-filter]"),this.element&&this.element.parentNode.removeChild(this.element),this.element=document.createElement("div"),this.element.setAttribute("data-filter",""),this.element.style.position="absolute",this.element.setAttribute("class","boc-filter"),this.instance.config.undoRedoStorageName?(this.element.style.top=0,this.element.style.left="50%",this.element.style.transform="translate(-50%)"):(this.element.style.top=this.instance.config.padding+"px",this.element.style.left=this.instance.config.padding+"px");var b="";for(var h in this.filterBy){var x={name:h,html:`<div data-filter-field="${h}">${h}</div>`};OrgChart.events.publish("add-filter",[m,x]),b+=x.html}this.element.innerHTML=`<div>${b}</div>`,this.element.addEventListener("click",function(e){if(e.target.hasAttribute("data-filter-close")||e.target.hasAttribute("data-filter-field")){for(var i=e.target.getAttribute("data-filter-field"),o=m.instance.element.querySelectorAll("[data-filter-menu]"),a=0;a<o.length;a++)o[a].style.display="none";var s=m.instance.element.querySelectorAll(".filter-field-selected");for(a=0;a<s.length;a++)s[a].classList.remove("filter-field-selected");var l=m.instance.element.querySelector("[data-filter-close]");if(l&&l.parentNode.removeChild(l),e.target.hasAttribute("data-filter-close"))return;if(!e.target.hasAttribute("data-filter-field"))return;var c=m.instance.element.querySelector(`[data-filter-menu="${i}"]`);if(!c){var d="checked";for(var h in m.filterBy[i])m.filterBy[i][h].checked||(d="");var p={name:i,text:OrgChart.filterUI.all,value:i,checked:!0,html:`<div>\n <input data-all type="checkbox" id="${i}" name="${i}" ${d}>\n <label for="${i}">${OrgChart.filterUI.all}</label>\n </div>`};OrgChart.events.publish("add-item",[m,p]);var u=p.html;for(var f in m.filterBy[i]){var g=m.filterBy[i][f],b=g.text;null==b&&(b=f),p={name:i,text:b,value:f,checked:g.checked,html:`<div>\n <input type="checkbox" id="${i}_${f}" name="${f}" ${g.checked?"checked":""}>\n <label for="${i}_${f}">${b}</label>\n </div>`},OrgChart.events.publish("add-item",[m,p]),u+=p.html}c=document.createElement("div");var x=OrgChart.filterUI.textFilterBy;c.innerHTML=`<fieldset>\n <legend>${x} ${i}:</legend>\n ${u}\n </fieldset>`,c.setAttribute("data-filter-menu",i),c.classList.add("boc-filter-menu"),e.target.parentNode.parentNode.appendChild(c);var v=c.querySelectorAll("input");for(a=0;a<v.length;a++)v[a].addEventListener("change",function(e){for(var i=e.target;i&&!i.hasAttribute("data-filter-menu");)i=i.parentNode;if(i){var o=i.getAttribute("data-filter-menu");if(e.target.hasAttribute("data-all")){for(var a=e.target.parentNode.parentNode.querySelectorAll("input"),s=0;s<a.length;s++)if(a[s]!=e.target)for(var l in a[s].checked=e.target.checked,m.filterBy[o])m.filterBy[o][l].checked=e.target.checked}else if(null!=m.filterBy[o][this.name]&&(m.filterBy[o][this.name].checked=this.checked),this.checked)for(var c=m.instance.config.nodes,d=0;d<c.length;d++)if(c[d][o]==this.name)for(var h=c[d];h;)if(OrgChart.isNEU(h.stpid))h=OrgChart.isNEU(h.pid)?null:m.instance._get(h.pid);else if((h=m.instance._get(h.stpid))[o]){var p=e.target.parentNode.parentNode.querySelector('[name="'+h[o]+'"]');p?(p.checked=this.checked,m.filterBy[o][h[o]].checked=this.checked):console.error('Cannot find element with selector: [name="'+h[o]+'"]')}var u=!0;for(var f in m.filterBy[o])m.filterBy[o][f].checked||(u=!1);i.querySelector("[data-all]").checked=u,m.instance.draw()}})}c.style.display="block",e.target.classList.add("filter-field-selected"),(l=document.createElement("div")).classList.add("close"),l.innerHTML="x",l.setAttribute("data-filter-close",""),e.target.parentNode.appendChild(l),OrgChart.events.publish("show-items",[m,{name:i}])}}),this.instance.element.appendChild(this.element),OrgChart.events.publish("update",[this,{}])}},OrgChart.filterUI.prototype.on=function(e,i){return OrgChart.events.on(e,i,this._event_id),this},OrgChart.filterUI.textFilterBy="Filter by",OrgChart.filterUI.all="[All]",void 0===OrgChart&&(OrgChart={}),void 0===OrgChart.remote&&(OrgChart.remote={}),OrgChart.LIMIT_NODES=!0,OrgChart.remote._fromResDTO=function(e,i,o,a,s){var l=i[e.id];e.x=l.p[0],e.y=l.p[1],e.w=l.p[2],e.h=l.p[3],null!=l.ln&&(e.leftNeighbor=s[l.ln]),null!=l.rn&&(e.rightNeighbor=s[l.rn]),l.tl&&(e.treeList={},e.treeList.pinnedIds=l.tl[0],e.treeList.scrollTop=l.tl[1],e.treeList.scrollTopMax=l.tl[2],e.treeList.maxHeight=l.tl[3]);for(var c=0;c<e.stChildren.length;c++)OrgChart.remote._fromResDTO(e.stChildren[c],i,o,a,s);for(c=0;c<e.children.length;c++)OrgChart.remote._fromResDTO(e.children[c],i,o,a,s)},OrgChart.remote._toReqDTO=function(e,i){var o={p:[e.id,null!=e.parent?e.parent.id:null,null!=e.stParent?e.stParent.id:null,e.w,e.h]};e.children.length>0&&(o.c=OrgChart.remote._convertToIdArray(e.children)),e.stChildren.length>0&&(o.v=OrgChart.remote._convertToIdArray(e.stChildren)),null!=e.layout&&0!=e.layout&&(o.l=e.layout),e.isAssistant&&(o.a=1),e.isSplit&&(o.s=e.isSplit),e.isMirror&&(o.im=e.isMirror),e.padding&&(o.q=e.padding),e.lcn&&(o.k=e.lcn),e.stContainerNodes&&(o.b=OrgChart.remote._convertToIdArray(e.stContainerNodes)),e.isPartner&&(o.i=e.isPartner),e.hasPartners&&(o.g=e.hasPartners),e.partnerSeparation&&(o.e=e.partnerSeparation),e.treeList&&(o.z=[e.treeList.scrollTop,e.treeList.maxHeight]),i.push(o);for(var a=0;a<e.stChildren.length;a++)OrgChart.remote._toReqDTO(e.stChildren[a],i);for(a=0;a<e.children.length;a++)OrgChart.remote._toReqDTO(e.children[a],i)},OrgChart.remote._toReqLayoutConfigsDTO=function(e){var i={};for(var o in e){var a=e[o];i[o]||(i[o]=[]),i[o][0]=a.orientation,i[o][1]=a.levelSeparation,i[o][2]=a.mixedHierarchyNodesSeparation,i[o][3]=a.subtreeSeparation,i[o][4]=a.siblingSeparation,i[o][5]=a.layout,i[o][6]=a.columns,i[o][7]=a.collapse,i[o][8]=a.assistantSeparation,i[o][9]=a.partnerNodeSeparation}return i},OrgChart.remote._convertToIdArray=function(e){for(var i=[],o=0;o<e.length;o++)i.push(e[o].id);return i},OrgChart.remote._setPositions=function(e,i,o,a){for(var s=[],l=[],c=OrgChart.remote._toReqLayoutConfigsDTO(i),d=0;d<e.length;d++)l.push(e[d].id),OrgChart.remote._toReqDTO(e[d],s);var h={n:s,c:c,r:l,v:"9.00.19"};if(OrgChart.LIMIT_NODES||(h.l=!0),null!=OrgChart.remote._fromReqDTO)OrgChart.remote._fromReqDTO(h.n,h.r,h.c,function(i){for(var s=0;s<e.length;s++)OrgChart.remote._fromResDTO(e[s],i,0,e,a);o()});else{h=JSON.stringify(h);var p=OrgChart.localStorage.getItem(h);p&&(p=JSON.parse(p)),p&&!p.limit?OrgChart.remote._proceed(e,p,a,o):OrgChart.remote._findRegion(function(i){OrgChart._ajax(i,"post",h,"json",function(i){i.error?o(2):(OrgChart.remote._proceed(e,i,a,o),OrgChart.localStorage.setItem(h,JSON.stringify(i)))})})}},OrgChart.remote._proceed=function(e,i,o,a){if("string"==typeof i&&(i=JSON.parse(i)),i.limit&&1==i.limit)a(i.limit);else{for(var s=0;s<e.length;s++)OrgChart.remote._fromResDTO(e[s],i,0,e,o);a()}},OrgChart.remote._findRegion=function(e){var i=OrgChart.localStorage.getItem(OrgChart.FUNC_URL_NAME);if(i)e(i);else{for(var o=["defunc2","cusfunc2","bsfunc2","acfunc2","kcfunc2","safunc2","wifunc2"],a=[],s=0;s<o.length;s++)a.push(new XMLHttpRequest);for(s=0;s<o.length;s++)(function(){var i="https://"+o[s]+OrgChart.SERVER_PREFIX,l=a[s];l.onreadystatechange=function(){if(4==this.readyState&&200==this.status){OrgChart.localStorage.setItem(OrgChart.FUNC_URL_NAME,i),e(i);for(var o=0;o<a.length;o++)a[o].abort()}},l.open("GET",i,!0),l.send()})()}};var a=OrgChart;module.exports=a;