// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://js.arcgis.com/3.23/esri/copyright.txt for details.
//>>built
define("esri/dijit/metadata/base/Conditional","dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/query dijit/registry dojo/has ../../../kernel dijit/_WidgetBase ./etc/docUtil".split(" "),function(e,d,h,f,g,k,l,m,n){e=e([m],{parentXNode:null,_isConditional:!0,postCreate:function(){this.inherited(arguments)},emitInteractionOccurred:function(a){a||(a={inputWidget:this});this.emit("interaction-occurred",a)},ensureFocus:function(){n.ensureVisibility(this.parentXNode);if(this.focusNode&&this.focusNode.focus)try{this.focusNode.focus()}catch(a){}},
findElement:function(a,b){b=b||this.getRootDomNode();var c=f("[data-gxe-path\x3d'"+a+"']",b);return c&&1===c.length?g.byNode(c[0]):null},findInputValue:function(a,b){var c=this.findInputWidget(a,b);return c?c.getInputValue():null},findInputWidget:function(a,b){b=b||this.getRootDomNode();var c;return(c=f("[data-gxe-path\x3d'"+a+"']",b))&&1===c.length&&(c=g.byNode(c[0]))?c.inputWidget:null},forActiveXNodes:function(a,b,c,d){b=b||this.getRootDomNode();a=a.split(",");var e=this;c&&"function"===typeof c&&
h.some(a,function(a){a=f("[data-gxe-path\x3d'"+a+"']",b);return h.some(a,function(a){a=g.byNode(a);if(!e.isXNodeOff(a))return d?c.call(d,a):c(a)})})},getRootDomNode:function(){return this.parentXNode.gxeDocument.rootElement.domNode},isXNodeInputEmpty:function(a){if(a&&a.inputWidget){a=a.inputWidget.getInputValue();if(null===a)return!0;if("string"===typeof a)return 0===d.trim(a).length;if(d.isArray(a))return 0===d.length}return!1},isXNodeOff:function(a){for(;a;){if(a._isOptionallyOff)return!0;a=a.getParent()}return!1},
newStatus:function(a){var b={isValid:!0,message:""};a&&d.mixin(b,a);return b},track:function(a,b){!a.isValid&&b&&b.handleValidationError(this.parentXNode,a.message,this)},validateConditionals:function(a){}});k("extend-esri")&&d.setObject("dijit.metadata.base.Conditional",e,l);return e});