text: /**
   * Copyright (c) 2014, 2017, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   */
  "use strict";
  define(["ojs/ojcore","jquery","ojs/ojcomponentcore","ojs/ojdvt-base","ojs/internal-deps/dvt/DvtDiagram","ojs/ojdatasource-common"],function(a,g,c,b,d){a.pr=function(b,c){this.Dq=c?c.childData:null;a.pr.O.constructor.call(this,b)};a.f.xa(a.pr,a.pw,"oj.ConversionDiagramDataSource");a.pr.prototype.getData=function(a){if(a){var b=a.nodes;return void 0===b&&this.Dq?(a=this.Dq(a),Promise.resolve(a).then(function(a){return Promise.resolve({nodes:a})},function(){return Promise.resolve({nodes:[]})})):Promise.resolve({nodes:b})}return this.data?
  (a=this.data.nodes,b=this.data.links,a instanceof Function&&(a=a()),b instanceof Function&&(b=b()),Promise.all([a,b]).then(function(a){return Promise.resolve({nodes:a[0],links:a[1]})},function(){return Promise.resolve({nodes:[],links:[]})})):Promise.resolve(null)};a.f.j("ConversionDiagramDataSource.prototype.getData",{getData:a.pr.prototype.getData});a.pr.prototype.getChildCount=function(a){return a?(a=a.nodes,Array.isArray(a)?a.length:void 0===a&&this.Dq?-1:0):-1};a.f.j("ConversionDiagramDataSource.prototype.getChildCount",
  {getChildCount:a.pr.prototype.getChildCount});a.pr.prototype.getDescendantsConnectivity=function(){return"unknown"};a.f.j("ConversionDiagramDataSource.prototype.getDescendantsConnectivity",{getDescendantsConnectivity:a.pr.prototype.getDescendantsConnectivity});a.ab("oj.ojDiagram",g.oj.dvtBaseComponent,{widgetEventPrefix:"oj",options:{beforeExpand:null,expand:null,beforeCollapse:null,collapse:null},Ir:function(){this._super();this.options._logger=a.F;this.options._templateFunction&&(this.options.renderer=
  this.NT(this.options._templateFunction,"node"));this.options.renderer&&(this.options._contextHandler=this.xX());this.options.nodes&&(this.options.nodeProperties=this.options.nodeProperties?this.options.nodeProperties:function(a){return a},this.options.linkProperties=this.options.linkProperties?this.options.linkProperties:function(a){return a},this.options.data=new a.pr({nodes:this.options.nodes,links:this.options.links},{childData:this.options.childNodes}))},xX:function(){var b=this;return function(c,
  d,g,l,m,p){c={component:a.Components.md(b.element),parentElement:c,rootElement:d,content:g,data:l,state:m,previousState:p,id:l.id,type:"node",label:l.label};return b.Dr(c)}},renderDefaultHover:function(a){a.previousState&&a.state.hovered==a.previousState.hovered||this.DK(this.element).processDefaultHoverEffect(a.id,a.state.hovered)},renderDefaultSelection:function(a){a.previousState&&a.state.selected==a.previousState.selected||this.DK(this.element).processDefaultSelectionEffect(a.id,a.state.selected)},
  renderDefaultFocus:function(a){a.previousState&&a.state.focused==a.previousState.focused||this.DK(this.element).processDefaultFocusEffect(a.id,a.state.focused)},qh:function(a,b,c){return d.Diagram.newInstance(a,b,c)},Gl:function(a){var b=a.subId;"oj-diagram-link"==b?b="link["+a.index+"]":"oj-diagram-node"==b?b="node["+a.index+"]":"oj-diagram-tooltip"==b&&(b="tooltip");return b},xi:function(a){var b={};0==a.indexOf("link")?(b.subId="oj-diagram-link",b.index=this.Jl(a)):0==a.indexOf("node")?(b.subId=
  "oj-diagram-node",b.index=this.Jl(a)):"tooltip"==a&&(b.subId="oj-diagram-tooltip");return b},rg:function(){var a=this._super();a.push("oj-diagram");return a},ok:function(){var a=this._super();a["oj-diagram-node-label"]={path:"styleDefaults/nodeDefaults/labelStyle",property:"CSS_TEXT_PROPERTIES"};a["oj-diagram-node oj-selected"]={path:"styleDefaults/nodeDefaults/selectionColor",property:"border-color"};a["oj-diagram-node oj-hover"]=[{path:"styleDefaults/nodeDefaults/hoverOuterColor",property:"border-top-color"},
  {path:"styleDefaults/nodeDefaults/hoverInnerColor",property:"border-bottom-color"}];a["oj-diagram-link"]={path:"styleDefaults/linkDefaults/color",property:"color"};a["oj-diagram-link-label"]={path:"styleDefaults/linkDefaults/labelStyle",property:"CSS_TEXT_PROPERTIES"};a["oj-diagram-link oj-selected"]={path:"styleDefaults/linkDefaults/selectionColor",property:"border-color"};a["oj-diagram-link oj-hover"]=[{path:"styleDefaults/linkDefaults/hoverOuterColor",property:"border-top-color"},{path:"styleDefaults/linkDefaults/hoverInnerColor",
  property:"border-bottom-color"}];return a},Il:function(){return["optionChange","beforeExpand","beforeCollapse","expand","collapse"]},Em:function(a){var b=a.type;"beforeExpand"===b?this.expand(a.id,!0):"beforeCollapse"===b?this.collapse(a.id,!0):"expand"===b||"collapse"===b?this._trigger(b,null,{nodeId:a.id}):this._super(a)},_setOptions:function(a,b){a.expanded&&this.Ha.clearDisclosedState();this._superApply(arguments)},xj:function(){var a=this.options.translations,b=this._super();b["DvtDiagramBundle.PROMOTED_LINK"]=
  a.promotedLink;b["DvtDiagramBundle.PROMOTED_LINKS"]=a.promotedLinks;b["DvtDiagramBundle.PROMOTED_LINK_ARIA_DESC"]=a.promotedLinkAriaDesc;b["DvtUtilBundle.DIAGRAM"]=a.componentName;return b},Yn:function(){null==this.options._resources&&(this.options._resources={});var b=this.options._resources;"rtl"===a.Q.Oj()?(b.collapse_ena={src:a.qa.tb("resources/internal-deps/dvt/diagram/container-collapse-button-ena_rtl.svg"),width:20,height:20},b.collapse_ovr={src:a.qa.tb("resources/internal-deps/dvt/diagram/container-collapse-button-ovr_rtl.svg"),
  width:20,height:20},b.collapse_dwn={src:a.qa.tb("resources/internal-deps/dvt/diagram/container-collapse-button-dwn_rtl.svg"),width:20,height:20},b.expand_ena={src:a.qa.tb("resources/internal-deps/dvt/diagram/container-expand-button-ena_rtl.svg"),width:20,height:20},b.expand_ovr={src:a.qa.tb("resources/internal-deps/dvt/diagram/container-expand-button-ovr_rtl.svg"),width:20,height:20},b.expand_dwn={src:a.qa.tb("resources/internal-deps/dvt/diagram/container-expand-button-dwn_rtl.svg"),width:20,height:20}):
  (b.collapse_ena={src:a.qa.tb("resources/internal-deps/dvt/diagram/container-collapse-button-ena.svg"),width:20,height:20},b.collapse_ovr={src:a.qa.tb("resources/internal-deps/dvt/diagram/container-collapse-button-ovr.svg"),width:20,height:20},b.collapse_dwn={src:a.qa.tb("resources/internal-deps/dvt/diagram/container-collapse-button-dwn.svg"),width:20,height:20},b.expand_ena={src:a.qa.tb("resources/internal-deps/dvt/diagram/container-expand-button-ena.svg"),width:20,height:20},b.expand_ovr={src:a.qa.tb("resources/internal-deps/dvt/diagram/container-expand-button-ovr.svg"),
  width:20,height:20},b.expand_dwn={src:a.qa.tb("resources/internal-deps/dvt/diagram/container-expand-button-dwn.svg"),width:20,height:20})},collapse:function(a,b){var c=this._trigger("beforeCollapse",null,{nodeId:a});b&&!1===c||(this.wA(),this.Ha.collapse(a))},expand:function(a,b){var c=this._trigger("beforeExpand",null,{nodeId:a});b&&!1===c||(this.wA(),this.Ha.expand(a))},getNodeCount:function(){return this.Ha.getAutomation().getNodeCount()},getNode:function(a){return this.Ha.getAutomation().getNode(a)},
  getLinkCount:function(){return this.Ha.getAutomation().getLinkCount()},getLink:function(a){return this.Ha.getAutomation().getLink(a)},getPromotedLink:function(a,b){return this.Ha.getAutomation().getPromotedLink(a,b)},getContextByNode:function(a){return(a=this.getSubIdByNode(a))&&"oj-diagram-tooltip"!==a.subId?a:null}});a.Jg=function(){};o_("DiagramUtils",a.Jg,a);a.Jg.pQ=function(b){return function(c){if(b.nodes&&0<c.getNodeCount())for(var d=a.Jg.vW(b.nodes),g=b.nodeDefaults&&b.nodeDefaults.labelLayout?
  b.nodeDefaults.labelLayout:null,l=0;l<c.getNodeCount();l++){var m=c.getNodeByIndex(l),p=d[m.getId()];a.Jg.iha(m.getChildNodes(),p?p.nodes:null,c,g);a.Jg.jha(m,p,c,g)}if(b.links&&0<c.getLinkCount())for(d=a.Jg.vW(b.links),l=b.linkDefaults&&b.linkDefaults.path?b.linkDefaults.path:null,g=b.linkDefaults&&b.linkDefaults.labelLayout?b.linkDefaults.labelLayout:null,m=0;m<c.getLinkCount();m++){var p=c.getLinkByIndex(m),t=d[p.getId()];t&&t.path?p.setPoints(t.path):l&&l instanceof Function&&p.setPoints(l(c,
  p));t&&t.coordinateSpace&&p.setCoordinateSpace(t.coordinateSpace);t.labelLayout?a.Jg.CH(p,t.labelLayout):g&&g instanceof Function&&a.Jg.CH(p,g(c,p))}b.viewport&&(g=b.viewport,g instanceof Function?c.setViewport(g(c)):c.setViewport(g))}};o_("DiagramUtils.getLayout",a.Jg.pQ,a);a.Jg.vW=function(a){var b={};if(a)for(var c=0;c<a.length;c++)b[a[c].id]=a[c];return b};a.Jg.iha=function(b,c,d,g){if(b&&c){c=a.Jg.vW(c);for(var l=0;l<b.length;l++){var m=b[l],p=c[m.getId()];a.Jg.iha(m.getChildNodes(),p?p.nodes:
  null,d,g);a.Jg.jha(m,p,d,g)}}};a.Jg.jha=function(b,c,d,g){b&&c&&(b.setPosition({x:c.x,y:c.y}),c.labelLayout?a.Jg.CH(b,c.labelLayout):g&&g instanceof Function?a.Jg.CH(b,g(d,b)):g&&a.Jg.CH(b,g,b.getPosition()))};a.Jg.CH=function(a,b,c){c=c?c:{x:0,y:0};a.setLabelPosition({x:b.x+c.x,y:b.y+c.y});var d=b.rotationPointX,g=b.rotationPointY;isNaN(d)||isNaN(g)||a.setLabelRotationPoint({x:d+c.x,y:g+c.y});a.setLabelRotationAngle(b.angle);a.setLabelHalign(b.halign);a.setLabelValign(b.valign)};(function(){var b=
  /^\[.*\]/;a.U.ob("oj-diagram","dvtBaseComponent",{properties:{animationOnDataChange:{type:"string",enumValues:["auto","none"]},animationOnDisplay:{type:"string",enumValues:["auto","none"]},data:{},dnd:{type:"object",properties:{drag:{type:"object",properties:{nodes:{type:"object",properties:{dataTypes:{type:"Array\x3cstring\x3e"},drag:{},dragEnd:{},dragStart:{}}}}},drop:{type:"object",properties:{background:{type:"object",properties:{dataTypes:{type:"Array\x3cstring\x3e"},dragEnter:{},dragLeave:{},
  dragOver:{},drop:{}}},nodes:{type:"object",properties:{dataTypes:{type:"Array\x3cstring\x3e"},dragEnter:{},dragLeave:{},dragOver:{},drop:{}}},links:{type:"object",properties:{dataTypes:{type:"Array\x3cstring\x3e"},dragEnter:{},dragLeave:{},dragOver:{},drop:{}}}}}}},expanded:{type:"Array\x3cstring\x3e|string"},focusRenderer:{},hiddenCategories:{type:"Array\x3cstring\x3e",writeback:!0},highlightedCategories:{type:"Array\x3cstring\x3e",writeback:!0},highlightMatch:{type:"string",enumValues:["any","all"]},
  hoverBehavior:{type:"string",enumValues:["dim","none"]},hoverRenderer:{},layout:{},linkHighlightMode:{type:"string",enumValues:["linkAndNodes","link"]},linkProperties:{},maxZoom:{type:"number"},minZoom:{type:"number"},nodeHighlightMode:{type:"string",enumValues:["nodeAndIncomingLinks","nodeAndOutgoingLinks","nodeAndLinks","node"]},nodeProperties:{},panDirection:{type:"string",enumValues:["x","y","auto"]},panning:{type:"string",enumValues:["auto","none"]},promotedLinkBehavior:{type:"string",enumValues:["none",
  "lazy","full"]},renderer:{},selection:{type:"Array\x3cstring\x3e",writeback:!0},selectionMode:{type:"string",enumValues:["none","single","multiple"]},selectionRenderer:{},styleDefaults:{type:"object",properties:{animationDuration:{type:"number"},hoverBehaviorDelay:{type:"number"},linkDefaults:{type:"object",properties:{linkDefaults:{color:{type:"string"},endConnectorType:{type:"string",enumValues:"arrowOpen arrow arrowConcave circle rectangle rectangleRounded none".split(" ")},labelStyle:{type:"object"},
  startConnectorType:{type:"string",enumValues:"arrowOpen arrow arrowConcave circle rectangle rectangleRounded none".split(" ")},svgStyle:{type:"object"},width:{type:"number"}}}},nodeDefaults:{type:"object",properties:{nodeDefaults:{backgroundSvgStyle:{type:"object"},containerSvgStyle:{type:"object"},icon:{type:"object",properties:{icon:{borderColor:{type:"string"},borderWidth:{type:"number"},color:{type:"string"},halign:{type:"string",enumValues:["left","right","center"]},height:{type:"number"},pattern:{type:"string",
  enumValues:"smallChecker smallCrosshatch smallDiagonalLeft smallDiagonalRight smallDiamond smallTriangle largeChecker largeCrosshatch largeDiagonalLeft largeDiagonalRight largeDiamond largeTriangle none".split(" ")},shape:{type:"string",enumValues:"circle square plus diamond triangleUp triangleDown human rectangle star".split(" ")},source:{type:"string"},sourceHover:{type:"string"},sourceHoverSelected:{type:"string"},sourceSelected:{type:"string"},svgStyle:{type:"object"},valign:{type:"string",enumValues:["top",
  "bottom","center"]},width:{type:"number"}}}},labelStyle:{type:"object"},showDisclosure:{type:"string",enumValues:["on","off"]}}}},promotedLink:{type:"object",properties:{promotedLink:{color:{type:"string"},endConnectorType:{type:"string",enumValues:"arrowOpen arrow arrowConcave circle rectangle rectangleRounded none".split(" ")},startConnectorType:{type:"string",enumValues:"arrowOpen arrow arrowConcave circle rectangle rectangleRounded none".split(" ")},svgStyle:{type:"object"},width:{type:"number"}}}}}},
  tooltip:{type:"object",properties:{renderer:{}}},touchResponse:{type:"string",enumValues:["touchStart","auto"]},translations:{properties:{componentName:{type:"string"},promotedLink:{type:"string"},promotedLinkAriaDesc:{type:"string"},promotedLinks:{type:"string"}}},zooming:{type:"string",enumValues:["auto","none"]},zoomRenderer:{}},events:{beforeCollapse:{},beforeExpand:{},collapse:{},expand:{}},methods:{collapse:{},expand:{},getContextByNode:{},getLink:{},getLinkCount:{},getNode:{},getNodeCount:{},
  getPromotedLink:{},renderDefaultFocus:{},renderDefaultHover:{},renderDefaultSelection:{}},extension:{mb:"ojDiagram"}});a.U.register("oj-diagram",{metadata:a.U.getMetadata("oj-diagram"),parseFunction:function(a,c,d,g){return"expanded"==c?b.test(a)?JSON.parse(a):a:g(a)}})})()});