fineui是帆软报表和BI产品线所使用的前端框架。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.6 MiB

/*! fineui 2019-10-25 18:38:13 */
5 years ago
function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}!function(r){function i(t){if(e[t])return e[t].exports;var n=e[t]={i:t,l:!1,exports:{}};return r[t].call(n.exports,n,n.exports,i),n.l=!0,n.exports}var e={};i.m=r,i.c=e,i.d=function(t,n,r){i.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(n,t){if(1&t&&(n=i(n)),8&t)return n;if(4&t&&"object"==typeof n&&n&&n.__esModule)return n;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:n}),2&t&&"string"!=typeof n)for(var e in n)i.d(r,e,function(t){return n[t]}.bind(null,e));return r},i.n=function(t){var n=t&&t.__esModule?function(){return t["default"]}:function(){return t};return i.d(n,"a",n),n},i.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},i.p="",i(i.s=121)}([function(t,n,r){var d=r(1),y=r(7),g=r(14),m=r(11),b=r(17),w="prototype",x=function(t,n,r){var e,i,o,u,c=t&x.F,f=t&x.G,a=t&x.S,s=t&x.P,l=t&x.B,h=f?d:a?d[n]||(d[n]={}):(d[n]||{})[w],p=f?y:y[n]||(y[n]={}),v=p[w]||(p[w]={});for(e in f&&(r=n),r)o=((i=!c&&h&&void 0!==h[e])?h:r)[e],u=l&&i?b(o,d):s&&"function"==typeof o?b(Function.call,o):o,h&&m(h,e,o,t&x.U),p[e]!=o&&g(p,e,u),s&&v[e]!=o&&(v[e]=o)};d.core=y,x.F=1,x.G=2,x.S=4,x.P=8,x.B=16,x.W=32,x.U=64,x.R=128,t.exports=x},function(t,n){var r=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(t,n){t.exports=function(t){try{return!!t()}catch(n){return!0}}},function(t,n,r){var e=r(4);t.exports=function(t){if(!e(t))throw TypeError(t+" is not an object!");return t}},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n,r){var e=r(48)("wks"),i=r(29),o=r(1).Symbol,u="function"==typeof o;(t.exports=function(t){return e[t]||(e[t]=u&&o[t]||(u?o:i)("Symbol."+t))}).store=e},function(t,n,r){var e=r(19),i=Math.min;t.exports=function(t){return 0<t?i(e(t),9007199254740991):0}},function(t,n){var r=t.exports={version:"2.6.9"};"number"==typeof __e&&(__e=r)},function(t,n,r){t.exports=!r(2)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,n,r){var i=r(3),o=r(88),u=r(26),c=Object.defineProperty;n.f=r(8)?Object.defineProperty:function(t,n,r){if(i(t),n=u(n,!0),i(r),o)try{return c(t,n,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(t[n]=r.value),t}},function(t,n,r){var e=r(24);t.exports=function(t){return Object(e(t))}},function(t,n,r){var o=r(1),u=r(14),c=r(13),f=r(29)("src"),e=r(126),i="toString",a=(""+e).split(i);r(7).inspectSource=function(t){return e.call(t)},(t.exports=function(t,n,r,e){var i="function"==typeof r;i&&(c(r,"name")||u(r,"name",n)),t[n]!==r&&(i&&(c(r,f)||u(r,f,t[n]?""+t[n]:a.join(String(n)))),t===o?t[n]=r:e?t[n]?t[n]=r:u(t,n,r):(delete t[n],u(t,n,r)))})(Function.prototype,i,function(){return"function"==typeof this&&this[f]||e.call(this)})},function(t,n,r){function e(t,n,r,e){var i=String(u(t)),o="<"+n;return""!==r&&(o+=" "+r+'="'+String(e).replace(c,"&quot;")+'"'),o+">"+i+"</"+n+">"}var i=r(0),o=r(2),u=r(24),c=/"/g;t.exports=function(n,t){var r={};r[n]=t(e),i(i.P+i.F*o(function(){var t=""[n]('"');return t!==t.toLowerCase()||3<t.split('"').length}),"String",r)}},function(t,n){var r={}.hasOwnProperty;t.exports=function(t,n){return r.call(t,n)}},function(t,n,r){var e=r(9),i=r(28);t.exports=r(8)?function(t,n,r){return e.f(t,n,i(1,r))}:function(t,n,r){return t[n]=r,t}},function(t,n,r){var e=r(44),i=r(24);t.exports=function(t){return e(i(t))}},function(t,n,r){"use strict";var e=r(2);t.exports=function(t,n){return!!t&&e(function(){n?t.call(null,function(){},1):t.call(null)})}},function(t,n,r){var o=r(18);t.exports=function(e,i,t){if(o(e),void 0===i)return e;switch(t){case 1:return fu
case 4:return e?t(n[0],n[1],n[2],n[3]):t.call(r,n[0],n[1],n[2],n[3])}return t.apply(r,n)}},function(t,n,r){var e=r(1).parseInt,i=r(39).trim,o=r(66),u=/^[-+]?0[xX]/;t.exports=8!==e(o+"08")||22!==e(o+"0x16")?function(t,n){var r=i(String(t),3);return e(r,n>>>0||(u.test(r)?16:10))}:e},function(t,n,r){var e=r(1).parseFloat,i=r(39).trim;t.exports=1/e(r(66)+"-0")!=-(1/0)?function(t){var n=i(String(t),3),r=e(n);return 0===r&&"-"==n.charAt(0)?-0:r}:e},function(t,n,r){var e=r(23);t.exports=function(t,n){if("number"!=typeof t&&"Number"!=e(t))throw TypeError(n);return+t}},function(t,n,r){var e=r(4),i=Math.floor;t.exports=function(t){return!e(t)&&isFinite(t)&&i(t)===t}},function(t,n){t.exports=Math.log1p||function(t){return-1e-8<(t=+t)&&t<1e-8?t-t*t/2:Math.log(1+t)}},function(t,n,r){"use strict";var e=r(33),i=r(28),o=r(38),u={};r(14)(u,r(5)("iterator"),function(){return this}),t.exports=function(t,n,r){t.prototype=e(u,{next:i(1,r)}),o(t,n+" Iterator")}},function(t,n,r){var u=r(3);t.exports=function(t,n,r,e){try{return e?n(u(r)[0],r[1]):n(r)}catch(o){var i=t["return"];throw void 0!==i&&u(i.call(t)),o}}},function(t,n,r){var e=r(216);t.exports=function(t,n){return new(e(t))(n)}},function(t,n,r){var s=r(18),l=r(10),h=r(44),p=r(6);t.exports=function(t,n,r,e,i){s(n);var o=l(t),u=h(o),c=p(o.length),f=i?c-1:0,a=i?-1:1;if(r<2)for(;;){if(f in u){e=u[f],f+=a;break}if(f+=a,i?f<0:c<=f)throw TypeError("Reduce of empty array with no initial value")}for(;i?0<=f:f<c;f+=a)f in u&&(e=n(e,u[f],f,o));return e}},function(t,n,r){"use strict";var a=r(10),s=r(32),l=r(6);t.exports=[].copyWithin||function(t,n){var r=a(this),e=l(r.length),i=s(t,e),o=s(n,e),u=2<arguments.length?arguments[2]:void 0,c=Math.min((void 0===u?e:s(u,e))-o,e-i),f=1;for(o<i&&i<o+c&&(f=-1,o+=c-1,i+=c-1);0<c--;)o in r?r[i]=r[o]:delete r[i],i+=f,o+=f;return r}},function(t,n){t.exports=function(t,n){return{value:n,done:!!t}}},function(t,n,r){"use strict";var e=r(81);r(0)({target:"RegExp",proto:!0,forced:e!==/./.exec},{exec:e})},function(t,n,r){r(8)&&"g"!=/./g.flags&&r(9).f(RegExp.prototype,"flags",{configurable:!0,get:r(53)})},function(t,n,e){"use strict";function i(){}function h(t){var n;return!(!y(t)||"function"!=typeof(n=t.then))&&n}function o(l,r){if(!l._n){l._n=!0;var e=l._c;S(function(){for(var a=l._v,s=1==l._s,t=0,n=function(t){var n,r,e,i=s?t.ok:t.fail,o=t.resolve,u=t.reject,c=t.domain;try{i?(s||(2==l._h&&D(l),l._h=1),!0===i?n=a:(c&&c.enter(),n=i(a),c&&(c.exit(),e=!0)),n===t.promise?u(M("Promise-chain cycle")):(r=h(n))?r.call(n,o,u):o(n)):u(a)}catch(f){c&&!e&&c.exit(),u(f)}};e.length>t;)n(e[t++]);l._c=[],l._n=!1,r&&!l._h&&k(l)})}}function u(t){var n=this;n._d||(n._d=!0,(n=n._w||n)._v=t,n._s=2,n._a||(n._a=n._c.slice()),o(n,!0))}var r,c,f,a,s=e(30),l=e(1),p=e(17),v=e(46),d=e(0),y=e(4),g=e(18),m=e(42),b=e(56),w=e(47),x=e(83).set,S=e(236)(),_=e(111),E=e(237),O=e(57),P=e(112),F="Promise",M=l.TypeError,A=l.process,j=A&&A.versions,I=j&&j.v8||"",T=l[F],N="process"==v(A),L=c=_.f,R=!!function(){try{var t=T.resolve(1),n=(t.constructor={})[e(5)("species")]=function(t){t(i,i)};return(N||"function"==typeof PromiseRejectionEvent)&&t.then(i)instanceof n&&0!==I.indexOf("6.6")&&-1===O.indexOf("Chrome/66")}catch(r){}}(),k=function(o){x.call(l,function(){var t,n,r,e=o._v,i=C(o);if(i&&(t=E(function(){N?A.emit("unhandledRejection",e,o):(n=l.onunhandledrejection)?n({promise:o,reason:e}):(r=l.console)&&r.error&&r.error("Unhandled promise rejection",e)}),o._h=N||C(o)?2:1),o._a=void 0,i&&t.e)throw t.v})},C=function(t){return 1!==t._h&&0===(t._a||t._c).length},D=function(n){x.call(l,function(){var t;N?A.emit("rejectionHandled",n):(t=l.onrejectionhandled)&&t({promise:n,reason:n._v})})},U=function(r){var e,i=this;if(!i._d){i._d=!0,i=i._w||i;try{if(i===r)throw M("Promise can't be resolved itself");(e=h(r))?S(function(){var t={_w:i,_d:!1};try{e.call(r,p(U,t,1),p(u,t,1))}catch(n){u.call(t,n)}}):(i._v=r,i._s=1,o(i,!1))}catch(t){u.call({_w:i,_d:!1},t)}}};R||(T=function(t){m(this,T,F,"_h"),g(t),r.call(this);try{t(p(U,this,1),p(u,this,1))}catch(n){u.call(this,n)}},(r=function(t){this._c=[],this._a=void 0,this._s=0,thi
r(2)(function(){return"/a/b"!=f.call({source:"a",flags:"b"})})?e(function(){var t=i(this);return"/".concat(t.source,"/","flags"in t?t.flags:!u&&t instanceof RegExp?o.call(t):void 0)}):f.name!=c&&e(function(){return f.call(this)})},function(t,n,r){"use strict";var l=r(3),h=r(6),p=r(82),v=r(54);r(55)("match",1,function(e,i,a,s){return[function(t){var n=e(this),r=void 0==t?void 0:t[i];return void 0!==r?r.call(t,n):new RegExp(t)[i](String(n))},function(t){var n=s(a,t,this);if(n.done)return n.value;var r=l(t),e=String(this);if(!r.global)return v(r,e);for(var i,o=r.unicode,u=[],c=r.lastIndex=0;null!==(i=v(r,e));){var f=String(i[0]);""===(u[c]=f)&&(r.lastIndex=p(e,h(r.lastIndex),o)),c++}return 0===c?null:u}]})},function(t,n,r){"use strict";var E=r(3),e=r(10),O=r(6),P=r(19),F=r(82),M=r(54),A=Math.max,j=Math.min,h=Math.floor,p=/\$([$&`']|\d\d?|<[^>]*>)/g,v=/\$([$&`']|\d\d?)/g;r(55)("replace",2,function(i,o,x,S){function _(o,u,c,f,a,t){var s=c+o.length,l=f.length,n=v;return void 0!==a&&(a=e(a),n=p),x.call(t,n,function(t,n){var r;switch(n.charAt(0)){case"$":return"$";case"&":return o;case"`":return u.slice(0,c);case"'":return u.slice(s);case"<":r=a[n.slice(1,-1)];break;default:var e=+n;if(0==e)return t;if(l<e){var i=h(e/10);return 0===i?t:i<=l?void 0===f[i-1]?n.charAt(1):f[i-1]+n.charAt(1):t}r=f[e-1]}return void 0===r?"":r})}return[function(t,n){var r=i(this),e=void 0==t?void 0:t[o];return void 0!==e?e.call(t,r,n):x.call(String(r),t,n)},function(t,n){var r=S(x,t,this,n);if(r.done)return r.value;var e=E(t),i=String(this),o="function"==typeof n;o||(n=String(n));var u=e.global;if(u){var c=e.unicode;e.lastIndex=0}for(var f=[];;){var a=M(e,i);if(null===a)break;if(f.push(a),!u)break;""===String(a[0])&&(e.lastIndex=F(i,O(e.lastIndex),c))}for(var s,l="",h=0,p=0;p<f.length;p++){a=f[p];for(var v=String(a[0]),d=A(j(P(a.index),i.length),0),y=[],g=1;g<a.length;g++)y.push(void 0===(s=a[g])?s:String(s));var m=a.groups;if(o){var b=[v].concat(y,d,i);void 0!==m&&b.push(m);var w=String(n.apply(void 0,b))}else w=_(v,i,d,y,m,n);h<=d&&(l+=i.slice(h,d)+w,h=d+v.length)}return l+i.slice(h)}]})},function(t,n,r){"use strict";var f=r(3),a=r(94),s=r(54);r(55)("search",1,function(e,i,u,c){return[function(t){var n=e(this),r=void 0==t?void 0:t[i];return void 0!==r?r.call(t,n):new RegExp(t)[i](String(n))},function(t){var n=c(u,t,this);if(n.done)return n.value;var r=f(t),e=String(this),i=r.lastIndex;a(i,0)||(r.lastIndex=0);var o=s(r,e);return a(r.lastIndex,i)||(r.lastIndex=i),null===o?-1:o.index}]})},function(t,n,r){"use strict";var l=r(74),b=r(3),w=r(47),x=r(82),S=r(6),_=r(54),h=r(81),e=r(2),E=Math.min,p=[].push,u="split",v="length",d="lastIndex",O=4294967295,P=!e(function(){RegExp(O,"y")});r(55)("split",2,function(i,o,y,g){var m;return m="c"=="abbc"[u](/(b)*/)[1]||4!="test"[u](/(?:)/,-1)[v]||2!="ab"[u](/(?:ab)*/)[v]||4!="."[u](/(.?)(.?)/)[v]||1<"."[u](/()()/)[v]||""[u](/.?/)[v]?function(t,n){var r=String(this);if(void 0===t&&0===n)return[];if(!l(t))return y.call(r,t,n);for(var e,i,o,u=[],c=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),f=0,a=void 0===n?O:n>>>0,s=new RegExp(t.source,c+"g");(e=h.call(s,r))&&!(f<(i=s[d])&&(u.push(r.slice(f,e.index)),1<e[v]&&e.index<r[v]&&p.apply(u,e.slice(1)),o=e[0][v],f=i,u[v]>=a));)s[d]===e.index&&s[d]++;return f===r[v]?!o&&s.test("")||u.push(""):u.push(r.slice(f)),u[v]>a?u.slice(0,a):u}:"0"[u](void 0,0)[v]?function(t,n){return void 0===t&&0===n?[]:y.call(this,t,n)}:y,[function(t,n){var r=i(this),e=void 0==t?void 0:t[o];return void 0!==e?e.call(t,r,n):m.call(String(r),t,n)},function(t,n){var r=g(m,t,this,n,m!==y);if(r.done)return r.value;var e=b(t),i=String(this),o=w(e,RegExp),u=e.unicode,c=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(P?"y":"g"),f=new o(P?e:"^(?:"+e.source+")",c),a=void 0===n?O:n>>>0;if(0==a)return[];if(0===i.length)return null===_(f,i)?[i]:[];for(var s=0,l=0,h=[];l<i.length;){f.lastIndex=P?l:0;var p,v=_(f,P?i:i.slice(l));if(null===v||(p=E(S(f.lastIndex+(P?0:l)),i.length))===s)l=x(i,l,u);else{if(h.push(i.slice(s,l)),h.length===a)return h;for(var d=1;d<=v.length-1
this.fun=t,this.array=n}function d(){}var r,e,i=t.exports={};!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(t){r=o}try{e="function"==typeof clearTimeout?clearTimeout:u}catch(t){e=u}}();var f,a=[],s=!1,l=-1;i.nextTick=function(t){var n=new Array(arguments.length-1);if(1<arguments.length)for(var r=1;r<arguments.length;r++)n[r-1]=arguments[r];a.push(new v(t,n)),1!==a.length||s||c(p)},v.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=d,i.addListener=d,i.once=d,i.off=d,i.removeListener=d,i.removeAllListeners=d,i.emit=d,i.prependListener=d,i.prependOnceListener=d,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(i){"object"===("undefined"==typeof window?"undefined":r(window))&&(e=window)}t.exports=e}]);var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,null==_global.BI&&(_global.BI={prepares:[]}),null==_global.BI.prepares&&(_global.BI.prepares=[]),Array.prototype.indexOf||(Array.prototype.indexOf=function(searchElement,fromIndex){var k;if(null==this)throw new TypeError('"this" is null or not defined');var o=Object(this),len=o.length>>>0;if(0===len)return-1;var n=0|fromIndex;if(n>=len)return-1;for(k=Math.max(n>=0?n:len-Math.abs(n),0);k<len;){if(k in o&&o[k]===searchElement)return k;k++}return-1}),Array.prototype.lastIndexOf||(Array.prototype.lastIndexOf=function(searchElement){"use strict";if(void 0===this||null===this)throw new TypeError;var n,k,t=Object(this),len=t.length>>>0;if(0===len)return-1;for(n=len-1,arguments.length>1&&(n=Number(arguments[1]),n!=n?n=0:0!=n&&n!=1/0&&n!=-(1/0)&&(n=(n>0||-1)*Math.floor(Math.abs(n)))),k=n>=0?Math.min(n,len-1):len-Math.abs(n);k>=0;k--)if(k in t&&t[k]===searchElement)return k;return-1}),_global.console=_global.console||function(){var c={};return c.log=c.warn=c.debug=c.info=c.error=c.time=c.dir=c.profile=c.clear=c.exception=c.trace=c.assert=function(){},c}(),_global.localStorage||(_global.localStorage={items:{},setItem:function(k,v){BI.Cache.addCookie(k,v)},getItem:function(k){return BI.Cache.getCookie(k)},removeItem:function(k){BI.Cache.deleteCookie(k)},key:function(){},clear:function(){this.items={}}}),Object.keys||(Object.keys=function(o){if(o!==Object(o))throw new TypeError("Object.keys called on a non-object");var falsy,skipArray={__ob__:falsy,$accessors:falsy,$vbthis:falsy,$vbsetter:falsy},k=[],p;for(p in o)p in skipArray||Object.prototype.hasOwnProperty.call(o,p)&&k.push(p);return k}),Array.isArray||(Array.isArray=function(arg){return"[object Array]"===Object.prototype.toString.call(arg)}),"function"!=typeof Object.getPrototypeOf&&(Object.getPrototypeOf="".__proto__===String.prototype?function(object){return object.__proto__}:function(object){return object.constructor.prototype}),Date.now||(Date.now=function(){return(new Date).valueOf()}),"undefined"!=typeof Set&&Set.toString().match(/native code/)||(Set=function(){this.set={}},Set.prototype.has=function(key){return void 0!==this.set[key]},Set.prototype.add=function(key){this.set[key]=1},Set.prototype.clear=function(){this.set={}}),!function(window){var ua=window.navigator.userAgent.toLowerCase(),reg=/msie/;if(reg.test(ua)){var _sort=Array.prototype.sort;Array.prototype.sort=function(fn){if(fn&&"function"==typeof fn){if(this.length<2)return this;for(var i=0,j=i+1,l=this.length,tmp,r=!1,t=0;i<l;i++)for(j=i+1;j<l;j++)t=fn.call(this,this[i],this[j]),r=("number"==typeof t?t:t?1:0)>0,r===!0&&(tmp=this[i],this[i]=this[j],this[j]=tmp);return this}return _sort.
null==object||delete object[toKey(last(path))]}function baseWrapperValue(value,actions){var result=value;return result instanceof LazyWrapper&&(result=result.value()),arrayReduce(actions,function(result,action){return action.func.apply(action.thisArg,arrayPush([result],action.args))},result)}function baseZipObject(props,values,assignFunc){for(var index=-1,length=props.length,valsLength=values.length,result={};++index<length;){var value=index<valsLength?values[index]:undefined;assignFunc(result,props[index],value)}return result}function castArrayLikeObject(value){return isArrayLikeObject(value)?value:[]}function castPath(value,object){return isArray(value)?value:isKey(value,object)?[value]:stringToPath(toString(value))}function castSlice(array,start,end){var length=array.length;return end=end===undefined?length:end,!start&&end>=length?array:baseSlice(array,start,end)}function cloneBuffer(buffer,isDeep){if(isDeep)return buffer.slice();var length=buffer.length,result=allocUnsafe?allocUnsafe(length):new buffer.constructor(length);return buffer.copy(result),result}function cloneArrayBuffer(arrayBuffer){var result=new arrayBuffer.constructor(arrayBuffer.byteLength);return new Uint8Array(result).set(new Uint8Array(arrayBuffer)),result}function cloneDataView(dataView,isDeep){var buffer=isDeep?cloneArrayBuffer(dataView.buffer):dataView.buffer;return new dataView.constructor(buffer,dataView.byteOffset,dataView.byteLength)}function cloneRegExp(regexp){var result=new regexp.constructor(regexp.source,reFlags.exec(regexp));return result.lastIndex=regexp.lastIndex,result}function cloneSymbol(symbol){return symbolValueOf?Object(symbolValueOf.call(symbol)):{}}function cloneTypedArray(typedArray,isDeep){var buffer=isDeep?cloneArrayBuffer(typedArray.buffer):typedArray.buffer;return new typedArray.constructor(buffer,typedArray.byteOffset,typedArray.length)}function compareAscending(value,other){if(value!==other){var valIsDefined=value!==undefined,valIsNull=null===value,valIsReflexive=value===value,valIsSymbol=isSymbol(value),othIsDefined=other!==undefined,othIsNull=null===other,othIsReflexive=other===other,othIsSymbol=isSymbol(other);if(!othIsNull&&!othIsSymbol&&!valIsSymbol&&value>other||valIsSymbol&&othIsDefined&&othIsReflexive&&!othIsNull&&!othIsSymbol||valIsNull&&othIsDefined&&othIsReflexive||!valIsDefined&&othIsReflexive||!valIsReflexive)return 1;if(!valIsNull&&!valIsSymbol&&!othIsSymbol&&value<other||othIsSymbol&&valIsDefined&&valIsReflexive&&!valIsNull&&!valIsSymbol||othIsNull&&valIsDefined&&valIsReflexive||!othIsDefined&&valIsReflexive||!othIsReflexive)return-1}return 0}function compareMultiple(object,other,orders){for(var index=-1,objCriteria=object.criteria,othCriteria=other.criteria,length=objCriteria.length,ordersLength=orders.length;++index<length;){var result=compareAscending(objCriteria[index],othCriteria[index]);if(result){if(index>=ordersLength)return result;var order=orders[index];return result*("desc"==order?-1:1)}}return object.index-other.index}function composeArgs(args,partials,holders,isCurried){for(var argsIndex=-1,argsLength=args.length,holdersLength=holders.length,leftIndex=-1,leftLength=partials.length,rangeLength=nativeMax(argsLength-holdersLength,0),result=Array(leftLength+rangeLength),isUncurried=!isCurried;++leftIndex<leftLength;)result[leftIndex]=partials[leftIndex];for(;++argsIndex<holdersLength;)(isUncurried||argsIndex<argsLength)&&(result[holders[argsIndex]]=args[argsIndex]);for(;rangeLength--;)result[leftIndex++]=args[argsIndex++];return result}function composeArgsRight(args,partials,holders,isCurried){for(var argsIndex=-1,argsLength=args.length,holdersIndex=-1,holdersLength=holders.length,rightIndex=-1,rightLength=partials.length,rangeLength=nativeMax(argsLength-holdersLength,0),result=Array(rangeLength+rightLength),isUncurried=!isCurried;++argsIndex<rangeLength;)result[argsIndex]=args[argsIndex];for(var offset=argsIndex;++rightIndex<rightLength;)result[offset+rightIndex]=partials[rightIndex];for(;++holdersIndex<holdersLength;)(isUncurried||argsIndex<argsLength)&&(result[offset+holders[holdersIndex]]=ar
}function debounced(){var time=now(),isInvoking=shouldInvoke(time);if(lastArgs=arguments,lastThis=this,lastCallTime=time,isInvoking){if(timerId===undefined)return leadingEdge(lastCallTime);if(maxing)return timerId=setTimeout(timerExpired,wait),invokeFunc(lastCallTime)}return timerId===undefined&&(timerId=setTimeout(timerExpired,wait)),result}var lastArgs,lastThis,maxWait,result,timerId,lastCallTime,lastInvokeTime=0,leading=!1,maxing=!1,trailing=!0;if("function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);return wait=toNumber(wait)||0,isObject(options)&&(leading=!!options.leading,maxing="maxWait"in options,maxWait=maxing?nativeMax(toNumber(options.maxWait)||0,wait):maxWait,trailing="trailing"in options?!!options.trailing:trailing),debounced.cancel=cancel,debounced.flush=flush,debounced}function memoize(func,resolver){if("function"!=typeof func||null!=resolver&&"function"!=typeof resolver)throw new TypeError(FUNC_ERROR_TEXT);var memoized=function(){var args=arguments,key=resolver?resolver.apply(this,args):args[0],cache=memoized.cache;if(cache.has(key))return cache.get(key);var result=func.apply(this,args);return memoized.cache=cache.set(key,result)||cache,result};return memoized.cache=new(memoize.Cache||MapCache),memoized}function negate(predicate){if("function"!=typeof predicate)throw new TypeError(FUNC_ERROR_TEXT);return function(){var args=arguments;switch(args.length){case 0:return!predicate.call(this);case 1:return!predicate.call(this,args[0]);case 2:return!predicate.call(this,args[0],args[1]);case 3:return!predicate.call(this,args[0],args[1],args[2])}return!predicate.apply(this,args)}}function once(func){return before(2,func)}function rest(func,start){if("function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);return start=start===undefined?start:toInteger(start),baseRest(func,start)}function throttle(func,wait,options){var leading=!0,trailing=!0;if("function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);return isObject(options)&&(leading="leading"in options?!!options.leading:leading,trailing="trailing"in options?!!options.trailing:trailing),debounce(func,wait,{leading:leading,maxWait:wait,trailing:trailing})}function clone(value){return baseClone(value,CLONE_SYMBOLS_FLAG)}function cloneDeep(value){return baseClone(value,CLONE_DEEP_FLAG|CLONE_SYMBOLS_FLAG)}function eq(value,other){return value===other||value!==value&&other!==other}function isArrayLike(value){return null!=value&&isLength(value.length)&&!isFunction(value)}function isArrayLikeObject(value){return isObjectLike(value)&&isArrayLike(value)}function isBoolean(value){return value===!0||value===!1||isObjectLike(value)&&baseGetTag(value)==boolTag}function isEmpty(value){if(null==value)return!0;if(isArrayLike(value)&&(isArray(value)||"string"==typeof value||"function"==typeof value.splice||isBuffer(value)||isTypedArray(value)||isArguments(value)))return!value.length;var tag=getTag(value);if(tag==mapTag||tag==setTag)return!value.size;if(isPrototype(value))return!baseKeys(value).length;for(var key in value)if(hasOwnProperty.call(value,key))return!1;return!0}function isEqual(value,other){return baseIsEqual(value,other)}function isFinite(value){return"number"==typeof value&&nativeIsFinite(value)}function isFunction(value){if(!isObject(value))return!1;var tag=baseGetTag(value);return tag==funcTag||tag==genTag||tag==asyncTag||tag==proxyTag}function isLength(value){return"number"==typeof value&&value>-1&&value%1==0&&value<=MAX_SAFE_INTEGER}function isObject(value){var type=typeof value;return null!=value&&("object"==type||"function"==type)}function isObjectLike(value){return null!=value&&"object"==typeof value}function isNaN(value){return isNumber(value)&&value!=+value}function isNull(value){return null===value}function isNumber(value){return"number"==typeof value||isObjectLike(value)&&baseGetTag(value)==numberTag}function isPlainObject(value){if(!isObjectLike(value)||baseGetTag(value)!=objectTag)return!1;var proto=getPrototype(value);if(null===proto)return!0;var Ctor=hasOwnProperty.call(proto,"constructor")&&proto.constructor;return"function"==typeof C
if(retUnwrapped&&!this.__chain__){var value=this.value();return func.apply(isArray(value)?value:[],args)}return this[chainName](function(value){return func.apply(isArray(value)?value:[],args)})}}),baseForOwn(LazyWrapper.prototype,function(func,methodName){var lodashFunc=lodash[methodName];if(lodashFunc){var key=lodashFunc.name+"",names=realNames[key]||(realNames[key]=[]);names.push({name:methodName,func:lodashFunc})}}),realNames[createHybrid(undefined,WRAP_BIND_KEY_FLAG).name]=[{name:"wrapper",func:undefined}],LazyWrapper.prototype.clone=lazyClone,LazyWrapper.prototype.reverse=lazyReverse,LazyWrapper.prototype.value=lazyValue,lodash.prototype.first=lodash.prototype.head,symIterator&&(lodash.prototype[symIterator]=wrapperToIterator),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(root._=lodash,define(function(){return lodash})):freeModule?((freeModule.exports=lodash)._=lodash,freeExports._=lodash):root._=lodash}.call(this);var _global;_global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,_global.BI||(_global.BI={}),!function(undefined){var traverse=function(func,context){return function(value,key,obj){return func.call(context,key,value,obj)}},_apply=function(name){return function(){return _[name].apply(_,arguments)}},_applyFunc=function(name){return function(){var args=Array.prototype.slice.call(arguments,0);return args[1]=_.isFunction(args[1])?traverse(args[1],args[2]):args[1],_[name].apply(_,args)}};_.extend(BI,{assert:function(v,is){if(this.isFunction(is)){if(is(v))return!0;throw new Error(v+" error")}if(this.isArray(is)||(is=[is]),!this.deepContains(is,v))throw new Error(v+" error")},warn:function(message){console.warn(message)},UUID:function(){for(var f=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],str="",i=0;i<16;i++){var r=parseInt(f.length*Math.random(),10);str+=f[r]}return str},isWidget:function(widget){return widget instanceof BI.Widget||BI.View&&widget instanceof BI.View},createWidgets:function(items,options,context){if(!BI.isArray(items))throw new Error("cannot create Widgets");return BI.isWidget(options)?(context=options,options={}):options||(options={}),BI.map(BI.flatten(items),function(i,item){return BI.createWidget(item,BI.deepClone(options))})},createItems:function(data,innerAttr,outerAttr){return innerAttr=BI.isArray(innerAttr)?innerAttr:BI.makeArray(BI.flatten(data).length,innerAttr||{}),outerAttr=BI.isArray(outerAttr)?outerAttr:BI.makeArray(BI.flatten(data).length,outerAttr||{}),BI.map(data,function(i,item){return BI.isArray(item)?BI.createItems(item,innerAttr,outerAttr):item instanceof BI.Widget?BI.extend({},innerAttr.shift(),outerAttr.shift(),{type:null,el:item}):innerAttr[0]instanceof BI.Widget?(outerAttr.shift(),BI.extend({},item,{el:innerAttr.shift()})):item.el instanceof BI.Widget||BI.View&&item.el instanceof BI.View?(innerAttr.shift(),BI.extend({},outerAttr.shift(),{type:null},item)):item.el?BI.extend({},outerAttr.shift(),item,{el:BI.extend({},innerAttr.shift(),item.el)}):BI.extend({},outerAttr.shift(),{el:BI.extend({},innerAttr.shift(),item)})})},packageItems:function(items,layouts){for(var i=layouts.length-1;i>=0;i--)items=BI.map(items,function(k,it){return BI.extend({},layouts[i],{items:[BI.extend({},layouts[i].el,{el:it})]})});return items},formatEL:function(obj){return obj&&!obj.type&&obj.el?obj:{el:obj}},stripEL:function(obj){return obj.type&&obj||obj.el||obj},trans2Element:function(widgets){return BI.map(widgets,function(i,wi){return wi.element})}}),_.each(["where","findWhere","invoke","pluck","shuffle","sample","toArray","size"],function(name){BI[name]=_apply(name)}),_.each(["get","each","map","reduce","reduceRight","find","filter","reject","every","all","some","any","max","min","sortBy","groupBy","indexBy","countBy","partition","clamp"],function(name){"any"===name?BI[name]=_applyFunc("some"):BI[name]=_applyFunc(name)}),_.extend(BI,{count:function(from,to,predicate){var t;if(predicate)for(t=from;t<to;t++)predicate(t);return to-from},inverse:function(from,to,predicate){return BI.count(to,from
return instance.init.apply(instance,arguments),instance},init:function(){},mixIn:function(properties){for(var propertyName in properties)properties.hasOwnProperty(propertyName)&&(this[propertyName]=properties[propertyName]);properties.hasOwnProperty("toString")&&(this.toString=properties.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),WordArray=C_lib.WordArray=Base.extend({init:function(words,sigBytes){words=this.words=words||[],sigBytes!=undefined?this.sigBytes=sigBytes:this.sigBytes=4*words.length},toString:function(encoder){return(encoder||Hex).stringify(this)},concat:function(wordArray){var thisWords=this.words,thatWords=wordArray.words,thisSigBytes=this.sigBytes,thatSigBytes=wordArray.sigBytes;if(this.clamp(),thisSigBytes%4)for(var i=0;i<thatSigBytes;i++){var thatByte=thatWords[i>>>2]>>>24-i%4*8&255;thisWords[thisSigBytes+i>>>2]|=thatByte<<24-(thisSigBytes+i)%4*8}else if(thatWords.length>65535)for(var i=0;i<thatSigBytes;i+=4)thisWords[thisSigBytes+i>>>2]=thatWords[i>>>2];else thisWords.push.apply(thisWords,thatWords);return this.sigBytes+=thatSigBytes,this},clamp:function(){var words=this.words,sigBytes=this.sigBytes;words[sigBytes>>>2]&=4294967295<<32-sigBytes%4*8,words.length=Math.ceil(sigBytes/4)},clone:function(){var clone=Base.clone.call(this);return clone.words=this.words.slice(0),clone},random:function(nBytes){for(var words=[],i=0;i<nBytes;i+=4)words.push(4294967296*Math.random()|0);return new WordArray.init(words,nBytes)}}),C_enc=C.enc={},Hex=C_enc.Hex={stringify:function(wordArray){for(var words=wordArray.words,sigBytes=wordArray.sigBytes,hexChars=[],i=0;i<sigBytes;i++){var bite=words[i>>>2]>>>24-i%4*8&255;hexChars.push((bite>>>4).toString(16)),hexChars.push((15&bite).toString(16))}return hexChars.join("")},parse:function(hexStr){for(var hexStrLength=hexStr.length,words=[],i=0;i<hexStrLength;i+=2)words[i>>>3]|=parseInt(hexStr.substr(i,2),16)<<24-i%8*4;return new WordArray.init(words,hexStrLength/2)}},Latin1=C_enc.Latin1={stringify:function(wordArray){for(var words=wordArray.words,sigBytes=wordArray.sigBytes,latin1Chars=[],i=0;i<sigBytes;i++){var bite=words[i>>>2]>>>24-i%4*8&255;latin1Chars.push(String.fromCharCode(bite))}return latin1Chars.join("")},parse:function(latin1Str){for(var latin1StrLength=latin1Str.length,words=[],i=0;i<latin1StrLength;i++)words[i>>>2]|=(255&latin1Str.charCodeAt(i))<<24-i%4*8;return new WordArray.init(words,latin1StrLength)}},Utf8=C_enc.Utf8={stringify:function(wordArray){try{return decodeURIComponent(escape(Latin1.stringify(wordArray)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(utf8Str){return Latin1.parse(unescape(encodeURIComponent(utf8Str)))}},BufferedBlockAlgorithm=C_lib.BufferedBlockAlgorithm=Base.extend({reset:function(){this._data=new WordArray.init,this._nDataBytes=0},_append:function(data){"string"==typeof data&&(data=Utf8.parse(data)),this._data.concat(data),this._nDataBytes+=data.sigBytes},_process:function(doFlush){var data=this._data,dataWords=data.words,dataSigBytes=data.sigBytes,blockSize=this.blockSize,blockSizeBytes=4*blockSize,nBlocksReady=dataSigBytes/blockSizeBytes;nBlocksReady=doFlush?Math.ceil(nBlocksReady):Math.max((0|nBlocksReady)-this._minBufferSize,0);var nWordsReady=nBlocksReady*blockSize,nBytesReady=Math.min(4*nWordsReady,dataSigBytes);if(nWordsReady){for(var offset=0;offset<nWordsReady;offset+=blockSize)this._doProcessBlock(dataWords,offset);var processedWords=dataWords.splice(0,nWordsReady);data.sigBytes-=nBytesReady}return new WordArray.init(processedWords,nBytesReady)},clone:function(){var clone=Base.clone.call(this);return clone._data=this._data.clone(),clone},_minBufferSize:0}),Hasher=C_lib.Hasher=BufferedBlockAlgorithm.extend({cfg:Base.extend(),init:function(cfg){this.cfg=this.cfg.extend(cfg),this.reset()},reset:function(){BufferedBlockAlgorithm.reset.call(this),this._doReset()},update:function(messageUpdate){return this._append(messageUpdate),this._process(),this},finalize:function(messageUpdate){messageUpdate&&this._append(messageUpdate);var hash=this._doFinalize();return hash},blockSize:16,_cr
5 years ago
19969:"DZ",19975:"WM",19988:"QJ",20048:"YL",20056:"SC",20060:"NM",20094:"QG",20127:"QJ",20167:"QC",20193:"YG",20250:"KH",20256:"ZC",20282:"SC",20285:"QJG",20291:"TD",20314:"YD",20315:"BF",20340:"NE",20375:"TD",20389:"YJ",20391:"CZ",20415:"PB",20446:"YS",20447:"SQ",20504:"TC",20608:"KG",20854:"QJ",20857:"ZC",20911:"PF",20985:"AW",21032:"PB",21048:"XQ",21049:"SC",21089:"YS",21119:"JC",21242:"SB",21273:"SC",21305:"YP",21306:"QO",21330:"ZC",21333:"SDC",21345:"QK",21378:"CA",21397:"SC",21414:"XS",21442:"SC",21477:"JG",21480:"TD",21484:"ZS",21494:"YX",21505:"YX",21512:"HG",21523:"XH",21537:"PB",21542:"PF",21549:"KH",21571:"E",21574:"DA",21588:"TD",21589:"O",21618:"ZC",21621:"KHA",21632:"ZJ",21654:"KG",21679:"LKG",21683:"KH",21710:"A",21719:"YH",21734:"WOE",21769:"A",21780:"WN",21804:"XH",21834:"A",21899:"ZD",21903:"RN",21908:"WO",21939:"ZC",21956:"SA",21964:"YA",21970:"TD",22003:"A",22031:"JG",22040:"XS",22060:"ZC",22066:"ZC",22079:"MH",22129:"XJ",22179:"XA",22237:"NJ",22244:"TD",22280:"JQ",22300:"YH",22313:"XW",22331:"YQ",22343:"YJ",22351:"PH",22395:"DC",22412:"TD",22484:"PB",22500:"PB",22534:"ZD",22549:"DH",22561:"PB",22612:"TD",22771:"KQ",22831:"HB",22841:"JG",22855:"QJ",22865:"XQ",23013:"ML",23081:"WM",23487:"SX",23558:"QJ",23561:"YW",23586:"YW",23614:"YW",23615:"SN",23631:"PB",23646:"ZS",23663:"ZT",23673:"YG",23762:"TD",23769:"ZS",23780:"QJ",23884:"QK",24055:"XH",24113:"DC",24162:"ZC",24191:"GA",24273:"QJ",24324:"NL",24377:"TD",24378:"QJ",24439:"PF",24554:"ZS",24683:"TD",24694:"WE",24733:"LK",24925:"TN",25094:"ZG",25100:"XQ",25103:"XH",25153:"PB",25170:"PB",25179:"KG",25203:"PB",25240:"ZS",25282:"FB",25303:"NA",25324:"KG",25341:"ZY",25373:"WZ",25375:"XJ",25384:"A",25457:"A",25528:"SD",25530:"SC",25552:"TD",25774:"ZC",25874:"ZC",26044:"YW",26080:"WM",26292:"PB",26333:"PB",26355:"ZY",26366:"CZ",26397:"ZC",26399:"QJ",26415:"ZS",26451:"SB",26526:"ZC",26552:"JG",26561:"TD",26588:"JG",26597:"CZ",26629:"ZS",26638:"YL",26646:"XQ",26653:"KG",26657:"XJ",26727:"HG",26894:"ZC",26937:"ZS",26946:"ZC",26999:"KJ",27099:"KJ",27449:"YQ",27481:"XS",27542:"ZS",27663:"ZS",27748:"TS",27784:"SC",27788:"ZD",27795:"TD",27812:"O",27850:"PB",27852:"MB",27895:"SL",27898:"PL",27973:"QJ",27981:"KH",27986:"HX",27994:"XJ",28044:"YC",28065:"WG",28177:"SM",28267:"QJ",28291:"KH",28337:"ZQ",28463:"TL",28548:"DC",28601:"TD",28689:"PB",28805:"JG",28820:"QG",28846:"PB",28952:"TD",28975:"ZC",29100:"A",29325:"QJ",29575:"SL",29602:"FB",30010:"TD",30044:"CX",30058:"PF",30091:"YSP",30111:"YN",30229:"XJ",30427:"SC",30465:"SX",30631:"YQ",30655:"QJ",30684:"QJG",30707:"SD",30729:"XH",30796:"LG",30917:"PB",31074:"NM",31085:"JZ",31109:"SC",31181:"ZC",31192:"MLB",31293:"JQ",31400:"YX",31584:"YJ",31896:"ZN",31909:"ZY",31995:"XJ",32321:"PF",32327:"ZY",32418:"HG",32420:"XQ",32421:"HG",32438:"LG",32473:"GJ",32488:"TD",32521:"QJ",32527:"PB",32562:"ZSQ",32564:"JZ",32735:"ZD",32793:"PB",33071:"PF",33098:"XL",33100:"YA",33152:"PB",33261:"CX",33324:"BP",33333:"TD",33406:"YA",33426:"WM",33432:"PB",33445:"JG",33486:"ZN",33493:"TS",33507:"QJ",33540:"QJ",33544:"ZC",33564:"XQ",33617:"YT",33632:"QJ",33636:"XH",33637:"YX",33694:"WG",33705:"PF",33728:"YW",33882:"SR",34067:"WM",34074:"YW",34121:"QJ",34255:"ZC",34259:"XL",34425:"JH",34430:"XH",34485:"KH",34503:"YS",34532:"HG",34552:"XS",34558:"YE",34593:"ZL",34660:"YQ",34892:"XH",34928:"SC",34999:"QJ",35048:"PB",35059:"SC",35098:"ZC",35203:"TQ",35265:"JX",35299:"JX",35782:"SZ",35828:"YS",35830:"E",35843:"TD",35895:"YG",35977:"MH",36158:"JG",36228:"QJ",36426:"XQ",36466:"DC",36710:"JC",36711:"ZYG",36767:"PB",36866:"SK",36951:"YW",37034:"YX",37063:"XH",37218:"ZC",37325:"ZC",38063:"PB",38079:"TD",38085:"QY",38107:"DC",38116:"TD",38123:"YD",38224:"HG",38241:"XTC",38271:"ZC",38415:"YE",38426:"KH",38461:"YD",38463:"AE",38466:"PB",38477:"XJ",38518:"YT",38551:"WK",38585:"ZC",38704:"XS",38739:"LJ",38761:"GJ",38808:"SQ",39048:"JG",39049:"XJ",39052:"HG",39076:"CZ",39271:"XT",39534:"TD",39552:"TD",39584:"PB",39647:"SB",39730:"LG",39748:"TPB",40109:"ZQ",40479:"ND",40516:"HG",40536:"HG",40583:"QJ",40765:"YQ",40784:"QJ",40840:"YK",40863:"QJG"},_checkPYCh=
var child=this._children[this._getChildName(index)],updated;if(updated=child.update(this._getOptions(item)))return updated;var del=this._children[this._getChildName(index)];delete this._children[this._getChildName(index)],this.options.items.splice(index,1);var w=this._addElement(index,item);this.options.items.splice(index,0,item),this._children[this._getChildName(index)]=w,index>0?this._children[this._getChildName(index-1)].element.after(w.element):w.element.prependTo(this._getWrapper()),del._destroy(),w._mount()}},addItems:function(items,context){var self=this,o=this.options,fragment=BI.Widget._renderEngine.createFragment(),added=[];BI.each(items,function(i,item){var w=self._addElement(o.items.length,item,context);self._children[self._getChildName(o.items.length)]=w,o.items.push(item),added.push(w),fragment.appendChild(w.element[0])}),this._isMounted&&(this._getWrapper().append(fragment),BI.each(added,function(i,w){w._mount()}))},prependItems:function(items,context){var self=this;items=items||[];for(var fragment=BI.Widget._renderEngine.createFragment(),added=[],i=items.length-1;i>=0;i--){this._addItemAt(0,items[i]);var w=this._addElement(0,items[i],context);self._children[self._getChildName(0)]=w,this.options.items.unshift(items[i]),added.push(w),fragment.appendChild(w.element[0])}this._isMounted&&(this._getWrapper().prepend(fragment),BI.each(added,function(i,w){w._mount()}))},getValue:function(){var self=this,value=[],child;return BI.each(this.options.items,function(i){if(child=self._children[self._getChildName(i)]){var v=child.getValue();v=BI.isArray(v)?v:[v],value=value.concat(v)}}),value},setValue:function(v){var self=this,child;BI.each(this.options.items,function(i){(child=self._children[self._getChildName(i)])&&child.setValue(v)})},setText:function(v){var self=this,child;BI.each(this.options.items,function(i){(child=self._children[self._getChildName(i)])&&child.setText(v)})},patchItem:function(oldVnode,vnode,index){var shouldUpdate=this.shouldUpdateItem(index,vnode);if(shouldUpdate===!0||null===shouldUpdate&&!this._compare(oldVnode,vnode))return this.updateItemAt(index,vnode)},updateChildren:function(oldCh,newCh){function sameVnode(vnode1,vnode2,oldIndex,newIndex){return vnode1=self._getOptions(vnode1),vnode2=self._getOptions(vnode2),BI.isKey(vnode1.key)?vnode1.key===vnode2.key:oldIndex>=0?oldIndex===newIndex:void 0}function addNode(vnode,index){var opt=self._getOptions(vnode),key=null==opt.key?self._getChildName(index):opt.key;return children[key]=self._addElement(key,vnode)}function addVnodes(before,vnodes,startIdx,endIdx){for(;startIdx<=endIdx;++startIdx){var node=addNode(vnodes[startIdx],startIdx);insertBefore(node,before,!1,startIdx)}}function removeVnodes(vnodes,startIdx,endIdx){for(;startIdx<=endIdx;++startIdx){var ch=vnodes[startIdx];if(BI.isNotNull(ch)){var node=self._getOptions(ch),key=null==node.key?self._getChildName(startIdx):node.key;delete self._children[self._getChildName(key)],children[key]._destroy()}}}function insertBefore(insert,before,isNext,index){insert=self._getOptions(insert),before=before&&self._getOptions(before);var insertKey=BI.isKey(insert.key)?insert.key:self._getChildName(index);if(before&&children[before.key]){var beforeKey=BI.isKey(before.key)?before.key:self._getChildName(index),next;next=isNext?children[beforeKey].element.next():children[beforeKey].element,next.length>0?next.before(children[insertKey].element):self._getWrapper().append(children[insertKey].element)}else self._getWrapper().append(children[insertKey].element)}function findOldVnode(vnodes,vNode,beginIdx,endIdx){var i,found;for(i=beginIdx;i<=endIdx;++i)vnodes[i]&&sameVnode(vnodes[i],vNode)&&(found=vnodes[i]);return found}var self=this,oldStartIdx=0,newStartIdx=0,oldEndIdx=oldCh.length-1,oldStartVnode=oldCh[0],oldEndVnode=oldCh[oldEndIdx],newEndIdx=newCh.length-1,newStartVnode=newCh[0],newEndVnode=newCh[newEndIdx],before,updated,children={};for(BI.each(oldCh,function(i,child){child=self._getOptions(child);var key=null==child.key?i:child.key;BI.isKey(key)&&(children[key]=self._children[self._getChildName(i)])});oldSta
this.layouts={},this}}),BI.MaskersController=BI.inherit(BI.LayerController,{_defaultConfig:function(){return BI.extend(BI.MaskersController.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.MaskersController.superclass._init.apply(this,arguments),this.zindex=BI.zIndex_masker}}),BI.PopoverController=BI.inherit(BI.Controller,{_defaultConfig:function(){return BI.extend(BI.PopoverController.superclass._defaultConfig.apply(this,arguments),{modal:!0,render:"body"})},_init:function(){BI.PopoverController.superclass._init.apply(this,arguments),this.modal=this.options.modal,this.floatManager={},this.floatLayer={},this.floatContainer={},this.floatOpened={},this.zindex=BI.zIndex_popover,this.zindexMap={}},_check:function(name){return BI.isNotNull(this.floatManager[name])},create:function(name,options,context){if(this._check(name))return this;var popover=BI.createWidget(options||{},{type:"bi.popover"},context);return this.add(name,popover,options,context),this},add:function(name,popover,options,context){var self=this;return options||(options={}),this._check(name)?this:(this.floatContainer[name]=BI.createWidget({type:"bi.absolute",cls:"bi-popup-view",items:[{el:this.floatLayer[name]=BI.createWidget({type:"bi.absolute",items:[popover]},context),left:0,right:0,top:0,bottom:0}]}),this.floatManager[name]=popover,function(key){popover.on(BI.Popover.EVENT_CLOSE,function(){self.close(key)})}(name),BI.createWidget({type:"bi.absolute",element:options.container||this.options.render,items:[{el:this.floatContainer[name],left:0,right:0,top:0,bottom:0}]}),this)},open:function(name){if(!this._check(name))return this;if(!this.floatOpened[name]){this.floatOpened[name]=!0;var container=this.floatContainer[name];container.element.css("zIndex",this.zindex++),this.modal&&container.element.__hasZIndexMask__(this.zindexMap[name])&&container.element.__releaseZIndexMask__(this.zindexMap[name]),this.zindexMap[name]=this.zindex,this.modal&&container.element.__buildZIndexMask__(this.zindex++),this.get(name).setZindex(this.zindex++),this.floatContainer[name].visible();var popover=this.get(name);popover.show&&popover.show();var W=BI.Widget._renderEngine.createElement(this.options.render).width(),H=BI.Widget._renderEngine.createElement(this.options.render).height(),w=popover.element.width(),h=popover.element.height(),left=(W-w)/2,top=(H-h)/2;left<0&&(left=0),top<0&&(top=0),popover.element.css({left:left+"px",top:top+"px"})}return this},close:function(name){return this._check(name)?(this.floatOpened[name]&&(delete this.floatOpened[name],this.floatContainer[name].invisible(),this.modal&&this.floatContainer[name].element.__releaseZIndexMask__(this.zindexMap[name])),this):this},get:function(name){return this.floatManager[name]},remove:function(name){return this._check(name)?(this.floatContainer[name].destroy(),this.modal&&this.floatContainer[name].element.__releaseZIndexMask__(this.zindexMap[name]),delete this.floatManager[name],delete this.floatLayer[name],delete this.zindexMap[name],delete this.floatContainer[name],delete this.floatOpened[name],this):this},removeAll:function(){var self=this;return BI.each(this.floatContainer,function(name,container){container.destroy(),self.modal&&self.floatContainer[name].element.__releaseZIndexMask__(self.zindexMap[name])}),this.floatManager={},this.floatLayer={},this.floatContainer={},this.floatOpened={},this.zindexMap={},this}}),BI.ResizeController=BI.inherit(BI.Controller,{_defaultConfig:function(){return BI.extend(BI.ResizeController.superclass._defaultConfig.apply(this,arguments),{})},_init:function(){BI.ResizeController.superclass._init.apply(this,arguments);var self=this;this.resizerManger={};var fn=BI.debounce(function(ev){self._resize(ev)},30);BI.Widget._renderEngine.createElement(_global).resize(fn)},_resize:function(ev){BI.each(this.resizerManger,function(key,resizer){return resizer instanceof BI.$?void(resizer.is(":visible")&&resizer.trigger("__resize__")):resizer instanceof BI.Layout?void resizer.resize():BI.isFunction(resizer)?void resizer(ev):void 0})},add:function(name,resizer){var self=this
var isIE=BI.isIE(),supportFlex=isSupportFlex();return!isIE&&supportFlex?ob.scrollable===!0||ob.scrollx===!0||ob.scrolly===!0?BI.extend({},ob,{type:"bi.flex_scrollable_vertical_center_adapt"}):BI.extend(ob,{type:"bi.flex_vertical_center_adapt"}):BI.extend(ob,{type:"bi.inline_vertical_adapt"})}),BI.Plugin.registerWidget("bi.horizontal_adapt",function(ob){return ob.items&&ob.items.length<=1?BI.extend(ob,{type:"bi.horizontal_auto"}):ob}),BI.Plugin.registerWidget("bi.float_center_adapt",function(ob){return!BI.isIE()&&isSupportFlex()?ob.scrollable===!0||ob.scrollx===!0||ob.scrolly===!0?BI.extend({},ob,{type:"bi.flex_scrollable_center_adapt"}):BI.extend(ob,{type:"bi.flex_center_adapt"}):BI.extend(ob,{type:"bi.inline_center_adapt"})}),BI.Plugin.registerWidget("bi.flex_horizontal",function(ob){if(ob.scrollable===!0||ob.scrolly===!0)return BI.extend({},ob,{type:"bi.flex_scrollable_horizontal"})}),BI.Plugin.registerWidget("bi.flex_vertical",function(ob){if(ob.scrollable===!0||ob.scrollx===!0)return BI.extend({},ob,{type:"bi.flex_scrollable_vertical"})}),BI.Plugin.registerWidget("bi.flex_horizontal_adapt",function(ob){if(ob.scrollable===!0||ob.scrollx===!0)return BI.extend({},ob,{type:"bi.flex_scrollable_horizontal_adapt"})}),BI.Plugin.registerWidget("bi.flex_vertical_adapt",function(ob){if(ob.scrollable===!0||ob.scrolly===!0)return BI.extend({},ob,{type:"bi.flex_scrollable_vertical_adapt"})}),BI.Plugin.registerWidget("bi.flex_horizontal_center_adapt",function(ob){if(ob.scrollable===!0||ob.scrollx===!0)return BI.extend({},ob,{type:"bi.flex_scrollable_horizontal_adapt"})}),BI.Plugin.registerWidget("bi.flex_vertical_center_adapt",function(ob){if(ob.scrollable===!0||ob.scrolly===!0)return BI.extend({},ob,{type:"bi.flex_scrollable_vertical_adapt"})}),BI.Plugin.registerWidget("bi.flex_center_adapt",function(ob){if(ob.scrollable===!0||ob.scrolly===!0||ob.scrollx===!0)return BI.extend({},ob,{type:"bi.flex_scrollable_center_adapt"})}),BI.Plugin.registerWidget("bi.radio",function(ob){return BI.isIE()&&BI.getIEVersion()<9?BI.extend(ob,{type:"bi.image_radio"}):ob}),BI.Plugin.registerWidget("bi.checkbox",function(ob){return BI.isIE()&&BI.getIEVersion()<9?BI.extend(ob,{type:"bi.image_checkbox"}):ob}),BI.Plugin.registerWidget("bi.half_icon_button",function(ob){return BI.isIE()&&BI.getIEVersion()<9?ob:BI.extend(ob,{type:"bi.half_button"})})}),!function(){var attachEvent=_global.document&&_global.document.attachEvent,stylesCreated=!1;if(_global.document&&!attachEvent){var requestFrame=function(){var raf=_global.requestAnimationFrame||_global.mozRequestAnimationFrame||_global.webkitRequestAnimationFrame||function(fn){return _global.setTimeout(fn,20)};return function(fn){return raf(fn)}}(),cancelFrame=function(){var cancel=_global.cancelAnimationFrame||_global.mozCancelAnimationFrame||_global.webkitCancelAnimationFrame||_global.clearTimeout;return function(id){return cancel(id)}}(),resetTriggers=function(element){var triggers=element.__resizeTriggers__,expand=triggers.firstElementChild,contract=triggers.lastElementChild,expandChild=expand.firstElementChild;contract.scrollLeft=contract.scrollWidth,contract.scrollTop=contract.scrollHeight,expandChild.style.width=expand.offsetWidth+1+"px",expandChild.style.height=expand.offsetHeight+1+"px",expand.scrollLeft=expand.scrollWidth,expand.scrollTop=expand.scrollHeight},checkTriggers=function(element){return element.offsetWidth!==element.__resizeLast__.width||element.offsetHeight!==element.__resizeLast__.height},scrollListener=function(e){var element=this;resetTriggers(this),this.__resizeRAF__&&cancelFrame(this.__resizeRAF__),this.__resizeRAF__=requestFrame(function(){checkTriggers(element)&&(element.__resizeLast__.width=element.offsetWidth,element.__resizeLast__.height=element.offsetHeight,element.__resizeListeners__.forEach(function(fn){fn.call(element,e)}))})},animation=!1,animationstring="animation",keyframeprefix="",animationstartevent="animationstart",domPrefixes="Webkit Moz O ms".split(" "),startEvents="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),pfx="",elm=document
data=jQuery._data(dest);for(e in data.events)jQuery.removeEvent(dest,e,data.handle);dest.removeAttribute(jQuery.expando)}"script"===nodeName&&dest.text!==src.text?(disableScript(dest).text=src.text,restoreScript(dest)):"object"===nodeName?(dest.parentNode&&(dest.outerHTML=src.outerHTML),jQuery.support.html5Clone&&src.innerHTML&&!jQuery.trim(dest.innerHTML)&&(dest.innerHTML=src.innerHTML)):"input"===nodeName&&manipulation_rcheckableType.test(src.type)?(dest.defaultChecked=dest.checked=src.checked,dest.value!==src.value&&(dest.value=src.value)):"option"===nodeName?dest.defaultSelected=dest.selected=src.defaultSelected:"input"!==nodeName&&"textarea"!==nodeName||(dest.defaultValue=src.defaultValue)}}function getAll(context,tag){var elems,elem,i=0,found=typeof context.getElementsByTagName!==core_strundefined?context.getElementsByTagName(tag||"*"):typeof context.querySelectorAll!==core_strundefined?context.querySelectorAll(tag||"*"):undefined;if(!found)for(found=[],elems=context.childNodes||context;null!=(elem=elems[i]);i++)!tag||jQuery.nodeName(elem,tag)?found.push(elem):jQuery.merge(found,getAll(elem,tag));return tag===undefined||tag&&jQuery.nodeName(context,tag)?jQuery.merge([context],found):found}function fixDefaultChecked(elem){manipulation_rcheckableType.test(elem.type)&&(elem.defaultChecked=elem.checked)}function vendorPropName(style,name){if(name in style)return name;for(var capName=name.charAt(0).toUpperCase()+name.slice(1),origName=name,i=cssPrefixes.length;i--;)if(name=cssPrefixes[i]+capName,name in style)return name;return origName}function isHidden(elem,el){return elem=el||elem,"none"===jQuery.css(elem,"display")||!jQuery.contains(elem.ownerDocument,elem)}function showHide(elements,show){for(var display,elem,hidden,values=[],index=0,length=elements.length;index<length;index++)elem=elements[index],elem.style&&(values[index]=jQuery._data(elem,"olddisplay"),display=elem.style.display,show?(values[index]||"none"!==display||(elem.style.display=""),""===elem.style.display&&isHidden(elem)&&(values[index]=jQuery._data(elem,"olddisplay",css_defaultDisplay(elem.nodeName)))):values[index]||(hidden=isHidden(elem),(display&&"none"!==display||!hidden)&&jQuery._data(elem,"olddisplay",hidden?display:jQuery.css(elem,"display"))));for(index=0;index<length;index++)elem=elements[index],elem.style&&(show&&"none"!==elem.style.display&&""!==elem.style.display||(elem.style.display=show?values[index]||"":"none"));return elements}function setPositiveNumber(elem,value,subtract){var matches=rnumsplit.exec(value);return matches?Math.max(0,matches[1]-(subtract||0))+(matches[2]||"px"):value}function augmentWidthOrHeight(elem,name,extra,isBorderBox,styles){for(var i=extra===(isBorderBox?"border":"content")?4:"width"===name?1:0,val=0;i<4;i+=2)"margin"===extra&&(val+=jQuery.css(elem,extra+cssExpand[i],!0,styles)),isBorderBox?("content"===extra&&(val-=jQuery.css(elem,"padding"+cssExpand[i],!0,styles)),"margin"!==extra&&(val-=jQuery.css(elem,"border"+cssExpand[i]+"Width",!0,styles))):(val+=jQuery.css(elem,"padding"+cssExpand[i],!0,styles),"padding"!==extra&&(val+=jQuery.css(elem,"border"+cssExpand[i]+"Width",!0,styles)));return val}function getWidthOrHeight(elem,name,extra){var valueIsBorderBox=!0,val="width"===name?elem.offsetWidth:elem.offsetHeight,styles=getStyles(elem),isBorderBox=jQuery.support.boxSizing&&"border-box"===jQuery.css(elem,"boxSizing",!1,styles);if(val<=0||null==val){if(val=curCSS(elem,name,styles),(val<0||null==val)&&(val=elem.style[name]),rnumnonpx.test(val))return val;valueIsBorderBox=isBorderBox&&(jQuery.support.boxSizingReliable||val===elem.style[name]),val=parseFloat(val)||0}return val+augmentWidthOrHeight(elem,name,extra||(isBorderBox?"border":"content"),valueIsBorderBox,styles)+"px"}function css_defaultDisplay(nodeName){var doc=document,display=elemdisplay[nodeName];return display||(display=actualDisplay(nodeName,doc),"none"!==display&&display||(iframe=(iframe||jQuery("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(doc.documentElement),doc=(iframe[0].contentWindow||ifra
support.shrinkWrapBlocks=3!==div.offsetWidth,support.inlineBlockNeedsLayout&&(body.style.zoom=1)),body.removeChild(container),container=div=tds=marginDiv=null)}),all=select=fragment=opt=a=input=null,support}();var rbrace=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,rmultiDash=/([A-Z])/g;jQuery.extend({cache:{},expando:"jQuery"+(core_version+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(elem){return elem=elem.nodeType?jQuery.cache[elem[jQuery.expando]]:elem[jQuery.expando],!!elem&&!isEmptyDataObject(elem)},data:function(elem,name,data){return internalData(elem,name,data)},removeData:function(elem,name){return internalRemoveData(elem,name)},_data:function(elem,name,data){return internalData(elem,name,data,!0)},_removeData:function(elem,name){return internalRemoveData(elem,name,!0)},acceptData:function(elem){if(elem.nodeType&&1!==elem.nodeType&&9!==elem.nodeType)return!1;var noData=elem.nodeName&&jQuery.noData[elem.nodeName.toLowerCase()];return!noData||noData!==!0&&elem.getAttribute("classid")===noData}}),jQuery.fn.extend({data:function(key,value){var attrs,name,elem=this[0],i=0,data=null;if(key===undefined){if(this.length&&(data=jQuery.data(elem),1===elem.nodeType&&!jQuery._data(elem,"parsedAttrs"))){for(attrs=elem.attributes;i<attrs.length;i++)name=attrs[i].name,name.indexOf("data-")||(name=jQuery.camelCase(name.slice(5)),dataAttr(elem,name,data[name]));jQuery._data(elem,"parsedAttrs",!0)}return data}return"object"==typeof key?this.each(function(){jQuery.data(this,key)}):jQuery.access(this,function(value){return value===undefined?elem?dataAttr(elem,key,jQuery.data(elem,key)):null:void this.each(function(){jQuery.data(this,key,value)})},null,value,arguments.length>1,null,!0)},removeData:function(key){return this.each(function(){jQuery.removeData(this,key)})}}),jQuery.extend({queue:function(elem,type,data){var queue;if(elem)return type=(type||"fx")+"queue",queue=jQuery._data(elem,type),data&&(!queue||jQuery.isArray(data)?queue=jQuery._data(elem,type,jQuery.makeArray(data)):queue.push(data)),queue||[]},dequeue:function(elem,type){type=type||"fx";var queue=jQuery.queue(elem,type),startLength=queue.length,fn=queue.shift(),hooks=jQuery._queueHooks(elem,type),next=function(){jQuery.dequeue(elem,type)};"inprogress"===fn&&(fn=queue.shift(),startLength--),hooks.cur=fn,fn&&("fx"===type&&queue.unshift("inprogress"),delete hooks.stop,fn.call(elem,next,hooks)),!startLength&&hooks&&hooks.empty.fire()},_queueHooks:function(elem,type){var key=type+"queueHooks";return jQuery._data(elem,key)||jQuery._data(elem,key,{empty:jQuery.Callbacks("once memory").add(function(){jQuery._removeData(elem,type+"queue"),jQuery._removeData(elem,key)})})}}),jQuery.fn.extend({queue:function(type,data){var setter=2;return"string"!=typeof type&&(data=type,type="fx",setter--),arguments.length<setter?jQuery.queue(this[0],type):data===undefined?this:this.each(function(){var queue=jQuery.queue(this,type,data);jQuery._queueHooks(this,type),"fx"===type&&"inprogress"!==queue[0]&&jQuery.dequeue(this,type)})},dequeue:function(type){return this.each(function(){jQuery.dequeue(this,type)})},delay:function(time,type){return time=jQuery.fx?jQuery.fx.speeds[time]||time:time,type=type||"fx",this.queue(type,function(next,hooks){var timeout=setTimeout(next,time);hooks.stop=function(){clearTimeout(timeout)}})},clearQueue:function(type){return this.queue(type||"fx",[])},promise:function(type,obj){var tmp,count=1,defer=jQuery.Deferred(),elements=this,i=this.length,resolve=function(){--count||defer.resolveWith(elements,[elements])};for("string"!=typeof type&&(obj=type,type=undefined),type=type||"fx";i--;)tmp=jQuery._data(elements[i],type+"queueHooks"),tmp&&tmp.empty&&(count++,tmp.empty.add(resolve));return resolve(),defer.promise(obj)}});var nodeHook,boolHook,rclass=/[\t\r\n]/g,rreturn=/\r/g,rfocusable=/^(?:input|select|textarea|button|object)$/i,rclickable=/^(?:a|area)$/i,rboolean=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,ruseDe
matched&&!(match=rcomma.exec(soFar))||(match&&(soFar=soFar.slice(match[0].length)||soFar),groups.push(tokens=[])),matched=!1,(match=rcombinators.exec(soFar))&&(matched=match.shift(),tokens.push({value:matched,type:match[0].replace(rtrim," ")}),soFar=soFar.slice(matched.length));for(type in Expr.filter)!(match=matchExpr[type].exec(soFar))||preFilters[type]&&!(match=preFilters[type](match))||(matched=match.shift(),tokens.push({value:matched,type:type,matches:match}),soFar=soFar.slice(matched.length));if(!matched)break}return parseOnly?soFar.length:soFar?Sizzle.error(selector):tokenCache(selector,groups).slice(0)}function toSelector(tokens){for(var i=0,len=tokens.length,selector="";i<len;i++)selector+=tokens[i].value;return selector}function addCombinator(matcher,combinator,base){var dir=combinator.dir,checkNonElements=base&&"parentNode"===dir,doneName=done++;return combinator.first?function(elem,context,xml){for(;elem=elem[dir];)if(1===elem.nodeType||checkNonElements)return matcher(elem,context,xml)}:function(elem,context,xml){var data,cache,outerCache,dirkey=dirruns+" "+doneName;if(xml){for(;elem=elem[dir];)if((1===elem.nodeType||checkNonElements)&&matcher(elem,context,xml))return!0}else for(;elem=elem[dir];)if(1===elem.nodeType||checkNonElements)if(outerCache=elem[expando]||(elem[expando]={}),(cache=outerCache[dir])&&cache[0]===dirkey){if((data=cache[1])===!0||data===cachedruns)return data===!0}else if(cache=outerCache[dir]=[dirkey],cache[1]=matcher(elem,context,xml)||cachedruns,cache[1]===!0)return!0}}function elementMatcher(matchers){return matchers.length>1?function(elem,context,xml){for(var i=matchers.length;i--;)if(!matchers[i](elem,context,xml))return!1;return!0}:matchers[0]}function condense(unmatched,map,filter,context,xml){for(var elem,newUnmatched=[],i=0,len=unmatched.length,mapped=null!=map;i<len;i++)(elem=unmatched[i])&&(filter&&!filter(elem,context,xml)||(newUnmatched.push(elem),mapped&&map.push(i)));return newUnmatched}function setMatcher(preFilter,selector,matcher,postFilter,postFinder,postSelector){return postFilter&&!postFilter[expando]&&(postFilter=setMatcher(postFilter)),postFinder&&!postFinder[expando]&&(postFinder=setMatcher(postFinder,postSelector)),markFunction(function(seed,results,context,xml){var temp,i,elem,preMap=[],postMap=[],preexisting=results.length,elems=seed||multipleContexts(selector||"*",context.nodeType?[context]:context,[]),matcherIn=!preFilter||!seed&&selector?elems:condense(elems,preMap,preFilter,context,xml),matcherOut=matcher?postFinder||(seed?preFilter:preexisting||postFilter)?[]:results:matcherIn;if(matcher&&matcher(matcherIn,matcherOut,context,xml),postFilter)for(temp=condense(matcherOut,postMap),postFilter(temp,[],context,xml),i=temp.length;i--;)(elem=temp[i])&&(matcherOut[postMap[i]]=!(matcherIn[postMap[i]]=elem));if(seed){if(postFinder||preFilter){if(postFinder){for(temp=[],i=matcherOut.length;i--;)(elem=matcherOut[i])&&temp.push(matcherIn[i]=elem);postFinder(null,matcherOut=[],temp,xml)}for(i=matcherOut.length;i--;)(elem=matcherOut[i])&&(temp=postFinder?indexOf.call(seed,elem):preMap[i])>-1&&(seed[temp]=!(results[temp]=elem))}}else matcherOut=condense(matcherOut===results?matcherOut.splice(preexisting,matcherOut.length):matcherOut),postFinder?postFinder(null,results,matcherOut,xml):push.apply(results,matcherOut)})}function matcherFromTokens(tokens){for(var checkContext,matcher,j,len=tokens.length,leadingRelative=Expr.relative[tokens[0].type],implicitRelative=leadingRelative||Expr.relative[" "],i=leadingRelative?1:0,matchContext=addCombinator(function(elem){return elem===checkContext},implicitRelative,!0),matchAnyContext=addCombinator(function(elem){return indexOf.call(checkContext,elem)>-1},implicitRelative,!0),matchers=[function(elem,context,xml){return!leadingRelative&&(xml||context!==outermostContext)||((checkContext=context).nodeType?matchContext(elem,context,xml):matchAnyContext(elem,context,xml))}];i<len;i++)if(matcher=Expr.relative[tokens[i].type])matchers=[addCombinator(elementMatcher(matchers),matcher)];else{if(matcher=Expr.filter[tokens[i].type].apply(null,token
elem.parentNode&&(keepData&&jQuery.contains(elem.ownerDocument,elem)&&setGlobalEval(getAll(elem,"script")),elem.parentNode.removeChild(elem)));return this},empty:function(){for(var elem,i=0;null!=(elem=this[i]);i++){for(1===elem.nodeType&&jQuery.cleanData(getAll(elem,!1));elem.firstChild;)elem.removeChild(elem.firstChild);elem.options&&jQuery.nodeName(elem,"select")&&(elem.options.length=0)}return this},clone:function(dataAndEvents,deepDataAndEvents){return dataAndEvents=null!=dataAndEvents&&dataAndEvents,deepDataAndEvents=null==deepDataAndEvents?dataAndEvents:deepDataAndEvents,this.map(function(){return jQuery.clone(this,dataAndEvents,deepDataAndEvents)})},html:function(value){return jQuery.access(this,function(value){var elem=this[0]||{},i=0,l=this.length;if(value===undefined)return 1===elem.nodeType?elem.innerHTML.replace(rinlinejQuery,""):undefined;if("string"==typeof value&&!rnoInnerhtml.test(value)&&(jQuery.support.htmlSerialize||!rnoshimcache.test(value))&&(jQuery.support.leadingWhitespace||!rleadingWhitespace.test(value))&&!wrapMap[(rtagName.exec(value)||["",""])[1].toLowerCase()]){value=value.replace(rxhtmlTag,"<$1></$2>");try{for(;i<l;i++)elem=this[i]||{},1===elem.nodeType&&(jQuery.cleanData(getAll(elem,!1)),elem.innerHTML=value);elem=0}catch(e){}}elem&&this.empty().append(value)},null,value,arguments.length)},replaceWith:function(value){var isFunc=jQuery.isFunction(value);return isFunc||"string"==typeof value||(value=jQuery(value).not(this).detach()),this.domManip([value],!0,function(elem){var next=this.nextSibling,parent=this.parentNode;parent&&(jQuery(this).remove(),parent.insertBefore(elem,next))})},detach:function(selector){return this.remove(selector,!0)},domManip:function(args,table,callback){args=core_concat.apply([],args);var first,node,hasScripts,scripts,doc,fragment,i=0,l=this.length,set=this,iNoClone=l-1,value=args[0],isFunction=jQuery.isFunction(value);if(isFunction||!(l<=1||"string"!=typeof value||jQuery.support.checkClone)&&rchecked.test(value))return this.each(function(index){var self=set.eq(index);isFunction&&(args[0]=value.call(this,index,table?self.html():undefined)),self.domManip(args,table,callback)});if(l&&(fragment=jQuery.buildFragment(args,this[0].ownerDocument,!1,this),first=fragment.firstChild,1===fragment.childNodes.length&&(fragment=first),first)){for(table=table&&jQuery.nodeName(first,"tr"),scripts=jQuery.map(getAll(fragment,"script"),disableScript),hasScripts=scripts.length;i<l;i++)node=fragment,i!==iNoClone&&(node=jQuery.clone(node,!0,!0),hasScripts&&jQuery.merge(scripts,getAll(node,"script"))),callback.call(table&&jQuery.nodeName(this[i],"table")?findOrAppend(this[i],"tbody"):this[i],node,i);if(hasScripts)for(doc=scripts[scripts.length-1].ownerDocument,jQuery.map(scripts,restoreScript),i=0;i<hasScripts;i++)node=scripts[i],rscriptType.test(node.type||"")&&!jQuery._data(node,"globalEval")&&jQuery.contains(doc,node)&&(node.src?jQuery.ajax({url:node.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):jQuery.globalEval((node.text||node.textContent||node.innerHTML||"").replace(rcleanScript,"")));fragment=first=null}return this}}),jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(selector){for(var elems,i=0,ret=[],insert=jQuery(selector),last=insert.length-1;i<=last;i++)elems=i===last?this:this.clone(!0),jQuery(insert[i])[original](elems),core_push.apply(ret,elems.get());return this.pushStack(ret)}}),jQuery.extend({clone:function(elem,dataAndEvents,deepDataAndEvents){var destElements,node,clone,i,srcElements,inPage=jQuery.contains(elem.ownerDocument,elem);if(jQuery.support.html5Clone||jQuery.isXMLDoc(elem)||!rnoshimcache.test("<"+elem.nodeName+">")?clone=elem.cloneNode(!0):(fragmentDiv.innerHTML=elem.outerHTML,fragmentDiv.removeChild(clone=fragmentDiv.firstChild)),!(jQuery.support.noCloneEvent&&jQuery.support.noCloneChecked||1!==elem.nodeType&&11!==elem.nodeType||jQuery.isXMLDoc(elem)))for(destElements=getAll(clone),srcElements=getAll(elem),i=0;null!=(node
for(data.finish=!0,jQuery.queue(this,type,[]),hooks&&hooks.cur&&hooks.cur.finish&&hooks.cur.finish.call(this),index=timers.length;index--;)timers[index].elem===this&&timers[index].queue===type&&(timers[index].anim.stop(!0),timers.splice(index,1));for(index=0;index<length;index++)queue[index]&&queue[index].finish&&queue[index].finish.call(this);delete data.finish})}}),jQuery.each({slideDown:genFx("show"),slideUp:genFx("hide"),slideToggle:genFx("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(name,props){jQuery.fn[name]=function(speed,easing,callback){return this.animate(props,speed,easing,callback)}}),jQuery.speed=function(speed,easing,fn){var opt=speed&&"object"==typeof speed?jQuery.extend({},speed):{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&!jQuery.isFunction(easing)&&easing};return opt.duration=jQuery.fx.off?0:"number"==typeof opt.duration?opt.duration:opt.duration in jQuery.fx.speeds?jQuery.fx.speeds[opt.duration]:jQuery.fx.speeds._default,null!=opt.queue&&opt.queue!==!0||(opt.queue="fx"),opt.old=opt.complete,opt.complete=function(){jQuery.isFunction(opt.old)&&opt.old.call(this),opt.queue&&jQuery.dequeue(this,opt.queue)},opt},jQuery.easing={linear:function(p){return p},swing:function(p){return.5-Math.cos(p*Math.PI)/2}},jQuery.timers=[],jQuery.fx=Tween.prototype.init,jQuery.fx.tick=function(){var timer,timers=jQuery.timers,i=0;for(fxNow=jQuery.now();i<timers.length;i++)timer=timers[i],timer()||timers[i]!==timer||timers.splice(i--,1);timers.length||jQuery.fx.stop(),fxNow=undefined},jQuery.fx.timer=function(timer){timer()&&jQuery.timers.push(timer)&&jQuery.fx.start()},jQuery.fx.interval=13,jQuery.fx.start=function(){timerId||(timerId=setInterval(jQuery.fx.tick,jQuery.fx.interval))},jQuery.fx.stop=function(){clearInterval(timerId),timerId=null},jQuery.fx.speeds={slow:600,fast:200,_default:400},jQuery.fx.step={},jQuery.expr&&jQuery.expr.filters&&(jQuery.expr.filters.animated=function(elem){return jQuery.grep(jQuery.timers,function(fn){return elem===fn.elem}).length}),jQuery.fn.offset=function(options){if(arguments.length)return options===undefined?this:this.each(function(i){jQuery.offset.setOffset(this,options,i)});var docElem,win,box={top:0,left:0},elem=this[0],doc=elem&&elem.ownerDocument;if(doc)return docElem=doc.documentElement,jQuery.contains(docElem,elem)?(typeof elem.getBoundingClientRect!==core_strundefined&&(box=elem.getBoundingClientRect()),win=getWindow(doc),{top:box.top+(win.pageYOffset||docElem.scrollTop)-(docElem.clientTop||0),left:box.left+(win.pageXOffset||docElem.scrollLeft)-(docElem.clientLeft||0)}):box},jQuery.offset={setOffset:function(elem,options,i){var position=jQuery.css(elem,"position");"static"===position&&(elem.style.position="relative");var curElem=jQuery(elem),curOffset=curElem.offset(),curCSSTop=jQuery.css(elem,"top"),curCSSLeft=jQuery.css(elem,"left"),calculatePosition=("absolute"===position||"fixed"===position)&&jQuery.inArray("auto",[curCSSTop,curCSSLeft])>-1,props={},curPosition={},curTop,curLeft;calculatePosition?(curPosition=curElem.position(),curTop=curPosition.top,curLeft=curPosition.left):(curTop=parseFloat(curCSSTop)||0,curLeft=parseFloat(curCSSLeft)||0),jQuery.isFunction(options)&&(options=options.call(elem,i,curOffset)),null!=options.top&&(props.top=options.top-curOffset.top+curTop),null!=options.left&&(props.left=options.left-curOffset.left+curLeft),"using"in options?options.using.call(elem,props):curElem.css(props)}},jQuery.fn.extend({position:function(){if(this[0]){var offsetParent,offset,parentOffset={top:0,left:0},elem=this[0];return"fixed"===jQuery.css(elem,"position")?offset=elem.getBoundingClientRect():(offsetParent=this.offsetParent(),offset=this.offset(),jQuery.nodeName(offsetParent[0],"html")||(parentOffset=offsetParent.offset()),parentOffset.top+=jQuery.css(offsetParent[0],"borderTopWidth",!0),parentOffset.left+=jQuery.css(offsetParent[0],"borderLeftWidth",!0)),{top:offset.top-parentOffset.top-jQuery.css(elem,"marginTop",!0),left:offset.left-parentOffset.left-jQu
"margin-right":o.hgap+o.rgap+(item.rgap||0)+(item.hgap||0)+"px"}),o.vgap+o.bgap+(item.bgap||0)+(item.vgap||0)!==0&&w.element.css({"margin-bottom":o.vgap+o.bgap+(item.bgap||0)+(item.vgap||0)+"px"}),w},resize:function(){},populate:function(items){BI.FlexHorizontalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_horizontal",BI.FlexHorizontalLayout),BI.FlexVerticalCenter=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexVerticalCenter.superclass.props.apply(this,arguments),{baseCls:"bi-flex-vertical-center-adapt-layout",horizontalAlign:BI.HorizontalAlign.Left,columnSize:[],scrollx:!1,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){var self=this,o=this.options;return{type:"bi.flex_horizontal",ref:function(_ref){self.wrapper=_ref},verticalAlign:BI.VerticalAlign.Middle,horizontalAlign:o.horizontalAlign,columnSize:o.columnSize,scrollx:o.scrollx,scrolly:o.scrolly,scrollable:o.scrollable,vgap:o.vgap,lgap:o.lgap,rgap:o.rgap,hgap:o.hgap,items:o.items}},resize:function(){},update:function(opt){return this.wrapper.update(opt)},populate:function(items){this.wrapper.populate(items)}}),BI.shortcut("bi.flex_vertical_adapt",BI.FlexVerticalCenter),BI.shortcut("bi.flex_vertical_center_adapt",BI.FlexVerticalCenter),BI.FlexVerticalLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexVerticalLayout.superclass.props.apply(this,arguments),{baseCls:"bi-flex-vertical-layout",horizontalAlign:BI.HorizontalAlign.Left,verticalAlign:BI.VerticalAlign.Top,rowSize:[],scrolly:!0,hgap:0,vgap:0,lgap:0,rgap:0,tgap:0,bgap:0})},render:function(){BI.FlexVerticalLayout.superclass.render.apply(this,arguments);var o=this.options;this.element.addClass("h-"+o.horizontalAlign).addClass("v-"+o.verticalAlign),this.populate(this.options.items)},_addElement:function(i,item){var w=BI.FlexVerticalLayout.superclass._addElement.apply(this,arguments),o=this.options;return w.element.css({position:"relative","flex-shrink":"0"}),o.rowSize[i]>0&&w.element.height(o.rowSize[i]),"fill"===o.rowSize[i]&&w.element.css("flex","1"),o.vgap+o.tgap+(item.tgap||0)+(item.vgap||0)!==0&&w.element.css({"margin-top":(0===i?o.vgap:0)+o.tgap+(item.tgap||0)+(item.vgap||0)+"px"}),o.hgap+o.lgap+(item.lgap||0)+(item.hgap||0)!==0&&w.element.css({"margin-left":o.hgap+o.lgap+(item.lgap||0)+(item.hgap||0)+"px"}),o.hgap+o.rgap+(item.rgap||0)+(item.hgap||0)!==0&&w.element.css({"margin-right":o.hgap+o.rgap+(item.rgap||0)+(item.hgap||0)+"px"}),o.vgap+o.bgap+(item.bgap||0)+(item.vgap||0)!==0&&w.element.css({"margin-bottom":o.vgap+o.bgap+(item.bgap||0)+(item.vgap||0)+"px"}),w},resize:function(){},populate:function(items){BI.FlexVerticalLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_vertical",BI.FlexVerticalLayout),BI.FlexWrapperCenterLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexWrapperCenterLayout.superclass.props.apply(this,arguments),{baseCls:"bi-flex-scrollable-center-adapt-layout clearfix",scrollable:!0})},render:function(){BI.FlexWrapperCenterLayout.superclass.render.apply(this,arguments),this.$wrapper=BI.Widget._renderEngine.createElement("<div>").addClass("flex-scrollable-center-adapt-layout-wrapper"),this.populate(this.options.items)},_addElement:function(i,item){var o=this.options,w=BI.FlexWrapperCenterLayout.superclass._addElement.apply(this,arguments);return w.element.css({position:"relative","margin-left":(0===i?o.hgap:0)+"px","margin-right":o.hgap+"px","margin-top":o.vgap+"px","margin-bottom":o.vgap+"px"}),w},appendFragment:function(frag){this.$wrapper.append(frag),this.element.append(this.$wrapper)},_getWrapper:function(){return this.$wrapper},resize:function(){},populate:function(items){BI.FlexWrapperCenterLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.flex_scrollable_center_adapt",BI.FlexWrapperCenterLayout),BI.FlexWrapperHorizontalCenter=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.FlexWrapperHorizontalCenter.superclass.props.apply(this,arguments),{baseCls:"bi-flex-scrollable-vertical-center-adapt-layou
}),o.hgap+o.lgap+(item.lgap||0)+(item.hgap||0)!==0&&w.element.css({"margin-left":(0===i?o.hgap:0)+o.lgap+(item.lgap||0)+(item.hgap||0)+"px"}),o.hgap+o.rgap+(item.rgap||0)+(item.hgap||0)!==0&&w.element.css({"margin-right":o.hgap+o.rgap+(item.rgap||0)+(item.hgap||0)+"px"}),o.vgap+o.bgap+(item.bgap||0)+(item.vgap||0)!==0&&w.element.css({"margin-bottom":o.vgap+o.bgap+(item.bgap||0)+(item.vgap||0)+"px"}),w},resize:function(){this.stroke(this.options.items)},populate:function(items){BI.InlineLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.inline",BI.InlineLayout),BI.LatticeLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.LatticeLayout.superclass.props.apply(this,arguments),{baseCls:"bi-lattice-layout clearfix"})},render:function(){BI.LatticeLayout.superclass.render.apply(this,arguments),this.populate(this.options.items)},_addElement:function(i,item){var o=this.options,w=BI.LatticeLayout.superclass._addElement.apply(this,arguments);if(o.columnSize&&o.columnSize[i])var width=o.columnSize[i]/BI.sum(o.columnSize)*100+"%";else var width=1/this.options.items.length*100+"%";return w.element.css({position:"relative","float":"left",width:width}),w},addItem:function(item){var w=BI.LatticeLayout.superclass.addItem.apply(this,arguments);return this.resize(),w},addItemAt:function(item){var w=BI.LatticeLayout.superclass.addItemAt.apply(this,arguments);return this.resize(),w},resize:function(){this.stroke(this.options.items)},populate:function(items){BI.LatticeLayout.superclass.populate.apply(this,arguments),this._mount()}}),BI.shortcut("bi.lattice",BI.LatticeLayout),BI.TableLayout=BI.inherit(BI.Layout,{props:function(){return BI.extend(BI.TableLayout.superclass.props.apply(this,arguments),{baseCls:"bi-table-layout",scrolly:!0,columnSize:[200,200,"fill"],rowSize:30,hgap:0,vgap:0,items:[[{el:{text:"label1"}},{el:{text:"label2"}},{el:{text:"label3"}}]]})},render:function(){BI.TableLayout.superclass.render.apply(this,arguments),this.rows=0,this.populate(this.options.items)},_addElement:function(idx,arr){function firstElement(item,row,col){0===row&&item.addClass("first-row"),0===col&&item.addClass("first-col"),item.addClass(BI.isOdd(row+1)?"odd-row":"even-row"),item.addClass(BI.isOdd(col+1)?"odd-col":"even-col"),item.addClass("center-element")}function firstObject(item,row,col){var cls="";0===row&&(cls+=" first-row"),0===col&&(cls+=" first-col"),cls+=BI.isOdd(row+1)?" odd-row":" even-row",cls+=BI.isOdd(col+1)?" odd-col":" even-col",item.cls=(item.cls||"")+cls+" center-element"}function first(item,row,col){item instanceof BI.Widget?firstElement(item.element,row,col):item.el instanceof BI.Widget?firstElement(item.el.element,row,col):item.el?firstObject(item.el,row,col):firstObject(item,row,col)}var o=this.options,abs=[],left=0,right=0,i,j;for(i=0;i<arr.length&&BI.isNumber(o.columnSize[i]);i++)first(arr[i],this.rows,i),abs.push(BI.extend({top:0,bottom:0,left:o.columnSize[i]<=1?100*left+"%":left,width:o.columnSize[i]<=1?100*o.columnSize[i]+"%":o.columnSize[i]},arr[i])),left+=o.columnSize[i]+(o.columnSize[i]<1?0:o.hgap);for(j=arr.length-1;j>i;j--){if(!BI.isNumber(o.columnSize[j]))throw new Error("item with fill can only be one");first(arr[j],this.rows,j),abs.push(BI.extend({top:0,bottom:0,right:o.columnSize[j]<=1?100*right+"%":right,width:o.columnSize[j]<=1?100*o.columnSize[j]+"%":o.columnSize[j]},arr[j])),right+=o.columnSize[j]+(o.columnSize[j]<1?0:o.hgap)}i>=0&&i<arr.length&&(first(arr[i],this.rows,i),abs.push(BI.extend({top:0,bottom:0,left:left<=1?100*left+"%":left,right:right<=1?100*right+"%":right},arr[i])));var w=BI.createWidget({type:"bi.absolute",height:BI.isArray(o.rowSize)?o.rowSize[this.rows]:o.rowSize,items:abs});return this.rows>0&&this.getWidgetByName(this.getName()+(this.rows-1)).element.css({"margin-bottom":o.vgap}),w.element.css({position:"relative"}),this.addWidget(this.getName()+this.rows++,w),w},resize:function(){},addItem:function(arr){if(!BI.isArray(arr))throw new Error("item must be array");return BI.TableLayout.superclass.addItem.apply(this,arguments)},update:function(){},pop
if(vm.$$model&&key in vm.$$model)return vm.$$model[key];for(var p=vm._parent;p;){if(p.$$context&&key in p.$$context)return p.$$context[key];p=p._parent}},set:function set(val){if(vm.$$state&&key in vm.$$state)return vm.$$state[key]=val;if(vm.$$model&&key in vm.$$model)return vm.$$model[key]=val;for(var p=vm._parent;p;){if(p.$$context&&key in p.$$context)return p.$$context[key]=val;p=p._parent}}})}),i=0,len=keys.length;i<len;i++)_loop(i,len);vm.model=createViewModel$1({},props)}function defineContext(vm,keys){for(var props={},_loop2=(function _loop2(i,len){var key=keys[i];key in $$skipArray||(props[key]={enumerable:!0,configurable:!0,get:function get(){return vm.model[key]},set:function set(val){return vm.model[key]=val}})}),i=0,len=keys.length;i<len;i++)_loop2(i,len);vm.$$context=createViewModel$1({},props)}function toJSON(model){var result=void 0;if(_.isArray(model)){result=[];for(var i=0,len=model.length;i<len;i++)result[i]=toJSON(model[i])}else if(model&&isPlainObject(model)){result={};for(var _key4 in model)_.has($$skipArray,_key4)||(result[_key4]=toJSON(model[_key4]))}else result=model;return result}function define(model){return new Observer(model).model}var rhashcode=/\d\.\d{4}/,hasProto="__proto__"in{},isIE=function isIE(){return"undefined"!=typeof navigator&&/(msie|trident)/i.test(navigator.userAgent.toLowerCase())},getIEVersion=function getIEVersion(){var version=0;if("undefined"==typeof navigator)return!1;var agent=navigator.userAgent.toLowerCase(),v1=agent.match(/(?:msie\s([\w.]+))/),v2=agent.match(/(?:trident.*rv:([\w.]+))/);return version=v1&&v2&&v1[1]&&v2[1]?Math.max(1*v1[1],1*v2[1]):v1&&v1[1]?1*v1[1]:v2&&v2[1]?1*v2[1]:0},isIE9Below=isIE()&&getIEVersion()<9,_toString=Object.prototype.toString,bailRE=/[^\w.$]/,nextTick=function(){function nextTickHandler(){pending=!1;var copies=callbacks.slice(0);callbacks.length=0;for(var i=0;i<copies.length;i++)copies[i]()}var callbacks=[],pending=!1,timerFunc=void 0;if("undefined"!=typeof setImmediate&&isNative(setImmediate))timerFunc=function timerFunc(){setImmediate(nextTickHandler)};else if("undefined"==typeof MessageChannel||!isNative(MessageChannel)&&"[object MessageChannelConstructor]"!==MessageChannel.toString())if("undefined"!=typeof Promise&&isNative(Promise)){var p=Promise.resolve();timerFunc=function timerFunc(){p.then(nextTickHandler)}}else timerFunc=function timerFunc(){setTimeout(nextTickHandler,0)};else{var channel=new MessageChannel,port=channel.port2;channel.port1.onmessage=nextTickHandler,timerFunc=function timerFunc(){port.postMessage(1)}}return function queueNextTick(cb,ctx){var _resolve=void 0;if(callbacks.push(function(){if(cb)try{cb.call(ctx)}catch(e){console.error(e)}else _resolve&&_resolve(ctx)}),pending||(pending=!0,timerFunc()),!cb&&"undefined"!=typeof Promise)return new Promise(function(resolve,reject){_resolve=resolve})}}(),falsy,$$skipArray={__ob__:falsy,$accessors:falsy,$vbthis:falsy,$vbsetter:falsy},uid=0,Dep=function(){function Dep(){_classCallCheck(this,Dep),this.id=uid++,this.subs=[]}return Dep.prototype.addSub=function addSub(sub){this.subs.push(sub)},Dep.prototype.removeSub=function removeSub(sub){remove(this.subs,sub)},Dep.prototype.depend=function depend(){Dep.target&&Dep.target.addDep(this)},Dep.prototype.notify=function notify(options){for(var subs=this.subs.slice(),i=0,l=subs.length;i<l;i++)subs[i].update(options)},Dep}();Dep.target=null;var targetStack=[],arrayProto=Array.prototype,arrayMethods=[];_.each(["push","pop","shift","unshift","splice","sort","reverse"],function(method){var original=arrayProto[method];arrayMethods[method]=function mutator(){for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];var ob=this.__ob__,inserted=void 0;switch(method){case"push":case"unshift":inserted=args;break;case"splice":inserted=args.slice(2)}switch(inserted&&(inserted=ob.observeArray(inserted)),method){case"push":case"unshift":args=inserted;break;case"splice":args=[args[0],args[1]].concat(inserted?inserted:[])}var result=original.apply(this,args);return notify(ob.parent,ob.parentKey,ob.dep,!0),re
for(var o=this.options,i=o.layouts.length-1;i>0;i--)btns=BI.map(btns,function(k,it){return BI.extend({},o.layouts[i],{items:[BI.extend({},o.layouts[i].el,{el:it})]})});return btns},_packageSimpleItems:function(btns){var o=this.options;return BI.map(o.items,function(i,item){return BI.stripEL(item)===item?btns[i]:BI.extend({},item,{el:btns[i]})})},_packageItems:function(items,packBtns){return BI.createItems(BI.makeArrayByArray(items,{}),BI.clone(packBtns))},_packageLayout:function(items){for(var o=this.options,layout=BI.deepClone(o.layouts[0]),lay=BI.formatEL(layout).el;lay&&lay.items&&!BI.isEmpty(lay.items);)lay=BI.formatEL(lay.items[0]).el;return lay.items=items,layout},_isSimpleLayout:function(){var o=this.options;return 1===o.layouts.length&&!BI.isArray(o.items[0])},doBehavior:function(){var args=Array.prototype.slice.call(arguments);args.unshift(this.buttons),BI.each(this.behaviors,function(i,behavior){behavior.doBehavior.apply(behavior,args)})},prependItems:function(items){var o=this.options,btns=this._btnsCreator.apply(this,arguments);return this.buttons=BI.concat(btns,this.buttons),this._isSimpleLayout()&&this.layouts&&this.layouts.prependItems?void this.layouts.prependItems(btns):(items=this._packageItems(items,this._packageBtns(btns)),void this.layouts.prependItems(this._packageLayout(items).items))},addItems:function(items){var o=this.options,btns=this._btnsCreator.apply(this,arguments);return this.buttons=BI.concat(this.buttons,btns),this._isSimpleLayout()&&this.layouts&&this.layouts.addItems?void this.layouts.addItems(btns):(items=this._packageItems(items,this._packageBtns(btns)),void this.layouts.addItems(this._packageLayout(items).items))},removeItemAt:function(indexes){BI.removeAt(this.buttons,indexes),this.layouts.removeItemAt(indexes)},removeItems:function(values){values=BI.isArray(values)?values:[values];var deleted=[];BI.each(this.buttons,function(i,button){BI.deepContains(values,button.getValue())&&deleted.push(i)}),BI.removeAt(this.buttons,deleted),this.layouts.removeItemAt(deleted)},populate:function(items){items=items||[],this.empty(),this.options.items=items,this.buttons=this._btnsCreator.apply(this,arguments),items=this._isSimpleLayout()?this._packageSimpleItems(this.buttons):this._packageItems(items,this._packageBtns(this.buttons)),this.layouts=BI.createWidget(BI.extend({element:this},this._packageLayout(items)))},setNotSelectedValue:function(v){v=BI.isArray(v)?v:[v],BI.each(this.buttons,function(i,item){BI.deepContains(v,item.getValue())?item.setSelected&&item.setSelected(!1):item.setSelected&&item.setSelected(!0)})},setEnabledValue:function(v){v=BI.isArray(v)?v:[v],BI.each(this.buttons,function(i,item){BI.deepContains(v,item.getValue())?item.setEnable(!0):item.setEnable(!1)})},setValue:function(v){v=BI.isArray(v)?v:[v],BI.each(this.buttons,function(i,item){BI.deepContains(v,item.getValue())?item.setSelected&&item.setSelected(!0):item.setSelected&&item.setSelected(!1)})},getNotSelectedValue:function(){var v=[];return BI.each(this.buttons,function(i,item){!item.isEnabled()||item.isSelected&&item.isSelected()||v.push(item.getValue())}),v},getValue:function(){var v=[];return BI.each(this.buttons,function(i,item){item.isEnabled()&&item.isSelected&&item.isSelected()&&v.push(item.getValue())}),v},getAllButtons:function(){return this.buttons},getAllLeaves:function(){return this.buttons},getSelectedButtons:function(){var btns=[];return BI.each(this.buttons,function(i,item){item.isSelected&&item.isSelected()&&btns.push(item)}),btns},getNotSelectedButtons:function(){var btns=[];return BI.each(this.buttons,function(i,item){item.isSelected&&!item.isSelected()&&btns.push(item)}),btns},getIndexByValue:function(value){var index=-1;return BI.any(this.buttons,function(i,item){if(item.isEnabled()&&item.getValue()===value)return index=i,!0}),index},getNodeById:function(id){var node;return BI.any(this.buttons,function(i,item){if(item.isEnabled()&&item.options.id===id)return node=item,!0}),node},getNodeByValue:function(value){var node;return BI.any(this.buttons,function(i,item){if(item.isEnabled()&&item.getValue()=
if(right>0&&bottom>0){if(top>=this.renderRange.minY&&bottom<=this.renderRange.maxY&&left>=this.renderRange.minX&&right<=this.renderRange.maxX)return;for(var childrenToDisplay=this._cellRenderers(bottom-top,right-left,left,top),renderedCells=[],renderedKeys={},renderedWidgets={},lefts={},tops={},i=0,len=childrenToDisplay.length;i<len;i++){var datum=childrenToDisplay[i];lefts[datum.x]=datum.x,lefts[datum.x+datum.width]=datum.x+datum.width,tops[datum.y]=datum.y,tops[datum.y+datum.height]=datum.y+datum.height}lefts=BI.toArray(lefts),tops=BI.toArray(tops);for(var leftMap=BI.invert(lefts),topMap=BI.invert(tops),leftBorder={},rightBorder={},topBorder={},bottomBorder={},assertMinBorder=function(border,offset){null==border[offset]&&(border[offset]=Number.MAX_VALUE)},assertMaxBorder=function(border,offset){null==border[offset]&&(border[offset]=0)},i=0,len=childrenToDisplay.length;i<len;i++){var datum=childrenToDisplay[i],index=this.renderedKeys[datum.index]&&this.renderedKeys[datum.index][1],child;index>=0?(datum.width!==this.renderedCells[index]._width&&(this.renderedCells[index]._width=datum.width,this.renderedCells[index].el.setWidth(datum.width)),datum.height!==this.renderedCells[index]._height&&(this.renderedCells[index]._height=datum.height,this.renderedCells[index].el.setHeight(datum.height)),this.renderedCells[index]._left!==datum.x&&this.renderedCells[index].el.element.css("left",datum.x+"px"),this.renderedCells[index]._top!==datum.y&&this.renderedCells[index].el.element.css("top",datum.y+"px"),renderedCells.push(child=this.renderedCells[index])):(child=BI.createWidget(BI.extend({type:"bi.label",width:datum.width,height:datum.height},o.items[datum.index],{cls:(o.items[datum.index].cls||"")+" container-cell"+(0===datum.y?" first-row":"")+(0===datum.x?" first-col":""),_left:datum.x,_top:datum.y})),renderedCells.push({el:child,left:datum.x,top:datum.y,_left:datum.x,_top:datum.y,_width:datum.width,_height:datum.height}));for(var startTopIndex=0|topMap[datum.y],endTopIndex=0|topMap[datum.y+datum.height],k=startTopIndex;k<=endTopIndex;k++){var t=tops[k];assertMinBorder(leftBorder,t),assertMaxBorder(rightBorder,t),leftBorder[t]=Math.min(leftBorder[t],datum.x),rightBorder[t]=Math.max(rightBorder[t],datum.x+datum.width)}for(var startLeftIndex=0|leftMap[datum.x],endLeftIndex=0|leftMap[datum.x+datum.width],k=startLeftIndex;k<=endLeftIndex;k++){var l=lefts[k];assertMinBorder(topBorder,l),assertMaxBorder(bottomBorder,l),topBorder[l]=Math.min(topBorder[l],datum.y),bottomBorder[l]=Math.max(bottomBorder[l],datum.y+datum.height)}renderedKeys[datum.index]=[datum.index,i],renderedWidgets[i]=child}var existSet={},addSet={},deleteArray=[];BI.each(renderedKeys,function(i,key){self.renderedKeys[i]?existSet[i]=key:addSet[i]=key}),BI.each(this.renderedKeys,function(i,key){existSet[i]||addSet[i]||deleteArray.push(key[1])}),BI.each(deleteArray,function(i,index){self.renderedCells[index].el._destroy()});var addedItems=[];BI.each(addSet,function(index,key){addedItems.push(renderedCells[key[1]])}),this.container.addItems(addedItems),this.container._children=renderedWidgets,this.container.attr("items",renderedCells),this.renderedCells=renderedCells,this.renderedKeys=renderedKeys;var minX=BI.min(leftBorder),maxX=BI.max(rightBorder),minY=BI.max(topBorder),maxY=BI.min(bottomBorder);this.renderRange={minX:minX,minY:minY,maxX:maxX,maxY:maxY}}},_getMaxScrollLeft:function(){return Math.max(0,this._width-this.options.width+(this.options.overflowX?BI.DOM.getScrollWidth():0))},_getMaxScrollTop:function(){return Math.max(0,this._height-this.options.height+(this.options.overflowY?BI.DOM.getScrollWidth():0))},_populate:function(items){var o=this.options;if(this._reRange(),items&&items!==this.options.items&&(this.options.items=items,this._calculateSizeAndPositionData()),o.items.length>0){this.container.setWidth(this._width),this.container.setHeight(this._height),this._calculateChildrenToRender();try{this.element.scrollTop(o.scrollTop),this.element.scrollLeft(o.scrollLeft)}catch(e){}}},setScrollLeft:function(scrollLeft){this.options.scrollLeft!==scrollLeft&&(this._s
},getValue:function(){return this.button_group.getValue.apply(this.button_group,arguments)},getAllButtons:function(){return this.button_group.getAllButtons()},getAllLeaves:function(){return this.button_group.getAllLeaves()},getSelectedButtons:function(){return this.button_group.getSelectedButtons()},getNotSelectedButtons:function(){return this.button_group.getNotSelectedButtons()},getIndexByValue:function(value){return this.button_group.getIndexByValue(value)},getNodeById:function(id){return this.button_group.getNodeById(id)},getNodeByValue:function(value){return this.button_group.getNodeByValue(value)},empty:function(){this.button_group.empty(),BI.each([this.prev,this.next],function(i,ob){ob&&ob.setVisible(!1)})},destroy:function(){BI.Loader.superclass.destroy.apply(this,arguments)}}),BI.Loader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.loader",BI.Loader),BI.Navigation=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Navigation.superclass._defaultConfig.apply(this,arguments),{direction:"bottom",logic:{dynamic:!1},single:!1,showIndex:!1,tab:!1,cardCreator:function(v){return BI.createWidget()},afterCardCreated:BI.emptyFn,afterCardShow:BI.emptyFn})},render:function(){var self=this,o=this.options;this.tab=BI.createWidget(this.options.tab,{type:"bi.button_group"}),this.cardMap={},this.showIndex=0,this.layout=BI.createWidget({type:"bi.card"}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction),BI.extend({},o.logic,{items:BI.LogicFactory.createLogicItemsByDirection(o.direction,this.tab,this.layout)})))),new BI.ShowListener({eventObj:this.tab,cardLayout:this.layout,cardNameCreator:function(v){return self.showIndex+v},cardCreator:function(v){var card=o.cardCreator(v);return self.cardMap[v]=card,card},afterCardCreated:BI.bind(this.afterCardCreated,this),afterCardShow:BI.bind(this.afterCardShow,this)})},mounted:function(){var o=this.options;o.showIndex!==!1&&this.setSelect(o.showIndex)},_deleteOtherCards:function(currCardName){var self=this,o=this.options;o.single===!0&&BI.each(this.cardMap,function(name,card){name!==currCardName+""&&(self.layout.deleteCardByName(name),delete self.cardMap[name])})},afterCardCreated:function(v){var self=this;this.cardMap[v].on(BI.Controller.EVENT_CHANGE,function(type,value,obj){self.fireEvent(BI.Controller.EVENT_CHANGE,arguments),type===BI.Events.CLICK&&self.fireEvent(BI.Navigation.EVENT_CHANGE,obj)}),this.options.afterCardCreated.apply(this,arguments)},afterCardShow:function(v){this.showIndex=v,this._deleteOtherCards(v),this.options.afterCardShow.apply(this,arguments)},populate:function(){var card=this.layout.getShowingCard();if(card)return card.populate.apply(card,arguments)},_assertCard:function(v){if(!this.layout.isCardExisted(v)){var card=this.options.cardCreator(v);this.cardMap[v]=card,this.layout.addCardByName(v,card),this.afterCardCreated(v)}},setSelect:function(v){this._assertCard(v),this.layout.showCardByName(v),this._deleteOtherCards(v),this.showIndex!==v&&(this.showIndex=v,BI.nextTick(BI.bind(this.afterCardShow,this,v)))},getSelect:function(){return this.showIndex},getSelectedCard:function(){if(BI.isKey(this.showIndex))return this.cardMap[this.showIndex]},setValue:function(v){var card=this.layout.getShowingCard();card&&card.setValue(v)},getValue:function(){var card=this.layout.getShowingCard();if(card)return card.getValue()},empty:function(){this.layout.deleteAllCard(),this.cardMap={}},destroy:function(){BI.Navigation.superclass.destroy.apply(this,arguments)}}),BI.Navigation.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.navigation",BI.Navigation),BI.Searcher=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Searcher.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-searcher",lgap:0,rgap:0,tgap:0,bgap:0,vgap:0,hgap:0,isDefaultInit:!1,isAutoSearch:!0,isAutoSync:!0,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,onSearch:function(op,callback){callback([])},el:{type:"bi.search_editor"},popup:{type:"bi.searcher_view"},adapter:null,masker:{offset:{}}})},_init:function(){BI.Sea
BI.shortcut("bi.grid_view",BI.GridView),BI.Popover=BI.inherit(BI.Widget,{_constant:{SIZE:{SMALL:"small",NORMAL:"normal",BIG:"big"},HEADER_HEIGHT:40},_defaultConfig:function(){return BI.extend(BI.Popover.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-popover bi-card bi-border-radius",size:"normal",logic:{dynamic:!1},header:null,body:null,footer:null,closable:!0})},render:function(){var self=this,o=this.options;this.startX=0,this.startY=0,this.tracker=new BI.MouseMoveTracker(function(deltaX,deltaY){var size=self._calculateSize(),W=BI.Widget._renderEngine.createElement("body").width(),H=BI.Widget._renderEngine.createElement("body").height();self.startX+=deltaX,self.startY+=deltaY,self.element.css({left:BI.clamp(self.startX,0,W-self.element.width())+"px",top:BI.clamp(self.startY,0,H-self.element.height())+"px"}),BI.Resizers._resize()},function(){self.tracker.releaseMouseMoves()},_global);var items=[{el:{type:"bi.htape",cls:"bi-message-title bi-header-background",ref:function(_ref){self.dragger=_ref},items:[{type:"bi.absolute",items:[{el:BI.isPlainObject(o.header)?BI.createWidget(o.header,{extraCls:"bi-font-bold"}):{type:"bi.label",cls:"bi-font-bold",height:this._constant.HEADER_HEIGHT,text:o.header,title:o.header,textAlign:"left"},left:20,top:0,right:0,bottom:0}]},{el:o.closable?{type:"bi.icon_button",cls:"bi-message-close close-font",height:this._constant.HEADER_HEIGHT,handler:function(){self.close()}}:{type:"bi.layout"},width:56}],height:this._constant.HEADER_HEIGHT},height:this._constant.HEADER_HEIGHT},{el:o.logic.dynamic?{type:"bi.vertical",scrolly:!1,cls:"popover-body",ref:function(){self.body=this},hgap:20,tgap:10,items:[{el:BI.createWidget(o.body)}]}:{type:"bi.absolute",items:[{el:BI.createWidget(o.body),left:20,top:10,right:20,bottom:0}]}}];o.footer&&items.push({el:{type:"bi.absolute",items:[{el:BI.createWidget(o.footer),left:20,top:0,right:20,bottom:0}],height:44},height:44});var size=this._calculateSize();return BI.extend({type:o.logic.dynamic?"bi.vertical":"bi.vtape",items:items,width:size.width},o.logic.dynamic?{type:"bi.vertical",scrolly:!1}:{type:"bi.vtape",height:size.height})},mounted:function(){var self=this,o=this.options;if(this.dragger.element.mousedown(function(e){var pos=self.element.offset();self.startX=pos.left,self.startY=pos.top,self.tracker.captureMouseMoves(e)}),o.logic.dynamic){var size=this._calculateSize(),height=this.element.height(),compareHeight=BI.clamp(height,size.height,600)-(o.footer?84:44);this.body.element.height(compareHeight)}},_calculateSize:function(){var o=this.options,size={};if(BI.isNotNull(o.size))switch(o.size){case this._constant.SIZE.SMALL:size.width=450,size.height=200;break;case this._constant.SIZE.BIG:size.width=900,size.height=500;break;default:size.width=550,size.height=500}return{width:o.width||size.width,height:o.height||size.height}},hide:function(){},open:function(){this.show(),this.fireEvent(BI.Popover.EVENT_OPEN,arguments)},close:function(){this.hide(),this.fireEvent(BI.Popover.EVENT_CLOSE,arguments)},setZindex:function(zindex){this.element.css({"z-index":zindex})},destroyed:function(){}}),BI.shortcut("bi.popover",BI.Popover),BI.BarPopover=BI.inherit(BI.Popover,{_defaultConfig:function(){return BI.extend(BI.BarPopover.superclass._defaultConfig.apply(this,arguments),{btns:[BI.i18nText("BI-Basic_Sure"),BI.i18nText("BI-Basic_Cancel")]})},beforeCreate:function(){var self=this,o=this.options;o.footer||(o.footer={type:"bi.right_vertical_adapt",lgap:10,items:[{type:"bi.button",text:this.options.btns[1],value:1,level:"ignore",handler:function(v){self.fireEvent(BI.Popover.EVENT_CANCEL,v),self.close(v)}},{type:"bi.button",text:this.options.btns[0],warningTitle:o.warningTitle,value:0,handler:function(v){self.fireEvent(BI.Popover.EVENT_CONFIRM,v),self.close(v)}}]})}}),BI.shortcut("bi.bar_popover",BI.BarPopover),BI.Popover.EVENT_CLOSE="EVENT_CLOSE",BI.Popover.EVENT_OPEN="EVENT_OPEN",BI.Popover.EVENT_CANCEL="EVENT_CANCEL",BI.Popover.EVENT_CONFIRM="EVENT_CONFIRM",BI.PopupView=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.PopupView.superclass.
items:BI.LogicFactory.createLogicItemsByDirection("left",{type:"bi.layout",width:o.blankWidth},icon1,this.text,{type:"bi.layout",width:o.height})}))))},doClick:function(){BI.BlankIconTextIconItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.BlankIconTextIconItem.EVENT_CHANGE,this.getValue(),this)},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()}}),BI.BlankIconTextIconItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.blank_icon_text_icon_item",BI.BlankIconTextIconItem),BI.BlankIconTextItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var conf=BI.BlankIconTextItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{baseCls:(conf.baseCls||"")+" bi-blank-icon-text-item",logic:{dynamic:!1},cls:"close-ha-font",blankWidth:0,iconHeight:null,iconWidth:null,textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.BlankIconTextItem.superclass._init.apply(this,arguments);var o=this.options,c=this._const,blank=BI.createWidget({type:"bi.layout",width:o.blankWidth});this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",hgap:o.textHgap,vgap:o.textVgap,lgap:o.textLgap,rgap:o.textRgap,text:o.text,value:o.value,keyword:o.keyword,height:o.height}),this.icon=BI.createWidget({type:"bi.icon_label",width:o.height,height:o.height,iconWidth:o.iconWidth,iconHeight:o.iconHeight}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(o.logic,{items:BI.LogicFactory.createLogicItemsByDirection("left",blank,this.icon,this.text)}))))},doClick:function(){BI.BlankIconTextItem.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.BlankIconTextItem.EVENT_CHANGE,this.getValue(),this)},setValue:function(){this.isReadOnly()||this.text.setValue.apply(this.text,arguments)},getValue:function(){return this.text.getValue()},setText:function(){this.text.setText.apply(this.text,arguments)},getText:function(){return this.text.getText()},doRedMark:function(){this.text.doRedMark.apply(this.text,arguments)},unRedMark:function(){this.text.unRedMark.apply(this.text,arguments)},doHighLight:function(){this.text.doHighLight.apply(this.text,arguments)},unHighLight:function(){this.text.unHighLight.apply(this.text,arguments)}}),BI.BlankIconTextItem.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.blank_icon_text_item",BI.BlankIconTextItem),BI.IconTextIconItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var conf=BI.IconTextIconItem.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{baseCls:(conf.baseCls||"")+" bi-icon-text-icon-item",logic:{dynamic:!1},iconCls1:"close-ha-font",iconCls2:"close-ha-font",iconHeight:null,iconWidth:null,textHgap:0,textVgap:0,textLgap:0,textRgap:0})},_init:function(){BI.IconTextIconItem.superclass._init.apply(this,arguments);var o=this.options,c=this._const;this.text=BI.createWidget({type:"bi.label",textAlign:"left",hgap:o.textHgap,vgap:o.textVgap,lgap:o.textLgap,rgap:o.textRgap,text:o.text,value:o.value,keyword:o.keyword,height:o.height});var icon1=BI.createWidget({type:"bi.icon_label",cls:o.iconCls1,width:o.leftIconWrapperWidth,height:o.height,iconWidth:o.iconWidth,iconHeight:o.iconHeight}),blank=BI.createWidget({type:"bi.layout",width:o.height});BI.createWidget({type:"bi.absolute",element:this,items:[{el:{type:"bi.icon_label",cls:o.iconCls2,width:o.rightIconWrapperWidth,height:o.height,iconWidth:o.iconWidth,iconHeight:o.iconHeight},top:0,bottom:0,right:0}]}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(o.logic,{items:BI.LogicFactory.createLogicItemsByDirect
},setSrc:function(src){this.options.src=src,this.element.attr("src",src)},getSrc:function(){return this.options.src}}),BI.shortcut("bi.img",BI.Img),BI.ImageCheckbox=BI.inherit(BI.IconButton,{_defaultConfig:function(){var conf=BI.ImageCheckbox.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{baseCls:(conf.baseCls||"")+" bi-image-checkbox check-box-icon",selected:!1,handler:BI.emptyFn,width:16,height:16,iconWidth:16,iconHeight:16})}}),BI.ImageCheckbox.EVENT_CHANGE=BI.IconButton.EVENT_CHANGE,BI.shortcut("bi.image_checkbox",BI.ImageCheckbox),BI.Checkbox=BI.inherit(BI.BasicButton,{props:{baseCls:"bi-checkbox",selected:!1,handler:BI.emptyFn,width:16,height:16,iconWidth:16,iconHeight:16},render:function(){var self=this,o=this.options;return{type:"bi.center_adapt",items:[{type:"bi.default",ref:function(_ref){self.checkbox=_ref},cls:"checkbox-content",width:o.iconWidth-2,height:o.iconHeight-2}]}},_setEnable:function(enable){BI.Checkbox.superclass._setEnable.apply(this,arguments),enable===!0?this.checkbox.element.removeClass("base-disabled disabled"):this.checkbox.element.addClass("base-disabled disabled")},doClick:function(){BI.Checkbox.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.Checkbox.EVENT_CHANGE)},setSelected:function(b){BI.Checkbox.superclass.setSelected.apply(this,arguments),b?this.checkbox.element.addClass("bi-high-light-background"):this.checkbox.element.removeClass("bi-high-light-background")}}),BI.Checkbox.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.checkbox",BI.Checkbox),function(document){var F=function(item){return function(input){var files=input.files||[input];return files.item||(files.item=item),files}}(function(i){return this[i]}),event={add:document.addEventListener?function(node,name,callback){return node.addEventListener(name,callback,!1),this}:function(node,name,callback){return node.attachEvent("on"+name,callback),this},del:document.removeEventListener?function(node,name,callback){return node.removeEventListener(name,callback,!1),this}:function(node,name,callback){return node.detachEvent("on"+name,callback),this},stop:function(e){return e?(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,e.preventDefault?e.preventDefault():e.returnValue=!1):self.event&&(event.returnValue=!(event.cancelBubble=!0)),!1}},sendFile=function(toString){var multipart=function(boundary,name,file){return"--".concat(boundary,CRLF,'Content-Disposition: form-data; name="',name,'"; filename="',_global.encodeURIComponent(file.fileName),'"',CRLF,"Content-Type: application/octet-stream",CRLF,CRLF,file.getAsBinary(),CRLF,"--",boundary,"--",CRLF)},isFunction=function(Function){return"[object Function]"===toString.call(Function)},split="onabort.onerror.onloadstart.onprogress".split("."),length=split.length,CRLF="\r\n",xhr=this.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),sendFile;return sendFile=xhr.upload||xhr.sendAsBinary?function(handler,maxSize,width,height){if(-1<maxSize&&maxSize<handler.file.fileSize)return void(isFunction(handler.onerror)&&handler.onerror());for(var xhr=new XMLHttpRequest,upload=xhr.upload||{addEventListener:function(event,callback){this["on"+event]=callback}},i=0;i<length;i++)upload.addEventListener(split[i].substring(2),function(event){return function(rpe){isFunction(handler[event])&&handler[event](rpe,xhr)}}(split[i]),!1);if(upload.addEventListener("load",function(rpe){handler.onreadystatechange===!1?isFunction(handler.onload)&&handler.onload(rpe,xhr):setTimeout(function(){4===xhr.readyState?isFunction(handler.onload)&&handler.onload(rpe,xhr):setTimeout(arguments.callee,15)},15)},!1),xhr.open("post",handler.url+"&filename="+_global.encodeURIComponent(handler.file.fileName),!0),xhr.upload)xhr.onreadystatechange=function(){switch(xhr.readyState){case 4:var attachO=BI.jsonDecode(xhr.responseText);handler.file.type.indexOf("image")!=-1&&(attachO.attach_type="image"),attachO.filename=handler.file.fileName,1==handler.maxlength?handler.attach_array[0]=attachO:handler.attach_array.push(attachO)}},isFunction(upload.onloadstart)&&upload.on
type:"bi.icon_button",cls:"close-font toast-icon",handler:function(){self.destroy()},width:36}),columnSize.push(36)),this.text=BI.createWidget({type:"bi.horizontal_adapt",element:this,items:items,vgap:7,columnSize:columnSize})},setText:function(text){this.text.setText(text)},beforeDestroy:function(){this.fireEvent(BI.Toast.EVENT_DESTORY)}}),BI.Toast.EVENT_DESTORY="EVENT_DESTORY",BI.shortcut("bi.toast",BI.Toast),BI.Tooltip=BI.inherit(BI.Tip,{_const:{hgap:5,vgap:3},_defaultConfig:function(){return BI.extend(BI.Tooltip.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-tooltip",text:"",level:"success",stopEvent:!1,stopPropagation:!1})},_init:function(){BI.Tooltip.superclass._init.apply(this,arguments);var self=this,o=this.options;this.element.addClass("tooltip-"+o.level);var fn=function(e){o.stopPropagation&&e.stopPropagation(),o.stopEvent&&e.stopEvent()};this.element.bind({click:fn,mousedown:fn,mouseup:fn,mouseover:fn,mouseenter:fn,mouseleave:fn,mousemove:fn});var texts=(o.text+"").split("\n");texts.length>1?BI.createWidget({type:"bi.vertical",element:this,hgap:this._const.hgap,items:BI.map(texts,function(i,text){return{type:"bi.label",textAlign:"left",whiteSpace:"normal",text:text,textHeight:18}})}):this.text=BI.createWidget({type:"bi.label",element:this,textAlign:"left",whiteSpace:"normal",text:o.text,textHeight:18,hgap:this._const.hgap})},setWidth:function(width){this.element.width(width-2*this._const.hgap)},setText:function(text){this.text&&this.text.setText(text)},setLevel:function(level){this.element.removeClass("tooltip-success").removeClass("tooltip-warning"),this.element.addClass("tooltip-"+level)}}),BI.shortcut("bi.tooltip",BI.Tooltip),BI.Trigger=BI.inherit(BI.Single,{_defaultConfig:function(){var conf=BI.Trigger.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{_baseCls:(conf._baseCls||"")+" bi-trigger cursor-pointer",height:24})},_init:function(){BI.Trigger.superclass._init.apply(this,arguments)},setKey:function(){},getKey:function(){}}),BI.CustomTree=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.CustomTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-custom-tree",expander:{el:{},popup:{type:"bi.custom_tree"}},items:[],itemsCreator:BI.emptyFn,el:{type:"bi.button_tree",chooseType:0,layouts:[{type:"bi.vertical"}]}})},_init:function(){BI.CustomTree.superclass._init.apply(this,arguments),this.initTree(this.options.items)},_formatItems:function(nodes){var self=this,o=this.options;nodes=BI.Tree.transformToTreeFormat(nodes);var items=[];return BI.each(nodes,function(i,node){if(BI.isNotEmptyArray(node.children)||node.isParent===!0){var item=BI.extend({type:"bi.expander",el:{value:node.value},popup:{type:"bi.custom_tree"}},BI.deepClone(o.expander),{id:node.id,pId:node.pId}),el=BI.stripEL(node);BI.isWidget(el)?item.el=el:(el=BI.clone(el),delete el.children,BI.extend(item.el,el)),item.popup.expander=BI.deepClone(o.expander),item.items=item.popup.items=node.children,item.itemsCreator=item.popup.itemsCreator=function(op){if(BI.isNotNull(op.node))return o.itemsCreator.apply(self,arguments);var args=Array.prototype.slice.call(arguments,0);return args[0].node=node,o.itemsCreator.apply(self,args)},BI.isNull(item.popup.el)&&(item.popup.el=BI.deepClone(o.el)),items.push(item)}else items.push(node)}),items},initTree:function(nodes){var self=this,o=this.options;this.tree=BI.createWidget(o.el,{element:this,items:this._formatItems(nodes),itemsCreator:function(op,callback){o.itemsCreator.apply(this,[op,function(items){var args=Array.prototype.slice.call(arguments,0);args[0]=self._formatItems(items),callback.apply(null,args)}])},value:o.value}),this.tree.on(BI.Controller.EVENT_CHANGE,function(type,val,obj){self.fireEvent(BI.Controller.EVENT_CHANGE,arguments),type===BI.Events.CLICK&&self.fireEvent(BI.CustomTree.EVENT_CHANGE,val,obj)})},stroke:function(nodes){this.populate.apply(this,arguments)},populate:function(nodes){var args=Array.prototype.slice.call(arguments,0);arguments.length>0&&(args[0]=this._formatItems(nodes)),this.tree.populate.apply(this.tree,args)},setV
view.expandCollapseNode(setting,node,expandFlag,animateFlag,callback)},isSelectedNode:function(setting,node){if(!node)return!1;var list=data.getRoot(setting).curSelectedList,i;for(i=list.length-1;i>=0;i--)if(node===list[i])return!0;return!1},makeDOMNodeIcon:function(html,setting,node){var nameStr=data.getNodeName(setting,node),name=setting.view.nameIsHTML?nameStr:nameStr.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");html.push("<span id='",node.tId,consts.id.ICON,"' title='' treeNode",consts.id.ICON," class='",view.makeNodeIcoClass(setting,node),"' style='",view.makeNodeIcoStyle(setting,node),"'></span><span id='",node.tId,consts.id.SPAN,"'>",name,"</span>")},makeDOMNodeLine:function(html,setting,node){html.push("<span id='",node.tId,consts.id.SWITCH,"' title='' class='",view.makeNodeLineClass(setting,node),"' treeNode",consts.id.SWITCH,"></span>")},makeDOMNodeMainAfter:function(html,setting,node){html.push("</li>")},makeDOMNodeMainBefore:function(html,setting,node){html.push("<li id='",node.tId,"' class='",consts.className.LEVEL,node.level,"' tabindex='0' hidefocus='true' treenode>")},makeDOMNodeNameAfter:function(html,setting,node){html.push("</a>")},makeDOMNodeNameBefore:function(html,setting,node){var title=data.getNodeTitle(setting,node),url=view.makeNodeUrl(setting,node),fontcss=view.makeNodeFontCss(setting,node),fontStyle=[];for(var f in fontcss)fontStyle.push(f,":",fontcss[f],";");html.push("<a id='",node.tId,consts.id.A,"' class='",consts.className.LEVEL,node.level,"' treeNode",consts.id.A,' onclick="',node.click||"",'" ',null!=url&&url.length>0?"href='"+url+"'":""," target='",view.makeNodeTarget(node),"' style='",fontStyle.join(""),"'"),tools.apply(setting.view.showTitle,[setting.treeId,node],setting.view.showTitle)&&title&&html.push("title='",title.replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),"'"),html.push(">")},makeNodeFontCss:function(setting,node){var fontCss=tools.apply(setting.view.fontCss,[setting.treeId,node],setting.view.fontCss);return fontCss&&"function"!=typeof fontCss?fontCss:{}},makeNodeIcoClass:function(setting,node){var icoCss=["ico"];return node.isAjaxing||(icoCss[0]=(node.iconSkin?node.iconSkin+"_":"")+icoCss[0],node.isParent?icoCss.push(node.open?consts.folder.OPEN:consts.folder.CLOSE):icoCss.push(consts.folder.DOCU)),consts.className.BUTTON+" "+icoCss.join("_")},makeNodeIcoStyle:function(setting,node){var icoStyle=[];if(!node.isAjaxing){var icon=node.isParent&&node.iconOpen&&node.iconClose?node.open?node.iconOpen:node.iconClose:node.icon;icon&&icoStyle.push("background:url(",icon,") 0 0 no-repeat;"),0!=setting.view.showIcon&&tools.apply(setting.view.showIcon,[setting.treeId,node],!0)||icoStyle.push("width:0px;height:0px;")}return icoStyle.join("")},makeNodeLineClass:function(setting,node){var lineClass=[];return setting.view.showLine?0==node.level&&node.isFirstNode&&node.isLastNode?lineClass.push(consts.line.ROOT):0==node.level&&node.isFirstNode?lineClass.push(consts.line.ROOTS):node.isLastNode?lineClass.push(consts.line.BOTTOM):lineClass.push(consts.line.CENTER):lineClass.push(consts.line.NOLINE),node.isParent?lineClass.push(node.open?consts.folder.OPEN:consts.folder.CLOSE):lineClass.push(consts.folder.DOCU),view.makeNodeLineClassEx(node)+lineClass.join("_")},makeNodeLineClassEx:function(node){return consts.className.BUTTON+" "+consts.className.LEVEL+node.level+" "+consts.className.SWITCH+" "},makeNodeTarget:function(node){return node.target||"_blank"},makeNodeUrl:function(setting,node){var urlKey=setting.data.key.url;return node[urlKey]?node[urlKey]:null},makeUlHtml:function(setting,node,html,content){html.push("<ul id='",node.tId,consts.id.UL,"' class='",consts.className.LEVEL,node.level," ",view.makeUlLineClass(setting,node),"' style='display:",node.open?"block":"none","'>"),html.push(content),html.push("</ul>")},makeUlLineClass:function(setting,node){return setting.view.showLine&&!node.isLastNode?consts.line.LINE:""},removeChildNodes:function(setting,node){if(node){var childKey=setting.data.key.children,nodes=node[childKey];if(nodes){for(var i=0,l=n
};var _appendNodes=view.appendNodes;view.appendNodes=function(setting,level,nodes,parentNode,initFlag,openFlag){var html="";return _appendNodes&&(html=_appendNodes.apply(view,arguments)),parentNode&&data.makeChkFlag(setting,parentNode),html}}(BI.jQuery),BI.IconChangeButton=BI.inherit(BI.Single,{_defaultConfig:function(){var conf=BI.IconChangeButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{baseCls:"bi-icon-change-button",iconCls:"",iconWidth:null,iconHeight:null,stopEvent:!1,stopPropagation:!1,selected:!1,once:!1,forceSelected:!1,forceNotSelected:!1,disableSelected:!1,shadow:!1,isShadowShowingOnSelected:!1,trigger:null,handler:BI.emptyFn})},_init:function(){BI.IconChangeButton.superclass._init.apply(this,arguments);var self=this,o=this.options;this.button=BI.createWidget({type:"bi.icon_button",element:this,cls:o.iconCls,height:o.height,iconWidth:o.iconWidth,iconHeight:o.iconHeight,stopEvent:o.stopEvent,stopPropagation:o.stopPropagation,selected:o.selected,once:o.once,forceSelected:o.forceSelected,forceNotSelected:o.forceNotSelected,disableSelected:o.disableSelected,shadow:o.shadow,isShadowShowingOnSelected:o.isShadowShowingOnSelected,trigger:o.trigger,handler:o.handler}),this.button.on(BI.Controller.EVENT_CHANGE,function(){self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button.on(BI.IconButton.EVENT_CHANGE,function(){self.fireEvent(BI.IconChangeButton.EVENT_CHANGE,arguments)})},isSelected:function(){return this.button.isSelected()},setSelected:function(b){this.button.setSelected(b)},setIcon:function(cls){var o=this.options;o.iconCls!==cls&&(this.element.removeClass(o.iconCls).addClass(cls),o.iconCls=cls)}}),BI.IconChangeButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.icon_change_button",BI.IconChangeButton),BI.TriggerIconButton=BI.inherit(BI.IconButton,{_defaultConfig:function(){var conf=BI.TriggerIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{baseCls:(conf.baseCls||"")+" bi-trigger-icon-button",extraCls:"pull-down-font"})}}),BI.TriggerIconButton.EVENT_CHANGE=BI.IconButton.EVENT_CHANGE,BI.shortcut("bi.trigger_icon_button",BI.TriggerIconButton),BI.HalfIconButton=BI.inherit(BI.IconButton,{_defaultConfig:function(){var conf=BI.HalfIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{extraCls:"bi-half-icon-button check-half-select-icon",height:16,width:16,iconWidth:16,iconHeight:16,selected:!1})}}),BI.HalfIconButton.EVENT_CHANGE=BI.IconButton.EVENT_CHANGE,BI.shortcut("bi.half_icon_button",BI.HalfIconButton),BI.HalfButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var conf=BI.HalfIconButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{extraCls:"bi-half-button bi-high-light-border",height:14,width:14,selected:!1})},_init:function(){BI.HalfButton.superclass._init.apply(this,arguments),BI.createWidget({type:"bi.center_adapt",element:this.element,items:[{type:"bi.layout",cls:"bi-high-light-background",width:8,height:8}]})},doClick:function(){BI.HalfButton.superclass.doClick.apply(this,arguments),this.isValid()&&this.fireEvent(BI.HalfButton.EVENT_CHANGE)}}),BI.HalfButton.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.half_button",BI.HalfButton),BI.MultiSelectItem=BI.inherit(BI.BasicButton,{_defaultConfig:function(){return BI.extend(BI.MultiSelectItem.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-multi-select-item",height:24,logic:{dynamic:!1},iconWrapperWidth:26})},_init:function(){BI.MultiSelectItem.superclass._init.apply(this,arguments);var self=this,o=this.options;this.checkbox=BI.createWidget({type:"bi.checkbox"}),this.text=BI.createWidget({type:"bi.label",cls:"list-item-text",textAlign:"left",whiteSpace:"nowrap",textHeight:o.height,height:o.height,hgap:o.hgap,rgap:o.rgap,text:o.text,keyword:o.keyword,value:o.value,py:o.py}),this.checkbox.on(BI.Controller.EVENT_CHANGE,function(type){type===BI.Events.CLICK&&self.setSelected(self.isSelected())}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("horizontal",BI.extend(o.logic,{items:BI.LogicFactory.createL
log.NDay=1;var items=[];return BI.each(BI.range(42),function(i){var td={},YY=log.ymd[0],MM=log.ymd[1]+1,DD;i<offSetFDay?(td.lastMonth=!0,DD=i+log.PDay,1===MM&&(YY-=1),MM=1===MM?12:MM-1):i>=offSetFDay&&i<offSetFDay+MD[log.ymd[1]]?(DD=i-offSetFDay+1,i-offSetFDay+1===log.ymd[2]&&(td.currentDay=!0)):(td.nextMonth=!0,DD=log.NDay++,12===MM&&(YY+=1),MM=12===MM?1:MM+1),BI.checkDateVoid(YY,MM,DD,mins,maxs)[0]&&(td.disabled=!0),td.text=DD,items.push(td)}),items},_init:function(){BI.Calendar.superclass._init.apply(this,arguments);var self=this,o=this.options,items=BI.map(this._getWeekLabel(),function(i,value){return{type:"bi.label",height:24,text:value}}),title=BI.createWidget({type:"bi.button_group",height:44,items:items,layouts:[{type:"bi.center",hgap:5,vgap:10}]}),days=this._dateCreator(o.year,o.month-1,o.day);items=[],items.push(days.slice(0,7)),items.push(days.slice(7,14)),items.push(days.slice(14,21)),items.push(days.slice(21,28)),items.push(days.slice(28,35)),items.push(days.slice(35,42)),items=BI.map(items,function(i,item){return BI.map(item,function(j,td){var month=td.lastMonth?o.month-1:td.nextMonth?o.month+1:o.month;return BI.extend(td,{type:"bi.calendar_date_item",textAlign:"center",whiteSpace:"normal",once:!1,forceSelected:!0,height:24,value:o.year+"-"+month+"-"+td.text,disabled:td.lastMonth||td.nextMonth||td.disabled,lgap:5,rgap:5})})}),this.days=BI.createWidget({type:"bi.button_group",items:BI.createItems(items,{}),layouts:[BI.LogicFactory.createLogic("table",BI.extend({},o.logic,{columns:7,rows:6,columnSize:[1/7,1/7,1/7,1/7,1/7,1/7,1/7],rowSize:24,vgap:10}))]}),this.days.on(BI.Controller.EVENT_CHANGE,function(){self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic("vertical",BI.extend({},o.logic,{items:BI.LogicFactory.createLogicItemsByDirection("top",title,this.days)}))))},_getWeekLabel:function(){return BI.map(BI.range(0,7),function(idx,v){return BI.Date._SDN[(v+BI.StartOfWeek)%7]})},isFrontDate:function(){var o=this.options,c=this._const,Y=o.year,M=o.month,De=BI.getDate(),day=De.getDay();Y=0|Y,De.setFullYear(Y,M,1);var newDate=BI.getOffsetDate(De,-1*(day+1));return!!BI.checkDateVoid(newDate.getFullYear(),newDate.getMonth(),newDate.getDate(),o.min,o.max)[0]},isFinalDate:function(){var o=this.options,c=this._const,Y=o.year,M=o.month,De=BI.getDate(),day=De.getDay();Y=0|Y,De.setFullYear(Y,M,1);var newDate=BI.getOffsetDate(De,42-day);return!!BI.checkDateVoid(newDate.getFullYear(),newDate.getMonth(),newDate.getDate(),o.min,o.max)[0]},setValue:function(ob){this.days.setValue([ob.year+"-"+ob.month+"-"+ob.day])},getValue:function(){var date=this.days.getValue()[0].match(/\d+/g);return{year:0|date[0],month:0|date[1],day:0|date[2]}}}),BI.extend(BI.Calendar,{getPageByDateJSON:function(json){var year=BI.getDate().getFullYear(),month=BI.getDate().getMonth(),page=12*(json.year-year);return page+=json.month-1-month},getDateJSONByPage:function(v){var months=BI.getDate().getMonth(),page=v;page+=months;var year=BI.parseInt(page/12);page<0&&page%12!==0&&year--;var month=page>=0?page%12:(12+page%12)%12;return{year:BI.getDate().getFullYear()+year,month:month+1}}}),BI.shortcut("bi.calendar",BI.Calendar),BI.YearCalendar=BI.inherit(BI.Widget,{_defaultConfig:function(){var conf=BI.YearCalendar.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{baseCls:"bi-year-calendar",behaviors:{},logic:{dynamic:!1},min:"1900-01-01",max:"2099-12-31",year:null})},_yearCreator:function(Y){var o=this.options;Y=0|Y;var start=BI.YearCalendar.getStartYear(Y),items=[],startDate=BI.parseDateTime(o.min,"%Y-%X-%d"),endDate=BI.parseDateTime(o.max,"%Y-%X-%d");return BI.each(BI.range(BI.YearCalendar.INTERVAL),function(i){var td={};BI.checkDateVoid(start+i,1,1,BI.print(BI.getDate(startDate.getFullYear(),0,1),"%Y-%X-%d"),BI.print(BI.getDate(endDate.getFullYear(),0,1),"%Y-%X-%d"))[0]&&(td.disabled=!0),td.text=start+i,items.push(td)}),items},_init:function(){BI.YearCalendar.superclass._init.apply(this,arguments);var self=this,o=this.options;this.currentYear=BI.getDate().getFullYea
ref:function(_ref){self.wheel=_ref}},left:0,right:0,top:0,bottom:0},{el:{type:"bi.layout",cls:"overlay",ref:function(_ref){self.overlay=_ref}},top:47,left:47,width:101,height:101},{el:{type:"bi.layout",cls:"marker",ref:function(_ref){self.hMarker=_ref},scrollable:!1,width:17,height:17}},{el:{type:"bi.layout",cls:"marker",ref:function(_ref){self.slMarker=_ref},scrollable:!1,width:17,height:17}}]}},mounted:function(){var o=this.options;BI.isKey(o.value)&&this.setValue(o.value)},_unpack:function(color){return 7===color.length?[parseInt("0x"+color.substring(1,3))/255,parseInt("0x"+color.substring(3,5))/255,parseInt("0x"+color.substring(5,7))/255]:4===color.length?[parseInt("0x"+color.substring(1,2))/15,parseInt("0x"+color.substring(2,3))/15,parseInt("0x"+color.substring(3,4))/15]:void 0},_pack:function(rgb){var r=Math.round(255*rgb[0]),g=Math.round(255*rgb[1]),b=Math.round(255*rgb[2]);return"#"+(r<16?"0":"")+r.toString(16)+(g<16?"0":"")+g.toString(16)+(b<16?"0":"")+b.toString(16)},_setColor:function(color){var unpack=this._unpack(color);this.value!==color&&unpack&&(this.value=color,this.rgb=unpack,this.hsl=this._RGBToHSL(this.rgb),this._updateDisplay())},_setHSL:function(hsl){return this.hsl=hsl,this.rgb=this._HSLToRGB(hsl),this.value=this._pack(this.rgb),this._updateDisplay(),this},_HSLToRGB:function(hsl){var m1,m2,r,g,b,h=hsl[0],s=hsl[1],l=hsl[2];return m2=l<=.5?l*(s+1):l+s-l*s,m1=2*l-m2,[this._hueToRGB(m1,m2,h+.33333),this._hueToRGB(m1,m2,h),this._hueToRGB(m1,m2,h-.33333)]},_hueToRGB:function(m1,m2,h){return h=h<0?h+1:h>1?h-1:h,6*h<1?m1+(m2-m1)*h*6:2*h<1?m2:3*h<2?m1+(m2-m1)*(.66666-h)*6:m1},_RGBToHSL:function(rgb){var min,max,delta,h,s,l,r=rgb[0],g=rgb[1],b=rgb[2];return min=Math.min(r,Math.min(g,b)),max=Math.max(r,Math.max(g,b)),delta=max-min,l=(min+max)/2,s=0,l>0&&l<1&&(s=delta/(l<.5?2*l:2-2*l)),h=0,delta>0&&(max==r&&max!=g&&(h+=(g-b)/delta),max==g&&max!=b&&(h+=2+(b-r)/delta),max==b&&max!=r&&(h+=4+(r-g)/delta),h/=6),[h,s,l]},_updateDisplay:function(){var angle=6.28*this.hsl[0];this.hMarker.element.css({left:Math.round(Math.sin(angle)*this.constants.RADIUS+this.constants.WIDTH/2)+"px",top:Math.round(-Math.cos(angle)*this.constants.RADIUS+this.constants.WIDTH/2)+"px"}),this.slMarker.element.css({left:Math.round(this.constants.SQUARE*(.5-this.hsl[1])+this.constants.WIDTH/2)+"px",top:Math.round(this.constants.SQUARE*(.5-this.hsl[2])+this.constants.WIDTH/2)+"px"}),this.colorWrapper.element.css("backgroundColor",this._pack(this._HSLToRGB([this.hsl[0],1,.5]))),this.fireEvent(BI.Farbtastic.EVENT_CHANGE,this.getValue(),this)},_absolutePosition:function(el){var r={x:el.offsetLeft,y:el.offsetTop};if(el.offsetParent){var tmp=this._absolutePosition(el.offsetParent);r.x+=tmp.x,r.y+=tmp.y}return r},_widgetCoords:function(event){var x,y,el=event.target||event.srcElement,reference=this.wheel.element[0];if("undefined"!=typeof event.offsetX){for(var pos={x:event.offsetX,y:event.offsetY},e=el;e;)e.mouseX=pos.x,e.mouseY=pos.y,pos.x+=e.offsetLeft,pos.y+=e.offsetTop,e=e.offsetParent;for(var e=reference,offset={x:0,y:0};e;){if("undefined"!=typeof e.mouseX){x=e.mouseX-offset.x,y=e.mouseY-offset.y;break}offset.x+=e.offsetLeft,offset.y+=e.offsetTop,e=e.offsetParent}for(e=el;e;)e.mouseX=void 0,e.mouseY=void 0,e=e.offsetParent}else{var pos=this._absolutePosition(reference);x=(event.pageX||0)-pos.x,y=(event.pageY||0)-pos.y}return{x:x-this.constants.WIDTH/2,y:y-this.constants.WIDTH/2}},_doMouseMove:function(event){var pos=this._widgetCoords(event);if(this.circleDrag){var hue=Math.atan2(pos.x,-pos.y)/6.28;hue<0&&(hue+=1),this._setHSL([hue,this.hsl[1],this.hsl[2]])}else{var sat=Math.max(0,Math.min(1,-(pos.x/this.constants.SQUARE)+.5)),lum=Math.max(0,Math.min(1,-(pos.y/this.constants.SQUARE)+.5));this._setHSL([this.hsl[0],sat,lum])}},doClick:function(event){var pos=this._widgetCoords(event);return this.circleDrag=2*Math.max(Math.abs(pos.x),Math.abs(pos.y))>this.constants.SQUARE,this._doMouseMove(event),!1},setValue:function(color){this._setColor(color)},getValue:function(){return this.value}}),BI.Farbtastic.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.f
},setValue:function(v){this.trigger.setValue(v),this.popup.setValue(v),this._checkError(v)},getValue:function(){var value=this.popup.getValue();return BI.isNull(value)?[]:BI.isArray(value)?value:[value]},populate:function(items){this.options.items=items,this.textIconCombo.populate(items)}}),BI.TextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_combo",BI.TextValueCombo),BI.SmallTextValueCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SmallTextValueCombo.superclass._defaultConfig.apply(this,arguments),{width:100,height:20,chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,el:{},text:""})},_init:function(){BI.SmallTextValueCombo.superclass._init.apply(this,arguments);var self=this,o=this.options;this.trigger=BI.createWidget(o.el,{type:"bi.small_select_text_trigger",items:o.items,height:o.height,text:o.text}),this.popup=BI.createWidget({type:"bi.text_value_combo_popup",chooseType:o.chooseType,items:o.items}),this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE,function(){self.setValue(self.popup.getValue()),self.SmallTextValueCombo.hideView(),self.fireEvent(BI.SmallTextValueCombo.EVENT_CHANGE)}),this.popup.on(BI.Controller.EVENT_CHANGE,function(){self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.SmallTextValueCombo=BI.createWidget({type:"bi.combo",element:this,container:o.container,adjustLength:2,el:this.trigger,popup:{el:this.popup,maxHeight:240,minHeight:25}})},setValue:function(v){this.trigger.setValue(v),this.popup.setValue(v)},getValue:function(){return this.popup.getValue()},populate:function(items){this.options.items=items,this.SmallTextValueCombo.populate(items)}}),BI.SmallTextValueCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.small_text_value_combo",BI.SmallTextValueCombo),BI.TextValueComboPopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.TextValueComboPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-text-icon-popup",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE})},_init:function(){BI.TextValueComboPopup.superclass._init.apply(this,arguments);var o=this.options,self=this;this.popup=BI.createWidget({type:"bi.button_group",items:BI.createItems(o.items,{type:"bi.single_select_item",textAlign:o.textAlign,height:24}),chooseType:o.chooseType,layouts:[{type:"bi.vertical"}],value:o.value}),this.popup.on(BI.Controller.EVENT_CHANGE,function(type,val,obj){self.fireEvent(BI.Controller.EVENT_CHANGE,arguments),type===BI.Events.CLICK&&self.fireEvent(BI.TextValueComboPopup.EVENT_CHANGE,val,obj)}),this.check(),BI.createWidget({type:"bi.vertical",element:this,vgap:5,items:[this.popup]})},populate:function(items){BI.TextValueComboPopup.superclass.populate.apply(this,arguments),items=BI.createItems(items,{type:"bi.single_select_item",height:24}),this.popup.populate(items)},getValue:function(){return this.popup.getValue()},setValue:function(v){this.popup.setValue(v)}}),BI.TextValueComboPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_combo_popup",BI.TextValueComboPopup),BI.ClearEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){var conf=BI.ClearEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{baseCls:"bi-clear-editor",height:24,errorText:"",watermark:"",validationChecker:BI.emptyFn,quitChecker:BI.emptyFn})},_init:function(){BI.ClearEditor.superclass._init.apply(this,arguments);var self=this,o=this.options;this.editor=BI.createWidget({type:"bi.editor",height:o.height,watermark:o.watermark,allowBlank:!0,errorText:o.errorText,validationChecker:o.validationChecker,quitChecker:o.quitChecker,value:o.value}),this.clear=BI.createWidget({type:"bi.icon_button",stopEvent:!0,cls:"search-close-h-font"}),this.clear.on(BI.IconButton.EVENT_CHANGE,function(){self.setValue(""),self.fireEvent(BI.Controller.EVENT_CHANGE,BI.Events.STOPEDIT),self.fireEvent(BI.ClearEditor.EVENT_CLEAR)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:this.clear,width:24}]}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.Editor.EVENT_FOCUS,f
BI.MultiPopupView=BI.inherit(BI.PopupView,{_defaultConfig:function(){var conf=BI.MultiPopupView.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{_baseCls:(conf._baseCls||"")+" bi-multi-list-view",buttons:[BI.i18nText("BI-Basic_Sure")]})},_init:function(){BI.MultiPopupView.superclass._init.apply(this,arguments)},_createToolBar:function(){var o=this.options,self=this;if(0!==o.buttons.length){var text=[];return BI.each(o.buttons,function(idx,item){text.push({text:item,value:idx})}),this.buttongroup=BI.createWidget({type:"bi.button_group",cls:"list-view-toolbar bi-high-light bi-split-top",height:24,items:BI.createItems(text,{type:"bi.text_button",once:!1,shadow:!0,isShadowShowingOnSelected:!0}),layouts:[{type:"bi.center",hgap:0,vgap:0}]}),this.buttongroup.on(BI.ButtonGroup.EVENT_CHANGE,function(value,obj){self.fireEvent(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,value,obj)}),this.buttongroup}}}),BI.MultiPopupView.EVENT_CHANGE="EVENT_CHANGE",BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.multi_popup_view",BI.MultiPopupView),BI.PopupPanel=BI.inherit(BI.MultiPopupView,{_defaultConfig:function(){var conf=BI.PopupPanel.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{baseCls:(conf.baseCls||"")+" bi-popup-panel",title:""})},_init:function(){BI.PopupPanel.superclass._init.apply(this,arguments)},_createTool:function(){var self=this,o=this.options,close=BI.createWidget({type:"bi.icon_button",cls:"close-h-font",width:25,height:25});return close.on(BI.IconButton.EVENT_CHANGE,function(){self.setVisible(!1),self.fireEvent(BI.PopupPanel.EVENT_CLOSE)}),BI.createWidget({type:"bi.htape",cls:"popup-panel-title bi-header-background",height:25,items:[{el:{type:"bi.label",textAlign:"left",text:o.title,height:25,lgap:10}},{el:close,width:25}]})}}),BI.PopupPanel.EVENT_CHANGE="EVENT_CHANGE",BI.PopupPanel.EVENT_CLOSE="EVENT_CLOSE",BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON="EVENT_CLICK_TOOLBAR_BUTTON",BI.shortcut("bi.popup_panel",BI.PopupPanel),BI.ListPane=BI.inherit(BI.Pane,{_defaultConfig:function(){var conf=BI.ListPane.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{baseCls:(conf.baseCls||"")+" bi-list-pane",logic:{dynamic:!0},lgap:0,rgap:0,tgap:0,bgap:0,vgap:0,hgap:0,items:[],itemsCreator:BI.emptyFn,hasNext:BI.emptyFn,onLoaded:BI.emptyFn,el:{type:"bi.button_group"}})},_init:function(){BI.ListPane.superclass._init.apply(this,arguments);var self=this,o=this.options;this.button_group=BI.createWidget(o.el,{type:"bi.button_group",chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{},items:o.items,itemsCreator:function(op,calback){1===op.times&&(self.empty(),BI.nextTick(function(){self.loading()})),o.itemsCreator(op,function(){calback.apply(self,arguments),1===op.times&&BI.nextTick(function(){self.loaded(),self.check()})})},hasNext:o.hasNext,layouts:[{type:"bi.vertical"}]}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(type,value,obj){self.fireEvent(BI.Controller.EVENT_CHANGE,arguments),type===BI.Events.CLICK&&self.fireEvent(BI.ListPane.EVENT_CHANGE,value,obj)}),this.check(),BI.createWidget(BI.extend({element:this},BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Top),BI.extend({scrolly:!0,lgap:o.lgap,rgap:o.rgap,tgap:o.tgap,bgap:o.bgap,vgap:o.vgap,hgap:o.hgap},o.logic,{items:BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Top,this.button_group)}))))},hasPrev:function(){return this.button_group.hasPrev&&this.button_group.hasPrev()},hasNext:function(){return this.button_group.hasNext&&this.button_group.hasNext()},prependItems:function(items){this.options.items=items.concat(this.options.items),this.button_group.prependItems.apply(this.button_group,arguments),this.check()},addItems:function(items){this.options.items=this.options.items.concat(items),this.button_group.addItems.apply(this.button_group,arguments),this.check()},removeItemAt:function(indexes){indexes=indexes||[],BI.removeAt(this.options.items,indexes),this.button_group.removeItemAt.apply(this.button_group,arguments),this.check
5 years ago
type:"bi.label",cls:"page-ellipsis",text:"…"}),view.push({text:last,value:"last",disabled:!(pages>groups&&dict.end<pages&&0!==groups)})),dict.flow=!prev&&0===groups,(!o.dynamicShow&&!o.dynamicShowPrevNext&&next||curr!==pages&&next||dict.flow)&&view.push(function(){return BI.isKey(next)?pages===!1?{text:next,value:"next",disabled:o.hasNext(curr)===!1}:dict.flow&&curr===pages?{text:next,value:"next",disabled:!0}:{text:next,value:"next",disabled:!(curr!==pages&&next||dict.flow)}:BI.extend({disabled:pages===!1?o.hasNext(curr)===!1:!(curr!==pages&&next||dict.flow)},next)}()),this.button_group=BI.createWidget({type:"bi.button_group",element:this,items:BI.createItems(view,{cls:"page-item bi-border bi-list-item-active",height:23,hgap:10}),behaviors:o.behaviors,layouts:o.layouts}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(type,value,obj){if(self._lock!==!0){if(self._lock=!0,self._debouce(),type===BI.Events.CLICK){var v=self.button_group.getValue()[0];switch(v){case"first":self.currPage=1;break;case"last":self.currPage=pages;break;case"prev":self.currPage--;break;case"next":self.currPage++;break;default:self.currPage=v}o.jump.apply(self,[{pages:pages,curr:self.currPage}]),self._populate(),self.fireEvent(BI.DetailPager.EVENT_CHANGE,obj)}self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}),this.fireEvent(BI.DetailPager.EVENT_AFTER_POPULATE)},getCurrentPage:function(){return this.currPage},setAllPages:function(pages){this.options.pages=pages},hasPrev:function(v){v||(v=1);var o=this.options,pages=this.options.pages;return pages===!1?o.hasPrev(v):v>1},hasNext:function(v){v||(v=1);var o=this.options,pages=this.options.pages;return pages===!1?o.hasNext(v):v<pages},setValue:function(v){var o=this.options;if(v=0|v,v=v<1?1:v,o.pages===!1){var lastPage=BI.result(o,"lastPage"),firstPage=1;this.currPage=v>lastPage?lastPage:(firstPage=BI.result(o,"firstPage"),v<firstPage?firstPage:v)}else v=v>o.pages?o.pages:v,this.currPage=v;this._populate()},getValue:function(){var val=this.button_group.getValue()[0];switch(val){case"prev":return-1;case"next":return 1;case"first":return BI.MIN;case"last":return BI.MAX;default:return val}},attr:function(key,value){BI.DetailPager.superclass.attr.apply(this,arguments),"curr"===key&&(this.currPage=BI.result(this.options,"curr"))},populate:function(){this._populate()}}),BI.DetailPager.EVENT_CHANGE="EVENT_CHANGE",BI.DetailPager.EVENT_AFTER_POPULATE="EVENT_AFTER_POPULATE",BI.shortcut("bi.detail_pager",BI.DetailPager),BI.SegmentButton=BI.inherit(BI.BasicButton,{_defaultConfig:function(){var conf=BI.SegmentButton.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{baseCls:(conf.baseCls||"")+" bi-segment-button bi-list-item-select",shadow:!0,readonly:!0,hgap:5})},_init:function(){BI.SegmentButton.superclass._init.apply(this,arguments);var opts=this.options,self=this;this.text=BI.createWidget({type:"bi.label",element:this,textHeight:opts.height,whiteSpace:opts.whiteSpace,text:opts.text,value:opts.value,hgap:opts.hgap})},setSelected:function(){BI.SegmentButton.superclass.setSelected.apply(this,arguments)},setText:function(text){BI.SegmentButton.superclass.setText.apply(this,arguments),this.text.setText(text)},destroy:function(){BI.SegmentButton.superclass.destroy.apply(this,arguments)}}),BI.shortcut("bi.segment_button",BI.SegmentButton),BI.Segment=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.Segment.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-segment",items:[],height:24})},_init:function(){BI.Segment.superclass._init.apply(this,arguments);var self=this,o=this.options;this.buttonGroup=BI.createWidget({element:this,type:"bi.button_group",value:o.value,items:BI.createItems(o.items,{type:"bi.segment_button",height:o.height-2,whiteSpace:o.whiteSpace}),layout:[{type:"bi.center"}]}),this.buttonGroup.on(BI.Controller.EVENT_CHANGE,function(){self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.buttonGroup.on(BI.ButtonGroup.EVENT_CHANGE,function(value,obj){self.fireEvent(BI.Segment.EVENT_CHANGE,value,obj)})},_setEnable:function(enable){BI.Segmen
dynamic:!0},type:"bi.navigation",tab:this.datePicker,cardCreator:BI.bind(this._createNav,this),afterCardCreated:function(){},afterCardShow:function(){this.setValue(self.selectedTime)}}),this.datePicker.on(BI.DatePicker.EVENT_CHANGE,function(){self.selectedTime=self.datePicker.getValue(),self.selectedTime.day=1,self.calendar.setSelect(BI.Calendar.getPageByDateJSON(self.selectedTime))}),this.calendar.on(BI.Navigation.EVENT_CHANGE,function(){self.selectedTime=self.calendar.getValue(),self.setValue(self.selectedTime),self.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE)}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.calendar,left:5,right:5},{el:{type:"bi.layout",cls:"bi-split-top"},height:1,top:40,left:0,right:0}]})},setValue:function(timeOb){this.datePicker.setValue(timeOb),this.calendar.setSelect(BI.Calendar.getPageByDateJSON(timeOb)),this.calendar.setValue(timeOb),this.selectedTime=timeOb},getValue:function(){return this.selectedTime}}),BI.DateCalendarPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.date_calendar_popup",BI.DateCalendarPopup),BI.MonthPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MonthPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-month-popup",behaviors:{}})},_init:function(){BI.MonthPopup.superclass._init.apply(this,arguments);var self=this,o=this.options,month=[1,7,2,8,3,9,4,10,5,11,6,12],items=[];items.push(month.slice(0,2)),items.push(month.slice(2,4)),items.push(month.slice(4,6)),items.push(month.slice(6,8)),items.push(month.slice(8,10)),items.push(month.slice(10,12)),items=BI.map(items,function(i,item){return BI.map(item,function(j,td){return{type:"bi.text_item",cls:"bi-list-item-select",textAlign:"center",whiteSpace:"nowrap",once:!1,forceSelected:!0,height:23,width:38,value:td,text:td}})}),this.month=BI.createWidget({type:"bi.button_group",element:this,behaviors:o.behaviors,items:BI.createItems(items,{}),layouts:[BI.LogicFactory.createLogic("table",BI.extend({dynamic:!0},{columns:2,rows:6,columnSize:[.5,.5],rowSize:25})),{type:"bi.center_adapt",vgap:1,hgap:2}],value:o.value}),this.month.on(BI.Controller.EVENT_CHANGE,function(type){self.fireEvent(BI.Controller.EVENT_CHANGE,arguments),type===BI.Events.CLICK&&self.fireEvent(BI.MonthPopup.EVENT_CHANGE)})},getValue:function(){return this.month.getValue()[0]},setValue:function(v){v=BI.parseInt(v),this.month.setValue([v])}}),BI.MonthPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.month_popup",BI.MonthPopup),BI.YearPopup=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.YearPopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-year-popup",behaviors:{},min:"1900-01-01",max:"2099-12-31"})},_createYearCalendar:function(v){var o=this.options,y=this._year,calendar=BI.createWidget({type:"bi.year_calendar",behaviors:o.behaviors,min:o.min,max:o.max,logic:{dynamic:!0},year:y+12*v});return calendar.setValue(this._year),calendar},_init:function(){BI.YearPopup.superclass._init.apply(this,arguments);var self=this,o=this.options;this.selectedYear=this._year=BI.getDate().getFullYear();var backBtn=BI.createWidget({type:"bi.icon_button",cls:"pre-page-h-font",width:24,height:24,value:-1}),preBtn=BI.createWidget({type:"bi.icon_button",cls:"next-page-h-font",width:24,height:24,value:1});this.navigation=BI.createWidget({type:"bi.navigation",element:this,single:!0,logic:{dynamic:!0},tab:{cls:"year-popup-navigation bi-high-light bi-split-top",height:24,items:[backBtn,preBtn]},cardCreator:BI.bind(this._createYearCalendar,this),afterCardShow:function(){this.setValue(self.selectedYear);var calendar=this.getSelectedCard();backBtn.setEnable(!calendar.isFrontYear()),preBtn.setEnable(!calendar.isFinalYear())}}),this.navigation.on(BI.Navigation.EVENT_CHANGE,function(){self.selectedYear=this.getValue(),self.fireEvent(BI.Controller.EVENT_CHANGE,arguments),self.fireEvent(BI.YearPopup.EVENT_CHANGE,self.selectedYear)}),BI.isKey(o.value)&&this.setValue(o.value)},getValue:function(){return this.selectedYear},setValue:function(v){var o=this.options;v=BI.parseInt(v);var startDate=BI.parseDateTime(o.m
item.title=item.title||item.text,item.textRgap=10,item.isNeedAdjustWidth=!1,item.logic={dynamic:!0});var el_done={};el_done.el=item,item_done.items.push(el_done)}),self._isGroup(item_done.items)&&BI.each(item_done.items,function(i,item){self.singleValues.push(item.el.value)}),result.push(item_done),self._needSpliter(i,items.length)){var spliter_container=BI.createWidget({type:"bi.vertical",items:[{el:{type:"bi.layout",cls:"bi-down-list-spliter bi-split-top cursor-pointer",height:0}}],cls:"bi-down-list-spliter-container cursor-pointer",vgap:5,lgap:10,rgap:0});result.push(spliter_container)}}),result},_isGroup:function(i){return i.length>1},_needSpliter:function(i,itemLength){return i<itemLength-1},_createChildValue:function(fatherValue,childValue){return fatherValue+"_"+childValue},_digest:function(valueItem){var self=this,valueArray=[];return BI.each(valueItem,function(i,item){var value;value=BI.isNotNull(item.childValue)?self._createChildValue(item.value,item.childValue):item.value,valueArray.push(value)}),valueArray},_checkValues:function(values){function joinValue(sources,targets){var value="";return BI.some(sources,function(idx,s){return BI.some(targets,function(id,t){if(s===t)return value=s,!0})}),value}var value=[];return BI.each(this.items,function(idx,itemGroup){BI.each(itemGroup,function(id,item){if(BI.isNotNull(item.children)){var childValues=BI.map(item.children,"value"),v=joinValue(childValues,values[idx]);BI.isNotEmptyString(v)&&value.push(v)}else item.value===values[idx][0]&&value.push(values[idx][0])})}),value},populate:function(items){BI.DownListPopup.superclass.populate.apply(this,arguments),this.items=BI.deepClone(items),this.childValueMap={},this.fatherValueMap={},this.singleValues=[];var children=this._createChildren(this.items),popupItem=BI.createItems(children,{},{adjustLength:-2});this.popup.populate(popupItem)},setValue:function(valueItem){this.popup.setValue(this._digest(valueItem))},_getValue:function(){var v=[];return BI.each(this.popup.getAllButtons(),function(i,item){i%2===0&&v.push(item.getValue())}),v},getValue:function(){var self=this,result=[],values=this._checkValues(this._getValue());return BI.each(values,function(i,value){var valueItem={};if(BI.isNotNull(self.childValueMap[value])){var fartherValue=self.fatherValueMap[value];valueItem.childValue=self.childValueMap[value],valueItem.value=fartherValue}else valueItem.value=value;result.push(valueItem)}),result}}),BI.DownListPopup.EVENT_CHANGE="EVENT_CHANGE",BI.DownListPopup.EVENT_SON_VALUE_CHANGE="EVENT_SON_VALUE_CHANGE",BI.shortcut("bi.down_list_popup",BI.DownListPopup),!function(){BI.DynamicDateHelper={},BI.extend(BI.DynamicDateHelper,{getCalculation:function(obj){var date=BI.getDate();return this.getCalculationByDate(date,obj)},getCalculationByDate:function(date,obj){if(BI.isNotNull(obj.year)&&(date=BI.getDate(date.getFullYear()+BI.parseInt(obj.year),date.getMonth(),date.getDate())),BI.isNotNull(obj.quarter)&&(date=BI.getOffsetQuarter(date,BI.parseInt(obj.quarter))),BI.isNotNull(obj.month)&&(date=BI.getOffsetMonth(date,BI.parseInt(obj.month))),BI.isNotNull(obj.week)&&(date=BI.getOffsetDate(date,7*BI.parseInt(obj.week))),BI.isNotNull(obj.day)&&(date=BI.getOffsetDate(date,BI.parseInt(obj.day))),BI.isNotNull(obj.workDay))if(BI.isNotNull(BI.holidays))for(var count=Math.abs(obj.workDay),i=0;i<count;i++)date=BI.getOffsetDate(date,obj.workDay<0?-1:1),BI.isNotNull(BI.holidays[BI.print(date,"%Y-%X-%d")])&&i--;else date=BI.getOffsetDate(date,BI.parseInt(obj.workDay));return BI.isNotNull(obj.position)&&obj.position!==BI.DynamicDateCard.OFFSET.CURRENT&&(date=this.getBeginDate(date,obj)),BI.getDate(date.getFullYear(),date.getMonth(),date.getDate())},getBeginDate:function(date,obj){return BI.isNotNull(obj.day)?obj.position===BI.DynamicDateCard.OFFSET.BEGIN?BI.getDate(date.getFullYear(),date.getMonth(),1):BI.getDate(date.getFullYear(),date.getMonth(),BI.getLastDateOfMonth(date).getDate()):BI.isNotNull(obj.week)?obj.position===BI.DynamicDateCard.OFFSET.BEGIN?BI.getWeekStartDate(date):BI.getWeekEndDate(date):BI.isNotNull(obj.month)?obj.position===BI.D
BI.DynamicDateTrigger.EVENT_VALID="EVENT_VALID",BI.DynamicDateTrigger.EVENT_ERROR="EVENT_ERROR",BI.DynamicDateTrigger.EVENT_TRIGGER_CLICK="EVENT_TRIGGER_CLICK",BI.DynamicDateTrigger.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.shortcut("bi.dynamic_date_trigger",BI.DynamicDateTrigger),BI.DynamicDateTimeCombo=BI.inherit(BI.Single,{constants:{popupHeight:259,popupWidth:270,comboAdjustHeight:1,border:1},props:{baseCls:"bi-dynamic-date-combo bi-border bi-focus-shadow bi-border-radius",height:22,minDate:"1900-01-01",maxDate:"2099-12-31",format:"",allowEdit:!0},render:function(){var self=this,opts=this.options;this.storeTriggerValue="";var date=BI.getDate();return this.storeValue=opts.value,{type:"bi.htape",items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:opts.height,height:opts.height,ref:function(){self.changeIcon=this}},width:opts.height},{type:"bi.absolute",items:[{el:{type:"bi.combo",container:opts.container,ref:function(){self.combo=this},toggle:!1,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:{type:"bi.dynamic_date_time_trigger",min:opts.minDate,max:opts.maxDate,allowEdit:opts.allowEdit,watermark:opts.watermark,format:opts.format,height:opts.height,value:opts.value,ref:function(){self.trigger=this},listeners:[{eventName:BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN,action:function(){self.combo.isViewVisible()&&self.combo.hideView(),self.fireEvent(BI.DynamicDateTimeCombo.EVENT_KEY_DOWN,arguments)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_STOP,action:function(){self.combo.isViewVisible()||self.combo.showView()}},{eventName:BI.DynamicDateTimeTrigger.EVENT_TRIGGER_CLICK,action:function(){self.combo.toggle()}},{eventName:BI.DynamicDateTimeTrigger.EVENT_FOCUS,action:function(){self.storeTriggerValue=self.trigger.getKey(),self.combo.isViewVisible()||self.combo.showView(),self.fireEvent(BI.DynamicDateTimeCombo.EVENT_FOCUS)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_BLUR,action:function(){self.fireEvent(BI.DynamicDateTimeCombo.EVENT_BLUR)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_ERROR,action:function(){self.storeValue={type:BI.DynamicDateTimeCombo.Static,value:{year:date.getFullYear(),month:date.getMonth()+1}},self.fireEvent(BI.DynamicDateTimeCombo.EVENT_ERROR)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_VALID,action:function(){self.fireEvent(BI.DynamicDateTimeCombo.EVENT_VALID)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_CHANGE,action:function(){self.fireEvent(BI.DynamicDateTimeCombo.EVENT_CHANGE)}},{eventName:BI.DynamicDateTimeTrigger.EVENT_CONFIRM,action:function(){if(!self.combo.isViewVisible()){var dateStore=self.storeTriggerValue,dateObj=self.trigger.getKey();BI.isNotEmptyString(dateObj)&&!BI.isEqual(dateObj,dateStore)?(self.storeValue=self.trigger.getValue(),self.setValue(self.trigger.getValue())):BI.isEmptyString(dateObj)&&(self.storeValue=null,self.trigger.setValue()),self._checkDynamicValue(self.storeValue),self.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}}}]},adjustLength:this.constants.comboAdjustHeight,popup:{el:{type:"bi.dynamic_date_time_popup",behaviors:opts.behaviors,min:opts.minDate,max:opts.maxDate,value:opts.value,ref:function(){self.popup=this},listeners:[{eventName:BI.DynamicDateTimePopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){self.setValue(),self.combo.hideView(),self.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var date=BI.getDate();self.setValue({type:BI.DynamicDateTimeCombo.Static,value:{year:date.getFullYear(),month:date.getMonth()+1,day:date.getDate(),hour:0,minute:0,second:0}}),self.combo.hideView(),self.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE,action:function(){var value=self.popup.getValue();self._checkValue(value)&&self.setValue(value),self.combo.hideView(),self.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicDateTimePopup.EVENT_CHANGE,action:function(){self.setValue(self.popup.getValue()),self.combo.hideView(),self.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM)}}]},stopPropaga
self.fireEvent(BI.TextEditor.EVENT_EMPTY)}),BI.createWidget({type:"bi.vertical",scrolly:!1,element:this,items:[this.editor]})},setWaterMark:function(v){this.options.watermark=v,this.editor.setWaterMark(v)},focus:function(){this.editor.focus()},blur:function(){this.editor.blur()},setErrorText:function(text){this.editor.setErrorText(text)},getErrorText:function(){return this.editor.getErrorText()},isValid:function(){return this.editor.isValid()},setValue:function(v){this.editor.setValue(v)},getValue:function(){return this.editor.getValue()}}),BI.TextEditor.EVENT_CHANGE="EVENT_CHANGE",BI.TextEditor.EVENT_FOCUS="EVENT_FOCUS",BI.TextEditor.EVENT_BLUR="EVENT_BLUR",BI.TextEditor.EVENT_CLICK="EVENT_CLICK",BI.TextEditor.EVENT_KEY_DOWN="EVENT_KEY_DOWN",BI.TextEditor.EVENT_SPACE="EVENT_SPACE",BI.TextEditor.EVENT_BACKSPACE="EVENT_BACKSPACE",BI.TextEditor.EVENT_START="EVENT_START",BI.TextEditor.EVENT_PAUSE="EVENT_PAUSE",BI.TextEditor.EVENT_STOP="EVENT_STOP",BI.TextEditor.EVENT_CONFIRM="EVENT_CONFIRM",BI.TextEditor.EVENT_CHANGE_CONFIRM="EVENT_CHANGE_CONFIRM",BI.TextEditor.EVENT_VALID="EVENT_VALID",BI.TextEditor.EVENT_ERROR="EVENT_ERROR",BI.TextEditor.EVENT_ENTER="EVENT_ENTER",BI.TextEditor.EVENT_RESTRICT="EVENT_RESTRICT",BI.TextEditor.EVENT_REMOVE="EVENT_REMOVE",BI.TextEditor.EVENT_EMPTY="EVENT_EMPTY",BI.shortcut("bi.text_editor",BI.TextEditor),BI.SmallTextEditor=BI.inherit(BI.TextEditor,{_defaultConfig:function(){var conf=BI.SmallTextEditor.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{baseCls:(conf.baseCls||"")+" bi-small-text-editor",height:20})},_init:function(){BI.SmallTextEditor.superclass._init.apply(this,arguments)}}),BI.shortcut("bi.small_text_editor",BI.SmallTextEditor),BI.IntervalSlider=BI.inherit(BI.Single,{_constant:{EDITOR_WIDTH:58,EDITOR_R_GAP:60,EDITOR_HEIGHT:30,SLIDER_WIDTH_HALF:15,SLIDER_WIDTH:30,SLIDER_HEIGHT:30,TRACK_HEIGHT:24},props:{baseCls:"bi-interval-slider bi-slider-track",digit:!1,unit:""},render:function(){var self=this,c=this._constant;return this.enable=!1,this.valueOne="",this.valueTwo="",this.calculation=new BI.AccurateCalculationModel,this.grayTrack=BI.createWidget({type:"bi.layout",cls:"gray-track",height:6}),this.blueTrack=BI.createWidget({type:"bi.layout",cls:"blue-track bi-high-light-background",height:6}),this.track=this._createTrackWrapper(),this.labelOne=BI.createWidget({type:"bi.sign_text_editor",cls:"slider-editor-button",text:this.options.unit,allowBlank:!1,width:c.EDITOR_WIDTH,validationChecker:function(v){return self._checkValidation(v)}}),this.labelOne.element.hover(function(){self.labelOne.element.removeClass("bi-border").addClass("bi-border")},function(){self.labelOne.element.removeClass("bi-border")}),this.labelOne.on(BI.Editor.EVENT_CONFIRM,function(){var oldValueOne=self.valueOne,v=BI.parseFloat(this.getValue());self.valueOne=v;var percent=self._getPercentByValue(v),significantPercent=BI.parseFloat(percent.toFixed(1));self._setSliderOnePosition(significantPercent),self._setBlueTrack(),self._checkLabelPosition(oldValueOne,self.valueTwo,self.valueOne,self.valueTwo),self.fireEvent(BI.IntervalSlider.EVENT_CHANGE)}),this.labelTwo=BI.createWidget({type:"bi.sign_text_editor",cls:"slider-editor-button",text:this.options.unit,allowBlank:!1,width:c.EDITOR_WIDTH,validationChecker:function(v){return self._checkValidation(v)}}),this.labelTwo.element.hover(function(){self.labelTwo.element.removeClass("bi-border").addClass("bi-border")},function(){self.labelTwo.element.removeClass("bi-border")}),this.labelTwo.on(BI.Editor.EVENT_CONFIRM,function(){var oldValueTwo=self.valueTwo,v=BI.parseFloat(this.getValue());self.valueTwo=v;var percent=self._getPercentByValue(v),significantPercent=BI.parseFloat(percent.toFixed(1));self._setSliderTwoPosition(significantPercent),self._setBlueTrack(),self._checkLabelPosition(self.valueOne,oldValueTwo,self.valueOne,self.valueTwo),self.fireEvent(BI.IntervalSlider.EVENT_CHANGE)}),this.sliderOne=BI.createWidget({type:"bi.single_slider_button"}),this.sliderTwo=BI.createWidget({type:"bi.single_slider_button"}),this._draggable(this.sliderOne,!0),this
this.addNotMatchTip.setVisible(showTip),showTip&&this.addNotMatchTip.setText(BI.i18nText("BI-Basic_Click_To_Add_Text",keyword))},getValue:function(){return this.tree.getValue()},setValue:function(v){v=BI.isArray(v)?v:[v],this.tree.setValue(v)},populate:function(items){this.tree.populate(items)}}),BI.MultiLayerSelectTreeInsertSearchPane.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.MultiLayerSelectTreeInsertSearchPane.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multilayer_select_tree_insert_search_pane",BI.MultiLayerSelectTreeInsertSearchPane),BI.MultiLayerSelectLevelTree=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiLayerSelectLevelTree.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multilayer-select-level-tree",isDefaultInit:!1,items:[],itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,value:"",scrollable:!0})},_init:function(){var o=this.options;BI.MultiLayerSelectLevelTree.superclass._init.apply(this,arguments),this.storeValue=o.value,this.initTree(this.options.items),this.check()},_formatItems:function(nodes,layer,pNode){var self=this,o=this.options,keyword=o.keywordGetter();return BI.each(nodes,function(i,node){var extend={};node.layer=layer,BI.isKey(node.id)||(node.id=BI.UUID()),node.keyword=node.keyword||keyword,extend.pNode=pNode,node.isParent===!0||node.parent===!0||BI.isNotEmptyArray(node.children)?(extend.type="bi.multilayer_select_tree_mid_plus_group_node",i===nodes.length-1&&(extend.type="bi.multilayer_select_tree_last_plus_group_node",extend.isLastNode=!0),0!==i||pNode||(extend.type="bi.multilayer_select_tree_first_plus_group_node"),0!==i||i!==nodes.length-1||pNode||(extend.type="bi.multilayer_select_tree_plus_group_node"),BI.defaults(node,extend),self._formatItems(node.children,layer+1,node)):(extend.type="bi.multilayer_single_tree_mid_tree_leaf_item",0!==i||pNode||(extend.type="bi.multilayer_single_tree_first_tree_leaf_item"),i===nodes.length-1&&(extend.type="bi.multilayer_single_tree_last_tree_leaf_item"),BI.defaults(node,extend))}),nodes},_assertId:function(sNodes){BI.each(sNodes,function(i,node){node.id=node.id||BI.UUID()})},initTree:function(nodes){var self=this,o=this.options,hasNext=!1;this.empty(),this._assertId(nodes),this.tree=BI.createWidget({type:"bi.custom_tree",cls:"tree-view display-table",expander:{type:"bi.select_tree_expander",isDefaultInit:o.isDefaultInit,el:{},popup:{type:"bi.custom_tree"}},items:this._formatItems(BI.Tree.transformToTreeFormat(nodes),0),itemsCreator:function(op,callback){1===op.times&&!op.node&&BI.nextTick(function(){self.loading()}),o.itemsCreator(op,function(ob){hasNext=ob.hasNext,1===op.times&&!op.node&&self._populate(ob.items),callback(self._formatItems(BI.Tree.transformToTreeFormat(ob.items),op.node?op.node.layer+1:0,op.node)),self.setValue(self.storeValue),1===op.times&&!op.node&&BI.nextTick(function(){self.loaded()})})},value:o.value,el:{type:"bi.loader",isDefaultInit:o.itemsCreator!==BI.emptyFn,el:{type:"bi.button_tree",chooseType:o.chooseType,behaviors:o.behaviors,layouts:[{type:"bi.vertical"}]},hasNext:function(){return hasNext}}}),this.tree.on(BI.Controller.EVENT_CHANGE,function(type,value){self.fireEvent(BI.Controller.EVENT_CHANGE,arguments),type===BI.Events.CLICK&&(self.setValue(value),self.fireEvent(BI.MultiLayerSelectLevelTree.EVENT_CHANGE,arguments))}),BI.createWidget({type:"bi.adaptive",element:this,scrollable:o.scrollable,items:[this.tree]})},_populate:function(){BI.MultiLayerSelectLevelTree.superclass.populate.apply(this,arguments)},populate:function(nodes){this._populate(nodes),BI.isNull(nodes)?this.tree.populate():this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(nodes),0))},setValue:function(v){this.options.chooseType===BI.Selection.None||(this.storeValue=v,this.tree.setValue(v))},getValue:function(){return BI.isArray(this.storeValue)?this.storeValue:BI.isNull(this.storeValue)?[]:[this.storeValue]},getAllLeaves:function(){return this.tree.getAllLeaves()},getNodeById:function(id){return this.tree.getNodeById(id)},getNodeByValue:function(id){return this.tree.getNodeByValue(id)}}),BI.MultiLayerSelectLevelTr
stopEditing:function(){this.searcher.stopSearch()},getSearcher:function(){return this.searcher},populate:function(items){this.options.items=items,this._initData()},setValue:function(v){this.editor.setState(this._digest(v[0]))},getValue:function(){return this.searcher.getValue()}}),BI.MultiLayerSingleTreeTrigger.EVENT_FOCUS="EVENT_FOCUS",BI.MultiLayerSingleTreeTrigger.EVENT_BLUR="EVENT_BLUR",BI.MultiLayerSingleTreeTrigger.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiLayerSingleTreeTrigger.EVENT_STOP="EVENT_STOP",BI.MultiLayerSingleTreeTrigger.EVENT_START="EVENT_START",BI.MultiLayerSingleTreeTrigger.EVENT_CHANGE="EVENT_CHANGE",BI.MultiLayerSingleTreeTrigger.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.shortcut("bi.multilayer_single_tree_trigger",BI.MultiLayerSingleTreeTrigger),BI.MultiLayerSingleTreeFirstPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var conf=BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{extraCls:"bi-multilayer-single-tree-first-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:24})},_init:function(){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass._init.apply(this,arguments);var self=this,o=this.options;this.node=this._createNode();for(var needBlankLayers=[],pNode=o.pNode;pNode;)pNode.isLastNode&&needBlankLayers.push(pNode.layer),pNode=pNode.pNode;var items=[];BI.count(0,o.layer,function(index){items.push({type:"bi.layout",cls:BI.contains(needBlankLayers,index)?"":"base-line-conn-background",width:12,height:o.height})}),items.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(o.layer,12),items:[items]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(v){BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(v)},_createNode:function(){var self=this,o=this.options;return BI.createWidget({type:"bi.first_plus_group_node",cls:"bi-list-item-none",logic:{dynamic:!0},id:o.id,pId:o.pId,open:o.open,isLastNode:o.isLastNode,height:o.height,hgap:o.hgap,text:o.text,value:o.value,py:o.py,keyword:o.keyword,listeners:[{eventName:BI.Controller.EVENT_CHANGE,action:function(type){type!==BI.Events.CLICK&&self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}}]})}}),BI.shortcut("bi.multilayer_single_tree_first_plus_group_node",BI.MultiLayerSingleTreeFirstPlusGroupNode),BI.MultiLayerSingleTreeLastPlusGroupNode=BI.inherit(BI.NodeButton,{_defaultConfig:function(){var conf=BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._defaultConfig.apply(this,arguments);return BI.extend(conf,{extraCls:"bi-multilayer-single-tree-last-plus-group-node bi-list-item",layer:0,id:"",pId:"",open:!1,height:24})},_init:function(){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._init.apply(this,arguments);var self=this,o=this.options;this.node=this._createNode();for(var needBlankLayers=[],pNode=o.pNode;pNode;)pNode.isLastNode&&needBlankLayers.push(pNode.layer),pNode=pNode.pNode;var items=[];BI.count(0,o.layer,function(index){items.push({type:"bi.layout",cls:BI.contains(needBlankLayers,index)?"":"base-line-conn-background",width:12,height:o.height})}),items.push(this.node),BI.createWidget({type:"bi.td",element:this,columnSize:BI.makeArray(o.layer,12),items:[items]})},doRedMark:function(){this.node.doRedMark.apply(this.node,arguments)},unRedMark:function(){this.node.unRedMark.apply(this.node,arguments)},doClick:function(){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass.doClick.apply(this,arguments),this.node.setSelected(this.isSelected())},setOpened:function(v){BI.MultiLayerSingleTreeLastPlusGroupNode.superclass.setOpened.apply(this,arguments),BI.isNotNull(this.node)&&this.node.setOpened(v)},_createNode:function(){var self=this,o=this.options;return BI.createWidget({type:"bi.last_plus_group_node",cls
assertShowValue(),self.populate(),self._setStartValue("")})},_stopEditing:function(){this.trigger.stopEditing(),this.numberCounter.hideView()},_defaultState:function(){this._stopEditing(),this.combo.hideView()},_assertValue:function(val){val||(val={}),val.type||(val.type=BI.Selection.Multi),val.value||(val.value=[])},_makeMap:function(values){return BI.makeObject(values||[])},_joinKeywords:function(keywords,callback){function digest(items){var selectedMap=self._makeMap(items);BI.each(keywords,function(i,val){BI.isNotNull(selectedMap[val])&&(self.storeValue.type===BI.Selection.Multi?BI.pushDistinct(self.storeValue.value,val):BI.remove(self.storeValue.value,val))}),self._adjust(callback)}var self=this,o=this.options;this._assertValue(this.storeValue),this.requesting=!0,o.itemsCreator({type:BI.MultiSelectInsertCombo.REQ_GET_ALL_DATA,keywords:keywords},function(ob){var values=BI.map(ob.items,"value");digest(values)})},_joinAll:function(res,callback){var self=this,o=this.options;this._assertValue(res),this.requesting=!0,o.itemsCreator({type:BI.MultiSelectInsertCombo.REQ_GET_ALL_DATA,keywords:[this.trigger.getKey()]},function(ob){var items=BI.map(ob.items,"value");if(self.storeValue.type===res.type){var change=!1,map=self._makeMap(self.storeValue.value);return BI.each(items,function(i,v){BI.isNotNull(map[v])&&(change=!0,self.storeValue.assist&&self.storeValue.assist.push(map[v]),delete map[v])}),change&&(self.storeValue.value=BI.values(map)),void self._adjust(callback)}var selectedMap=self._makeMap(self.storeValue.value),notSelectedMap=self._makeMap(res.value),newItems=[];BI.each(items,function(i,item){BI.isNotNull(selectedMap[items[i]])&&(self.storeValue.assist&&self.storeValue.assist.push(selectedMap[items[i]]),delete selectedMap[items[i]]),BI.isNull(notSelectedMap[items[i]])&&(BI.remove(self.storeValue.assist,item),newItems.push(item))}),self.storeValue.value=newItems.concat(BI.values(selectedMap)),self._adjust(callback)})},_adjust:function(callback){function adjust(){self.wants2Quit===!0&&(self.fireEvent(BI.MultiSelectInsertCombo.EVENT_CONFIRM),self.wants2Quit=!1),self.requesting=!1}var self=this,o=this.options;adjust(),callback()},_join:function(res,callback){var self=this,o=this.options;if(this._assertValue(res),this._assertValue(this.storeValue),this.storeValue.type===res.type){var map=this._makeMap(this.storeValue.value);BI.each(res.value,function(i,v){map[v]||(self.storeValue.value.push(v),BI.remove(self.storeValue.assist,v),map[v]=v)});var change=!1;return BI.each(res.assist,function(i,v){BI.isNotNull(map[v])&&(change=!0,self.storeValue.assist&&self.storeValue.assist.push(map[v]),delete map[v])}),change&&(this.storeValue.value=BI.values(map)),void self._adjust(callback)}this._joinAll(res,callback)},_setStartValue:function(value){this._startValue=value,this.popup.setStartValue(value)},setValue:function(v){this.storeValue=v||{},this._assertValue(this.storeValue),this.combo.setValue(this.storeValue),this.numberCounter.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.extend(BI.MultiSelectInsertCombo,{REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.MultiSelectInsertCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiSelectInsertCombo.EVENT_BLUR="EVENT_BLUR",BI.MultiSelectInsertCombo.EVENT_STOP="EVENT_STOP",BI.MultiSelectInsertCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.MultiSelectInsertCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_select_insert_combo",BI.MultiSelectInsertCombo),BI.MultiSelectInsertNoBarCombo=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiSelectInsertNoBarCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-insert-combo",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,height:24,attributes:{tabIndex:0}})},_init:function(){BI.MultiSelectInsertNoBarCombo.superclass._init.apply(this,arguments);var self=this,o=this.options,assertShowValue=function(){BI.isKey(self._startValue)&&(self.storeV
}}),BI.MultiSelectSearchInsertPane.EVENT_CHANGE="EVENT_CHANGE",BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM="EVENT_ADD_ITEM",BI.shortcut("bi.multi_select_search_insert_pane",BI.MultiSelectSearchInsertPane),BI.MultiSelectSearchLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-loader",itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchLoader.superclass._init.apply(this,arguments);var self=this,opts=this.options,hasNext=!1;this.storeValue=BI.deepClone(opts.value),this.button_group=BI.createWidget({type:"bi.select_list",toolbar:{type:"bi.multi_select_bar",cls:"bi-list-item-active",iconWrapperWidth:36},element:this,logic:{dynamic:!1},value:opts.value,el:{tipText:BI.i18nText("BI-No_Select"),el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_MULTI,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},itemsCreator:function(op,callback){self.storeValue&&(op=BI.extend(op||{},{selectedValues:self.storeValue.value})),opts.itemsCreator(op,function(ob){var keyword=ob.keyword=opts.keywordGetter();hasNext=ob.hasNext;var firstItems=[];if(1===op.times&&self.storeValue){var json=self._filterValues(self.storeValue);firstItems=self._createItems(json)}callback(firstItems.concat(self._createItems(ob.items)),keyword),1===op.times&&self.storeValue&&self.setValue(self.storeValue)})},hasNext:function(){return hasNext}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SelectList.EVENT_CHANGE,function(){self.fireEvent(BI.MultiSelectSearchLoader.EVENT_CHANGE,arguments)})},_createItems:function(items){return BI.createItems(items,{type:"bi.multi_select_item",logic:{dynamic:!1},height:24,selected:this.isAllSelected(),cls:"bi-list-item-active",iconWrapperWidth:36})},isAllSelected:function(){return this.button_group.isAllSelected()},_filterValues:function(src){var o=this.options,keyword=o.keywordGetter(),values=BI.deepClone(src.value)||[],newValues=BI.map(values,function(i,v){return{text:o.valueFormatter(v)||v,value:v}});if(BI.isKey(keyword)){var search=BI.Func.getSearchResult(newValues,keyword);values=search.match.concat(search.find)}return BI.map(values,function(i,v){return{text:v.text,title:v.text,value:v.value,selected:src.type===BI.Selection.All}})},setValue:function(v){this.storeValue=BI.deepClone(v),this.button_group.setValue(v)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(items){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(h){this.button_group.resetHeight(h)},resetWidth:function(w){this.button_group.resetWidth(w)}}),BI.MultiSelectSearchLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_search_loader",BI.MultiSelectSearchLoader),BI.MultiSelectSearchPane=BI.inherit(BI.Widget,{constants:{height:24,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.MultiSelectSearchPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-search-pane bi-card",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.MultiSelectSearchPane.superclass._init.apply(this,arguments);var self=this,o=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"multi-select-toolbar",height:this.constants.height}),this.loader=BI.createWidget({type:"bi.multi_select_search_loader",keywordGetter:o.keywordGetter,valueFormatter:o.valueFormatter,itemsCreator:function(op,callback){o.itemsCreator.apply(self,[op,function(res){callback(res),self.setKeyword(o.keywordGetter())}])},value:o.value}),this.loader.on(BI.Controller.EVENT_CHANGE,function(){self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),thi
REQ_GET_DATA_LENGTH:1,REQ_GET_ALL_DATA:-1}),BI.MultiSelectInsertNoBarList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.multi_select_insert_no_bar_list",BI.MultiSelectInsertNoBarList),BI.MultiSelectList=BI.inherit(BI.Widget,{_constant:{EDITOR_HEIGHT:24},_defaultConfig:function(){return BI.extend(BI.MultiSelectList.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-select-list",itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.MultiSelectList.superclass._init.apply(this,arguments);var self=this,o=this.options;this.storeValue={};var assertShowValue=function(){BI.isKey(self._startValue)&&(self.storeValue.type===BI.Selection.All?BI.remove(self.storeValue.value,self._startValue):BI.pushDistinct(self.storeValue.value,self._startValue))};this.adapter=BI.createWidget({type:"bi.multi_select_loader",cls:"popup-multi-select-list bi-border-left bi-border-right bi-border-bottom",itemsCreator:o.itemsCreator,valueFormatter:o.valueFormatter,logic:{dynamic:!1},el:{}}),this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE,function(){self.storeValue=this.getValue(),self._adjust(function(){assertShowValue(),self.fireEvent(BI.MultiSelectList.EVENT_CHANGE)})}),this.searcherPane=BI.createWidget({type:"bi.multi_select_search_pane",cls:"bi-border-left bi-border-right bi-border-bottom",valueFormatter:o.valueFormatter,keywordGetter:function(){return self.trigger.getKeyword()},itemsCreator:function(op,callback){op.keywords=[self.trigger.getKeyword()],this.setKeyword(op.keywords[0]),o.itemsCreator(op,callback)}}),this.searcherPane.setVisible(!1),this.trigger=BI.createWidget({type:"bi.searcher",isAutoSearch:!1,isAutoSync:!1,onSearch:function(op,callback){callback()},adapter:this.adapter,popup:this.searcherPane,height:200,masker:!1,listeners:[{eventName:BI.Searcher.EVENT_START,action:function(){self._showSearcherPane(),self._setStartValue(""),this.setValue(BI.deepClone(self.storeValue))}},{eventName:BI.Searcher.EVENT_STOP,action:function(){self._showAdapter(),self._setStartValue(""),self.adapter.setValue(self.storeValue),self.adapter.populate()}},{eventName:BI.Searcher.EVENT_PAUSE,action:function(){var keyword=this.getKeyword();this.hasMatched()&&self._join({type:BI.Selection.Multi,value:[keyword]},function(){self._showAdapter(),self.adapter.setValue(self.storeValue),self._setStartValue(keyword),assertShowValue(),self.adapter.populate(),self._setStartValue(""),self.fireEvent(BI.MultiSelectList.EVENT_CHANGE)})}},{eventName:BI.Searcher.EVENT_SEARCHING,action:function(){var keywords=this.getKeyword(),last=BI.last(keywords);keywords=BI.initial(keywords||[]),keywords.length>0&&self._joinKeywords(keywords,function(){BI.isEndWithBlank(last)?(self.adapter.setValue(self.storeValue),assertShowValue(),self.adapter.populate(),self._setStartValue("")):(self.adapter.setValue(self.storeValue),assertShowValue()),self.fireEvent(BI.MultiSelectList.EVENT_CHANGE)})}},{eventName:BI.Searcher.EVENT_CHANGE,action:function(value,obj){obj instanceof BI.MultiSelectBar?self._joinAll(this.getValue(),function(){assertShowValue(),self.fireEvent(BI.MultiSelectList.EVENT_CHANGE)}):self._join(this.getValue(),function(){assertShowValue(),self.fireEvent(BI.MultiSelectList.EVENT_CHANGE)})}}]}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.trigger,height:this._constant.EDITOR_HEIGHT},{el:this.adapter,height:"fill"}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.searcherPane,top:this._constant.EDITOR_HEIGHT,bottom:0,left:0,right:0}]})},_showAdapter:function(){this.adapter.setVisible(!0),this.searcherPane.setVisible(!1)},_showSearcherPane:function(){this.searcherPane.setVisible(!0),this.adapter.setVisible(!1)},_defaultState:function(){this.trigger.stopEditing()},_assertValue:function(val){val||(val={}),val.type||(val.type=BI.Selection.Multi),val.value||(val.value=[])},_makeMap:function(values){return BI.makeObject(values||[])},_joinKeywords:function(keywords,callback){function digest(items){var selectedMap=self._makeMap(items);BI.each(keywords,function(i,val){BI.isNotNull(selectedMap[val])&&(self.storeValue.type===BI.Sel
}),this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW,function(){want2showCounter===!1&&(want2showCounter=!0),isInit===!0&&(want2showCounter=null,showCounter())}),this.numberCounter.on(BI.Events.VIEW,function(b){BI.nextTick(function(){self.trigger.refreshPlaceHolderWidth(b===!0?self.numberCounter.element.outerWidth()+8:0)})}),this.trigger.element.click(function(e){self.trigger.element.find(e.target).length>0&&self.numberCounter.hideView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:triggerBtn,right:0,top:0,bottom:0},{el:{type:"bi.vertical_adapt",items:[this.numberCounter]},right:o.height,top:0,height:o.height}]})},_assertShowValue:function(){this.trigger.getSearcher().setState(this.storeValue),this.numberCounter.setButtonChecked(this.storeValue)},_stopEditing:function(){this.trigger.stopEditing(),this.numberCounter.hideView()},_defaultState:function(){this._stopEditing(),this.combo.hideView()},setValue:function(v){this.storeValue.value=v||[],this.combo.setValue({value:v||[]}),this.numberCounter.setValue({value:v||[]})},getValue:function(){return BI.deepClone(this.storeValue.value)},populate:function(){this.combo.populate.apply(this.combo,arguments)}}),BI.MultiTreeListCombo.EVENT_FOCUS="EVENT_FOCUS",BI.MultiTreeListCombo.EVENT_BLUR="EVENT_BLUR",BI.MultiTreeListCombo.EVENT_STOP="EVENT_STOP",BI.MultiTreeListCombo.EVENT_CLICK_ITEM="EVENT_CLICK_ITEM",BI.MultiTreeListCombo.EVENT_SEARCHING="EVENT_SEARCHING",BI.MultiTreeListCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.shortcut("bi.multi_tree_list_combo",BI.MultiTreeListCombo),BI.MultiTreePopup=BI.inherit(BI.Pane,{_defaultConfig:function(){return BI.extend(BI.MultiTreePopup.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-popup",maxWidth:"auto",minWidth:140,maxHeight:400,onLoaded:BI.emptyFn,el:{type:"bi.async_tree"}})},_init:function(){BI.MultiTreePopup.superclass._init.apply(this,arguments);var self=this,opts=this.options,v=opts.value;this.selectedValues={},this.tree=BI.createWidget(opts.el,{type:"bi.async_tree",height:400,cls:"popup-view-tree",itemsCreator:opts.itemsCreator,onLoaded:opts.onLoaded,value:v.value||{}}),this.popupView=BI.createWidget({type:"bi.multi_popup_view",element:this,stopPropagation:!1,maxWidth:opts.maxWidth,minWidth:opts.minWidth,maxHeight:opts.maxHeight,buttons:[BI.i18nText("BI-Basic_Clears"),BI.i18nText("BI-Basic_Sure")],el:this.tree}),this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON,function(index){switch(index){case 0:self.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CLEAR);break;case 1:self.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CONFIRM)}}),this.tree.on(BI.TreeView.EVENT_CHANGE,function(){self.fireEvent(BI.MultiTreePopup.EVENT_CHANGE)}),this.tree.on(BI.TreeView.EVENT_AFTERINIT,function(){self.fireEvent(BI.MultiTreePopup.EVENT_AFTERINIT)})},getValue:function(){return this.tree.getValue()},setValue:function(v){v||(v={}),this.tree.setSelectedValue(v.value)},populate:function(config){this.tree.stroke(config)},hasChecked:function(){return this.tree.hasChecked()},resetHeight:function(h){this.popupView.resetHeight(h)},resetWidth:function(w){this.popupView.resetWidth(w)}}),BI.MultiTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.MultiTreePopup.EVENT_CLICK_CONFIRM="EVENT_CLICK_CONFIRM",BI.MultiTreePopup.EVENT_CLICK_CLEAR="EVENT_CLICK_CLEAR",BI.MultiTreePopup.EVENT_AFTERINIT="EVENT_AFTERINIT",BI.shortcut("bi.multi_tree_popup_view",BI.MultiTreePopup),BI.MultiTreeCheckSelectedButton=BI.inherit(BI.Single,{_defaultConfig:function(){return BI.extend(BI.MultiTreeCheckSelectedButton.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-multi-tree-check-selected-button",itemsCreator:BI.emptyFn})},_init:function(){BI.MultiTreeCheckSelectedButton.superclass._init.apply(this,arguments);var self=this;this.indicator=BI.createWidget({type:"bi.icon_button",cls:"check-font trigger-check-selected icon-size-12",width:15,height:15,stopPropagation:!0}),this.checkSelected=BI.createWidget({type:"bi.text_button",cls:"trigger-check-selected",invisible:!0,hgap:4,text:
self._setStartValue(""),this.getSearcher().setValue(self.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP,function(){self._setStartValue("")}),this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE,function(){if(this.getSearcher().hasMatched()){var keyword=this.getSearcher().getKeyword();self._join({type:BI.Selection.Multi,value:[keyword]},function(){self.combo.setValue(self.storeValue),self._setStartValue(keyword),assertShowValue(),self._populate(),self._setStartValue("")})}}),this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING,function(keywords){var last=BI.last(keywords);keywords=BI.initial(keywords||[]),keywords.length>0&&self._joinKeywords(keywords,function(){BI.isEndWithBlank(last)?(self.combo.setValue(self.storeValue),assertShowValue(),self.combo.populate(),self._setStartValue("")):(self.combo.setValue(self.storeValue),assertShowValue())})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE,function(value,obj){obj instanceof BI.MultiSelectBar?self._joinAll(this.getValue(),function(){assertShowValue()}):self._join(this.getValue(),function(){assertShowValue()})}),this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW,function(){this.getCounter().setValue(self.storeValue)}),this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK,function(){self.combo.isViewVisible()||self.combo.showView()}),this.combo=BI.createWidget({type:"bi.combo",toggle:!1,container:o.container,el:this.trigger,adjustLength:1,popup:{type:"bi.search_multi_select_popup_view",ref:function(){self.popup=this,self.trigger.setAdapter(this)},listeners:[{eventName:BI.MultiSelectPopupView.EVENT_CHANGE,action:function(){self.storeValue=this.getValue(),self._adjust(function(){assertShowValue()})}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM,action:function(){self._defaultState()}},{eventName:BI.MultiSelectPopupView.EVENT_CLICK_CLEAR,action:function(){self.setValue(),self._defaultState()}}],itemsCreator:BI.bind(self._itemsCreator,this),valueFormatter:o.valueFormatter,onLoaded:function(){BI.nextTick(function(){self.combo.adjustWidth(),self.combo.adjustHeight(),self.trigger.getCounter().adjustView(),self.trigger.getSearcher().adjustView()})}},value:o.value,hideChecker:function(e){return 0===triggerBtn.element.find(e.target).length}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){this.setValue(self.storeValue),BI.nextTick(function(){self._populate()})}),this.wants2Quit=!1,this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW,function(){self.trigger.stopEditing(),self.requesting===!0?self.wants2Quit=!0:(assertShowValue(),self.fireEvent(BI.SearchMultiTextValueCombo.EVENT_CONFIRM))});var triggerBtn=BI.createWidget({type:"bi.trigger_icon_button",width:o.height,height:o.height,cls:"multi-select-trigger-icon-button"});triggerBtn.on(BI.TriggerIconButton.EVENT_CHANGE,function(){self.trigger.getCounter().hideView(),self.combo.isViewVisible()?self.combo.hideView():self.combo.showView()}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.combo,left:0,right:0,top:0,bottom:0},{el:triggerBtn,right:0,top:0,bottom:0}]}),this._checkError()},_defaultState:function(){this.trigger.stopEditing(),this.combo.hideView()},_assertValue:function(val){var o=this.options;val||(val={}),val.type||(val.type=BI.Selection.Multi),val.value||(val.value=[]),BI.remove(val.value,function(idx,value){return!BI.contains(BI.map(o.items,"value"),value)})},_makeMap:function(values){return BI.makeObject(values||[])},_joinKeywords:function(keywords,callback){function digest(items){var selectedMap=self._makeMap(items);BI.each(keywords,function(i,val){BI.isNotNull(selectedMap[val])&&(self.storeValue.type===BI.Selection.Multi?BI.pushDistinct(self.storeValue.value,val):BI.remove(self.storeValue.value,val))}),self._adjust(callback)}var self=this,o=this.options;this._assertValue(this.storeValue),this.requesting=!0,this._itemsCreator({type:BI.SearchMultiTextValueCombo.REQ_GET_ALL_DATA,keywords:keywords},function(ob){var values=BI.map(ob.items,"value");digest(values)})},_joinAll:function(res,callback){var self=this,o=this.options;this._assertValue(res),this.requ
}),this.check()},getValue:function(){return this.tree.getValue()},setValue:function(v){v=BI.isArray(v)?v:[v],this.tree.setValue(v)},populate:function(items){BI.SelectTreePopup.superclass.populate.apply(this,arguments),this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(items)))}}),BI.SelectTreePopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.select_level_tree",BI.SelectTreePopup),BI.SingleSelectSearchLoader=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchLoader.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-loader",allowNoSelect:!1,itemsCreator:BI.emptyFn,keywordGetter:BI.emptyFn,valueFormatter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchLoader.superclass._init.apply(this,arguments);var self=this,opts=this.options,hasNext=!1;this.button_group=BI.createWidget({type:"bi.single_select_list",allowNoSelect:opts.allowNoSelect,element:this,logic:{dynamic:!1},value:opts.value,el:{tipText:BI.i18nText("BI-No_Select"),el:{type:"bi.loader",isDefaultInit:!1,logic:{dynamic:!0,scrolly:!0},el:{chooseType:BI.ButtonGroup.CHOOSE_TYPE_SINGLE,behaviors:{redmark:function(){return!0}},layouts:[{type:"bi.vertical"}]}}},itemsCreator:function(op,callback){self.storeValue&&(op=BI.extend(op||{},{selectedValues:[self.storeValue]})),opts.itemsCreator(op,function(ob){var keyword=ob.keyword=opts.keywordGetter();hasNext=ob.hasNext;var firstItems=[];if(1===op.times&&BI.isNotNull(self.storeValue)){var json=self._filterValues(self.storeValue);firstItems=self._createItems(json)}callback(firstItems.concat(self._createItems(ob.items)),keyword||""),1===op.times&&self.storeValue&&self.setValue(self.storeValue)})},hasNext:function(){return hasNext}}),this.button_group.on(BI.Controller.EVENT_CHANGE,function(){self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.button_group.on(BI.SingleSelectList.EVENT_CHANGE,function(){self.fireEvent(BI.SingleSelectSearchLoader.EVENT_CHANGE,arguments)})},_createItems:function(items){return BI.createItems(items,{type:this.options.allowNoSelect?"bi.single_select_item":"bi.single_select_combo_item",cls:"bi-list-item-active",logic:{dynamic:!1},height:25,selected:!1})},_filterValues:function(src){var o=this.options,keyword=o.keywordGetter(),values=src||[],newValues=BI.map(BI.isArray(values)?values:[values],function(i,v){return{text:o.valueFormatter(v)||v,value:v}});if(BI.isKey(keyword)){var search=BI.Func.getSearchResult(newValues,keyword);values=search.match.concat(search.find)}return BI.map(values,function(i,v){return{text:v.text,title:v.text,value:v.value,selected:!1}})},setValue:function(v){this.storeValue=v,this.button_group.setValue(v)},getValue:function(){return this.button_group.getValue()},getAllButtons:function(){return this.button_group.getAllButtons()},empty:function(){this.button_group.empty()},populate:function(items){this.button_group.populate.apply(this.button_group,arguments)},resetHeight:function(h){this.button_group.resetHeight(h)},resetWidth:function(w){this.button_group.resetWidth(w)}}),BI.SingleSelectSearchLoader.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_search_loader",BI.SingleSelectSearchLoader),BI.SingleSelectSearchInsertPane=BI.inherit(BI.Widget,{constants:{height:25,lgap:10,tgap:5},_defaultConfig:function(){return BI.extend(BI.SingleSelectSearchInsertPane.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-search-pane bi-card",allowNoSelect:!1,itemsCreator:BI.emptyFn,valueFormatter:BI.emptyFn,keywordGetter:BI.emptyFn})},_init:function(){BI.SingleSelectSearchInsertPane.superclass._init.apply(this,arguments);var self=this,o=this.options;this.tooltipClick=BI.createWidget({type:"bi.label",invisible:!0,text:BI.i18nText("BI-Click_Blank_To_Select"),cls:"multi-select-toolbar",height:this.constants.height}),this.addNotMatchTip=BI.createWidget({type:"bi.text_button",invisible:!0,text:BI.i18nText("BI-Basic_Click_To_Add_Text",""),height:this.constants.height,cls:"bi-high-light",hgap:5,handler:function(){self.fireEvent(BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM,o.keywordGett
}}),this.searcherPane.setVisible(!1),this.trigger=BI.createWidget({type:"bi.searcher",isAutoSearch:!1,isAutoSync:!1,onSearch:function(op,callback){callback()},adapter:this.adapter,popup:this.searcherPane,height:200,masker:!1,value:o.value,listeners:[{eventName:BI.Searcher.EVENT_START,action:function(){self._showSearcherPane(),self._setStartValue(),this.setValue(BI.deepClone(self.storeValue))}},{eventName:BI.Searcher.EVENT_STOP,action:function(){self._showAdapter(),self._setStartValue(),self.adapter.setValue(self.storeValue),self.adapter.populate()}},{eventName:BI.Searcher.EVENT_PAUSE,action:function(){var keyword=this.getKeyword();self.storeValue=keyword,self._showAdapter(),self.adapter.setValue(self.storeValue),self._setStartValue(keyword),assertShowValue(),self.adapter.populate(),self._setStartValue(),self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE)}},{eventName:BI.Searcher.EVENT_SEARCHING,action:function(){var keywords=this.getKeyword(),last=BI.last(keywords);keywords=BI.initial(keywords||[]),keywords.length>0&&self._joinKeywords(keywords,function(){BI.isEndWithBlank(last)?(self.adapter.setValue(self.storeValue),assertShowValue(),self.adapter.populate(),self._setStartValue()):(self.adapter.setValue(self.storeValue),assertShowValue())})}},{eventName:BI.Searcher.EVENT_CHANGE,action:function(){self.storeValue=this.getValue(),self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE)}}]}),BI.createWidget({type:"bi.vtape",element:this,items:[{el:this.trigger,height:24},{el:this.adapter,height:"fill"}]}),BI.createWidget({type:"bi.absolute",element:this,items:[{el:this.searcherPane,top:24,bottom:0,left:0,right:0}]})},_showAdapter:function(){this.adapter.setVisible(!0),this.searcherPane.setVisible(!1)},_showSearcherPane:function(){this.searcherPane.setVisible(!0),this.adapter.setVisible(!1)},_defaultState:function(){this.trigger.stopEditing()},_assertValue:function(){},_makeMap:function(values){return BI.makeObject(values||[])},_joinKeywords:function(keywords,callback){function digest(items){var selectedMap=self._makeMap(items);BI.each(keywords,function(i,val){BI.isNotNull(selectedMap[val])&&(self.storeValue.type===BI.Selection.Single?BI.pushDistinct(self.storeValue.value,val):BI.remove(self.storeValue.value,val))}),callback()}var self=this,o=this.options;this._assertValue(this.storeValue),this._allData?digest(this._allData):o.itemsCreator({type:BI.SingleSelectInsertList.REQ_GET_ALL_DATA},function(ob){self._allData=BI.map(ob.items,"value"),digest(self._allData)})},_setStartValue:function(value){this._startValue=value,this.adapter.setStartValue(value)},isAllSelected:function(){return this.adapter.isAllSelected()},resize:function(){},setValue:function(v){this.storeValue=v,this.adapter.setValue(this.storeValue),this.trigger.setValue(this.storeValue)},getValue:function(){return BI.deepClone(this.storeValue)},populate:function(){this._count=null,this._allData=null,this.adapter.populate.apply(this.adapter,arguments),this.trigger.populate.apply(this.trigger,arguments)}}),BI.extend(BI.SingleSelectInsertList,{REQ_GET_DATA_LENGTH:0,REQ_GET_ALL_DATA:-1}),BI.SingleSelectInsertList.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.single_select_insert_list",BI.SingleSelectInsertList),BI.SingleSelectEditor=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.SingleSelectEditor.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-single-select-editor",el:{},text:BI.i18nText("BI-Basic_Please_Select")})},_init:function(){BI.SingleSelectEditor.superclass._init.apply(this,arguments);var self=this,o=this.options;this.editor=BI.createWidget(o.el,{type:"bi.state_editor",element:this,height:o.height,watermark:BI.i18nText("BI-Basic_Search"),allowBlank:!0,value:o.value,defaultText:o.text,text:o.text}),this.editor.on(BI.Controller.EVENT_CHANGE,function(){self.fireEvent(BI.Controller.EVENT_CHANGE,arguments)}),this.editor.on(BI.StateEditor.EVENT_PAUSE,function(){self.fireEvent(BI.SingleSelectEditor.EVENT_PAUSE)}),this.editor.on(BI.StateEditor.EVENT_FOCUS,function(){self.fireEvent(BI.SingleSelectEditor.EVENT_FOCUS)}),this.editor.on(BI
height:24,text:"",items:[],value:""})},_init:function(){BI.SingleTreeTrigger.superclass._init.apply(this,arguments);var self=this,o=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",element:this,text:o.text,items:o.items,height:o.height,value:o.value})},_checkTitle:function(){var self=this,val=this.getValue();BI.any(this.options.items,function(i,item){if(BI.contains(val,item.value))return self.trigger.setTitle(item.text||item.value),!0})},setValue:function(v){v=BI.isArray(v)?v:[v],this.options.value=v,this.trigger.setValue(v),this._checkTitle()},getValue:function(){return this.options.value||[]},populate:function(items){BI.SingleTreeTrigger.superclass.populate.apply(this,arguments),this.trigger.populate(items)}}),BI.shortcut("bi.single_tree_trigger",BI.SingleTreeTrigger),BI.TextValueDownListCombo=BI.inherit(BI.Widget,{_defaultConfig:function(){return BI.extend(BI.TextValueDownListCombo.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-text-value-down-list-combo",height:24,attributes:{tabIndex:0}})},_init:function(){BI.TextValueDownListCombo.superclass._init.apply(this,arguments);var self=this,o=this.options;this._createValueMap();var value;BI.isNotNull(o.value)&&(value=this._digest(o.value)),this.trigger=BI.createWidget({type:"bi.down_list_select_text_trigger",cls:"text-value-down-list-trigger",height:o.height,items:o.items,text:o.text,value:value}),this.combo=BI.createWidget({type:"bi.down_list_combo",element:this,chooseType:BI.Selection.Single,adjustLength:2,height:o.height,el:this.trigger,value:BI.isNull(value)?[]:[value],items:BI.deepClone(o.items)}),this.combo.on(BI.DownListCombo.EVENT_CHANGE,function(){var currentVal=self.combo.getValue()[0].value;currentVal!==self.value&&(self.setValue(currentVal),self.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE))}),this.combo.on(BI.DownListCombo.EVENT_SON_VALUE_CHANGE,function(){var currentVal=self.combo.getValue()[0].childValue;currentVal!==self.value&&(self.setValue(currentVal),self.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE))})},_createValueMap:function(){var self=this;this.valueMap={},BI.each(BI.flatten(this.options.items),function(idx,item){BI.has(item,"el")?BI.each(item.children,function(id,it){self.valueMap[it.value]={value:item.el.value,childValue:it.value}}):self.valueMap[item.value]={value:item.value}})},_digest:function(v){return this.value=v,this.valueMap[v]},setValue:function(v){v=this._digest(v),this.combo.setValue([v]),this.trigger.setValue(v)},getValue:function(){var v=this.combo.getValue()[0];return[v.childValue||v.value]},populate:function(items){this.options.items=BI.flatten(items),this.combo.populate(items),this._createValueMap()}}),BI.TextValueDownListCombo.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.text_value_down_list_combo",BI.TextValueDownListCombo),BI.DownListSelectTextTrigger=BI.inherit(BI.Trigger,{_defaultConfig:function(){return BI.extend(BI.DownListSelectTextTrigger.superclass._defaultConfig.apply(this,arguments),{baseCls:"bi-down-list-select-text-trigger",height:24,text:""})},_init:function(){BI.DownListSelectTextTrigger.superclass._init.apply(this,arguments);var o=this.options;this.trigger=BI.createWidget({type:"bi.select_text_trigger",element:this,height:o.height,items:this._formatItemArray(o.items),text:o.text,value:BI.isNull(o.value)?"":o.value.childValue||o.value.value})},_formatItemArray:function(){var sourceArray=BI.flatten(BI.deepClone(this.options.items)),targetArray=[];return BI.each(sourceArray,function(idx,item){BI.has(item,"el")?(BI.each(item.children,function(id,it){it.text=item.el.text+"("+it.text+")"}),targetArray=BI.concat(targetArray,item.children)):targetArray.push(item)}),targetArray},setValue:function(vals){this.trigger.setValue(vals.childValue||vals.value)},populate:function(items){this.trigger.populate(this._formatItemArray(items))}}),BI.shortcut("bi.down_list_select_text_trigger",BI.DownListSelectTextTrigger),!function(){BI.TimePopup=BI.inherit(BI.Widget,{props:{baseCls:"bi-date-time-popup",height:68},render:function(){var self=this,o=this.options;return{type:"bi.vtape",items:[{e
this.textButton.setEnable(!1)}},_getTabJson:function(){var self=this,o=this.options;return{type:"bi.tab",ref:function(){self.dateTab=this},tab:{type:"bi.linear_segment",cls:"bi-split-bottom",height:this.constants.tabHeight,items:BI.createItems([{text:BI.i18nText("BI-Basic_Year_Fen"),value:BI.DynamicYearCombo.Static},{text:BI.i18nText("BI-Basic_Dynamic_Title"),value:BI.DynamicYearCombo.Dynamic}],{textAlign:"center"})},cardCreator:function(v){switch(v){case BI.DynamicYearCombo.Dynamic:return{type:"bi.dynamic_year_card",listeners:[{eventName:"EVENT_CHANGE",action:function(){self._setInnerValue(self.year,v)}}],ref:function(){self.dynamicPane=this}};case BI.DynamicYearCombo.Static:default:return{type:"bi.static_year_card",behaviors:o.behaviors,min:self.options.min,max:self.options.max,listeners:[{eventName:BI.StaticYearCard.EVENT_CHANGE,action:function(){self.fireEvent(BI.DynamicYearPopup.EVENT_CHANGE)}}],ref:function(){self.year=this}}}},listeners:[{eventName:BI.Tab.EVENT_CHANGE,action:function(){var v=self.dateTab.getSelect();switch(v){case BI.DynamicYearCombo.Static:var date=BI.DynamicDateHelper.getCalculation(self.dynamicPane.getValue());self.year.setValue({year:date.getFullYear()}),self._setInnerValue();break;case BI.DynamicYearCombo.Dynamic:default:self.storeValue&&self.storeValue.type===BI.DynamicYearCombo.Dynamic?self.dynamicPane.setValue(self.storeValue.value):self.dynamicPane.setValue({year:0}),self._setInnerValue()}}}]}},setValue:function(v){this.storeValue=v;var self=this,type,value;switch(v=v||{},type=v.type||BI.DynamicDateCombo.Static,value=v.value||v,this.dateTab.setSelect(type),type){case BI.DynamicDateCombo.Dynamic:this.dynamicPane.setValue(value),self._setInnerValue();break;case BI.DynamicDateCombo.Static:default:this.year.setValue(value),this.textButton.setValue(BI.i18nText("BI-Basic_Current_Year")),this.textButton.setEnable(!0)}},getValue:function(){return{type:this.dateTab.getSelect(),value:this.dateTab.getValue()}}}),BI.DynamicYearPopup.BUTTON_CLEAR_EVENT_CHANGE="BUTTON_CLEAR_EVENT_CHANGE",BI.DynamicYearPopup.BUTTON_lABEL_EVENT_CHANGE="BUTTON_lABEL_EVENT_CHANGE",BI.DynamicYearPopup.BUTTON_OK_EVENT_CHANGE="BUTTON_OK_EVENT_CHANGE",BI.DynamicYearPopup.EVENT_CHANGE="EVENT_CHANGE",BI.shortcut("bi.dynamic_year_popup",BI.DynamicYearPopup),BI.DynamicYearTrigger=BI.inherit(BI.Trigger,{_const:{hgap:4,vgap:2},_defaultConfig:function(){return BI.extend(BI.DynamicYearTrigger.superclass._defaultConfig.apply(this,arguments),{extraCls:"bi-year-trigger",min:"1900-01-01",max:"2099-12-31",height:24})},beforeInit:function(callback){var o=this.options;o.title=BI.bind(this._titleCreator,this),callback()},_init:function(){BI.DynamicYearTrigger.superclass._init.apply(this,arguments);var self=this,o=this.options,c=this._const;this.editor=BI.createWidget({type:"bi.sign_editor",height:o.height,validationChecker:function(v){return""===v||BI.isPositiveInteger(v)&&!BI.checkDateVoid(v,1,1,o.min,o.max)[0]},quitChecker:function(v){return!1},hgap:c.hgap,vgap:c.vgap,watermark:BI.i18nText("BI-Basic_Unrestricted"),allowBlank:!0,errorText:function(){return BI.i18nText("BI-Year_Trigger_Invalid_Text")}}),this.editor.on(BI.SignEditor.EVENT_FOCUS,function(){self.fireEvent(BI.DynamicYearTrigger.EVENT_FOCUS)}),this.editor.on(BI.SignEditor.EVENT_STOP,function(){self.fireEvent(BI.DynamicYearTrigger.EVENT_STOP)}),this.editor.on(BI.SignEditor.EVENT_CONFIRM,function(){var value=self.editor.getValue();BI.isNotNull(value)&&self.editor.setValue(value),BI.isNotEmptyString(value)&&(self.storeValue={type:BI.DynamicDateCombo.Static,value:{year:value}}),self.fireEvent(BI.DynamicYearTrigger.EVENT_CONFIRM)}),this.editor.on(BI.SignEditor.EVENT_SPACE,function(){self.editor.isValid()&&self.editor.blur()}),this.editor.on(BI.SignEditor.EVENT_START,function(){self.fireEvent(BI.DynamicYearTrigger.EVENT_START)}),this.editor.on(BI.SignEditor.EVENT_ERROR,function(){self.fireEvent(BI.DynamicYearTrigger.EVENT_ERROR)}),BI.createWidget({element:this,type:"bi.htape",items:[{el:this.editor},{el:{type:"bi.text_button",baseCls:"bi-trigger-year-text",text:BI.i18nText("BI-Multi_Da
min:o.min,max:o.max,height:o.height,value:o.value||""}),this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_KEY_DOWN,function(){self.combo.isViewVisible()&&self.combo.hideView()}),this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_START,function(){self.combo.isViewVisible()&&self.combo.hideView()}),this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_STOP,function(){self.combo.showView()}),this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_ERROR,function(){self.combo.isViewVisible()&&self.combo.hideView()}),this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM,function(){var dateStore=self.storeTriggerValue,dateObj=self.trigger.getKey();BI.isNotEmptyString(dateObj)&&!BI.isEqual(dateObj,dateStore)&&(self.storeValue=self.trigger.getValue(),self.setValue(self.trigger.getValue())),self._checkDynamicValue(self.storeValue),self.fireEvent(BI.DynamicYearQuarterCombo.EVENT_CONFIRM)}),this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_FOCUS,function(){self.storeTriggerValue=self.trigger.getKey()}),this.combo=BI.createWidget({type:"bi.combo",container:o.container,isNeedAdjustHeight:!1,isNeedAdjustWidth:!1,el:this.trigger,popup:{minWidth:85,stopPropagation:!1,el:{type:"bi.dynamic_year_quarter_popup",ref:function(){self.popup=this},listeners:[{eventName:BI.DynamicYearQuarterPopup.EVENT_CHANGE,action:function(){self.setValue(self.popup.getValue()),self.combo.hideView(),self.fireEvent(BI.DynamicYearQuarterCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearQuarterPopup.BUTTON_CLEAR_EVENT_CHANGE,action:function(){self.setValue(),self.combo.hideView(),self.fireEvent(BI.DynamicYearQuarterCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearQuarterPopup.BUTTON_lABEL_EVENT_CHANGE,action:function(){var date=BI.getDate();self.setValue({type:BI.DynamicYearMonthCombo.Static,value:{year:date.getFullYear(),quarter:BI.getQuarter(date)}}),self.combo.hideView(),self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}},{eventName:BI.DynamicYearQuarterPopup.BUTTON_OK_EVENT_CHANGE,action:function(){self.setValue(self.popup.getValue()),self.combo.hideView(),self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM)}}],behaviors:o.behaviors,min:o.min,max:o.max},value:o.value||""}}),this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW,function(){self.popup.setValue(self.storeValue),self.fireEvent(BI.DynamicYearQuarterCombo.EVENT_BEFORE_POPUPVIEW)}),BI.createWidget({type:"bi.htape",element:this,ref:function(){self.comboWrapper=this},items:[{el:{type:"bi.icon_button",cls:"bi-trigger-icon-button date-change-h-font",width:24,height:24,ref:function(){self.changeIcon=this}},width:24},this.combo]}),this._checkDynamicValue(o.value)},_checkDynamicValue:function(v){var type=null;switch(BI.isNotNull(v)&&(type=v.type),type){case BI.DynamicYearQuarterCombo.Dynamic:this.changeIcon.setVisible(!0),this.comboWrapper.attr("items")[0].width=24,this.comboWrapper.resize();break;default:this.comboWrapper.attr("items")[0].width=0,this.comboWrapper.resize(),this.changeIcon.setVisible(!1)}},setValue:function(v){this.storeValue=v,this.trigger.setValue(v),this._checkDynamicValue(v)},getValue:function(){return this.storeValue}}),BI.DynamicYearQuarterCombo.EVENT_CONFIRM="EVENT_CONFIRM",BI.DynamicYearQuarterCombo.EVENT_BEFORE_POPUPVIEW="EVENT_BEFORE_POPUPVIEW",BI.shortcut("bi.dynamic_year_quarter_combo",BI.DynamicYearQuarterCombo),BI.extend(BI.DynamicYearQuarterCombo,{Static:1,Dynamic:2}),BI.DynamicYearQuarterPopup=BI.inherit(BI.Widget,{constants:{tabHeight:30,buttonHeight:24},props:{baseCls:"bi-year-quarter-popup",behaviors:{},min:"1900-01-01",max:"2099-12-31",width:180,height:240},render:function(){var self=this,opts=this.options,c=this.constants;return this.storeValue={type:BI.DynamicYearQuarterCombo.Static},{type:"bi.vtape",items:[{el:this._getTabJson()},{el:{type:"bi.grid",items:[[{type:"bi.text_button",cls:"bi-split-top bi-high-light",shadow:!0,textHeight:c.buttonHeight-1,text:BI.i18nText("BI-Basic_Clear"),listeners:[{eventName:BI.TextButton.EVENT_CHANGE,action:function(){self.fireEvent(BI.DynamicYearQuarterPopup.BUTTON_CLEAR_EVENT_CHANGE)}}]},{type:"bi.text_button",cls:"bi-split-left bi-split-right bi-hig
result[node.id].isLeaf!==!0&&(result[node.id].isLeaf=id===path.length-1))})})}function createOneJson(node,pId){result[node.id]={id:node.id,pId:pId,text:node.text,value:node.value,open:!0,isLeaf:node.isLeaf}}var self=this,result={},selectedValues=op.selectedValues;return null==selectedValues||BI.isEmpty(selectedValues)?void callback({}):(doCheck([],this.tree.getRoot(),selectedValues),void callback({items:BI.values(result)}))},_reqInitTreeNode:function(op,callback){function search(){var children=self._getChildren([]),start=children.length;if(""!==lastSearchValue){for(var j=0,len=start;j<len;j++)if(children[j].value===lastSearchValue){start=j+1;break}}else start=0;for(var output=[],i=start,len=children.length;i<len;i++){if(output.length<self._const.perPage)var find=nodeSearch(1,[],children[i].value,result);else if(output.length===self._const.perPage)var find=nodeSearch(1,[],children[i].value,[]);if(find[0]===!0&&output.push(children[i].value),output.length>self._const.perPage)break}if(1===op.times){var nodes=self._getAddedValueNode([],selectedValues);result=BI.concat(BI.filter(nodes,function(idx,node){var find=BI.Func.getSearchResult([node.text||node.value],keyword);return find.find.length>0||find.match.length>0}),result)}return output}function nodeSearch(deep,parentValues,current,result){if(self._isMatch(parentValues,current,keyword)){var checked=isSelected(current);return createOneJson(parentValues,current,!1,checked,!0,result),[!0,checked]}var newParents=BI.clone(parentValues);newParents.push(current);var children=self._getChildren(newParents),can=!1,checked=!1;return BI.each(children,function(i,child){var state=nodeSearch(deep+1,newParents,child.value,result);state[1]===!0&&(checked=!0),state[0]===!0&&(can=!0)}),can===!0&&(checked=isSelected(current),createOneJson(parentValues,current,!0,checked,!1,result)),[can,checked]}function createOneJson(parentValues,value,isOpen,checked,flag,result){var node=self._getTreeNode(parentValues,value);result.push({id:node.id,pId:node.pId,text:node.text,value:node.value,title:node.title,isParent:node.getChildrenLength()>0,open:isOpen,checked:checked,halfCheck:!1,flag:flag})}function isHalf(parentValues,value){var find=findSelectedObj(parentValues);return null==find?null:BI.any(find,function(v,ob){if(v===value&&null!=ob&&!BI.isEmpty(ob))return!0})}function isAllSelected(parentValues,value){var find=findSelectedObj(parentValues);return null==find?null:BI.any(find,function(v,ob){if(v===value&&null!=ob&&BI.isEmpty(ob))return!0})}function isSelected(value){return BI.any(selectedValues,function(idx,array){return BI.last(array)===value})}function findSelectedObj(parentValues){var find=selectedValues;return null==find?null:(BI.every(parentValues,function(i,v){return find=find[v],null!=find}),find)}var self=this,result=[],keyword=op.keyword||"",selectedValues=op.selectedValues,lastSearchValue=op.lastSearchValue||"",output=search();BI.nextTick(function(){callback({hasNext:output.length>self._const.perPage,items:result,lastSearchValue:BI.last(output)})})},_reqTreeNode:function(op,callback){function dealWithSelectedValue(selectedValues){var valueMap={};return BI.each(selectedValues,function(idx,v){valueMap[BI.last(v)]=[2,0]}),valueMap}for(var self=this,o=this.options,result=[],times=op.times,parentValues=op.parentValues||[],selectedValues=op.selectedValues||[],valueMap=dealWithSelectedValue(selectedValues),nodes=this._getChildren(parentValues),i=(times-1)*this._const.perPage;nodes[i]&&i<times*this._const.perPage;i++){var checked=BI.has(valueMap,nodes[i].value);result.push({id:nodes[i].id,pId:nodes[i].pId,value:nodes[i].value,text:nodes[i].text,times:1,isParent:nodes[i].getChildrenLength()>0,checked:checked,halfCheck:!1,open:o.open})}if(o.open){var allNodes=[];BI.each(nodes,function(idx,node){allNodes=BI.concat(allNodes,self._getAllChildren(parentValues.concat([node.value])))}),BI.each(allNodes,function(idx,node){var checked=BI.has(valueMap,node.value);result.push({id:node.id,pId:node.pId,value:node.value,text:node.text,times:1,isParent:node.getChildrenLength()>0,checked:checked,halfCheck:!1,open:o
old&&(BI.Widget.prototype[name]=function(){this.store&&pushTarget(this.store);try{var res=old.apply(this,arguments)}catch(e){console.error(e)}return this.store&&popTarget(),res})}),BI.isIE9Below&&BI.isIE9Below()&&(_.each(["each","map","reduce","reduceRight","find","filter","reject","every","all","some","any","max","min","sortBy","groupBy","indexBy","countBy","partition","keys","allKeys","values","pairs","invert","mapObject","findKey","pick","omit","tap"],function(name){var old=BI[name];BI[name]=function(obj,fn,context){return"function"==typeof fn?old(obj,function(key,value){if(!(key in Fix.$$skipArray))return fn.apply(this,arguments)},context):old.apply(this,arguments)}}),BI.isEmpty=function(ob){return BI.isPlainObject(ob)&&ob.__ob__?0===BI.keys(ob).length:_.isEmpty(ob)},BI.keys=function(ob){for(var keys=_.keys(ob),nKeys=[],i=0;i<keys.length;i++)keys[i]in Fix.$$skipArray||nKeys.push(keys[i]);return nKeys},BI.values=function(ob){for(var keys=BI.keys(obj),length=keys.length,values=[],i=0;i<length;i++)values[i]=obj[keys[i]];return values},BI.extend=function(){var args=Array.prototype.slice.call(arguments);if(args.length<1)return{};for(var object=args[0],i=1;i<args.length;)BI.each(args[i],function(key,v){object[key]=v}),i++;return object},BI.size=function(ob){return BI.isPlainObject(ob)&&ob.__ob__?BI.keys(ob).length:_.size(ob)},BI.isEmptyObject=function(ob){return 0===BI.size(ob)},BI.deepClone=function(ob){return Fix.toJSON(ob)}),BI.watch=Fix.watch}();
5 years ago
//# sourceMappingURL=fineui.min.js.map
!function(n){var r={};function o(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.m=n,o.c=r,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=313)}({313:function(e,t,n){e.exports=n(314)},314:function(e,t,n){"use strict";n.r(t);var r={};function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){e.prototype=Object.create(t.prototype),function i(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var o=n[r],u=Object.getOwnPropertyDescriptor(t,o);u&&u.configurable&&e[o]===undefined&&Object.defineProperty(e,o,u)}return e}(e.prototype.constructor=e,t)}function o(){return function(e){BI.shortcut(e.xtype,e)}}function f(){return function(e){BI.model(e.xtype,e)}}function d(n){var r=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{};return function(e){return function(e){function t(){return e.apply(this,arguments)||this}return c(t,e),t.prototype._store=function(){var e=r.props?r.props.apply(this):undefined;return BI.Models.getModel(n.xtype,e)},t}(e)}}n.r(r),n.d(r,"shortcut",function(){return o}),n.d(r,"model",function(){return f}),n.d(r,"store",function(){return d}),n.d(r,"Model",function(){return l});var l=function(o){function e(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return i(u(e=o.call.apply(o,[this].concat(n))||this),"model",void 0),i(u(e),"store",void 0),i(u(e),"context",void 0),i(u(e),"actions",void 0),i(u(e),"childContext",void 0),i(u(e),"TYPE",void 0),i(u(e),"computed",void 0),e}return c(e,o),e.prototype.state=function(){return{}},e}(Fix.Model);BI=BI.extend(BI,{Decorators:r})}});
5 years ago
//# sourceMappingURL=fineui.min.js.map