// 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/types/arcgis/form/CitationDateElement","dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/has ../../../../../kernel ../../../base/etc/docUtil ../../../form/OpenElement dojo/i18n!../../../nls/i18nArcGIS dojo/i18n!../../../nls/i18nBase".split(" "),function(b,f,m,g,h,n,p,k,l){b=b([p],{postCreate:function(){this.inherited(arguments)},afterValidateValue:function(q,d,a){var c=this.gxeDocument;if("pubDate"===this.target&&!c.isAgsItemDescription&&!c.isAgsFGDC&&(a=null===
a||0===f.trim(a).length,d.isValid||a)){var e=k.citation.conditionalDate.msg,b=["createDate","pubDate","reviseDate"];c.isAgsNAP&&(e=k.citation.conditionalDate.msg_nap,b="createDate pubDate reviseDate notavailDate inforceDate adoptDate deprecDate supersDate".split(" "));var c=m.some(b,function(a){return this._hasDateValue(q,a)},this),b=l.validation.pattern,g=k.citation.conditionalDate.caption,h=l.validation.ok;c?a&&(d.message=b.replace("{label}",g).replace("{message}",h)):(d.isValid=!1,d.message=e)}},
_hasDateValue:function(b,d){var a=n.findInputWidget(this.parentElement.gxePath+"/"+d,this.domNode.parentNode).getInputValue(),c=null===a||0===f.trim(a).length;if(!c){var e={label:d,isValid:!0};this.inputWidget.forceTime?b._checkDateTime(e,a):this.inputWidget.allowTime&&-1!==a.indexOf("T")?b._checkDateTime(e,a):b._checkDate(e,a);e.isValid||(c=!0)}return!c}});g("extend-esri")&&f.setObject("dijit.metadata.types.arcgis.form.CitationDateElement",b,h);return b});