diff --git a/src/main/resources/static/js/natural_js/natural.js.min.js b/src/main/resources/static/js/natural_js/natural.js.min.js index ad24ae9..0f4aca0 100644 --- a/src/main/resources/static/js/natural_js/natural.js.min.js +++ b/src/main/resources/static/js/natural_js/natural.js.min.js @@ -1,5 +1,5 @@ /* - Natural-CORE v0.20.33 + Natural-CORE v0.20.34 Released under the LGPL v2.1 license Date: 2014-09-26T11:11Z @@ -19,43 +19,43 @@ k){n=this.filter("[name='"+this.attr("name")+"']:checked");if("function"!==c.typ "']");return n.each(function(){v.call(this,f.index(this),this)})}if(1===this.length)if(0===n.length&&(n=this.filter("[id='"+this.attr("id")+"']")),"function"!==c.type(v))if(k=c.string.trimToEmpty(n.val()),k!==c.context.attr("core").sgChkdVal&&k!==c.context.attr("core").sgUnChkdVal&&(k=c.context.attr("core").sgUnChkdVal),c.context.attr("core").sgChkdVal===k||c.context.attr("core").sgUnChkdVal===k||void 0===n.attr("value")){if(n.prop("checked"))return k=c.context.attr("core").sgChkdVal,n.val(k),k;if(!n.prop("checked"))return k= c.context.attr("core").sgUnChkdVal,n.val(k),k}else return k;else return v.call(n,this.filter("[name='"+this.attr("name")+"']").index(n),n),n}}return""},events:function(v,n){var k=g(this);if(0#data_sync_temp__").length&&(g(v.context.attr("architecture").page.context).find(">#data_sync_temp__").instance("ds").obserable=g.uniqueSort(g(".grid__, .list__, .form__:not('.grid__>tbody, .list__>li'), .tree__", -v.context.attr("architecture").page.context).instance()))}},string:{contains:function(n,k){return this.isEmpty(n)||this.isEmpty(k)?!1:n&&-1!=n.indexOf(k)},endsWith:function(n,k){return this.isEmpty(n)||this.isEmpty(k)?!1:n.lastIndexOf(k)===n.length-k.length},startsWith:function(n,k){return this.isEmpty(n)?!1:0===n.indexOf(k)},insertAt:function(n,k,e){return n.substring(0,k)+e+n.substring(k)},removeWhitespace:function(n){return this.isEmpty(n)?n:n.replace(/\s/g,"")},lpad:function(n,k,e){for(;n.length< -k;)n=e+n;return n},rpad:function(n,k,e){for(;n.length>11?k:p>>7?2:1);return e},trimToEmpty:function(n){return void 0!==n&&null!==n?String(n).trim():""},nullToEmpty:function(n){return null===n||void 0===n?"":n},trimToNull:function(n){return 0===v.string.trimToEmpty(n).length? -null:v.string.trimToEmpty(n)},trimToUndefined:function(n){return 0===v.string.trimToEmpty(n).length?void 0:v.string.trimToEmpty(n)},trimToZero:function(n){return 0===v.string.trimToEmpty(n).length?"0":v.string.trimToEmpty(n)},trimToVal:function(n,k){return 0===v.string.trimToEmpty(n).length?k:v.string.trimToEmpty(n)}},date:{diff:function(n,k){"string"===v.type(n)&&(n=this.strToDate(n).obj);"string"===v.type(k)&&(k=this.strToDate(k).obj);return Math.ceil((k-n)/1E3/24/60/60)},strToDateStrArr:function(n, -k,e){var f=[],p=0;if(3===k.length&&7===n.length||2===k.length&&5===n.length)p=-1;if(v.string.startsWith(k,"Ymd"))f.push(n.substring(0,4+p)),f.push(n.substring(4+p,6+p)),f.push(n.substring(6+p,8+p));else if(v.string.startsWith(k,"mdY"))f.push(n.substring(4,8+p)),f.push(n.substring(0,2)),f.push(n.substring(2,4));else if(v.string.startsWith(k,"dmY"))f.push(n.substring(4,8+p)),f.push(n.substring(2,4)),f.push(n.substring(0,2));else if(v.string.startsWith(k,"Ym"))f.push(n.substring(0,4+p)),f.push(n.substring(4+ -p,6+p));else if(v.string.startsWith(k,"mY"))f.push(n.substring(2,6+p)),f.push(n.substring(0,2));else throw v.error('[N.date.strToDateStrArr]"'+k+'" date format is not support. please change return value of N.context.attr("data").formatter.date\'s functions');void 0!==e&&!1!==e||g(f).each(function(r){f[r]=parseInt(this)});return f},strToDate:function(n,k){n=v.string.trimToEmpty(n).replace(/[^0-9]/g,"");var e=null;2=n.length?e={obj:new Date(n,1,1,0,0,0),format:"Y"}:6===n.length?(void 0=== -k&&(k=v.context.attr("data").formatter.date.Ym()),e=v.date.strToDateStrArr(n,k.replace(/[^Y|^m|^d]/g,"")),e={obj:new Date(e[0],e[1]-1,1,0,0,0),format:k}):8===n.length?(void 0===k&&(k=v.context.attr("data").formatter.date.Ymd()),e=v.date.strToDateStrArr(n,k.replace(/[^Y|^m|^d]/g,"")),e={obj:new Date(e[0],e[1]-1,e[2],0,0,0),format:k}):10===n.length?(void 0===k&&(k=v.context.attr("data").formatter.date.YmdH()),e=v.date.strToDateStrArr(n,k.replace(/[^Y|^m|^d]/g,"")),e={obj:new Date(e[0],e[1]-1,e[2],n.substring(8, -10),0,0),format:k}):12===n.length?(void 0===k&&(k=v.context.attr("data").formatter.date.YmdHi()),e=v.date.strToDateStrArr(n,k.replace(/[^Y|^m|^d]/g,"")),e={obj:new Date(e[0],e[1]-1,e[2],n.substring(8,10),n.substring(10,12),0),format:k}):14<=n.length&&(void 0===k&&(k=v.context.attr("data").formatter.date.YmdHis()),e=v.date.strToDateStrArr(n,k.replace(/[^Y|^m|^d]/g,"")),e={obj:new Date(e[0],e[1]-1,e[2],n.substring(8,10),n.substring(10,12),n.substring(12,14)),format:k});return e},format:function(n,k){var e= -this.strToDate(n);return null!==e?e.obj.formatDate(void 0!==k?k:e.format):n},dateToTs:function(n){void 0===n&&(n=new Date);return Math.round(n.getTime()/1E3)},tsToDate:function(n){return void 0===n?new Date:new Date(n)},dateList:function(n,k){var e=[],f=new Date(n,k-1,0),p=new Date(n,k,0);n=new Date(n,k+1,0);var r=p.getDate(),x=f.getDate();k=f.getDay();var t=[];if(6!==k)for(k=x-k;k<=x;k++)f.setDate(k),t.push(new Date(f.getFullYear(),f.getMonth(),f.getDate(),0));for(k=1;k<=r;k++)p.setDate(k),t.push(new Date(p.getFullYear(), -p.getMonth(),p.getDate(),0)),0k&&(k=n.indexOf(".NET"));var e=n.match(/Trident\/(\d.\d)/i);return 0>k?0:void 0===e?parseInt(n.substring(k+5,n.indexOf(".",k))):parseInt(e[1])+ -4},is:function(n){if(H.opera||0<=navigator.userAgent.indexOf(" OPR/"))return"opera"===n;if("undefined"!==typeof InstallTrigger)return"firefox"===n;if("ios"!==n&&navigator.userAgent.match(/^((?!chrome|android|crios|fxios).)*safari/i))return"safari"===n;if(!H.chrome||H.opera||0<=navigator.userAgent.indexOf(" OPR/")){if(0
');g("body").append(n);var k=g(n).innerWidth(),e=g("div",n).innerWidth();g(n).remove();return k-e}},message:{replaceMsgVars:function(n,k){if(void 0!== -k)for(var e=0;eg.inArray(p[k],g(e).map(function(){return this[k]}).get())&&e.push(p):0>g.inArray(p,e)&&e.push(p)});return e}},json:{mapFromKeys:function(n){if(1f.indexOf(this[e])&&n.push(this)});return n},format:function(n, -k){if(v.isEmptyObject(n))return null;v.isString(n)&&(n=JSON.parse(n));void 0===k&&(k=4);return JSON.stringify(n,void 0,k)}},event:{isNumberRelatedKeys:function(n){n=n?n:H.event;var k=[97,65,99,67,118,86,115,83,112,80],e=[8,9,27,13,35,36,37,39,46,45];var f=n.keyCode?n.keyCode:n.which?n.which:n.charCode;return!f||48<=f&&57>=f||96<=f&&105>=f?!0:n.ctrlKey&&-1!==k.indexOf(f)||-1!==navigator.userAgent.indexOf("Firefox")&&(n.ctrlKey&&n.keyCode&&0=f||n.keyCode&&0=f)?!0:-1!==e.indexOf(f)?-1===navigator.userAgent.indexOf("Firefox")||39!=f&&45!=f&&46!=f?!(n.shiftKey&&(35==f||36==f||37==f)):void 0!==n.keyCode&&0=g(this).scrollTop()?!1:!(0>k&&g(this).scrollTop()>=this.scrollHeight-g(this).height())})}, -getMaxDuration:function(n,k){return!n.css(k)||n.css(k).startsWith("0")?0:Math.max.apply(void 0,g(n.css(k).split(",")).map(function(){return-1t&&(t+=1E3);1===String(t).length&&(t="00"+t);2===String(t).length&&(t="0"+t);return t},c:function(){return this.Y()+"-"+this.m()+"-"+this.d()+"T"+this.H()+":"+this.i()+":"+this.s()+this.P()},d:function(){var t=String(this.j());return 1===t.length?"0"+t:t},D:function(){return e[x.getDay()]},F:function(){return p[x.getMonth()]},g:function(){return 0===x.getHours()?12:12x.getTimezoneOffset()?"+"+w+t:"-"+w+t},P:function(){var t=this.O();return t.substr(0,3)+":"+t.substr(3,2)},r:function(){return this.D()+", "+this.d()+" "+this.M()+" "+this.Y()+" "+this.H()+":"+this.i()+":"+ -this.s()+" "+this.O()},s:function(){var t=String(x.getSeconds());return 1===t.length?"0"+t:t},S:function(){switch(x.getDate()){case 1:return"st";case 2:return"nd";case 3:return"rd";case 21:return"st";case 22:return"nd";case 23:return"rd";case 31:return"st";default:return"th"}},t:function(){return 1===this.L()&&2===this.n()?29:[null,31,28,31,30,31,30,31,31,30,31,30,31][this.n()]},U:function(){return Math.round(x.getTime()/1E3)},w:function(){return x.getDay()},W:function(){var t=this.N(),w=this.z(), -D=364+this.L()-w;if(2>=D&&t<=3-D)return 1;if(2>=w&&5<=t)return(new Date(this.Y()-1,11,31)).formatDate("W");t=(new Date(this.Y(),0,1)).getDay();t=0!==t?t-1:6;return 3>=t?1+Math.floor((w+t)/7):1+Math.floor((w-(7-t))/7)},y:function(){var t=String(this.Y());return t.substring(t.length-2,t.length)},Y:function(){if(x.getFullYear){var t=(new Date("January 1 2001 00:00:00 +0000")).getFullYear();if(2001===t)return x.getFullYear()}t=x.getYear();t%=100;return t+(38>t?2E3:1900)},z:function(){var t="January 1 "+ -this.Y()+" 00:00:00 GMT"+this.O();t=new Date(t);t=x.getTime()-t.getTime();return Math.floor(t/1E3/60/60/24)},Z:function(){return-60*x.getTimezoneOffset()}},x=n?new Date(n):this;v=v.split("");for(n=0;nw.length)break}this.allowPartial&&!e&&(p="");this.allowPartial&&(this.nextValidChar=p.length>11?k:p>>7?2:1);return e},trimToEmpty:function(n){return void 0!== +n&&null!==n?String(n).trim():""},nullToEmpty:function(n){return null===n||void 0===n?"":n},trimToNull:function(n){return 0===v.string.trimToEmpty(n).length?null:v.string.trimToEmpty(n)},trimToUndefined:function(n){return 0===v.string.trimToEmpty(n).length?void 0:v.string.trimToEmpty(n)},trimToZero:function(n){return 0===v.string.trimToEmpty(n).length?"0":v.string.trimToEmpty(n)},trimToVal:function(n,k){return 0===v.string.trimToEmpty(n).length?k:v.string.trimToEmpty(n)}},date:{diff:function(n,k){"string"=== +v.type(n)&&(n=this.strToDate(n).obj);"string"===v.type(k)&&(k=this.strToDate(k).obj);return Math.ceil((k-n)/1E3/24/60/60)},strToDateStrArr:function(n,k,e){var f=[],p=0;if(3===k.length&&7===n.length||2===k.length&&5===n.length)p=-1;if(v.string.startsWith(k,"Ymd"))f.push(n.substring(0,4+p)),f.push(n.substring(4+p,6+p)),f.push(n.substring(6+p,8+p));else if(v.string.startsWith(k,"mdY"))f.push(n.substring(4,8+p)),f.push(n.substring(0,2)),f.push(n.substring(2,4));else if(v.string.startsWith(k,"dmY"))f.push(n.substring(4, +8+p)),f.push(n.substring(2,4)),f.push(n.substring(0,2));else if(v.string.startsWith(k,"Ym"))f.push(n.substring(0,4+p)),f.push(n.substring(4+p,6+p));else if(v.string.startsWith(k,"mY"))f.push(n.substring(2,6+p)),f.push(n.substring(0,2));else throw v.error('[N.date.strToDateStrArr]"'+k+'" date format is not support. please change return value of N.context.attr("data").formatter.date\'s functions');void 0!==e&&!1!==e||g(f).each(function(r){f[r]=parseInt(this)});return f},strToDate:function(n,k){n=v.string.trimToEmpty(n).replace(/[^0-9]/g, +"");var e=null;2=n.length?e={obj:new Date(n,1,1,0,0,0),format:"Y"}:6===n.length?(void 0===k&&(k=v.context.attr("data").formatter.date.Ym()),e=v.date.strToDateStrArr(n,k.replace(/[^Y|^m|^d]/g,"")),e={obj:new Date(e[0],e[1]-1,1,0,0,0),format:k}):8===n.length?(void 0===k&&(k=v.context.attr("data").formatter.date.Ymd()),e=v.date.strToDateStrArr(n,k.replace(/[^Y|^m|^d]/g,"")),e={obj:new Date(e[0],e[1]-1,e[2],0,0,0),format:k}):10===n.length?(void 0===k&&(k=v.context.attr("data").formatter.date.YmdH()), +e=v.date.strToDateStrArr(n,k.replace(/[^Y|^m|^d]/g,"")),e={obj:new Date(e[0],e[1]-1,e[2],n.substring(8,10),0,0),format:k}):12===n.length?(void 0===k&&(k=v.context.attr("data").formatter.date.YmdHi()),e=v.date.strToDateStrArr(n,k.replace(/[^Y|^m|^d]/g,"")),e={obj:new Date(e[0],e[1]-1,e[2],n.substring(8,10),n.substring(10,12),0),format:k}):14<=n.length&&(void 0===k&&(k=v.context.attr("data").formatter.date.YmdHis()),e=v.date.strToDateStrArr(n,k.replace(/[^Y|^m|^d]/g,"")),e={obj:new Date(e[0],e[1]-1, +e[2],n.substring(8,10),n.substring(10,12),n.substring(12,14)),format:k});return e},format:function(n,k){var e=this.strToDate(n);return null!==e?e.obj.formatDate(void 0!==k?k:e.format):n},dateToTs:function(n){void 0===n&&(n=new Date);return Math.round(n.getTime()/1E3)},tsToDate:function(n){return void 0===n?new Date:new Date(n)},dateList:function(n,k){var e=[],f=new Date(n,k-1,0),p=new Date(n,k,0);n=new Date(n,k+1,0);var r=p.getDate(),x=f.getDate();k=f.getDay();var t=[];if(6!==k)for(k=x-k;k<=x;k++)f.setDate(k), +t.push(new Date(f.getFullYear(),f.getMonth(),f.getDate(),0));for(k=1;k<=r;k++)p.setDate(k),t.push(new Date(p.getFullYear(),p.getMonth(),p.getDate(),0)),0k&&(k=n.indexOf(".NET"));var e=n.match(/Trident\/(\d.\d)/i);return 0>k?0:void 0===e?parseInt(n.substring(k+ +5,n.indexOf(".",k))):parseInt(e[1])+4},is:function(n){if(H.opera||0<=navigator.userAgent.indexOf(" OPR/"))return"opera"===n;if("undefined"!==typeof InstallTrigger)return"firefox"===n;if("ios"!==n&&navigator.userAgent.match(/^((?!chrome|android|crios|fxios).)*safari/i))return"safari"===n;if(!H.chrome||H.opera||0<=navigator.userAgent.indexOf(" OPR/")){if(0
');g("body").append(n);var k=g(n).innerWidth(),e=g("div",n).innerWidth();g(n).remove();return k-e}},message:{replaceMsgVars:function(n, +k){if(void 0!==k)for(var e=0;eg.inArray(p[k],g(e).map(function(){return this[k]}).get())&&e.push(p):0>g.inArray(p,e)&&e.push(p)});return e}},json:{mapFromKeys:function(n){if(1f.indexOf(this[e])&& +n.push(this)});return n},format:function(n,k){if(v.isEmptyObject(n))return null;v.isString(n)&&(n=JSON.parse(n));void 0===k&&(k=4);return JSON.stringify(n,void 0,k)}},event:{isNumberRelatedKeys:function(n){n=n?n:H.event;var k=[97,65,99,67,118,86,115,83,112,80],e=[8,9,27,13,35,36,37,39,46,45];var f=n.keyCode?n.keyCode:n.which?n.which:n.charCode;return!f||48<=f&&57>=f||96<=f&&105>=f?!0:n.ctrlKey&&-1!==k.indexOf(f)||-1!==navigator.userAgent.indexOf("Firefox")&&(n.ctrlKey&&n.keyCode&&0=f||n.keyCode&&0=f)?!0:-1!==e.indexOf(f)?-1===navigator.userAgent.indexOf("Firefox")||39!=f&&45!=f&&46!=f?!(n.shiftKey&&(35==f||36==f||37==f)):void 0!==n.keyCode&&0=g(this).scrollTop()?!1:!(0> +k&&g(this).scrollTop()>=this.scrollHeight-g(this).height())})},getMaxDuration:function(n,k){return!n.css(k)||n.css(k).startsWith("0")?0:Math.max.apply(void 0,g(n.css(k).split(",")).map(function(){return-1t&&(t+=1E3);1===String(t).length&&(t="00"+t);2===String(t).length&&(t="0"+t);return t},c:function(){return this.Y()+"-"+this.m()+"-"+this.d()+"T"+this.H()+":"+this.i()+":"+this.s()+this.P()},d:function(){var t=String(this.j());return 1===t.length?"0"+t:t},D:function(){return e[x.getDay()]},F:function(){return p[x.getMonth()]},g:function(){return 0===x.getHours()?12:12x.getTimezoneOffset()?"+"+w+t:"-"+w+t},P:function(){var t=this.O();return t.substr(0,3)+":"+t.substr(3,2)},r:function(){return this.D()+ +", "+this.d()+" "+this.M()+" "+this.Y()+" "+this.H()+":"+this.i()+":"+this.s()+" "+this.O()},s:function(){var t=String(x.getSeconds());return 1===t.length?"0"+t:t},S:function(){switch(x.getDate()){case 1:return"st";case 2:return"nd";case 3:return"rd";case 21:return"st";case 22:return"nd";case 23:return"rd";case 31:return"st";default:return"th"}},t:function(){return 1===this.L()&&2===this.n()?29:[null,31,28,31,30,31,30,31,31,30,31,30,31][this.n()]},U:function(){return Math.round(x.getTime()/1E3)}, +w:function(){return x.getDay()},W:function(){var t=this.N(),w=this.z(),D=364+this.L()-w;if(2>=D&&t<=3-D)return 1;if(2>=w&&5<=t)return(new Date(this.Y()-1,11,31)).formatDate("W");t=(new Date(this.Y(),0,1)).getDay();t=0!==t?t-1:6;return 3>=t?1+Math.floor((w+t)/7):1+Math.floor((w-(7-t))/7)},y:function(){var t=String(this.Y());return t.substring(t.length-2,t.length)},Y:function(){if(x.getFullYear){var t=(new Date("January 1 2001 00:00:00 +0000")).getFullYear();if(2001===t)return x.getFullYear()}t=x.getYear(); +t%=100;return t+(38>t?2E3:1900)},z:function(){var t="January 1 "+this.Y()+" 00:00:00 GMT"+this.O();t=new Date(t);t=x.getTime()-t.getTime();return Math.floor(t/1E3/60/60/24)},Z:function(){return-60*x.getTimezoneOffset()}},x=n?new Date(n):this;v=v.split("");for(n=0;nw.length)break}this.allowPartial&&!e&&(p="");this.allowPartial&&(this.nextValidChar=p.lengtht.length)n=void 0!==k&&"round"===k?String(Math.round(Number(n.substring(0,t.length+1))/10)): void 0!==k&&"ceil"===k?String(Math.ceil(Number(n.substring(0,t.length+1))/10)):String(Math.floor(Number(n.substring(0,t.length+1))/10));else for(;n.length