From a45dcfe7a612a6f029c84263e35112847777512a Mon Sep 17 00:00:00 2001 From: plamen-peshev Date: Tue, 11 May 2021 18:36:04 +0300 Subject: [PATCH] auto --- OrgChart.js | 2 +- orgchart.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OrgChart.js b/OrgChart.js index b45ce7d..5a6f020 100644 --- a/OrgChart.js +++ b/OrgChart.js @@ -1 +1 @@ -var OrgChart=function(t,e){var r=this;if(this.element=t,this.config={lazyLoading:!0,enableDragDrop:!1,enableSearch:!0,enableTouch:!1,miniMap:!1,nodeMenu:null,nodeContextMenu:null,menu:null,toolbar:!1,sticky:!0,nodeMouseClick:OrgChart.action.details,nodeMouseDbClick:OrgChart.none,mouseScrool:OrgChart.action.zoom,showXScroll:OrgChart.none,showYScroll:OrgChart.none,template:"ana",tags:{},min:!1,nodeBinding:{},linkBinding:{},searchFields:[],searchDisplayField:null,searchFieldsWeight:null,nodes:[],clinks:[],slinks:[],levelSeparation:60,siblingSeparation:20,subtreeSeparation:40,mixedHierarchyNodesSeparation:15,assistantSeparation:100,minPartnerSeparation:50,partnerChildrenSplitSeparation:20,partnerNodeSeparation:15,columns:10,padding:30,orientation:OrgChart.orientation.top,layout:OrgChart.normal,scaleInitial:1,scaleMin:.1,scaleMax:5,orderBy:null,editUI:null,searchUI:null,xScrollUI:null,yScrollUI:null,nodeMenuUI:null,nodeContextMenuUI:null,toolbarUI:null,notifierUI:null,menuUI:null,exportUrl:"https://balkan.app/export",collapse:{},expand:{},align:OrgChart.CENTER,UI:null,anim:{func:OrgChart.anim.outPow,duration:200},zoom:{speed:120,smooth:12},roots:null,state:null},e)for(var i in this.config)"object"!=typeof e[i]||Array.isArray(e[i])?void 0!==e[i]&&(this.config[i]=e[i]):this.config[i]=OrgChart._mergeObject(this.config[i],e[i]);if(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 n=this.config.tags[a];null!=n.subTreeConfig&&(this._layoutConfigs[a]={orientation:null!=n.subTreeConfig.orientation?n.subTreeConfig.orientation:this.config.orientation,levelSeparation:null!=n.subTreeConfig.levelSeparation?n.subTreeConfig.levelSeparation:this.config.levelSeparation,mixedHierarchyNodesSeparation:null!=n.subTreeConfig.mixedHierarchyNodesSeparation?n.subTreeConfig.mixedHierarchyNodesSeparation:this.config.mixedHierarchyNodesSeparation,assistantSeparation:null!=n.subTreeConfig.assistantSeparation?n.subTreeConfig.assistantSeparation:this.config.assistantSeparation,subtreeSeparation:null!=n.subTreeConfig.subtreeSeparation?n.subTreeConfig.subtreeSeparation:this.config.subtreeSeparation,siblingSeparation:null!=n.subTreeConfig.siblingSeparation?n.subTreeConfig.siblingSeparation:this.config.siblingSeparation,layout:null!=n.subTreeConfig.layout?n.subTreeConfig.layout:this.config.layout,columns:null!=n.subTreeConfig.columns?n.subTreeConfig.columns:this.config.columns,collapse:null!=n.subTreeConfig.collapse?n.subTreeConfig.collapse:this.config.collapse,partnerNodeSeparation:null!=n.subTreeConfig.partnerNodeSeparation?n.subTreeConfig.partnerNodeSeparation:this.config.partnerNodeSeparation})}if(this._event_id=OrgChart._guid(),!this.config.searchFields.length&&this.config.nodeBinding)for(var o in this.config.nodeBinding)-1==o.indexOf("img")&&"function"!=typeof this.config.nodeBinding[o]&&this.config.searchFields.push(this.config.nodeBinding[o]);OrgChart._validateConfig(this.config)&&(this.server=null,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),null===this.server&&(this.server=new OrgChart.server(this.config,this._layoutConfigs)),this.config.searchUI?this.searchUI=this.config.searchUI:this.searchUI=new OrgChart.searchUI,this.searchUI.init(this),this.config.nodeMenuUI?this.nodeMenuUI=this.config.nodeMenuUI:this.nodeMenuUI=new OrgChart.menuUI,this.nodeMenuUI.init(this,this.config.nodeMenu),this.config.nodeContextMenuUI?this.nodeContextMenuUI=this.config.nodeContextMenuUI:this.nodeContextMenuUI=new OrgChart.menuUI,this.nodeContextMenuUI.init(this,this.config.nodeContextMenu),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:r.response.boundary,scale:r.getScale(),viewBox:r.getViewBox(),padding:r.config.padding}},function(t){r.setViewBox(t)},function(){r._draw(!0,OrgChart.action.xScroll)})),this.config.yScrollUI||(this.yScrollUI=new OrgChart.yScrollUI(this.element,this.config,function(){return{boundary:r.response.boundary,scale:r.getScale(),viewBox:r.getViewBox(),padding:r.config.padding}},function(t){r.setViewBox(t)},function(){r._draw(!0,OrgChart.action.xScroll)})),this._gragStartedId=null,this._timeout=null,this._touch=null,this._initialized=!1,this._moveInterval=null,this._movePosition=null,this.response=null,this.nodes=null,this._setInitialSizeIfNotSet(),0OrgChart.TEXT_THRESHOLD)for(var r=0;rOrgChart.IMAGES_THRESHOLD)for(r=0;rOrgChart.LINKS_THRESHOLD)for(r=0;rOrgChart.EXPCOLL_THRESHOLD)for(r=0;r',OrgChart.linkOpenTag='',OrgChart.expcollOpenTag='',OrgChart.linkFieldsOpenTag='',OrgChart.grCloseTag="",OrgChart.IT_IS_LONELY_HERE='{link}',OrgChart.RES={},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!
See more",OrgChart.OFFLINE_MESS="The evaluation version requires internet connection!
See more",OrgChart.SEARCH_PLACEHOLDER="Search",OrgChart.IMPORT_MESSAGE="Choose the columns (fields) in your data file that contain the required information.",OrgChart.FIXED_POSITION_ON_CLICK=!1,OrgChart.ADD_NEW_FIELD="Add new field",OrgChart.ASSISTANT="Assistant",OrgChart.A4w=595,OrgChart.A4h=842,OrgChart.A3w=842,OrgChart.A3h=1191,OrgChart.A2w=1191,OrgChart.A2h=1684,OrgChart.A1w=1684,OrgChart.A1h=2384,OrgChart.Letterw=612,OrgChart.Letterh=791,OrgChart.Legalw=612,OrgChart.Legalh=1009,OrgChart.LINK_ROUNDED_CORNERS=8,OrgChart.MOVE_STEP=5,OrgChart.MOVE_INTERVAL=25,OrgChart.MIXED_LAYOUT_ALL_NODES=!0,OrgChart.CLINK_CURVE=1,OrgChart.SEARCH_RESULT_LIMIT=10,"undefined"!=typeof module&&(module.exports=OrgChart),OrgChart.input=function(t,e,r,i,a,n){null==i&&(i=!1);var o=document.createElement("div"),l=document.createElement("div"),s=document.createElement("input"),h=document.createElement("hr"),d=document.createElement("button");if(d.innerHTML="Upload",d.style.position="absolute",d.style.right=0,o.style.margin="14px 14px 7px 14px",o.style.textAlign="left",o.style.position="relative",o.setAttribute("data-field-name",t),h.style.border="1px solid #d7d7d7",h.style.backgroundColor="#d7d7d7",h.style.display="block",h.style.width="100%",l.style.color="#bcbcbc",s.style.border="none",s.style.outline="none",s.style.width="100%",s.setAttribute("val",""),a&&(s.style.width="80%"),s.style.fontSize="16px",s.readOnly=i,null!=e&&null!=e&&(s.value=e),null!=r&&null!=r&&(s.placeholder=r),null!=t&&null!=t&&(l.innerHTML=t),l.setAttribute("lbl",""),s.style.color="#7a7a7a",i||s.addEventListener("focus",function(){var t=this.parentNode.getElementsByTagName("hr")[0];t.style.border="1px solid #039BE5",OrgChart.anim(t,{width:10},{width:o.clientWidth},250,OrgChart.anim.inOutSin)}),d.addEventListener("click",function(){var e=this,t=document.createElement("INPUT");t.setAttribute("type","file"),t.style.display="none",t.onchange=function(){var t=this.files[0];OrgChart.events.publish("imageuploaded",[n,t,e.parentNode.querySelector("input")])},document.body.appendChild(t),t.click()}),s.addEventListener("blur",function(){this.parentNode.getElementsByTagName("hr")[0].style.border="1px solid #d7d7d7"}),o.appendChild(l),o.appendChild(s),a&&o.appendChild(d),o.appendChild(h),OrgChart.addValidation){var c={wrapper:o,label:l,input:s,hr:h};OrgChart.addValidation(t,e,c)}return o},OrgChart._intersects=function(t,e,r){var i=t.x-r.siblingSeparation/4,a=t.y,n=t.x+t.w+r.siblingSeparation/4,o=t.y;switch(r.orientation){case OrgChart.orientation.right:case OrgChart.orientation.right_top:case OrgChart.orientation.left:case OrgChart.orientation.left_top:i=t.x,a=t.y-r.siblingSeparation/4,n=t.x,o=t.y+t.h+r.siblingSeparation/4}var l,s,h,d=e.p,c=e.q,g=e.r,p=e.s;return 0!=(l=(n-i)*(p-c)-(g-d)*(o-a))&&(s=((a-o)*(g-i)+(n-i)*(p-a))/l,0<(h=((p-c)*(g-i)+(d-g)*(p-a))/l)&&h<1&&0',Object.assign(a.style,{cursor:"pointer",width:"34px",height:"34px",position:"absolute",top:"7px",right:"7px"}),Object.assign(n.style,{"overflow-x":"hidden","overflow-y":"auto"}),Object.assign(i.style,{"background-color":"#039BE5","min-height":"50px",textAlign:"center",position:"relative"}),Object.assign(o.style,{margin:"12px"}),this.wrapperElement.appendChild(e),e.appendChild(i),e.appendChild(n),n.appendChild(o),i.appendChild(a),OrgChart.htmlRipple(i);for(var l=this.fields,s=this.obj._get(t.id),h=0;h',this.wrapperElement.id="bgEditForm",Object.assign(a.style,{cursor:"pointer",width:"34px",height:"34px",position:"absolute",top:"7px",right:"7px"}),Object.assign(o.style,{"overflow-x":"hidden","overflow-y":"auto"}),Object.assign(r.style,{"background-color":"#039BE5","min-height":"50px",textAlign:"center",position:"relative"}),Object.assign(n.style,{margin:"14px 14px 7px",color:"#4285F4",cursor:"pointer"}),Object.assign(l.style,{margin:"14px 14px 7px",color:"rgb(188, 188, 188)"}),n.innerHTML=OrgChart.ADD_NEW_FIELD;var s=OrgChart._arrayContains(this.node.tags,"assistant")?"checked":"";l.setAttribute("data-field-name","isAssistant"),l.innerHTML='
'+OrgChart.ASSISTANT+'
',this.wrapperElement.appendChild(e),e.appendChild(r),e.appendChild(o),r.appendChild(a),OrgChart.htmlRipple(r);for(var h=this.fields,d=this.obj._get(t.id),c=0;c'+h+"  "+d+""}if(""!=r){if(this.wrapper=document.createElement("div"),Object.assign(this.wrapper.style,{opacity:0,"background-color":"#FFFEFF","box-shadow":"#DCDCDC 0px 1px 2px 0px",display:"inline-block",border:"1px solid #D7D7D7;border-radius:5px","z-index":1e3,position:"absolute","text-align":"left","user-select":"none"}),this.wrapper.className="chart-menu",this.wrapper.style.left="-99999px",this.wrapper.style.top="-99999px",this.wrapper.innerHTML=r,this.obj.element.appendChild(this.wrapper),null==e){var c=OrgChart._menuPosition(t,this.wrapper,this.obj.getSvg());t=c.x,e=c.y}var g=t+45;this.wrapper.style.left=g+"px",this.wrapper.style.top=e+"px",this.wrapper.style.left=g-this.wrapper.offsetWidth+"px";var p=t-this.wrapper.offsetWidth;OrgChart.anim(this.wrapper,{opacity:0,left:g-this.wrapper.offsetWidth},{opacity:1,left:p},300,OrgChart.anim.inOutPow);for(var f=this.wrapper.getElementsByTagName("div"),u=0;u',OrgChart.toolbarUI.fitIcon='',OrgChart.toolbarUI.openFullScreenIcon='',OrgChart.toolbarUI.closeFullScreenIcon='',OrgChart.toolbarUI.zoomInIcon='',OrgChart.toolbarUI.zoomOutIcon='',OrgChart.toolbarUI.layoutIcon='',OrgChart.toolbarUI.prototype.init=function(t,e){if(e){this.obj=t,this.toolbar=e,this._visible=!1,this.div=document.createElement("div"),this.div.classList.add("bg-toolbar-container"),Object.assign(this.div.style,{position:"absolute",padding:"3px",right:this.obj.config.padding+"px",bottom:this.obj.config.padding+"px"}),e.expandAll&&(this.div.innerHTML+='
'+OrgChart.toolbarUI.expandAllIcon+"
"),e.fit&&(this.div.innerHTML+='
'+OrgChart.toolbarUI.fitIcon+"
"),e.zoom&&(this.div.innerHTML+='
'+OrgChart.toolbarUI.zoomInIcon+"
",this.div.innerHTML+='
'+OrgChart.toolbarUI.zoomOutIcon+"
"),e.layout&&(this.div.innerHTML+='
'+OrgChart.toolbarUI.layoutIcon+"
",this.layouts=document.createElement("div"),this.layouts.innerHTML='',this.obj.element.appendChild(this.layouts),Object.assign(this.layouts.style,{position:"absolute",width:"100%",left:"0",bottom:"-145px","box-shadow":"0px 1px 4px rgba(0,0,0,0.3)","background-color":"#f9f9f9",height:"123px","padding-top":"20px","border-top":"1px solid #cacaca"})),e.fullScreen&&(this.div.innerHTML+='
'+OrgChart.toolbarUI.openFullScreenIcon+"
"),this.obj.element.appendChild(this.div),this.layoutBtn=this.div.querySelector('[data-tlbr="layout"]');var r=this.div.querySelector('[data-tlbr="plus"]'),i=this.div.querySelector('[data-tlbr="minus"]'),a=this.div.querySelector('[data-tlbr="fit"]'),n=this.div.querySelector('[data-tlbr="fullScreen"]'),o=this.div.querySelector('[data-tlbr="expand"]'),l=this;r&&r.addEventListener("click",function(){l.obj.zoom(!0,null,!0)}),i&&i.addEventListener("click",function(){l.obj.zoom(!1,null,!0)}),a&&a.addEventListener("click",function(){l.obj.fit()}),n&&n.addEventListener("click",function(){l.obj.toggleFullScreen()}),o&&o.addEventListener("click",function(){l.obj.expand(null,"all")}),this.layoutBtn&&this.layoutBtn.addEventListener("click",function(){l._visible?l.hideLayout():l.showLayout()}),this.layouts&&this.layouts.addEventListener("click",function(t){for(var e=t.target;e;){if(e.hasAttribute&&e.hasAttribute("data-layout")){e=e.getAttribute("data-layout"),l.obj.setLayout(OrgChart[e]);break}e=e.parentNode}})}},OrgChart.toolbarUI.prototype.showLayout=function(){this._visible=!0,this.layoutBtn.style.transform="rotate(180deg) translateX(0px) translateY(0px)",OrgChart.anim(this.div,{bottom:this.obj.config.padding},{bottom:this.obj.config.padding+145},this.obj.config.anim.duration,this.obj.config.anim.func),OrgChart.anim(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.anim(this.div,{bottom:this.obj.config.padding+145},{bottom:this.obj.config.padding},this.obj.config.anim.duration,this.obj.config.anim.func),OrgChart.anim(this.layouts,{bottom:0},{bottom:-145},this.obj.config.anim.duration,this.obj.config.anim.func)},OrgChart.notifierUI=function(){},OrgChart.notifierUI.prototype.init=function(t){this.obj=t},OrgChart.notifierUI.prototype.show=function(t,e){if(null!=t){1==t&&(t=OrgChart.MAX_NODES_MESS,e="#FFCA28"),2==t&&(t=OrgChart.OFFLINE_MESS,e="#FFCA28");var r=document.createElement("div");r.innerHTML=t,Object.assign(r.style,{position:"absolute","background-color":e,color:"#ffffff",padding:"15px","border-radius":"40px",opacity:0,overflow:"hidden","white-space":"nowrap","text-align":"center"}),this.obj.element.appendChild(r);var i=this.obj.width()/2-r.offsetWidth/2,a=this.obj.height()/2-r.offsetHeight/2;r.style.left=i+"px",r.style.top=a+"px";var n=r.offsetWidth;r.style.width="20px",OrgChart.anim(r,{opacity:0,width:10},{opacity:1,width:n},this.obj.config.anim.duration,this.obj.config.anim.func)}},OrgChart.icon={},OrgChart.icon.png=function(t,e,r){return''},OrgChart.icon.pdf=function(t,e,r){return''},OrgChart.icon.svg=function(t,e,r){return''},OrgChart.icon.csv=function(t,e,r){return''},OrgChart.icon.excel=function(t,e,r){return''},OrgChart.icon.edit=function(t,e,r){return''},OrgChart.icon.details=function(t,e,r){return''},OrgChart.icon.remove=function(t,e,r){return''},OrgChart.icon.add=function(t,e,r){return''},OrgChart.icon.search=function(t,e,r){return''},OrgChart.icon.xml=function(t,e,r){return''},OrgChart.prototype.exportPDF=function(t,e){t=this._defaultExportOptions(t,"pdf"),this._export(t,e)},OrgChart.prototype.exportPNG=function(t,e){t=this._defaultExportOptions(t,"png"),this._export(t,e)},OrgChart.prototype.exportSVG=function(t,e){t=this._defaultExportOptions(t,"svg"),this._export(t,e)},OrgChart.prototype._defaultExportOptions=function(t,e){return null==t&&(t={}),"svg"==e?(t.ext="svg",t.mime="image/svg+xml"):"pdf"==e?(t.mime="application/pdf",t.ext="pdf"):"png"==e&&(t.mime="image/png",t.ext="png"),null==t.margin&&(t.margin=[50,40,50,40]),null==t.padding&&(t.padding=0),null==t.landscape&&(t.landscape=!1),null==t.filename&&(t.filename="OrgChart."+t.ext),null==t.scale&&(t.scale="fit"),null==t.format&&(t.format="fit"),null==t.header&&(t.header=""),null==t.footer&&(t.footer="Page {current-page} of {total-pages}"),null==t.openInNewTab&&(t.openInNewTab=!1),t},OrgChart.prototype._export=function(o,l){var s=this,t={id:o.nodeId,expandChildren:o.expandChildren};o.margin&&o.margin[0]<2&&(o.margin[0]=2),o.margin&&o.margin[1]<2&&(o.margin[1]=2),o.margin&&o.margin[2]<2&&(o.margin[2]=2),o.margin&&o.margin[3]<2&&(o.margin[3]=2),this._draw(!1,OrgChart.action.exporting,t,function(t){var r=document.createElement("div");if(r.innerHTML=t,0a[0]/10)return;if(l>a[1]/10)return}}else if(-1!=e.type.indexOf("touch")&&null==this._touch)return;for(var s=e.target;s!=t;){if(s.hasAttribute("control-expcoll-id")){var h=s.getAttribute("control-expcoll-id"),d=this.getNode(h);return void this._expCollHandler(d.id)}if(s.hasAttribute("node-id")){h=s.getAttribute("node-id"),d=this.getNode(h);return void this._nodeClickHandler(d.id,e)}if(s.hasAttribute("control-node-menu-id")){h=s.getAttribute("control-node-menu-id"),d=this.getNode(h);return void this._nodeMenuClickHandler(d.id,s,e)}if(s.hasAttribute("control-add"))return void this._lonelyButtonHandler();s=s.parentNode}},OrgChart.prototype._globalContextHandler=function(t,e){for(var r=e.target;r!=t;){if(r.hasAttribute("node-id")){var i=r.getAttribute("node-id"),a=this.getNode(i);return void this._nodeContextHandler(a.id,e)}r=r.parentNode}},OrgChart.prototype._nodeContextHandler=function(t,e){e.preventDefault(),this.searchUI.hide(),this.nodeMenuUI.hide(),this.nodeContextMenuUI.hide(),this.menuUI.hide();var r=this.get(t),i=null;if(null!=r&&Array.isArray(r.tags))for(var a=0;aOrgChart.FIRE_DRAG_NOT_CLICK_IF_MOVE||Math.abs(e.y-_.y)>OrgChart.FIRE_DRAG_NOT_CLICK_IF_MOVE))!1===OrgChart.events.publish("drag",[b,c])&&M(),y._dragEventFired=!0;E.setAttribute("transform","matrix("+k.toString()+")")}}},M=function(t){if(b.stopMove(),w.classList&&(w.classList.remove("cursor-grab"),w.classList.remove("cursor-move"),w.classList.remove("cursor-nodrop"),w.classList.remove("cursor-copy")),w.removeEventListener(i.move,a),w.removeEventListener(i.up,M),i.leave&&w.removeEventListener(i.leave,M),x.id!=O&&null!=O){var e=b.getNode(O);if(!1===OrgChart.events.publish("drop",[b,x.id,e.id]))return L(O,v),w.removeChild(E),void(b._gragStartedId=null);if(b._canUpdateLink(x.id,O)){var r=b.get(x.id);r.pid=O,r.stpid=null,b.updateNode(r,null,!0)}else w.removeChild(E),L(O,v);b._gragStartedId=null}else{w.removeChild(E),b._gragStartedId=null;OrgChart._getClientXY(t);y._dragEventFired&&OrgChart.events.publish("drop",[b,x.id])}};w.addEventListener(i.move,a),w.addEventListener(i.up,M),i.leave&&w.addEventListener(i.leave,M)}},OrgChart.prototype._resizeHandler=function(t,e){var r=this.getViewBox(),i=this.getSvg(),a=i.getAttribute("width"),n=i.getAttribute("height"),o=a/r[2],l=n/r[3],s=l=OrgChart.SEARCH_RESULT_LIMIT);l++){var s=a[l],h="";if(n){var d=this.obj._get(s.id);"function"==typeof n?h=n(this.obj,this.obj.getNode(s.id),d):d[n]&&(h=d[n]),h&&(h='')}var c="",g="";this.obj.config.searchDisplayField==s.__searchField?c=s.__searchMarks:this.obj.config.searchDisplayField?(c=s[this.obj.config.searchDisplayField],OrgChart.isNullOrEmpty(c)&&(c=""),g=s.__searchMarks):c=s.__searchMarks,o+=OrgChart.searchUI.createItem(h,s.id,c,g)}r.innerHTML=o;var p=i.querySelectorAll("[data-search-item-id]");for(l=0;l
'+OrgChart.icon.search(32,32,"#757575")+'
'},OrgChart.searchUI.createItem=function(t,e,r,i){return'
'+t+'
'+r+'
'+i+'
'},OrgChart.searchUI.createSearchIcon=function(t){return'
'+OrgChart.icon.search(32,32,"#757575")+"
"},void 0===OrgChart&&(OrgChart={}),OrgChart.server=function(t,e){this.config=t,this.layoutConfigs=e,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},OrgChart.server.prototype.read=function(h,d,c,g,p,f,u,m){var C=this;OrgChart.state._get(this.config.state,d,c,function(t){C.state=t,C.action=p,C.actionParams=f,p==OrgChart.action.init&&C.state?(C.viewBox=C.state.vb,C.vbIsInitializedFromState=!0):(C.viewBox=g,C.vbIsInitializedFromState=!1);var r=C.maxX,i=C.maxY,a=C.minX,n=C.minY,o=C.bordersByRootIdAndLevel,l=C.roots,s=C.nodes;if(h){var e=OrgChart.server._getResponse(d,c,C.visibleNodeIds,C.config,r,i,a,n,C.viewBox,l,C.action,C.actionParams,s,C.oldNodes,C.vbIsInitializedFromState);p!=OrgChart.action.exporting&&(C.maxX=r,C.maxY=i,C.minX=a,C.minY=n,C.roots=l,C.nodes=s,C.visibleNodeIds=e.visibleNodeIds),e.bordersByRootIdAndLevel=o,e.roots=l,e.adjustify={x:0,y:0},C.state&&(e.adjustify=C.state.adjustify),u(e)}else C.oldNodes=s||null,C._read(function(t){r=t.maxX,i=t.maxY,a=t.minX,n=t.minY,o=t.bordersByRootIdAndLevel,l=t.roots,s=t.nodes;var e=OrgChart.server._getResponse(d,c,C.visibleNodeIds,C.config,r,i,a,n,C.viewBox,l,C.action,C.actionParams,s,C.oldNodes,C.vbIsInitializedFromState);e.notif=t.limit,e.roots=l,e.bordersByRootIdAndLevel=o,e.adjustify=t.adjustify,p!=OrgChart.action.exporting&&(C.maxX=r,C.maxY=i,C.minX=a,C.minY=n,C.roots=l,C.nodes=s,C.visibleNodeIds=e.visibleNodeIds,C.bordersByRootIdAndLevel=o),u(e)},m)})},OrgChart.server.prototype._read=function(n,t){var o=this,e=OrgChart.server._createNodes(o.config,o.layoutConfigs,o.action,o.actionParams,o.oldNodes,o.state);t(e);var l=e.nodes,s=e.roots,r=OrgChart.remote;null==r&&(r=OrgChart.local),r._setPositions(s,o.layoutConfigs,function(t){var e=OrgChart.server._doNotChangePositionOfClickedNodeIfAny(s,l,o.action,o.actionParams,o.oldNodes,o.config.orientation);o.state&&o.action==OrgChart.action.init&&(e=o.state.adjustify);for(var r={minX:null,minY:null,maxX:null,maxY:null},i={},a=0;a=e.collapse.level-1&&-1==i.indexOf(t.id):a!=OrgChart.action.centerNode&&a!=OrgChart.action.insert||-1!=i.indexOf(t.id)&&(t.collapsed=!1)},OrgChart.server._initNode=function(t,e,r,i,a,n,o,l,s,h,d){var c=n[r||"base"];null==t.parent&&OrgChart.server._setCollpasedProperty(t,c,s,l,a,i-1,d);for(var g=0;gi.sl&&(i=e);for(var r=0;r=a-o)switch(_=(a+o)/2-b/2,i.orientation){case OrgChart.orientation.right:case OrgChart.orientation.right_top:_=(o-a)/2-b/2}else switch(_=u.x-b/2+OrgChart.server._getNodeWidth(u,i)/2,i.orientation){case OrgChart.orientation.right:case OrgChart.orientation.right_top:(_=-(b/2-(o-a)/2))-i.padding&&(_=-i.padding)}if(w-2*i.padding>=n-l)switch(k=(n+l)/2-w/2,i.orientation){case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:k=(l-n)/2-w/2}else switch((k=-(w/2-(n-l)/2))>-i.padding&&(k=-i.padding),i.orientation){case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:(k=-(w/2-(l-n)/2))C.right?C.right:C.left),s[0]>C.right&&s[0]>C.left&&(s[0]=C.left>C.right?C.left:C.right),s[1]C.bottom?C.bottom:C.top),s[1]>C.bottom&&s[1]>C.top&&(s[1]=C.top>C.bottom?C.top:C.bottom))}if(d==OrgChart.action.centerNode||d==OrgChart.action.maximize){var S=g[c.id];1==c.options.horizontal&&(s[0]=S.x+S.w/2-s[2]/2),1==c.options.vertical&&(s[1]=S.y+S.h/2-s[3]/2),i.sticky&&(s[0]C.right?C.right:C.left),s[0]>C.right&&s[0]>C.left&&(s[0]=C.left>C.right?C.left:C.right),s[1]C.bottom?C.bottom:C.top),s[1]>C.bottom&&s[1]>C.top&&(s[1]=C.top>C.bottom?C.top:C.bottom))}if(d==OrgChart.action.insert||d==OrgChart.action.expand||d==OrgChart.action.collapse||d==OrgChart.action.update||d==OrgChart.action.centerNode||d==OrgChart.action.maximize){var I=null;if(d==OrgChart.action.insert&&c&&null!=c.insertedNodeId&&null!=c.insertedNodeId)I=g[c.insertedNodeId];else if(d==OrgChart.action.update&&c&&null!=c.visId&&null!=c.visId)I=g[c.visId];else if(d!=OrgChart.action.expand&&d!=OrgChart.action.collapse&&d!=OrgChart.action.maximize||!c||null==c.id||null==c.id){if(d==OrgChart.action.centerNode||d==OrgChart.action.maximize){switch(i.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:c.options.vertical||(I=g[c.id]);break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:case OrgChart.orientation.left:case OrgChart.orientation.left_top:c.options.horizontal||(I=g[c.id])}I&&(I=OrgChart.server._getMostDeepChild(I,g))}}else I=g[c.id],I=OrgChart.server._getMostDeepChild(I,g);if(!OrgChart.FIXED_POSITION_ON_CLICK&&I)switch(i.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:var A=I.y+I.h-s[3]+i.padding;s[1]A&&(s[1]=A);break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:A=I.x-i.padding;s[0]>A&&(s[0]=A);break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:A=I.x+I.w-s[2]+i.padding;s[0]',svg:'{content}',link:'',pointer:'',node:'',plus:'',minus:'',nodeMenuButton:'',exportMenuButton:'



',img_0:'',link_field_0:'{val}'},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:'{content}',link:'',assistanseLink:'',pointer:'',node:'',plus:'',minus:'',nodeMenuButton:'',exportMenuButton:'



',img_0:'',link_field_0:'{val}',field_0:'{val}',field_1:'{val}',padding:[50,20,35,20]},OrgChart.templates.split=Object.assign({},OrgChart.templates.ana),OrgChart.templates.split.size=[10,10],OrgChart.templates.split.node='',OrgChart.templates.group=Object.assign({},OrgChart.templates.ana),OrgChart.templates.group.size=[250,120],OrgChart.templates.group.node='',OrgChart.templates.group.link='',OrgChart.templates.group.nodeMenuButton='',OrgChart.templates.group.field_0='{val}',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='{val}',OrgChart.templates.ula.field_1='{val}',OrgChart.templates.ula.node='',OrgChart.templates.ula.img_0='',OrgChart.templates.ula.menu='',OrgChart.templates.ula.nodeMenuButton='',OrgChart.templates.olivia=Object.assign({},OrgChart.templates.ana),OrgChart.templates.olivia.field_0='{val}',OrgChart.templates.olivia.field_1='{val}',OrgChart.templates.olivia.defs='',OrgChart.templates.olivia.node='',OrgChart.templates.olivia.img_0='',OrgChart.templates.olivia.nodeMenuButton='',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='',OrgChart.templates.belinda.img_0='',OrgChart.templates.belinda.field_0='{val}',OrgChart.templates.belinda.field_1='{val}',OrgChart.templates.belinda.link='',OrgChart.templates.belinda.nodeMenuButton='',OrgChart.templates.rony=Object.assign({},OrgChart.templates.ana),OrgChart.templates.rony.svg='{content}',OrgChart.templates.rony.defs='',OrgChart.templates.rony.size=[180,250],OrgChart.templates.rony.ripple={color:"#F57C00",radius:5,rect:null},OrgChart.templates.rony.img_0='',OrgChart.templates.rony.node='',OrgChart.templates.rony.field_0='{val}',OrgChart.templates.rony.field_1='{val}',OrgChart.templates.rony.field_2='{val}',OrgChart.templates.rony.link='',OrgChart.templates.rony.plus='',OrgChart.templates.rony.minus='',OrgChart.templates.rony.nodeMenuButton='',OrgChart.templates.mery=Object.assign({},OrgChart.templates.ana),OrgChart.templates.mery.ripple={color:"#e6e6e6",radius:50,rect:null},OrgChart.templates.mery.node='',OrgChart.templates.mery.link='',OrgChart.templates.mery.img_0='',OrgChart.templates.mery.field_0='{val}',OrgChart.templates.mery.field_1='{val}',OrgChart.templates.mery.nodeMenuButton='',OrgChart.templates.polina=Object.assign({},OrgChart.templates.ana),OrgChart.templates.polina.size=[300,80],OrgChart.templates.polina.ripple={color:"#e6e6e6",radius:40,rect:null},OrgChart.templates.polina.node='',OrgChart.templates.polina.img_0='',OrgChart.templates.polina.field_0='{val}',OrgChart.templates.polina.field_1='{val}',OrgChart.templates.polina.link='',OrgChart.templates.polina.nodeMenuButton='',OrgChart.templates.mila=Object.assign({},OrgChart.templates.ana),OrgChart.templates.mila.node='',OrgChart.templates.mila.img_0='',OrgChart.templates.mila.field_0='{val}',OrgChart.templates.mila.nodeMenuButton='',OrgChart.templates.diva=Object.assign({},OrgChart.templates.ana),OrgChart.templates.diva.size=[200,170],OrgChart.templates.diva.node='',OrgChart.templates.diva.img_0='',OrgChart.templates.diva.field_0='{val}',OrgChart.templates.diva.field_1='{val}',OrgChart.templates.diva.pointer='',OrgChart.templates.diva.nodeMenuButton='',OrgChart.templates.luba=Object.assign({},OrgChart.templates.ana),OrgChart.templates.luba.svg='{content}',OrgChart.templates.luba.defs='',OrgChart.templates.luba.node='',OrgChart.templates.luba.img_0='',OrgChart.templates.luba.nodeMenuButton='',OrgChart.templates.luba.field_0='{val}',OrgChart.templates.luba.field_1='{val}',OrgChart.templates.luba.plus='',OrgChart.templates.luba.minus='',OrgChart.templates.luba.expandCollapseSize=36,OrgChart.templates.derek=Object.assign({},OrgChart.templates.ana),OrgChart.templates.derek.link='',OrgChart.templates.derek.field_0='{val}',OrgChart.templates.derek.field_1='{val}',OrgChart.templates.derek.node='',OrgChart.templates.derek.defs=' ',OrgChart.templates.derek.img_0='',OrgChart.templates.derek.minus='',OrgChart.templates.derek.plus='',OrgChart.templates.derek.nodeMenuButton='',OrgChart.templates.isla=Object.assign({},OrgChart.templates.ana),OrgChart.templates.isla.defs='',OrgChart.templates.isla.size=[180,120],OrgChart.templates.isla.node='',OrgChart.templates.isla.field_0='{val}',OrgChart.templates.isla.field_1='{val}',OrgChart.templates.isla.img_0='',OrgChart.templates.isla.minus='',OrgChart.templates.isla.plus='',OrgChart.templates.isla.nodeMenuButton='',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='',OrgChart.templates.deborah.img_0='',OrgChart.templates.deborah.field_0='{val}',OrgChart.templates.deborah.field_1='{val}',OrgChart.templates.deborah.nodeMenuButton='',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.ui={_defsIds:{},defs:function(t){var e="";for(var r in OrgChart.templates){var i=OrgChart.templates[r];i.defs?(OrgChart.ui._defsIds[r]=OrgChart.randomId(),e+=i.defs.replace("{randId}",OrgChart.ui._defsIds[r])):e+=i.defs}return""+e+t+""},css:function(){return''},lonely:function(t){return t.nodes&&t.nodes.length?"":OrgChart.IT_IS_LONELY_HERE.replace("{link}",OrgChart.RES.IT_IS_LONELY_HERE_LINK)},pointer:function(t,e,r){return e===OrgChart.action.exporting?"":OrgChart.t(t.template,!1,r).pointer},node:function(t,e,r,i,a,n,o,l,s,h){var d=OrgChart.t(t.templateName,t.min,s),c=d.node.replaceAll("{w}",t.w).replaceAll("{h}",t.h);d.defs&&(c=c.replace("{randId}",OrgChart.ui._defsIds[t.templateName])),null==o&&(o=i.nodeBinding);var g={node:t,data:e};for(var p in o){var f=o[p];if(e){var u=e[f];if("function"==typeof f&&(u=f(h,t,e)),g.value=u,g.element=d[p],g.name=f,!1!==OrgChart.events.publish("field",[h,g]))if(null!=g.value&&null!=g.value&&null!=g.element)c+=(OrgChart._lblIsImg(i,p)||"string"!=typeof g.value||(g.value=OrgChart.wrapText(g.value,g.element)),g.element.replace("{val}",g.value)).replaceAll("{ew}",t.w-(t.padding?t.padding[1]:0)).replaceAll("{cw}",t.w/2).replaceAll("{randId}",OrgChart.randomId()).replaceAll("{randId2}",OrgChart.randomId())}}var m=OrgChart._getPosition(r,t,a,n),C="node";Array.isArray(t.tags)&&t.tags.length&&(C+=" "+t.tags.join(" ")),t.layout&&(C+=" tree-layout");var y="";t.lcn&&(y='lcn="'+t.lcn+'"');var x=OrgChart.nodeOpenTag.replace("{lcn}",y).replace("{id}",t.id).replace("{class}",C).replace("{sl}",t.sl).replace("{level}",t.level).replace("{x}",m.x).replace("{y}",m.y),O=OrgChart._getOpacity(r,t);(x=x.replace("{opacity}",O),null!=i.nodeMenu&&"split"!=t.templateName&&l!==OrgChart.action.exporting)&&(c+=d.nodeMenuButton.replace("{id}",t.id).replace("{cw}",t.w/2).replace("{ew}",t.w-(t.padding?t.padding[1]:0)));return c=x+c+OrgChart.grCloseTag},expandCollapseBtn:function(t,e,r,i,a){var n="";if(i!==OrgChart.action.exporting&&0t.firstRight.x+t.firstRight.w/2?ot.firstRight.y+t.firstRight.h/2?or.right?r.right:r.left),e[0]>r.right&&e[0]>r.left&&(a[0]=r.left>r.right?r.left:r.right),e[1]r.bottom?r.bottom:r.top),e[1]>r.bottom&&e[1]>r.top&&(a[1]=r.top>r.bottom?r.top:r.bottom),e[0]!==a[0]||e[1]!==a[1]?OrgChart.anim(t,{viewBox:e},{viewBox:a},300,OrgChart.anim.outPow,function(){i&&i()}):i&&i()},OrgChart.randomId=function(){return Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15)},OrgChart._getClientXY=function(t){return-1==t.type.indexOf("touch")?{x:t.clientX,y:t.clientY}:t.changedTouches.length?{x:t.changedTouches[0].clientX,y:t.changedTouches[0].clientY}:void 0},OrgChart._getClientTouchesXY=function(t,e){return-1!=t.type.indexOf("touch")?t.touches.lengtha.top+a.height&&(l-=n.height),i.left-n.width",e.querySelector("text").getBoundingClientRect()},OrgChart.wrapText=function(t,e){if(-1==e.indexOf(""+e+"";var i=(new DOMParser).parseFromString(e,"text/xml").getElementsByTagName("text")[0],a=parseFloat(i.getAttribute("x")),n=parseFloat(i.getAttribute("y")),o=i.getAttribute("text-anchor"),l=i.getAttribute("width"),s=i.getAttribute("text-overflow"),h="http://www.w3.org/2000/svg",d=r.getElementsByTagName("svg")[0].getElementsByTagName("text")[0],c=parseFloat(i.getAttribute("text-overflow-lines"));if(c||(c=0),!l)return t;if(l=parseFloat(l),a||(a=0),n||(n=0),a||(o="start"),s||(s="ellipsis"),"ellipsis"==s){d.removeChild(d.firstChild),d.textContent=t;for(var g=d.getComputedTextLength(),p=2;l"+t+""+d.textContent:t}if("multiline"==s){var f=t.split(" "),u=d.getBBox().height;d.textContent="";var m=document.createElementNS(h,"tspan"),C=document.createTextNode(f[0]);m.setAttributeNS(null,"x",a),m.setAttributeNS(null,"y",n),m.setAttributeNS(null,"text-anchor",o),m.appendChild(C),d.appendChild(m);p=1;for(var y=1,x=1;xl){if(m.firstChild.data=m.firstChild.data.slice(0,O),y++,0!==c&&c'+(new XMLSerializer).serializeToString(e.documentElement)},OrgChart._xml2json=function(t){for(var e=(new DOMParser).parseFromString(t,"text/xml").getElementsByTagName("node"),r=[],i=0;ie.maxX)&&(e.maxX=t.x+t.w),(null==e.maxY||null!=t.y&&t.y+t.h>e.maxY)&&(e.maxY=t.y+t.h)},OrgChart.getStParentNodes=function(t,e){for(e||(e=[]);t.parent;)t=t.parent;return t.stParent&&(e.push(t.stParent),OrgChart.getStParentNodes(t.stParent,e)),e},OrgChart.getRootOf=function(t){for(;t&&t.parent;)t=t.parent;return t},OrgChart._getViewBox=function(t){var e=null;return t?(e=(e="["+(e=t.getAttribute("viewBox"))+"]").replace(/\ /g,","),e=JSON.parse(e)):null},OrgChart.isNullOrEmpty=function(t){return null==t||""===t},OrgChart.xScrollUI=function(t,e,r,i,a){this.element=t,this.requestParams=r,this.config=e,this.onSetViewBoxCallback=i,this.onDrawCallback=a,this.pos=0},OrgChart.xScrollUI.prototype.addListener=function(t){var o=this;if((this.config.mouseScrool==OrgChart.action.xScroll||this.config.mouseScrool==OrgChart.action.scroll)&&this.bar){var e=OrgChart._getScrollSensitivity();!function(t,i,e){var a=!1;function n(){a=!0;var t=(o.pos-o.bar.scrollLeft)/e;if(0r&&(o.pos=r),a||n()},{passive:!0});var r=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){setTimeout(t,20)}}(t,e.speed,e.smooth)}},OrgChart.xScrollUI.prototype.create=function(t){if(this.config.showXScroll===OrgChart.scroll.visible||this.config.mouseScrool===OrgChart.action.scroll||this.config.mouseScrool===OrgChart.action.xScroll){var a=this;this.bar&&this.bar.parentNode.removeChild(this.bar),this.bar=document.createElement("div"),this.config.showXScroll!==OrgChart.scroll.visible&&(this.bar.style.visibility="hidden"),this.innerBar=document.createElement("div");this.requestParams();this.innerBar.innerHTML=" ",Object.assign(this.bar.style,{position:"absolute",left:0,bottom:0,width:t+"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 t=a.requestParams(),e=(parseFloat(a.innerBar.clientWidth)-parseFloat(a.bar.clientWidth))/100,r=this.scrollLeft/e,i=(t.boundary.right-t.boundary.left)/100;t.viewBox[0]=r*i+t.boundary.left,a.onSetViewBoxCallback(t.viewBox),clearTimeout(this._timeout),this._timeout=setTimeout(function(){a.onDrawCallback()},500)}})}},OrgChart.xScrollUI.prototype.setPosition=function(){if(this.bar){var t=this.requestParams(),e=Math.abs(t.boundary.maxX-t.boundary.minX)*t.scale;switch(this.config.orientation){case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:innerHeight=Math.abs(t.boundary.minY*t.scale);break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:e=Math.abs(t.boundary.minX*t.scale)}this.innerBar.style.width=e+"px";var r=(t.boundary.right-t.boundary.left)/100,i=(t.viewBox[0]-t.boundary.left)/r;i<0?i=0:100r&&(o.pos=r),a||n()},{passive:!0});var r=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){setTimeout(t,20)}}(t,e.speed,e.smooth)}},OrgChart.yScrollUI.prototype.create=function(t){if(this.config.showYScroll===OrgChart.scroll.visible||this.config.mouseScrool===OrgChart.action.scroll||this.config.mouseScrool===OrgChart.action.yScroll){var a=this;this.bar&&this.bar.parentNode.removeChild(this.bar),this.bar=document.createElement("div"),this.config.showYScroll!==OrgChart.scroll.visible&&(this.bar.style.visibility="hidden"),this.innerBar=document.createElement("div"),this.innerBar.innerHTML=" ",Object.assign(this.bar.style,{position:"absolute",right:0,bottom:0,height:t+"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 t=a.requestParams(),e=(parseFloat(a.innerBar.clientHeight)-parseFloat(a.bar.clientHeight))/100,r=this.scrollTop/e,i=(t.boundary.bottom-t.boundary.top)/100;t.viewBox[1]=r*i+t.boundary.top,a.onSetViewBoxCallback(t.viewBox),clearTimeout(this._timeout),this._timeout=setTimeout(function(){a.onDrawCallback()},500)}})}},OrgChart.yScrollUI.prototype.setPosition=function(){if(this.bar){var t=this.requestParams(),e=t.boundary.maxY*t.scale;switch(this.config.orientation){case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:e=Math.abs(t.boundary.minY*t.scale);break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:innerWidth=Math.abs(t.boundary.minX*t.scale)}this.innerBar.style.height=e+"px";var r=(t.boundary.bottom-t.boundary.top)/100,i=(t.viewBox[1]-t.boundary.top)/Math.abs(r);i<0?i=0:100this.config.scaleMin||0!=t&&1!=t&&lthis.config.scaleMin){this._hideBeforeAnimation();var s=this;r?(clearTimeout(s._timeout),OrgChart.anim(this.getSvg(),{viewbox:this.getViewBox()},{viewbox:i},this.config.anim.duration,this.config.anim.func,function(){clearTimeout(s._timeout),s._timeout=setTimeout(function(){s._draw(!0,OrgChart.action.zoom)},500)})):(this.setViewBox(i),clearTimeout(s._timeout),s._timeout=setTimeout(function(){s._draw(!0,OrgChart.action.zoom)},500))}},OrgChart.loading={},OrgChart.loading.show=function(t){var e=document.createElement("div");e.id="bg-loading",e.innerHTML='
',t.element.appendChild(e)},OrgChart.loading.hide=function(t){var e=t.element.querySelector("#bg-loading");e&&e.parentNode.removeChild(e)},OrgChart.pdfPrevUI={},OrgChart.loc||(OrgChart.loc={}),OrgChart.loc.ppdfCmdTitle="PDF Preview",OrgChart.loc.ppdfSave="Save",OrgChart.loc.ppdfCancel="Cancel",OrgChart.loc.ppdfFormat="Format",OrgChart.loc.ppdfFitToDrwaing="Fit",OrgChart.loc.ppdfA4="A4",OrgChart.loc.ppdfA3="A3",OrgChart.loc.ppdfA2="A2",OrgChart.loc.ppdfA1="A1",OrgChart.loc.ppdfLetter="Letter",OrgChart.loc.ppdfLegal="Legal",OrgChart.loc.ppdfLayout="Layout",OrgChart.loc.ppdfPortrait="Portrait",OrgChart.loc.ppdfLandscape="Landscape",OrgChart.loc.ppdfFittopagewidth="Fit to page width",OrgChart.loc.ppdfMargin="Margin",OrgChart.loc.ppdfHeader="Header",OrgChart.loc.ppdfFooter="Footer",OrgChart.loc.ppdfScale="Scale",OrgChart.pdfPrevUI.show=function(r,i){i=r._defaultExportOptions(i,"pdf");var t=document.createElement("div");t.id="bg-ppdf-btns",Object.assign(t.style,{position:"absolute",top:0,left:0,"background-color":"#fff","z-index":5,margin:"0 0 0 -250px","box-shadow":"0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19)",width:"250px",height:"100%","font-family":"Roboto,Helvetica",color:"#757575","text-align":"right",padding:"10px"}),r.element.appendChild(t),t.innerHTML="

"+OrgChart.loc.ppdfCmdTitle+'

 
';var e=document.createElement("div");e.id="bg-ppdf-wrapper",Object.assign(e.style,{"overflow-y":"scroll",position:"absolute",top:0,left:"270px","background-color":"#eee",width:r.width()-270+"px",height:"100%"}),r.element.appendChild(e),e.innerHTML='
';var a,n,o,l=r.element.querySelector("#bg-ppdf-size"),s=r.element.querySelector("#bg-ppdf-layout"),h=r.element.querySelector("#bg-ppdf-scale"),d=r.element.querySelector("#bg-ppdf-margin"),c=r.element.querySelector("#bg-ppdf-header"),g=r.element.querySelector("#bg-ppdf-footer");l.value=i.format,s.value=i.landscape,h.value=i.scale,d.value=i.margin,c.value=i.header,g.value=i.footer,OrgChart.anim(r.element.querySelector("#bg-ppdf-btns"),{margin:[0,0,0,-250]},{margin:[0,0,0,0]},300,OrgChart.anim.outSin,function(){r.exportPDF(i,OrgChart.pdfPrevUI._handler)}),r.element.querySelector("#bg-prev-cancel").addEventListener("click",function(){OrgChart.pdfPrevUI.hide(r)}),r.element.querySelector("#bg-prev-save").addEventListener("click",function(){r.exportPDF(i),OrgChart.pdfPrevUI.hide(r)}),OrgChart.pdfPrevUI._showHide(l,s,h),l.addEventListener("change",function(){OrgChart.anim(r.element.querySelector("#bg-ppdf-content"),{opacity:1},{opacity:0},300,OrgChart.anim.inSin,function(){r.element.querySelector("#bg-ppdf-content").innerHTML="",i.format=l.value,r.exportPDF(i,OrgChart.pdfPrevUI._handler),OrgChart.pdfPrevUI._showHide(l,s,h)})}),s.addEventListener("change",function(){OrgChart.anim(r.element.querySelector("#bg-ppdf-content"),{opacity:1},{opacity:0},300,OrgChart.anim.inSin,function(){r.element.querySelector("#bg-ppdf-content").innerHTML="",i.landscape="true"==s.value,r.exportPDF(i,OrgChart.pdfPrevUI._handler),OrgChart.pdfPrevUI._showHide(l,s,h)})}),h.addEventListener("change",function(){OrgChart.anim(r.element.querySelector("#bg-ppdf-content"),{opacity:1},{opacity:0},300,OrgChart.anim.inSin,function(){r.element.querySelector("#bg-ppdf-content").innerHTML="",i.scale=h.value,r.exportPDF(i,OrgChart.pdfPrevUI._handler),OrgChart.pdfPrevUI._showHide(l,s,h)})}),d.addEventListener("keyup",function(){clearTimeout(a),a=setTimeout(function(){OrgChart.anim(r.element.querySelector("#bg-ppdf-content"),{opacity:1},{opacity:0},300,OrgChart.anim.inSin,function(){r.element.querySelector("#bg-ppdf-content").innerHTML="";var t=d.value.split(",");if(4==t.length){for(var e=0;e';return a&&(s+='
'+a+"
"),s+=t,n&&(s+='"),s+="",s+=""},OrgChart.pdfPrevUI.hide=function(e){var r=e.element.querySelector("#bg-ppdf-wrapper");r&&OrgChart.anim(r,{opacity:1},{opacity:0},300,OrgChart.anim.inSin,function(){r.parentNode.removeChild(r);var t=e.element.querySelector("#bg-ppdf-btns");OrgChart.anim(t,{margin:[0,0,0,0]},{margin:[0,0,0,-280]},300,OrgChart.anim.inSin,function(){t.parentNode.removeChild(t)})})},void 0===OrgChart&&(OrgChart={}),OrgChart.events.on("renderdefs",function(t,e){for(var r=0;r'.replace("{from}",d.id).replace("{to}",c.id)+k.link.replaceAll("{d}","M{a.x},{a.y} C{a.x},{a.y} {c.x},{c.y} {b.x},{b.y}").replaceAll("{b.x}",C.x).replaceAll("{b.y}",C.y).replaceAll("{a.x}",m.x).replaceAll("{a.y}",m.y).replaceAll("{c.x}",w.x).replaceAll("{c.y}",w.y);var S=(r=m,a=w,void 0,n=((i=C).x-r.x)/2+r.x,o=(i.y-r.y)/2+r.y,{x:(n-a.x)/2+a.x,y:(o-a.y)/2+a.y});h.label&&(l+=k.label.replace("{x}",S.x).replace("{y}",S.y).replace("{val}",h.label)),l+=OrgChart.grCloseTag}function I(t,e,r){null==r&&(r=1);var i=e.x-t.x,a=e.y-t.y,n=Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))/3;return n=n/(Math.sqrt(i*i+a*a)*r)*OrgChart.CLINK_CURVE,{x:t.x+i/2-a*n,y:t.y+a/2+i*n}}}e.content+=l},OrgChart.prototype.addClink=function(t,e,r,i){return this.removeClink(t,e),this.config.clinks.push({from:t,to:e,label:r,template:i}),this},OrgChart.prototype.removeClink=function(t,e){for(var r=this.config.clinks.length-1;0<=r;r--){var i=this.config.clinks[r];i.from==t&&i.to==e&&this.config.clinks.splice(r,1)}return this},OrgChart.clinkTemplates={},OrgChart.clinkTemplates.orange={defs:' ',link:'',label:'{val}'},OrgChart.clinkTemplates.blue={defs:' ',link:'',label:'{val}'},OrgChart.clinkTemplates.yellow={defs:' ',link:'',label:'{val}'},void 0===OrgChart&&(OrgChart={}),OrgChart.events.on("renderdefs",function(t,e){for(var r=0;rt.x&&(n="right");break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:case OrgChart.orientation.right:case OrgChart.orientation.right_top:n="top",e.y>t.y&&(n="bottom")}var s=OrgChart.t(t.templateName,t.min,A),h=l.levelSeparation;(t.parent&&t.parent.layout==OrgChart.mixed||t.parent&&t.parent.layout==OrgChart.tree)&&(h=l.mixedHierarchyNodesSeparation);var d={p:t.x+t.w/2+s.expandCollapseSize,q:t.y,r:t.x+t.w/2+s.expandCollapseSize,s:E.minY+h};if(t.level==e.level)switch(a=e,l.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:i.push([d.p,d.q]),i.push([d.p,d.q-h/3]),s=OrgChart.t(a.templateName,a.min,A),i.push([a.x+a.w/2+s.expandCollapseSize,i[i.length-1][1]]),i.push([i[i.length-1][0],a.y]);break;case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:d.q=t.y+t.h,d.s=E.maxY-h,i.push([d.p,d.q]),i.push([d.r,t.y+t.h+h/3]),s=OrgChart.t(a.templateName,a.min,A),i.push([a.x+a.w/2+s.expandCollapseSize,i[i.length-1][1]]),i.push([i[i.length-1][0],a.y+a.h]);break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:d.p=t.x,d.q=t.y+t.h/2+s.expandCollapseSize,d.r=E.minX-h,d.s=t.y+t.h/2+s.expandCollapseSize,i.push([d.p,d.q]),i.push([t.x-h/3,d.q]),s=OrgChart.t(a.templateName,a.min,A),i.push([i[i.length-1][0],a.y+a.h/2+s.expandCollapseSize]),i.push([a.x,i[i.length-1][1]]);break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:d.p=t.x+t.w,d.q=t.y+t.h/2+s.expandCollapseSize,d.r=E.maxX+h,d.s=t.y+t.h/2+s.expandCollapseSize,i.push([d.p,d.q]),i.push([t.x+t.w+h/3,d.q]),s=OrgChart.t(a.templateName,a.min,A),i.push([i[i.length-1][0],a.y+a.h/2+s.expandCollapseSize]),i.push([a.x+a.w,i[i.length-1][1]])}else{switch(l.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:i.push([d.p,d.q]),i.push([d.r,t.y-h/3]);break;case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:d.q=t.y+t.h,d.s=E.maxY-h,i.push([d.p,d.q]),i.push([d.r,t.y+t.h+h/3]);break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:d.p=t.x,d.q=t.y+t.h/2+s.expandCollapseSize,d.r=E.minX-h,d.s=t.y+t.h/2+s.expandCollapseSize,i.push([d.p,d.q]),i.push([t.x-h/3,d.q]);break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:d.p=t.x+t.w,d.q=t.y+t.h/2+s.expandCollapseSize,d.r=E.maxX+h,d.s=t.y+t.h/2+s.expandCollapseSize,i.push([d.p,d.q]),i.push([t.x+t.w+h/3,d.q])}for(var c=t;null==a;){var g=!1,p=c.parent,f=p.leftNeighbor,u=p.rightNeighbor;if(p.id==e.id?a=p:OrgChart._intersects(p,d,S.config)&&(d=OrgChart._addPoint(p,i,S.config,d,n),g=!0),p.id!=e.id){for(;f;){if(f.id==e.id){a=f;break}OrgChart._intersects(f,d,S.config)&&(d=OrgChart._addPoint(f,i,S.config,d,n),g=!0),f=f.leftNeighbor}for(;u;){if(u.id==e.id){a=u;break}OrgChart._intersects(u,d,S.config)&&(d=OrgChart._addPoint(u,i,S.config,d,n),g=!0),u=u.rightNeighbor}}if(!g){var m=i[i.length-1][0],C=0;if(p.parent)switch(h=l.levelSeparation,p.parent.layout!=OrgChart.mixed&&p.parent.layout!=OrgChart.tree||(h=l.mixedHierarchyNodesSeparation),l.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:C=p.parent.y+p.parent.h+h*(2/3);break;case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:C=p.parent.y-h*(2/3);break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:m=p.parent.x+p.parent.w+h*(2/3),C=i[i.length-1][1];break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:m=p.parent.x-h*(2/3),C=i[i.length-1][1]}i.push([m,C])}c=p}switch(s=OrgChart.t(a.templateName,a.min,A),i.splice(i.length-1,1),l.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:i.push([a.x+a.w/2+s.expandCollapseSize,i[i.length-1][1]]),i.push([i[i.length-1][0],a.y+a.h]);break;case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:i.push([a.x+a.w/2+s.expandCollapseSize,i[i.length-1][1]]),i.push([i[i.length-1][0],a.y]);break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:i.push([i[i.length-1][0],a.y+a.h/2+s.expandCollapseSize]),i.push([a.x+a.w,i[i.length-1][1]]);break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:i.push([i[i.length-1][0],a.y+a.h/2+s.expandCollapseSize]),i.push([a.x,i[i.length-1][1]])}}var y=L.template;y||(y="orange");var x=null;switch((s=OrgChart.slinkTemplates[y]).labelPosition){case"start":x={x:i[1][0],y:i[1][1]};break;case"middle":var O=Math.ceil(i.length/2);x=function(t,e){return{x:(t[0]+e[0])/2,y:(t[1]+e[1])/2}}(i[O],i[O-1]);break;case"end":x={x:i[i.length-2][0],y:i[i.length-2][1]}}r&&(i=i.reverse()),i[0]="M"+i[0].join(",");for(var v=1;v=a.level?e(i,a,!1):e(a,i,!0)}}t.content+=I},OrgChart.prototype.addSlink=function(t,e,r,i){return this.removeClink(t,e),this.config.slinks.push({from:t,to:e,label:r,template:i}),this},OrgChart.prototype.removeSlink=function(t,e){for(var r=this.config.slinks.length-1;0<=r;r--){var i=this.config.slinks[r];i.from==t&&i.to==e&&this.config.slinks.splice(r,1)}return this},OrgChart.slinkTemplates={},OrgChart.slinkTemplates.orange={defs:' ',link:'',label:'{val}',labelPosition:"middle"},OrgChart.slinkTemplates.blue={defs:' ',link:'',label:'{val}',labelPosition:"middle"},OrgChart.slinkTemplates.yellow={defs:' ',link:'',label:'{val}',labelPosition:"middle"},OrgChart.events.on("redraw",function(t,e){if(t.config.miniMap){var r=OrgChart.miniMap._getCanvas(t),a=r.getContext("2d");r.width=r.width,r.height=r.height;var i=t.response.boundary.maxX-t.response.boundary.minX,n=t.response.boundary.maxY-t.response.boundary.minY,o=Math.min(r.width/i,r.height/n),l=(r.width-i*o)/2,s=(r.height-n*o)/2;a.clearRect(0,0,r.width,r.height),a.translate(-t.response.boundary.minX*o+l,-t.response.boundary.minY*o+s),a.scale(o,o);var h=0,d=[];!function t(e,r){if(Array.isArray(r))for(var i=0;ie.__score?-1:0}),o},OrgChart._search.addNodeToResult=function(t,e,r,i,a,n){var o={};o.id=r.id,OrgChart.isNullOrEmpty(r[n])||(o[n]=r[n]);for(var l=0;ln[d].start){h=0;break}}var c=0;0!=l&&(c=l/o);var g=0e.start?1:0});var u=e;for(d=n.length-1;0<=d;d--)u=(u=u.insert(n[d].start+n[d].length,"")).insert(n[d].start,"");return{__searchMarks:u,__score:f}},OrgChart._search.searchIndexesOf=function(t,e){var l=[];if(!OrgChart.isNullOrEmpty(t))for(var r=0;re.length?-1:t.starte.start?1:0}),l=l.filter(function(t){for(var e=!1,r=0;rOrgChart.TEXT_THRESHOLD)for(var r=0;rOrgChart.IMAGES_THRESHOLD)for(r=0;rOrgChart.LINKS_THRESHOLD)for(r=0;rOrgChart.EXPCOLL_THRESHOLD)for(r=0;r',OrgChart.linkOpenTag='',OrgChart.expcollOpenTag='',OrgChart.linkFieldsOpenTag='',OrgChart.grCloseTag="",OrgChart.IT_IS_LONELY_HERE='{link}',OrgChart.RES={},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!
See more",OrgChart.OFFLINE_MESS="The evaluation version requires internet connection!
See more",OrgChart.SEARCH_PLACEHOLDER="Search",OrgChart.IMPORT_MESSAGE="Choose the columns (fields) in your data file that contain the required information.",OrgChart.FIXED_POSITION_ON_CLICK=!1,OrgChart.ADD_NEW_FIELD="Add new field",OrgChart.ASSISTANT="Assistant",OrgChart.A4w=595,OrgChart.A4h=842,OrgChart.A3w=842,OrgChart.A3h=1191,OrgChart.A2w=1191,OrgChart.A2h=1684,OrgChart.A1w=1684,OrgChart.A1h=2384,OrgChart.Letterw=612,OrgChart.Letterh=791,OrgChart.Legalw=612,OrgChart.Legalh=1009,OrgChart.LINK_ROUNDED_CORNERS=8,OrgChart.MOVE_STEP=5,OrgChart.MOVE_INTERVAL=25,OrgChart.MIXED_LAYOUT_ALL_NODES=!0,OrgChart.CLINK_CURVE=1,OrgChart.SEARCH_RESULT_LIMIT=10,OrgChart.input=function(t,e,r,i,a,n){null==i&&(i=!1);var o=document.createElement("div"),l=document.createElement("div"),s=document.createElement("input"),h=document.createElement("hr"),d=document.createElement("button");if(d.innerHTML="Upload",d.style.position="absolute",d.style.right=0,o.style.margin="14px 14px 7px 14px",o.style.textAlign="left",o.style.position="relative",o.setAttribute("data-field-name",t),h.style.border="1px solid #d7d7d7",h.style.backgroundColor="#d7d7d7",h.style.display="block",h.style.width="100%",l.style.color="#bcbcbc",s.style.border="none",s.style.outline="none",s.style.width="100%",s.setAttribute("val",""),a&&(s.style.width="80%"),s.style.fontSize="16px",s.readOnly=i,null!=e&&null!=e&&(s.value=e),null!=r&&null!=r&&(s.placeholder=r),null!=t&&null!=t&&(l.innerHTML=t),l.setAttribute("lbl",""),s.style.color="#7a7a7a",i||s.addEventListener("focus",function(){var t=this.parentNode.getElementsByTagName("hr")[0];t.style.border="1px solid #039BE5",OrgChart.anim(t,{width:10},{width:o.clientWidth},250,OrgChart.anim.inOutSin)}),d.addEventListener("click",function(){var e=this,t=document.createElement("INPUT");t.setAttribute("type","file"),t.style.display="none",t.onchange=function(){var t=this.files[0];OrgChart.events.publish("imageuploaded",[n,t,e.parentNode.querySelector("input")])},document.body.appendChild(t),t.click()}),s.addEventListener("blur",function(){this.parentNode.getElementsByTagName("hr")[0].style.border="1px solid #d7d7d7"}),o.appendChild(l),o.appendChild(s),a&&o.appendChild(d),o.appendChild(h),OrgChart.addValidation){var c={wrapper:o,label:l,input:s,hr:h};OrgChart.addValidation(t,e,c)}return o},OrgChart._intersects=function(t,e,r){var i=t.x-r.siblingSeparation/4,a=t.y,n=t.x+t.w+r.siblingSeparation/4,o=t.y;switch(r.orientation){case OrgChart.orientation.right:case OrgChart.orientation.right_top:case OrgChart.orientation.left:case OrgChart.orientation.left_top:i=t.x,a=t.y-r.siblingSeparation/4,n=t.x,o=t.y+t.h+r.siblingSeparation/4}var l,s,h,d=e.p,c=e.q,g=e.r,p=e.s;return 0!=(l=(n-i)*(p-c)-(g-d)*(o-a))&&(s=((a-o)*(g-i)+(n-i)*(p-a))/l,0<(h=((p-c)*(g-i)+(d-g)*(p-a))/l)&&h<1&&0',Object.assign(a.style,{cursor:"pointer",width:"34px",height:"34px",position:"absolute",top:"7px",right:"7px"}),Object.assign(n.style,{"overflow-x":"hidden","overflow-y":"auto"}),Object.assign(i.style,{"background-color":"#039BE5","min-height":"50px",textAlign:"center",position:"relative"}),Object.assign(o.style,{margin:"12px"}),this.wrapperElement.appendChild(e),e.appendChild(i),e.appendChild(n),n.appendChild(o),i.appendChild(a),OrgChart.htmlRipple(i);for(var l=this.fields,s=this.obj._get(t.id),h=0;h',this.wrapperElement.id="bgEditForm",Object.assign(a.style,{cursor:"pointer",width:"34px",height:"34px",position:"absolute",top:"7px",right:"7px"}),Object.assign(o.style,{"overflow-x":"hidden","overflow-y":"auto"}),Object.assign(r.style,{"background-color":"#039BE5","min-height":"50px",textAlign:"center",position:"relative"}),Object.assign(n.style,{margin:"14px 14px 7px",color:"#4285F4",cursor:"pointer"}),Object.assign(l.style,{margin:"14px 14px 7px",color:"rgb(188, 188, 188)"}),n.innerHTML=OrgChart.ADD_NEW_FIELD;var s=OrgChart._arrayContains(this.node.tags,"assistant")?"checked":"";l.setAttribute("data-field-name","isAssistant"),l.innerHTML='
'+OrgChart.ASSISTANT+'
',this.wrapperElement.appendChild(e),e.appendChild(r),e.appendChild(o),r.appendChild(a),OrgChart.htmlRipple(r);for(var h=this.fields,d=this.obj._get(t.id),c=0;c'+h+"  "+d+""}if(""!=r){if(this.wrapper=document.createElement("div"),Object.assign(this.wrapper.style,{opacity:0,"background-color":"#FFFEFF","box-shadow":"#DCDCDC 0px 1px 2px 0px",display:"inline-block",border:"1px solid #D7D7D7;border-radius:5px","z-index":1e3,position:"absolute","text-align":"left","user-select":"none"}),this.wrapper.className="chart-menu",this.wrapper.style.left="-99999px",this.wrapper.style.top="-99999px",this.wrapper.innerHTML=r,this.obj.element.appendChild(this.wrapper),null==e){var c=OrgChart._menuPosition(t,this.wrapper,this.obj.getSvg());t=c.x,e=c.y}var g=t+45;this.wrapper.style.left=g+"px",this.wrapper.style.top=e+"px",this.wrapper.style.left=g-this.wrapper.offsetWidth+"px";var p=t-this.wrapper.offsetWidth;OrgChart.anim(this.wrapper,{opacity:0,left:g-this.wrapper.offsetWidth},{opacity:1,left:p},300,OrgChart.anim.inOutPow);for(var f=this.wrapper.getElementsByTagName("div"),u=0;u',OrgChart.toolbarUI.fitIcon='',OrgChart.toolbarUI.openFullScreenIcon='',OrgChart.toolbarUI.closeFullScreenIcon='',OrgChart.toolbarUI.zoomInIcon='',OrgChart.toolbarUI.zoomOutIcon='',OrgChart.toolbarUI.layoutIcon='',OrgChart.toolbarUI.prototype.init=function(t,e){if(e){this.obj=t,this.toolbar=e,this._visible=!1,this.div=document.createElement("div"),this.div.classList.add("bg-toolbar-container"),Object.assign(this.div.style,{position:"absolute",padding:"3px",right:this.obj.config.padding+"px",bottom:this.obj.config.padding+"px"}),e.expandAll&&(this.div.innerHTML+='
'+OrgChart.toolbarUI.expandAllIcon+"
"),e.fit&&(this.div.innerHTML+='
'+OrgChart.toolbarUI.fitIcon+"
"),e.zoom&&(this.div.innerHTML+='
'+OrgChart.toolbarUI.zoomInIcon+"
",this.div.innerHTML+='
'+OrgChart.toolbarUI.zoomOutIcon+"
"),e.layout&&(this.div.innerHTML+='
'+OrgChart.toolbarUI.layoutIcon+"
",this.layouts=document.createElement("div"),this.layouts.innerHTML='',this.obj.element.appendChild(this.layouts),Object.assign(this.layouts.style,{position:"absolute",width:"100%",left:"0",bottom:"-145px","box-shadow":"0px 1px 4px rgba(0,0,0,0.3)","background-color":"#f9f9f9",height:"123px","padding-top":"20px","border-top":"1px solid #cacaca"})),e.fullScreen&&(this.div.innerHTML+='
'+OrgChart.toolbarUI.openFullScreenIcon+"
"),this.obj.element.appendChild(this.div),this.layoutBtn=this.div.querySelector('[data-tlbr="layout"]');var r=this.div.querySelector('[data-tlbr="plus"]'),i=this.div.querySelector('[data-tlbr="minus"]'),a=this.div.querySelector('[data-tlbr="fit"]'),n=this.div.querySelector('[data-tlbr="fullScreen"]'),o=this.div.querySelector('[data-tlbr="expand"]'),l=this;r&&r.addEventListener("click",function(){l.obj.zoom(!0,null,!0)}),i&&i.addEventListener("click",function(){l.obj.zoom(!1,null,!0)}),a&&a.addEventListener("click",function(){l.obj.fit()}),n&&n.addEventListener("click",function(){l.obj.toggleFullScreen()}),o&&o.addEventListener("click",function(){l.obj.expand(null,"all")}),this.layoutBtn&&this.layoutBtn.addEventListener("click",function(){l._visible?l.hideLayout():l.showLayout()}),this.layouts&&this.layouts.addEventListener("click",function(t){for(var e=t.target;e;){if(e.hasAttribute&&e.hasAttribute("data-layout")){e=e.getAttribute("data-layout"),l.obj.setLayout(OrgChart[e]);break}e=e.parentNode}})}},OrgChart.toolbarUI.prototype.showLayout=function(){this._visible=!0,this.layoutBtn.style.transform="rotate(180deg) translateX(0px) translateY(0px)",OrgChart.anim(this.div,{bottom:this.obj.config.padding},{bottom:this.obj.config.padding+145},this.obj.config.anim.duration,this.obj.config.anim.func),OrgChart.anim(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.anim(this.div,{bottom:this.obj.config.padding+145},{bottom:this.obj.config.padding},this.obj.config.anim.duration,this.obj.config.anim.func),OrgChart.anim(this.layouts,{bottom:0},{bottom:-145},this.obj.config.anim.duration,this.obj.config.anim.func)},OrgChart.notifierUI=function(){},OrgChart.notifierUI.prototype.init=function(t){this.obj=t},OrgChart.notifierUI.prototype.show=function(t,e){if(null!=t){1==t&&(t=OrgChart.MAX_NODES_MESS,e="#FFCA28"),2==t&&(t=OrgChart.OFFLINE_MESS,e="#FFCA28");var r=document.createElement("div");r.innerHTML=t,Object.assign(r.style,{position:"absolute","background-color":e,color:"#ffffff",padding:"15px","border-radius":"40px",opacity:0,overflow:"hidden","white-space":"nowrap","text-align":"center"}),this.obj.element.appendChild(r);var i=this.obj.width()/2-r.offsetWidth/2,a=this.obj.height()/2-r.offsetHeight/2;r.style.left=i+"px",r.style.top=a+"px";var n=r.offsetWidth;r.style.width="20px",OrgChart.anim(r,{opacity:0,width:10},{opacity:1,width:n},this.obj.config.anim.duration,this.obj.config.anim.func)}},OrgChart.icon={},OrgChart.icon.png=function(t,e,r){return''},OrgChart.icon.pdf=function(t,e,r){return''},OrgChart.icon.svg=function(t,e,r){return''},OrgChart.icon.csv=function(t,e,r){return''},OrgChart.icon.excel=function(t,e,r){return''},OrgChart.icon.edit=function(t,e,r){return''},OrgChart.icon.details=function(t,e,r){return''},OrgChart.icon.remove=function(t,e,r){return''},OrgChart.icon.add=function(t,e,r){return''},OrgChart.icon.search=function(t,e,r){return''},OrgChart.icon.xml=function(t,e,r){return''},OrgChart.prototype.exportPDF=function(t,e){t=this._defaultExportOptions(t,"pdf"),this._export(t,e)},OrgChart.prototype.exportPNG=function(t,e){t=this._defaultExportOptions(t,"png"),this._export(t,e)},OrgChart.prototype.exportSVG=function(t,e){t=this._defaultExportOptions(t,"svg"),this._export(t,e)},OrgChart.prototype._defaultExportOptions=function(t,e){return null==t&&(t={}),"svg"==e?(t.ext="svg",t.mime="image/svg+xml"):"pdf"==e?(t.mime="application/pdf",t.ext="pdf"):"png"==e&&(t.mime="image/png",t.ext="png"),null==t.margin&&(t.margin=[50,40,50,40]),null==t.padding&&(t.padding=0),null==t.landscape&&(t.landscape=!1),null==t.filename&&(t.filename="OrgChart."+t.ext),null==t.scale&&(t.scale="fit"),null==t.format&&(t.format="fit"),null==t.header&&(t.header=""),null==t.footer&&(t.footer="Page {current-page} of {total-pages}"),null==t.openInNewTab&&(t.openInNewTab=!1),t},OrgChart.prototype._export=function(o,l){var s=this,t={id:o.nodeId,expandChildren:o.expandChildren};o.margin&&o.margin[0]<2&&(o.margin[0]=2),o.margin&&o.margin[1]<2&&(o.margin[1]=2),o.margin&&o.margin[2]<2&&(o.margin[2]=2),o.margin&&o.margin[3]<2&&(o.margin[3]=2),this._draw(!1,OrgChart.action.exporting,t,function(t){var r=document.createElement("div");if(r.innerHTML=t,0a[0]/10)return;if(l>a[1]/10)return}}else if(-1!=e.type.indexOf("touch")&&null==this._touch)return;for(var s=e.target;s!=t;){if(s.hasAttribute("control-expcoll-id")){var h=s.getAttribute("control-expcoll-id"),d=this.getNode(h);return void this._expCollHandler(d.id)}if(s.hasAttribute("node-id")){h=s.getAttribute("node-id"),d=this.getNode(h);return void this._nodeClickHandler(d.id,e)}if(s.hasAttribute("control-node-menu-id")){h=s.getAttribute("control-node-menu-id"),d=this.getNode(h);return void this._nodeMenuClickHandler(d.id,s,e)}if(s.hasAttribute("control-add"))return void this._lonelyButtonHandler();s=s.parentNode}},OrgChart.prototype._globalContextHandler=function(t,e){for(var r=e.target;r!=t;){if(r.hasAttribute("node-id")){var i=r.getAttribute("node-id"),a=this.getNode(i);return void this._nodeContextHandler(a.id,e)}r=r.parentNode}},OrgChart.prototype._nodeContextHandler=function(t,e){e.preventDefault(),this.searchUI.hide(),this.nodeMenuUI.hide(),this.nodeContextMenuUI.hide(),this.menuUI.hide();var r=this.get(t),i=null;if(null!=r&&Array.isArray(r.tags))for(var a=0;aOrgChart.FIRE_DRAG_NOT_CLICK_IF_MOVE||Math.abs(e.y-_.y)>OrgChart.FIRE_DRAG_NOT_CLICK_IF_MOVE))!1===OrgChart.events.publish("drag",[b,c])&&M(),y._dragEventFired=!0;E.setAttribute("transform","matrix("+k.toString()+")")}}},M=function(t){if(b.stopMove(),w.classList&&(w.classList.remove("cursor-grab"),w.classList.remove("cursor-move"),w.classList.remove("cursor-nodrop"),w.classList.remove("cursor-copy")),w.removeEventListener(i.move,a),w.removeEventListener(i.up,M),i.leave&&w.removeEventListener(i.leave,M),x.id!=O&&null!=O){var e=b.getNode(O);if(!1===OrgChart.events.publish("drop",[b,x.id,e.id]))return L(O,v),w.removeChild(E),void(b._gragStartedId=null);if(b._canUpdateLink(x.id,O)){var r=b.get(x.id);r.pid=O,r.stpid=null,b.updateNode(r,null,!0)}else w.removeChild(E),L(O,v);b._gragStartedId=null}else{w.removeChild(E),b._gragStartedId=null;OrgChart._getClientXY(t);y._dragEventFired&&OrgChart.events.publish("drop",[b,x.id])}};w.addEventListener(i.move,a),w.addEventListener(i.up,M),i.leave&&w.addEventListener(i.leave,M)}},OrgChart.prototype._resizeHandler=function(t,e){var r=this.getViewBox(),i=this.getSvg(),a=i.getAttribute("width"),n=i.getAttribute("height"),o=a/r[2],l=n/r[3],s=l=OrgChart.SEARCH_RESULT_LIMIT);l++){var s=a[l],h="";if(n){var d=this.obj._get(s.id);"function"==typeof n?h=n(this.obj,this.obj.getNode(s.id),d):d[n]&&(h=d[n]),h&&(h='')}var c="",g="";this.obj.config.searchDisplayField==s.__searchField?c=s.__searchMarks:this.obj.config.searchDisplayField?(c=s[this.obj.config.searchDisplayField],OrgChart.isNullOrEmpty(c)&&(c=""),g=s.__searchMarks):c=s.__searchMarks,o+=OrgChart.searchUI.createItem(h,s.id,c,g)}r.innerHTML=o;var p=i.querySelectorAll("[data-search-item-id]");for(l=0;l
'+OrgChart.icon.search(32,32,"#757575")+'
'},OrgChart.searchUI.createItem=function(t,e,r,i){return'
'+t+'
'+r+'
'+i+'
'},OrgChart.searchUI.createSearchIcon=function(t){return'
'+OrgChart.icon.search(32,32,"#757575")+"
"},void 0===OrgChart&&(OrgChart={}),OrgChart.server=function(t,e){this.config=t,this.layoutConfigs=e,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},OrgChart.server.prototype.read=function(h,d,c,g,p,f,u,m){var C=this;OrgChart.state._get(this.config.state,d,c,function(t){C.state=t,C.action=p,C.actionParams=f,p==OrgChart.action.init&&C.state?(C.viewBox=C.state.vb,C.vbIsInitializedFromState=!0):(C.viewBox=g,C.vbIsInitializedFromState=!1);var r=C.maxX,i=C.maxY,a=C.minX,n=C.minY,o=C.bordersByRootIdAndLevel,l=C.roots,s=C.nodes;if(h){var e=OrgChart.server._getResponse(d,c,C.visibleNodeIds,C.config,r,i,a,n,C.viewBox,l,C.action,C.actionParams,s,C.oldNodes,C.vbIsInitializedFromState);p!=OrgChart.action.exporting&&(C.maxX=r,C.maxY=i,C.minX=a,C.minY=n,C.roots=l,C.nodes=s,C.visibleNodeIds=e.visibleNodeIds),e.bordersByRootIdAndLevel=o,e.roots=l,e.adjustify={x:0,y:0},C.state&&(e.adjustify=C.state.adjustify),u(e)}else C.oldNodes=s||null,C._read(function(t){r=t.maxX,i=t.maxY,a=t.minX,n=t.minY,o=t.bordersByRootIdAndLevel,l=t.roots,s=t.nodes;var e=OrgChart.server._getResponse(d,c,C.visibleNodeIds,C.config,r,i,a,n,C.viewBox,l,C.action,C.actionParams,s,C.oldNodes,C.vbIsInitializedFromState);e.notif=t.limit,e.roots=l,e.bordersByRootIdAndLevel=o,e.adjustify=t.adjustify,p!=OrgChart.action.exporting&&(C.maxX=r,C.maxY=i,C.minX=a,C.minY=n,C.roots=l,C.nodes=s,C.visibleNodeIds=e.visibleNodeIds,C.bordersByRootIdAndLevel=o),u(e)},m)})},OrgChart.server.prototype._read=function(n,t){var o=this,e=OrgChart.server._createNodes(o.config,o.layoutConfigs,o.action,o.actionParams,o.oldNodes,o.state);t(e);var l=e.nodes,s=e.roots,r=OrgChart.remote;null==r&&(r=OrgChart.local),r._setPositions(s,o.layoutConfigs,function(t){var e=OrgChart.server._doNotChangePositionOfClickedNodeIfAny(s,l,o.action,o.actionParams,o.oldNodes,o.config.orientation);o.state&&o.action==OrgChart.action.init&&(e=o.state.adjustify);for(var r={minX:null,minY:null,maxX:null,maxY:null},i={},a=0;a=e.collapse.level-1&&-1==i.indexOf(t.id):a!=OrgChart.action.centerNode&&a!=OrgChart.action.insert||-1!=i.indexOf(t.id)&&(t.collapsed=!1)},OrgChart.server._initNode=function(t,e,r,i,a,n,o,l,s,h,d){var c=n[r||"base"];null==t.parent&&OrgChart.server._setCollpasedProperty(t,c,s,l,a,i-1,d);for(var g=0;gi.sl&&(i=e);for(var r=0;r=a-o)switch(_=(a+o)/2-b/2,i.orientation){case OrgChart.orientation.right:case OrgChart.orientation.right_top:_=(o-a)/2-b/2}else switch(_=u.x-b/2+OrgChart.server._getNodeWidth(u,i)/2,i.orientation){case OrgChart.orientation.right:case OrgChart.orientation.right_top:(_=-(b/2-(o-a)/2))-i.padding&&(_=-i.padding)}if(w-2*i.padding>=n-l)switch(k=(n+l)/2-w/2,i.orientation){case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:k=(l-n)/2-w/2}else switch((k=-(w/2-(n-l)/2))>-i.padding&&(k=-i.padding),i.orientation){case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:(k=-(w/2-(l-n)/2))C.right?C.right:C.left),s[0]>C.right&&s[0]>C.left&&(s[0]=C.left>C.right?C.left:C.right),s[1]C.bottom?C.bottom:C.top),s[1]>C.bottom&&s[1]>C.top&&(s[1]=C.top>C.bottom?C.top:C.bottom))}if(d==OrgChart.action.centerNode||d==OrgChart.action.maximize){var S=g[c.id];1==c.options.horizontal&&(s[0]=S.x+S.w/2-s[2]/2),1==c.options.vertical&&(s[1]=S.y+S.h/2-s[3]/2),i.sticky&&(s[0]C.right?C.right:C.left),s[0]>C.right&&s[0]>C.left&&(s[0]=C.left>C.right?C.left:C.right),s[1]C.bottom?C.bottom:C.top),s[1]>C.bottom&&s[1]>C.top&&(s[1]=C.top>C.bottom?C.top:C.bottom))}if(d==OrgChart.action.insert||d==OrgChart.action.expand||d==OrgChart.action.collapse||d==OrgChart.action.update||d==OrgChart.action.centerNode||d==OrgChart.action.maximize){var I=null;if(d==OrgChart.action.insert&&c&&null!=c.insertedNodeId&&null!=c.insertedNodeId)I=g[c.insertedNodeId];else if(d==OrgChart.action.update&&c&&null!=c.visId&&null!=c.visId)I=g[c.visId];else if(d!=OrgChart.action.expand&&d!=OrgChart.action.collapse&&d!=OrgChart.action.maximize||!c||null==c.id||null==c.id){if(d==OrgChart.action.centerNode||d==OrgChart.action.maximize){switch(i.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:c.options.vertical||(I=g[c.id]);break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:case OrgChart.orientation.left:case OrgChart.orientation.left_top:c.options.horizontal||(I=g[c.id])}I&&(I=OrgChart.server._getMostDeepChild(I,g))}}else I=g[c.id],I=OrgChart.server._getMostDeepChild(I,g);if(!OrgChart.FIXED_POSITION_ON_CLICK&&I)switch(i.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:var A=I.y+I.h-s[3]+i.padding;s[1]A&&(s[1]=A);break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:A=I.x-i.padding;s[0]>A&&(s[0]=A);break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:A=I.x+I.w-s[2]+i.padding;s[0]',svg:'{content}',link:'',pointer:'',node:'',plus:'',minus:'',nodeMenuButton:'',exportMenuButton:'



',img_0:'',link_field_0:'{val}'},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:'{content}',link:'',assistanseLink:'',pointer:'',node:'',plus:'',minus:'',nodeMenuButton:'',exportMenuButton:'



',img_0:'',link_field_0:'{val}',field_0:'{val}',field_1:'{val}',padding:[50,20,35,20]},OrgChart.templates.split=Object.assign({},OrgChart.templates.ana),OrgChart.templates.split.size=[10,10],OrgChart.templates.split.node='',OrgChart.templates.group=Object.assign({},OrgChart.templates.ana),OrgChart.templates.group.size=[250,120],OrgChart.templates.group.node='',OrgChart.templates.group.link='',OrgChart.templates.group.nodeMenuButton='',OrgChart.templates.group.field_0='{val}',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='{val}',OrgChart.templates.ula.field_1='{val}',OrgChart.templates.ula.node='',OrgChart.templates.ula.img_0='',OrgChart.templates.ula.menu='',OrgChart.templates.ula.nodeMenuButton='',OrgChart.templates.olivia=Object.assign({},OrgChart.templates.ana),OrgChart.templates.olivia.field_0='{val}',OrgChart.templates.olivia.field_1='{val}',OrgChart.templates.olivia.defs='',OrgChart.templates.olivia.node='',OrgChart.templates.olivia.img_0='',OrgChart.templates.olivia.nodeMenuButton='',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='',OrgChart.templates.belinda.img_0='',OrgChart.templates.belinda.field_0='{val}',OrgChart.templates.belinda.field_1='{val}',OrgChart.templates.belinda.link='',OrgChart.templates.belinda.nodeMenuButton='',OrgChart.templates.rony=Object.assign({},OrgChart.templates.ana),OrgChart.templates.rony.svg='{content}',OrgChart.templates.rony.defs='',OrgChart.templates.rony.size=[180,250],OrgChart.templates.rony.ripple={color:"#F57C00",radius:5,rect:null},OrgChart.templates.rony.img_0='',OrgChart.templates.rony.node='',OrgChart.templates.rony.field_0='{val}',OrgChart.templates.rony.field_1='{val}',OrgChart.templates.rony.field_2='{val}',OrgChart.templates.rony.link='',OrgChart.templates.rony.plus='',OrgChart.templates.rony.minus='',OrgChart.templates.rony.nodeMenuButton='',OrgChart.templates.mery=Object.assign({},OrgChart.templates.ana),OrgChart.templates.mery.ripple={color:"#e6e6e6",radius:50,rect:null},OrgChart.templates.mery.node='',OrgChart.templates.mery.link='',OrgChart.templates.mery.img_0='',OrgChart.templates.mery.field_0='{val}',OrgChart.templates.mery.field_1='{val}',OrgChart.templates.mery.nodeMenuButton='',OrgChart.templates.polina=Object.assign({},OrgChart.templates.ana),OrgChart.templates.polina.size=[300,80],OrgChart.templates.polina.ripple={color:"#e6e6e6",radius:40,rect:null},OrgChart.templates.polina.node='',OrgChart.templates.polina.img_0='',OrgChart.templates.polina.field_0='{val}',OrgChart.templates.polina.field_1='{val}',OrgChart.templates.polina.link='',OrgChart.templates.polina.nodeMenuButton='',OrgChart.templates.mila=Object.assign({},OrgChart.templates.ana),OrgChart.templates.mila.node='',OrgChart.templates.mila.img_0='',OrgChart.templates.mila.field_0='{val}',OrgChart.templates.mila.nodeMenuButton='',OrgChart.templates.diva=Object.assign({},OrgChart.templates.ana),OrgChart.templates.diva.size=[200,170],OrgChart.templates.diva.node='',OrgChart.templates.diva.img_0='',OrgChart.templates.diva.field_0='{val}',OrgChart.templates.diva.field_1='{val}',OrgChart.templates.diva.pointer='',OrgChart.templates.diva.nodeMenuButton='',OrgChart.templates.luba=Object.assign({},OrgChart.templates.ana),OrgChart.templates.luba.svg='{content}',OrgChart.templates.luba.defs='',OrgChart.templates.luba.node='',OrgChart.templates.luba.img_0='',OrgChart.templates.luba.nodeMenuButton='',OrgChart.templates.luba.field_0='{val}',OrgChart.templates.luba.field_1='{val}',OrgChart.templates.luba.plus='',OrgChart.templates.luba.minus='',OrgChart.templates.luba.expandCollapseSize=36,OrgChart.templates.derek=Object.assign({},OrgChart.templates.ana),OrgChart.templates.derek.link='',OrgChart.templates.derek.field_0='{val}',OrgChart.templates.derek.field_1='{val}',OrgChart.templates.derek.node='',OrgChart.templates.derek.defs=' ',OrgChart.templates.derek.img_0='',OrgChart.templates.derek.minus='',OrgChart.templates.derek.plus='',OrgChart.templates.derek.nodeMenuButton='',OrgChart.templates.isla=Object.assign({},OrgChart.templates.ana),OrgChart.templates.isla.defs='',OrgChart.templates.isla.size=[180,120],OrgChart.templates.isla.node='',OrgChart.templates.isla.field_0='{val}',OrgChart.templates.isla.field_1='{val}',OrgChart.templates.isla.img_0='',OrgChart.templates.isla.minus='',OrgChart.templates.isla.plus='',OrgChart.templates.isla.nodeMenuButton='',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='',OrgChart.templates.deborah.img_0='',OrgChart.templates.deborah.field_0='{val}',OrgChart.templates.deborah.field_1='{val}',OrgChart.templates.deborah.nodeMenuButton='',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.ui={_defsIds:{},defs:function(t){var e="";for(var r in OrgChart.templates){var i=OrgChart.templates[r];i.defs?(OrgChart.ui._defsIds[r]=OrgChart.randomId(),e+=i.defs.replace("{randId}",OrgChart.ui._defsIds[r])):e+=i.defs}return""+e+t+""},css:function(){return''},lonely:function(t){return t.nodes&&t.nodes.length?"":OrgChart.IT_IS_LONELY_HERE.replace("{link}",OrgChart.RES.IT_IS_LONELY_HERE_LINK)},pointer:function(t,e,r){return e===OrgChart.action.exporting?"":OrgChart.t(t.template,!1,r).pointer},node:function(t,e,r,i,a,n,o,l,s,h){var d=OrgChart.t(t.templateName,t.min,s),c=d.node.replaceAll("{w}",t.w).replaceAll("{h}",t.h);d.defs&&(c=c.replace("{randId}",OrgChart.ui._defsIds[t.templateName])),null==o&&(o=i.nodeBinding);var g={node:t,data:e};for(var p in o){var f=o[p];if(e){var u=e[f];if("function"==typeof f&&(u=f(h,t,e)),g.value=u,g.element=d[p],g.name=f,!1!==OrgChart.events.publish("field",[h,g]))if(null!=g.value&&null!=g.value&&null!=g.element)c+=(OrgChart._lblIsImg(i,p)||"string"!=typeof g.value||(g.value=OrgChart.wrapText(g.value,g.element)),g.element.replace("{val}",g.value)).replaceAll("{ew}",t.w-(t.padding?t.padding[1]:0)).replaceAll("{cw}",t.w/2).replaceAll("{randId}",OrgChart.randomId()).replaceAll("{randId2}",OrgChart.randomId())}}var m=OrgChart._getPosition(r,t,a,n),C="node";Array.isArray(t.tags)&&t.tags.length&&(C+=" "+t.tags.join(" ")),t.layout&&(C+=" tree-layout");var y="";t.lcn&&(y='lcn="'+t.lcn+'"');var x=OrgChart.nodeOpenTag.replace("{lcn}",y).replace("{id}",t.id).replace("{class}",C).replace("{sl}",t.sl).replace("{level}",t.level).replace("{x}",m.x).replace("{y}",m.y),O=OrgChart._getOpacity(r,t);(x=x.replace("{opacity}",O),null!=i.nodeMenu&&"split"!=t.templateName&&l!==OrgChart.action.exporting)&&(c+=d.nodeMenuButton.replace("{id}",t.id).replace("{cw}",t.w/2).replace("{ew}",t.w-(t.padding?t.padding[1]:0)));return c=x+c+OrgChart.grCloseTag},expandCollapseBtn:function(t,e,r,i,a){var n="";if(i!==OrgChart.action.exporting&&0t.firstRight.x+t.firstRight.w/2?ot.firstRight.y+t.firstRight.h/2?or.right?r.right:r.left),e[0]>r.right&&e[0]>r.left&&(a[0]=r.left>r.right?r.left:r.right),e[1]r.bottom?r.bottom:r.top),e[1]>r.bottom&&e[1]>r.top&&(a[1]=r.top>r.bottom?r.top:r.bottom),e[0]!==a[0]||e[1]!==a[1]?OrgChart.anim(t,{viewBox:e},{viewBox:a},300,OrgChart.anim.outPow,function(){i&&i()}):i&&i()},OrgChart.randomId=function(){return Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15)},OrgChart._getClientXY=function(t){return-1==t.type.indexOf("touch")?{x:t.clientX,y:t.clientY}:t.changedTouches.length?{x:t.changedTouches[0].clientX,y:t.changedTouches[0].clientY}:void 0},OrgChart._getClientTouchesXY=function(t,e){return-1!=t.type.indexOf("touch")?t.touches.lengtha.top+a.height&&(l-=n.height),i.left-n.width",e.querySelector("text").getBoundingClientRect()},OrgChart.wrapText=function(t,e){if(-1==e.indexOf(""+e+"";var i=(new DOMParser).parseFromString(e,"text/xml").getElementsByTagName("text")[0],a=parseFloat(i.getAttribute("x")),n=parseFloat(i.getAttribute("y")),o=i.getAttribute("text-anchor"),l=i.getAttribute("width"),s=i.getAttribute("text-overflow"),h="http://www.w3.org/2000/svg",d=r.getElementsByTagName("svg")[0].getElementsByTagName("text")[0],c=parseFloat(i.getAttribute("text-overflow-lines"));if(c||(c=0),!l)return t;if(l=parseFloat(l),a||(a=0),n||(n=0),a||(o="start"),s||(s="ellipsis"),"ellipsis"==s){d.removeChild(d.firstChild),d.textContent=t;for(var g=d.getComputedTextLength(),p=2;l"+t+""+d.textContent:t}if("multiline"==s){var f=t.split(" "),u=d.getBBox().height;d.textContent="";var m=document.createElementNS(h,"tspan"),C=document.createTextNode(f[0]);m.setAttributeNS(null,"x",a),m.setAttributeNS(null,"y",n),m.setAttributeNS(null,"text-anchor",o),m.appendChild(C),d.appendChild(m);p=1;for(var y=1,x=1;xl){if(m.firstChild.data=m.firstChild.data.slice(0,O),y++,0!==c&&c'+(new XMLSerializer).serializeToString(e.documentElement)},OrgChart._xml2json=function(t){for(var e=(new DOMParser).parseFromString(t,"text/xml").getElementsByTagName("node"),r=[],i=0;ie.maxX)&&(e.maxX=t.x+t.w),(null==e.maxY||null!=t.y&&t.y+t.h>e.maxY)&&(e.maxY=t.y+t.h)},OrgChart.getStParentNodes=function(t,e){for(e||(e=[]);t.parent;)t=t.parent;return t.stParent&&(e.push(t.stParent),OrgChart.getStParentNodes(t.stParent,e)),e},OrgChart.getRootOf=function(t){for(;t&&t.parent;)t=t.parent;return t},OrgChart._getViewBox=function(t){var e=null;return t?(e=(e="["+(e=t.getAttribute("viewBox"))+"]").replace(/\ /g,","),e=JSON.parse(e)):null},OrgChart.isNullOrEmpty=function(t){return null==t||""===t},OrgChart.xScrollUI=function(t,e,r,i,a){this.element=t,this.requestParams=r,this.config=e,this.onSetViewBoxCallback=i,this.onDrawCallback=a,this.pos=0},OrgChart.xScrollUI.prototype.addListener=function(t){var o=this;if((this.config.mouseScrool==OrgChart.action.xScroll||this.config.mouseScrool==OrgChart.action.scroll)&&this.bar){var e=OrgChart._getScrollSensitivity();!function(t,i,e){var a=!1;function n(){a=!0;var t=(o.pos-o.bar.scrollLeft)/e;if(0r&&(o.pos=r),a||n()},{passive:!0});var r=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){setTimeout(t,20)}}(t,e.speed,e.smooth)}},OrgChart.xScrollUI.prototype.create=function(t){if(this.config.showXScroll===OrgChart.scroll.visible||this.config.mouseScrool===OrgChart.action.scroll||this.config.mouseScrool===OrgChart.action.xScroll){var a=this;this.bar&&this.bar.parentNode.removeChild(this.bar),this.bar=document.createElement("div"),this.config.showXScroll!==OrgChart.scroll.visible&&(this.bar.style.visibility="hidden"),this.innerBar=document.createElement("div");this.requestParams();this.innerBar.innerHTML=" ",Object.assign(this.bar.style,{position:"absolute",left:0,bottom:0,width:t+"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 t=a.requestParams(),e=(parseFloat(a.innerBar.clientWidth)-parseFloat(a.bar.clientWidth))/100,r=this.scrollLeft/e,i=(t.boundary.right-t.boundary.left)/100;t.viewBox[0]=r*i+t.boundary.left,a.onSetViewBoxCallback(t.viewBox),clearTimeout(this._timeout),this._timeout=setTimeout(function(){a.onDrawCallback()},500)}})}},OrgChart.xScrollUI.prototype.setPosition=function(){if(this.bar){var t=this.requestParams(),e=Math.abs(t.boundary.maxX-t.boundary.minX)*t.scale;switch(this.config.orientation){case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:innerHeight=Math.abs(t.boundary.minY*t.scale);break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:e=Math.abs(t.boundary.minX*t.scale)}this.innerBar.style.width=e+"px";var r=(t.boundary.right-t.boundary.left)/100,i=(t.viewBox[0]-t.boundary.left)/r;i<0?i=0:100r&&(o.pos=r),a||n()},{passive:!0});var r=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){setTimeout(t,20)}}(t,e.speed,e.smooth)}},OrgChart.yScrollUI.prototype.create=function(t){if(this.config.showYScroll===OrgChart.scroll.visible||this.config.mouseScrool===OrgChart.action.scroll||this.config.mouseScrool===OrgChart.action.yScroll){var a=this;this.bar&&this.bar.parentNode.removeChild(this.bar),this.bar=document.createElement("div"),this.config.showYScroll!==OrgChart.scroll.visible&&(this.bar.style.visibility="hidden"),this.innerBar=document.createElement("div"),this.innerBar.innerHTML=" ",Object.assign(this.bar.style,{position:"absolute",right:0,bottom:0,height:t+"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 t=a.requestParams(),e=(parseFloat(a.innerBar.clientHeight)-parseFloat(a.bar.clientHeight))/100,r=this.scrollTop/e,i=(t.boundary.bottom-t.boundary.top)/100;t.viewBox[1]=r*i+t.boundary.top,a.onSetViewBoxCallback(t.viewBox),clearTimeout(this._timeout),this._timeout=setTimeout(function(){a.onDrawCallback()},500)}})}},OrgChart.yScrollUI.prototype.setPosition=function(){if(this.bar){var t=this.requestParams(),e=t.boundary.maxY*t.scale;switch(this.config.orientation){case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:e=Math.abs(t.boundary.minY*t.scale);break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:innerWidth=Math.abs(t.boundary.minX*t.scale)}this.innerBar.style.height=e+"px";var r=(t.boundary.bottom-t.boundary.top)/100,i=(t.viewBox[1]-t.boundary.top)/Math.abs(r);i<0?i=0:100this.config.scaleMin||0!=t&&1!=t&&lthis.config.scaleMin){this._hideBeforeAnimation();var s=this;r?(clearTimeout(s._timeout),OrgChart.anim(this.getSvg(),{viewbox:this.getViewBox()},{viewbox:i},this.config.anim.duration,this.config.anim.func,function(){clearTimeout(s._timeout),s._timeout=setTimeout(function(){s._draw(!0,OrgChart.action.zoom)},500)})):(this.setViewBox(i),clearTimeout(s._timeout),s._timeout=setTimeout(function(){s._draw(!0,OrgChart.action.zoom)},500))}},OrgChart.loading={},OrgChart.loading.show=function(t){var e=document.createElement("div");e.id="bg-loading",e.innerHTML='
',t.element.appendChild(e)},OrgChart.loading.hide=function(t){var e=t.element.querySelector("#bg-loading");e&&e.parentNode.removeChild(e)},OrgChart.pdfPrevUI={},OrgChart.loc||(OrgChart.loc={}),OrgChart.loc.ppdfCmdTitle="PDF Preview",OrgChart.loc.ppdfSave="Save",OrgChart.loc.ppdfCancel="Cancel",OrgChart.loc.ppdfFormat="Format",OrgChart.loc.ppdfFitToDrwaing="Fit",OrgChart.loc.ppdfA4="A4",OrgChart.loc.ppdfA3="A3",OrgChart.loc.ppdfA2="A2",OrgChart.loc.ppdfA1="A1",OrgChart.loc.ppdfLetter="Letter",OrgChart.loc.ppdfLegal="Legal",OrgChart.loc.ppdfLayout="Layout",OrgChart.loc.ppdfPortrait="Portrait",OrgChart.loc.ppdfLandscape="Landscape",OrgChart.loc.ppdfFittopagewidth="Fit to page width",OrgChart.loc.ppdfMargin="Margin",OrgChart.loc.ppdfHeader="Header",OrgChart.loc.ppdfFooter="Footer",OrgChart.loc.ppdfScale="Scale",OrgChart.pdfPrevUI.show=function(r,i){i=r._defaultExportOptions(i,"pdf");var t=document.createElement("div");t.id="bg-ppdf-btns",Object.assign(t.style,{position:"absolute",top:0,left:0,"background-color":"#fff","z-index":5,margin:"0 0 0 -250px","box-shadow":"0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19)",width:"250px",height:"100%","font-family":"Roboto,Helvetica",color:"#757575","text-align":"right",padding:"10px"}),r.element.appendChild(t),t.innerHTML="

"+OrgChart.loc.ppdfCmdTitle+'

 
';var e=document.createElement("div");e.id="bg-ppdf-wrapper",Object.assign(e.style,{"overflow-y":"scroll",position:"absolute",top:0,left:"270px","background-color":"#eee",width:r.width()-270+"px",height:"100%"}),r.element.appendChild(e),e.innerHTML='
';var a,n,o,l=r.element.querySelector("#bg-ppdf-size"),s=r.element.querySelector("#bg-ppdf-layout"),h=r.element.querySelector("#bg-ppdf-scale"),d=r.element.querySelector("#bg-ppdf-margin"),c=r.element.querySelector("#bg-ppdf-header"),g=r.element.querySelector("#bg-ppdf-footer");l.value=i.format,s.value=i.landscape,h.value=i.scale,d.value=i.margin,c.value=i.header,g.value=i.footer,OrgChart.anim(r.element.querySelector("#bg-ppdf-btns"),{margin:[0,0,0,-250]},{margin:[0,0,0,0]},300,OrgChart.anim.outSin,function(){r.exportPDF(i,OrgChart.pdfPrevUI._handler)}),r.element.querySelector("#bg-prev-cancel").addEventListener("click",function(){OrgChart.pdfPrevUI.hide(r)}),r.element.querySelector("#bg-prev-save").addEventListener("click",function(){r.exportPDF(i),OrgChart.pdfPrevUI.hide(r)}),OrgChart.pdfPrevUI._showHide(l,s,h),l.addEventListener("change",function(){OrgChart.anim(r.element.querySelector("#bg-ppdf-content"),{opacity:1},{opacity:0},300,OrgChart.anim.inSin,function(){r.element.querySelector("#bg-ppdf-content").innerHTML="",i.format=l.value,r.exportPDF(i,OrgChart.pdfPrevUI._handler),OrgChart.pdfPrevUI._showHide(l,s,h)})}),s.addEventListener("change",function(){OrgChart.anim(r.element.querySelector("#bg-ppdf-content"),{opacity:1},{opacity:0},300,OrgChart.anim.inSin,function(){r.element.querySelector("#bg-ppdf-content").innerHTML="",i.landscape="true"==s.value,r.exportPDF(i,OrgChart.pdfPrevUI._handler),OrgChart.pdfPrevUI._showHide(l,s,h)})}),h.addEventListener("change",function(){OrgChart.anim(r.element.querySelector("#bg-ppdf-content"),{opacity:1},{opacity:0},300,OrgChart.anim.inSin,function(){r.element.querySelector("#bg-ppdf-content").innerHTML="",i.scale=h.value,r.exportPDF(i,OrgChart.pdfPrevUI._handler),OrgChart.pdfPrevUI._showHide(l,s,h)})}),d.addEventListener("keyup",function(){clearTimeout(a),a=setTimeout(function(){OrgChart.anim(r.element.querySelector("#bg-ppdf-content"),{opacity:1},{opacity:0},300,OrgChart.anim.inSin,function(){r.element.querySelector("#bg-ppdf-content").innerHTML="";var t=d.value.split(",");if(4==t.length){for(var e=0;e';return a&&(s+='
'+a+"
"),s+=t,n&&(s+='"),s+="",s+=""},OrgChart.pdfPrevUI.hide=function(e){var r=e.element.querySelector("#bg-ppdf-wrapper");r&&OrgChart.anim(r,{opacity:1},{opacity:0},300,OrgChart.anim.inSin,function(){r.parentNode.removeChild(r);var t=e.element.querySelector("#bg-ppdf-btns");OrgChart.anim(t,{margin:[0,0,0,0]},{margin:[0,0,0,-280]},300,OrgChart.anim.inSin,function(){t.parentNode.removeChild(t)})})},void 0===OrgChart&&(OrgChart={}),OrgChart.events.on("renderdefs",function(t,e){for(var r=0;r'.replace("{from}",d.id).replace("{to}",c.id)+k.link.replaceAll("{d}","M{a.x},{a.y} C{a.x},{a.y} {c.x},{c.y} {b.x},{b.y}").replaceAll("{b.x}",C.x).replaceAll("{b.y}",C.y).replaceAll("{a.x}",m.x).replaceAll("{a.y}",m.y).replaceAll("{c.x}",w.x).replaceAll("{c.y}",w.y);var S=(r=m,a=w,void 0,n=((i=C).x-r.x)/2+r.x,o=(i.y-r.y)/2+r.y,{x:(n-a.x)/2+a.x,y:(o-a.y)/2+a.y});h.label&&(l+=k.label.replace("{x}",S.x).replace("{y}",S.y).replace("{val}",h.label)),l+=OrgChart.grCloseTag}function I(t,e,r){null==r&&(r=1);var i=e.x-t.x,a=e.y-t.y,n=Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))/3;return n=n/(Math.sqrt(i*i+a*a)*r)*OrgChart.CLINK_CURVE,{x:t.x+i/2-a*n,y:t.y+a/2+i*n}}}e.content+=l},OrgChart.prototype.addClink=function(t,e,r,i){return this.removeClink(t,e),this.config.clinks.push({from:t,to:e,label:r,template:i}),this},OrgChart.prototype.removeClink=function(t,e){for(var r=this.config.clinks.length-1;0<=r;r--){var i=this.config.clinks[r];i.from==t&&i.to==e&&this.config.clinks.splice(r,1)}return this},OrgChart.clinkTemplates={},OrgChart.clinkTemplates.orange={defs:' ',link:'',label:'{val}'},OrgChart.clinkTemplates.blue={defs:' ',link:'',label:'{val}'},OrgChart.clinkTemplates.yellow={defs:' ',link:'',label:'{val}'},void 0===OrgChart&&(OrgChart={}),OrgChart.events.on("renderdefs",function(t,e){for(var r=0;rt.x&&(n="right");break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:case OrgChart.orientation.right:case OrgChart.orientation.right_top:n="top",e.y>t.y&&(n="bottom")}var s=OrgChart.t(t.templateName,t.min,A),h=l.levelSeparation;(t.parent&&t.parent.layout==OrgChart.mixed||t.parent&&t.parent.layout==OrgChart.tree)&&(h=l.mixedHierarchyNodesSeparation);var d={p:t.x+t.w/2+s.expandCollapseSize,q:t.y,r:t.x+t.w/2+s.expandCollapseSize,s:E.minY+h};if(t.level==e.level)switch(a=e,l.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:i.push([d.p,d.q]),i.push([d.p,d.q-h/3]),s=OrgChart.t(a.templateName,a.min,A),i.push([a.x+a.w/2+s.expandCollapseSize,i[i.length-1][1]]),i.push([i[i.length-1][0],a.y]);break;case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:d.q=t.y+t.h,d.s=E.maxY-h,i.push([d.p,d.q]),i.push([d.r,t.y+t.h+h/3]),s=OrgChart.t(a.templateName,a.min,A),i.push([a.x+a.w/2+s.expandCollapseSize,i[i.length-1][1]]),i.push([i[i.length-1][0],a.y+a.h]);break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:d.p=t.x,d.q=t.y+t.h/2+s.expandCollapseSize,d.r=E.minX-h,d.s=t.y+t.h/2+s.expandCollapseSize,i.push([d.p,d.q]),i.push([t.x-h/3,d.q]),s=OrgChart.t(a.templateName,a.min,A),i.push([i[i.length-1][0],a.y+a.h/2+s.expandCollapseSize]),i.push([a.x,i[i.length-1][1]]);break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:d.p=t.x+t.w,d.q=t.y+t.h/2+s.expandCollapseSize,d.r=E.maxX+h,d.s=t.y+t.h/2+s.expandCollapseSize,i.push([d.p,d.q]),i.push([t.x+t.w+h/3,d.q]),s=OrgChart.t(a.templateName,a.min,A),i.push([i[i.length-1][0],a.y+a.h/2+s.expandCollapseSize]),i.push([a.x+a.w,i[i.length-1][1]])}else{switch(l.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:i.push([d.p,d.q]),i.push([d.r,t.y-h/3]);break;case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:d.q=t.y+t.h,d.s=E.maxY-h,i.push([d.p,d.q]),i.push([d.r,t.y+t.h+h/3]);break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:d.p=t.x,d.q=t.y+t.h/2+s.expandCollapseSize,d.r=E.minX-h,d.s=t.y+t.h/2+s.expandCollapseSize,i.push([d.p,d.q]),i.push([t.x-h/3,d.q]);break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:d.p=t.x+t.w,d.q=t.y+t.h/2+s.expandCollapseSize,d.r=E.maxX+h,d.s=t.y+t.h/2+s.expandCollapseSize,i.push([d.p,d.q]),i.push([t.x+t.w+h/3,d.q])}for(var c=t;null==a;){var g=!1,p=c.parent,f=p.leftNeighbor,u=p.rightNeighbor;if(p.id==e.id?a=p:OrgChart._intersects(p,d,S.config)&&(d=OrgChart._addPoint(p,i,S.config,d,n),g=!0),p.id!=e.id){for(;f;){if(f.id==e.id){a=f;break}OrgChart._intersects(f,d,S.config)&&(d=OrgChart._addPoint(f,i,S.config,d,n),g=!0),f=f.leftNeighbor}for(;u;){if(u.id==e.id){a=u;break}OrgChart._intersects(u,d,S.config)&&(d=OrgChart._addPoint(u,i,S.config,d,n),g=!0),u=u.rightNeighbor}}if(!g){var m=i[i.length-1][0],C=0;if(p.parent)switch(h=l.levelSeparation,p.parent.layout!=OrgChart.mixed&&p.parent.layout!=OrgChart.tree||(h=l.mixedHierarchyNodesSeparation),l.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:C=p.parent.y+p.parent.h+h*(2/3);break;case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:C=p.parent.y-h*(2/3);break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:m=p.parent.x+p.parent.w+h*(2/3),C=i[i.length-1][1];break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:m=p.parent.x-h*(2/3),C=i[i.length-1][1]}i.push([m,C])}c=p}switch(s=OrgChart.t(a.templateName,a.min,A),i.splice(i.length-1,1),l.orientation){case OrgChart.orientation.top:case OrgChart.orientation.top_left:i.push([a.x+a.w/2+s.expandCollapseSize,i[i.length-1][1]]),i.push([i[i.length-1][0],a.y+a.h]);break;case OrgChart.orientation.bottom:case OrgChart.orientation.bottom_left:i.push([a.x+a.w/2+s.expandCollapseSize,i[i.length-1][1]]),i.push([i[i.length-1][0],a.y]);break;case OrgChart.orientation.left:case OrgChart.orientation.left_top:i.push([i[i.length-1][0],a.y+a.h/2+s.expandCollapseSize]),i.push([a.x+a.w,i[i.length-1][1]]);break;case OrgChart.orientation.right:case OrgChart.orientation.right_top:i.push([i[i.length-1][0],a.y+a.h/2+s.expandCollapseSize]),i.push([a.x,i[i.length-1][1]])}}var y=L.template;y||(y="orange");var x=null;switch((s=OrgChart.slinkTemplates[y]).labelPosition){case"start":x={x:i[1][0],y:i[1][1]};break;case"middle":var O=Math.ceil(i.length/2);x=function(t,e){return{x:(t[0]+e[0])/2,y:(t[1]+e[1])/2}}(i[O],i[O-1]);break;case"end":x={x:i[i.length-2][0],y:i[i.length-2][1]}}r&&(i=i.reverse()),i[0]="M"+i[0].join(",");for(var v=1;v=a.level?e(i,a,!1):e(a,i,!0)}}t.content+=I},OrgChart.prototype.addSlink=function(t,e,r,i){return this.removeClink(t,e),this.config.slinks.push({from:t,to:e,label:r,template:i}),this},OrgChart.prototype.removeSlink=function(t,e){for(var r=this.config.slinks.length-1;0<=r;r--){var i=this.config.slinks[r];i.from==t&&i.to==e&&this.config.slinks.splice(r,1)}return this},OrgChart.slinkTemplates={},OrgChart.slinkTemplates.orange={defs:' ',link:'',label:'{val}',labelPosition:"middle"},OrgChart.slinkTemplates.blue={defs:' ',link:'',label:'{val}',labelPosition:"middle"},OrgChart.slinkTemplates.yellow={defs:' ',link:'',label:'{val}',labelPosition:"middle"},OrgChart.events.on("redraw",function(t,e){if(t.config.miniMap){var r=OrgChart.miniMap._getCanvas(t),a=r.getContext("2d");r.width=r.width,r.height=r.height;var i=t.response.boundary.maxX-t.response.boundary.minX,n=t.response.boundary.maxY-t.response.boundary.minY,o=Math.min(r.width/i,r.height/n),l=(r.width-i*o)/2,s=(r.height-n*o)/2;a.clearRect(0,0,r.width,r.height),a.translate(-t.response.boundary.minX*o+l,-t.response.boundary.minY*o+s),a.scale(o,o);var h=0,d=[];!function t(e,r){if(Array.isArray(r))for(var i=0;ie.__score?-1:0}),o},OrgChart._search.addNodeToResult=function(t,e,r,i,a,n){var o={};o.id=r.id,OrgChart.isNullOrEmpty(r[n])||(o[n]=r[n]);for(var l=0;ln[d].start){h=0;break}}var c=0;0!=l&&(c=l/o);var g=0e.start?1:0});var u=e;for(d=n.length-1;0<=d;d--)u=(u=u.insert(n[d].start+n[d].length,"
")).insert(n[d].start,"");return{__searchMarks:u,__score:f}},OrgChart._search.searchIndexesOf=function(t,e){var l=[];if(!OrgChart.isNullOrEmpty(t))for(var r=0;re.length?-1:t.starte.start?1:0}),l=l.filter(function(t){for(var e=!1,r=0;r, retrieveFields: Array) : void; -} \ No newline at end of file +}export default OrgChart \ No newline at end of file