var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.checkStringArgs=function(a,b,c){if(null==a)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;
$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};
$jscomp.getGlobal=function(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};
$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(a,b){var c=$jscomp.propertyToPolyfillSymbol[b];if(null==c)return a[b];c=a[c];return void 0!==c?c:a[b]};$jscomp.polyfill=function(a,b,c,d){b&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(a,b,c,d):$jscomp.polyfillUnisolated(a,b,c,d))};
$jscomp.polyfillUnisolated=function(a,b,c,d){c=$jscomp.global;a=a.split(".");for(d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))return;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&$jscomp.defineProperty(c,a,{configurable:!0,writable:!0,value:b})};
$jscomp.polyfillIsolated=function(a,b,c,d){var e=a.split(".");a=1===e.length;d=e[0];d=!a&&d in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var f=0;f<e.length-1;f++){var g=e[f];if(!(g in d))return;d=d[g]}e=e[e.length-1];c=$jscomp.IS_SYMBOL_NATIVE&&"es6"===c?d[e]:null;b=b(c);null!=b&&(a?$jscomp.defineProperty($jscomp.polyfills,e,{configurable:!0,writable:!0,value:b}):b!==c&&(void 0===$jscomp.propertyToPolyfillSymbol[e]&&(c=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[e]=$jscomp.IS_SYMBOL_NATIVE?
$jscomp.global.Symbol(e):$jscomp.POLYFILL_PREFIX+c+"$"+e),$jscomp.defineProperty(d,$jscomp.propertyToPolyfillSymbol[e],{configurable:!0,writable:!0,value:b})))};$jscomp.polyfill("String.prototype.startsWith",function(a){return a?a:function(b,c){var d=$jscomp.checkStringArgs(this,b,"startsWith");b+="";var e=d.length,f=b.length;c=Math.max(0,Math.min(c|0,d.length));for(var g=0;g<f&&c<e;)if(d[c++]!=b[g++])return!1;return g>=f}},"es6","es3");
zul.inp.SimpleDateConstraint=zk.$extends(zul.inp.SimpleConstraint,{$init:function(a,b){this._wgt=b;this._localizedSymbols=b._localizedSymbols;this.$super("$init",a)},format:"yyyyMMdd",parseConstraint_:function(a){var b=this.format.length+1,c=this._cstArr,d=this._wgt;d=d&&d.getTimeZone&&d.getTimeZone();if(a.startsWith("between")){var e=a.indexOf("and",7);0>e&&zk.debugJS&&zk.error("Unknown constraint: "+a);this._beg=(new zk.fmt.Calendar(null,this._localizedSymbols)).parseDate(a.substring(7,e),this.format,
null,null,null,d);this._end=(new zk.fmt.Calendar(null,this._localizedSymbols)).parseDate(a.substring(e+3,e+3+b),this.format,null,null,null,d);this._beg.getTime()>this._end.getTime()&&(b=this._beg,this._beg=this._end,this._end=b);this._beg.setHours(0,0,0,0);this._end.setHours(0,0,0,0);c[c.length]="between"}else a.startsWith("before")&&!a.startsWith("before_")?(this._end=(new zk.fmt.Calendar(null,this._localizedSymbols)).parseDate(a.substring(6,6+b),this.format,null,null,null,d),this._end.setHours(0,
0,0,0),c[c.length]="before"):a.startsWith("after")&&!a.startsWith("after_")&&(this._beg=(new zk.fmt.Calendar(null,this._localizedSymbols)).parseDate(a.substring(5,5+b),this.format,null,null,null,d),this._beg.setHours(0,0,0,0),c[c.length]="after");return this.$supers("parseConstraint_",arguments)},validate:function(a,b){var c=this.$supers("validate",arguments);if(b instanceof DateImpl){var d=this._errmsg,e=Dates.newInstance([b.getFullYear(),b.getMonth(),b.getDate()],b.getTimeZone());if(null!=this._beg&&
this._beg.getTime()>e.getTime())return d.between||d.after||this.outOfRangeValue();if(null!=this._end&&this._end.getTime()<e.getTime())return d.between||d.before||this.outOfRangeValue()}return c},outOfRangeValue:function(){var a=this._wgt._format,b=msgzul.OUT_OF_RANGE_SEPARATOR?" "+msgzul.OUT_OF_RANGE_SEPARATOR+" ":" ~ ";return msgzul.OUT_OF_RANGE+": "+(null!=this._beg?null!=this._end?(new zk.fmt.Calendar(null,this._localizedSymbols)).formatDate(this._beg,a)+b+(new zk.fmt.Calendar).formatDate(this._end,
a):">= "+(new zk.fmt.Calendar).formatDate(this._beg,a):"<= "+(new zk.fmt.Calendar).formatDate(this._end,a))}});
