PageSourceSearch

https://mof.gov.eg/static/js/30.efdb4627.chunk.js

js mof.gov.eg collected 2026-10-02 06:48:44 UTC 239,885 bytes, 2 lines download raw bytes

1(this["webpackJsonpmof-portal"]=this["webpackJsonpmof-portal"]||[]).push([[30],{690:function(e,t,i){"use strict";var n=function(e,t){var i=this;if(this.element=e,this.config={lazyLoading:!0,enableDragDrop:!1,enableSearch:!0,enableTouch:!1,miniMap:!1,nodeMenu:null,nodeContextMenu:null,menu:null,toolbar:!1,sticky:!0,nodeMouseClick:n.action.details,nodeMouseDbClick:n.none,mouseScrool:n.action.zoom,showXScroll:n.none,showYScroll:n.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:n.orientation.top,layout:n.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://balkangraph.com/export",collapse:{},expand:{},align:n.CENTER,UI:null,anim:{func:n.anim.outPow,duration:200},zoom:{speed:120,smooth:12},roots:null,state:null},t)for(var r in this.config)"object"!=typeof t[r]||Array.isArray(t[r])?void 0!==t[r]&&(this.config[r]=t[r]):this.config[r]=n._mergeObject(this.config[r],t[r]);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 o in this.config.tags){var a=this.config.tags[o];null!=a.subTreeConfig&&(this._layoutConfigs[o]={orientation:null!=a.subTreeConfig.orientation?a.subTreeConfig.orientation:this.config.orientation,levelSeparation:null!=a.subTreeConfig.levelSeparation?a.subTreeConfig.levelSeparation:this.config.levelSeparation,mixedHierarchyNodesSeparation:null!=a.subTreeConfig.mixedHierarchyNodesSeparation?a.subTreeConfig.mixedHierarchyNodesSeparation:this.config.mixedHierarchyNodesSeparation,assistantSeparation:null!=a.subTreeConfig.assistantSeparation?a.subTreeConfig.assistantSeparation:this.config.assistantSeparation,subtreeSeparation:null!=a.subTreeConfig.subtreeSeparation?a.subTreeConfig.subtreeSeparation:this.config.subtreeSeparation,siblingSeparation:null!=a.subTreeConfig.siblingSeparation?a.subTreeConfig.siblingSeparation:this.config.siblingSeparation,layout:null!=a.subTreeConfig.layout?a.subTreeConfig.layout:this.config.layout,columns:null!=a.subTreeConfig.columns?a.subTreeConfig.columns:this.config.columns,collapse:null!=a.subTreeConfig.collapse?a.subTreeConfig.collapse:this.config.collapse,partnerNodeSeparation:null!=a.subTreeConfig.partnerNodeSeparation?a.subTreeConfig.partnerNodeSeparation:this.config.partnerNodeSeparation})}if(this._event_id=n._guid(),!this.config.searchFields.length&&this.config.nodeBinding)for(var l in this.config.nodeBinding)-1==l.indexOf("img")&&"function"!=typeof this.config.nodeBinding[l]&&this.config.searchFields.push(this.config.nodeBinding[l]);n._validateConfig(this.config)&&(this.server=null,this._vScroll={},this.config.ui||(this.ui=n.ui),this.config.editUI?this.editUI=this.config.editUI:this.editUI=new n.editUI,this.editUI.init(this),null===this.server&&(this.server=new n.server(this.config,this._layoutConfigs)),this.config.searchUI?this.searchUI=this.config.searchUI:this.searchUI=new n.searchUI,this.searchUI.init(this),this.config.nodeMenuUI?this.nodeMenuUI=this.config.nodeMenuUI:this.nodeMenuUI=new n.menuUI,this.nodeMenuUI.init(this,this.config.nodeMenu),this.config.nodeContextMenuUI?this.nodeContextMenuUI=this.config.nodeContextMenuUI:this.nodeContextMenuUI=new n.menuUI,this.nodeContextMenuUI.init(this,this.config.nodeContextMenu),this.config.toolbarUI?this.toolbarUI=this.config.toolbarUI:this.toolbarUI=new n.toolbarUI,this.config.notifierUI?this.notifierUI=this.config.notifierUI:this.notifierUI=new n.notifierUI,this.notifierUI.init(this),this.config.menuUI?this.menuUI=this.config.menuUI:this.menuUI=new n.menu
1UI,this.menuUI.init(this,this.config.menu),this.config.xScrollUI||(this.xScrollUI=new n.xScrollUI(this.element,this.config,function(){return{boundary:i.response.boundary,scale:i.getScale(),viewBox:i.getViewBox(),padding:i.config.padding}},function(e){i.setViewBox(e)},function(){i._draw(!0,n.action.xScroll)})),this.config.yScrollUI||(this.yScrollUI=new n.yScrollUI(this.element,this.config,function(){return{boundary:i.response.boundary,scale:i.getScale(),viewBox:i.getViewBox(),padding:i.config.padding}},function(e){i.setViewBox(e)},function(){i._draw(!0,n.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(),0<this.config.nodes.length&&this._draw(!1,n.action.init))};n.prototype.load=function(e){return this.config.nodes=e,this._draw(!1,n.action.init),this},n.prototype.loadXML=function(e){var t=n._xml2json(e);this.load(t)},n.prototype.getXML=function(){return n._json2xml(this.config.nodes)},n.prototype.on=function(e,t){return n.events.on(e,t,this._event_id),this},n.prototype.draw=function(e,t,i){null==e&&(e=n.action.update),this._draw(!1,e,t,i)},n.prototype._draw=function(e,t,i,r){var o=this;this._hideBeforeAnimationCompleted=!1;var a=t==n.action.init?null:this.getViewBox();this.server.read(e,this.width(),this.height(),a,t,i,function(e){t!=n.action.exporting&&(o.nodes=e.nodes,o.visibleNodeIds=e.visibleNodeIds,o.roots=e.roots),o.editUI.fields=e.allFields;var a={defs:""};n.events.publish("renderdefs",[o,a]);var l=o.ui.defs(a.defs),s=o.getScale(e.viewBox);l+=o.ui.pointer(o.config,t,s);var d=o.getViewBox(),c=e.viewBox;a={content:l,res:e},n.events.publish("prerender",[o,a]),l=a.content;for(var p=0;p<e.visibleNodeIds.length;p++){var h=e.nodes[e.visibleNodeIds[p]],f=o._get(h.id);l+=o.ui.node(h,f,e.animations,o.config,void 0,void 0,void 0,t,s,o)}for(p=0;p<e.visibleNodeIds.length;p++)h=e.nodes[e.visibleNodeIds[p]],f=o._get(h.id),l+=o.ui.link(h,o,s,e.bordersByRootIdAndLevel,e.nodes),l+=o.ui.expandCollapseBtn(o,h,o._layoutConfigs,t,s);if(a={content:l,res:e},n.events.publish("render",[o,a]),l=a.content,l+=o.ui.lonely(o.config),t!==n.action.exporting){if(t!==n.action.centerNode&&t!==n.action.insert&&t!==n.action.expand&&t!==n.action.collapse&&t!==n.action.update||(c=d),t===n.action.init&&null!=d&&(c=d),o.response=e,w=o.ui.svg(o.width(),o.height(),c,o.config,l),o._initialized){var u=o.getSvg(),g=u.parentNode;g.removeChild(u),g.insertAdjacentHTML("afterbegin",w),o._attachEventHandlers(),o.xScrollUI.addListener(o.getSvg()),o.yScrollUI.addListener(o.getSvg()),o.xScrollUI.setPosition(),o.yScrollUI.setPosition()}else o.element.innerHTML=o.ui.css()+o.ui.exportMenuButton(o.config)+w,o._attachInitEventHandlers(),o._attachEventHandlers(),o.xScrollUI.create(o.width(),o.config.padding),o.xScrollUI.setPosition(),o.xScrollUI.addListener(o.getSvg()),o.yScrollUI.create(o.height(),o.config.padding),o.yScrollUI.setPosition(),o.yScrollUI.addListener(o.getSvg()),o.config.enableSearch&&o.searchUI.addSearchControl(),o.toolbarUI.init(o,o.config.toolbar);var m=!1;o.notifierUI.show(e.notif);var y=o.response.animations;if(0<y[0].length){for(o._hideBeforeAnimation(y[0].length),p=0;p<y[0].length;p++)y[0][p]=o.getNodeElement(y[0][p]);n.anim(y[0],y[1],y[2],o.config.anim.duration,o.config.anim.func,function(){m||(r&&r(),n.events.publish("redraw",[o]),o._showAfterAnimation(),m=!0)})}t===n.action.centerNode?n.anim(o.getSvg(),{viewbox:d},{viewbox:o.response.viewBox},o.config.anim.duration,o.config.anim.func,function(){o.ripple(i.options.rippleId),m||(r&&r(),n.events.publish("redraw",[o]),o._showAfterAnimation(),m=!0)},function(){o.xScrollUI.setPosition(),o.yScrollUI.setPosition()}):!d||!o.response||d[0]==o.response.viewBox[0]&&d[1]==o.response.viewBox[1]&&d[2]==o.response.viewBox[2]&&d[3]==o.response.viewBox[3]||t!==n.action.insert&&t!==n.action.expand&&t!==n.action.collapse&&t!==n.action.update&&t!==n.action.init?0==y[0].length&&(m||(r&&r(),n.events.publish("redraw",[o]),m=!0)):n.anim(o.getSvg(),{viewbox:d},{viewbox:o.response.viewBox},500,n.anim.inOutPow,function(){o.xScrollUI.setPosition(),o.yScrollUI.setPosition(),m||(r&&r(),n.events.publish("redraw",[o]),m=!0)}),o._initialized||(o._initialized=!0,n.events.publish("init",[o]))}else{var x=e.boundary,v=x.maxX-x.minX,b=x.maxY-x.minY,w=o.ui.svg(v,b,[x.minX,x.minY,v,b],o.config,l,s);r(w)}},function(e){n.events.publish("ready",[o,e])})}
1,n.prototype._setInitialSizeIfNotSet=function(){this.element.style.overflow="hidden",this.element.style.position="relative",0==this.element.offsetHeight&&(this.element.style.height="100%",0==this.element.offsetHeight&&(this.element.style.height="700px")),0==this.element.offsetWidth&&(this.element.style.width="100%",0==this.element.offsetWidth&&(this.element.style.width="700px"))},n.prototype.getViewBox=function(){var e=this.getSvg();return n._getViewBox(e)},n.prototype.setViewBox=function(e){this.getSvg().setAttribute("viewBox",e.toString())},n.prototype.width=function(){return this.element.offsetWidth},n.prototype.height=function(){return this.element.offsetHeight},n.prototype.getScale=function(e){return e||(e=this.getViewBox()),n.getScale(e,this.width(),this.height(),this.config.scaleInitial,this.config.scaleMax,this.config.scaleMin)},n.prototype.ripple=function(e,t,i){var r=this.getNode(e);if(null!=r){var o=this.getNodeElement(e);if(null!=o){var a=this.getScale(),l=r.w/2,s=r.h/2;if(void 0!==t&&void 0!==i){var d=o.getBoundingClientRect();l=t/a-d.left/a,s=i/a-d.top/a}var c=r.w,p=r.h,h=l<c-l?c-l:l,f=s<p-s?p-s:s,u=f<h?h:f,g=document.createElementNS("http://www.w3.org/2000/svg","g"),m=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),y=document.createElementNS("http://www.w3.org/2000/svg","rect"),x=document.createElementNS("http://www.w3.org/2000/svg","circle"),v=n.randomId();m.setAttribute("id",v);var b={ripple:n.t(r.templateName,r.min,this.getScale()).ripple,node:r};n.events.publish("ripple",[this,b]),y.setAttribute("x",b.ripple.rect?b.ripple.rect.x:0),y.setAttribute("y",b.ripple.rect?b.ripple.rect.y:0),y.setAttribute("width",b.ripple.rect?b.ripple.rect.width:r.w),y.setAttribute("height",b.ripple.rect?b.ripple.rect.height:r.h),y.setAttribute("rx",b.ripple.radius),y.setAttribute("ry",b.ripple.radius),x.setAttribute("clip-path","url(#"+v+")"),x.setAttribute("cx",l),x.setAttribute("cy",s),x.setAttribute("r",0),x.setAttribute("fill",b.ripple.color),x.setAttribute("class","ripple"),m.appendChild(y),g.appendChild(m),g.appendChild(x),o.appendChild(g),n.anim(x,{r:0,opacity:1},{r:u,opacity:0},500,n.anim.outPow,function(){o.removeChild(g)})}}},n.prototype.center=function(e,t,i){var r,o,a=e,l=!0,s=!0;t&&null!=t.parentState&&(r=t.parentState),t&&null!=t.childrenState&&(o=t.childrenState),t&&null!=t.rippleId&&(a=t.rippleId),t&&null!=t.vertical&&(l=t.vertical),t&&null!=t.horizontal&&(s=t.horizontal);var d={parentState:r,childrenState:o,rippleId:a,vertical:l,horizontal:s};this._draw(!1,n.action.centerNode,{id:e,options:d},i)},n.prototype.fit=function(e){this.config.scaleInitial=n.match.boundary,this._draw(!0,n.action.init,void 0,e)},n.prototype.toggleFullScreen=function(){var e=document.querySelector("[data-tlbr='fullScreen']");document.fullscreenElement==this.element||document.webkitFullscreenElement==this.element||document.mozFullScreenElement==this.element||document.msFullscreenElement==this.element?(document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen(),e&&(e.innerHTML=n.toolbarUI.openFullScreenIcon)):(this.element.requestFullscreen?this.element.requestFullscreen():this.element.mozRequestFullScreen?this.element.mozRequestFullScreen():this.element.webkitRequestFullscreen?this.element.webkitRequestFullscreen():this.element.msRequestFullscreen&&this.element.msRequestFullscreen(),e&&(e.innerHTML=n.toolbarUI.closeFullScreenIcon))},n.prototype.getNode=function(e){return this.nodes[e]},n.prototype.setLayout=function(e,t){t||(t="base"),this._layoutConfigs[t].layout=e,this._draw(!1,n.action.update)},n.prototype.setOrientation=function(e,t){t||(t="base"),this._layoutConfigs[t].orientation=e,this._draw(!1,n.action.update)},n.prototype.find=function(e){return this.search(e)},n.prototype.search=function(e,t,i){return n.isNullOrEmpty(t)&&(t=this.config.searchFields),n.isNullOrEmpty(i)&&(i=t),n._search.search(this.config.nodes,e,t,i,this.config.searchDisplayField,this.config.searchFieldsWeight)},n.prototype._hideBeforeAnimation=function(e){if(1!=this._hideBeforeAnimationCompleted&&!(e&&e<n.ANIM_THRESHOLD)){var t=this.element.getElementsByTagName("text");if(t.length>n.TEXT_THRESHOLD)for(var i=0;i<t.length;i++)t[i].style.display="none";var r=this.element.getElementsByTagName("image");if(r.length>n.IMAGES_THRESHOLD)for(i=0;i<r.length;i++)r[i].style.display="none";var o=this.element.querySelectorAll("[link-id]");if(o.length>n.LINKS_THRESHOLD)for(i=0;i<o.length;i++)o[i].style.display="none";var a=this.element.querySelectorAll("[control-expcoll-id]");if(a.length>n.EXPCOLL_THRESHOLD)for(i=0;i<a.length;i++)a[i].style.display="none";this._hideBeforeAnimationCompleted=!0}},n.prototype._showAfterAnimation=function(){for(var e=this.element.getElementsByTagName("text"),t=0;t<e.length;t++)e[t].style.display="";var i=this.element.getElementsByTagName("image");for(t=0;t<i.length;t++)i[t].style.display="";var n=this.element.querySelectorAll("[link-id]");for(t=0;t<n.length;t++)n[t].style.display="";var r=this.element.querySelectorAll("[control-expcoll-id]");for(t=0;t<r.length;t++)r[t].style.display="";this._hideBeforeAnimationCompleted=!1},n.prototype.isChild=function(e,t){for(var i=this.getNode(t);i;){if(i.id==e)return!0;
1i=i.parent?i.parent:i.stParent}return!1},n.prototype.getCollapsedIds=function(e){for(var t=[],i=0;i<e.childrenIds.length;i++){var n=this.getNode(e.childrenIds[i]);1==n.collapsed&&t.push(n.id)}return t},n.prototype.stateToUrl=function(){if(this.server.state){var e={};return e.exp=this.server.state.exp.join("*"),e.min=this.server.state.min.join("*"),e.adjustify=this.server.state.adjustify.x+"*"+this.server.state.adjustify.y,e.scale=this.server.state.scale,e.y=this.server.state.x,e.x=this.server.state.y,new URLSearchParams(e).toString()}return""},n.prototype.generateId=function(){for(;;){var e="_"+("0000"+(Math.random()*Math.pow(36,4)|0).toString(36)).slice(-4);if(!this.nodes.hasOwnProperty(e))return this.nodes[e]=!0,e}},n.prototype.destroy=function(){this._removeEvent(window,"resize"),n.events.removeForEventId(this._event_id),this.element.innerHTML=null},n.localStorage={},n.localStorage.getItem=function(e){return localStorage.getItem(e)},n.localStorage.setItem=function(e,t){try{localStorage.setItem(e,t)}catch(e){e.code==e.QUOTA_EXCEEDED_ERR?(console.warn("Local storage quota exceeded"),localStorage.clear()):(console.error("Local storage error code:"+e.code),console.error(e))}},n.prototype._canUpdateLink=function(e,t){if(null==t||null==t)return!1;if(null==e||null==e)return!1;if(e==t)return!1;var i=this.getNode(t),n=this.getNode(e);return!(i&&n&&(i.isAssistant||i.isPartner||i.hasPartners&&n.isAssistant||i.hasAssistants&&n.isPartner))&&!this.isChild(e,t)},n.prototype.updateNode=function(e,t,i){var r=this,o=this.get(e.id);if(!0===i&&!1===n.events.publish("update",[this,o,e]))return!1;this.update(e);var a=e.pid;null==a&&(a=e.stpid),this._draw(!1,n.action.update,{id:a},function(){r.ripple(e.id),t&&t(),n.events.publish("updated",[r,o,e])})},n.prototype.update=function(e){for(var t=0;t<this.config.nodes.length;t++)if(this.config.nodes[t].id==e.id){this.config.nodes[t]=e;break}return this},n.prototype.removeNode=function(e,t,i){var r=this,o=this._getNewPidsAndStpidsForIds(e);return(!0!==i||!1!==n.events.publish("remove",[this,e,o]))&&(this.remove(e),this._draw(!1,n.action.update,null,function(){r.config.sticky&&n._moveToBoundaryArea(r.getSvg(),r.getViewBox(),r.response.boundary),t&&t(),n.events.publish("removed",[r,e,o])}),!0)},n.prototype.remove=function(e){var t=this.get(e);if(t)for(var i=this.config.nodes.length-1;0<=i;i--)this.config.nodes[i].pid!=e&&this.config.nodes[i].stpid!=e||(this.config.nodes[i].pid=t.pid,this.config.nodes[i].stpid=t.stpid),this.config.nodes[i].id==e&&this.config.nodes.splice(i,1);return this},n.prototype._getNewPidsAndStpidsForIds=function(e){var t=this.get(e),i={},n={};if(t)for(var r=this.config.nodes.length-1;0<=r;r--)this.config.nodes[r].pid==e?i[this.config.nodes[r].id]=t.pid:this.config.nodes[r].stpid==e&&(n[this.config.nodes[r].id]=t.stpid);return{newPidsForIds:i,newStpidsForIds:n}},n.prototype.addNode=function(e,t,i){var r=this;if(!0===i&&!1===n.events.publish("add",[this,e]))return!1;this.add(e),r._draw(!1,n.action.insert,{id:e.pid,insertedNodeId:e.id},function(){r.ripple(e.id),t&&t(),n.events.publish("added",[r,e.id])}),n.events.publish("adding",[r,e.id])},n.prototype.add=function(e){return null==e.id&&console.error("Call addNode without id"),this.config.nodes.push(e),this},n.prototype._get=function(e){for(var t=0;t<this.config.nodes.length;t++)if(this.config.nodes[t].id==e)return this.config.nodes[t];return null},n.prototype.get=function(e){for(var t=0;t<this.config.nodes.length;t++)if(this.config.nodes[t].id==e)return JSON.parse(JSON.stringify(this.config.nodes[t]));return null},void 0===n&&(n={}),n._ajax=function(e,t,i,n,r){null==n&&(n="arraybuffer");var o=new XMLHttpRequest;o.onload=function(e){4==o.readyState&&200===this.status&&r(e.target.response)},o.onerror=function(e){r({error:e})},o.open(t,e),o.responseType=n,o.setRequestHeader("Content-Type","application/json"),null==i?o.send():o.send(i)},void 0===n&&(n={}),n.anim=function(e,t,i,r,o,a,l){var s,d=1,c=r/10+1;return document.getElementsByTagName("g"),Array.isArray(e)||(e=[e]),Array.isArray(t)||(t=[t]),Array.isArray(i)||(i=[i]),s=setInterval(function(){for(var p=0;p<e.length;p++)for(var h in i[p]){var f=n._arrayContains(["top","left","right","bottom","width","height"],h.toLowerCase())?"px":"";switch(h.toLowerCase()){case"d":var u=o((10*d-10)/r)*(i[p][h][0]-t[p][h][0])+t[p][h][0],g=o((10*d-10)/r)*(i[p][h][1]-t[p][h][1])+t[p][h][1];e[p].setAttribute("d",e[p].getAttribute("d")+" L"+u+" "+g);break;case"r":var m=o((10*d-10)/r)*(i[p][h]-t[p][h])+t[p][h];e[p].setAttribute("r",m);break;case"rotate3d":if(i[p][h]){var y=t[p][h],x=i[p][h],v=[0,0,0,0];for(var b in y)v[b]=o((10*d-10)/r)*(x[b]-y[b])+y[b];e[p].style.transform="rotate3d("+v.toString()+"deg)"}break;case"transform":if(i[p][h]){for(var b in y=t[p][h],x=i[p][h],v=[0,0,0,0,0,0],y)v[b]=o((10*d-10)/r)*(x[b]-y[b])+y[b];e[p].hasAttribute("transform")?e[p].setAttribute("transform","matrix("+v.toString()+")"):e[p].style.transform="matrix("+v.toString()+")"}break;case"viewbox":if(i[p][h]){for(var b in y=t[p][h],x=i[p][h],v=[0,0,0,0],y)v[b]=o((10*d-10)/r)*(x[b]-y[b])+y[b];e[p].setAttribute("viewBox",v.toString())}break;case"margin":if(i[p][h]){for(var b in y=t[p][h],x=i[p][h],v=[0,0,0,0],y)v[b]=o((10*d-10)/r)*(x[b]-y[b])+y[b];var w="";for(b=0;b<v.length;b++)w+=parseInt(v[b])+"px ";e[p]&&e[p].style&&(e[p].style[h]=w)}break;case"scrolly":m=o((10*d-10)/r)*(i[p][h]-t[p][h])+t[p][h],e[p].scrollTo(0,m);break;default:m=o((10*d-10)/r)*(i[p][h]-t[p][h])+t[p][h],e[p]&&e[p].style&&(e[p].style[h]=m+f)}}l&&l(),1+c<(d+=1)&&(clearInterval(s),a&&a(e))},10)},n.anim.inPow=function(e){return e<0?0:1<e?1:Math.pow(e,2)},n.anim.outPow=function(e){return e<0?0:1<e?1:-1*(Math.pow(e-1,2)+-1)},n.anim.inOutPow=function(e){return e<0?0:1<e?1:(e*=2)<1?n.anim.inPow(e,2)/2:-.5*(Math.pow(e-2,2)+-2)},n.anim.inSin=function(e){return e<0?0:1<e?1:1-Math.cos(e*(Math.PI/2))},n.anim.outSin=function(e){return e<0?0:1<e?1:Math.sin(e*(Math.PI/2))},n.anim.inOutSin=function(e){return e<0?0:1<e?1:-.5*(Math.cos(Math.PI*e)-1)},n.anim.inExp=function(e){return e<0?0:1<e?1:Math.pow(2,10*(e-1))},n.anim.outExp=function(e){return e<0?0:1<e?1:1-Math.pow(2,-10*e)},n.anim.inOutExp=function(e){return e<0?0:1<e?1:e<.5?.5*Math.pow(2,10*(2*e-1)):.5*(2-Math.pow(2,10*(-2*e+1)))},n.anim.inCirc=function(e){return e<0?0:1<e?1:-(Math.sqrt(1-e*e)-1)},n.anim.outCirc=function(e){return e<0?0:1<e?1:Math.sqrt(1-(e-1)*(e-1))},n.anim.inOutCirc=function(e){return e<0?0:1<e?1:e<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(2*e-2)*(2*e-2))+1)},n.anim.rebound=function(e){return e<0?0:1<e?1:e<1/2.75?1-7.5625*e*e:e<2/2.75?1-(7.5625*(e-1.5/2.75)*(e-1.5/2.75)+.75):e<2.5/2.75?1-(7.5625*(e-2.25/2.75)*(e-2.25/2.75)+.9375
1):1-(7.5625*(e-2.625/2.75)*(e-2.625/2.75)+.984375)},n.anim.inBack=function(e){return e<0?0:1<e?1:e*e*(2.70158*e-1.70158)},n.anim.outBack=function(e){return e<0?0:1<e?1:(e-1)*(e-1)*(2.70158*(e-1)+1.70158)+1},n.anim.inOutBack=function(e){return e<0?0:1<e?1:e<.5?4*e*e*(7.1898*e-2.5949)*.5:.5*((2*e-2)*(2*e-2)*(3.5949*(2*e-2)+2.5949)+2)},n.anim.impulse=function(e){var t=2*e;return t*Math.exp(1-t)},n.anim.expPulse=function(e){return Math.exp(-2*Math.pow(e,2))},void 0===n&&(n={}),n.prototype._attachInitEventHandlers=function(e){this._addEvent(window,"resize",this._resizeHandler)},n.prototype._attachEventHandlers=function(e){e=this.getSvg();var t=/iPad|iPhone|iPod/.test(navigator.platform)||"MacIntel"===navigator.platform&&1<navigator.maxTouchPoints;this.config.enableTouch||t||/Mobi/i.test(navigator.userAgent)||/Android/i.test(navigator.userAgent)?(this._addEvent(e,"touchstart",this._globalMouseDownHandler),this._addEvent(e,"touchend",this._globalClickHandler)):(this._addEvent(e,"mousedown",this._globalMouseDownHandler),this._addEvent(e,"click",this._globalClickHandler),this._addEvent(e,"contextmenu",this._globalContextHandler),this._addEvent(e,"dblclick",this._globalDbClickHandler),this.config.mouseScrool!=n.action.zoom&&this.config.mouseScrool!=n.action.ctrlZoom||(this._addEvent(e,"DOMMouseScroll",this._mouseScrollHandler),this._addEvent(e,"mousewheel",this._mouseScrollHandler)));var i=this.getExportMenuButton();i&&this._addEvent(i,"click",this._exportMenuClickHandler)},n.prototype._addEvent=function(e,t,i,n){var r,o;function a(e){var t=i.apply(this,arguments);return!1===t&&(e.stopPropagation(),e.preventDefault()),t}n||(n=""),e.getListenerList||(e.getListenerList={}),e.getListenerList[t+n]||(r=this,o=i,i=function(){if(o)return o.apply(r,[this,arguments[0]])},e.addEventListener?"mousewheel"==t?e.addEventListener(t,a,{passive:!1}):e.addEventListener(t,a,!1):e.attachEvent("on"+t,function(){var t=i.call(e,window.event);return!1===t&&(window.event.returnValue=!1,window.event.cancelBubble=!0),t}),e.getListenerList[t+n]=a)},n.prototype._removeEvent=function(e,t){if(e.getListenerList[t]){var i=e.getListenerList[t];e.removeEventListener(t,i,!1),delete e.getListenerList[t]}},void 0===n&&(n={}),n.VERSION="7.7.16",n.orientation={},n.orientation.top=0,n.orientation.bottom=1,n.orientation.right=2,n.orientation.left=3,n.orientation.top_left=4,n.orientation.bottom_left=5,n.orientation.right_top=6,n.orientation.left_top=7,n.CENTER=8,n.ORIENTATION=9,n.TEXT_THRESHOLD=250,n.IMAGES_THRESHOLD=70,n.LINKS_THRESHOLD=150,n.EXPCOLL_THRESHOLD=40,n.ANIM_THRESHOLD=50,n.ID="id",n.PID="pid",n.STPID="stpid",n.TAGS="tags",n.NODES="nodes",n.ELASTIC="elastic",n.MAX_DEPTH=200,n.SCALE_FACTOR=1.44,n.LAZY_LOADING_FACTOR=500,n.action={},n.action.expand=0,n.action.collapse=1,n.action.maximize=101,n.action.minimize=102,n.action.expandCollapse=501,n.action.edit=1,n.action.zoom=2,n.action.ctrlZoom=22,n.action.scroll=41,n.action.xScroll=3,n.action.yScroll=4,n.action.none=5,n.action.init=6,n.action.update=7,n.action.pan=8,n.action.centerNode=9,n.action.resize=10,n.action.insert=11,n.action.insertfirst=12,n.action.details=13,n.action.exporting=14,n.none=400001,n.scroll={},n.scroll.visible=1,n.scroll.smooth=12,n.scroll.speed=120,n.scroll.safari={smooth:12,speed:250},n.match={},n.match.height=100001,n.match.width=100002,n.match.boundary=100003,n.COLLAPSE_PARENT_NEIGHBORS=1,n.COLLAPSE_SUB_CHILDRENS=2,n.COLLAPSE_PARENT_SUB_CHILDREN_EXCEPT_CLICKED=3,n.normal=0,n.mixed=1,n.tree=2,n.treeLeftOffset=3,n.treeRightOffset=4,n.nodeOpenTag='<g node-id="{id}" style="opacity: {opacity}" transform="matrix(1,0,0,1,{x},{y})" class="{class}" sl="{sl}" l={level} {lcn}>',n.linkOpenTag='<g link-id="[{id}][{child-id}]" class="{class}">',n.expcollOpenTag='<g control-expcoll-id="{id}" transform="matrix(1,0,0,1,{x},{y})"  style="cursor:pointer;">',n.linkFieldsOpenTag='<g transform="matrix(1,0,0,1,{x},{y}) rotate({rotate})">',n.grCloseTag="</g>",n.IT_IS_LONELY_HERE='<g transform="translate(-100, 0)" style="cursor:pointer;"  control-add="control-add"><text fill="#039be5">{link}</text></g>',n.RES={},n.RES.IT_IS_LONELY_HERE_LINK="It's lonely here, add your first node",n.FIRE_DRAG_NOT_CLICK_IF_MOVE=3,n.STRING_TAGS=!1,n.MAX_NODES_MESS="The trial has expired or 200 nodes limit was reached! <br /><a style='color: #039BE5;' target='_blank' href='https://balkangraph.com/OrgChartJS/Docs/Evaluation'>See more</a>",n.OFFLINE_MESS="The evaluation version requires internet connection! <br /><a style='color: #039BE5;' target='_blank' href='https://balkangraph.com/OrgChartJS/Docs/Evaluation'>See more</a>",n.SEARCH_PLACEHOLDER="Search",n.IMPORT_MESSAGE="Choose the columns (fields) in your data file that contain the required information.",n.FIXED_POSITION_ON_CLICK=!1,n.ADD_NEW_FIELD="Add new field",n.ASSISTANT="Assistant",n.A4w=595,n.A4h=842,n.A3w=842,n.A3h=1191,n.A2w=1191,n.A2h=1684,n.A1w=1684,n.A1h=2384,n.Letterw=612,n.Letterh=791,n.Legalw=612,n.Legalh=1009,n.LINK_ROUNDED_CORNERS=8,n.MOVE_STEP=5,n.MOVE_INTERVAL=25,n.MIXED_LAYOUT_ALL_NODES=!0,n.CLINK_CURVE=1,n.SEARCH_RESULT_LIMIT=10,n.input=function(e,t,i,r,o,a){null==r&&(r=!1);var l=document.createElement("div"),s=document.createElement("div"),d=document.createElement("input"),c=document.createElement("hr"),p=document.createElement("button");if(p.innerHTML="Upload",p.style.position="absolute",p.style.right=0,l.style.margin="14px 14px 7px 14px",l.style.textAlign="left",l.style.position="relative",l.setAttribute("data-field-name",e),c.style.border="1px solid #d7d7d7",c.style.backgroundColor="#d7d7d7",c.style.display="block",c.style.width="100%",s.style.color="#bcbcbc",d.style.border="none",d.style.outline="none",d.style.width="100%",d.setAttribute("val",""),o&&(d.style.width="80%"),d.style.fontSize="16px",d.readOnly=r,null!=t&&null!=t&&(d.value=t),null!=i&&null!=i&&(d.placeholder=i),null!=e&&null!=e&&(s.innerHTML=e),s.setAttribute("lbl",""),d.style.color="#7a7a7a",r||d.addEventListener("focus",function(){var e=this.parentNode.getElementsByTagName("hr")[0];e.style.border="1px solid #039BE5",n.anim(e,{width:10},{width:l.clientWidth},250,n.anim.inOutSin)}),p.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];n.events.publish("imageuploaded",[a,t,e.parentNode.querySelector("input")])},document.body.appendChild(t),t.click()}),d.addEventListener("blur",function(){this.parentNode.getElementsByTagName("hr")[0].style.border="1px solid #d7d7d7"}
1),l.appendChild(s),l.appendChild(d),o&&l.appendChild(p),l.appendChild(c),n.addValidation){var h={wrapper:l,label:s,input:d,hr:c};n.addValidation(e,t,h)}return l},n._intersects=function(e,t,i){var r=e.x-i.siblingSeparation/4,o=e.y,a=e.x+e.w+i.siblingSeparation/4,l=e.y;switch(i.orientation){case n.orientation.right:case n.orientation.right_top:case n.orientation.left:case n.orientation.left_top:r=e.x,o=e.y-i.siblingSeparation/4,a=e.x,l=e.y+e.h+i.siblingSeparation/4}var s,d,c,p=t.p,h=t.q,f=t.r,u=t.s;return 0!=(s=(a-r)*(u-h)-(f-p)*(l-o))&&(d=((o-l)*(f-r)+(a-r)*(u-o))/s,0<(c=((u-h)*(f-r)+(p-f)*(u-o))/s)&&c<1&&0<d&&d<1)},n._addPoint=function(e,t,i,r,o){switch(i.orientation){case n.orientation.top:case n.orientation.top_left:return n._addPointTop(e,t,i,r,o);case n.orientation.bottom:case n.orientation.bottom_left:return n._addPointBottom(e,t,i,r,o);case n.orientation.left:case n.orientation.left_top:return n._addPointLeft(e,t,i,r,o);case n.orientation.right:case n.orientation.right_top:return n._addPointRight(e,t,i,r,o)}},n._addPointTop=function(e,t,i,n,r){var o,a,l;return"left"==r?o=e.leftNeighbor?e.x+(e.leftNeighbor.x+e.leftNeighbor.w-e.x)/2:e.x-i.siblingSeparation/2:"right"==r&&(o=e.rightNeighbor?e.x+e.w+(e.rightNeighbor.x-(e.x+e.w))/2:e.x+e.w+i.siblingSeparation/2),t.push([o,t[t.length-1][1]]),t.push([o,e.y-i.levelSeparation/3]),a=t[t.length-1][1],l=o,n.p=o,n.q=a,n.r=l,n},n._addPointBottom=function(e,t,i,n,r){var o,a,l;return"left"==r?o=e.leftNeighbor?e.x+(e.leftNeighbor.x+e.leftNeighbor.w-e.x)/2:e.x-i.siblingSeparation/2:"right"==r&&(o=e.rightNeighbor?e.x+e.w+(e.rightNeighbor.x-(e.x+e.w))/2:e.x+e.w+i.siblingSeparation/2),t.push([o,t[t.length-1][1]]),t.push([o,e.y+e.h+i.levelSeparation/3]),a=t[t.length-1][1],l=o,n.p=o,n.q=a,n.r=l,n},n._addPointLeft=function(e,t,i,n,r){var o,a=t[t.length-1][0];return"bottom"==r?o=e.rightNeighbor?e.y+e.h+(e.rightNeighbor.y-(e.y+e.h))/2:e.y+e.h+i.siblingSeparation/2:"top"==r&&(o=e.leftNeighbor?e.y+(e.leftNeighbor.y+e.leftNeighbor.h-e.y)/2:e.y-i.siblingSeparation/2),t.push([t[t.length-1][0],o]),t.push([e.x-i.levelSeparation/3,o]),a=t[t.length-1][0],s=o,n.p=a,n.q=o,n.s=s,n},n._addPointRight=function(e,t,i,n,r){var o,a=t[t.length-1][0];return"bottom"==r?o=e.rightNeighbor?e.y+e.h+(e.rightNeighbor.y-(e.y+e.h))/2:e.y+e.h+i.siblingSeparation/2:"top"==r&&(o=e.leftNeighbor?e.y+(e.leftNeighbor.y+e.leftNeighbor.h-e.y)/2:e.y-i.siblingSeparation/2),t.push([t[t.length-1][0],o]),t.push([e.x+e.w+i.levelSeparation/3,o]),a=t[t.length-1][0],s=o,n.p=a,n.q=o,n.s=s,n},n.editUI=function(){},n.editUI.prototype.init=function(e){this.obj=e,this.fields=null,this.node=null,this._event_id=n._guid()},n.editUI.prototype.on=function(e,t){return n.events.on(e,t,this._event_id),this},n.editUI.prototype.show=function(e,t){if(this.hide(),!1===n.events.publish("show",[this,e]))return!1;this.node=this.obj.getNode(e),this.wrapperElement=document.getElementById("bgEditForm"),this.wrapperElement&&this.obj.element.removeChild(this.wrapperElement),this.wrapperElement=document.createElement("div"),this.wrapperElement.className="edit-wrapper";var i=document.createElement("div");i.className="edit-view";var r=document.createElement("div");r.className="details-view";var o="400px";window.matchMedia("(max-width: 1150px)").matches&&(o="100%"),Object.assign(this.wrapperElement.style,{width:o,position:"absolute",top:0,right:"-150px",opacity:0,"border-left":"1px solid #d7d7d7","text-align":"left",height:"100%","background-color":"#ffffff"}),t?this._createDetailsView(this.node,r):this._createEditView(this.node,i)},n.editUI.prototype._createDetailsView=function(e,t){var i=this,r=document.createElement("div");r.className="edit-photo";var o=document.createElement("div"),a=document.createElement("div");a.className="edit-fields";var l=document.createElement("div");l.className="edit-tags",o.innerHTML='<svg style="width: 34px; height: 34px;"><path style="fill:#ffffff;" d="M21.205,5.007c-0.429-0.444-1.143-0.444-1.587,0c-0.429,0.429-0.429,1.143,0,1.571l8.047,8.047H1.111 C0.492,14.626,0,15.118,0,15.737c0,0.619,0.492,1.127,1.111,1.127h26.554l-8.047,8.032c-0.429,0.444-0.429,1.159,0,1.587 c0.444,0.444,1.159,0.444,1.587,0l9.952-9.952c0.444-0.429,0.444-1.143,0-1.571L21.205,5.007z"></path></svg>',Object.assign(o.style,{cursor:"pointer",width:"34px",height:"34px",position:"absolute",top:"7px",right:"7px"}
1),Object.assign(a.style,{"overflow-x":"hidden","overflow-y":"auto"}),Object.assign(r.style,{"background-color":"#039BE5","min-height":"50px",textAlign:"center",position:"relative"}),Object.assign(l.style,{margin:"12px"}),this.wrapperElement.appendChild(t),t.appendChild(r),t.appendChild(a),a.appendChild(l),r.appendChild(o),n.htmlRipple(r);for(var s=this.fields,d=this.obj._get(e.id),c=0;c<s.length;c++){var p=d[s[c]];if(n._fieldIsImg(this.obj.config,s[c])){var h=document.createElement("img");h.src=p,h.style.width="100px",h.style.margin="10px",h.style.borderRadius="50px",this._addField(r,h,s[c],"details")}else if("tags"==s[c]){if(p)for(var f=0;f<p.length;f++){var u=document.createElement("span");Object.assign(u.style,{"background-color":"#F57C00",color:"#ffffff",margin:"2px",padding:"2px 12px","border-radius":"10px",display:"inline-block",border:"1px solid #FFCA28","user-select":"none"}),u.innerHTML=p[f],this._addField(l,u,p[f],"details-tag")}}else this._addField(a,n.input(s[c],p,null,!0,void 0,i),s[c],"details")}this.obj.element.appendChild(this.wrapperElement),r.addEventListener("click",function(){i.hide(!1)}),this.obj._hideBeforeAnimation(),n.anim(this.wrapperElement,{right:-150,opacity:0},{right:0,opacity:.9},300,n.anim.inOutSin,function(){i.obj._showAfterAnimation(),a.style.height=i.obj.element.offsetHeight-r.offsetHeight+"px"})},n.editUI.prototype._addField=function(e,t,i,r){var o={name:i,field:t,type:r};!1!==n.events.publish("field",[this,o])&&e.appendChild(o.field)},n.editUI.prototype._createEditView=function(e,t){var i=this,r=document.createElement("div");r.className="edit-photo";var o=document.createElement("div"),a=document.createElement("div"),l=document.createElement("div");l.className="edit-fields";var s=document.createElement("div");s.className="edit-assistant-button-content",o.innerHTML='<svg style="width: 34px; height: 34px;"><path style="fill:#ffffff;" d="M21.205,5.007c-0.429-0.444-1.143-0.444-1.587,0c-0.429,0.429-0.429,1.143,0,1.571l8.047,8.047H1.111 C0.492,14.626,0,15.118,0,15.737c0,0.619,0.492,1.127,1.111,1.127h26.554l-8.047,8.032c-0.429,0.444-0.429,1.159,0,1.587 c0.444,0.444,1.159,0.444,1.587,0l9.952-9.952c0.444-0.429,0.444-1.143,0-1.571L21.205,5.007z"></path></svg>',this.wrapperElement.id="bgEditForm",Object.assign(o.style,{cursor:"pointer",width:"34px",height:"34px",position:"absolute",top:"7px",right:"7px"}),Object.assign(l.style,{"overflow-x":"hidden","overflow-y":"auto"}),Object.assign(r.style,{"background-color":"#039BE5","min-height":"50px",textAlign:"center",position:"relative"}),Object.assign(a.style,{margin:"14px 14px 7px",color:"#4285F4",cursor:"pointer"}),Object.assign(s.style,{margin:"14px 14px 7px",color:"rgb(188, 188, 188)"}),a.innerHTML=n.ADD_NEW_FIELD;var d=n._arrayContains(this.node.tags,"assistant")?"checked":"";s.setAttribute("data-field-name","isAssistant"),s.innerHTML='<div style="margin-top: 10px;display:inline-block;">'+n.ASSISTANT+'</div><label class="bg-switch"><input val type="checkbox" '+d+'><span class="bg-slider round"></span></label>',this.wrapperElement.appendChild(t),t.appendChild(r),t.appendChild(l),r.appendChild(o),n.htmlRipple(r);for(var c=this.fields,p=this.obj._get(e.id),h=0;h<c.length;h++){var f=p[c[h]];if("tags"!=c[h])if(n._fieldIsImg(this.obj.config,c[h])){if(f){var u=document.createElement("img");u.src=f,u.style.width="100px",u.style.margin="10px",u.style.borderRadius="50px",r.appendChild(u)}this._addField(l,n.input(c[h],f,null,!1,!0,i),c[h],"edit")}else this._addField(l,n.input(c[h],f,null,!1,void 0,i),c[h],"edit")}0==e.childrenIds.length&&e.parent&&this._addField(l,s,"isAssistant","edit"),this._addField(l,a,n.ADD_NEW_FIELD,"edit"),this.obj.element.appendChild(this.wrapperElement),r.addEventListener("click",function(){i.hide(!0)}),a.addEventListener("click",function(){if("Save"==a.innerHTML)n.anim(a,{opacity:1},{opacity:0},200,n.anim.inSin,function(){a.innerHTML=n.ADD_NEW_FIELD,a.style.textAlign="left";var e=document.getElementById("bgNewField"),t=e.getElementsByTagName("input")[0].value;if(l.removeChild(e),t&&!n._arrayContains(i.fields,t)){var r=n.input(t);r.style.opacity=0,l.insertBefore(r,a),n.anim(r,{opacity:0}
1,{opacity:1},200,n.anim.inSin,function(){r.getElementsByTagName("input")[0].focus()})}n.anim(a,{opacity:0},{opacity:1},200,n.anim.inSin)});else{n.anim(a,{opacity:1},{opacity:0},200,n.anim.inSin,function(){a.innerHTML="Save",a.style.textAlign="right",n.anim(a,{opacity:0},{opacity:1},200,n.anim.inSin)});var e=n.input(null,null,"Field name");e.style.opacity=0,e.id="bgNewField",l.appendChild(e),n.anim(e,{opacity:0},{opacity:1},200,n.anim.inSin,function(){e.getElementsByTagName("input")[0].focus()})}}),this.obj._hideBeforeAnimation(),n.anim(this.wrapperElement,{right:-150,opacity:0},{right:0,opacity:.9},300,n.anim.inOutSin,function(){i.obj._showAfterAnimation(),l.style.height=i.obj.element.offsetHeight-r.offsetHeight+"px",1<i.wrapperElement.getElementsByTagName("input").length&&i.wrapperElement.getElementsByTagName("input")[0].focus()})},n.editUI.prototype.hide=function(e){if(this.wrapperElement){if(!1===n.events.publish("hide",[this]))return!1;var t=this.obj.get(this.node.id);if(e){for(var i=this.wrapperElement.querySelectorAll("[data-field-name]"),r=0;r<i.length;r++){var o=i[r].getAttribute("data-field-name");if(o){var a=i[r].querySelector("[val]").value;if(o===n.TAGS)t.tags=a.split(",");else if("isAssistant"===o){var l=i[r].querySelector("[val]").checked;l&&t.tags?n._arrayContains(this.node.tags,"assistant")||(n.STRING_TAGS?t.tags+=",assistant":t.tags.push("assistant")):l&&!t.tags?n.STRING_TAGS?t.tags="assistant":t.tags=["assistant"]:!l&&t.tags&&-1!=this.node.tags.indexOf("assistant")&&t.tags.splice(t.tags.indexOf("assistant"),1)}else(null!=t[o]||""!=a)&&(t[o]=a)}}var s=this;this.obj._hideBeforeAnimation(),n.anim(s.wrapperElement,{right:0,opacity:1},{right:-150,opacity:0},300,n.anim.inOutSin,function(){s.obj._showAfterAnimation(),s.obj.updateNode(t,null,!0),s.obj.element.removeChild(s.wrapperElement),s.wrapperElement=null})}else this.obj.element.removeChild(this.wrapperElement),this.wrapperElement=null}},n.prototype.getSvg=function(){var e=this.element.getElementsByTagName("svg");return e&&e.length?e[0]:null},n.prototype.getPointerElement=function(){return this.element.querySelector("g[data-pointer]")},n.prototype.getNodeElement=function(e){return this.element.querySelector("g[node-id='"+e+"']")},n.prototype.getExportMenuButton=function(){return this.element.querySelector("[control-export-menu]")},n.menuUI=function(){},n.menuUI.prototype.init=function(e,t){this.obj=e,this.wrapper=null,this.menu=t,this._event_id=n._guid()},n.menuUI.prototype.showStickIn=function(e,t,i,n){this._show(e,null,t,i,n)},n.menuUI.prototype.show=function(e,t,i,n,r){this._show(e,t,i,n,r)},n.menuUI.prototype._show=function(e,t,i,r,o){var a=this;this.hide();var l="";o||(o=this.menu);var s={firstNodeId:i,secondNodeId:r,menu:o};if(!1===n.events.publish("show",[this,s]))return!1;for(var d in o=s.menu){var c=o[d].icon,p=o[d].text;void 0===c&&(c=n.icon[d](24,24,"#7A7A7A")),"function"==typeof p&&(p=p()),"function"==typeof c&&(c=c()),l+='<div data-item="'+d+'" style="border-bottom: 1px solid #D7D7D7; padding: 7px 10px;color: #7A7A7A;">'+c+"<span>&nbsp;&nbsp;"+p+"</span></div>"}if(""!=l){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=l,this.obj.element.appendChild(this.wrapper),null==t){var h=n._menuPosition(e,this.wrapper,this.obj.getSvg());e=h.x,t=h.y}var f=e+45;this.wrapper.style.left=f+"px",this.wrapper.style.top=t+"px",this.wrapper.style.left=f-this.wrapper.offsetWidth+"px";var u=e-this.wrapper.offsetWidth;n.anim(this.wrapper,{opacity:0,left:f-this.wrapper.offsetWidth},{opacity:1,left:u},300,n.anim.inOutPow);for(var g=this.wrapper.getElementsByTagName("div"),m=0;m<g.length;m++)(d=g[m]).addEventListener("mouseover",function(){this.style.backgroundColor="#F0F0F0"}),d.addEventListener("mouseleave",function(){this.style.backgroundColor="#FFFFFF"}),d.addEventListener("click",function(e){var t,n=this.getAttribute("data-item");if(void 0===o[n].onClick)if("add"===n){var l={id:a.obj.generateId(),pid:i};a.obj.addNode(l,null,!0)}else if("edit"===n){var s=a.obj.getNode(i);a.obj.editUI.show(s.id)}else"details"===n?(s=a.obj.getNode(i),a.obj.editUI.show(s.id,!0)):"remove"===n?a.obj.removeNode(i,null,!0):"svg"===n?a.obj.exportSVG({filename:"OrgChart.svg",expandChildren:!1,nodeId:i}):"pdf"===n?a.obj.exportPDF({filename:"OrgChart.pdf",expandChildren:!1,nodeId:i}):"png"===n?a.obj.exportPNG({filename:"OrgChart.png",expandChildren:!1,nodeId:i}):"csv"===n?a.obj.exportCSV():"xml"===n&&a.obj.exportXML();else t=o[n].onClick.call(a.obj,i,r);0!=t&&a.hide()})}},n.menuUI.prototype.hide=function(){null!=this.wrapper&&(this.obj.element.removeChild(this.wrapper),this.wrapper=null)},n.menuUI.prototype.on=function(e,t){return n.events.on(e,t,this._event_id),this},void 0===n&&(n={}),n.idb={version:1,dbName:"balkangraph",tableName:"orgchart-js",keyPath:"id"},n.idb.db=null,n.idb._open=function(e){if(n._browser().msie)e&&e(!1);else if((0<navigator.userAgent.toLowerCase().indexOf("safari")||0<navigator.userAgent.toLowerCase().indexOf("firefox"))&&window.location!==window.parent.location)e&&e(!1);else{if(!window.indexedDB)return console.error("Your browser doesn't support a stable version of IndexedDB."),void(e&&e(!1));if(null==n.idb.db){var t=indexedDB.open(n.idb.dbName,n.idb.version);t.onerror=function(t){console.error("Cannot open database!"),e&&e(!1)},t.onsuccess=function(t){n.idb.db=t.target.result,e&&e(!0)},t.onupgradeneeded=function(e){var t=e.target.result;t.objectStoreNames.contains(n.idb.tableName)&&t.deleteObjectStore(n.idb.tableName),t.createObjectStore(n.idb.tableName,{keyPath:n.idb.keyPath})}}else e&&e(!0)}},n.idb.read=function(e,t){n.idb._open(function(i){if(i){var r=n.idb.db.transaction([n.idb.tableName]).objectStore(n.idb.tableName).get(e);r.onerror=function(e){console.error("Unable to retrieve data from database!"),t&&t(!1)},r.onsuccess=function(e){r.result?t&&t(!0,r.result):t&&t(null)}}else t&&t(!1)})},n.idb.write=function(e,t){n.idb.read(e.id,function(i){if(null==i){var r=n.idb.db.transaction([n.idb.tableName],"readwrite").objectStore(n.idb.tableName).add(e);r.onerror=function(e){console.error("Unable to add data to database!"),t&&t(!1)},r.onsuccess=function(e){t&&t(!0)}}else t&&t(i)})},n.idb.put=function(e,t){n.idb._open(function(i){if(i){var r=n.idb.db.transaction([n.idb.tableName],"readwrite").objectStore(n.idb.tableName).put(e);r.onerror=function(e){console.error("Unable to put data to database!"),t&&t(!1)},r.onsuccess=function(e){t&&t(!0)}}else t&&t(!1)})},n.idb.delete=function(e,t){n.idb._open(function(i){if(i){var r=n.idb.db.transaction([n.idb.tableName],"readwrite").objectStore(n.idb.tableName).delete(e);r.onerror=function(e){console.error("Unable to retrieve data from database!"),t&&t(!1)},r.onsuccess=function(e){r.error?t&&t(!1):t&&t(!0)}}else t&&t(!1)})},n.toolbarUI=function(){},n.toolbarUI.expandAllIcon='<svg style="margin-bottom:7px;box-shadow: 0px 1px 4px rgba(0,0,0,0.3); border: 1px solid #cacaca;background-color: #f9f9f9;display: block;cursor: pointer;" width="32px" height="32px">
1<marker id="arrow" viewBox="0 0 10 10" refX="5" refY="5" markerWidth="4" markerHeight="4" orient="auto-start-reverse"><path d="M 0 0 L 10 5 L 0 10 z" fill="#757575" /></marker><line x1="11" y1="11" x2="6" y2="6" stroke="#757575" stroke-width="2" marker-end="url(#arrow)" /><line x1="21" y1="11" x2="26" y2="6" stroke="#757575" stroke-width="2" marker-end="url(#arrow)" /><line x1="21" y1="21" x2="26" y2="26" stroke="#757575" stroke-width="2" marker-end="url(#arrow)" /><line x1="11" y1="21" x2="6" y2="26" stroke="#757575" stroke-width="2" marker-end="url(#arrow)" /><rect x="12" y="12" width="8" height="8" fill="#757575"></rect></svg>',n.toolbarUI.fitIcon='<svg  style="margin-bottom:7px;box-shadow: 0px 1px 4px rgba(0,0,0,0.3); border: 1px solid #cacaca;background-color: #f9f9f9;display: block;cursor: pointer;" width="32px" height="32px"><path stroke-width="3" fill="none" stroke="#757575" d="M4,11 L4,4 L11,4"></path><path stroke-width="3" fill="none" stroke="#757575" d="M28,11 L28,4 L21,4"></path><path stroke-width="3" fill="none" stroke="#757575" d="M28,21 L28,28 L21,28"></path><path stroke-width="3" fill="none" stroke="#757575" d="M4,21 L4,28 L11,28"></path><circle cx="16" cy="16" r="5" fill="#757575"></circle></svg>',n.toolbarUI.openFullScreenIcon='<svg  style="margin-bottom:7px;box-shadow: 0px 1px 4px rgba(0,0,0,0.3); border: 1px solid #cacaca;background-color: #f9f9f9;display: block;cursor: pointer;" width="32px" height="32px"><path stroke-width="3" fill="none" stroke="#757575" d="M4,11 L4,4 L11,4"></path><path stroke-width="3" fill="none" stroke="#757575" d="M28,11 L28,4 L21,4"></path><path stroke-width="3" fill="none" stroke="#757575" d="M28,21 L28,28 L21,28"></path><path stroke-width="3" fill="none" stroke="#757575" d="M4,21 L4,28 L11,28"></path><line x1="5" y1="5" x2="27" y2="27" stroke-width="3" stroke="#757575"></line><line x1="5" y1="27" x2="27" y2="5" stroke-width="3" stroke="#757575"></line></svg>',n.toolbarUI.closeFullScreenIcon='<svg  style="margin-bottom:7px;box-shadow: 0px 1px 4px rgba(0,0,0,0.3); border: 1px solid #cacaca;background-color: #f9f9f9;display: block;cursor: pointer;" width="32px" height="32px"><path stroke-width="3" fill="none" stroke="#757575" d="M4,11 L4,4 L11,4"></path><path stroke-width="3" fill="none" stroke="#757575" d="M28,11 L28,4 L21,4"></path><path stroke-width="3" fill="none" stroke="#757575" d="M28,21 L28,28 L21,28"></path><path stroke-width="3" fill="none" stroke="#757575" d="M4,21 L4,28 L11,28"></path><rect x="11" y="11" width="10" height="10" stroke-width="3" fill="none" stroke="#757575" ></rect></svg>',n.toolbarUI.zoomInIcon='<svg style="box-shadow: 0px 1px 4px rgba(0,0,0,0.3); border-left: 1px solid #cacaca; border-right: 1px solid #cacaca; border-top: 1px solid #cacaca; background-color: #f9f9f9;display: block; cursor: pointer;" width="32px" height="32px" ><g><rect fill="#f9f9f9" x="0" y="0" width="32" height="32" ></rect><line x1="8" y1="16" x2="24" y2="16" stroke-width="3" stroke="#757575"></line><line x1="16" y1="8" x2="16" y2="24" stroke-width="3" stroke="#757575"></line></g><line x1="4" y1="32" x2="28" y2="32" stroke-width="1" stroke="#cacaca"></line></svg>',n.toolbarUI.zoomOutIcon='<svg style="box-shadow: 0px 1px 4px rgba(0,0,0,0.3); margin-bottom:7px; border-left: 1px solid #cacaca; border-right: 1px solid #cacaca; border-bottom: 1px solid #cacaca; background-color: #f9f9f9;display: block; cursor: pointer;" width="32px" height="32px" ><g><rect fill="#f9f9f9" x="0" y="0" width="32" height="32" ></rect><line x1="8" y1="16" x2="24" y2="16" stroke-width="3" stroke="#757575"></line></g></svg>',n.toolbarUI.layoutIcon='<svg data-tlbr="layout" style="box-shadow: 0px 1px 4px rgba(0,0,0,0.3); border: 1px solid #cacaca;background-color: #f9f9f9;display: block;cursor: pointer;" width="32px" height="32px"><path stroke-width="3" fill="none" stroke="#757575" d="M8,24 L16,14 L24,24"></path><path stroke-width="3" fill="none" stroke="#757575" d="M8,16 L16,8 L24,16"></path></svg>',n.toolbarUI.prototype.init=function(e,t){if(t){this.obj=e,this.toolbar=t,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"}
1),t.expandAll&&(this.div.innerHTML+='<div data-tlbr="expand">'+n.toolbarUI.expandAllIcon+"</div>"),t.fit&&(this.div.innerHTML+='<div data-tlbr="fit">'+n.toolbarUI.fitIcon+"</div>"),t.zoom&&(this.div.innerHTML+='<div data-tlbr="plus">'+n.toolbarUI.zoomInIcon+"</div>",this.div.innerHTML+='<div data-tlbr="minus">'+n.toolbarUI.zoomOutIcon+"</div>"),t.layout&&(this.div.innerHTML+='<div data-tlbr="layout">'+n.toolbarUI.layoutIcon+"</div>",this.layouts=document.createElement("div"),this.layouts.innerHTML='<svg data-layout="normal" style="cursor: pointer;" width="110" height="100"><rect fill="#039BE5" x="35" y="0" width="50" height="27"></rect><rect fill="#F57C00" x="7" y="41" width="50" height="27"></rect><rect fill="#F57C00" x="63" y="41" width="50" height="27"></rect><line stroke="#000000" x1="60" x2="60" y1="27" y2="35" stroke-width="1"></line><line stroke="#000000" x1="32" x2="88" y1="35" y2="35" stroke-width="1"></line><line stroke="#000000" x1="32" x2="32" y1="35" y2="41" stroke-width="1"></line><line stroke="#000000" x1="88" x2="88" y1="35" y2="41" stroke-width="1"></line></svg><svg data-layout="treeRightOffset" style="cursor: pointer;" width="110" height="100"><rect fill="#039BE5" x="35" y="0" width="50" height="27"></rect><rect fill="#F57C00" x="40" y="41" width="50" height="27"></rect><rect fill="#F57C00" x="40" y="73" width="50" height="27"></rect><line stroke="#000000" x1="60" x2="60" y1="27" y2="35" stroke-width="1"></line><line stroke="#000000" x1="60" x2="35" y1="35" y2="35" stroke-width="1"></line><line stroke="#000000" x1="35" x2="35" y1="35" y2="86" stroke-width="1"></line><line stroke="#000000" x1="35" x2="40" y1="86" y2="86" stroke-width="1"></line><line stroke="#000000" x1="35" x2="40" y1="54" y2="54" stroke-width="1"></line></svg><svg data-layout="treeLeftOffset" style="cursor: pointer;" width="110" height="100"><rect fill="#039BE5" x="35" y="0" width="50" height="27"></rect><rect fill="#F57C00" x="30" y="41" width="50" height="27"></rect><rect fill="#F57C00" x="30" y="73" width="50" height="27"></rect><line stroke="#000000" x1="60" x2="60" y1="27" y2="35" stroke-width="1"></line><line stroke="#000000" x1="60" x2="85" y1="35" y2="35" stroke-width="1"></line><line stroke="#000000" x1="85" x2="85" y1="35" y2="86" stroke-width="1"></line><line stroke="#000000" x1="80" x2="85" y1="86" y2="86" stroke-width="1"></line><line stroke="#000000" x1="80" x2="85" y1="54" y2="54" stroke-width="1"></line></svg><svg data-layout="mixed" style="cursor: pointer;" width="110" height="100"><rect fill="#039BE5" x="35" y="0" width="50" height="27"></rect><rect fill="#F57C00" x="35" y="41" width="50" height="27"></rect><rect fill="#F57C00" x="35" y="73" width="50" height="27"></rect><line stroke="#000000" x1="60" x2="60" y1="27" y2="41" stroke-width="1"></line><line stroke="#000000" x1="60" x2="60" y1="68" y2="73" stroke-width="1"></line></svg><svg data-layout="tree" style="cursor: pointer;" width="110" height="100"><rect fill="#039BE5" x="35" y="0" width="50" height="27"></rect><rect fill="#F57C00" x="7" y="41" width="50" height="27"></rect><rect fill="#F57C00" x="7" y="73" width="50" height="27"></rect><rect fill="#F57C00" x="63" y="41" width="50" height="27"></rect><rect fill="#F57C00" x="63" y="73" width="50" height="27"></rect><line stroke="#000000" x1="60" x2="60" y1="27" y2="86" stroke-width="1"></line><line stroke="#000000" x1="57" x2="63" y1="54" y2="54" stroke-width="1"></line><line stroke="#000000" x1="57" x2="63" y1="86" y2="86" stroke-width="1"></line></svg>',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"})),t.fullScreen&&(this.div.innerHTML+='<div data-tlbr="fullScreen">'+n.toolbarUI.openFullScreenIcon+"</div>"),this.obj.element.appendChild(this.div),this.layoutBtn=this.div.querySelector('[data-tlbr="layout"]');var i=this.div.querySelector('[data-tlbr="plus"]'),r=this.div.querySelector('[data-tlbr="minus"]'),o=this.div.querySelector('[data-tlbr="fit"]'),a=this.div.querySelector('[data-tlbr="fullScreen"]'),l=this.div.querySelector('[data-tlbr="exp
1and"]'),s=this;i&&i.addEventListener("click",function(){s.obj.zoom(!0,null,!0)}),r&&r.addEventListener("click",function(){s.obj.zoom(!1,null,!0)}),o&&o.addEventListener("click",function(){s.obj.fit()}),a&&a.addEventListener("click",function(){s.obj.toggleFullScreen()}),l&&l.addEventListener("click",function(){s.obj.expand(null,"all")}),this.layoutBtn&&this.layoutBtn.addEventListener("click",function(){s._visible?s.hideLayout():s.showLayout()}),this.layouts&&this.layouts.addEventListener("click",function(e){for(var t=e.target;t;){if(t.hasAttribute&&t.hasAttribute("data-layout")){t=t.getAttribute("data-layout"),s.obj.setLayout(n[t]);break}t=t.parentNode}})}},n.toolbarUI.prototype.showLayout=function(){this._visible=!0,this.layoutBtn.style.transform="rotate(180deg) translateX(0px) translateY(0px)",n.anim(this.div,{bottom:this.obj.config.padding},{bottom:this.obj.config.padding+145},this.obj.config.anim.duration,this.obj.config.anim.func),n.anim(this.layouts,{bottom:-145},{bottom:0},this.obj.config.anim.duration,this.obj.config.anim.func)},n.toolbarUI.prototype.hideLayout=function(){this._visible=!1,this.layoutBtn.style.transform="rotate(0deg) translateX(0px) translateY(0px)",n.anim(this.div,{bottom:this.obj.config.padding+145},{bottom:this.obj.config.padding},this.obj.config.anim.duration,this.obj.config.anim.func),n.anim(this.layouts,{bottom:0},{bottom:-145},this.obj.config.anim.duration,this.obj.config.anim.func)},n.notifierUI=function(){},n.notifierUI.prototype.init=function(e){this.obj=e},n.notifierUI.prototype.show=function(e,t){if(null!=e){1==e&&(e=n.MAX_NODES_MESS,t="#FFCA28"),2==e&&(e=n.OFFLINE_MESS,t="#FFCA28");var i=document.createElement("div");i.innerHTML=e,Object.assign(i.style,{position:"absolute","background-color":t,color:"#ffffff",padding:"15px","border-radius":"40px",opacity:0,overflow:"hidden","white-space":"nowrap","text-align":"center"}),this.obj.element.appendChild(i);var r=this.obj.width()/2-i.offsetWidth/2,o=this.obj.height()/2-i.offsetHeight/2;i.style.left=r+"px",i.style.top=o+"px";var a=i.offsetWidth;i.style.width="20px",n.anim(i,{opacity:0,width:10},{opacity:1,width:a},this.obj.config.anim.duration,this.obj.config.anim.func)}},n.icon={},n.icon.png=function(e,t,i){return'<svg width="'+e+'" height="'+t+'" viewBox="0 0 550.801 550.801"><path fill="'+i+'" d="M146.747,276.708c0-13.998-9.711-22.352-26.887-22.352c-6.99,0-11.726,0.675-14.204,1.355v44.927 c2.932,0.676,6.539,0.896,11.52,0.896C135.449,301.546,146.747,292.28,146.747,276.708z"/><path fill="'+i+'" d="M488.426,197.019H475.2v-63.816c0-0.398-0.063-0.799-0.116-1.202c-0.021-2.534-0.827-5.023-2.562-6.995L366.325,3.694 c-0.032-0.031-0.063-0.042-0.085-0.076c-0.633-0.707-1.371-1.295-2.151-1.804c-0.231-0.155-0.464-0.285-0.706-0.419 c-0.676-0.369-1.393-0.675-2.131-0.896c-0.2-0.056-0.38-0.138-0.58-0.19C359.87,0.119,359.037,0,358.193,0H97.2 c-11.918,0-21.6,9.693-21.6,21.601v175.413H62.377c-17.049,0-30.873,13.818-30.873,30.873v160.545 c0,17.043,13.824,30.87,30.873,30.87h13.224V529.2c0,11.907,9.682,21.601,21.6,21.601h356.4c11.907,0,21.6-9.693,21.6-21.601 V419.302h13.226c17.044,0,30.871-13.827,30.871-30.87v-160.54C519.297,210.838,505.47,197.019,488.426,197.019z M97.2,21.605 h250.193v110.513c0,5.967,4.841,10.8,10.8,10.8h95.407v54.108H97.2V21.605z M234.344,335.86v45.831h-31.601V229.524h40.184 l31.611,55.759c9.025,16.031,18.064,34.983,24.825,52.154h0.675c-2.257-20.103-2.933-40.643-2.933-63.44v-44.473h31.614v152.167 h-36.117l-32.516-58.703c-9.049-16.253-18.971-35.892-26.438-53.727l-0.665,0.222C233.906,289.58,234.344,311.027,234.344,335.86z M71.556,381.691V231.56c10.613-1.804,25.516-3.159,46.506-3.159c21.215,0,36.353,4.061,46.509,12.192 c9.698,7.673,16.255,20.313,16.255,35.219c0,14.897-4.959,27.549-13.999,36.123c-11.738,11.063-29.123,16.031-49.441,16.031 c-4.522,0-8.593-0.231-11.736-0.675v54.411H71.556V381.691z M453.601,523.353H97.2V419.302h356.4V523.353z M485.652,374.688 c-10.61,3.607-30.713,8.585-50.805,8.585c-27.759,0-47.872-7.003-61.857-20.545c-13.995-13.1-21.684-32.97-21.452-55.318 c0.222-50.569,37.03-79.463,86.917-79.463c19.644,0,34.783,3.829,42.219,7.446l-7.214,27.543c-8.369-3.617-18.752-6.55-35.458-6.55 c-28.656,0-50.341,16.256-50.341,49.22c0,31.382,19.649,49.892,47.872,49.892c7.895,0,14.218-0.901,16.934-2.257v-31.835h-23.493 v-26.869h56.679V374.688z"/></svg>'},n.icon.pdf=function(e,t,i){return'<svg width="'+e+'" height="'+t+'" viewBox="0 0 550.801 550.801"><path fill="'+i+'" d="M160.381,282.225c0-14.832-10.299-23.684-28.474-23.684c-7.414,0-12.437,0.715-15.071,1.432V307.6 c3.114,0.707,6.942,0.949,12.192,0.949C148.419,308.549,160.381,298.74,160.381,282.225z"/><path fill="'+i+'" d="M272.875,259.019c-8.145,0-13.397,0.717-16.519,1.435v105.523c3.116,0.729,8.142,0.729,12.69,0.729 c33.017,0.231,54.554-17.946,54.554-56.474C323.842,276.719,304.215,259.019,272.875,259.019z"/><path fill="'+i+'" d="M488.426,197.019H475.2v-63.816c0-0.398-0.063-0.799-0.116-1.202c-0.021-2.534-0.827-5.023-2.562-6.995L366.325,3.694 c-0.032-0.031-0.063-0.042-0.085-0.076c-0.633-0.707-1.371-1.295-2.151-1.804c-0.231-0.155-0.464-0.285-0.706-0.419 c-0.676-0.369-1.393-0.675-2.131-0.896c-0.2-0.056-0.38-0.138-0.58-0.19C359.87,0.119,359.037,0,358.193,0H97.2 c-11.918,0-21.6,9.693-21.6,21.601v175.413H62.377c-17.049,0-30.873,13.818-30.873,30.873v160.545 c0,17.043,13.824,30.87,30.873,30.87h13.224V529.2c0,11.907,9.682,21.601,21.6,21.601h356.4c11.907,0,21.6-9.693,21.6-21.601 V419.302h13.226c17.044,0,30.871-13.827,30.871-30.87v-160.54C519.297,210.838,505.47,197.019,488.426,197.019z M97.2,21.605 h250.193v110.513c0,5.967,4.841,10.8,10.8,10.8h95.407v54.108H97.2V21.605z M362.359,309.023c0,30.876-11.243,52.165-26.82,65.333 c-16.971,14.117-42.82,20.814-74.396,20.814c-18.9,0-32.297-1.197-41.401-2.389V234.365c13.399-2.149,30.878-3.346,49.304-3.346 c30.612,0,50.478,5.508,66.039,17.226C351.828,260.69,362.359,280.547,362.359,309.023z M80.7,393.499V234.365 c11.241-1.904,27.042-3.346,49.296-3.346c22.491,0,38.527,4.308,49.291,12.928c10.292,8.131,17.215,21.534,17.215,37.328 c0,15.799-5.25,29.198-14.829,38.285c-12.442,11.728-30.865,16.996-52.407,16.996c-4.778,0-9.1-0.243-12.435-0.723v57.67H80.7 V393.499z M453.601,523.353H97.2V419.302h356.4V523.353z M484.898,262.127h-61.989v36.851h57.913v29.674h-57.913v64.848h-36.593 V232.216h98.582V262.127z"/></svg>'},n.icon.svg=function(e,t,i){return'<svg width="'+e+'" height="'+t+'" viewBox="0 0 550.801 550.801"><path fill="'+i+'" d="M488.426,197.019H475.2v-63.816c0-0.398-0.063-0.799-0.116-1.202c-0.021-2.534-0.827-5.023-2.562-6.995L366.325,3.694 c-0.032-0.031-0.063-0.042-0.085-0.076c-0.633-0.707-1.371-1.295-2.151-1.804c-0.231-0.155-0.464-0.285-0.706-0.419 c-0.676-0.369-1.393-0.675-2.131-0.896c-0.2-0.056-0.38-0.138-0.58-0.19C359.87,0.119,359.037,0,358.193,0H97.2 c-11.918,0-21.6,9.693-21.6,21.601v175.413H62.377c-17.049,0-30.873,13.818-30.873,30.873v160.545 c0,17.043,13.824,30.87,30.873,30.87h13.224V529.2c0,11.907,9.682,21.601,21.6,21.601h356.4c11.907,0,21.6-9.693,21.6-21.601 V419.302h13.226c17.044,0,30.871-13.827,30.871-30.87v-160.54C519.297,210.838,505.47,197.019,488.426,197.019z M97.2,21.605 h250.193v110.513c0,5.967,4.841,10.8,10.8,10.8h95.407v54.108H97.2V21.605z M338.871,225.672L284.545,386.96h-42.591 l-51.69-161.288h39.967l19.617,68.196c5.508,19.143,10.531,37.567,14.36,57.67h0.717c4.061-19.385,9.089-38.527,14.592-56.953 l20.585-68.918h38.77V225.672z M68.458,379.54l7.415-30.153c9.811,5.021,24.888,10.051,40.439,10.051 c16.751,0,25.607-6.935,25.607-17.465c0-10.052-7.662-15.795-27.05-22.734c-26.8-9.328-44.263-24.168-44.263-47.611 c0-27.524,22.971-48.579,61.014-48.579c18.188,0,31.591,3.823,41.159,8.131l-8.126,29.437c-6.465-3.116-17.945-7.657-33.745-7.657 c-15.791,0-23.454,7.183-23.454,15.552c0,10.296,9.089,14.842,29.917,22.731c28.468,10.536,41.871,25.365,41.871,48.094 c0,27.042-20.812,50.013-65.09,50.013C95.731,389.349,77.538,384.571,68.458,379.54z M453.601,523.353H97.2V419.302h356.4V523.353z M488.911,379.54c-11.243,3.823-32.537,9.103-53.831,9.103c-29.437,0-
150.73-7.426-65.57-21.779 c-14.839-13.875-22.971-34.942-22.738-58.625c0.253-53.604,39.255-84.235,92.137-84.235c20.81,0,36.852,4.073,44.74,7.896 l-7.657,29.202c-8.859-3.829-19.849-6.95-37.567-6.95c-30.396,0-53.357,17.233-53.357,52.173c0,33.265,20.81,52.882,50.73,52.882 c8.375,0,15.072-0.96,17.94-2.395v-33.745h-24.875v-28.471h60.049V379.54L488.911,379.54z" /></svg>'},n.icon.csv=function(e,t,i){return'<svg width="'+e+'" height="'+t+'" viewBox="0 0 548.29 548.291" ><path fill="'+i+'" d="M486.2,196.121h-13.164V132.59c0-0.399-0.064-0.795-0.116-1.2c-0.021-2.52-0.824-5-2.551-6.96L364.656,3.677 c-0.031-0.034-0.064-0.044-0.085-0.075c-0.629-0.707-1.364-1.292-2.141-1.796c-0.231-0.157-0.462-0.286-0.704-0.419 c-0.672-0.365-1.386-0.672-2.121-0.893c-0.199-0.052-0.377-0.134-0.576-0.188C358.229,0.118,357.4,0,356.562,0H96.757 C84.893,0,75.256,9.649,75.256,21.502v174.613H62.093c-16.972,0-30.733,13.756-30.733,30.73v159.81 c0,16.966,13.761,30.736,30.733,30.736h13.163V526.79c0,11.854,9.637,21.501,21.501,21.501h354.777 c11.853,0,21.502-9.647,21.502-21.501V417.392H486.2c16.966,0,30.729-13.764,30.729-30.731v-159.81 C516.93,209.872,503.166,196.121,486.2,196.121z M96.757,21.502h249.053v110.006c0,5.94,4.818,10.751,10.751,10.751h94.973v53.861 H96.757V21.502z M258.618,313.18c-26.68-9.291-44.063-24.053-44.063-47.389c0-27.404,22.861-48.368,60.733-48.368 c18.107,0,31.447,3.811,40.968,8.107l-8.09,29.3c-6.43-3.107-17.862-7.632-33.59-7.632c-15.717,0-23.339,7.149-23.339,15.485 c0,10.247,9.047,14.769,29.78,22.632c28.341,10.479,41.681,25.239,41.681,47.874c0,26.909-20.721,49.786-64.792,49.786 c-18.338,0-36.449-4.776-45.497-9.77l7.38-30.016c9.772,5.014,24.775,10.006,40.264,10.006c16.671,0,25.488-6.908,25.488-17.396 C285.536,325.789,277.909,320.078,258.618,313.18z M69.474,302.692c0-54.781,39.074-85.269,87.654-85.269 c18.822,0,33.113,3.811,39.549,7.149l-7.392,28.816c-7.38-3.084-17.632-5.939-30.491-5.939c-28.822,0-51.206,17.375-51.206,53.099 c0,32.158,19.051,52.4,51.456,52.4c10.947,0,23.097-2.378,30.241-5.238l5.483,28.346c-6.672,3.34-21.674,6.919-41.208,6.919 C98.06,382.976,69.474,348.424,69.474,302.692z M451.534,520.962H96.757v-103.57h354.777V520.962z M427.518,380.583h-42.399 l-51.45-160.536h39.787l19.526,67.894c5.479,19.046,10.479,37.386,14.299,57.397h0.709c4.048-19.298,9.045-38.352,14.526-56.693 l20.487-68.598h38.599L427.518,380.583z" /></svg>'},n.icon.excel=function(e,t,i){return'<svg width="'+e+'" height="'+t+'" viewBox="0 0 512 512"><path fill="#ECEFF1" d="M496,432.011H272c-8.832,0-16-7.168-16-16s0-311.168,0-320s7.168-16,16-16h224 c8.832,0,16,7.168,16,16v320C512,424.843,504.832,432.011,496,432.011z" /><path fill="'+i+'" d="M336,176.011h-64c-8.832,0-16-7.168-16-16s7.168-16,16-16h64c8.832,0,16,7.168,16,16 S344.832,176.011,336,176.011z" /><path fill="'+i+'" d="M336,240.011h-64c-8.832,0-16-7.168-16-16s7.168-16,16-16h64c8.832,0,16,7.168,16,16 S344.832,240.011,336,240.011z" /><path fill="'+i+'" d="M336,304.011h-64c-8.832,0-16-7.168-16-16s7.168-16,16-16h64c8.832,0,16,7.168,16,16 S344.832,304.011,336,304.011z" /><path fill="'+i+'" d="M336,368.011h-64c-8.832,0-16-7.168-16-16s7.168-16,16-16h64c8.832,0,16,7.168,16,16 S344.832,368.011,336,368.011z" /><path fill="'+i+'" d="M432,176.011h-32c-8.832,0-16-7.168-16-16s7.168-16,16-16h32c8.832,0,16,7.168,16,16 S440.832,176.011,432,176.011z" /><path fill="'+i+'" d="M432,240.011h-32c-8.832,0-16-7.168-16-16s7.168-16,16-16h32c8.832,0,16,7.168,16,16 S440.832,240.011,432,240.011z" /><path fill="'+i+'" d="M432,304.011h-32c-8.832,0-16-7.168-16-16s7.168-16,16-16h32c8.832,0,16,7.168,16,16 S440.832,304.011,432,304.011z" /><path fill="'+i+'" d="M432,368.011h-32c-8.832,0-16-7.168-16-16s7.168-16,16-16h32c8.832,0,16,7.168,16,16 S440.832,368.011,432,368.011z" /><path fill="'+i+'"  d="M282.208,19.691c-3.648-3.04-8.544-4.352-13.152-3.392l-256,48C5.472,65.707,0,72.299,0,80.011v352 c0,7.68,5.472,14.304,13.056,15.712l256,48c0.96,0.192,1.952,0.288,2.944,0.288c3.712,0,7.328-1.28,10.208-3.68 c3.68-3.04,5.792-7.584,5.792-12.32v-448C288,27.243,285.888,22.731,282.208,19.691z" /><path fill="#FAFAFA" d="M220.032,309.483l-50.592-57.824l51.168-65.792c5.44-6.976,4.16-17.024-2.784-22.464 c-6.944-5.44-16.992-4.16-22.464,2.784l-47.392,60.928l-39.936-45.632c-5.856-6.72-15.968-7.328-22.56-1.504 c-6.656,5.824
1-7.328,15.936-1.504,22.56l44,50.304L83.36,310.187c-5.44,6.976-4.16,17.024,2.784,22.464 c2.944,2.272,6.432,3.36,9.856,3.36c4.768,0,9.472-2.112,12.64-6.176l40.8-52.48l46.528,53.152 c3.168,3.648,7.584,5.504,12.032,5.504c3.744,0,7.488-1.312,10.528-3.968C225.184,326.219,225.856,316.107,220.032,309.483z" /></svg>'},n.icon.edit=function(e,t,i){return'<svg width="'+e+'" height="'+t+'" viewBox="0 0 528.899 528.899"><path fill="'+i+'" d="M328.883,89.125l107.59,107.589l-272.34,272.34L56.604,361.465L328.883,89.125z M518.113,63.177l-47.981-47.981 c-18.543-18.543-48.653-18.543-67.259,0l-45.961,45.961l107.59,107.59l53.611-53.611 C532.495,100.753,532.495,77.559,518.113,63.177z M0.3,512.69c-1.958,8.812,5.998,16.708,14.811,14.565l119.891-29.069 L27.473,390.597L0.3,512.69z" /></svg>'},n.icon.details=function(e,t,i){return'<svg width="'+e+'" height="'+t+'" viewBox="0 0 512 512"><path fill="'+i+'" d="M447.933,103.629c-0.034-3.076-1.224-6.09-3.485-8.352L352.683,3.511c-0.004-0.004-0.007-0.005-0.011-0.008 C350.505,1.338,347.511,0,344.206,0H89.278C75.361,0,64.04,11.32,64.04,25.237v461.525c0,13.916,11.32,25.237,25.237,25.237 h333.444c13.916,0,25.237-11.32,25.237-25.237V103.753C447.96,103.709,447.937,103.672,447.933,103.629z M356.194,40.931 l50.834,50.834h-49.572c-0.695,0-1.262-0.567-1.262-1.262V40.931z M423.983,486.763c0,0.695-0.566,1.261-1.261,1.261H89.278 c-0.695,0-1.261-0.566-1.261-1.261V25.237c0-0.695,0.566-1.261,1.261-1.261h242.94v66.527c0,13.916,11.322,25.239,25.239,25.239 h66.527V486.763z"/><path fill="'+i+'" d="M362.088,164.014H149.912c-6.62,0-11.988,5.367-11.988,11.988c0,6.62,5.368,11.988,11.988,11.988h212.175 c6.62,0,11.988-5.368,11.988-11.988C374.076,169.381,368.707,164.014,362.088,164.014z"/><path fill="'+i+'" d="M362.088,236.353H149.912c-6.62,0-11.988,5.368-11.988,11.988c0,6.62,5.368,11.988,11.988,11.988h212.175 c6.62,0,11.988-5.368,11.988-11.988C374.076,241.721,368.707,236.353,362.088,236.353z"/><path fill="'+i+'" d="M362.088,308.691H149.912c-6.62,0-11.988,5.368-11.988,11.988c0,6.621,5.368,11.988,11.988,11.988h212.175 c6.62,0,11.988-5.367,11.988-11.988C374.076,314.06,368.707,308.691,362.088,308.691z"/><path fill="'+i+'" d="M256,381.031H149.912c-6.62,0-11.988,5.368-11.988,11.988c0,6.621,5.368,11.988,11.988,11.988H256 c6.62,0,11.988-5.367,11.988-11.988C267.988,386.398,262.62,381.031,256,381.031z"/></svg>'},n.icon.remove=function(e,t,i){return'<svg width="'+e+'" height="'+t+'"  viewBox="0 0 900.5 900.5"><path fill="'+i+'" d="M176.415,880.5c0,11.046,8.954,20,20,20h507.67c11.046,0,20-8.954,20-20V232.487h-547.67V880.5L176.415,880.5z M562.75,342.766h75v436.029h-75V342.766z M412.75,342.766h75v436.029h-75V342.766z M262.75,342.766h75v436.029h-75V342.766z"/><path fill="'+i+'" d="M618.825,91.911V20c0-11.046-8.954-20-20-20h-297.15c-11.046,0-20,8.954-20,20v71.911v12.5v12.5H141.874 c-11.046,0-20,8.954-20,20v50.576c0,11.045,8.954,20,20,20h34.541h547.67h34.541c11.046,0,20-8.955,20-20v-50.576 c0-11.046-8.954-20-20-20H618.825v-12.5V91.911z M543.825,112.799h-187.15v-8.389v-12.5V75h187.15v16.911v12.5V112.799z"/></svg>'},n.icon.add=function(e,t,i){return'<svg width="'+e+'" height="'+t+'"   viewBox="0 0 922 922"><path fill="'+i+'" d="M922,453V81c0-11.046-8.954-20-20-20H410c-11.045,0-20,8.954-20,20v149h318c24.812,0,45,20.187,45,45v198h149 C913.046,473.001,922,464.046,922,453z" /><path fill="'+i+'" d="M557,667.001h151c11.046,0,20-8.954,20-20v-174v-198c0-11.046-8.954-20-20-20H390H216c-11.045,0-20,8.954-20,20v149h194 h122c24.812,0,45,20.187,45,45v4V667.001z" /><path fill="'+i+'" d="M0,469v372c0,11.046,8.955,20,20,20h492c11.046,0,20-8.954,20-20V692v-12.501V667V473v-4c0-11.046-8.954-20-20-20H390H196 h-12.5H171H20C8.955,449,0,457.955,0,469z" /></svg>'},n.icon.search=function(e,t,i){return'<svg width="'+e+'" height="'+t+'" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 485.213 485.213"><path fill="'+i+'" d="M471.882,407.567L360.567,296.243c-16.586,25.795-38.536,47.734-64.331,64.321l111.324,111.324 c17.772,17.768,46.587,17.768,64.321,0C489.654,454.149,489.654,425.334,471.882,407.567z" /><path fill="'+i+'" d="M363.909,181.955C363.909,81.473,282.44,0,181.956,0C81.474,0,0.001,81.473,0.001,181.955s81.473,181.951,181.955,181.951 C282.44,363.906,363.909,282.437,363.909,181.955z M181.956,318.416c-75.252,0-136.465-61.208-136.465-136.46 c0-75.252,61.213-136.465,136.465-136.465c75.25,0,136.468,61.213,136.468,136.465 C318.424,257.208,257.206,318.416,181.956,318.416z" /><path fill="'+i+'" d="M75.817,181.955h30.322c0-41.803,34.014-75.814,75.816-75.814V75.816C123.438,75.816,75.817,123.437,75.817,181.955z" /></svg>'},n.icon.xml=function(e,t,i){return'<svg width="'+e+'" height="'+t+'" viewBox="0 0 550.801 550.801"><path fill="'+i+'"  d="M488.426,197.019H475.2v-63.816c0-0.401-0.063-0.799-0.116-1.205c-0.021-2.534-0.827-5.023-2.562-6.992L366.325,3.691 c-0.032-0.031-0.063-0.042-0.085-0.073c-0.633-0.707-1.371-1.298-2.151-1.804c-0.231-0.158-0.464-0.287-0.706-0.422 c-0.676-0.366-1.393-0.675-2.131-0.896c-0.2-0.053-0.38-0.135-0.58-0.19C359.87,0.119,359.037,0,358.193,0H97.2 c-11.918,0-21.6,9.693-21.6,21.601v175.413H62.377c-17.049,0-30.873,13.818-30.873,30.87v160.542 c0,17.044,13.824,30.876,30.873,30.876h13.224V529.2c0,11.907,9.682,21.601,21.6,21.601h356.4c11.907,0,21.6-9.693,21.6-21.601 V419.302h13.226c17.044,0,30.871-13.827,30.871-30.87V227.89C519.297,210.838,505.47,197.019,488.426,197.019z M97.2,21.605 h250.193v110.51c0,5.967,4.841,10.8,10.8,10.8h95.407v54.108H97.2V21.605z M369.531,374.53h-32.058l-2.156-55.519 c-0.644-17.434-1.298-38.518-1.298-59.611h-0.633c-4.514,18.516-10.547,39.166-16.137,56.162l-17.645,56.601h-25.618 l-15.494-56.157c-4.725-16.996-9.671-37.658-13.123-56.6h-0.43c-0.854,19.585-1.508,41.9
161-2.586,60.038l-2.576,55.086h-30.343 l9.26-145.035h43.677l14.207,48.421c4.517,16.774,9.041,34.847,12.258,51.843h0.654c4.081-16.77,9.038-35.923,13.774-52.064 l15.493-48.199h42.82L369.531,374.53z M69.992,374.53l41.955-73.385l-40.444-71.65h37.655l12.688,26.465 c4.316,8.828,7.533,15.928,10.99,24.092h0.422c3.438-9.242,6.23-15.694,9.893-24.092l12.274-26.465h37.434l-40.89,70.796 l43.044,74.239h-37.866l-13.134-26.257c-5.376-10.108-8.817-17.639-12.909-26.04h-0.433c-3.009,8.401-6.674,15.932-11.19,26.04 l-12.042,26.257H69.992z M453.601,523.353H97.2V419.302h356.4V523.353z M485.325,374.53h-90.608V229.495h32.933v117.497h57.682 v27.538H485.325z"/></svg>'},n.prototype.exportPDF=function(e,t){e=this._defaultExportOptions(e,"pdf"),this._export(e,t)},n.prototype.exportPNG=function(e,t){e=this._defaultExportOptions(e,"png"),this._export(e,t)},n.prototype.exportSVG=function(e,t){e=this._defaultExportOptions(e,"svg"),this._export(e,t)},n.prototype._defaultExportOptions=function(e,t){return null==e&&(e={}),"svg"==t?(e.ext="svg",e.mime="image/svg+xml"):"pdf"==t?(e.mime="application/pdf",e.ext="pdf"):"png"==t&&(e.mime="image/png",e.ext="png"),null==e.margin&&(e.margin=[50,40,50,40]),null==e.padding&&(e.padding=0),null==e.landscape&&(e.landscape=!1),null==e.filename&&(e.filename="OrgChart."+e.ext),null==e.scale&&(e.scale="fit"),null==e.format&&(e.format="fit"),null==e.header&&(e.header=""),null==e.footer&&(e.footer="Page {current-page} of {total-pages}"),null==e.openInNewTab&&(e.openInNewTab=!1),e},n.prototype._export=function(e,t){var i=this,r={id:e.nodeId,expandChildren:e.expandChildren};e.margin&&e.margin[0]<2&&(e.margin[0]=2),e.margin&&e.margin[1]<2&&(e.margin[1]=2),e.margin&&e.margin[2]<2&&(e.margin[2]=2),e.margin&&e.margin[3]<2&&(e.margin[3]=2),this._draw(!1,n.action.exporting,r,function(r){var o=document.createElement("div");if(o.innerHTML=r,0<e.padding){var a=o.querySelector("svg"),l=n._getViewBox(a);l[0]-=e.padding,l[1]-=e.padding,l[2]+=2*e.padding,l[3]+=2*e.padding,a.setAttribute("viewBox",l.join()),a.setAttribute("width",l[2]),a.setAttribute("height",l[3])}if("svg"==e.ext)if(t)t(e,o.innerHTML);else{var s={content:o.innerHTML,options:e,styles:""},d=n.events.publish("exportstart",[i,s]);if(s.styles&&(o.childNodes[0].insertAdjacentHTML("afterbegin",s.styles),s.content=o.innerHTML),!1===d)return!1;if(n._downloadFile(e.mime,s.content,s.options.filename,s.options.openInNewTab),!1===(d=n.events.publish("exportend",[i,s])))return!1}else i._pages(e,o.querySelector("svg"),function(r){var a={content:o.innerHTML,options:e,pages:r,styles:""};if(!1===n.events.publish("exportstart",[i,a]))return!1;t||n.loading.show(i),t?t(i,a,o.querySelector("svg")):(a=JSON.stringify(a),n._ajax(i.config.exportUrl+"/v3","POST",a,"arraybuffer",function(t){if(!1===n.events.publish("exportend",[i,t]))return!1;n.loading.hide(i),n._downloadFile(e.mime,t,e.filename,e.openInNewTab)}))})})},n.prototype.exportCSV=function(e){e||(e="OrgChart.csv");var t={ext:"csv",filename:e,nodes:JSON.parse(JSON.stringify(this.config.nodes))};if(!1===n.events.publish("exportstart",[this,t]))return!1;var i=n._json2csv(t.nodes),r={ext:t.ext,filename:t.filename,nodes:t.nodes,content:i};if(!1===n.events.publish("exportend",[this,r]))return!1;n._downloadFile("text/csv;charset=utf-8;","\ufeff"+r.content,r.filename,r.openInNewTab)},n.prototype.exportXML=function(e){e||(e="OrgChart.xml");var t={ext:"xml",filename:e,nodes:JSON.parse(JSON.stringify(this.config.nodes))};if(!1===n.events.publish("exportstart",[this,t]))return!1;
1var i=n._json2xml(t.nodes),r={ext:t.ext,filename:t.filename,nodes:t.nodes,content:i};if(!1===n.events.publish("exportend",[this,r]))return!1;n._downloadFile("application/xml",r.content,r.filename,r.openInNewTab)},n.prototype._pages=function(e,t,i){"A4"==e.format&&"fit"!=e.scale||"A3"==e.format&&"fit"!=e.scale||"A2"==e.format&&"fit"!=e.scale||"A1"==e.format&&"fit"!=e.scale||"Letter"==e.format&&"fit"!=e.scale||"Legal"==e.format&&"fit"!=e.scale?i(this._pagesA100(e,t,e.scale)):"A4"==e.format&&"fit"==e.scale||"A3"==e.format&&"fit"==e.scale||"A2"==e.format&&"fit"==e.scale||"A1"==e.format&&"fit"==e.scale||"Letter"==e.format&&"fit"==e.scale||"Legal"==e.format&&"fit"==e.scale?i(this._pagesAfit(e,t)):"fit"==e.format&&i(this._pagesFit(e,t))},n.prototype._pagesFit=function(e,t){var i=t.getAttribute("width"),r=t.getAttribute("height"),o=n._getViewBox(t),a={w:parseFloat(i),h:parseFloat(r)};return[{vb:o,size:{w:a.w+(e.margin[1]+e.margin[3]),h:a.h+(e.margin[0]+e.margin[2])},innerSize:a}]},n.prototype._pagesAfit=function(e,t){var i=t.getAttribute("width"),r=0,o=0;switch(e.format){case"A4":r=n.A4w,o=n.A4h;break;case"A3":r=n.A3w,o=n.A3h;break;case"A2":r=n.A2w,o=n.A2h;break;case"A1":r=n.A1w,o=n.A1h;break;case"Letter":r=n.Letterw,o=n.Letterh;break;case"Legal":r=n.Legalw,o=n.Legalh}var a=e.landscape?o-(e.margin[1]+e.margin[3]):r-(e.margin[1]+e.margin[3]),l=(e.landscape,e.margin[0],e.margin[2],a/i);return this._pagesA100(e,t,100*l)},n.prototype._pagesA100=function(e,t,i){var r=n._getViewBox(t),o=0,a=0;switch(e.format){case"A4":o=n.A4w,a=n.A4h;break;case"A3":o=n.A3w,a=n.A3h;break;case"A2":o=n.A2w,a=n.A2h;break;case"A1":o=n.A1w,a=n.A1h;break;case"Letter":o=n.Letterw,a=n.Letterh;break;case"Legal":o=n.Legalw,a=n.Legalh}var l=r[0],s=r[1],d=r[2],c=r[3],p={w:e.landscape?a-(e.margin[1]+e.margin[3]):o-(e.margin[1]+e.margin[3]),h:e.landscape?o-(e.margin[0]+e.margin[2]):a-(e.margin[0]+e.margin[2])},h={w:e.landscape?a:o,h:e.landscape?o:a};t.setAttribute("preserveAspectRatio","xMinYMin slice"),t.setAttribute("width",p.w),t.setAttribute("height",p.h);for(var f=p.w*(100/i),u=p.h*(100/i),g=l,m=s,y=[];g<d+l;){for(;m<c+s;){var x=[g,m,f,u];x=x.join(),y.push({vb:x,innerSize:p,size:h}),m+=u}g+=f,m=s}return y},void 0===n&&(n={}),n.events=function(){var e={};return{on:function(t,i,n){Array.isArray(e[t])||(e[t]=[]),e[t].push({listener:i,event_id:n})},removeAll:function(t){Array.isArray(e[t])||(e[t]=[]),e[t]=[]},removeForEventId:function(t){for(var i in e)if(Array.isArray(e[i]))for(var n=e[i].length-1;0<=n;n--)e[i][n].event_id==t&&e[i].splice(n,1)},publish:function(t,i){if(e[t]){for(var n=[],r=0;r<e[t].length;r++){var o=e[t][r];null!=o.event_id&&o.event_id!=i[0]._event_id||n.push(o.listener)}if(0<n.length){var a=!0;for(r=0;r<n.length;r++)1==i.length?a=n[r](i[0])&&a:2==i.length?a=n[r](i[0],i[1])&&a:3==i.length?a=n[r](i[0],i[1],i[2])&&a:4==i.length?a=n[r](i[0],i[1],i[2],i[3])&&a:5==i.length&&(a=n[r](i[0],i[1],i[2],i[3],i[4])&&a);return a}}}}}(),n.prototype.importCSV=function(){var e=this,t=document.createElement("INPUT");t.setAttribute("type","file"),t.setAttribute("accept",".csv"),t.style.display="none",t.onchange=function(t){var i=t.target,r=new FileReader;r.onload=function(){var t=r.result,i=n._csvToArray(t,","),o=[],a=i[0];n._importSetColumnNames(a,function(t){for(var r=1;r<i.length;r++){for(var a={},l=0;l<i[r].length;l++){var s=t[l],d=i[r][l];if("tags"==s&&""!=d)d=d.split(",");else if("tags"==s&&""==d)continue;a[s]=d}""!=a.id.trim()&&o.push(a)}var c={nodes:o,columnNames:i[0]};0!=n.events.publish("import",[e,c])&&(e.config.nodes=o,e.draw())})},r.readAsText(i.files[0])},t.click()},n._importSetColumnNames=function(e,t){if(-1==e.indexOf("id")||-1==e.indexOf("pid")){var i=document.createElement("DIV"),r=document.createElement("P");r.style.padding="5px",r.style.color="rgb(122, 122, 122)",r.innerHTML=n.IMPORT_MESSAGE,i.appendChild(r);var o=document.createElement("div"),a=document.createElement("div"),l=document.createElement("div"),s=document.createElement("span");o.setAttribute("id","sampleDialog"),o.style.height="260px",o.style.width="400px",o.style.background="white",o.style.border="0.5px solid grey",o.style.position="fixed",o.style.overflow="hidden",o.style.zIndex="99",a.setAttribute("id","title"),a.style.backgroundColor="#e5e5e5",a.style.fontWeight="bold",a.style.color="rgb(122, 122, 122)",a.style.height="20px",a.style.padding="3px 0 0 7px",s.setAttribute("id","close"),s.style.cursor="pointer",s.style.position="absolute",s.style.color="rgb(122, 122, 122)",s.style.fontWeight="bold",s.style.top="2px",s.style.zIndex=100,l.setAttribute("id","content"),l.style.padding="2px",a.innerHTML="Import Organizational Chart Data",s.innerHTML="&times;";var d=document.createElement("HR");d.style.height="0.1px",d.style.backgroundColor="#aeaeae",d.style.border="none",d.style.margin="0",o.appendChild(a),o.appendChild(d),l.appendChild(i),o.appendChild(l),o.appendChild(s),document.body.appendChild(o),n._importCenter(o),s.style.left=o.offsetWidth-20+"px";var c=document.createElement("div");c.setAttribute("id","overlay"),c.style.width="100%",c.style.height="100%",c.style.left=0,c.style.top=0,c.style.position="fixed",c.style.background="grey",c.style.opacity="0.5",c.style.zIndex=98,document.body.appendChild(c),o._overlay=c;var p=document.createElement("LABEL"),h=document.createTextNode("Name:");p.setAttribute("for","id-select"),p.appendChild(h),p.style.fontSize="16px",p.style.color="rgb(122, 122, 122)",p.style.padding="5px",p.style.margin="5px",p.style.width="30%",p.style.textAlign="right",p.style.display="inline-block",i.appendChild(p);var f=document.createElement("SELECT");f.id="id-select",f.style.fontSize="16px",f.style.color="rgb(122, 122, 122)",f.style.padding="5px",f.style.margin="5px",f.style.width="60%",f.style.border="1px solid #aeaeae",i.appendChild(f);var u=document.createElement("BR");i.appendChild(u);for(var g=0;g<e.length;g++){(b=document.createElement("option")).setAttribute("value",e[g]);var m=document.createTextNode(e[g]);b.appendChild(m),f.appendChild(b)}var y=document.createElement("LABEL"),x=document.createTextNode("Reports to:");y.setAttribute("for","pid-select"),y.appendChild(x),y.style.fontSize="16px",y.style.color="rgb(122, 122, 122)",y.style.padding="5px",y.style.margin="5px",y.style.width="30%",y.style.textAlign="right",y.style.display="inline-block",i.appendChild(y);var v=document.createElement("SELECT");for(v.id="pid-select",v.style.fontSize="16px",v.style.color="rgb(122, 122, 122)",v.style.padding="5px",v.style.margin="5px",v.style.width="60%",v.style.border="1px solid #aeaeae",i.appendChild(v),g=0;g<e.length;g++){var b;(b=document.createElement("option")).setAttribute("value",e[g]),m=document.createTextNode(e[g]),b.appendChild(m),v.appendChild(b)}var w=document.createElement("BUTTON");w.innerHTML="Import",w.style.fontSize="16px",w.style.color="rgb(122, 122, 122)",w.style.padding="5px 20px",w.style.margin="20px auto",w.style.display="block",w.onclick=function(){o.style.display="none",o._overlay&&o._overlay.parentNode.removeChild(o._overlay);var i=f.options[f.selectedIndex].value,n=e.indexOf(i);e[n]="id";var r=v.options[v.selectedIndex].value,a=e.indexOf(r);e[a]="pid",t(e)};var _=document.createElement("DIV");return _.appendChild(w),i.appendChild(_),s.onclick=function(e){o._overlay&&o._overlay.parentNode.removeChild(o._overlay),o.parentNode.removeChild(o),e.stopPropagation()},a.onmousedown=function(e){e=e||window.event,o._dragging=!0,o._originalLeft=o.offsetLeft,o._originalTop=o.offsetTop,o._mouseLeft=e.clientX,o._mouseTop=e.clientY},document.onmousemove=function(e){e=e||window.event,o._dragging&&(o.style.left=o._originalLeft+e.clientX-o._mouseLeft+"px",o.style.top=o._originalTop+e.clientY-o._mouseTop+"px")},document.onmouseup=function(e){e=e||window.event,o._dragging&&(o.style.left=o._originalLeft+e.clientX-o._mouseLeft+"px",o.style.top=o._originalTop+e.clientY-o._mouseTop+"px",o._dragging=!1)},o}t(e)},n._importCenter=function(e){e&&(e.style.left=(window.innerWidth-e.offsetWidth)/2+"px",e.style.top=(window.innerHeight-e.offsetHeight)/2+"px")},n.prototype.importXML=function(){var e=this,t=document.createElement("INPUT");t.setAttribute("type","file"),t.setAttribute("accept",".xml"),t.style.display="none",t.onchange=function(t){var i=t.target,r=new FileReader;r.onload=function(){var t=r.result,i=n._xml2json(t);0!=n.events.publish("import",[e,i])&&(e.config.nodes=i,e.draw())},r.readAsText(i.files[0])},t.click()},n.prototype.expand=function(e,t,i){var r={id:e,ids:t};this._draw(!1,n.action.expand,r,i)},n.prototype.collapse=function(e,t,i){var r={id:e,ids:t};this._draw(!1,n.action.collapse,r,i)},n.prototype.expandCollapse=function(e,t,i,r){Array.isArray(t)||(t=[]),Array.isArray(i)||(i=[]);var o={id:e,expandIds:t,collapseIds:i,ids:t.concat(i)};this._draw(!1,n.action.collapse,o,r)},n.prototype.expandCollapseToLevel=function(e,t,i,r){this.config.collapse=t,null==i&&(i={}),this.config.expand=i;var o={id:e,method:"expandCollapseToLevel"};this._draw(!1,n.action.collapse,o,r)},n.prototype.maximize=function(e,t,i,r){var o=this,a={id:e,options:{}};a.options.horizontal=!1,a.options.vertical=!1,t&&(a.options.horizontal=t),i&&(a.options.vertical=i),this._draw(!1,n.action.maximize,a,function(){o.ripple(e),r&&r()})},n.prototype.minimize=function(e,t){var i=this,r={id:e};this._draw(!1,n.action.minimize,r,function(){i.ripple(e),t&&t()})},n.prototype._expCollHandler=function(e){this.nodeMenuUI.hide(),this.nodeContextMenuUI.hide(),this.menuUI.hide();var t=this.getNode(e),i=this.getCollapsedIds(t);
1if(i.length){if(!1===n.events.publish("expcollclick",[this,!1,e,i]))return!1;this.expand(e,i,!1)}else{if(!1===n.events.publish("expcollclick",[this,!0,e,t.childrenIds]))return!1;this.collapse(e,t.childrenIds,!1)}},String.prototype.replaceAll=function(e,t){return this.replace(new RegExp(e,"g"),t)},String.prototype.splice=function(e,t,i){return this.slice(0,e)+i+this.slice(e+Math.abs(t))},String.prototype.insert=function(e,t){return 0<e?this.substring(0,e)+t+this.substr(e):t+this},Array.prototype.has=function(e){for(var t=0;t<this.length;t++)if(this[t]==e)return!0;return!1},"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var i=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(null!=r)for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(i[o]=r[o])}return i},writable:!0,configurable:!0}),"function"!=typeof String.prototype.endsWith&&(String.prototype.endsWith=function(e){return-1!==this.indexOf(e,this.length-e.length)}),n.prototype._globalMouseDownHandler=function(e,t){var i={move:"mousemove",up:"mouseup",leave:"mouseleave"};if(-1!=t.type.indexOf("touch")&&(1==t.touches.length?this._touch={x:t.touches[0].clientX,y:t.touches[0].clientY}:this._touch=null,i={move:"touchmove",up:"touchend",touchstart:"touchstart"}),e==t.target)return t.stopPropagation(),t.preventDefault(),void this._mouseDownHandler(e,t,i);if(this.config.nodeMouseClick==n.action.pan){for(var r=t.target;r!=e&&!r.hasAttribute("control-expcoll-id");)r=r.parentNode;if(!r.hasAttribute("control-expcoll-id"))return t.stopPropagation(),t.preventDefault(),void this._mouseDownHandler(e,t,i)}for(var o=t.target;o!=e;){if(o.hasAttribute("node-id"))return t.stopPropagation(),-1==t.type.indexOf("touch")&&t.preventDefault(),void this._nodeMouseDownHandler(o,t,i);o=o.parentNode}},n.prototype._globalClickHandler=function(e,t){if(-1!=t.type.indexOf("touch")&&this._touch&&1==t.changedTouches.length){if(t.changedTouches.length){var i=t.changedTouches[0].clientX,r=t.changedTouches[0].clientY,o=n.t(this.config.template,!1,this.getScale()).size,a=this.getScale(),l=Math.abs(i-this._touch.x)/a,s=Math.abs(r-this._touch.y)/a;if(this._touch=null,l>o[0]/10)return;if(s>o[1]/10)return}}else if(-1!=t.type.indexOf("touch")&&null==this._touch)return;for(var d=t.target;d!=e;){if(d.hasAttribute("control-expcoll-id")){var c=d.getAttribute("control-expcoll-id"),p=this.getNode(c);return void this._expCollHandler(p.id)}if(d.hasAttribute("node-id"))return c=d.getAttribute("node-id"),p=this.getNode(c),void this._nodeClickHandler(p.id,t);if(d.hasAttribute("control-node-menu-id"))return c=d.getAttribute("control-node-menu-id"),p=this.getNode(c),void this._nodeMenuClickHandler(p.id,d,t);if(d.hasAttribute("control-add"))return void this._lonelyButtonHandler();d=d.parentNode}},n.prototype._globalContextHandler=function(e,t){for(var i=t.target;i!=e;){if(i.hasAttribute("node-id")){var n=i.getAttribute("node-id"),r=this.getNode(n);return void this._nodeContextHandler(r.id,t)}i=i.parentNode}},n.prototype._nodeContextHandler=function(e,t){t.preventDefault(),this.searchUI.hide(),this.nodeMenuUI.hide(),this.nodeContextMenuUI.hide(),this.menuUI.hide();var i=this.get(e),n=null;if(null!=i&&Array.isArray(i.tags))for(var r=0;r<i.tags.length;r++){var o=i.tags[r];this.config.tags[o]&&this.config.tags[o].nodeContextMenu&&(n=this.config.tags[o].nodeContextMenu)}this.nodeContextMenuUI.show(t.pageX,t.pageY,e,null,n)},n.prototype._globalDbClickHandler=function(e,t){for(var i=t.target;i!=e;){if(i.hasAttribute("node-id")){var n=i.getAttribute("node-id"),r=this.getNode(n);return void this._nodeDbClickHandler(r.id,t)}i=i.parentNode}},n.prototype._mouseScrollHandler=function(e,t){if(this.config.mouseScrool!=n.action.ctrlZoom||t.ctrlKey){var i=this,r=!1,o=this.config.zoom.speed,a=this.config.zoom.smooth,l=0,s=this.getScale(),d=n._centerPointInPercent(i.getSvg(),t.pageX,t.pageY),c=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){setTimeout(e,20)};t.preventDefault();var p=t.delta||t.wheelDelta;void 0===p&&(p=-t.detail),p=Math.max(-1,Math.min(1,p)),l+=-p*o,r||function e(){r=!0;var t=(l-s)/a;0<t?t++:t--,s+=t,i.zoom(1-t/12/50,d),parseInt(s)==parseInt(l)?r=!1:c(e)}()}},n.prototype._nodeMouseDownHandler=function(e,t,i){if(this.config.enableDragDrop){var r=n._getClientXY(t),o=e.getAttribute("node-id"),a=this.getNode(o);e._dragEventFired=!1;var l=null,s=null;this._gragStartedId=o,document.body.style.mozUserSelect=document.body.style.webkitUserSelect=document.body.style.userSelect="none";var d=this,c=this.getSvg(),p={x:r.x,y:r.y},h=n._getTransform(e),f=h[4],u=h[5],g=d.getScale(),m=e.cloneNode(!0);c.insertBefore(m,c.firstChild),m.style.opacity=.7;var y=function(e,t){if(null!=e){t.style.opacity=1;for(var i=d.getNode(l),r=n.getStParentNodes(i),o=0;o<r.length;o++){var a=d.getNodeElement(r[o].id);a&&(a.style.opacity=1)}}}
1,x=function(t){if(p){var i=n._getClientXY(t),r=document.elementFromPoint(i.x,i.y),o=n._getOffsetXY(d.element,t),x={left:d.width()-(o.x+d.config.padding)<0,right:o.x-d.config.padding<0,down:d.height()-(o.y+d.config.padding)<0,up:o.y-d.config.padding<0};if(x.left||x.right||x.up||x.down){c.classList&&(c.classList.remove("cursor-grab"),c.classList.add("cursor-move"),c.classList.remove("cursor-nodrop"),c.classList.remove("cursor-copy"));var b=h[4],w=h[5],_=p.x,k=p.y,S=i.x,C=i.y;d.startMove(x,function(e){h[4]=b+e.x,h[5]=w+e.y,p.x=_-e.xWithoutScale,p.y=k-e.yWithoutScale,i.x=S-e.xWithoutScale,i.y=C-e.yWithoutScale,m.setAttribute("transform","matrix("+h.toString()+")")})}else{if(d.stopMove(),c.classList&&(c.classList.add("cursor-grab"),c.classList.remove("cursor-move"),c.classList.remove("cursor-nodrop"),c.classList.remove("cursor-copy")),y(l,s),s=l=null,d.config.enableDragDrop)for(;null!=r&&r!=c;){if(r.hasAttribute&&r.hasAttribute("node-id")){var I=r.getAttribute("node-id");if(d._gragStartedId&&I!=d._gragStartedId){l=I,s=r;break}}r=r.parentNode}if(null!=l){s.style.opacity=.5;for(var A=d.getNode(l),L=n.getStParentNodes(A),E=0;E<L.length;E++){var M=d.getNodeElement(L[E].id);M&&(M.style.opacity=.1)}!d._canUpdateLink(a.id,l)&&c.classList?(c.classList.remove("cursor-grab"),c.classList.remove("cursor-move"),c.classList.remove("cursor-copy"),c.classList.add("cursor-nodrop")):c.classList&&(c.classList.remove("cursor-grab"),c.classList.remove("cursor-move"),c.classList.add("cursor-copy"),c.classList.remove("cursor-nodrop"))}var N=(i.x-p.x)/g,P=(i.y-p.y)/g;h[4]=f+N,h[5]=u+P,!e._dragEventFired&&(Math.abs(i.x-p.x)>n.FIRE_DRAG_NOT_CLICK_IF_MOVE||Math.abs(i.y-p.y)>n.FIRE_DRAG_NOT_CLICK_IF_MOVE)&&(!1===n.events.publish("drag",[d,I])&&v(),e._dragEventFired=!0),m.setAttribute("transform","matrix("+h.toString()+")")}}},v=function(e){if(d.stopMove(),c.classList&&(c.classList.remove("cursor-grab"),c.classList.remove("cursor-move"),c.classList.remove("cursor-nodrop"),c.classList.remove("cursor-copy")),c.removeEventListener(i.move,x),c.removeEventListener(i.up,v),i.leave&&c.removeEventListener(i.leave,v),a.id==l||null==l)return c.removeChild(m),void(d._gragStartedId=null);var t=d.getNode(l);if(!1===n.events.publish("drop",[d,a.id,t.id]))return y(l,s),c.removeChild(m),void(d._gragStartedId=null);if(d._canUpdateLink(a.id,l)){var r=d.get(a.id);r.pid=l,r.stpid=null,d.updateNode(r,null,!0)}else c.removeChild(m),y(l,s);d._gragStartedId=null};c.addEventListener(i.move,x),c.addEventListener(i.up,v),i.leave&&c.addEventListener(i.leave,v)}},n.prototype._resizeHandler=function(e,t){var i=this.getViewBox(),r=this.getSvg(),o=r.getAttribute("width"),a=r.getAttribute("height"),l=o/i[2],s=a/i[3],d=s<l?s:l;r.setAttribute("width",this.width()),r.setAttribute("height",this.height()),i[2]=this.width()/d,i[3]=this.height()/d,this.setViewBox(i),this.xScrollUI.create(this.width()),this.yScrollUI.create(this.height()),this._draw(!1,n.action.resize)},n.prototype._nodeDbClickHandler=function(e,t){if(!1===n.events.publish("dbclick",[this,this.get(e)]))return!1;this._commonClickHandler(e,t,this.config.nodeMouseDbClick)},n.prototype._nodeClickHandler=function(e,t){var i=this.getNodeElement(e);if(i._dragEventFired)i._dragEventFired=!1;else{if(!1===n.events.publish("click",[this,{node:this.getNode(e),event:t}]))return!1;this._commonClickHandler(e,t,this.config.nodeMouseClick)}},n.prototype._commonClickHandler=function(e,t,i){this.searchUI.hide(),this.nodeMenuUI.hide(),this.nodeContextMenuUI.hide(),this.menuUI.hide();var r=this.getNode(e);if(i==n.action.expandCollapse){var o=this.getCollapsedIds(r);if(o.length){if(!1===n.events.publish("expcollclick",[this,!1,e,o]))return!1;this.expand(e,o,!1)}else{if(!1===n.events.publish("expcollclick",[this,!0,e,r.childrenIds]))return!1;this.collapse(e,r.childrenIds,!1)}this.ripple(r.id,t.clientX,t.clientY)}i==n.action.edit&&(this.editUI.show(r.id),this.ripple(r.id,t.clientX,t.clientY)),i==n.action.details&&(this.editUI.show(r.id,!0),this.ripple(r.id,t.clientX,t.clientY))},n.prototype._menuHandlerMouseDownHandler=function(e,t){t.stopPropagation(),t.preventDefault()},n.prototype._nodeMenuClickHandler=function(e,t,i){this.searchUI.hide(),this.nodeMenuUI.hide(),this.nodeContextMenuUI.hide(),this.menuUI.hide();var n=this.getNode(e),r=null;if(Array.isArray(n.tags))for(var o=0;o<n.tags.length;o++){var a=n.tags[o];this.config.tags[a]&&this.config.tags[a].nodeMenu&&(r=this.config.tags[a].nodeMenu)}this.nodeMenuUI.showStickIn(t,e,null,r)},n.prototype._exportMenuClickHandler=function(e,t){t.stopPropagation(),t.preventDefault(),this.nodeMenuUI.hide(),this.nodeContextMenuUI.hide(),this.menuUI.show(e.offsetLeft,e.offsetTop)},n.prototype._lonelyButtonHandler=function(){!1!==this.addNode({id:this.generateId()},null,!0)&&this.center(r.id)},n.prototype._move=function(e,t,i){i[0]=t,i[1]=e,this.setViewBox(i),this.xScrollUI.setPosition(),this.yScrollUI.setPosition()},n.prototype.startMove=function(e,t){if(e){if(this._movePosition=e,!this._moveInterval){var i=this,r=this.getViewBox().slice(0),o=this.getScale(),a=0,l=0;this._moveInterval=setInterval(function(){var e={x:0,y:0,xWithoutScale:0,yWithoutScale:0};i._movePosition.left&&(a++,e.x=a*n.MOVE_STEP/o,e.xWithoutScale=a*n.MOVE_STEP),i._movePosition.right&&(a++,e.x=-a*n.MOVE_STEP/o,e.xWithoutScale=-a*n.MOVE_STEP),i._movePosition.up&&(l++,e.y=-l*n.MOVE_STEP/o,e.yWithoutScale=-l*n.MOVE_STEP),i._movePosition.down&&(l++,e.y=l*n.MOVE_STEP/o,e.yWithoutScale=l*n.MOVE_STEP),i.setVie
1wBox([r[0]+e.x,r[1]+e.y,r[2],r[3]]),i.xScrollUI.setPosition(),i.yScrollUI.setPosition(),t&&t(e)},n.MOVE_INTERVAL)}}else console.error("movePosition parameter not defined")},n.prototype.stopMove=function(){this._moveInterval&&(clearInterval(this._moveInterval),this._moveInterval=null,this._movePosition=null)},void 0===n&&(n={}),n.node=function(e,t,i,n){this.templateName=n,this.id=e,this.pid=t,this.children=[],this.childrenIds=[],this.parent=null,this.stpid=null,this.stParent=null,this.stChildren=[],this.stChildrenIds=[],this.tags=i,this.tags||(this.tags=[])};var r=new n.node;n.prototype._mouseDownHandler=function(e,t,i){var r=this;document.body.style.mozUserSelect=document.body.style.webkitUserSelect=document.body.style.userSelect="none",this.editUI.hide(),this.searchUI.hide(),this.nodeMenuUI.hide(),this.nodeContextMenuUI.hide(),this.menuUI.hide();var o=this.getViewBox(),a=this.getScale(),l=n._getClientTouchesXY(t,0),s=n._getClientTouchesXY(t,1),d={diffX:0,diffY:0,x0:l.x,y0:l.y,type:"pan",viewBoxLeft:o[0],viewBoxTop:o[1]};t.touches&&1<t.touches.length&&(d.type="pinch",d.dist=Math.sqrt((l.x-s.x)*(l.x-s.x)+(l.y-s.y)*(l.y-s.y)));var c=this.getPointerElement();if("pan"==d.type){this._hideBeforeAnimation();var p=n._getOffsetXY(this.element,t),h=p.x/a+o[0]-16/a,f=p.y/a+o[1]-16/a;c.style.display="inherit",c.setAttribute("transform","matrix(0,0,0,0,"+h+","+f+")"),n.anim(c,{transform:[0,0,0,0,h,f],opacity:0},{transform:[1/a,0,0,1/a,h,f],opacity:1},300,n.anim.outBack)}var u=function(e){var t=n._getClientTouchesXY(e,0);if(d&&"pan"==d.type){r._hideBeforeAnimation(),d.diffX=t.x-d.x0,d.diffY=t.y-d.y0;var i=-d.diffY/a+d.viewBoxTop,l=-d.diffX/a+d.viewBoxLeft;r._move(i,l,o)}else if(d&&"pinch"==d.type){var s=n._getClientTouchesXY(e,1),c=Math.sqrt((t.x-s.x)*(t.x-s.x)+(t.y-s.y)*(t.y-s.y)),p=1+(c-d.dist)/(d.dist/100)/100;d.dist=c;var h=n._pinchMiddlePointInPercent(r.element,r.width(),r.height(),e);r.zoom(p,h)}},g=function(){"pan"==d.type&&r.config.sticky?n._moveToBoundaryArea(e,r.getViewBox(),r.response.boundary,function(){r._draw(!0,n.action.pan)}):"pan"!=d.type||r.config.sticky||r._draw(!0,n.action.pan),d=null,c.style.display="none",e.removeEventListener(i.move,u),e.removeEventListener(i.up,g),i.leave&&e.removeEventListener(i.leave,g),i.touchstart&&e.removeEventListener(i.touchstart,g)};e.addEventListener(i.move,u),e.addEventListener(i.up,g),i.leave&&e.addEventListener(i.leave,g),i.touchstart&&e.addEventListener(i.touchstart,g)},void 0===n&&(n={}),n.local={},n.local._setPositions=function(e,t,i){for(var r={},o=0;o<e.length;o++)if((d=e[o]).stContainerNodes)for(var a=d.stContainerNodes.length-1;0<=a;a--){var l=d.stContainerNodes[a],s=n.local._walk(l.stChildren,t);l.w=s.maxX-s.minX+l.padding[3]+l.padding[1],l.h=s.maxY-s.minY+l.padding[0]+l.padding[2],l._m&&(l._m.w=l.w,l._m.h=l.h),r[l.id]=s}for(n.local._walk(e,t),o=0;o<e.length;o++){var d;if((d=e[o]).stContainerNodes)for(a=0;a<d.stContainerNodes.length;a++)for(var c=(l=d.stContainerNodes[a]).x,p=l.y,h=0;h<l.stChildren.length;h++){var f=l.stChildren[h];n.local._lastWalk(f,c,p,r[l.id],l.padding)}}i()},n.local._walk=function(e,t){for(var i={minX:null,minY:null,maxX:null,maxY:null},r=[],o=[],a=[],l=0;l<e.length;l++){var s=t[e[l].lcn?e[l].lcn:"base"];0==l-(d=parseInt(l/s.columns))*s.columns&&(a=[]),n.local._firstWalk(e[l],0,r,a,s)}for(l=0;l<e.length;l++){s=t[e[l].lcn?e[l].lcn:"base"],d=parseInt(l/s.columns),s.columns;var d,c=0;switch(0<d&&(c=o[d-1]+s.siblingSeparation),n.local._secondWalk(e[l],0,0,c,r,i,s),o[d]=i.maxY-i.minY,s.orientation){case n.orientation.right:case n.orientation.right_top:case n.orientation.left:case n.orientation.left_top:o[d]=i.maxX-i.minX}}return i},n.local._firstWalk=function(e,t,i,r,o){if(!e.isPartner){var a=null;if(e.x=0,e.y=0,e._prelim=0,e._modifier=0,e.leftNeighbor=null,e.rightNeighbor=null,n.local._setLevelMaxNodeHeight(e,t,i,o),n.local._setNeighbors(e,t,r),n.local._hasChildren(e)&&t!=n.MAX_DEPTH){for(var l=e.children.length,s=0;s<l;s++)n.local._firstWalk(e.children[s],t+1,i,r,o);var d=n.local._fChild(e),c=e.children[e.children.length-1],p=d._prelim+(c._prelim-d._prelim)/2+n.local._leftMidPoint(c,o);d.isAssistant&&c.isAssistant&&(p=d._prelim+(c._prelim-d._prelim)/2+n.local._leftMidPoint(d,o)),p-=n.local._mid(e,o),null!=(a=n.local._getLeftSibling(e))?(h=o.siblingSeparation,e.isAssistant&&e.isSplit?h=o.assistantSeparation:2==a.layout?h=o.mixed
1HierarchyNodesSeparation:a.parent&&4==a.parent.hasPartners&&o.orientation<=3&&(f=n.local._size(a.parent,o),u=n.local._rightMidPoint(a,o),(h=15*a.parent.partnerSeparation+f/2-u)<o.siblingSeparation&&(h=o.siblingSeparation)),e._prelim=a._prelim+n.local._nodeWithPartnersSize(a,o)+h,e._modifier=e._prelim-p,n.local._apportion(e,t,o)):o.orientation<=3?e._prelim=p:e._prelim=0}else if(null!=(a=n.local._getLeftSibling(e))){var h=o.siblingSeparation;if(e.isAssistant)h=o.assistantSeparation;else if(2==a.layout)h=o.mixedHierarchyNodesSeparation;else if(a.parent&&4==a.parent.hasPartners&&o.orientation<=3){var f=n.local._size(a.parent,o),u=n.local._rightMidPoint(a,o);(h=a.parent.partnerSeparation+f/2-u)<o.siblingSeparation&&(h=o.siblingSeparation)}e._prelim=a._prelim+n.local._nodeWithPartnersSize(a,o)+h}else e._prelim=0}},n.local._secondWalk=function(e,t,i,r,o,a,l){if(t<=n.MAX_DEPTH&&!e.isPartner){var s,d,c=e._prelim+i,p=r;switch(s=o[t],d=n.local._getNodeHeight(e,l),e.x=c,e.y=p,e.hasPartners&&n.local.nodeHasPartnersPosition(e,l,s),(e.isSplit||e.isAssistant||2==e.layout)&&(e.y=p+s/2-d/2),l.orientation){case n.orientation.right:case n.orientation.right_top:case n.orientation.left:case n.orientation.left_top:var h=e.x;e.x=e.y,e.y=h}switch(l.orientation){case n.orientation.bottom:case n.orientation.bottom_left:e.y=-e.y-d;break;case n.orientation.right:case n.orientation.right_top:e.x=-e.x-d}if(n._setMinMaxXY(e,a),0!=e.children){var f=l.levelSeparation;e.layout!=n.mixed&&e.layout!=n.tree||(f=l.mixedHierarchyNodesSeparation);var u=0;if(n.local._secondWalk(e.children[u],t+1,i+e._modifier,r+s+f,o,a,l),e.children[u].isPartner){for(;e.children.length-1>u&&e.children[u].isPartner;)u++;n.local._secondWalk(e.children[u],t+1,i+e._modifier,r+s+f,o,a,l)}}var g=n.local._getRightSibling(e);null!=g&&n.local._secondWalk(g,t,i,r,o,a,l)}else n.local.nodeIsPartnerPosition(e,l,o,t)},n.local._lastWalk=function(e,t,i,r,o){e.x+=t+o[3]-r.minX,e.y+=i+o[0]-r.minY;for(var a=e.children.length,l=0;l<a;l++){var s=e.children[l];n.local._lastWalk(s,t,i,r,o)}},n.local._apportion=function(e,t,i){if(!e.isPartner)for(var r=n.local._fChild(e),o=r.leftNeighbor,a=1,l=n.MAX_DEPTH-t;null!=r&&null!=o&&a<=l;){for(var s=0,d=0,c=r,p=o,h=0;h<a;h++)c=c.parent,p=p.parent,s+=c._modifier,d+=p._modifier;var f=i.subtreeSeparation;e.leftNeighbor&&2==e.leftNeighbor.layout&&(f=0);var u=o._prelim+d+n.local._nodeWithPartnersSize(o,i)+f-(r._prelim+s);if(0<u){for(var g=e,m=0;null!=g&&g!=p;g=n.local._getLeftSibling(g))m++;if(null!=g)for(var y=e,x=u/m;y!=p;y=n.local._getLeftSibling(y))y._prelim+=u,y._modifier+=u,u-=x}a++,null!=(r=n.local._hasChildren(r)?n.local._fChild(r):n.local._getLeftmost(e,0,a))&&(o=r.leftNeighbor)}},n.local._setLevelMaxNodeHeight=function(e,t,i,r){null==i[t]&&(i[t]=0);var o=n.local._getNodeHeight(e,r);i[t]<o&&(i[t]=o)},n.local._setNeighbors=function(e,t,i){i[t]&&i[t].id===e.id||(e.leftNeighbor=i[t],null!=e.leftNeighbor&&(e.leftNeighbor.rightNeighbor=e),e.isPartner||(i[t]=e))},n.local._nodeWithPartnersSize=function(e,t){switch(t.orientation){case n.orientation.top:case n.orientation.top_left:case n.orientation.bottom:case n.orientation.bottom_left:return n.local._getPartnerRightPanelWidth(e,t)+e.w+n.local._getPartnerLeftPanelWidth(e,t);case n.orientation.right:case n.orientation.right_top:case n.orientation.left:case n.orientation.left_top:return n.local._getPartnerRightPanelHeight(e,t)+e.h+n.local._getPartnerLeftPanelHeight(e,t)}return 0},n.local._size=function(e,t){switch(t.orientation){case n.orientation.top:case n.orientation.top_left:case n.orientation.bottom:case n.orientation.bottom_left:return e.w;case n.orientation.right:case n.orientation.right_top:case n.orientation.left:case n.orientation.left_top:return e.h}return 0},n.local._leftMidPoint=function(e,t){switch(t.orientation){case n.orientation.top:case n.orientation.top_left:case n.orientation.bottom:case n.orientation.bottom_left:return n.local._getPartnerLeftPanelWidth(e,t)+e.w/2;case n.orientation.right:case n.orientation.right_top:case n.orientation.left:case n.orientation.left_top:return n.local._getPartnerLeftPanelHeight(e,t)+e.h/2}return 0},n.local._rightMidPoint=function(e,t){switch(t.orientation){case n.orientation.top:case n.orientation.top_left:case n.orientation.bottom:case n.orientation.bottom_left:return n.local._getPartnerRightPanelWidth(e,t)+e.w/2;case n.orientation.right:case n.orientation.right_top:case n.orientation.left:case n.orientation.left_top:return n.local._getPartnerRightPanelHeight(e,t)+e.h/2}return 0},n.local._mid=function(e,t){switch(t.orientation){case n.orientation.top:case n.orientation.top_left:case n.orientation.bottom:case n.orientation.bottom_left:switch(e.hasPartners){case 2:return n.local._getPartnerLeftPanelWidth(e,t)-e.partnerSeparation/2;case 3:return n.local._getPartnerLeftPanelWidth(e,t)+e.w+e.partnerSeparation/2;case 4:if(t.orientation<=3){var i=n.local._rightMidPoint(n.local._fChild(e),t),r=n.local._leftMidPoint(e.children[e.children.length-1],t);return n.local._getPartnerLeftPanelWidth(e,t)+e.w/2+(r-i)/2}return n.local._getPartnerLeftPanelWidth(e,t)+e.w/2;default:return n.local._getPartnerLeftPanelWidth(e,t)+e.w/2}case n.orientation.right:case n.orientation.right_top:case n.orientation.left:case n.orientation.left_top:switch(e.hasPartners){case 2:return n.local._getPartnerLeftPanelHeight(e,t)-e.partnerSeparation/2;case 3:return n.local._getPartnerLeftPanelHeight(e,t)+e.h+e.partnerSeparation/2;case 4:return t.orientation<=3?(i=n.local._rightMidPoint(n.local._fChild(e),t),r=n.local._leftMidPoint(e.children[e.children.length-1],t),n.local._getPartnerLeftPanelHeight(e,t)+e.h/2+(r-i)/2):n.local._getPartnerLeftPanelHeight(e,t)+e.h/2;default:return n.local._getPartnerLeftPanelHeight(e,t)+e.h/2}}return 0},n.local._getNodeHeight=function(e,t){switch(t.orientation){case n.orientation.top:case n.orientation.top_left:case n.orientation.bottom:case n.orientation.bottom_left:return Math.max(n.local._getPartnerRightPanelHeight(e,t),e.h,n.local._getPartnerLeftPanelHeight(e,t));case n.orientation.right:case n.orientation.right_top:case n.orientation.left:case n.orientation.left_top:return Math.max(n.local._getPartnerRightPanelWidth(e,t),e.w,n.local._getPartnerLeftPanelWidth(e,t))}return 0},n.local._getLeftSibling=function(e){return null!=e.leftNeighbor&&e.leftNeighbor.parent==e.parent?e.leftNeighbor:null},n.local._getRightSibling=function(e){return null!=e.rightNeighbor&&e.rightNeighbor.parent==e.parent?e.rightNeighbor:null},n.local._getLeftmost=function(e,t,i){if(i<=t)return e;if(!n.local._hasChildren(e))return null;for(var r=e.children.length,o=0;o<r;o++){var a=e.children[o],l=n.local._getLeftmost(a,t+1,i);if(null!=l)return l}return null},n.local.nodeHasPartnersPosition=function(e,t,i){switch(t.orientation){case n.orientation.top:case n.orientation.top_left:case n.orientation.bottom:case n.orientation.bottom_left:var r=n.local._getPartnerLeftPanelWidth(e,t);e.x+=r,e.h<i&&(t.orientation==n.orientation.bottom||t.orientation==n.orientation.bottom_left?e.y-=(i-e.h)/2:e.y+=(i-e.h)/2);break;case n.orientation.right:case n.orientation.right_top:case n.orientation.left:case n.orientation.left_top:var o=n.local._getPartnerLeftPanelHeight(e,t);e.x+=o,e.w<i&&(t.orientation==n.orientation.right||t.orientation==n.orientation.right_top?e.y-=(i-e.w)
1/2:e.y+=(i-e.w)/2)}},n.local.nodeIsPartnerPosition=function(e,t,i,r){var o=0,a=0,l=0,s=0,d=0,c=0,p=0,h=0,f=!0,u=!0;switch(t.orientation){case n.orientation.top:case n.orientation.top_left:case n.orientation.bottom:case n.orientation.bottom_left:o=n.local._getPartnerLeftPanelHeight(e.parent,t),a=n.local._getPartnerRightPanelHeight(e.parent,t);for(var g=0;g<e.parent.children.length;g++)1==(m=e.parent.children[g]).isPartner?(l=e.parent.x+e.parent.w+e.parent.partnerSeparation,f?(s=e.parent.y-(i[r-1]-e.parent.h)/2+(i[r-1]-a)/2,h=m.h,f=!1):(s+=h+t.partnerNodeSeparation,h=m.h),m.x=l,m.y=s):2==m.isPartner&&(d=e.parent.x-m.w-e.parent.partnerSeparation,u?(c=e.parent.y-(i[r-1]-e.parent.h)/2+(i[r-1]-o)/2,p=m.h,u=!1):(c+=p+t.partnerNodeSeparation,p=m.h),m.x=d,m.y=c);break;case n.orientation.right:case n.orientation.right_top:case n.orientation.left:case n.orientation.left_top:for(o=n.local._getPartnerLeftPanelWidth(e.parent,t),a=n.local._getPartnerRightPanelWidth(e.parent,t),g=0;g<e.parent.children.length;g++){var m;(m=e.parent.children[g])&&(1==m.isPartner?(s=e.parent.y+e.parent.h+e.parent.partnerSeparation,f?(l=e.parent.x-(i[r-1]-e.parent.w)/2+(i[r-1]-a)/2,h=m.w,f=!1):(l+=h+t.partnerNodeSeparation,h=m.w),m.x=l,m.y=s):2==m.isPartner&&(c=e.parent.y-m.h-e.parent.partnerSeparation,u?(d=e.parent.x-(i[r-1]-e.parent.w)/2+(i[r-1]-o)/2,p=m.w,u=!1):(d+=p+t.partnerNodeSeparation,p=m.w),m.x=d,m.y=c))}}},n.local._getPartnerRightPanelWidth=function(e,t){if(!e.hasPartners)return 0;var i=0;switch(t.orientation){case n.orientation.top:case n.orientation.top_left:case n.orientation.bottom:case n.orientation.bottom_left:for(var r=0;r<e.children.length;r++)1==(o=e.children[r]).isPartner&&o.w>i&&(i=o.w);return i&&(i+=e.partnerSeparation),i;case n.orientation.right:case n.orientation.right_top:case n.orientation.left:case n.orientation.left_top:for(r=0;r<e.children.length;r++){var o;1==(o=e.children[r]).isPartner&&(i+=o.w+t.partnerNodeSeparation)}return i&&(i-=t.partnerNodeSeparation),i}},n.local._getPartnerLeftPanelWidth=function(e,t){if(!e.hasPartners)return 0;var i=0;switch(t.orientation){case n.orientation.top:case n.orientation.top_left:case n.orientation.bottom:case n.orientation.bottom_left:for(var r=0;r<e.children.length;r++)2==(o=e.children[r]).isPartner&&o.w>i&&(i=o.w);return i&&(i+=e.partnerSeparation),i;case n.orientation.right:case n.orientation.right_top:case n.orientation.left:case n.orientation.left_top:for(r=0;r<e.children.length;r++){var o;2==(o=e.children[r]).isPartner&&(i+=o.w+t.partnerNodeSeparation)}return i&&(i-=t.partnerNodeSeparation),i}},n.local._getPartnerRightPanelHeight=function(e,t){if(!e.hasPartners)return 0;var i=0;switch(t.orientation){case n.orientation.top:case n.orientation.top_left:case n.orientation.bottom:case n.orientation.bottom_left:for(var r=0;r<e.children.length;r++)1==(o=e.children[r]).isPartner&&(i+=o.h+t.partnerNodeSeparation);return i&&(i-=t.partnerNodeSeparation),i;case n.orientation.right:case n.orientation.right_top:case n.orientation.left:case n.orientation.left_top:for(r=0;r<e.children.length;r++){var o;1==(o=e.children[r]).isPartner&&o.h>i&&(i=o.h)}return i&&(i+=e.partnerSeparation),i}},n.local._getPartnerLeftPanelHeight=function(e,t){if(!e.hasPartners)return 0;var i=0;switch(t.orientation){case n.orientation.top:case n.orientation.top_left:case n.orientation.bottom:case n.orientation.bottom_left:for(var r=0;r<e.children.length;r++)2==(o=e.children[r]).isPartner&&(i+=o.h+t.partnerNodeSeparation);return i&&(i-=t.partnerNodeSeparation),i;case n.orientation.right:case n.orientation.right_top:case n.orientation.left:case n.orientation.left_top:for(r=0;r<e.children.length;r++){var o;2==(o=e.children[r]).isPartner&&o.h>i&&(i=o.h)}return i&&(i+=e.partnerSeparation),i}},n.local._fChild=function(e){for(var t=0;t<e.children.length&&e.children[t].isPartner;)t++;return e.children[t]},n.local._hasChildren=function(e){for(var t=0;t<e.children.length;t++)if(!e.children[t].isPartner)return!0;return!1},n.searchUI=function(){},n.searchUI.prototype.init=function(e){this.obj=e},n.searchUI.prototype.hide=function(){var e=this.obj.element.querySelector('[data-id="search"]');if(e){var t=e.querySelector('[data-id="cell-1"]'),i=this.obj.element.getElementsByTagName("input")[0],r=this.obj.element.querySelector('[data-id="container"]');i.value="",r.innerHTML="","none"!=t.style.display&&"none"!=e.style.display&&n.anim(t,{opacity:t.style.opacity},{opacity:0}
1,200,n.anim.inOutSin,function(){t.style.display="none",n.anim(e,{width:300,opacity:1},{width:50,opacity:0},300,n.anim.inBack,function(){e.style.display="none"})})}},n.searchUI.prototype.show=function(e){var t=this.obj.element.querySelector('[data-id="search"]'),i=t.querySelector('[data-id="cell-1"]');i.style.display="none",t.style.width="50px",t.style.display="block",t.style.opacity=0,n.anim(t,{width:50,opacity:0},{width:300,opacity:1},300,n.anim.outBack,function(){i.style.display="inherit",i.style.opacity=0,n.anim(i,{opacity:0},{opacity:1},200,n.anim.inOutSin),e&&e()})},n.searchUI.prototype.addSearchControl=function(){var e=this,t=document.createElement("div");t.innerHTML=n.searchUI.createSearchIcon(this.obj.config.padding),t.innerHTML+=n.searchUI.createInputField(this.obj.config.padding),this.obj.element.appendChild(t);var i=this.obj.element.querySelector('[data-id="search-icon"]'),r=this.obj.element.querySelector('[data-id="search"]'),o=this.obj.element.getElementsByTagName("input")[0];i.addEventListener("mouseover",function(){e.show()}),r.addEventListener("mouseleave",function(){document.activeElement!=o&&e.hide()}),r.addEventListener("click",function(){o.focus()}),o.addEventListener("keypress",function(e){13==e.keyCode&&e.preventDefault()}),o.addEventListener("keyup",function(t){40==t.keyCode?a():38==t.keyCode?l():13==t.keyCode?s():27==t.keyCode?e.hide():e._serverSearch(this.value)});var a=function(){var e=r.querySelectorAll("[data-search-item-id]"),t=r.querySelector('[data-selected="yes"]');null==t&&0<e.length?(e[0].setAttribute("data-selected","yes"),e[0].style.backgroundColor="#F0F0F0"):0<e.length&&t.nextSibling&&(t.setAttribute("data-selected","no"),t.style.backgroundColor="inherit",t.nextSibling.setAttribute("data-selected","yes"),t.nextSibling.style.backgroundColor="#F0F0F0")},l=function(){var e=r.querySelectorAll("[data-search-item-id]"),t=r.querySelector('[data-selected="yes"]');null==t&&0<e.length?(e[e.length-1].setAttribute("data-selected","yes"),e[e.length-1].style.backgroundColor="#F0F0F0"):0<e.length&&t.previousSibling&&(t.setAttribute("data-selected","no"),t.style.backgroundColor="inherit",t.previousSibling.setAttribute("data-selected","yes"),t.previousSibling.style.backgroundColor="#F0F0F0")},s=function(){var t=r.querySelector('[data-selected="yes"]');if(t){var i=t.getAttribute("data-search-item-id"),o=n.events.publish("searchclick",[e.obj,i]);null!=o&&1!=o||e.obj.center(i)}}},n.searchUI.prototype.find=function(e){var t=this;this.show(function(){var i=t.obj.element.getElementsByTagName("input")[0];i.value=e,t._serverSearch(e),i.focus()})},n.searchUI.prototype._serverSearch=function(e){for(var t=this,i=this.obj.element.querySelector('[data-id="container"]'),r=this.obj.element.querySelector('[data-id="search"]'),o=n._search.search(this.obj.config.nodes,e,this.obj.config.searchFields,this.obj.config.searchFields,this.obj.config.searchDisplayField,this.obj.config.searchFieldsWeight),a=n._getFistImgField(this.obj.config),l="",s=0;s<o.length&&!(s>=n.SEARCH_RESULT_LIMIT);s++){var d=o[s],c="";if(a){var p=this.obj._get(d.id);"function"==typeof a?c=a(this.obj,this.obj.getNode(d.id),p):p[a]&&(c=p[a]),c&&(c='<img style="padding: 2px 0px  2px 7px;width:32px;height:32px;" src="'+c+'" / >')}var h="",f="";this.obj.config.searchDisplayField==d.__searchField?h=d.__searchMarks:this.obj.config.searchDisplayField?(h=d[this.obj.config.searchDisplayField],n.isNullOrEmpty(h)&&(h=""),f=d.__searchMarks):h=d.__searchMarks,l+=n.searchUI.createItem(c,d.id,h,f)}i.innerHTML=l;var u=r.querySelectorAll("[data-search-item-id]");for(s=0;s<u.length;s++)u[s].addEventListener("click",function(){var e=n.events.publish("searchclick",[t.obj,this.getAttribute("data-search-item-id")]);null!=e&&1!=e||t.obj.center(this.getAttribute("data-search-item-id"))}),u[s].addEventListener("mouseover",function(){this.setAttribute("data-selected","yes"),this.style.backgroundColor="#F0F0F0"}),u[s].addEventListener("mouseleave",function(){this.style.backgroundColor="inherit",this.setAttribute("data-selected","no")})},n.searchUI.createInputField=function(e){return'<div data-id="search" style="display:none;border-radius: 20px 20px;padding:5px; box-shadow: #808080 0px 1px 2px 0px; font-family:Roboto-Regular, Helvetica;color:#7a7a7a;font-size:14px;border:1px solid #d7d7d7;width:300px;position:absolute;top:'+e+"px;left:"+e+'px;background-color:#ffffff;"><div><div style="float:left;">'+n.icon.search(32,32,"#757575")+'</div><div data-id="cell-1" style="float:right; width:83%"><input placeholder="'+n.SEARCH_PLACEHOLDER+'" style="font-size:14px;font-family:Roboto-Regular, Helvetica;color:#7a7a7a;width:100%;border:none;outline:none; padding-top:10px;" type="text" /></div><div style="clear:both;"></div></div><div data-id="container"></div></div>'},n.searchUI.createItem=function(e,t,i,n){return'<div data-search-item-id="'+t+'" style="border-top:1px solid #d7d7d7; padding: 7px 0 7px 0;cursor:pointer;"><div style="float:left;">'+e+'</div><div style="float:right; width:83%"><div style="overflow:hidden; white-space: nowrap;text-overflow:ellipsis;text-align:left;">'+i+'</div><div style="overflow:hidden; white-space: nowrap;text-overflow:ellipsis;text-align:left;">'+n+'</div></div><div style="clear:both;"></div></div>'},n.searchUI.createSearchIcon=function(e){return'<div data-id="search-icon" style="padding:5px; position:absolute;top:'+e+"px;left:"+e+'px;border:1px solid transparent;"><div><div style="float:left;">'+n.icon.search(32,32,"#757575")+"</div></div></div>"},void 0===n&&(n={}),n.server=function(e,t){this.config=e,this.layoutConfigs=t,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.bordersByRo
1otIdAndLevel=null,this.roots=null,this.state=null,this.vbIsInitializedFromState=!1},n.server.prototype.read=function(e,t,i,r,o,a,l,s){var d=this;n.state._get(this.config.state,t,i,function(c){d.state=c,d.action=o,d.actionParams=a,o==n.action.init&&d.state?(d.viewBox=d.state.vb,d.vbIsInitializedFromState=!0):(d.viewBox=r,d.vbIsInitializedFromState=!1);var p=d.maxX,h=d.maxY,f=d.minX,u=d.minY,g=d.bordersByRootIdAndLevel,m=d.roots,y=d.nodes;if(e){var x=n.server._getResponse(t,i,d.visibleNodeIds,d.config,p,h,f,u,d.viewBox,m,d.action,d.actionParams,y,d.oldNodes,d.vbIsInitializedFromState);o!=n.action.exporting&&(d.maxX=p,d.maxY=h,d.minX=f,d.minY=u,d.roots=m,d.nodes=y,d.visibleNodeIds=x.visibleNodeIds),x.bordersByRootIdAndLevel=g,x.roots=m,x.adjustify={x:0,y:0},d.state&&(x.adjustify=d.state.adjustify),l(x)}else d.oldNodes=y||null,d._read(function(e){p=e.maxX,h=e.maxY,f=e.minX,u=e.minY,g=e.bordersByRootIdAndLevel,m=e.roots,y=e.nodes;var r=n.server._getResponse(t,i,d.visibleNodeIds,d.config,p,h,f,u,d.viewBox,m,d.action,d.actionParams,y,d.oldNodes,d.vbIsInitializedFromState);r.notif=e.limit,r.roots=m,r.bordersByRootIdAndLevel=g,r.adjustify=e.adjustify,o!=n.action.exporting&&(d.maxX=p,d.maxY=h,d.minX=f,d.minY=u,d.roots=m,d.nodes=y,d.visibleNodeIds=r.visibleNodeIds,d.bordersByRo
1otIdAndLevel=g),l(r)},s)})},n.server.prototype._read=function(e,t){var i=this,r=n.server._createNodes(i.config,i.layoutConfigs,i.action,i.actionParams,i.oldNodes,i.state);t(r);var o=r.nodes,a=r.roots,l=n.remote;null==l&&(l=n.local),l._setPositions(a,i.layoutConfigs,function(t){var r=n.server._doNotChangePositionOfClickedNodeIfAny(a,o,i.action,i.actionParams,i.oldNodes,i.config.orientation);i.state&&i.action==n.action.init&&(r=i.state.adjustify);for(var l={minX:null,minY:null,maxX:null,maxY:null},s={},d=0;d<a.length;d++)n.server._setMinMaxXYAdjustifyIterate(a[d],a[d],l,0,s,r,i.config.orientation);e({minX:l.minX,minY:l.minY,maxX:l.maxX,maxY:l.maxY,bordersByRootIdAndLevel:s,nodes:o,roots:a,limit:t,adjustify:r})},o)},void 0===n&&(n={}),n.server._initDinamicNode=function(e,t,i){t&&(e.lcn=t),i&&(e.isAssistant=!0);var r=n.t(e.templateName);e.w=r&&r.size?r.size[0]:0,e.h=r&&r.size?r.size[1]:0,e.isSplit="split"==e.templateName},n.server._setCollpasedProperty=function(e,t,i,r,o,a,l){null==e.collapsed&&t.collapse&&t.collapse.allChildren?e.collapsed=!0:null==e.collapsed&&(e.collapsed=!1),o==n.action.expand&&-1!=i.ids.indexOf(e.id)&&(e.collapsed=!1),o==n.action.collapse&&(i.expandIds||i.collapseIds)?i.expandIds&&-1!=i.expandIds.indexOf(e.id)?e.collapsed=!1:i.collapseIds&&-1!=i.collapseIds.indexOf(e.id)&&(e.collapsed=!0):o==n.action.collapse&&-1!=i.ids.indexOf(e.id)&&(e.collapsed=!0),o==n.action.expand&&"all"==i.ids&&(e.collapsed=!1),o==n.action.exporting&&i.expandChildren&&(e.collapsed=!1),o==n.action.init&&null!=l?e.collapsed=!l.exp.has(e.id):o==n.action.init?e.collapsed=t.collapse&&a>=t.collapse.level-1&&-1==r.indexOf(e.id):o!=n.action.centerNode&&o!=n.action.insert||-1!=r.indexOf(e.id)&&(e.collapsed=!1)},n.server._initNode=function(e,t,i,r,o,a,l,s,d,c,p){var h=a[i||"base"];null==e.parent&&n.server._setCollpasedProperty(e,h,d,s,o,r-1,p);for(var f=0;f<e.childrenIds.length;f++){var u=t[e.childrenIds[f]];n.server._setCollpasedProperty(u,h,d,s,o,r,p),u.collapsed||(u.parent=e,-1==u.tags.indexOf("left-partner")&&-1==u.tags.indexOf("right-partner")&&-1==u.tags.indexOf("partner")&&null==u.ppid||-1==c.indexOf(e.id)&&c.push(e.id),e.children.push(u))}if(e.min||o!=n.action.minimize||d.id!=e.id||(e.min=!0),!0===e.min&&o==n.action.maximize&&d.id==e.id&&(e.min=!1),o==n.action.init&&null!=p&&(e.min=p.min.has(e.id)),!e.min)for(f=0;f<e.stChildrenIds.length;f++)((u=t[e.stChildrenIds[f]]).stParent=e).stChildren.push(u);var g=n.t(e.templateName,e.min);e.w=g&&g.size?g.size[0]:0,e.h=g&&g.size?g.size[1]:0,e.padding=g&&g.padding?g.padding:[0,0,0,0],null!=r&&(e.level=r),i&&(e.lcn=i);var m=n._getSubLevels(e.tags,l.tags);0<m&&(e.subLevels=m),-1!=e.tags.indexOf("assistant")&&null!=e.parent&&(e.isAssistant=!0),n.events.publish("node-created",[e])},n.server._iterate=function(e,t,i,r,o,a,l,s,d,c,p,h,f,u,g,m){if(n.server._initNode(t,i,d,r,h,c,p,f,u,g,m),t.isAssistant&&(a[t.pid]||(a[t.pid]=[]),a[t.pid].push(t.id)),0<t.subLevels&&l.push(t.id),!t.isAssistant&&0==t.childrenIds.length&&t.parent&&!s[t.pid]){for(var y=[],x=0,v=0,b=0;b<t.parent.children.length;b++){var w=t.parent.children[b];-1==w.tags.indexOf("partner")&&-1==w.tags.indexOf("assistant")&&0==w.childrenIds.length?y.push(w.id):-1!=w.tags.indexOf("assistant")?x++:-1!=w.tags.indexOf("partner")&&v++}(n.MIXED_LAYOUT_ALL_NODES&&1<y.length&&y.length==t.parent.childrenIds.length-x-v||!n.MIXED_LAYOUT_ALL_NODES&&1<y.length)&&(s[t.pid]=y)}t.stChildren.length&&(e.stContainerNodes||(e.stContainerNodes=[]),e.stContainerNodes.push(t));for(var _=0;_<t.stChildren.length;_++){var k="";for(b=0;b<t.tags.length;b++)if(c[t.tags[b]]){k=t.tags[b];break}o.push(t.stChildren[_].id),n.server._iterate(e,t.stChildren[_],i,0,o,a,l,s,k,c,p,h,f,u,g,m)}for(r++,_=0;_<t.children.length;_++)n.server._iterate(e,t.children[_],i,r,o,a,l,s,d,c,p,h,f,u,g,m)},n.server._createNodes=function(e,t,i,r,o,a){for(var l=e.nodes,s={},d=[],c=[],p=0;p<l.length;p++){var h,f=l[p];h=n.STRING_TAGS?f.tags?f.tags.split(","):[]:Array.isArray(f.tags)?f.tags.slice(0):[];var u=n._getTemplate(h,e.tags,e.template),g=new n.node(f.id,f.pid,h,u);null!=f.ppid&&(g.ppid=f.ppid),f.stpid&&(g.stpid=f.stpid),null!=e.orderBy&&(g.order=n.server._getOrderFieldValue(f,e.orderBy)),s[f.id]=g,d.push(f.id)}for(null!=e.orderBy&&d.sort(function(t,i){var n=s[t].order,r=s[i].order;return"number"==typeof n||"number"==typeof r?(null==n&&(n=-1),null==r&&(r=-1),e.orderBy.desc?r-n:n-r):"string"==typeof n||"string"==typeof r?(null==n&&(n=""),null==r&&(r=""),e.orderBy.desc?r.localeCompare(n):n.localeCompare(r)):void 0}),p=0;p<d.length;p++){var m=d[p],y=(g=s[m],o?o[m]:null),x=s[g.stpid],v=s[g.pid];if(x||(g.stpid=null),v||(g.pid=null),x){var b=o?o[x.id]:null;b&&(x.min=b.min),x.stChildrenIds.push(g.id)}else v?(y&&(g.collapsed=y.collapsed,g.min=y.min),v.childrenIds.push(g.id)):(y&&(g.collapsed=y.collapsed,g.min=y.min),c.push(g));i==n.action.init&&(g.min=n._getMin(g,e))}if(null!=e.roots)for(c=[],p=0;p<e.roots.length;p++){var w=s[e.roots[p]];w&&c.push(w)}i==n.action.exporting&&null!=r.id&&(g=s[r.id])&&(g.pid=null,c=[g]);var _=[];
1if(i==n.action.init&&e.expand&&e.expand.nodes&&null==a)for(p=0;p<e.expand.nodes.length;p++)for(g=s[e.expand.nodes[p]];g;)_.push(g.id),null==g.pid&&null!=g.stpid?(g=s[g.stpid]).min=!1:g=s[g.pid];else if(i==n.action.centerNode){for(var k=s[r.id];k;){if(_.push(k.id),r.options.parentState===n.COLLAPSE_PARENT_NEIGHBORS&&k)for(p=0;p<k.childrenIds.length;p++)(R=s[k.childrenIds[p]]).collapsed=!0;null==k.pid&&null!=k.stpid?(k=s[k.stpid]).min=!1:k=s[k.pid]}if(k=s[r.id],r.options.childrenState===n.COLLAPSE_SUB_CHILDRENS)for(p=0;p<k.childrenIds.length;p++){(C=s[k.childrenIds[p]]).collapsed=!1;for(var S=0;S<C.childrenIds.length;S++)s[C.childrenIds[S]].collapsed=!0}if(r.options.parentState===n.COLLAPSE_PARENT_SUB_CHILDREN_EXCEPT_CLICKED&&(v=s[k.pid]))for(p=0;p<v.childrenIds.length;p++){var C;if((C=s[v.childrenIds[p]])!=k)for(C.collapsed=!1,S=0;S<C.childrenIds.length;S++)s[C.childrenIds[S]].collapsed=!0}}else if(i==n.action.insert)for(g=s[r.insertedNodeId];g;)_.push(g.id),null==g.pid&&null!=g.stpid?(g=s[g.stpid]).min=!1:g=s[g.pid];var I=[],A={},L=[],E={},M=[];for(p=0;p<c.length;p++)n.server._iterate(c[p],c[p],s,0,I,A,L,E,"",t,e,i,_,r,M,a);for(p=c.length-1;0<=p;p--)c[p].collapsed&&c.splice(p,1);for(p=0;p<M.length;p++){g=s[M[p]];var N=[],P=[],T=[],B={},O=0,F=0,H=0,z=[],j=[];for(S=0;S<g.children.length;S++)(R=g.children[S]).isAssistant||(-1!=R.tags.indexOf("right-partner")?(R.isPartner=1,R.children=[],P.push(R.id)):-1!=R.tags.indexOf("left-partner")?(R.isPartner=2,R.children=[],T.push(R.id)):-1==R.tags.indexOf("partner")||O%2?-1!=R.tags.indexOf("partner")&&O%2?(R.isPartner=2,R.children=[],T.push(R.id),O++):null!=R.ppid?(B[R.ppid]||(B[R.ppid]=[]),B[R.ppid].push(R.id)):N.push(R.id):(R.isPartner=1,R.children=[],P.push(R.id),O++));for(g.children=[],S=0;S<P.length;S++){var R=s[P[S]];g.children.push(R)}for(S=0;S<T.length;S++)R=s[T[S]],g.children.push(R);for(S=T.length-1;0<=S;S--)if(B[T[S]])for(var U=0;U<B[T[S]].length;U++)g.children.push(s[B[T[S]][U]]),F++,-1==j.indexOf(T[S])&&j.push(T[S]);for(S=0;S<N.length;S++)R=s[N[S]],g.children.push(R);for(S=0;S<P.length;S++)if(B[P[S]])for(U=0;U<B[P[S]].length;U++)g.children.push(s[B[P[S]][U]]),H++,-1==z.indexOf(P[S])&&z.push(P[S]);g.partnerSeparation=Math.max(j.length,z.length)*e.partnerChildrenSplitSeparation+e.minPartnerSeparation,N.length||!F||H?N.length||F||!H?N.length||1!=F||1!=H?N.length||F||H?!N.length||F||H?N.length&&(F||H)?g.hasPartners=7:g.hasPartners=1:g.hasPartners=6:g.hasPartners=5:g.hasPartners=4:g.hasPartners=3:g.hasPartners=2}for(p=0;p<L.length;p++)if((ie=t[(g=s[L[p]]).lcn?g.lcn:"base"]).layout==n.normal||!E[g.pid])for(S=0;S<g.subLevels;S++){var D=new n.node(g.id+"_sub_level_index_"+S,g.pid,[],"subLevel");if(n.server._initDinamicNode(D,g.lcn),v=g.parent){var Y=v.children.indexOf(g);-1<Y&&(v.children.splice(Y,1),v.children.splice(Y,0,D)),D.children.push(g),D.parent=v,g.parent=D,s[D.id]=D}}for(var X in A){(v=s[X]).hasAssistants=!0,D=new n.node(v.id+"_split_0",v.id,["assistant"],"split"),n.server._initDinamicNode(D,v.lcn,!0),s[D.id]=D;var q=[];for(S=v.children.length-1;0<=S;S--)(R=v.children[S]).isAssistant?(R.parent=null,v.children.splice(S,1),q.splice(0,0,R.id)):R.isPartner||((R.parent=D).children.unshift(R),v.children.splice(S,1));if(q.length%2){var V=s[q[q.length-1]],W=new n.node(V.id+"_mirror",V.pid,[],"mirror");n.server._initDinamicNode(W,V.lcn,!0),V._m=W.id,W.isAssistant=!0,W.w=V.w,W.h=V.h,s[W.id]=W,q.splice(q.length-1,0,W.id)}var G=1;for(S=q.length-1;0<=S;S--)if(S%2&&S!=q.length-1){var K=new n.node(v.id+"_split_"+G,null,[],"split");n.server._initDinamicNode(K,v.lcn,!0),s[K.id]=K,q.splice(S,0,K.id),G++}else S%2&&q.splice(S,0,D.id);for(S=0;S<q.length;S+=3){var J=null;J=0==S?v:s[q[S-2]];var Z=s[q[S]],Q=s[q[S+1]],$=s[q[S+2]];Z.parent=J,Q.parent=J,($.parent=J).children.push(Z),J.children.push(Q),J.children.push($)}}var ee=!1;for(var te in t)if((ie=t[te]).layout==n.mixed||ie.layout==n.tree||ie.layout==n.treeRightOffset||ie.layout==n.treeLeftOffset){ee=!0;break}if(ee)for(var X in E){var ie;if((ie=t[(v=s[X]).lcn?v.lcn:"base"]).layout==n.mixed||ie.layout==n.tree||ie.layout==n.treeRightOffset||ie.layout==n.treeLeftOffset){var ne={pnode:v,layout:ie.layout,childrenIds:E[X]};if(n.events.publish("layout",[ne]),ne.layout==n.mixed){var re=ne.childrenIds;for(p=re.length-1;0<=p;p--)if(v=(R=s[re[p]]).parent,R.layout=n.mixed,0<p){for(S=v.children.length-1;0<=S;S--)R.id==v.children[S].id&&v.children.splice(S,1);var oe=s[re[p-1]];R.parent=oe,R.layout=n.mixed,oe.children.push(R)}}else if(ne.layout==n.tree||ne.layout==n.treeRightOffset||ne.layout==n.treeLeftOffset){D=new n.node(v.id+"_split_0",v.id,[],"split"),n.server._initDinamicNode(D,v.lcn),(s[D.id]=D).layout=n.tree;var ae=[];for(p=ne.childrenIds.length-1;0<=p;p--){for(R=s[ne.childrenIds[p]],S=0;S<v.children.length;S++)v.children[S].id==R.id&&v.children.splice(S,1);if(R.parent=null,R.layout=n.tree,ne.layout==n.treeRightOffset&&ae.splice(0,0,R.id),ne.layout==n.treeLeftOffset||ne.layout==n.treeRightOffset){var le=new n.node(R.id+"_mirror",null,[],"mirror");n.server._initDinamicNode(le,R.lcn),le.layout=n.tree,s[le.id]=le,ae.splice(0,0,le.id)}ne.layout!=n.treeRightOffset&&ae.splice(0,0,R.id)}for(G=1,S=ae.length-1;0<=S;S--)S%2&&S!=ae.length-1?(K=new n.node(v.id+"_split_"+G,null,[],"split"),n.server._initDinamicNode(K,v.lcn),K.layout=n.tree,s[K.id]=K,ae.splice(S,0,K.id),G++):S%2&&ae.splice(S,0,D.id);for(S=0;S<ae.length;S+=3)J=null,0==S&&(J=v),Z=s[ae[S]],Q=s[ae[S+1]],$=s[ae[S+2]],0!=S&&(J=s[ae[S-3]]),0==S||Q||(J=s[ae[S-2]]),(Z.parent=J).children.push(Z),Q&&(0!=S&&(J=s[ae[S-2]]),(Q.parent=J).children.push(Q
1)),$&&(0!=S&&(J=s[ae[S-1]]),($.parent=J).children.push($))}}}return{nodes:s,roots:c}},n.server._getOrderFieldValue=function(e,t){var i=t;return t.field&&(i=t.field),e[i]},n.server._getNodeWidth=function(e,t){switch(t.orientation){case n.orientation.top:case n.orientation.top_left:case n.orientation.bottom:case n.orientation.bottom_left:return e.w;case n.orientation.right:case n.orientation.right_top:case n.orientation.left:case n.orientation.left_top:return e.h}return 0},n.server._isVisible=function(e,t,i,r){if(null!=e.x&&null!=e.y){if(t.lazyLoading&&r!==n.action.exporting){function a(e,t){var i=e.x,r=e.y,o=e.w,a=e.h,l=t[0]-n.LAZY_LOADING_FACTOR,s=t[2]+n.LAZY_LOADING_FACTOR+t[0],d=t[1]-n.LAZY_LOADING_FACTOR,c=t[3]+n.LAZY_LOADING_FACTOR+t[1],p=l<i+o&&i<s;return p&&(p=d<r+a&&r<c),p}if(a(e,i))return!0;for(var o=0;o<e.children.length;o++)if(a(e.children[o],i))return!0;return!1}return!0}},n.server.getAllFields=function(e){var t=[n.TAGS];for(var i in e.nodeBinding)t.push(e.nodeBinding[i]);for(i=0;i<e.nodes.length;i++)for(var r in e.nodes[i])r!==n.ID&&r!==n.TAGS&&r!==n.NODES&&r!==n.PID&&r!==n.STPID&&(e.nodeBinding[r]||n._arrayContains(t,r)||t.push(r));return t},n.server._getMostDeepChild=function(e){if(e){var t=e;return function e(i){i.sl>t.sl&&(t=i);for(var n=0;n<i.children.length;n++)e(i.children[n])}(e),t}},n.server._getResponse=function(e,t,i,r,o,a,l,s,d,c,p,h,f,u,g){var m=c[0],y=[],x={top:null,left:null,bottom:null,right:null,minX:null,maxX:null,minY:null,maxY:null},v=[[],[],[]],b=o-l+2*r.padding,w=a-s+2*r.padding,_=n.getScale(d,e,t,r.scaleInitial,r.scaleMax,r.scaleMin,b,w);if(x.top=s-r.padding,x.left=l-r.padding,x.bottom=a+r.padding-t/_,x.right=o+r.padding-e/_,x.maxX=o,x.minX=l,x.maxY=a,x.minY=s,0==c.length||null==d&&!g&&r.align==n.CENTER){var k=Math.ceil(e/_),S=Math.ceil(t/_),C=0,I=0;if(k-2*r.padding>=o-l)switch(C=(o+l)/2-k/2,r.orientation){case n.orientation.right:case n.orientation.right_top:C=(l-o)/2-k/2}else switch(C=m.x-k/2+n.server._getNodeWidth(m,r)/2,r.orientation){case n.orientation.right:case n.orientation.right_top:(C=-(k/2-(l-o)/2))<r.padding-k&&(C=r.padding-k);break;case n.orientation.left:case n.orientation.bottom_left:case n.orientation.top_left:case n.orientation.left_top:(C=-(k/2-(o-l)/2))>-r.padding&&(C=-r.padding)}if(S-2*r.padding>=a-s)switch(I=(a+s)/2-S/2,r.orientation){case n.orientation.bottom:case n.orientation.bottom_left:I=(s-a)/2-S/2}else switch((I=-(S/2-(a-s)/2))>-r.padding&&(I=-r.padding),r.orientation){case n.orientation.bottom:case n.orientation.bottom_left:(I=-(S/2-(s-a)/2))<r.padding-S&&(I=r.padding-S);break;case n.orientation.left:case n.orientation.right:I=m.y-S/2+n.server._getNodeWidth(m,r)/2}d=[C,I,k,S]}else if(null==d&&!g&&r.align==n.ORIENTATION){switch(k=Math.ceil(e/_),S=Math.ceil(t/_),C=0,I=0,r.orientation){case n.orientation.top:C=m.x-k/2+n.server._getNodeWidth(m,r)/2,I=-r.padding;break;case n.orientation.bottom:C=m.x-k/2+n.server._getNodeWidth(m,r)/2,I=r.padding-S;break;case n.orientation.left:C=-r.padding,I=m.y-S/2+n.server._getNodeWidth(m,r)/2;break;case n.orientation.right:C=r.padding-k,I=m.y-S/2+n.server._getNodeWidth(m,r)/2;break;case n.orientation.top_left:C=-r.padding,I=-r.padding;break;case n.orientation.right_top:C=r.padding-k,I=-r.padding;break;case n.orientation.left_top:C=-r.padding,I=-r.padding;break;case n.orientation.bottom_left:C=-r.padding,I=r.padding-S}d=[C,I,k,S],r.sticky&&(d[0]<x.left&&d[0]<x.right&&(d[0]=x.left>x.right?x.right:x.left),d[0]>x.right&&d[0]>x.left&&(d[0]=x.left>x.right?x.left:x.right),d[1]<x.top&&d[1]<x.bottom&&(d[1]=x.top>x.bottom?x.bottom:x.top),d[1]>x.bottom&&d[1]>
1x.top&&(d[1]=x.top>x.bottom?x.top:x.bottom))}if(p==n.action.centerNode||p==n.action.maximize){var A=f[h.id];1==h.options.horizontal&&(d[0]=A.x+A.w/2-d[2]/2),1==h.options.vertical&&(d[1]=A.y+A.h/2-d[3]/2),r.sticky&&(d[0]<x.left&&d[0]<x.right&&(d[0]=x.left>x.right?x.right:x.left),d[0]>x.right&&d[0]>x.left&&(d[0]=x.left>x.right?x.left:x.right),d[1]<x.top&&d[1]<x.bottom&&(d[1]=x.top>x.bottom?x.bottom:x.top),d[1]>x.bottom&&d[1]>x.top&&(d[1]=x.top>x.bottom?x.top:x.bottom))}if(p==n.action.insert||p==n.action.expand||p==n.action.collapse||p==n.action.update||p==n.action.centerNode||p==n.action.maximize){var L=null;if(p==n.action.insert&&h&&null!=h.insertedNodeId&&null!=h.insertedNodeId)L=f[h.insertedNodeId];else if(p==n.action.update&&h&&null!=h.visId&&null!=h.visId)L=f[h.visId];else if(p!=n.action.expand&&p!=n.action.collapse&&p!=n.action.maximize||!h||null==h.id||null==h.id){if(p==n.action.centerNode||p==n.action.maximize){switch(r.orientation){case n.orientation.top:case n.orientation.top_left:case n.orientation.bottom:case n.orientation.bottom_left:h.options.vertical||(L=f[h.id]);break;case n.orientation.right:case n.orientation.right_top:case n.orientation.left:case n.orientation.left_top:h.options.horizontal||(L=f[h.id])}L&&(L=n.server._getMostDeepChild(L,f))}}else L=f[h.id],L=n.server._getMostDeepChild(L,f);if(!n.FIXED_POSITION_ON_CLICK&&L)switch(r.orientation){case n.orientation.top:case n.orientation.top_left:var E=L.y+L.h-d[3]+r.padding;d[1]<E&&(d[1]=E);break;case n.orientation.bottom:case n.orientation.bottom_left:E=L.y-r.padding,d[1]>E&&(d[1]=E);break;case n.orientation.right:case n.orientation.right_top:E=L.x-r.padding,d[0]>E&&(d[0]=E);break;case n.orientation.left:case n.orientation.left_top:E=L.x+L.w-d[2]+r.padding,d[0]<E&&(d[0]=E)}}for(var M=0;M<c.length;M++)n.server._iterate2(c[M],f,r,d,p,h,y,u,i,v);return{animations:v,boundary:x,viewBox:d,visibleNodeIds:y,nodes:f,allFields:n.server.getAllFields(r)}},n.server._iterate2=function(e,t,i,r,o,a,l,s,d,c){if(n.server._isVisible(e,i,r,o)){l.push(e.id);var p=null;if((o==n.action.expand||o==n.action.collapse||o==n.action.maximize)&&s&&s[e.id]&&"expandCollapseToLevel"==a.method){if(p={x:(m=s[e.id]).x,y:m.y},m){p={x:m.x,y:m.y};for(var h=e,f=null;null!=h;)s[h.id]&&s[h.id].collapsed&&(f=h),h=h.parent;f&&f.parent&&(p={x:f.parent.x,y:f.parent.y})}if(u=t[a.id]){for(h=e.parent;null!=h;)h=h.parent;h&&(p={x:u.x+u.w/2-e.w/2,y:u.y+u.h/2-e.h/2})}}else if((o==n.action.expand||o==n.action.collapse)&&s&&s[e.id]){var u;if(p={x:(m=s[e.id]).x,y:m.y},"all"==a.ids&&m){for(p={x:m.x,y:m.y},h=e,f=null;null!=h;)s[h.id]&&s[h.id].collapsed&&(f=h),h=h.parent;f&&f.parent&&(p={x:f.parent.x,y:f.parent.y})}if(u=t[a.id]){for(h=e.parent;null!=h&&-1==a.ids.indexOf(e.id)&&-1==a.ids.indexOf(h.id);)h=h.parent;h&&(p={x:u.x+u.w/2-e.w/2,y:u.y+u.h/2-e.h/2})}}else if(o==n.action.centerNode&&s&&s[e.id])null!=(m=s[e.id]).x&&null!=m.y&&(p={x:m.x,y:m.y}),(g=t[a.id])&&g==e&&(h=e.parent)&&h.id==a.id&&(p={x:g.x+g.w/2-e.w/2,y:g.y+g.h/2-e.h/2});else if(o==n.action.maximize&&s&&s[e.id]){var g;null!=(m=s[e.id]).x&&null!=m.y&&(p={x:m.x,y:m.y}),(g=t[a.id])&&g==e&&(h=e.parent)&&h.id==a.id&&(p={x:g.x+g.w/2-e.w/2,y:g.y+g.h/2-e.h/2})}else if(o==n.action.minimize&&s&&s[e.id])p={x:(m=s[e.id]).x,y:m.y};else if(o==n.action.insert&&a&&a.insertedNodeId==e.id&&e.parent)p={x:e.parent.x,y:e.parent.y};else if((o==n.action.update||o==n.action.insert)&&s&&s[e.id]){var m;p={x:(m=s[e.id]).x,y:m.y}}else o!==n.action.exporting&&o!==n.action.init&&-1==d.indexOf(e.id)&&(c[0].push(e.id),c[1].push({opacity:0}),c[2].push({opacity:1}));null!=p&&null!=p.x&&null!=p.y&&(p.x==e.x&&p.y==e.y||(c[0].push(e.id),c[1].push({transform:[1,0,0,1,p.x,p.y]}),c[2].push({transform:[1,0,0,1,e.x,e.y]})))}for(var y=0;y<e.stChildren.length;y++)n.server._iterate2(e.stChildren[y],t,i,r,o,a,l,s,d,c);for(y=0;y<e.children.length;y++)n.server._iterate2(e.children[y],t,i,r,o,a,l,s,d,c)},n.server._setMinMaxXYAdjustifyIterate=function(e,t,i,r,o,a,l){switch(l){case n.orientation.top:case n.orientation.top_left:case n.orientation.bottom:case n.orientation.bottom_left:e.x+=a.x;break;case n.orientation.right:case n.orientation.right_top:case n.orientation.left:case n.orientation.left_top:e.y+=a.y}n._setMinMaxXY(e,i);for(var s=0;s<e.stChildren.length;s++)n.server._setMinMaxXYAdjustifyIterate(e.stChildren[s],e.stChildren[s],i,0,o,a,l);for(e.isPartner?e.sl=r-1:e.sl=r,null==o[t.id]&&(o[t.id]={}),null==o[t.id][e.sl]&&(o[t.id][e.sl]={minX:null,minY:null,maxX:null,maxY:null}),e.layout||n._setMinMaxXY(e,o[t.id][e.sl]),r++,s=0;s<e.children.length;s++)n.server._setMinMaxXYAdjustifyIterate(e.children[s],t,i,r,o,a,l)},n.server._doNotChangePositionOfClickedNodeIfAny=function(e,t,i,r,o,a){if(i!=n.action.expand&&i!=n.action.collapse&&i!=n.action.minimize&&i!=n.action.maximize&&i!=n.action.centerNode&&i!=n.action.update&&i!=n.action.insert)return{x:0,y:0};if(i==n.action.update&&(!r||null==r.id)){if(!e||!e.length)return{x:0,y:0};r={id:e[0].id}}if(null==r.id)return{x:0,y:0};var l=r.id;(i==n.action.minimize&&t[l].parent||i==n.action.maximize&&t[l].parent)&&(l=t[l].pid);var s=t[l],d=o[l];return d?{x:(d.x?d.x:0)-s.x,y:(d.y?d.y:0)-s.y}:{x:0,y:0}},void 0===n&&(n={}),n.templates={},n.templates.base={defs:"",size:[250,120],expandCollapseSize:30,linkAdjuster:{fromX:0,fromY:0,toX:0,toY:0},ripple:{radius:0,color:"#e6e6e6",rect:null},assistanseLink:'<path stroke-linejoin="round" stroke="#aeaeae" stroke-width="2px" fill="none" d="M{xa},{ya} {xb},{yb} {xc},{yc} {xd},{yd} L{xe},{ye}"/>',svg:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="display:block;" width="{w}" height="{h}" viewBox="{viewBox}">{content}</svg>',link:'<path stroke-linejoin="round" stroke="#aeaeae" stroke-width="1px" fill="none" d="M{xa},{ya} {xb},{yb} {xc},{yc} L{xd},{yd}"/>',pointer:'<g data-pointer="pointer" transform="matrix(0,0,0,0,100,100)"><radialGradient id="pointerGradient"><stop stop-color="#ffffff" offset="0" /><stop stop-color="#C1C1C1" offset="1" /></radialGradient><circle cx="16" cy="16" r="16" stroke-width="1" stroke="#acacac" fill="url(#pointerGradient)"></circle></g>
1',node:'<rect x="0" y="0" height="120" width="250" fill="none" stroke-width="1" stroke="#aeaeae"></rect>',plus:'<circle cx="15" cy="15" r="15" fill="#ffffff" stroke="#aeaeae" stroke-width="1"></circle><line x1="4" y1="15" x2="26" y2="15" stroke-width="1" stroke="#aeaeae"></line><line x1="15" y1="4" x2="15" y2="26" stroke-width="1" stroke="#aeaeae"></line>',minus:'<circle cx="15" cy="15" r="15" fill="#ffffff" stroke="#aeaeae" stroke-width="1"></circle><line x1="4" y1="15" x2="26" y2="15" stroke-width="1" stroke="#aeaeae"></line>',nodeMenuButton:'<g style="cursor:pointer;" transform="matrix(1,0,0,1,225,105)" control-node-menu-id="{id}"><rect x="-4" y="-10" fill="#000000" fill-opacity="0" width="22" height="22"></rect><circle cx="0" cy="0" r="2" fill="#ffffff"></circle><circle cx="7" cy="0" r="2" fill="#ffffff"></circle><circle cx="14" cy="0" r="2" fill="#ffffff"></circle></g>',exportMenuButton:'<div style="position:absolute;right:{p}px;top:{p}px; width:40px;height:50px;cursor:pointer;" control-export-menu=""><hr style="background-color: #7A7A7A; height: 3px; border: none;"><hr style="background-color: #7A7A7A; height: 3px; border: none;"><hr style="background-color: #7A7A7A; height: 3px; border: none;"></div>',img_0:'<clipPath id="{randId}"><circle cx="60" cy="60" r="40"></circle></clipPath><image preserveAspectRatio="xMidYMid slice" clip-path="url(#{randId})" xlink:href="{val}" x="20" y="20"  width="80" height="80"></image>',link_field_0:'<text text-anchor="middle" fill="#aeaeae" width="290" x="0" y="0" style="font-size:10px;">{val}</text>'},n.templates.ana={defs:"",size:[250,120],linkAdjuster:{fromX:0,fromY:0,toX:0,toY:0},ripple:{radius:0,color:"#e6e6e6",rect:null},expandCollapseSize:30,svg:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"  style="display:block;" width="{w}" height="{h}" viewBox="{viewBox}">{content}</svg>',link:'<path stroke-linejoin="round" stroke="#aeaeae" stroke-width="1px" fill="none" d="{rounded}" />',assistanseLink:'<path stroke-linejoin="round" stroke="#aeaeae" stroke-width="2px" fill="none" d="M{xa},{ya} {xb},{yb} {xc},{yc} {xd},{yd} L{xe},{ye}"/>',pointer:'<g data-pointer="pointer" transform="matrix(0,0,0,0,100,100)"><radialGradient id="pointerGradient"><stop stop-color="#ffffff" offset="0" /><stop stop-color="#C1C1C1" offset="1" /></radialGradient><circle cx="16" cy="16" r="16" stroke-width="1" stroke="#acacac" fill="url(#pointerGradient)"></circle></g>',node:'<rect x="0" y="0" height="{h}" width="{w}" fill="#039BE5" stroke-width="1" stroke="#aeaeae" rx="5" ry="5"></rect>',plus:'<circle cx="15" cy="15" r="15" fill="#ffffff" stroke="#aeaeae" stroke-width="1"></circle><line x1="4" y1="15" x2="26" y2="15" stroke-width="1" stroke="#aeaeae"></line><line x1="15" y1="4" x2="15" y2="26" stroke-width="1" stroke="#aeaeae"></line>',minus:'<circle cx="15" cy="15" r="15" fill="#ffffff" stroke="#aeaeae" stroke-width="1"></circle><line x1="4" y1="15" x2="26" y2="15" stroke-width="1" stroke="#aeaeae"></line>',nodeMenuButton:'<g style="cursor:pointer;" transform="matrix(1,0,0,1,225,105)" control-node-menu-id="{id}"><rect x="-4" y="-10" fill="#000000" fill-opacity="0" width="22" height="22"></rect><circle cx="0" cy="0" r="2" fill="#ffffff"></circle><circle cx="7" cy="0" r="2" fill="#ffffff"></circle><circle cx="14" cy="0" r="2" fill="#ffffff"></circle></g>',exportMenuButton:'<div style="position:absolute;right:{p}px;top:{p}px; width:40px;height:50px;cursor:pointer;" control-export-menu=""><hr style="background-color: #7A7A7A; height: 3px; border: none;"><hr style="background-color: #7A7A7A; height: 3px; border: none;"><hr style="background-color: #7A7A7A; height: 3px; border: none;"></div>',img_0:'<clipPath id="{randId}"><circle cx="50" cy="30" r="40"></circle></clipPath><image preserveAspectRatio="xMidYMid slice" clip-path="url(#{randId})" xlink:href="{val}" x="10" y="-10"  width="80" height="80"></image>',link_field_0:'<text text-anchor="middle" fill="#aeaeae" width="290" x="0" y="0" style="font-size:10px;">{val}</text>',field_0:'<text width="230" style="font-size: 18px;" fill="#ffffff" x="125" y="95" text-anchor="middle">{val}</text>',field_1:'<text width="130" text-overflow="multiline" style="font-size: 14px;" fill="#ffffff" x="230" y="30" text-anchor="end">{val}</text>',padding:[50,20,35,20]},n.templates.split=Object.assign({},n.templates.ana),n.templates.split.size=[10,10],n.templates.split.node='<circle cx="5" cy="5" r="5" fill="none" stroke-width="1" stroke="#aeaeae"></circle>',n.templates.group=Object.assign({},n.templates.ana),n.templates.group.size=[250,120],n.templates.group.node='<rect rx="50" ry="50" x="0" y="0" height="{h}" width="{w}" fill="#f2f2f2" stroke-width="0"></rect>',n.templates.group.link='<path stroke="#aeaeae" stroke-width="1px" fill="none" d="M{xa},{ya} C{xb},{yb} {xc},{yc} {xd},{yd}"/>',n.templates.group.nodeMenuButton='<g style="cursor:pointer;" transform="matrix(1,0,0,1,{ew},25)" control-node-menu-id="{id}"><g transform="matrix(1,0,0,1,-22,-8)"><rect x="0" y="0" fill="red" fill-opacity="0" width="18" height="22"></rect><line x1="0" y1="2" x2="9" y2="2" stroke="#aeaeae" stroke-width="1"></line><line x1="0" y1="9" x2="18" y2="9" stroke="#aeaeae" stroke-width="1"></line><line x1="0" y1="16" x2="22" y2="16" stroke="#aeaeae" stroke-width="1"></line></g></g>',n.templates.group.field_0='<text width="230" style="font-size: 18px;" fill="#aeaeae" x="{cw}" y="30" text-anchor="middle">{val}</text>
1',n.templates.group.field_1="",n.templates.group.ripple={radius:50,color:"#aeaeae"},n.templates.invisibleGroup=Object.assign({},n.templates.group),n.templates.invisibleGroup.node="",n.templates.invisibleGroup.padding=[0,0,0,0],n.templates.invisibleGroup.field_0="",n.templates.invisibleGroup.nodeMenuButton="",n.templates.mirror={linkAdjuster:{},link:"",node:"",nodeMenuButton:"",size:[0,0]},n.templates.ula=Object.assign({},n.templates.ana),n.templates.ula.field_0='<text width="145" style="font-size: 18px;" fill="#039BE5" x="100" y="55">{val}</text>',n.templates.ula.field_1='<text width="145" text-overflow="multiline" style="font-size: 14px;" fill="#afafaf" x="100" y="76">{val}</text>',n.templates.ula.node='<rect x="0" y="0" height="{h}" width="{w}" fill="#ffffff" stroke-width="1" stroke="#aeaeae"></rect><line x1="0" y1="0" x2="250" y2="0" stroke-width="2" stroke="#039BE5"></line>',n.templates.ula.img_0='<clipPath id="{randId}"><circle cx="50" cy="60" r="40"></circle></clipPath><image preserveAspectRatio="xMidYMid slice" clip-path="url(#{randId})" xlink:href="{val}" x="10" y="20" width="80" height="80" ></image>',n.templates.ula.menu='<g style="cursor:pointer;" transform="matrix(1,0,0,1,225,12)" control-node-menu-id="{id}"><rect x="-4" y="-10" fill="#ffffff" width="22" height="22"></rect><circle cx="0" cy="0" r="2" fill="#039BE5"></circle><circle cx="7" cy="0" r="2" fill="#039BE5"></circle><circle cx="14" cy="0" r="2" fill="#039BE5"></circle></g>',n.templates.ula.nodeMenuButton='<g style="cursor:pointer;" transform="matrix(1,0,0,1,225,105)" control-node-menu-id="{id}"><rect x="-4" y="-10" fill="#000000" fill-opacity="0" width="22" height="22"></rect><circle cx="0" cy="0" r="2" fill="#AEAEAE"></circle><circle cx="7" cy="0" r="2" fill="#AEAEAE"></circle><circle cx="14" cy="0" r="2" fill="#AEAEAE"></circle></g>',n.templates.olivia=Object.assign({},n.templates.ana),n.templates.olivia.field_0='<text width="145" style="font-size: 18px;" fill="#757575" x="100" y="55">{val}</text>',n.templates.olivia.field_1='<text width="145" style="font-size: 14px;" fill="#757575" x="100" y="76">{val}</text>',n.templates.olivia.defs='<linearGradient id="{randId}" x1="0%" y1="0%" x2="0%" y2="100%"><stop offset="0%" style="stop-color:#fff;stop-opacity:1" /><stop offset="100%" style="stop-color:#eee;stop-opacity:1" /></linearGradient>',n.templates.olivia.node='<rect fill="url(#{randId})" x="0" y="0" height="{h}" width="{w}" stroke-width="1" stroke="#aeaeae" rx="5" ry="5"></rect>',n.templates.olivia.img_0='<clipPath id="{randId}"><circle cx="50" cy="60" r="40"></circle></clipPath><image preserveAspectRatio="xMidYMid slice" clip-path="url(#{randId})" xlink:href="{val}" x="10" y="20" width="80" height="80" ></image>',n.templates.olivia.nodeMenuButton='<g style="cursor:pointer;" transform="matrix(1,0,0,1,225,105)" control-node-menu-id="{id}"><rect x="-4" y="-10" fill="#000000" fill-opacity="0" width="22" height="22"></rect><circle cx="0" cy="0" r="2" fill="#AEAEAE"></circle><circle cx="7" cy="0" r="2" fill="#AEAEAE"></circle><circle cx="14" cy="0" r="2" fill="#AEAEAE"></circle></g>',n.templates.belinda=Object.assign({},n.templates.ana),n.templates.belinda.size=[180,180],n.templates.belinda.ripple={radius:90,color:"#e6e6e6",rect:null},n.templates.belinda.node='<circle cx="90" cy="90" r="90" fill="#039BE5" stroke-width="1" stroke="#aeaeae"></circle>',n.templates.belinda.img_0='<clipPath id="{randId}"><circle cx="90" cy="45" r="40"></circle></clipPath><image preserveAspectRatio="xMidYMid slice" clip-path="url(#{randId})" xlink:href="{val}" x="50" y="5" width="80" height="80" ></image>',n.templates.belinda.field_0='<text width="170" style="font-size: 18px;" text-anchor="middle" fill="#ffffff"  x="90" y="105">{val}</text>',n.templates.belinda.field_1='<text width="160" style="font-size: 14px;" text-anchor="middle" fill="#ffffff"  x="90" y="125">{val}</text>',n.templates.belinda.link='<path stroke="#aeaeae" stroke-width="1px" fill="none" d="M{xa},{ya} C{xb},{yb} {xc},{yc} {xd},{yd}"/>',n.templates.belinda.nodeMenuButton='<g style="cursor:pointer;" transform="matrix(1,0,0,1,79,5)" control-node-menu-id="{id}"><rect x="0" y="0" fill="#000000" fill-opacity="0" width="22" height="22"></rect><line stroke-width="2" stroke="#000" x1="0" y1="3" x2="22" y2="3"></line><line stroke-width="2" stroke="#000" x1="0" y1="9" x2="22" y2="9"></line><line stroke-width="2" stroke="#000" x1="0" y1="15" x2="22" y2="15"></line></g>',n.templates.rony=Object.assign({},n.templates.ana),n.templates.rony.svg='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="background-color:#E8E8E8;display:block;" width="{w}" height="{h}" viewBox="{viewBox}">{content}</svg>',n.templates.rony.defs='<filter id="{randId}" x="0" y="0" width="200%" height="200%"><feOffset result="offOut" in="SourceAlpha" dx="5" dy="5"></feOffset><feGaussianBlur result="blurOut" in="offOut" stdDeviation="5"></feGaussianBlur><feBlend in="SourceGraphic" in2="blurOut" mode="normal"></feBlend></filter>',n.templates.rony.size=[180,250],n.templates.rony.ripple={color:"#F57C00",radius:5,rect:null},n.templates.rony.img_0='<clipPath id="{randId}"><circle cx="90" cy="160" r="60"></circle></clipPath><image preserveAspectRatio="xMidYMid slice" clip-path="url(#{randId})" xlink:href="{val}" x="30" y="100"  width="120" height="120"></image>
1',n.templates.rony.node='<rect filter="url(#{randId})" x="0" y="0" height="250" width="180" fill="#ffffff" stroke-width="0" rx="5" ry="5"></rect>',n.templates.rony.field_0='<text width="165" style="font-size: 18px;" fill="#039BE5" x="90" y="40" text-anchor="middle">{val}</text>',n.templates.rony.field_1='<text width="165" style="font-size: 14px;" fill="#F57C00" x="90" y="60" text-anchor="middle">{val}</text>',n.templates.rony.field_2='<text width="165" style="font-size: 14px;" fill="#FFCA28" x="90" y="80" text-anchor="middle">{val}</text>',n.templates.rony.link='<path stroke="#039BE5" stroke-width="1px" fill="none" d="M{xa},{ya} {xb},{yb} {xc},{yc} L{xd},{yd}"/>',n.templates.rony.plus='<circle cx="15" cy="15" r="15" fill="#ffffff" stroke="#039BE5" stroke-width="1"></circle><line x1="4" y1="15" x2="26" y2="15" stroke-width="1" stroke="#039BE5"></line><line x1="15" y1="4" x2="15" y2="26" stroke-width="1" stroke="#039BE5"></line>',n.templates.rony.minus='<circle cx="15" cy="15" r="15" fill="#ffffff" stroke="#039BE5" stroke-width="1"></circle><line x1="4" y1="15" x2="26" y2="15" stroke-width="1" stroke="#039BE5"></line>',n.templates.rony.nodeMenuButton='<g style="cursor:pointer;" transform="matrix(1,0,0,1,155,235)" control-node-menu-id="{id}"><rect x="-4" y="-10" fill="#000000" fill-opacity="0" width="22" height="22"></rect><circle cx="0" cy="0" r="2" fill="#F57C00"></circle><circle cx="7" cy="0" r="2" fill="#F57C00"></circle><circle cx="14" cy="0" r="2" fill="#F57C00"></circle></g>',n.templates.mery=Object.assign({},n.templates.ana),n.templates.mery.ripple={color:"#e6e6e6",radius:50,rect:null},n.templates.mery.node='<rect x="0" y="0" height="120" width="250" fill="#ffffff" stroke-width="1" stroke="#686868" rx="50" ry="50"></rect><rect x="0" y="45" height="30" width="250" fill="#039BE5" stroke-width="1"></rect>',n.templates.mery.link='<path stroke="#aeaeae" stroke-width="1px" fill="none" d="M{xa},{ya} C{xb},{yb} {xc},{yc} {xd},{yd}" />',n.templates.mery.img_0='<clipPath id="{randId}"><circle cx="125" cy="60" r="24"></circle></clipPath><image preserveAspectRatio="xMidYMid slice" clip-path="url(#{randId})" xlink:href="{val}" x="95" y="33"  width="60" height="60"></image>',n.templates.mery.field_0='<text width="220" style="font-size: 18px;" fill="#039BE5" x="125" y="30" text-anchor="middle">{val}</text>',n.templates.mery.field_1='<text width="220" style="font-size: 14px;" fill="#039BE5" x="125" y="100" text-anchor="middle">{val}</text>',n.templates.mery.nodeMenuButton='<g style="cursor:pointer;" transform="matrix(1,0,0,1,225,60)" control-node-menu-id="{id}"><rect x="-4" y="-10" fill="#000000" fill-opacity="0" width="22" height="22"></rect><circle cx="0" cy="0" r="2" fill="#ffffff"></circle><circle cx="7" cy="0" r="2" fill="#ffffff"></circle><circle cx="14" cy="0" r="2" fill="#ffffff"></circle></g>',n.templates.polina=Object.assign({},n.templates.ana),n.templates.polina.size=[300,80],n.templates.polina.ripple={color:"#e6e6e6",radius:40,rect:null},n.templates.polina.node='<rect x="0" y="0" height="80" width="300" fill="#039BE5" stroke-width="1" stroke="#686868" rx="40" ry="40"></rect>',n.templates.polina.img_0='<clipPath id="{randId}"><circle  cx="40" cy="40" r="35"></circle></clipPath><image preserveAspectRatio="xMidYMid slice" clip-path="url(#{randId})" xlink:href="{val}" x="0" y="0"  width="80" height="80"></image>',n.templates.polina.field_0='<text width="210" style="font-size: 18px;" fill="#ffffff" x="80" y="30" text-anchor="start">{val}</text>',n.templates.polina.field_1='<text width="210" style="font-size: 14px;" fill="#ffffff" x="80" y="55" text-anchor="start">{val}</text>',n.templates.polina.link='<path stroke="#686868" stroke-width="1px" fill="none" d="M{xa},{ya} C{xb},{yb} {xc},{yc} {xd},{yd}" />',n.templates.polina.nodeMenuButton='<g style="cursor:pointer;" transform="matrix(1,0,0,1,285,33)" control-node-menu-id="{id}"><rect x="-4" y="-10" fill="#000000" fill-opacity="0" width="22" height="22"></rect><circle cx="0" cy="0" r="2" fill="#ffffff"></circle><circle cx="0" cy="7" r="2" fill="#ffffff"></circle><circle cx="0" cy="14" r="2" fill="#ffffff"></circle></g>',n.templates.mila=Object.assign({},n.templates.ana),n.templates.mila.node='<rect x="0" y="0" height="120" width="250" fill="#039BE5" stroke-width="1" stroke="#aeaeae"></rect><rect x="-5" y="70" height="30" width="260" fill="#ffffff" stroke-width="1" stroke="#039BE5"></rect><line x1="-5" x2="0" y1="100" y2="105" stroke-width="1" stroke="#039BE5"/><line x1="255" x2="250" y1="100" y2="105" stroke-width="1" stroke="#039BE5"/>',n.templates.mila.img_0='<image preserveAspectRatio="xMidYMid slice" xlink:href="{val}" x="20" y="5"  width="64" height="64"></image>',n.templates.mila.field_0='<text width="240" style="font-size: 18px;" fill="#039BE5" x="125" y="92" text-anchor="middle">{val}</text>',n.templates.mila.nodeMenuButton='<g style="cursor:pointer;" transform="matrix(1,0,0,1,225,110)" control-node-menu-id="{id}"><rect x="-4" y="-10" fill="#000000" fill-opacity="0" width="22" height="22"></rect><circle cx="0" cy="0" r="2" fill="#ffffff"></circle><circle cx="7" cy="0" r="2" fill="#ffffff"></circle><circle cx="14" cy="0" r="2" fill="#ffffff"></circle></g>',n.templates.diva=Object.assign({},n.templates.ana),n.templates.diva.size=[200,170],n.templates.diva.node='<rect x="0" y="80" height="90" width="200" fill="#039BE5"></rect><circle cx="100" cy="50" fill="#ffffff" r="50" stroke="#039BE5" stroke-width="2"></circle>',n.templates.diva.img_0='<clipPath id="{randId}"><circle cx="100" cy="50" r="45"></circle></clipPath><image preserveAspectRatio="xMidYMid slice" clip-path="url(#{randId})" xlink:href="{val}" x="50" y="0"  width="100" height="100"></image>',n.templates.diva.field_0='<text width="185" style="font-size: 18px;" fill="#ffffff" x="100" y="125" text-anchor="middle">{val}</text>',n.templates.diva.field_1='<text width="185" style="font-size: 14px;" fill="#ffffff" x="100" y="145" text-anchor="middle">{val}</text>',n.templates.diva.pointer='<g data-pointer="pointer" transform="matrix(0,0,0,0,100,100)"><radialGradient id="pointerGradient"><stop stop-color="#ffffff" offset="0" /><stop stop-color="#039BE5" offset="1" /></radialGradient><circle cx="16" cy="16" r="16" stroke-width="1" stroke="#acacac" fill="url(#pointerGradient)"></circle></g>',n.templates.diva.nodeMenuButton='<g style="cursor:pointer;" transform="matrix(1,0,0,1,175,155)" control-node-menu-id="{id}"><rect x="-4" y="-10" fill="#000000" fill-opacity="0" width="22" height="22"></rect><circle cx="0" cy="0" r="2" fill="#ffffff"></circle><circle cx="7" cy="0" r="2" fill="#ffffff"></circle><circle cx="14" cy="0" r="2" fill="#ffffff"></circle></g>',n.templates.luba=Object.assign({},n.templates.ana),n.templates.luba.svg='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="display:block;background-color: #2E2E2E;" width="{w}" height="{h}" viewBox="{viewBox}">{content}</svg>',n.templates.luba.defs='<linearGradient id="{randId}
1" x1="0%" y1="0%" x2="0%" y2="100%"><stop offset="0%" style="stop-color:#646464;stop-opacity:1" /><stop offset="100%" style="stop-color:#363636;stop-opacity:1" /></linearGradient>',n.templates.luba.node='<rect fill="url(#{randId})" x="0" y="0" height="120" width="250" stroke-width="1" stroke="#aeaeae" rx="5" ry="5"></rect>',n.templates.luba.img_0='<clipPath id="{randId}"><circle cx="50" cy="25" r="40"></circle></clipPath><image preserveAspectRatio="xMidYMid slice" clip-path="url(#{randId})" xlink:href="{val}" x="10" y="-15"  width="80" height="80"></image>',n.templates.luba.nodeMenuButton='<g style="cursor:pointer;" transform="matrix(1,0,0,1,225,105)" control-node-menu-id="{id}"><rect x="-4" y="-10" fill="#000000" fill-opacity="0" width="22" height="22"></rect><circle cx="0" cy="0" r="2" fill="#aeaeae"></circle><circle cx="7" cy="0" r="2" fill="#aeaeae"></circle><circle cx="14" cy="0" r="2" fill="#aeaeae"></circle></g>',n.templates.luba.field_0='<text width="235" style="font-size: 18px;" fill="#aeaeae" x="125" y="90" text-anchor="middle">{val}</text>',n.templates.luba.field_1='<text width="140" style="font-size: 14px;" fill="#aeaeae" x="240" y="30" text-anchor="end">{val}</text>',n.templates.luba.plus='<rect x="0" y="0" width="36" height="36" rx="12" ry="12" fill="#2E2E2E" stroke="#aeaeae" stroke-width="1"></rect><line x1="4" y1="18" x2="32" y2="18" stroke-width="1" stroke="#aeaeae"></line><line x1="18" y1="4" x2="18" y2="32" stroke-width="1" stroke="#aeaeae"></line>',n.templates.luba.minus='<rect x="0" y="0" width="36" height="36" rx="12" ry="12" fill="#2E2E2E" stroke="#aeaeae" stroke-width="1"></rect><line x1="4" y1="18" x2="32" y2="18" stroke-width="1" stroke="#aeaeae"></line>',n.templates.luba.expandCollapseSize=36,n.templates.derek=Object.assign({},n.templates.ana),n.templates.derek.link='<path stroke="#aeaeae" stroke-width="1px" fill="none" d="M{xa},{ya} C{xb},{yb} {xc},{yc} {xd},{yd}"/>',n.templates.derek.field_0='<text width="235" style="font-size: 24px;" fill="#aeaeae" x="125" y="90" text-anchor="middle">{val}</text>',n.templates.derek.field_1='<text width="130" style="font-size: 16px;" fill="#aeaeae" x="230" y="30" text-anchor="end">{val}</text>',n.templates.derek.node='<rect x="0" y="0" height="120" width="250" fill="#ffffff" stroke-width="0" stroke="none" rx="5" ry="5"></rect><path d="M1.0464172536455116 0.43190469224125483 C53.84241668202045 -0.788936709486018, 103.41786516460891 -0.7020837047025514, 252.36637077877316 2.5880308844586395 M2.9051048929845287 1.416953777798454 C94.33574460557007 1.0012759229446266, 189.39715875173388 0.6456731199982935, 252.78978918302985 2.4201778360648074 M253.62699063660838 2.9193391477217157 C249.73034548542307 47.55931231380586, 252.87525930998083 91.26715478378368, 253.10179184315842 121.7440626272514 M251.37132919216776 1.8733470844542213 C252.2809675089866 32.73212950193807, 251.34402714677282 62.11470833534073, 251.87050951184997 121.58550827952904 M253.33945599552268 122.05611967964798 C171.36076589155192 123.47737863766969, 88.83808249906167 125.27259840604118, 3.1999393565128846 121.26868651191393 M252.26165120810887 122.5938901158243 C192.76996487394138 123.44664377223289, 131.37122563794998 122.94880221756583, 1.2373006891045732 121.88999197324904 M2.223863211672736 121.04511533445009 C1.4438124377596486 86.38398979211773, 2.8540468486809294 55.805566409478374, 3.8890451480896644 1.7483404843613926 M2.244347335490432 122.60147677858153 C2.100672267495622 92.31058899219087, 1.6261027388218166 64.160806803772, 1.6325734600065367 1.1945909353588222" stroke="#aeaeae" ></path>',n.templates.derek.defs=' <filter id="grayscale"><feColorMatrix type="matrix" values="0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0"/></filter>',n.templates.derek.img_0='<clipPath id="{randId}"><circle cx="60" cy="30" r="36"></circle></clipPath><path d="M59.27394950148486 -8.301766751084706 C67.69473471187919 -8.865443566034696, 80.29031463018414 -4.859224005049532, 87.18598909426663 0.33238763875740673 C94.08166355834912 5.523999282564345, 98.98110545022442 14.745947814116153, 100.64799628597981 22.847903111756924 C102.31488712173521 30.949858409397695, 101.71467046207992 41.576461864335656, 97.187334108799 48.944119424602036 C92.65999775551809 56.311776984868416, 82.03610997730354 64.08326918912249, 73.48397816629435 67.05384847335519 C64.93184635528516 70.02442775758789, 54.01035575000908 69.7708463163516, 45.874543242743854 66.76759512999827 C37.738730735478626 63.76434394364495, 29.04872278114092 56.18846598822666, 24.669103122702957 49.034341355235284 C20.289483464264993 41.88021672224391, 18.158053754175985 31.830144088547545, 19.596825292116065 23.84284733205002 C21.035596830056146 15.855550575552495, 25.795252700735308 6.49424361294595, 33.30173235034344 1.1105608162501355 C40.80821199995158 -4.273121980445679, 58.92971347412665 -7.0427741956040295, 64.63570318976488 -8.459249448124865 C70.34169290540312 -9.8757247006457, 67.62192977382313 -7.857597534262704, 67.53767064417285 -7.388290698874876 M62.748378255307365 -8.335850348284236 C71.26603403676657 -8.411982637093757, 83.3134559967999 -3.2332675886967737, 89.65944437868365 2.387927626929269 C96.00543276056739 8.0091228425
15531, 99.8018539626104 17.389209313563462, 100.82430854660979 25.39132094547202 C101.84676313060918 33.39343257738058, 100.69202080288338 43.23907526327184, 95.79417188267999 50.40059741838061 C90.8963229624766 57.56211957348938, 80.19607375493683 65.6933432424228, 71.43721502538948 68.36045387612462 C62.678356295842114 71.02756450982645, 51.31858275833087 70.03148525422704, 43.241019505395826 66.40326122059156 C35.16345625246078 62.775037186956084, 26.840434236544123 54.120081952867466, 22.971835507779204 46.59110967431175 C19.103236779014285 39.06213739575604, 17.94937086132579 28.992694575765086, 20.029427132806305 21.22942754925726 C22.10948340428682 13.466160522749433, 28.239699334668693 5.033316212766326, 35.452173136662296 0.011507515264803203 C42.6646469386559 -5.010301182236719, 59.029629541347575 -7.774813789367088, 63.30426994476793 -8.901424635751876 C67.57891034818829 -10.028035482136666, 61.20261013623477 -7.6019933587127815, 61.10001555718443 -6.748157563043929" style="stroke: #aeaeae; stroke-width: 2; fill: none;"></path><image filter="url(#grayscale)" preserveAspectRatio="xMidYMid slice" clip-path="url(#{randId})" xlink:href="{val}" x="20" y="-10"  width="80" height="80"></image>',n.templates.derek.minus='<circle cx="15" cy="15" r="15" fill="#ffffff" stroke-width="0"></circle><path d="M17.23891044927774 1.1814294501322902 C20.29160626452551 1.030769196657948, 23.947970993006972 3.1719335544839753, 26.394853759110717 5.588671983418923 C28.84173652521446 8.005410412353871, 31.246576051221126 12.511831935158815, 31.920207045900206 15.681860023741976 C32.593838040579286 18.85188811232514, 32.286699675240925 21.948848714186923, 30.436639727185195 24.60884051491789 C28.586579779129462 27.268832315648858, 24.05246578668338 30.675892912089505, 20.819847357565806 31.64181082812777 C17.58722892844823 32.60772874416604, 13.992479948405318 31.588687222722193, 11.040929152479746 30.404348011147484 C8.089378356554175 29.220008799572774, 4.476346434761303 27.363985211380037, 3.110542582012373 24.535775558679525 C1.7447387292634435 21.707565905979013, 2.0125141957866703 16.770753327135857, 2.8461060359861694 13.435090094944405 C3.6796978761856685 10.099426862752953, 4.99838568665378 6.33816589513267, 8.112093623209367 4.521796165530812 C11.225801559764953 2.7054264359289544, 18.764666760207586 2.8505106971937155, 21.528353655319687 2.5368717173332556 C24.29204055043179 2.2232327374727956, 24.87088035867136 2.534909813412478, 24.69421499388197 2.6399622863680516 M17.281640595209783 0.19007885243722633 C20.364244435145494 -0.11577004716725742, 25.135133405402318 3.2303746945812075, 27.855952721223584 5.7353294427454955 C30.57677203704485 8.240284190909783, 33.34617538156587 11.802005102645245, 33.606556490137386 15.219807341422953 C33.8669375987089 18.637609580200664, 31.337125602828454 23.632355493641384, 29.418239372652685 26.24214287541175 C27.499353142476917 28.85193025718212, 25.044077583504755 30.13224182494988, 22.093239109082777 30.87853163204516 C19.1424006346608 31.62482143914044, 14.787723024669972 31.933646092018286, 11.713208526120809 30.719881717983426 C8.638694027571646 29.506117343948567, 5.1333408130933655 26.55826769548724, 3.6461521177877945 23.595945387835997 C2.1589634224822234 20.633623080184755, 1.9785010696309286 16.25773192692332, 2.7900763542873843 12.945947872075987 C3.60165163894384 9.634163817228652, 5.999109831161897 5.87039683716568, 8.51560382572653 3.7252410587519886 C11.032097820291161 1.5800852803382974, 16.377503419445155 0.40900388408914673, 17.88904032167518 0.0750132015938405 C19.400577223905202 -0.2589774809014657, 17.448582822593046 1.2406055078364167, 17.584825239106664 1.7212969637801514" style="stroke: rgb(174, 174, 174); stroke-width: 1; fill: none;"></path><path d="M8.571186416504453 17.64803469305822 C12.085276840999553 15.452815349785006, 19.337130848197884 16.101685575250833, 26.855223350440756 18.889299472836626 M7.857231507904164 16.840024354210055 C15.011849298914942 18.06824852479784, 22.352469730756894 17.800410681835732, 26.732355140012178 16.88515873797708" style="stroke: #aeaeae; stroke-width: 1; fill: none;"></path>',n.templates.derek.plus='<circle cx="15" cy="15" r="15" fill="#ffffff" stroke-width="0"></circle><path d="M12.257463787262992 2.40166003616363 C15.548960627027807 1.1768586505919105, 20.323768339136134 1.874732142276981, 23.661947633240565 3.0864861053786417 C27.000126927344997 4.298240068480302, 30.703811226452725 6.729324000523814, 32.286539551889575 9.672183814773595 C33.86926787732643 12.615043629023376, 33.788018167397944 17.557781915741554, 33.158317585861674 20.743644990877332 C32.528617004325405 23.92950806601311, 31.137543762406274 26.899980401737224, 28.508336062671955 28.787362265588257 C25.879128362937635 30.67474412943929, 21.064677192956335 31.99302804642975, 17.383071387455747 32.06793617398354 
1C13.701465581955157 32.14284430153733, 9.342085269075854 31.17242931287016, 6.418701229668416 29.236811030911003 C3.4953171902609785 27.301192748951845, 0.29124975331190645 23.792422306170057, -0.15723284898887968 20.454226482228595 C-0.6057154512896659 17.116030658287134, 1.5769138742615705 12.178626667602387, 3.7278056158636996 9.207636087262241 C5.878697357465828 6.236645506922095, 10.970632450860041 3.8471017540469195, 12.748117600623896 2.6282830001877198 C14.525602750387751 1.4094642463285199, 14.289563699001825 1.9470094191022314, 14.392716514446832 1.894723564107041 M22.43549828180672 1.2256088400576157 C25.69018250895055 1.7704365119039576, 29.24546322166512 4.979269460398017, 31.051492912414023 8.188373611713667 C32.85752260316293 11.397477763029316, 33.67207918890526 17.17514768034262, 33.27167642630015 20.480233747951512 C32.871273663695035 23.785319815560406, 31.41050911947538 25.966765564166938, 28.649076336783356 28.01889001736704 C25.887643554091333 30.07101447056714, 20.094058835586818 32.38500719321419, 16.70307973014802 32.79298046715211 C13.31210062470922 33.20095374109003, 10.940906263905317 32.367748192606626, 8.303201704150565 30.46672966099454 C5.665497144395813 28.565711129382457, 2.097338248187536 24.641108687248686, 0.8768523716195098 21.386869277479594 C-0.34363350494851663 18.132629867710502, -0.763694313917872 14.0433435213021, 0.980286444742406 10.941293202379995 C2.7242672034026842 7.83924288345789, 7.945090366802328 4.317959037402062, 11.340736923581177 2.774567363946959 C14.736383480360027 1.231175690491856, 19.39979547907987 1.5862021443476335, 21.354165785415507 1.6809431616493775 C23.308536091751144 1.7756841789511215, 22.887857886273373 3.132249638930103, 23.06695876159499 3.343013467757423" style="stroke: rgb(174, 174, 174); stroke-width: 1; fill: none;"></path><path d="M7.0048103933165935 18.109075284628886 C12.152504846776358 18.486044066779655, 15.926735549928488 18.85477711845977, 26.641287664541796 15.553207106118496 M6.796084928139555 16.174781745374535 C14.085050058006614 16.53898319893461, 19.579209483395115 16.725914747038104, 27.441803598385356 17.277875712554966" style="stroke: #aeaeae; stroke-width: 1; fill: none;"></path><path d="M16.293755471804 6.234638030793387 C17.448668211406996 11.453666045700338, 16.27043554943843 18.842895411477887, 16.90423703847114 28.952046969222806 M17.809777051185264 7.011866752183222 C17.599122858612276 13.07833796918755, 16.995204905243295 18.587342115968614, 17.888568853882067 26.844926419317094" style="stroke: #aeaeae; stroke-width: 1; fill: none;"></path>',n.templates.derek.nodeMenuButton='<g style="cursor:pointer;" transform="matrix(1,0,0,1,210,80)" control-node-menu-id="{id}"><rect x="-4" y="-4" fill="#000000" fill-opacity="0" width="30" height="30"></rect><path d="M28.28024041166867 10.015533059199505 C16.45705393905741 10.81309700412131, 9.85276157405196 9.87162723980281, 3.5441213169168515 7.075531655648353 M27.551825308513525 8.923800642512257 C18.159502224784205 9.337153563754718, 7.451197502628936 9.284728719203128, 1.8548423867425456 8.753004894810802 M27.907104120536573 17.662200828300364 C18.343063985797404 18.998694042201137, 6.69417200021006 18.568117962359516, 2.7668346274558218 17.84920936843539 M26.99365966559525 17.444217688828093 C18.288291344549645 16.258053076066645, 10.047008592341617 16.913684103209345, 2.1772395910449567 17.55258716848472 M25.754130110044443 24.79648729629354 C19.716463597004157 24.059273917380096, 12.571903015673474 24.723484329803995, 1.2709092686545498 25.961416660790483 M26.031268385778997 24.853114475295413 C16.16958752624931 25.047162545233455, 7.4039608372111765 23.9169859615211, 1.4736400026930716 24.342985647697336" style="stroke: rgb(174, 174, 174); stroke-width: 1; fill: none;"></path></g>',n.templates.isla=Object.assign({},n.templates.ana),n.templates.isla.defs='<filter x="-50%" y="-50%" width="200%" height="200%" filterUnits="objectBoundingBox" id="isla-shadow"><feOffset dx="0" dy="4" in="SourceAlpha" result="shadowOffsetOuter1" /><feGaussianBlur stdDeviation="10" in="shadowOffsetOuter1" result="shadowBlurOuter1" /><feColorMatrix values="0 0 0 0 0   0 0 0 0 0   0 0 0 0 0  0 0 0 0.2 0" in="shadowBlurOuter1" type="matrix" result="shadowMatrixOuter1" /><feMerge><feMergeNode in="shadowMatrixOuter1" /><feMergeNode in="SourceGraphic" /></feMerge></filter>',n.templates.isla.size=[180,120],n.templates.isla.node='<rect filter="url
1(#isla-shadow)" x="0" y="20" rx="5" ry="5" height="100" width="180" fill="#FFF" stroke-width="1" stroke="#039BE5" ></rect><rect x="25" y="75" rx="10" ry="10" height="20" width="130" fill="#039BE5" stroke-width="3" stroke="#039BE5"></rect><rect fill="#ffffff" stroke="#039BE5" stroke-width="1" x="70" y="0" rx="13" ry="13" width="40" height="40"></rect><circle stroke="#FFCA28" stroke-width="3" fill="none" cx="90" cy="12" r="8"></circle><path d="M75,34 C75,17 105,17 105,34" stroke="#FFCA28" stroke-width="3" fill="none"></path>',n.templates.isla.field_0='<text width="120" style="font-size: 12px;" fill="#fff" x="90" y="90" text-anchor="middle">{val}</text>',n.templates.isla.field_1='<text width="160" style="font-size: 13px;" fill="#039BE5" x="90" y="64" text-anchor="middle">{val}</text>',n.templates.isla.img_0='<clipPath id="{randId}"><rect filter="url(#isla-shadow)" fill="#ffffff" stroke="#039BE5" stroke-width="1" x="70" y="0" rx="13" ry="13" width="40" height="40"></rect></clipPath><image preserveAspectRatio="xMidYMid slice" clip-path="url(#{randId})" xlink:href="{val}" x="70" y="0"  width="40" height="40"></image>',n.templates.isla.minus='<circle cx="15" cy="15" r="15" fill="#F57C00" stroke="#F57C00" stroke-width="1"></circle><line x1="8" y1="15" x2="22" y2="15" stroke-width="1" stroke="#ffffff"></line>',n.templates.isla.plus='<circle cx="15" cy="15" r="15" fill="#ffffff" stroke="#039BE5" stroke-width="1"></circle><line x1="4" y1="15" x2="26" y2="15" stroke-width="1" stroke="#039BE5"></line><line x1="15" y1="4" x2="15" y2="26" stroke-width="1" stroke="#039BE5"></line>',n.templates.isla.nodeMenuButton='<g style="cursor:pointer;" transform="matrix(1,0,0,1,83,45)" control-node-menu-id="{id}"><rect x="-4" y="-10" fill="#000000" fill-opacity="0" width="22" height="22"></rect><circle cx="0" cy="0" r="2" fill="#F57C00"></circle><circle cx="7" cy="0" r="2" fill="#F57C00"></circle><circle cx="14" cy="0" r="2" fill="#F57C00"></circle></g>',n.templates.isla.ripple={radius:0,color:"#F57C00",rect:{x:0,y:20,width:180,height:100}},n.templates.deborah=Object.assign({},n.templates.polina),n.templates.deborah.size=[150,150],n.templates.deborah.node='<rect x="0" y="0" height="150" width="150" fill="#039BE5" stroke-width="1" stroke="#686868" rx="15" ry="15"></rect>',n.templates.deborah.img_0='<clipPath id="{randId}"><rect fill="#ffffff" stroke="#039BE5" stroke-width="1" x="5" y="5" rx="15" ry="15" width="140" height="140"></rect></clipPath><image preserveAspectRatio="xMidYMid slice" clip-path="url(#{randId})" xlink:href="{val}" x="5" y="5"  width="140" height="140"></image><rect x="3" y="5" height="30" width="144" fill="#039BE5" opacity="0.5" rx="3" ry="3"></rect><rect x="3" y="115" height="30" width="144" fill="#039BE5" opacity="0.5" rx="3" ry="3"></rect>',n.templates.deborah.field_0='<text width="125" text-overflow="ellipsis" style="font-size: 18px;" fill="#ffffff" x="15" y="25" text-anchor="start">{val}</text>',n.templates.deborah.field_1='<text width="105" text-overflow="ellipsis" style="font-size: 11px;" fill="#ffffff" x="15" y="135" text-anchor="start">{val}</text>',n.templates.deborah.nodeMenuButton='<g style="cursor:pointer;" transform="matrix(1,0,0,1,125,130)" control-node-menu-id="{id}"><rect x="-4" y="-10" fill="#000000" fill-opacity="0" width="22" height="22"></rect><circle cx="0" cy="0" r="2" fill="#ffffff"></circle><circle cx="7" cy="0" r="2" fill="#ffffff"></circle><circle cx="14" cy="0" r="2" fill="#ffffff"></circle></g>',n.templates.subLevel=Object.assign({},n.templates.base),n.templates.subLevel.size=[0,0],n.templates.subLevel.node="",n.templates.subLevel.plus="",n.templates.subLevel.minus="",n.templates.subLevel.nodeMenuButton="",n.ui={_defsIds:{},defs:function(e){var t="";for(var i in n.templates){var r=n.templates[i];r.defs?(n.ui._defsIds[i]=n.randomId(),t+=r.defs.replace("{randId}",n.ui._defsIds[i])):t+=r.defs}return"<defs>"+t+e+"</defs>"},css:function(){return'<style>.bg-ripple-container {position: absolute; top: 0; right: 0; bottom: 0; left: 0; } .bg-ripple-container span {transform: scale(0);border-radius:100%;position:absolute;opacity:0.75;background-color:#fff;animation: bg-ripple 1000ms; }@-moz-keyframes bg-ripple {to {opacity: 0;transform: scale(2);}}@-webkit-keyframes bg-ripple {to {opacity: 0;transform: scale(2);}}@-o-keyframes bg-ripple {to {opacity: 0;transform: scale(2);}}@keyframes bg-ripple {to {opacity: 0;transform: scale(2);}}.bg-switch {position:relative;display:inline-block;width:60px;height:24px;float:right;}
1.bg-switch input {opacity:0;width:0;height:0;}.bg-slider {position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color: #ccc;-webkit-transition:.4s;transition: .4s;}.bg-slider:before {position:absolute;content:"";height:16px;width:16px;left:4px;bottom:4px;background-color:white;-webkit-transition:.4s;transition:.4s;}input:checked + .bg-slider {background-color:#2196F3;}input:focus + .bg-slider {box-shadow:0 0 1px #2196F3;}input:checked + .bg-slider:before {-webkit-transform:translateX(34px);-ms-transform:translateX(34px);transform:translateX(34px);}.bg-slider.round {border-radius:24px;}.bg-slider.round:before {border-radius:50%;}svg text:hover {cursor:default;}svg.cursor-grab, svg.cursor-grab text:hover {cursor:grab;}svg.cursor-nodrop, svg.cursor-nodrop text:hover {cursor:no-drop;}svg.cursor-copy, svg.cursor-copy text:hover {cursor:copy;}svg.cursor-move, svg.cursor-move text:hover  {cursor:move;}#close-btn:hover, #close-btn:focus {color: #000; text-decoration: none; cursor: pointer;} #id-select:focus, #pid-select:focus {outline: 0.5px solid #aeaeae;} #sampleDialog #title:hover{ cursor:default; background:gray;}</style>'},lonely:function(e){return e.nodes&&e.nodes.length?"":n.IT_IS_LONELY_HERE.replace("{link}",n.RES.IT_IS_LONELY_HERE_LINK)},pointer:function(e,t,i){return t===n.action.exporting?"":n.t(e.template,!1,i).pointer},node:function(e,t,i,r,o,a,l,s,d,c){var p=n.t(e.templateName,e.min,d),h=p.node.replaceAll("{w}",e.w).replaceAll("{h}",e.h);for(var f in p.defs&&(h=h.replace("{randId}",n.ui._defsIds[e.templateName])),null==l&&(l=r.nodeBinding),l){var u=l[f];if(t){var g=t[u];"function"==typeof u&&(g=u(c,e,t)),null!=g&&null!=g&&null!=p[f]&&(h+=(n._lblIsImg(r,f)||"string"!=typeof g||(g=n.wrapText(g,p[f])),p[f].replace("{val}",g)).replaceAll("{ew}",e.w-(e.padding?e.padding[1]:0)).replaceAll("{cw}",e.w/2).replaceAll("{randId}",n.randomId()).replaceAll("{randId2}",n.randomId()))}}var m=n._getPosition(i,e,o,a),y="node";Array.isArray(e.tags)&&e.tags.length&&(y+=" "+e.tags.join(" ")),e.layout&&(y+=" tree-layout");var x="";e.lcn&&(x='lcn="'+e.lcn+'"');var v=n.nodeOpenTag.replace("{lcn}",x).replace("{id}",e.id).replace("{class}",y).replace("{sl}",e.sl).replace("{level}",e.level).replace("{x}",m.x).replace("{y}",m.y),b=n._getOpacity(i,e);return v=v.replace("{opacity}",b),null!=r.nodeMenu&&"split"!=e.templateName&&s!==n.action.exporting&&(h+=p.nodeMenuButton.replace("{id}",e.id).replace("{cw}",e.w/2).replace("{ew}",e.w-(e.padding?e.padding[1]:0))),v+h+n.grCloseTag},expandCollapseBtn:function(e,t,i,r,o){var a="";if(r!==n.action.exporting&&0<t.childrenIds.length&&"split"!=t.templateName){if(t.hasPartners){for(var l=!1,s=0;s<t.children.length;s++)null!=t.children[s].ppid||t.children[s].isPartner||(l=!0);if(!l)return""}var d=i[t.lcn?t.lcn:"base"],c=0,p=0,h=n.t(t.templateName,t.min,o);switch(d.orientation){case n.orientation.top:case n.orientation.top_left:c=t.x+t.w/2,p=t.y+t.h;break;case n.orientation.bottom:case n.orientation.bottom_left:c=t.x+t.w/2,p=t.y;break;case n.orientation.right:case n.orientation.right_top:c=t.x,p=t.y+t.h/2;break;case n.orientation.left:case n.orientation.left_top:c=t.x+t.w,p=t.y+t.h/2}if(c-=h.expandCollapseSize/2,p-=h.expandCollapseSize/2,e.getCollapsedIds(t).length?(a+=n.expcollOpenTag.replace("{id}",t.id).replace("{x}",c).replace("{y}",p),a+=h.plus):(a+=n.expcollOpenTag.replace("{id}",t.id).replace("{x}",c).replace("{y}",p),a+=h.minus),(a+=n.grCloseTag).indexOf("{collapsed-children-count}")){var f=n.collapsedChildrenCount(e,t);a=a.replace("{collapsed-children-count}",f)}}var u={html:a,node:t};return n.events.publish("renderbuttons",[e,u]),u.html},link:function(e,t,i,r,o){var a=e.lcn?e.lcn:"base",l=t._layoutConfigs[a],s=n.t(e.templateName,e.min,i),d=[],c=l.levelSeparation/2;e.layout!=n.mixed&&e.layout!=n.tree||(c=l.mixedHierarchyNodesSeparation/2);var p=0,h=n.getRootOf(e).id,f=r[h][e.sl],u=void 0;if(e.hasPartners){u={ids:[],indexes:{},ppnodes:{},lastLeft:null,firstRight:null,maxSidePartnersWithChildren:0,rightIds:[],leftIds:[],partnerChildrenSplitSeparation:t.config.partnerChildrenSplitSeparation};for(var g=0;g<e.children.length;g++){var m=null;null!=(y=e.children[g]).ppid&&(m=o[y.ppid]),m?(u.ppnodes[y.id]=m,u.ids.push(y.id),1==m.isPartner?(-1==u.rightIds.indexOf(m.id)&&u.rightIds.push(m.id),u.indexes[y.id]=u.rightIds.indexOf(m.id),u.firstRight||(u.firstRight=y)):2==m.isPartner&&(-1==u.leftIds.indexOf(m.id)&&u.leftIds.push(m.id),u.indexes[y.id]=u.leftIds.indexOf(m.id),u.lastLeft=y)):y.isPartner||(u.lastLeft=y,u.firstRight||(u.firstRight=y))}u.maxSidePartnersWithChildren=Math.max(u.leftIds.length,u.rightIds.length),p=0==u.maxSidePartnersWithChildren?t.config.minPartnerSeparation/2:t.config.minPartnerSeparation/2+u.partnerChildrenSplitSeparation*u.maxSidePartnersWithChildren+u.partnerChildrenSplitSeparation/2}for(g=0;g<e.children.length;g++){var y=e.children[g],x=r[h][y.sl],v={xa:0,ya:0,xb:0,yb:0,xc:0,yc:0,xd:0,yd:0,x:0,y:0,rotate:0},b=(s=n.t(y.templateName,y.min,i)).link;if(u&&-1!=u.ids.indexOf(y.id))switch(l.orientation){case n.orientation.top:case n.orientation.top_left:v=n.ui._linkPpTop(u,e,y,x,f,s);break;case n.orientation.bottom:case n.orientation.bottom_left:v=n.ui._linkPpBottom(u,e,y,x,f,s);break;case n.orientation.right:case n.orientation.right_top:v=n.ui._linkPpRight(u,e,y,x,f,s);break;case n.orientation.left:case n.orientation.left_top:v=n.ui._linkPpLeft(u,e,y,x,f,s)}else if((y.isAssistant||2==y.layout)&&y.rightNeighbor&&y.rightNeighbor.isSplit)switch(l.orientation){case n.orientation.top:case n.orientation.top_left:case n.orientation.bottom:case n.orientation.bottom_left:v=n.ui._linkRightToLeft(y.rightNeighbor,y,s,c);break;case n.orientation.right:case n.orientation.right_top:case n.orientation.left:case n.orientation.left_top:v=n.ui._linkBottomToTop(y.rightNeighbor,y,s,c)}else if((y.isAssistant||2==y.layout)&&y.leftNeighbor&&y.leftNeighbor.isSplit)switch(l.orientation){case n.orientation.top:case n.orientation.top_left:case n.orientation.bottom:case n.orientation.bottom_left:v=n.ui._linkLeftToRight(y.leftNeighbor,y,s,c);break;case n.orientation.right:case n.orientation.right_top:case n.orientation.left:case n.orientation.left_top:v=n.ui._linkTopToBottom(y.leftNeighbor,y,s,c)}else switch(l.orientation){case n.orientation.top:case n.orientation.top_left:if(1==y.isPartner)v=n.ui._linkLeftToRight(e,y,s,p);else if(2==y.isPartner)v=n.ui._linkRightToLeft(e,y,s,p);else{var w=1==y.layout?void 0:x.minY-(x.minY-f.maxY)/2;v=n.ui._linkTopToBottom(e,y,s,c,w)}break;case n.orientation.bottom:case n.orientation.bottom_left:1==y.isPartner?v=n.ui._linkLeftToRight(e,y,s,p):2==y.isPartner?v=n.ui._linkRightToLeft(e,y,s,p):(w=1==y.layout?void 0:x.maxY-(x.maxY-f.minY)/2,v=n.ui._linkBottomToTop(e,y,s,c,w)
1);break;case n.orientation.right:case n.orientation.right_top:1==y.isPartner?v=n.ui._linkTopToBottom(e,y,s,p):2==y.isPartner?v=n.ui._linkBottomToTop(e,y,s,p):(w=1==y.layout?void 0:x.maxX-(x.maxX-f.minX)/2,v=n.ui._linkRightToLeft(e,y,s,c,w));break;case n.orientation.left:case n.orientation.left_top:1==y.isPartner?v=n.ui._linkTopToBottom(e,y,s,p):2==y.isPartner?v=n.ui._linkBottomToTop(e,y,s,p):(w=1==y.layout?void 0:x.minX-(x.minX-f.maxX)/2,v=n.ui._linkLeftToRight(e,y,s,c,w))}if(-1!=b.indexOf("{rounded}"))if(v.xa==v.xb&&v.xa==v.xc&&v.xa==v.xd||v.ya==v.yb&&v.ya==v.yc&&v.ya==v.yd)b=b.replace("{rounded}","M"+v.xa+","+v.ya+" L"+v.xd+","+v.yd);else{var _=n.ui._roundedEdge(v.xa,v.ya,v.xb,v.yb,v.xc,v.yc),k=n.ui._roundedEdge(v.xb,v.yb,v.xc,v.yc,v.xd,v.yd);b=b.replace("{rounded}","M"+_.x1+","+_.y1+" "+_.x2+","+_.y2+" Q"+_.qx1+","+_.qy1+" "+_.qx2+","+_.qy2+" L"+k.x2+","+k.y2+" Q"+k.qx1+","+k.qy1+" "+k.qx2+","+k.qy2+" L"+k.x3+","+k.y3)}else b=-1!=b.indexOf("{edge}")?b.replace("{edge}","M"+v.xa+","+v.ya+" "+v.xb+","+v.yb+" "+v.xc+","+v.yc+" L"+v.xd+","+v.yd):-1!=b.indexOf("{curve}")?b.replace("{curve}","M"+v.xa+","+v.ya+" C"+v.xb+","+v.yb+" "+v.xc+","+v.yc+" "+v.xd+","+v.yd):b.replaceAll("{xa}",v.xa).replaceAll("{ya}",v.ya).replaceAll("{xb}",v.xb).replaceAll("{yb}",v.yb).replaceAll("{xc}",v.xc).replaceAll("{yc}",v.yc).replaceAll("{xd}",v.xd).replaceAll("{yd}",v.yd);d.push(n.linkOpenTag.replace("{id}",e.id).replace("{class}","link "+y.tags.join(" ")).replace("{child-id}",y.id));var S={node:e,cnode:y,p:v,html:b};n.events.publish("render-link",[t,S]),d.push(S.html);var C="";for(var I in t.config.linkBinding){var A=t.config.linkBinding[I],L=t._get(y.id);if(L){var E=L[A];null!=E&&null!=E&&null!=s[I]&&(C+=s[I].replace("{val}",E))}}""!=C&&(C=n.linkFieldsOpenTag.replace("{x}",v.x).replace("{y}",v.y).replace("{rotate}",0)+C+n.grCloseTag,d.push(C)),d.push(n.grCloseTag)}return d.join("")},svg:function(e,t,i,r,o,a){return n.t(r.template,!1,a).svg.replace("{w}",e).replace("{h}",t).replace("{viewBox}",i).replace("{content}",o)},exportMenuButton:function(e){return null==e.menu?"":n.t(e.template,!1).exportMenuButton.replaceAll("{p}",e.padding)},_roundedEdge:function(e,t,i,r,o,a){var l,s,d,c=0;return e==i&&e==o||t==r&&t==a?(l=d=i,s=c=r):(e!=o&&i==o&&(l=d=i,s=r,t<a?c=r+n.LINK_ROUNDED_CORNERS:a<t&&(c=r-n.LINK_ROUNDED_CORNERS)),e<o&&i==o?i-=n.LINK_ROUNDED_CORNERS:o<e&&i==o&&(i+=n.LINK_ROUNDED_CORNERS),t!=a&&r==a&&(l=i,s=c=r,e<o?d=i+n.LINK_ROUNDED_CORNERS:o<e&&(d=i-n.LINK_ROUNDED_CORNERS)),t<a&&r==a?r-=n.LINK_ROUNDED_CORNERS:a<t&&r==a&&(r+=n.LINK_ROUNDED_CORNERS)),{x1:e,y1:t,x2:i,y2:r,x3:o,y3:a,qx1:l,qy1:s,qx2:d,qy2:c}},_linkTopToBottom:function(e,t,i,n,r){var o,a,l,s,d,c,p,h;return o=e.x+e.w/2+i.linkAdjuster.toX,a=e.y+e.h+i.linkAdjuster.toY,d=s=t.x+t.w/2+i.linkAdjuster.fromX,c=t.y+i.linkAdjuster.fromY,{xa:l=o,ya:a,xb:l,yb:h=e.rightNeighbor&&e.rightNeighbor.isAssistant&&"split"==t.templateName?e.rightNeighbor.y+e.rightNeighbor.h+n:"split"!=e.templateName||!t.isAssistant&&2!=t.layout?"split"==t.templateName?a+n:null!=r?r:c-n:c,xc:p=s,yc:h,xd:d,yd:c,x:p,y:h+16,rotate:0}},_linkBottomToTop:function(e,t,i,n,r){var o,a,l,s,d,c,p,h;return o=e.x+e.w/2+i.linkAdjuster.toX,a=e.y+i.linkAdjuster.toY,d=s=t.x+t.w/2+i.linkAdjuster.fromX,c=t.y+t.h+i.linkAdjuster.fromY,{xa:l=o,ya:a,xb:l,yb:h=e.rightNeighbor&&e.rightNeighbor.isAssistant&&"split"==t.templateName?e.rightNeighbor.y-n:"split"!=e.templateName||!t.isAssistant&&2!=t.layout?"split"==t.templateName?a-n:null!=r?r:c+n:c,xc:p=s,yc:h,xd:d,yd:c,x:p,y:h-14,rotate:0}},_linkRightToLeft:function(e,t,i,n,r){var o,a,l,s,d,c,p,h;return o=e.x+i.linkAdjuster.toX,a=e.y+e.h/2+i.linkAdjuster.toY,d=t.x+t.w+i.linkAdjuster.fromX,c=s=t.y+t.h/2+i.linkAdjuster.fromY,{xa:o,ya:l=a,xb:h=e.rightNeighbor&&e.rightNeighbor.isAssistant&&"split"==t.templateName?e.rightNeighbor.x-n:"split"!=e.templateName||!t.isAssistant&&2!=t.layout?"split"==t.templateName?o-n:null!=r?r:d+n:d,yb:l,xc:h,yc:p=s,xd:d,yd:c,x:h-16,y:p,rotate:90}},_linkLeftToRight:function(e,t,i,n,r){var o,a,l,s,d,c,p,h;return o=e.x+e.w+i.linkAdjuster.toX,a=e.y+e.h/2+i.linkAdjuster.toY,d=t.x+i.linkAdjuster.fromX,c=s=t.y+t.h/2+i.linkAdjuster.fromY,{xa:o,ya:l=a,xb:h=e.rightNeighbor&&e.rightNeighbor.isAssistant&&"split"==t.templateName?e.rightNeighbor.x+e.rightNeighbor.w+n:"split"!=e.templateName||!t.isAssistant&&2!=t.layout?"split"==t.templateName?o+n:null!=r?r:d-n:d,yb:l,xc:h,yc:p=s,xd:d,yd:c,x:h+14,y:p,rotate:270}},_linkPpTop:function(e,t,i,r,o,a){var l=e.ppnodes[i.id],s=l.y+l.h/2,d=r.minY-(r.minY-o.maxY)/2,c=(r.minY-o.maxY)/e.maxSidePartnersWithChildren/4,p=n.ui.__linkPpBottomTop(e,t,i,d,c,l),h=p.x;return d=p.mid,n.ui._linkTopToBottom({x:h,y:s,w:0,h:0},i,a,0,d)},_linkPpBottom:function(e,t,i,r,o,a){var l=e.ppnodes[i.id],s=l.y+l.h/2,d=r.maxY-(r.maxY-o.minY)/2,c=(r.maxY-o.minY)/e.maxSidePartnersWithChildren/4,p=n.ui.__linkPpBottomTop(e,t,i,d,c,l),h=p.x;return d=p.mid,n.ui._linkBottomToTop({x:h,y:s,w:0,h:0},i,a,0,d)},_linkPpLeft:function(e,t,i,r,o,a){var l=e.ppnodes[i.id],s=r.minX-(r.minX-o.maxX)/2,d=(r.minX-o.maxX)/e.maxSidePartnersWithChildren/4,c=l.x+l.w/2,p=n.ui.__linkPpLeftRight(e,t,i,s,d,l),h=p.y;return s=p.mid,n.ui._linkLeftToRight({x:c,y:h,w:0,h:0},i,a,0,s)},_linkPpRight:function(e,t,i,r,o,a){var l=e.ppnodes[i.id],s=r.maxX-(r.maxX-o.minX)/2,d=(r.maxX-o.minX)/e.maxSidePartnersWithChildren/4,c=l.x+l.w/2,p=n.ui.__linkPpLeftRight(e,t,i,s,d,l),h=p.y;return s=p.mid,n.ui._linkRightToLeft({x:c,y:h,w:0,h:0},i,a,0,s)},__linkPpBottomTop:function(e,t,i,n,r,o){var a=0;return 1==o.isPartner?(a=o.x-t.partnerSeparation/2+e.indexes[i.id]*e.partnerChildrenSplitSeparation-(e.rightIds.length-1)*e.partnerChildrenSplitSeparation/2,e.lastLeft&&a<e.lastLeft.x+e.lastLeft.w/2?a<i.x+i.w/2?n-=(e.indexes[i.id]+1)*r:n-=(e.rightIds.length-e.indexes[i.id])*r:a<i.x+i.w/2?n+=(e.rightIds.length-e.indexes[i.id])*r:n+=(e.indexes[i.id]+1)*r):2==o.isPartner&&(a=o.x+o.w+t.partnerSeparation/2+e.indexes[i.id]*e.partnerChildrenSplitSeparation-(e.leftIds.length-1)*e.partnerChildrenSplitSeparation/2,e.firstRight&&a>e.firstRight.x+e.firstRight.w/2?a<i.x+i.w/2?n-=(e.indexes[i.id]+1)*r:n-=(e.leftIds.length-e.indexes[i.id])*r:a<i.x+i.w/2?n+=(e.leftIds.length-e.indexes[i.id])*r:n+=(e.indexes[i.id]+1)*r),{x:a,mid:n}},__linkPpLeftRight:function(e,t,i,n,r,o){var a=0;return 1==o.isPartner?(a=o.y-t.partnerSeparation/2+e.indexes[i.id]*e.partnerChildrenSplitSeparation-(e.rightIds.length-1)*e.partnerChildrenSplitSeparation/2,e.lastLeft&&a<e.lastLeft.y+e.lastLeft.h/2?a<i.y+i.h/2?n-=(e.indexes[i.id]+1)*r:n-=(e.rightIds.length-e.indexes[i.id])*r:a<i.y+i.h/2?n+=(e.rightIds.length-e.indexes[i.id])*r:n+=(e.indexes[i.id]+1)*r):2==o.isPartner&&(a=o.y+o.h+t.partnerSeparation/2+e.indexes[i.id]*e.partnerChildrenSplitSeparation-(e.leftIds.length-1)*e.partnerChildrenSplitSeparation/2,e.firstRight&&a>e.firstRight.y+e.firstRight.h/2?a<i.y+i.h/2?n-=(e.indexes[i.id]+1)*r:n-=(e.leftIds.length-e.indexes[i.id])*r:a<i.y+i.h/2?n+=(e.leftIds.length-e.indexes[i.id])*r:n+=(e.indexes[i.id]+1)*r),{y:a,mid:n}}},void 0===n&&(n={}),n._validateConfig=function(e){return!!e||(console.error("config is not defined"),!1)},n._arrayContains=function(e,t){if(e&&Array.isArray(e))for(var i=e.length;i--;)if(e[i]===t)return!0;return!1},n._interceptions=function(e,t){if(!e)return[];if(!t)return[];var i=[];if(Array.isArray(e)&&Array.isArray(t))for(var n in e)for(var r in t)e[n]==t[r]&&i.push(e[n]);else if(Array.isArray(e)&&!Array.isArray(t))for(var n in e)for(var r in t)e[n]==r&&i.push(e[n]);else if(!Array.isArray(e)&&Array.isArray(t))for(var n in e)for(var r in t)n==t[r]&&i.push(t[r]);return i},n._getTags=function(e){return e.tags&&!Array.isArray(e.tags)?e.tags.split(","):e.tags&&Array.isArray(e.tags)?e.tags:[]},n._centerPointInPercent=function(e,t,i){var n=e.getBoundingClientRect(),r=t-n.left,o=i-n.top;return[r/(n.width/100),o/(n.height/100)]},n._trim=function(e){return e.replace(/^\s+|\s+$/g,"")},n._getTransform=function(e){var t=e.getAttribute("transform");return t=t.replace("matrix","").replace("(","").replace(")",""),n._browser().msie&&(t=t.replace(/ /g,",")),t="["+(t=n._trim(t))+"]",JSON.parse(t)},n.getScale=function(e,t,i,r,o,a,l,s){var d=1;if(e||r!==n.match.boundary)if(e||r!==n.match.width)if(e||r!==n.match.height)if(e){var c,p=t/e[2];d=(c=i/e[3])<p?c:p}else d=r;else d=i/s;else d=t/l;else d=(c=i/s)<(p=t/l)?c:p;return d&&o<d&&(d=o),d&&d<a&&(d=a),d},n._mergeObject=function(e,t){var i={};for(var n in e)i[n]=e[n];for(n in t)i[n]=t[n];return i},n._lblIsImg=function(e,t){return!(!e.nodeBinding||"string"!=typeof t||-1==t.indexOf("img")||!e.nodeBinding[t])},n._getFistImgField=function(e){if(e.nodeBinding)for(var t in e.nodeBinding)if(-1!=t.indexOf("img"))return e.no
1deBinding[t];return!1},n._fieldIsImg=function(e,t){if(e.nodeBinding)for(var i in e.nodeBinding)if(e.nodeBinding[i]==t)return n._lblIsImg(e,i);return!1},n._guid=function(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()},n.htmlRipple=function(e){var t=document.createElement("style");t.type="text/css",t.innerHTML=" .bg-ripple-container {position: absolute; top: 0; right: 0; bottom: 0; left: 0; } .bg-ripple-container span {transform: scale(0);border-radius:100%;position:absolute;opacity:0.75;background-color:#fff;animation: bg-ripple 1000ms; }@-moz-keyframes bg-ripple {to {opacity: 0;transform: scale(2);}}@-webkit-keyframes bg-ripple {to {opacity: 0;transform: scale(2);}}@-o-keyframes bg-ripple {to {opacity: 0;transform: scale(2);}}@keyframes bg-ripple {to {opacity: 0;transform: scale(2);}}",document.head.appendChild(t);var i,n,r=document.createElement("div");r.className="bg-ripple-container",e.addEventListener("mousedown",function(t){var i,n,r,o,a;return n=document.createElement("span"),r=this.offsetWidth,i=this.getBoundingClientRect(),a=t.pageX-i.left-r/2,o="top:"+(t.pageY-i.top-r/2)+"px; left: "+a+"px; height: "+r+"px; width: "+r+"px;",e.rippleContainer.appendChild(n),n.setAttribute("style",o)}),e.addEventListener("mouseup",(i=function(){for(;this.rippleContainer.firstChild;)this.rippleContainer.removeChild(this.rippleContainer.firstChild)},n=void 0,function(){var e,t;return t=this,e=arguments,clearTimeout(n),n=setTimeout(function(){return i.apply(t,e)},2e3)})),e.rippleContainer=r,e.appendChild(r)},n._moveToBoundaryArea=function(e,t,i,r){var o=t.slice(0);t[0]<i.left&&t[0]<i.right&&(o[0]=i.left>i.right?i.right:i.left),t[0]>i.right&&t[0]>i.left&&(o[0]=i.left>i.right?i.left:i.right),t[1]<i.top&&t[1]<i.bottom&&(o[1]=i.top>i.bottom?i.bottom:i.top),t[1]>i.bottom&&t[1]>i.top&&(o[1]=i.top>i.bottom?i.top:i.bottom),t[0]!==o[0]||t[1]!==o[1]?n.anim(e,{viewBox:t},{viewBox:o},300,n.anim.outPow,function(){r&&r()}):r&&r()},n.randomId=function(){return Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15)},n._getClientXY=function(e){return-1==e.type.indexOf("touch")?{x:e.clientX,y:e.clientY}:e.changedTouches.length?{x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY}:void 0},n._getClientTouchesXY=function(e,t){return-1!=e.type.indexOf("touch")?e.touches.length<t+1?{x:null,y:null}:{x:e.touches[t].clientX,y:e.touches[t].clientY}:{x:e.clientX,y:e.clientY}},n._getOffset=function(e,t){e&&(t.x+=e.offsetLeft,t.y+=e.offsetTop,n._getOffset(e.offsetParent,t))},n._getTopLeft=function(e){var t={x:0,y:0};return n._getOffset(e,t),t},n._getOffsetXY=function(e,t){if(-1==t.type.indexOf("touch"))return{x:t.offsetX,y:t.offsetY};if(t.touches.length){var i=n._getTopLeft(e);return{x:t.touches[0].pageX-i.x,y:t.touches[0].pageY-i.y}}return t.changedTouches.length?(i=n._getTopLeft(e),{x:t.changedTouches[0].pageX-i.x,y:t.changedTouches[0].pageY-i.y}):void 0},n._pinchMiddlePointInPercent=function(e,t,i,r){var o=n._getTopLeft(e),a=r.touches[0].pageX-o.x,l=r.touches[0].pageY-o.y,s=r.touches[1].pageX-o.x,d=r.touches[1].pageY-o.y;return[((a-s)/2+s)/(t/100),((l-d)/2+d)/(i/100)]},n._browser=function(){var e=!!window.opr&&!!opr.addons||!!window.opera||0<=navigator.userAgent.indexOf(" OPR/"),t="undefined"!=typeof InstallTrigger,i=/constructor/i.test(window.HTMLElement)||"[object SafariRemoteNotification]"===(!window.safari||"undefined"!=typeof safari&&safari.pushNotification).toString(),n=!!document.documentMode,r=!n&&!!window.StyleMedia,o=!(!window.chrome||!window.chrome.webstore&&!window.chrome.runtime);return{opera:e,firefox:t,safari:i,msie:n,edge:r,chrome:o,blink:(o||e)&&!!window.CSS}},n._menuPosition=function(e,t,i){var n=e.getBoundingClientRect(),r=i.getBoundingClientRect(),o=t.getBoundingClientRect(),a=n.left-r.left,l=n.top-r.top;return n.top+o.height>r.top+r.height&&(l-=o.height),n.left-o.width<r.left&&(a+=o.width),{x:a,y:l}},n._getTemplate=function(e,t,i){if(Array.isArray(e))for(var n=0;n<e.length;n++){var r=t[e[n]];if(r&&r.template)return r.template}return i},n._getMin=function(e,t){if(e.tags&&e.tags.length&&t.tags)for(var i=0;i<e.tags.length;i++){var n=t.tags[e.tags[i]];if(n&&!0===n.min)return!0}return t.min},n._getSubLevels=function(e,t){if(e&&e.length)for(var i=0;i<e.length;i++){var n=t[e[i]];if(n&&n.subLevels)return n.subLevels}return 0},n._isHTML=function(e){var t=document.createElement("div");t.innerHTML=e;for(var i=t.childNodes,n=i.length;n--;)if(1==i[n].nodeType)return!0;return!1},n._getTestDiv=function(){var e=document.getElementById("orgchart_js_test_div");return e||((e=document.createElement("div")).id="orgchart_js_test_div",e.style.position="fixed",e.style.top="-10000px",e.
1style.left="-10000px",document.body.appendChild(e)),e},n._getLabelSize=function(e){var t=n._getTestDiv();return t.innerHTML="<svg>"+e+"</svg>",t.querySelector("text").getBoundingClientRect()},n.wrapText=function(e,t){if(-1==t.indexOf("<text"))return e;if(-1==t.indexOf("width"))return e;if(n._isHTML(e))return e;var i=n._getTestDiv();t=t.replaceAll("{cw}",0),i.innerHTML="<svg>"+t+"</svg>";var r=(new DOMParser).parseFromString(t,"text/xml").getElementsByTagName("text")[0],o=parseFloat(r.getAttribute("x")),a=parseFloat(r.getAttribute("y")),l=r.getAttribute("text-anchor"),s=r.getAttribute("width"),d=r.getAttribute("text-overflow"),c="http://www.w3.org/2000/svg",p=i.getElementsByTagName("svg")[0].getElementsByTagName("text")[0],h=parseFloat(r.getAttribute("text-overflow-lines"));if(h||(h=0),!s)return e;if(s=parseFloat(s),o||(o=0),a||(a=0),o||(l="start"),d||(d="ellipsis"),"ellipsis"==d){p.removeChild(p.firstChild),p.textContent=e;for(var f=p.getComputedTextLength(),u=2;s<f;)p.textContent=e.substring(0,e.length-u),p.textContent+="...",f=p.getComputedTextLength(),u++;return 2<u?"<title>"+e+"</title>"+p.textContent:e}if("multiline"==d){var g=e.split(" "),m=p.getBBox().height;p.textContent="";var y=document.createElementNS(c,"tspan"),x=document.createTextNode(g[0]);y.setAttributeNS(null,"x",o),y.setAttributeNS(null,"y",a),y.setAttributeNS(null,"text-anchor",l),y.appendChild(x),p.appendChild(y),u=1;for(var v=1,b=1;b<g.length;b++){var w=y.firstChild.data.length;if(y.firstChild.data+=" "+g[b],y.getComputedTextLength()>s){if(y.firstChild.data=y.firstChild.data.slice(0,w),v++,0!==h&&h<v)break;(y=document.createElementNS(c,"tspan")).setAttributeNS(null,"x",o),y.setAttributeNS(null,"y",a+m*u),y.setAttributeNS(null,"text-anchor",l),x=document.createTextNode(g[b]),y.appendChild(x),p.appendChild(y),u++}}var _="";if(null!=p.innerHTML)_=p.innerHTML,p.innerHTML="";else{var k="";for(b=p.childNodes.length-1;0<=b;b--)k=XMLSerializer().serializeToString(p.childNodes[b])+k,p.removeChild(p.childNodes[b]);_=k}return _}},n._downloadFile=function(e,t,i,n){var r=new Blob([t],{type:e});if(1==n){var o=URL.createObjectURL(r);window.open(o,"_blank").focus()}else if(navigator.msSaveBlob)navigator.msSaveBlob(r,i);else{var a=document.createElement("a");void 0!==a.download&&(o=URL.createObjectURL(r),a.setAttribute("href",o),a.setAttribute("download",i),a.style.visibility="hidden",document.body.appendChild(a),a.click(),document.body.removeChild(a))}},n._getPosition=function(e,t,i,n){var r={x:t.x,y:t.y};if(null!=i&&(r.x=i),null!=n&&(r.y=i),e&&3==e.length){var o=e[0].indexOf(t.id);-1!=o&&null!=e[1][o].transform&&(null==i&&(r.x=e[1][o].transform[4]),null==n&&(r.y=e[1][o].transform[5]))}return r},n._getOpacity=function(e,t){var i=1;if(e&&3==e.length){var n=e[0].indexOf(t.id);-1!=n&&null!=e[1][n].opacity&&(i=e[1][n].opacity)}return i},n.t=function(e,t,i){var r=n.templates[e],o=null;if(null!=i&&r.scaleLessThen){var a=[];for(var l in r.scaleLessThen){var s=parseFloat(l);i<s&&a.push(s)}if(0<a.length){a.sort(function(e,t){return e-t});var d=r.scaleLessThen[a[0]];for(var c in d)null==o&&(o=Object.assign({},r)),o[c]=d[c]}}return t?null==o?r.min?r.min:r:o.min?o.min:o:null==o?r:o},n.setNodeSize=function(e){var t=n.t(e.templateName,e.min);e.w=t&&t.size?t.size[0]:0,e.h=t&&t.size?t.size[1]:0},n._imgs2base64=function(e,t,i,r){var o=e.getElementsByTagName(t),a=o.length;0==a&&r();for(var l=0;l<a;l++)!function(){var e=l,t=o[e];n._getDataUri(t.getAttribute(i),function(n){n.success&&t.setAttribute(i,n.result),e==a-1&&r()})}()},n._getDataUri=function(e,t){if(-1!=e.indexOf("base64"))t({success:!1});else{var i=new XMLHttpRequest;i.open("GET",e),i.responseType="blob",i.onload=function(){200===i.status?n.readAsDataURL(i.response):404===i.status&&t({success:!1,result:i.status})};var n=new FileReader;n.onloadend=function(){t({success:!0,result:n.result})},i.send()}},n._csvToArray=function(e,t){t=t||",";for(var i=new RegExp("(\\"+t+'|\\r?\\n|\\r|^)(?:"([^"]*(?:""[^"]*)*)"|([^"\\'+t+"\\r\\n]*))","gi"),n=[[]],r=null;r=i.exec(e);){var o,a=r[1];a.length&&a!==t&&n.push([]),o=r[2]?r[2].replace(new RegExp('""',"g"),'"'):r[3],n[n.length-1].push(o)}return n},n._json2xml=function(e){for(var t=document.implementation.createDocument("","",null),i=t.createElement("nodes"),n=0;n<e.length;n++){var r=t.createElement("node"),o=e[n];for(var a in o){var l=o[a];"tags"==a&&(l=l.join()),r.setAttribute(a,l)}i.appendChild(r)}return t.appendChild(i),'<?xml version="1.0" encoding="utf-8" ?>'+(new XMLSerializer).serializeToString(t.documentElement)},n._xml2json=function(e){for(var t=(new DOMParser).parseFromString(e,"text/xml").getElementsByTagName("node"),i=[],n=0;n<t.length;n++){for(var r=t[n],o={},a=0;a<r.attributes.length;a++){var l=r.attributes[a],s=l.value;"tags"==l.name&&(s=s.split(",")),o[l.name]=s}i.push(o)}return i},n._json2csv=function(e){for(var t=[],i=function(e){for(var i="",n=0;n<t.length;n++){var r;(r="reportsTo"==t[n]?null:null==e[t[n]]?"":e[t[n]])instanceof Date&&(r=r.toLocaleStr
1ing());var o=(r=null===r?"":r.toString()).replace(/"/g,'""');0<=o.search(/("|,|\n)/g)&&(o='"'+o+'"'),0<n&&(i+=","),i+=o}return i+"\n"},r="",o=0;o<e.length;o++)for(var a in e[o])n._arrayContains(t,a)||(t.push(a),r+=a+",");for(r+="\n",o=0;o<e.length;o++)r+=i(e[o]);return r},n.accentFold=function(e){return(e=e.toString().toLowerCase()).replace(/([\xe0\xe1\xe2\xe3\xe4\xe5])|([\xe7])|([\xe8\xe9\xea\xeb])|([\xec\xed\xee\xef])|([\xf1])|([\xf2\xf3\xf4\xf5\xf6\xf8])|([\xdf])|([\xf9\xfa\xfb\xfc])|([\xff])|([\xe6])/g,function(e,t,i,n,r,o,a,l,s,d,c){return t?"a":i?"c":n?"e":r?"i":o?"n":a?"o":l?"s":s?"u":d?"y":c?"ae":void 0})},n.copy=function(e){if(null===e||"object"!=typeof e||"isActiveClone"in e)return e;if(e instanceof Date)var t=new e.constructor;else t=e.constructor();for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(e.isActiveClone=null,t[i]=n.copy(e[i]),delete e.isActiveClone);return t},n._getScrollSensitivity=function(){var e=n._browser();return e.msie&&n.scroll.ie?n.scroll.ie:e.edge&&n.scroll.edge?n.scroll.edge:e.safari&&n.scroll.safari?n.scroll.
1safari:e.chrome&&n.scroll.chrome?n.scroll.chrome:e.firefox&&n.scroll.firefox?n.scroll.firefox:e.opera&&n.scroll.opera?n.scroll.opera:{smooth:n.scroll.smooth,speed:n.scroll.speed}},n.isTrial=function(){return void 0!==n.remote},n.childrenCount=function(e,t,i){null==i&&(i=0);for(var r=0;r<t.childrenIds.length;r++){var o=e.nodes[t.childrenIds[r]];o&&(i++,n.childrenCount(e,o,i))}return i},n.collapsedChildrenCount=function(e,t,i){null==i&&(i=0);for(var r=0;r<t.childrenIds.length;r++){var o=e.nodes[t.childrenIds[r]];o&&(!0===o.collapsed&&i++,n.collapsedChildrenCount(e,o,i))}return i},n._setMinMaxXY=function(e,t){(null==t.minX||null!=e.x&&e.x<t.minX)&&(t.minX=e.x),(null==t.minY||null!=e.y&&e.y<t.minY)&&(t.minY=e.y),(null==t.maxX||null!=e.x&&e.x+e.w>t.maxX)&&(t.maxX=e.x+e.w),(null==t.maxY||null!=e.y&&e.y+e.h>t.maxY)&&(t.maxY=e.y+e.h)},n.getStParentNodes=function(e,t){for(t||(t=[]);e.parent;)e=e.parent;return e.stParent&&(t.push(e.stParent),n.getStParentNodes(e.stParent,t)),t},n.getRootOf=function(e){for(;e&&e.parent;)e=e.parent;return e},n._getViewBox=function(e){var t=null;return e?(t=(t="["+(t=e.getAttribute("viewBox"))+"]").replace(/\ /g,","),t=JSON.parse(t)):null},n.isNullOrEmpty=function(e){return null==e||null==e||""==e},n.xScrollUI=function(e,t,i,n,r){this.element=e,this.requestParams=i,this.config=t,this.onSetViewBoxCallback=n,this.onDrawCallback=r,this.pos=0},n.xScrollUI.prototype.addListener=function(e){var t=this;if((this.config.mouseScrool==n.action.xScroll||this.config.mouseScrool==n.action.scroll)&&this.bar){var i=n._getScrollSensitivity();!function(e,i,r){var o=!1;function a(){o=!0;var e=(t.pos-t.bar.scrollLeft)/r;if(0<e)e++;else{if(0==e)return void(o=!1);e--}Math.ceil(t.bar.scrollLeft)==Math.ceil(t.pos)?o=!1:(t.bar.scrollLeft+=e,l(a))}e.addEventListener("wheel",function(e){var r=0;if(t.config.mouseScrool==n.action.xScroll)(r=e.deltaX||e.wheelDeltaX)||(r=e.deltaY||e.wheelDeltaY);else if(t.config.mouseScrool==n.action.scroll&&!(r=e.shiftKey?e.deltaY||e.wheelDeltaY:e.deltaX||e.wheelDeltaX))return;r=-r,r=Math.max(-1,Math.min(1,r)),t.pos+=-r*i;var l=parseFloat(t.innerBar.clientWidth)-parseFloat(t.bar.clientWidth);t.pos<0&&(t.pos=0),t.pos>l&&(t.pos=l),o||a()},{passive:!0});var l=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){setTimeout(e,20)}}(e,i.speed,i.smooth)}},n.xScrollUI.prototype.create=function(e){if(this.config.showXScroll===n.scroll.visible||this.config.mouseScrool===n.action.scroll||this.config.mouseScrool===n.action.xScroll){var t=this;this.bar&&this.bar.parentNode.removeChild(this.bar),this.bar=document.createElement("div"),this.config.showXScroll!==n.scroll.visible&&(this.bar.style.visibility="hidden"),this.innerBar=document.createElement("div"),this.requestParams(),this.innerBar.innerHTML="&nbsp",Object.assign(this.bar.style,{position:"absolute",left:0,bottom:0,width:e+"px","overflow-x":"scroll",height:"20px"}),this.element.appendChild(this.bar),this.bar.appendChild(this.innerBar),this.bar.addEventListener("scroll",function(){if(this.ignore)this.ignore=!1;else{var e=t.requestParams(),i=(parseFloat(t.innerBar.clientWidth)-parseFloat(t.bar.clientWidth))/100,n=this.scrollLeft/i,r=(e.boundary.right-e.boundary.left)/100;e.viewBox[0]=n*r+e.boundary.left,t.onSetViewBoxCallback(e.viewBox),clearTimeout(this._timeout),this._timeout=setTimeout(function(){t.onDrawCallback()},500)}})}},n.xScrollUI.prototype.setPosition=function(){if(this.bar){var e=this.requestParams(),t=Math.abs(e.boundary.maxX-e.boundary.minX)*e.scale;switch(this.config.orientation){case n.orientation.bottom:case n.orientation.bottom_left:innerHeight=Math.abs(e.boundary.minY*e.scale);break;case n.orientation.right:case n.orientation.right_top:t=Math.abs(e.boundary.minX*e.scale)}this.innerBar.style.width=t+"px";var i=(e.boundary.right-e.boundary.left)/100,r=(e.viewBox[0]-e.boundary.left)/i;r<0?r=0:100<r&&(r=100);var o=(parseFloat(this.innerBar.clientWidth)-parseFloat(this.bar.clientWidth))/100,a=r*o;this.bar.ignore=!0,this.bar.scrollLeft=a,this.pos=this.bar.scrollLeft,this.bar.style.visibility=o<=0?"hidden":""}},n.yScrollUI=function(e,t,i,n,r){this.element=e,this.requestParam
1s=i,this.config=t,this.onSetViewBoxCallback=n,this.onDrawCallback=r,this.pos=0},n.yScrollUI.prototype.addListener=function(e){var t=this;if(this.config.mouseScrool==n.action.yScroll||this.config.mouseScrool==n.action.scroll){var i=n._getScrollSensitivity();!function(e,i,r){var o=!1;function a(){o=!0;var e=(t.pos-t.bar.scrollTop)/r;if(0<e)e++;else{if(0==e)return void(o=!1);e--}Math.ceil(t.bar.scrollTop)==Math.ceil(t.pos)?o=!1:(t.bar.scrollTop+=e,l(a))}e.addEventListener("wheel",function(e){var r=0;if(t.config.mouseScrool==n.action.yScroll)(r=e.deltaY||e.wheelDeltaY)||(r=e.deltaX||e.wheelDeltaX);else if(t.config.mouseScrool==n.action.scroll&&!(r=e.shiftKey?e.deltaX||e.wheelDeltaX:e.deltaY||e.wheelDeltaY))return;r=-r,r=Math.max(-1,Math.min(1,r)),t.pos+=-r*i;var l=parseFloat(t.innerBar.clientHeight)-parseFloat(t.bar.clientHeight);t.pos<0&&(t.pos=0),t.pos>l&&(t.pos=l),o||a()},{passive:!0});var l=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){setTimeout(e,20)}}(e,i.speed,i.smooth)}},n.yScrollUI.prototype.create=function(e){if(this.config.showYScroll===n.scroll.visible||this.config.mouseScrool===n.action.scroll||this.config.mouseScrool===n.action.yScroll){var t=this;this.bar&&this.bar.parentNode.removeChild(this.bar),this.bar=document.createElement("div"),this.config.showYScroll!==n.scroll.visible&&(this.bar.style.visibility="hidden"),this.innerBar=document.createElement("div"),this.innerBar.innerHTML="&nbsp",Object.assign(this.bar.style,{position:"absolute",right:0,bottom:0,height:e+"px","overflow-y":"scroll",width:"20px"}),this.element.appendChild(this.bar),this.bar.appendChild(this.innerBar),this.bar.addEventListener("scroll",function(){if(this.ignore)this.ignore=!1;else{var e=t.requestParams(),i=(parseFloat(t.innerBar.clientHeight)-parseFloat(t.bar.clientHeight))/100,n=this.scrollTop/i,r=(e.boundary.bottom-e.boundary.top)/100;e.viewBox[1]=n*r+e.boundary.top,t.onSetViewBoxCallback(e.viewBox),clearTimeout(this._timeout),this._timeout=setTimeout(function(){t.onDrawCallback()},500)}})}},n.yScrollUI.prototype.setPosition=function(){if(this.bar){var e=this.requestParams(),t=e.boundary.maxY*e.scale;switch(this.config.orientation){case n.orientation.bottom:case n.orientation.bottom_left:t=Math.abs(e.boundary.minY*e.scale);break;case n.orientation.right:case n.orientation.right_top:innerWidth=Math.abs(e.boundary.minX*e.scale)}this.innerBar.style.height=t+"px";var i=(e.boundary.bottom-e.boundary.top)/100,r=(e.viewBox[1]-e.boundary.top)/Math.abs(i);r<0?r=0:100<r&&(r=100);var o=(parseFloat(this.innerBar.clientHeight)-parseFloat(this.bar.clientHeight))/100,a=r*o;this.bar.ignore=!0,this.bar.scrollTop=a,this.pos=this.bar.scrollTop,this.bar.style.visibility=o<=0?"hidden":""}},n.prototype.zoom=function(e,t,i){var r=this.getViewBox().slice(0),o=r,a=r[2],l=r[3];!0===e?(r[2]=r[2]/n.SCALE_FACTOR,r[3]=r[3]/n.SCALE_FACTOR):!1===e?(r[2]=r[2]*n.SCALE_FACTOR,r[3]=r[3]*n.SCALE_FACTOR):(r[2]=r[2]/e,r[3]=r[3]/e),t||(t=[50,50]),r[0]=o[0]-(r[2]-a)/(100/t[0]),r[1]=o[1]-(r[3]-l)/(100/t[1]);var s=this.getScale(r);if(r[2]=this.width()/s,r[3]=this.height()/s,!0===e&&s<this.config.scaleMax||!1===e&&s>this.config.scaleMin||0!=e&&1!=e&&s<this.config.scaleMax&&s>this.config.scaleMin){this._hideBeforeAnimation();var d=this;i?(clearTimeout(d._timeout),n.anim(this.getSvg(),{viewbox:this.getViewBox()},{viewbox:r},this.config.anim.duration,this.config.anim.func,function(){clearTimeout(d._timeout),d._timeout=setTimeout(function(){d._draw(!0,n.action.zoom)},500)})):(this.setViewBox(r),clearTimeout(d._timeout),d._timeout=setTimeout(function(){d._draw(!0,n.action.zoom)},500))}},n.loading={},n.loading.show=function(e){var t=document.createElement("div");t.id="bg-loading",t.innerHTML='<style>@-webkit-keyframes dot-keyframes {0% { opacity: .4; -webkit-transform: scale(1, 1);transform: scale(1, 1);}50% {opacity: 1;-webkit-transform: scale(1.2, 1.2);transform: scale(1.2, 1.2);}100% {opacity: .4;-webkit-transform: scale(1, 1);transform: scale(1, 1);}}@keyframes dot-keyframes {0% {opacity: .4;-webkit-transform: scale(1, 1);transform: scale(1, 1);}50% {opacity: 1;-webkit-transform: scale(1.2, 1.2);transform: scale(1.2, 1.2);}100% {opacity: .4;-webkit-transform: scale(1, 1);transform: scale(1, 1);}}.bg-loading-dots div {margin: 10px;}      .bg-dot-1 {background-color: #039BE5;}.bg-dot-2 {background-color: #F57C00;}.bg-dot-3 {background-color: #FFCA28;}      .bg-loading-dots {text-align: center;width: 100%; position: absolute; top: 0;}.bg-loading-dots--dot {-webkit-animation: dot-keyframes 1.5s infinite ease-in-out;animation: dot-keyframes 1.5s infinite ease-in-out;        border-radius: 10px;display: inline-block;height: 10px;width: 10px;}.bg-loading-dots--dot:nth-child(2) {-webkit-animation-delay: .5s;animation-delay: .5s;}.bg-loading-dots--dot:nth-child(3) {-webkit-animation-delay: 1s;animation-delay: 1s;}</style><div class="bg-loading-dots"><div class="bg-loading-dots--dot bg-dot-1"></div><div class="bg-loading-dots--dot bg-dot-2"></div><div class="bg-loading-dots--dot bg-dot-3"></div></div>',e.element.appendChild(t)},n.loading.hide=function(e){var t=e.element.querySelector("#bg-loading");t&&t.parentNode.removeChild(t)},n.pdfPrevUI={},n.loc||(n.loc={}),n.loc.ppdfCmdTitle="PDF Preview",n.loc.ppdfSave="Save",n.loc.ppdfCancel="Cancel",n.loc.ppdfFormat="Format",n.loc.ppdfFitToDrwaing="Fit",n.loc.ppdfA4="A4",n.loc.ppdfA3="A3",n.loc.ppdfA2="A2",n.loc.ppdfA1="A1",n.loc.ppdfLetter="Letter",n.loc.ppdfLegal="Legal",n.loc.ppdfLayout="Layout",n.loc.ppdfPortrait="Portrait",n.loc.ppdfLandscape="Landscape",n.loc.ppdfFittopagewidth="Fit to page width",n.loc.ppdfMargin="Margin",n.loc.ppdfHeader="Header",n.loc.ppdfFooter="Footer",n.loc.ppdfScale="Scale",n.pdfPrevUI.show=function(e,t){t=e._defaultExportOptions(t,"pdf");var i=document.createElement("div");i.id="bg-ppdf-btns",Object.assign(i.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"}),e.element.appendChild(i),i.innerHTML="<h1>"+n.loc.ppdfCmdTitle+'</h1><div><button type="button" id="bg-prev-save" style="font-size: 14px; width: 90px;">'+n.loc.ppdfSave+'</button>&nbsp;<button type="button" id="bg-prev-cancel" style="width: 90px;font-size: 14px;">'+n.loc.ppdfCancel+'</button></div><div style="margin-top:30px; height:10px;border-bottom:1px solid #eeeeee;"></div><div style="padding-top:30px;"><label for="bg-size">'+n.loc.ppdfFormat+': </label><select id="bg-ppdf-size" style="color: #757575; width: 150px; font-size: 14px;" id="bg-size"><option value="fit">'+n.loc.ppdfFitToDrwaing+'</option><option value="A4">'+n.loc.ppdfA4+'</option><option value="A3">'+n.loc.ppdfA3+'</option><option value="A2">'+n.loc.ppdfA2+'</option><option value="A1">'+n.loc.ppdfA1+'</option><option value="Letter">'+n.loc.ppdfLetter+'</option><option value="Legal">
1'+n.loc.ppdfLegal+'</option></select></div><div style="padding-top:10px;"><label for="bg-ppdf-layout">'+n.loc.ppdfLayout+': </label><select id="bg-ppdf-layout" style="color: #757575; width: 150px;font-size: 14px;" ><option value="false">'+n.loc.ppdfPortrait+'</option><option value="true">'+n.loc.ppdfLandscape+'</option></select></div><div style="padding-top:10px;"><label for="bg-scale">'+n.loc.ppdfScale+': </label><select id="bg-ppdf-scale" style="color: #757575; width: 150px;font-size: 14px;" id="bg-scale"><option value="fit">'+n.loc.ppdfFittopagewidth+'</option><option value="10">10%</option><option value="20">20%</option><option value="30">30%</option><option value="40">40%</option><option value="50">50%</option><option value="60">60%</option><option value="70">70%</option><option value="80">80%</option><option value="90">90%</option><option value="100">100%</option><option value="110">110%</option><option value="120">120%</option><option value="130">130%</option><option value="140">140%</option><option value="150">150%</option><option value="160">160%</option><option value="170">170%</option><option value="180">180%</option><option value="190">190%</option><option value="200">200%</option></select></div><div style="margin-top:10px;margin-bottom:10px; height:10px;border-bottom:1px solid #eeeeee;"></div><div style="padding-top:10px;"><label for="bg-ppdf-header">'+n.loc.ppdfHeader+': </label><input id="bg-ppdf-header" type="text" style="color: #757575; width: 100px;font-size: 14px;" ></div><div style="padding-top:10px;"><label for="bg-ppdf-footer">'+n.loc.ppdfFooter+': </label><input id="bg-ppdf-footer" type="text" style="color: #757575; width: 100px;font-size: 14px;" ></div><div style="padding-top:10px;"><label for="bg-ppdf-margin">'+n.loc.ppdfMargin+': </label><input id="bg-ppdf-margin" type="text" style="color: #757575; width: 100px;font-size: 14px;" ></div>';var r=document.createElement("div");r.id="bg-ppdf-wrapper",Object.assign(r.style,{"overflow-y":"scroll",position:"absolute",top:0,left:"270px","background-color":"#eee",width:e.width()-270+"px",height:"100%"}),e.element.appendChild(r),r.innerHTML='<div id="bg-ppdf-content" style="width: 100%;margin-top:10px;margin-bottom:10px;opacity:0;"></div>';var o,a,l,s=e.element.querySelector("#bg-ppdf-size"),d=e.element.querySelector("#bg-ppdf-layout"),c=e.element.querySelector("#bg-ppdf-scale"),p=e.element.querySelector("#bg-ppdf-margin"),h=e.element.querySelector("#bg-ppdf-header"),f=e.element.querySelector("#bg-ppdf-footer");s.value=t.format,d.value=t.landscape,c.value=t.scale,p.value=t.margin,h.value=t.header,f.value=t.footer,n.anim(e.element.querySelector("#bg-ppdf-btns"),{margin:[0,0,0,-250]},{margin:[0,0,0,0]},300,n.anim.outSin,function(){e.exportPDF(t,n.pdfPrevUI._handler)}),e.element.querySelector("#bg-prev-cancel").addEventListener("click",function(){n.pdfPrevUI.hide(e)}),e.element.querySelector("#bg-prev-save").addEventListener("click",function(){e.exportPDF(t),n.pdfPrevUI.hide(e)}),n.pdfPrevUI._showHide(s,d,c),s.addEventListener("change",function(){n.anim(e.element.querySelector("#bg-ppdf-content"),{opacity:1},{opacity:0},300,n.anim.inSin,function(){e.element.querySelector("#bg-ppdf-content").innerHTML="",t.format=s.value,e.exportPDF(t,n.pdfPrevUI._handler),n.pdfPrevUI._showHide(s,d,c)})}),d.addEventListener("change",function(){n.anim(e.element.querySelector("#bg-ppdf-content"),{opacity:1},{opacity:0},300,n.anim.inSin,function(){e.element.querySelector("#bg-ppdf-content").innerHTML="",t.landscape="true"==d.value,e.exportPDF(t,n.pdfPrevUI._handler),n.pdfPrevUI._showHide(s,d,c)})}),c.addEventListener("change",function(){n.anim(e.element.querySelector("#bg-ppdf-content"),{opacity:1},{opacity:0},300,n.anim.inSin,function(){e.element.querySelector("#bg-ppdf-content").innerHTML="",t.scale=c.value,e.exportPDF(t,n.pdfPrevUI._handler),n.pdfPrevUI._showHide(s,d,c)})}),p.addEventListener("keyup",function(){clearTimeout(o),o=setTimeout(function(){n.anim(e.element.querySelector("#bg-ppdf-content"),{opacity:1},{opacity:0},300,n.anim.inSin,function(){e.element.querySelector("#bg-ppdf-content").innerHTML="";var i=p.value.split(",");if(4==i.length){for(var r=0;r<i.length;r++)i[r]=parseInt(i[r]);t.margin=i,e.exportPDF(t,n.pdfPrevUI._handler)}})},1e3)}),h.addEventListener("keyup",function(){clearTimeout(a),a=setTimeout(function(){n.anim(e.element.querySelector("#bg-ppdf-content"),{op
1acity:1},{opacity:0},300,n.anim.inSin,function(){e.element.querySelector("#bg-ppdf-content").innerHTML="",t.header=h.value,e.exportPDF(t,n.pdfPrevUI._handler)})},1e3)}),f.addEventListener("keyup",function(){clearTimeout(l),l=setTimeout(function(){n.anim(e.element.querySelector("#bg-ppdf-content"),{opacity:1},{opacity:0},300,n.anim.inSin,function(){e.element.querySelector("#bg-ppdf-content").innerHTML="",t.footer=f.value,e.exportPDF(t,n.pdfPrevUI._handler)})},1e3)})},n.pdfPrevUI._showHide=function(e,t,i){"A4"==e.value||"A3"==e.value||"A2"==e.value||"A1"==e.value||"Letter"==e.value||"Legal"==e.value?(t.parentNode.style.display="block",i.parentNode.style.display="block"):(t.parentNode.style.display="none",i.parentNode.style.display="none")},n.pdfPrevUI._handler=function(e,t,i){var r=t.options,o=t.pages,a=r.margin[0],l=r.margin[2],s=document.createElement("div");s.innerHTML=i.outerHTML,n._browser().msie&&(s.innerHTML=(new XMLSerializer).serializeToString(i));for(var d=s.querySelector("svg"),c=e.element.querySelector("#bg-ppdf-content"),p=0;p<o.length;p++){var h=document.createElement("iframe");Object.assign(h.style,{display:"block",margin:"10px auto",border:"1px solid #eeeeee","box-shadow":"0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19)"}),c.appendChild(h),d&&d.style.backgroundColor?h.style.backgroundColor=d.style.backgroundColor:h.style.backgroundColor="#fff";var f=h.contentWindow.document;f.open(),h.style.width=o[p].size.w+"px",h.style.height=o[p].size.h+"px",h.style.margin="10 auto",o[p].backgroundColor&&(h.style.backgroundColor=o[p].backgroundColor);var u=r.header;o[p].header&&(u=o[p].header),u&&(u=u.replace("{current-page}",p+1).replace("{total-pages}",o.length));var g=r.footer;o[p].footer&&(g=o[p].footer),g&&(g=g.replace("{current-page}",p+1).replace("{total-pages}",o.length)),o[p].html?f.write(n._exportHtml(o[p].html+t.styles,r,o[p].innerSize.w,o[p].innerSize.h,u,g)):(d.setAttribute("viewBox",o[p].vb),f.write(n._exportHtml(s.innerHTML+t.styles,r,o[p].innerSize.w,o[p].innerSize.h,u,g)));var m=f.getElementById("bg-header"),y=f.getElementById("bg-footer");if(m){var x=a-m.offsetHeight-7;m.style.top=x+"px"}if(y){var v=l-y.offsetHeight-7;y.style.bottom=v+"px"}f.close()}var b=e.element.querySelector("#bg-ppdf-content");n.anim(b,{opacity:0},{opacity:1},300,n.anim.outSin)},n.pdfPrevUI._getViewBox=function(e){var t=null;return e?(t=(t="["+(t=e.getAttribute("viewBox"))+"]").replace(/\ /g,","),t=JSON.parse(t)):null},n._exportHtml=function(e,t,i,n,r,o){for(var a="",l=0;l<t.margin.length;l++)a+=t.margin[l]+"px ";var s='<!DOCTYPE html><html style="margin:0;padding:0;"><head></head><body style="margin:0; padding:0;"><div style="margin: '+a+";overflow:hidden;width:"+i+"px;height:"+n+'px">';return r&&(s+='<div id="bg-header" style="width:'+i+"px;color:#757575;position:absolute;left:"+t.margin[3]+'px;top:0;">'+r+"</div>"),s+=e,o&&(s+='<div id="bg-footer" style="width:'+i+"px;color:#757575;position:absolute;left:"+t.margin[3]+'px;bottom:0;">'+o+"</div>"),(s+="</div>")+"</body></html>"},n.pdfPrevUI.hide=function(e){var t=e.element.querySelector("#bg-ppdf-wrapper");t&&n.anim(t,{opacity:1},{opacity:0},300,n.anim.inSin,function(){t.parentNode.removeChild(t);var i=e.element.querySelector("#bg-ppdf-btns");n.anim(i,{margin:[0,0,0,0]},{margin:[0,0,0,-280]},300,n.anim.inSin,function(){i.parentNode.removeChild(i)})})},void 0===n&&(n={}),n.events.on("renderdefs",function(e,t){for(var i=0;i<e.config.clinks.length;i++){var r=e.config.clinks[i].template;r||(r="orange");var o=n.clinkTemplates[r];t.defs+=o.defs}}),n.events.on("render",function(e,t){e._clink(e,t)}),n.prototype._clink=function(e,t){for(var i,r,o,a,l,s="",d=0;d<this.config.clinks.length;d++){var c=this.config.clinks[d];if(-1!=t.res.visibleNodeIds.indexOf(c.from)&&-1!=t.res.visibleNodeIds.indexOf(c.to)){var p=e.getNode(c.from),h=e.getNode(c.to),f=p.x,u=p.y,g=h.x,m=h.y,y={},x={},v=f+p.w/2,b=g+h.w/2,w=u+p.h/2,_=m+h.h/2,k=1;switch(this.config.orientation){case n.orientation.top:case n.orientation.top_left:v<=b?(k=1,y.x=v+p.w/10,x.x=b-h.w/10):(k=-1,y.x=v-p.w/10,x.x=b+h.w/10),u==m?(k=1,y.y=u,x.y=m):m<u?(y.y=u,x.y=m+h.h):(y.y=u+p.h,x.y=m);break;case n.orientation.bottom:case n.orientation.bottom_left:y.x=v<=b?(k=-1,v+p.w/10):(k=1,v-p.w/10),x.x=b+h.w/10,u==m?(k=-1,y.y=u+p.h,x.y=m+h.h):m<u?(y.y=u,x.y=m+h.h):(y.y=u+p.h,x.y=m);break;case n.orientation.left:case n.orientation.left_top:y.y=w<=_?(k=-1,w+p.h/5):(k=1,w-p.h/5),x.y=_+h.h/5,f==g?(k=-1,y.x=f,x.x=g):g<f?(y.x=f,x.x=g+h.w):(y.x=f+p.w,x.x=g);break;case n.orientation.right:case n.orientation.right_top:y.y=w<=_?(k=1,w+p.h/5):(k=-1,w-p.h/5),x.y=_+h.h/5,f==g?(k=1,y.x=f+p.w,x.x=g+h.w):g<f?(y.x=f,x.x=g+h.w):(y.x=f+p.w,x.x=g)}var S=L(y,x,k),C=c.template;C||(C="orange");var I=n.clinkTemplates[C];s+='<g c-link-from="{from}" c-link-to="{to}">'.replace("{from}",p.id).replace("{to}",h.id)+I.link.replaceAll("{d}","M{a.x},{a.y} C{a.x},{a.y} {c.x}
1,{c.y} {b.x},{b.y}").replaceAll("{b.x}",x.x).replaceAll("{b.y}",x.y).replaceAll("{a.x}",y.x).replaceAll("{a.y}",y.y).replaceAll("{c.x}",S.x).replaceAll("{c.y}",S.y);var A=(i=y,o=S,a=((r=x).x-i.x)/2+i.x,l=(r.y-i.y)/2+i.y,{x:(a-o.x)/2+o.x,y:(l-o.y)/2+o.y});c.label&&(s+=I.label.replace("{x}",A.x).replace("{y}",A.y).replace("{val}",c.label)),s+=n.grCloseTag}function L(e,t,i){null==i&&(i=1);var r=t.x-e.x,o=t.y-e.y,a=Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))/3;return a=a/(Math.sqrt(r*r+o*o)*i)*n.CLINK_CURVE,{x:e.x+r/2-o*a,y:e.y+o/2+r*a}}}t.content+=s},n.prototype.addClink=function(e,t,i,n){return this.removeClink(e,t),this.config.clinks.push({from:e,to:t,label:i,template:n}),this},n.prototype.removeClink=function(e,t){for(var i=this.config.clinks.length-1;0<=i;i--){var n=this.config.clinks[i];n.from==e&&n.to==t&&this.config.clinks.splice(i,1)}return this},n.clinkTemplates={},n.clinkTemplates.orange={defs:'<marker id="arrowOrange" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse"><path fill="#F57C00" d="M 0 0 L 10 5 L 0 10 z" /></marker><marker id="dotOrange" viewBox="0 0 10 10" refX="5" refY="5" markerWidth="5" markerHeight="5"> <circle cx="5" cy="5" r="5" fill="#F57C00" /></marker>',link:'<path marker-start="url(#dotOrange)" marker-end="url(#arrowOrange)" stroke="#F57C00" stroke-width="2" fill="none" d="{d}" />',label:'<text fill="#F57C00" text-anchor="middle" x="{x}" y="{y}">{val}</text>'},n.clinkTemplates.blue={defs:'<marker id="arrowBlue" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse"><path fill="#039BE5" d="M 0 0 L 10 5 L 0 10 z" /></marker><marker id="dotBlue" viewBox="0 0 10 10" refX="5" refY="5" markerWidth="5" markerHeight="5"> <circle cx="5" cy="5" r="5" fill="#039BE5" /></marker>',link:'<path marker-start="url(#dotBlue)" marker-end="url(#arrowBlue)" stroke="#039BE5" stroke-width="2" fill="none" d="{d}" />',label:'<text fill="#039BE5"  text-anchor="middle" x="{x}" y="{y}">{val}</text>'},n.clinkTemplates.yellow={defs:'<marker id="arrowYellow" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse"><path fill="#FFCA28" d="M 0 0 L 10 5 L 0 10 z" /></marker><marker id="dotYellow" viewBox="0 0 10 10" refX="5" refY="5" markerWidth="5" markerHeight="5"> <circle cx="5" cy="5" r="5" fill="#FFCA28" /></marker>',link:'<path marker-start="url(#dotYellow)" marker-end="url(#arrowYellow)" stroke="#FFCA28" stroke-width="2" fill="none" d="{d}" />',label:'<text fill="#FFCA28"  text-anchor="middle" x="{x}" y="{y}">{val}</text>'},void 0===n&&(n={}),n.events.on("renderdefs",function(e,t){for(var i=0;i<e.config.slinks.length;i++){var r=e.config.slinks[i].template;r||(r="orange");var o=n.slinkTemplates[r];t.defs+=o.defs}}),n.events.on("render",function(e,t){e._slinks(e,t)}),n.prototype._slinks=function(e,t){var i="",r=this.getScale(),o=t.res.boundary;function a(a,l,d){var c=[],p=null,h="left",f=a.lcn?a.lcn:"base",u=e._layoutConfigs[f];switch(u.orientation){case n.orientation.top:case n.orientation.top_left:case n.orientation.bottom:case n.orientation.bottom_left:l.x>a.x&&(h="right");break;case n.orientation.left:case n.orientation.left_top:case n.orientation.right:case n.orientation.right_top:h="top",l.y>a.y&&(h="bottom")}var g=n.t(a.templateName,a.min,r),m=u.levelSeparation;(a.parent&&a.parent.layout==n.mixed||a.parent&&a.parent.layout==n.tree)&&(m=u.mixedHierarchyNodesSeparation);var y={p:a.x+a.w/2+g.expandCollapseSize,q:a.y,r:a.x+a.w/2+g.expandCollapseSize,s:o.minY+m};if(a.level==l.level)switch(p=l,u.orientation){case n.orientation.top:case n.orientation.top_left:c.push([y.p,y.q]),c.push([y.p,y.q-m/3]),g=n.t(p.templateName,p.min,r),c.push([p.x+p.w/2+g.expandCollapseSize,c[c.length-1][1]]),c.push([c[c.length-1][0],p.y]);break;case n.orientation.bottom:case n.orientation.bottom_left:y.q=a.y+a.h,y.s=o.maxY-m,c.push([y.p,y.q]),c.push([y.r,a.y+a.h+m/3]),g=n.t(p.templateName,p.min,r),c.push([p.x+p.w/2+g.expandCollapseSize,c[c.length-1][1]]),c.push([c[c.length-1][0],p.y+p.h]);break;case n.orientation.left:case n.orientation.left_top:y.p=a.x,y.q=a.y+a.h/2+g.expandCollapseSize,y.r=o.minX-m,y.s=a.y+a.h/2+g.expandCollapseSize,c.push([y.p,y.q]),c.push([a.x-m/3,y.q]),g=n.t(p.templateName,p.min,r),c.push([c[c.length-1][0],p.y+p.h/2+g.expandCollapseSize]),c.push([p.x,c[c.length-1][1]]);break;case n.orientation.right:case n.orientation.right_top:y.p=a.x+a.w,y.q=a.y+a.h/2+g.expandCollapseSize,y.r=o.maxX+m,y.s=a.y+a.h/2+g.expandCollapseSize,c.push([y.p,y.q]),c.push([a.x+a.w+m/3,y.q]),g=n.t(p.templateName,p.min,r),c.push([c[c.length-1][0],p.y+p.h/2+g.expandCollapseSize]),c.push([p.x+p.w,c[c.length-1][1]])}else{switch(u.orientation){case n.orientation.top:case n.orientation.top_left:c.push([y.p,y.q]),c.push([y.r,a.y-m/3]);break;case n.orientation.bottom:case n.orientation.bottom_left:y.q=a.y+a.h,y.s=o.maxY-m,c.push([y.p,y.q]),c.push([y.r,a.y+a.h+m/3]);break;case n.orientation.left:case n.orientation.left_top:y.p=a.x,y.q=a.y+a.h/2+g.expandCollapseSize,y.r=o.minX-m,y.s=a.y+a.h/2+g.expandCollapseSize,c.push([y.p,y.q]),c.push([a.x-m/3,y.q]);break;case n.orientation.right:case n.orientation.right_top:y.p=a.x+a.w,y.q=a.y+a.h/2+g.expandCollapseSize,y.r=o.maxX+m,y.s=a.y+a.h/2+g.expandCollapseSize,c.push([y.p,y.q]),c.push([a.x+a.w+m/3,y.q])}for(var x=a;null==p;){var v=!1,b=x.parent,w=b.leftNeighbor,_=b.rightNeighbor;if(b.id==l.id?p=b:n._intersects(b,y,e.config)&&(y=n._addPoint(b,c,e.config,y,h),v=!0),b.id!=l.id){for(;w;){if(w.id==l.id){p=w;break}n._intersects(w,y,e.config)&&(y=n._addPoint(w,c,e.config,y,h),v=!0),w=w.leftNeighbor}for(;_;){if(_.id==l.id){p=_;break}n._intersects(_,y,e.config)&&(y=n._addPoint(_,c,e.config,y,h),v=!0),_=_.rightNeighbor}}if(!v){var k=c[c.length-1][0],S=0;if(b.parent)switch(m=u.levelSeparation,b.parent.layout!=n.mixed&&b.parent.layout!=n.tree||(m=u.mixedHierarchyNodesSeparation),u.orientation){case n.orientation.top:case n.orientation.top_left:S=b.parent.y+b.parent.h+m*(2/3);break;case n.orientation.bottom:case n.orientation.bottom_left:S=b.parent.y-m*(2/3);break;case n.orientation.left:case n.orientation.left_top:k=b.parent.x+b.parent.w+m*(2/3),S=c[c.length-1][1];break;case n.orientation.right:case n.orientation.right_top:k=b.parent.x-m*(2/3),S=c[c.length-1][1]}c.push([k,S])}x=b}switch(g=n.t(p.templateName,p.min,r),c.splice(c.length-1,1),u.orientation){case n.orientation.top:case n.orientation.top_left:c.push([p.x+p.w/2+g.expandCollapseSize,c[c.length-1][1]]),c.push([c[c.length-1][0],p.y+p.h]);break;case n.orientation.bottom:case n.orientation.bottom_left:c.push([p.x+p.w/2+g.expandCollapseSize,c[c.length-1][1]]),c.push([c[c.length-1][0],p.y]);break;case n.orientation.left:case n.orientation.left_top:c.push([c[c.length-1][0],p.y+p.h/2+g.expandCollapseSize]),c.push([p.x+p.w,c[c.length-1][1]]);break;case n.orientation.right:case n.orientation.right_top:c.push([c[c.length-1][0],p.y+p.h/2+g.expandCollapseSize]),c.push([p.x,c[c.length-1][1]])}}var C=s.template;C||(C="orange");var I=null;switch((g=n.slinkTemplates[C]).labelPosition){case"start":I={x:c[1][0],y:c[1][1]};break;case"middle":var A=Math.ceil(c.length/2);I=function(e,t){return{x:(e[0]+t[0])/2,y:(e[1]+t[1])/2}}(c[A],c[A-1]);break;case"end":I={x:c[c.length-2][0],y:c[c.length-2][1]}}d&&(c=c.reverse()),c[0]="M"+c[0].join(",");for(var L=1;L<c.length;L++)c[L]="L"+c[L].join(",");var E=c.join(" ");if(i+='<g c-link-from="{from}" c-link-to="{to}">'.replace("{from}",a.id).replace("{to}",l.id)+g.link.replaceAll("{d}",E),s.label){var M=g.label.replace("{x}",I.x).replace("{y}",I.y).replace("{val}",s.label),N=n._getLabelSize(M),P=-N.height/2;switch(u.orientation){case n.orientation.bottom:case n.orientation.bottom_left:P=N.height}i+=g.label.replace("{x}",I.x).replace("{y}",I.y+P).replace("{val}",s.label)}i+=n.grCloseTag,t.content+=i}for(var l=0;l<this.config.slinks.length;l++){var s=this.config.slinks[l];if(-1!=t.res.visibleNodeIds.indexOf(s.from)&&-1!=t.res.visibleNodeIds.indexOf(s.to)){var d=e.getNode(s.from),c=e.getNode(s.to);d.level>=c.level?a(d,c,!1):a(c,d,!0)}}},n.prototype.addSlink=function(e,t,i,n){return this.removeClink(e,t),this.config.slinks.push({from:e,to:t,label:i,template:n}),this},n.prototype.removeSlink=function(e,t){for(var i=this.config.slinks.length-1;0<=i;i--){var n=this.config.slinks[i];n.from==e&&n.to==t&&this.config.slinks.splice(i,1)}return this},n.slinkTemplates={},n.slinkTemplates.orange={defs:'<marker id="arrowSlinkOrange" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse">
1<path fill="#F57C00" d="M 0 0 L 10 5 L 0 10 z" /></marker><marker id="dotSlinkOrange" viewBox="0 0 10 10" refX="5" refY="5" markerWidth="5" markerHeight="5"> <circle cx="5" cy="5" r="5" fill="#F57C00" /></marker>',link:'<path stroke-dasharray="4, 2" marker-start="url(#dotSlinkOrange)" marker-end="url(#arrowSlinkOrange)" stroke-linejoin="round" stroke="#F57C00" stroke-width="2" fill="none" d="{d}" />',label:'<text dominant-baseline="middle" fill="#F57C00" alignment-baseline="middle" text-anchor="middle" x="{x}" y="{y}">{val}</text>',labelPosition:"middle"},n.slinkTemplates.blue={defs:'<marker id="arrowSlinkBlue" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse"><path fill="#039BE5" d="M 0 0 L 10 5 L 0 10 z" /></marker><marker id="dotSlinkBlue" viewBox="0 0 10 10" refX="5" refY="5" markerWidth="5" markerHeight="5"> <circle cx="5" cy="5" r="5" fill="#039BE5" /></marker>',link:'<path stroke-dasharray="4, 2" marker-start="url(#dotSlinkBlue)" marker-end="url(#arrowSlinkBlue)" stroke-linejoin="round" stroke="#039BE5" stroke-width="2" fill="none" d="{d}" />',label:'<text fill="#039BE5" text-anchor="middle" x="{x}" y="{y}">{val}</text>',labelPosition:"middle"},n.slinkTemplates.yellow={defs:'<marker id="arrowSlinkYellow" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse"><path fill="#FFCA28" d="M 0 0 L 10 5 L 0 10 z" /></marker><marker id="dotSlinkYellow" viewBox="0 0 10 10" refX="5" refY="5" markerWidth="5" markerHeight="5"> <circle cx="5" cy="5" r="5" fill="#FFCA28" /></marker>',link:'<path stroke-dasharray="4, 2" marker-start="url(#dotSlinkYellow)" marker-end="url(#arrowSlinkYellow)" stroke-linejoin="round" stroke="#FFCA28" stroke-width="2" fill="none" d="{d}" />',label:'<text  fill="#FFCA28" text-anchor="middle" x="{x}" y="{y}">{val}</text>',labelPosition:"middle"},n.events.on("redraw",function(e,t){if(e.config.miniMap){var i=n.miniMap._getCanvas(e),r=i.getContext("2d");i.width=i.width,i.height=i.height;var o=e.response.boundary.maxX-e.response.boundary.minX,a=e.response.boundary.maxY-e.response.boundary.minY,l=Math.min(i.width/o,i.height/a),s=(i.width-o*l)/2,d=(i.height-a*l)/2;r.clearRect(0,0,i.width,i.height),r.translate(-e.response.boundary.minX*l+s,-e.response.boundary.minY*l+d),r.scale(l,l);var c=0;drawnNodes=[],checkedLevel=[],function e(t,i){if(Array.isArray(i))for(var o=0;o<i.length;o++)e(t,i[o]);else{for(r.fillStyle=n.miniMap.colors[3],r.beginPath(),r.lineWidth="0.5",r.fillRect(i.x,i.y,i.w,i.h),r.strokeRect(i.x,i.y,i.w,i.h),o=0;o<i.stChildrenIds.length;o++)c++,checkedLevel.includes(i.id)||(1==c?r.fillStyle=n.miniMap.colors[0]:2==c?r.fillStyle=n.miniMap.colors[1]:3==c&&(r.fillStyle=n.miniMap.colors[2]),r.beginPath(),r.fillRect(i.x,i.y,i.w,i.h),r.strokeRect(i.x,i.y,i.w,i.h),checkedLevel.push(i.id)),e(t,t.getNode(i.stChildrenIds[o])),c--;for(o=0;o<i.childrenIds.length;o++)e(t,t.getNode(i.childrenIds[o]))}}(e,e.roots);var p=e.getViewBox()[0],h=e.getViewBox()[1],f=e.getViewBox()[2],u=e.getViewBox()[3];r.lineWidth=.5/l,r.strokeStyle="#f57c00",r.strokeRect(p,h,f,u),r.globalAlpha=.4,r.fillStyle=n.miniMap.selectorBackgroundColor,r.fillRect(p,h,f,u)}}),n.miniMap={},n.miniMap._getCanvas=function(e){if(!(t=e.element.querySelector('[data-id="mini-map"]'))){var t;(t=document.createElement("canvas")).width=250,t.height=140,t.setAttribute("data-id","mini-map"),t.style.display="inline-block",t.style.backgroundColor=n.miniMap.backgroundColor;var i=document.createElement("div");i.style.position="absolute",i.style.bottom="10px",i.style.left="10px",i.style.border="1px solid #aeaeae",i.style.padding="5px",i.style.margin=e.config.padding+"px",i.style.backgroundColor=n.miniMap.backgroundColor,i.appendChild(t),e.element.appendChild(i)}return t},n.miniMap.colors=["#E0E0E0","#BDBDBD","#9E9E9E","#757575"],n.miniMap.selectorBackgroundColor="white",n.miniMap.backgroundColor="white",n._search={},n._search.search=function(e,t,i,r,o,a){var l=[],s=t.toLowerCase().split(" ");s=s.filter(function(e,t,i){return i.indexOf(e)===t});for(var d={},c=0;c<e.length;c++)for(var p=e[c],h=0;h<i.length;h++){var f=i[h];if(!n.isNullOrEmpty(p[f])){var u=p[f];if(null!=(t=n._search.searchAndComputeScore(s,u,f,a))){var g=p.id;if(d[g]){if(d[g]&&d[g]<t.__score){d[g]=t.__score;for(var m=l.length-1;0<=m;m--)l[m].id==g&&l.splice(m,1);n._search.addNodeToResult(l,r,p,t,f,o)}}else d[g]=t.__score,n._search.addNodeToResult(l,r,p,t,f,o)}}}return l.sort(function(e,t){return e.__score<t.__score?1:e.__score>t.__score?-1:0}),l},n._search.addNodeToResult=function(e,t,i,r,o,a){var l={};l.id=i.id,n.isNullOrEmpty(i[a])||(l[a]=i[a]);for(var s=0;s<t.length;s++){var d=t[s];n.isNullOrEmpty(i[d])||n.isNullOrEmpty(l[d])&&(l[d]=i[d])}null!=r&&(n.isNullOrEmpty(l.__score)&&(l.__score=r.__score),n.isNullOrEmpty(l.__searchField)&&(l.__searchField=o),n.isNullOrEmpty(l.__searchMarks)&&(l.__searchMarks=r.__searchMarks)),e.push(l)},n._search.searchAndComputeScore=function(e,t,i,r){if(n.isNullOrEmpty(t))return null;if(n.isNullOrEmpty(e))return null;if(!e.length)return null;"string"!=typeof t&&(t=t.toString());var o=t.toLowerCase(),a=n._search.searchIndexesOf(o,e);
1if(!a.length)return null;var l=o.length/100,s=0,d=0,c=0<s?100:0;if(a.length){d=a[0].start;for(var p=0;p<a.length;p++)if(s+=a[p].length,a[p].start<d&&(d=a[p].start),1<=p&&a[p-1].start>a[p].start){c=0;break}}var h=0;0!=s&&(h=s/l);var f=0<s?100:0;0!=d&&(f=100-d/l);var u=0;r&&r[i]&&(u=r[i]),0<h&&(h=h/100*20),0<f&&(f=f/100*20),0<c&&(c=c/100*20),0<u&&(u=u/100*40);var g=parseInt(h+f+c+u);100<g&&(g=100),a.sort(function(e,t){return e.start<t.start?-1:e.start>t.start?1:0});var m=t;for(p=a.length-1;0<=p;p--)m=(m=m.insert(a[p].start+a[p].length,"</mark>")).insert(a[p].start,"<mark>");return{__searchMarks:m,__score:g}},n._search.searchIndexesOf=function(e,t){var i=[];if(!n.isNullOrEmpty(e))for(var r=0;r<t.length;r++){var o=t[r];if(!n.isNullOrEmpty(o))for(var a=0;-1<(a=e.indexOf(o,a));)i.push({length:o.length,start:a}),a+=o.length}return i.sort(function(e,t){return e.length<t.length?1:e.length>t.length||e.start<t.start?-1:e.start>t.start?1:0}),i=i.filter(function(e){for(var t=!1,n=0;n<i.length;n++){var r=i[n].start,o=i[n].start+i[n].length-1,a=e.start,l=e.start+e.length-1;if(r==a&&o==l){t=!1;break}
1if(a<=r&&o<=l){t=!0;break}if(r<=a&&l<=o){t=!0;break}}return!t})},n.events.on("redraw",function(e,t){if(e.config.state){var i=[],r=[];!function e(t){if(Array.isArray(t))for(var n=0;n<t.length;n++)e(t[n]);else{for(("string"!=typeof t.id||"string"==typeof t.id&&-1==t.id.indexOf("split")&&-1==t.id.indexOf("mirror"))&&(i.push(t.id),1==t.min&&r.push(t.id)),n=0;n<t.stChildren.length;n++)e(t.stChildren[n]);for(n=0;n<t.children.length;n++)e(t.children[n])}}(e.roots),n.state._put(e.width(),e.height(),e.response.viewBox,i,r,e.response.adjustify,e.config.state)}}),n.state={},n.state._buildStateNames=function(e){return{paramScale:e+"-scale",paramX:e+"-x",paramY:e+"-y",paramExp:e+"-exp",paramMin:e+"-min",paramAdjustify:e+"-adjustify"}},n.state._put=function(e,t,i,r,o,a,l){if(l){var s=n.state._buildStateNames(l.name),d={scale:Math.min(e/i[2],t/i[3]),x:i[0],y:i[1],exp:r,min:o,adjustify:a};if(l.writeToUrlParams){var c=new URLSearchParams(window.location.search);c.has(s.paramScale)?c.set(s.paramScale,d.scale):c.append(s.paramScale,d.scale),c.has(s.paramX)?c.set(s.paramX,d.x):c.append(s.paramX,d.x),c.has(s.paramY)?c.set(s.paramY,d.y):c.append(s.paramY,d.y),c.has(s.paramExp)?c.set(s.paramExp,d.exp.join("*")):c.append(s.paramExp,d.exp.join("*")),c.has(s.paramMin)?c.set(s.paramMin,d.min.join("*")):c.append(s.paramMin,d.min.join("*")),c.has(s.paramAdjustify)?c.set(s.paramAdjustify,d.adjustify.x+"*"+d.adjustify.y):c.append(s.paramAdjustify,d.adjustify.x+"*"+d.adjustify.y),window.history.replaceState(null,null,"?"+c)}l.writeToIndexedDB&&(d.id=l.name,n.idb.put(d,function(e){0==e&&console.error("Cannot write row - "+l.name)})),l.writeToLocalStorage&&n.localStorage.setItem(l.name,JSON.stringify(d))}},n.state._get=function(e,t,i,r){if(e){var o=n.state._buildStateNames(e.name);if(e.readFromUrlParams){var a=new URLSearchParams(window.location.search);if(a.has(o.paramScale)&&a.has(o.paramX)&&a.has(o.paramY)&&a.has(o.paramExp)&&a.has(o.paramMin)&&a.has(o.paramAdjustify)
1){var l={},s=parseFloat(a.get(o.paramScale)),d=parseFloat(a.get(o.paramX)),c=parseFloat(a.get(o.paramY));(h=[])[0]=d,h[1]=c,h[2]=t/s,h[3]=i/s,l.vb=h,l.scale=s,l.x=d,l.y=c,l.exp=a.get(o.paramExp).split("*"),l.min=a.get(o.paramMin).split("*");var p=a.get(o.paramAdjustify).split("*");return l.adjustify={x:parseFloat(p[0]),y:parseFloat(p[1])},void r(l)}if(!e.readFromIndexedDB&&!e.readFromLocalStorage)return void r(null)}if(e.readFromLocalStorage){var h;if(null!=(l=n.localStorage.getItem(e.name)))return l=JSON.parse(l),(h=[])[0]=l.x,h[1]=l.y,h[2]=t/l.scale,h[3]=i/l.scale,l.vb=h,void r(l);if(!e.readFromIndexedDB)return void r(null)}e.readFromIndexedDB&&n.idb.read(e.name,function(n,o){if(0==n)console.error("Cannot read from - "+e.name),r(null);else if(null==n)r(null);else{var a=[];a[0]=o.x,a[1]=o.y,a[2]=t/o.scale,a[3]=i/o.scale,o.vb=a,r(o)}})}else r(null)},n.state.clear=function(e){if(!e)return!1;var t=n.state._buildStateNames(e),i=new URLSearchParams(window.location.search);i.has(t.paramScale)&&i.delete(t.paramScale),i.has(t.paramX)&&i.delete(t.paramX),i.has(t.paramY)&&i.delete(t.paramY),i.has(t.paramExp)&&i.delete(t.paramExp),i.has(t.paramMin)&&i.delete(t.paramMin),i.has(t.paramAdjustify)&&i.delete(t.paramAdjustify),window.history.replaceState(null,null,"?"+i),n.idb.delete(e,function(t){0==t&&console.error("Cannot delete row - "+e)})},n._magnify={},n.prototype.magnify=function(e,t,i,r,o){r||(r=this.config.anim);var a=this.getNode(e),l=this.getNodeElement(e);if(a||l){var s=n._magnify[e];s&&(null!=s.timer&&clearInterval(s.timer),null!=s.timerBack&&clearInterval(s.timerBack),l.setAttribute("transform","matrix("+s.transformStart.toString()+")"),n._magnify[e]),i&&(l=l.cloneNode(!0),this.get
1Svg().appendChild(l));var d=n._getTransform(l),c=JSON.parse(JSON.stringify(d));c[0]=t,c[3]=t;var p=a.w+a.w*(t-1),h=a.h+a.h*(t-1);c[4]+=(a.w-p)/2,c[5]+=(a.h-h)/2;var f=n.anim(l,{transform:d},{transform:c},r.duration,r.func);n._magnify[e]={timer:f,transformStart:d,nodeElement:l,front:i},o&&o(l)}},n.prototype.magnifyBack=function(e,t,i){t||(t=this.config.anim);var r=n._magnify[e];if(r){null!=r.timer&&clearInterval(r.timer),null!=r.timerBack&&clearInterval(r.timerBack);var o=n._getTransform(r.nodeElement);r.timerBack=n.anim(r.nodeElement,{transform:o},{transform:r.transformStart},t.duration,t.func,function(e){var t=e[0].getAttribute("node-id");n._magnify[t]&&n._magnify[t].front&&(e[0].parentNode.removeChild(e[0]),n._magnify[t]=null),i&&i(e[0])})}},t.a=n}}]);
2//# sourceMappingURL=30.efdb4627.chunk.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.